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() {
this.form.areaId = this.$store.state.user.info.areaId
this.$dict.load('sex', 'operatorType')
if(this.params.id){
this.getDetail(this.params);
}
},
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() {
try {
this.dialog = true

View File

@@ -7,35 +7,35 @@
<ai-card title="基本信息">
<template #content>
<ai-wrapper>
<ai-info-item label="经营者姓名" isLine :value="info.applyItemName"></ai-info-item>
<ai-info-item label="身份证号" :value="info.integralUserName"></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>
<ai-info-item label="年龄" v-if="info.status === '1'" :value="info.auditTime"></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.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="info.applyIntegral"></ai-info-item>
<ai-info-item label="门店照片" isLine v-if="info.images && info.images.length">
<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="info.images"
v-model="form.fileUrl"
:limit="9" :disabled="true">
</ai-uploader>
</div>
</ai-info-item>
<ai-info-item label="经营类型" isLine :value="info.applyIntegral"></ai-info-item>
<ai-info-item label="所属片区" isLine :value="info.applyIntegral"></ai-info-item>
<ai-info-item label="社会信用代码" isLine :value="info.applyIntegral"></ai-info-item>
<ai-info-item label="门店住址" isLine :value="info.applyIntegral"></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="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>
@@ -55,107 +55,31 @@ export default {
data() {
return {
info: {},
form: {
auditDesc: '',
auditStatus: ''
},
eventForm: {
files: null,
images: [],
videos: [],
content: '',
applyIntegral: ''
},
isShowEvent: false,
isShow: false
}
},
created() {
this.getInfo()
this.getDetail()
},
methods: {
getInfo() {
this.instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.params.id}`).then(res => {
if (res.code == 0) {
if (res.data) {
this.info = {
...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])))
async getDetail() {
try {
const {code, data} = await this.instance.post('/app/appshoparchives/queryDetailById', null, {
params: {
id: this.parmas.id
}
})
if(code===0){
this.form = {...data}
}
})
},
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]
} catch (e) {
console.error(e)
}
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() {
this.$emit('change', {
type: 'List',