客户信息修改

product
chuang 2 years ago
parent ae084a75bb
commit 42253f2a01

@ -15,6 +15,7 @@ import jnpf.service.CustomerService;
import jnpf.util.JsonUtil; import jnpf.util.JsonUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
@ -32,6 +33,7 @@ import java.util.List;
@RestController @RestController
@Api(tags = "客户信息", value = "Customer") @Api(tags = "客户信息", value = "Customer")
@RequestMapping("/api/extend/saleOrder/Customer") @RequestMapping("/api/extend/saleOrder/Customer")
@Qualifier("customerServiceImpltwo")
public class CustomerController { public class CustomerController {
@Autowired @Autowired

@ -1,56 +1,56 @@
package jnpf.customer.controller; package jnpf.customer.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams; 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.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO; import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException; import jnpf.customer.entity.CustomerEntity;
import org.springframework.transaction.annotation.Transactional; import jnpf.customer.entity.CustomerMobileEntity;
import jnpf.customer.model.customer.*; import jnpf.customer.model.customer.*;
import jnpf.customer.model.customer.CustomerPagination; import jnpf.customer.service.CustomerService;
import jnpf.exception.DataException;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j; import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
import lombok.Cleanup; import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook; 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.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import jnpf.util.GeneraterSwapUtil; import java.util.ArrayList;
import java.util.*; import java.util.HashMap;
import java.util.List;
import jnpf.util.file.UploadUtil; import java.util.Map;
import jnpf.util.enums.FileTypeEnum;
/** /**
* *
* customer *
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Slf4j @Slf4j
@RestController @RestController
@Api(tags = "customer" , value = "customer") @Api(tags = "客户档案" , value = "example")
@RequestMapping("/api/customer/Customer") @RequestMapping("/api/example/Customer")
public class CustomerJGMobileController { public class CustomerVOController {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -62,7 +62,7 @@ public class CustomerJGMobileController {
private UserProvider userProvider; private UserProvider userProvider;
@Autowired @Autowired
private CustomerJGMobileService customerJGMobileService; private CustomerService customerService;
@ -75,11 +75,12 @@ public class CustomerJGMobileController {
*/ */
@PostMapping("/getList") @PostMapping("/getList")
public ActionResult list(@RequestBody CustomerPagination customerPagination)throws IOException{ public ActionResult list(@RequestBody CustomerPagination customerPagination)throws IOException{
List<CustomerJGMobileEntity> list= customerJGMobileService.getList(customerPagination); List<CustomerMobileEntity> list= customerService.getList(customerPagination);
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(CustomerJGMobileEntity entity:list){ for(CustomerMobileEntity entity:list){
entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); Map<String,Object> orgIdMap = new HashMap<>();
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap));
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
} }
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
for(CustomerListVO customerVO:listVO){ for(CustomerListVO customerVO:listVO){
@ -105,9 +106,10 @@ public class CustomerJGMobileController {
public ActionResult create(@RequestBody @Valid CustomerCrForm customerCrForm) throws DataException { public ActionResult create(@RequestBody @Valid CustomerCrForm customerCrForm) throws DataException {
String mainId =RandomUtil.uuId(); String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get(); 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); entity.setId(mainId);
customerJGMobileService.save(entity); customerService.save(entity);
return ActionResult.success("创建成功"); return ActionResult.success("创建成功");
@ -145,11 +147,12 @@ public class CustomerJGMobileController {
return ActionResult.fail("请选择导出字段"); return ActionResult.fail("请选择导出字段");
} }
CustomerPagination customerPagination=JsonUtil.getJsonToBean(customerPaginationExportModel, CustomerPagination.class); CustomerPagination customerPagination=JsonUtil.getJsonToBean(customerPaginationExportModel, CustomerPagination.class);
List<CustomerJGMobileEntity> list= customerJGMobileService.getTypeList(customerPagination,customerPaginationExportModel.getDataType()); List<CustomerEntity> list= customerService.getTypeList(customerPagination,customerPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(CustomerJGMobileEntity entity:list){ for(CustomerEntity entity:list){
entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); Map<String,Object> orgIdMap = new HashMap<>();
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap));
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
} }
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
for(CustomerListVO customerVO:listVO){ for(CustomerListVO customerVO:listVO){
@ -176,23 +179,50 @@ public class CustomerJGMobileController {
entitys.add(new ExcelExportEntity("客户名称" ,"supplierNm")); entitys.add(new ExcelExportEntity("客户名称" ,"supplierNm"));
break; break;
case "orgId" : case "orgId" :
entitys.add(new ExcelExportEntity("公司名称" ,"orgId")); entitys.add(new ExcelExportEntity("公司ID" ,"orgId"));
break; break;
case "contactName" : case "vatRegistrationNum" :
entitys.add(new ExcelExportEntity("联系人" ,"contactName")); entitys.add(new ExcelExportEntity("纳税编号" ,"vatRegistrationNum"));
break; break;
case "customerLevel" : case "customerLevel" :
entitys.add(new ExcelExportEntity("客户等级" ,"customerLevel")); entitys.add(new ExcelExportEntity("客户等级" ,"customerLevel"));
break; break;
case "contactName" :
entitys.add(new ExcelExportEntity("联系人" ,"contactName"));
break;
case "country" :
entitys.add(new ExcelExportEntity("国家" ,"country"));
break;
case "contactPhone" : case "contactPhone" :
entitys.add(new ExcelExportEntity("电话" ,"contactPhone")); entitys.add(new ExcelExportEntity("电话" ,"contactPhone"));
break; break;
case "address" : case "province" :
entitys.add(new ExcelExportEntity("地址" ,"address")); entitys.add(new ExcelExportEntity("省市县" ,"province"));
break;
case "bank" :
entitys.add(new ExcelExportEntity("开户行" ,"bank"));
break; break;
case "status" : case "status" :
entitys.add(new ExcelExportEntity("是否启用" ,"status")); entitys.add(new ExcelExportEntity("是否启用" ,"status"));
break; 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: default:
break; break;
} }
@ -254,8 +284,14 @@ public class CustomerJGMobileController {
*/ */
@GetMapping("/{id}") @GetMapping("/{id}")
public ActionResult<CustomerInfoVO> info(@PathVariable("id") String id){ public ActionResult<CustomerInfoVO> info(@PathVariable("id") String id){
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerEntity entity= customerService.getInfo(id);
CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); 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}") @GetMapping("/detail/{id}")
public ActionResult<CustomerInfoVO> detailInfo(@PathVariable("id") String id){ public ActionResult<CustomerInfoVO> detailInfo(@PathVariable("id") String id){
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerEntity entity= customerService.getInfo(id);
CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class);
//子表数据转换 //子表数据转换
@ -278,8 +314,9 @@ public class CustomerJGMobileController {
//附表数据转换 //附表数据转换
//添加到详情表单对象中 //添加到详情表单对象中
vo.setOrgId(generaterSwapUtil.comSelectValues(vo.getOrgId())); Map<String,Object> orgIdMap = new HashMap<>();
vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"2")); vo.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",vo.getOrgId(),orgIdMap));
vo.setProvince(generaterSwapUtil.provinceData(vo.getProvince()));
return ActionResult.success(vo); return ActionResult.success(vo);
} }
@ -297,10 +334,12 @@ public class CustomerJGMobileController {
@Transactional @Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CustomerUpForm customerUpForm) throws DataException { public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CustomerUpForm customerUpForm) throws DataException {
UserInfo userInfo=userProvider.get(); UserInfo userInfo=userProvider.get();
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerEntity entity= customerService.getInfo(id);
if(entity!=null){ if(entity!=null){
CustomerJGMobileEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGMobileEntity.class); customerUpForm.setLastModifyTime(DateUtil.getNow());
customerJGMobileService.update(id, subentity); CustomerEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerEntity.class);
subentity.setCreatorTime(entity.getCreatorTime());
customerService.update(id, subentity);
return ActionResult.success("更新成功"); return ActionResult.success("更新成功");
}else{ }else{
return ActionResult.fail("更新失败,数据不存在"); return ActionResult.fail("更新失败,数据不存在");
@ -318,9 +357,9 @@ public class CustomerJGMobileController {
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@Transactional @Transactional
public ActionResult delete(@PathVariable("id") String id){ public ActionResult delete(@PathVariable("id") String id){
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerEntity entity= customerService.getInfo(id);
if(entity!=null){ if(entity!=null){
customerJGMobileService.delete(entity); customerService.delete(entity);
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");

@ -16,11 +16,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
@TableName("jg_customer") @TableName("jg_customer")
public class CustomerJGMobileEntity { public class CustomerEntity {
@TableId("ID") @TableId("ID")
private String id; private String id;
@ -70,15 +70,9 @@ public class CustomerJGMobileEntity {
@TableField("SUPPLIER_SITE_ID") @TableField("SUPPLIER_SITE_ID")
private String supplierSiteId; private String supplierSiteId;
@TableField("SUPPLIER_SITE_CODE")
private String supplierSiteCode;
@TableField("ORG_ID") @TableField("ORG_ID")
private String orgId; private String orgId;
@TableField("ORG_NAME")
private String orgName;
@TableField("VAT_REGISTRATION_NUM") @TableField("VAT_REGISTRATION_NUM")
private String vatRegistrationNum; private String vatRegistrationNum;
@ -97,4 +91,28 @@ public class CustomerJGMobileEntity {
@TableField("ADDRESS") @TableField("ADDRESS")
private String 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;
} }

@ -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;
}

@ -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<CustomerJGMobileEntity> {
}

@ -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<CustomerEntity> {
IPage<CustomerMobileEntity> getMobileList(@Param("page")Page<CustomerMobileEntity> page, @Param("ew") Wrapper<CustomerEntity> queryWrapper);
}

@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerCrForm { public class CustomerCrForm {
@ -27,30 +27,66 @@ public class CustomerCrForm {
@JsonProperty("supplierNm") @JsonProperty("supplierNm")
private String supplierNm; private String supplierNm;
/** 公司名称 **/ /** 公司ID **/
@JsonProperty("orgId") @JsonProperty("orgId")
private String orgId; private String orgId;
/** 联系人 **/ /** 纳税编号 **/
@JsonProperty("contactName") @JsonProperty("vatRegistrationNum")
private String contactName; private String vatRegistrationNum;
/** 客户等级 **/ /** 客户等级 **/
@JsonProperty("customerLevel") @JsonProperty("customerLevel")
private String customerLevel; private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 国家 **/
@JsonProperty("country")
private String country;
/** 电话 **/ /** 电话 **/
@JsonProperty("contactPhone") @JsonProperty("contactPhone")
private String contactPhone; private String contactPhone;
/** 地址 **/ /** 省市县 **/
@JsonProperty("address") @JsonProperty("province")
private String address; private String province;
/** 开户行 **/
@JsonProperty("bank")
private String bank;
/** 是否启用 **/ /** 是否启用 **/
@JsonProperty("status") @JsonProperty("status")
private String 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;
} }

@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerInfoVO{ public class CustomerInfoVO{
@ -31,28 +31,66 @@ public class CustomerInfoVO{
@JsonProperty("supplierNm") @JsonProperty("supplierNm")
private String supplierNm; private String supplierNm;
/** 公司名称 **/ /** 公司ID **/
@JsonProperty("orgId") @JsonProperty("orgId")
private String orgId; private String orgId;
/** 联系人 **/ /** 纳税编号 **/
@JsonProperty("contactName") @JsonProperty("vatRegistrationNum")
private String contactName; private String vatRegistrationNum;
/** 客户等级 **/ /** 客户等级 **/
@JsonProperty("customerLevel") @JsonProperty("customerLevel")
private String customerLevel; private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 国家 **/
@JsonProperty("country")
private String country;
/** 电话 **/ /** 电话 **/
@JsonProperty("contactPhone") @JsonProperty("contactPhone")
private String contactPhone; private String contactPhone;
/** 地址 **/ /** 省市县 **/
@JsonProperty("address") @JsonProperty("province")
private String address; private String province;
/** 开户行 **/
@JsonProperty("bank")
private String bank;
/** 是否启用 **/ /** 是否启用 **/
@JsonProperty("status") @JsonProperty("status")
private String 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;
} }

@ -10,7 +10,7 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerListQuery extends Pagination { public class CustomerListQuery extends Pagination {
@ -20,6 +20,12 @@ public class CustomerListQuery extends Pagination {
/** 客户名称 */ /** 客户名称 */
private String supplierNm; private String supplierNm;
/** 纳税编号 */
private String vatRegistrationNum;
/** 联系人 */
private String contactName;
/** /**
* id * id
*/ */

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerPagination extends Pagination { public class CustomerPagination extends Pagination {
@ -21,6 +21,12 @@ public class CustomerPagination extends Pagination {
/** 客户名称 */ /** 客户名称 */
private String supplierNm; private String supplierNm;
/** 纳税编号 */
private String vatRegistrationNum;
/** 联系人 */
private String contactName;
/** /**
* id * id
*/ */

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerPaginationExportModel extends Pagination { public class CustomerPaginationExportModel extends Pagination {
@ -26,4 +26,10 @@ public class CustomerPaginationExportModel extends Pagination {
/** 客户名称 */ /** 客户名称 */
private String supplierNm; private String supplierNm;
/** 纳税编号 */
private String vatRegistrationNum;
/** 联系人 */
private String contactName;
} }

@ -15,7 +15,7 @@ import lombok.Data;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-13 * @ 2023-02-15
*/ */
@Data @Data
public class CustomerUpForm{ public class CustomerUpForm{
@ -33,14 +33,14 @@ public class CustomerUpForm{
private String supplierNm; private String supplierNm;
/** 公司名称 **/ /** 公司ID **/
@JsonProperty("orgId") @JsonProperty("orgId")
private String orgId; private String orgId;
/** 联系人 **/ /** 纳税编号 **/
@JsonProperty("contactName") @JsonProperty("vatRegistrationNum")
private String contactName; private String vatRegistrationNum;
/** 客户等级 **/ /** 客户等级 **/
@ -48,14 +48,29 @@ public class CustomerUpForm{
private String customerLevel; private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 国家 **/
@JsonProperty("country")
private String country;
/** 电话 **/ /** 电话 **/
@JsonProperty("contactPhone") @JsonProperty("contactPhone")
private String contactPhone; private String contactPhone;
/** 地址 **/ /** 省市县 **/
@JsonProperty("address") @JsonProperty("province")
private String address; private String province;
/** 开户行 **/
@JsonProperty("bank")
private String bank;
/** 是否启用 **/ /** 是否启用 **/
@ -63,4 +78,34 @@ public class CustomerUpForm{
private String 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;
} }

@ -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<CustomerJGMobileEntity> {
List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination);
List<CustomerJGMobileEntity> getTypeList(CustomerPagination customerPagination, String dataType);
CustomerJGMobileEntity getInfo(String id);
void delete(CustomerJGMobileEntity entity);
void create(CustomerJGMobileEntity entity);
boolean update( String id, CustomerJGMobileEntity entity);
// 子表方法
//列表子表数据方法
}

@ -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<CustomerEntity> {
List<CustomerMobileEntity> getList(CustomerPagination customerPagination);
List<CustomerEntity> getTypeList(CustomerPagination customerPagination,String dataType);
CustomerEntity getInfo(String id);
IPage<CustomerMobileEntity> page(Page<CustomerMobileEntity> page, Wrapper<CustomerEntity> queryWrapper);
void delete(CustomerEntity entity);
void create(CustomerEntity entity);
boolean update( String id, CustomerEntity entity);
// 子表方法
//列表子表数据方法
}

@ -1,38 +1,40 @@
package jnpf.customer.service.impl; 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 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 com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.*; import jnpf.customer.entity.CustomerEntity;
import java.util.*; 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 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-13 * 2023-02-15
*/ */
@Service @Service
public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMapper, CustomerJGMobileEntity> implements CustomerJGMobileService { public class CustomerVOServiceImpl extends ServiceImpl<CustomerVMapper, CustomerEntity> implements CustomerService {
@Autowired @Autowired
@ -41,17 +43,18 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
@Autowired @Autowired
private AuthorizeService authorizeService; private AuthorizeService authorizeService;
@Resource
private CustomerVMapper customerVMapper;
@Override @Override
public List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination){ public List<CustomerMobileEntity> getList(CustomerPagination customerPagination){
String userId=userProvider.get().getUserId(); String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList(); List<String> AllIdList =new ArrayList();
int total=0; int total=0;
int customerNum =0; int customerNum =0;
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>(); QueryWrapper<CustomerEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false; boolean pcPermission = false;
boolean appPermission = false; boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
@ -61,7 +64,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
if (ObjectUtil.isEmpty(customerObj)){ if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj; customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
customerNum++; customerNum++;
} }
} }
@ -72,7 +75,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
if (ObjectUtil.isEmpty(customerObj)){ if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj; customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
customerNum++; customerNum++;
} }
@ -81,25 +84,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
} }
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++; customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd()); customerQueryWrapper.lambda().like(CustomerEntity::getSupplierCd,customerPagination.getSupplierCd());
} }
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++; customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm()); customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(StringUtil.isNotEmpty(customerPagination.getVatRegistrationNum())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerEntity::getVatRegistrationNum,customerPagination.getVatRegistrationNum());
}
if(StringUtil.isNotEmpty(customerPagination.getContactName())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerEntity::getContactName,customerPagination.getContactName());
} }
if(AllIdList.size()>0){ if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList);
} }
//排序 //排序
if(StringUtil.isEmpty(customerPagination.getSidx())){ if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime);
}else{ }else{
try { try {
String sidx = customerPagination.getSidx(); String sidx = customerPagination.getSidx();
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); CustomerEntity customerEntity = new CustomerEntity();
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true); declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value(); String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
@ -108,21 +121,21 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
} }
} }
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); Page<CustomerMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper); IPage<CustomerMobileEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{
List<CustomerJGMobileEntity> list = new ArrayList(); List<CustomerMobileEntity> list = new ArrayList();
return customerPagination.setData(list, list.size()); return customerPagination.setData(list, list.size());
} }
} }
@Override @Override
public List<CustomerJGMobileEntity> getTypeList(CustomerPagination customerPagination, String dataType){ public List<CustomerEntity> getTypeList(CustomerPagination customerPagination,String dataType){
String userId=userProvider.get().getUserId(); String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList(); List<String> AllIdList =new ArrayList();
int total=0; int total=0;
int customerNum =0; int customerNum =0;
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>(); QueryWrapper<CustomerEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false; boolean pcPermission = false;
boolean appPermission = false; boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
@ -132,7 +145,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
if (ObjectUtil.isEmpty(customerObj)){ if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj; customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
customerNum++; customerNum++;
} }
} }
@ -143,7 +156,7 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
if (ObjectUtil.isEmpty(customerObj)){ if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj; customerQueryWrapper = (QueryWrapper<CustomerEntity>)customerObj;
customerNum++; customerNum++;
} }
@ -152,25 +165,35 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
} }
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++; customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd()); customerQueryWrapper.lambda().like(CustomerEntity::getSupplierCd,customerPagination.getSupplierCd());
} }
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++; customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm()); customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(StringUtil.isNotEmpty(customerPagination.getVatRegistrationNum())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerEntity::getVatRegistrationNum,customerPagination.getVatRegistrationNum());
}
if(StringUtil.isNotEmpty(customerPagination.getContactName())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerEntity::getContactName,customerPagination.getContactName());
} }
if(AllIdList.size()>0){ if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); customerQueryWrapper.lambda().in(CustomerEntity::getId, AllIdList);
} }
//排序 //排序
if(StringUtil.isEmpty(customerPagination.getSidx())){ if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); customerQueryWrapper.lambda().orderByDesc(CustomerEntity::getCreatorTime);
}else{ }else{
try { try {
String sidx = customerPagination.getSidx(); String sidx = customerPagination.getSidx();
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); CustomerEntity customerEntity = new CustomerEntity();
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true); declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value(); String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
@ -180,11 +203,11 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
} }
if("0".equals(dataType)){ if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); Page<CustomerEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper); IPage<CustomerEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{
List<CustomerJGMobileEntity> list = new ArrayList(); List<CustomerEntity> list = new ArrayList();
return customerPagination.setData(list, list.size()); return customerPagination.setData(list, list.size());
} }
}else{ }else{
@ -193,24 +216,29 @@ public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMap
} }
@Override @Override
public CustomerJGMobileEntity getInfo(String id){ public CustomerEntity getInfo(String id){
QueryWrapper<CustomerJGMobileEntity> queryWrapper=new QueryWrapper<>(); QueryWrapper<CustomerEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(CustomerJGMobileEntity::getId,id); queryWrapper.lambda().eq(CustomerEntity::getId,id);
return this.getOne(queryWrapper); return this.getOne(queryWrapper);
} }
@Override @Override
public void create(CustomerJGMobileEntity entity){ public IPage<CustomerMobileEntity> page(Page<CustomerMobileEntity> page, Wrapper<CustomerEntity> queryWrapper) {
return customerVMapper.getMobileList(page,queryWrapper);
}
@Override
public void create(CustomerEntity entity){
this.save(entity); this.save(entity);
} }
@Override @Override
public boolean update(String id, CustomerJGMobileEntity entity){ public boolean update(String id, CustomerEntity entity){
entity.setId(id); entity.setId(id);
return this.updateById(entity); return this.updateById(entity);
} }
@Override @Override
public void delete(CustomerJGMobileEntity entity){ public void delete(CustomerEntity entity){
if(entity!=null){ if(entity!=null){
this.removeById(entity.getId()); this.removeById(entity.getId());
} }

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.customer.mapper.CustomerJGMapper"> <mapper namespace="jnpf.customer.mapper.CustomerVMapper">
<select id="getMobileList" resultMap="customer" > <select id="getMobileList" resultMap="customer" >
SELECT SELECT
@ -24,16 +24,19 @@
a.supplier_cd, a.supplier_cd,
a.supplier_nm, a.supplier_nm,
a.supplier_site_id, a.supplier_site_id,
a.supplier_site_code,
a.org_id, a.org_id,
a.org_name,
a.vat_registration_num, a.vat_registration_num,
a.customer_level, a.customer_level,
a.contact_name, a.contact_name,
a.contact_phone, a.contact_phone,
a.`status`, a.`status`,
a.address, a.address,
SUM( b.gross_weight ), a.bank,
a.bank_account,
a.enterprise,
a.classification,
a.country,
a.city,
IFNULL( SUM( b.gross_weight ), 0.0000000000 ) settlemenSum, IFNULL( SUM( b.gross_weight ), 0.0000000000 ) settlemenSum,
IFNULL( SUM( b.net_weight ), 0.0000000000 ) weightSum, IFNULL( SUM( b.net_weight ), 0.0000000000 ) weightSum,
IFNULL( SUM( b.buckle_weight ), 0.0000000000 ) buckleWeightSum, IFNULL( SUM( b.buckle_weight ), 0.0000000000 ) buckleWeightSum,
@ -50,32 +53,40 @@
) a ${ew.customSqlSegment} ) a ${ew.customSqlSegment}
</select> </select>
<resultMap id="customer" type="jnpf.customer.entity.CustomerJGMobileEntity"> <resultMap id="customer" type="jnpf.customer.entity.CustomerMobileEntity">
<result column="id" property="id"/> <result column="id" property="id"/>
<result column="creator_user_id" property="creatoruserid"/> <result column="creator_user_id" property="creatorUserId"/>
<result column="creator_user_name" property="creatorusername"/> <result column="creator_user_name" property="creatorUserName"/>
<result column="creator_time" property="creatortime"/> <result column="creator_time" property="creatorTime"/>
<result column="last_modify_user_id" property="lastmodifyuserid"/> <result column="last_modify_user_id" property="lastModifyUserId"/>
<result column="last_modify_user_name" property="lastmodifyusername"/> <result column="last_modify_user_name" property="lastModifyUserName"/>
<result column="last_modify_time" property="lastmodifytime"/> <result column="last_modify_time" property="lastModifyTime"/>
<result column="delete_user_id" property="deleteuserid"/> <result column="delete_user_id" property="deleteUserId"/>
<result column="delete_user_name" property="deleteusername"/> <result column="delete_user_name" property="deleteUserName"/>
<result column="delete_time" property="deletetime"/> <result column="delete_time" property="deleteTime"/>
<result column="delete_mark" property="deletemark"/> <result column="delete_mark" property="deleteMark"/>
<result column="orgnize_id" property="originId"/> <result column="orgnize_id" property="orgnizeId"/>
<result column="department_id" property="deptId"/> <result column="department_id" property="departmentId"/>
<result column="supplier_cd" property="supplierCd"/> <result column="supplier_cd" property="supplierCd"/>
<result column="supplier_nm" property="supplierNm"/> <result column="supplier_nm" property="supplierNm"/>
<result column="supplier_site_id" property="supplierSiteId"/> <result column="supplier_site_id" property="supplierSiteId"/>
<result column="supplier_site_code" property="supplierSiteCode"/>
<result column="org_id" property="orgId"/> <result column="org_id" property="orgId"/>
<result column="org_name" property="orgName"/>
<result column="vat_registration_num" property="vatRegistrationNum"/> <result column="vat_registration_num" property="vatRegistrationNum"/>
<result column="customer_level" property="customerLevel"/> <result column="customer_level" property="customerLevel"/>
<result column="contact_name" property="contactName"/> <result column="contact_name" property="contactName"/>
<result column="contact_phone" property="contactPhone"/> <result column="contact_phone" property="contactPhone"/>
<result column="status" property="status"/> <result column="status" property="status"/>
<result column="address" property="address"/> <result column="address" property="address"/>
<result column="bank" property="bank"/>
<result column="bank_account" property="bankAccount"/>
<result column="enterprise" property="enterprise"/>
<result column="classification" property="classification"/>
<result column="country" property="country"/>
<result column="city" property="city"/>
<result column="settlemenSum" property="settlemenSum"/> <result column="settlemenSum" property="settlemenSum"/>
<result column="weightSum" property="weightSum"/> <result column="weightSum" property="weightSum"/>
<result column="buckleWeightSum" property="buckleWeightSum"/> <result column="buckleWeightSum" property="buckleWeightSum"/>

