|
@@ -1,6 +1,11 @@
|
|
|
<template>
|
|
|
<div class="scanCode">
|
|
|
- <ScanCodeInput v-model="scanCode" @keyup.enter="enterfnc" />
|
|
|
+ <ScanCodeInput
|
|
|
+ style="width: 60%"
|
|
|
+ v-model="scanCode"
|
|
|
+ @keyup.enter="enterfnc"
|
|
|
+ />
|
|
|
+ <el-button type="primary" @click="copyMaterial">复制</el-button>
|
|
|
</div>
|
|
|
<div v-if="opCompentDataList.length < 1" class="showCodeBody">
|
|
|
<div class="codeBox">
|
|
@@ -39,6 +44,13 @@
|
|
|
<div class="describe">还需采集</div>
|
|
|
</div>
|
|
|
<svg-icon class="svgStyle" icon-class="jiaobiao" size="25" />
|
|
|
+ <el-checkbox
|
|
|
+ class="checkboxStyle"
|
|
|
+ v-model="opCompentDataList[index].select"
|
|
|
+ @click.stop
|
|
|
+ label=""
|
|
|
+ size="large"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<xiangqingPopUp
|
|
@@ -52,29 +64,34 @@
|
|
|
:seqNo="scanCode"
|
|
|
@submit="submit"
|
|
|
/>
|
|
|
+ <copyPopUp v-model="showCP" @submit="submitCopy" />
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
|
|
|
import caijiRightPopUp from "../popUpView/caijiRightPopUp.vue";
|
|
|
import xiangqingPopUp from "../popUpView/xiangqingPopUp.vue";
|
|
|
+import copyPopUp from "../popUpView/copyPopUp.vue";
|
|
|
import {
|
|
|
getInfo,
|
|
|
itemRecordAdd,
|
|
|
recordList,
|
|
|
searchMaterial,
|
|
|
+ copyMaterials,
|
|
|
} from "@/api/prosteps/wuliaocaiji";
|
|
|
import { useProcessStore } from "@/store";
|
|
|
|
|
|
defineOptions({
|
|
|
name: "Wuliaocaiji",
|
|
|
});
|
|
|
+
|
|
|
const caijiRef = ref(null);
|
|
|
const store = useProcessStore();
|
|
|
const scanCode = ref("");
|
|
|
const scanCodeCopyValue = ref("");
|
|
|
const showXQ = ref(false);
|
|
|
const showCJ = ref(false);
|
|
|
+const showCP = ref(false);
|
|
|
//详情展示数据
|
|
|
const showInfoData = ref([]);
|
|
|
const showInfo = ref({});
|
|
@@ -98,6 +115,38 @@ const enterfnc = async () => {
|
|
|
showCJ.value = true;
|
|
|
}
|
|
|
};
|
|
|
+const checkBoxMaterialCodesArray = computed(() => {
|
|
|
+ let array = ref([]);
|
|
|
+ opCompentDataList.value.forEach((element) => {
|
|
|
+ if (element.select) {
|
|
|
+ array.value.push(element.itemCode);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return array.value;
|
|
|
+});
|
|
|
+const copyMaterial = () => {
|
|
|
+ showCP.value = true;
|
|
|
+};
|
|
|
+const clearSelect = () => {
|
|
|
+ opCompentDataList.value.forEach((element) => {
|
|
|
+ element.select = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+const submitCopy = async (seqList) => {
|
|
|
+ if (seqList && seqList.length > 0) {
|
|
|
+ const { code } = await copyMaterials({
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ materialCodes: checkBoxMaterialCodesArray.value,
|
|
|
+ seqList: seqList,
|
|
|
+ });
|
|
|
+ ElMessage.success("操作成功");
|
|
|
+ clearSelect();
|
|
|
+ showCP.value = false;
|
|
|
+ } else {
|
|
|
+ ElMessage.error("请选择流转卡号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+};
|
|
|
const opCompentDataList = ref([]);
|
|
|
provide("opCompentDataList", opCompentDataList);
|
|
|
//通过id获取详情
|
|
@@ -160,6 +209,8 @@ onMounted(() => {
|
|
|
.scanCode {
|
|
|
width: 100%;
|
|
|
margin-top: $p5;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
.materialInfoBody {
|
|
@@ -199,7 +250,11 @@ onMounted(() => {
|
|
|
bottom: 0;
|
|
|
right: 0;
|
|
|
}
|
|
|
-
|
|
|
+ .checkboxStyle {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: 8px;
|
|
|
+ }
|
|
|
.describe {
|
|
|
font-size: $f20;
|
|
|
color: $font-default-60;
|