Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
lzh 3 years ago
parent
commit
0db4047090
  1. 4
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java
  2. 5
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java
  3. 16
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListQuery.java
  4. 19
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListVo.java
  5. 6
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java
  6. 6
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java
  7. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java
  8. 7
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml
  9. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java
  10. 8
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java
  11. 6
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleService.java
  12. 10
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleactualsales/BaseVehicleActualSalesService.java
  13. 8
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java
  14. 5
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java
  15. 17
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListQuery.java
  16. 19
      anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListVo.java
  17. 1
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java
  18. 7
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml
  19. 5
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java
  20. 13
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java
  21. 17
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrgStaffVo.java
  22. 7
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java
  23. 5
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java
  24. 16
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListQuery.java
  25. 23
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListVo.java
  26. 3
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java
  27. 26
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml
  28. 5
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java
  29. 18
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java
  30. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java
  31. 14
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml
  32. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java
  33. 3
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java
  34. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java
  35. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java
  36. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java
  37. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java
  38. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java
  39. 58
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleStayInventoryQuery.java
  40. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java
  41. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java
  42. 20
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java
  43. 34
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java
  44. 17
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java
  45. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  46. 3
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java
  47. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml
  48. 5
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java
  49. 21
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java
  50. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java
  51. 25
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java
  52. 10
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml
  53. 33
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java
  54. 49
      anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js
  55. 164
      anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_morebypicture.vue
  56. 78
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue
  57. 166
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuByPanYing.vue
  58. 198
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoAdd.vue
  59. 119
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoInfo.vue
  60. 256
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoguanli.vue
  61. 157
      anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue
  62. 3
      doc/databases/base_tables.sql

4
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeign.java

@ -132,4 +132,8 @@ public interface BaseDistributorFeign {
@ApiOperation("移动-经销商附件清单保存修改")
@PostMapping("/saveDistributorFileInfo")
ResultBean saveDistributorFileInfo(@RequestBody BaseFileDto dto);
@ApiOperation("二级经销商列表")
@GetMapping("/selectDisList")
ResultBean<List<BaseDistributorListVo>> selectDisList(@SpringQueryMap BaseDistributorListQuery query);
}

5
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorFeignFallback.java

@ -142,5 +142,10 @@ public class BaseDistributorFeignFallback implements BaseDistributorFeign {
return null;
}
@Override
public ResultBean<List<BaseDistributorListVo>> selectDisList(BaseDistributorListQuery query) {
return null;
}
}

16
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListQuery.java

@ -0,0 +1,16 @@
package com.yxt.anrui.base.api.basedistributor;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 15:11
* @Description
*/
@Data
public class BaseDistributorListQuery implements Query {
private static final long serialVersionUID = -7474049355274135681L;
private String userSid;
}

19
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basedistributor/BaseDistributorListVo.java

@ -0,0 +1,19 @@
package com.yxt.anrui.base.api.basedistributor;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 14:56
* @Description
*/
@Data
public class BaseDistributorListVo implements Vo {
private static final long serialVersionUID = 7567158573644935938L;
private String name;
private String sid;
}

6
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOut.java

@ -48,4 +48,10 @@ public class BaseVehicleOut extends BaseEntity {
private String actualCustomer;
@ApiModelProperty("实际购车人电话")
private String actualMobile;
@ApiModelProperty("实际购车人sid")
private String actualSid;
@ApiModelProperty("二次经销商sid")
private String distributorSid;
@ApiModelProperty("客户sid")
private String customerSid;
}

6
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutDto.java

@ -35,12 +35,16 @@ public class BaseVehicleOutDto implements Dto {
private String isTerminal;
@ApiModelProperty("客户名称")
private String customerName;
@ApiModelProperty("客户sid")
private String customerSid;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("赠品说明")
private String giftsDescription;
@ApiModelProperty("二次经销商")
private String distributorName;
@ApiModelProperty("二次经销商sid")
private String distributorSid;
@ApiModelProperty("返利金额")
private String rebateAmount;
@ -48,4 +52,6 @@ public class BaseVehicleOutDto implements Dto {
private String actualCustomer;
@ApiModelProperty("实际购车人电话")
private String actualMobile;
@ApiModelProperty("实际购车人sid")
private String actualSid;
}

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.java

@ -118,4 +118,6 @@ public interface BaseDistributorMapper extends BaseMapper<BaseDistributor> {
BaseDistributor selectBySidOne(String sid);
void updateInvoiceBySid(@Param("invoBankNum") String invoBankNum, @Param("invoBank") String invoBank, @Param("invoPhone") String invoPhone, @Param("sid") String sid);
List<BaseDistributorListVo> selectDisList(String orgSid);
}

7
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorMapper.xml

@ -187,4 +187,11 @@
invoBank = #{invoBank}
where sid = #{sid}
</update>
<select id="selectDisList" resultType="com.yxt.anrui.base.api.basedistributor.BaseDistributorListVo">
select disName as name,sid
from base_distributor
where length(pDistributorSid) > 0
and useOrg = #{orgSid}
</select>
</mapper>

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorRest.java

@ -249,4 +249,9 @@ public class BaseDistributorRest implements BaseDistributorFeign {
public ResultBean saveDistributorFileInfo(BaseFileDto dto) {
return baseDistributorService.saveDistributorFileInfo(dto);
}
@Override
public ResultBean<List<BaseDistributorListVo>> selectDisList(BaseDistributorListQuery query) {
return baseDistributorService.selectDisList(query);
}
}

8
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributor/BaseDistributorService.java

@ -754,4 +754,12 @@ public class BaseDistributorService extends MybatisBaseService<BaseDistributorMa
}
return rb.success();
}
public ResultBean<List<BaseDistributorListVo>> selectDisList(BaseDistributorListQuery query) {
ResultBean<List<BaseDistributorListVo>> rb = ResultBean.fireFail();
String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData();
List<BaseDistributorListVo> list = baseMapper.selectDisList(orgSid);
list.removeAll(Collections.singleton(null));
return rb.success().setData(list);
}
}

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

@ -803,7 +803,7 @@ public class BaseVehicleService extends MybatisBaseService<BaseVehicleMapper, Ba
if (StringUtils.isNotBlank(pagerQuery.getUseOrg())) { // 分公司
qw.eq("bv.useOrgSid", pagerQuery.getUseOrg());
}
qw.eq("bv.isProblemVeh","0");
qw.eq("bv.isProblemVeh", "0");
return qw;
}
@ -1553,7 +1553,7 @@ public class BaseVehicleService extends MybatisBaseService<BaseVehicleMapper, Ba
}
qw.and(wrapper -> wrapper.eq("bv.vehicleState", VehicleState.StockEnum.STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.ING_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DR_STOCK.getCode()));
qw.eq("bv.lockedState", VehicleState.LockEnum.UN_LOCK.getCode());
qw.eq("bv.isProblemVeh","0");
qw.eq("bv.isProblemVeh", "0");
}
return qw;
}
@ -1697,7 +1697,9 @@ public class BaseVehicleService extends MybatisBaseService<BaseVehicleMapper, Ba
//条件:本分公司、非删除、库存或采购退库中或调入或调出中
QueryWrapper<BaseVehicle> qw = new QueryWrapper<>();
qw.and(wrapper -> wrapper.eq("bv.vehicleState", VehicleState.StockEnum.STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.RETURNING_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DCZ_STOCK.getCode()).or().eq("bv.vehicleState", VehicleState.StockEnum.DR_STOCK.getCode()));
if (vinNoList.size() > 0) {
qw.notIn("bv.vinNo", vinNoList);
}
List<AppScmInventoryRecordsVo> list = baseMapper.selectInventoryRecords(userOrgSid, qw);
return rb.success().setData(list);
}

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

