| | |
| | | |
| | | let props = defineProps({ |
| | | printList: null, |
| | | companyVal: null |
| | | companyVal: null, |
| | | printPage: null |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | |
| | | |
| | | data.value.printList = JSON.parse(props.printList) |
| | | console.log(data.value.printList) |
| | | |
| | | onMounted(() => { |
| | | clearPrintStyles() |
| | |
| | | const orderDetailList = ref([]) |
| | | const customer = ref({}) |
| | | const selectPrint =async () => { |
| | | request.post(`/finishedGoodsInventory/getSelectPrints`, data.value).then((res) => { |
| | | const page = props.printPage==='storageRecordPint'?`/finishedGoodsInventory/getSelectPrints`:'/finishedGoodsInventory/getInventoryPrints' |
| | | const value = props.printPage==='storageRecordPint'?data.value:data.value.printList |
| | | request.post(page, value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | customer.value = produceList.value[0].detail[0] |
| | |
| | | import footSum from "@/hook/footSum"; |
| | | import {addListener} from "@/hook/mouseMove"; |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import PrintPackingListLuoyang from "@/components/mm/PrintPackingListLuoyang.vue"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | let dialogTableVisible = ref(false) |
| | | const dialogTableVisible1 = ref(false) |
| | | const companyList = ref([ |
| | | {key: 1,value: '洛阳北方玻璃技术股份有限公司'}, |
| | | {key: 2,value: '上海北玻玻璃技术工业有限公司'} |
| | | ]) |
| | | let companyVal = ref(1) |
| | | const printRecord = ref({ |
| | | id: 'record' |
| | | }) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | //{type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {type: 'checkbox',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'orderDetail.orderNumber', width:'150', title: t('order.OrderNum'), filters:[{ data: '' }],slots: { filter: 'num1_filter' } }, |
| | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | { 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'}, |
| | | { 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'}, |
| | | /*{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},*/ |
| | | // { 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'}, |
| | | // { 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'}, |
| | | //{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'}, |
| | | { 'code' :'changeRack','name':'装箱调架',status: 'primary'}, |
| | | { 'code' :'print','name':t('basicData.print'),status: 'primary'}, |
| | | |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | | print: true,*/ |
| | | export: true, |
| | | zoom: true, |
| | | custom: true |
| | |
| | | |
| | | |
| | | let currentRecord = ref(null) |
| | | let printRow = ref({ |
| | | list: null |
| | | }) |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | |
| | | } |
| | | case 'changeRack':{ |
| | | currentRecord.value = null |
| | | if(xGrid.value.getCurrentRecord()===null){ |
| | | const selectedRecords = xGrid.value.getCheckboxRecords(true) |
| | | if(selectedRecords.length!==1 ){ |
| | | ElMessage.warning("请选择一条数据") |
| | | return |
| | | } |
| | | currentRecord.value = JSON.parse(JSON.stringify(selectedRecords[0])) |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | case 'print':{ |
| | | const selectedRecords = xGrid.value.getCheckboxRecords(true) |
| | | if (selectedRecords.length <= 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | currentRecord.value = JSON.parse(JSON.stringify(xGrid.value.getCurrentRecord())) |
| | | dialogTableVisible.value = true |
| | | break |
| | | printRow.value.list = JSON.stringify( selectedRecords) |
| | | dialogTableVisible1.value = true |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const changeRack =async () => { |
| | | const max = xGrid.value.getCurrentRecord().quantityAvailable*1 || 0 |
| | | const selectedRecords = xGrid.value.getCheckboxRecords(true) |
| | | const max = selectedRecords[0].quantityAvailable*1 || 0 |
| | | if(currentRecord.value.quantityAvailable<=0 || parseInt(currentRecord.value.quantityAvailable)>max){ |
| | | ElMessage.warning(`0<value<=${xGrid.value.getCurrentRecord().quantityAvailable}`) |
| | | ElMessage.warning(`0<value<=${max}`) |
| | | return |
| | | } |
| | | if(currentRecord.value.boxNo.length>255 || currentRecord.value.remark.length>255){ |
| | |
| | | </div> |
| | | </template> |
| | | </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/> |
| | | <el-select v-model="companyVal" style="width: 120px;margin-left: 10px"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key" /> |
| | | </el-select> |
| | | </template> |
| | | <print-packing-list-luoyang |
| | | id="record" |
| | | :printList="printRow.list" |
| | | :companyVal="companyVal" |
| | | printPage="'productStockList'" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | .el-row { |
| | | margin-bottom: 10px; |
| | | } |
| | | :deep(#sizePrintCalrd1 .el-dialog__body) { |
| | | height: 90%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | display: flex; |
| | | flex-wrap: wrap |
| | | } |
| | | </style> |
| | |
| | | |
| | | |
| | | {type: 'checkbox',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '80'}, |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | {field: 'remarks', width:'150', title: t('箱号'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderId', width: '150',title: t('order.orderId'),showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | { |
| | | 'name': t('打印'), status:"primary" , |
| | | 'name': t('basicData.print'), status:"primary" , |
| | | 'code':'pint' |
| | | }], |
| | | /*import: false, |
| | |
| | | <el-dialog |
| | | id="sizePrintCalrd1" |
| | | v-model="dialogTableVisible1" |
| | | title="装箱单打印" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | |
| | | id="record" |
| | | :printList="printRow.list" |
| | | :companyVal="companyVal" |
| | | :printPage="'storageRecordPint'" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | public Result getSelectPrints( @RequestBody Map<String, Object> object){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectPrintSvs(object)); |
| | | } |
| | | /*装箱打印查询*/ |
| | | @ApiOperation("库存装箱打印内容查询接口") |
| | | @SaCheckPermission("createProductStock.search") |
| | | @PostMapping("/getInventoryPrints") |
| | | public Result getInventoryPrints( @RequestBody List<FinishedGoodsInventory> finishedGoodsInventories){ |
| | | return Result.seccess(finishedGoodsInventoryService.getInventoryPrints(finishedGoodsInventories)); |
| | | } |
| | | |
| | | @ApiOperation("成品装箱调架") |
| | | @SaCheckPermission("createProductStock.add") |
| | |
| | | |
| | | |
| | | Integer findOrderNumberdContainercount(String orderId, Integer orderNumber, String container); |
| | | |
| | | List<Map<String, String>> getPrintTitleByBox(Integer customerId, String project, String boxNo); |
| | | |
| | | List<Map<String, Object>> getorderProductByBoxNo(String orderId, String boxNo); |
| | | |
| | | List<Map<String, Object>> getPrintDetail(String orderId, String boxNo, Integer productId, String thickness); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<Map<String, String>> getPrimaryListLimt(String orderId, String processId, String remarks); |
| | | |
| | | List<Map<String, String>> getPrimaryListLimts(String customerName, String project, String remarks); |
| | | List<Map<String, String>> getPrimaryListLimts(Integer customerId, String project, String remarks); |
| | | |
| | | List<Map<String, Object>> getDetailList(String orderId, String processId, String remarks); |
| | | |
| | |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts( |
| | | finishedOperateLog.getOrder().getCustomerName(), |
| | | finishedOperateLog.getOrder().getCustomerId(), |
| | | finishedOperateLog.getOrder().getProject(), |
| | | finishedOperateLog.getRemarks())); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> getInventoryPrints(List<FinishedGoodsInventory> finishedGoodsInventories) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | if (!finishedGoodsInventories.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); |
| | | for (FinishedGoodsInventory finishedGoodsInventory : finishedGoodsInventories) { |
| | | String orderId = finishedGoodsInventory.getOrderId(); |
| | | String boxNo = finishedGoodsInventory.getBoxNo(); |
| | | |
| | | // 检查是否已经处理过该 OrderId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(orderId) && processedProcessIds.contains(boxNo)) { |
| | | continue; |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail",finishedGoodsInventoryMapper.getPrintTitleByBox( |
| | | finishedGoodsInventory.getOrder().getCustomerId(), |
| | | finishedGoodsInventory.getOrder().getProject(), |
| | | boxNo |
| | | ) ); |
| | | //获取库存里面此订单此箱号的所有产品信息 |
| | | List<Map<String, Object>> detailList = finishedGoodsInventoryMapper |
| | | .getorderProductByBoxNo(orderId,boxNo); |
| | | |
| | | 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()); |
| | | /*finishedOperateLogMapper |
| | | .getDetailLists( |
| | | finishedOperateLog.getOrderId(), |
| | | finishedOperateLog.getRemarks(), |
| | | Integer.valueOf(details.get("product_id").toString()), |
| | | details.get("thickness").toString() |
| | | );*/ |
| | | //获取明细数据 |
| | | List<Map<String, Object>> orderDetailList = finishedGoodsInventoryMapper |
| | | .getPrintDetail( |
| | | orderId, |
| | | boxNo, |
| | | Integer.valueOf(details.get("product_id").toString()), |
| | | details.get("thickness").toString() |
| | | ); |
| | | |
| | | detailsmap.put("detailList",orderDetailList); |
| | | detailsmaplist.add(detailsmap); |
| | | |
| | | } |
| | | itemmap.put("detailList", detailsmaplist); |
| | | list.add(itemmap); |
| | | |
| | | |
| | | processedProcessIds.add(orderId); |
| | | processedProcessIds.add(boxNo); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.sql.Date; |
| | | import java.sql.SQLOutput; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | |
| | | }); |
| | | //判断后工序此流程卡号是否有次破 |
| | | List<DamageDetails> hasBreak = damageDetailsMapper |
| | | .getNotReview(dataList.get(i).get("process_id"), |
| | | .getNotReview(dataList.get(i).get("processId"), |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("technology_number")) |
| | | ); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | if(!hasBreak.isEmpty()){ |
| | | int finalI = i; |
| | |
| | | thisProcess, |
| | | orderId |
| | | ); |
| | | |
| | | if(behindProcess!=null &&!behindProcess.isEmpty()){ |
| | | Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum( |
| | | dataList.get(finalI).get("processId"), |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getPrintTitleByBox"> |
| | | select kkk.*, |
| | | rw.teams_groups_name as teams_groups_name2 |
| | | from(select o.order_id, |
| | | o.customer_name, |
| | | o.customer_id, |
| | | o.project, |
| | | o.batch, |
| | | fol.box_no as 'remarks', |
| | | SUM(fol.quantity_available) as quantity, |
| | | ROUND( sum(od.width * od.height * fol.quantity_available) / 1000000, 2 ) as area, |
| | | ROUND( sum(od.width * od.height * fol.quantity_available*p.total_thickness*2.5) / 1000000, 2 ) as weight, |
| | | fol.process_id, |
| | | aaa.teams_groups_name, |
| | | aaa.previous_process, |
| | | date( aaa.reporting_work_time) as reporting_work_time |
| | | from (SELECT * |
| | | FROM mm.finished_goods_inventory aa |
| | | where aa.box_no=#{boxNo} |
| | | and aa.quantity_available>0 |
| | | ) as fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on od.product_id=p.id |
| | | left join (select teams_groups_name,process_id,previous_process,reporting_work_time from pp.reporting_work where this_process='包装' group by process_id) aaa on aaa.process_id=fol.process_id |
| | | where o.customer_id=#{customerId} |
| | | and o.project=#{project} |
| | | |
| | | group by fol.box_no,o.customer_name,o.project |
| | | ) 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.customer_id,kkk.project |
| | | |
| | | </select> |
| | | |
| | | <select id="getorderProductByBoxNo"> |
| | | SELECT |
| | | od.product_id, |
| | | od.product_name, |
| | | pro.thickness |
| | | FROM |
| | | ( SELECT * FROM mm.finished_goods_inventory aa |
| | | WHERE aa.order_id = #{orderId} |
| | | AND aa.box_no = #{boxNo} |
| | | AND aa.quantity_available > 0 ) fol |
| | | |
| | | LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id |
| | | AND fol.order_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 |
| | | group by |
| | | od.product_id |
| | | |
| | | </select> |
| | | <select id="getPrintDetail"> |
| | | SELECT |
| | | ifnull(od.building_number,ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')) as building_number, |
| | | od.width, |
| | | od.height, |
| | | sum(fol.quantity_available) as quantity, |
| | | od.product_name, |
| | | od.product_id, |
| | | ROUND(sum(od.width * od.height * fol.quantity_available / 1000000) , 2 ) as area, |
| | | ROUND(sum(od.width * od.height * fol.quantity_available / 1000000) , 2 )*#{thickness}*2.5 as weight |
| | | FROM |
| | | ( SELECT * FROM mm.finished_goods_inventory aa |
| | | WHERE aa.order_id = #{orderId} |
| | | AND aa.box_no = #{boxNo} |
| | | AND aa.quantity_available > 0 ) fol |
| | | |
| | | LEFT JOIN sd.order_detail od |
| | | ON fol.order_id = od.order_id |
| | | AND fol.order_number = od.order_number |
| | | LEFT JOIN sd.`order` o |
| | | ON o.order_id = fol.order_id |
| | | WHERE |
| | | od.product_id=#{productId} |
| | | group by od.order_id,od.order_number |
| | | ORDER BY |
| | | od.order_number |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | select kkk.*,rw.teams_groups_name as teams_groups_name2 from(select o.order_id, |
| | | o.customer_name, |
| | | o.customer_id, |
| | | o.project, |
| | | o.batch, |
| | | fol.remarks, |
| | |
| | | |
| | | |
| | | where |
| | | o.customer_name=#{customerName} and fol.remarks=#{remarks} and o.project=#{project} |
| | | o.customer_id=#{customerId} and fol.remarks=#{remarks} and o.project=#{project} |
| | | and (fol.remarks is not null and fol.remarks !="") and (fol.process_id !="" and fol.process_id is not null) |
| | | |
| | | group by fol.remarks,o.customer_name,o.project |
| | | ) 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.customer_name,kkk.project |
| | | group by kkk.remarks,kkk.customer_id,kkk.project |
| | | |
| | | </select> |
| | | |
| | |
| | | on a.reporting_work_id = b.reporting_work_id |
| | | where a.process_id=#{processId} |
| | | and b.reviewed_state>=0 |
| | | <if test="orderNumber!=null"> |
| | | <if test="orderNumber!= null"> |
| | | and a.order_number = #{orderNumber} |
| | | </if> |
| | | and a.technology_number = #{technologyNumber} |