分架界面添加数量、重量勾选求和,打印流程卡显示打印状态,添加“打印状态”对应中英文
| | |
| | | halfProductLabel:'Half-finished product label', |
| | | pleaseSelectCustomPrintLabelStyle:'Please select a custom print label style', |
| | | mergePrinting:'Merge printing', |
| | | printStatus:'Print status', |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'number', |
| | |
| | | halfProductLabel:'半品标签', |
| | | pleaseSelectCustomPrintLabelStyle:'请选择自定义打印标签样式', |
| | | mergePrinting:'合并打印', |
| | | printStatus:'打印状态', |
| | | }, |
| | | reportingWorks:{ |
| | | glassNumber:'编号', |
| | |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | return parseFloat((row.baiscQuantity*row.thickness*row.width*row.height*2.5/1000000).toFixed(2)) |
| | | } |
| | | |
| | | let quantit = ref('') |
| | | let weight = ref('') |
| | | const handleCheckboxChange=({ row}) =>{ |
| | | const $grid = xGrid.value |
| | | //获取右边表格checkbox选中的数据 |
| | | const checkedList = $grid.getCheckboxRecords() |
| | | let sum = 0; |
| | | let quantitySum = 0; |
| | | let weightsum=0; |
| | | checkedList.forEach(item => { |
| | | sum += item.baiscQuantity; |
| | | quantitySum += item.baiscQuantity; |
| | | weightsum += weightSum(item); |
| | | }); |
| | | //console.log('sum:', sum); |
| | | quantit.value = quantitySum; |
| | | weight.value = parseFloat(weightsum.toFixed(2)); |
| | | } |
| | | </script> |
| | | |
| | |
| | | |
| | | <div width="12%"> |
| | | <el-main style=""> |
| | | <div> |
| | | <span><el-input v-model="quantit" style="width: 80px;"/></span> |
| | | <span><el-input v-model="weight" style="width: 80px;"/></span> |
| | | </div> |
| | | <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable |
| | | type="number"></el-input></span><br> |
| | | <el-button type="primary" @click="addRight"> →</el-button> |
| | |
| | | const xGridDetail =ref(null) |
| | | |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.dataType = res.data.type |
| | | console.log(produceList) |
| | | produceList.forEach(item => { |
| | | if(item.print_status == 1){ |
| | | item.print_status='已打印' |
| | | } |
| | | else if (item.print_status == 0){ |
| | | item.print_status='未打印' |
| | | } |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | {field: 'glass_child', title: t('reportingWorks.glassChild'),filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged}, |
| | | {field: 'founder', title: t('processCard.founder'),}, |
| | | {field: 'splitFrame_time', title: t('processCard.splitFrameTime'),}, |
| | | { |
| | | field: 'print_status', |
| | | title: t('processCard.printStatus'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | |
| | | ], |
| | | //表单验证 |
| | | editRules: { |
| | |
| | | } |
| | | }} |
| | | ], |
| | | }, |
| | | 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 |
| | | }, |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | const gridEventsDetail = { |
| | | menuClick({menu, row, column}) { |
| | | const $grid = xGridDetail.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'copyChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "sort"){ |
| | | if (result) { |
| | | const dataList = xGridDetail.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start && index <= result.end) { |
| | | item[result.cell] = val |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | break |
| | | } |
| | | case 'copyAll' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "sort" ) { |
| | | if (result) { |
| | | const dataList = xGridDetail.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start) { |
| | | item[result.cell] = val |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | break |
| | | } |
| | | case 'clearChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "sort" ) { |
| | | if (result) { |
| | | const dataList = xGridDetail.value.getTableData().visibleData |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start && index <= result.end) { |
| | | item[result.cell] = '' |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | const openedTable = () => { |
| | | let detail =ref(produceDetailList.value) |
| | | xGridDetail.value.reloadData(detail.value) |
| | | addListener(xGridDetail.value, detailGridOptions) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | height="550px" |
| | | size="small" |
| | | v-bind="detailGridOptions" |
| | | v-on="gridEvents"> |
| | | v-on="gridEventsDetail"> |
| | | |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | |
| | | height: 100%; |
| | | } |
| | | |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | |
| | | </style> |
| | |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | |
| | | |
| | | // 监听打印完成事件 |
| | | window.addEventListener('afterprint', function() { |
| | | //修改打印 |
| | | let printState=1 |
| | | request.post(`/processCard/updatePrintState/${printState}`, data.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | |
| | | } |
| | | }) |
| | | }); |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <td class="tdNowrap">项目名称:</td> |
| | | <td colspan="2">{{ items.project }}</td> |
| | | <td class="tdNowrap">工艺流程:</td> |
| | | <td colspan="17">{{ items.process }}</td> |
| | | <td colspan="17" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | | <tr v-for="(itemTr,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">磨边类型:</td> |
| | |
| | | |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 13mm 6mm 0mm 6mm /* this affects the margin in the printer settings */ |
| | | margin: 2mm 0mm 0mm 1mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | |
| | |
| | | }, |
| | | menuConfig: { |
| | | /*body: { |
| | | //右键菜单 |
| | | options: [ |
| | | [ |
| | | { |
| | |
| | | @PathVariable Date selectTime2) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2)); |
| | | } |
| | | |
| | | @ApiOperation("修改是否打印状态") |
| | | @PostMapping("/updatePrintState/{printState}") |
| | | public Result updatePrintState( |
| | | @PathVariable Integer printState, |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | |
| | | return Result.seccess(flowCardService.updatePrintStateSv(printState,object)); |
| | | } |
| | | } |
| | |
| | | List<Map<String, Object>> getRepairPrintCustomData(String processId, Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> getGlassNumber(Integer technologyNumber, String processId); |
| | | |
| | | Boolean updatePrintStateMp(Integer printState, String processId, Integer technologyNumber); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updatePrintStateSv(Integer printState, Map<String, Object> object) { |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // 更新打印状态 |
| | | flowCardMapper.updatePrintStateMp(printState,flowCard.getProcessId(),flowCard.getTechnologyNumber()); |
| | | } |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | fc.founder, |
| | | date(fc.splitFrame_time) as splitFrame_time |
| | | date(fc.splitFrame_time) as splitFrame_time, |
| | | /* if(fc.print_status=0,'未打印','已打印') as print_status*/ |
| | | fc.print_status |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and |
| | |
| | | ogd.glass_child, |
| | | e.type_name, |
| | | opd.stock_id, |
| | | od.quantity |
| | | od.quantity, |
| | | od.other_columns |
| | | from pp.optimize_detail opd |
| | | left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id |
| | | left join sd.order_detail od |
| | |
| | | ogd.glass_child, |
| | | c.customer_abbreviation as customer_name, |
| | | ifnull(od.processing_note,'') as processing_note, |
| | | bgt.type_name |
| | | bgt.type_name, |
| | | od.other_columns |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number |
| | |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | p.remarks, |
| | | c.customer_abbreviation as customerAbbreviation |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | od.other_columns |
| | | 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 |
| | |
| | | order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.order_number) |
| | | </select> |
| | | |
| | | <update id="updatePrintStateMp"> |
| | | update pp.flow_card |
| | | set print_status = #{printState} |
| | | where process_id = #{processId} and technology_number = #{technologyNumber} |
| | | </update> |
| | | </mapper> |