@ -382,6 +382,16 @@ public class BaseVehicleActualSalesService extends MybatisBaseService<BaseVehicl
if (StringUtils.isBlank(dto.getInstanceId())) {
return rb.setMsg("参数错误:instanceId");
}
//更新车辆的结算状态为预买断
//结算状态设置为预买断
List<BaseVehicleActualDetailsDto> detailsList = dto.getDetailsList();
for (BaseVehicleActualDetailsDto f : detailsList) {
BaseVehicle baseVehicle = baseVehicleService.selectByVinNoAndOrgSid(f.getVinNo(), useOrgSid);
baseVehicle.setVinNo(f.getVinNo());
baseVehicle.setSettlementStatus(VehicleState.BuyoutEnum.PRE_BUYOUT.getCode());
baseVehicle.setSettlementStatusValue(VehicleState.BuyoutEnum.PRE_BUYOUT.getRemarks());
baseVehicleService.updateVeh(baseVehicle);
}
bv.setTaskId(baseVehicleActualSales.getTaskId());
bv.setTaskDefKey(baseVehicleActualSales.getNodeId());
bv.setComment("重新提交");

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

@ -8,6 +8,7 @@ import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@ -149,6 +150,11 @@ public interface CrmCustomerTempFeign {
@ResponseBody
@GetMapping("/selectCustomerFile/{customerSid}")
public ResultBean<List<String>> selectCustomerFile(@PathVariable("customerSid")String customerSid);
public ResultBean<List<String>> selectCustomerFile(@PathVariable("customerSid") String customerSid);
@ResponseBody
@GetMapping("/selectCustomerList")
@ApiOperation("查询该分公司业务员下的客户列表")
ResultBean<List<CrmCustomerTempListVo>> selectCustomerList(@SpringQueryMap CrmCustomerTempListQuery query);
}

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

@ -120,5 +120,10 @@ public class CrmCustomerTempFeignFallback implements CrmCustomerTempFeign {
return null;
}
@Override
public ResultBean<List<CrmCustomerTempListVo>> selectCustomerList(CrmCustomerTempListQuery query) {
return null;
}
}

17
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListQuery.java

@ -0,0 +1,17 @@
package com.yxt.anrui.crm.api.crmcustomertemp;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 14:30
* @Description
*/
@Data
public class CrmCustomerTempListQuery implements Query {
private static final long serialVersionUID = -8235453055415557265L;
private String userSid;
private String staffSid;
}

19
anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempListVo.java

@ -0,0 +1,19 @@
package com.yxt.anrui.crm.api.crmcustomertemp;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 14:28
* @Description
*/
@Data
public class CrmCustomerTempListVo implements Vo {
private static final long serialVersionUID = 5338688085476236821L;
private String name;
private String sid;
private String mobile;
}

1
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.java

@ -118,4 +118,5 @@ public interface CrmCustomerTempMapper extends BaseMapper<CrmCustomerTemp> {
CrmCustomerTempVo selByMobile(@Param("mobile") String mobile);
List<CrmCustomerTempListVo> selectCustomerList(@Param("orgSid") String orgSid, @Param("staffSid") String staffSid);
}

7
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempMapper.xml

@ -205,4 +205,11 @@
FROM crm_customer_temp
WHERE mobile = #{mobile}
</select>
<select id="selectCustomerList" resultType="com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempListVo">
select ct.name,ct.sid,ct.mobile
from crm_customer_temp ct
where createOrgSid = #{orgSid}
and staffSid = #{staffSid}
</select>
</mapper>

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

@ -268,5 +268,10 @@ public class CrmCustomerTempRest implements CrmCustomerTempFeign {
return crmCustomerFileService.selectCustomerFile(customerSid);
}
@Override
public ResultBean<List<CrmCustomerTempListVo>> selectCustomerList(CrmCustomerTempListQuery query) {
return crmCustomerTempService.selectCustomerList(query);
}
}

13
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java

@ -23,6 +23,7 @@ import com.yxt.anrui.crm.biz.crmvehicledemand.CrmVehicledemandService;
import com.yxt.anrui.crm.biz.crmvisit.CrmVisitService;
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign;
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserInfoVo;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
@ -85,6 +86,8 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
private CrmFileService crmFileService;
@Autowired
private CommonAppendixFeign commonAppendixFeign;
@Autowired
private SysStaffOrgFeign sysStaffOrgFeign;
public PagerVo<CrmCustomerTemp> listPage(PagerQuery<CrmCustomerTempQuery> pq) {
@ -877,4 +880,14 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa
public CrmCustomerTempVo selByMobile(String mobile) {
return baseMapper.selByMobile(mobile);
}
public ResultBean<List<CrmCustomerTempListVo>> selectCustomerList(CrmCustomerTempListQuery query) {
ResultBean<List<CrmCustomerTempListVo>> rb = ResultBean.fireFail();
String staffSid = query.getStaffSid();
//根据用户sid查询分公司sid
String orgSid = sysStaffOrgFeign.getPathSidByUserSid(query.getUserSid()).getData();
List<CrmCustomerTempListVo> list = baseMapper.selectCustomerList(orgSid, staffSid);
list.removeAll(Collections.singleton(null));
return rb.success().setData(list);
}
}

17
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrgStaffVo.java

@ -0,0 +1,17 @@
package com.yxt.anrui.portal.api.sysorganization;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 11:48
* @Description
*/
@Data
public class SysOrgStaffVo implements Vo {
private static final long serialVersionUID = -4311553944345419092L;
private String staffName;
private String staffSid;
}

7
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeign.java

@ -1,6 +1,5 @@
package com.yxt.anrui.portal.api.sysorganization;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -8,6 +7,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -134,4 +134,9 @@ public interface SysOrganizationFeign {
@ResponseBody
@ApiOperation("根据当前用户的所在组织获取当前用户所在的分公司")
ResultBean<String> getOrgSid(@PathVariable(value = "sid") String sid);
@GetMapping("/selectOrgList")
@ResponseBody
@ApiOperation("当前分公司销售部门及部门人员")
ResultBean<List<SysOrganizationListVo>> selectOrgList(@SpringQueryMap SysOrganizationListQuery query);
}

5
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationFeignFallback.java

@ -137,4 +137,9 @@ public class SysOrganizationFeignFallback implements SysOrganizationFeign {
public ResultBean<String> getOrgSid(String sid) {
return null;
}
@Override
public ResultBean<List<SysOrganizationListVo>> selectOrgList(SysOrganizationListQuery query) {
return null;
}
}

16
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListQuery.java

@ -0,0 +1,16 @@
package com.yxt.anrui.portal.api.sysorganization;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2022/9/26 11:49
* @Description
*/
@Data
public class SysOrganizationListQuery implements Query {
private static final long serialVersionUID = 8657016527420117948L;
private String userSid;
}

23
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysorganization/SysOrganizationListVo.java

@ -0,0 +1,23 @@
package com.yxt.anrui.portal.api.sysorganization;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
import java.util.List;
/**
* @Author dimengzhe
* @Date 2022/9/26 11:42
* @Description
*/
@Data
public class SysOrganizationListVo implements Vo {
private static final long serialVersionUID = -3709239161608411765L;
private String orgDeptSid;
private String orgDeptName;
private List<SysOrgStaffVo> staffinfoVoList;
}

3
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.java

@ -105,4 +105,7 @@ public interface SysOrganizationMapper extends BaseMapper<SysOrganization> {
SysOrgVo getListOrgByBrand(String sid);
List<SysOrganizationListVo> selectOrgList(String orgSid);
List<SysOrgStaffVo> selectByOrgDeptSid(String orgDeptSid);
}

26
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationMapper.xml

