'123'
This commit is contained in:
parent
2dd0f673c9
commit
bb2252f818
|
@ -95,7 +95,7 @@ public class CustomerController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Customer customer)
|
public AjaxResult add(@RequestBody Customer customer)
|
||||||
{
|
{
|
||||||
customer.setCusCode(IdUtils.createNo("KH_",3));
|
customer.setCusCode(IdUtils.createNo("KH_",2));
|
||||||
customer.setCreateBy(getUsername());
|
customer.setCreateBy(getUsername());
|
||||||
return toAjax(customerService.insertCustomer(customer));
|
return toAjax(customerService.insertCustomer(customer));
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,29 +13,20 @@ public class IdUtils {
|
||||||
public static String createNo(String startLetter,int size){
|
public static String createNo(String startLetter,int size){
|
||||||
|
|
||||||
String orderNo = null;
|
String orderNo = null;
|
||||||
|
|
||||||
Date nowDate = new Date();
|
Date nowDate = new Date();
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
||||||
|
|
||||||
//生成两位大写字母
|
//生成两位大写字母
|
||||||
String keyArr = randomLetter(size);
|
String keyArr = randomLetter(size);
|
||||||
|
|
||||||
String fourRandom = random.nextInt(9999) + "";
|
String fourRandom = random.nextInt(9999) + "";
|
||||||
|
|
||||||
int randLength = fourRandom.length();
|
int randLength = fourRandom.length();
|
||||||
|
|
||||||
//四位随机数,不足四位的补0
|
//四位随机数,不足四位的补0
|
||||||
if(fourRandom.length()<4){//不足四位的随机数补充0
|
if(fourRandom.length()<4){//不足四位的随机数补充0
|
||||||
for(int i=1; i<=4-randLength; i++){
|
for(int i=1; i<=4-randLength; i++){
|
||||||
fourRandom = '0' + fourRandom;
|
fourRandom = '0' + fourRandom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
orderNo=startLetter+keyArr+sdf.format(nowDate)+fourRandom;
|
orderNo=startLetter+keyArr+sdf.format(nowDate)+fourRandom;
|
||||||
|
|
||||||
return orderNo;
|
return orderNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +58,6 @@ public class IdUtils {
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
System.out.println(createNo("PO_",2));
|
System.out.println(createNo("PO_",2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,56 +32,71 @@ public class Customer extends BaseEntity
|
||||||
private String cusSapCode;
|
private String cusSapCode;
|
||||||
|
|
||||||
/** 街道/门牌号 */
|
/** 街道/门牌号 */
|
||||||
|
@Excel(name = "街道/门牌号")
|
||||||
private String cusStreet;
|
private String cusStreet;
|
||||||
|
|
||||||
/** 付款条件 */
|
/** 付款条件 */
|
||||||
|
@Excel(name = "付款条件",dictType = "cus_payment_terms")
|
||||||
private String cusPaymentTerms;
|
private String cusPaymentTerms;
|
||||||
|
|
||||||
/** 电话号码 */
|
/** 电话号码 */
|
||||||
|
@Excel(name = "电话号码")
|
||||||
private String cusPhoneNumber;
|
private String cusPhoneNumber;
|
||||||
|
|
||||||
/** 行业代码 */
|
/** 行业代码 */
|
||||||
|
@Excel(name = "行业代码")
|
||||||
private String cusIndustryCode;
|
private String cusIndustryCode;
|
||||||
|
|
||||||
/** 客户组类别 */
|
/** 客户组类别 */
|
||||||
|
@Excel(name = "客户组类别",dictType = "cus_group")
|
||||||
private String cusGroup;
|
private String cusGroup;
|
||||||
|
|
||||||
/** 增值税号 */
|
/** 增值税号 */
|
||||||
|
@Excel(name = "增值税号")
|
||||||
private String cusVatNo;
|
private String cusVatNo;
|
||||||
|
|
||||||
/** 客户类型 */
|
/** 客户类型 */
|
||||||
|
@Excel(name = "客户类型",dictType = "cus_type")
|
||||||
private String cusType;
|
private String cusType;
|
||||||
|
|
||||||
/** 国家 */
|
/** 国家 */
|
||||||
|
@Excel(name = "国家",dictType = "cus_country")
|
||||||
private String cusCountry;
|
private String cusCountry;
|
||||||
|
|
||||||
/** 语言 */
|
/** 语言 */
|
||||||
|
@Excel(name = "语言",dictType = "cus_language")
|
||||||
private String cusLanguage;
|
private String cusLanguage;
|
||||||
|
|
||||||
/** 客户标签 */
|
/** 客户标签 */
|
||||||
|
@Excel(name = "客户标签")
|
||||||
private String cusLabel;
|
private String cusLabel;
|
||||||
|
|
||||||
/** 客户分类 */
|
/** 客户分类 */
|
||||||
|
@Excel(name = "客户分类")
|
||||||
private String cusClassification;
|
private String cusClassification;
|
||||||
|
|
||||||
/** 电子发票接收邮箱 */
|
/** 电子发票接收邮箱 */
|
||||||
|
@Excel(name = "电子发票接收邮箱")
|
||||||
private String cusReceivingEmail;
|
private String cusReceivingEmail;
|
||||||
|
|
||||||
/** 收件人 */
|
/** 收件人 */
|
||||||
|
@Excel(name = "收件人")
|
||||||
private String cusRecipient;
|
private String cusRecipient;
|
||||||
|
|
||||||
/** 收件人电话 */
|
/** 收件人电话 */
|
||||||
|
@Excel(name = "收件人电话")
|
||||||
private String cusRecipientPhone;
|
private String cusRecipientPhone;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
private String cusRemark;
|
private String cusRemark;
|
||||||
|
|
||||||
/** 客户禁用状态 */
|
/** 客户禁用状态 */
|
||||||
@Excel(name = "客户禁用状态")
|
@Excel(name = "客户禁用状态",dictType = "common_state")
|
||||||
private String cusState;
|
private String cusState;
|
||||||
|
|
||||||
/** 客户审批状态 */
|
/** 客户审批状态 */
|
||||||
@Excel(name = "客户审批状态")
|
@Excel(name = "客户审批状态",dictType = "cus_approval_status")
|
||||||
private String cusApprovalStatus;
|
private String cusApprovalStatus;
|
||||||
|
|
||||||
/** 创建人 */
|
/** 创建人 */
|
||||||
|
|
|
@ -100,31 +100,39 @@
|
||||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="客户ID" align="center" prop="cusId" v-if="false"/>
|
<el-table-column label="客户ID" align="center" prop="cusId" v-if="false"/>
|
||||||
<el-table-column label="客户编码" align="center" prop="cusCode">
|
<el-table-column fixed label="审批状态" align="center" prop="cusApprovalStatus">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link v-hasPermi="['customer:customer:edit']" :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.cusCode}}</el-link>
|
<dict-tag :options="dict.type.cus_approval_status" :value="scope.row.cusApprovalStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户名称" align="center" prop="cusName" />
|
<el-table-column fixed label="客户名称" align="center" prop="cusName" width="230px">
|
||||||
<el-table-column label="SAP客户编码" align="center" prop="cusSapCode" />
|
<template slot-scope="scope">
|
||||||
<el-table-column label="客户类型" align="center" prop="cusType" />
|
<el-link v-hasPermi="['customer:customer:edit']" :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.cusName}}</el-link>
|
||||||
<el-table-column label="客户组" align="center" prop="cusGroup" />
|
</template>
|
||||||
<el-table-column label="创建人" align="center" prop="createName" />
|
</el-table-column>
|
||||||
|
<el-table-column label="客户编码" align="center" prop="cusCode" width="230px"></el-table-column>
|
||||||
|
<el-table-column label="SAP客户编码" align="center" prop="cusSapCode" width="150px"/>
|
||||||
|
<el-table-column label="客户类型" align="center" prop="cusType" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.cus_type" :value="scope.row.cusType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户组" align="center" prop="cusGroup" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.cus_group" :value="scope.row.cusGroup"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建人" align="center" prop="createName" width="100px"/>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户禁用状态" align="center" prop="cusState">
|
<el-table-column label="状态" align="center" prop="cusState">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.common_state" :value="scope.row.cusState"/>
|
<dict-tag :options="dict.type.common_state" :value="scope.row.cusState"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户审批状态" align="center" prop="cusApprovalStatus">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<dict-tag :options="dict.type.cus_approval_status" :value="scope.row.cusApprovalStatus"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
@ -147,7 +155,7 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户名称" prop="cusName">
|
<el-form-item label="客户名称" prop="cusName">
|
||||||
<el-input v-model="form.cusName" placeholder="企查查查询" :disabled="true">
|
<el-input v-model="form.cusName" placeholder="企查查查询" :disabled="true">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="openQcc"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="openQcc" v-if="buttonShow"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -201,7 +209,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="增值税号" prop="cusVatNo">
|
<el-form-item label="增值税号" prop="cusVatNo">
|
||||||
<el-input v-model="form.cusVatNo" placeholder="请输入增值税号" />
|
<el-input v-model="form.cusVatNo" placeholder="企查查查询带出" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -271,15 +279,16 @@
|
||||||
<el-input v-model="form.cusRecipientPhone" placeholder="请输入收件人电话" />
|
<el-input v-model="form.cusRecipientPhone" placeholder="请输入收件人电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
</el-row>
|
||||||
|
<el-row :gutter="8">
|
||||||
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="cusRemark">
|
<el-form-item label="备注" prop="cusRemark">
|
||||||
<el-input v-model="form.cusRemark" placeholder="请输入备注" />
|
<el-input type="textarea" autosize v-model="form.cusRemark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-divider content-position="center">银行信息</el-divider>
|
<el-divider content-position="center">银行信息</el-divider>
|
||||||
<el-row :gutter="8" class="mb8">
|
<el-row :gutter="8" class="mb8" v-if="buttonShow">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBank">添加</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -302,7 +311,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer" v-if="buttonShow">
|
||||||
<el-button @click="saveForm">保 存</el-button>
|
<el-button @click="saveForm">保 存</el-button>
|
||||||
<el-button type="primary" plain @click="commitForm">提 交</el-button>
|
<el-button type="primary" plain @click="commitForm">提 交</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -427,7 +436,8 @@ export default {
|
||||||
{ required: true, message: "语言不能为空", trigger: "change" }
|
{ required: true, message: "语言不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// 保存\提交,明细添加、删除 按钮显示
|
||||||
|
buttonShow: true,
|
||||||
|
|
||||||
/*****************************企查查查询模块*************************************/
|
/*****************************企查查查询模块*************************************/
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -532,6 +542,7 @@ export default {
|
||||||
const cusId = row.cusId || this.ids
|
const cusId = row.cusId || this.ids
|
||||||
getCustomer(cusId).then(response => {
|
getCustomer(cusId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.buttonShow = this.form.cusApprovalStatus == '0'?true:false;
|
||||||
this.bankList = response.data.bankList;
|
this.bankList = response.data.bankList;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改客户信息";
|
this.title = "修改客户信息";
|
||||||
|
|
Loading…
Reference in New Issue