Merge remote-tracking branch 'origin/feature/20200514_version' into feature/20200514_version

feature_0521
cuijie 5 years ago
commit 8215aab0d7

@ -200,7 +200,7 @@
}, },
data() { data() {
return { return {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, userId: null,
intervalId : 0, intervalId : 0,
// //
spinShow: false, spinShow: false,
@ -286,6 +286,12 @@
}, },
}, },
mounted: function () { mounted: function () {
if(!JSON.parse(sessionStorage.getItem("loginInfo"))){
this.$router.push("/login");
return;
}
this.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId;
this.dateBtnClick('今日'); this.dateBtnClick('今日');
this.timingRefresh(); this.timingRefresh();
}, },

@ -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