Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
God 3 years ago
parent
commit
0b33a64ee2
  1. 25
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManActualVo.java
  2. 5
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManufacturerBankFeign.java
  3. 7
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManufacturerBankFeignFallback.java
  4. 8
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleActualVo.java
  5. 12
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetails.java
  6. 13
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetailsDto.java
  7. 14
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetailsVo.java
  8. 35
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPay.java
  9. 39
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayDto.java
  10. 17
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayFeign.java
  11. 12
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayFeignFallback.java
  12. 33
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayVo.java
  13. 8
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSales.java
  14. 10
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesDetailsVo.java
  15. 13
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesDto.java
  16. 9
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyFeign.java
  17. 5
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyFeignFallback.java
  18. 1
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commonappendix/CommonAttachTypeEnum.java
  19. 12
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractInitVo.java
  20. 14
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractPageVo.java
  21. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractQuery.java
  22. 11
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContract.java
  23. 3
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContractBuscenterVo.java
  24. 4
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/CommonContractEnum.java
  25. 52
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/DictCommonEnum.java
  26. 3
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.java
  27. 14
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.xml
  28. 13
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankRest.java
  29. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankService.java
  30. 7
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml
  31. 1
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java
  32. 7
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualdetails/BaseVehicleActualDetailsMapper.xml
  33. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualdetails/BaseVehicleActualDetailsService.java
  34. 24
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayMapper.java
  35. 34
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayMapper.xml
  36. 16
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayRest.java
  37. 61
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayService.java
  38. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesMapper.xml
  39. 106
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java
  40. 3
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java
  41. 6
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.xml
  42. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyRest.java
  43. 8
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java
  44. 3
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixMapper.java
  45. 37
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixMapper.xml
  46. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixService.java
  47. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractMapper.java
  48. 19
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractMapper.xml
  49. 88
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java
  50. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java
  51. 3
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml
  52. 3
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java
  53. 5
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java
  54. 1
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml
  55. 27
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java
  56. 5
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java
  57. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordFeign.java
  58. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordFeignFallback.java
  59. 8
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.java
  60. 8
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.xml
  61. 5
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordRest.java
  62. 39
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordService.java
  63. 64
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthQuery.java
  64. 80
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java
  65. 12
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java
  66. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeignFallback.java
  67. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeign.java
  68. 9
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java
  69. 3
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.java
  70. 23
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java
  71. 65
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.java
  72. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml
  73. 106
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthRest.java
  74. 170
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java
  75. 65
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportMapper.java
  76. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportMapper.xml
  77. 100
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportRest.java
  78. 110
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportService.java
  79. 7
      anrui-scm/anrui-scm-ui/src/api/weishoumaiduan/unsold.js
  80. 20
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue
  81. 50
      anrui-scm/anrui-scm-ui/src/views/cheliang/hegezhengtaizhang/hegezhengtaizhangAdd.vue
  82. 1
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichanAdd.vue
  83. 20
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
  84. 319
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue
  85. 197
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldInfo.vue
  86. 4
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldguanli.vue
  87. 6
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/vehicle.vue
  88. 20
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
  89. 6
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/vehicle.vue
  90. 202
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanDaiBanInfo.vue
  91. 199
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanYiBanInfo.vue
  92. 308
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue
  93. 13
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/contract/CommonContractInitVo.java
  94. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeign.java
  95. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageQuery.java
  96. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageVo.java
  97. 11
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryService.java
  98. 29
      doc/databases/base_tables.sql
  99. 50
      doc/databases/scm_tables_vehicle.sql

25
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManActualVo.java

@ -0,0 +1,25 @@
package com.yxt.anrui.base.api.basemanufacturerbank;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/19 14:07
* @Description
*/
@Data
public class BaseManActualVo implements Vo {
private static final long serialVersionUID = -8356553970394175402L;
@ApiModelProperty("厂家销售通路")
private String accountName;
@ApiModelProperty("开户行")
private String depositBank;
@ApiModelProperty("收款银行账号")
private String bankAccount;
}

5
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManufacturerBankFeign.java

@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List;
/** /**
* Project: anrui-base(安瑞基础信息模块) <br/> * Project: anrui-base(安瑞基础信息模块) <br/>
@ -46,4 +47,8 @@ public interface BaseManufacturerBankFeign {
@ApiOperation("查看及修改回显(已测试)") @ApiOperation("查看及修改回显(已测试)")
@GetMapping("/selectDetails/{sid}") @GetMapping("/selectDetails/{sid}")
public ResultBean<BaseManufacturerBankVo> selectDetails(@PathVariable("sid") String sid); public ResultBean<BaseManufacturerBankVo> selectDetails(@PathVariable("sid") String sid);
@ApiOperation("未售买断获取厂家销售通路")
@GetMapping("/actualList/{useOrgSid}")
ResultBean<List<BaseManActualVo>> actualList(@PathVariable("useOrgSid") String useOrgSid);
} }

7
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basemanufacturerbank/BaseManufacturerBankFeignFallback.java

@ -3,6 +3,8 @@ package com.yxt.anrui.base.api.basemanufacturerbank;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
/** /**
* Project: anrui-base(安瑞基础信息模块) <br/> * Project: anrui-base(安瑞基础信息模块) <br/>
* File: BaseManufacturerBankFeignFallback.java <br/> * File: BaseManufacturerBankFeignFallback.java <br/>
@ -28,4 +30,9 @@ public class BaseManufacturerBankFeignFallback implements BaseManufacturerBankFe
public ResultBean<BaseManufacturerBankVo> selectDetails(String sid) { public ResultBean<BaseManufacturerBankVo> selectDetails(String sid) {
return null; return null;
} }
@Override
public ResultBean<List<BaseManActualVo>> actualList(String useOrgSid) {
return null;
}
} }

8
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleActualVo.java

@ -51,4 +51,12 @@ public class BaseVehicleActualVo implements Vo {
private String insideCode; private String insideCode;
@ApiModelProperty("库龄") @ApiModelProperty("库龄")
private int dayNum; private int dayNum;
@ApiModelProperty("版本")
private String vehicleVersionValue;
@ApiModelProperty("燃料")
private String fuelTypeValue;
@ApiModelProperty("变速箱")
private String gearboxTypeValue;
@ApiModelProperty("排放标准")
private String emissionStandardValue;
} }

12
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetails.java

@ -4,6 +4,7 @@ import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -31,4 +32,15 @@ public class BaseVehicleActualDetails extends BaseEntity {
private int dayNum; private int dayNum;
@ApiModelProperty("车辆数量") @ApiModelProperty("车辆数量")
private int vehicleNum; private int vehicleNum;
@ApiModelProperty("版本")
private String vehicleVersionValue;
@ApiModelProperty("燃料")
private String fuelTypeValue;
@ApiModelProperty("变速箱")
private String gearboxTypeValue;
@ApiModelProperty("排放标准")
private String emissionStandardValue;
@ApiModelProperty("买断金额")
private BigDecimal actualMoney;
} }

13
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetailsDto.java

@ -4,6 +4,7 @@ import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -31,4 +32,16 @@ public class BaseVehicleActualDetailsDto implements Dto {
@ApiModelProperty("车辆数量") @ApiModelProperty("车辆数量")
private int vehicleNum; private int vehicleNum;
@ApiModelProperty("版本")
private String vehicleVersionValue;
@ApiModelProperty("燃料")
private String fuelTypeValue;
@ApiModelProperty("变速箱")
private String gearboxTypeValue;
@ApiModelProperty("排放标准")
private String emissionStandardValue;
@ApiModelProperty("买断金额")
private String actualMoney;
} }

14
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualdetails/BaseVehicleActualDetailsVo.java

@ -4,6 +4,8 @@ import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* @Author dimengzhe * @Author dimengzhe
* @Date 2022/4/9 11:35 * @Date 2022/4/9 11:35
@ -29,4 +31,16 @@ public class BaseVehicleActualDetailsVo implements Vo {
private int dayNum; private int dayNum;
@ApiModelProperty("车辆数量") @ApiModelProperty("车辆数量")
private int vehicleNum; private int vehicleNum;
@ApiModelProperty("版本")
private String vehicleVersionValue;
@ApiModelProperty("燃料")
private String fuelTypeValue;
@ApiModelProperty("变速箱")
private String gearboxTypeValue;
@ApiModelProperty("排放标准")
private String emissionStandardValue;
@ApiModelProperty("买断金额")
private String actualMoney;
} }

35
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPay.java

@ -0,0 +1,35 @@
package com.yxt.anrui.base.api.basevehicleactualpay;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:49
* @Description
*/
@Data
public class BaseVehicleActualPay extends BaseEntity {
private static final long serialVersionUID = -3051690321206077883L;
@ApiModelProperty(value = "车辆未售买断申请sid")
private String vehicleActualSid;
@ApiModelProperty(value = "付款方式")
private String paymentType;
@ApiModelProperty(value = "付款方式key")
private String paymentTypeKey;
@ApiModelProperty(value = "厂家销售通路")
private String actualPay;
@ApiModelProperty(value = "开户行")
private String bank;
@ApiModelProperty("收款银行账号")
private String receivingAccount;
@ApiModelProperty("付款金额")
private BigDecimal payAccount;
@ApiModelProperty("付款备注")
private String payRemark;
}

39
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayDto.java

@ -0,0 +1,39 @@
package com.yxt.anrui.base.api.basevehicleactualpay;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:52
* @Description
*/
@Data
public class BaseVehicleActualPayDto implements Dto {
private static final long serialVersionUID = -7136887711471736748L;
@ApiModelProperty(value = "付款方式")
@NotBlank(message = "付款方式不能为空")
private String paymentType;
@ApiModelProperty(value = "付款方式key")
@NotBlank(message = "付款方式不能为空")
private String paymentTypeKey;
@ApiModelProperty(value = "厂家销售通路")
@NotBlank(message = "厂家销售通路不能为空")
private String actualPay;
@ApiModelProperty(value = "开户行")
@NotBlank(message = "开户行不能为空")
private String bank;
@ApiModelProperty("收款银行账号")
@NotBlank(message = "收款银行账号不能为空")
private String receivingAccount;
@ApiModelProperty("付款金额")
@NotBlank(message = "付款金额不能为空")
private String payAccount;
@ApiModelProperty("付款备注")
private String payRemark;
}

17
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayFeign.java

@ -0,0 +1,17 @@
package com.yxt.anrui.base.api.basevehicleactualpay;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:57
* @Description
*/
@FeignClient(
contextId = "anrui-base-BaseVehicleActualPay",
name = "anrui-base",
path = "v1/basevehicleactualpay",
fallback = BaseVehicleActualPayFeignFallback.class)
public interface BaseVehicleActualPayFeign {
}

12
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayFeignFallback.java

@ -0,0 +1,12 @@
package com.yxt.anrui.base.api.basevehicleactualpay;
import org.springframework.stereotype.Component;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:58
* @Description
*/
@Component
public class BaseVehicleActualPayFeignFallback {
}

33
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualpay/BaseVehicleActualPayVo.java

@ -0,0 +1,33 @@
package com.yxt.anrui.base.api.basevehicleactualpay;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/19 13:36
* @Description
*/
@Data
public class BaseVehicleActualPayVo implements Vo {
private static final long serialVersionUID = 7103772117018168626L;
@ApiModelProperty(value = "付款方式")
private String paymentType;
@ApiModelProperty(value = "付款方式key")
private String paymentTypeKey;
@ApiModelProperty(value = "厂家销售通路")
private String actualPay;
@ApiModelProperty(value = "开户行")
private String bank;
@ApiModelProperty("收款银行账号")
private String receivingAccount;
@ApiModelProperty("付款金额")
private String payAccount;
@ApiModelProperty("付款备注")
private String payRemark;
private String sid;
}

8
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSales.java

@ -29,5 +29,13 @@ public class BaseVehicleActualSales extends BaseEntity {
@ApiModelProperty("未售买断费用") @ApiModelProperty("未售买断费用")
private String money; private String money;
@ApiModelProperty("是否需要付款:1是,0否")
private String isPay;
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("分公司sid")
private String useOrgSid;
} }

10
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesDetailsVo.java

@ -1,6 +1,7 @@
package com.yxt.anrui.base.api.basevehicleactualsales; package com.yxt.anrui.base.api.basevehicleactualsales;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo;
import com.yxt.common.core.vo.Vo; import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -26,6 +27,7 @@ public class BaseVehicleActualSalesDetailsVo implements Vo {
private String reason; private String reason;
@ApiModelProperty(value = "车辆列表") @ApiModelProperty(value = "车辆列表")
private List<BaseVehicleActualDetailsVo> detailsList = new ArrayList<>(); private List<BaseVehicleActualDetailsVo> detailsList = new ArrayList<>();
private List<BaseVehicleActualPayVo> detailsPayList = new ArrayList<>();
@ApiModelProperty(value = "创建人sid") @ApiModelProperty(value = "创建人sid")
private String userSid; private String userSid;
@ApiModelProperty(value = "任务id") @ApiModelProperty(value = "任务id")
@ -35,4 +37,12 @@ public class BaseVehicleActualSalesDetailsVo implements Vo {
@ApiModelProperty("未售买断费用") @ApiModelProperty("未售买断费用")
private String money; private String money;
@ApiModelProperty("是否需要付款:1是,0否")
private String isPay;
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("分公司sid")
private String useOrgSid;
} }

13
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesDto.java

@ -2,10 +2,12 @@ package com.yxt.anrui.base.api.basevehicleactualsales;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayDto;
import com.yxt.common.core.dto.Dto; import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -32,10 +34,21 @@ public class BaseVehicleActualSalesDto implements Dto {
@ApiModelProperty(value = "买断原因") @ApiModelProperty(value = "买断原因")
private String reason; private String reason;
@ApiModelProperty(value = "车辆列表") @ApiModelProperty(value = "车辆列表")
private List<BaseVehicleActualDetailsDto> detailsList; private List<BaseVehicleActualDetailsDto> detailsList;
@Valid
private List<BaseVehicleActualPayDto> detailsPayList;
@ApiModelProperty("未售买断费用") @ApiModelProperty("未售买断费用")
private String money; private String money;
@ApiModelProperty("付款金额总计")
private String payAccountAll;
@ApiModelProperty("是否需要付款:1是,0否")
private String isPay;
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("分公司sid")
private String useOrgSid;
} }

9
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyFeign.java

@ -10,10 +10,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
@ -92,4 +89,8 @@ public interface BusVehicleApplyFeign {
@ApiOperation(value = "移动端获取排产-上装信息") @ApiOperation(value = "移动端获取排产-上装信息")
@GetMapping(value = "/getVehicleApplyTopInfo/{sid}") @GetMapping(value = "/getVehicleApplyTopInfo/{sid}")
ResultBean<AppVehicleApplySzVo> getVehicleApplyTopInfo(@PathVariable("sid") String sid); ResultBean<AppVehicleApplySzVo> getVehicleApplyTopInfo(@PathVariable("sid") String sid);
@ApiOperation(value = "采购申请作废")
@PutMapping(value = "/abandonApply/{sid}")
ResultBean abandonApply(@PathVariable("sid") String sid);
} }

5
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusVehicleApplyFeignFallback.java

@ -101,4 +101,9 @@ public class BusVehicleApplyFeignFallback implements BusVehicleApplyFeign {
public ResultBean<AppVehicleApplySzVo> getVehicleApplyTopInfo(String sid) { public ResultBean<AppVehicleApplySzVo> getVehicleApplyTopInfo(String sid) {
return null; return null;
} }
@Override
public ResultBean abandonApply(String sid) {
return null;
}
} }

1
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commonappendix/CommonAttachTypeEnum.java

