From 3c738f4fe2762bba8087e5a22fc0dc06560eab0e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 08 Aug 2024 10:01:17 +0800
Subject: [PATCH] 三色任务与自查任务

---
 subPackage/workbench/views/examine.vue |  200 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 192 insertions(+), 8 deletions(-)

diff --git a/subPackage/workbench/views/examine.vue b/subPackage/workbench/views/examine.vue
index 6d9fd8e..0de0151 100644
--- a/subPackage/workbench/views/examine.vue
+++ b/subPackage/workbench/views/examine.vue
@@ -25,7 +25,13 @@
 				</view>
 			</view>
 		</view>
-		<view class="personnel">
+		<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">
@@ -39,12 +45,58 @@
 							<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>现居住地</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>
@@ -100,11 +152,16 @@
 	import lineItem from '../components/lineItem.vue'
 	import {
 		checkPlaceExtData,
-		getPlaceDetail
+		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,
@@ -166,7 +223,42 @@
 				defaultPlaceholder: '待审核',
 				isShowModal: false,
 				confirmFlag: 1,
-				confirmNotion: ""
+				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) {
@@ -178,11 +270,30 @@
 				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,
@@ -202,6 +313,7 @@
 				// })
 
 				this.form.confirmFlag = data.confirmFlag;
+				this.currentData.id = data.id;
 				this.confirmFlag = data.confirmFlag;
 				this.confirmNotion = data.confirmNotion;
 				if (data.imageUrls) {
@@ -212,15 +324,45 @@
 				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
-				this.placePersonList = data.placePractitioner
+				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 = {
@@ -231,6 +373,7 @@
 				if (this.form.confirmNotion) {
 					data.confirmNotion = this.form.confirmNotion;
 				}
+				console.log("********2222******" + JSON.stringify(data))
 
 				const res = await checkPlaceExtData(data)
 				if (res.code !== 200) {
@@ -252,6 +395,38 @@
 					}
 				})
 			},
+
+			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];
@@ -270,7 +445,11 @@
 				if (type == 3) {
 					this.isShowModal = true;
 				} else {
-					this.checkPlaceExt()
+					if (this.type == 2) {
+						this.checkPlaceExt()
+					} else {
+						this.checkPlacePeople()
+					}
 				}
 			},
 			findObjValue(value, obj) {
@@ -289,7 +468,12 @@
 					return
 				}
 				this.form.confirmFlag = 3
-				this.checkPlaceExt()
+				if (this.type == 2) {
+					this.checkPlaceExt()
+				} else {
+					this.checkPlacePeople()
+				}
+
 			}
 
 

--
Gitblit v1.9.3