From 72b450bc83a8631bd518419c8ec7f024ed66e57f Mon Sep 17 00:00:00 2001 From: kevin jiang Date: Fri, 19 Jun 2020 00:25:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E9=97=A8=E5=BA=97=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/organization/OrganizationStore.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/pages/organization/OrganizationStore.vue b/src/pages/organization/OrganizationStore.vue index f0fd69f..3abd9d8 100644 --- a/src/pages/organization/OrganizationStore.vue +++ b/src/pages/organization/OrganizationStore.vue @@ -66,8 +66,8 @@ placeholder="请输入店铺简称"> - - @@ -158,7 +158,7 @@ name: '', code: '', abbreviation: '', - parentId: 0 + customerId: 0 }, ruleValidate: { name: [ @@ -170,7 +170,7 @@ detailName: [ {required: true, message: '店铺简称不能为空', trigger: 'blur'} ], - parentId: [ + customerId: [ { required: true, type: 'number', message: '请选择客户', trigger: 'change' } ] }, @@ -204,7 +204,7 @@ name: "", code: '', abbreviation: '', - parentId: 0 + customerId: 0 } }else{ this.formValidate = { @@ -212,7 +212,8 @@ name: item.name, code: item.code, abbreviation: item.abbreviation, - parentId: item.customerId + customerId: item.customerId + } } }, @@ -224,7 +225,7 @@ }, handleSubmit(value) { if (value) { - if(!value.parentId){ + if(!value.customerId){ this.$Message.info('请输入表单内容'); return; } @@ -316,7 +317,7 @@ name: val.name, code: val.code, abbreviation: val.abbreviation, - customerId: val.parentId + customerId: val.customerId }; that.btnLoading = true; service.postOrganizationStoreAdd(request, function (res) { @@ -343,7 +344,7 @@ name: val.name, code: val.code, abbreviation: val.abbreviation, - customerId: val.parentId + customerId: val.customerId }; service.postOrganizationStoreModify(request, function (res) { that.btnLoading = false; From c32ed846a082019fc60f9492ba62dbc7fdf58dab Mon Sep 17 00:00:00 2001 From: kevin jiang Date: Sat, 20 Jun 2020 03:31:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/CustomerView.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/home/CustomerView.vue b/src/pages/home/CustomerView.vue index 71c418e..7f97ff2 100644 --- a/src/pages/home/CustomerView.vue +++ b/src/pages/home/CustomerView.vue @@ -200,7 +200,7 @@ }, data() { return { - userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, + userId: null, intervalId : 0, //加载遮罩 spinShow: false, @@ -286,6 +286,12 @@ }, }, mounted: function () { + if(!JSON.parse(sessionStorage.getItem("loginInfo"))){ + this.$router.push("/login"); + return; + } + this.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId; + this.dateBtnClick('今日'); this.timingRefresh(); },