<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="f-30" v-if="!imageObj.imageUrls.length">未完善</view>
|
<view class="images-box" v-for="(i,k) in imageObj.imageUrls" :key="k" v-if="imageObj.imageUrls.length">
|
<u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.imageUrls)"></u-image>
|
</view>
|
</view>
|
</view>
|
<view class="planegraph">
|
<box-title title="场所平面图" class="box-title"></box-title>
|
<view class="info">
|
<view class="f-30" v-if="!imageObj.planImageUrls.length">未完善</view>
|
<view class="images-box" v-for="(i,k) in imageObj.planImageUrls" :key="k"
|
v-if="imageObj.planImageUrls.length">
|
<u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.planImageUrls)"></u-image>
|
</view>
|
</view>
|
</view>
|
<view class="personnel bgc-ff">
|
<box-title title="房东信息" class="box-title"></box-title>
|
<view class="info">
|
<lineItem :dataInfo="landlordData"></lineItem>
|
</view>
|
</view>
|
<view class="personnel" v-if="type == 1">
|
<box-title title="从业人员" class="box-title"></box-title>
|
<view class="info">
|
<view class="f-30" v-if="!placePersonList.length">
|
未完善
|
</view>
|
<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.gender || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>民族</text>
|
<text>{{ item.ethnicity || '未完善' }}</text>
|
</view>
|
|
<view class="content">
|
<text>身份证号</text>
|
<text>{{ item.idCard || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>电话号码</text>
|
<text>{{ item.telephone || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>现居住地</text>
|
<text>{{ item.tempAddress || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>岗位</text>
|
<text>{{ item.jobNature || '未完善' }}</text>
|
</view>
|
|
<!-- <view class="content">
|
<text>户籍地址</text>
|
<text>{{ item.registeredAddress || '未完善' }}</text>
|
</view> -->
|
|
<!-- <view class="content">
|
<text>入职时间</text>
|
<text>{{ item.registeredAddress || '未完善' }}</text>
|
</view>
|
<view class="content">
|
<text>离职时间</text>
|
<text>{{ item.registeredAddress || '未完善' }}</text>
|
</view> -->
|
|
<view class="content" v-if="!item.employerImg.length">
|
<text>从业人员照片</text>
|
<text>未完善</text>
|
</view>
|
|
<view v-if="item.employerImg.length" class="mt-20" style="margin-left:10rpx;">
|
<view class="f-28">
|
从业人员照片
|
</view>
|
<view class="images-box" v-for="(i,k) in item.employerImg" :key="k"
|
@click="preViewImg(i,item.employerImg)">
|
<u-image width="80" height="80" :src="i"></u-image>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="examine" v-if="confirmNotion">
|
<box-title title="备注" class="box-title"></box-title>
|
<view class="row f-30">
|
{{confirmNotion}}
|
</view>
|
<!-- <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="defaultPlaceholder" disabled disabledColor="#ffffff"
|
border="none" inputAlign="right"></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="confirmNotion" inputAlign="right" border="none"></u--input>
|
</u-form-item>
|
</u-form>
|
</view> -->
|
</view>
|
|
<!-- <view class="bottom-btn">
|
<u-button type="primary" @click="submit">提交审核</u-button>
|
</view> -->
|
<footer-btn @click="submit" v-if="confirmFlag == 3" text="通过" />
|
<view class="footer flex a-i-c j-c-s-b" v-if="confirmFlag == 1">
|
<button class="footer-btn" @click="submit(2)">通过</button>
|
<button class="footer-btn" @click="submit(3)">驳回</button>
|
</view>
|
|
|
<u-modal :show="isShowModal" title="备注" :showConfirmButton="false">
|
<view class="modal-content">
|
<u-textarea v-model="form.confirmNotion" placeholder="请输入驳回原因"></u-textarea>
|
<view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
|
<button class="modal-btn-item c-main f-30" @click="isShowModal = false">取消</button>
|
<button class="modal-btn-item bgc-main f-30 c-ff" @click="rejectSubmit">确定</button>
|
</view>
|
</view>
|
</u-modal>
|
|
<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,
|
auditPlacePeople
|
} from '@/api/placeExp/placeExp.js'
|
import {
|
minioBaseUrl
|
} from "@/common/setting.js"
|
import {
|
bizDictionary,
|
bizDictionaryTree
|
} from '@/api/system/dict.js'
|
export default {
|
components: {
|
boxTitle,
|
lineItem
|
},
|
data() {
|
return {
|
basicData: [{
|
label: '场所名称',
|
name: "placeName",
|
value: '未完善'
|
},
|
{
|
label: '法人信息',
|
name: 'legalPerson',
|
value: '未完善'
|
},
|
{
|
label: '法人电话',
|
name: 'legalTel',
|
value: '未完善'
|
},
|
{
|
label: '场所位置',
|
name: 'location',
|
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: '待审核',
|
isShowModal: false,
|
confirmFlag: 1,
|
confirmNotion: "",
|
nationTypeList: [],
|
nationValue: "",
|
gender: [{ //性别
|
value: 1,
|
name: '男',
|
},
|
{
|
value: 0,
|
name: '女',
|
}
|
],
|
genderValue: "",
|
landlordData: [{
|
label: '姓名',
|
name: "landlordName",
|
value: '未完善'
|
},
|
{
|
label: '手机号',
|
name: "landlordPhone",
|
value: '未完善'
|
},
|
{
|
label: '身份证号',
|
name: "landlordIdCard",
|
value: '未完善'
|
},
|
{
|
label: '微信号',
|
name: "landlordWxAccount",
|
value: '未完善'
|
},
|
],
|
|
type: 1 //1从业人员 、2场所
|
}
|
},
|
onLoad(option) {
|
const {
|
placeId,
|
id
|
} = option
|
this.currentData = {
|
placeId,
|
id
|
}
|
if (option.type) {
|
this.type = option.type;
|
}
|
},
|
onShow() {
|
this.setDefaultValue()
|
},
|
methods: {
|
// 获取业务字典
|
getBizDict(callback) {
|
bizDictionary({
|
code: "nationType"
|
}).then(res => {
|
let list = []
|
res.data.forEach(e => {
|
list.push({
|
name: e.dictValue,
|
value: Number(e.dictKey)
|
})
|
})
|
callback(list);
|
})
|
},
|
|
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.form.confirmFlag = data.confirmFlag;
|
this.currentData.id = data.id;
|
this.confirmFlag = data.confirmFlag;
|
this.confirmNotion = data.confirmNotion;
|
if (data.imageUrls) {
|
// let urls = data.imageUrls.split(",");
|
// this.imageObj.imageUrls = `${minioBaseUrl}${data.imageUrls}`
|
this.imageObj.imageUrls = this.$setImageUrl(data.imageUrls)
|
}
|
if (data.planImageUrls) {
|
this.imageObj.planImageUrls = this.$setImageUrl(data.planImageUrls)
|
}
|
this.basicData.forEach(item => {
|
item.value = data[item.name] || '未完善'
|
})
|
this.landlordData.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
|
let placePractitioner = data.placePractitioner;
|
for (let i of placePractitioner) {
|
i.employerImg = this.$setImageUrl(i.employerImg)
|
if (i.gender) {
|
let {
|
index,
|
name
|
} = this.$getIndex(this.gender, i.gender, "value",
|
"name");
|
i.gender = name;
|
}
|
|
if (i.ethnicity) {
|
this.getBizDict(resp => {
|
let {
|
index,
|
name
|
} = this.$getIndex(resp, i.ethnicity, "value",
|
"name");
|
i.ethnicity = name;
|
})
|
}
|
if (this.type) {
|
this.confirmFlag = i.confirmFlag;
|
}
|
}
|
this.placePersonList = placePractitioner
|
|
|
},
|
async checkPlaceExt() {
|
let data = {
|
id: this.currentData.id,
|
confirmFlag: this.form.confirmFlag
|
}
|
|
if (this.form.confirmNotion) {
|
data.confirmNotion = this.form.confirmNotion;
|
}
|
console.log("********2222******" + JSON.stringify(data))
|
|
const res = await checkPlaceExtData(data)
|
if (res.code !== 200) {
|
uni.showToast({
|
title: '更新失败',
|
icon: 'error'
|
})
|
return
|
}
|
this.isShowModal = false;
|
uni.showToast({
|
title: '审核成功',
|
icon: 'success',
|
duration: 1500,
|
complete() {
|
setTimeout(() => {
|
uni.navigateBack()
|
}, 1000)
|
}
|
})
|
},
|
|
async checkPlacePeople() {
|
let data = {
|
placeId: this.currentData.placeId,
|
confirmFlag: this.form.confirmFlag
|
}
|
if (this.form.confirmNotion) {
|
data.confirmNotion = this.form.confirmNotion;
|
}
|
const res = await auditPlacePeople(data)
|
if (res.code !== 200) {
|
uni.showToast({
|
title: '更新失败',
|
icon: 'error'
|
})
|
return
|
}
|
this.isShowModal = false;
|
uni.showToast({
|
title: '审核成功',
|
icon: 'success',
|
duration: 1500,
|
complete() {
|
setTimeout(() => {
|
uni.navigateBack()
|
}, 1000)
|
}
|
})
|
},
|
|
|
|
handleConfirm(e) {
|
console.log(e);
|
this.defaultColumns = e.indexs[0];
|
this.defaultPlaceholder = e.value[0].name
|
this.form.confirmFlag = e.value[0].status
|
this.isPickerShow = false
|
},
|
preViewImg(current, urls) {
|
uni.previewImage({
|
current,
|
urls
|
})
|
},
|
submit(type) {
|
this.form.confirmFlag = type;
|
if (type == 3) {
|
this.isShowModal = true;
|
} else {
|
if (this.type == 2) {
|
this.checkPlaceExt()
|
} else {
|
this.checkPlacePeople()
|
}
|
}
|
},
|
findObjValue(value, obj) {
|
const res = obj.find(item => {
|
return item.name == value
|
})
|
return res
|
},
|
|
rejectSubmit() {
|
if (!this.form.confirmNotion) {
|
uni.showToast({
|
title: "请输入驳回原因",
|
icon: "none"
|
})
|
return
|
}
|
this.form.confirmFlag = 3
|
if (this.type == 2) {
|
this.checkPlaceExt()
|
} else {
|
this.checkPlacePeople()
|
}
|
|
}
|
|
|
}
|
}
|
</script>
|
|
<style>
|
page {
|
background-color: #f5f5f5;
|
}
|
</style>
|
<style lang="scss" scoped>
|
.container {
|
padding-bottom: 130rpx;
|
padding: 20rpx 30rpx;
|
padding-bottom: 140rpx;
|
|
.basic,
|
.licence,
|
.planegraph,
|
.personnel,
|
.examine {
|
background-color: #fff;
|
padding: 30rpx;
|
margin-top: 20rpx;
|
border-radius: 8rpx;
|
}
|
|
.box-title {
|
margin-bottom: 15rpx;
|
}
|
|
.info {
|
background-color: #fff;
|
|
.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;
|
}
|
}
|
}
|
|
.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;
|
// }
|
/deep/ .u-form {
|
background-color: #fff;
|
|
.u-form-item {
|
padding: 0 20rpx;
|
border-bottom: 1rpx solid #f6f6ff;
|
|
&:last-child {
|
border: 0;
|
}
|
}
|
}
|
|
.footer {
|
width: 100%;
|
padding: 20rpx 30rpx;
|
box-sizing: border-box;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
background-color: #fff;
|
z-index: 10;
|
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
z-index: 999;
|
background-color: #fff;
|
box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
|
|
.footer-btn {
|
width: 300rpx;
|
height: 78rpx;
|
border-radius: 8rpx;
|
font-size: 32rpx;
|
color: #fff;
|
border: none;
|
background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
|
}
|
|
.footer-btn:after {
|
border: none;
|
}
|
|
}
|
|
.modal-content {
|
width: 100%;
|
|
.modal-btn {
|
width: 100%;
|
padding: 40rpx 0 0;
|
|
.modal-btn-item {
|
width: 240rpx;
|
height: 74rpx;
|
line-height: 74rpx;
|
border-radius: 35rpx;
|
border: none;
|
padding: 0;
|
margin: 0;
|
}
|
|
.modal-btn-item:first-child {
|
border: 1px solid currentColor;
|
background: transparent;
|
}
|
|
}
|
}
|
|
/deep/ .u-modal__content {
|
padding-bottom: 20rpx !important;
|
}
|
|
.row {
|
padding: 20rpx;
|
}
|
</style>
|