Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | buttons: [ |
| | | {'code': 'add', 'name': "合并",status: 'primary'} |
| | | ], |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | |
| | | }) |
| | | |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getTableData().visibleData |
| | | let flowData = ref({ |
| | | flowCard: selectRecords |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/processCard/mergeFlowCard", flowData.value).then((res) => { |
| | | if(res.code==200 && res.data==="true"){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/processCard/SelectProcessCard', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove" |
| | | import {useI18n} from "vue-i18n" |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | |
| | | let dialogTableVisible = ref(false) |
| | | let craftVisible = ref(false) |
| | | const iconNickname = ref() |
| | | const company = companyInfo() |
| | | const xGrid = ref() |
| | | const trademarkLocation=ref([t('craft.upperLeft'),t('craft.upperRight'),t('craft.lowLeft'),t('craft.lowRight')]) |
| | | const gridOptions = reactive({ |
| | |
| | | iconNickname.value=item.nickname |
| | | } |
| | | }) |
| | | if(trademarkAttr.value.trademark===company.icon){ |
| | | trademarkAttr.value.yMargin=66 |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.selectSortTableSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("合并流程卡接口") |
| | | @PostMapping("/mergeFlowCard") |
| | | public Result mergeFlowCard(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.mergeFlowCard(object)); |
| | | } |
| | | } |
| | |
| | | private String glassChild; |
| | | //工艺流程 |
| | | private String process; |
| | | //流程卡合并 |
| | | private Integer merge; |
| | | |
| | | //外键订单表 |
| | | @TableField(select = false,exist= false) |
| | |
| | | List<Map<String, Object>> remakList(String processId); |
| | | |
| | | List<Map<String, Object>> selectMaxFlowCard(String orderId, String productionId); |
| | | |
| | | List<Map<String, Object>> selectFlowCardMerge(String processId); |
| | | |
| | | Boolean updateFlowCardMerge(String processId); |
| | | } |
| | |
| | | if (!finishedOperateLogslist.isEmpty()){ |
| | | for (FinishedOperateLog finishedOperateLog : finishedOperateLogslist) { |
| | | finishedGoodsInventoryMapper.updateInventoryquantityInt(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(), Math.toIntExact(finishedOperateLog.getQuantity())); |
| | | finishedGoodsInventoryMapper.updateIntOrderNumberConut(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(), Long.valueOf(finishedOperateLog.getQuantity())); |
| | | finishedOperateLogMapper.updateFinishedOperateLogState(finishedOperateLog,"已作废"); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | public String mergeFlowCard(Map<String, Object> object) { |
| | | String returns= "false"; |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | List<Map<String, Object>> flowCardList1=flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | if(flowCardList1.size()==1){ |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | returns="true"; |
| | | } |
| | | |
| | | } |
| | | |
| | | return returns; |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setError(e.toString()+Arrays.toString(e.getStackTrace())); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | |
| | | |
| | | if(otherColumns!=null){ |
| | | otherColumns.forEach((key, value) ->{ |
| | | if(value!=null && key.contains("M")) { |
| | | |
| | | if(value!=null && !value.equals("") && key.contains("M")) { |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | if (orderOtherMoney.getColumn().equals(key)) { |
| | | orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+(Double.parseDouble((String) value) * OrderDetails.get(finalI).getQuantity())); |
| | | orderOtherMoney.setQuantity( |
| | | orderOtherMoney.getQuantity()+(Double.parseDouble((String) value) * OrderDetails.get(finalI).getQuantity())); |
| | | } |
| | | }); |
| | | } |
| | |
| | | GROUP BY od.order_number |
| | | order by fc.process_id desc LIMIT 1),'') as process_id |
| | | </select> |
| | | |
| | | <select id="selectFlowCardMerge"> |
| | | select * |
| | | from pp.flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | where fc.process_id = #{processId} |
| | | GROUP BY fc.order_id, fc.process_id, ogd.glass_child |
| | | </select> |
| | | |
| | | <update id="updateFlowCardMerge"> |
| | | update pp.flow_card fc set fc.merge=1 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectOrderotherMoney" > |
| | | select bom.alias,oom.price,#{value}*od.quantity as count,oom.price*#{value}*od.quantity as monery |
| | | select bom.alias,ifnull(oom.price,0) as price,#{value}*od.quantity as count,ifnull(oom.price,0)*#{value}*od.quantity as monery |
| | | from order_detail od |
| | | left join order_other_money oom on oom.order_id=od.order_id and oom.column=#{key} |
| | | left join basic_other_money bom on bom.`column`=oom.`column` |