diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/Jg_natural/controller/Jg_naturalController.java b/SC-boot/linkage-scm/src/main/java/jnpf/Jg_natural/controller/Jg_naturalController.java index 2a278869..0d494941 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/Jg_natural/controller/Jg_naturalController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/Jg_natural/controller/Jg_naturalController.java @@ -225,6 +225,14 @@ public class Jg_naturalController { public ActionResult batchRemove(@PathVariable("ids") String ids) { String[] idList = ids.split(","); int i = 0; + for (String allId : idList) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(PoundlistEntity::getVehicleId, allId); + List poundlistEntityList = poundlistService.list(queryWrapper); + if (poundlistEntityList.size() > 0) { + return ActionResult.fail("该业务员已被使用,无法删除"); + } + } for (String allId : idList) { this.delete(allId); i++; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java index 5fa76304..ef54d8a8 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/saleorder/controller/SaleorderitemController.java @@ -728,6 +728,19 @@ public class SaleorderitemController { poundlistEntity.setSalesStatus("99"); } poundlistService.updateBatchById(poundlistList); + SaleorderitemEntity saleorderitemEntity = saleorderitemService.getById(allId); + if (StringUtils.isNotEmpty(saleorderitemEntity.getSourcePoId())){ + JSONArray array = JSON.parseArray(saleorderitemEntity.getSourcePoId()); + for (Object purchaseId : array) { + if (StringUtils.isNotEmpty(String.valueOf(purchaseId))) { + PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getInfo(String.valueOf(purchaseId)); + if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)) { + purchaseorderitemEntity.setIsTransfer("0"); + purchaseorderitemService.updateById(purchaseorderitemEntity); + } + } + } + } this.delete(allId); i++; } @@ -1088,7 +1101,6 @@ public class SaleorderitemController { public ActionResult delete(@PathVariable("id") String id){ SaleorderitemEntity entity= saleorderitemService.getInfo(id); if(entity!=null){ - saleorderitemService.delete(entity); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(Salesorder_item0Entity::getSalesOrderId,entity.getId()); queryWrapper.lambda().select(Salesorder_item0Entity::getPoundlistId); @@ -1098,6 +1110,19 @@ public class SaleorderitemController { poundlistEntity.setSalesStatus("99"); } poundlistService.updateBatchById(poundlistList); + if (StringUtils.isNotEmpty(entity.getSourcePoId())){ + JSONArray array = JSON.parseArray(entity.getSourcePoId()); + for (Object purchaseId : array) { + if (StringUtils.isNotEmpty(String.valueOf(purchaseId))) { + PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getInfo(String.valueOf(purchaseId)); + if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)) { + purchaseorderitemEntity.setIsTransfer("0"); + purchaseorderitemService.updateById(purchaseorderitemEntity); + } + } + } + } + saleorderitemService.delete(entity); QueryWrapper queryWrapperSalesorder_item0=new QueryWrapper<>(); queryWrapperSalesorder_item0.lambda().eq(Salesorder_item0Entity::getSalesOrderId,entity.getId()); salesorder_item0Service.remove(queryWrapperSalesorder_item0); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/vehicle/controller/VehicleController.java b/SC-boot/linkage-scm/src/main/java/jnpf/vehicle/controller/VehicleController.java index 87400ac4..cc065479 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/vehicle/controller/VehicleController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/vehicle/controller/VehicleController.java @@ -236,6 +236,14 @@ public class VehicleController { public ActionResult batchRemove(@PathVariable("ids") String ids){ String[] idList = ids.split(","); int i =0; + for (String allId : idList) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(PoundlistEntity::getVehicleId, allId); + List poundlistEntityList = poundlistService.list(queryWrapper); + if (poundlistEntityList.size() > 0) { + return ActionResult.fail("该车辆已被使用,无法删除"); + } + } for (String allId : idList){ this.delete(allId); i++; diff --git a/SC-web/src/components/ColumnDesign/main.vue b/SC-web/src/components/ColumnDesign/main.vue index d0f93769..1afbe597 100644 --- a/SC-web/src/components/ColumnDesign/main.vue +++ b/SC-web/src/components/ColumnDesign/main.vue @@ -173,6 +173,7 @@ 50条 100条 500条 + 1000条 diff --git a/SC-web/src/components/Generator/index/RightComponents/PopupSelect.vue b/SC-web/src/components/Generator/index/RightComponents/PopupSelect.vue index b3f465da..ba40d313 100644 --- a/SC-web/src/components/Generator/index/RightComponents/PopupSelect.vue +++ b/SC-web/src/components/Generator/index/RightComponents/PopupSelect.vue @@ -61,6 +61,7 @@ 50条 100条 500条 + 1000条 @@ -107,4 +108,4 @@ export default { } } } - \ No newline at end of file + diff --git a/SC-web/src/components/Generator/index/RightComponents/RelationForm.vue b/SC-web/src/components/Generator/index/RightComponents/RelationForm.vue index 1c2734cf..9c77b6d4 100644 --- a/SC-web/src/components/Generator/index/RightComponents/RelationForm.vue +++ b/SC-web/src/components/Generator/index/RightComponents/RelationForm.vue @@ -50,6 +50,7 @@ 50条 100条 500条 + 1000条 @@ -121,4 +122,4 @@ export default { } } } - \ No newline at end of file + diff --git a/SC-web/src/components/Pagination/index.vue b/SC-web/src/components/Pagination/index.vue index ddfafd1f..34ab02e2 100644 --- a/SC-web/src/components/Pagination/index.vue +++ b/SC-web/src/components/Pagination/index.vue @@ -28,7 +28,7 @@ export default { pageSizes: { type: Array, default() { - return [20, 50, 100, 500] + return [20, 50, 100, 500, 1000] } }, layout: { @@ -91,4 +91,4 @@ export default { .pagination-container.hidden { display: none; } - \ No newline at end of file + diff --git a/SC-web/src/views/scm/basicInformation/purchaseorder/index.vue b/SC-web/src/views/scm/basicInformation/purchaseorder/index.vue index 680b8dcc..b8204dd0 100644 --- a/SC-web/src/views/scm/basicInformation/purchaseorder/index.vue +++ b/SC-web/src/views/scm/basicInformation/purchaseorder/index.vue @@ -608,7 +608,7 @@ if(!flag){ this.$message({ type: 'error', - message: '此订单已经转销售', + message: '订单已经转销售', duration: 2500 }) return @@ -639,11 +639,10 @@ for (let i = 0; i < res.data.length; i++) { let _data = res.data[i] list.push(_data) - list.purchaseOrderId = purchaseOrderIds - list.purchaseOrderId = JSON.stringify(list.purchaseOrderId) - list.isTransfer = '1' } - debugger + list.purchaseOrderId = purchaseOrderIds + list.purchaseOrderId = JSON.stringify(list.purchaseOrderId) + list.isTransfer = '1' if (list.length>0) { this.formVisible6 = true this.$nextTick(() => { diff --git a/SC-web/src/views/scm/basicInformation/purchaseorder/receiptinForm.vue b/SC-web/src/views/scm/basicInformation/purchaseorder/receiptinForm.vue index 713740c4..1385ff14 100644 --- a/SC-web/src/views/scm/basicInformation/purchaseorder/receiptinForm.vue +++ b/SC-web/src/views/scm/basicInformation/purchaseorder/receiptinForm.vue @@ -708,8 +708,8 @@ }) if (!flag){ this.$message({ - message: res.msg, - type: 'success', + message: '库区不能为空', + type: 'error', duration: 2000 }) return diff --git a/SC-web/src/views/scm/basicInformation/receiptin/Form.vue b/SC-web/src/views/scm/basicInformation/receiptin/Form.vue index c7566a58..b5774748 100644 --- a/SC-web/src/views/scm/basicInformation/receiptin/Form.vue +++ b/SC-web/src/views/scm/basicInformation/receiptin/Form.vue @@ -642,14 +642,14 @@ if (item.reservoirareaName == null || item.reservoirareaName == ''){ flag = false; } - if (item.poundlistEntity.salesStatus > 0){ + if (item.poundlistEntity.salesStatus == '1' || item.poundlistEntity.salesStatus == '2' || item.poundlistEntity.salesStatus == '3'){ statusFlag = false; } }) if (!flag){ this.$message({ - message: res.msg, - type: 'success', + message: '库区不能为空', + type: 'error', duration: 2000 }) return diff --git a/SC-web/src/views/scm/basicInformation/receiptout/Form.vue b/SC-web/src/views/scm/basicInformation/receiptout/Form.vue index 87621f34..d3c7b680 100644 --- a/SC-web/src/views/scm/basicInformation/receiptout/Form.vue +++ b/SC-web/src/views/scm/basicInformation/receiptout/Form.vue @@ -556,6 +556,20 @@ }) }, request() { + var flag = true; + this.dataForm.receiptout_item0List.forEach((item,index) => { + if (item.reservoirareaName == null || item.reservoirareaName == ''){ + flag = false; + } + }) + if (!flag){ + this.$message({ + message: '库区不能为空', + type: 'error', + duration: 2000 + }) + return + } this.submitDisabled = true; var _data = this.dataList() if (!this.dataForm.id) { diff --git a/SC-web/src/views/scm/basicInformation/saleorder/arinvoicesForm.vue b/SC-web/src/views/scm/basicInformation/saleorder/arinvoicesForm.vue index a78b1114..ac3acd16 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/arinvoicesForm.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/arinvoicesForm.vue @@ -596,45 +596,45 @@ this.submitDisabled = true; var _data =this.dataList() debugger - // if (!this.dataForm.id) { - // request({ - // url: '/api/arinvoices/Arinvoices', - // method: 'post', - // data: _data - // }).then((res) => { - // this.$message({ - // message: res.msg, - // type: 'success', - // duration: 1000, - // onClose: () => { - // this.submitDisabled = false; - // this.visible = false - // this.$emit('refresh', true) - // } - // }) - // }).catch(() => { - // this.submitDisabled = false - // }) - // }else{ - // request({ - // url: '/api/arinvoices/Arinvoices/'+this.dataForm.id, - // method: 'PUT', - // data: _data - // }).then((res) => { - // this.$message({ - // message: res.msg, - // type: 'success', - // duration: 1000, - // onClose: () => { - // this.submitDisabled = false; - // this.visible = false - // this.$emit('refresh', true) - // } - // }) - // }).catch(() => { - // this.submitDisabled = false - // }) - // } + if (!this.dataForm.id) { + request({ + url: '/api/arinvoices/Arinvoices', + method: 'post', + data: _data + }).then((res) => { + this.$message({ + message: res.msg, + type: 'success', + duration: 1000, + onClose: () => { + this.submitDisabled = false; + this.visible = false + this.$emit('refresh', true) + } + }) + }).catch(() => { + this.submitDisabled = false + }) + }else{ + request({ + url: '/api/arinvoices/Arinvoices/'+this.dataForm.id, + method: 'PUT', + data: _data + }).then((res) => { + this.$message({ + message: res.msg, + type: 'success', + duration: 1000, + onClose: () => { + this.submitDisabled = false; + this.visible = false + this.$emit('refresh', true) + } + }) + }).catch(() => { + this.submitDisabled = false + }) + } }, addarinvoices_item1List(){ let item = { diff --git a/SC-web/src/views/scm/basicInformation/saleorder/receiptoutForm.vue b/SC-web/src/views/scm/basicInformation/saleorder/receiptoutForm.vue index f2e56577..7c56eb42 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/receiptoutForm.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/receiptoutForm.vue @@ -463,6 +463,20 @@ }) }, request() { + var flag = true; + this.dataForm.receiptout_item0List.forEach((item,index) => { + if (item.reservoirareaName == null || item.reservoirareaName == ''){ + flag = false; + } + }) + if (!flag){ + this.$message({ + message: '库区不能为空', + type: 'error', + duration: 2000 + }) + return + } this.submitDisabled = true; var _data = this.dataList() if (!this.dataForm.id) {