@ -36,6 +36,7 @@ public enum CommonAttachTypeEnum {
* 260009_11放款文件_首付款证明 * 260009_11放款文件_首付款证明
*/ */
CONTRACT("0001", "合同"), CONTRACT("0001", "合同"),
CONTRACT_UPLOAD("0001_1", "合同下载"),
CREDIT("0002", "人行征信"), CREDIT("0002", "人行征信"),
INVOICE("0003", "开票申请附件"), INVOICE("0003", "开票申请附件"),
INVOICE_KHKPSQS("0003_1", "客户开票申请书"), INVOICE_KHKPSQS("0003_1", "客户开票申请书"),

12
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractInitVo.java

@ -4,6 +4,7 @@ import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Data @Data
@ -31,13 +32,13 @@ public class AppCommonContractInitVo implements Vo {
private String contractPrice; private String contractPrice;
@ApiModelProperty("新车买卖合同") @ApiModelProperty("新车买卖合同")
private List<String> contractImages; private List<String> contractImages = new ArrayList<>();
@ApiModelProperty("现场签署图片") @ApiModelProperty("现场签署图片")
private List<String> siteSigImages; private List<String> siteSigImages = new ArrayList<>();
@ApiModelProperty("身份证图片") @ApiModelProperty("身份证图片")
private List<String> idCardImages; private List<String> idCardImages = new ArrayList<>();
@ApiModelProperty("客户类型") @ApiModelProperty("客户类型")
private String customerKey; private String customerKey;
@ -66,5 +67,10 @@ public class AppCommonContractInitVo implements Vo {
@ApiModelProperty("身份证图片") @ApiModelProperty("身份证图片")
private String idImagesUrl; private String idImagesUrl;
@ApiModelProperty("配置sid")
private String configSid;
@ApiModelProperty("车型sid")
private String modelSid;
} }

14
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractPageVo.java

@ -1,10 +1,14 @@
package com.yxt.anrui.base.api.commoncontract; package com.yxt.anrui.base.api.commoncontract;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.vo.Vo; import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data @Data
public class AppCommonContractPageVo implements Vo { public class AppCommonContractPageVo implements Vo {
@ -36,5 +40,15 @@ public class AppCommonContractPageVo implements Vo {
@ApiModelProperty("节点状态") @ApiModelProperty("节点状态")
private String nodeState; private String nodeState;
private List<PrintConfirmVo> files = new ArrayList<>();
@ApiModelProperty("是否显示下载")
private Boolean isShowDownload;
@JsonIgnore
private String commonContractUrl;
@JsonProperty("number")
private String num;
} }

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/AppCommonContractQuery.java

@ -29,7 +29,7 @@ public class AppCommonContractQuery implements Query {
@ApiModelProperty("状态") @ApiModelProperty("状态")
private String type; private String type;
@ApiModelProperty("") @ApiModelProperty("客户")
private String names; private String names;
@ApiModelProperty("分公司sid") @ApiModelProperty("分公司sid")

11
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContract.java

@ -29,8 +29,6 @@ import java.util.Date;
public class CommonContract extends BaseEntity { public class CommonContract extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("合同编号(合同类型+部门编码+yyyyMMdd+001)") @ApiModelProperty("合同编号(合同类型+部门编码+yyyyMMdd+001)")
private String contractNo; private String contractNo;
@ -40,6 +38,11 @@ public class CommonContract extends BaseEntity {
@ApiModelProperty("合同类型") @ApiModelProperty("合同类型")
private String contractType; private String contractType;
@ApiModelProperty("客户类型")
private String customerType;
@ApiModelProperty("客户类型key")
private String customerTypeKey;
@ApiModelProperty("客户sid") @ApiModelProperty("客户sid")
private String customerSid; private String customerSid;
@ -109,8 +112,8 @@ public class CommonContract extends BaseEntity {
private String procInstId; private String procInstId;
@ApiModelProperty(value = "任务id") @ApiModelProperty(value = "任务id")
private String taskId; private String taskId;
@ApiModelProperty("生成的合同的url")
private String commonContractUrl;
private String configSid; private String configSid;
private String commonContractUrl;
} }

3
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/commoncontract/CommonContractBuscenterVo.java

@ -87,7 +87,4 @@ public class CommonContractBuscenterVo implements Vo {
@ApiModelProperty("附件文件") @ApiModelProperty("附件文件")
private List<CommonAppendixVo> pcCommonAppendixDtoList; private List<CommonAppendixVo> pcCommonAppendixDtoList;
private String commonContractUrl;
} }

4
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/CommonContractEnum.java

@ -14,8 +14,8 @@ public class CommonContractEnum {
/** /**
* 新车买卖合同 * 新车买卖合同
*/ */
DC_CONTRACT("010", "新车买卖合同(订车)"), DC_CONTRACT("010", "新车买卖合同(订车)"),
XC_CONTRACT("009", "新车买卖合同(现车)"); XC_CONTRACT("009", "新车买卖合同(现车)");
/** /**
* code值 * code值

52
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/DictCommonEnum.java

@ -26,4 +26,56 @@ public class DictCommonEnum {
this.remarks = remarks; this.remarks = remarks;
} }
} }
/**
* 客户类型
*/
@Getter
public static enum customerType {
GR_TYPE("1", "个人"),
QY_TYPE("2", "企业"),
;
private final String code;
private final String remarks;
customerType(String code, String remarks) {
this.code = code;
this.remarks = remarks;
}
}
@Getter
public static enum dueBank {
HK_TYPE("1", "回款账户"),
DJ_TYPE("2", "订金账户"),
XL_TYPE("3", "销量保证金"),
QY_TYPE("4", "牵引车回款账户"),
;
private final String code;
private final String remarks;
dueBank(String code, String remarks) {
this.code = code;
this.remarks = remarks;
}
}
/**
* 款项名称
*/
@Getter
public static enum costType {
CG_TYPE("001", "排产"),
WC_TYPE("002", "外采"),
MD_TYPE("003", "买断"),
;
private final String code;
private final String remarks;
costType(String code, String remarks) {
this.code = code;
this.remarks = remarks;
}
}
} }

3
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.java

@ -1,6 +1,7 @@
package com.yxt.anrui.base.biz.basemanufacturerbank; package com.yxt.anrui.base.biz.basemanufacturerbank;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManActualVo;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBank; import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBank;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankVo; import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankVo;
import com.yxt.anrui.base.api.busvehicleapply.BusApplyVo; import com.yxt.anrui.base.api.busvehicleapply.BusApplyVo;
@ -59,4 +60,6 @@ public interface BaseManufacturerBankMapper extends BaseMapper<BaseManufacturerB
void deleteByMainSid(String sid); void deleteByMainSid(String sid);
List<BusApplyVo> selectByApplySid(String modelSid); List<BusApplyVo> selectByApplySid(String modelSid);
List<BaseManActualVo> actualList(@Param("useOrgSid") String useOrgSid, @Param("code") String code);
} }

14
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.xml

@ -64,6 +64,18 @@
left join base_manufacturer bm on bm.sid = bmb.manufacturerSid left join base_manufacturer bm on bm.sid = bmb.manufacturerSid
left join base_vehicle_brand bvb on bvb.manufacturerSid = bm.sid left join base_vehicle_brand bvb on bvb.manufacturerSid = bm.sid
left join base_vehicle_model bvm on bvm.carBrand = bvb.sid left join base_vehicle_model bvm on bvm.carBrand = bvb.sid
where bvm.sid = #{modelSid} and bmb.dueBankKey = '2' where bvm.sid = #{modelSid}
and bmb.dueBankKey = '2'
</select>
<select id="actualList" resultType="com.yxt.anrui.base.api.basemanufacturerbank.BaseManActualVo">
select bmb.accountName,
bmb.depositBank,
bmb.bankAccount
from base_manufacturer_bank bmb
left join base_manufacturer bm on bmb.manufacturerSid = bm.sid
where bmb.isDelete = 0
AND bm.useOrg = #{useOrgSid}
and bmb.dueBankKey = #{code}
</select> </select>
</mapper> </mapper>

13
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankRest.java

@ -1,11 +1,9 @@
package com.yxt.anrui.base.biz.basemanufacturerbank; package com.yxt.anrui.base.biz.basemanufacturerbank;
import com.yxt.anrui.base.api.basemanufacturer.BaseManufacturer; import com.yxt.anrui.base.api.basemanufacturer.BaseManufacturer;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBank; import com.yxt.anrui.base.api.basemanufacturerbank.*;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankDto;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankFeign;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankVo;
import com.yxt.anrui.base.biz.basemanufacturer.BaseManufacturerService; import com.yxt.anrui.base.biz.basemanufacturer.BaseManufacturerService;
import com.yxt.anrui.base.common.enums.DictCommonEnum;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -78,5 +76,12 @@ public class BaseManufacturerBankRest implements BaseManufacturerBankFeign {
return rb.success().setData(vo); return rb.success().setData(vo);
} }
@Override
public ResultBean<List<BaseManActualVo>> actualList(String useOrgSid) {
ResultBean<List<BaseManActualVo>> rb = ResultBean.fireFail();
List<BaseManActualVo> voList = baseManufacturerBankService.actualList(useOrgSid, DictCommonEnum.dueBank.HK_TYPE.getCode());
return rb.success().setData(voList);
}
} }

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankService.java

@ -1,5 +1,6 @@
package com.yxt.anrui.base.biz.basemanufacturerbank; package com.yxt.anrui.base.biz.basemanufacturerbank;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManActualVo;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBank; import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBank;
import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankVo; import com.yxt.anrui.base.api.basemanufacturerbank.BaseManufacturerBankVo;
import com.yxt.anrui.base.api.busvehicleapply.BusApplyVo; import com.yxt.anrui.base.api.busvehicleapply.BusApplyVo;
@ -68,4 +69,8 @@ public class BaseManufacturerBankService extends MybatisBaseService<BaseManufact
public List<BusApplyVo> selectByApplySid(String modelSid) { public List<BusApplyVo> selectByApplySid(String modelSid) {
return baseMapper.selectByApplySid(modelSid); return baseMapper.selectByApplySid(modelSid);
} }
public List<BaseManActualVo> actualList(String useOrgSid, String code) {
return baseMapper.actualList(useOrgSid,code);
}
} }

7
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml

