Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | } |
| | | |
| | | table{ |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | } |
| | | tr,td,th{ |
| | | border: 1px solid black; |
| | | } |
| | | |
| | | th,.no-change-row { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | @media print { |
| | | @page { |
| New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from 'vue-i18n' |
| | | import deepClone from "@/utils/deepClone"; |
| | | import QRCode from "qrcode"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | import userInfo from "@/stores/userInfo" |
| | | //语言获取 |
| | | const company = companyInfo() |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let produceList = ref([]) |
| | | let count = ref([{id:1},{id:2}]) |
| | | let list = ref() |
| | | const details = ref([]) |
| | | const user=userInfo() |
| | | const name1=ref("admin") |
| | | const name2=ref("admin") |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | | printList: null, |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | |
| | | data.value.printList = JSON.parse(props.printList) |
| | | |
| | | onMounted(() => { |
| | | selectPrint() |
| | | } |
| | | ) |
| | | |
| | | |
| | | onUpdated(() => { |
| | | const element = document.getElementById('my-paragraph'); |
| | | if (element) { |
| | | console.log(element.style.height) |
| | | } |
| | | }); |
| | | |
| | | const selectPrint = () => { |
| | | request.post(`/finishedGoodsInventory/getSelectPrints`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | produceList.value = deepClone(res.data.data) |
| | | } 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: 18px;font-weight: bold;line-height: 15px;">洛阳北方玻璃技术股份有限公司<br> |
| | | <span style="font-size: 8px;"> LUOYANGNORTHGLASSTECHNOLOGYCO.,LTD.</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="5" style="text-align: center;"> |
| | | <div>(装箱单)</div> |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;" 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%;" 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" type="text" v-model="name1" /></div> |
| | | <div style="width: 50%"><span style="font-weight: bold">成品发货</span>:<input class="contactNumber" type="text" v-model="name2" /></div> |
| | | </div> |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | <tr style="width: 100%;"> |
| | | <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="(itemDatile,index) in item.detailList" :key="index"> |
| | | <tr style="width: 100%;"> |
| | | <td colspan="1" style="font-weight: bold">加工品种:</td> |
| | | <td colspan="4"><el-input 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 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>电话:0379-64312861.64331830</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>http://www.northglass.com</div> |
| | | <div>传真:0379-64332066</div> |
| | | </div> |
| | | <div style="display:flex;"> |
| | | <div>E-mail:luoyang@northglass.com</div> |
| | | <div>邮编:471003</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> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .element-to-break-after { |
| | | width: 8%; |
| | | } |
| | | .element-to-breakr{ |
| | | page-break-after: always; |
| | | } |
| | | #contentTable{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #record{ |
| | | font-size: 15px; |
| | | text-align: left; |
| | | display: flex; |
| | | flex-wrap: wrap |
| | | } |
| | | |
| | | table{ |
| | | width: 100%; |
| | | } |
| | | |
| | | @media print { |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 4mm 5mm 0mm 5mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | | thead{ |
| | | display: table-header-group; |
| | | } |
| | | table { |
| | | page-break-inside: auto; |
| | | } |
| | | tr { |
| | | page-break-inside: avoid; |
| | | } |
| | | |
| | | |
| | | tfoot { |
| | | display: table-footer-group; |
| | | /* position: fixed; |
| | | width: 50%; |
| | | bottom: 0; |
| | | height: 100px;*/ |
| | | } |
| | | |
| | | } |
| | | |
| | | .contactNumber{ |
| | | width: 40%; |
| | | height:20px; |
| | | border: none; |
| | | box-shadow: none; |
| | | font-size: 15px; |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | } |
| | | }, |
| | | { |
| | | tid: 'sumQuantity', title: '订单总数', data: '', type: 'text', |
| | | options: { |
| | | field: 'sumQuantity', |
| | | testData: '', |
| | | width:100, |
| | | height: 16, |
| | | fontSize: 11.25, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'custom1', title: '自定义1', data: '', type: 'text', |
| | | options: { |
| | | title: '自定义1', |
| | |
| | | import footSum from "@/hook/footSum"; |
| | | import {VXETable} from "vxe-table"; |
| | | import PrintPackingList from "@/components/mm/PrintPackingList.vue"; |
| | | import PrintPackingListLuoyang from "@/components/mm/PrintPackingListLuoyang.vue"; |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import print from "vue3-print-nb"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const company = companyInfo() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisible1 = ref(false) |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | const $table = xGrid.value |
| | | //gridOptions.columns.unshift(a) |
| | | if ($table) { |
| | | |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | if (selectRecords.length <= 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | dialogTableVisible.value = true |
| | | if(company.companyName==="洛阳北方玻璃技术股份有限公司"){ |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | dialogTableVisible1.value = true |
| | | }else{ |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | dialogTableVisible.value = true |
| | | } |
| | | |
| | | } |
| | | return; |
| | | |
| | |
| | | :printList="printRow.list" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | <el-dialog |
| | | id="sizePrintCalrd1" |
| | | v-model="dialogTableVisible1" |
| | | title="装箱单打印" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printRecord" :icon="Printer" circle/> |
| | | </template> |
| | | <print-packing-list-luoyang |
| | | id="record" |
| | | :printList="printRow.list" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | display: flex; |
| | | flex-wrap: wrap |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd1 .el-dialog__body) { |
| | | height: 90%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | display: flex; |
| | | flex-wrap: wrap |
| | | } |
| | | </style> |
| | |
| | | public Result getSelectPrint( @RequestBody Map<String, Object> object){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectPrintSv(object)); |
| | | } |
| | | |
| | | /*装箱打印查询*/ |
| | | @ApiOperation("装箱打印内容查询接口") |
| | | @SaCheckPermission("storageRecordPint.search") |
| | | @PostMapping("/getSelectPrints") |
| | | public Result getSelectPrints( @RequestBody Map<String, Object> object){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectPrintSvs(object)); |
| | | } |
| | | } |
| | |
| | | |
| | | List<Map<String, String>> getPrimaryListLimt(String orderId, String processId, String remarks); |
| | | |
| | | List<Map<String, String>> getPrimaryListLimts(String orderId, String processId, String remarks); |
| | | |
| | | 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>> getDetailList2(String orderId, String processId, String remarks); |
| | | } |
| | |
| | | List<Map<String, Object>> getProcessNameList(); |
| | | |
| | | List<FlowCardDTO> exportDateProcessMp(List<LocalDate> date); |
| | | |
| | | Integer getSumQuantity(String orderId); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintSvs(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FinishedOperateLog> finishedOperateLogList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FinishedOperateLog.class); |
| | | if (!finishedOperateLogList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); |
| | | for (FinishedOperateLog finishedOperateLog : finishedOperateLogList) { |
| | | String OrderId = finishedOperateLog.getOrderId(); |
| | | String Remarks = finishedOperateLog.getRemarks(); |
| | | |
| | | // 检查是否已经处理过该 OrderId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(OrderId) && processedProcessIds.contains(Remarks)) { |
| | | continue; |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks())); |
| | | |
| | | List<Map<String, Object>> detailList = finishedOperateLogMapper.getDetailList2(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks()); |
| | | |
| | | List<Map<String, Object>> detailsmaplist = new ArrayList<Map<String, Object>>(); |
| | | |
| | | 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()))); |
| | | detailsmaplist.add(detailsmap); |
| | | |
| | | } |
| | | itemmap.put("detailList", detailsmaplist); |
| | | list.add(itemmap); |
| | | |
| | | |
| | | processedProcessIds.add(OrderId); |
| | | processedProcessIds.add(Remarks); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | public String deliveryDetailLogic(List<OrderDetail> list,Object savePoint,String userName) { |
| | | for (OrderDetail orderDetail : list) { |
| | |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | Integer sumQuantity = flowCardMapper.getSumQuantity(flowCard.getOrderId()); |
| | | List<Map<String, Object>> details = flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity()); |
| | | |
| | | for (Map<String, Object> detail : details) { |
| | | detail.put("sumQuantity", sumQuantity); |
| | | } |
| | | itemmap.put("data", details); |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | |
| | | order by fol.operate_time desc |
| | | </select> |
| | | |
| | | <select id="getPrimaryListLimts"> |
| | | select kkk.*,rw.teams_groups_name as teams_groups_name2 from(select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | fol.remarks, |
| | | SUM(fol.quantity) as quantity, |
| | | ROUND( sum(od.width * od.height * fol.quantity) / 1000000, 2 ) as area, |
| | | fol.process_id, |
| | | aaa.teams_groups_name, |
| | | aaa.previous_process, |
| | | date( aaa.reporting_work_time) as reporting_work_time |
| | | 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.`order` o on o.order_id=fol.order_id |
| | | left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='包装') aaa on aaa.process_id=fol.process_id |
| | | |
| | | |
| | | |
| | | where |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | | and (fol.remarks is not null and fol.remarks !="") and (fol.process_id !="" and fol.process_id is not null) |
| | | |
| | | group by fol.remarks,od.order_id |
| | | ) as kkk |
| | | left join pp.reporting_work rw on rw.process_id=kkk.process_id and rw.this_process=kkk.previous_process |
| | | group by kkk.remarks,kkk.order_id |
| | | |
| | | </select> |
| | | |
| | | <select id="getDetailList"> |
| | | SELECT |
| | | od.building_number, |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="getDetailLists"> |
| | | SELECT |
| | | od.building_number, |
| | | od.width, |
| | | od.height, |
| | | fol.quantity, |
| | | od.product_name, |
| | | od.product_id, |
| | | ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area |
| | | 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.`order` o ON o.order_id = fol.order_id |
| | | WHERE |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} and od.product_id=#{productId} |
| | | ORDER BY |
| | | fol.operate_time DESC |
| | | |
| | | </select> |
| | | |
| | | <select id="getDetailList2"> |
| | | SELECT |
| | | od.product_id, |
| | | od.product_name |
| | | 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.`order` o ON o.order_id = fol.order_id |
| | | WHERE |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | | group by |
| | | od.product_id |
| | | |
| | | </select> |
| | | |
| | | <select id="getSelectStorageRecordDeliveryId" resultMap="selectFinishedGoodsInventory"> |
| | | select fol.id, |
| | | fol.operation_order_number, |
| | |
| | | group by a.process_Id |
| | | ORDER BY a.id desc |
| | | </select> |
| | | |
| | | <select id="getSumQuantity"> |
| | | select quantity from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | </mapper> |