From ac9365a6b411837d7c13ae3c9fa83cc30d9d9587 Mon Sep 17 00:00:00 2001 From: 17602169347 Date: Thu, 2 Mar 2023 13:48:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8A=9F=E8=83=BD?= =?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/InvoicesController.java | 4 +- .../payment/controller/PaymentController.java | 23 +- .../controller/PoundlistController.java | 33 +- .../poundlist/entity/PoundlistEntity.java | 20 + .../poundlist/mapper/PoundlistMapper.java | 4 + .../model/poundlist/PoundlistListVO.java | 147 +-- .../service/impl/PoundlistServiceImpl.java | 32 +- .../src/main/resources/PoundlistMapper.xml | 7 - .../main/resources/mapper/PoundlistMapper.xml | 22 + .../scm/basicInformation/invoices/Detail.vue | 920 +++++++++++------ .../scm/basicInformation/invoices/Form.vue | 6 +- .../scm/basicInformation/payment/Detail.vue | 725 ++++++++----- .../scm/basicInformation/paymentdoc/index.vue | 45 +- .../scm/basicInformation/poundlist/index.vue | 36 +- .../basicInformation/purchaseback/Detail.vue | 729 ++++++++----- .../purchaseorder/InvoicesForm.vue | 8 +- .../scm/basicInformation/receiptin/Detail.vue | 876 ++++++++++++---- .../basicInformation/tradeupload/Detail.vue | 968 ++++++++++++++---- .../basicInformation/tradeupload/Form2.vue | 48 +- 19 files changed, 3291 insertions(+), 1362 deletions(-) delete mode 100644 SC-boot/linkage-scm/src/main/resources/PoundlistMapper.xml create mode 100644 SC-boot/linkage-scm/src/main/resources/mapper/PoundlistMapper.xml diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/invoices/controller/InvoicesController.java b/SC-boot/linkage-scm/src/main/java/jnpf/invoices/controller/InvoicesController.java index c1dc3bb1..88e11ff4 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/invoices/controller/InvoicesController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/invoices/controller/InvoicesController.java @@ -425,8 +425,8 @@ public class InvoicesController { //更新采购订单状态 PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getPurchaseorderId()); purchaseorderEntity.setStatus("1");//开票中 - purchaseorderEntity.setInvoiceAmount(entity.getInvoiceAmount()); - purchaseorderEntity.setInvoiceNum(entity.getInvoiceQuantity()); + purchaseorderEntity.setInvoiceAmount(subentity.getInvoiceAmount()); + purchaseorderEntity.setInvoiceNum(subentity.getInvoiceQuantity()); purchaseorderService.updateById(purchaseorderEntity); List jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId()); for (Purchaseorder_item0Entity purchaseorder_item0Entity: jg_purchaseorder_item0List) { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java index ac6f604e..8a3c773c 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java @@ -206,14 +206,21 @@ public class PaymentController { UserInfo userInfo=userProvider.get(); paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false)); PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class); - entity.setId(mainId); - paymentService.save(entity); - List Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); - for(Payment_item0Entity entitys : Payment_item0List){ - entitys.setId(RandomUtil.uuId()); - entitys.setPaymentId(entity.getId()); - payment_item0Service.save(entitys); - } + entity.setId(mainId); + paymentService.save(entity); + QueryWrapper paymentdocEntityWrapper = new QueryWrapper<>(); + paymentdocEntityWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, entity.getPaymentno()); + List list = paymentdocService.list(paymentdocEntityWrapper); + for (PaymentdocEntity paymentdocEntity: list) { + paymentdocEntity.setDocStatus("3");//已付款 + paymentdocService.updateById(paymentdocEntity); + } + List Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); + for(Payment_item0Entity entitys : Payment_item0List){ + entitys.setId(RandomUtil.uuId()); + entitys.setPaymentId(entity.getId()); + payment_item0Service.save(entitys); + } 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 97ea4f71..ab814406 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 @@ -117,25 +117,26 @@ public class PoundlistController { @PostMapping("/getList") public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{ List list= poundlistService.getList(poundlistPagination); + boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); //处理id字段转名称,若无需转或者为空可删除 - for(PoundlistEntity entity:list){ + for(PoundlistEntity entity:list){ entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures())); - Map materialIdMap = new HashMap<>(); - entity.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap)); - Map customerIdMap = new HashMap<>(); - entity.setCustomerId(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap)); - Map salesIdMap = new HashMap<>(); - entity.setSalesId(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap)); - Map vehicleIdMap = new HashMap<>(); - entity.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap)); + Map materialIdMap = new HashMap<>(); + entity.setMaterialName(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap)); + Map customerIdMap = new HashMap<>(); + entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap)); + Map salesIdMap = new HashMap<>(); + entity.setSalesName(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap)); + Map vehicleIdMap = new HashMap<>(); + entity.setVehicleName(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap)); entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures())); - Map businessIdMap = new HashMap<>(); - entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); - Map naturalIdMap = new HashMap<>(); - 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)); - } + Map businessIdMap = new HashMap<>(); + entity.setBusinessName(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); + Map naturalIdMap = new HashMap<>(); + entity.setNaturalName(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); + Map purchaseIdMap = new HashMap<>(); + entity.setPurchaseName(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap)); + } List listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); for(PoundlistListVO poundlistVO:listVO){ } 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 cc1faf1c..2937460e 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 @@ -186,4 +186,24 @@ public class PoundlistEntity { @TableField("IS_EXPENSE") private String isExpense; + @TableField(exist = false) + private String materialName; + + @TableField(exist = false) + private String customerName; + + @TableField(exist = false) + private String salesName; + + @TableField(exist = false) + private String vehicleName; + + @TableField(exist = false) + private String businessName; + + @TableField(exist = false) + private String naturalName; + + @TableField(exist = false) + private String purchaseName; } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/mapper/PoundlistMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/mapper/PoundlistMapper.java index 122ca508..8b6b754d 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/mapper/PoundlistMapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/mapper/PoundlistMapper.java @@ -1,8 +1,11 @@ package jnpf.poundlist.mapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import jnpf.poundlist.entity.PoundlistEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; /** * @@ -14,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface PoundlistMapper extends BaseMapper { + IPage queryByKeyword(@Param("page") Page page, @Param("keyword") String keyword); } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/model/poundlist/PoundlistListVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/model/poundlist/PoundlistListVO.java index 9e528f38..1a5d36f5 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/model/poundlist/PoundlistListVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/model/poundlist/PoundlistListVO.java @@ -11,11 +11,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal; /** * - * + * * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-21 + * @日期: 2023-01-05 */ @Data public class PoundlistListVO{ @@ -24,45 +24,57 @@ public class PoundlistListVO{ private String id; - /** 磅单上传 **/ - @JsonProperty("poundPictures") - private String poundPictures; + /** 物料编码 **/ + @JsonProperty("materialCode") + private String materialCode; /** 物料名称 **/ - @JsonProperty("materialId") - private String materialId; + @JsonProperty("materialName") + private String materialName; + + + /** 销售合同 **/ + @JsonProperty("salesName") + private String salesName; /** 客户名称 **/ - @JsonProperty("customerId") - private String customerId; + @JsonProperty("customerName") + private String customerName; - /** 销售合同 **/ - @JsonProperty("salesId") - private String salesId; + /** 是否垫资 **/ + @JsonProperty("advance") + private String advance; - /** 车牌号 **/ - @JsonProperty("vehicleId") - private String vehicleId; + /** 销售价格 **/ + @JsonProperty("salesPrice") + private Integer salesPrice; + + /** 运输方式 **/ + @JsonProperty("transportType") + private String transportType; - /** 车辆图片 **/ - @JsonProperty("vehiclePictures") - private String vehiclePictures; + /** 运费 **/ + @JsonProperty("departmentId") + private Integer departmentId; + /** 车号 **/ + @JsonProperty("licenseNo") + private String licenseNo; - /** 磅单日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @JsonProperty("poundDate") - private Date poundDate; + /** 业务员名称 **/ + @JsonProperty("businessName") + private String businessName; - /** 磅单号 **/ - @JsonProperty("poundlistNo") - private String poundlistNo; + + /** 磅单图片 **/ + @JsonProperty("poundPictures") + private String poundPictures; /** 皮重 **/ @@ -81,47 +93,61 @@ public class PoundlistListVO{ @JsonProperty("netWeight") private Integer netWeight; - /** 单位 **/ - @JsonProperty("unit") - private String unit; + /** 备注 **/ + @JsonProperty("remark") + private String remark; - /** 运输类型 **/ - @JsonProperty("transportType") - private String transportType; + /** 司机名称 **/ + @JsonProperty("driverName") + private String driverName; - /** 是否垫资 **/ - @JsonProperty("advance") - private String advance; + /** 车辆图片 **/ + @JsonProperty("vehiclePictures") + private String vehiclePictures; - /** 运费 **/ - @JsonProperty("transportPrice") - private Integer transportPrice; + /** 制单人 **/ + @JsonProperty("creatorusername") + private String creatorusername; - /** 销售价格 **/ - @JsonProperty("salesPrice") - private Integer salesPrice; + /** 供应商ID **/ + @JsonProperty("supplierId") + private String supplierId; - /** 业务员 **/ - @JsonProperty("businessId") - private String businessId; + /** 供应商名称 **/ + @JsonProperty("supplierName") + private String supplierName; + /** 车牌号 **/ + @JsonProperty("vehicleId") + private String vehicleId; + /** 物料 **/ + @JsonProperty("materialId") + private String materialId; - /** 自然人 **/ - @JsonProperty("naturalId") - private String naturalId; + /** 磅单类型 **/ + @JsonProperty("poundType") + private String poundType; /** 采购合同 **/ + @JsonProperty("purchaseName") + private String purchaseName; + + @JsonProperty("isExamine") + private String isExamine; + + @JsonProperty("purchaseStatus") + private String purchaseStatus; + @JsonProperty("purchaseId") private String purchaseId; - - /** 供应商名称 **/ - @JsonProperty("supplierName") - private String supplierName; + /** 单位 **/ + @JsonProperty("unit") + private String unit; /** 结算重量 **/ @@ -135,32 +161,33 @@ public class PoundlistListVO{ /** 进项票日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonProperty("inputDate") private Date inputDate; /** 销项票日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonProperty("outputDate") private Date outputDate; /** 付款日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonProperty("payDate") private Date payDate; /** 回款日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonProperty("paymentDate") private Date paymentDate; - /** 备注 **/ - @JsonProperty("remark") - private String remark; + /** 磅单日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("poundDate") + private Date poundDate; @JsonProperty("isInvoicing") private String isInvoicing; @@ -172,4 +199,10 @@ public class PoundlistListVO{ /** 税率 **/ @JsonProperty("rate") private String rate; + + @JsonProperty("vehicleName") + private String vehicleName; + + @JsonProperty("naturalName") + private String naturalName; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/service/impl/PoundlistServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/service/impl/PoundlistServiceImpl.java index 780a65b9..22109a63 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/service/impl/PoundlistServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/poundlist/service/impl/PoundlistServiceImpl.java @@ -18,10 +18,8 @@ import com.baomidou.mybatisplus.annotation.TableField; import java.util.stream.Collectors; - - - - +import jnpf.vehicle.entity.VehicleEntity; +import jnpf.vehicle.service.VehicleService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.beans.factory.annotation.Autowired; @@ -49,8 +47,10 @@ public class PoundlistServiceImpl extends ServiceImpl poundlistQueryWrapper=new QueryWrapper<>(); poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1"); -// poundlistQueryWrapper.lambda().eq(PoundlistEntity::getSalesStatus,"99"); boolean pcPermission = false; boolean appPermission = false; boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); @@ -77,19 +76,11 @@ public class PoundlistServiceImpl extends ServiceImpl(); - } else { - poundlistQueryWrapper = (QueryWrapper)poundlistObj; - poundlistNum++; - } - - - } - } + /*if(!isPc){ + Page page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize()); + IPage poundlistEntityIPage = poundlistMapper.queryByKeyword(page, poundlistPagination.getKeyword()); + return poundlistPagination.setData(poundlistEntityIPage.getRecords(),poundlistEntityIPage.getTotal()); + }*/ if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){ poundlistNum++; List PoundDateList = poundlistPagination.getPoundDate(); @@ -105,7 +96,6 @@ public class PoundlistServiceImpl extends ServiceImpl0){ poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList); } diff --git a/SC-boot/linkage-scm/src/main/resources/PoundlistMapper.xml b/SC-boot/linkage-scm/src/main/resources/PoundlistMapper.xml deleted file mode 100644 index c6191a5c..00000000 --- a/SC-boot/linkage-scm/src/main/resources/PoundlistMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/PoundlistMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/PoundlistMapper.xml new file mode 100644 index 00000000..e5965619 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/resources/mapper/PoundlistMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/SC-web/src/views/scm/basicInformation/invoices/Detail.vue b/SC-web/src/views/scm/basicInformation/invoices/Detail.vue index 4483105a..834e4aba 100644 --- a/SC-web/src/views/scm/basicInformation/invoices/Detail.vue +++ b/SC-web/src/views/scm/basicInformation/invoices/Detail.vue @@ -1,298 +1,642 @@ diff --git a/SC-web/src/views/scm/basicInformation/invoices/Form.vue b/SC-web/src/views/scm/basicInformation/invoices/Form.vue index a5a69a24..39a142ac 100644 --- a/SC-web/src/views/scm/basicInformation/invoices/Form.vue +++ b/SC-web/src/views/scm/basicInformation/invoices/Form.vue @@ -155,12 +155,12 @@ - + diff --git a/SC-web/src/views/scm/basicInformation/paymentdoc/index.vue b/SC-web/src/views/scm/basicInformation/paymentdoc/index.vue index 415cf521..e9d1dfad 100644 --- a/SC-web/src/views/scm/basicInformation/paymentdoc/index.vue +++ b/SC-web/src/views/scm/basicInformation/paymentdoc/index.vue @@ -29,23 +29,24 @@ - - + + + - + - + - + @@ -56,7 +57,7 @@ - + @@ -83,7 +84,7 @@ 详情 付款 + @click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.docStatus)">付款 @@ -342,17 +343,27 @@ }) }).catch(() => {}); }, - fukuanHandle(id, flowState){ + fukuanHandle(id, flowState, docStatus){ if(flowState == 2){ - this.formVisible = true - this.$nextTick(() => { - request({ - url: '/api/paymentdoc/Paymentdoc/' + id, - method: 'get' - }).then(res => { - this.$refs.JNPFForm.init(res.data) - }) - }) + if(docStatus == 0){ + this.formVisible = true + this.$nextTick(() => { + request({ + url: '/api/paymentdoc/Paymentdoc/' + id, + method: 'get' + }).then(res => { + this.$refs.JNPFForm.init(res.data) + }) + }) + }else{ + this.$message({ + type: 'error', + message: '该订单已付款', + duration: 1000 + }); + return + } + }else{ this.$message({ type: 'error', diff --git a/SC-web/src/views/scm/basicInformation/poundlist/index.vue b/SC-web/src/views/scm/basicInformation/poundlist/index.vue index cee8c1c9..8b78d8c5 100644 --- a/SC-web/src/views/scm/basicInformation/poundlist/index.vue +++ b/SC-web/src/views/scm/basicInformation/poundlist/index.vue @@ -28,7 +28,7 @@ 生成采购 - 生成销售 + 生成销售
@@ -42,13 +42,12 @@ - - - - - - - + + + + + + - + diff --git a/SC-web/src/views/scm/basicInformation/tradeupload/Detail.vue b/SC-web/src/views/scm/basicInformation/tradeupload/Detail.vue index e552740d..a4c9ed97 100644 --- a/SC-web/src/views/scm/basicInformation/tradeupload/Detail.vue +++ b/SC-web/src/views/scm/basicInformation/tradeupload/Detail.vue @@ -1,226 +1,762 @@ + diff --git a/SC-web/src/views/scm/basicInformation/tradeupload/Form2.vue b/SC-web/src/views/scm/basicInformation/tradeupload/Form2.vue index 46f981cb..f767b672 100644 --- a/SC-web/src/views/scm/basicInformation/tradeupload/Form2.vue +++ b/SC-web/src/views/scm/basicInformation/tradeupload/Form2.vue @@ -1,6 +1,6 @@