|
@@ -39,6 +39,13 @@
|
|
|
<sa-item type="text" name="联系人" v-model="m.dutyPeople" placeholder="请输入联系人" br></sa-item>
|
|
|
<sa-item type="text" name="联系电话" v-model="m.phone" placeholder="请输入联系号码" br></sa-item>
|
|
|
<div class="c-item">
|
|
|
+ <label class="c-label">业务类型:</label>
|
|
|
+ <el-select v-model="businessType" multiple :disabled="currentCustomerId!=='1'">
|
|
|
+ <el-option label="其他业务" value="1"></el-option>
|
|
|
+ <el-option label="整车业务" value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="c-item">
|
|
|
<label class="c-label">类型:</label>
|
|
|
<el-select v-model="type" multiple :disabled="currentCustomerId!=='1'">
|
|
|
<el-option label="消杀公司" value="1"></el-option>
|
|
@@ -68,7 +75,8 @@
|
|
|
m: null, // 实体对象
|
|
|
options: [],
|
|
|
currentCustomerId: '1',
|
|
|
- type: []
|
|
|
+ type: [],
|
|
|
+ businessType: [],
|
|
|
},
|
|
|
methods: {
|
|
|
getCurrendCustomer() {
|
|
@@ -94,6 +102,7 @@
|
|
|
},
|
|
|
// 提交数据
|
|
|
ok: function() {
|
|
|
+ console.log(this.businessType);
|
|
|
// 表单校验
|
|
|
let m = this.m;
|
|
|
sa.checkNull(m.name, '请输入 [名称]');
|
|
@@ -103,6 +112,9 @@
|
|
|
}
|
|
|
sa.checkNull(m.dutyPeople, '请输入 [联系人]');
|
|
|
m.type = this.type.join(",")
|
|
|
+ m.businessType = this.businessType.join(",");
|
|
|
+ sa.checkNull(m.type, '请输入 [类型]');
|
|
|
+ sa.checkNull(m.businessType, '请输入 [业务类型]');
|
|
|
if (this.id <= 0) { // 添加
|
|
|
sa.ajax('/TbCostomer/add', m, function(res) {
|
|
|
sa.alert('增加成功', this.clean);
|
|
@@ -132,6 +144,7 @@
|
|
|
sa.ajax('/TbCostomer/getById?id=' + this.id, function(res) {
|
|
|
this.m = res.data;
|
|
|
this.type = this.m.type.split(',')
|
|
|
+ this.businessType = this.m.businessType.split(',')
|
|
|
if (res.data == null) {
|
|
|
sa.alert('未能查找到 id=' + this.id + " 详细数据");
|
|
|
}
|