From c94975cc05045a76b74add0f19b31d6983cc9133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E5=BC=BA?= Date: Fri, 3 Mar 2023 13:44:24 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/scm/basicInformation/saleorder/Form.vue | 2 +- .../basicInformation/saleorder/collectionForm.vue | 13 ++++++++++++- .../views/scm/basicInformation/saleorder/index.vue | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/SC-web/src/views/scm/basicInformation/saleorder/Form.vue b/SC-web/src/views/scm/basicInformation/saleorder/Form.vue index 5ba4f02e..39d088e7 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/Form.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/Form.vue @@ -1211,7 +1211,7 @@ contractCodecolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"客户ID","value":"code"}, {"label":"客户名称","value":"name"},], costomerCodecolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"联系人","value":"contact_name"}, {"label":"联系电话","value":"contact_phone"}, {"label":"地址","value":"address"},], currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], - statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}], + statusOptions:[{"fullName":"待发货","id":"0"},{"fullName":"待开票","id":"1"},{"fullName":"待回款","id":"2"},{"fullName":"归档","id":"3"}], salesorder_item0vehicleIdcolumnOptions:[ {"label":"车牌号","value":"ticketno"}, {"label":"物料名称","value":"materialName"},{"label":"磅单类型","value":"pound_type"}, {"label":"净重","value":"net_weight"}, {"label":"单位","value":"unit"}, {"label":"是否垫资","value":"advance"}, diff --git a/SC-web/src/views/scm/basicInformation/saleorder/collectionForm.vue b/SC-web/src/views/scm/basicInformation/saleorder/collectionForm.vue index 2c3dc9d4..ce350e3a 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/collectionForm.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/collectionForm.vue @@ -231,6 +231,7 @@ import request from '@/utils/request' import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDictionaryDataSelector } from '@/api/systemData/dictionary' + import { message } from '@/utils/message' export default { components: {}, props: [], @@ -288,7 +289,7 @@ for(let i=0;i this.dataForm.collection_item0List[i].price) { + this.$message({ + message: '收款金额不能大于金额', + type: 'error', + duration: 1000 + }) + return this.$message + } + } if (!this.dataForm.id) { request({ url: '/api/collection/Collection', diff --git a/SC-web/src/views/scm/basicInformation/saleorder/index.vue b/SC-web/src/views/scm/basicInformation/saleorder/index.vue index 66b81c77..ca50caba 100644 --- a/SC-web/src/views/scm/basicInformation/saleorder/index.vue +++ b/SC-web/src/views/scm/basicInformation/saleorder/index.vue @@ -174,7 +174,7 @@ width="150" > ], currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], currencyProps:{"label":"fullName","value":"id"}, - statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}], + statusOptions:[{"fullName":"待发货","id":"0"},{"fullName":"待开票","id":"1"},{"fullName":"待回款","id":"2"},{"fullName":"归档","id":"3"}], statusProps:{"label":"fullName","value":"id"}, } }, From c95374d0d53ff3520436c1df4a11941a54d4ca51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E5=BC=BA?= Date: Sat, 4 Mar 2023 17:05:47 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ArinvoicesController.java | 28 ++- .../controller/CollectionController.java | 179 +++++++++--------- .../controller/PoundlistController.java | 10 +- .../poundlist/entity/PoundlistEntity.java | 2 + .../controller/SaleorderitemController.java | 16 ++ .../scm/basicInformation/arinvoices/Form.vue | 2 +- .../scm/basicInformation/arinvoices/index.vue | 113 +---------- .../scm/basicInformation/collection/Form.vue | 12 +- .../scm/basicInformation/collection/index.vue | 48 +++-- .../basicInformation/poundlist/salesForm.vue | 101 +++++++--- .../scm/basicInformation/receiptout/Form.vue | 2 +- .../scm/basicInformation/saleorder/Form.vue | 2 +- .../saleorder/arinvoicesForm.vue | 41 ++-- .../saleorder/collectionForm.vue | 21 +- .../scm/basicInformation/saleorder/index.vue | 110 ++--------- .../saleorder/receiptoutForm.vue | 44 ++--- 16 files changed, 330 insertions(+), 401 deletions(-) diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/arinvoices/controller/ArinvoicesController.java b/SC-boot/linkage-scm/src/main/java/jnpf/arinvoices/controller/ArinvoicesController.java index b7fc54ae..1c2722a1 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/arinvoices/controller/ArinvoicesController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/arinvoices/controller/ArinvoicesController.java @@ -131,11 +131,6 @@ public class ArinvoicesController { @PostMapping @Transactional public ActionResult create(@RequestBody @Valid ArinvoicesCrForm arinvoicesCrForm) throws DataException { - if (arinvoicesCrForm.getAmount() != null && arinvoicesCrForm.getInvoiceAmount()!=null){ - if (arinvoicesCrForm.getAmount().compareTo(arinvoicesCrForm.getInvoiceAmount()) == -1){ - return ActionResult.fail("发票金额不能大于金额"); - } - } String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); arinvoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("arinvoices", false)); @@ -153,7 +148,11 @@ public class ArinvoicesController { PoundlistEntity poundlistEntity = poundlistService.getInfo(salesorder_item0Entity.getPoundlistId()); if (ObjectUtils.isNotEmpty(poundlistEntity)){ poundlistEntity.setSalesStatus("2");//修改磅单状态 - poundlistEntity.setIsExpense("1");//修改销项票状态 + if (arinvoicesCrForm.getAmount() != null && arinvoicesCrForm.getInvoiceAmount()!=null){ + if (arinvoicesCrForm.getInvoiceAmount().compareTo(arinvoicesCrForm.getAmount()) > -1){ + poundlistEntity.setIsExpense("1");//修改销项票状态 + } + } poundlistService.updateById(poundlistEntity); } } @@ -413,7 +412,22 @@ public class ArinvoicesController { saleorderitemEntity.setInvoiceNum(arinvoicesEntity.getInvoiceQuantity()); saleorderitemEntity.setInvoiceAmount(arinvoicesEntity.getInvoiceAmount()); saleorderitemService.updateById(saleorderitemEntity); - + QueryWrapper queryWrapper1 = new QueryWrapper<>(); + queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleorderitemEntity.getId()); + List salesorder_item0EntityList = salesorder_item0Service.list(queryWrapper1); + if (salesorder_item0EntityList.size()>0){ + for (Salesorder_item0Entity salesorder_item0Entity : salesorder_item0EntityList){ + PoundlistEntity poundlistEntity = poundlistService.getInfo(salesorder_item0Entity.getPoundlistId()); + if (ObjectUtils.isNotEmpty(poundlistEntity)){ + if (arinvoicesUpForm.getAmount() != null && arinvoicesUpForm.getInvoiceAmount()!=null){ + if (arinvoicesUpForm.getInvoiceAmount().compareTo(arinvoicesUpForm.getAmount()) > -1){ + poundlistEntity.setIsExpense("1");//修改销项票状态 + } + } + poundlistService.updateById(poundlistEntity); + } + } + } QueryWrapper Arinvoices_item1queryWrapper = new QueryWrapper<>(); Arinvoices_item1queryWrapper.lambda().eq(Arinvoices_item1Entity::getArinvoicesId, entity.getId()); arinvoices_item1Service.remove(Arinvoices_item1queryWrapper); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java index 2795f1b3..410331f8 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java @@ -109,21 +109,75 @@ public class CollectionController { String[] idList = ids.split(","); for (String id : idList) { CollectionEntity collectionEntity = collectionService.getInfo(id); - if (ObjectUtils.isNotEmpty(collectionEntity)) { - if (collectionEntity.getStatus().equals("1")) { - return ActionResult.fail("已提交,无需再次提交"); - } - if (collectionEntity.getStatus().equals("2")) { - return ActionResult.fail("已认款,无需再次提交"); - } - if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) { - return ActionResult.fail("请先输入收款金额"); + if (collectionEntity.getStatus().equals("1")){ + return ActionResult.fail("已提交"); + } + if (collectionEntity.getStatus().equals("2")){ + return ActionResult.fail("已认款"); + } + if (collectionEntity.getStatus().equals("0")) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, id); + List collection_item0EntityList = collection_item0Service.list(queryWrapper);//查询收款单子表信息 + for (Collection_item0Entity collection_item0Entity : collection_item0EntityList) { + BigDecimal sum = new BigDecimal(0); + SaleorderitemEntity saleordercetEntity = saleorderitemService.getById(collection_item0Entity.getSalesorderId());//查询销售订单信息 + if (saleordercetEntity.getAmountCollected() == null) { + saleordercetEntity.setAmountCollected(new BigDecimal(0)); + } +// if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())) { +// return ActionResult.fail("已回款金额等于金额"); +// } + if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) { + return ActionResult.fail("请先输入回款金额"); + } else { + sum = saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount()); + if (sum.compareTo(saleordercetEntity.getPrice()) > 0) { + return ActionResult.fail("总回款金额大于金额"); + } + } + QueryWrapper queryWrapper1 = new QueryWrapper<>(); + queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleordercetEntity.getId()); + List list = salesorder_item0Service.list(queryWrapper1); + List poundlist = new ArrayList<>(); + for (Salesorder_item0Entity saleItem : list){ + PoundlistEntity poundlistEntity = collectionService.queryPoundInfo(saleItem.getPoundlistId()); + if (ObjectUtils.isNotEmpty(poundlistEntity)) { + poundlist.add(poundlistEntity); + } + } + if (poundlist.size() > 0) { + poundlist = poundlist.stream().sorted(Comparator.comparing(PoundlistEntity::getAdvance).reversed() + .thenComparing(Comparator.comparing(PoundlistEntity::getPoundDate))).collect(Collectors.toList()); + }else{ + return ActionResult.fail("磅单为空"); + } + BigDecimal amount = new BigDecimal(0); + List poundlist1 = new ArrayList<>(); + for (PoundlistEntity pound : poundlist){ + if (pound.getSalesPrice()!=null && pound.getSettlement()!=null) { + amount = amount.add(pound.getSalesPrice().multiply(pound.getSettlement())); + if (amount.compareTo(sum) < 1) { + poundlist1.add(pound); + }else{ + break; + } + } + } + for (PoundlistEntity poundlistEntity : poundlist1){ + poundlistEntity.setIsCollection("1"); + if (poundlistEntity.getPaymentDate() == null){ + poundlistEntity.setPaymentDate(new Date()); + } + poundlistService.updateById(poundlistEntity); + } + saleordercetEntity.setAmountCollected(sum); +// saleordercetEntity.setStatus("3"); + saleorderitemService.updateById(saleordercetEntity); + collectionEntity.setStatus("1"); + collectionService.updateById(collectionEntity); + return ActionResult.success("提交成功"); } - collectionEntity.setStatus("1"); - collectionService.updateById(collectionEntity); - return ActionResult.success("提交成功"); - } else { - return ActionResult.fail("数据为空"); } } return ActionResult.fail("请选择一条数据"); @@ -140,83 +194,24 @@ public class CollectionController { public ActionResult confirmPrice(@PathVariable("ids") String ids) { String[] idList = ids.split(","); for (String id : idList) { - CollectionEntity collectionEntity = collectionService.getInfo(id); - if (collectionEntity.getStatus().equals("0")){ - return ActionResult.fail("提交中"); - } - if (collectionEntity.getStatus().equals("2")){ - return ActionResult.fail("已认款"); - } - if (collectionEntity.getStatus().equals("1")) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, id); - List collection_item0EntityList = collection_item0Service.list(queryWrapper);//查询收款单子表信息 - for (Collection_item0Entity collection_item0Entity : collection_item0EntityList) { - BigDecimal sum = new BigDecimal(0); - SaleorderitemEntity saleordercetEntity = saleorderitemService.getById(collection_item0Entity.getSalesorderId());//查询销售订单信息 - if (saleordercetEntity.getAmountCollected() == null) { - saleordercetEntity.setAmountCollected(new BigDecimal(0)); - } - if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())) { - return ActionResult.fail("已回款金额等于金额"); - } - if (saleordercetEntity.getAmountCollected() != null && collection_item0Entity.getAmount() != null) { - sum = saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount()); - if (sum.compareTo(saleordercetEntity.getPrice()) > 0) { - return ActionResult.fail("总回款金额大于金额"); - } -// saleordercetEntity.setAmountCollected(sum); -// saleordercetEntity.setStatus("3"); -// saleorderitemService.updateById(saleordercetEntity); - } else { - return ActionResult.fail("已回款金额或回款金额不能为空"); - } - QueryWrapper queryWrapper1 = new QueryWrapper<>(); - queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleordercetEntity.getId()); - List list = salesorder_item0Service.list(queryWrapper1); - List poundlist = new ArrayList<>(); -// List poundsort = new LinkedList<>(); - for (Salesorder_item0Entity saleItem : list){ - PoundlistEntity poundlistEntity = collectionService.queryPoundInfo(saleItem.getPoundlistId()); - if (ObjectUtils.isNotEmpty(poundlistEntity)) { - poundlist.add(poundlistEntity); - } - } - if (poundlist.size() > 0) { - poundlist = poundlist.stream().sorted(Comparator.comparing(PoundlistEntity::getAdvance).reversed() - .thenComparing(Comparator.comparing(PoundlistEntity::getPoundDate))).collect(Collectors.toList()); - }else{ - return ActionResult.fail("磅单为空"); + CollectionEntity collectionEntity = collectionService.getInfo(id); + if (ObjectUtils.isNotEmpty(collectionEntity)) { + if (collectionEntity.getStatus().equals("0")) { + return ActionResult.fail("请先提交"); } - BigDecimal amount = new BigDecimal(0); - List poundlist1 = new ArrayList<>(); - for (PoundlistEntity pound : poundlist){ - if (pound.getSalesPrice()!=null && pound.getSettlement()!=null) { - amount = amount.add(pound.getSalesPrice().multiply(pound.getSettlement())); - if (amount.compareTo(sum) < 1) { - poundlist1.add(pound); - }else{ - break; - } - } + if (collectionEntity.getStatus().equals("2")) { + return ActionResult.fail("已认款,无需再次提交"); } - for (PoundlistEntity poundlistEntity : poundlist1){ - poundlistEntity.setIsCollection("1"); - if (poundlistEntity.getPaymentDate() == null){ - poundlistEntity.setPaymentDate(new Date()); - } - saleordercetEntity.setAmountCollected(sum); -// saleordercetEntity.setStatus("3"); - saleorderitemService.updateById(saleordercetEntity); - poundlistService.updateById(poundlistEntity); - collectionEntity.setStatus("2"); - collectionService.updateById(collectionEntity); - return ActionResult.success("认款成功"); + if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) { + return ActionResult.fail("请先输入收款金额"); } - return ActionResult.fail("收款金额不足"); + collectionEntity.setStatus("2"); + collectionService.updateById(collectionEntity); + return ActionResult.success("认款成功"); + } else { + return ActionResult.fail("数据为空"); } } - } return ActionResult.fail("请选择一条数据"); } /** @@ -258,6 +253,18 @@ public class CollectionController { @PostMapping @Transactional public ActionResult create(@RequestBody @Valid CollectionCrForm collectionCrForm) throws DataException { + if (collectionCrForm.getCollection_item0List().size()>0) { + SaleorderitemEntity saleorderitemEntity = saleorderitemService.getInfo(collectionCrForm.getCollection_item0List().get(0).getSalesorderId()); + if (saleorderitemEntity.getAmountCollected() == null){ + saleorderitemEntity.setAmountCollected(new BigDecimal(0)); + } + if (saleorderitemEntity.getAmountCollected().equals(saleorderitemEntity.getPrice()) || + saleorderitemEntity.getAmountCollected().compareTo(saleorderitemEntity.getPrice()) == 1){ + return ActionResult.fail("已回完款,无需回款"); + } + }else { + return ActionResult.fail("销售订单不存在"); + } String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); collectionCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false)); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java index 9ce581ee..c89c6ad0 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java @@ -14,6 +14,8 @@ import jnpf.base.vo.PaginationVO; import jnpf.base.UserInfo; import jnpf.base.vo.DownloadVO; import jnpf.config.ConfigValueUtil; +import jnpf.contractfile.entity.ContractFileEntity; +import jnpf.contractfile.service.ContractFileService; import jnpf.exception.DataException; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -73,6 +75,8 @@ public class PoundlistController { @Autowired private PoundlistService poundlistService; + @Autowired + private ContractFileService contractFileService; /** * 生成销售 @@ -91,6 +95,8 @@ public class PoundlistController { queryWrapper.lambda().eq(PoundlistEntity::getSalesStatus,"99"); PoundlistEntity poundlistEntity = poundlistService.getOne(queryWrapper); if (ObjectUtils.isNotEmpty(poundlistEntity)) { + ContractFileEntity entity = contractFileService.getInfo(poundlistEntity.getSalesId()); + poundlistEntity.setContractNo(entity.getContractNo()); list.add(poundlistEntity); } } @@ -223,7 +229,6 @@ public class PoundlistController { entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); Map purchaseIdMap = new HashMap<>(); entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap)); - entity.setOriginPlace(generaterSwapUtil.provinceData(entity.getOriginPlace())); } List listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); for(PoundlistListVO poundlistVO:listVO){ @@ -291,9 +296,6 @@ public class PoundlistController { case "transportPrice" : entitys.add(new ExcelExportEntity("运费" ,"transportPrice")); break; - case "originPlace" : - entitys.add(new ExcelExportEntity("起始地" ,"originPlace")); - break; case "salesPrice" : entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice")); break; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java index 498af5ac..818ab443 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/entity/PoundlistEntity.java @@ -207,6 +207,8 @@ public class PoundlistEntity { @TableField(exist = false) private String purchaseName; + @TableField(exist = false) + private String contractNo; @TableField(exist = false) private String purchaseContractNo; } 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 76247b34..51a50f76 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 @@ -35,6 +35,7 @@ import jnpf.reservoirarea.entity.ReservoirareaEntity; import jnpf.reservoirarea.service.ReservoirareaService; import jnpf.saleorder.mapper.ReceiptoutsoitemMapper; import org.apache.commons.lang3.ObjectUtils; +import org.bytedeco.opencv.presets.opencv_core; import org.springframework.security.core.parameters.P; import org.springframework.transaction.annotation.Transactional; import jnpf.base.entity.ProvinceEntity; @@ -144,6 +145,18 @@ public class SaleorderitemController { @Autowired private Arinvoices_item1Service arinvoices_item1Service; + /** + * 修改磅单单价 + * + * @param poundlistEntity + * @return + */ + @PostMapping("/updatePrice/{id}") + public ActionResult updatePrice(@PathVariable("id") String id ,@RequestBody PoundlistEntity poundlistEntity){ + String ids = id; + PoundlistEntity entity = poundlistEntity; + return ActionResult.success("1"); + } /** * 发货 @@ -404,6 +417,9 @@ public class SaleorderitemController { saleorderitemCrForm.setCreatorTime(DateUtil.getNow()); SaleorderitemEntity entity = JsonUtil.getJsonToBean(saleorderitemCrForm, SaleorderitemEntity.class); entity.setId(mainId); + if (entity.getPrice() != null && entity.getNotPrice()!=null) { + entity.setRate(entity.getPrice().subtract(entity.getNotPrice())); + } saleorderitemService.save(entity); List Salesorder_item0List = JsonUtil.getJsonToList(saleorderitemCrForm.getSalesorder_item0List(),Salesorder_item0Entity.class); for(Salesorder_item0Entity entitys : Salesorder_item0List){ diff --git a/SC-web/src/views/scm/basicInformation/arinvoices/Form.vue b/SC-web/src/views/scm/basicInformation/arinvoices/Form.vue index a9ad1a64..32a0f7b5 100644 --- a/SC-web/src/views/scm/basicInformation/arinvoices/Form.vue +++ b/SC-web/src/views/scm/basicInformation/arinvoices/Form.vue @@ -90,7 +90,7 @@ -
-
- - - - - - - - - - 查询 - 重置 - - - - -
-
-
- 新增 - - - - - - 编辑 - - 查看 - - 审核 - - 弃审 - - 提交 - - -
-
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-=======
@@ -174,7 +64,7 @@ /> - @@ -206,7 +96,6 @@ width="150" > -
diff --git a/SC-web/src/views/scm/basicInformation/collection/Form.vue b/SC-web/src/views/scm/basicInformation/collection/Form.vue index 44d59214..79df6c19 100644 --- a/SC-web/src/views/scm/basicInformation/collection/Form.vue +++ b/SC-web/src/views/scm/basicInformation/collection/Form.vue @@ -32,7 +32,7 @@ - + @@ -120,7 +120,7 @@ @@ -396,6 +396,13 @@ created() {}, mounted() {}, methods: { + amountSum(){ + let sum = 0; + for (let i = 0; i
- 新增 + 新增 - 导出 + 导出 - 批量删除 - - 审核 - - 弃审 + 批量删除 + + + + 提交 认款 @@ -74,17 +74,17 @@ @@ -412,7 +412,25 @@ } } }, - addOrUpdateHandle(id, isDetail) { + addOrUpdateHandle(row, isDetail) { + var id = undefined; + if (row){ + id = row.id; + if(row.status != '0'){ + var msg = ''; + if(row.status == '1'){ + msg = '已提交'; + }else if(row.status == '2'){ + msg = '已认款'; + } + this.$message({ + type: 'error', + message: msg +'无法编辑', + duration: 1500 + }); + return + } + } this.formVisible = true this.$nextTick(() => { this.$refs.JNPFForm.init(id, isDetail) diff --git a/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue b/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue index fa989910..5bbe58f2 100644 --- a/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue +++ b/SC-web/src/views/scm/basicInformation/poundlist/salesForm.vue @@ -20,7 +20,7 @@ prop="contractCode" > @@ -31,7 +31,7 @@ prop="costomerCode" > @@ -60,7 +60,7 @@ + placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled> @@ -69,7 +69,7 @@ + placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled> @@ -78,7 +78,7 @@ + placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled> @@ -87,7 +87,7 @@ + placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled> @@ -181,7 +181,7 @@ placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005" :columnOptions="salesorder_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog" :excludeFields="excludeFields" - popupWidth="800px" @change="poundInfoSelect" > + popupWidth="800px" @change="poundInfoSelect" disabled> @@ -189,7 +189,7 @@ @@ -197,7 +197,7 @@ @@ -205,14 +205,14 @@ @@ -220,7 +220,7 @@ @@ -235,7 +235,7 @@ @@ -250,14 +250,14 @@ @@ -268,15 +268,15 @@ - - - + + + + + -
- 添加 -
+ + + @@ -757,13 +757,53 @@ }, mounted() {}, methods: { + editPrice(row){ + var advanceAmount = 0; + var price = 0; + var notPrice = 0; + var rate = 13; + this.taxRateOptions.forEach((item, index)=>{ + if(item.id == row.rate){ + rate = parseInt(item.fullName); + } + }); + // for (let i = 0;i{ + if(row.vehicleId == item.vehicleId){ + item.price = parseFloat(item.settlement) * parseFloat(item.unitPrice);//子表金额 + item.notPrice = item.price * (100 - rate) / 100;//子表不含税金额 + // request({ + // url: '/api/saleorder/Saleorderitem/updatePrice'+row.poundlistId, + // method: 'post', + // data: item.price + // }).then((res) => { + // this.$message({ + // message: res.msg, + // type: 'success', + // duration: 1000, + // }) + // }) + } + if(item.advance == '1'){//垫资 + advanceAmount = advanceAmount + item.price;//垫资金额 + } + price = price + item.price;//主表金额 + notPrice = notPrice + parseFloat(item.notPrice);//主表不含税金额 + }); + this.dataForm.advanceAmount = advanceAmount; + this.dataForm.price = price; + this.dataForm.notPrice = notPrice; + }, computeNoPrice(){ let notPrice = 0; for (let i = 0;i { if (this.dataForm.salesorder_item0List[i].rate == item.id) { this.dataForm.salesorder_item0List[i].noPrice = this.dataForm.salesorder_item0List[i].price*(100-item.fullName)/100 - notPrice = notPrice + this.dataForm.salesorder_item0List[i].noPrice + notPrice = notPrice + parseFloat(this.dataForm.salesorder_item0List[i].noPrice) } }) this.dataForm.notPrice = notPrice; @@ -858,22 +898,35 @@ debugger this.dataForm.contractId = list[0].salesId; this.dataForm.customerId = list[0].customerId; + this.dataForm.contractNo = list[0].contractNo; var num = 0; var amount = 0; var advance = 0; + var notPrice = 0; + var rate = 0; for (let i = 0;i { + // if (rate == item.id) { + // this.dataForm.salesorder_item0List[i].rate = item.fullName + // debugger + // this.dataForm.salesorder_item0List[i].noPrice = this.dataForm.salesorder_item0List[i].price*(100-item.fullName)/100 + // notPrice = notPrice + parseFloat(this.dataForm.salesorder_item0List[i].noPrice) + // } + // }) if (list[i].advance == 1){ advance = advance + list[i].salesPrice*list[i].settlement; } num = num + list[i].settlement; amount = amount + list[i].price; } + this.dataForm.notPrice = notPrice; this.dataForm.advanceAmount = advance; this.dataForm.num = num; this.dataForm.price = amount; + debugger this.$store.commit('generator/UPDATE_RELATION_DATA', {}) }, // 表单提交 diff --git a/SC-web/src/views/scm/basicInformation/receiptout/Form.vue b/SC-web/src/views/scm/basicInformation/receiptout/Form.vue index e07f4d70..f43458ab 100644 --- a/SC-web/src/views/scm/basicInformation/receiptout/Form.vue +++ b/SC-web/src/views/scm/basicInformation/receiptout/Form.vue @@ -2,7 +2,7 @@ + width="1500px">