| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | import QRCode from "qrcode"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | //语言获取 |
| | | const company = companyInfo() |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let produceList = ref([]) |
| | |
| | | const route = currentRoute.value |
| | | const printMerge = route.query.printMerge |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | console.log(route.query.printList) |
| | | let flowCardCount = data.value.printList.length |
| | | onMounted(() => { |
| | | // if (id === null || id === undefined || id === '') { |
| | |
| | | item.detail[0].technologyNumber = printMerge; |
| | | }); |
| | | } |
| | | let technologyNumberMerge = printMerge.split('').join(','); |
| | | console.log(technologyNumberMerge) |
| | | produceList.value[0].detail[0].technologyNumberMerge = technologyNumberMerge |
| | | console.log(produceList.value[0].detail[0]) |
| | | const s01Values = []; |
| | | // |
| | | // // 获取每个元素的 S01 值并存储到 s01Values 数组中 |
| | | // produceList.value[0].numberList.forEach(element => { |
| | | // const otherColumnsObject = JSON.parse(element.other_columns); |
| | | // const s01Value = otherColumnsObject.S01; |
| | | // s01Values.push(s01Value); |
| | | // }); |
| | | // produceList.value[0].detailList.forEach((detail, index) => { |
| | | // detail.s01Value = s01Values[index]; // 添加一个名为 s01Value 的新属性,存储对应的 S01 值 |
| | | // }); |
| | | // 遍历 res.data.numberList 数组,获取每个元素的 S01 值并存储到 s01Values 数组中 |
| | | produceList.value[0].detailList.forEach(element => { |
| | | try { |
| | |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="24"> |
| | | <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div>天津北方玻璃技术股份有限公司</div> |
| | | <div>{{company.companyName}}</div> |
| | | <div>生产流程卡</div> |
| | | <div style="text-align: right;font-weight: bolder">流程卡号: {{ |
| | | <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder">流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumberMerge }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | | <div v-else style="text-align: right;font-weight: bolder">流程卡号: {{ |
| | | itemFlow.process_id |
| | | }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架 |
| | | </div> |
| | |
| | | 数量: |
| | | <label>{{ itemsum.quantity }}</label> |
| | | 面积: |
| | | <label>{{ parseFloat(itemsum.gross_area, 2) }}</label> |
| | | <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label> |
| | | 重量: |
| | | <label>{{ itemsum.weight }}</label> |
| | | <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 13mm 6mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | | @media print { |
| | | |