north-glass-erp/northglass-erp/public/config.js
@@ -11,4 +11,4 @@ //洛阳 172.17.2.7 //天津 192.168.150.39 //上海 10.153.18.3 //温州 192.168.2.14 //温州 192.168.2.7 north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -336,7 +336,8 @@ <td rowspan='2'>图号</td> <td rowspan='2'>编号</td> <td rowspan="2">小片顺序</td> <td rowspan='2' style="width: 90px">宽*高</td> <td v-if="name=='浙江巨星嘉泰新材料有限公司'" rowspan='2' style="width: 90px">宽(弧长)×高</td> <td v-else rowspan='2' style="width: 90px">宽*高</td> <td rowspan='2' >数量</td> <td rowspan='2'>面积</td> <td rowspan='2'>周长</td> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -175,6 +175,8 @@ </tr> <tr> <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{itme1.delivery.customerName}}</span></th> <th style="text-align: left;border:none;" v-if="itme1.data[0].DeliveryDetail.order.batch!==''" colspan="3"> 项目名称:<span>{{itme1.delivery.project}}({{itme1.data[0].DeliveryDetail.order.batch}})</span></th> <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{itme1.delivery.project}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{itme1.delivery.contacts}}</span></th> </tr> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
@@ -121,6 +121,8 @@ </tr> <tr> <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{itme1.delivery.customerName}}</span></th> <th style="text-align: left;border:none;" v-if="itme1.data[0].DeliveryDetail.order.batch!==''" colspan="3"> 项目名称:<span>{{itme1.delivery.project}}({{itme1.data[0].DeliveryDetail.order.batch}})</span></th> <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{itme1.delivery.project}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{itme1.delivery.contacts}}</span></th> </tr> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet3.vue
New file @@ -0,0 +1,452 @@ <script setup> import request from "@/utils/request" import {computed, onMounted, ref} from "vue" import PrintFoot from "@/components/sd/order/PrintFoot.vue" import companyInfo from "@/stores/sd/companyInfo" import deepClone from "@/utils/deepClone"; import {ElMessage} from "element-plus"; import {add,multiply,multiplyAuto,divideAuto} from '@/utils/decimal'; /*一行两列发货单打印*/ const company = companyInfo() let produceList = ref([]) let otherMoney = [] let otherMoney1 = [] let delivery = ref([]) let money = ref("") let otherMoneys = 0 let sumMoney = 0 let takeCare =ref("注意:请妥善保管好我司的玻璃架,如有丢失或损坏,按1500元只赔偿。谢谢配合!") let remark =ref(company.deliveryRemark) let props = defineProps({ deliveryId:null }) const form = ref({ }) let produceList2 = ref([]) const getData = () => { if(props.deliveryId===null || props.deliveryId===undefined || props.deliveryId===''){ return } form.value.deliveryId=props.deliveryId form.value.type=company.productName request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => { if(res.code==200){ produceList.value = deepClone(res.data) for(let i=0;i<produceList.value.length;i++){ let produceList1= ({ data:null, otherMoney:null, otherMoney1:null, delivery:null, money:null, otherMoneys:0, sumMoney:0 }) produceList1.data=produceList.value[i].data produceList1.delivery=produceList.value[i].delivery produceList1.money=produceList.value[i].money produceList1.otherMoney=produceList.value[i].otherMoney for(let j=0;j<produceList1.data.length;j++){ produceList1.sumMoney+=produceList1.data[j].DeliveryDetail.money } otherMoney1=[] for(let i=0;i<produceList1.otherMoney.length;i++){ if(produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery!=null){ produceList1.otherMoneys+=produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery if(otherMoney1.length===0){ otherMoney1.push(produceList1.otherMoney[i]) } else{ for(let s=0;s<otherMoney1.length;s++){ if(produceList1.otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){ otherMoney1[s].DeliveryDetailOtherMoney.count=add(produceList1.otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count) otherMoney1[s].DeliveryDetailOtherMoney.monery =add(produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery) break } if(s+1===otherMoney1.length){ otherMoney1.push(produceList1.otherMoney[i]) break } } } } } produceList1.otherMoney1=otherMoney1 produceList2.value.push(produceList1) } for(let j=0;j<produceList2.value.length;j++){ if(produceList2.value[j].delivery.money.toFixed(0)!==(produceList2.value[j].otherMoneys +produceList2.value[j].sumMoney+produceList2.value[j].delivery.freight).toFixed(0)){ console.log(produceList2.value[j]) console.log(produceList2.value[j].delivery.money) console.log((produceList2.value[j].otherMoneys +produceList2.value[j].sumMoney).toFixed(0)) console.log(produceList2.value[j].delivery.deliveryId) } } }else{ ElMessage.warning(res.msg) router.push("/login") } }) } onMounted(() => { getData() }) const stringToJson = (productList) => { productList.forEach(item => { item.otherColumns = JSON.parse(item.otherColumns) }) } const getQuantity = (productList) => { let quantity = 0 productList.forEach(item => { quantity += item.quantity }) return parseFloat(quantity.toFixed(3)) } const getArea = (productList) => { let area = 0 productList.forEach(item => { area += item.grossArea }) return parseFloat(area.toFixed(3)) } const getPerimeter = (productList) => { let perimeter = 0 productList.forEach(item => { perimeter += item.perimeter }) return parseFloat(perimeter.toFixed(3)) } const printSheet = () => { } const groupedData = computed(() => { // 分组函数:将数组按每2条拆分 const groupArray = (arr, size) => { const result = []; for (let i = 0; i < arr.length; i += size) { result.push(arr.slice(i, i + size)); } return result; }; // 对每个item的DeliveryDetailList进行分组 return produceList2.value.map(produce => { const groupedDetails = produce.data.map(item => ({ ...item, // 对当前item的明细进行分组(每2条一组) groupedDeliveryDetails: groupArray(item.DeliveryDetailList, 2) })); return { ...produce, data: groupedDetails }; }); }); defineExpose({ printSheet }); </script> <template> <div id="sheet"> <table class="pages" v-for="(itme1, index) in groupedData" :key="index" > <thead> <tr class="title-s"> <th colspan="11"> <h1> {{company.companyName}} </h1> </th> </tr> <tr class="title-s"> <th colspan="2" style="width: 20%"></th> <th colspan="7" style="width: 60%;"> <h4 v-if="!company.showDeliveryCreator" >金华市乐动智能科技有限公司</h4> <h3>销售发货单</h3> </th> <th colspan="2" style="width: 20%;text-align: left;">发货单号:<span>{{itme1.delivery.deliveryId}}</span></th> </tr> <tr> <th style="text-align: left;border:none;" colspan="3">客户名称:<span>{{itme1.delivery.customerName}}</span></th> <th style="text-align: left;border:none;" colspan="6">项目名称:<span>{{itme1.delivery.project}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{itme1.delivery.contacts}}</span></th> </tr> <tr> <th style="text-align: left;border:none;" colspan="9">送货地址:<span>{{itme1.delivery.deliveryAddress}}</span></th> <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{itme1.delivery.contactNumber}}</span></th> </tr> </thead> <tr style="border-style: none"> <td colspan="11" style="border-style: none"> <table style="border-style: none;width: 100%;height: 100%;"> <template v-for="(item, index) in itme1.data" :key="index" > <thead> <tr v-if="index===0"> <th style="width: 14%;" colspan="1">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> <th style="width: 9%;">单价</th> <th style="width: 9.5%;">金额</th> <th style="width: 1%;"></th> <th style="width: 14%;" colspan="1">宽X高</th> <th style="width: 8%;">数量</th> <th style="width: 9%;">面积</th> <th style="width: 9%;">单价</th> <th style="width: 9.5%;">金额</th> </tr> </thead> <tr> <td style="font-size: 15px;text-align: left" colspan="5">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td> <td style="font-size: 15px;text-align: left" colspan="3">批次:<span>{{item.DeliveryDetail.order.batch}}</span></td> <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td> </tr> <tr class="day-in" v-for="(group, groupIndex) in item.groupedDeliveryDetails" :key="groupIndex"> <!-- 第一列数据(组内第一条) --> <td style="font-size: 15px;font-weight: bold;"> {{ group[0].parsedOtherColumns?.S02 ? `(${group[0].parsedOtherColumns.S02})` : '' }} {{ group[0].width }}x{{ group[0].height }} </td> <td>{{ group[0].quantity }}</td> <td>{{ group[0].area }}</td> <td>{{ group[0].price }}</td> <td>{{ group[0].money }}</td> <td></td> <!-- 分隔列 --> <!-- 第二列数据(组内第二条,若存在) --> <td style="font-size: 15px;font-weight: bold;" v-if="group[1]"> {{ group[1].parsedOtherColumns?.S02 ? `(${group[1].parsedOtherColumns.S02})` : '' }} {{ group[1].width }}x{{ group[1].height }} </td> <td v-if="group[1]">{{ group[1].quantity }}</td> <td v-if="group[1]">{{ group[1].area }}</td> <td v-if="group[1]">{{ group[1].price }}</td> <td v-if="group[1]">{{ group[1].money }}</td> <!-- 若组内只有一条数据,第二列留空 --> <td v-else colspan="5"></td> </tr> <tr class="day-in" > <td style="font-size: 15px;" colspan="7">小计:</td> <td>{{item.DeliveryDetail.quantity}}</td> <td>{{item.DeliveryDetail.area}}</td> <td></td> <td>{{item.DeliveryDetail.money}}</td> </tr> </template> <tr class="day-in"> <td style="font-size: 15px;" colspan="7">合计:</td> <td>{{itme1.delivery.quantity}}</td> <td>{{itme1.delivery.area}}</td> <td></td> <td>{{parseFloat(itme1.sumMoney.toFixed(2))}}</td> </tr> <tr class="day-in"> <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="6"> <div style="display: flex;font-size: 10px;text-align: center;"> <span style="width: 25%;font-weight: bold;font-size: 12px">加工费用</span> <span style="width: 25%;font-weight: bold;font-size: 12px">单价</span> <span style="width: 25%;font-weight: bold;font-size: 12px">数量</span> <span style="width: 25%;font-weight: bold;font-size: 12px">金额</span> </div> </td> <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额: {{itme1.delivery.money}}</td> </tr> <tr class="day-in"> <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="6" > <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in itme1.otherMoney1" :key="index2"> <span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span> <span style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span> <span style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</span> <span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery).toFixed(2)}}</span> </div> <div style="display: flex;font-size: 10px;text-align: center" v-if="itme1.delivery.freight>0"> <span style="width: 25%">运费</span> <span style="width: 25%">{{itme1.delivery.freightPrice}}</span> <span style="width: 25%">{{itme1.delivery.freightQuantity}}</span> <span style="width: 25%">{{itme1.delivery.freight}}</span> </div> </td> <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额: {{itme1.money}}</td> </tr> <!-- <el-row :gutter="24"> <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col> <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col> <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col> <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col> <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col> </el-row>--> <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator"> <td colspan="11" style="border: 0"> <div style="display:flex;text-align: left" class="bottom"> <div style="width: 15%">制单员:{{ itme1.delivery.creator }}</div> <div style="width: 25%">制单日期:{{ itme1.delivery.createTime }}</div> <div style="width: 10%">发货员:</div> <div style="width: 10%">司机:</div> <div style="width: 15%">客户签字:</div> <div style="width: 15%">签收日期:</div> </div> </td> </tr> <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator"> <td colspan="11" style="border: 0;"> <div style="display:flex;" class="bottom"> 架子 只 {{takeCare}} </div> </td> </tr> <tr class="day-in" style="border: 0;"> <td colspan="11" style="border: 0;"> <div style="display:flex;text-align: left;border: 0;margin-top: 10px " class="bottom" > <el-input type="textarea" :autosize="{ minRows: 7, maxRows: 20 }" v-model="remark"/> </div> </td> </tr> <tr class="day-in" style="border: 0" v-if="!company.showDeliveryCreator"> <td colspan="11" style="border: 0"> <div style="width: 100%;height: 50px"></div> </td> </tr> <tr class="day-in" style="border: 0" v-if="!company.showDeliveryCreator"> <td colspan="11" style="border: 0"> <div style="display:flex;text-align: left" class="bottom"> <div style="width: 15%">制单员:{{ itme1.delivery.creator }}</div> <div style="width: 15%">制单日期:{{ itme1.delivery.createTime1 }}</div> <div style="width: 15%">发货员:</div> <div style="width: 15%">司机:</div> <div style="width: 15%">客户签字:</div> <div style="width: 15%">签收日期:</div> </div> </td> </tr> </table> </td> </tr> </table> </div> </template> <style scoped> @media print { @page { margin: 12mm 10mm 20mm 10mm !important; } .pages { page-break-after: always; } @page { @top-right { margin-top: 50px; content: "第 " counter(page) " 页"; /* 使用counter添加页码 */ } } } h1,h3{ left:0; right:0; top:0; bottom:0; margin:auto; } h1{ font-size: 1.5rem; } h3{ font-size: 1.2rem; font-weight: bolder; } table{ border-collapse: collapse; width: 100%; text-align: center; } tr,td,th{ border: 1px solid black; } th,.no-change-row { white-space: nowrap; } .title-1{ width: 76px; } .title-s,.title-s th{ border:0 } .hr-border{ height: 2px; width: 100%; background-color: black; color: black; } table { border-collapse: collapse; width: 100%; } td > table { margin: 0; padding: 0; } </style> north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet4.vue
@@ -156,7 +156,7 @@ </tr> <tr class="title-s"> <th colspan="2" style="width: 30%;text-align: left;"><span>总重量:{{ grossNum.weight }}</span></th> <th colspan="2" style="width: 30%;text-align: left;"><span>{{data.order.orderType}} 总重量:{{ grossNum.weight }}</span></th> <th colspan="5" style="width: 40%;"> <h3 >生产任务单(成品)</h3> </th> @@ -167,7 +167,9 @@ <tr> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="4"> 客户名称:<span>{{ data.order.customerName }}</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="3"> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" v-if="data.order.batch!==''" colspan="3"> 项目名称:<span>{{ data.order.project }}({{data.order.batch}})</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" v-else colspan="3"> 项目名称:<span>{{ data.order.project }}</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="2"> 发货日期:<span>{{ data.order.deliveryDate }}</span></th> north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet5.vue
@@ -147,16 +147,18 @@ </tr> <tr class="title-s"> <th colspan="2"></th> <th colspan="5" > <h3 style="margin-left: 25%">生成任务单(单品)</h3> <th colspan="2" style="width: 30%;text-align: left;"><span>{{data.order.orderType}}</span></th> <th colspan="5" style="width: 40%;margin: auto"> <h3 >生产任务单(成品)</h3> </th> <th colspan="2" style="text-align: center;font-weight: bold;">订单编号:<span>{{ data.order.orderId }}</span></th> <th colspan="2" style="width: 30%">订单编号:<span>{{ data.order.orderId }}</span></th> </tr> <tr> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="4"> 客户名称:<span>{{ data.order.customerName }}</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="3"> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" v-if="data.order.batch!==''" colspan="3"> 项目名称:<span>{{ data.order.project }}({{data.order.batch}})</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" v-else colspan="3"> 项目名称:<span>{{ data.order.project }}</span></th> <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="2"> 发货日期:<span>{{ data.order.deliveryDate }}</span></th> north-glass-erp/northglass-erp/src/lang/ar.js
@@ -680,7 +680,7 @@ hiddenVal:'隐藏', futureTime:'报工时间不能大于当前时间', longTime:'报工时间与当前时间超过15天', longTime:'报工时间与当前时间超过13个月', selectResponsibleTeam:'الرجاء اختيار الفريق المسؤول', selectWorkReportingTeam:'الرجاء اختيار الفريق المسؤول', successfulModificationOfWorkApplication:'تم تعديل التقرير بنجاح', north-glass-erp/northglass-erp/src/lang/en.js
@@ -680,7 +680,7 @@ hiddenVal:'隐藏', futureTime:'报工时间不能大于当前时间', longTime:'报工时间与当前时间超过15天', longTime:'报工时间与当前时间超过13个月', selectResponsibleTeam:'Please select a responsible team', selectWorkReportingTeam:'Please select a responsible team', successfulModificationOfWorkApplication:'Report modification succeeded', north-glass-erp/northglass-erp/src/lang/kr.js
@@ -680,7 +680,7 @@ hiddenVal:'隐藏', futureTime:'报工时间不能大于当前时间', longTime:'报工时间与当前时间超过15天', longTime:'报工时间与当前时间超过13个月', selectResponsibleTeam:'담당 팀을 선택해 주세요.', selectWorkReportingTeam:'담당 팀을 선택해 주세요.', successfulModificationOfWorkApplication:'작업 보고 수정 성공', north-glass-erp/northglass-erp/src/lang/ru.js
@@ -680,7 +680,7 @@ hiddenVal:'隐藏', futureTime:'报工时间不能大于当前时间', longTime:'报工时间与当前时间超过15天', longTime:'报工时间与当前时间超过13个月', selectResponsibleTeam:'Пожалуйста, выберите группу ответственности.', selectWorkReportingTeam:'Пожалуйста, выберите группу ответственности.', successfulModificationOfWorkApplication:'Изменение обратной связи успешно', north-glass-erp/northglass-erp/src/lang/zh.js
@@ -680,7 +680,7 @@ hiddenVal:'隐藏', futureTime:'报工时间不能大于当前时间', longTime:'报工时间与当前时间超过15天', longTime:'报工时间与当前时间超过13个月', selectResponsibleTeam:'请选择责任班组', selectWorkReportingTeam:'请选择责任班组', successfulModificationOfWorkApplication:'报工修改成功', north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue
@@ -460,8 +460,6 @@ xGrid.value.reloadData(produceList.value); } // 显示成功消息 ElMessage.success(config.successMsg); }else{ ElMessage.warning(config.checkMessage); return; north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -683,28 +683,45 @@ localStorage.setItem('projectNo', projectNo.value); }); const saveOptimizeData = () => { if(orderInfo.optimizeData!==null){ if(quantitys.value===orderInfo.optimizeData.optimalResults.glassTotalQuantity){ console.log("保存数据1",orderInfo.optimizeData) request.post(`/glassOptimize/saveOptimizeData/${projectNo.value}`,orderInfo.optimizeData).then((res) => { if ((Number(res.code) === 200)) { ElMessage.success("保存成功"); } else { ElMessage.warning(res.msg); } const saveOptimizeData = async () => { try { // 先从后端查询工程状态 const stateRes = await request.post(`/glassOptimize/getProjectState/${projectNo.value}`); if (Number(stateRes.code) === 200) { const projectData = stateRes.data.data; }).catch((error) => { console.error("获取数据出错:", error); }); }else{ ElMessage.warning("原片不足,小片未全部优化"); // 检查 optimize_state 状态 if (projectData.optimize_state === 1) { // 如果已完成优化,提示用户并阻止继续执行 ElMessage.warning('已完成优化保存,不允许重复提交'); return; } } else { ElMessage.warning(stateRes.msg); return; } }else { ElMessage.warning("数据未优化"); if(orderInfo.optimizeData!==null){ if(quantitys.value===orderInfo.optimizeData.optimalResults.glassTotalQuantity){ console.log("保存数据1",orderInfo.optimizeData) request.post(`/glassOptimize/saveOptimizeData/${projectNo.value}`,orderInfo.optimizeData).then((res) => { if ((Number(res.code) === 200)) { ElMessage.success("保存成功"); } else { ElMessage.warning(res.msg); } }).catch((error) => { console.error("获取数据出错:", error); }); }else{ ElMessage.warning("原片不足,小片未全部优化"); } }else { ElMessage.warning("数据未优化"); } } catch (error) { ElMessage.error('检查工程状态失败,请稍后重试'); console.error('检查工程状态失败:', error); } } const fetchData = () => { north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1038,7 +1038,7 @@ const diffMs = currentTime - targetTime // 转换为天数 const diffDays = diffMs / (1000 * 60 * 60 * 24) if (diffDays > 90 && saveType!="update") { if (diffDays > 396 && saveType!="update") { ElMessage.error(t('reportingWorks.longTime')) return } north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -18,6 +18,7 @@ import useOrderInfoStore from "@/stores/sd/order/orderInfo"; import { saveAs } from "file-saver" import companyInfo from "@/stores/sd/companyInfo"; import PrintSheet3 from "@/components/sd/delivery/PrintSheet3.vue"; //语言获取 const { t } = useI18n() @@ -421,6 +422,39 @@ break } case 'sheet7': { const selectRecords = $grid.getCheckboxRecords() if (selectRecords.length === 0) { if(rowClickIndex.value.deliveryState>0){ ElMessage.warning(t('order.printingNumber')+rowClickIndex.value.printingNumber) let delivery=([]) delivery.push(rowClickIndex.value) flowData.value.delivery=delivery dialogTableVisible.value = true sheetIndex.value=7 }else{ ElMessage.warning(t('order.orderNotApproved')) } }else{ let a=0 selectRecords.forEach((item) => { if(item.deliveryState==0){ ElMessage.warning(t('order.orderNotApproved')) a=1 } }) if(a==0){ flowData.value.delivery=selectRecords dialogTableVisible.value = true sheetIndex.value=7 } } break } } } }, @@ -467,6 +501,7 @@ { code: 'sheet4', name: t('delivery.print1')+ t('delivery.noMoney'), prefixIcon: 'vxe-icon-file-txt', visible: false}, { code: 'sheet5', name: t('delivery.print2'), prefixIcon: 'vxe-icon-file-txt', visible: false}, { code: 'sheet6', name: t('delivery.print2')+ t('delivery.noMoney'), prefixIcon: 'vxe-icon-file-txt', visible: false}, { code: 'sheet7', name: t('打印一行俩列'), prefixIcon: 'vxe-icon-file-txt', visible: true}, ] ] } @@ -663,7 +698,7 @@ <el-button @click="exportFile" :icon="Download" circle /> <el-select v-model="optionVal" v-if="sheetIndex>2" v-if="sheetIndex>2&&sheetIndex<7" style="width: 120px"> <el-option v-for="n in 8" @@ -679,6 +714,7 @@ <print-sheet-luoyang id="child" v-if="sheetIndex===4" :deliveryId="flowData.delivery" :type="2" :optionVal='optionVal'/> <print-sheet-luoyang-details id="child" v-if="sheetIndex===5" :deliveryId="flowData.delivery" :type="3" :optionVal='optionVal'/> <print-sheet-luoyang-details id="child" v-if="sheetIndex===6" :deliveryId="flowData.delivery" :type="4" :optionVal='optionVal'/> <print-sheet3 id="child" v-if="sheetIndex===7" :deliveryId="flowData.delivery" /> </el-dialog> </div> north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -226,7 +226,10 @@ const glassSure = () => { let childName = '' Object.keys(stuff.value).forEach((item,index)=>{ childName+=stuff.value[item] if(stuff.value[item]!==undefined){ childName+=stuff.value[item] } }) let rege = /^\s*$/ if(rege.test(childName) || processChecked.value.length===0){ @@ -262,10 +265,13 @@ let childName = '' try { Object.keys(hollowBasic.value).forEach((item, index) => { if (hollowBasic.value[item] === '' && item !== 'GlueDepth') { if ((hollowBasic.value[item] === ''||hollowBasic.value[item]===undefined) && item !== 'GlueDepth') { throw new Error(t('product.msg.HollowReview')) } childName += hollowBasic.value[item] || '' if(hollowBasic.value[item]!==undefined){ childName += hollowBasic.value[item] || '' } }) }catch (e){ ElMessage.warning(e.message) @@ -299,10 +305,13 @@ let childName = '' try { Object.keys(InterlayerBasic.value).forEach((item, index) => { if (InterlayerBasic.value[item] === '' && item !== 'color') { if ((InterlayerBasic.value[item] === ''||InterlayerBasic.value[item]===undefined) && item !== 'color') { throw new Error(t('product.msg.InterlayerReview')) } childName += InterlayerBasic.value[item] if(InterlayerBasic.value[item]!==undefined){ childName += InterlayerBasic.value[item] } }) }catch (e){ ElMessage.warning(e.message) @@ -668,7 +677,13 @@ </el-col> <el-col :span="13"> <div class="grid-content ep-bg-purple" > <el-input :value="stuff.thickness+stuff.color+stuff.craft+stuff.position+stuff.lowE" size="small" disabled /> <el-input :value="Object.values({...stuff, thickness: stuff.thickness, color: stuff.color, craft: stuff.craft, position: stuff.position, lowE: stuff.lowE }).filter(val => val !== null && val !== '').join('')" size="small" disabled /> </div> </el-col> <el-col :span="3"> north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java
@@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; @@ -45,6 +46,9 @@ GlassOptimizeMapper glassOptimizeMapper; @Autowired SysErrorService sysErrorService; @Value("${mesIp:localhost}") // 注入mesIp配置,默认值为10.153.19.31 private String mesIp; RabbitMQUtil rabbitMQUtil; //模拟计算 @@ -1243,9 +1247,7 @@ boolean saveState=false; try { // 1. 创建URL对象 // URL url = new URL("http://10.153.19.31:88/api/loadGlass/engineering/importEngineer"); URL url = new URL("http://localhost:88/api/loadGlass/engineering/importEngineer"); URL url = new URL("http://" + mesIp + ":88/api/loadGlass/engineering/importEngineer"); // 2. 打开连接 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); @@ -1483,8 +1485,8 @@ try { // 1. 创建URL对象 // URL url = new URL("http://10.153.19.31:88/api/loadGlass/engineering/optimizeCancelTask"); URL url = new URL("http://localhost:88/api/loadGlass/engineering/optimizeCancelTask"); URL url = new URL("http://" + mesIp + ":88/api/loadGlass/engineering/optimizeCancelTask"); // URL url = new URL("http://localhost:88/api/loadGlass/engineering/optimizeCancelTask"); // 2. 打开连接 north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -1159,7 +1159,7 @@ NOW(), NOW(), 0, #{glass.layers_number}, #{glass.technology_number}, #{glass.order_number}, #{glass.tempering_layout_id}, #{glass.tempering_feed_sequence}, north-glass-erp/src/main/resources/mapper/sd/DeliveryDetailMapper.xml
@@ -124,6 +124,7 @@ <result column="height" property="orderDetail.shape"/> <result column="contract_id" property="order.contractId"/> <result column="batch" property="order.batch"/> @@ -1049,7 +1050,7 @@ <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" > select dd.delivery_id,od.order_id,od.product_id,IF(#{type}='product_abbreviation',pt.remarks,od.product_name) as product_name,dd.price,sum(dd.area) as area, sum(dd.money) as money,sum(dd.quantity) as quantity,o.contract_id from sum(dd.money) as money,sum(dd.quantity) as quantity,o.contract_id,o.batch from delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number left join product pt on pt.id=od.product_id left join sd.`order` o on o.order_id=dd.order_id