feat: 门店档案接口
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
show-checkbox
|
||||
:default-expanded-keys="currCheckedKeys"
|
||||
:default-checked-keys="currCheckedKeys"
|
||||
@check-change="handleCheckChange"
|
||||
@check="onCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
@@ -171,6 +172,7 @@ export default {
|
||||
currCheckedKeys: [],
|
||||
dialog: false,
|
||||
treeList: [],
|
||||
treeArray:[],
|
||||
treeObj: {
|
||||
checkedKeys: [],
|
||||
},
|
||||
@@ -209,6 +211,7 @@ export default {
|
||||
this.treeObj.checkedKeys = [];
|
||||
this.instance.post(`/app/appgirdinfo/listAll3`, null, null).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeArray = res.data
|
||||
this.form.girdInfoList.map((e) => {
|
||||
this.treeObj.checkedKeys.push(e.id);
|
||||
});
|
||||
@@ -238,7 +241,12 @@ export default {
|
||||
}
|
||||
})
|
||||
if (code === 0) {
|
||||
this.form = {...data}
|
||||
this.form = {...data,girdInfoList:[]}
|
||||
this.form.fileUrl = [{
|
||||
url: data.fileUrl
|
||||
}]
|
||||
const target = this.treeArray?.find(v=>v.girdCode === data.girdCode)
|
||||
this.currCheckedKeys = [target.id]
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
@@ -251,18 +259,22 @@ export default {
|
||||
return this.$message.error('请选择网格')
|
||||
}
|
||||
|
||||
if (nodes.length > 1) {
|
||||
return this.$message.error('不支持多选')
|
||||
}
|
||||
|
||||
this.currCheckedKeys = [nodes[0]?.id]
|
||||
this.form.girdCode = nodes[0]?.girdCode
|
||||
this.form.girdName = nodes[0]?.girdName
|
||||
this.dialog = false;
|
||||
},
|
||||
|
||||
onCheckChange(e) {
|
||||
handleCheckChange(data, checked){
|
||||
if (checked) {
|
||||
this.$refs.treeRef.setCheckedKeys([data.id])
|
||||
}
|
||||
},
|
||||
|
||||
onCheckChange(e) {
|
||||
if(e.children && e.children.length>0){
|
||||
this.$refs.treeRef.setCheckedKeys([]);
|
||||
}
|
||||
},
|
||||
|
||||
idChange(val) {
|
||||
|
||||
@@ -7,35 +7,35 @@
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="经营者姓名" isLine :value="form.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="form.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别" :value="form.sex"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="form.phone"></ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="form.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄" :value="form.age"></ai-info-item>
|
||||
<ai-info-item label="经营者姓名:" isLine :value="form.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号:" :value="form.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别:" :value="$dict.getLabel('sex', form.sex)"></ai-info-item>
|
||||
<ai-info-item label="联系电话:" :value="form.phone"></ai-info-item>
|
||||
<ai-info-item label="出生日期:" :value="form.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄:" :value="form.age"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="门店信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="门店名称" isLine :value="form.shopName"></ai-info-item>
|
||||
<ai-info-item label="门店照片" isLine>
|
||||
<ai-wrapper label-width="100px">
|
||||
<ai-info-item label="门店名称:" isLine :value="form.shopName"></ai-info-item>
|
||||
<ai-info-item label="门店照片:" isLine>
|
||||
<div class="files">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
fileType="img"
|
||||
acceptType=".jpg,.png,.jpeg,.JPG,.PNG,.JPEG"
|
||||
v-model="form.fileUrl"
|
||||
:limit="9" :disabled="true">
|
||||
:limit="1" :disabled="true">
|
||||
</ai-uploader>
|
||||
</div>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="经营类型" isLine :value="form.operatorTypes"></ai-info-item>
|
||||
<ai-info-item label="所属片区" isLine :value="form.girdName"></ai-info-item>
|
||||
<ai-info-item label="社会信用代码" isLine :value="form.creditCode"></ai-info-item>
|
||||
<ai-info-item label="门店住址" isLine :value="form.address"></ai-info-item>
|
||||
<ai-info-item label="门店描述" isLine :value="form.description"></ai-info-item>
|
||||
<ai-info-item label="经营类型:" isLine :value="$dict.getLabel('operatorType',form.operatorType)"></ai-info-item>
|
||||
<ai-info-item label="所属片区:" isLine :value="form.girdName"></ai-info-item>
|
||||
<ai-info-item label="社会信用代码:" isLine :value="form.creditCode"></ai-info-item>
|
||||
<ai-info-item label="门店住址:" isLine :value="form.address"></ai-info-item>
|
||||
<ai-info-item label="门店描述:" isLine :value="form.description"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -68,12 +68,15 @@ export default {
|
||||
girdName: '',
|
||||
address: '',
|
||||
description: '',
|
||||
fileUrl:[]
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getDetail()
|
||||
this.$dict.load('sex','operatorType').then(()=>{
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -86,6 +89,9 @@ export default {
|
||||
})
|
||||
if (code === 0) {
|
||||
this.form = {...data}
|
||||
this.form.fileUrl = [{
|
||||
url: data.fileUrl
|
||||
}]
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
@@ -52,13 +52,13 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.createUserName"
|
||||
v-model="search.idNumber"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入身份证、姓名、联系电话"
|
||||
clearable
|
||||
@clear="search.current = 1, search.createUserName = '', getList()"
|
||||
@clear="search.current = 1, search.idNumber = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user