Merge branch 'master' of http://bore.pub:10439/r/ERP_override
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | 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([]) |
| | | let list = ref() |
| | | const details = ref([]) |
| | | |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | | printList:null, |
| | | printMerge:null |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | const printMerge = props.printMerge |
| | | let merge=props.printMerge |
| | | if (merge == '') { |
| | | merge = null |
| | | } |
| | | data.value.printList = JSON.parse(props.printList) |
| | | let flowCardCount = data.value.printList.length |
| | | onMounted(() => { |
| | | request.post(`/processCard/getSelectPrinting/${merge}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | //处理单片厚度 |
| | | |
| | | for (let j = 0; j < produceList.value.length; j++) { |
| | | let sumWeight = 0 |
| | | produceList.value[j].detailList.forEach((item, index) => { |
| | | // 解析 separation 字段的 JSON 字符串 |
| | | let separationObj = JSON.parse(item.separation); |
| | | |
| | | // 获取 thickness 的原始值 |
| | | let thicknessValue = separationObj.thickness; |
| | | |
| | | // 去除 'mm' 单位 |
| | | let thicknessWithoutUnit = thicknessValue.replace('mm', ''); |
| | | |
| | | item.separation=thicknessWithoutUnit |
| | | |
| | | sumWeight += item.width*item.height*item.quantity/1000000*item.separation*2.5*1; |
| | | |
| | | }); |
| | | produceList.value[j].detail[0].weight=sumWeight |
| | | } |
| | | //处理合并打印 |
| | | if (printMerge !== null && printMerge !== undefined && printMerge !== "") { |
| | | |
| | | produceList.value.forEach(item => { |
| | | item.detail[0].technologyNumber = printMerge; |
| | | }); |
| | | |
| | | //合并打印工艺流程处理 |
| | | let process = produceList.value[0].detail[0].process |
| | | let indexOfJiaJiao = process.indexOf('夹胶'); |
| | | if (indexOfJiaJiao !== -1) { |
| | | // 使用 substring 截取 "夹胶" 后面的部分,包括 "夹胶" 本身 |
| | | let afterJiaJiao = process.substring(indexOfJiaJiao).trim(); |
| | | produceList.value.forEach(item =>{ |
| | | item.detail[0].process = afterJiaJiao |
| | | }) |
| | | } |
| | | |
| | | let indexOfProceList=produceList.value[0].processList |
| | | let getProceList = indexOfProceList.findIndex(item => item.process === '夹胶'); |
| | | |
| | | if (getProceList !== -1) { |
| | | // 使用 filter 方法过滤出 "夹胶" 及其之后的对象 |
| | | produceList.value[0].processList = indexOfProceList.filter((item, index) => index >= getProceList); |
| | | } |
| | | } |
| | | |
| | | produceList.value.forEach(item =>{ |
| | | let technologyNumberMerge = printMerge.split('').join(','); |
| | | item.detail[0].technologyNumberMerge = technologyNumberMerge |
| | | }) |
| | | //处理编号列 |
| | | //定义存放编号数组 |
| | | const s01Values = []; |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | const s01Values = []; |
| | | // 遍历 detailList 数组,提取 S01 值到 s01Values 数组 |
| | | if (produceList.value[i].detailList[0].other_columns!=null |
| | | || produceList.value[i].detailList[0].other_columns!=undefined){ |
| | | produceList.value[i].detailList.forEach(element => { |
| | | const otherColumnsObject = JSON.parse(element.other_columns); |
| | | const s01Value = otherColumnsObject.S01; |
| | | s01Values.push(s01Value || ''); // 如果 S01 值为空,添加空字符串或者其他默认值 |
| | | }); |
| | | |
| | | // 将 s01Values 中的值赋给每个订单详情对象的 s01Value 属性 |
| | | produceList.value[i].detailList.forEach((detail, index) => { |
| | | detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 赋值给 s01Value 属性 |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | handleGetQRCode() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | ) |
| | | |
| | | |
| | | const handleGetQRCode = async () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符 |
| | | produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code |
| | | |
| | | 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] |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | //根据输入的数量重新汇总 |
| | | const handleSummary = () => { |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | //数量 |
| | | let totalQuantity = 0; |
| | | //面积 |
| | | let totalArea = 0; |
| | | //重量 |
| | | let totalWeight = 0; |
| | | // 对每个集合中的 detailList 进行计算 |
| | | produceList.value[i].detailList.forEach(collection => { |
| | | totalQuantity += collection.quantity*1; |
| | | //每个序号面积 |
| | | collection.total_area=parseFloat((collection.width*collection.height*collection.quantity/1000000).toFixed(2)) |
| | | totalArea += collection.total_area*1; |
| | | totalWeight += collection.width*collection.height*collection.quantity/1000000*collection.separation*2.5*1; |
| | | //每个序号周长 |
| | | collection.perimeter= (collection.width*2+collection.height*2)*collection.quantity/1000 |
| | | }); |
| | | // 输出每个集合中的总数量 |
| | | produceList.value[i].detail[0].quantity=totalQuantity |
| | | produceList.value[i].detail[0].gross_area=totalArea |
| | | produceList.value[i].detail[0].weight=totalWeight |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>--> |
| | | <div id="printFlowCard"> |
| | | <table v-for="(item,id) in produceList" id="contentTable" :key="id"> |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="24"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px "/></div> |
| | | <div id="bj" style="float: right;font-size: 28px">返 {{ id + 1 }}</div> |
| | | <div>{{company.companyName}}</div> |
| | | <div>生产流程卡</div> |
| | | <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> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(items,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">客户名称:</td> |
| | | <td colspan="2">{{ items.customer_name }}</td> |
| | | <td class="tdNowrap">项目名称:</td> |
| | | <td colspan="2">{{ items.project }}</td> |
| | | <td class="tdNowrap">工艺流程:</td> |
| | | <td colspan="17" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | | <tr v-for="(itemTr,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">磨边类型:</td> |
| | | <td colspan="2">{{ itemTr.edging_type }}</td> |
| | | <td class="tdNowrap">单片名称:</td> |
| | | <td colspan="2">{{ itemTr.glass_child }}</td> |
| | | <td class="tdNowrap">产品名称:</td> |
| | | <td colspan="17">{{ itemTr.product_name }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td rowspan='2'>序号</td> |
| | | <td rowspan='2'>编号</td> |
| | | <td rowspan='2'>宽*高</td> |
| | | <td rowspan='2'>数量</td> |
| | | <td rowspan='2'>面积</td> |
| | | <td rowspan='2'>周长</td> |
| | | <td rowspan='2'>半径</td> |
| | | <td rowspan='2'>备注</td> |
| | | <td v-for="(itemPr,index) in item.processList" :key="index" colspan="2">{{ itemPr.process }}</td> |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | <td>{{company.printLabel.printFlowCard.patch}}</td> |
| | | <td>{{company.printLabel.printFlowCard.lackOf}}</td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | |
| | | <tr v-for="(itemDatile,index) in item.detailList" :key="index"> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <td>{{itemDatile.s01Value}}</td> |
| | | <td>{{ itemDatile.child_width }}</td> |
| | | <td class="item" style="width: 5%;height: 100%;"><el-input @keyup="handleSummary()" style="border: none" v-model="itemDatile.quantity"></el-input></td> |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | | <td>{{ itemDatile.bend_radius }}</td> |
| | | <td>{{ itemDatile.remarks }}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr style="height: 14px"> |
| | | <td v-for="(itemsum,index) in item.detail" :key="index" colspan="24"> |
| | | 数量: |
| | | <label>{{ itemsum.quantity }}</label> |
| | | 面积: |
| | | <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label> |
| | | 重量: |
| | | <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | <td colspan="6" rowspan="6" style="width: 480px;height: 100px "> |
| | | <!-- <div style="width: 100%;height: 100%"><textarea style="height: 99%;width: 99%;font-size: 11px">{{ itemtextarea.processing_note }}</textarea>--> |
| | | <!-- </div>--> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px">{{company.printLabel.printFlowCard.processingNote(itemtextarea)}}</textarea> |
| | | </div> |
| | | </td> |
| | | <td>完工签名</td> |
| | | <td></td> |
| | | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>生产日期</td> |
| | | <td></td> |
| | | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td></td> |
| | | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr v-for="(qrCodeItem,index) in item.detail" :key="index"> |
| | | <td colspan="19"> |
| | | <span style="display: flex;"> |
| | | <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%"> |
| | | <div class='qrCode' style="width: 80px;height: 80px;"> |
| | | <img :src=qrCodeItems.qrcode> |
| | | </div> |
| | | <span style="float: left;font-weight: bolder">{{ |
| | | qrCodeItem.process_id + "/" + qrCodeItems.technologyNumber |
| | | }}</span> |
| | | </span> |
| | | </span> |
| | | </td> |
| | | |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | #printButton { |
| | | margin-top: -40px; |
| | | width: 100px; |
| | | } |
| | | |
| | | #printFlowCard { |
| | | text-align: center; |
| | | //font-weight: bolder; height: 600px; |
| | | } |
| | | |
| | | #contentTable { |
| | | border-collapse: collapse; |
| | | border: 1px solid black; |
| | | width: 100%; |
| | | |
| | | } |
| | | |
| | | #contentTable thead { |
| | | font-size: 13px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable thead div { |
| | | font-size: 15px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable tr td { |
| | | border: 1px solid black; |
| | | height: 18px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | #contentTable tbody { |
| | | white-space: nowrap; |
| | | |
| | | } |
| | | |
| | | .tdNowrap { |
| | | white-space: nowrap; |
| | | |
| | | } |
| | | |
| | | #contentTable tfoot { |
| | | font-size: 12px; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 2mm 0mm 0mm 1mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | | @media print { |
| | | |
| | | tbody { |
| | | display: table-row-group; |
| | | } |
| | | |
| | | table { |
| | | page-break-before: always; |
| | | } |
| | | |
| | | table { |
| | | page-break-inside: auto; |
| | | } |
| | | |
| | | thead { |
| | | display: table-header-group; |
| | | } |
| | | |
| | | tfoot { |
| | | display: table-footer-group; |
| | | page-break-inside: avoid; |
| | | } |
| | | } |
| | | |
| | | .qrCode img { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | <thead> |
| | | <tr v-if="index===0"> |
| | | <th style="width: 6%;">序号</th> |
| | | <th style="width: 20%;">楼层编号</th> |
| | | <th style="width: 20%;" colspan="1">宽X高</th> |
| | | <th style="width: 15%;">楼层编号</th> |
| | | <th style="width: 17%;" colspan="1">宽X高</th> |
| | | <th style="width: 10%;">数量</th> |
| | | <th style="width: 10%;">面积</th> |
| | | <th style="width: 10%;">单价</th> |
| | | <th style="width: 12%;">金额</th> |
| | | <th style="width: 12%;" colspan="2">加工要求</th> |
| | | <th style="width: 20%;" colspan="2">加工要求</th> |
| | | </tr> |
| | | |
| | | |
| | |
| | | <th style="text-align: left;border:none;font-weight: bold;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="width: 6%;font-weight: bold;">序号</th> |
| | | <th style="width: 20%;font-weight: bold;">楼层编号</th> |
| | | <th style="width: 20%;font-weight: bold;" colspan="2">宽X高</th> |
| | | <th style="width: 10%;font-weight: bold;">数量</th> |
| | | <th style="width: 10%;font-weight: bold;">面积</th> |
| | | <th style="width: 10%;font-weight: bold;">单价</th> |
| | | <th style="width: 12%;font-weight: bold;">金额</th> |
| | | <th style="width: 12%;font-weight: bold;" colspan="2">加工要求</th> |
| | | <th style="width: 6%;">序号</th> |
| | | <th style="width: 15%;">楼层编号</th> |
| | | <th style="width: 17%;" colspan="1">宽X高</th> |
| | | <th style="width: 10%;">数量</th> |
| | | <th style="width: 10%;">面积</th> |
| | | <th style="width: 10%;">单价</th> |
| | | <th style="width: 12%;">金额</th> |
| | | <th style="width: 20%;" colspan="2">加工要求</th> |
| | | </tr> |
| | | <template v-for="(item, index) in produceList" :key="index" > |
| | | <tr> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.productName}}</span></td> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="3">对方单号:</td> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="2">对方单号:</td> |
| | | <td style="font-size: 15px;font-weight: bold;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderId}}</span></td> |
| | | </tr> |
| | | |
| | | <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1"> |
| | | <td>{{items.order_number}}</td> |
| | | <td>{{items.buildingNumber}}</td> |
| | | <td colspan="2" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td> |
| | | <td colspan="1" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td> |
| | | <td>{{items.quantity}}</td> |
| | | <td>{{items.compute_gross_area}}</td> |
| | | <td>{{items.price}}</td> |
| | |
| | | <td colspan="2">{{items.processingNote}}</td> |
| | | </tr> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="4">小计:</td> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">小计:</td> |
| | | <td>{{item.DeliveryDetail.quantity}}</td> |
| | | <td>{{item.DeliveryDetail.area}}</td> |
| | | <td></td> |
| | |
| | | |
| | | </template> |
| | | <tr class="day-in"> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="4">合计:</td> |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">合计:</td> |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | <td></td> |
| | |
| | | print:'Print', |
| | | export:'Derive', |
| | | empty:'Clear', |
| | | |
| | | incrementalAll:'Increase successively after selecting', |
| | | incrementalChecked:'Selected and increased successively', |
| | | true:'Yes', |
| | | false:'No', |
| | | computedSize:'Scientific counting', |
| | | paste:'Paste', |
| | | msg:{ |
| | | max255:"The value contains a maximum of 255 characters", |
| | | range99999Dec2: |
| | |
| | | theProductHasBeenReviewedAndCannotBeDeleted:'The product has been reviewed and cannot be removed', |
| | | |
| | | productAbbreviation:'Product abbreviation', |
| | | productDuplication:'Product repetition', |
| | | } |
| | | }, |
| | | order:{ |
| | |
| | | orderDetailsSummaryReport:'Order details summary report', |
| | | buildingNumber:'Floor number', |
| | | saveHeader:'Save header', |
| | | |
| | | orderNotApproved:'Order not reviewed', |
| | | orderHasBeenReceived:'The order is in stock', |
| | | printingNumber:'Print times', |
| | | processingOrder:'Processing sheet', |
| | | sheet2:'Horizontal - multi-layer details', |
| | | sheet4:'Production and processing of single vertical plate', |
| | | sheet3:'View shipping information', |
| | | sheet5:'Production and processing of single curved glass (single sheet)', |
| | | oneClickStorage:'One-click completion', |
| | | msg:{ |
| | | productCheck:'Please select a product', |
| | | tableLengthNot:'No table data', |
| | |
| | | calculationAreaPrompt4:'Calculate', |
| | | warning:'Tips', |
| | | calculationAreaPrompt5:'Do you want to continue creating duplicate orders', |
| | | |
| | | pleaseCancelTheFilteringFirst:'Please cancel the selection first.', |
| | | } |
| | | |
| | | }, |
| | |
| | | deleteNoProcedure:'Delete failed Check whether the next operation has been reported', |
| | | pleaseCheckTheRequiredData:'Please check the required data', |
| | | landingSequence:'Landing sequence', |
| | | |
| | | labelStyle:'Label Style', |
| | | customLabelPrinting:'Custom label printing', |
| | | labelPrinting:'Label printing', |
| | | labelPrinting:'Lable Printing', |
| | | sortingSuccessful:'Sorting successful', |
| | | sorting:'Sorting', |
| | | pleaseSelect:'Please select', |
| | |
| | | halfProductLabel:'Half-finished product label', |
| | | pleaseSelectCustomPrintLabelStyle:'Please select a custom print label style', |
| | | mergePrinting:'Merge printing', |
| | | printStatus:'Print status', |
| | | printStatus:'Print times', |
| | | labelPrinting2:'Label printing 2', |
| | | addAutomatically:'Auto fill', |
| | | selectFill:'Select fill' |
| | | selectFill:'Selected fill' |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'number', |
| | | glassNumber:'Code', |
| | | glassAddress:'Glass Address', |
| | | WorkReportingManagement:'Work Reporting Management ', |
| | | addReportingWorks:'New Work Reporting', |
| | |
| | | salesman:'Salesman', |
| | | money:'Amount', |
| | | |
| | | pleaseSelectTheSameCustomerProject:'Please select the project for the same customer', |
| | | |
| | | }, |
| | | replenish:{ |
| | | patchManagement:'Patch Management', |
| | |
| | | ConfirmPasswordCannotBeEmpty:'Confirm that the password cannot be empty', |
| | | TheTwoPasswordsAreNotTheSame:'Two different passwords', |
| | | OldPasswordError:'Old password error', |
| | | |
| | | userName:'User name', |
| | | changeUserName:'Modifying a user name', |
| | | userNameCannotBeEmpty:'The user name cannot be empty', |
| | | }, |
| | | orderBasicData:{ |
| | | order:'Order', |
| | |
| | | firstLevel:'Primary class', |
| | | towLevel:'Secondary class', |
| | | alias:'alias', |
| | | msg1:'Upload picture size can not exceed 5MB!', |
| | | msg2:'Upload picture can only be JPG or PNG format!', |
| | | selectFile:'Selecting file', |
| | | msg3:'Only jpg/png files can be uploaded and the size does not exceed 5 MB', |
| | | }, |
| | | machine:{ |
| | | basicId:'Equipment number', |
| | |
| | | print:'Печать', |
| | | export:'Экспорт', |
| | | empty:'Очистить', |
| | | |
| | | incrementalAll:'之后递增', |
| | | incrementalChecked:'选中递增', |
| | | true:'是', |
| | | false:'否', |
| | | computedSize:'科学计数', |
| | | paste:'粘贴', |
| | | msg:{ |
| | | max255:"Введите 255 символов.", |
| | | range99999Dec2: |
| | |
| | | theProductHasBeenReviewedAndCannotBeDeleted:'Продукция проверена и не может быть удалена', |
| | | |
| | | productAbbreviation:'Продукция', |
| | | productDuplication:'产品重复', |
| | | } |
| | | }, |
| | | order:{ |
| | |
| | | orderDetailsSummaryReport:'Сводный отчет о заказах', |
| | | buildingNumber:'Номер этажа', |
| | | saveHeader:'Изменить заголовок таблицы', |
| | | |
| | | orderNotApproved:'订单未审核', |
| | | orderHasBeenReceived:'订单已入库', |
| | | printingNumber:'打印次数', |
| | | processingOrder:'加工单', |
| | | sheet2:'横版-多层明细', |
| | | sheet4:'生产加工单纵版', |
| | | sheet3:'浏览发货信息', |
| | | sheet5:'生产加工单弯钢(单片)', |
| | | oneClickStorage:'一键完工', |
| | | msg:{ |
| | | productCheck:'Пожалуйста, выберите продукт', |
| | | tableLengthNot:'Нет данных таблицы', |
| | |
| | | calculationAreaPrompt4:'Расчет', |
| | | warning:'Подсказка', |
| | | calculationAreaPrompt5:'Повторить заказ Создать', |
| | | |
| | | pleaseCancelTheFilteringFirst:'请先取消筛选', |
| | | } |
| | | |
| | | }, |
| | |
| | | deleteNo:'Ошибка удаления, проверьте обратную связь карты процесса', |
| | | deleteNoProcedure:'Ошибка удаления, проверьте обратную связь операции', |
| | | pleaseCheckTheRequiredData:'Выберите необходимые данные.', |
| | | landingSequence:'Landing sequence', |
| | | |
| | | labelStyle:'Стиль метки', |
| | | customLabelPrinting:'Настройка печати вкладок', |
| | | labelPrinting:'标签打印', |
| | | sortingSuccessful:'Сортировать успешно', |
| | | sorting:'Сортировка', |
| | | pleaseSelect:'Выберите', |
| | |
| | | halfProductLabel:'Маркировка полуфабрикатов', |
| | | pleaseSelectCustomPrintLabelStyle:'Выберите другой стиль этикетки', |
| | | mergePrinting:'Слияние печати', |
| | | printStatus:'打印次数', |
| | | labelPrinting2:'标签打印2', |
| | | addAutomatically:'自动填充', |
| | | selectFill:'自动填充' |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'number', |
| | | glassAddress:'Стеклянная маркировка', |
| | | WorkReportingManagement:'Управление обратной связью', |
| | | addReportingWorks:'Новые отзывы', |
| | |
| | | salesman:'Продаж', |
| | | money:'Сумма', |
| | | |
| | | pleaseSelectTheSameCustomerProject:'请选择相同客户的项目', |
| | | |
| | | }, |
| | | replenish:{ |
| | | patchManagement:'Управление стеклянными пластинами', |
| | |
| | | ConfirmPasswordCannotBeEmpty:'Пароль подтверждения не может быть пустым', |
| | | TheTwoPasswordsAreNotTheSame:'Два разных пароля.', |
| | | OldPasswordError:'Старая ошибка пароля', |
| | | |
| | | userName:'用户名称', |
| | | changeUserName:'修改用户名称', |
| | | userNameCannotBeEmpty:'用户名称不能为空', |
| | | }, |
| | | orderBasicData:{ |
| | | order:'Заказы', |
| | |
| | | firstLevel:'Категория I', |
| | | towLevel:'Категория II', |
| | | alias:'Имя', |
| | | msg1:'上传头像图片大小不能超过 5MB!', |
| | | msg2:'上传头像图片只能是 JPG或者PNG 格式!', |
| | | selectFile:'选取文件', |
| | | msg3:'只能上传jpg/png文件,且不超过5m', |
| | | }, |
| | | machine:{ |
| | | basicId:'Номер оборудования', |
| | |
| | | orderNotApproved:'订单未审核', |
| | | orderHasBeenReceived:'订单已入库', |
| | | printingNumber:'打印次数', |
| | | processingOrder:'加工单', |
| | | sheet2:'横版-多层明细', |
| | | sheet4:'生产加工单纵版', |
| | | sheet3:'浏览发货信息', |
| | | sheet5:'生产加工单弯钢(单片)', |
| | | oneClickStorage:'一键完工', |
| | | msg:{ |
| | | productCheck:'请选择产品', |
| | | tableLengthNot:'没有表格数据', |
| | |
| | | firstLevel:'一级类别', |
| | | towLevel:'二级类别', |
| | | alias:'别名', |
| | | msg1:'上传头像图片大小不能超过 5MB!', |
| | | msg2:'上传头像图片只能是 JPG或者PNG 格式!', |
| | | msg1:'上传图片大小不能超过 5MB!', |
| | | msg2:'上传图片只能是 JPG或者PNG 格式!', |
| | | selectFile:'选取文件', |
| | | msg3:'只能上传jpg/png文件,且不超过5m', |
| | | }, |
| | |
| | | component: () => import('../views/pp/rework/SelectRework.vue'), |
| | | }, |
| | | { |
| | | path: 'printReworkFlowCard', |
| | | name: 'printReworkFlowCard', |
| | | component: () => import('../views/pp/rework/PrintReworkFlowCard.vue'), |
| | | }, |
| | | { |
| | | path: 'printReworkCustomLabelSemi', |
| | | name: 'printReworkCustomLabelSemi', |
| | | component: () => import('../views/pp/rework/PrintReworkCustomLabelSemi.vue'), |
| | | }, |
| | | { |
| | | path: 'printReworkCustomLabel', |
| | | name: 'printReworkCustomLabel', |
| | | component: () => import('../views/pp/rework/PrintReworkCustomLabel.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/Rework/SelectRework' |
| | | } |
| | |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | :deep(#sizeCheck .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body){ |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | dataType: [], |
| | | }) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let orderId = route.query.orderId |
| | | data.value.printList=JSON.parse(route.query.printList) |
| | | |
| | | |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/selectPrint/${orderId}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/selectPrint`, data.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | let newDataCollection = []; |
| | | for (let i = 0; i <res.data.data.length ; i++) { |
| | | res.data.data[i].detail.forEach((item) =>{ |
| | | newDataCollection.push(item); |
| | | }) |
| | | } |
| | | |
| | | titleSelectJson.value.dataType = res.data.type |
| | | // produceList.forEach(item => { |
| | | // if(item.print_status == 1){ |
| | | // item.print_status='已打印' |
| | | // } |
| | | // else if (item.print_status == 0){ |
| | | // item.print_status='未打印' |
| | | // } |
| | | // }); |
| | | xGrid.value.reloadData(produceList) |
| | | xGrid.value.reloadData(newDataCollection) |
| | | gridOptions.loading = false |
| | | hideButton() |
| | | } else { |
| | |
| | | //表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78}, |
| | | {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'} |
| | | {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'}, |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | case 'titleStyle': { |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | case 'editCheckbox': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | orderIdList += selectRecords[i].order_id |
| | | } else { |
| | | orderIdList += selectRecords[i].order_id + "|" |
| | | } |
| | | } |
| | | let array = orderIdList.split('|'); |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords)}}) |
| | | return; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>--> |
| | | <el-button @click="getTableRow(row,'sort')" link type="primary" size="small">{{$t('processCard.sorting')}}</el-button> |
| | | </template> |
| | | |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let titleList = ref([]) |
| | | let dataList = ref([]) |
| | | let list = ref([]) |
| | | let lastList=ref([]) |
| | | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | const type = route.query.type |
| | | const faceOrientation = route.query.faceOrientation |
| | | const lableType = route.query.lableType |
| | | |
| | | onMounted(() => { |
| | | request.post(`/Replenish/getSelectPrintCustomLabel/${type}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | labelList = dataList[0] |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count= list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | console.log(list.value[i].data[j]) |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++){ |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | ) |
| | | |
| | | |
| | | // 打印方法 |
| | | const printFlowCard = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("print"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | | "body>#" + |
| | | printId + |
| | | "{display:none}@media print{body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | | printId + |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button> |
| | | <div class="printFlowCard_finished" id="print"> |
| | | <div v-for="(item1,id) in lastList" class="entirety_finished"> |
| | | <div class="row4">{{faceOrientation}}</div> |
| | | <div v-for="(item,id) in labelList" class="contentRow"> |
| | | <div class="row1">{{ item.title }}:</div> |
| | | <div class="row2">{{ item1[item.name] }}</div> |
| | | |
| | | </div> |
| | | <div class="row3"> |
| | | <label>W:{{ item1.width }}</label> |
| | | |
| | | <label>H:{{ item1.height }}</label> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | body{ |
| | | font-weight: bolder; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | #printButton { |
| | | margin-top: -20px; |
| | | width: 100px; |
| | | } |
| | | |
| | | /*成*/ |
| | | .printFlowCard_finished { |
| | | /* |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | */ |
| | | flex-wrap: wrap; |
| | | font-size: 12pt; |
| | | display: flex; |
| | | flex-direction:column; |
| | | } |
| | | |
| | | |
| | | /*成*/ |
| | | .entirety_finished { |
| | | display: flex; |
| | | text-align: center; |
| | | flex-direction:column; |
| | | margin-left: 10px; |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | } |
| | | |
| | | /*div{ |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | }*/ |
| | | |
| | | .row3{ |
| | | text-align: center; |
| | | font-weight: bolder; |
| | | font-size: 22px; |
| | | /*display: flex; |
| | | justify-content:space-evenly;*/ |
| | | } |
| | | |
| | | .row3 label{ |
| | | font-size: 22px; |
| | | margin-top: 28px; |
| | | } |
| | | |
| | | .contentRow{ |
| | | font-weight: bolder; |
| | | display: flex; |
| | | text-align: center; |
| | | width: 100%; |
| | | } |
| | | |
| | | label{ |
| | | font-weight: bolder; |
| | | /*font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;*/ |
| | | } |
| | | |
| | | .row1{ |
| | | width: 30%; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .row4{ |
| | | font-weight: bolder; |
| | | text-align: right; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .row1,.row2{ |
| | | text-align: left; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 13mm 4mm 0mm 6mm; /* this affects the margin in the printer settings */ |
| | | } |
| | | |
| | | @media print { |
| | | div { |
| | | page-break-inside: avoid; |
| | | } |
| | | |
| | | .entirety_finished{ |
| | | page-break-before: always; |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let titleList = ref([]) |
| | | let dataList = ref([]) |
| | | let list = ref([]) |
| | | let lastList=ref([]) |
| | | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | const type = route.query.type |
| | | const faceOrientation = route.query.faceOrientation |
| | | const lableType = route.query.lableType |
| | | |
| | | onMounted(() => { |
| | | request.post(`/processCard/getSelectPrintCustomLabel/${type}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | labelList = dataList[0] |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count= list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++){ |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | ) |
| | | |
| | | |
| | | // 打印方法 |
| | | const printFlowCard = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("print"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | | "body>#" + |
| | | printId + |
| | | "{display:none}@media print{body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | | printId + |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button> |
| | | <div class="printFlowCard_semi" id="print"> |
| | | <div v-for="(item1,id) in lastList" class="entirety_semi"> |
| | | <div class="row4">{{faceOrientation}}</div> |
| | | <div v-for="(item,id) in labelList" class="contentRow"> |
| | | <div class="row1">{{ item.title }}:</div> |
| | | <div class="row2">{{ item1.order[item.name] }}</div> |
| | | |
| | | </div> |
| | | <div class="row3"> |
| | | <label>W:{{ item1.width }}</label> |
| | | |
| | | <label>H:{{ item1.height }}</label> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | body{ |
| | | overflow: hidden; |
| | | font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; |
| | | |
| | | } |
| | | |
| | | #printButton { |
| | | margin-top: -20px; |
| | | width: 100px; |
| | | } |
| | | |
| | | |
| | | |
| | | /*半*/ |
| | | .printFlowCard_semi { |
| | | flex-wrap: wrap; |
| | | font-size: 10px; |
| | | display: flex; |
| | | } |
| | | |
| | | |
| | | |
| | | /*半*/ |
| | | .entirety_semi { |
| | | width: 45%; |
| | | display: flex; |
| | | text-align: center; |
| | | flex-direction:column; |
| | | margin: 8px; |
| | | |
| | | } |
| | | |
| | | .row3{ |
| | | text-align: center; |
| | | } |
| | | |
| | | .contentRow{ |
| | | display: flex; |
| | | text-align: center; |
| | | } |
| | | |
| | | label{ |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .row1{ |
| | | width: 30%; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | .row4{ |
| | | font-weight: bolder; |
| | | text-align: right; |
| | | } |
| | | |
| | | .row1,.row2{ |
| | | text-align: left; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 0mm 2mm 2mm 2mm; /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | | @media print { |
| | | div { |
| | | page-break-inside: avoid; |
| | | } |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {VXETable} from "vxe-table"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/components/pp/PrintReworkProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue' |
| | | import footSum from "@/hook/footSum" |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import SortDetail from "@/components/pp/SelectSortDetailProcessCard.vue"; |
| | | |
| | | const company = companyInfo() |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | const dialogTableVisibleCustomLabel = ref(false) |
| | | const printVisible= ref(false) |
| | | let selectRecords = ref(null) |
| | | |
| | | const xGrid = ref(null) |
| | | const xGridDetail =ref(null) |
| | | |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' : { |
| | | editRow.value.processId = row.process_id |
| | | editRow.value.technologyNumber = row.technology_number |
| | | printVisible.value = true |
| | | |
| | | // router.push({path: '/sort-detail', query: {processId: row.process_id,technologyNumber:row.technology_number}}) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | orderGlassDetail: { |
| | | productionId: '', |
| | | }, |
| | | orderDetail: { |
| | | orderId: '', |
| | | productId: '', |
| | | productName: '', |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义数据返回结果 |
| | | let produceDetailList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //定义变量 |
| | | const form = reactive({ |
| | | date1: '', |
| | | }) |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | processId:null, |
| | | technologyNumber:null |
| | | }) |
| | | |
| | | //打印 |
| | | let printRow = ref({ |
| | | list:null, |
| | | printMergeVal:null |
| | | }) |
| | | |
| | | //室内室外面 |
| | | const stateValue = ref('') |
| | | const stateOptions = [ |
| | | { |
| | | value: t('processCard.thisIsTheIndoorSurface'), |
| | | label: t('processCard.thisIsTheIndoorSurface'), |
| | | }, |
| | | { |
| | | value: t('processCard.thisSideIsOutsideTheRoom'), |
| | | label: t('processCard.thisSideIsOutsideTheRoom'), |
| | | }, |
| | | ] |
| | | |
| | | //标签类型 |
| | | let filteredOptions=[] |
| | | const lableType = ref('1') |
| | | const lableTypeOptions = [ |
| | | { |
| | | value: '1', |
| | | label: t('processCard.finishedProductLabel'), |
| | | }, |
| | | /* { |
| | | value: '2', |
| | | label: t('processCard.halfProductLabel'), |
| | | },*/ |
| | | { |
| | | value: `${company.printLabel.labelValue}`, |
| | | label: `${company.printLabel.labelType}`, |
| | | }, |
| | | { |
| | | value: `${company.printLabel.labelValue3}`, |
| | | label: `${company.printLabel.labelType3}`, |
| | | }, |
| | | ] |
| | | |
| | | let hidePrintLabels = company.printLabel.hideButton; |
| | | |
| | | if (hidePrintLabels=='true'){ |
| | | filteredOptions = lableTypeOptions.filter((option, index) => index !== 2); |
| | | }else { |
| | | filteredOptions = lableTypeOptions; |
| | | } |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | const printMerge = ref('') |
| | | const printMergeOptions=[{}] |
| | | |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | |
| | | }) |
| | | |
| | | //打印类型 |
| | | const printType = ref() |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | dataType: [], |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let orderId = route.query.orderId |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | // 第一次加载查询 |
| | | request.post(`/rework/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.dataType = res.data.type |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | hideButton() |
| | | }) |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | // 第一次加载查询 |
| | | request.post(`/Replenish/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | xGrid.value.loadData(res.data.data) |
| | | titleSelectJson.value.dataType = res.data.type |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | hideButton() |
| | | } |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | // {title: t('basicData.operate'), width: 55, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | title: t('processCard.processId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', |
| | | title: t('customer.customerName'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', |
| | | title: t('order.project'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'technology_number', title: t('processCard.technologyNumber'), showOverflow: "ellipsis"}, |
| | | {field: 'glass_address', title: t('processCard.glassAddress'),}, |
| | | {field: 'patch_num', title: t('order.quantity'),}, |
| | | {field: 'patch_area', title: t('order.area'),}, |
| | | {field: 'responsible_team', title: t('reportingWorks.responsibleTeam'),}, |
| | | {field: 'responsible_equipment', title: t('reportingWorks.responsibleEquipment'),}, |
| | | {field: 'responsible_personnel', title: t('reportingWorks.responsiblePersonnel'),}, |
| | | {field: 'patch_type', title: t('reportingWorks.breakageType'),}, |
| | | {field: 'patch_reason', title: t('reportingWorks.breakageReason'),}, |
| | | {field: 'patch_processes', title: t('reportingWorks.responsibleProcess'),}, |
| | | {field: 'product_name', title: t('order.product'),}, |
| | | {field: 'glass_child', title: t('reportingWorks.glassChild'),}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'customLabel', name: t('processCard.customLabelPrinting'), status: 'primary'}, |
| | | |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | //print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'total_area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | let type=printType.value |
| | | let faceOrientation=stateValue.value |
| | | let lableTypes=lableType.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'print': { |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | printRow.value.printMergeVal=printMerge.value |
| | | // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}}) |
| | | dialogTableVisible.value=true |
| | | break |
| | | } |
| | | |
| | | case 'printLabel': { |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | router.push({path: '/main/processCard/PrintLabel', query: {printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | break |
| | | } |
| | | case 'sort': { |
| | | const $table = xGridDetail.value |
| | | let data = $table.getTableData().fullData |
| | | let flowCardData = ref({ |
| | | flowCard: data, |
| | | }) |
| | | for (let i = 0; i < flowCardData.value.flowCard.length; i++) { |
| | | const regex = /^[1-9]\d*$/ |
| | | if (!regex.test(flowCardData.value.flowCard[i].sort)) { |
| | | ElMessage.warning(t('basicData.msg.greater0')) |
| | | return; // 如果有一个不是整数 |
| | | } |
| | | } |
| | | request.post("/processCard/printSort", flowCardData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('processCard.sortingSuccessful')) |
| | | router.push({ |
| | | path: '/main/processCard/PrintFlowCard', |
| | | query: {orderId: orderId,random: Math.random()} |
| | | }) |
| | | |
| | | //location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'customLabel': { |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (type===null||type===''||type===undefined){ |
| | | ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | if (lableTypes==1){ |
| | | router.push({path: '/main/rework/PrintReworkCustomLabel', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | } |
| | | else { |
| | | router.push({path: '/main/rework/PrintReworkCustomLabelSemi', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | } |
| | | |
| | | |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | |
| | | const detailGridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'sort', |
| | | width: 80, |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | title: t('processCard.sorting'), |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | title: t('processCard.processId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'order_number', |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | title: t('processCard.technologyNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_address', |
| | | title: t('processCard.glassAddress'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | title: t('order.quantity'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | title: t('order.width'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | title: t('order.height'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'area', |
| | | title: t('order.area'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'sort', name: t('processCard.sorting'), status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | //print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | |
| | | const openedTable = () => { |
| | | let detail =ref(produceDetailList.value) |
| | | xGridDetail.value.reloadData(detail.value) |
| | | } |
| | | |
| | | const hideButton = () =>{ |
| | | // 根据条件值 hidePrintLabels 过滤按钮数组 |
| | | gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => { |
| | | // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2 |
| | | if (hidePrintLabels=='true') { |
| | | return button.code !== 'printLabel' && button.code !== 'printLabel2'; |
| | | } else { |
| | | return true; // 不隐藏任何按钮 |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 监听打印完成事件 |
| | | const printNumber = () =>{ |
| | | |
| | | selectRecordsData.value.printList=selectRecords |
| | | let printState=0 |
| | | request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | :default-time="defaultTime" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | format="YYYY/MM/DD" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button |
| | | id="select" |
| | | :icon="Search" |
| | | type="primary" @click="getWorkOrder">{{ $t('basicData.search') }} |
| | | |
| | | </el-button> |
| | | |
| | | <el-input clearable :placeholder="$t('processCard.mergePrinting')" v-model="printMerge" style="width: 90px"></el-input> |
| | | |
| | | <label>{{$t('processCard.labelStyle')}}:</label> |
| | | <el-select v-model="printType" clearable default-value="default_city" :placeholder="$t('processCard.pleaseSelect')" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['dataType']" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select v-model="lableType" class="m-2" :placeholder="lableTypeOptions[0].label" style="width: 140px"> |
| | | <el-option |
| | | v-for="item in filteredOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px"> |
| | | <el-option |
| | | v-for="item in stateOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="600px" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <!-- v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | link |
| | | type="primary" |
| | | size="small"> |
| | | {{ $t('basicData.edit') }} |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogTableVisible" |
| | | :title="$t('processCard.print')" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" @click="printNumber" :icon="Printer" circle /> |
| | | </template> |
| | | <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-model="dialogTableVisibleLabel" |
| | | destroy-on-close |
| | | :title="$t('processCard.printLabel')" |
| | | style="width: 80%;height:75% "> |
| | | <PrintLabel :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-model="dialogTableVisibleCustomLabel" |
| | | destroy-on-close |
| | | :title="$t('processCard.labelStyle')" |
| | | style="width: 80%;height:75% "> |
| | | <PrintLabel :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | id="sizeCheck" |
| | | v-model="printVisible" |
| | | :title="$t('processCard.processCardDetails')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <sort-detail id="child" :processId="editRow.processId" :technologyNumber="editRow.technologyNumber" /> |
| | | </el-dialog> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | :deep(#sizeCheck .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body){ |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/rework/SelectRework' }">{{$t('rework.reworkManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/rework/AddRework' }">{{$t('rework.addRework')}}</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/processCard/SelectPrintFlowCard' }" >{{$t('rework.printRework')}}</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/rework/PrintReworkFlowCard' }" >{{$t('rework.printRework')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | | {field: 'deliveryId',width:120, title: t('delivery.deliveryNoteId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryNumber',width:120, title: t('delivery.deliveryNoteNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productId',width:120, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.paymentTerms',width:120, title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.project',width:140, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'), sortable: true}, |
| | |
| | | { code: 'copyTitle', name: t('searchOrder.copyTitle'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { |
| | | prefixIcon: 'vxe-icon-print', |
| | | name: '加工单', |
| | | name: t('order.processingOrder'), |
| | | children: [ |
| | | // { code: 'sheet1', name: '横版-普通' }, |
| | | { code: 'sheet2', name: '横版-多层明细' }, |
| | | { code: 'sheet4', name: '生产加工单纵版' }, |
| | | { code: 'sheet3', name: '浏览发货信息' }, |
| | | { code: 'sheet5', name: '生产加工单弯钢(单片)' }, |
| | | { code: 'sheet2', name: t('order.sheet2') }, |
| | | { code: 'sheet4', name: t('order.sheet4') }, |
| | | { code: 'sheet3', name: t('order.sheet3') }, |
| | | { code: 'sheet5', name: t('order.sheet5')}, |
| | | |
| | | ] |
| | | }, |
| | | { code: 'oneClickStorage', name: "一键完工", prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { code: 'oneClickStorage', name: t('order.oneClickStorage'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | // { code: 'getProcessList', name: t('searchOrder.processFlows'), prefixIcon: 'vxe-icon-file-txt', visible: true} |
| | | ] |
| | | ] |
| | |
| | | {field: 'customerBatch',width:120, title: t('order.customerBatch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | //{field: '14',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'processingNote',width:120, title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | |
| | | ], |
| | | |
| | |
| | | |
| | | @ApiOperation("流程卡明细查询接口") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping("/selectPrint/{orderId}") |
| | | @PostMapping("/selectPrint") |
| | | public Result selectPrint( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintSv(orderId, flowCard)); |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.selectPrintSv(object)); |
| | | |
| | | } |
| | | |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public Result updateRework( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(reworkService.updateRework(object)); |
| | | } |
| | | |
| | | @ApiOperation("返工流程卡明细查询接口") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping("/selectPrint/{selectTime1}/{selectTime2}") |
| | | public Result selectPrint( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(reworkService.selectPrintSv(selectTime1,selectTime2, flowCard)); |
| | | |
| | | } |
| | | } |
| | |
| | | private String deliveryId; |
| | | @ExcelProperty("发货序号") |
| | | private Integer deliveryNumber; |
| | | @ExcelProperty("产品Id") |
| | | private Integer productId; |
| | | @ExcelProperty("产品") |
| | | private String productName; |
| | | @ExcelProperty("付款条件") |
| | | private String paymentTerms; |
| | | @ExcelProperty("项目名称") |
| | |
| | | private String customerId; |
| | | @ExcelProperty("客户名称") |
| | | private String customerName; |
| | | @ExcelProperty("客户简称") |
| | | private String customerAbbreviation; |
| | | @ExcelProperty("送货日期") |
| | | private LocalDate deliveryDate; |
| | | @ExcelProperty("支付方式") |
| | |
| | | |
| | | List<Map<String, String>> selectPrintFlowCard(Date selectTime1, Date selectTime2); |
| | | |
| | | List<Map<String, String>> selectPrintMp(String orderId, FlowCard flowCard); |
| | | List<Map<String, String>> selectPrintMp(String orderId); |
| | | |
| | | List<Map<String, String>> getPrimaryList(String processId, String technologyNumber); |
| | | |
| | |
| | | List<Map<String, String>> getPrimaryListMerge(String processId, String technologyNumber); |
| | | |
| | | List<Map<String, String>> selectorderOtherMoney(); |
| | | |
| | | List<Map<String, String>> selectReworkPrintMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintSv(String orderId, FlowCard flowCard) { |
| | | public Object selectPrintSv(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintMp(orderId, flowCard)); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", flowCardMapper.selectPrintMp(flowCard.getOrderId())); |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | map.put("type", flowCardMapper.selectType()); |
| | | return map; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.pp.BasicDateProduceMapper; |
| | | import com.example.erp.mapper.pp.ReworkMapper; |
| | | import com.example.erp.mapper.pp.*; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | final |
| | | FlowCardMapper flowCardMapper; |
| | | |
| | | public ReworkService(FlowCardMapper flowCardMapper) { |
| | | this.flowCardMapper = flowCardMapper; |
| | | } |
| | | |
| | | public List<Map<String, Object>> getSelectRework(Integer pageNum, Integer pageSize) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | |
| | | String oddNumbers = alias+formattedDate+formattedNumber; |
| | | return oddNumbers; |
| | | } |
| | | |
| | | public Object selectPrintSv(java.sql.Date selectTime1, java.sql.Date selectTime2, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectReworkPrintMp(selectTime1,selectTime2,flowCard)); |
| | | map.put("type", flowCardMapper.selectType()); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | |
| | | </delete> |
| | | |
| | | <select id="selectPrintFlowCardMp"> |
| | | select * |
| | | select order_id,project,customer_name,quantity,area,order_type,pack_type,batch |
| | | from sd.order |
| | | where create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in order_id) |
| | |
| | | <select id="selectorderOtherMoney"> |
| | | select * from sd.basic_other_money where (id=21 or id>31) |
| | | </select> |
| | | |
| | | <select id="selectReworkPrintMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | fc.order_number, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | pl.rework_num, |
| | | pl.rework_area, |
| | | pl.rework_team, |
| | | pl.responsible_equipment, |
| | | pl.responsible_personnel, |
| | | pl.rework_type, |
| | | pl.rework_reason, |
| | | pl.rework_processes, |
| | | od.product_name, |
| | | ogd.glass_child |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and |
| | | ogd.technology_number = fc.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.`order` as o on o.order_id = fc.order_id |
| | | left join rework as pl on pl.order_id = fc.order_id and pl.process_id = fc.process_id and |
| | | pl.order_sort = fc.order_number and |
| | | pl.technology_number = fc.technology_number |
| | | where pl.create_time between #{selectTime1} and #{selectTime2} |
| | | GROUP BY fc.process_id, ogd.technology_number |
| | | order by fc.process_id, ogd.technology_number |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="getSelectDeliveryDetailReport" resultMap="selectDeliveryDetail"> |
| | | select dd.delivery_id, |
| | | dd.delivery_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | |
| | | count(dd.id) as 'total' |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | |
| | | select dd.id, |
| | | dd.delivery_id, |
| | | dd.delivery_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | c.customer_abbreviation, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.customer c on d.customer_id=c.id |
| | | where date(d.create_time)>=#{dates[0]} and date(d.create_time) <= #{dates[1]} |
| | | </select> |
| | | |
| | |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | c.customer_abbreviation, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | |
| | | dd.create_time |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.customer c on d.customer_id=c.id |
| | | where date(d.create_time)>=#{dates[0]} and date(d.create_time) <= #{dates[1]} |
| | | group by dd.delivery_id,od.product_id |
| | | order by dd.delivery_id,dd.delivery_number |
| | | </select> |
| | | </mapper> |