feat: 门店档案新增,详情

This commit is contained in:
wanglei
2024-06-25 16:36:01 +08:00
parent 210e410a26
commit 463e545c19
2 changed files with 23 additions and 17 deletions

View File

@@ -91,10 +91,10 @@
<el-form-item label="社会信用代码:" style="width: 100%;" prop="creditCode">
<el-input v-model="form.creditCode" placeholder="请输入社会统一信用代码" size="small"></el-input>
</el-form-item>
<el-form-item label="门店住址:" style="width: 100%;" prop="addressCode">
<el-form-item label="门店住址:" style="width: 100%;" prop="areaId">
<ai-area-select :instance="instance" clearable always-show
:disabled-level="$store.state.user.info.areaList.length"
@name="v=>form.areaName=v" v-model="form.addressCode"/>
@name="v=>form.areaName=v" v-model="form.areaId"/>
</el-form-item>
<el-form-item label="" style="width:100%" prop="address">
<el-input
@@ -157,15 +157,18 @@ export default {
form: {
id: null,
areaId: '',
girdCode: '',
girdName: '',
name: '',
idNumber: '',
sex: '',
phone: '',
birthday: '',
age: '',
girdInfoList:[]
fileUrl:[],
girdInfoList: []
},
currCheckedKeys:[],
currCheckedKeys: [],
dialog: false,
treeList: [],
treeObj: {
@@ -185,7 +188,7 @@ export default {
operatorType: [{required: true, message: '请选择经营者类型', trigger: 'change'}],
girdCode: [{required: true, message: '请选择所属片区', trigger: 'change'}],
fileUrl: [{required: true, message: '请选择门店照片', trigger: 'change'}],
addressCode: [{required: true, message: '请选择门店住址', trigger: 'change'}],
areaId: [{required: true, message: '请选择门店住址', trigger: 'change'}],
}
}
},
@@ -195,7 +198,7 @@ export default {
this.form.areaId = this.$store.state.user.info.areaId
this.$dict.load('sex', 'operatorType')
if(this.params.id){
if (this.params.id) {
this.getDetail(this.params);
}
},
@@ -227,23 +230,24 @@ export default {
}
});
},
async getDetail({id}){
async getDetail({id}) {
try {
const {code,data} = await this.instance.post('/app/appshoparchives/queryDetailById',null,{
params:{
const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
params: {
id
}
})
if(code===0){
if (code === 0) {
this.form = {...data}
}
}catch (e) {
} catch (e) {
console.error(e)
}
},
getCheckedTree() {
const nodes = this.$refs.treeRef.getCheckedNodes()
console.log(nodes)
if (!nodes.length) {
return this.$message.error('请选择网格')
}
@@ -253,6 +257,8 @@ export default {
}
this.currCheckedKeys = [nodes[0]?.id]
this.form.girdCode = nodes[0]?.girdCode
this.form.girdName = nodes[0]?.girdName
this.dialog = false;
},
@@ -276,10 +282,10 @@ export default {
async addOrUpdate() {
try {
const {code, data} = await this.instance.post(`/app/appshoparchives/addOrUpdate`, null, {
params: {
...this.form
}
const {code, data} = await this.instance.post(`/app/appshoparchives/addOrUpdate`,{
...this.form,
fileId:this.form.fileUrl[0]?.id,
fileUrl:this.form.fileUrl[0]?.path,
})
if (code === 0) {
this.$message.success('保存成功');

View File

@@ -7,8 +7,8 @@
<ai-card title="基本信息">
<template #content>
<ai-wrapper>
<ai-info-item label="门店名称" :value="info.applyItemName"></ai-info-item>
<ai-info-item label="门店地址" :value="info.integralUserName"></ai-info-item>
<ai-info-item label="门店名称" :value="info.shopName"></ai-info-item>
<ai-info-item label="门店地址" :value="info.address"></ai-info-item>
<ai-info-item label="经营者姓名" :value="info.phone"></ai-info-item>
<ai-info-item label="联系电话" :value="info.areaName"></ai-info-item>
<ai-info-item label="评价人" :value="info.girdName"></ai-info-item>