Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | <th>规格(宽W*高H)</th> |
| | | <th>片数</th> |
| | | <th>面积</th> |
| | | <th>{{company.columnNamePerimeter}}</th> |
| | | <th>延米</th> |
| | | <th>楼号</th> |
| | | <th>加工要求</th> |
| | | <th>备注</th> |
| | |
| | | <th>规格(宽W*高H)</th> |
| | | <th>片数</th> |
| | | <th>面积</th> |
| | | <th>{{company.columnNamePerimeter}}</th> |
| | | <th>延米</th> |
| | | <th>半径</th> |
| | | <th>楼号</th> |
| | | <th>加工要求</th> |
| | |
| | | if (event.button === 0) {//左键松开 |
| | | isSelecting.value = false//标记为停止选择操作 |
| | | } |
| | | const result = exportData() |
| | | /*const result = exportData() |
| | | const activeElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | const element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | if(result.length===2 && result[0].length===1){ |
| | | activeElement.innerHTML ='' |
| | | element.innerHTML ='' |
| | | return |
| | | } |
| | | let sum = 0 |
| | | |
| | | result.forEach((item,index) => { |
| | | if(index>0){ |
| | | sum+=item.reduce((a, b) => a*1 + b*1, 0); |
| | | } |
| | | }) |
| | | const activeElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | const element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | |
| | | sum=isNaN(sum)?0:sum |
| | | activeElement.innerHTML ="SUM:"+parseFloat(sum.toFixed(2)) |
| | | element.innerHTML ="SUM:"+parseFloat(sum.toFixed(2)) |
| | | element.innerHTML ="SUM:"+parseFloat(sum.toFixed(2))*/ |
| | | } |
| | | |
| | | let outevent = ref()//移动事件,不保存,循环定时器内无法监听到新的事件 |
| | |
| | | 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: [ |
| | | [ |
| | | { |
| | |
| | | const updateMoney = () => { |
| | | const updateData = { |
| | | order: titleUploadData.value, |
| | | detail: xGrid.value.getTableData().fullData |
| | | detail: xGrid.value.getTableData().fullData, |
| | | otherMoney:otherMoney.value |
| | | } |
| | | request.post(`/order/updateOrderMoney`,updateData).then(res => { |
| | | if (res.code == 200){ |
| | |
| | | {'code': 'review', 'name': t('basicData.review'),status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | |
| | | @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)); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("订单保存") |
| | | @ApiOperation("订单表头保存") |
| | | @PostMapping("/saveOrderTitle") |
| | | @SaCheckPermission("createOrder.add") |
| | | public Result saveOrderTitle(@RequestBody Map<String, Object> orderMap) throws Exception { |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("title")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class); |
| | | List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("otherMoney")), OrderOtherMoney.class); |
| | | |
| | | orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn().indexOf("M")==0).collect(Collectors.toList()); |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | |
| | | for (int i = 0; i < OrderDetails.size(); i++) { |
| | | OrderDetails.get(i).setOrderNumber(i+1); |
| | | OrderDetails.get(i).setOrderId(orderId); |
| | | OrderDetails.get(i).setPerimeter((OrderDetails.get(i).getWidth()+OrderDetails.get(i).getHeight())*2/1000); |
| | | OrderDetails.get(i).setPerimeter(Double.valueOf(String.format("%.3f",(OrderDetails.get(i).getWidth()+OrderDetails.get(i).getHeight())*2/1000))); |
| | | OrderDetails.get(i).setWeight(1.0); |
| | | if(OrderDetails.get(i).getBendRadius()!=null && OrderDetails.get(i).getBendRadius()!=0){ |
| | | //获取弯钢弧度 |
| | |
| | | orderDetailMapper.insertBatch(OrderDetails); |
| | | //往小片表传入产品数据 |
| | | orderGlassDetailMapper.insertOrderGlassDetail(orderId); |
| | | //往订单其他金额副表传入数据 |
| | | orderOtherMoneyList.forEach(orderOtherMoney ->{ |
| | | orderOtherMoney.setId(null); |
| | | orderOtherMoney.setOrderId(orderId); |
| | |
| | | JSONObject jsonObject = new JSONObject(map); |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("order")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(jsonObject.get("detail")), OrderDetail.class); |
| | | List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(jsonObject.get("otherMoney")), OrderOtherMoney.class); |
| | | double money = 0; |
| | | for (OrderDetail orderDetail : OrderDetails) { |
| | | orderDetail = updateOrderMoneyComputed(orderDetail,order.getCalculateType()); |
| | | money+= orderDetail.getGrossAmount(); |
| | | } |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | if(orderOtherMoney.getQuantity()!=null && orderOtherMoney.getPrice()!=null){ |
| | | orderOtherMoney.setMoney((orderOtherMoney.getQuantity()*orderOtherMoney.getPrice())); |
| | | } |
| | | orderOtherMoneyMapper.update(orderOtherMoney,new QueryWrapper<OrderOtherMoney>() |
| | | .eq("order_id",orderOtherMoney.getOrderId()) |
| | | .eq("`column`",orderOtherMoney.getColumn())); |
| | | }); |
| | | |
| | | order.setMoney(money+orderOtherMoneyMapper.selectGrossAmount(order.getOrderId())); |
| | | orderMapper.updateMoney(order); |
| | |
| | | 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> |