feat: 档案详情

This commit is contained in:
wanglei
2024-06-25 11:23:15 +08:00
parent 2143da5dce
commit 8279b89ff5
2 changed files with 44 additions and 102 deletions

View File

@@ -185,9 +185,27 @@ export default {
created() { created() {
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){
this.getDetail(this.params);
}
}, },
methods: { methods: {
async getDetail({id}){
try {
const {code,data} = await this.instance.post('/app/appshoparchives/queryDetailById',null,{
params:{
id
}
})
if(code===0){
this.form = {...data}
}
}catch (e) {
console.error(e)
}
},
async handleSelectGrid() { async handleSelectGrid() {
try { try {
this.dialog = true this.dialog = true

View File

@@ -7,35 +7,35 @@
<ai-card title="基本信息"> <ai-card title="基本信息">
<template #content> <template #content>
<ai-wrapper> <ai-wrapper>
<ai-info-item label="经营者姓名" isLine :value="info.applyItemName"></ai-info-item> <ai-info-item label="经营者姓名" isLine :value="form.name"></ai-info-item>
<ai-info-item label="身份证号" :value="info.integralUserName"></ai-info-item> <ai-info-item label="身份证号" :value="form.idNumber"></ai-info-item>
<ai-info-item label="性别" :value="info.phone"></ai-info-item> <ai-info-item label="性别" :value="form.sex"></ai-info-item>
<ai-info-item label="联系电话" :value="info.areaName"></ai-info-item> <ai-info-item label="联系电话" :value="form.phone"></ai-info-item>
<ai-info-item label="出生日期" :value="info.girdName"></ai-info-item> <ai-info-item label="出生日期" :value="form.birthday"></ai-info-item>
<ai-info-item label="年龄" v-if="info.status === '1'" :value="info.auditTime"></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>
<ai-info-item label="门店名称" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="门店名称" isLine :value="form.shopName"></ai-info-item>
<ai-info-item label="门店照片" isLine v-if="info.images && info.images.length"> <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="info.images" v-model="form.fileUrl"
:limit="9" :disabled="true"> :limit="9" :disabled="true">
</ai-uploader> </ai-uploader>
</div> </div>
</ai-info-item> </ai-info-item>
<ai-info-item label="经营类型" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="经营类型" isLine :value="form.operatorTypes"></ai-info-item>
<ai-info-item label="所属片区" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="所属片区" isLine :value="form.girdName"></ai-info-item>
<ai-info-item label="社会信用代码" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="社会信用代码" isLine :value="form.creditCode"></ai-info-item>
<ai-info-item label="门店住址" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="门店住址" isLine :value="form.address"></ai-info-item>
<ai-info-item label="门店描述" isLine :value="info.applyIntegral"></ai-info-item> <ai-info-item label="门店描述" isLine :value="form.description"></ai-info-item>
</ai-wrapper> </ai-wrapper>
</template> </template>
</ai-card> </ai-card>
@@ -55,107 +55,31 @@ export default {
data() { data() {
return { return {
info: {},
form: { form: {
auditDesc: '',
auditStatus: ''
}, },
eventForm: {
files: null,
images: [],
videos: [],
content: '',
applyIntegral: ''
},
isShowEvent: false,
isShow: false
} }
}, },
created() { created() {
this.getInfo() this.getDetail()
}, },
methods: { methods: {
getInfo() { async getDetail() {
this.instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.params.id}`).then(res => { try {
if (res.code == 0) { const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
if (res.data) { params: {
this.info = { id: this.parmas.id
...res.data,
files: res.data.files.map(v => {
return {
...v,
postfix: v.postfix.toLowerCase()
}
})
}
if (res.data.status === '0') {
this.eventForm.files = res.data.files
this.eventForm.content = res.data.content
this.eventForm.applyIntegral = res.data.applyIntegral
}
this.info.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png', 'JPG', 'JPEG', 'PNG'].includes(e.postfix.split('.')[1])))
this.info.videos = res.data.files.filter(e => (['mp4', 'MP4', 'MOV'].includes(e.postfix.split('.')[1])))
} }
})
if(code===0){
this.form = {...data}
} }
}) } catch (e) {
}, console.error(e)
showEvent() {
this.eventForm.files = null
this.eventForm.content = this.info.content
this.eventForm.applyIntegral = this.info.applyIntegral
this.eventForm.images = this.info.images
this.eventForm.videos = this.info.videos
this.isShowEvent = true
},
onClose() {
this.form.auditDesc = ''
this.form.auditStatus = ''
},
onEventConfirm() {
if ((this.eventForm.images.length + this.eventForm.videos.length) > 9) {
return this.$message.error('图片和视频不得超过9个')
} else {
this.eventForm.files = [...this.eventForm.images, ...this.eventForm.videos]
} }
this.$refs.eventForm.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegraluserapply/updateByGirdMember`, {
...this.eventForm,
id: this.params.id,
}).then(res => {
if (res.code == 0) {
this.$message.success('编辑成功!')
this.isShowEvent = false
this.getInfo()
}
})
}
})
}, },
onConfirm() {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegraluserapply/auditById`, {
...this.form,
id: this.params.id
}).then(res => {
if (res.code == 0) {
this.$message.success('审核成功!')
this.isShow = false
this.getInfo()
}
})
}
})
},
cancel() { cancel() {
this.$emit('change', { this.$emit('change', {
type: 'List', type: 'List',