From fac5ed82bb69da5b05b954ce30c17974dc926ad0 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 13 Apr 2022 18:27:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E7=94=A8=E7=A7=AF=E5=88=86=E5=A4=9A?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scoreSupermarket/storeManagement.vue | 64 +++++++------------ 1 file changed, 24 insertions(+), 40 deletions(-) diff --git a/project/xiushan/apps/creditScore/scoreSupermarket/storeManagement.vue b/project/xiushan/apps/creditScore/scoreSupermarket/storeManagement.vue index c27238ab..98b34c95 100644 --- a/project/xiushan/apps/creditScore/scoreSupermarket/storeManagement.vue +++ b/project/xiushan/apps/creditScore/scoreSupermarket/storeManagement.vue @@ -53,13 +53,12 @@ + @close="dialogInfo={}" + width="520px">
+ + + + + + 启用 @@ -103,14 +108,8 @@
@@ -214,6 +213,7 @@ export default { operators: [ {required: true, message: "请选择操作员", trigger: "blur"}, ], + shopPhoto: [{required: true, message: "请上传店铺图片"}] }, peopleAjaxUrl: "/admin/user/page", authDialog: false, @@ -224,11 +224,13 @@ export default { computed: { ...mapState(["user"]), + rootArea() { + return this.user.info.areaId?.replace(/(\d{6}).+/, '$1' + Array(7).join("0")) + } }, created() { this.unitId = this.user.info.unitId; - this.$dict.load("assessmentStartStatus").then(() => { this.getList(); }); @@ -307,7 +309,7 @@ export default { this.getList(); }, - onConfirm(formName) { + onConfirm() { if (this.dialogInfo.operators.length) { this.dialogInfo.operators.map((item) => { if (!item.name) { @@ -315,16 +317,14 @@ export default { } }); } - this.$refs[formName].validate((valid) => { + this.$refs.ruleForm.validate((valid) => { if (valid) { - this.instance - .post(`/app/appvillagerintegralshop/addOrUpdate`, this.dialogInfo) - .then((res) => { - if (res.code == 0) { + this.instance.post(`/app/appvillagerintegralshop/addOrUpdate`, this.dialogInfo).then(res => { + if (res?.code == 0) { this.onReset(); this.onCancel(); } - }); + }) } else { return false; } @@ -335,32 +335,16 @@ export default { this.dialog.visible = false; this.dialog.visibleStatus = false; }, - - init(formName) { - this.$refs[formName].clearValidate(); - Object.keys(this.dialogInfo).forEach((e) => { - this.dialogInfo[e] = ""; - }); - this.dialogInfo.status = "1"; - this.dialogInfo.operators = []; - }, - - - delate(index) { - this.dialogInfo.operators.splice(index, 1); - }, - onAdd() { - Object.keys(this.dialogInfo).forEach((e) => { - this.dialogInfo[e] = ""; - }); this.dialogInfo.status = "1"; this.dialogInfo.operators = []; this.dialog.visible = true; - this.dialogInfo.areaId = this.areaId; }, + handleShopPhoto(v) { + this.dialogInfo.shopPhoto = v?.[0]?.url || "" + } }, -}; +}