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