north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
@@ -31,7 +31,8 @@ faceOrientation:null,//内外面 type:null,//标签模板 lableType:null,//标签类型 switch:null//判断是否为新打印 switch:null,//判断是否为新打印 lastList:[], }) const {currentRoute} = useRouter() @@ -77,9 +78,9 @@ 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]) } // for (let k = 0; k < list.value[i].data[j].quantity; k++) { props.lastList.push(list.value[i].data[j]) // } } } } else { @@ -115,11 +116,11 @@ } // 遍历 lastList 并更新对应的属性 lastList.value.forEach(obj => { props.lastList.forEach(obj => { // 获取前缀和 orderId const prefix = lastList.value[index].processId.substring(0, 11); const prefix = props.lastList[id].processId.substring(0, 11); const orderId = obj.orderId; const glassNumber=lastList.value[index].glassNumber const glassNumber=props.lastList[id].glassNumber // 根据 propertyName 更新属性 if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) { obj.productAbbreviation = result; @@ -134,6 +135,33 @@ if (propertyName === 'customerName' && orderId === obj.orderId){ obj.customerName = result; } if (propertyName === 'orderId' && orderId === obj.orderId){ obj.orderId = result; } if (propertyName === 'glassNumber' && glassNumber === obj.glassNumber){ obj.glassNumber = result; } if (propertyName === 'width' && glassNumber === obj.glassNumber){ obj.width = result; } if (propertyName === 'height' && glassNumber === obj.glassNumber){ obj.height = result; } if (propertyName === 'custom1' && orderId === obj.orderId){ obj.custom1 = result; } if (propertyName === 'custom2' && orderId === obj.orderId){ obj.custom2 = result; } if (propertyName === 'custom3' && orderId === obj.orderId){ obj.custom3 = result; } if (propertyName === 'custom4' && orderId === obj.orderId){ obj.custom4 = result; } if (propertyName === 'custom5' && orderId === obj.orderId){ obj.custom5 = result; } }); } @@ -141,7 +169,7 @@ <template> <div id="print" :class="company.printLabel.className.semi.printFlowCardName()"> <div v-for="(item1,id) in lastList" :class="company.printLabel.className.semi.entiretyName()"> <div v-for="(item1,id) in props.lastList" :class="company.printLabel.className.semi.entiretyName()"> <div class="row4">{{ faceOrientation }}</div> <div v-for="(item,id) in labelList" :class="company.printLabel.className.semi.contentRowName()"> <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" @input="updateProductName($event, id,index)">{{ item.title }}:{{ item1[item.name] }}</div> north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -20,6 +20,7 @@ import companyInfo from "@/stores/sd/companyInfo" import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"; import {hiprint} from "vue-plugin-hiprint"; const company = companyInfo() @@ -176,6 +177,39 @@ const data = ref({ printList: [] }) onMounted(async () => { await getTags(); await hiprint.init(); }) let hiprintTemplate = ref() const tags = ref([]) const tag = ref({ id: null, name: null, type: 1, tagWidth: null, tagHeight: null, value: null, size: null }) const changeTag = () => { hiprintTemplate.value = new hiprint.PrintTemplate({}); const json = JSON.parse(tag.value.value) hiprintTemplate.value.update(json) } const getTags = () => { request.get('tagStyle/getTagList').then(res => { tags.value = res.data }) } const printObjectProcess = () => { hiprintTemplate.value.print(lastList.value) } const {currentRoute} = useRouter() const route = currentRoute.value @@ -520,7 +554,6 @@ } } if (lableTypes == 1) { console.log(company.label) labelRow.value.list = JSON.stringify(selectRecords) labelRow.value.faceOrientation = faceOrientation labelRow.value.type = type @@ -639,7 +672,7 @@ ElMessage.warning(t('searchOrder.msgList.checkOrder')) return } if (type === null || type === '' || type === undefined) { if (tag.value.name === null || tag.value.name === '' || tag.value.name === undefined) { ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle')) return } @@ -655,7 +688,7 @@ labelRow.value.list = JSON.stringify(selectRecords) labelRow.value.faceOrientation = faceOrientation labelRow.value.type = type labelRow.value.type = tag.value.name labelRow.value.lableType = lableTypes labelRow.value.dataType = 1 let columnsLabel = company.printLabel.columnsLabel @@ -701,7 +734,7 @@ gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => { // 这里根据 hidePrintLabels 的值决定是否隐藏 printLabel 和 printLabel2 if (hidePrintLabels == 'true') { return button.code !== 'printLabel' && button.code !== 'printLabel2'; return button.code !== 'printLabel' && button.code !== 'printLabel2' && button.code !== 'customLabel'; } else { return true && button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest'; // 显示该按钮 } @@ -733,13 +766,12 @@ style="width: 90px"></el-input> <label>{{ $t('processCard.labelStyle') }}:</label> <el-select v-model="printType" :placeholder="$t('processCard.pleaseSelect')" clearable default-value="default_city" style="width: 120px"> <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag"> <el-option v-for="item in titleSelectJson['dataType']" :key="item.id" :label="item.name" :value="item.name" v-for="(tag,index) in tags" :key="index" :label="tag.name" :value="tag" /> </el-select> @@ -907,12 +939,13 @@ destroy-on-close style="width: 80%;height:75% "> <template #header="{ close, titleId, titleClass }"> <el-button v-print="printContentLabel" :icon="Printer" circle/> <el-button :icon="Printer" circle @click="printObjectProcess"/> </template> <print-custom-label-x-j id="childLabel" :faceOrientation="labelRow.faceOrientation" :lableType="labelRow.lableType" :list="labelRow.list" :lastList='lastList' :type="labelRow.type" style="width: 100%;height: 100%"/> </el-dialog> north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -162,8 +162,6 @@ } const saveProducts=(product)=>{ console.log(product) return request.post(`/product/saveProduct`,product).then((res) =>{ if(res.code==200){ ElMessage.success(t('product.msg.saveSuccess')) north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -605,7 +605,7 @@ GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number, ogds.glass_child, GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child, SUBSTRING(pds.process, LOCATE('中空', pds.process)) AS processed_part SUBSTRING(ogds.process, LOCATE('中空', ogds.process)) AS processed_part from sd.order_glass_detail as ogds left join sd.order_detail as ods on ods.order_id = ogds.order_id and ods.order_number = ogds.order_number north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
@@ -257,7 +257,8 @@ left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and o.create_order>0 order by dd.id desc where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and o.create_order>0 and rw.reviewed_state>=0 order by dd.id desc </select>