|
@@ -162,7 +162,7 @@
|
|
|
|
|
|
|
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
- <div v-if="item.isAudit===0" class="dialog">
|
|
|
|
|
|
+ <div v-if="item.isAudit===0 && this.showAudit" class="dialog">
|
|
<el-divider content-position="left">审核</el-divider>
|
|
<el-divider content-position="left">审核</el-divider>
|
|
<el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
|
|
<el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
|
|
<el-form-item label="审核理由" prop="reason">
|
|
<el-form-item label="审核理由" prop="reason">
|
|
@@ -210,61 +210,65 @@
|
|
<script>
|
|
<script>
|
|
import { audit, getStore, getStoreAuditLog } from '@/api/hisStore/store'
|
|
import { audit, getStore, getStoreAuditLog } from '@/api/hisStore/store'
|
|
export default {
|
|
export default {
|
|
- name: "user",
|
|
|
|
- props:["data"],
|
|
|
|
|
|
+ name: 'user',
|
|
|
|
+ props:['data'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ showAudit: true,
|
|
statusOptions: [],
|
|
statusOptions: [],
|
|
// 审核状态字典
|
|
// 审核状态字典
|
|
isAuditOptions: [],
|
|
isAuditOptions: [],
|
|
item:null,
|
|
item:null,
|
|
logoUrl:[],
|
|
logoUrl:[],
|
|
form: {
|
|
form: {
|
|
- sreason: '',
|
|
|
|
|
|
+ sreason: ''
|
|
},
|
|
},
|
|
form1: {},
|
|
form1: {},
|
|
rules1: {
|
|
rules1: {
|
|
auditReason: [
|
|
auditReason: [
|
|
- { required: true, message: "审核理由不能为空", trigger: "blur" }
|
|
|
|
|
|
+ { required: true, message: '审核理由不能为空', trigger: 'blur' }
|
|
]
|
|
]
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getDicts("sys_company_status").then(response => {
|
|
|
|
- this.statusOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("sys_company_isaudit").then(response => {
|
|
|
|
- this.isAuditOptions = response.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.getDicts('sys_company_status').then(response => {
|
|
|
|
+ this.statusOptions = response.data
|
|
|
|
+ })
|
|
|
|
+ this.getDicts('sys_company_isaudit').then(response => {
|
|
|
|
+ this.isAuditOptions = response.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
- this.item = null;
|
|
|
|
- this.form1 = {};
|
|
|
|
|
|
+ this.item = null
|
|
|
|
+ this.form1 = {}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getDetails(orderId) {
|
|
|
|
- this.item = null;
|
|
|
|
|
|
+ getDetails(orderId,showAudit) {
|
|
|
|
+ if(showAudit === 0) {
|
|
|
|
+ this.showAudit = false
|
|
|
|
+ }
|
|
|
|
+ this.item = null
|
|
Promise.all([getStore(orderId), getStoreAuditLog(orderId)])
|
|
Promise.all([getStore(orderId), getStoreAuditLog(orderId)])
|
|
.then(([storeResponse, auditResponse]) => {
|
|
.then(([storeResponse, auditResponse]) => {
|
|
- this.item = storeResponse.data;
|
|
|
|
|
|
+ this.item = storeResponse.data
|
|
// 确保 item 不为 null 后再设置 auditLogs
|
|
// 确保 item 不为 null 后再设置 auditLogs
|
|
- this.$set(this.item, 'auditLogs', auditResponse.auditLog);
|
|
|
|
- });
|
|
|
|
|
|
+ this.$set(this.item, 'auditLogs', auditResponse.auditLog)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
handleUpdate(oper) {
|
|
handleUpdate(oper) {
|
|
- let operStr = oper === 1 ? "审核通过" : "审核退回";
|
|
|
|
- this.$confirm("是否确认"+operStr+"店铺?", "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
|
|
+ let operStr = oper === 1 ? '审核通过' : '审核退回'
|
|
|
|
+ this.$confirm('是否确认'+operStr+'店铺?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
}).then(()=> {
|
|
}).then(()=> {
|
|
let param = {}
|
|
let param = {}
|
|
- param.storeId = this.item.storeId;
|
|
|
|
- param.reason = this.form1.reason;
|
|
|
|
- param.attachImage = this.form1.attachImage;
|
|
|
|
- param.isAudit=oper;
|
|
|
|
- return audit(param);
|
|
|
|
|
|
+ param.storeId = this.item.storeId
|
|
|
|
+ param.reason = this.form1.reason
|
|
|
|
+ param.attachImage = this.form1.attachImage
|
|
|
|
+ param.isAudit=oper
|
|
|
|
+ return audit(param)
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if(res.code === 200){
|
|
if(res.code === 200){
|
|
this.$message.success("审核成功");
|
|
this.$message.success("审核成功");
|
|
@@ -276,10 +280,10 @@ export default {
|
|
}).catch(function() {
|
|
}).catch(function() {
|
|
|
|
|
|
}).finally(()=>{
|
|
}).finally(()=>{
|
|
- this.form1.auditReason = null;
|
|
|
|
- this.form1.attachment = null;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ this.form1.auditReason = null
|
|
|
|
+ this.form1.attachment = null
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|