From bb2252f8181333a813f04b824127e77ac8f48bbb Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 27 Mar 2024 10:34:49 +0800 Subject: [PATCH] '123' --- .../customer/CustomerController.java | 2 +- .../java/com/ruoyi/web/utils/IdUtils.java | 12 +---- .../com/ruoyi/customer/domain/Customer.java | 19 ++++++- .../src/views/customer/customer/index.vue | 53 +++++++++++-------- 4 files changed, 51 insertions(+), 35 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java index 6c74572..b0c7955 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java @@ -95,7 +95,7 @@ public class CustomerController extends BaseController @PostMapping public AjaxResult add(@RequestBody Customer customer) { - customer.setCusCode(IdUtils.createNo("KH_",3)); + customer.setCusCode(IdUtils.createNo("KH_",2)); customer.setCreateBy(getUsername()); return toAjax(customerService.insertCustomer(customer)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/IdUtils.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/IdUtils.java index 93002ce..0015e61 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/IdUtils.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/IdUtils.java @@ -13,29 +13,20 @@ public class IdUtils { public static String createNo(String startLetter,int size){ String orderNo = null; - Date nowDate = new Date(); - Random random = new Random(); - - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); - + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); //生成两位大写字母 String keyArr = randomLetter(size); - String fourRandom = random.nextInt(9999) + ""; - int randLength = fourRandom.length(); - //四位随机数,不足四位的补0 if(fourRandom.length()<4){//不足四位的随机数补充0 for(int i=1; i<=4-randLength; i++){ fourRandom = '0' + fourRandom; } } - orderNo=startLetter+keyArr+sdf.format(nowDate)+fourRandom; - return orderNo; } @@ -67,7 +58,6 @@ public class IdUtils { * @param args */ public static void main(String[] args) { - System.out.println(createNo("PO_",2)); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/customer/domain/Customer.java b/ruoyi-system/src/main/java/com/ruoyi/customer/domain/Customer.java index 91806d8..3fceeb9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/customer/domain/Customer.java +++ b/ruoyi-system/src/main/java/com/ruoyi/customer/domain/Customer.java @@ -32,56 +32,71 @@ public class Customer extends BaseEntity private String cusSapCode; /** 街道/门牌号 */ + @Excel(name = "街道/门牌号") private String cusStreet; /** 付款条件 */ + @Excel(name = "付款条件",dictType = "cus_payment_terms") private String cusPaymentTerms; /** 电话号码 */ + @Excel(name = "电话号码") private String cusPhoneNumber; /** 行业代码 */ + @Excel(name = "行业代码") private String cusIndustryCode; /** 客户组类别 */ + @Excel(name = "客户组类别",dictType = "cus_group") private String cusGroup; /** 增值税号 */ + @Excel(name = "增值税号") private String cusVatNo; /** 客户类型 */ + @Excel(name = "客户类型",dictType = "cus_type") private String cusType; /** 国家 */ + @Excel(name = "国家",dictType = "cus_country") private String cusCountry; /** 语言 */ + @Excel(name = "语言",dictType = "cus_language") private String cusLanguage; /** 客户标签 */ + @Excel(name = "客户标签") private String cusLabel; /** 客户分类 */ + @Excel(name = "客户分类") private String cusClassification; /** 电子发票接收邮箱 */ + @Excel(name = "电子发票接收邮箱") private String cusReceivingEmail; /** 收件人 */ + @Excel(name = "收件人") private String cusRecipient; /** 收件人电话 */ + @Excel(name = "收件人电话") private String cusRecipientPhone; /** 备注 */ + @Excel(name = "备注") private String cusRemark; /** 客户禁用状态 */ - @Excel(name = "客户禁用状态") + @Excel(name = "客户禁用状态",dictType = "common_state") private String cusState; /** 客户审批状态 */ - @Excel(name = "客户审批状态") + @Excel(name = "客户审批状态",dictType = "cus_approval_status") private String cusApprovalStatus; /** 创建人 */ diff --git a/ruoyi-ui/src/views/customer/customer/index.vue b/ruoyi-ui/src/views/customer/customer/index.vue index 95cbd9a..745b068 100644 --- a/ruoyi-ui/src/views/customer/customer/index.vue +++ b/ruoyi-ui/src/views/customer/customer/index.vue @@ -100,31 +100,39 @@ - + - - - - - + + + + + + + + + + + + - + - - - - + @@ -201,7 +209,7 @@ - + @@ -271,15 +279,16 @@ - + + + - + - 银行信息 - + 添加 @@ -302,7 +311,7 @@ -