north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/src/main/resources/mapper/pp/Report.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelDetails.vue
@@ -55,6 +55,7 @@ list.value = deepClone(res.data.data) const data = produceList.value[0].value dataList = JSON.parse(`[${data}]`); console.log(switchType) if (switchType===true){ labelList = props.titleList }else { @@ -71,7 +72,6 @@ } else { ElMessage.warning(res.msg) } console.log(props.lastList) }) } ) north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelXJTwo.vue
New file @@ -0,0 +1,279 @@ <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 companyInfo from "@/stores/sd/companyInfo" const company = companyInfo() //语言获取 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: [] }) let props = defineProps({ list:null,//勾选的数据 faceOrientation:null,//内外面 type:null,//标签模板 lableType:null,//标签类型 switch:null//判断是否为新打印 }) const {currentRoute} = useRouter() const route = currentRoute.value let type = props.type let faceOrientation = props.faceOrientation if (type.indexOf("英文")>-1 && faceOrientation==="此面为室内面"){ faceOrientation='INSIDE' } else if (type.indexOf("英文")>-1 && faceOrientation==="此面为室外面"){ faceOrientation='OUTSIDE' } let lableType = props.lableType data.value.printList = JSON.parse(props.list) let switchType = props.switch onMounted(() => { request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, 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}]`); if (switchType===true){ labelList = props.titleList }else { 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) } }) } ) //修改相同产品名称标签 const updateProductName = (event, index,id) => { // 创建映射对象 const propertyMapping = {}; labelList.forEach(item => { propertyMapping[item.name] = item.title; }); // 输入的值 const newValue = event.target.innerText; const parts = newValue.split(':'); const result = parts[1]; // 获取冒号后的部分 // 获取映射中所有的键 const keys = Object.keys(propertyMapping); // 根据 index 获取对应的属性名 const propertyName = keys[index]; // 如果映射中没有该 index,直接返回 if (!propertyName) { console.warn('Unsupported index:', index); return; } // 遍历 lastList 并更新对应的属性 lastList.value.forEach(obj => { // 获取前缀和 orderId const prefix = lastList.value[index].processId.substring(0, 11); const orderId = obj.orderId; const glassNumber=lastList.value[index].glassNumber // 根据 propertyName 更新属性 if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) { obj.productAbbreviation = result; } if (propertyName === 'project' && orderId === obj.orderId) { obj.project = result; } if (propertyName === 'productName' && prefix === obj.processId.substring(0, 11)){ obj.productName = result; } if (propertyName === 'customerName' && orderId === obj.orderId){ obj.customerName = result; } }); } </script> <template> <div id="print" class="printFlowCard_semi"> <div v-for="(item1,index) in lastList" class="entirety_semi"> <div class="row4">{{ faceOrientation }}</div> <div v-for="(item,id) in labelList" class="contentRow"> <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> <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>--> </div> <div > <div class="row3" style="text-align: center;font-weight: bolder;"> <label style="font-size: 18px;">宽:{{item1.width}}</label> <label style="font-size: 18px;">高:{{item1.height}}</label> </div> </div> <div style="text-align: left">新疆恒鑫玻璃科技有限公司</div> <div v-if="(index + 1) % 2 === 0" class="pagebreak"></div> </div> </div> </template> <style scoped> * { margin: 0; padding: 0; } body{ overflow: hidden; font-family: Arial; } #printButton { margin-top: -20px; width: 100px; } /*半*/ .printFlowCard_semi { flex-wrap: wrap; font-size: 10px; display: flex; justify-content:space-between; } /*半*/ .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; } .contentRow .row1{ width: 100%; } .entirety_semi .row4{ text-align: right; } .contentRow .row1,.contentRow .row2{ text-align: left; } @media print { @page { size: auto; /* auto is the initial value */ margin: 13mm 5mm 0mm 7mm; /* this affects the margin in the printer settings */ } div { page-break-inside: avoid; } .pagebreak { page-break-after: always; } } .printFlowCard_semi1 { flex-wrap: wrap; font-size: 8pt; display: flex; } /*成*/ .entirety_semi1 { width: 50%; display: flex; text-align: center; flex-direction: column; margin-left: -10px; height: 80px; } .contentRow1 { font-weight: bolder; display: flex; text-align: center; width: 100%; } .contentRow1 .row1 { width: 30%; font-weight: bolder; } .entirety_finished1 .row4 { font-weight: bolder; text-align: right; margin-right: 10px; } .contentRow1 .row1, .contentRow1 .row2 { text-align: left; font-weight: bolder; } </style> north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -14,6 +14,7 @@ import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue' import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue' import PrintCustomLabelXJ from '@/components/pp/PrintCustomLabelTwo.vue' import PrintCustomLabelXJTwo from '@/components/pp/PrintCustomLabelXJTwo.vue' import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue' import footSum from "@/hook/footSum" import companyInfo from "@/stores/sd/companyInfo" @@ -30,6 +31,7 @@ const dialogTableVisibleLabel = ref(false) const dialogTableVisibleCustomLabel = ref(false) const dialogTableVisibleLabelXJ = ref(false) const dialogTableVisibleLabelXJTwo = ref(false) const printVisible = ref(false) let selectRecords = ref(null) let titleStyleVisible = ref(false) @@ -597,7 +599,13 @@ labelRow.value.faceOrientation = faceOrientation labelRow.value.type = type labelRow.value.lableType = lableTypes dialogTableVisibleLabelXJ.value = true let columnsLabel=company.printLabel.columnsLabel if (columnsLabel==1){ dialogTableVisibleLabelXJTwo.value = true }else { dialogTableVisibleLabelXJ.value = true } break } } @@ -820,6 +828,24 @@ :type="labelRow.type" style="width: 100%;height: 100%"/> </el-dialog> <!-- 成品标签两列新疆--> <el-dialog id="sizeCustom" v-model="dialogTableVisibleLabelXJTwo" :title="$t('processCard.printLabel')" destroy-on-close style="width: 80%;height:75% "> <template #header="{ close, titleId, titleClass }"> <el-button v-print="printContentLabel" :icon="Printer" circle/> </template> <print-custom-label-x-j-two id="childLabel" :faceOrientation="labelRow.faceOrientation" :lableType="labelRow.lableType" :list="labelRow.list" :type="labelRow.type" style="width: 100%;height: 100%"/> </el-dialog> </div> </template> north-glass-erp/northglass-erp/src/views/pp/report/CrossProcessBreaking.vue
@@ -20,7 +20,7 @@ {field: 'area',width: 100, title: t('reportingWorks.wornArea'), sortable: true}, {field: 'project', width: 120,title: t('order.project'), sortable: true}, {field: 'orderId',width: 120, title: t('order.orderId'), sortable: true}, {field: 'glassChild',width: 120, title: t('reportingWorks.glassChild'), sortable: true}, {field: 'glassChild',width: 120, title: t('reportingWorks.glassChild'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, ],//表格表头字段 data:[],//表格数据 url :'/report/crossProcessBreaking', north-glass-erp/northglass-erp/src/views/pp/report/DamageReport.vue
@@ -8,6 +8,7 @@ import {useI18n} from 'vue-i18n' import exportExcel from "@/hook/exportExcel"; import footSum from "@/hook/footSum" import {changeFilterEvent} from "@/hook" //语言获取 const {t} = useI18n() let router = useRouter() @@ -136,11 +137,7 @@ selectPageList() } /*使用筛选,后端获取数据*/ const changeFilterEvent = (event, option, $panel,) => { // 手动触发筛选 $panel.changeOption(event, !!option.data, option) } function filterChanged(column){ //gridOptions.loading=true @@ -251,7 +248,7 @@ {field: 'breakageQuantity', width: 120, title: t('reportingWorks.quantityBroken')}, {field: 'area', width: 120, title: t('reportingWorks.wornArea')}, {field: 'personnel', width: 120, title: t('reportingWorks.responsiblePersonnel')}, {field: 'glassChild', width: 120, title: t('reportingWorks.glassChild')}, {field: 'glassChild', width: 120, title: t('reportingWorks.glassChild'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, ],//表头按钮 toolbarConfig: { @@ -331,7 +328,7 @@ <template #num1_filter="{ column, $panel }"> <div> <div v-for="(option, index) in column.filters" :key="index"> <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> </div> </div> </template> north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -1315,7 +1315,7 @@ where fc.process_id = #{processId} and fc.order_number = #{orderNumber} and fc.technology_number = #{technologyNumber} and rw.reporting_work_id = #{reportingWorkId} and pl.reporting_work_id = #{reportingWorkId} and dd.breakage_reason = #{patchReason} group by fc.process_id, fc.technology_number </select> north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -251,6 +251,9 @@ <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''"> and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam} </if> <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} </if> GROUP BY dd.id order by dd.id desc limit #{offset},#{pageSize} @@ -490,7 +493,7 @@ rw.process_id, dd.order_number, dd.technology_number, date(rw.reporting_work_time) as reporting_work_time, rw.reporting_work_time as reporting_work_time, dd.responsible_process, dd.responsible_team, dd.responsible_equipment, @@ -543,6 +546,9 @@ <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''"> and dd.breakage_reason regexp #{damageReportDTO.breakageReason} </if> <if test="damageReportDTO.glassChild != null and damageReportDTO.glassChild != ''"> and ogd.glass_child regexp #{damageReportDTO.glassChild} </if> GROUP BY dd.id limit #{offset},#{pageSize}; @@ -593,7 +599,9 @@ <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''"> and dd.breakage_reason regexp #{damageReportDTO.breakageReason} </if> <if test="damageReportDTO.glassChild != null and damageReportDTO.glassChild != ''"> and ogd.glass_child regexp #{damageReportDTO.glassChild} </if> limit #{offset},#{pageSize}; </select> north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -111,9 +111,10 @@ select ifnull((select ogd.process from sd.order_glass_detail as ogd left join sd.`order` as o on o.order_id=ogd.order_id where ogd.production_id = LEFT(#{processIdStr}, 11) left join flow_card as fc on fc.order_id=o.order_id and fc.order_number=ogd.order_number and fc.technology_number=ogd.technology_number where fc.process_id = #{processIdStr} and o.create_order>0 and POSITION(ogd.technology_number in #{technologyStr}) and POSITION(fc.technology_number in #{technologyStr}) limit 1),'') as process </select>