<template>
|
<view class="container">
|
<view class="basic">
|
<box-title title="基本信息" class="box-title"></box-title>
|
<view class="info">
|
<lineItem :dataInfo="basicData"></lineItem>
|
</view>
|
</view>
|
<view class="licence">
|
<box-title title="营业执照" class="box-title"></box-title>
|
<view class="info">
|
<view class="images-box">
|
<u-image v-if="imageObj.imageUrls" width="80" height="80" :src="imageObj.imageUrls"
|
@click="preViewImg(imageObj.imageUrls)"></u-image>
|
</view>
|
</view>
|
</view>
|
<view class="planegraph">
|
<box-title title="场所平面图" class="box-title"></box-title>
|
<view class="info">
|
<view class="images-box">
|
<u-image v-if="imageObj.planImageUrl" width="80" height="80" :src="imageObj.planImageUrls"
|
@click="preViewImg(imageObj.planImageUrl)"></u-image>
|
</view>
|
</view>
|
</view>
|
<view class="personnel">
|
<box-title title="从业人员" class="box-title"></box-title>
|
<view class="info">
|
<view class="person-box" v-for="(item, index) in placePersonList" :key="item.id">
|
<view class="title">人员信息-#{{ index + 1 }}</view>
|
<view class="info-box">
|
<view class="content">
|
<text>姓名</text>
|
<text>{{ item.name || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>电话号码</text>
|
<text>{{ item.telephone || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>暂住地</text>
|
<text>{{ item.tempAddress || '未完善' }}</text>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="examine">
|
<box-title title="审核信息" class="box-title"></box-title>
|
<view class="info">
|
<u-form labelWidth="70" :model="form" ref="form" class="form">
|
<u-form-item label="审核状态" @click="isPickerShow = true" class="form-item">
|
<u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
|
border="none" :placeholder="this.defaultPlaceholder"></u--input>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
</u-form-item>
|
<u-form-item label="备注" class="form-item">
|
<u--input v-model="form.confirmNotion" border="none"></u--input>
|
</u-form-item>
|
</u-form>
|
</view>
|
</view>
|
<view class="bottom-btn">
|
<u-button type="primary" @click="submit">提交审核</u-button>
|
</view>
|
<u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false"
|
:show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false"
|
@confirm="handleConfirm"></u-picker>
|
</view>
|
</template>
|
|
<script>
|
import boxTitle from "@/subPackage/workbench/components/boxTitle/index.vue"
|
import lineItem from '../components/lineItem.vue'
|
import {
|
checkPlaceExtData,
|
getPlaceDetail
|
} from '@/api/placeExp/placeExp.js'
|
export default {
|
components: {
|
boxTitle,
|
lineItem
|
},
|
data() {
|
return {
|
basicData: [{
|
label: '场所名称',
|
name: "placeName",
|
value: '未完善'
|
},
|
{
|
label: '法人信息',
|
name: 'legalPerson',
|
value: '未完善'
|
},
|
{
|
label: '法人电话',
|
name: 'legalTel',
|
value: '未完善'
|
},
|
{
|
label: '场所位置',
|
name: 'localtion',
|
value: '未完善'
|
},
|
],
|
placePersonList: [],
|
form: {
|
confirmFlag: '',
|
confirmNotion: ''
|
},
|
imageObj: {
|
imageUrls: '',
|
planImageUrls: ''
|
},
|
isPickerShow: false,
|
columns: [
|
[{
|
name: "待审核",
|
status: 1
|
},
|
{
|
name: "审核通过",
|
status: 2
|
},
|
{
|
name: "审核不通过",
|
status: 3
|
},
|
]
|
],
|
currentData: {
|
placeId: '',
|
id: ''
|
},
|
defaultColumns: 0,
|
defaultPlaceholder: ''
|
}
|
},
|
onLoad(option) {
|
const {
|
placeId,
|
id
|
} = option
|
this.currentData = {
|
placeId,
|
id
|
}
|
},
|
onShow() {
|
this.setDefaultValue()
|
},
|
methods: {
|
async setDefaultValue() {
|
const {
|
code,
|
data
|
} = await getPlaceDetail({
|
placeId: this.currentData.placeId
|
})
|
if (code !== 200) {
|
uni.showToast({
|
title: '数据请求失败',
|
icon: "error"
|
})
|
return
|
}
|
Object.keys(this.imageObj).forEach(key => {
|
this.imageObj[key] = data[key]
|
})
|
this.basicData.forEach(item => {
|
item.value = data[item.name] || '未完善'
|
})
|
console.log(data);
|
let columns = this.columns[0]
|
this.defaultColumns = columns.findIndex(item => item.status == data.confirmFlag)
|
this.defaultPlaceholder = columns[this.defaultColumns].name
|
this.placePersonList = data.placePractitioner
|
},
|
async checkPlaceExt(data) {
|
const res = await checkPlaceExtData(data)
|
if (res.code !== 200) {
|
uni.showToast({
|
title: '更新失败',
|
icon: 'error'
|
})
|
return
|
}
|
uni.showToast({
|
title: '审核成功',
|
icon: 'success',
|
duration: 1500,
|
complete() {
|
setTimeout(() => {
|
uni.navigateBack()
|
}, 1500)
|
}
|
})
|
},
|
handleConfirm(e) {
|
this.form.confirmFlag = e.value[0].name
|
this.isPickerShow = false
|
},
|
preViewImg(url) {
|
uni.previewImage({
|
urls: [url], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
|
})
|
},
|
submit() {
|
const {
|
confirmFlag,
|
confirmNotion
|
} = this.form
|
let data = {
|
id: this.currentData.id,
|
confirmFlag: this.findObjValue(confirmFlag, this.columns[0]).status
|
}
|
confirmNotion && Object.assign(data, {
|
confirmNotion
|
})
|
this.checkPlaceExt(data)
|
},
|
findObjValue(value, obj) {
|
const res = obj.find(item => {
|
return item.name == value
|
})
|
return res
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
page {
|
background-color: #f6f6f6;
|
}
|
|
.container {
|
padding-bottom: 130rpx;
|
|
.box-title {
|
margin-bottom: 15rpx;
|
}
|
|
.info {
|
.title {
|
font-size: 30rpx;
|
padding-left: 10rpx;
|
}
|
|
.images-box {
|
padding: 20rpx;
|
min-height: 100rpx;
|
background-color: #fff;
|
}
|
|
.info-box {
|
.content {
|
font-size: 30rpx;
|
border-bottom: 1rpx solid #f6f6f6;
|
display: flex;
|
justify-content: space-between;
|
background-color: #fff;
|
padding: 20rpx;
|
}
|
}
|
}
|
|
.form {
|
background-color: #fff;
|
|
.form-item {
|
padding: 0 20rpx;
|
|
&:first-child {
|
border-bottom: 1rpx solid #f6f6ff;
|
}
|
}
|
}
|
|
.bottom-btn {
|
position: fixed;
|
left: 0;
|
bottom: 0;
|
padding: 20rpx;
|
width: calc(100% - 40rpx);
|
background-color: #fff;
|
z-index: 9999;
|
}
|
}
|
|
/deep/ .u-form-item__body__left__content__label,
|
/deep/ .uni-input-placeholder {
|
font-size: 30rpx;
|
}
|
</style>
|