Commit 31c99e47 by 无尘

fix: 更新load

parent 1278ac15
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 09:14:54 * @Date: 2020-08-27 09:14:54
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 15:49:11 * @LastEditTime: 2020-12-21 09:35:56
--> -->
<!-- <!--
绑定详情-变更 绑定详情-变更
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<el-tab-pane label="绑定门店" name="first"></el-tab-pane> <el-tab-pane label="绑定门店" name="first"></el-tab-pane>
<el-tab-pane label="共享门店" name="second"></el-tab-pane> <el-tab-pane label="共享门店" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="store-change-body"> <div class="store-change-body" v-loading="loading">
<div class="flex "> <div class="flex ">
<div class="change-stores flex-1"> <div class="change-stores flex-1">
<div class="font-14 color-303133 text-center m-b-20">变更前</div> <div class="font-14 color-303133 text-center m-b-20">变更前</div>
...@@ -71,7 +71,8 @@ export default { ...@@ -71,7 +71,8 @@ export default {
showData: { showData: {
range: [], range: [],
auditRange: [] auditRange: []
} },
loading: false
}; };
}, },
mounted() { mounted() {
...@@ -119,11 +120,13 @@ export default { ...@@ -119,11 +120,13 @@ export default {
*/ */
getTableList() { getTableList() {
const that = this; const that = this;
that.loading = true;
let para = { let para = {
storeRangeAuditId: that.storeRangeAuditId, storeRangeAuditId: that.storeRangeAuditId,
}; };
getAuditLogDetail(para) getAuditLogDetail(para)
.then(res => { .then(res => {
that.loading = false;
if (!!res.result.bindRange) { if (!!res.result.bindRange) {
res.result.bindRange = JSON.parse(res.result.bindRange); res.result.bindRange = JSON.parse(res.result.bindRange);
}else { }else {
...@@ -151,7 +154,7 @@ export default { ...@@ -151,7 +154,7 @@ export default {
}; };
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false;
}); });
} }
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-12-17 17:32:45 * @LastEditTime: 2020-12-21 09:43:29
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div v-if="activeStep == 0" class="auth-tip-body"> <div v-if="activeStep == 0" class="auth-tip-body">
<auth-tip class="m-t-30"></auth-tip> <auth-tip class="m-t-30"></auth-tip>
<el-form :model="authForm" :rules="rules" ref="authForm" label-width="110px" class="dialog-form m-t-20" @submit.native.prevent> <el-form :model="authForm" v-loading="loading" :rules="rules" ref="authForm" label-width="110px" class="dialog-form m-t-20" @submit.native.prevent>
<el-form-item prop="enterpriseId"> <el-form-item prop="enterpriseId">
<span slot="label"> <span slot="label">
<el-tooltip class="item" effect="dark" placement="top-start"> <el-tooltip class="item" effect="dark" placement="top-start">
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
path: '' path: ''
} }
], ],
loading: false,
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '', wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
auditorName: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).staffName : '', auditorName: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).staffName : '',
activeStep: '0', activeStep: '0',
...@@ -462,12 +463,14 @@ export default { ...@@ -462,12 +463,14 @@ export default {
*/ */
getData() { getData() {
const that = this; const that = this;
that.loading = true;
let para = { let para = {
enterpriseId: that.$route.query.enterpriseId, enterpriseId: that.$route.query.enterpriseId,
wxEnterpriseId: that.wxEnterpriseId, wxEnterpriseId: that.wxEnterpriseId,
}; };
getAuthDetail(para) getAuthDetail(para)
.then(res => { .then(res => {
that.loading = false;
if (res.code == '0000') { if (res.code == '0000') {
if (!!res.result.bindRange) { if (!!res.result.bindRange) {
res.result.bindRange = JSON.parse(res.result.bindRange); res.result.bindRange = JSON.parse(res.result.bindRange);
...@@ -485,7 +488,7 @@ export default { ...@@ -485,7 +488,7 @@ export default {
} }
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false;
}); });
} }
} }
......
<template> <template>
<el-form :model="groupData" :rules="groupDataRules" ref="groupData" label-width="110px" class="group-detail"> <el-form :model="groupData" v-loading="loading" :rules="groupDataRules" ref="groupData" label-width="110px" class="group-detail">
<el-form-item label="审核组名称" prop="auditGroupName"> <el-form-item label="审核组名称" prop="auditGroupName">
<el-input <el-input
placeholder="请输入内容" placeholder="请输入内容"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</dm-transfer> </dm-transfer>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 50px"> <el-form-item style="margin-top: 50px">
<el-button type="primary" :loading="loading" @click="onSave">{{ groupData.auditGroupId ? '保存' : '确认新建' }}</el-button> <el-button type="primary" @click="onSave">{{ groupData.auditGroupId ? '保存' : '确认新建' }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
...@@ -78,13 +78,14 @@ export default { ...@@ -78,13 +78,14 @@ export default {
}); });
}, },
getGroupDetail(auditGroupId) { getGroupDetail(auditGroupId) {
this.loading = true;
auditGroupDetail({ auditGroupId }).then(res => { auditGroupDetail({ auditGroupId }).then(res => {
const { auditGroupName, auditGroupId, auditPerson } = res.result || {}; const { auditGroupName, auditGroupId, auditPerson } = res.result || {};
Object.assign(this.groupData, { auditGroupName, auditGroupId }); Object.assign(this.groupData, { auditGroupName, auditGroupId });
if (Array.isArray(auditPerson)) { if (Array.isArray(auditPerson)) {
this.groupData.auditPerson = auditPerson.map(el => el.staffId); this.groupData.auditPerson = auditPerson.map(el => el.staffId);
} }
}); }).finally(() => this.loading = false);
}, },
// 新建、编辑受审组的保存 // 新建、编辑受审组的保存
onSave() { onSave() {
......
<template> <template>
<el-form class="create-audit-item" :model="auditData" :rules="auditDataRules" ref="auditData" label-width="110px"> <el-form class="create-audit-item" v-loading="loading" :model="auditData" :rules="auditDataRules" ref="auditData" label-width="110px">
<el-form-item label="审核组名称" prop="auditGroupIds"> <el-form-item label="审核组名称" prop="auditGroupIds">
<el-select v-model="auditData.auditGroupIds" multiple collapse-tags style="width: 480px"> <el-select v-model="auditData.auditGroupIds" multiple collapse-tags style="width: 480px">
<el-option v-for="el in auditGroupList" :key="el.auditGroupId" :value="el.auditGroupId" :label="el.auditGroupName"></el-option> <el-option v-for="el in auditGroupList" :key="el.auditGroupId" :value="el.auditGroupId" :label="el.auditGroupName"></el-option>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 50px"> <el-form-item style="margin-top: 50px">
<el-button type="primary" :loading="loading" @click="onSave">{{ auditData.auditItemId ? '保存' : '确认新建' }}</el-button> <el-button type="primary" @click="onSave">{{ auditData.auditItemId ? '保存' : '确认新建' }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
...@@ -62,6 +62,7 @@ export default { ...@@ -62,6 +62,7 @@ export default {
}); });
}, },
getAuditItemDetail(auditItemId) { getAuditItemDetail(auditItemId) {
this.loading = true;
auditItemDetail({ auditItemId }).then(res => { auditItemDetail({ auditItemId }).then(res => {
const { auditItemId, auditGroupId, auditTypes } = res.result || {}; const { auditItemId, auditGroupId, auditTypes } = res.result || {};
this.auditData.auditItemId = auditItemId; this.auditData.auditItemId = auditItemId;
...@@ -72,7 +73,7 @@ export default { ...@@ -72,7 +73,7 @@ export default {
if (typeof auditGroupId == 'string' || typeof auditGroupId == 'number') { if (typeof auditGroupId == 'string' || typeof auditGroupId == 'number') {
this.auditData.auditGroupIds = [ auditGroupId ]; this.auditData.auditGroupIds = [ auditGroupId ];
} }
}); }).finally(() => this.loading = false);
}, },
// 新建、编辑审核事项保存 // 新建、编辑审核事项保存
onSave() { onSave() {
...@@ -84,6 +85,7 @@ export default { ...@@ -84,6 +85,7 @@ export default {
auditTypes: auditTypes.join(','), auditTypes: auditTypes.join(','),
wxEnterpriseId wxEnterpriseId
}; };
this.loading = true;
if (auditItemId) { if (auditItemId) {
params.auditItemId = auditItemId; params.auditItemId = auditItemId;
editAuditItem(params).then(succ.bind(this, '保存成功!')).finally(() => this.loading = false); editAuditItem(params).then(succ.bind(this, '保存成功!')).finally(() => this.loading = false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment