Merge remote-tracking branch 'origin/master'
| | |
| | | fields.map(item => [item.field, true]) // 转换成 [key, value] 数组 |
| | | ) |
| | | //<div style='width: 6.5cm;height:4.95cm;background-color: #5cadfe'> |
| | | let funct = "function(value,row,index,options){return ` <br>" |
| | | let funct = "function(value,row,index,options){return ` <div style='width: 6.5cm;height:4.95cm;background-color: #5cadfe'><br>" |
| | | json.panels[0].printElements[index].options.columns[0].forEach(item => { |
| | | if(item.field && !result[item.field ]){ |
| | | if (company.printShowTitle){ |
| | |
| | | funct += item.title+'<br>' |
| | | } |
| | | }) |
| | | funct+='<br>`}' |
| | | funct+='<br></div>`}' |
| | | //</div> |
| | | json.panels[0].printElements[index].options.columns[0][0].renderFormatter = funct |
| | | } |
| | |
| | | } |
| | | const getMoneySum = (page)=>{ |
| | | if(pageData.value[page] === undefined){ |
| | | return 0 |
| | | return '' |
| | | } |
| | | const val = pageData.value[page].reduce((accumulator, currentValue) => { |
| | | return addAuto(accumulator,currentValue.DeliveryDetail.money,2) |
| | | }, 0) |
| | | |
| | | return val===0?'':val |
| | | return val==0?'':val |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | <template> |
| | | <div > |
| | | <el-row id="footsum" :gutter="20" > |
| | | <el-col :span="19"></el-col> |
| | | <el-col :span="5" style="font-size: 17px" >{{delivery.creator}}</el-col> |
| | | </el-row> |
| | | <el-row id="footsum1" :gutter="20" > |
| | | <el-col :span="2" ></el-col> |
| | | <el-col :span="3" style="font-size: 17px">{{ delivery.contacts }}</el-col> |
| | | <el-col :span="7" style="font-size: 17px">{{ delivery.contactNumber }}</el-col> |
| | | <el-col :span="1" ></el-col> |
| | | <el-col :span="11" style="font-size: 17px">{{ delivery.deliveryAddress }}</el-col> |
| | | </el-row> |
| | | |
| | | <table class="content1" v-for="(page,pageIndex) in pageData" > |
| | | <div v-for="(page,pageIndex) in pageData" class="content1"> |
| | | <table> |
| | | <thead> |
| | | <tr style="height: 3.6cm"><td></td></tr> |
| | | |
| | |
| | | </el-col> |
| | | <el-col :span="6" style="font-size:19px;font-weight: bold"> {{deliveryId}} </el-col> |
| | | <el-col :span="3"></el-col> |
| | | <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bold">{{deliveryDate}}</el-col> |
| | | <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bold"> |
| | | <input v-model="deliveryDate" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:19px;font-weight: bold;white-space: nowrap; "/> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | |
| | | <td colspan="6"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="12" style="font-size: 16px;">{{delivery.customerName }}</el-col> |
| | | <el-col :span="12" style="font-size: 16px;"> |
| | | <input v-model="delivery.customerName" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:16px;white-space: nowrap; "/> |
| | | </el-col> |
| | | |
| | | <el-col :span="10" style="font-size: 16px;white-space: nowrap;"> {{delivery.project }}</el-col> |
| | | <el-col :span="10" style="font-size: 16px;white-space: nowrap;"> |
| | | <input v-model="delivery.project" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:16px;white-space: nowrap; "/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | |
| | | |
| | | <td |
| | | style="width: 80px" |
| | | v-if="props.type===1" |
| | | > |
| | | {{item.DeliveryDetail.price == '0' ? '' : item.DeliveryDetail.price}} |
| | | </td> |
| | | <td |
| | | <input |
| | | v-if="props.type===1" |
| | | > |
| | | {{item.DeliveryDetail.money == '0' ? '' : item.DeliveryDetail.money}} |
| | | </td> |
| | | </tr> |
| | | :value=" item.DeliveryDetail.price == '0' ? '' : item.DeliveryDetail.price" |
| | | style="font-size: 14px;border: 0;width: 100%"/> |
| | | |
| | | <tr id="table-sum"> |
| | | <td id="sum_td"></td> |
| | | <td ></td> |
| | | <td style="width: 65px" > |
| | | {{getQuantitySum(pageIndex)}} |
| | | </td> |
| | | <td style="width: 100px"> |
| | | <input style="border: 0;width: 100px;font-size: 17px" :value="getAreaSum(pageIndex)"> |
| | | </td> |
| | | <td style="width: 80px"></td> |
| | | <td v-if="props.type===1"> |
| | | {{getMoneySum(pageIndex)}} |
| | | <td> |
| | | <input |
| | | v-if="props.type===1" |
| | | :value=" item.DeliveryDetail.money == '0' ? '' : item.DeliveryDetail.money " |
| | | style="font-size: 14px;border: 0;width: 100%"/> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <table class="foot"> |
| | | <tr > |
| | | <td style="width: 5cm"></td> |
| | | <td style="width: 150px" ></td> |
| | | <td style="width: 65px" > |
| | | <input |
| | | :value=" getQuantitySum(pageIndex) " |
| | | style="font-size: 17px;border: 0;width: 100%"/> |
| | | </td> |
| | | <td style="width: 100px"> |
| | | <input style="border: 0;width: 100px;font-size: 17px" :value="getAreaSum(pageIndex)"> |
| | | |
| | | </td> |
| | | <td style="width: 80px"></td> |
| | | <td v-if="props.type===1"> |
| | | <input |
| | | :value="getMoneySum(pageIndex)" |
| | | style="font-size: 17px;border: 0;width: 100%"/> |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 0.65cm"><td></td></tr> |
| | | <tr> |
| | | <td colspan="6"> |
| | | <el-row id="footsum" :gutter="20" > |
| | | <el-col :span="19"></el-col> |
| | | <el-col :span="5" style="font-size: 17px" > |
| | | <input v-model="delivery.creator" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px"/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | <tr><td style="height: 1.6cm"></td></tr> |
| | | <tr> |
| | | <td colspan="6"> |
| | | <el-row id="footsum1" :gutter="20" > |
| | | <el-col :span="2" ></el-col> |
| | | <el-col :span="3" style="font-size: 17px"> |
| | | <input v-model="delivery.contacts" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px"/> |
| | | </el-col> |
| | | <el-col :span="7" style="font-size: 17px"> |
| | | <input v-model="delivery.contactNumber" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px"/> |
| | | </el-col> |
| | | <el-col :span="1" ></el-col> |
| | | <el-col :span="11" style="font-size: 17px"> |
| | | <input v-model="delivery.deliveryAddress " |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px"/> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | } |
| | | .content1{ |
| | | page-break-after: always; |
| | | |
| | | height: 26.5cm; |
| | | position: relative; |
| | | } |
| | | span{ |
| | | width: 7cm; |
| | |
| | | } |
| | | |
| | | @media print { |
| | | #footsum{ |
| | | position: fixed; |
| | | bottom: 3.4cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | font-size: 17px; |
| | | } |
| | | #footsum1{ |
| | | position: fixed; |
| | | bottom: 1cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | } |
| | | #table-sum { |
| | | position: absolute; /* 或者使用 relative,根据具体需求 */ |
| | | bottom: 5cm; |
| | | } |
| | | #sum_td{ |
| | | width: 9cm; |
| | | .foot{ |
| | | position: absolute; |
| | | bottom: 0.95cm; |
| | | } |
| | | |
| | | } |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import {computed, onMounted, onUpdated, ref} from "vue" |
| | | import PrintFoot from "@/components/sd/order/PrintFoot.vue" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import deepClone from "@/utils/deepClone"; |
| | |
| | | result.push(items) |
| | | }) |
| | | }) |
| | | console.log(result) |
| | | let index=0 |
| | | let number=0 |
| | | let numberResult = []; |
| | |
| | | |
| | | |
| | | } |
| | | console.log(results) |
| | | |
| | | /*for (let i = 0; i < result.length; i += 8) { |
| | | results.push(result.slice(i, i + 8)); |
| | |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | | getData() |
| | | }) |
| | | const pageHeightList = ref([]) |
| | | /*onUpdated(() => { |
| | | const tables = document.getElementsByClassName('content1') |
| | | for(let i=0;i<tables.length;i++){ |
| | | console.log(tables[i].querySelector('tbody')) |
| | | let tableHeight = tables[i].querySelector('tbody').offsetHeight |
| | | console.log(i+":"+tableHeight) |
| | | console.log("---------") |
| | | if(pageHeightList.value[i] === undefined && i==0){ |
| | | pageHeightList.value[i] = 900-tableHeight |
| | | } |
| | | |
| | | } |
| | | // console.log(pageHeightList.value) |
| | | // console.log("++++++++++") |
| | | })*/ |
| | | |
| | | const printSheet = () => { |
| | | } |
| | |
| | | |
| | | <template> |
| | | <div> |
| | | <el-row id="footsum" :gutter="20"> |
| | | <el-col :span="20"></el-col> |
| | | <el-col :span="4" style="font-size: 17px">{{ delivery.creator }}</el-col> |
| | | </el-row> |
| | | <el-row id="footsum1" :gutter="20"> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="3" style="font-size: 17px">{{ delivery.contacts }}</el-col> |
| | | <el-col :span="7" style="font-size: 17px">{{ delivery.contactNumber }}</el-col> |
| | | <el-col :span="1"></el-col> |
| | | <el-col :span="11" style="font-size: 17px">{{ delivery.deliveryAddress }}</el-col> |
| | | </el-row> |
| | | |
| | | <table class="content1" v-for="(page,pageIndex) in pageData"> |
| | | <div v-for="(page,pageIndex) in pageData" class="content1"> |
| | | <table> |
| | | <thead> |
| | | <tr style="height: 3.6cm"> |
| | | <td></td> |
| | |
| | | <td colspan="6"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="9"> |
| | | <el-col :span="8"> |
| | | <input v-model="companyName" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:19px;font-weight: bold "/> |
| | | </el-col> |
| | | <el-col :span="5" style="font-size:19px;font-weight: bold"> {{ deliveryId }}</el-col> |
| | | <el-col :span="6"></el-col> |
| | | <el-col :span="2" style="white-space: nowrap;font-size:19px;font-weight: bold">{{ deliveryDate }}</el-col> |
| | | <el-col :span="6" style="font-size:19px;font-weight: bold"> {{ deliveryId }}</el-col> |
| | | <el-col :span="3"></el-col> |
| | | <el-col :span="5" style="white-space: nowrap;font-size:19px;font-weight: bold"> |
| | | <input v-model="deliveryDate" |
| | | style="border: 0;width: 150%; |
| | | height: 100%;font-size:19px;font-weight: bold;white-space: nowrap; "/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | |
| | | <td colspan="6"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="17" style="font-size: 16px;">{{ delivery.customerName }}</el-col> |
| | | <el-col :span="17" style="font-size: 16px;"> |
| | | <input v-model="delivery.customerName" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:16px;white-space: nowrap; "/> |
| | | </el-col> |
| | | |
| | | <el-col :span="5" style="font-size: 16px;white-space: nowrap;"> {{ delivery.project }}</el-col> |
| | | <el-col :span="5" style="font-size: 16px;white-space: nowrap;"> |
| | | <input v-model="delivery.project" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:16px;white-space: nowrap; "/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr style="height: 1cm"> |
| | | <tr style="height: 1.7cm"> |
| | | <td></td> |
| | | </tr> |
| | | |
| | |
| | | <tbody> |
| | | <template v-for="(items,index1) in page"> |
| | | <tr> |
| | | |
| | | <td style="width: 4cm" :rowspan="items.rowspan" v-if="items.rowspan!==undefined"> |
| | | <td style="width: 3.3cm" :rowspan="items.rowspan" v-if="items.rowspan!==undefined"> |
| | | <el-input class="textarea" type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 20 }" |
| | | v-model="items.product_name"/> |
| | | </td> |
| | | <td style="width: 0.8cm"></td> |
| | | <td style="width: 1.5cm"> |
| | | <el-input class="textarea ccc" type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 20 }" |
| | | v-model="items.building_number"/> |
| | | </td> |
| | | |
| | | <td style="width: 2cm"> |
| | | <el-input class="textarea" type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 20 }" |
| | | <input style="font-size: 14px;border: 0;width: 100%" |
| | | v-model="items.width"/> |
| | | |
| | | </td> |
| | | <td style="width: 2cm"> |
| | | <el-input class="textarea" type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 20 }" |
| | | <input style="font-size: 14px;border: 0;width: 100%" |
| | | v-model="items.height"/> |
| | | |
| | | </td> |
| | |
| | | </td> |
| | | |
| | | <td |
| | | v-if="props.type===1||props.type===3" |
| | | style="width: 80px" |
| | | > |
| | | {{ items.price == '0' ? '' : items.price }} |
| | | <input |
| | | v-if="props.type===3" |
| | | :value=" items.price == '0' ? '' : items.price" |
| | | style="font-size: 14px;border: 0;width: 100%"/> |
| | | </td> |
| | | <td |
| | | v-if="props.type===1||props.type===3" |
| | | > |
| | | {{ items.money == '0' ? '' : items.money }} |
| | | <td> |
| | | <input |
| | | v-if="props.type===3" |
| | | :value="items.money == '0' ? '' : items.money" |
| | | style="font-size: 14px;border: 0;width: 100%"/> |
| | | </td> |
| | | |
| | | </tr> |
| | | </template> |
| | | </tbody> |
| | | </table> |
| | | <table class="foot"> |
| | | <tr id="table-sum"> |
| | | <td id="sum_td"></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td style="width: 3.3cm"></td> |
| | | <td style="width: 1.5cm"></td> |
| | | <td style="width: 2cm"></td> |
| | | <td style="width: 2cm"></td> |
| | | <td style="width: 60px"> |
| | | {{ getQuantitySum(pageIndex) }} |
| | | <input |
| | | :value=" getQuantitySum(pageIndex) " |
| | | style="font-size: 17px;border: 0;width: 100%"/> |
| | | </td> |
| | | <td style="width: 100px"> |
| | | <input style="border: 0;width: 100px" :value="getAreaSum(pageIndex)"> |
| | | <input style="border: 0;width: 100px;font-size: 17px;" :value="getAreaSum(pageIndex)"> |
| | | </td> |
| | | <td style="width: 80px"></td> |
| | | <td v-if="props.type===1||props.type===3"> |
| | | {{ getMoneySum(pageIndex) == '0.00' ? '' : getMoneySum(pageIndex) }} |
| | | <td > |
| | | <input |
| | | v-if="props.type===3" |
| | | :value="getMoneySum(pageIndex) == '0.00' ? '' : getMoneySum(pageIndex)" |
| | | style="font-size: 17px;border: 0;width: 100%"/> |
| | | </td> |
| | | |
| | | </tr> |
| | | |
| | | </tbody> |
| | | <tr style="height: 0.65cm"><td></td></tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <el-row id="footsum" :gutter="40"> |
| | | <el-col :span="19"></el-col> |
| | | <el-col :span="5" style="font-size: 17px"> |
| | | <input v-model="delivery.creator " |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px;white-space: nowrap;"/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | <tr><td style="height: 1.6cm"></td></tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <el-row id="footsum1" :gutter="20"> |
| | | <el-col :span="2"></el-col> |
| | | <el-col :span="3" style="font-size: 17px"> |
| | | <input v-model="delivery.contacts " |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px;white-space: nowrap;"/> |
| | | </el-col> |
| | | <el-col :span="7" style="font-size: 17px"> |
| | | <input v-model="delivery.contactNumber" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px;white-space: nowrap;"/> |
| | | </el-col> |
| | | <el-col :span="1"></el-col> |
| | | <el-col :span="11" style="font-size: 17px"> |
| | | <input v-model="delivery.deliveryAddress" |
| | | style="border: 0;width: 100%; |
| | | height: 100%;font-size:17px;white-space: nowrap;"/> |
| | | </el-col> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | |
| | | .content1 { |
| | | page-break-after: always; |
| | | |
| | | height: 26.5cm; |
| | | position: relative; |
| | | } |
| | | |
| | | span { |
| | |
| | | } |
| | | |
| | | @media print { |
| | | #footsum { |
| | | |
| | | /*#footsum{ |
| | | position: fixed; |
| | | bottom: 3.5cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | width: 100%; !* 或者设置成具体的宽度 *! |
| | | font-size: 17px; |
| | | } |
| | | |
| | | #footsum1 { |
| | | position: fixed; |
| | | bottom: 1cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | width: 100%; !* 或者设置成具体的宽度 *! |
| | | }*/ |
| | | .foot{ |
| | | position: absolute; |
| | | bottom: 1cm; |
| | | //transform: translateY(8cm); |
| | | } |
| | | #table-sum { |
| | | position: absolute; /* 或者使用 relative,根据具体需求 */ |
| | | /*#table-sum { |
| | | position: absolute; |
| | | bottom: 5cm; |
| | | } |
| | | #sum_td{ |
| | | width: 9cm; |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | |
| | | .textarea { |
| | |
| | | font-size: 17px; |
| | | } |
| | | |
| | | :deep(.ccc .el-textarea__inner) { |
| | | font-size: 11px; |
| | | } |
| | | </style> |
| | |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | //scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| New file |
| | |
| | | <script setup> |
| | | import {computed, onMounted, reactive, ref, watch} from "vue"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus" |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading:false, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | showOverflow:true, |
| | | showFooter: true,//显示脚 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | virtualScroll: true, // 开启虚拟滚动功能 |
| | | id: 'order_process_collect', |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | |
| | | |
| | | columns:[ |
| | | |
| | | ], |
| | | mergeCells:[], |
| | | toolbarConfig: { |
| | | zoom: true, |
| | | /*custom: true*/ |
| | | }, |
| | | cellClassName ({ row, column,columnIndex}) { |
| | | if (columnIndex>10 && row.thisQuantity*1 === row.reportWorkQuantity[column.title]*1){ |
| | | return 'row-green' |
| | | } |
| | | return null |
| | | }, |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (list.value.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | const list = ref([]) |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | const columns = [ |
| | | {field: 'order_number',fixed:"left", width: 90,title: t('order.OrderNum'),showOverflow:"ellipsis"}, |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'product_name', width: 150, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'glass_child',width: 130, title: t('reportingWorks.glassChild') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order_type', width: 120,title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'process_id',width: 110, title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'technology_number', width: 90,title: t('processCard.technologyNumber'),showOverflow:"ellipsis"}, |
| | | {field: 'child_width', width: 90,title: t('order.width'),showOverflow:"ellipsis"}, |
| | | {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis"}, |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')}, |
| | | {field: 'gross_area', width: 90,title: t('order.area')}, |
| | | {field: 'shippedQuantity',width: 120, title: t('delivery.deliveryQuantity')}, |
| | | {field: 'inventory',width: 120, title: t('productStock.inventoryQuantity')}, |
| | | {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | | ] |
| | | let column = [0,1,3,6,7,8,10,11,12,13] |
| | | |
| | | |
| | | onMounted(()=>{ |
| | | getWorkOrder() |
| | | }) |
| | | |
| | | watch(()=>props.orderId,(newValue)=>{ |
| | | getWorkOrder() |
| | | }) |
| | | |
| | | |
| | | let mergeCells = ref() |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | request.post(`/report/processCardProgressCollect/${props.orderId}`,column).then(async (res) => { |
| | | if (res.code == 200) { |
| | | gridOptions.columns = JSON.parse(JSON.stringify(columns)) |
| | | gridOptions.columns.forEach(item =>{ |
| | | item.filterMethod = filterChanged |
| | | }) |
| | | list.value = ['quantity','inventory','inventoryArea','gross_area','shippedQuantity','glassQuantity'] |
| | | res.data.title.forEach((item,index) =>{ |
| | | list.value.push('reportWorkQuantity.'+item.process) |
| | | let column = {slots: { default: 'quantitySum'}, |
| | | width: 90, |
| | | title: item.process, |
| | | field:'reportWorkQuantity.'+item.process} |
| | | gridOptions.columns.push(column) |
| | | }) |
| | | res.data.data.forEach(item => { |
| | | item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity) |
| | | item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount) |
| | | item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow) |
| | | }) |
| | | |
| | | await xGrid.value.loadData(res.data.data) |
| | | await xGrid.value.setMergeCells(res.data.mergeCells) |
| | | mergeCells.value = res.data.mergeCells |
| | | gridOptions.loading = false |
| | | |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const filterChange = () =>{ |
| | | if(xGrid.value.isFilter()){ |
| | | xGrid.value.clearMergeCells() |
| | | xGrid.value.clearMergeFooterItems() |
| | | }else{ |
| | | xGrid.value.setMergeCells(mergeCells.value) |
| | | xGrid.value.updateFooter() |
| | | } |
| | | |
| | | |
| | | } |
| | | const footSum =(list, field) => { |
| | | if(xGrid.value.isFilter()){ |
| | | return |
| | | } |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | if(field.indexOf('.')>-1){ |
| | | let array = field.split('.') |
| | | count += Number(item[array[0]][array[1]]) || 0 |
| | | }else { |
| | | count += Number(item[field]) || 0 |
| | | } |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const quantitySum = ( row,column )=>{ |
| | | const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || '' |
| | | const reportWorkQuantityShow = row.reportWorkQuantityShow[column.title] || '' |
| | | if(reportWorkQuantityShow===reportWorkQuantityCount){ |
| | | return reportWorkQuantityShow |
| | | } |
| | | |
| | | return (reportWorkQuantityShow |
| | | +'(' |
| | | +reportWorkQuantityCount |
| | | +')' ) |
| | | //return |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <vxe-grid |
| | | @filter-change ='filterChange' |
| | | height="100%" |
| | | size="mini" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #quantitySum="{ row,column }"> |
| | | <span>{{ quantitySum(row,column) }} </span> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | ::v-deep(.vxe-grid .vxe-body--column.row-green) { |
| | | background-color: #D5EAFF; |
| | | } |
| | | |
| | | </style> |
| | |
| | | editRules: { |
| | | completedQuantity: [ |
| | | { |
| | | validator ({ row }) { |
| | | validator ({ row ,cellValue }) { |
| | | const regex = /^[0-9]\d*$/ |
| | | const brokenNum = |
| | | (row.breakageQuantity === undefined || row.breakageQuantity===null) ? 0 : row.breakageQuantity |
| | |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error(t('reportingWorks.pleaseNumber10')) |
| | | } |
| | | const completedSum = Number(row.thisQuantitySum) //总完工数量 |
| | | const nextQuantitySum = Number(row.nextQuantitySum) //总下工序完工数量 |
| | | const totalQuantity = Number(row.quantity) //可完工数量 |
| | | const val = Number(cellValue) //输入值 |
| | | |
| | | const completedNum = |
| | | (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity |
| | | if(titleUploadData.value.reportingWorkId!=null && completedNum>row.minQuantity){ |
| | | const okVal = completedSum - totalQuantity + completedNum |
| | | if(val==0 && row.minQuantity==0){ |
| | | return new Error(t('reportingWorks.pleaseNumber11')) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && nextQuantitySum>okVal |
| | | && val>totalQuantity && completedNum>totalQuantity && val>row.minQuantity && val>row.minQuantity){ |
| | | return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')} |
| | | ${row.minQuantity} |
| | | ${t('reportingWorks.pleaseGreaterThanOrEqual2')}`) |
| | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | onMounted(() => { |
| | | let id = route.query.orderId |
| | | onMounted(() => { |
| | | |
| | | request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => { |
| | | |
| | |
| | | {field: 'productName', title: t('order.product'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, }, |
| | | {field: 'quantity', title: t('order.quantity'), }, |
| | | {field: 'computeGrossArea', title: t('order.area'), }, |
| | | {field: 'perimeter', title: t('workOrder.perimeter'), showOverflow: "ellipsis"} |
| | | {field: 'perimeter', title: t('workOrder.perimeter'), showOverflow: "ellipsis"}, |
| | | {field: 'orderGlassDetail.process', title: t('craft.process'), }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | newOrderId.value=titleUploadData.value.orderId |
| | | if(history.state.orderId!=null){ |
| | | titleUploadData.value.orderId='' |
| | | titleUploadData.value.id=null |
| | | titleUploadData.value.processReview=null |
| | | titleUploadData.value.orderReview=null |
| | | titleUploadData.value.productionOrder=null |
| | | titleUploadData.value.processingCard=null |
| | | titleUploadData.value.warehousing=null |
| | | titleUploadData.value.delivery=null |
| | | titleUploadData.value.createTime=null |
| | | titleUploadData.value['id']=null |
| | | titleUploadData.value['processReview']=null |
| | | titleUploadData.value['orderReview']=null |
| | | titleUploadData.value['productionOrder']=null |
| | | titleUploadData.value['processingCard']=null |
| | | titleUploadData.value['warehousing']=null |
| | | titleUploadData.value['delivery']=null |
| | | titleUploadData.value['createTime']=null |
| | | titleUploadData.value['verifierId'] = null |
| | | titleUploadData.value['verifier'] = null |
| | | |
| | | const orderDetails = res.data.orderDetails |
| | | orderDetails.forEach(item => { |
| | |
| | | public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns) { |
| | | return Result.seccess(reportService.processCardProgressSv(orderId, columns)); |
| | | } |
| | | @ApiOperation("流程卡进度汇总") |
| | | @SaCheckPermission("selectOrder.search") |
| | | @PostMapping("/processCardProgressCollect/{orderId}") |
| | | public Result processCardProgressCollect(@PathVariable String orderId, @RequestBody List<Integer> columns) { |
| | | return Result.seccess(reportService.processCardProgressCollectSv(orderId, columns)); |
| | | } |
| | | |
| | | @ApiOperation("跨工序次破") |
| | | @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}") |
| | |
| | | @ApiOperation("删除报工接口") |
| | | @SaCheckPermission("selectReportingWorks.delete") |
| | | @PostMapping("/deleteWork/{reportingWorkId}/{processId}/{thisProcess}/{userId}/{userName}") |
| | | public Result deleteWork(@PathVariable String reportingWorkId,@PathVariable String processId, |
| | | @PathVariable String thisProcess,@PathVariable String userId |
| | | public Result deleteWork(@PathVariable String reportingWorkId, |
| | | @PathVariable String processId, |
| | | @PathVariable String thisProcess, |
| | | @PathVariable String userId |
| | | ,@PathVariable String userName){ |
| | | |
| | | return Result.seccess(reportingWorkService.deleteWorkSv(reportingWorkId,processId,thisProcess,userId,userName)); |
| | |
| | | @TableField(select = false,exist= false) |
| | | private Order order; |
| | | @TableField(select = false,exist= false) |
| | | private OrderGlassDetail orderGlassDetail; |
| | | @TableField(select = false,exist= false) |
| | | private Delivery delivery; |
| | | @TableField(select = false,exist= false) |
| | | private DeliveryDetail deliveryDetail; |
| | |
| | | |
| | | List<WorkInProgressCombinationDTO> exportWorkInProgressCombination(String process, String laminating, String inputVal); |
| | | |
| | | List<Map<String, String>> processCardProgressCollectMp(String orderId); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | |
| | | @Param("orderId") String orderId, |
| | | @Param("productId") Integer productId, |
| | | @Param("productName") String productName, |
| | | String userName); |
| | | String userName,String process); |
| | | //查询对应订单号订序 |
| | | Integer selectOrderNumber(String productIdVl); |
| | | |
| | |
| | | Integer selectYesWorkCount(String orderId); |
| | | |
| | | Integer selectProcessCard(String orderId); |
| | | |
| | | Boolean updateWorkIdMp(String orderId, String userName); |
| | | } |
| | |
| | | |
| | | return resultList; |
| | | } |
| | | |
| | | public Object processCardProgressCollectSv(String orderId, List<Integer> columns) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //获取表格内容数据 |
| | | List<Map<String, String>> dataList = reportMapper.processCardProgressCollectMp(orderId); |
| | | return null; |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | //添加生产订单 |
| | | workOrderMapper.addOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName); |
| | | workOrderMapper.addOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(), userName,orderDetail.getOrderGlassDetail().getProcess()); |
| | | //避免同序号不同工艺修改 |
| | | workOrderMapper.updateWorkIdMp(orderDetail.getOrderId(),userName); |
| | | Integer state = 2; |
| | | Integer states = 1; |
| | | //查询该订单未转生产订单的条数 |
| | |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | |
| | | <select id="processCardProgressCollectMp"> |
| | | select * from (select b.product_name, |
| | | c.detail as 'glassName', |
| | | concat(a.process_id,'/',a.technology_number) as processID, |
| | | a.process_id, |
| | | a.quantity, |
| | | a.received_quantity, |
| | | round(sum(a.received_quantity*b.area),2) as received_area, |
| | | |
| | | a.technology_number |
| | | from pp.flow_card as a |
| | | left join sd.order_detail as b |
| | | on a.order_id = b.order_id and a.order_number = b.order_number |
| | | left join sd.product_detail as c |
| | | on c.prod_id = b.product_id and c.glass_sort = a.technology_number |
| | | where a.order_id = #{orderId} group by processID |
| | | ) as a |
| | | left join (SELECT process_id, |
| | | technology_number, |
| | | sum(broken_num) as broken_num, |
| | | concat('{',GROUP_CONCAT(reporting_work_nums),'}') as reporting_work_num |
| | | from (select |
| | | opd.process_id, |
| | | opd.technology_number, |
| | | concat("\"", process, "\":\"", SUM(reporting_work_num), "\"") as reporting_work_nums, |
| | | sum(broken_num) as broken_num |
| | | from sd.order_process_detail as opd |
| | | where opd.order_id = #{orderId} |
| | | group by opd.process_id,opd.technology_number,opd.process) as bb |
| | | GROUP BY bb.process_id,bb.technology_number) as b |
| | | on a.process_id = b.process_id and a.technology_number = b.technology_number |
| | | order by a.process_id |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="addWordOrderMap" type="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="process" property="orderGlassDetail.process"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | | o.order_id, |
| | |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <select id="addWordOrder"> |
| | | <select id="addWordOrder" resultMap="addWordOrderMap"> |
| | | select od.order_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | sum( od.quantity) as quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter |
| | | od.perimeter, |
| | | ogd.process |
| | | from sd.order_detail as od |
| | | left join sd.order as o |
| | | on od.order_id =o.order_id |
| | | left join ( |
| | | select order_id,order_number,process from |
| | | sd.order_glass_detail where FIND_IN_SET(order_id,#{orderId}) GROUP BY order_id,order_number |
| | | ) as ogd on ogd.order_id = o.order_id and ogd.order_number=od.order_number |
| | | where FIND_IN_SET(od.order_id,#{orderId}) and o.production_order!=2 |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | group by od.order_id, od.product_id, od.product_name |
| | | group by od.order_id, od.product_id, od.product_name,ogd.process |
| | | ; |
| | | </select> |
| | | |
| | |
| | | where od.order_id = #{orderId} |
| | | and od.product_id = #{productId} |
| | | and od.product_name = #{productName} |
| | | and ogd.process = #{process} |
| | | </update> |
| | | |
| | | <!-- 删除工单--> |
| | |
| | | <select id="selectProcessCard"> |
| | | select processing_card from sd.`order` where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="updateWorkIdMp"> |
| | | UPDATE sd.order_glass_detail AS ogd |
| | | JOIN ( |
| | | SELECT order_id, order_number, MAX(production_id) AS production_id |
| | | FROM sd.order_glass_detail |
| | | WHERE production_id IS NOT NULL |
| | | AND FIND_IN_SET(order_id, #{orderId}) |
| | | GROUP BY order_id, order_number |
| | | ) AS t |
| | | ON ogd.order_id = t.order_id AND ogd.order_number = t.order_number |
| | | SET ogd.production_id = t.production_id, |
| | | ogd.production_time = NOW(), |
| | | ogd.founder = #{userName} |
| | | WHERE ogd.production_id IS NULL |
| | | AND FIND_IN_SET(ogd.order_id, #{orderId}) |
| | | |
| | | </update> |
| | | </mapper> |
| | |
| | | |
| | | <select id="getSelectDeliveryPrintingMoneySpecifications" > |
| | | select od.order_id, |
| | | od.building_number, |
| | | od.width, |
| | | od.height, |
| | | od.product_name, |
| | |
| | | |
| | | <select id="getSelectDeliveryPrintingNoMoneySpecifications" > |
| | | select od.order_id, |
| | | od.building_number, |
| | | od.width, |
| | | od.height, |
| | | od.product_name, |