@ -6,28 +6,28 @@
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="客户编码" <el-form-item label="客户编码"
prop="supplierCd" > prop="supplierCd" >
<p>{{dataForm.supplierCd}}</p> <p>{{dataForm.supplierCd}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="客户名称" <el-form-item label="客户名称"
prop="supplierNm" > prop="supplierNm" >
<p>{{dataForm.supplierNm}}</p> <p>{{dataForm.supplierNm}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="公司名称" <el-form-item label="公司ID"
prop="orgId" > prop="orgId" >
<p>{{dataForm.orgId}}</p> <p>{{dataForm.orgId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="联系人" <el-form-item label="纳税编号"
prop="contactName" > prop="vatRegistrationNum" >
<p>{{dataForm.contactName}}</p> <p>{{dataForm.vatRegistrationNum}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
@ -36,12 +36,54 @@
<p>{{ dataForm.customerLevel | dynamicText(customerLevelOptions) }} </p> <p>{{ dataForm.customerLevel | dynamicText(customerLevelOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<p>{{dataForm.contactName}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="国家"
prop="country" >
<p>{{dataForm.country}}</p>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="电话" <el-form-item label="电话"
prop="contactPhone" > prop="contactPhone" >
<p>{{dataForm.contactPhone}}</p> <p>{{dataForm.contactPhone}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" >
<el-form-item label="省市县"
prop="province" >
<p>{{dataForm.province}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="开户行"
prop="bank" >
<p>{{dataForm.bank}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="银行账号"
prop="bankAccount" >
<p>{{dataForm.bankAccount}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="企业性质"
prop="enterprise" >
<p>{{ dataForm.enterprise | dynamicText(enterpriseOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="地址" <el-form-item label="地址"
prop="address" > prop="address" >
@ -49,9 +91,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="是否启用" <el-form-item label="客户分类"
prop="status" > prop="classification" >
<p>{{dataForm.status}}</p> <p>{{ dataForm.classification | dynamicText(classificationOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -79,14 +121,26 @@
id :'', id :'',
supplierCd : '', supplierCd : '',
supplierNm : '', supplierNm : '',
orgId : [], orgId : "",
contactName : '', vatRegistrationNum : '',
customerLevel : "1", customerLevel : "1",
contactName : '',
country : "CHINA",
contactPhone : '', contactPhone : '',
province : [],
bank : '',
status : "1",
bankAccount : '',
enterprise : "0",
address : '', address : '',
status : 1, classification : "0",
creatorTime : "",
lastModifyTime : "",
}, },
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], 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){ if(this.dataForm.id){
this.loading = true this.loading = true
request({ request({
url: '/api/customer/Customer/detail/'+this.dataForm.id, url: '/api/example/Customer/detail/'+this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)

@ -6,7 +6,7 @@
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="客户编码" <el-form-item label="客户编码"
prop="supplierCd" > prop="supplierCd" >
<el-input v-model="dataForm.supplierCd" <el-input v-model="dataForm.supplierCd"
@ -15,7 +15,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="客户名称" <el-form-item label="客户名称"
prop="supplierNm" > prop="supplierNm" >
<el-input v-model="dataForm.supplierNm" <el-input v-model="dataForm.supplierNm"
@ -24,20 +24,22 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="公司名称" <el-form-item label="公司ID"
prop="orgId" > prop="orgId" >
<com-select v-model="dataForm.orgId" <popupSelect v-model="dataForm.orgId"
placeholder="请选择" clearable > placeholder="请选择" clearable field="orgId" interfaceId="394016341591396805" :columnOptions="orgIdcolumnOptions" propsValue="F_Id" relationField="F_FullName" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
>
</com-select> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="联系人" <el-form-item label="纳税编号"
prop="contactName" > prop="vatRegistrationNum" >
<el-input v-model="dataForm.contactName" <el-input v-model="dataForm.vatRegistrationNum"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'> placeholder="请输入纳税编号" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -52,6 +54,24 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<el-input v-model="dataForm.contactName"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="国家"
prop="country" >
<el-input v-model="dataForm.country"
placeholder="请输入国家" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="电话" <el-form-item label="电话"
prop="contactPhone" > prop="contactPhone" >
@ -61,6 +81,55 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" >
<el-form-item label="省市县"
prop="province" >
<JNPF-Address v-model="dataForm.province"
placeholder="请选择" clearable :level=2 >
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="开户行"
prop="bank" >
<el-input v-model="dataForm.bank"
placeholder="请输入开户行" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
<el-select v-model="dataForm.status"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="银行账号"
prop="bankAccount" >
<el-input v-model="dataForm.bankAccount"
placeholder="请输入银行账号" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="企业性质"
prop="enterprise" >
<el-radio-group v-model="dataForm.enterprise"
size="small" >
<el-radio v-for="(item, index) in enterpriseOptions" :key="index" :label="item.id" :disabled="item.disabled" >
{{item.fullName}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="地址" <el-form-item label="地址"
prop="address" > prop="address" >
@ -71,12 +140,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="是否启用" <el-form-item label="客户分类"
prop="status" > prop="classification" >
<el-switch v-model="dataForm.status" <el-radio-group v-model="dataForm.classification"
:active-value="1" :inactive-value="0" > size="small" >
<el-radio v-for="(item, index) in classificationOptions" :key="index" :label="item.id" :disabled="item.disabled" >
{{item.fullName}}
</el-radio>
</el-switch> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -103,12 +175,21 @@
dataForm: { dataForm: {
supplierCd : '', supplierCd : '',
supplierNm : '', supplierNm : '',
orgId : [], orgId : "",
contactName : '', vatRegistrationNum : '',
customerLevel : "1", customerLevel : "1",
contactName : '',
country : "CHINA",
contactPhone : '', contactPhone : '',
province : [],
bank : '',
status : "1",
bankAccount : '',
enterprise : "0",
address : '', address : '',
status : 1, classification : "0",
creatorTime : "",
lastModifyTime : "",
}, },
rules: rules:
{ {
@ -129,7 +210,11 @@
contactPhone: [ contactPhone: [
], ],
}, },
orgIdcolumnOptions:[ {"label":"机构编号","value":"F_EnCode"}, {"label":"公司名称","value":"F_FullName"},],
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], 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){ if(this.dataForm.id){
this.loading = true this.loading = true
request({ request({
url: '/api/customer/Customer/'+this.dataForm.id, url: '/api/example/Customer/'+this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
@ -183,7 +268,7 @@
var _data =this.dataList() var _data =this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/customer/Customer', url: '/api/example/Customer',
method: 'post', method: 'post',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -199,7 +284,7 @@
}) })
}else{ }else{
request({ request({
url: '/api/customer/Customer/'+this.dataForm.id, url: '/api/example/Customer/'+this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -217,14 +302,12 @@
}, },
dataList(){ dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.orgId = JSON.stringify(_data.orgId) _data.province = JSON.stringify(_data.province)
_data.status = parseInt(_data.status)
return _data; return _data;
}, },
dataInfo(dataAll){ dataInfo(dataAll){
let _dataAll =dataAll let _dataAll =dataAll
_dataAll.orgId = JSON.parse( _dataAll.orgId) _dataAll.province = JSON.parse( _dataAll.province)
_dataAll.status = parseInt( _dataAll.status)
this.dataForm = _dataAll this.dataForm = _dataAll
}, },
}, },

@ -14,10 +14,28 @@
<el-input v-model="query.supplierNm" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierNm" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="纳税编号">
<el-input v-model="query.vatRegistrationNum" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="联系人">
<el-input v-model="query.contactName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -45,8 +63,10 @@
sortable="custom" /> sortable="custom" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left" <el-table-column prop="supplierNm" label="客户名称" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="orgId" label="公司名称" width="0" align="left" <el-table-column prop="orgId" label="公司ID" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="vatRegistrationNum" label="纳税编号" width="0" align="left"
/>
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left" <el-table-column label="客户等级" width="0" prop="customerLevel" algin="left"
sortable="custom" > sortable="custom" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -55,15 +75,34 @@
</el-table-column> </el-table-column>
<el-table-column prop="contactName" label="联系人" width="0" align="left" <el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="country" label="国家" width="0" align="left"
/>
<el-table-column prop="contactPhone" label="电话" width="0" align="left" <el-table-column prop="contactPhone" label="电话" width="0" align="left"
sortable="custom" /> sortable="custom" />
<!-- <el-table-column prop="province" label="省市县" width="0" align="left"-->
<!--/>-->
<el-table-column prop="bank" label="开户行" width="0" align="left"
/>
<el-table-column label="是否启用" width="0" prop="status" algin="left"
sortable="custom" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="bankAccount" label="银行账号" width="0" align="left"
/>
<el-table-column label="企业性质" width="0" prop="enterprise" algin="left"
>
<template slot-scope="scope">
{{ scope.row.enterprise | dynamicText(enterpriseOptions) }}
</template>
</el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left" <el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="status" label="是否启用" width="0" align="left" sortable="custom" > <el-table-column label="客户分类" width="0" prop="classification" algin="left"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" disable-transitions v-if="scope.row.status == '1'"> {{ scope.row.classification | dynamicText(classificationOptions) }}
</el-tag>
<el-tag type="danger" disable-transitions v-else></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
@ -101,10 +140,13 @@ width="150" >
components: {JNPFForm, ExportBox,Detail}, components: {JNPFForm, ExportBox,Detail},
data() { data() {
return { return {
showAll: false,
detailVisible: false, detailVisible: false,
query: { query: {
supplierCd:undefined, supplierCd:undefined,
supplierNm:undefined, supplierNm:undefined,
vatRegistrationNum:undefined,
contactName:undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -118,22 +160,35 @@ width="150" >
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "supplierCd", sidx: "creatorTime",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'supplierCd', label: '客户编码'}, {prop: 'supplierCd', label: '客户编码'},
{prop: 'supplierNm', label: '客户名称'}, {prop: 'supplierNm', label: '客户名称'},
{prop: 'orgId', label: '公司名称'}, {prop: 'orgId', label: '公司ID'},
{prop: 'vatRegistrationNum', label: '纳税编号'},
{prop: 'customerLevel', label: '客户等级'}, {prop: 'customerLevel', label: '客户等级'},
{prop: 'contactName', label: '联系人'}, {prop: 'contactName', label: '联系人'},
{prop: 'country', label: '国家'},
{prop: 'contactPhone', label: '电话'}, {prop: 'contactPhone', label: '电话'},
{prop: 'address', label: '地址'}, {prop: 'province', label: '省市县'},
{prop: 'bank', label: '开户行'},
{prop: 'status', label: '是否启用'}, {prop: 'status', label: '是否启用'},
{prop: 'bankAccount', label: '银行账号'},
{prop: 'enterprise', label: '企业性质'},
{prop: 'address', label: '地址'},
{prop: 'classification', label: '客户分类'},
], ],
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}], customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],
customerLevelProps:{"label":"fullName","value":"id"}, customerLevelProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"禁用","id":"2"}],
statusProps:{"label":"fullName","value":"id"},
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私企","id":"1"}],
enterpriseProps:{"label":"fullName","value":"id"},
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}],
classificationProps:{"label":"fullName","value":"id"},
} }
}, },
computed: { computed: {
@ -164,7 +219,7 @@ width="150" >
menuId:this.menuId menuId:this.menuId
}; };
request({ request({
url: `/api/customer/Customer/getList`, url: `/api/example/Customer/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
@ -184,7 +239,7 @@ width="150" >
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/customer/Customer/${id}`, url: `/api/example/Customer/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
@ -216,7 +271,7 @@ width="150" >
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/customer/Customer/batchRemove/${ids}`, url: `/api/example/Customer/batchRemove/${ids}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
@ -245,7 +300,7 @@ width="150" >
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({ request({
url: `/api/customer/Customer/Actions/Export`, url: `/api/example/Customer/Actions/Export`,
method: 'GET', method: 'GET',
data: query data: query
}).then(res => { }).then(res => {
@ -260,7 +315,7 @@ width="150" >
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "supplierCd", sidx: "creatorTime",
} }
this.initData() this.initData()
}, },

Loading…
Cancel
Save