north-glass-erp/northglass-erp/src/components/mm/PrintPackingListLuoyang.vue
@@ -88,17 +88,28 @@ customer.value = produceList.value[0].detail[0] let height = 0 let index = 0 produceList.value[0].detailList.forEach(order => { if(orderDetailList.value[index]===undefined){ orderDetailList.value[index]=[] for(let i=0;i<produceList.value.length;i++){ //换产品就换页 if(i>0){ index+=1 } orderDetailList.value[index]=[] orderDetailList.value[index].push({ type:'customer', customer:produceList.value[i].detail[0] }) produceList.value[i].detailList.forEach(order => { height+=50 //判断高度是否超过350,则换页 if(height>=500){ height=0 index+=1 orderDetailList.value[index]=[] orderDetailList.value[index].push({ type:'customer', customer:produceList.value[i].detail[0] }) } orderDetailList.value[index].push({ type:'product', @@ -119,6 +130,8 @@ }) }) }) } console.log(orderDetailList.value) orderDetailList.value.forEach((page,index)=>{ let sum = { quantity:0, @@ -179,23 +192,23 @@ <div style="display:flex;"> <div style="width: 100%"><span style="font-weight: bold;">客户名称</span>: <input class="contactNumber" style="width: 80%;font-size: 9px" type="text" v-model="customer.customer_name" /> v-model="page[0].customer.customer_name" /> </div> </div> <div style="display:flex;"> <div style="width: 100%"><span style="font-weight: bold">工程名称</span>:{{customer.project}}</div> <div style="width: 100%"><span style="font-weight: bold">工程名称</span>:{{page[0].customer.project}}</div> </div> <div style="display:flex;"> <div style="width: 50%"><span style="font-weight: bold">订单号</span>:{{customer.order_id}}</div> <div style="width: 50%"><span style="font-weight: bold">装箱单号</span>:{{customer.remarks}}</div> <div style="width: 50%"><span style="font-weight: bold">订单号</span>:{{page[0].customer.order_id}}</div> <div style="width: 50%"><span style="font-weight: bold">装箱单号</span>:{{page[0].customer.remarks}}</div> </div> <div style="display:flex;"> <div style="width: 50%"><span style="font-weight: bold">包装日期</span>:{{customer.reporting_work_time}}</div> <div style="width: 50%"><span style="font-weight: bold">本架数量</span>:{{customer.quantity}}</div> <div style="width: 50%"><span style="font-weight: bold">包装日期</span>:{{page[0].customer.reporting_work_time}}</div> <div style="width: 50%"><span style="font-weight: bold">本架数量</span>:{{page[0].customer.quantity}}</div> </div> <div style="display:flex;"> <div style="width: 50%;font-size: 9px"><span style="font-weight: bold">加工班组</span>:{{customer.teams_groups_name2}}</div> <div style="width: 50%;font-size: 9px"><span style="font-weight: bold">包装班组</span>:{{customer.teams_groups_name}}</div> <div style="width: 50%;font-size: 9px"><span style="font-weight: bold">加工班组</span>:{{page[0].customer.teams_groups_name2}}</div> <div style="width: 50%;font-size: 9px"><span style="font-weight: bold">包装班组</span>:{{page[0].customer.teams_groups_name}}</div> </div> <div style="display:flex;"> <div style="width: 50%"><span style="font-weight: bold">质量检验</span>:刘化菊</div> @@ -231,7 +244,7 @@ <td>{{ row.size.area }}</td> </tr> <tr id="footsum" v-else style="border: 0;font-size: 10px"> <tr id="footsum" v-else-if="row.type==='sum'" style="border: 0;font-size: 10px"> <td colspan="5" style="border: 0;"> <div style="display:flex;"> <div>本页数量</div> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyang.vue
@@ -258,7 +258,7 @@ <td colspan="6"> <el-row :gutter="20"> <el-col :span="2"></el-col> <el-col :span="12" style="font-size: 17px;font-weight: bold"> {{delivery.orderId }}</el-col> <el-col :span="12" style="font-size: 16px"> {{delivery.orderId }}</el-col> </el-row> </td> </tr> @@ -302,16 +302,16 @@ </td> </tr> <tr> <td></td> <td></td> <td> <tr id="table-sum"> <td style="width: 5cm"></td> <td style="width: 150px" ></td> <td style="width: 65px" > {{getQuantitySum(pageIndex)}} </td> <td> <input style="border: 0;width: 100px" :value="getAreaSum(pageIndex)"> <td style="width: 100px"> <input style="border: 0;width: 100px;font-size: 17px" :value="getAreaSum(pageIndex)"> </td> <td></td> <td style="width: 80px"></td> <td v-if="props.type===1"> {{getMoneySum(pageIndex)}} </td> @@ -368,6 +368,11 @@ bottom: 1cm; width: 100%; /* 或者设置成具体的宽度 */ } #table-sum { position: absolute; /* 或者使用 relative,根据具体需求 */ bottom: 5cm; } } .textarea{ @@ -389,4 +394,7 @@ :deep(.bbb){ width: 5cm; } :deep(#table-sum td){ font-size: 17px; } </style> north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
@@ -19,13 +19,11 @@ let remark =ref(company.deliveryRemark) let props = defineProps({ deliveryId:null, type:null }) const form = ref({ }) const form = ref({}) let produceList2 = ref([]) @@ -44,7 +42,7 @@ request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => { if(res.code==200){ console.log(res.data) //console.log(res.data) produceList.value = deepClone(res.data) for(let i=0;i<produceList.value.length;i++){ produceList.value[i].data.forEach(item =>{ @@ -73,8 +71,7 @@ produceList1.otherMoneys+=produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery if(otherMoney1.length===0){ otherMoney1.push(produceList1.otherMoney[i]) } else{ } else { for(let s=0;s<otherMoney1.length;s++){ if(produceList1.otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){ @@ -110,10 +107,9 @@ } //给数据进行分页 pageData.value = groupArrayByFive(produceList2.value[0].data) console.log(pageData.value) //console.log(pageData.value) delivery.value = produceList2.value[0].delivery console.log(delivery.value) //console.log(delivery.value) }else{ @@ -125,7 +121,7 @@ function groupArrayByFive(arr) { let result = []; /*let result = []; let productName=ref() arr.forEach(item=>{ for (let i = 0; i < item.DeliveryDetailList.length; i += 8) { @@ -140,10 +136,84 @@ result.push(resultMap) } })*/ let result = []; arr.forEach(item => { item.DeliveryDetailList.forEach(items => { result.push(items) }) return result; }) console.log(result) let index=0 let number=0 let numberResult = []; let results = []; let productName=result[0]['product_name'] for (let i = 0; i < result.length; i ++) { if(productName!=result[i]['product_name']){ productName=result[i]['product_name'] index++ } number++ numberResult.push(result[i]) let next=false if (i + 1 != result.length) { if(result[i+1]['product_name']!=productName){ next=true } }else{ next=true } if((index==3 && next) ||number==8){ results.push(numberResult); index=0 number=0 numberResult=[] }else{ if (i + 1 == result.length) { results.push(numberResult); index=0 number=0 numberResult=[] } } } console.log(results) /*for (let i = 0; i < result.length; i += 8) { results.push(result.slice(i, i + 8)); }*/ for (let i = 0; i < results.length; i++) { let name = results[i][0]['product_name'] //上一次名称 let key = 0; //相同数 for (let j = 0; j < results[i].length; j++) { let thisName = results[i][j]['product_name']; if (thisName != name) { results[i][key].rowspan = j - key; name=results[i][j]['product_name'] key = j; } if (j + 1 == results[i].length) { results[i][key].rowspan = j - key+1; name=results[i][j]['product_name'] } } } return results; } let deliveryDate = ref() onMounted(() => { const today = new Date @@ -155,7 +225,6 @@ }) const printSheet = () => { } let companyName = ref('洛阳玻璃公司') @@ -164,7 +233,7 @@ if(pageData.value[page] === undefined){ return 0 } return pageData.value[page].DeliveryDetailList[0].reduce((accumulator, currentValue) => { return pageData.value[page].reduce((accumulator, currentValue) => { return add(accumulator,currentValue.quantity) }, 0) @@ -174,7 +243,7 @@ if(pageData.value[page] === undefined){ return 0 } return pageData.value[page].DeliveryDetailList[0].reduce((accumulator, currentValue) => { return pageData.value[page].reduce((accumulator, currentValue) => { return addAuto(accumulator,currentValue.area,2) }, 0) } @@ -182,7 +251,7 @@ if(pageData.value[page] === undefined){ return 0 } return pageData.value[page].DeliveryDetailList[0].reduce((accumulator, currentValue) => { return pageData.value[page].reduce((accumulator, currentValue) => { return addAuto(accumulator,currentValue.money,2) }, 0) } @@ -209,7 +278,9 @@ <table class="content1" v-for="(page,pageIndex) in pageData" > <thead> <tr style="height: 3.6cm"><td></td></tr> <tr style="height: 3.6cm"> <td></td> </tr> <tr> <td colspan="6" > @@ -226,7 +297,9 @@ </el-row> </td> </tr> <tr style="height: 0.1cm"><td></td></tr> <tr style="height: 0.1cm"> <td></td> </tr> <tr style="margin-top: 20px"> <td colspan="6"> @@ -238,29 +311,32 @@ </el-row> </td> </tr> <tr style="height: 0.1cm"><td></td></tr> <tr style="height: 0.1cm"> <td></td> </tr> <tr> <td colspan="6"> <el-row :gutter="20"> <el-col :span="2"></el-col> <el-col :span="12" style="font-size: 17px;font-weight: bold"> {{delivery.orderId }}</el-col> <el-col :span="12" style="font-size: 16px"> {{ delivery.orderId }}</el-col> </el-row> </td> </tr> <tr style="height: 1cm"><td></td></tr> <tr style="height: 1cm"> <td></td> </tr> </thead> <tbody > <template v-for="(items,index1) in page.DeliveryDetailList[0]"> <template v-for="(items,index1) in page"> <tr> <td style="width: 4cm" :rowspan="page.id" v-if="index1===0"> <td style="width: 4cm" :rowspan="items.rowspan" v-if="items.rowspan!==undefined"> <el-input class="textarea" type="textarea" :autosize="{ minRows: 1, maxRows: 20 }" v-model="page.DeliveryDetail.orderDetail.productName" /> v-model="items.product_name"/> </td> <td style="width: 0.8cm"></td> @@ -279,7 +355,7 @@ <td style="width: 60px"> {{items.quantity}} </td> <td style="width: 100px"> <td style="width: 100px;font-size: 17px"> <input style="border: 0;width: 100px" v-model="items.area"> </td> @@ -297,18 +373,18 @@ </tr> </template> <tr> <td></td> <td></td> <td></td> <td></td> <td> <tr id="table-sum"> <td style="width: 4cm"></td> <td style="width: 0.8cm"></td> <td style="width: 2cm"></td> <td style="width: 2cm"></td> <td style="width: 60px"> {{getQuantitySum(pageIndex)}} </td> <td> <input style="border: 0;width: 100px" :value="getAreaSum(pageIndex)"> <input style="border: 0;width: 100px;font-size: 17px" :value="getAreaSum(pageIndex)"> </td> <td></td> <td style="width: 80px"></td> <td v-if="props.type===1||props.type===3"> {{getMoneySum(pageIndex)}} </td> @@ -325,32 +401,36 @@ </template> <style scoped> *{ color: rgba(0, 0, 0, 0.8); /* 更深的黑色 */ font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; outline: none; } #sheet{ width: 21cm; } table{ width: 18.3cm } .content1{ page-break-after: always; } span{ width: 7cm; text-align: center; } tbody *{ font-size: 12px; } #footsum1,#footsum{ font-size: 17px; } @@ -362,10 +442,15 @@ width: 100%; /* 或者设置成具体的宽度 */ font-size: 17px; } #footsum1{ position: fixed; bottom: 1cm; width: 100%; /* 或者设置成具体的宽度 */ } #table-sum { position: absolute; /* 或者使用 relative,根据具体需求 */ bottom: 5cm; } } @@ -376,6 +461,7 @@ --el-input-hover-border-color: rgba(255,255,255,0.0); --el-input-hover-border-width: 0px; } /*textarea { font-size: 16px; @@ -390,6 +476,8 @@ font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; font-size: 12px; } :deep(#table-sum td){ font-size: 17px; } </style> north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
@@ -41,7 +41,7 @@ mergeCells:[], toolbarConfig: { zoom: true, custom: true /*custom: true*/ }, cellClassName ({ row, column,columnIndex}) { if (columnIndex>10 && row.thisQuantity*1 === row.reportWorkQuantity[column.title]*1){ @@ -103,7 +103,6 @@ gridOptions.loading = true request.post(`/report/processCardProgress/${props.orderId}`,column).then(async (res) => { if (res.code == 200) { gridOptions.columns = JSON.parse(JSON.stringify(columns)) gridOptions.columns.forEach(item =>{ item.filterMethod = filterChanged north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -222,7 +222,7 @@ Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"), new TypeReference<Map<String, String>>() { }); dataList.get(i).put("reportWorkQuantityShow",dataList.get(i).get("reportWorkQuantity")); for (String key : clos.keySet()) { if(data.get(key) != null){ Integer max = orderGlassDetailMapper north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -388,7 +388,7 @@ public Map<String,Object> getOrderList(Integer pageNum, Integer pageSize, List<String> selectDate, Map<String,Object> config,Integer orderType) { Integer offset = (pageNum-1)*pageSize; String endDate = LocalDate.now().toString(); String startDate = LocalDate.now().minusDays(15).toString(); String startDate = LocalDate.now().minusDays(365).toString(); if(selectDate !=null && selectDate.size()==2){ if(!selectDate.get(0).isEmpty()){ startDate = selectDate.get(0); north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -803,7 +803,8 @@ and fol.remarks regexp #{finishedOperateLog.remarksr} </if> </where> group by fol.remarks,od.order_id,fol.process_id group by fol.remarks,od.order_id -- ,fol.process_id order by fol.operate_time desc limit #{offset},#{pageSize}; </select> north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -178,6 +178,7 @@ # c.quantity, c.quantity as thisQuantity,/*用于判断是否改变颜色*/ e.reportWorkQuantity, e.reportWorkQuantityShow, e.reportWorkQuantityCount, e.reportWorkTime, e.broken_num, @@ -220,6 +221,10 @@ '}' ) as reportWorkQuantity, concat('{', GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), '}' ) as reportWorkQuantityShow, concat('{', GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")), '}' ) as reportWorkQuantityCount, north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -110,7 +110,7 @@ sd.`order` as o left join mm.finished_goods_inventory as fgi on o.order_id = fgi.order_id where date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} where date(o.create_time) between #{startDate} and #{endDate} <if test="orderType!= null and orderType != ''"> and o.create_order = #{orderType}