From 42253f2a01786e73ca48e2af2faa125967ef79ba Mon Sep 17 00:00:00 2001 From: chuang <994001556@qq.com> Date: Wed, 15 Feb 2023 18:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BF=A1=E6=81=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jnpf/controller/CustomerController.java | 2 + ...troller.java => CustomerVOController.java} | 133 +++++++++++------ ...GMobileEntity.java => CustomerEntity.java} | 34 +++-- .../customer/entity/CustomerMobileEntity.java | 121 ++++++++++++++++ .../mapper/CustomerJGMobileMapper.java | 17 --- .../jnpf/customer/mapper/CustomerVMapper.java | 22 +++ .../model/customer/CustomerCrForm.java | 52 +++++-- .../model/customer/CustomerInfoVO.java | 54 +++++-- .../model/customer/CustomerListQuery.java | 8 +- .../model/customer/CustomerPagination.java | 8 +- .../CustomerPaginationExportModel.java | 8 +- .../model/customer/CustomerUpForm.java | 61 ++++++-- .../service/CustomerJGMobileService.java | 34 ----- .../customer/service/CustomerService.java | 43 ++++++ ...ceImpl.java => CustomerVOServiceImpl.java} | 136 +++++++++++------- ...CustomerMapper.xml => CustomerVMapper.xml} | 49 ++++--- .../scm/basicInformation/customer/Detail.vue | 82 +++++++++-- .../scm/basicInformation/customer/Form.vue | 135 +++++++++++++---- .../scm/basicInformation/customer/index.vue | 87 ++++++++--- 19 files changed, 824 insertions(+), 262 deletions(-) rename SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/{CustomerJGMobileController.java => CustomerVOController.java} (69%) rename SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/{CustomerJGMobileEntity.java => CustomerEntity.java} (79%) create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerMobileEntity.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerVMapper.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerService.java rename SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/{CustomerJGMobileServiceImpl.java => CustomerVOServiceImpl.java} (57%) rename SC-boot/linkage-scm/src/main/resources/mapper/customer/{CustomerMapper.xml => CustomerVMapper.xml} (68%) diff --git a/SC-boot/linkage-extend/src/main/java/jnpf/controller/CustomerController.java b/SC-boot/linkage-extend/src/main/java/jnpf/controller/CustomerController.java index 71670e55..10616ea0 100644 --- a/SC-boot/linkage-extend/src/main/java/jnpf/controller/CustomerController.java +++ b/SC-boot/linkage-extend/src/main/java/jnpf/controller/CustomerController.java @@ -15,6 +15,7 @@ import jnpf.service.CustomerService; import jnpf.util.JsonUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -32,6 +33,7 @@ import java.util.List; @RestController @Api(tags = "客户信息", value = "Customer") @RequestMapping("/api/extend/saleOrder/Customer") +@Qualifier("customerServiceImpltwo") public class CustomerController { @Autowired diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerVOController.java similarity index 69% rename from SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java rename to SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerVOController.java index 413b76b5..5184140d 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerVOController.java @@ -1,56 +1,56 @@ package jnpf.customer.controller; + import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; -import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import jnpf.base.ActionResult; -import jnpf.base.vo.PageListVO; -import jnpf.base.vo.PaginationVO; import jnpf.base.UserInfo; import jnpf.base.vo.DownloadVO; +import jnpf.base.vo.PageListVO; +import jnpf.base.vo.PaginationVO; import jnpf.config.ConfigValueUtil; -import jnpf.exception.DataException; -import org.springframework.transaction.annotation.Transactional; +import jnpf.customer.entity.CustomerEntity; +import jnpf.customer.entity.CustomerMobileEntity; import jnpf.customer.model.customer.*; -import jnpf.customer.model.customer.CustomerPagination; +import jnpf.customer.service.CustomerService; +import jnpf.exception.DataException; import jnpf.util.*; -import lombok.extern.slf4j.Slf4j; +import jnpf.util.enums.FileTypeEnum; +import jnpf.util.file.UploadUtil; import lombok.Cleanup; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Workbook; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import jnpf.customer.entity.CustomerJGMobileEntity; -import jnpf.customer.service.CustomerJGMobileService; -import org.springframework.web.bind.annotation.*; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.io.FileOutputStream; import java.io.IOException; -import jnpf.util.GeneraterSwapUtil; -import java.util.*; - -import jnpf.util.file.UploadUtil; -import jnpf.util.enums.FileTypeEnum; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * - * customer + * 客户档案 * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Slf4j @RestController -@Api(tags = "customer" , value = "customer") -@RequestMapping("/api/customer/Customer") -public class CustomerJGMobileController { +@Api(tags = "客户档案" , value = "example") +@RequestMapping("/api/example/Customer") +public class CustomerVOController { @Autowired private GeneraterSwapUtil generaterSwapUtil; @@ -62,7 +62,7 @@ public class CustomerJGMobileController { private UserProvider userProvider; @Autowired - private CustomerJGMobileService customerJGMobileService; + private CustomerService customerService; @@ -75,11 +75,12 @@ public class CustomerJGMobileController { */ @PostMapping("/getList") public ActionResult list(@RequestBody CustomerPagination customerPagination)throws IOException{ - List list= customerJGMobileService.getList(customerPagination); + List list= customerService.getList(customerPagination); //处理id字段转名称,若无需转或者为空可删除 - for(CustomerJGMobileEntity entity:list){ - entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); - entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); + for(CustomerMobileEntity entity:list){ + Map orgIdMap = new HashMap<>(); + entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap)); + entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince())); } List listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); for(CustomerListVO customerVO:listVO){ @@ -105,9 +106,10 @@ public class CustomerJGMobileController { public ActionResult create(@RequestBody @Valid CustomerCrForm customerCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); - CustomerJGMobileEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerJGMobileEntity.class); + customerCrForm.setCreatorTime(DateUtil.getNow()); + CustomerEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerEntity.class); entity.setId(mainId); - customerJGMobileService.save(entity); + customerService.save(entity); return ActionResult.success("创建成功"); @@ -145,11 +147,12 @@ public class CustomerJGMobileController { return ActionResult.fail("请选择导出字段"); } CustomerPagination customerPagination=JsonUtil.getJsonToBean(customerPaginationExportModel, CustomerPagination.class); - List list= customerJGMobileService.getTypeList(customerPagination,customerPaginationExportModel.getDataType()); + List list= customerService.getTypeList(customerPagination,customerPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 - for(CustomerJGMobileEntity entity:list){ - entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); - entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); + for(CustomerEntity entity:list){ + Map orgIdMap = new HashMap<>(); + entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap)); + entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince())); } List listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); for(CustomerListVO customerVO:listVO){ @@ -176,23 +179,50 @@ public class CustomerJGMobileController { entitys.add(new ExcelExportEntity("客户名称" ,"supplierNm")); break; case "orgId" : - entitys.add(new ExcelExportEntity("公司名称" ,"orgId")); + entitys.add(new ExcelExportEntity("公司ID" ,"orgId")); break; - case "contactName" : - entitys.add(new ExcelExportEntity("联系人" ,"contactName")); + case "vatRegistrationNum" : + entitys.add(new ExcelExportEntity("纳税编号" ,"vatRegistrationNum")); break; case "customerLevel" : entitys.add(new ExcelExportEntity("客户等级" ,"customerLevel")); break; + case "contactName" : + entitys.add(new ExcelExportEntity("联系人" ,"contactName")); + break; + case "country" : + entitys.add(new ExcelExportEntity("国家" ,"country")); + break; case "contactPhone" : entitys.add(new ExcelExportEntity("电话" ,"contactPhone")); break; - case "address" : - entitys.add(new ExcelExportEntity("地址" ,"address")); + case "province" : + entitys.add(new ExcelExportEntity("省市县" ,"province")); + break; + case "bank" : + entitys.add(new ExcelExportEntity("开户行" ,"bank")); break; case "status" : entitys.add(new ExcelExportEntity("是否启用" ,"status")); break; + case "bankAccount" : + entitys.add(new ExcelExportEntity("银行账号" ,"bankAccount")); + break; + case "enterprise" : + entitys.add(new ExcelExportEntity("企业性质" ,"enterprise")); + break; + case "address" : + entitys.add(new ExcelExportEntity("地址" ,"address")); + break; + case "classification" : + entitys.add(new ExcelExportEntity("客户分类" ,"classification")); + break; + case "creatorTime" : + entitys.add(new ExcelExportEntity("创建时间" ,"creatorTime")); + break; + case "lastModifyTime" : + entitys.add(new ExcelExportEntity("修改时间" ,"lastModifyTime")); + break; default: break; } @@ -254,8 +284,14 @@ public class CustomerJGMobileController { */ @GetMapping("/{id}") public ActionResult info(@PathVariable("id") String id){ - CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); + CustomerEntity entity= customerService.getInfo(id); CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); + if(vo.getCreatorTime()!=null){ + vo.setCreatorTime(vo.getCreatorTime()); + } + if(vo.getLastModifyTime()!=null){ + vo.setLastModifyTime(vo.getLastModifyTime()); + } //子表 //副表 @@ -270,7 +306,7 @@ public class CustomerJGMobileController { */ @GetMapping("/detail/{id}") public ActionResult detailInfo(@PathVariable("id") String id){ - CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); + CustomerEntity entity= customerService.getInfo(id); CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); //子表数据转换 @@ -278,8 +314,9 @@ public class CustomerJGMobileController { //附表数据转换 //添加到详情表单对象中 - vo.setOrgId(generaterSwapUtil.comSelectValues(vo.getOrgId())); - vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"2")); + Map orgIdMap = new HashMap<>(); + vo.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",vo.getOrgId(),orgIdMap)); + vo.setProvince(generaterSwapUtil.provinceData(vo.getProvince())); return ActionResult.success(vo); } @@ -297,10 +334,12 @@ public class CustomerJGMobileController { @Transactional public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CustomerUpForm customerUpForm) throws DataException { UserInfo userInfo=userProvider.get(); - CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); + CustomerEntity entity= customerService.getInfo(id); if(entity!=null){ - CustomerJGMobileEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGMobileEntity.class); - customerJGMobileService.update(id, subentity); + customerUpForm.setLastModifyTime(DateUtil.getNow()); + CustomerEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerEntity.class); + subentity.setCreatorTime(entity.getCreatorTime()); + customerService.update(id, subentity); return ActionResult.success("更新成功"); }else{ return ActionResult.fail("更新失败,数据不存在"); @@ -318,9 +357,9 @@ public class CustomerJGMobileController { @DeleteMapping("/{id}") @Transactional public ActionResult delete(@PathVariable("id") String id){ - CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); + CustomerEntity entity= customerService.getInfo(id); if(entity!=null){ - customerJGMobileService.delete(entity); + customerService.delete(entity); } return ActionResult.success("删除成功"); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerEntity.java similarity index 79% rename from SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java rename to SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerEntity.java index bc71328f..f10517e8 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerEntity.java @@ -16,11 +16,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data @TableName("jg_customer") -public class CustomerJGMobileEntity { +public class CustomerEntity { @TableId("ID") private String id; @@ -70,15 +70,9 @@ public class CustomerJGMobileEntity { @TableField("SUPPLIER_SITE_ID") private String supplierSiteId; - @TableField("SUPPLIER_SITE_CODE") - private String supplierSiteCode; - @TableField("ORG_ID") private String orgId; - @TableField("ORG_NAME") - private String orgName; - @TableField("VAT_REGISTRATION_NUM") private String vatRegistrationNum; @@ -97,4 +91,28 @@ public class CustomerJGMobileEntity { @TableField("ADDRESS") private String address; + @TableField("BANK") + private String bank; + + @TableField("BANK_ACCOUNT") + private String bankAccount; + + @TableField("ENTERPRISE") + private String enterprise; + + @TableField("CLASSIFICATION") + private String classification; + + @TableField("COUNTRY") + private String country; + + @TableField("PROVINCE") + private String province; + + @TableField("CITY") + private String city; + + @TableField("COUNTY") + private String county; + } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerMobileEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerMobileEntity.java new file mode 100644 index 00000000..1888293e --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerMobileEntity.java @@ -0,0 +1,121 @@ +package jnpf.customer.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author: WangChuang + * @Date: 15/2/2023 下午4:31 + * @Description //注释: + * @Version 1.0 + */ +@Data +public class CustomerMobileEntity { + @TableId("ID") + private String id; + + @TableField("CREATOR_USER_ID") + private String creatorUserId; + + @TableField("CREATOR_USER_NAME") + private String creatorUserName; + + @TableField("CREATOR_TIME") + private Date creatorTime; + + @TableField("LAST_MODIFY_USER_ID") + private String lastModifyUserId; + + @TableField("LAST_MODIFY_USER_NAME") + private String lastModifyUserName; + + @TableField("LAST_MODIFY_TIME") + private Date lastModifyTime; + + @TableField("DELETE_USER_ID") + private String deleteUserId; + + @TableField("DELETE_USER_NAME") + private String deleteUserName; + + @TableField("DELETE_TIME") + private Date deleteTime; + + @TableField("DELETE_MARK") + private String deleteMark; + + @TableField("ORGNIZE_ID") + private String orgnizeId; + + @TableField("DEPARTMENT_ID") + private String departmentId; + + @TableField("SUPPLIER_CD") + private String supplierCd; + + @TableField("SUPPLIER_NM") + private String supplierNm; + + @TableField("SUPPLIER_SITE_ID") + private String supplierSiteId; + + @TableField("ORG_ID") + private String orgId; + + @TableField("VAT_REGISTRATION_NUM") + private String vatRegistrationNum; + + @TableField("CUSTOMER_LEVEL") + private String customerLevel; + + @TableField("CONTACT_NAME") + private String contactName; + + @TableField("CONTACT_PHONE") + private String contactPhone; + + @TableField("STATUS") + private String status; + + @TableField("ADDRESS") + private String address; + + @TableField("BANK") + private String bank; + + @TableField("BANK_ACCOUNT") + private String bankAccount; + + @TableField("ENTERPRISE") + private String enterprise; + + @TableField("CLASSIFICATION") + private String classification; + + @TableField("COUNTRY") + private String country; + + @TableField("PROVINCE") + private String province; + + @TableField("CITY") + private String city; + + @TableField("COUNTY") + private String county; + + private BigDecimal settlemenSum; + + private BigDecimal weightSum; + + private BigDecimal buckleWeightSum; + + private BigDecimal grossWeightSum; + + private BigDecimal salesPriceSum; + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java deleted file mode 100644 index c0579e6f..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package jnpf.customer.mapper; - - -import jnpf.customer.entity.CustomerJGMobileEntity; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * - * customer - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-02-13 - */ -public interface CustomerJGMobileMapper extends BaseMapper { - -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerVMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerVMapper.java new file mode 100644 index 00000000..61a2a8dd --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerVMapper.java @@ -0,0 +1,22 @@ +package jnpf.customer.mapper; + + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jnpf.customer.entity.CustomerEntity; +import jnpf.customer.entity.CustomerMobileEntity; +import org.apache.ibatis.annotations.Param; + +/** + * + * 客户档案 + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-15 + */ +public interface CustomerVMapper extends BaseMapper { + IPage getMobileList(@Param("page")Page page, @Param("ew") Wrapper queryWrapper); +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java index b5c471ef..a169154a 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java @@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerCrForm { @@ -27,30 +27,66 @@ public class CustomerCrForm { @JsonProperty("supplierNm") private String supplierNm; - /** 公司名称 **/ + /** 公司ID **/ @JsonProperty("orgId") private String orgId; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; /** 客户等级 **/ @JsonProperty("customerLevel") private String customerLevel; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; + + /** 国家 **/ + @JsonProperty("country") + private String country; + /** 电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省市县 **/ + @JsonProperty("province") + private String province; + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; /** 是否启用 **/ @JsonProperty("status") private String status; + /** 银行账号 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + /** 企业性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + /** 地址 **/ + @JsonProperty("address") + private String address; + + /** 客户分类 **/ + @JsonProperty("classification") + private String classification; + + /** 创建时间 **/ + @JsonProperty("creatorTime") + private String creatorTime; + + /** 修改时间 **/ + @JsonProperty("lastModifyTime") + private String lastModifyTime; + } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java index b4da77f1..0e1375a1 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerInfoVO{ @@ -31,28 +31,66 @@ public class CustomerInfoVO{ @JsonProperty("supplierNm") private String supplierNm; - /** 公司名称 **/ + /** 公司ID **/ @JsonProperty("orgId") private String orgId; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; /** 客户等级 **/ @JsonProperty("customerLevel") private String customerLevel; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; + + /** 国家 **/ + @JsonProperty("country") + private String country; + /** 电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省市县 **/ + @JsonProperty("province") + private String province; + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; /** 是否启用 **/ @JsonProperty("status") private String status; + /** 银行账号 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + /** 企业性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + /** 地址 **/ + @JsonProperty("address") + private String address; + + /** 客户分类 **/ + @JsonProperty("classification") + private String classification; + + /** 创建时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("creatorTime") + private Date creatorTime; + + /** 修改时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("lastModifyTime") + private Date lastModifyTime; + } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java index 5712a48d..f2990a25 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java @@ -10,7 +10,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerListQuery extends Pagination { @@ -20,6 +20,12 @@ public class CustomerListQuery extends Pagination { /** 客户名称 */ private String supplierNm; + + /** 纳税编号 */ + private String vatRegistrationNum; + + /** 联系人 */ + private String contactName; /** * 菜单id */ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java index 6f257434..10d449e8 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java @@ -11,7 +11,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerPagination extends Pagination { @@ -21,6 +21,12 @@ public class CustomerPagination extends Pagination { /** 客户名称 */ private String supplierNm; + + /** 纳税编号 */ + private String vatRegistrationNum; + + /** 联系人 */ + private String contactName; /** * 菜单id */ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java index 30aba73b..f55c76cc 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java @@ -9,7 +9,7 @@ import java.util.*; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerPaginationExportModel extends Pagination { @@ -26,4 +26,10 @@ public class CustomerPaginationExportModel extends Pagination { /** 客户名称 */ private String supplierNm; + + /** 纳税编号 */ + private String vatRegistrationNum; + + /** 联系人 */ + private String contactName; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java index 4d1bcfe3..8dca7ce9 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java @@ -15,7 +15,7 @@ import lombok.Data; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-15 */ @Data public class CustomerUpForm{ @@ -33,14 +33,14 @@ public class CustomerUpForm{ private String supplierNm; - /** 公司名称 **/ + /** 公司ID **/ @JsonProperty("orgId") private String orgId; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; /** 客户等级 **/ @@ -48,14 +48,29 @@ public class CustomerUpForm{ private String customerLevel; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; + + + /** 国家 **/ + @JsonProperty("country") + private String country; + + /** 电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省市县 **/ + @JsonProperty("province") + private String province; + + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; /** 是否启用 **/ @@ -63,4 +78,34 @@ public class CustomerUpForm{ private String status; + /** 银行账号 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + + /** 企业性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + + /** 地址 **/ + @JsonProperty("address") + private String address; + + + /** 客户分类 **/ + @JsonProperty("classification") + private String classification; + + + /** 创建时间 **/ + @JsonProperty("creatorTime") + private String creatorTime; + + + /** 修改时间 **/ + @JsonProperty("lastModifyTime") + private String lastModifyTime; + + } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java deleted file mode 100644 index dd63948e..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java +++ /dev/null @@ -1,34 +0,0 @@ -package jnpf.customer.service; - -import jnpf.customer.entity.CustomerJGMobileEntity; -import com.baomidou.mybatisplus.extension.service.IService; -import jnpf.customer.model.customer.CustomerPagination; -import java.util.*; -/** - * - * customer - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-02-13 - */ -public interface CustomerJGMobileService extends IService { - - List getList(CustomerPagination customerPagination); - - List getTypeList(CustomerPagination customerPagination, String dataType); - - - - CustomerJGMobileEntity getInfo(String id); - - void delete(CustomerJGMobileEntity entity); - - void create(CustomerJGMobileEntity entity); - - boolean update( String id, CustomerJGMobileEntity entity); - -// 子表方法 - - //列表子表数据方法 -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerService.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerService.java new file mode 100644 index 00000000..75b4d62d --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerService.java @@ -0,0 +1,43 @@ +package jnpf.customer.service; + + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import jnpf.customer.entity.CustomerEntity; +import jnpf.customer.entity.CustomerMobileEntity; +import jnpf.customer.model.customer.CustomerPagination; + +import java.util.List; + +/** + * + * 客户档案 + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-15 + */ +public interface CustomerService extends IService { + + List getList(CustomerPagination customerPagination); + + List getTypeList(CustomerPagination customerPagination,String dataType); + + + + CustomerEntity getInfo(String id); + + IPage page(Page page, Wrapper queryWrapper); + + void delete(CustomerEntity entity); + + void create(CustomerEntity entity); + + boolean update( String id, CustomerEntity entity); + +// 子表方法 + + //列表子表数据方法 +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerVOServiceImpl.java similarity index 57% rename from SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java rename to SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerVOServiceImpl.java index 79a7648c..985cb286 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerVOServiceImpl.java @@ -1,38 +1,40 @@ package jnpf.customer.service.impl; -import jnpf.customer.entity.*; -import jnpf.customer.mapper.CustomerJGMobileMapper; -import jnpf.customer.service.*; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.hutool.core.util.ObjectUtil; -import jnpf.permission.model.authorize.AuthorizeConditionModel; - - -import jnpf.customer.model.customer.CustomerPagination; - -import jnpf.permission.service.AuthorizeService; -import java.lang.reflect.Field; import com.baomidou.mybatisplus.annotation.TableField; - - -import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import org.springframework.beans.factory.annotation.Autowired; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import jnpf.util.*; -import java.util.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jnpf.customer.entity.CustomerEntity; +import jnpf.customer.entity.CustomerMobileEntity; +import jnpf.customer.mapper.CustomerVMapper; +import jnpf.customer.model.customer.CustomerPagination; +import jnpf.customer.service.CustomerService; +import jnpf.permission.model.authorize.AuthorizeConditionModel; +import jnpf.permission.service.AuthorizeService; +import jnpf.util.ServletUtil; +import jnpf.util.StringUtil; +import jnpf.util.UserProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; /** * - * customer + * 客户档案 * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-02-13 + * 日期: 2023-02-15 */ @Service -public class CustomerJGMobileServiceImpl extends ServiceImpl implements CustomerJGMobileService { +public class CustomerVOServiceImpl extends ServiceImpl implements CustomerService { @Autowired @@ -41,17 +43,18 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl getList(CustomerPagination customerPagination){ + public List getList(CustomerPagination customerPagination){ String userId=userProvider.get().getUserId(); List AllIdList =new ArrayList(); int total=0; int customerNum =0; - QueryWrapper customerQueryWrapper=new QueryWrapper<>(); + QueryWrapper customerQueryWrapper=new QueryWrapper<>(); boolean pcPermission = false; boolean appPermission = false; boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); @@ -61,7 +64,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl(); } else { - customerQueryWrapper = (QueryWrapper)customerObj; + customerQueryWrapper = (QueryWrapper)customerObj; customerNum++; } } @@ -72,7 +75,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl(); } else { - customerQueryWrapper = (QueryWrapper)customerObj; + customerQueryWrapper = (QueryWrapper)customerObj; customerNum++; } @@ -81,25 +84,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl0){ - customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); + customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList); } //排序 if(StringUtil.isEmpty(customerPagination.getSidx())){ - customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); + customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime); }else{ try { String sidx = customerPagination.getSidx(); - CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); - Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); + CustomerEntity customerEntity = new CustomerEntity(); + Field declaredField = customerEntity.getClass().getDeclaredField(sidx); declaredField.setAccessible(true); String value = declaredField.getAnnotation(TableField.class).value(); customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); @@ -108,21 +121,21 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); - IPage userIPage=this.page(page, customerQueryWrapper); + Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); + IPage userIPage=this.page(page, customerQueryWrapper); return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); }else{ - List list = new ArrayList(); + List list = new ArrayList(); return customerPagination.setData(list, list.size()); } } @Override - public List getTypeList(CustomerPagination customerPagination, String dataType){ + public List getTypeList(CustomerPagination customerPagination,String dataType){ String userId=userProvider.get().getUserId(); List AllIdList =new ArrayList(); int total=0; int customerNum =0; - QueryWrapper customerQueryWrapper=new QueryWrapper<>(); + QueryWrapper customerQueryWrapper=new QueryWrapper<>(); boolean pcPermission = false; boolean appPermission = false; boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); @@ -132,7 +145,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl(); } else { - customerQueryWrapper = (QueryWrapper)customerObj; + customerQueryWrapper = (QueryWrapper)customerObj; customerNum++; } } @@ -143,7 +156,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl(); } else { - customerQueryWrapper = (QueryWrapper)customerObj; + customerQueryWrapper = (QueryWrapper)customerObj; customerNum++; } @@ -152,25 +165,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl0){ - customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); + customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList); } //排序 if(StringUtil.isEmpty(customerPagination.getSidx())){ - customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); + customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime); }else{ try { String sidx = customerPagination.getSidx(); - CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); - Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); + CustomerEntity customerEntity = new CustomerEntity(); + Field declaredField = customerEntity.getClass().getDeclaredField(sidx); declaredField.setAccessible(true); String value = declaredField.getAnnotation(TableField.class).value(); customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); @@ -180,11 +203,11 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); - IPage userIPage=this.page(page, customerQueryWrapper); + Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); + IPage userIPage=this.page(page, customerQueryWrapper); return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); }else{ - List list = new ArrayList(); + List list = new ArrayList(); return customerPagination.setData(list, list.size()); } }else{ @@ -193,24 +216,29 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl queryWrapper=new QueryWrapper<>(); - queryWrapper.lambda().eq(CustomerJGMobileEntity::getId,id); + public CustomerEntity getInfo(String id){ + QueryWrapper queryWrapper=new QueryWrapper<>(); + queryWrapper.lambda().eq(CustomerEntity::getId,id); return this.getOne(queryWrapper); } @Override - public void create(CustomerJGMobileEntity entity){ + public IPage page(Page page, Wrapper queryWrapper) { + return customerVMapper.getMobileList(page,queryWrapper); + } + + @Override + public void create(CustomerEntity entity){ this.save(entity); } @Override - public boolean update(String id, CustomerJGMobileEntity entity){ + public boolean update(String id, CustomerEntity entity){ entity.setId(id); return this.updateById(entity); } @Override - public void delete(CustomerJGMobileEntity entity){ + public void delete(CustomerEntity entity){ if(entity!=null){ this.removeById(entity.getId()); } diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml similarity index 68% rename from SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerMapper.xml rename to SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml index 4149c529..0e7ecfa8 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml @@ -1,6 +1,6 @@ - + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - + + + + + + + + + diff --git a/SC-web/src/views/scm/basicInformation/customer/Detail.vue b/SC-web/src/views/scm/basicInformation/customer/Detail.vue index b390a3af..85aca94f 100644 --- a/SC-web/src/views/scm/basicInformation/customer/Detail.vue +++ b/SC-web/src/views/scm/basicInformation/customer/Detail.vue @@ -6,28 +6,28 @@ @@ -79,14 +121,26 @@ id :'', supplierCd : '', supplierNm : '', - orgId : [], - contactName : '', + orgId : "", + vatRegistrationNum : '', customerLevel : "1", + contactName : '', + country : "CHINA", contactPhone : '', + province : [], + bank : '', + status : "1", + bankAccount : '', + enterprise : "0", address : '', - status : 1, + classification : "0", + creatorTime : "", + lastModifyTime : "", }, customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], + statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"禁用","id":"2"}], + enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私企","id":"1"}], + classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], } }, @@ -109,7 +163,7 @@ if(this.dataForm.id){ this.loading = true request({ - url: '/api/customer/Customer/detail/'+this.dataForm.id, + url: '/api/example/Customer/detail/'+this.dataForm.id, method: 'get' }).then(res => { this.dataInfo(res.data) diff --git a/SC-web/src/views/scm/basicInformation/customer/Form.vue b/SC-web/src/views/scm/basicInformation/customer/Form.vue index c38b52b5..e790d420 100644 --- a/SC-web/src/views/scm/basicInformation/customer/Form.vue +++ b/SC-web/src/views/scm/basicInformation/customer/Form.vue @@ -6,7 +6,7 @@ @@ -103,12 +175,21 @@ dataForm: { supplierCd : '', supplierNm : '', - orgId : [], - contactName : '', + orgId : "", + vatRegistrationNum : '', customerLevel : "1", + contactName : '', + country : "CHINA", contactPhone : '', + province : [], + bank : '', + status : "1", + bankAccount : '', + enterprise : "0", address : '', - status : 1, + classification : "0", + creatorTime : "", + lastModifyTime : "", }, rules: { @@ -129,7 +210,11 @@ contactPhone: [ ], }, + orgIdcolumnOptions:[ {"label":"机构编号","value":"F_EnCode"}, {"label":"公司名称","value":"F_FullName"},], customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], + statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"禁用","id":"2"}], + enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私企","id":"1"}], + classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], } }, @@ -159,7 +244,7 @@ if(this.dataForm.id){ this.loading = true request({ - url: '/api/customer/Customer/'+this.dataForm.id, + url: '/api/example/Customer/'+this.dataForm.id, method: 'get' }).then(res => { this.dataInfo(res.data) @@ -183,7 +268,7 @@ var _data =this.dataList() if (!this.dataForm.id) { request({ - url: '/api/customer/Customer', + url: '/api/example/Customer', method: 'post', data: _data }).then((res) => { @@ -199,7 +284,7 @@ }) }else{ request({ - url: '/api/customer/Customer/'+this.dataForm.id, + url: '/api/example/Customer/'+this.dataForm.id, method: 'PUT', data: _data }).then((res) => { @@ -217,14 +302,12 @@ }, dataList(){ var _data = JSON.parse(JSON.stringify(this.dataForm)); - _data.orgId = JSON.stringify(_data.orgId) - _data.status = parseInt(_data.status) + _data.province = JSON.stringify(_data.province) return _data; }, dataInfo(dataAll){ let _dataAll =dataAll - _dataAll.orgId = JSON.parse( _dataAll.orgId) - _dataAll.status = parseInt( _dataAll.status) + _dataAll.province = JSON.parse( _dataAll.province) this.dataForm = _dataAll }, }, diff --git a/SC-web/src/views/scm/basicInformation/customer/index.vue b/SC-web/src/views/scm/basicInformation/customer/index.vue index da4677a0..97236b98 100644 --- a/SC-web/src/views/scm/basicInformation/customer/index.vue +++ b/SC-web/src/views/scm/basicInformation/customer/index.vue @@ -14,10 +14,28 @@ + + + + + + 查询 重置 + + 展开 + + + 收起 + @@ -45,8 +63,10 @@ sortable="custom" /> - +