@ -108,7 +108,8 @@
<select id="selectOrgCodeByPsid" resultType="com.yxt.anrui.portal.api.sysorganization.SysOrganization">
SELECT *
FROM sys_organization LIMIT 0,1
FROM sys_organization
LIMIT 0,1
</select>
<select id="selectTreeList" resultType="com.yxt.anrui.portal.api.sysorganization.SysOrgListVo">
@ -157,11 +158,9 @@
</select>
<select id="selectUseOrgSidBySid" resultType="java.util.Map">
SELECT
sid,
SELECT sid,
name
FROM
sys_organization
FROM sys_organization
WHERE psid = #{psid}
AND isDelete = 0
AND isDept = 0
@ -170,7 +169,22 @@
<select id="getListOrgByBrand" resultType="com.yxt.anrui.portal.api.sysorganization.SysOrgVo">
SELECT so.name, so.psid, so.id, so.sid, so.orgSidPath
FROM sys_organization so
WHERE isDept = 0 AND so.sid = #{sid}
WHERE isDept = 0
AND so.sid = #{sid}
ORDER BY psid
</select>
<select id="selectOrgList" resultType="com.yxt.anrui.portal.api.sysorganization.SysOrganizationListVo">
select so.name orgDeptName, so.sid orgDeptSid
from sys_organization so
where so.psid = #{orgSid}
and orgAttributeKey = 'DP03_SYS'
</select>
<select id="selectByOrgDeptSid" resultType="com.yxt.anrui.portal.api.sysorganization.SysOrgStaffVo">
select distinct si.name staffName, si.sid staffSid
from sys_staff_org so
left join sys_staffinfo si on so.staffSid = si.sid
where so.orgSid = #{orgDeptSid}
</select>
</mapper>

5
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java

@ -356,4 +356,9 @@ public class SysOrganizationRest implements SysOrganizationFeign {
String orgSid = sysOrganizationService.getOrgSid(sid);
return rb.success().setData(orgSid);
}
@Override
public ResultBean<List<SysOrganizationListVo>> selectOrgList(SysOrganizationListQuery query) {
return sysOrganizationService.selectOrgList(query);
}
}

18
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java

@ -477,4 +477,22 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa
sid = sysOrganization.getPsid();
return getOrgSid(sid);
}
public ResultBean<List<SysOrganizationListVo>> selectOrgList(SysOrganizationListQuery query) {
ResultBean<List<SysOrganizationListVo>> rb = ResultBean.fireFail();
//根据用户sid查询分公司sid
String orgDeptSid = sysStaffOrgService.selectByUserSid(query.getUserSid());
String orgSid = getOrgSid(orgDeptSid);
//根据分公司名称查询销售部门的部门
List<SysOrganizationListVo> sysOrganizationListVos = baseMapper.selectOrgList(orgSid);
sysOrganizationListVos.removeAll(Collections.singleton(null));
if (!sysOrganizationListVos.isEmpty()) {
for (SysOrganizationListVo vo : sysOrganizationListVos) {
orgDeptSid = vo.getOrgDeptSid();
List<SysOrgStaffVo> sysOrgStaffVoList = baseMapper.selectByOrgDeptSid(orgDeptSid);
vo.setStaffinfoVoList(sysOrgStaffVoList);
}
}
return rb.success().setData(sysOrganizationListVos);
}
}

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java

@ -102,4 +102,6 @@ public interface SysStaffOrgMapper extends BaseMapper<SysStaffOrg> {
List<SysStaffOrgVo> selectByStaffS(String staffSid);
List<String> selectByOrgSid(String sid);
String selectByUserSid(String userSid);
}

14
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml

@ -90,6 +90,18 @@
</select>
<select id="selectByOrgSid" resultType="java.lang.String">
select staffSid from sys_staff_org where orgSid = #{sid} and manageType = 2
select staffSid
from sys_staff_org
where orgSid = #{sid}
and manageType = 2
</select>
<select id="selectByUserSid" resultType="java.lang.String">
select orgSid
from sys_staff_org so
left join sys_user su on su.staffSid = so.staffSid
left join sys_staffinfo si on si.sid = su.staffSid
where so.manageType = '3'
and su.sid = #{userSid}
</select>
</mapper>

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java

@ -281,4 +281,8 @@ public class SysStaffOrgService extends MybatisBaseService<SysStaffOrgMapper, Sy
public List<String> selectByOrgSid(String sid) {
return baseMapper.selectByOrgSid(sid);
}
public String selectByUserSid(String userSid) {
return baseMapper.selectByUserSid(userSid);
}
}

3
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateVo.java

