Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | import QRCode from "qrcode"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | import userInfo from "@/stores/userInfo" |
| | | import {add,addAuto} from '@/utils/decimal'; |
| | | //语言获取 |
| | | const company = companyInfo() |
| | | const {t} = useI18n() |
| | |
| | | //console.log(element.style.height) |
| | | } |
| | | }); |
| | | |
| | | const selectPrint = () => { |
| | | const orderDetailList = ref([]) |
| | | const customer = ref({}) |
| | | const selectPrint =async () => { |
| | | request.post(`/finishedGoodsInventory/getSelectPrints`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | console.log(produceList.value) |
| | | 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]=[] |
| | | } |
| | | height+=50 |
| | | //判断高度是否超过350,则换页 |
| | | if(height>=500){ |
| | | height=0 |
| | | index+=1 |
| | | orderDetailList.value[index]=[] |
| | | } |
| | | orderDetailList.value[index].push({ |
| | | type:'product', |
| | | productName:order.product_name |
| | | }) |
| | | |
| | | |
| | | order.detailList.forEach(item => { |
| | | height+=30 |
| | | if(height>=500){ |
| | | height=0 |
| | | index+=1 |
| | | orderDetailList.value[index]=[] |
| | | } |
| | | orderDetailList.value[index].push({ |
| | | type:'size', |
| | | size:item |
| | | }) |
| | | }) |
| | | }) |
| | | orderDetailList.value.forEach((page,index)=>{ |
| | | let sum = { |
| | | quantity:0, |
| | | area:0, |
| | | weight:0 |
| | | } |
| | | page.forEach((row)=>{ |
| | | if(row.type==='size'){ |
| | | sum.quantity +=row.size.quantity |
| | | sum.area =addAuto(row.size.area,sum.area,2) |
| | | sum.weight =addAuto(row.size.weight,sum.weight,2) |
| | | } |
| | | }) |
| | | page.push({ |
| | | type:'sum', |
| | | sum:sum |
| | | }) |
| | | }) |
| | | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | |
| | | <template v-for="(item,id) in produceList" :key="id"> |
| | | <template v-for="(items,id) in count" :key="id"> |
| | | <div style="width: 46%;" > |
| | | <div style="height: 100%;width: 100%;"> |
| | | <table> |
| | | <thead> |
| | | <tr> |
| | | <td colspan="1" style="text-align: center;font-weight: bolder;"> |
| | | <div style="width: 60px;height: 60px"><img id="img-pic" style="width:100%;height: 100%" src="@/assets/northGlass.ico" alt=""></div> |
| | | </td> |
| | | <td colspan="4" style="font-weight: bolder"> |
| | | <div style="font-size: 15px;font-weight: bold;line-height: 15px;"> |
| | | <p |
| | | style="font-size: 15px; |
| | | font-weight: bold; |
| | | line-height: 15px;" |
| | | >{{companyAddress.company}}</p> |
| | | <span style="font-size: 8px;"> {{companyAddress.companyInfo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="5" style="text-align: center;"> |
| | | <div>(装箱单)</div> |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;font-size: 12px" v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="5"> |
| | | <div style="display:flex;"> |
| | | <div style="width: 100%"><span style="font-weight: bold;">客户名称</span>:<input class="contactNumber" style="width: 60%;font-size: 12px" type="text" v-model="itemFlow.customer_name" /></div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 100%"><span style="font-weight: bold">工程名称</span>:{{itemFlow.project}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">订单号</span>:{{itemFlow.order_id}}</div> |
| | | <div style="width: 50%"><span style="font-weight: bold">装箱单号</span>:{{itemFlow.remarks}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">包装日期</span>:{{itemFlow.reporting_work_time}}</div> |
| | | <div style="width: 50%"><span style="font-weight: bold">本架数量</span>:{{itemFlow.quantity}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">加工班组</span>:{{itemFlow.teams_groups_name2}}</div> |
| | | <div style="width: 50%"><span style="font-weight: bold">包装班组</span>:{{itemFlow.teams_groups_name}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">质量检验</span>:<input class="contactNumber" style="font-size: 12px" type="text" v-model="name1" /></div> |
| | | <div style="width: 50%"><span style="font-weight: bold">成品发货</span>:<input class="contactNumber" style="font-size: 12px" type="text" v-model="name2" /></div> |
| | | </div> |
| | | <div > |
| | | <div :class="'div_'+n " style="width: 46%;position: relative;" v-for="n in 2" > |
| | | <table v-for="page in orderDetailList" :key="page" style="width: 100%"> |
| | | <thead> |
| | | <tr> |
| | | <td colspan="1" style="text-align: center;font-weight: bolder;"> |
| | | <div style="width: 60px;height: 60px"> |
| | | <img id="img-pic" style="width:100%;height: 100%" src="@/assets/northGlass.ico" alt=""> |
| | | </div> |
| | | </td> |
| | | <td colspan="4" style="font-weight: bolder"> |
| | | <div style="font-size: 15px;font-weight: bold;line-height: 15px;"> |
| | | <p |
| | | style="font-size: 15px; |
| | | font-weight: bold; |
| | | line-height: 15px;" |
| | | >{{companyAddress.company}}</p> |
| | | <span style="font-size: 8px;"> {{companyAddress.companyInfo}}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="5" style="text-align: center;"> |
| | | <div>(装箱单)</div> |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;font-size: 12px" > |
| | | <td colspan="5"> |
| | | <div style="display:flex;"> |
| | | <div style="width: 100%"><span style="font-weight: bold;">客户名称</span>: |
| | | <input class="contactNumber" style="width: 60%;font-size: 12px" type="text" |
| | | v-model="customer.customer_name" /> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 100%"><span style="font-weight: bold">工程名称</span>:{{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> |
| | | <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> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">加工班组</span>:{{customer.teams_groups_name}}</div> |
| | | <div style="width: 50%"><span style="font-weight: bold">包装班组</span>:{{customer.teams_groups_name2}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div style="width: 50%"><span style="font-weight: bold">质量检验</span>:刘化菊</div> |
| | | <div style="width: 50%"><span style="font-weight: bold">成品发货</span>:</div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;font-size: 12px"> |
| | | <td style="width: 20%;">编号</td> |
| | | <td style="width: 20%;">宽度</td> |
| | | <td style="width: 20%;">高度</td> |
| | | <td style="width: 20%;">片数</td> |
| | | <td style="width: 20%;">面积(m²)</td> |
| | | </tr> |
| | | <tr style="width: 100%;"> |
| | | <td colspan="5" ><hr></td> |
| | | </tr> |
| | | </thead> |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;font-size: 12px"> |
| | | <td style="width: 20%;">编号</td> |
| | | <td style="width: 20%;">宽度</td> |
| | | <td style="width: 20%;">高度</td> |
| | | <td style="width: 20%;">片数</td> |
| | | <td style="width: 20%;">面积(m²)</td> |
| | | </tr> |
| | | <tr style="width: 100%;"> |
| | | <td colspan="5" ><hr></td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <template v-for="(row,index) in page" :key="row"> |
| | | <tr v-if="row.type==='product'" style="width: 100%;height: 100px" > |
| | | <td colspan="1" style="font-weight: bold;font-size: 13px">加工品种:</td> |
| | | <td colspan="4"> |
| | | <textarea style="resize: none;width: 100%;height: 100px;border: 0" class="textarea" type="textarea" v-model="row.productName" /></td> |
| | | </tr> |
| | | <tr v-else-if="row.type==='size'" style="width: 100%;height: 30px"> |
| | | <td style="font-size: 10px">{{ row.size.building_number }}</td> |
| | | <td style="font-weight: bold">{{ row.size.width }}</td> |
| | | <td style="font-weight: bold">{{ row.size.height }}</td> |
| | | <td style="font-weight: bold">{{ row.size.quantity }}</td> |
| | | <td>{{ row.size.area }}</td> |
| | | </tr> |
| | | |
| | | <tbody> |
| | | <template v-for="(itemDatile,index) in item.detailList" :key="index"> |
| | | <tr style="width: 100%;"> |
| | | <td colspan="1" style="font-weight: bold">加工品种:</td> |
| | | <td colspan="4"> |
| | | <textarea style="resize: none;width: 100%;height: 80px;border: 0" class="textarea" type="textarea" v-model="itemDatile.product_name"/></td> |
| | | <!-- <el-input |
| | | style="resize: none" |
| | | class="textarea" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | v-model="itemDatile.product_name"/></td>--> |
| | | </tr> |
| | | <template v-for="(item,index) in itemDatile.detailList" :key="index"> |
| | | <tr style="width: 100%;margin-top: 20px"> |
| | | <td style="font-size: 10px">{{ item.building_number }}</td> |
| | | <td style="font-weight: bold">{{ item.width }}</td> |
| | | <td style="font-weight: bold">{{ item.height }}</td> |
| | | <td style="font-weight: bold">{{ item.quantity }}</td> |
| | | <td>{{ item.area }}</td> |
| | | </tr> |
| | | </template> |
| | | </template> |
| | | <tr id="footsum" v-else style="border: 0;font-size: 10px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>本架数量</div> |
| | | <div>{{row.sum.quantity}}</div> |
| | | <div>面积</div> |
| | | <div>{{row.sum.area}}(m²)</div> |
| | | <div>重量</div> |
| | | <div>{{row.sum.weight}}(kg)</div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | |
| | | </template> |
| | | </tbody> |
| | | <tfoot id="sticky-footer"> |
| | | <tr style="border: 0;font-size: 8px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>地址:{{companyAddress.address}}</div> |
| | | <div>电话:{{companyAddress.phone}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>{{companyAddress.url}}</div> |
| | | <div>传真:{{companyAddress.fax}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>E-mail:{{companyAddress.email}}</div> |
| | | <div>邮编:{{companyAddress.postcode}}</div> |
| | | </div> |
| | | |
| | | <!-- <tr style="width: 100%;" v-for="(itemFlows,index) in item.detail" :key="index"> |
| | | <td>合计</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td>{{itemFlows.quantity}}</td> |
| | | <td>{{itemFlows.area}}</td> |
| | | </tr>--> |
| | | </tbody> |
| | | <tfoot > |
| | | <tr style="border: 0;font-size: 10px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>本架数量</div> |
| | | <div>{{item.detail[0].quantity}}</div> |
| | | <div>面积</div> |
| | | <div>{{item.detail[0].area}}(m²)</div> |
| | | <div>重量</div> |
| | | <div>{{item.detail[0].weight}}(kg)</div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | <tr style="border: 0;font-size: 8px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>地址:{{companyAddress.address}}</div> |
| | | <div>电话:{{companyAddress.phone}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>{{companyAddress.url}}</div> |
| | | <div>传真:{{companyAddress.fax}}</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>E-mail:{{companyAddress.email}}</div> |
| | | <div>邮编:{{companyAddress.postcode}}</div> |
| | | </div> |
| | | |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <div class="element-to-break-after" v-if="items.id===1" ></div> |
| | | <div class="element-to-breakr" v-if="items.id===2" ></div> |
| | | </template> |
| | | |
| | | |
| | | </template> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .contactNumber{ |
| | | width: 40%; |
| | | height:20px; |
| | | border: none; |
| | | box-shadow: none; |
| | | font-size: 15px; |
| | | } |
| | | .div_2{ |
| | | margin-left: 6%; |
| | | } |
| | | .element-to-break-after { |
| | | width: 8%; |
| | | } |
| | |
| | | |
| | | table{ |
| | | width: 100%; |
| | | page-break-after: always; |
| | | } |
| | | |
| | | @media print { |
| | |
| | | margin: 4mm 5mm 0mm 5mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | input { |
| | | display: inline; /* 或者根据需要使用其他合适的显示方式 */ |
| | | visibility: visible; |
| | | #footsum{ |
| | | position: fixed; |
| | | bottom: 2cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | } |
| | | |
| | | thead{ |
| | | #sticky-footer { |
| | | position: fixed; |
| | | bottom: 1cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | } |
| | | /* thead{ |
| | | display: table-header-group; |
| | | page-break-inside: avoid; |
| | | } |
| | |
| | | tfoot { |
| | | display: table-footer-group; |
| | | page-break-inside: avoid; |
| | | /* position: fixed; |
| | | width: 50%; |
| | | bottom: 0; |
| | | height: 100px;*/ |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | |
| | | .contactNumber{ |
| | | width: 40%; |
| | | height:20px; |
| | | border: none; |
| | | box-shadow: none; |
| | | font-size: 15px; |
| | | } |
| | | |
| | | |
| | | .textarea{ |
| | | --el-border-color: rgba(255,255,255,0.0); |
| | |
| | | <td>下料-宽</td> |
| | | <td>弧长</td> |
| | | <td>下料-高</td> |
| | | <td>拱高</td> |
| | | <td>成品拱高</td> |
| | | |
| | | <td colspan="7"></td> |
| | | </tr> |
| | |
| | | const decimal2 = new Decimal(num2===null?0:num2); |
| | | return decimal1.plus(decimal2).toString(); |
| | | } |
| | | function addAuto(num1, num2,scale) { |
| | | const decimal1 = new Decimal(num1===null?0:num1); |
| | | const decimal2 = new Decimal(num2===null?0:num2); |
| | | return decimal1.plus(decimal2).toFixed(2) |
| | | } |
| | | |
| | | // 封装减法函数 |
| | | function subtract(num1, num2) { |
| | |
| | | multiply, |
| | | divide, |
| | | multiplyAuto, |
| | | divideAuto |
| | | divideAuto, |
| | | addAuto |
| | | |
| | | } |
| | |
| | | {field: 'operationNumber', width: '100',title: t('order.OrderNum'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId', width: '150',title: t('processCard.processId'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity', width: '140',title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.price', width: '140',title: t('order.price'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId',width: '100', title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName',width: '140', title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.width', width: '100',title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 100 |
| | | filterMethod: filterChanged, width: 120 |
| | | , sortable: true |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | title: t('processCard.technologyNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 100 |
| | | filterMethod: filterChanged, width: 120 |
| | | , sortable: true |
| | | }, |
| | | { |
| | | field: 'width', |
| | |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | gridOptions.toolbarConfig.buttons[2].visible=false |
| | | /*gridOptions.toolbarConfig.buttons[2].visible=false |
| | | let roleId=res.data.user |
| | | if (roleId=='1' || roleId=='17'){ |
| | | gridOptions.toolbarConfig.buttons[2].visible=true |
| | | } |
| | | }*/ |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | |
| | | }, |
| | | mouseConfig:{selected: true}, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | menuConfig:{ |
| | | body:{ |
| | | options:[ |
| | | [ |
| | | { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { code: 'clearChecked', name: t('basicData.clearSelection'), prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false }, |
| | | { code: 'computedSize', name: t('basicData.computedSize'), prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false }, |
| | | { code: 'paste', name: t('basicData.paste'), prefixIcon: 'vxe-icon-paste', visible: true, disabled: false }, |
| | | { code: 'sort', name: t('craft.sort'), prefixIcon: 'vxe-icon-sort-asc', visible: true, disabled: false }, |
| | | ] |
| | | [ |
| | | { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { code: 'clearChecked', name: t('basicData.clearSelection'), prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false }, |
| | | { code: 'computedSize', name: t('basicData.computedSize'), prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false }, |
| | | { code: 'paste', name: t('basicData.paste'), prefixIcon: 'vxe-icon-paste', visible: true, disabled: false }, |
| | | { code: 'sort', name: t('craft.sort'), prefixIcon: 'vxe-icon-sort-asc', visible: true, disabled: false }, |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | |
| | | {'code': 'review', 'name': t('basicData.review'),status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | export: true, |
| | | export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | |
| | | inputPattern:/^(-?\d{1,4}(\.\d{1,2})?|-?0(\.\d{1,2})?)$/, |
| | | inputErrorMessage: '-9999.99~9999.99', |
| | | }) |
| | | .then(({ value }) => { |
| | | const value1 = value*1 |
| | | $grid.getTableData().visibleData.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | .then(({ value }) => { |
| | | const value1 = value*1 |
| | | $grid.getTableData().visibleData.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | |
| | | item[result.cell] = item[result.cell]*1+value1 |
| | | } |
| | | item[result.cell] = item[result.cell]*1+value1 |
| | | } |
| | | |
| | | }) |
| | | }) |
| | | }) |
| | | }) |
| | | |
| | | break |
| | | } |
| | |
| | | |
| | | for (let i=0; i<uniqueArray.length; i++) { |
| | | const sameOrderNumber = xGrid.value.getTableData().fullData.filter((item) => |
| | | parseInt(item.orderNumber) === i+1 |
| | | parseInt(item.orderNumber) === i+1 |
| | | ) |
| | | let widthList = [] |
| | | sameOrderNumber.forEach((item) => |
| | | let arcList = [] |
| | | sameOrderNumber.forEach((item) =>{ |
| | | widthList.push(item.childWidth) |
| | | ) |
| | | arcList.push(item.arc) |
| | | }) |
| | | widthList = widthList.sort(); |
| | | arcList = arcList.sort(); |
| | | sameOrderNumber.forEach((item,index) =>{ |
| | | item.childWidth = widthList[index] |
| | | item.arc = arcList[index] |
| | | }) |
| | | |
| | | } |
| | |
| | | trademarkAttr.value = { |
| | | trademark:"3C", |
| | | xImage:false, |
| | | yImage:false, |
| | | tag:true, |
| | | tag2:true , |
| | | tag3:true, |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:t('craft.lowLeft') |
| | | yImage:false, |
| | | tag:true, |
| | | tag2:true , |
| | | tag3:true, |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:t('craft.lowLeft') |
| | | } |
| | | if(row.icon!=null){ |
| | | trademarkAttr.value = JSON.parse(row.icon) |
| | |
| | | |
| | | List<Map<String, Object>> getDetailList(String orderId, String processId, String remarks); |
| | | |
| | | List<Map<String, Object>> getDetailLists(String orderId, String remarks, Integer productId); |
| | | List<Map<String, Object>> getDetailLists(String orderId, String remarks, Integer productId,String thickness); |
| | | |
| | | List<Map<String, Object>> getDetailList2(String orderId, String processId, String remarks); |
| | | } |
| | |
| | | for(Map<String, Object> details:detailList){ |
| | | Map<String, Object> detailsmap = new HashMap<>(); |
| | | detailsmap.put("product_name",details.get("product_name").toString()); |
| | | detailsmap.put("detailList",finishedOperateLogMapper.getDetailLists(finishedOperateLog.getOrderId(),finishedOperateLog.getRemarks(), Integer.valueOf(details.get("product_id").toString()))); |
| | | detailsmap.put("detailList",finishedOperateLogMapper |
| | | .getDetailLists( |
| | | finishedOperateLog.getOrderId(), |
| | | finishedOperateLog.getRemarks(), |
| | | Integer.valueOf(details.get("product_id").toString()), |
| | | details.get("thickness").toString() |
| | | )); |
| | | detailsmaplist.add(detailsmap); |
| | | |
| | | } |
| | |
| | | //主表插入 |
| | | reportingWorkMapper.insert(reportingWork); |
| | | //副表循环插入,并且插入次破信息表。再根据次破信息修改订单玻璃流程表的完工数量与刺破数量 |
| | | final Integer[] maxTechnologyNumber = {0,0}; |
| | | reportingWorkDetails.forEach(reportingWorkDetail -> { |
| | | //合片数量汇总减少 |
| | | if(Integer.parseInt(reportingWorkDetail.getTechnologyNumber()) > maxTechnologyNumber[0]){ |
| | | maxTechnologyNumber[0] = Integer.valueOf(reportingWorkDetail.getTechnologyNumber()); |
| | | maxTechnologyNumber[1]+=1; |
| | | } |
| | | reportingWork.setThisCompletedQuantity(reportingWork.getThisCompletedQuantity() + reportingWorkDetail.getCompletedQuantity()); |
| | | reportingWork.setThisWornQuantity(reportingWork.getThisWornQuantity() + reportingWorkDetail.getBreakageQuantity()); |
| | | int qualityInsStatus = (int) reportingWorkJson.get("qualityInsStatus"); |
| | |
| | | |
| | | |
| | | }); |
| | | //获取报工工序是否为复合工程 |
| | | |
| | | reportingWork.setThisCompletedQuantity(reportingWork.getThisCompletedQuantity()/maxTechnologyNumber[1]); |
| | | |
| | | |
| | | reportingWorkMapper.update(reportingWork, new LambdaUpdateWrapper<ReportingWork>() |
| | | .eq(ReportingWork::getId, reportingWork.getId())); |
| | | |
| | |
| | | Product product = productMapper.selectById(OrderDetails.get(i).getProductId()); |
| | | |
| | | OrderDetails.get(i).setWeight(Double.valueOf(String.format("%.2f",product.getThickness()*OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()/1000000*2.5))); |
| | | if(OrderDetails.get(i).getBendRadius()!=null && OrderDetails.get(i).getBendRadius()!=0){ |
| | | /*if(OrderDetails.get(i).getBendRadius()!=null && OrderDetails.get(i).getBendRadius()!=0){ |
| | | //获取弯钢弧度 |
| | | Double bendRadius = OrderDetails.get(i).getBendRadius(); |
| | | //获取宽 |
| | |
| | | String archRiseS = String.format("%.1f",bendRadius-(bendRadius*Math.cos(width/2/bendRadius))); |
| | | Double archRise = Double.parseDouble(archRiseS); |
| | | OrderDetails.get(i).setArchRise(archRise); |
| | | } |
| | | }*/ |
| | | |
| | | Map<String,Object> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Object>>(){}); |
| | | int finalI = i; |
| | |
| | | orderDetailMapper.insertBatch(OrderDetails); |
| | | //往小片表传入产品数据 |
| | | orderGlassDetailMapper.insertOrderGlassDetail(orderId); |
| | | |
| | | //修改成品拱高 |
| | | List<OrderDetail> orderDetails = orderDetailMapper |
| | | .selectList(new LambdaQueryWrapper<OrderDetail>() |
| | | .eq(OrderDetail::getOrderId, orderId) |
| | | .isNotNull(OrderDetail::getBendRadius) |
| | | ); |
| | | |
| | | orderDetails.forEach(orderDetail -> { |
| | | //获取最小弧度 |
| | | OrderGlassDetail orderGlassDetail = orderGlassDetailMapper |
| | | .selectOne(new LambdaQueryWrapper<OrderGlassDetail>() |
| | | .eq(OrderGlassDetail::getOrderId, orderId) |
| | | .eq(OrderGlassDetail::getOrderNumber, orderDetail.getOrderNumber()) |
| | | .orderByDesc(OrderGlassDetail::getArc) |
| | | .last("limit 1") |
| | | ); |
| | | //获取当前序号产品Math.cos( |
| | | Product product = productMapper.selectById(orderDetail.getProductId()); |
| | | //内半径 |
| | | Double radius = orderDetail.getBendRadius() - product.getTotalThickness(); |
| | | |
| | | //内片内弧长 |
| | | Double innerArc = orderGlassDetail.getArc() |
| | | -orderGlassDetail.getArc()*product.getTotalThickness()/orderDetail.getBendRadius(); |
| | | |
| | | //拱高 |
| | | String archRiseS = String.format("%.1f",radius-radius*Math.cos(innerArc/2/radius)); |
| | | Double archRise = Double.parseDouble(archRiseS); |
| | | orderDetail.setArchRise(archRise); |
| | | |
| | | orderDetailMapper.update(null,new LambdaUpdateWrapper<OrderDetail>() |
| | | .set(OrderDetail::getArchRise,archRise) |
| | | .eq(OrderDetail::getId, orderDetail.getId()) |
| | | ); |
| | | |
| | | }); |
| | | |
| | | |
| | | if(orderOtherMoneyList!=null){ |
| | | orderOtherMoneyList.forEach(orderOtherMoney ->{ |
| | | orderOtherMoney.setId(null); |
| | |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="price" property="orderDetail.price"/> |
| | | |
| | | <result column="project" property="order.project"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | |
| | | fol.area, |
| | | fol.money, |
| | | o.customer_name, |
| | | o.project |
| | | o.project, |
| | | od.price |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = #{type} and aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.price != null and finishedOperateLog.orderDetail.price != ''"> |
| | | and od.price regexp #{finishedOperateLog.orderDetail.price} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','') |
| | |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.price != null and finishedOperateLog.orderDetail.price != ''"> |
| | | and od.price regexp #{finishedOperateLog.orderDetail.price} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{finishedOperateLog.orderDetail.width},'\\.0+$','') |
| | |
| | | fol.quantity, |
| | | od.product_name, |
| | | od.product_id, |
| | | ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area |
| | | ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area, |
| | | ROUND( od.width * od.height * fol.quantity / 1000000, 2 )*#{thickness}*2.5 as weight |
| | | FROM |
| | | ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '入库' AND aa.STATUS != '已作废' ) fol |
| | | LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id |
| | |
| | | <select id="getDetailList2"> |
| | | SELECT |
| | | od.product_id, |
| | | od.product_name |
| | | od.product_name, |
| | | pro.thickness |
| | | FROM |
| | | ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '入库' AND aa.STATUS != '已作废' ) fol |
| | | LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id |
| | | AND fol.operation_number = od.order_number |
| | | left join sd.product as pro |
| | | on pro.id = od.product_id |
| | | LEFT JOIN sd.`order` o ON o.order_id = fol.order_id |
| | | WHERE |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR))), |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR))), |
| | | ' = ',fc.quantity ) as numberSize, |
| | | CONCAT( |
| | | od.order_number,')',' ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR)))) as numberSizeQuantity |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR)))) as numberSizeQuantity |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | |
| | | GROUP BY c.order_number,c.technology_number |
| | | </select> |
| | | <select id="selectReportingWorkMp" resultMap="reportingWorkMap"> |
| | | SELECT a.*, |
| | | round(ogd.child_width*ogd.child_height * a.this_completed_quantity/1000000,2) as completedArea, |
| | | round(ogd.child_width*ogd.child_height * a.this_worn_quantity/1000000,2) as wornArea |
| | | from (select rw.reporting_work_id, |
| | | select rw.reporting_work_id, |
| | | (rw.reporting_work_time) as reporting_work_time, |
| | | o.order_id, |
| | | CONCAT(rw.process_id,'/',GROUP_CONCAT(distinct rwd.technology_number SEPARATOR '')) as process_id, |
| | | CONCAT(rw.process_id,'/',rwd.goup) as process_id, |
| | | o.project, |
| | | o.batch, |
| | | rw.this_process, |
| | |
| | | rw.reviewed_state, |
| | | rw.notes, |
| | | rw.reviewed, |
| | | rwd.order_number, |
| | | rwd.technology_number |
| | | round(rwd.completedArea/LENGTH(rwd.goup),2) as completedArea, |
| | | rwd.wornArea |
| | | # (IF(rw.reviewed_state = 0, '未审核', IF(rw.reviewed_state = 1, '审核通过', '审核不通过'))) as reviewed_state |
| | | from |
| | | reporting_work as rw left join reporting_work_detail as rwd on rw.reporting_work_id=rwd.reporting_work_id |
| | | reporting_work as rw |
| | | left join ( |
| | | SELECT cc.reporting_work_id,cc.goup,round(sum(cc.completedArea),2) as completedArea ,round(sum(cc.wornArea),2) as wornArea from (SELECT rwds.reporting_work_id, GROUP_CONCAT(distinct rwds.technology_number SEPARATOR '') as goup, |
| | | sum(rwds.child_width*rwds.child_height*completed_quantity/1000000)as completedArea, |
| | | sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea from reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id)as rwd on rw.reporting_work_id=rwd.reporting_work_id |
| | | |
| | | left join sd.`order` as o on o.order_id=rw.order_id |
| | | where rw.reviewed_state != 2 |
| | |
| | | </if> |
| | | GROUP BY rw.reporting_work_id |
| | | ORDER BY rw.reporting_work_id desc |
| | | limit #{offset},#{pageSize} ) as a |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=a.order_id and ogd.order_number=a.order_number and ogd.technology_number=a.technology_number |
| | | GROUP BY a.reporting_work_id |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getPageTotal"> |
| | |
| | | |
| | | <select id="getFootSum"> |
| | | SELECT |
| | | SUM(rwd.completed_quantity) AS thisCompletedQuantity, |
| | | ROUND(SUM(rwd.child_width * rwd.child_height * rwd.completed_quantity / 1000000), 2) AS completedArea, |
| | | SUM(rwd.breakage_quantity) AS thisWornQuantity, |
| | | ROUND(SUM(rwd.child_width * rwd.child_height * rwd.breakage_quantity / 1000000), 2) AS wornArea, |
| | | SUM(rw.this_completed_quantity) AS thisCompletedQuantity, |
| | | ROUND(SUM(rwd.completedArea/length(goup)), 2) AS completedArea, |
| | | SUM(rw.this_worn_quantity) AS thisWornQuantity, |
| | | ROUND(SUM(rwd.wornArea), 2) AS wornArea, |
| | | CEILING(count(rw.reporting_work_id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct rw.reporting_work_id) as 'total' |
| | | FROM reporting_work AS rw |
| | | LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id |
| | | LEFT JOIN |
| | | (SELECT cc.reporting_work_id,cc.goup,round(sum(cc.completedArea),2) as completedArea ,round(sum(cc.wornArea),2) as wornArea from (SELECT rwds.reporting_work_id, GROUP_CONCAT(distinct rwds.technology_number SEPARATOR '') as goup, |
| | | sum(rwds.child_width*rwds.child_height*completed_quantity/1000000)as completedArea, |
| | | sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea from reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id) |
| | | AS rwd |
| | | ON rw.reporting_work_id = rwd.reporting_work_id |
| | | /*LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = rw.order_id |
| | | AND ogd.order_number = rwd.order_number |
| | | AND ogd.technology_number = rwd.technology_number*/ |