组织管理,门店修改。

feature_0521
kevin jiang 5 years ago
parent b528dd3ec4
commit 72b450bc83

@ -66,8 +66,8 @@
placeholder="请输入店铺简称"> placeholder="请输入店铺简称">
</i-input> </i-input>
</FormItem> </FormItem>
<FormItem label="所属客户" prop="parentId"> <FormItem label="所属客户" prop="customerId">
<Select filterable clearable v-model="formValidate.parentId" <Select filterable clearable v-model="formValidate.customerId"
placeholder="选择客户"> placeholder="选择客户">
<Option v-for="item in customerList" :value="item.id" :key="item.id">{{ item.name }}</Option> <Option v-for="item in customerList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select> </Select>
@ -158,7 +158,7 @@
name: '', name: '',
code: '', code: '',
abbreviation: '', abbreviation: '',
parentId: 0 customerId: 0
}, },
ruleValidate: { ruleValidate: {
name: [ name: [
@ -170,7 +170,7 @@
detailName: [ detailName: [
{required: true, message: '店铺简称不能为空', trigger: 'blur'} {required: true, message: '店铺简称不能为空', trigger: 'blur'}
], ],
parentId: [ customerId: [
{ required: true, type: 'number', message: '请选择客户', trigger: 'change' } { required: true, type: 'number', message: '请选择客户', trigger: 'change' }
] ]
}, },
@ -204,7 +204,7 @@
name: "", name: "",
code: '', code: '',
abbreviation: '', abbreviation: '',
parentId: 0 customerId: 0
} }
}else{ }else{
this.formValidate = { this.formValidate = {
@ -212,7 +212,8 @@
name: item.name, name: item.name,
code: item.code, code: item.code,
abbreviation: item.abbreviation, abbreviation: item.abbreviation,
parentId: item.customerId customerId: item.customerId
} }
} }
}, },
@ -224,7 +225,7 @@
}, },
handleSubmit(value) { handleSubmit(value) {
if (value) { if (value) {
if(!value.parentId){ if(!value.customerId){
this.$Message.info('请输入表单内容'); this.$Message.info('请输入表单内容');
return; return;
} }
@ -316,7 +317,7 @@
name: val.name, name: val.name,
code: val.code, code: val.code,
abbreviation: val.abbreviation, abbreviation: val.abbreviation,
customerId: val.parentId customerId: val.customerId
}; };
that.btnLoading = true; that.btnLoading = true;
service.postOrganizationStoreAdd(request, function (res) { service.postOrganizationStoreAdd(request, function (res) {
@ -343,7 +344,7 @@
name: val.name, name: val.name,
code: val.code, code: val.code,
abbreviation: val.abbreviation, abbreviation: val.abbreviation,
customerId: val.parentId customerId: val.customerId
}; };
service.postOrganizationStoreModify(request, function (res) { service.postOrganizationStoreModify(request, function (res) {
that.btnLoading = false; that.btnLoading = false;

Loading…
Cancel
Save