| | |
| | | printMerge: null, |
| | | printLike: null, |
| | | printProject:null, |
| | | merges:null |
| | | merges:null, |
| | | printFc:null, |
| | | flashback:null, |
| | | landingSequence:null, |
| | | compound:null |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | |
| | | if (merges == '') { |
| | | merges = null |
| | | } |
| | | |
| | | //指定层同架 |
| | | let compound = props.compound |
| | | if (compound == '') { |
| | | compound = null |
| | | } |
| | | let name=company.companyName |
| | | |
| | | let printNumberFc = props.printFc |
| | | data.value.printList = JSON.parse(props.printList) |
| | | let flowCardCount = '' |
| | | onMounted(() => { |
| | | if(props.printProject!=null){ |
| | | request.post(`/processCard/getSelectPrintProject/${printProject}/${merges}`).then((res) => { |
| | | request.post(`/processCard/getSelectPrintProject/${printProject}/${merges}/${props.flashback}/${props.landingSequence}`).then((res) => { |
| | | if (res.code == 200) { |
| | | load(res.data.data) |
| | | } else { |
| | |
| | | } |
| | | }) |
| | | }else{ |
| | | request.post(`/processCard/getSelectPrinting/${merge}/${like}/${merges}`, data.value).then((res) => { |
| | | request.post(`/processCard/getSelectPrinting/${merge}/${like}/${merges}/${props.flashback}/${compound}/${props.landingSequence}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | load(res.data.data) |
| | | } else { |
| | |
| | | const handleGetQRCode = async () => { |
| | | let technologyNumber='' |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | if (produceList.value[i].detail[0].qrcode!="" && produceList.value[i].detail[0].qrcode!=null){ |
| | | technologyNumber = produceList.value[i].detail[0].qrcode.toString(); // 转换为字符串以便处理每个字符,合并标签 |
| | | }else { |
| | | console.log(produceList.value[i].detail[0]) |
| | | // if (produceList.value[i].detail[0].qrcode!="" && produceList.value[i].detail[0].qrcode!=null){ |
| | | // technologyNumber = produceList.value[i].detail[0].qrcode.toString(); // 转换为字符串以便处理每个字符,合并标签 |
| | | // }else { |
| | | technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | } |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber}` |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber |
| | | }); |
| | | |
| | | // for (let j = 0; j < technologyNumber.length; j++) { |
| | | // const processId = produceList.value[i].detail[0].process_id; |
| | | // const url = `${processId}/${technologyNumber[j]}`; |
| | | // // 生成 QR Code 并存储到数组中 |
| | | // const qrcodeData = await QRCode.toDataURL(url); |
| | | // produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | // qrcode: qrcodeData, |
| | | // technologyNumber: technologyNumber[j] |
| | | // }); |
| | | // |
| | | // } |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | if (compound == null ){ |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber}` |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber |
| | | }); |
| | | } |
| | | else { |
| | | technologyNumber = compound |
| | | for (let j = 0; j < technologyNumber.length; j++) { |
| | | const processId = produceList.value[i].detail[0].process_id; |
| | | const url = `${processId}/${technologyNumber[j]}`; |
| | | // 生成 QR Code 并存储到数组中 |
| | | const qrcodeData = await QRCode.toDataURL(url); |
| | | produceList.value[i].detail[0]["qrcodeList"].push({ |
| | | qrcode: qrcodeData, |
| | | technologyNumber: technologyNumber[j] |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }; |
| | | |
| | |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="31"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div id="bj" v-if="printFc=='true'" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div id="bj" v-else style="float: right;font-size: 28px"></div> |
| | | <div>{{ company.companyName }}</div> |
| | | <div>生产流程卡<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span></div> |
| | | <div> |
| | | 生产流程卡<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span> |
| | | <span style="font-weight: bold" v-if="props.compound!=null">({{ props.compound }}层同架)</span> |
| | | </div> |
| | | <div style="font-weight: bolder;display: flex;justify-content:space-between"> |
| | | <div> |
| | | 打印人:{{user.user.userName}} |
| | |
| | | <td class="tdNowrap">客户名称:</td> |
| | | <td colspan="2">{{ items.customer_name }}</td> |
| | | <td class="tdNowrap">项目名称:</td> |
| | | <td colspan="4" style="min-width: 250px;">{{ items.project }}</td> |
| | | <td v-if="name=='洛阳北方玻璃技术股份有限公司'" colspan="4" style="min-width: 250px;">{{ items.projectBatch }}</td> |
| | | <td v-else colspan="4" style="min-width: 250px;">{{ items.project }}</td> |
| | | <td class="tdNowrap">工艺流程:</td> |
| | | <td :colspan="2+item.processList.length*2" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | |
| | | <tr v-for="(qrCodeItem,index) in item.detail" :key="index"> |
| | | <td colspan="31"> |
| | | <span style="display: flex;"> |
| | | <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%"> |
| | | <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 250px"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src=qrCodeItems.qrcode> |
| | | </div> |