north-glass-erp/northglass-erp/src/hook/createTemplateTag.js
@@ -25,6 +25,7 @@ // 记录整体个数 let limitCount = 0; let size = 0; // top: 记录 打印元素 top值(注意单位); 提示:相当于记录上次填充到哪儿了 for (let v = 1, top = 0; v <= ver; v++) { @@ -36,6 +37,7 @@ // 获取 模板 的 打印元素 let printElements1 = hiprintTemplateMap.panels[0].printElements; const printElements2 = printElements1.map((items) => { const item = JSON.parse(JSON.stringify(items)) // 偏移量计算 item.options.top += top @@ -48,9 +50,11 @@ } return item; }) //判断总个数是否超过标签数量 if(limitCount<dataList.length){ template.panels[0].printElements = template.panels[0].printElements.concat(printElements2) } // 3.3. 计算 下一列 模板的 left 值 (单位转换) left += hinnn.mm.toPt(hiprintTemplateMap.panels[0].width) // 记录整体个数 @@ -59,7 +63,6 @@ // 3.4 计算下一行 模板的 top 值 (单位转换) top += hinnn.mm.toPt(hiprintTemplateMap.panels[0].height) } north-glass-erp/northglass-erp/src/lang/ar.js
@@ -381,7 +381,9 @@ yMargin:'هامش المحور Y', location:'موقع العلامة التجارية', sort:'玻璃反弯', archRise:'拱高' archRise:'拱高', qr1Local:'二维码1位置', qr2Local:'二维码2位置', }, north-glass-erp/northglass-erp/src/lang/en.js
@@ -382,7 +382,9 @@ yMargin:'Y-axis margin', location:'Trademark position', sort:'玻璃反弯', archRise:'拱高' archRise:'拱高', qr1Local:'二维码1位置', qr2Local:'二维码2位置', }, north-glass-erp/northglass-erp/src/lang/ru.js
@@ -380,7 +380,10 @@ yMargin:'Интервал оси Y', location:'Расположение товарного знака', sort:'玻璃反弯', archRise:'拱高' archRise:'拱高', qr1Local:'二维码1位置', qr2Local:'二维码2位置', }, workOrder:{ north-glass-erp/northglass-erp/src/lang/zh.js
@@ -382,7 +382,7 @@ TrademarkAttribute:'商标参数', TrademarkOptions:'商标选项', xImage:'X轴镜像', yImage:'y轴镜像', yImage:'Y轴镜像', modifyTrademark:'修改商标', tag:'打标使能', tag2:'二维码打印1', @@ -391,7 +391,9 @@ yMargin:'高方向坐标', location:'商标位置', sort:'玻璃反弯', archRise:'拱高' archRise:'拱高', qr1Local:'二维码1位置', qr2Local:'二维码2位置', }, north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizationRectPrint.vue
@@ -1,6 +1,6 @@ <template> <div> <el-button id="button" type="primary" @click="handlePrint" style="position: fixed; top: 90px; right: 20px; padding: 20px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer;"> <el-button id="button" type="primary" @click="handlePrint" style="position: fixed; top: 90px; right: 20px; padding: 20px; background: #409eff; color: white; border: none; border-radius: 5px; cursor: pointer;"> 打印 </el-button> @@ -15,7 +15,7 @@ <el-select v-model="config.type" style="width: 120px;"> <el-option v-for="type in linkTypes" :key="type" :value="type" /> </el-select> <el-button id="button" type="primary" @click="handlePrint" style="background: #4CAF50; color: white; border: none; cursor: pointer;"> <el-button id="button" type="primary" @click="handlePrint" style="background: #409eff; color: white; border: none; cursor: pointer;"> 预览 </el-button> </div> north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeControl.vue
@@ -12,7 +12,7 @@ </div> <button @click="submitLayouts" style="position: fixed; top: 90px; right: 20px; padding: 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer;"> <button @click="submitLayouts" style="position: fixed; top: 90px; right: 20px; padding: 10px; background: #409eff; color: white; border: none; border-radius: 5px; cursor: pointer;"> 保存OPT </button> </template> @@ -147,7 +147,7 @@ }; onMounted(() => { // 读取库存数据 // 读取库存数据和参数设置 loadInventoryData(); selectLayout(); selectOptimizeInfo(); north-glass-erp/northglass-erp/src/views/pp/glassOptimize/OptimizeParms.vue
@@ -243,7 +243,8 @@ <div class="display-settings"> <h2>结果输出设置</h2> <div class="form-group"> <label>文件模式</label> <label>切割文件保存模式</label> <div style="margin-left: 3px;"></div> <div class="radio-group"> <input type="radio" north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
@@ -72,7 +72,7 @@ </div> <!-- 提交按钮 --> <button @click="submitLayouts" style="position: fixed; top: 90px; right: 20px; padding: 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer;"> <button @click="submitLayouts" style="position: fixed; top: 90px; right: 20px; padding: 10px; background: #409eff; color: white; border: none; border-radius: 5px; cursor: pointer;"> 保存调整 </button> </div> north-glass-erp/northglass-erp/src/views/pp/glassOptimizeThirdParty/OptimizeControl.vue
@@ -6,7 +6,7 @@ </div> <button @click="submitLayouts" style="position: fixed; bottom: 20px; right: 20px; padding: 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer;"> style="position: fixed; bottom: 20px; right: 20px; padding: 10px; background: #409eff; color: white; border: none; border-radius: 5px; cursor: pointer;"> 保存OPT </button> </template> north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -251,7 +251,6 @@ widthList.push(item.childWidth) arcList.push(item.arc) archRiseList.push(item.archRise) console.log(item.archRise) }) widthList = widthList.sort(); arcList = arcList.sort(); @@ -298,6 +297,8 @@ const trademarkAttr = ref({ trademark:null, width:null, height:null, xImage:null, yImage:null, tag:null, @@ -305,7 +306,17 @@ tag3:null, xMargin:30, yMargin:30, location:[], qrcode1:{ xMargin:10, yMargin:10, location:[] }, qrcode2:{ xMargin:10, yMargin:10, location:[] } }) @@ -322,7 +333,7 @@ if (res.code==200){ trademarkList.value = res.data trademarkList.value.forEach(item =>{ item.basicName item.nickname = JSON.parse(item.nickname) }) } @@ -366,32 +377,53 @@ trademarkRow.value=row trademarkVisible.value= true /*Object.keys(trademarkAttr.value).forEach((key) => { if(key==='location'){ trademarkAttr.value[key] = [] }else if(key==='xMargin' || key==='yMargin'){ trademarkAttr.value[key] = 30 }else{ trademarkAttr.value[key] = '' if(row.icon!=null && row.icon!==''){ let trademark = JSON.parse(row.icon) if(trademark.qrcode2 === undefined){ trademark.width = null trademark.height = null trademark.qrcode1 = { xMargin:10, yMargin:10, location:t('craft.lowLeft'), } })*/ trademark.qrcode2 = { xMargin:10, yMargin:10, location:t('craft.upperRight') } } trademarkAttr.value = trademark }else{ trademarkAttr.value = { trademark:"3C", trademark:trademarkList.value[0].basicName, width:trademarkList.value[0].nickname.width , height:trademarkList.value[0].nickname.height, xImage:false, yImage:false, tag:true, tag2:true , tag3:true, tag3:false, xMargin:30, yMargin:30, location:t('craft.lowLeft') location:t('craft.lowLeft'), qrcode1:{ xMargin:10, yMargin:10, location:t('craft.lowLeft'), }, qrcode2:{ xMargin:10, yMargin:10, location:t('craft.upperRight') } if(row.icon!=null){ trademarkAttr.value = JSON.parse(row.icon) } } trademarkList.value.forEach(item =>{ if(item.basicName===trademarkAttr.value.trademark){ iconNickname.value=item.nickname iconNickname.value=item.nickname.data } }) @@ -405,6 +437,7 @@ exportToDXF() } } rowIndex.value.icon = JSON.stringify(trademarkAttr.value) trademarkVisible.value=false Object.keys(trademarkAttr.value).forEach((key) => (trademarkAttr.value[key] = '')) @@ -497,12 +530,14 @@ const iconChange = () => { trademarkList.value.forEach(item =>{ if(item.basicName===trademarkAttr.value.trademark){ iconNickname.value=item.nickname iconNickname.value=item.nickname.data trademarkAttr.value.width=item.nickname.width trademarkAttr.value.height=item.nickname.height } }) if(trademarkAttr.value.trademark===company.icon){ /*if(trademarkAttr.value.trademark===company.icon){ trademarkAttr.value.xMargin=66 } }*/ } @@ -574,7 +609,7 @@ leafer.add(polygon); }, 30); trademarkAttr.value.location = t('craft.lowLeft') //trademarkAttr.value.location = t('craft.lowLeft') }else{ state.value=false handleFileUpload() @@ -800,7 +835,6 @@ break; case 'ELLIPSE': console.log(entity) const {majorAxisEndPoint, axisRatio} = entity; @@ -1274,11 +1308,11 @@ :close-on-click-modal="false" :close-on-press-escape="false" @closed="handleClosed" style="width: 922px;height:443px ; style="width: 922px;height:750px;margin-top: 100px ; position: relative;" > <div style="width: 50%;height: 100%;float: left"> <el-row style=""> <el-col :span="4">{{$t('craft.TrademarkOptions')}}:</el-col> <el-col :span="5">{{$t('craft.TrademarkOptions')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.trademark" @change ="iconChange" filterable> <el-option :value="item.basicName" v-for="item in trademarkList" /> @@ -1287,7 +1321,30 @@ </el-row> <el-row> <el-col :span="4">{{$t('craft.xImage')}}:</el-col> <el-col :span="5">{{$t('craft.location')}}:</el-col> <el-col :span="25"> <el-radio v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item" /> </el-col> </el-row> <el-row> <el-col :span="5">X:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.xMargin"/> </el-col> </el-row> <el-row> <el-col :span="5">Y:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.yMargin"/> </el-col> </el-row> <el-row > <el-col :span="5">{{$t('craft.xImage')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.xImage"> <el-option :value="true" :label="$t('basicData.true')"/> @@ -1297,7 +1354,7 @@ </el-row> <el-row> <el-col :span="4">{{$t('craft.yImage')}}:</el-col> <el-col :span="5">{{$t('craft.yImage')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.yImage"> <el-option :value="true" :label="$t('basicData.true')"/> @@ -1307,7 +1364,7 @@ </el-row> <el-row> <el-col :span="4">{{$t('craft.tag')}}:</el-col> <el-col :span="5">{{$t('craft.tag')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.tag"> <el-option :value="true" :label="$t('basicData.true')"/> @@ -1315,9 +1372,9 @@ </el-select> </el-col> </el-row> <el-row> <el-col :span="4">{{$t('craft.tag2')}}:</el-col> <!--二维码1--> <el-row class="row_item"> <el-col :span="5">{{$t('craft.tag2')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.tag2"> <el-option :value="true" :label="$t('basicData.true')"/> @@ -1327,7 +1384,30 @@ </el-row> <el-row> <el-col :span="4">{{$t('craft.tag3')}}:</el-col> <el-col :span="5">{{$t('craft.qr1Local')}}:</el-col> <el-col :span="25"> <el-radio v-model="trademarkAttr.qrcode1.location" v-for="item in trademarkLocation" :label="item" /> </el-col> </el-row> <el-row> <el-col :span="5">X:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.qrcode1.xMargin"/> </el-col> </el-row> <el-row> <el-col :span="5">Y:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.qrcode1.yMargin"/> </el-col> </el-row> <!--二维码2--> <el-row class="row_item"> <el-col :span="5">{{$t('craft.tag3')}}:</el-col> <el-col :span="6"> <el-select v-model="trademarkAttr.tag3"> <el-option :value="true" :label="$t('basicData.true')"/> @@ -1337,32 +1417,35 @@ </el-row> <el-row> <el-col :span="4">X:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.xMargin"/> </el-col> </el-row> <el-row> <el-col :span="4">Y:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.yMargin"/> </el-col> </el-row> <el-row> <el-col :span="4">{{$t('craft.location')}}:</el-col> <el-col :span="5">{{$t('craft.qr2Local')}}:</el-col> <el-col :span="25"> <el-radio v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item" /> <el-radio v-model="trademarkAttr.qrcode2.location" v-for="item in trademarkLocation" :label="item" /> </el-col> </el-row> <el-row> <el-col > <el-button @click="changeTrademark" style="float:right;" type="primary" >{{$t('craft.sure')}}</el-button> <el-button @click="resetTrademark" style="float:right;margin-right: 0.5rem" type="primary" >{{$t('craft.reset')}}</el-button> <el-col :span="5">X:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.qrcode2.xMargin"/> </el-col> </el-row> <el-row> <el-col :span="5">Y:</el-col> <el-col :span="6"> <el-input-number v-model="trademarkAttr.qrcode2.yMargin"/> </el-col> </el-row> </div> <div style="width: 404px;height: 254px;border: 2px solid #000;float: left; position: relative;display: flex;justify-content: center;align-content: center;"> @@ -1411,6 +1494,14 @@ <div v-if="enlargementFlag" style="width: 400px;height: 250px;float: left;position: relative;background-color: red"> <el-image @dblclick="trademarkenlargement" style="z-index: 9999;max-width: 100%;max-height: 100%" :src="iconNickname"/> </div> <template #footer style="width: 100%;height: 100%"> <el-row> <el-col > <el-button @click="changeTrademark" style="float:right;" type="primary" >{{$t('craft.sure')}}</el-button> <el-button @click="resetTrademark" style="float:right;margin-right: 0.5rem" type="primary" >{{$t('craft.reset')}}</el-button> </el-col> </el-row> </template> </el-dialog> </div> </template> @@ -1468,4 +1559,12 @@ #mains { position: relative; } :deep(#trademark .el-dialog__body){ height: 85%; width: 100%; overflow-y: auto; } .row_item{ margin-top: 30px; } </style> north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -1711,7 +1711,10 @@ p.creater = a.Id ))) WHERE ( p.state = 1 ) and p.tempering_state=0 and optimize_state=0 and p.project_no = #{projectNo} ( p.state = 1 ) and # p.tempering_state=0 and # optimize_state=0 and p.project_no = #{projectNo} ORDER BY p.create_time DESC, p.project_no north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -3214,31 +3214,59 @@ IFNULL(dd.breakageQuantity,0) as breakageQuantity, rw.completedArea, IFNULL(dd.breakageArea,0) as breakageArea, CONCAT(ROUND(TRUNCATE(rw.completedQuantity/(rw.completedQuantity + IFNULL(dd.breakageArea,0)),2)*100), '%') as finished CONCAT(ROUND(TRUNCATE(rw.completedArea/(rw.completedArea + IFNULL(dd.breakageArea,0)),2)*100), '%') as finished from ( select rw.this_process,SUM(rwd.completed_quantity) as completedQuantity ,ROUND(SUM((rwd.child_width) * (rwd.child_height) * rwd.completed_quantity / 1000000), 2) as completedArea from reporting_work rw LEFT JOIN reporting_work_detail rwd on rwd.reporting_work_id = rw.reporting_work_id select tb.process as this_process, SUM(tb.completedQuantity) as completedQuantity, ROUND(SUM(completedArea),2) as completedArea from ( SELECT rw.process_id, rw.this_process AS process, rw.teams_groups_name AS teamsGroupsName, rwd.order_number AS orderNumber, MAX(bd.nickname) AS nickname, /* 仅当 nickname 为空时才显示 technology_number,否则为 NULL */ MIN(CASE WHEN bd.nickname IS NULL THEN rwd.technology_number ELSE NULL END) AS technologyNumber, COALESCE((rwd.completed_quantity), 0) AS completedQuantity, ROUND(COALESCE((rwd.child_width * rwd.child_height * rwd.completed_quantity),0)/1000000, 2) AS completedArea FROM reporting_work rw LEFT JOIN reporting_work_detail rwd ON rwd.reporting_work_id = rw.reporting_work_id LEFT JOIN sd.basic_data bd ON bd.basic_name = rw.this_process where rw.reporting_work_time >= #{selectTime1} WHERE rw.reporting_work_time >= #{selectTime1} AND rw.reporting_work_time < #{selectTime2} AND rw.reviewed_state >= 0 GROUP BY rw.this_process AND rw.reviewed_state >= 0 GROUP BY rw.reporting_work_id, rw.process_id, rw.this_process, rw.teams_groups_name, rwd.order_number, CASE WHEN bd.nickname IS NULL THEN rwd.technology_number ELSE NULL END ORDER BY rw.process_id, rw.this_process, rw.teams_groups_name, rwd.order_number, CASE WHEN bd.nickname IS NULL THEN rwd.technology_number ELSE NULL END ) as tb GROUP BY tb.process ) as rw left join ( select dd.responsible_process,sum(dd.breakage_quantity) as breakageQuantity ,ROUND(SUM((rwd.child_width) * (rwd.child_height) * dd.breakage_quantity / 1000000), 2) as breakageArea from reporting_work rw left join damage_details dd on dd.reporting_work_id = rw.reporting_work_id LEFT JOIN reporting_work_detail rwd on rwd.reporting_work_id = dd.reporting_work_id and rwd.order_number = dd.order_number and rwd.technology_number = dd.technology_number LEFT JOIN reporting_work_detail rwd on rwd.reporting_work_id = dd.reporting_work_id and rwd.order_number = dd.order_number and rwd.technology_number = dd.technology_number where rw.reporting_work_time >= #{selectTime1} AND rw.reporting_work_time < #{selectTime2} AND rw.reviewed_state >= 0 and dd.available =0 AND rw.reviewed_state >= 0 and dd.available =0 GROUP BY dd.responsible_process ) as dd on rw.this_process = dd.responsible_process </select> </mapper>