@ -795,8 +795,11 @@
bv.insideCode, bv.insideCode,
(select count(*) from base_vehicle bvv where bvv.insideCode = bv.insideCode and (bvv.vehicleStateValue = '库存' or (select count(*) from base_vehicle bvv where bvv.insideCode = bv.insideCode and (bvv.vehicleStateValue = '库存' or
bvv.vehicleStateValue = '调入')) as vehicleNum, bvv.vehicleStateValue = '调入')) as vehicleNum,
(select datediff(now(),DATE_FORMAT(bv.priceDate,'%Y-%m-%d'))) as dayNum (select datediff(now(),DATE_FORMAT(bv.priceDate,'%Y-%m-%d'))) as dayNum,
bvm.vehicleVersionValue,
bvm.fuelTypeValue,
bvm.gearboxTypeValue,
bvm.emissionStandardValue
FROM base_vehicle bv FROM base_vehicle bv
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid`

1
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java

@ -1434,6 +1434,7 @@ public class BaseVehicleService extends MybatisBaseService<BaseVehicleMapper, Ba
if (StringUtils.isNotBlank(params.getOrderingNo())) { if (StringUtils.isNotBlank(params.getOrderingNo())) {
qw.like("bv.orderingNo", params.getOrderingNo()); qw.like("bv.orderingNo", params.getOrderingNo());
} }
qw.eq("bv.isProblemVeh",0);
} }
return qw; return qw;

7
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualdetails/BaseVehicleActualDetailsMapper.xml

@ -21,7 +21,12 @@
inboundPrice, inboundPrice,
insideCode, insideCode,
vehicleNum, vehicleNum,
dayNum dayNum,
actualMoney,
vehicleVersionValue,
fuelTypeValue,
gearboxTypeValue,
emissionStandardValue
from base_vehicle_actual_details from base_vehicle_actual_details
where vehicleActualSid = #{sid} where vehicleActualSid = #{sid}
</select> </select>

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualdetails/BaseVehicleActualDetailsService.java

@ -5,11 +5,13 @@ import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetails;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -34,6 +36,9 @@ public class BaseVehicleActualDetailsService extends MybatisBaseService<BaseVehi
baseVehicleActualDetails = new BaseVehicleActualDetails(); baseVehicleActualDetails = new BaseVehicleActualDetails();
BeanUtils.copyProperties(dto, baseVehicleActualDetails, "sid"); BeanUtils.copyProperties(dto, baseVehicleActualDetails, "sid");
baseVehicleActualDetails.setVehicleActualSid(saleSid); baseVehicleActualDetails.setVehicleActualSid(saleSid);
if(StringUtils.isNotBlank(dto.getActualMoney())){
baseVehicleActualDetails.setActualMoney(new BigDecimal(dto.getActualMoney()));
}
save(baseVehicleActualDetails); save(baseVehicleActualDetails);
} }
} }

24
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayMapper.java

@ -0,0 +1,24 @@
package com.yxt.anrui.base.biz.basevehicleactualpay;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:55
* @Description
*/
@Mapper
public interface BaseVehicleActualPayMapper extends BaseMapper<BaseVehicleActualPay> {
List<BaseVehicleActualPay> selectBySaleSid(String sid);
int deleteBySaleSid(String sid);
List<BaseVehicleActualPayVo> detailsList(String sid);
int deleteByActualSid(String s);
}

34
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayMapper.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxt.anrui.base.biz.basevehicleactualpay.BaseVehicleActualPayMapper">
<select id="selectBySaleSid" resultType="com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay">
select *
from base_vehicle_actual_pay
where vehicleActualSid = #{sid}
</select>
<delete id="deleteBySaleSid">
delete
from base_vehicle_actual_pay
where vehicleActualSid = #{sid}
</delete>
<select id="detailsList" resultType="com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo">
select sid,
paymentType,
paymentTypeKey,
actualPay,
bank,
receivingAccount,
payAccount,
payRemark
from base_vehicle_actual_pay
where vehicleActualSid = #{sid}
</select>
<delete id="deleteByActualSid">
delete
from base_vehicle_actual_pay
where vehicleActualSid = #{s}
</delete>
</mapper>

16
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayRest.java

@ -0,0 +1,16 @@
package com.yxt.anrui.base.biz.basevehicleactualpay;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:54
* @Description
*/
@Api(tags = "车辆未售买断管理")
@RequestMapping("v1/basevehicleactualsales")
@Controller
public class BaseVehicleActualPayRest {
}

61
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualpay/BaseVehicleActualPayService.java

@ -0,0 +1,61 @@
package com.yxt.anrui.base.biz.basevehicleactualpay;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayDto;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
/**
* @Author dimengzhe
* @Date 2022/9/19 11:55
* @Description
*/
@Service
public class BaseVehicleActualPayService extends MybatisBaseService<BaseVehicleActualPayMapper, BaseVehicleActualPay> {
@Transactional(rollbackFor = Exception.class)
public void saveDetails(List<BaseVehicleActualPayDto> detailsPayList, String sid) {
BaseVehicleActualPay baseVehicleActualPay = null;
for (BaseVehicleActualPayDto dto : detailsPayList) {
baseVehicleActualPay = new BaseVehicleActualPay();
BeanUtils.copyProperties(dto, baseVehicleActualPay, "sid");
baseVehicleActualPay.setVehicleActualSid(sid);
if(StringUtils.isNotBlank(dto.getPayAccount())){
baseVehicleActualPay.setPayAccount(new BigDecimal(dto.getPayAccount()));
}
save(baseVehicleActualPay);
}
}
public List<BaseVehicleActualPay> selectBySaleSid(String sid) {
return baseMapper.selectBySaleSid(sid);
}
public void deleteBySaleSid(String sid) {
baseMapper.deleteBySaleSid(sid);
}
@Transactional(rollbackFor = Exception.class)
public void updateListByReturnSid(String sid, List<BaseVehicleActualPayDto> detailsPayList) {
saveDetails(detailsPayList, sid);
}
public List<BaseVehicleActualPayVo> detailsList(String sid) {
return baseMapper.detailsList(sid);
}
public void deleteByActualSid(String[] sidsList) {
List<String> stringList = Arrays.asList(sidsList);
for (int i = 0; i < stringList.size(); i++) {
baseMapper.deleteByActualSid(stringList.get(i));
}
}
}

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesMapper.xml

@ -23,7 +23,10 @@
taskId, taskId,
procInstId, procInstId,
createBySid userSid, createBySid userSid,
money money,
isPay,
useOrgSid,
useOrgName
from base_vehicle_actual_sales from base_vehicle_actual_sales
where sid = #{sid} where sid = #{sid}
</select> </select>

106
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java

@ -11,6 +11,8 @@ import com.yxt.anrui.base.api.basevehicleactualdetails.AppBaseVehicleActualDetai
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetails; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetails;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsDto;
import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo; import com.yxt.anrui.base.api.basevehicleactualdetails.BaseVehicleActualDetailsVo;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPay;
import com.yxt.anrui.base.api.basevehicleactualpay.BaseVehicleActualPayVo;
import com.yxt.anrui.base.api.basevehicleactualsales.*; import com.yxt.anrui.base.api.basevehicleactualsales.*;
import com.yxt.anrui.base.api.basevehicleactualsales.flow.ActualGetNodeQuery; import com.yxt.anrui.base.api.basevehicleactualsales.flow.ActualGetNodeQuery;
import com.yxt.anrui.base.api.basevehicleactualsales.flow.ActualGetNodeVo; import com.yxt.anrui.base.api.basevehicleactualsales.flow.ActualGetNodeVo;
@ -18,7 +20,12 @@ import com.yxt.anrui.base.api.basevehicleactualsales.flow.BaseActualSalesTaskQue
import com.yxt.anrui.base.api.basevehicleactualsales.flow.SubmitActualSalesDto; import com.yxt.anrui.base.api.basevehicleactualsales.flow.SubmitActualSalesDto;
import com.yxt.anrui.base.biz.basevehicle.BaseVehicleService; import com.yxt.anrui.base.biz.basevehicle.BaseVehicleService;
import com.yxt.anrui.base.biz.basevehicleactualdetails.BaseVehicleActualDetailsService; import com.yxt.anrui.base.biz.basevehicleactualdetails.BaseVehicleActualDetailsService;
import com.yxt.anrui.base.biz.basevehicleactualpay.BaseVehicleActualPayService;
import com.yxt.anrui.base.common.enums.DictCommonEnum;
import com.yxt.anrui.base.common.enums.ManPurOrderType;
import com.yxt.anrui.base.common.enums.VehicleState; import com.yxt.anrui.base.common.enums.VehicleState;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordDto;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordFeign;
import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign;
@ -47,6 +54,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -60,6 +68,8 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
@Autowired @Autowired
private BaseVehicleActualDetailsService baseVehicleActualDetailsService; private BaseVehicleActualDetailsService baseVehicleActualDetailsService;
@Autowired
private BaseVehicleActualPayService baseVehicleActualPayService;
@Autowired @Autowired
private SysUserFeign sysUserFeign; private SysUserFeign sysUserFeign;
@ -77,6 +87,8 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
private MessageFeign messageFeign; private MessageFeign messageFeign;
@Autowired @Autowired
private AppSubsetVersionFeign appSubsetVersionFeign; private AppSubsetVersionFeign appSubsetVersionFeign;
@Autowired
private FinPaymentrecordFeign finPaymentrecordFeign;
/** /**
* 分页列表 * 分页列表
@ -148,6 +160,13 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
if (scmVehicleActualSalesDto.getDetailsList().size() > 0) { if (scmVehicleActualSalesDto.getDetailsList().size() > 0) {
baseVehicleActualDetailsService.saveDetails(scmVehicleActualSalesDto.getDetailsList(), baseVehicleActualSales.getSid()); baseVehicleActualDetailsService.saveDetails(scmVehicleActualSalesDto.getDetailsList(), baseVehicleActualSales.getSid());
} }
if ("1".equals(scmVehicleActualSalesDto.getIsPay())) {
if (scmVehicleActualSalesDto.getDetailsPayList().size() > 0) {
baseVehicleActualPayService.saveDetails(scmVehicleActualSalesDto.getDetailsPayList(), sid);
}
}
} }
} else { } else {
//编辑 //编辑
@ -165,6 +184,18 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
if (scmVehicleActualSalesDto.getDetailsList().size() > 0) { if (scmVehicleActualSalesDto.getDetailsList().size() > 0) {
baseVehicleActualDetailsService.updateListByReturnSid(sid, scmVehicleActualSalesDto.getDetailsList()); baseVehicleActualDetailsService.updateListByReturnSid(sid, scmVehicleActualSalesDto.getDetailsList());
} }
//查询pay中是否有关于sales的该条sid数据
List<BaseVehicleActualPay> scmVehicleActualPayList = baseVehicleActualPayService.selectBySaleSid(sid);
if (scmVehicleActualPayList.size() > 0) {
baseVehicleActualPayService.deleteBySaleSid(sid);
}
if ("1".equals(scmVehicleActualSalesDto.getIsPay())) {
if (scmVehicleActualSalesDto.getDetailsPayList().size() > 0) {
baseVehicleActualPayService.updateListByReturnSid(sid, scmVehicleActualSalesDto.getDetailsPayList());
}
}
} }
return rb.success().setData(sid); return rb.success().setData(sid);
} }
@ -200,7 +231,9 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
} }
vo = baseMapper.details(sid); vo = baseMapper.details(sid);
List<BaseVehicleActualDetailsVo> voList = baseVehicleActualDetailsService.detailsList(sid); List<BaseVehicleActualDetailsVo> voList = baseVehicleActualDetailsService.detailsList(sid);
List<BaseVehicleActualPayVo> voPayList = baseVehicleActualPayService.detailsList(sid);
vo.setDetailsList(voList); vo.setDetailsList(voList);
vo.setDetailsPayList(voPayList);
return rb.success().setData(vo); return rb.success().setData(vo);
} }
@ -245,12 +278,13 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResultBean delete(String[] sidsList) { public ResultBean delete(String[] sidsList) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
baseVehicleActualDetailsService.deleteByActualSid(sidsList);
//查询该sid中是否有流程不是待提交的 //查询该sid中是否有流程不是待提交的
int count = baseMapper.selectBySid(StringUtils.join(sidsList, ",")); int count = baseMapper.selectBySid(StringUtils.join(sidsList, ","));
if (count > 0) { if (count > 0) {
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败");
} }
baseVehicleActualDetailsService.deleteByActualSid(sidsList);
baseVehicleActualPayService.deleteByActualSid(sidsList);
delBySids(sidsList); delBySids(sidsList);
return rb.success().setMsg("删除成功"); return rb.success().setMsg("删除成功");
} }
@ -285,6 +319,11 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
if (r == 0) { if (r == 0) {
return rb.setMsg("操作失败!提交的数据不一致"); return rb.setMsg("操作失败!提交的数据不一致");
} }
if ("1".equals(dto.getIsPay())) {
if (new BigDecimal(dto.getMoney()).compareTo(new BigDecimal(dto.getPayAccountAll())) != 0) {
return rb.setMsg("买断费用合计与付款费用合计不一致,不允许提交");
}
}
//保存或修改未售买断申请 //保存或修改未售买断申请
ResultBean<String> resultBean = saveOrUpdateVehicleSales(dto); ResultBean<String> resultBean = saveOrUpdateVehicleSales(dto);
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {
@ -318,7 +357,7 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
//结算状态设置为预买断 //结算状态设置为预买断
List<BaseVehicleActualDetailsDto> detailsList = dto.getDetailsList(); List<BaseVehicleActualDetailsDto> detailsList = dto.getDetailsList();
for (BaseVehicleActualDetailsDto f : detailsList) { for (BaseVehicleActualDetailsDto f : detailsList) {
BaseVehicle baseVehicle = baseVehicleService.selectByVinNoAndOrgSid(f.getVinNo(),useOrgSid); BaseVehicle baseVehicle = baseVehicleService.selectByVinNoAndOrgSid(f.getVinNo(), useOrgSid);
baseVehicle.setVinNo(f.getVinNo()); baseVehicle.setVinNo(f.getVinNo());
baseVehicle.setSettlementStatus(VehicleState.BuyoutEnum.PRE_BUYOUT.getCode()); baseVehicle.setSettlementStatus(VehicleState.BuyoutEnum.PRE_BUYOUT.getCode());
baseVehicle.setSettlementStatusValue(VehicleState.BuyoutEnum.PRE_BUYOUT.getRemarks()); baseVehicle.setSettlementStatusValue(VehicleState.BuyoutEnum.PRE_BUYOUT.getRemarks());
@ -328,12 +367,12 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
baseVehicleActualSales = fetchBySid(businessSid); baseVehicleActualSales = fetchBySid(businessSid);
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo(); MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo,messageFlowVo); BeanUtil.copyProperties(ufVo, messageFlowVo);
messageFlowableQuery.setUfVo(messageFlowVo); messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap); messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(businessSid); messageFlowableQuery.setBusinessSid(businessSid);
messageFlowableQuery.setModuleName("未售买断申请"); messageFlowableQuery.setModuleName("未售买断申请");
messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName()+"提交的"+messageFlowableQuery.getModuleName()+",请审批"); messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("供应链"); messageFlowableQuery.setMsgTitle("供应链");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
return voResultBean; return voResultBean;
@ -388,10 +427,10 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
BaseVehicleActualSales baseVehicleActualSales = fetchBySid(bv.getBusinessSid()); BaseVehicleActualSales baseVehicleActualSales = fetchBySid(bv.getBusinessSid());
if (bv.getTaskId().equals(baseVehicleActualSales.getTaskId())) { if (bv.getTaskId().equals(baseVehicleActualSales.getTaskId())) {
//判断车辆的结算状态是否包含预买断的状态,如果是的话,返回审核失败 //判断车辆的结算状态是否包含预买断的状态,如果是的话,返回审核失败
Map<String,Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
Map<String,Object> appMap = new HashMap<>(); Map<String, Object> appMap = new HashMap<>();
appMap.put("sid",bv.getBusinessSid()); appMap.put("sid", bv.getBusinessSid());
variables.put("app",appMap); variables.put("app", appMap);
bv.setFormVariables(variables); bv.setFormVariables(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv);
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {
@ -399,21 +438,42 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
} }
UpdateFlowFieldVo ufVo = resultBean.getData(); UpdateFlowFieldVo ufVo = resultBean.getData();
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
if(!"Event_end".equals(ufVo.getTaskDefKey())){ if (!"Event_end".equals(ufVo.getTaskDefKey())) {
//极光推送 //极光推送
baseVehicleActualSales = fetchBySid(bv.getBusinessSid()); baseVehicleActualSales = fetchBySid(bv.getBusinessSid());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo(); MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo,messageFlowVo); BeanUtil.copyProperties(ufVo, messageFlowVo);
ufVo.setProcDefId(baseVehicleActualSales.getProcDefId()); ufVo.setProcDefId(baseVehicleActualSales.getProcDefId());
ufVo.setProcInsId(baseVehicleActualSales.getProcInstId()); ufVo.setProcInsId(baseVehicleActualSales.getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo); messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap); messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(bv.getBusinessSid()); messageFlowableQuery.setBusinessSid(bv.getBusinessSid());
messageFlowableQuery.setModuleName("未售买断申请"); messageFlowableQuery.setModuleName("未售买断申请");
messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName()+"提交的"+messageFlowableQuery.getModuleName()+",请审批"); messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("供应链"); messageFlowableQuery.setMsgTitle("供应链");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
} else {
if ("1".equals(baseVehicleActualSales.getIsPay())) {
List<BaseVehicleActualPayVo> voPayList = baseVehicleActualPayService.detailsList(baseVehicleActualSales.getSid());
for (BaseVehicleActualPayVo v : voPayList) {
FinPaymentrecordDto finPaymentrecordDto = new FinPaymentrecordDto();
finPaymentrecordDto.setApplySid(v.getSid());
finPaymentrecordDto.setPayCompanySid(baseVehicleActualSales.getUseOrgSid());
finPaymentrecordDto.setPayType(1);
finPaymentrecordDto.setCreateOrgSid(baseVehicleActualSales.getUseOrgSid());
finPaymentrecordDto.setUseOrgSid(baseVehicleActualSales.getUseOrgSid());
finPaymentrecordDto.setCost(Integer.valueOf(v.getPayAccount()));
finPaymentrecordDto.setCostTitleKey(ManPurOrderType.CostTitle.CK_COSTTITLE.getCode());
finPaymentrecordDto.setCostTitleValue(ManPurOrderType.CostTitle.CK_COSTTITLE.getRemarks());
finPaymentrecordDto.setCostTypeKey(DictCommonEnum.costType.MD_TYPE.getCode());
finPaymentrecordDto.setCostTypeValue(DictCommonEnum.costType.MD_TYPE.getRemarks());
finPaymentrecordDto.setReceiveBankAccount(v.getReceivingAccount());
finPaymentrecordDto.setReceiveCompany(v.getActualPay());
finPaymentrecordFeign.save(finPaymentrecordDto);
}
}
} }
return rb.success().setData(resultBean.getData()); return rb.success().setData(resultBean.getData());
@ -491,10 +551,10 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
} }
FlowTaskVo flowTaskVo = new FlowTaskVo(); FlowTaskVo flowTaskVo = new FlowTaskVo();
BeanUtil.copyProperties(query, flowTaskVo); BeanUtil.copyProperties(query, flowTaskVo);
Map<String,Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
Map<String,Object> appMap = new HashMap<>(); Map<String, Object> appMap = new HashMap<>();
appMap.put("sid",query.getBusinessSid()); appMap.put("sid", query.getBusinessSid());
variables.put("app",appMap); variables.put("app", appMap);
flowTaskVo.setValues(variables); flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {
@ -508,7 +568,7 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
baseVehicleActualSales = fetchBySid(query.getBusinessSid()); baseVehicleActualSales = fetchBySid(query.getBusinessSid());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo(); MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo,messageFlowVo); BeanUtil.copyProperties(ufVo, messageFlowVo);
String procId = baseVehicleActualSales.getProcInstId(); String procId = baseVehicleActualSales.getProcInstId();
ufVo.setProcInsId(procId); ufVo.setProcInsId(procId);
ufVo.setProcDefId(baseVehicleActualSales.getProcDefId()); ufVo.setProcDefId(baseVehicleActualSales.getProcDefId());
@ -519,10 +579,10 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId); ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId);
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_();
List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(",")); List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(","));
if(receiveSidList.size() == 1 && receiveSidList.get(0).equals(baseVehicleActualSales.getCreateBySid())){ if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(baseVehicleActualSales.getCreateBySid())) {
messageFlowableQuery.setMsgContent("您提交的"+messageFlowableQuery.getModuleName()+"已被驳回,请重新提交"); messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交");
}else{ } else {
messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName()+"提交的"+messageFlowableQuery.getModuleName()+",请审批"); messageFlowableQuery.setMsgContent(baseVehicleActualSales.getApplicationName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
} }
messageFlowableQuery.setMsgTitle("供应链"); messageFlowableQuery.setMsgTitle("供应链");
@ -557,7 +617,7 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
if(query.getUserSid().equals(baseVehicleActualSales.getCreateBySid())){ if (query.getUserSid().equals(baseVehicleActualSales.getCreateBySid())) {
//更新车辆状态为未买断 //更新车辆状态为未买断
String settlementStatus = VehicleState.BuyoutEnum.UN_BUYOUT.getCode(); String settlementStatus = VehicleState.BuyoutEnum.UN_BUYOUT.getCode();
String settlementStatusValue = VehicleState.BuyoutEnum.UN_BUYOUT.getRemarks(); String settlementStatusValue = VehicleState.BuyoutEnum.UN_BUYOUT.getRemarks();
@ -633,7 +693,9 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
map.put("selectType", 0); map.put("selectType", 0);
appSubVersionVo.setJson(JSONObject.toJSONString(map)); appSubVersionVo.setJson(JSONObject.toJSONString(map));
BeanUtil.copyProperties(appSubVersionVo, appVehicleVersionVo); BeanUtil.copyProperties(appSubVersionVo, appVehicleVersionVo);
vos.setCarDetailPage(appVehicleVersionVo);});} vos.setCarDetailPage(appVehicleVersionVo);
});
}
vo.setRecords(records); vo.setRecords(records);
return rb.success().setData(vo); return rb.success().setData(vo);
} }

3
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApply; import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApply;
import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApplyVo; import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApplyVo;
import com.yxt.anrui.base.api.busvehicleapply.app.AppVehicleApplyVo; import com.yxt.anrui.base.api.busvehicleapply.app.AppVehicleApplyVo;
import com.yxt.common.core.result.ResultBean;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -39,4 +40,6 @@ public interface BusVehicleApplyMapper extends BaseMapper<BusVehicleApply> {
BusVehicleApply selectByCode(String code); BusVehicleApply selectByCode(String code);
AppVehicleApplyVo getVehicleApply(String sid); AppVehicleApplyVo getVehicleApply(String sid);
ResultBean abandonApply(String sid);
} }

6
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.xml

@ -78,4 +78,10 @@
from bus_vehicle_apply ba from bus_vehicle_apply ba
where sid = #{sid} where sid = #{sid}
</select> </select>
<update id="abandonApply">
update bus_vehicle_apply
set nodeState = '作废'
where sid = #{sid}
</update>
</mapper> </mapper>

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyRest.java

@ -113,5 +113,10 @@ public class BusVehicleApplyRest implements BusVehicleApplyFeign {
return busVehicleApplyService.getVehicleApplyTopInfo(sid); return busVehicleApplyService.getVehicleApplyTopInfo(sid);
} }
@Override
public ResultBean abandonApply(String sid) {
return busVehicleApplyService.abandonApply(sid);
}
} }

8
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java

@ -519,8 +519,8 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
finPaymentrecordDto.setCost(busVehicleApply.getCurrentAmount().intValue()); finPaymentrecordDto.setCost(busVehicleApply.getCurrentAmount().intValue());
finPaymentrecordDto.setCostTitleKey(ManPurOrderType.CostTitle.DJ_COSTTITLE.getCode()); finPaymentrecordDto.setCostTitleKey(ManPurOrderType.CostTitle.DJ_COSTTITLE.getCode());
finPaymentrecordDto.setCostTitleValue(ManPurOrderType.CostTitle.DJ_COSTTITLE.getRemarks()); finPaymentrecordDto.setCostTitleValue(ManPurOrderType.CostTitle.DJ_COSTTITLE.getRemarks());
finPaymentrecordDto.setCostTypeKey("001"); finPaymentrecordDto.setCostTypeKey(DictCommonEnum.costType.CG_TYPE.getCode());
finPaymentrecordDto.setCostTypeValue("排产"); finPaymentrecordDto.setCostTypeValue(DictCommonEnum.costType.CG_TYPE.getRemarks());
//查询收款单位和收款账号 //查询收款单位和收款账号
List<BusVehicleApplyDetailVo> busVehicleApplyDetailList = busVehicleApplyDetailService.fetchByApplySid(busVehicleApply.getSid()); List<BusVehicleApplyDetailVo> busVehicleApplyDetailList = busVehicleApplyDetailService.fetchByApplySid(busVehicleApply.getSid());
String modelSid = busVehicleApplyDetailList.get(0).getVehicleSid(); String modelSid = busVehicleApplyDetailList.get(0).getVehicleSid();
@ -825,4 +825,8 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
vo.setPlateThicknessSize("底 " + vo.getPlateThicknessBottom() + " mm,边 " + vo.getPlateThicknessEdge() + " mm"); vo.setPlateThicknessSize("底 " + vo.getPlateThicknessBottom() + " mm,边 " + vo.getPlateThicknessEdge() + " mm");
return rb.success().setData(vo); return rb.success().setData(vo);
} }
public ResultBean abandonApply(String sid) {
return baseMapper.abandonApply(sid);
}
} }

3
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixMapper.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.base.api.commonappendix.CommonAppendix; import com.yxt.anrui.base.api.commonappendix.CommonAppendix;
import com.yxt.anrui.base.api.commonappendix.CommonAppendixVo; import com.yxt.anrui.base.api.commonappendix.CommonAppendixVo;
import com.yxt.anrui.base.api.commoncontract.PrintConfirmVo;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -63,4 +64,6 @@ public interface CommonAppendixMapper extends BaseMapper<CommonAppendix> {
@Select("SELECT * FROM common_appendix WHERE filePath =#{s}") @Select("SELECT * FROM common_appendix WHERE filePath =#{s}")
CommonAppendixVo fetchByFilePath(String s); CommonAppendixVo fetchByFilePath(String s);
List<PrintConfirmVo> selectByType(@Param("sid") String sid, @Param("attachType") String attachType,@Param("path") String path);
} }

37
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixMapper.xml

@ -4,25 +4,33 @@
<!-- <where> ${ew.sqlSegment} </where>--> <!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} --> <!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo"> <select id="selectPageVo" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo">
SELECT * FROM common_appendix SELECT *
<where>${ew.sqlSegment}</where> FROM common_appendix
<where>
${ew.sqlSegment}
</where>
</select> </select>
<select id="selectListAllVo" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo"> <select id="selectListAllVo" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo">
SELECT * FROM common_appendix SELECT *
<where>${ew.sqlSegment}</where> FROM common_appendix
<where>
${ew.sqlSegment}
</where>
</select> </select>
<select id="selectByLinkSid" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo"> <select id="selectByLinkSid" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo">
select * from common_appendix where linkSid=#{linkSid} select *
<if test="attachType !=null and attachType != ''"> from common_appendix where linkSid = #{linkSid}
and attachType=#{attachType} <if test="attachType != null and attachType != ''">
and attachType = #{attachType}
</if> </if>
</select> </select>
<delete id="deleteByLinkSid"> <delete id="deleteByLinkSid">
DELETE FROM common_appendix DELETE
WHERE linkSid=#{linkSid} FROM common_appendix
<if test="attachType != null and attachType !=''"> WHERE linkSid = #{linkSid}
AND attachType=#{attachType} <if test="attachType != null and attachType != ''">
AND attachType = #{attachType}
</if> </if>
</delete> </delete>
<select id="getPcAppendix" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo"> <select id="getPcAppendix" resultType="com.yxt.anrui.base.api.commonappendix.CommonAppendixVo">
@ -72,4 +80,11 @@
GROUP BY attachType GROUP BY attachType
ORDER BY id ORDER BY id
</select> </select>
<select id="selectByType" resultType="com.yxt.anrui.base.api.commoncontract.PrintConfirmVo">
select fileName as name,concat(#{path},filePath) as downloadUrl
from common_appendix
where attachType = #{attachType}
and linkSid = #{sid}
</select>
</mapper> </mapper>

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commonappendix/CommonAppendixService.java

@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.commonappendix.*; import com.yxt.anrui.base.api.commonappendix.*;
import com.yxt.anrui.base.api.commoncontract.PrintConfirmVo;
import com.yxt.anrui.crm.api.crmvisit.CrmVisitFeign; import com.yxt.anrui.crm.api.crmvisit.CrmVisitFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
@ -478,4 +479,8 @@ public class CommonAppendixService extends MybatisBaseService<CommonAppendixMapp
CommonAppendixVo commonAppendixVo = baseMapper.fetchByFilePath(s); CommonAppendixVo commonAppendixVo = baseMapper.fetchByFilePath(s);
return rb.success().setData(commonAppendixVo); return rb.success().setData(commonAppendixVo);
} }
public List<PrintConfirmVo> selectByType(String sid, String attachType,String path) {
return baseMapper.selectByType(sid,attachType,path);
}
} }

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractMapper.java

@ -68,7 +68,7 @@ public interface CommonContractMapper extends BaseMapper<CommonContract> {
CommonContractBuscenterVo selectByBusSid(String busSid); CommonContractBuscenterVo selectByBusSid(String busSid);
IPage<AppCommonContractPageVo> getContractList(IPage<CommonContract> page, @Param(Constants.WRAPPER) QueryWrapper<CommonContract> qw); IPage<AppCommonContractPageVo> getContractList(IPage<CommonContract> page, @Param(Constants.WRAPPER) QueryWrapper<CommonContract> qw,@Param("names")String names);
/** /**
* 移动端-初始化合同审核 * 移动端-初始化合同审核

19
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractMapper.xml

@ -76,10 +76,21 @@
staffName as handler, staffName as handler,
contractAmount AS contractPrice, contractAmount AS contractPrice,
if(length(nodeState) > 0, nodeState, '待提交') as nodeState, if(length(nodeState) > 0, nodeState, '待提交') as nodeState,
if(length(nodeState) > 0, false , true ) as isShowUpdate if(length(nodeState) > 0, false, true) as isShowUpdate,
commonContractUrl,
num
FROM common_contract FROM common_contract
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
<if test="names != null and names != ''">
and concat(IFNULL(contractNo
, '')
, ifnull(partyB
, '')) LIKE concat('%'
, #{names}
, '%')
</if>
order by id
</where> </where>
</select> </select>
@ -95,9 +106,13 @@
customerSid, customerSid,
appdixUrl, appdixUrl,
sceneSignUrl, sceneSignUrl,
idImagesUrl,
taskId, taskId,
procInstId as procInsId, procInstId as procInsId,
staffSid as userSid staffSid as userSid,
customerTypeKey as customerKey,
modelSid,
configSid
FROM common_contract FROM common_contract
WHERE sid = #{contractSid} WHERE sid = #{contractSid}
</select> </select>

88
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.yxt.anrui.base.api.commonappendix.CommonAppendix; import com.yxt.anrui.base.api.commonappendix.CommonAppendix;
import com.yxt.anrui.base.api.commonappendix.CommonAttachTypeEnum;
import com.yxt.anrui.base.api.commoncontract.*; import com.yxt.anrui.base.api.commoncontract.*;
import com.yxt.anrui.base.api.commoncontract.flowable.AppSubmitContractInfoDto; import com.yxt.anrui.base.api.commoncontract.flowable.AppSubmitContractInfoDto;
import com.yxt.anrui.base.api.commoncontract.flowable.CommonContractNodeQuery; import com.yxt.anrui.base.api.commoncontract.flowable.CommonContractNodeQuery;
@ -986,33 +987,32 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
AppCommonContractQuery query = pagerQuery.getParams(); AppCommonContractQuery query = pagerQuery.getParams();
QueryWrapper<CommonContract> qw = appCreateQueryWrapper(query); QueryWrapper<CommonContract> qw = appCreateQueryWrapper(query);
IPage<CommonContract> page = PagerUtil.queryToPage(pagerQuery); IPage<CommonContract> page = PagerUtil.queryToPage(pagerQuery);
IPage<AppCommonContractPageVo> iPage = baseMapper.getContractList(page, qw); IPage<AppCommonContractPageVo> iPage = baseMapper.getContractList(page, qw, query.getNames());
List<AppCommonContractPageVo> records = iPage.getRecords();
records.removeAll(Collections.singleton(null));
if (!records.isEmpty()) {
for (AppCommonContractPageVo vo : records) {
String sid = vo.getContractSid();
//根据sid查询合同
List<PrintConfirmVo> list = commonAppendixService.selectByType(sid, CommonAttachTypeEnum.CONTRACT_UPLOAD.getAttachType(), docPdfComponent.getPrefixTemplateUrl());
vo.setFiles(list);
if (StringUtils.isNotBlank(vo.getCommonContractUrl())) {
vo.setIsShowDownload(true);
} else {
vo.setIsShowDownload(false);
}
}
}
PagerVo<AppCommonContractPageVo> p = PagerUtil.pageToVo(iPage, null); PagerVo<AppCommonContractPageVo> p = PagerUtil.pageToVo(iPage, null);
return p; return p;
} }
private QueryWrapper<CommonContract> appCreateQueryWrapper(AppCommonContractQuery query) { private QueryWrapper<CommonContract> appCreateQueryWrapper(AppCommonContractQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<CommonContract> qw = new QueryWrapper<>(); QueryWrapper<CommonContract> qw = new QueryWrapper<>();
// if (StringUtils.isNotBlank(query.getType())) { //合同类型
// qw.eq("contractTypeKey", query.getType());
// }
if (StringUtils.isNotBlank(query.getNames())) { // 甲方名称
qw.like("partyA", query.getNames());
}
if (StringUtils.isNotBlank(query.getNames())) { // 乙方名称
qw.like("partyB", query.getNames());
}
if (StringUtils.isNotBlank(query.getNames())) { // 其他方名称
qw.like("partyC", query.getNames());
}
if (StringUtils.isNotBlank(query.getUserSid())) { // 业务员sid if (StringUtils.isNotBlank(query.getUserSid())) { // 业务员sid
qw.eq("staffSid", query.getUserSid()); qw.eq("staffSid", query.getUserSid());
} }
if (StringUtils.isNotBlank(query.getType())) { // 业务员sid if (StringUtils.isNotBlank(query.getType())) {
qw.eq("state", query.getType()); qw.eq("state", query.getType());
} }
return qw; return qw;
@ -1049,10 +1049,16 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
vo.setSiteSigImages(siteSig); vo.setSiteSigImages(siteSig);
} }
if (StringUtils.isNotBlank(vo.getCustomerKey())) { if (StringUtils.isNotBlank(vo.getCustomerKey())) {
if (vo.getCustomerKey().equals("1")) { if ("1".equals(vo.getCustomerKey())) {
//查询客户的档案库中是否有图片
ResultBean<List<String>> resultBean = crmCustomerTempFeign.selectCustomerFile(vo.getCustomerSid());
List<String> stringList = resultBean.getData();
if (stringList.size() > 0) {
vo.setIdCardArchives(true);
vo.setIdCardImages(stringList);
} else {
vo.setIdCardArchives(false); vo.setIdCardArchives(false);
if (StringUtils.isNotBlank(vo.getSceneSignUrl())) { if (StringUtils.isNotBlank(vo.getIdImagesUrl())) {
String[] split3 = vo.getSceneSignUrl().split(","); String[] split3 = vo.getSceneSignUrl().split(",");
List<String> idCard = new ArrayList<>(); List<String> idCard = new ArrayList<>();
List<String> idCardImages = Arrays.asList(split3); List<String> idCardImages = Arrays.asList(split3);
@ -1064,9 +1070,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
} else { } else {
vo.setIdCardImages(new ArrayList<>()); vo.setIdCardImages(new ArrayList<>());
} }
} else if (vo.getCustomerKey().equals("2")) { }
vo.setIdCardArchives(true);
// 往里添加客户档案里的身份证信息
} }
} }
return vo; return vo;
@ -1106,7 +1110,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
} }
} }
if (dto.getContractImages() != null) { if (dto.getSiteSigImages() != null) {
for (String siteSigImages : dto.getSiteSigImages()) { for (String siteSigImages : dto.getSiteSigImages()) {
if (siteSigImages.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { if (siteSigImages.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
siteSigImages = siteSigImages.replace(fileUploadComponent.getUrlPrefix(), ""); siteSigImages = siteSigImages.replace(fileUploadComponent.getUrlPrefix(), "");
@ -1116,7 +1120,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
} }
} }
if (dto.getContractImages() != null) { if (dto.getIdCardImages() != null) {
for (String idCardImage : dto.getIdCardImages()) { for (String idCardImage : dto.getIdCardImages()) {
if (idCardImage.indexOf(fileUploadComponent.getUrlPrefix()) > -1) { if (idCardImage.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
idCardImage = idCardImage.replace(fileUploadComponent.getUrlPrefix(), ""); idCardImage = idCardImage.replace(fileUploadComponent.getUrlPrefix(), "");
@ -1125,7 +1129,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
commonContract.setIdImagesUrl(s3.substring(0, s3.length() - 1)); commonContract.setIdImagesUrl(s3.substring(0, s3.length() - 1));
} }
} }
updateById(commonContract); baseMapper.updateById(commonContract);
return rb.success().setData(commonContract.getSid()); return rb.success().setData(commonContract.getSid());
} }
@ -1407,7 +1411,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
//订金 //订金
commonContract.setDeposit(new BigDecimal(depositTotal)); commonContract.setDeposit(new BigDecimal(depositTotal));
//合同金额 //合同金额
commonContract.setContractAmount(depositTotal); commonContract.setContractAmount(appOrderDetailsVo.getPriceInfo().getTotalPrice());
//合同附件 //合同附件
//身份证信息附件 //身份证信息附件
//车型sid //车型sid
@ -1422,7 +1426,35 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
//单台订金 //单台订金
commonContract.setOneDeposit(new BigDecimal(depositInfo.getDeposit())); commonContract.setOneDeposit(new BigDecimal(depositInfo.getDeposit()));
commonContract.setCommonContractUrl(finalUrl); commonContract.setCommonContractUrl(finalUrl);
commonContract.setCustomerType(appOrderDetailsVo.getCustomerType());
commonContract.setCustomerTypeKey(appOrderDetailsVo.getCustomerKey());
save(commonContract); save(commonContract);
if (list.size() > 0) {
//添加合同下载路径
for (PrintConfirmVo vo : list) {
String str = vo.getDownloadUrl();
String urlPrefix = docPdfComponent.getPrefixTemplateUrl();
String uploadPath = docPdfComponent.getUploadTemplateUrl();
CommonAppendix commonAppendix = new CommonAppendix();
commonAppendix.setLinkSid(commonContract.getSid());
commonAppendix.setAttachType(CommonAttachTypeEnum.CONTRACT_UPLOAD.getAttachType());
String pathLoc = str.replace(urlPrefix, uploadPath);
pathLoc = pathLoc.replace("/", File.separator);
File file = new File(pathLoc);
String size = "";
if (file != null) {
size = FileUploadComponent.getPrintSize(file.length());
}
String suffix = str.substring(str.lastIndexOf(".") + 1); // 文件类型
String fileName = str.substring(str.lastIndexOf("/") + 1, str.lastIndexOf(".")); // 文件名
commonAppendix.setFileName(vo.getName());
commonAppendix.setFileType(suffix);
commonAppendix.setFileSize(size);
commonAppendix.setFilePath(str.replace(urlPrefix, ""));
commonAppendix.setRemarks("合同下载");
commonAppendixService.insert(commonAppendix);
}
}
return commonContract.getSid(); return commonContract.getSid();
}); });
} }

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorder/app/order/AppOrderDetailsVo.java

@ -30,6 +30,8 @@ public class AppOrderDetailsVo implements Vo {
private String phone; private String phone;
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型")
private String customerKey; private String customerKey;
@ApiModelProperty("客户类型")
private String customerType;
@ApiModelProperty(value = "订单类型") @ApiModelProperty(value = "订单类型")
private String orderType; private String orderType;
@ApiModelProperty(value = "挂靠公司") @ApiModelProperty(value = "挂靠公司")

3
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml

@ -175,6 +175,7 @@
bo.customerName as name, bo.customerName as name,
bo.mobile as phone, bo.mobile as phone,
bo.customerClassKey as customerKey, bo.customerClassKey as customerKey,
bo.customerClass as customerType,
bo.affiliatedCompany as affiliated, bo.affiliatedCompany as affiliated,
bo.billingType as invoiceType, bo.billingType as invoiceType,
bo.orgName as departmentName, bo.orgName as departmentName,
@ -209,7 +210,7 @@
</update> </update>
<select id="selectNum" resultType="int"> <select id="selectNum" resultType="int">
select IFNULL(CAST(REPLACE(MAX(billNo), #{bill}, '') AS SIGNED),0) as code select IFNULL(CAST(REPLACE(MAX(billNo), #{bill}, '') AS SIGNED), 0) as code
from bus_sales_order from bus_sales_order
where billNo LIKE concat(#{bill}, '%') where billNo LIKE concat(#{bill}, '%')
</select> </select>

3
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java

@ -147,5 +147,8 @@ public interface CrmCustomerTempFeign {
@PutMapping("/saveCustomerArchives") @PutMapping("/saveCustomerArchives")
public ResultBean saveCustomerArchives(@Valid @RequestBody AppCrmCustomerTempArchivesDto dto); public ResultBean saveCustomerArchives(@Valid @RequestBody AppCrmCustomerTempArchivesDto dto);
@ResponseBody
@GetMapping("/selectCustomerFile/{customerSid}")
public ResultBean<List<String>> selectCustomerFile(@PathVariable("customerSid")String customerSid);
} }

5
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java

@ -115,5 +115,10 @@ public class CrmCustomerTempFeignFallback implements CrmCustomerTempFeign {
return null; return null;
} }
@Override
public ResultBean<List<String>> selectCustomerFile(String customerSid) {
return null;
}
} }

1
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileMapper.xml

@ -26,7 +26,6 @@
ccf.dataType AS `key`, ccf.dataType AS `key`,
ccf.fileName AS title, ccf.fileName AS title,
createTime createTime
-- (SELECT MAX(cf.createTime) FROM crm_file cf WHERE cf.linkSid = ccf.sid) AS createTime
FROM crm_customer_file ccf FROM crm_customer_file ccf
WHERE ccf.linkSid = #{customerSid} WHERE ccf.linkSid = #{customerSid}
</select> </select>

27
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java

@ -32,8 +32,6 @@ import com.yxt.anrui.base.api.basedatalist.BaseDataListFeign;
import com.yxt.anrui.base.api.basedatalist.BaseDataListVo; import com.yxt.anrui.base.api.basedatalist.BaseDataListVo;
import com.yxt.anrui.base.api.commonappendix.CommonAttachTypeEnum; import com.yxt.anrui.base.api.commonappendix.CommonAttachTypeEnum;
import com.yxt.anrui.crm.api.crmcustomerfile.*; import com.yxt.anrui.crm.api.crmcustomerfile.*;
import com.yxt.anrui.crm.api.crmcustomerfile.AppCrmCustomerTempArchivesDto;
import com.yxt.anrui.crm.api.crmcustomerfile.AppCustomerArchivesDataDto;
import com.yxt.anrui.crm.api.crmfile.CrmFile; import com.yxt.anrui.crm.api.crmfile.CrmFile;
import com.yxt.anrui.crm.api.crmfile.CrmFileDetailsVo; import com.yxt.anrui.crm.api.crmfile.CrmFileDetailsVo;
import com.yxt.anrui.crm.api.crmfile.CrmFileDto; import com.yxt.anrui.crm.api.crmfile.CrmFileDto;
@ -41,19 +39,16 @@ import com.yxt.anrui.crm.biz.crmfile.CrmFileService;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo; import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.utils.DateUtils;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.DateUtils;
import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -311,4 +306,22 @@ public class CrmCustomerFileService extends MybatisBaseService<CrmCustomerFileMa
String dataType = "身份证"; String dataType = "身份证";
return baseMapper.selectIdImageByCustomerSid(customerSid, dataType); return baseMapper.selectIdImageByCustomerSid(customerSid, dataType);
} }
public ResultBean<List<String>> selectCustomerFile(String customerSid) {
ResultBean<List<String>> rb = ResultBean.fireFail();
List<AppCustomerArchivesDataVo> dataVos = baseMapper.selectByCustomerSid(customerSid);
List<String> list = new ArrayList<>();
if (dataVos.size() > 0) {
for (AppCustomerArchivesDataVo appCustomerArchivesDataVo : dataVos) {
String sid = appCustomerArchivesDataVo.getSid();
List<CrmFile> listVo = baseMapper.selArchivesFileImageBySid(sid);
for (CrmFile crmFile : listVo) {
String url = fileUploadComponent.getUrlPrefix() + crmFile.getFilePath();
list.add(url);
}
appCustomerArchivesDataVo.setFiles(list);
}
}
return rb.success().setData(list);
}
} }

5
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java

@ -263,5 +263,10 @@ public class CrmCustomerTempRest implements CrmCustomerTempFeign {
return crmCustomerFileService.saveCustomerArchives(dto); return crmCustomerFileService.saveCustomerArchives(dto);
} }
@Override
public ResultBean<List<String>> selectCustomerFile(String customerSid) {
return crmCustomerFileService.selectCustomerFile(customerSid);
}
} }

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordFeign.java

@ -68,4 +68,9 @@ public interface FinPaymentrecordFeign {
@PostMapping("/update") @PostMapping("/update")
@ResponseBody @ResponseBody
ResultBean update(@RequestBody FinPaymentrecordUpdateDto dto); ResultBean update(@RequestBody FinPaymentrecordUpdateDto dto);
@ApiOperation("作废")
@PutMapping("/updateState/{sid}")
@ResponseBody
ResultBean updateState(@PathVariable("sid")String sid);
} }

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordFeignFallback.java

@ -64,4 +64,9 @@ public class FinPaymentrecordFeignFallback implements FinPaymentrecordFeign {
public ResultBean update(FinPaymentrecordUpdateDto dto) { public ResultBean update(FinPaymentrecordUpdateDto dto) {
return null; return null;
} }
@Override
public ResultBean updateState(String sid) {
return null;
}
} }

8
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.java

@ -26,14 +26,14 @@
package com.yxt.anrui.fin.biz.finpaymentrecord; package com.yxt.anrui.fin.biz.finpaymentrecord;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecord;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecord;
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordVo;
import java.util.List; import java.util.List;
@ -66,4 +66,6 @@ public interface FinPaymentrecordMapper extends BaseMapper<FinPaymentrecord> {
List<String> selectApplySids(@Param("list") List<String> sids); List<String> selectApplySids(@Param("list") List<String> sids);
int updateStateBySid(@Param("sid") String sid, @Param("state") int i); int updateStateBySid(@Param("sid") String sid, @Param("state") int i);
List<String> selectApplySidBySid(List<String> sids);
} }

8
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.xml

@ -48,4 +48,12 @@
set state = #{state} set state = #{state}
where sid = #{sid} where sid = #{sid}
</update> </update>
<select id="selectApplySidBySid" resultType="java.lang.String">
select state
from fin_paymentrecord WHERE sid IN
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>

5
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordRest.java

@ -71,4 +71,9 @@ public class FinPaymentrecordRest implements FinPaymentrecordFeign {
public ResultBean update(FinPaymentrecordUpdateDto dto) { public ResultBean update(FinPaymentrecordUpdateDto dto) {
return finPaymentrecordService.updateAll(dto); return finPaymentrecordService.updateAll(dto);
} }
@Override
public ResultBean updateState(String sid) {
return finPaymentrecordService.updateState(sid);
}
} }

39
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordService.java

@ -136,6 +136,13 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
if (applySids.contains("")) { if (applySids.contains("")) {
return rb.setMsg("处理的数据包含收款账号不存在的数据"); return rb.setMsg("处理的数据包含收款账号不存在的数据");
} }
//判断是否包含已作废的
List<String> sidState = baseMapper.selectApplySidBySid(sids);
if (sidState.size() > 1) {
if (sidState.contains(3)) {
return rb.setMsg("处理的数据包含已作废的记录");
}
}
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
for (int i = 0; i < sids.size(); i++) { for (int i = 0; i < sids.size(); i++) {
FinPaymentrecord finPaymentrecord = fetchBySid(sids.get(i)); FinPaymentrecord finPaymentrecord = fetchBySid(sids.get(i));
@ -155,15 +162,14 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
} }
//推送金蝶付款单 //推送金蝶付款单
try{ try {
ApPayBill apb=createApPayBill(finPaymentrecord); ApPayBill apb = createApPayBill(finPaymentrecord);
ResultBean resultBean1 = apPayBillService.draftApPayBill(apb); ResultBean resultBean1 = apPayBillService.draftApPayBill(apb);
}catch (Exception e){ } catch (Exception e) {
log.error(e.getMessage()); log.error(e.getMessage());
} }
} }
return rb.success(); return rb.success();
} }
@ -213,17 +219,17 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
//支付类型 //支付类型
fpaybillentry.setFPayType("A"); fpaybillentry.setFPayType("A");
//付款用途 //付款用途
if(ManPurOrderType.CostTitle.DJ_COSTTITLE.getRemarks().equals(finPaymentrecord.getCostTitleValue())){ if (ManPurOrderType.CostTitle.DJ_COSTTITLE.getRemarks().equals(finPaymentrecord.getCostTitleValue())) {
//订金 //订金
fpaybillentry.setFPURPOSEID("SFKYT09_SYS"); fpaybillentry.setFPURPOSEID("SFKYT09_SYS");
}else{ } else {
//车款 //车款
fpaybillentry.setFPURPOSEID("SFKYT08_SYS"); fpaybillentry.setFPURPOSEID("SFKYT08_SYS");
} }
//结算方式 //结算方式
if("承兑".equals(finPaymentrecord.getPayWayValue())){ if ("承兑".equals(finPaymentrecord.getPayWayValue())) {
fpaybillentry.setFSETTLETYPEID("09"); fpaybillentry.setFSETTLETYPEID("09");
}else{ } else {
fpaybillentry.setFSETTLETYPEID("02"); fpaybillentry.setFSETTLETYPEID("02");
} }
FPAYBILLENTRYs.add(fpaybillentry); FPAYBILLENTRYs.add(fpaybillentry);
@ -236,4 +242,21 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
} }
} }
/**
* 作废
*
* @param sid
* @return
*/
public ResultBean updateState(String sid) {
ResultBean rb = ResultBean.fireFail();
//查询是否是未打款的
FinPaymentrecord finPaymentrecord = fetchBySid(sid);
if (finPaymentrecord.getState() == 2) {
return rb.setMsg("该记录已打款,不能作废");
}
int i = baseMapper.updateStateBySid(sid, 3);
return rb.success();
}
} }

64
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthQuery.java

@ -0,0 +1,64 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthQuery.java <br/>
* Class: com.yxt.anrui.scm.api.api.scmvehinventorymonth.ScmVehInventorymonthQuery <br/>
* Description: 月度盘库 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度盘库 查询条件", description = "月度盘库 查询条件")
public class AppScmVehInventorymonthQuery implements Query {
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("报告编号/创建人")
private String names;
@ApiModelProperty("创建日期")
private String date;
@ApiModelProperty("盘库报告sid")
private String reportSid;
@ApiModelProperty("盘库结果")
private String state;
@ApiModelProperty("使用组织名称")
private String useOrgSid;
}

80
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java

@ -0,0 +1,80 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthVo.java <br/>
* Class: com.yxt.anrui.scm.api.api.scmvehinventorymonth.ScmVehInventorymonthVo <br/>
* Description: 月度盘库 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度盘库 视图数据对象", description = "月度盘库 视图数据对象")
public class AppScmVehInventorymonthVo implements Vo {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@ApiModelProperty("剩余盘库记录数量")
private String surplusNumber;
@ApiModelProperty("盘库记录总数数量")
private String totalNumber;
@ApiModelProperty("盘亏数量")
private String lossNumber;
@ApiModelProperty("盘损数量")
private String damageNumber;
@ApiModelProperty("盘盈数量")
private String profitNumber;
@ApiModelProperty("实盘数量")
private String actualNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

12
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java

@ -25,6 +25,8 @@
*********************************************************/ *********************************************************/
package com.yxt.anrui.scm.api.scmvehinventorymonth; package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageQuery;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
@ -50,8 +52,8 @@ import java.util.List;
*/ */
@Api(tags = "月度盘库") @Api(tags = "月度盘库")
@FeignClient( @FeignClient(
contextId = "aaa-ScmVehInventorymonth", contextId = "anrui-scm-ScmVehInventorymonth",
name = "aaa", name = "anrui-scm",
path = "v1/scmvehinventorymonth", path = "v1/scmvehinventorymonth",
fallback = ScmVehInventorymonthFeignFallback.class) fallback = ScmVehInventorymonthFeignFallback.class)
public interface ScmVehInventorymonthFeign { public interface ScmVehInventorymonthFeign {
@ -81,5 +83,11 @@ public interface ScmVehInventorymonthFeign {
@ResponseBody @ResponseBody
public ResultBean getInventoryRecords(@PathVariable("userSid") String userSid); public ResultBean getInventoryRecords(@PathVariable("userSid") String userSid);
@ApiOperation("手机端-获取盘库报告列表")
@PostMapping("/getCarInventoryReportList")
@ResponseBody
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(@RequestBody PagerQuery<AppScmVehInventorymonthQuery> pagerQuery);
} }

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeignFallback.java

@ -74,4 +74,9 @@ public class ScmVehInventorymonthFeignFallback implements ScmVehInventorymonthFe
public ResultBean getInventoryRecords(String userSid) { public ResultBean getInventoryRecords(String userSid) {
return null; return null;
} }
@Override
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) {
return null;
}
} }

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeign.java

@ -50,8 +50,8 @@ import java.util.List;
*/ */
@Api(tags = "盘库报告") @Api(tags = "盘库报告")
@FeignClient( @FeignClient(
contextId = "aaa-ScmVehInventoryreport", contextId = "anrui-scm-ScmVehInventoryreport",
name = "aaa", name = "anrui-scm",
path = "v1/scmvehinventoryreport", path = "v1/scmvehinventoryreport",
fallback = ScmVehInventoryreportFeignFallback.class) fallback = ScmVehInventoryreportFeignFallback.class)
public interface ScmVehInventoryreportFeign { public interface ScmVehInventoryreportFeign {

9
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java

@ -413,7 +413,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh(); ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid"); BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid");
vinNo = scmVehicleGressionVehDto.getVehVin(); vinNo = scmVehicleGressionVehDto.getVehVin();
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vinNo).getData(); BaseVehicle baseVehicleVo = baseVehicleFeign.selectByVinNoAndOrgSid(vinNo,useOrgSid).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid()); scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid()); scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVehService.save(scmVehicleGressionVeh); scmVehicleGressionVehService.save(scmVehicleGressionVeh);
@ -432,7 +432,8 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh(); ScmVehicleGressionVeh scmVehicleGressionVeh = new ScmVehicleGressionVeh();
BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid"); BeanUtil.copyProperties(scmVehicleGressionVehDto, scmVehicleGressionVeh, "sid");
vinNo = scmVehicleGressionVehDto.getVehVin(); vinNo = scmVehicleGressionVehDto.getVehVin();
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vinNo).getData(); // BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(vinNo).getData();
BaseVehicle baseVehicleVo = baseVehicleFeign.selectByVinNoAndOrgSid(vinNo,useOrgSid).getData();
scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid()); scmVehicleGressionVeh.setVehSid(baseVehicleVo.getSid());
scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid()); scmVehicleGressionVeh.setMainSid(scmVehicleGression.getSid());
scmVehicleGressionVehService.save(scmVehicleGressionVeh); scmVehicleGressionVehService.save(scmVehicleGressionVeh);
@ -716,13 +717,15 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
return rb.setMsg(resultBean.getMsg()); return rb.setMsg(resultBean.getMsg());
} }
String businessSid = resultBean.getData(); String businessSid = resultBean.getData();
scmVehicleGression = fetchBySid(businessSid);
String state = "2"; String state = "2";
baseMapper.updateStateBySid(businessSid, state); baseMapper.updateStateBySid(businessSid, state);
//推送车辆移库状态 //推送车辆移库状态
List<String> vinList = scmVehicleGressionVehService.fetchVoByMainSid(businessSid); List<String> vinList = scmVehicleGressionVehService.fetchVoByMainSid(businessSid);
if (vinList.size() > 0) { if (vinList.size() > 0) {
for (String s : vinList) { for (String s : vinList) {
BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(s).getData(); BaseVehicle baseVehicleVo = baseVehicleFeign.selectByVinNoAndOrgSid(s,scmVehicleGression.getUseOrgSid()).getData();
// BaseVehicleVo baseVehicleVo = baseVehicleFeign.selVehicleByVinNo(s).getData();
BaseVehicleTempstateDto baseVehicleTempstateDto = new BaseVehicleTempstateDto(); BaseVehicleTempstateDto baseVehicleTempstateDto = new BaseVehicleTempstateDto();
baseVehicleTempstateDto.setVehSid(baseVehicleVo.getSid()); baseVehicleTempstateDto.setVehSid(baseVehicleVo.getSid());
baseVehicleTempstateDto.setTempStateKey("001"); baseVehicleTempstateDto.setTempStateKey("001");

3
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.java

@ -125,4 +125,7 @@ public interface ScmVehicleInventoryMapper extends BaseMapper<ScmVehicleInventor
String getVin(@Param("vin") String vin); String getVin(@Param("vin") String vin);
List<ScmVehicleStayInventoryVo> selInventory(@Param("vin") String vin, @Param("id") String id, @Param("useOrgSid") String useOrgSid); List<ScmVehicleStayInventoryVo> selInventory(@Param("vin") String vin, @Param("id") String id, @Param("useOrgSid") String useOrgSid);
@Select("select count(*) from scm_vehicle_inventory svi where svi.useOrgSid = #{useOrgSid} and InventoryState = '无' ")
int getInventoryState(@Param("useOrgSid") String useOrgSid);
} }

23
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java

@ -167,12 +167,12 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
QueryWrapper<AppScmVehicleCarInventoryListPageVo> qw = appCarQueryWrapper(pagerQuery.getParams()); QueryWrapper<AppScmVehicleCarInventoryListPageVo> qw = appCarQueryWrapper(pagerQuery.getParams());
AppScmVehicleCarInventoryListPageQuery params = pagerQuery.getParams(); AppScmVehicleCarInventoryListPageQuery params = pagerQuery.getParams();
IPage<AppScmVehicleCarInventoryListPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getName()); IPage<AppScmVehicleCarInventoryListPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getName());
List<AppScmVehicleCarInventoryListPageVo> records = iPage.getRecords(); // List<AppScmVehicleCarInventoryListPageVo> records = iPage.getRecords();
for (AppScmVehicleCarInventoryListPageVo record : records) { // for (AppScmVehicleCarInventoryListPageVo record : records) {
if ("2".equals(record.getState())) { // if ("2".equals(record.getState())) {
record.setShowUpdataBtn(true); // record.setShowUpdataBtn(true);
} // }
} // }
return iPage; return iPage;
} }
@ -202,7 +202,6 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
} }
/** /**
* 手机端-获取盘库记录列表 查询条件 * 手机端-获取盘库记录列表 查询条件
* *
@ -217,6 +216,7 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
if (StringUtils.isNotBlank(query.getWarehouseSid())) { if (StringUtils.isNotBlank(query.getWarehouseSid())) {
qw.eq("svi.locationSid", query.getWarehouseSid()); qw.eq("svi.locationSid", query.getWarehouseSid());
} }
qw.notIn("InventoryState", "无");
String inventStartDate = query.getInventStartDate(); String inventStartDate = query.getInventStartDate();
String inventEndDate = query.getInventEndDate(); String inventEndDate = query.getInventEndDate();
qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (InventoryDate,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')"). qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (InventoryDate,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')").
@ -457,4 +457,13 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
int count = baseMapper.getToDoNum(useOrgSid); int count = baseMapper.getToDoNum(useOrgSid);
return rb.success().setData(String.valueOf(count)); return rb.success().setData(String.valueOf(count));
} }
public boolean getInventoryState(String userSid) {
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
int count = baseMapper.getInventoryState(useOrgSid);
if (count == 0) {
return true;
}
return false;
}
} }

65
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehinventorymonth;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonth;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthMapper.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthMapper <br/>
* Description: 月度盘库. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface ScmVehInventorymonthMapper extends BaseMapper<ScmVehInventorymonth> {
//@Update("update scm_veh_inventorymonth set name=#{msg} where id=#{id}")
//IPage<ScmVehInventorymonthVo> voPage(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventorymonth> qw);
IPage<ScmVehInventorymonthVo> selectPageVo(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
List<ScmVehInventorymonthVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
@Select("select * from scm_veh_inventorymonth")
List<ScmVehInventorymonthVo> selectListVo();
}

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where>
</select>
</mapper>

106
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthRest.java

@ -0,0 +1,106 @@
package com.yxt.anrui.scm.biz.scmvehinventorymonth; /*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
import com.yxt.anrui.scm.api.scmvehinventorymonth.*;
import com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthService;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthRest <br/>
* Description: 月度盘库. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "月度盘库")
@RestController("com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthRest")
@RequestMapping("v1/scmvehinventorymonth")
public class ScmVehInventorymonthRest implements ScmVehInventorymonthFeign {
@Autowired
private ScmVehInventorymonthService scmVehInventorymonthService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<ScmVehInventorymonthVo>> listPage(@RequestBody PagerQuery<ScmVehInventorymonthQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<ScmVehInventorymonthVo> pv = scmVehInventorymonthService.listPageVo(pq);
return rb.success().setData(pv);
}
@Override
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody ScmVehInventorymonthDto dto) {
ResultBean rb = ResultBean.fireFail();
scmVehInventorymonthService.saveOrUpdateDto(dto);
return rb.success();
}
@Override
@ApiOperation("根据sid批量删除")
@PostMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids) {
ResultBean rb = ResultBean.fireFail();
scmVehInventorymonthService.delBySids(sids);
return rb.success();
}
@Override
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<ScmVehInventorymonthDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) {
ResultBean rb = ResultBean.fireFail();
ScmVehInventorymonthDetailsVo vo = scmVehInventorymonthService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
@Override
public ResultBean getInventoryRecords(String userSid) {
return scmVehInventorymonthService.getInventoryRecords(userSid);
}
@Override
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) {
return null;
}
}

170
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java

@ -0,0 +1,170 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehinventorymonth;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basevehicle.AppScmInventoryRecordsVo;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleInventory;
import com.yxt.anrui.scm.biz.scmvehicleinventory.ScmVehicleInventoryService;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonth;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthQuery;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDetailsVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDto;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthService.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventorymonth.ScmVehInventorymonthService <br/>
* Description: 月度盘库 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInventorymonthMapper, ScmVehInventorymonth> {
@Autowired
SysStaffOrgFeign sysStaffOrgFeign;
@Autowired
BaseVehicleFeign baseVehicleFeign;
@Autowired
SysUserFeign sysUserFeign;
@Autowired
ScmVehicleInventoryService scmVehicleInventoryService;
private QueryWrapper<ScmVehInventorymonth> createQueryWrapper(ScmVehInventorymonthQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehInventorymonth> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehInventorymonthVo> listPageVo(PagerQuery<ScmVehInventorymonthQuery> pq) {
ScmVehInventorymonthQuery query = pq.getParams();
QueryWrapper<ScmVehInventorymonth> qw = createQueryWrapper(query);
IPage<ScmVehInventorymonth> page = PagerUtil.queryToPage(pq);
IPage<ScmVehInventorymonthVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehInventorymonthVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehInventorymonthDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehInventorymonthDto dto) {
ScmVehInventorymonth entity = new ScmVehInventorymonth();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehInventorymonthDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
ScmVehInventorymonth entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehInventorymonthDetailsVo fetchDetailsVoBySid(String sid) {
ScmVehInventorymonth entity = fetchBySid(sid);
ScmVehInventorymonthDetailsVo vo = new ScmVehInventorymonthDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
@Transactional(rollbackFor = Exception.class)
public ResultBean getInventoryRecords(String userSid) {
ResultBean rb = ResultBean.fireFail();
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
SysStaffOrg sysStaffOrg = sysStaffOrgFeign.getOrgByStaffSid(sysUserVo.getStaffSid()).getData();
boolean inventoryState = scmVehicleInventoryService.getInventoryState(userSid);
if (inventoryState) {
return rb.setMsg("盘库记录生成失败,记录存在未确认数据");
}
List<AppScmInventoryRecordsVo> list = baseVehicleFeign.selectInventoryRecords(userSid).getData();
ScmVehInventorymonth scmVehInventorymonth = new ScmVehInventorymonth();
scmVehInventorymonth.setBillNo("");
scmVehInventorymonth.setCreateOrgSid(useOrgSid);
scmVehInventorymonth.setCreateOrgName(sysStaffOrg.getOrgName());
scmVehInventorymonth.setUseOrgSid(useOrgSid);
scmVehInventorymonth.setUseOrgName(sysStaffOrg.getOrgName());
save(scmVehInventorymonth);
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
for (AppScmInventoryRecordsVo appScmInventoryRecordsVo : list) {
ScmVehicleInventory scmVehicleInventory = new ScmVehicleInventory();
scmVehicleInventory.setVinNo(appScmInventoryRecordsVo.getVin());
scmVehicleInventory.setMainSid(scmVehInventorymonth.getSid());
scmVehicleInventory.setLocation(appScmInventoryRecordsVo.getWarehouse());
scmVehicleInventory.setLocationSid(appScmInventoryRecordsVo.getWarehouseSid());
scmVehicleInventory.setInventoryState("无");
scmVehicleInventory.setInventoryStateKey("");
scmVehicleInventory.setCreateOrgSid(useOrgSid);
scmVehicleInventory.setUseOrgSid(useOrgSid);
scmVehicleInventoryService.save(scmVehicleInventory);
}
} else {
return rb.setMsg("暂无需要盘库记录");
}
return rb.success();
}
}

65
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportMapper.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehinventoryreport;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreport;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventoryreportMapper.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportMapper <br/>
* Description: 盘库报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface ScmVehInventoryreportMapper extends BaseMapper<ScmVehInventoryreport> {
//@Update("update scm_veh_inventoryreport set name=#{msg} where id=#{id}")
//IPage<ScmVehInventoryreportVo> voPage(IPage<ScmVehInventoryreport> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventoryreport> qw);
IPage<ScmVehInventoryreportVo> selectPageVo(IPage<ScmVehInventoryreport> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventoryreport> qw);
List<ScmVehInventoryreportVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventoryreport> qw);
@Select("select * from scm_veh_inventoryreport")
List<ScmVehInventoryreportVo> selectListVo();
}

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportMapper.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehinventoryreport.ScmVehInventoryreportMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo">
SELECT * FROM scm_veh_inventoryreport <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo">
SELECT * FROM scm_veh_inventoryreport <where> ${ew.sqlSegment} </where>
</select>
</mapper>

100
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportRest.java

@ -0,0 +1,100 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehinventoryreport;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreport;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportQuery;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDetailsVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventoryreportFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportRest <br/>
* Description: 盘库报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "盘库报告")
@RestController("com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportRest")
@RequestMapping("v1/scmvehinventoryreport")
public class ScmVehInventoryreportRest implements ScmVehInventoryreportFeign {
@Autowired
private ScmVehInventoryreportService scmVehInventoryreportService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<ScmVehInventoryreportVo>> listPage(@RequestBody PagerQuery<ScmVehInventoryreportQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<ScmVehInventoryreportVo> pv = scmVehInventoryreportService.listPageVo(pq);
return rb.success().setData(pv);
}
@Override
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody ScmVehInventoryreportDto dto){
ResultBean rb = ResultBean.fireFail();
scmVehInventoryreportService.saveOrUpdateDto(dto);
return rb.success();
}
@Override
@ApiOperation("根据sid批量删除")
@PostMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
ResultBean rb = ResultBean.fireFail();
scmVehInventoryreportService.delBySids(sids);
return rb.success();
}
@Override
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<ScmVehInventoryreportDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
ScmVehInventoryreportDetailsVo vo = scmVehInventoryreportService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
}

110
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportService.java

@ -0,0 +1,110 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehinventoryreport;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreport;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportQuery;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDetailsVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventoryreportService.java <br/>
* Class: com.yxt.anrui.scm.api.biz.scmvehinventoryreport.ScmVehInventoryreportService <br/>
* Description: 盘库报告 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class ScmVehInventoryreportService extends MybatisBaseService<ScmVehInventoryreportMapper, ScmVehInventoryreport> {
private QueryWrapper<ScmVehInventoryreport> createQueryWrapper(ScmVehInventoryreportQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehInventoryreport> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehInventoryreportVo> listPageVo(PagerQuery<ScmVehInventoryreportQuery> pq) {
ScmVehInventoryreportQuery query = pq.getParams();
QueryWrapper<ScmVehInventoryreport> qw = createQueryWrapper(query);
IPage<ScmVehInventoryreport> page = PagerUtil.queryToPage(pq);
IPage<ScmVehInventoryreportVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehInventoryreportVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehInventoryreportDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehInventoryreportDto dto){
ScmVehInventoryreport entity = new ScmVehInventoryreport();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehInventoryreportDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
ScmVehInventoryreport entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehInventoryreportDetailsVo fetchDetailsVoBySid(String sid){
ScmVehInventoryreport entity = fetchBySid(sid);
ScmVehInventoryreportDetailsVo vo = new ScmVehInventoryreportDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
}

7
anrui-scm/anrui-scm-ui/src/api/weishoumaiduan/unsold.js

@ -54,6 +54,13 @@ export default {
method: 'get' method: 'get'
}) })
}, },
// 获取厂家销售通路
actualList: function(data) {
return request({
url: '/base/v1/basemanufacturerbank/actualList/' + data,
method: 'get'
})
},
// 流程审批(同意) // 流程审批(同意)
complete: function(params) { complete: function(params) {
return request({ return request({

20
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue

@ -45,7 +45,12 @@
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/> <el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="车型" fixed width="200" align="left" header-align="center"> <el-table-column label="车型" fixed width="200" align="left" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<span>{{ scope.row.modelNameQuan }}</span>
<div slot="reference" class="name-wrapper">
<span class="bluezi" @click="cheLiangXiangXiPeiZhi(scope.row)">{{ scope.row.modelName }}</span> <span class="bluezi" @click="cheLiangXiangXiPeiZhi(scope.row)">{{ scope.row.modelName }}</span>
</div>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" fixed width="200" align="center"> <el-table-column label="车架号" fixed width="200" align="center">
@ -63,7 +68,16 @@
<el-table-column prop="priceDate" width="130" label="厂家入库日期" align="center"/> <el-table-column prop="priceDate" width="130" label="厂家入库日期" align="center"/>
<el-table-column prop="libraryAge" width="80" label="库龄(天)" align="center"/> <el-table-column prop="libraryAge" width="80" label="库龄(天)" align="center"/>
<el-table-column prop="arrivalDate" width="130" label="到货日期" align="center"/> <el-table-column prop="arrivalDate" width="130" label="到货日期" align="center"/>
<el-table-column prop="configName" width="460" label="常用配置名称" align="left" header-align="center"/> <el-table-column width="460" label="常用配置名称" align="left" header-align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<span>{{ scope.row.otherConfig }}</span>
<div slot="reference" class="name-wrapper">
<span>{{ scope.row.configName }}</span>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="contractPrice" width="130" label="厂家合同价" align="center"/> <el-table-column prop="contractPrice" width="130" label="厂家合同价" align="center"/>
<el-table-column prop="costPrice" width="130" label="厂家结算价" align="center"/> <el-table-column prop="costPrice" width="130" label="厂家结算价" align="center"/>
<el-table-column prop="createOrgName" width="130" label="创建组织名称" align="center"/> <el-table-column prop="createOrgName" width="130" label="创建组织名称" align="center"/>
@ -89,7 +103,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="solidDate" width="130" label="买断日期" align="center"/> <el-table-column prop="solidDate" width="130" label="买断日期" align="center"/>
<el-table-column prop="warrantyCardNo" width="130" label="保修卡号" align="center"/> <el-table-column prop="warrantyCardNo" width="130" label="保修卡号" align="center"/>
<el-table-column prop="brandName" width="130" label="品牌" align="center"/> <el-table-column prop="vehModelBrandName" width="130" label="品牌" align="center"/>
<el-table-column prop="vehicleTypeValue" width="130" label="功能" align="center"/> <el-table-column prop="vehicleTypeValue" width="130" label="功能" align="center"/>
<el-table-column prop="productLineValue" width="130" label="系列" align="center"/> <el-table-column prop="productLineValue" width="130" label="系列" align="center"/>
<el-table-column prop="driveFormValue" width="130" label="驱动" align="center"/> <el-table-column prop="driveFormValue" width="130" label="驱动" align="center"/>
@ -123,7 +137,7 @@
<el-table-column prop="independentSources" width="130" label="独立热源" align="center"/> <el-table-column prop="independentSources" width="130" label="独立热源" align="center"/>
<el-table-column prop="fuelTank" width="130" label="燃料箱" align="center"/> <el-table-column prop="fuelTank" width="130" label="燃料箱" align="center"/>
<el-table-column prop="multimedia" width="130" label="多媒体" align="center"/> <el-table-column prop="multimedia" width="130" label="多媒体" align="center"/>
<el-table-column prop="otherConfig" width="130" label="更多配置" align="center"/> <el-table-column prop="otherConfig" width="200" label="更多配置" align="center"/>
</el-table> </el-table>
</div> </div>
<div class="pages"> <div class="pages">

50
anrui-scm/anrui-scm-ui/src/views/cheliang/hegezhengtaizhang/hegezhengtaizhangAdd.vue

@ -98,7 +98,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="remarks"> <el-form-item prop="remarks">
<span slot="label">备注</span> <span slot="label">备注</span>
<el-input v-model="temp.remarks" type="textarea" :rows="3" maxlength="125" placeholder="" class="addinputw addinputw_remarks" clearable/> <!-- <el-input v-model="temp.remarks" type="textarea" :rows="3" maxlength="125" placeholder="" class="addinputw addinputw_remarks" clearable/>-->
<span>{{ temp.remarks }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -320,6 +321,22 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<el-dialog :visible.sync="dialogVisible" width="50%">
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>说明原因</span>
</el-col>
<el-col :span="21">
<el-form-item><el-input v-model="smRemarks" type="textarea" :rows="3" maxlength="125" placeholder="" class="addinputw addinputw_remarks" clearable/></el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleCreate"> </el-button>
<el-button @click="handleReturn"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -334,10 +351,12 @@ import { typeValues } from '@/api/cheliang/dictcommons'
import ImageUpload from '@/components/uploadFile/ManyImageUpload' // import ImageUpload from '@/components/uploadFile/ManyImageUpload' //
export default { export default {
name: 'PinpaiAdd', name: 'PinpaiAdd',
components: {ImageUpload}, components: { ImageUpload },
data() { data() {
return { return {
viewTitle: '', viewTitle: '',
dialogVisible: false,
smRemarks: '',
// --------- // ---------
menuState: { menuState: {
add: false, // add: false, //
@ -359,7 +378,8 @@ export default {
certificatePhoto: [], certificatePhoto: [],
certificateState: '004', // key certificateState: '004', // key
certificateStateValue: '正式', // value certificateStateValue: '正式', // value
noticeModel: '' // noticeModel: '', //
smRemarks: ''
}, // }, //
templook: {}, // templook: {}, //
Situation: [], Situation: [],
@ -667,8 +687,11 @@ export default {
certificateSituationValue: '', certificateSituationValue: '',
certificatePhoto: [], certificatePhoto: [],
certificateState: '0002', // key certificateState: '0002', // key
certificateStateValue: '正式' // value certificateStateValue: '正式', // value
smRemarks: ''
} // } //
this.dialogVisible = false
this.smRemarks = ''
this.$emit('doback') this.$emit('doback')
}, },
@ -711,10 +734,12 @@ export default {
}) })
} else { } else {
// this.temp.certificatePhoto = this.attachTypeYingyezhizhao // this.temp.certificatePhoto = this.attachTypeYingyezhizhao
this.temp.smRemarks = this.smRemarks
Update(this.temp).then((response) => { Update(this.temp).then((response) => {
this.FormLoading = false this.FormLoading = false
if (response.code === '200') { if (response.success) {
// this.getList() // this.getList()
if (response.msg !== '该车架号后八位与车辆台账中车架号不符,请填写说明原因') {
this.dialogFormVisible = false this.dialogFormVisible = false
this.$notify({ this.$notify({
title: '提示', title: '提示',
@ -723,6 +748,17 @@ export default {
duration: 2000 duration: 2000
}) })
this.handleReturn('true') this.handleReturn('true')
} else {
const tip = response.msg
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.smRemarks = ''
this.dialogVisible = true
})
}
} }
}) })
} }
@ -811,10 +847,6 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.addinputwda {
width: 600px;
}
.formadd .el-row .el-col /deep/ .el-form-item .addinputw_remarks { .formadd .el-row .el-col /deep/ .el-form-item .addinputw_remarks {
width: 92%; width: 92%;
} }

1
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichanAdd.vue

@ -485,6 +485,7 @@ export default {
// === // ===
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.formobj.sid = ''
this.formobj.applyType = '' this.formobj.applyType = ''
this.formobj.applyTypeKey = '' this.formobj.applyTypeKey = ''
this.formobj.schedulingType = '' // this.formobj.schedulingType = '' //

20
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue

@ -41,11 +41,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<span>现存放地点负责人</span> <span><span class="icon">*</span>现存放地点负责人</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item> <el-form-item prop="staffName">
<el-select v-model="temp.staffName" placeholder="请选择" clearable class="addinputw" @change="staffNameChange"> <el-select v-model="temp.staffName" placeholder="请选择" class="addinputw" @change="staffNameChange">
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.userName" :value="item.userName"/> <el-option v-for="item in staff_list" :key="item.userSid" :label="item.userName" :value="item.userName"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -248,7 +248,8 @@ export default {
rules: { rules: {
operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }], operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }],
location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }], location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }],
targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }] targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }],
staffName: [{ required: true, message: '现存放地点负责人不能为空', trigger: 'change' }]
} }
} }
}, },
@ -353,6 +354,7 @@ export default {
if (this.temp.locationSid !== '') { if (this.temp.locationSid !== '') {
this.vinNoVisible = true this.vinNoVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.vinNoList.params.vin = ''
this.handlevinNo() this.handlevinNo()
}) })
} else { } else {
@ -408,7 +410,15 @@ export default {
type: 'error' type: 'error'
}) })
} else { } else {
this.temp.scmVehicleGressionVehs = this.vinNoChoice if (this.vinNoChoice.length > 0) {
this.vinNoChoice.forEach((e) => {
this.temp.scmVehicleGressionVehs.push({
vehVin: e.vehVin,
settlementStatus: e.settlementStatus,
settlementStatusValue: e.settlementStatusValue
})
})
}
this.vinNoVisible = false this.vinNoVisible = false
} }
}, },

319
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue

@ -18,27 +18,42 @@
<!--Start 新增修改部分--> <!--Start 新增修改部分-->
<div class="listconadd"> <div class="listconadd">
<div class="titwu"><span>车辆未售买断申请</span></div> <div class="titwu"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>申请日期:</span></div> <span>分公司</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="12" class="colStyle"> <el-col :span="4">
<div class="span-sty spanOneWidth"><span>申请人:</span></div> <el-form-item><span>{{ formobj.useOrgName }}</span></el-form-item>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.applicationName }}</span></el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4" class="tleftb">
<el-row class="rowStyle"> <span>申请人</span>
<el-col :span="24" class="colStyle"> </el-col>
<div class="span-sty spanOneWidth"><span>申请买断费用:</span></div> <el-col :span="4">
<el-form-item><el-input class="addinputw addinputOne" v-model="formobj.money" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable style="width: 15%"></el-input></el-form-item> <el-form-item><span>{{ formobj.applicationName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="rowStyle"> <el-row>
<el-col :span="24" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>买断原因:</span></div> <span>买断原因</span>
<el-form-item><el-input class="addinputw addinputOne" v-model="formobj.reason" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" resize="none"></el-input></el-form-item> </el-col>
<el-col :span="12">
<el-form-item><el-input v-model="formobj.reason" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" resize="none" clearable placeholder="" class="addinputw"></el-input></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否需要付款</span>
</el-col>
<el-col :span="4">
<el-form-item>
<el-radio v-model="formobj.isPay" label="1"></el-radio>
<el-radio v-model="formobj.isPay" label="0"></el-radio>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
@ -47,45 +62,121 @@
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addCommodity()">选择车辆</el-button> <el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addCommodity()">选择车辆</el-button>
</div> </div>
</div> </div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center"> <el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index, formobj.detailsList[scope.$index])">删除 <el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" align="center"> <el-table-column label="车架号" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家入库日期" align="center"> <el-table-column label="版本" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersionValue }}</span>
</template>
</el-table-column>
<el-table-column label="燃料" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.fuelTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="变速箱" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.gearboxTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排放标准" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.emissionStandardValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span> <span>{{ scope.row.inboundDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库龄(天)" align="center"> <el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.dayNum }}</span> <span>{{ scope.row.dayNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center"> <el-table-column label="内部编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span> <span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家结算价" align="center"> <el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span> <span>{{ scope.row.inboundPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualMoney" label="买断金额" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.actualMoney" placeholder="" clearable @keyup.native="UpNumber($event, scope.row)" @keydown.native="UpNumber($event, scope.row)"></el-input>
</template>
</el-table-column>
</el-table> </el-table>
<div v-show="formobj.isPay == '1'">
<div class="title">
<div>付款明细</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleAdd()">添加</el-button>
</div>
</div>
<el-table :key="paymentKey" :data="formobj.detailsPayList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="付款方式" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.paymentType" placeholder="请选择" filterable @change="changePaymentType($event, scope.row)">
<el-option v-for="item in payment_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="厂家销售通路" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.actualPay" placeholder="请选择" filterable @change="changeActualPay($event, scope.row)">
<el-option v-for="item in actualPay_list" :key="item.bankAccount" :label="item.accountName" :value="item.accountName"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.receivingAccount }}</span>
</template>
</el-table-column>
<el-table-column prop="payAccount" label="付款金额(元)" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.payAccount" placeholder="" clearable @keyup.native="UpNumberOne($event, scope.row)" @keydown.native="UpNumberOne($event, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="付款备注" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.payRemark" placeholder="" clearable></el-input>
</template>
</el-table-column>
</el-table>
</div>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -98,6 +189,7 @@
<script> <script>
import req from '@/api/weishoumaiduan/unsold' import req from '@/api/weishoumaiduan/unsold'
import vehicle from './vehicle.vue' import vehicle from './vehicle.vue'
import { getPathSidByUserSid, fetchBySid, typeValues } from '@/api/cheliang/dictcommons'
export default { export default {
name: 'weishoumaiduanAdd', name: 'weishoumaiduanAdd',
@ -110,17 +202,25 @@ export default {
viewState: 1, viewState: 1,
index: 0, index: 0,
tableKey: 0, tableKey: 0,
paymentKey: 1,
payment_list: [],
actualPay_list: [],
// //
formobj: { formobj: {
sid: '', // sid sid: '', // sid
applicationName: '', applicationName: '',
isPay: '',
payAccountAll: '',
useOrgName: '',
useOrgSid: '',
money: '', money: '',
createTime: '', createTime: '',
reason: '', reason: '',
userSid: '', userSid: '',
instanceId: '', // ID instanceId: '', // ID
taskId: '', // ID taskId: '', // ID
detailsList: [] detailsList: [],
detailsPayList: []
}, },
rules: {}, rules: {},
submitdisabled: false submitdisabled: false
@ -141,7 +241,39 @@ export default {
} }
this.formobj.createTime = year + '-' + month + '-' + day this.formobj.createTime = year + '-' + month + '-' + day
}, },
UpNumber(e) { init() {
typeValues({ type: 'paymentType' }).then((res) => {
if (res.success) {
this.payment_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.formobj.useOrgSid = resp.data
fetchBySid(resp.data).then((res) => {
if (res.success) {
this.formobj.useOrgName = res.data.name
}
})
req.actualList(resp.data).then((respsone) => {
if (respsone.success) {
this.actualPay_list = respsone.data
}
})
}
})
},
UpNumber(e, row) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
row.actualMoney = e.target.value
},
UpNumberOne(e, row) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-" e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0 e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
@ -149,7 +281,7 @@ export default {
console.log(e.target.value) console.log(e.target.value)
e.target.value = parseFloat(e.target.value) e.target.value = parseFloat(e.target.value)
} }
this.formobj.money = e.target.value row.payAccount = e.target.value
}, },
// //
addCommodity() { addCommodity() {
@ -157,11 +289,26 @@ export default {
this.$refs['divVehicle'].showData(this.formobj.detailsList) this.$refs['divVehicle'].showData(this.formobj.detailsList)
}, },
// //
dataDelete(index, row) { dataDelete(index) {
this.formobj.detailsList.splice(index, 1) this.formobj.detailsList.splice(index, 1)
}, },
handleAdd() {
this.formobj.detailsPayList.push({
actualPay: '',
bank: '',
payAccount: '',
payRemark: '',
paymentType: '',
paymentTypeKey: '',
receivingAccount: ''
})
},
handleDelete(index) {
this.formobj.detailsPayList.splice(index, 1)
},
showAdd() { showAdd() {
this.newDate() this.newDate()
this.init()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
@ -194,10 +341,42 @@ export default {
vinNo: e.vinNo, vinNo: e.vinNo,
insideCode: e.insideCode, insideCode: e.insideCode,
vehicleNum: e.vehicleNum, vehicleNum: e.vehicleNum,
dayNum: e.dayNum dayNum: e.dayNum,
vehicleVersionValue: e.vehicleVersionValue,
fuelTypeValue: e.fuelTypeValue,
gearboxTypeValue: e.gearboxTypeValue,
emissionStandardValue: e.emissionStandardValue,
actualMoney: e.priced
})
}) })
}
},
changePaymentType(value, row) {
let bb = null
this.payment_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
value: e.dictValue,
key: e.dictKey
}
}
}) })
row.paymentTypeKey = bb.key
},
changeActualPay(value, row) {
let bb = null
this.actualPay_list.forEach((e) => {
if (e.accountName === value) {
bb = {
accountName: e.accountName,
bankAccount: e.bankAccount,
depositBank: e.depositBank
} }
}
})
row.actualPay = bb.accountName
row.bank = bb.depositBank
row.receivingAccount = bb.bankAccount
}, },
save() { save() {
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
@ -222,6 +401,10 @@ export default {
}) })
}, },
submitVehicleApply() { submitVehicleApply() {
if (this.formobj.isPay == '1' && this.formobj.payAccountAll !== this.formobj.money) {
this.$message({ showClose:true, type: 'error', message: '因买断金额合计与付款金额合计不一致,提交失败' })
return
}
req.submitVehicleApply(this.formobj).then((res) => { req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
@ -239,6 +422,57 @@ export default {
} }
}) })
}, },
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'payAccount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.payAccountAll = sums[index] += ''
} else if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.money = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
// === // ===
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@ -246,13 +480,18 @@ export default {
this.formobj = { this.formobj = {
sid: '', // sid sid: '', // sid
applicationName: '', applicationName: '',
createTime: '', isPay: '',
payAccountAll: '',
useOrgName: '',
useOrgSid: '',
money: '', money: '',
createTime: '',
reason: '', reason: '',
userSid: '',
instanceId: '', // ID instanceId: '', // ID
taskId: '', // ID taskId: '', // ID
userSid: '', detailsList: [],
detailsList: [] detailsPayList: []
} }
this.$refs['form_obj'].resetFields() this.$refs['form_obj'].resetFields()
this.$emit('doback') this.$emit('doback')
@ -271,19 +510,5 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.spanOneWidth {
border-right: 0px !important;
width: 150px !important;
}
.addinputOne {
margin-left: 140px !important;
}
.rowStyle {
border-left: 0px;
}
.colStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style> </style>

197
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldInfo.vue

@ -14,65 +14,142 @@
<!--Start 新增修改部分--> <!--Start 新增修改部分-->
<div class="listconadd"> <div class="listconadd">
<div class="titwu"><span>车辆未售买断申请</span></div> <div class="titwu"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>申请日期:</span></div> <span>分公司</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="12" class="colStyle"> <el-col :span="4">
<div class="span-sty spanOneWidth"><span>申请人:</span></div> <el-form-item><span>{{ formobj.useOrgName }}</span></el-form-item>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.applicationName }}</span></el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4" class="tleftb">
<el-row class="rowStyle"> <span>申请人</span>
<el-col :span="24" class="colStyle"> </el-col>
<div class="span-sty spanOneWidth"><span>申请买断费用:</span></div> <el-col :span="4">
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.money }}</span></el-form-item> <el-form-item><span>{{ formobj.applicationName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="rowStyle"> <el-row>
<el-col :span="24" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>买断原因:</span></div> <span>买断原因</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.reason }}</span></el-form-item> </el-col>
<el-col :span="12">
<el-form-item><span>{{ formobj.reason }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否需要付款</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.isPay === '1' ? '是' : '否' }}</span>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
<div>车辆列表</div> <div>车辆列表</div>
</div> </div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center"> <el-table-column label="车架号" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家入库日期" align="center"> <el-table-column label="版本" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersionValue }}</span>
</template>
</el-table-column>
<el-table-column label="燃料" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.fuelTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="变速箱" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.gearboxTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排放标准" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.emissionStandardValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span> <span>{{ scope.row.inboundDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库龄(天)" align="center"> <el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.dayNum }}</span> <span>{{ scope.row.dayNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center"> <el-table-column label="内部编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span> <span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家结算价" align="center"> <el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span> <span>{{ scope.row.inboundPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualMoney" label="买断金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.actualMoney }}</span>
</template>
</el-table-column>
</el-table>
<div v-show="formobj.isPay == '1'">
<div class="title">
<div>付款明细</div>
</div>
<el-table :key="paymentKey" :data="formobj.detailsPayList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="付款方式" align="center">
<template slot-scope="scope">
<span>{{ scope.row.paymentType }}</span>
</template>
</el-table-column>
<el-table-column label="厂家销售通路" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualPay }}</span>
</template>
</el-table-column>
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.receivingAccount }}</span>
</template>
</el-table-column>
<el-table-column prop="payAccount" label="付款金额(元)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payAccount }}</span>
</template>
</el-table-column>
<el-table-column label="付款备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payRemark }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -91,6 +168,7 @@ export default {
viewState: 1, viewState: 1,
index: 0, index: 0,
tableKey: 0, tableKey: 0,
paymentKey: 1,
// //
formobj: { formobj: {
sid: '', // sid sid: '', // sid
@ -119,6 +197,57 @@ export default {
this.formobj = row this.formobj = row
}) })
}, },
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'payAccount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.payAccountAll = sums[index] += ''
} else if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.money = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
// === // ===
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
@ -140,24 +269,4 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.spanOneWidth {
border-right: 0px !important;
width: 150px !important;
}
.addinputOne {
margin-left: 140px !important;
}
.rowStyle {
border-left: 0px;
}
.colStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style> </style>

4
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldguanli.vue

@ -151,7 +151,7 @@ export default {
userSid: window.sessionStorage.getItem('userSid') userSid: window.sessionStorage.getItem('userSid')
}, },
current: 1, current: 1,
size: 10, size: 5,
total: 0 total: 0
}, },
rules: {} rules: {}
@ -272,7 +272,7 @@ export default {
userSid: window.sessionStorage.getItem('userSid') userSid: window.sessionStorage.getItem('userSid')
}, },
current: 1, current: 1,
size: 10, size: 5,
total: 0 total: 0
} }
this.getList() this.getList()

6
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/vehicle.vue

@ -309,7 +309,11 @@ export default {
priced: element.priced, priced: element.priced,
insideCode: element.insideCode, insideCode: element.insideCode,
vehicleNum: element.vehicleNum, vehicleNum: element.vehicleNum,
dayNum: element.dayNum dayNum: element.dayNum,
vehicleVersionValue: element.vehicleVersionValue,
fuelTypeValue: element.fuelTypeValue,
gearboxTypeValue: element.gearboxTypeValue,
emissionStandardValue: element.emissionStandardValue
}) })
}) })
this.sids = aa this.sids = aa

20
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue

@ -40,11 +40,11 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" class="tleftb"> <el-col :span="3" class="tleftb">
<span>现存放地点负责人</span> <span><span class="icon">*</span>现存放地点负责人</span>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item> <el-form-item prop="staffName">
<el-select v-model="temp.staffName" placeholder="请选择" clearable class="addinputw" @change="staffNameChange"> <el-select v-model="temp.staffName" placeholder="请选择" class="addinputw" @change="staffNameChange">
<el-option v-for="item in staff_list" :key="item.userSid" :label="item.userName" :value="item.userName"/> <el-option v-for="item in staff_list" :key="item.userSid" :label="item.userName" :value="item.userName"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -248,7 +248,8 @@ export default {
rules: { rules: {
operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }], operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }],
location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }], location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }],
targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }] targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }],
staffName: [{ required: true, message: '现存放地点负责人不能为空', trigger: 'change' }]
} }
} }
}, },
@ -370,6 +371,7 @@ export default {
if (this.temp.locationSid !== '') { if (this.temp.locationSid !== '') {
this.vinNoVisible = true this.vinNoVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.vinNoList.params.vin = ''
this.handlevinNo() this.handlevinNo()
}) })
} else { } else {
@ -425,7 +427,15 @@ export default {
type: 'error' type: 'error'
}) })
} else { } else {
this.temp.scmVehicleGressionVehs = this.vinNoChoice if (this.vinNoChoice.length > 0) {
this.vinNoChoice.forEach((e) => {
this.temp.scmVehicleGressionVehs.push({
vehVin: e.vehVin,
settlementStatus: e.settlementStatus,
settlementStatusValue: e.settlementStatusValue
})
})
}
this.vinNoVisible = false this.vinNoVisible = false
} }
}, },

6
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/vehicle.vue

@ -309,7 +309,11 @@ export default {
priced: element.priced, priced: element.priced,
insideCode: element.insideCode, insideCode: element.insideCode,
vehicleNum: element.vehicleNum, vehicleNum: element.vehicleNum,
dayNum: element.dayNum dayNum: element.dayNum,
vehicleVersionValue: element.vehicleVersionValue,
fuelTypeValue: element.fuelTypeValue,
gearboxTypeValue: element.gearboxTypeValue,
emissionStandardValue: element.emissionStandardValue
}) })
}) })
this.sids = aa this.sids = aa

202
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanDaiBanInfo.vue

@ -16,65 +16,142 @@
<!--Start 新增修改部分--> <!--Start 新增修改部分-->
<div class=""> <div class="">
<div class="titwu"><span>车辆未售买断申请</span></div> <div class="titwu"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>申请日期:</span></div> <span>分公司</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="12" class="colStyle"> <el-col :span="4">
<div class="span-sty spanOneWidth"><span>申请人:</span></div> <el-form-item><span>{{ formobj.useOrgName }}</span></el-form-item>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.applicationName }}</span></el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4" class="tleftb">
<el-row class="rowStyle"> <span>申请人</span>
<el-col :span="24" class="colStyle"> </el-col>
<div class="span-sty spanOneWidth"><span>申请买断费用:</span></div> <el-col :span="4">
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.money }}</span></el-form-item> <el-form-item><span>{{ formobj.applicationName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="rowStyle"> <el-row>
<el-col :span="24" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>买断原因:</span></div> <span>买断原因</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.reason }}</span></el-form-item> </el-col>
<el-col :span="12">
<el-form-item><span>{{ formobj.reason }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否需要付款</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.isPay === '1' ? '是' : '否' }}</span>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
<div>车辆列表</div> <div>车辆列表</div>
</div> </div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center"> <el-table-column label="车架号" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家入库日期" align="center"> <el-table-column label="版本" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersionValue }}</span>
</template>
</el-table-column>
<el-table-column label="燃料" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.fuelTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="变速箱" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.gearboxTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排放标准" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.emissionStandardValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span> <span>{{ scope.row.inboundDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库龄(天)" align="center"> <el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.dayNum }}</span> <span>{{ scope.row.dayNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center"> <el-table-column label="内部编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span> <span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家结算价" align="center"> <el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span> <span>{{ scope.row.inboundPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualMoney" label="买断金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.actualMoney }}</span>
</template>
</el-table-column>
</el-table> </el-table>
<div v-show="formobj.isPay == '1'">
<div class="title">
<div>付款明细</div>
</div>
<el-table :key="paymentKey" :data="formobj.detailsPayList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="付款方式" align="center">
<template slot-scope="scope">
<span>{{ scope.row.paymentType }}</span>
</template>
</el-table-column>
<el-table-column label="厂家销售通路" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualPay }}</span>
</template>
</el-table-column>
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.receivingAccount }}</span>
</template>
</el-table-column>
<el-table-column prop="payAccount" label="付款金额(元)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payAccount }}</span>
</template>
</el-table-column>
<el-table-column label="付款备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payRemark }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -114,6 +191,7 @@ export default {
viewState: 1, viewState: 1,
index: 0, index: 0,
tableKey: 0, tableKey: 0,
paymentKey: 1,
list1: [], list1: [],
operation: '', // operation: '', //
dialogList: { dialogList: {
@ -166,7 +244,7 @@ export default {
params: { params: {
// //
code: 2, code: 2,
data: 390 + 'px' data: 450 + 'px'
} }
}, '*') }, '*')
}, },
@ -178,6 +256,57 @@ export default {
} }
}) })
}, },
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'payAccount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.payAccountAll = sums[index] += ''
} else if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.money = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
// //
openAgree(val) { openAgree(val) {
this.operation = val this.operation = val
@ -309,28 +438,5 @@ export default {
text-align: center; text-align: center;
padding: 30px 0 20px 0; padding: 30px 0 20px 0;
} }
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.spanOneWidth {
border-right: 0px !important;
width: 150px !important;
}
.spanTwoWidth {
width: 150px !important;
}
.addinputOne {
margin-left: 140px !important;
}
.rowStyle {
border-left: 0px;
}
.colStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style> </style>

199
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanYiBanInfo.vue

@ -14,65 +14,142 @@
<!--Start 新增修改部分--> <!--Start 新增修改部分-->
<div class=""> <div class="">
<div class="titwu"><span>车辆未售买断申请</span></div> <div class="titwu"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>申请日期:</span></div> <span>分公司</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="12" class="colStyle"> <el-col :span="4">
<div class="span-sty spanOneWidth"><span>申请人:</span></div> <el-form-item><span>{{ formobj.useOrgName }}</span></el-form-item>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.applicationName }}</span></el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4" class="tleftb">
<el-row class="rowStyle"> <span>申请人</span>
<el-col :span="24" class="colStyle"> </el-col>
<div class="span-sty spanOneWidth"><span>申请买断费用:</span></div> <el-col :span="4">
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.money }}</span></el-form-item> <el-form-item><span>{{ formobj.applicationName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="rowStyle"> <el-row>
<el-col :span="24" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>买断原因:</span></div> <span>买断原因</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.reason }}</span></el-form-item> </el-col>
<el-col :span="12">
<el-form-item><span>{{ formobj.reason }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否需要付款</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.isPay === '1' ? '是' : '否' }}</span>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
<div>车辆列表</div> <div>车辆列表</div>
</div> </div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center"> <el-table-column label="车架号" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库日期" align="center"> <el-table-column label="版本" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersionValue }}</span>
</template>
</el-table-column>
<el-table-column label="燃料" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.fuelTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="变速箱" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.gearboxTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排放标准" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.emissionStandardValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span> <span>{{ scope.row.inboundDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库龄(天)" align="center"> <el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.dayNum }}</span> <span>{{ scope.row.dayNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center"> <el-table-column label="内部编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span> <span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家结算价" align="center"> <el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span> <span>{{ scope.row.inboundPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualMoney" label="买断金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.actualMoney }}</span>
</template>
</el-table-column>
</el-table>
<div v-show="formobj.isPay == '1'">
<div class="title">
<div>付款明细</div>
</div>
<el-table :key="paymentKey" :data="formobj.detailsPayList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="付款方式" align="center">
<template slot-scope="scope">
<span>{{ scope.row.paymentType }}</span>
</template>
</el-table-column>
<el-table-column label="厂家销售通路" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualPay }}</span>
</template>
</el-table-column>
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.receivingAccount }}</span>
</template>
</el-table-column>
<el-table-column prop="payAccount" label="付款金额(元)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payAccount }}</span>
</template>
</el-table-column>
<el-table-column label="付款备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.payRemark }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -90,6 +167,7 @@ export default {
dialogStatus: '', dialogStatus: '',
index: 0, index: 0,
tableKey: 0, tableKey: 0,
paymentKey: 1,
// //
formobj: {}, formobj: {},
rules: {}, rules: {},
@ -127,7 +205,7 @@ export default {
params: { params: {
// //
code: 2, code: 2,
data: 390 + 'px' data: 450 + 'px'
} }
}, '*') }, '*')
}, },
@ -139,6 +217,57 @@ export default {
} }
}) })
}, },
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'payAccount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.payAccountAll = sums[index] += ''
} else if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.money = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
/** 确认撤回任务 */ /** 确认撤回任务 */
openRevoke() { openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', { this.$confirm('是否确认执行撤回操作', '提示', {
@ -186,25 +315,5 @@ export default {
text-align: center; text-align: center;
padding: 30px 0 20px 0; padding: 30px 0 20px 0;
} }
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.spanOneWidth {
border-right: 0px !important;
width: 150px !important;
}
.addinputOne {
margin-left: 140px !important;
}
.rowStyle {
border-left: 0px;
}
.colStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style> </style>

308
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue

@ -17,27 +17,42 @@
<!--Start 新增修改部分--> <!--Start 新增修改部分-->
<div class=""> <div class="">
<div class="titwu"><span>车辆未售买断申请</span></div> <div class="titwu"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row class="rowStyle"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>申请日期:</span></div> <span>分公司</span>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
<el-col :span="12" class="colStyle"> <el-col :span="4">
<div class="span-sty spanOneWidth"><span>申请人:</span></div> <el-form-item><span>{{ formobj.useOrgName }}</span></el-form-item>
<el-form-item><span class="addinputInfo addinputOne">{{ formobj.applicationName }}</span></el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4" class="tleftb">
<el-row class="rowStyle"> <span>申请人</span>
<el-col :span="24" class="colStyle"> </el-col>
<div class="span-sty spanOneWidth"><span>申请买断费用:</span></div> <el-col :span="4">
<el-form-item><el-input class="addinputw addinputOne" v-model="formobj.money" @keyup.native="UpNumber" @keydown.native="UpNumber" clearable style="width: 15%"></el-input></el-form-item> <el-form-item><span>{{ formobj.applicationName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createTime }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="rowStyle"> <el-row>
<el-col :span="24" class="colStyle"> <el-col :span="4" class="tleftb">
<div class="span-sty spanOneWidth"><span>买断原因:</span></div> <span>买断原因</span>
<el-form-item><el-input class="addinputw addinputOne" v-model="formobj.reason" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" resize="none"></el-input></el-form-item> </el-col>
<el-col :span="12">
<el-form-item><el-input v-model="formobj.reason" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" resize="none" clearable placeholder="" class="addinputw"></el-input></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否需要付款</span>
</el-col>
<el-col :span="4">
<el-form-item>
<el-radio v-model="formobj.isPay" label="1"></el-radio>
<el-radio v-model="formobj.isPay" label="0"></el-radio>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
@ -46,45 +61,121 @@
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addCommodity()">选择车辆</el-button> <el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addCommodity()">选择车辆</el-button>
</div> </div>
</div> </div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center"> <el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index, formobj.detailsList[scope.$index])">删除 <el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" align="center"> <el-table-column label="车架号" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span> <span>{{ scope.row.vinNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.modelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家入库日期" align="center"> <el-table-column label="版本" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.vehicleVersionValue }}</span>
</template>
</el-table-column>
<el-table-column label="燃料" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.fuelTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="变速箱" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.gearboxTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="排放标准" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.emissionStandardValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span> <span>{{ scope.row.inboundDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库龄(天)" align="center"> <el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.dayNum }}</span> <span>{{ scope.row.dayNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内部编码" align="center"> <el-table-column label="内部编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span> <span>{{ scope.row.insideCode }}<span>({{ scope.row.vehicleNum }})</span></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厂家结算价" align="center"> <el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span> <span>{{ scope.row.inboundPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="actualMoney" label="买断金额" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.actualMoney" placeholder="" clearable @keyup.native="UpNumber($event, scope.row)" @keydown.native="UpNumber($event, scope.row)"></el-input>
</template>
</el-table-column>
</el-table>
<div v-show="formobj.isPay == '1'">
<div class="title">
<div>付款明细</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleAdd()">添加</el-button>
</div>
</div>
<el-table :key="paymentKey" :data="formobj.detailsPayList" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="付款方式" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.paymentType" placeholder="请选择" filterable @change="changePaymentType($event, scope.row)">
<el-option v-for="item in payment_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="厂家销售通路" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.actualPay" placeholder="请选择" filterable @change="changeActualPay($event, scope.row)">
<el-option v-for="item in actualPay_list" :key="item.bankAccount" :label="item.accountName" :value="item.accountName"/>
</el-select>
</template>
</el-table-column>
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bank }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.receivingAccount }}</span>
</template>
</el-table-column>
<el-table-column prop="payAccount" label="付款金额(元)" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.payAccount" placeholder="" clearable @keyup.native="UpNumberOne($event, scope.row)" @keydown.native="UpNumberOne($event, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="付款备注" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.payRemark" placeholder="" clearable></el-input>
</template>
</el-table-column>
</el-table> </el-table>
</div>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -97,6 +188,7 @@
<script> <script>
import req from '@/api/weishoumaiduan/unsold' import req from '@/api/weishoumaiduan/unsold'
import vehicle from './vehicle.vue' import vehicle from './vehicle.vue'
import { fetchBySid, getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons'
export default { export default {
name: 'maiduanAdd', name: 'maiduanAdd',
@ -109,17 +201,25 @@ export default {
viewState: 1, viewState: 1,
index: 0, index: 0,
tableKey: 0, tableKey: 0,
paymentKey: 1,
payment_list: [],
actualPay_list: [],
// //
formobj: { formobj: {
sid: '', // sid sid: '', // sid
applicationName: '', applicationName: '',
isPay: '',
payAccountAll: '',
useOrgName: '',
useOrgSid: '',
money: '', money: '',
createTime: '', createTime: '',
reason: '', reason: '',
userSid: '', userSid: '',
instanceId: '', // ID instanceId: '', // ID
taskId: '', // ID taskId: '', // ID
detailsList: [] detailsList: [],
detailsPayList: []
}, },
rules: {}, rules: {},
submitdisabled: false submitdisabled: false
@ -138,12 +238,34 @@ export default {
params: { params: {
// //
code: 2, code: 2,
data: 390 + 'px' data: 450 + 'px'
} }
}, '*') }, '*')
}, },
methods: { methods: {
UpNumber(e) { init() {
typeValues({ type: 'paymentType' }).then((res) => {
if (res.success) {
this.payment_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.formobj.useOrgSid = resp.data
fetchBySid(resp.data).then((res) => {
if (res.success) {
this.formobj.useOrgName = res.data.name
}
})
req.actualList(resp.data).then((respsone) => {
if (respsone.success) {
this.actualPay_list = respsone.data
}
})
}
})
},
UpNumber(e, row) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-" e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0 e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
@ -151,7 +273,17 @@ export default {
console.log(e.target.value) console.log(e.target.value)
e.target.value = parseFloat(e.target.value) e.target.value = parseFloat(e.target.value)
} }
this.formobj.money = e.target.value row.actualMoney = e.target.value
},
UpNumberOne(e, row) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
row.payAccount = e.target.value
}, },
// //
addCommodity() { addCommodity() {
@ -162,9 +294,24 @@ export default {
dataDelete(index, row) { dataDelete(index, row) {
this.formobj.detailsList.splice(index, 1) this.formobj.detailsList.splice(index, 1)
}, },
handleAdd() {
this.formobj.detailsPayList.push({
actualPay: '',
bank: '',
payAccount: '',
payRemark: '',
paymentType: '',
paymentTypeKey: '',
receivingAccount: ''
})
},
handleDelete(index) {
this.formobj.detailsPayList.splice(index, 1)
},
showInfo(sid) { showInfo(sid) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
this.init()
}) })
this.viewTitle = '【编辑】车辆未售买断申请' this.viewTitle = '【编辑】车辆未售买断申请'
console.log('编辑回显', sid) console.log('编辑回显', sid)
@ -187,10 +334,42 @@ export default {
vinNo: e.vinNo, vinNo: e.vinNo,
insideCode: e.insideCode, insideCode: e.insideCode,
vehicleNum: e.vehicleNum, vehicleNum: e.vehicleNum,
dayNum: e.dayNum dayNum: e.dayNum,
vehicleVersionValue: e.vehicleVersionValue,
fuelTypeValue: e.fuelTypeValue,
gearboxTypeValue: e.gearboxTypeValue,
emissionStandardValue: e.emissionStandardValue,
actualMoney: e.priced
})
}) })
}
},
changePaymentType(value, row) {
let bb = null
this.payment_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
value: e.dictValue,
key: e.dictKey
}
}
}) })
row.paymentTypeKey = bb.key
},
changeActualPay(value, row) {
let bb = null
this.actualPay_list.forEach((e) => {
if (e.accountName === value) {
bb = {
accountName: e.accountName,
bankAccount: e.bankAccount,
depositBank: e.depositBank
}
} }
})
row.actualPay = bb.accountName
row.bank = bb.depositBank
row.receivingAccount = bb.bankAccount
}, },
save() { save() {
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
@ -222,6 +401,10 @@ export default {
}) })
}, },
submitVehicleApply() { submitVehicleApply() {
if (this.formobj.isPay == '1' && this.formobj.payAccountAll !== this.formobj.money) {
this.$message({ showClose:true, type: 'error', message: '因买断金额合计与付款金额合计不一致,提交失败' })
return
}
req.submitVehicleApply(this.formobj).then((res) => { req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
@ -240,6 +423,57 @@ export default {
} }
}) })
}, },
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'payAccount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.payAccountAll = sums[index] += ''
} else if (column.property === 'actualMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.money = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
closePage() { closePage() {
this.viewState = 1 this.viewState = 1
} }
@ -260,19 +494,5 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.spanOneWidth {
border-right: 0px !important;
width: 150px !important;
}
.addinputOne {
margin-left: 140px !important;
}
.rowStyle {
border-left: 0px;
}
.colStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style> </style>

13
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/contract/CommonContractInitVo.java

@ -57,13 +57,8 @@ public class CommonContractInitVo implements Vo {
@ApiModelProperty("客户sid") @ApiModelProperty("客户sid")
private String customerSid; private String customerSid;
@ApiModelProperty("配置sid")
@ApiModelProperty("合同附件") private String configSid;
private String appdixUrl; @ApiModelProperty("车型sid")
private String modelSid;
@ApiModelProperty("现场签署图片附件")
private String sceneSignUrl;
@ApiModelProperty("身份证图片")
private String idImagesUrl;
} }

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeign.java

@ -59,7 +59,7 @@ public interface AppScmVehicleInventoryFeign {
@ResponseBody @ResponseBody
public ResultBean getInventoryRecords(@PathVariable("userSid") String userSid); public ResultBean getInventoryRecords(@PathVariable("userSid") String userSid);
@ApiOperation("手机端-获取盘库列表") @ApiOperation("手机端-获取盘库列表")
@PostMapping("/getInventoryList") @PostMapping("/getInventoryList")
@ResponseBody @ResponseBody
public ResultBean<PagerVo<InventoryListPageVo>> getInventoryList(@RequestBody PagerQuery<InventoryListPageQuery> pagerQuery); public ResultBean<PagerVo<InventoryListPageVo>> getInventoryList(@RequestBody PagerQuery<InventoryListPageQuery> pagerQuery);
@ -74,7 +74,7 @@ public interface AppScmVehicleInventoryFeign {
@ResponseBody @ResponseBody
public ResultBean<StayInventoryInfoVo> getInventory(@PathVariable("recordSid") String recordSid); public ResultBean<StayInventoryInfoVo> getInventory(@PathVariable("recordSid") String recordSid);
@ApiOperation("手机端-初始化盘库记录") @ApiOperation("手机端-初始化盘库记录-弃用")
@GetMapping("/getInventoryByRecordSid/{recordSid}") @GetMapping("/getInventoryByRecordSid/{recordSid}")
@ResponseBody @ResponseBody
public ResultBean<StayInventoryInfoVo> getInventoryByRecordSid(@PathVariable("recordSid") String recordSid); public ResultBean<StayInventoryInfoVo> getInventoryByRecordSid(@PathVariable("recordSid") String recordSid);
@ -84,7 +84,7 @@ public interface AppScmVehicleInventoryFeign {
@ResponseBody @ResponseBody
public ResultBean saveInventory(@RequestBody StayInventoryDto dto); public ResultBean saveInventory(@RequestBody StayInventoryDto dto);
@ApiOperation("手机端-保存盘库记录操作") @ApiOperation("手机端-保存盘库记录操作-弃用")
@PostMapping("/saveInventoryByRecordSid") @PostMapping("/saveInventoryByRecordSid")
@ResponseBody @ResponseBody
public ResultBean saveInventoryByRecordSid(@RequestBody StayInventoryDto dto); public ResultBean saveInventoryByRecordSid(@RequestBody StayInventoryDto dto);

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageQuery.java

@ -19,7 +19,7 @@ public class CarInventoryListPageQuery implements Query {
@ApiModelProperty("存放地点sid") @ApiModelProperty("存放地点sid")
private String warehouseSid; private String warehouseSid;
@ApiModelProperty("盘库状态 通过1 不通过 2") @ApiModelProperty("盘库状态")
private String state; private String state;
@ApiModelProperty("使用组织分公司sid") @ApiModelProperty("使用组织分公司sid")

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageVo.java

@ -13,10 +13,10 @@ public class CarInventoryListPageVo implements Vo {
@ApiModelProperty("车架号") @ApiModelProperty("车架号")
private String vin; private String vin;
@ApiModelProperty("合格证状态") // @ApiModelProperty("合格证状态")
private String certificateState; // private String certificateState;
@ApiModelProperty("状态") @ApiModelProperty("盘库状态状态")
private String state; private String state;
@ApiModelProperty("最新盘库日期") @ApiModelProperty("最新盘库日期")

11
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryService.java

@ -30,6 +30,7 @@ import com.yxt.anrui.scm.api.scmvehicleinventory.*;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageQuery; import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageQuery;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageVo; import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryFeign; import com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryFeign;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthFeign;
import com.yxt.anrui.terminal.api.supplychain.inventory.*; import com.yxt.anrui.terminal.api.supplychain.inventory.*;
import com.yxt.anrui.terminal.config.CoverUtils; import com.yxt.anrui.terminal.config.CoverUtils;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
@ -60,6 +61,9 @@ public class AppScmVehicleInventoryService {
@Autowired @Autowired
ScmVehicleStayInventoryFeign scmVehicleStayInventoryFeign; ScmVehicleStayInventoryFeign scmVehicleStayInventoryFeign;
@Autowired
ScmVehInventorymonthFeign scmVehInventorymonthFeign;
/** /**
* 手机端-判断是否生成盘库记录 * 手机端-判断是否生成盘库记录
* *
@ -67,13 +71,12 @@ public class AppScmVehicleInventoryService {
* @return * @return
*/ */
public ResultBean getInventoryRecords(String userSid) { public ResultBean getInventoryRecords(String userSid) {
// ResultBean resultBean = scmVehicleStayInventoryFeign.getInventoryRecords(userSid); ResultBean resultBean = scmVehInventorymonthFeign.getInventoryRecords(userSid);
// return resultBean; return resultBean;
return null;
} }
/** /**
* 手机端-获取盘库列表 * 手机端-获取盘库列表
* *
* @param pagerQuery * @param pagerQuery
* @return * @return

29
doc/databases/base_tables.sql

@ -867,5 +867,34 @@ CREATE TABLE `bus_vehicle_apply_sz`
DROP TABLE IF EXISTS `base_vehicle_actual_pay`;
CREATE TABLE `base_vehicle_actual_pay`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`vehicleActualSid` VARCHAR(64) DEFAULT NULL COMMENT '车辆未售买断',
`paymentType` varchar(64) DEFAULT NULL COMMENT '付款方式',
`paymentTypeKey` varchar(64) DEFAULT NULL COMMENT '付款方式key',
`actualPay` varchar(255) DEFAULT NULL COMMENT '厂家销售通路',
`bank` varchar(255) DEFAULT NULL COMMENT '开户行',
`receivingAccount` varchar(255) DEFAULT NULL COMMENT '收款银行账号',
`payAccount` varchar(255) DEFAULT NULL COMMENT '付款金额',
`payRemark` varchar(255) DEFAULT NULL COMMENT '付款备注',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
DEFAULT CHARSET = utf8 COMMENT ='未售买断付款';

50
doc/databases/scm_tables_vehicle.sql

@ -276,3 +276,53 @@ CREATE TABLE `scm_vehicle_patrolinspectionsheet`
KEY `id` (`id`) KEY `id` (`id`)
) ENGINE = INNODB ) ENGINE = INNODB
DEFAULT CHARSET = utf8 COMMENT ='巡检单'; DEFAULT CHARSET = utf8 COMMENT ='巡检单';
-- 10、月度盘库
DROP TABLE IF EXISTS `scm_veh_inventoryMonth`;
CREATE TABLE `scm_veh_inventoryMonth`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '盘库报告生成状态(0 未生成 1 已生成)',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`billNo` varchar(64) DEFAULT NULL COMMENT '编号(yyyyMMdd)',
`createOrgSid` varchar(64) DEFAULT NULL COMMENT '创建组织',
`createOrgName` varchar(64) DEFAULT NULL COMMENT '创建组织名称',
`useOrgSid` varchar(64) DEFAULT NULL COMMENT '使用组织',
`useOrgName` varchar(64) DEFAULT NULL COMMENT '使用组织名称',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
DEFAULT CHARSET = utf8 COMMENT ='月度盘库';
-- 5、盘库报告
DROP TABLE IF EXISTS `scm_veh_inventoryReport`;
CREATE TABLE `scm_veh_inventoryReport`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`mainSid` varchar(64) DEFAULT NULL COMMENT '月度盘库sid',
`receiverSids` varchar(64) DEFAULT NULL COMMENT '接收人sid',
`receiverNames` varchar(64) DEFAULT NULL COMMENT '接收人姓名',
`reportContent` varchar(64) DEFAULT NULL COMMENT '盘库报告内容',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
DEFAULT CHARSET = utf8 COMMENT ='盘库报告';
Loading…
Cancel
Save