feat: 门店档案新增,详情
This commit is contained in:
@@ -91,10 +91,10 @@
|
|||||||
<el-form-item label="社会信用代码:" style="width: 100%;" prop="creditCode">
|
<el-form-item label="社会信用代码:" style="width: 100%;" prop="creditCode">
|
||||||
<el-input v-model="form.creditCode" placeholder="请输入社会统一信用代码" size="small"></el-input>
|
<el-input v-model="form.creditCode" placeholder="请输入社会统一信用代码" size="small"></el-input>
|
||||||
</el-form-item>
|
</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
|
<ai-area-select :instance="instance" clearable always-show
|
||||||
:disabled-level="$store.state.user.info.areaList.length"
|
: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>
|
||||||
<el-form-item label="" style="width:100%" prop="address">
|
<el-form-item label="" style="width:100%" prop="address">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -157,15 +157,18 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
|
girdCode: '',
|
||||||
|
girdName: '',
|
||||||
name: '',
|
name: '',
|
||||||
idNumber: '',
|
idNumber: '',
|
||||||
sex: '',
|
sex: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
birthday: '',
|
birthday: '',
|
||||||
age: '',
|
age: '',
|
||||||
girdInfoList:[]
|
fileUrl:[],
|
||||||
|
girdInfoList: []
|
||||||
},
|
},
|
||||||
currCheckedKeys:[],
|
currCheckedKeys: [],
|
||||||
dialog: false,
|
dialog: false,
|
||||||
treeList: [],
|
treeList: [],
|
||||||
treeObj: {
|
treeObj: {
|
||||||
@@ -185,7 +188,7 @@ export default {
|
|||||||
operatorType: [{required: true, message: '请选择经营者类型', trigger: 'change'}],
|
operatorType: [{required: true, message: '请选择经营者类型', trigger: 'change'}],
|
||||||
girdCode: [{required: true, message: '请选择所属片区', trigger: 'change'}],
|
girdCode: [{required: true, message: '请选择所属片区', trigger: 'change'}],
|
||||||
fileUrl: [{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.form.areaId = this.$store.state.user.info.areaId
|
||||||
this.$dict.load('sex', 'operatorType')
|
this.$dict.load('sex', 'operatorType')
|
||||||
|
|
||||||
if(this.params.id){
|
if (this.params.id) {
|
||||||
this.getDetail(this.params);
|
this.getDetail(this.params);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -227,23 +230,24 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getDetail({id}){
|
async getDetail({id}) {
|
||||||
try {
|
try {
|
||||||
const {code,data} = await this.instance.post('/app/appshoparchives/queryDetailById',null,{
|
const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
|
||||||
params:{
|
params: {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(code===0){
|
if (code === 0) {
|
||||||
this.form = {...data}
|
this.form = {...data}
|
||||||
}
|
}
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getCheckedTree() {
|
getCheckedTree() {
|
||||||
const nodes = this.$refs.treeRef.getCheckedNodes()
|
const nodes = this.$refs.treeRef.getCheckedNodes()
|
||||||
|
console.log(nodes)
|
||||||
if (!nodes.length) {
|
if (!nodes.length) {
|
||||||
return this.$message.error('请选择网格')
|
return this.$message.error('请选择网格')
|
||||||
}
|
}
|
||||||
@@ -253,6 +257,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.currCheckedKeys = [nodes[0]?.id]
|
this.currCheckedKeys = [nodes[0]?.id]
|
||||||
|
this.form.girdCode = nodes[0]?.girdCode
|
||||||
|
this.form.girdName = nodes[0]?.girdName
|
||||||
this.dialog = false;
|
this.dialog = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -276,10 +282,10 @@ export default {
|
|||||||
|
|
||||||
async addOrUpdate() {
|
async addOrUpdate() {
|
||||||
try {
|
try {
|
||||||
const {code, data} = await this.instance.post(`/app/appshoparchives/addOrUpdate`, null, {
|
const {code, data} = await this.instance.post(`/app/appshoparchives/addOrUpdate`,{
|
||||||
params: {
|
...this.form,
|
||||||
...this.form
|
fileId:this.form.fileUrl[0]?.id,
|
||||||
}
|
fileUrl:this.form.fileUrl[0]?.path,
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.$message.success('保存成功');
|
this.$message.success('保存成功');
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-wrapper>
|
<ai-wrapper>
|
||||||
<ai-info-item label="门店名称" :value="info.applyItemName"></ai-info-item>
|
<ai-info-item label="门店名称" :value="info.shopName"></ai-info-item>
|
||||||
<ai-info-item label="门店地址" :value="info.integralUserName"></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.phone"></ai-info-item>
|
||||||
<ai-info-item label="联系电话" :value="info.areaName"></ai-info-item>
|
<ai-info-item label="联系电话" :value="info.areaName"></ai-info-item>
|
||||||
<ai-info-item label="评价人" :value="info.girdName"></ai-info-item>
|
<ai-info-item label="评价人" :value="info.girdName"></ai-info-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user