基础信息客户管理

master
A0010407 1 year ago
parent 13a95ea1b0
commit bc7ca954be

@ -71,26 +71,28 @@
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="客户ID" align="center" prop="clientId" />
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="客户编码" align="center" prop="clientCode" />
<el-table-column label="客户名称" align="center" prop="clientName" />
<el-table-column label="客户简称" align="center" prop="clientNick" />
<el-table-column label="客户英文名称" align="center" prop="clientEn" width="100"/>
<el-table-column label="客户简介" align="center" prop="clientDes" />
<el-table-column label="客户LOGO地址" align="center" prop="clientLogo" width="120"/>
<el-table-column label="客户类型" align="center" prop="clientType" />
<el-table-column label="客户地址" align="center" prop="address" />
<el-table-column label="客户官网地址" align="center" prop="website" width="100"/>
<el-table-column label="客户邮箱地址" align="center" prop="email" width="100"/>
<el-table-column label="客户电话" align="center" prop="tel" />
<el-table-column label="客户地址" align="center" prop="address" width="200"/>
<el-table-column label="客户官网地址" align="center" prop="website" width="200"/>
<el-table-column label="客户邮箱地址" align="center" prop="email" width="200"/>
<el-table-column label="客户电话" align="center" prop="tel" width="150"/>
<el-table-column label="联系人1" align="center" prop="contact1" />
<el-table-column label="联系人1-电话" align="center" prop="contact1Tel" width="120"/>
<el-table-column label="联系人1-邮箱" align="center" prop="contact1Email" width="120"/>
<el-table-column label="联系人1-电话" align="center" prop="contact1Tel" width="150"/>
<el-table-column label="联系人1-邮箱" align="center" prop="contact1Email" width="150"/>
<el-table-column label="联系人2" align="center" prop="contact2" />
<el-table-column label="联系人2-电话" align="center" prop="contact2Tel" width="120"/>
<el-table-column label="联系人2-邮箱" align="center" prop="contact2Email" width="120"/>
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" width="130"/>
<el-table-column label="是否启用" align="center" prop="enableFlag" />
<el-table-column label="联系人2-电话" align="center" prop="contact2Tel" width="150"/>
<el-table-column label="联系人2-邮箱" align="center" prop="contact2Email" width="150"/>
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" width="200" />
<el-table-column label="是否启用" align="center" prop="enableFlag">
<template slot-scope="scope">
{{ scope.row.activeFlag == 1 ? "是" : "否" }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -190,44 +192,46 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人1-电话" prop="contact1Tel">
<el-input v-model="form.contact1Tel" placeholder="请输入联系人1-电话" />
</el-form-item>
<el-form-item label="联系人2" prop="contact2">
<el-input v-model="form.contact2" placeholder="请输入联系人2" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="12">
<el-form-item label="联系人1-邮箱" prop="contact1Email">
<el-input v-model="form.contact1Email" placeholder="请输入联系人1-邮箱" />
</el-form-item>
<el-form-item label="联系人1-电话" prop="contact1Tel">
<el-input v-model="form.contact1Tel" placeholder="请输入联系人1-电话" maxlength="11"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人2" prop="contact2">
<el-input v-model="form.contact2" placeholder="请输入联系人2" />
</el-form-item>
<el-form-item label="联系人2-电话" prop="contact2Tel">
<el-input v-model="form.contact2Tel" placeholder="请输入联系人2-电话" maxlength="11"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="12">
<el-form-item label="联系人2-电话" prop="contact2Tel">
<el-input v-model="form.contact2Tel" placeholder="请输入联系人2-电话" />
<el-form-item label="联系人1-邮箱" prop="contact1Email">
<el-input v-model="form.contact1Email" placeholder="请输入联系人1-邮箱" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人2-邮箱" prop="contact2Email">
<el-input v-model="form.contact2Email" placeholder="请输入联系人2-邮箱" />
<el-input v-model="form.contact2Email" placeholder="请输入联系人2-邮箱" maxlength="50"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="12">
<el-form-item label="统一社会信用代码" prop="creditCode">
<el-input v-model="form.creditCode" placeholder="请输入统一社会信用代码" />
<el-input v-model="form.creditCode" placeholder="请输入统一社会信用代码" maxlength="50"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否启用" prop="enableFlag">
<el-input v-model="form.enableFlag" placeholder="请输入是否启用" />
<el-select v-model="form.enableFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:350px">
<el-option v-for="item in options" :key="item.enableFlag" :label="item.label" :value="item.enableFlag"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -304,6 +308,13 @@ export default {
},
//
form: {},
options: [{
enableFlag: "1",
label: '是'
}, {
enableFlag: "0",
label: '否'
}],
//
rules: {
clientCode: [
@ -315,6 +326,34 @@ export default {
enableFlag: [
{ required: true, message: "是否启用不能为空", trigger: "blur" }
],
contact1Email: [
{
type: "contact1Email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
],
contact2Email: [
{
type: "contact2Email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
],
contact2Tel: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
],
contact1Tel: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
],
}
};
},
@ -322,6 +361,10 @@ export default {
this.getList();
},
methods: {
//
indexMethod(index) {
return index + 1;
},
/** 查询客户管理列表 */
getList() {
this.loading = true;
@ -396,7 +439,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const clientId = row.clientId || this.ids
const clientId = this.ids;
console.log('客户ID',this.ids);
getCustomer(clientId).then(response => {
this.form = response.data;
this.open = true;

Loading…
Cancel
Save