@ -74,7 +74,8 @@ public class ScmSpecialRebateVo implements Vo {
@ApiModelProperty("预计返利")
private String estimateRebate; // 预计返利
@ApiModelProperty("预提日期")
private String withholdingDate; // 预提日期
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date withholdingDate; // 预提日期
@ApiModelProperty("预提日期(页面展示)")
private String withholdingDateCopy; // 预提日期(页面展示)
@ApiModelProperty("上传日期")

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java

@ -64,7 +64,7 @@ public class ScmSpecialRebateWithApplyVo implements Vo {
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private String withRebateTotal; // 预提返利合计
private Integer withRebateTotal; // 预提返利合计
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeign.java

@ -59,6 +59,11 @@ public interface ScmVehicleInventoryFeign {
@ResponseBody
public ResultBean<PagerVo<ScmVehicleInventoryVo>> listPage(@RequestBody PagerQuery<ScmVehicleInventoryQuery> pq);
@ApiOperation("待盘库记录列表")
@PostMapping("/stayListPage")
@ResponseBody
public ResultBean<PagerVo<ScmVehicleInventoryVo>> stayListPage(@RequestBody PagerQuery<ScmVehicleStayInventoryQuery> pq);
@ApiOperation("盘库修改状态")
@PostMapping("/updateState")
@ResponseBody

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryFeignFallback.java

@ -52,6 +52,11 @@ public class ScmVehicleInventoryFeignFallback implements ScmVehicleInventoryFeig
return rb.setMsg("接口anrui_scm/scmvehicleinventory/listPage无法访问");
}
@Override
public ResultBean<PagerVo<ScmVehicleInventoryVo>> stayListPage(PagerQuery<ScmVehicleStayInventoryQuery> pq) {
return null;
}
@Override
public ResultBean updateState(String sid, String inventoryStateKey, String inventoryState, String certificateKey, String certificate, String remarks) {
return null;

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryQuery.java

@ -51,7 +51,7 @@ import lombok.Data;
public class ScmVehicleInventoryQuery implements Query {
@ApiModelProperty("车架号")
private String mainSid; // 车架号
private String vinNo; // 车架号
@ApiModelProperty("盘库开始日期")
@JsonProperty("InventStartDate")
private String InventStartDate;

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleInventoryVo.java

@ -56,9 +56,13 @@ public class ScmVehicleInventoryVo implements Vo {
private String sid; // sid
@ApiModelProperty("车架号")
private String mainSid; // 车架号
private String vinNo; // 车架号
@ApiModelProperty("主表sid")
private String mainSid; // 主表sid
@ApiModelProperty("存放地点")
private String location; // 存放地点
@ApiModelProperty("存放地点sid")
private String locationSid; // 存放地点sid
@ApiModelProperty("盘库日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date InventoryDate; // 盘库日期

58
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/ScmVehicleStayInventoryQuery.java

@ -0,0 +1,58 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehicleinventory;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: anrui_scm(anrui_scm) <br/>
* File: ScmVehicleInventoryQuery.java <br/>
* Class: anrui_scm.api.scmvehicleinventory.ScmVehicleInventoryQuery <br/>
* Description: 盘库记录 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-06-15 14:30:59 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "盘库记录 查询条件", description = "盘库记录 查询条件")
public class ScmVehicleStayInventoryQuery implements Query {
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("存放地点sid")
private String locationSid; // 存放地点sid
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
}

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

@ -83,6 +83,4 @@ public class AppScmVehInventorymonthVo implements Vo {
private String normalNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

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

@ -58,7 +58,7 @@ import java.util.List;
fallback = ScmVehInventorymonthFeignFallback.class)
public interface ScmVehInventorymonthFeign {
@ApiOperation("根据条件分页查询数据的列表")
@ApiOperation("PC端-获取盘库报告列表")
@PostMapping("/listPage")
@ResponseBody
public ResultBean<PagerVo<ScmVehInventorymonthVo>> listPage(@RequestBody PagerQuery<ScmVehInventorymonthQuery> pq);

20
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthQuery.java

@ -26,6 +26,7 @@
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
@ -49,15 +50,12 @@ import lombok.Data;
@ApiModel(value = "月度盘库 查询条件", description = "月度盘库 查询条件")
public class ScmVehInventorymonthQuery implements Query {
@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 createByName;
@ApiModelProperty("创建开始日期")
private String createStartTime; // 创建开始日期
@ApiModelProperty("创建结束日期")
private String createEndTime; // 创建结束日期
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
}

34
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthVo.java

@ -26,6 +26,7 @@
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
@ -52,18 +53,29 @@ import java.util.Date;
public class ScmVehInventorymonthVo implements Vo {
private String sid; // sid
@ApiModelProperty("生成报告状态")
private String state;
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建时间")
private Date createTime; // 使用组织名称
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime; //
@ApiModelProperty("创建人")
private String createByName;
@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("正常数量")
private String normalNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

17
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java

@ -26,7 +26,11 @@
package com.yxt.anrui.scm.biz.scmspecialrebate;
import com.yxt.anrui.scm.api.scmspecialrebate.*;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApply;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApplyVo;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebate;
import com.yxt.anrui.scm.biz.scmspecialrebatewith.ScmSpecialRebateWithService;
import com.yxt.anrui.scm.biz.scmspecialrebatewithapply.ScmSpecialRebateWithApplyService;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -35,6 +39,8 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Project: anrui-scm(专项返利管理) <br/>
* File: ScmSpecialRebateFeignFallback.java <br/>
@ -55,6 +61,10 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign {
@Autowired
private ScmSpecialRebateService scmSpecialRebateService;
@Autowired
private ScmSpecialRebateWithService scmSpecialRebateWithService;
@Autowired
private ScmSpecialRebateWithApplyService scmSpecialRebateWithApplyService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@ -85,6 +95,13 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign {
public ResultBean delBySids(@RequestBody String[] sids){
ResultBean rb = ResultBean.fireFail();
for (String sid : sids) {
List<String> stringList = scmSpecialRebateWithService.fetchBySpecialReBateSid(sid);
for (String s : stringList) {
ScmSpecialRebateWithApply scmSpecialRebateWithApply = scmSpecialRebateWithApplyService.fetchBySid(s);
if (!scmSpecialRebateWithApply.getNodeState().equals("待提交")){
return rb.setMsg("所选数据中包含已提交专项返利信息,无法删除");
}
}
ScmSpecialRebate scmSpecialRebate = scmSpecialRebateService.fetchBySid(sid);
Integer state = scmSpecialRebate.getState();
if (state == 1){

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java

@ -227,10 +227,9 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
IPage<ScmSpecialRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmSpecialRebateVo> pagging = baseMapper.selectPageVo(page, qw);
for (ScmSpecialRebateVo record : pagging.getRecords()) {
String withholdingDate = record.getWithholdingDate();
Date parse = DateUtil.parse(withholdingDate);
int year = DateUtil.year(parse);
int month = DateUtil.month(parse) + 1;
Date withholdingDate = record.getWithholdingDate();
int year = DateUtil.year(withholdingDate);
int month = DateUtil.month(withholdingDate) + 1;
String withholdingDateCopy = year + "年" + month + "月";
record.setWithholdingDateCopy(withholdingDateCopy);
}

3
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java

@ -38,6 +38,7 @@ import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWith;
import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo;
import java.util.List;
import java.util.Map;
/**
* Project: anrui-scm(专项返利) <br/>
@ -72,4 +73,6 @@ public interface ScmSpecialRebateWithMapper extends BaseMapper<ScmSpecialRebateW
@Select("select specialRebateSid from scm_special_rebate_with where mainSid = #{businessSid}")
List<String> fetchSpecialReBateSidByMainSid(String businessSid);
List<String> fetchBySpecialReBateSid(String sid);
}

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml

@ -29,4 +29,8 @@
WHERE ssrw.`mainSid` = #{sid}
GROUP BY ssr.`calculationModeKey`
</select>
<select id="fetchBySpecialReBateSid" resultType="java.lang.String">
SELECT mainSid FROM scm_special_rebate_with WHERE specialRebateSid = #{sid}
</select>
</mapper>

5
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java

@ -48,6 +48,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Project: anrui-scm(专项返利) <br/>
@ -140,4 +141,8 @@ public class ScmSpecialRebateWithService extends MybatisBaseService<ScmSpecialRe
}
return rb.success().setData(scmSpecialRebateDetailsVos);
}
public List<String> fetchBySpecialReBateSid(String sid) {
return baseMapper.fetchBySpecialReBateSid(sid);
}
}

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

@ -677,10 +677,25 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
return rb.setMsg("操作失败!提交的数据不一致");
}
String sid = dto.getSid();
//存放车架号
//判断要提交的车辆sid是否存在于临时表中
//查询车架号与存放地点是否匹配
List<ScmVehicleGressionVehDto> scmVehicleGressionVehDtos = dto.getScmVehicleGressionVehs();
String vinNo = "";
for (ScmVehicleGressionVehDto v : scmVehicleGressionVehDtos) {
//根据车辆sid查询存放地点是否与该存放地点一致。将不一致的查询出来
ResultBean<BaseVehicleSelectVo> baseVehicleSelectVoResultBean = baseVehicleFeign.details(v.getVehSid());
if (!baseVehicleSelectVoResultBean.getSuccess()) {
return rb.setMsg("选择的车辆中包含车辆不存在的数据");
}
BaseVehicleSelectVo baseVehicleSelectVo = baseVehicleSelectVoResultBean.getData();
if (!dto.getLocationSid().equals(baseVehicleSelectVo.getLocation())) {
vinNo = v.getVehVin() + ",";
}
}
if (StringUtils.isNotBlank(vinNo)) {
vinNo = vinNo.replace(",", "");
return rb.setMsg(vinNo + "的车辆不再该现存放地点内");
}
//判断要提交的车辆sid是否存在于临时表中
for (ScmVehicleGressionVehDto v : scmVehicleGressionVehDtos) {
List<BaseVehicleTempstateVo> carSidList = baseVehicleTempstateFeign.selectAll("001").getData();
for (BaseVehicleTempstateVo vv : carSidList) {

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryRest.java

@ -70,6 +70,13 @@ public class ScmVehicleInventoryRest implements ScmVehicleInventoryFeign {
return rb.success().setData(pv);
}
@Override
public ResultBean<PagerVo<ScmVehicleInventoryVo>> stayListPage(PagerQuery<ScmVehicleStayInventoryQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<ScmVehicleInventoryVo> pv = scmVehicleInventoryService.stayListPage(pq);
return rb.success().setData(pv);
}
@Override
public ResultBean updateState(String sid, String inventoryStateKey, String inventoryState, String certificateKey, String certificate, String remarks) {
return scmVehicleInventoryService.updateState(sid, inventoryStateKey, inventoryState, remarks);

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

@ -35,6 +35,7 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicleVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.scm.api.scmfile.ScmFile;
import com.yxt.anrui.scm.api.scmvehicleinventory.*;
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleStayInventoryQuery;
import com.yxt.anrui.scm.api.scmvehiclepatrolinspectionsheet.ScmVehiclePatrolinspectionsheetDto;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.*;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
@ -104,8 +105,8 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
ScmVehicleInventoryQuery query = pq.getParams();
QueryWrapper<ScmVehicleInventory> qw = new QueryWrapper<>();
qw.eq("createOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getMainSid())) {
qw.like("mainSid", query.getMainSid());
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.like("vinNo", query.getVinNo());
}
if (StringUtils.isNotBlank(query.getLocationSid())) {
qw.eq("locationSid", query.getLocationSid());
@ -113,14 +114,34 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
if (StringUtils.isNotBlank(query.getInventoryStateKey())) {
qw.eq("InventoryStateKey", query.getInventoryStateKey());
}
qw.ne("InventoryStateKey", "");
String inventStartDate = query.getInventStartDate();
String inventEndDate = query.getInventEndDate();
qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (InventoryDate,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(inventEndDate), "date_format (InventoryDate,'%Y-%m-%d') <= date_format('" + inventEndDate + "','%Y-%m-%d')"
);
IPage<ScmVehicleInventory> page = PagerUtil.queryToPage(pq);
IPage<ScmVehicleInventoryVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehicleInventoryVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public PagerVo<ScmVehicleInventoryVo> stayListPage(PagerQuery<ScmVehicleStayInventoryQuery> pq) {
ScmVehicleStayInventoryQuery query = pq.getParams();
QueryWrapper<ScmVehicleInventory> qw = new QueryWrapper<>();
qw.eq("createOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.like("vinNo", query.getVinNo());
}
if (StringUtils.isNotBlank(query.getLocationSid())) {
qw.eq("locationSid", query.getLocationSid());
}
qw.eq("InventoryStateKey", "");
IPage<ScmVehicleInventory> page = PagerUtil.queryToPage(pq);
IPage<ScmVehicleInventoryVo> pagging = baseMapper.selectPageVo(page, qw);
for (ScmVehicleInventoryVo record : pagging.getRecords()) {
record.setInventoryState("");
}
PagerVo<ScmVehicleInventoryVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}

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

@ -4,7 +4,15 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth
SELECT
sid,
billNo,
createTime,
createBySid,
createByName,
`state`
FROM
scm_veh_inventorymonth
<where>${ew.sqlSegment}</where>
</select>

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

@ -97,9 +97,38 @@ public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInvent
public PagerVo<ScmVehInventorymonthVo> listPageVo(PagerQuery<ScmVehInventorymonthQuery> pq) {
ScmVehInventorymonthQuery query = pq.getParams();
QueryWrapper<ScmVehInventorymonth> qw = createQueryWrapper(query);
QueryWrapper<ScmVehInventorymonth> qw = new QueryWrapper<>();
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.eq("createOrgSid", query.getCreateOrgSid());
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
if (StringUtils.isNotBlank(query.getCreateByName())) {
qw.like("createByName", query.getCreateByName());
}
qw.orderByDesc("id");
IPage<ScmVehInventorymonth> page = PagerUtil.queryToPage(pq);
IPage<ScmVehInventorymonthVo> pagging = baseMapper.selectPageVo(page, qw);
for (ScmVehInventorymonthVo record : pagging.getRecords()) {
String mainSid = record.getSid();
AppVehInventorymonthVo vo = scmVehicleInventoryService.getMonthByMainSid(mainSid);
record.setSurplusNumber(String.valueOf(vo.getSurplusNumber()));
record.setTotalNumber(String.valueOf(vo.getTotalNumber()));
record.setLossNumber(String.valueOf(vo.getLossNumber()));
record.setDamageNumber(String.valueOf(vo.getDamageNumber()));
record.setProfitNumber(String.valueOf(vo.getProfitNumber()));
record.setActualNumber(String.valueOf(vo.getProfitNumber() + vo.getNormalNumber() + vo.getDamageNumber() + vo.getLossNumber()));
if ("0".equals(record.getState())) {
if (vo.getSurplusNumber() == 0) {
record.setShowBtn(true);
} else {
record.setShowBtn(false);
}
} else {
record.setShowBtn(false);
}
}
PagerVo<ScmVehInventorymonthVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
@ -151,12 +180,14 @@ public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInvent
if (vehicleCarInventoryListPageVos.size() > 0) {
for (AppScmVehicleCarInventoryListPageVo vehicleCarInventoryListPageVo : vehicleCarInventoryListPageVos) {
ScmVehInventorymonth scmVehInventorymonth = fetchBySid(vehicleCarInventoryListPageVo.getMainSid());
if (scmVehInventorymonth != null) {
if (scmVehInventorymonth.getState() == 0) {
return rb.setMsg("上次盘库记录未生成报告,请先生成再操作!");
}
}
}
}
}
// List<ScmVehInventorymonthVo> scmVehInventorymonthVos = baseMapper.selectListVo();
// if (scmVehInventorymonthVos.size() > 0) {
// Date oldDate = scmVehInventorymonthVos.get(0).getCreateTime();

49
anrui-scm/anrui-scm-ui/src/api/kucunguanli/panku.js

@ -10,44 +10,55 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表(待盘库记录列表)
// 判断是否生成盘库记录
getInventoryRecords: function(userSid) {
return request({
url: '/scm/v1/scmvehinventorymonth/getInventoryRecords/' + userSid,
method: 'get'
})
},
// 盘库操作(库存车辆列表)
pagelist: function(data) {
return request({
url: '/scm/v1/scmvehiclestayinventory/listPage',
url: '/scm/v1/scmvehicleinventory/stayListPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 判断是否生成盘库记录
getInventoryRecords: function(userSid) {
// 盘库操作(库存车辆列表--点击确认)
saveInventory: function(data) {
return request({
url: '/scm/v1/scmvehiclestayinventory/getInventoryRecords/' + userSid,
method: 'get'
url: '/scm/v1/scmvehicleinventory/saveInventory',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 待办库列表点击确认
saveInventory: function(data) {
// 盘库报告列表
baoGao: function(data) {
return request({
url: 'scm/v1/scmvehicleinventory/saveInventory',
url: '/scm/v1/scmvehinventorymonth/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 保存
updateState: function(data) {
// 盘库报告列表(生成盘库记录)
getCarInventoryReport: function(data) {
return request({
url: '/scm/v1/scmvehicleinventory/updateState',
method: 'post',
params: data,
url: '/scm/v1/scmvehinventorymonth/getCarInventoryReport/' + data,
method: 'get',
})
},
// 通过sid查询一条记录
fetchBySid: function(sid) {
// 盘库报告列表(生成盘库记录)
sendReport: function(data) {
return request({
url: '/base/v1/basemodelmodprice/fetchBySid/' + sid,
method: 'get'
url: '/scm/v1/scmvehinventoryreport/sendReport',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
},
}

164
anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_morebypicture.vue

@ -0,0 +1,164 @@
<template>
<div>
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" :limit="limit" list-type="picture-card" :file-list="fileList_FuJian" :on-remove="removeImage" :on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" :on-error="uploadError" :on-success="uploadImgSuccess_FuJian" :multiple="multiple">
<i class="el-icon-plus avatar-uploader-icon"/>
</el-upload>
<el-dialog :visible.sync="dialogVisible" title="查看图片">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { uploadFile_yanchejiancha } from '@/api/portal/Upload.js'
import { getStorage } from '@/utils/auth.js'
export default {
model: {
prop: 'name',
event: 'change'
},
props: {
placeholder: {
type: String,
default: ''
},
bucket: {
type: String,
default: 'abc'
},
//
width: {
type: String,
default: '270px'
},
limit: {
type: Number,
default: ''
},
multiple: {
type: Boolean,
default: true
},
accept: {
type: String,
default: '.jpg,.jpeg,.png,.JPG,.JPEG,'
},
//
name: {
type: Array,
required: true
},
uploadData: {
type: Object,
default: {}
}
},
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
accessToken: null,
uploadFile: uploadFile_yanchejiancha,
fileList_FuJian: [],
enclosure: '',
file_add: '',
file_catch: '',
files: [],
files_list: [],
filedUrl: '',
// fileUrl: fileUrl,
// showpicture:false,
isview: false,
nameArr: '',
loadding: false
}
},
watch: {
name: {
deep: true,
immediate: true,
handler(newVal, oldVal) {
console.log('aaaa1', newVal)
this.files = newVal
console.log('aaaa2', this.files)
}
}
},
mounted() {
this.$nextTick(() => {
this.Init()
})
},
created() {
this.uploadFile = uploadFile_yanchejiancha //
this.accessToken = {
token: getStorage()
}
},
methods: {
showImg(imgList) {
this.files = imgList
console.log('123123123', this.files)
},
view() {
// window.open(this.filedUrl)
},
//
Init() {
if (this.name !== undefined) {
this.files = []
for (var i = 0; i < this.name.length; i++) {
this.files.push({
name: this.name[i],
url: this.name[i]
})
}
}
},
handlePictureCardPreview(file) {
console.log(this.file)
this.dialogVisible = true
this.dialogImageUrl = file.url
},
// --
uploadImgSuccess_FuJian(response, file) {
console.log('您选择的file:', file)
if (file.response.code === '200') {
this.loadding = false
//
this.filedUrl = this.fileUrl + file.response.data
// var uid = file.response.data
this.files.push({
name: file.response.data.sourceFileName,
url: file.response.data.fullUrl,
size: file.response.data.size
})
this.$emit('change', this.files)
this.$emit('eett', this.files)
}
},
removeImage(file, ImageFileList) {
this.files.splice(this.files.indexOf(file), 1)
const imgFiles = []
this.files.forEach((o) => {
imgFiles.push(o.url)
})
this.$emit('fileChange', this.files)
},
//
uploadError() {
this.loadding = false
},
uploadProgrees(event, file, fileList) {
if (Number(event.percent) > 0) {
this.loadding = true
}
// console.log('event:', event)
}
}
}
</script>
<style scoped></style>

78
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuAdd.vue

@ -37,7 +37,7 @@
<el-col :span="12" class="colOneStyle">
<div class="span-sty spanOneWidth"><span>车架号:</span></div>
<el-form-item>
<el-input v-model="listQuery.params.mainSid" placeholder="" clearable style="width: 30%" class="addinputwOne"/>
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable style="width: 30%" class="addinputwOne"/>
</el-form-item>
</el-col>
<el-col :span="12" class="colOneStyle">
@ -49,6 +49,7 @@
</el-row>
<div class="title">
<div>库存车辆列表</div>
<el-button class="btntopblueline" type="primary" size="mini" @click="handleAdd">盘盈</el-button>
</div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
@ -57,9 +58,9 @@
<el-button type="primary" size="mini" @click="handleAffirm(scope.row)">确认</el-button>
</template>
</el-table-column>
<el-table-column label="车架号" width="140px" align="center">
<el-table-column label="车架号" width="180px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.mainSid }}</span>
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
@ -77,9 +78,9 @@
<span>{{ scope.row.lastName }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="150" align="center">
<el-table-column label="结果" width="150" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.InventoryState" placeholder="请选择" style="width: 80%" @change="changeStateType(scope.row,this)" clearable>
<el-select v-model="scope.row.InventoryState" placeholder="请选择" style="width: 80%" @change="changeStateType(scope.row,this)">
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
</el-select>
</template>
@ -93,15 +94,20 @@
</el-form>
</div>
</div>
<pankuByPanYing v-show="viewState == 2" ref="divAdd" @doback="restState"/>
</div>
</template>
<script>
import req from '@/api/kucunguanli/panku'
import { getUserByOrgSid, typeValues, fetchByUseOrgSid } from '@/api/cheliang/dictcommons'
import { getUserByOrgSid, fetchByUseOrgSid, typeValues } from '@/api/cheliang/dictcommons'
import pankuByPanYing from './pankuByPanYing'
export default {
name: 'pankuAdd',
components: {
pankuByPanYing
},
data() {
return {
viewTitle: '盘库操作',
@ -112,41 +118,33 @@ export default {
list: [],
warehouse_list: [],
staff_list: [],
stateType_list: [
{
dictKey: 1,
dictValue: '通过'
},
{
dictKey: 2,
dictValue: '不通过'
}
],
stateType_list: [],
//
formobj: {
sid: '',
vinNo: '',
mainSid: '',
location: '',
locationSid: '',
lastData: '',
lastName: '',
inventoryName: '',
inventorySid: '',
certificate: '',
certificateKey: '',
InventoryState: '',
InventoryStateKey: '',
remarks: '',
loginName: window.sessionStorage.getItem('name'),
loginSid: window.sessionStorage.getItem('userSid')
loginName: '',
loginSid: '',
images: []
},
listQuery: {
params: {
locationSid: '',
mainSid: '',
vinNo: '',
createOrgSid: ''
},
current: 1,
size: 10,
size: 5,
total: 0
},
rules: {},
@ -155,6 +153,11 @@ export default {
},
methods: {
init() {
typeValues({ type: 'inventoryResult' }).then((resp) => {
if (resp.success) {
this.stateType_list = resp.data
}
})
getUserByOrgSid({ orgSid: this.listQuery.params.createOrgSid, userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.staff_list = res.data
@ -177,6 +180,8 @@ export default {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.formobj.loginName = window.sessionStorage.getItem('name')
this.formobj.loginSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.createOrgSid = createOrgSid
this.init()
},
@ -222,19 +227,30 @@ export default {
this.formobj.inventoryName = bb.name
this.formobj.inventorySid = bb.sid
},
handleAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid, this.formobj.inventoryName, this.formobj.inventorySid)
},
handleAffirm(row) {
if (this.formobj.inventoryName === '' || this.formobj.inventoryName === null || this.formobj.inventoryName === undefined) {
this.$message({ showClose: true, type: 'error', message: '请选择盘库人员' })
if (row.InventoryState === '') {
this.$message({ showClose: true, type: 'error', message: '结果不能为空' })
return
}
if (row.InventoryState !== '正常' && row.remarks === '') {
this.$message({ showClose: true, type: 'error', message: '请填写备注' })
return
}
this.formobj.sid = row.sid
this.formobj.mainSid = row.mainSid
this.formobj.vinNo = row.vinNo
this.formobj.location = row.location
this.formobj.certificate = row.certificate
this.formobj.certificateKey = row.certificateKey
this.formobj.locationSid = row.locationSid
this.formobj.InventoryState = row.InventoryState
this.formobj.InventoryStateKey = row.InventoryStateKey
this.formobj.remarks = row.remarks
if (this.formobj.inventoryName === '') {
this.formobj.inventorySid = ''
}
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
@ -258,6 +274,9 @@ export default {
}
})
},
restState() {
this.viewState = 1
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -270,6 +289,13 @@ export default {
</script>
<style scoped>
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.spanOneWidth {
width: 260px !important;
border-right: 0px !important;

166
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuByPanYing.vue

@ -0,0 +1,166 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<!--标题-->
<div>盘盈</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" @click="handleSave()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<div class="titwu"><span>盘盈</span></div>
<el-form ref="form_obj" :model="formobj" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>车架号</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="formobj.vinNo" style="width: 20%" clearable placeholder=""/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>存放地点</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="formobj.location" placeholder="请选择" style="width: 20%" filterable @change="changeLocation">
<el-option v-for="item in warehouse_list" :key="item.sid" :label="item.warehouseName" :value="item.warehouseName"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" class="addinputw"/></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>相关附件</span>
</el-col>
<el-col :span="20">
<el-form-item>
<upload ref="uploadImg" v-model="list" :limit="20" @change="backData" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
import { fetchByUseOrgSid } from '@/api/cheliang/dictcommons'
import req from '@/api/kucunguanli/panku'
import upload from '../../../components/uploadFile/upload_morebypicture'
export default {
name: 'pankuByPanYing',
components: {
upload
},
data() {
return {
warehouse_list: [],
list: [],
formobj: {
sid: '',
vinNo: '',
mainSid: '',
location: '',
locationSid: '',
lastData: '',
lastName: '',
inventoryName: '',
inventorySid: '',
InventoryState: '',
InventoryStateKey: '',
remarks: '',
loginName: '',
loginSid: '',
images: []
}
}
},
methods: {
init(createOrgSid) {
fetchByUseOrgSid({ sid: createOrgSid }).then((res) => {
if (res.success) {
this.warehouse_list = res.data
}
})
},
showAdd(createOrgSid, inventoryName, inventorySid) {
this.init(createOrgSid)
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.formobj.InventoryState = '盘盈'
this.formobj.InventoryStateKey = '001'
this.formobj.loginName = window.sessionStorage.getItem('name')
this.formobj.loginSid = window.sessionStorage.getItem('userSid')
if (inventoryName !== '') {
this.formobj.inventoryName = inventoryName
this.formobj.inventorySid = inventorySid
} else {
this.formobj.inventoryName = ''
this.formobj.inventorySid = ''
}
},
changeLocation(value) {
let bb = null
this.warehouse_list.forEach((e) => {
if (e.warehouseName === value) {
bb = {
name: e.warehouseName,
sid: e.sid
}
}
})
this.formobj.locationSid = bb.sid
},
backData(val) {
const aa = []
if (val.length > 0) {
val.forEach((e) => {
aa.push(e.url)
})
}
this.formobj.images = aa
},
handleSave() {
if (this.formobj.vinNo === '') {
this.$message({ showClose: true, type: 'error', message: '车架号不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveInventory(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
}
this.handleReturn()
})
} else {
return false
}
})
},
handleReturn() {
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

198
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoAdd.vue

@ -0,0 +1,198 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<!--标题-->
<div>生成盘库报告</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" @click="handleSave()">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<div class="titwu"><span>盘库报告</span></div>
<el-form ref="form_obj" :model="formobj" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>选择接收人</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="recipientList" filterable placeholder="请选择" multiple @change="changeUser">
<el-option v-for="item in user_list" :key="item.userSid" :label="item.userName" :value="item.userSid"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>本次盘库</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>应盘{{ formobj.totalNumber }},实盘{{ formobj.actualNumber }},盘盈{{ formobj.profitNumber }},盘损{{ formobj.damageNumber }},盘亏{{ formobj.lossNumber }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>具体情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-form-item>
<span></span>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘盈情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.profitRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘损情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.damageRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘亏情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.lossRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
import { getGressionUserList } from '@/api/cheliang/dictcommons'
import req from '@/api/kucunguanli/panku'
export default {
name: 'pankubaogaoAdd',
data() {
return {
recipientList: [],
user_list: [],
formobj: {
mainSid: '',
reportContent: '',
sid: '',
userSid: '',
totalNumber: '',
actualNumber: '',
profitNumber: '',
damageNumber: '',
lossNumber: '',
profitRemarks: '',
damageRemarks: '',
lossRemarks: '',
recipientList: []
}
}
},
methods: {
init() {
getGressionUserList(window.sessionStorage.getItem('userSid')).then((resp) => {
if (resp.success) {
this.user_list = resp.data
}
})
},
showAdd(row) {
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.formobj.mainSid = row.sid
this.formobj.userSid = window.sessionStorage.getItem('userSid')
req.getCarInventoryReport(row.sid).then((resp) => {
if (resp.success) {
this.formobj.totalNumber = resp.data.totalNumber
this.formobj.actualNumber = resp.dataactualNumber
this.formobj.profitNumber = resp.data.profitNumber
this.formobj.damageNumber = resp.data.damageNumber
this.formobj.lossNumber = resp.datalossNumber
this.formobj.profitRemarks = resp.data.profitRemarks
this.formobj.damageRemarks = resp.data.damageRemarks
this.formobj.lossRemarks = resp.data.lossRemarks
}
})
},
changeUser(value) {
this.recipientList = value
},
handleSave() {
if (this.recipientList.length === 0) {
this.$message({ showClose: true, type: 'error', message: '选择接收人不能为空' })
return
} else {
const aa = []
for (var i = 0; i < this.recipientList.length; i++) {
for (var k = 0; k < this.user_list.length; k++) {
if (this.recipientList[i] === this.user_list[k].userSid) {
aa.push({
name: this.user_list[k].userName,
sid: this.user_list[k].userSid
})
}
}
}
this.formobj.recipientList = aa
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.sendReport(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
}
})
} else {
return false
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
mainSid: '',
reportContent: '',
sid: '',
userSid: '',
totalNumber: '',
actualNumber: '',
profitNumber: '',
damageNumber: '',
lossNumber: '',
profitRemarks: '',
damageRemarks: '',
lossRemarks: '',
recipientList: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

119
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoInfo.vue

@ -0,0 +1,119 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<!--标题-->
<div>查看盘库报告</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<div class="titwu"><span>盘库报告</span></div>
<el-form ref="form_obj" :model="formobj" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>接收人</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.recipient }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>发送时间</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.date }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>本次盘库</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>应盘{{ formobj.totalNumber }},实盘{{ formobj.actualNumber }},盘盈{{ formobj.profitNumber }},盘损{{ formobj.damageNumber }},盘亏{{ formobj.lossNumber }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>具体情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-form-item>
<span></span>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘盈情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.profitRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘损情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.damageRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>盘亏情况</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ formobj.lossRemarks }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/kucunguanli/panku'
export default {
name: 'pankubaogaoInfo',
data() {
return {
formobj: {}
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.getCarInventoryReport(row.sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
}
})
},
handleReturn() {
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

256
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankubaogao/pankubaogaoguanli.vue

@ -0,0 +1,256 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="盘库报告" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header" label-width="110px">
<el-form-item label="生成日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params. createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="生成人">
<el-input v-model="listQuery.params.createByName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">盘库报告列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="200" label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" v-show="scope.row.showBtn" size="mini" @click="handleAdd(scope.row)">生成报告</el-button>
<el-button type="primary" v-show="!scope.row.showBtn" size="mini" @click="handleLook(scope.row)">查看报告</el-button>
</template>
</el-table-column>
<el-table-column label="编号" width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.billNo }}</span>
</template>
</el-table-column>
<el-table-column label="生成日期" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="生成人" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createByName }}</span>
</template>
</el-table-column>
<el-table-column label="应盘(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.totalNumber }}</span>
</template>
</el-table-column>
<el-table-column label="实盘(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.actualNumber }}</span>
</template>
</el-table-column>
<el-table-column label="未盘(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.surplusNumber }}</span>
</template>
</el-table-column>
<el-table-column label="盘盈(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.profitNumber }}</span>
</template>
</el-table-column>
<el-table-column label="盘亏(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.lossNumber }}</span>
</template>
</el-table-column>
<el-table-column label="盘损(台)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.damageNumber }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<pankubaogaoAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<pankubaogaoInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/kucunguanli/panku'
import pankubaogaoAdd from './pankubaogaoAdd'
import pankubaogaoInfo from './pankubaogaoInfo'
import { fetchByUseOrgSid, getPathSidByUserSid } from '@/api/cheliang/dictcommons'
export default {
name: 'pankubaogoaguanli',
components: {
Pagination,
pageye,
ButtonBar,
pankubaogaoAdd,
pankubaogaoInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
createStartTime: '',
createEndTime: '',
createByName: '',
createOrgSid: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.listQuery.params.createOrgSid = res.data
this.getList()
}
})
fetchByUseOrgSid({ sid: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.warehouse_list = res.data
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.baoGao(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
createStartTime: '',
createEndTime: '',
createByName: '',
createOrgSid: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
handleAdd(row) {
this.viewState = 2
this.$refs['divAdd'].showAdd(row)
},
handleLook(row) {
this.viewState = 3
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

157
anrui-scm/anrui-scm-ui/src/views/kucunguanli/panku/pankuguanli.vue

@ -14,7 +14,7 @@
<el-date-picker v-model="listQuery.params.InventEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.mainSid" placeholder="请输入车架号" clearable/>
<el-input v-model="listQuery.params.vinNo" placeholder="请输入车架号" clearable/>
</el-form-item>
<el-form-item label="存放地点">
<el-select v-model="listQuery.params.locationSid" filterable placeholder="请选择" clearable>
@ -22,9 +22,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="listQuery.params.InventoryState" filterable placeholder="请选择" clearable>
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue">
<el-form-item label="结果">
<el-select v-model="listQuery.params.InventoryStateKey" filterable placeholder="请选择" clearable>
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
@ -42,32 +42,27 @@
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column fixed width="60px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" width="80px" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleSave(scope.row)">办理</el-button>
</template>
</el-table-column>
<el-table-column label="车架号" width="200px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.mainSid }}</span>
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="最新盘库日期" align="center" width="120px">
<el-table-column label="最新盘库日期" align="center" width="140px">
<template slot-scope="scope">
<span>{{ scope.row.InventoryDate }}</span>
</template>
</el-table-column>
<el-table-column label="最新存放地点" align="center" width="120px">
<el-table-column label="最新存放地点" align="center" width="180px">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="最新盘库人员" align="center" width="150">
<el-table-column label="最新盘库人员" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.inventoryName }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="80px">
<el-table-column label="状态" align="center" width="100px">
<template slot-scope="scope">
<span>{{ scope.row.InventoryState }}</span>
</template>
@ -86,52 +81,7 @@
</div>
</div>
<pankuAdd v-show="viewState == 2" ref="divAdd" @doback="resetState"/>
<el-dialog center :visible.sync="dialogVisible" width="70%">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="24">
<div class="span-sty spanOneWidth"><span>车架号</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.mainSid }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty spanOneWidth"><span>盘库日期</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.InventoryDate }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty spanOneWidth"><span>存放地点</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.location }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty spanOneWidth"><span>盘库人员</span></div>
<el-form-item><span class="addinputInfo addinputwOne">{{ formobj.inventoryName }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty spanOneWidth"><span>状态</span></div>
<el-form-item>
<el-select v-model="formobj.InventoryState" class="addinputw addinputwOne" placeholder="请选择" style="width: 30%" @change="changeStateType(scope.row,this)" clearable>
<el-option v-for="item in stateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty spanOneWidth"><span>备注</span></div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw" style="margin-left: 120px !important; width: 80% !important; " clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleQueDing"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
<pankubaogaoguanli v-show="viewState == 3" ref="divBaoGao" @doback="resetState"/>
</div>
</template>
@ -141,7 +91,8 @@ import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/kucunguanli/panku'
import pankuAdd from './pankuAdd'
import {fetchByUseOrgSid, getPathSidByUserSid, typeValues} from '@/api/cheliang/dictcommons'
import pankubaogaoguanli from './pankubaogao/pankubaogaoguanli'
import { fetchByUseOrgSid, getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'pankuguanli',
@ -149,12 +100,12 @@ export default {
Pagination,
pageye,
ButtonBar,
pankuAdd
pankuAdd,
pankubaogaoguanli
},
data() {
return {
btndisabled: false,
dialogVisible: false,
btnList: [
{
type: 'primary',
@ -163,6 +114,13 @@ export default {
btnKey: 'toAdd',
btnLabel: '生成盘库记录'
},
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toReport',
btnLabel: '盘库报告'
},
{
type: 'primary',
size: 'small',
@ -184,18 +142,8 @@ export default {
// -----------
tableKey: 0,
list: [],
formobj: {},
warehouse_list: [],
stateType_list: [
{
dictKey: 1,
dictValue: '通过'
},
{
dictKey: 2,
dictValue: '不通过'
}
],
stateType_list: [],
FormLoading: false,
listLoading: false,
listQuery: {
@ -203,8 +151,8 @@ export default {
InventStartDate: '',
InventEndDate: '',
locationSid: '',
mainSid: '',
InventoryState: '',
vinNo: '',
InventoryStateKey: '',
createOrgSid: ''
},
current: 1,
@ -223,17 +171,22 @@ export default {
},
methods: {
init() {
typeValues({ type: 'inventoryResult' }).then((resp) => {
if (resp.success) {
this.stateType_list = resp.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.listQuery.params.createOrgSid = res.data
this.getList()
}
})
fetchByUseOrgSid({ sid: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.warehouse_list = res.data
}
})
this.getList()
}
})
},
//
clicksearchShow() {
@ -250,6 +203,9 @@ export default {
case 'toAdd':
this.toAdd()
break
case 'toReport':
this.toReport()
break
case 'toEdit':
this.toEdit()
break
@ -281,18 +237,6 @@ export default {
}
})
},
changeStateType(value) {
let bb = null
this.stateType_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
key: e.dictKey,
value: e.dictValue
}
}
})
this.formobj.InventoryStateKey = bb.key
},
//
handleFilter() {
this.listQuery.current = 1
@ -304,8 +248,8 @@ export default {
InventStartDate: '',
InventEndDate: '',
locationSid: '',
mainSid: '',
InventoryState: '',
vinNo: '',
InventoryStateKey: '',
createOrgSid: ''
},
current: 1,
@ -314,19 +258,6 @@ export default {
}
this.init()
},
handleSave(row) {
this.formobj = row
this.dialogVisible = true
},
handleQueDing() {
req.updateState(this.formobj).then((res) => {
this.dialogVisible = false
if (res.success) {
this.$message({ showClose: true, type: 'success', message: res.msg })
this.getList()
}
})
},
toAdd() {
req.getInventoryRecords(window.sessionStorage.getItem('userSid')).then((res) => {
if (res.success) {
@ -334,6 +265,10 @@ export default {
}
})
},
toReport() {
this.viewState = 3
this.$refs['divBaoGao'].init()
},
toEdit() {
this.viewState = 2
this.$refs['divAdd'].showEdit(this.listQuery.params.createOrgSid)
@ -349,10 +284,12 @@ export default {
}
</script>
<style scoped>
.spanOneWidth {
width: 110px !important;
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
.addinputwOne {
margin-left: 120px !important;
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

3
doc/databases/base_tables.sql

@ -922,10 +922,13 @@ CREATE TABLE `base_vehicle_out`
`isTerminal` varchar(64) DEFAULT NULL COMMENT '是否为终端客户',
`customerName` varchar(255) DEFAULT NULL COMMENT '客户名称',
`mobile` varchar(255) DEFAULT NULL COMMENT '手机号',
`customerSid` varchar(255) DEFAULT NULL COMMENT '客户sid',
`actualCustomer` varchar(255) DEFAULT NULL COMMENT '实际购车人名称',
`actualMobile` varchar(255) DEFAULT NULL COMMENT '实际购车人手机号',
`actualSid` varchar(255) DEFAULT NULL COMMENT '实际购车人sid',
`giftsDescription` varchar(255) DEFAULT NULL COMMENT '赠品说明',
`distributorName` varchar(255) DEFAULT NULL COMMENT '二次经销商',
`distributorSid` varchar(255) DEFAULT NULL COMMENT '二次经销商sid',
`rebateAmount` varchar(255) DEFAULT NULL COMMENT '返利金额',
PRIMARY KEY (`id`),
KEY `id` (`id`)

Loading…
Cancel
Save