<template>
|
<view class="incom_detail">
|
<u-form
|
ref="form"
|
:model="formRegister"
|
labelWidth="auto"
|
labelPosition="left">
|
<u-form-item
|
label="头像"
|
prop="photoUrl"
|
borderBottom>
|
<u-avatar
|
slot="right"
|
:src="formRegister.photoUrl"
|
shape="square">
|
</u-avatar>
|
</u-form-item>
|
<u-form-item
|
label="姓名"
|
prop="realName"
|
borderBottom>
|
<u-input
|
v-model="formRegister.realName"
|
placeholder="请输入姓名"
|
border="none"
|
disabled
|
disabledColor="#FFFFFF">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="性别"
|
prop="sexValue"
|
borderBottom>
|
<u-input
|
v-model="formRegister.sex"
|
placeholder="请选择性别"
|
disabled
|
disabledColor="#FFFFFF"
|
border="none">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="手机号"
|
prop="phone"
|
borderBottom>
|
<u-input
|
v-model="formRegister.phone"
|
placeholder="请输入手机号"
|
border="none"
|
disabled
|
disabledColor="#FFFFFF">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="身份证号"
|
prop="idNo"
|
borderBottom>
|
<u-input
|
v-model="formRegister.idNo"
|
placeholder="请输入身份证号"
|
border="none"
|
disabled
|
disabledColor="#FFFFFF">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="分公司"
|
prop="companyIdValue"
|
borderBottom>
|
<u-input
|
v-model="formRegister.companyName"
|
placeholder="请选择分公司"
|
disabled
|
disabledColor="#FFFFFF"
|
border="none">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="岗位"
|
prop="posIdValue"
|
borderBottom>
|
<u-input
|
v-model="formRegister.posName"
|
placeholder="请选择岗位"
|
disabled
|
disabledColor="#FFFFFF"
|
border="none">
|
</u-input>
|
</u-form-item>
|
<u-form-item
|
label="备注"
|
borderBottom>
|
<u-input
|
v-model="formRegister.remark"
|
placeholder="请输入备注"
|
border="none"
|
disabled
|
disabledColor="#FFFFFF">
|
</u-input>
|
</u-form-item>
|
</u-form>
|
<view class="flow_content">
|
<view class="flow_content_title">
|
<u-icon
|
name="clock"
|
color="#1976FF"
|
size="22"
|
space="6"
|
label="流程记录"
|
labelColor="#333333"
|
labelSize="18px">
|
</u-icon>
|
</view>
|
<view
|
v-for="(item, index) in applyRecord"
|
:key="index"
|
class="flow_content_info">
|
<view class="info_item">
|
<text>{{item.realName}}</text>
|
<text>{{item.createTime}}</text>
|
</view>
|
<view class="info_item">
|
<u-text
|
suffixIcon="arrow-right"
|
iconStyle="font-size: 18px"
|
size="18px"
|
color="#1976FF"
|
:text="item.processName">
|
</u-text>
|
</view>
|
</view>
|
</view>
|
<view class="flow_textarea" v-if="![1, 2, null].includes(formRegister.applyFlag)">
|
<u-textarea
|
v-model="applyDesc"
|
placeholder="请输入"
|
count
|
maxlength="200">
|
</u-textarea>
|
<view style="margin: 10px 0;" @click="propDepart()">
|
<u-input
|
v-model="departName"
|
placeholder="请选择部门"
|
disabled
|
disabledColor="#FFFFFF">
|
</u-input>
|
</view>
|
</view>
|
<view class="flow_button" v-if="![1, 2, null].includes(formRegister.applyFlag)">
|
<u-button type="primary" :plain="true" text="不通过" @click="submitCheck(2)"></u-button>
|
<u-button type="primary" color="#1976FF" text="通过" @click="submitCheck(1)"></u-button>
|
</view>
|
<view class="flow_buttons" v-else>
|
<u-button type="primary" color="#1976FF" text="返回" @click="navigetBack()"></u-button>
|
</view>
|
<u-picker
|
:show="showDepart"
|
:columns="departData"
|
keyName="departName"
|
@cancel="showDepart = false"
|
@confirm="changeDepartment">
|
</u-picker>
|
</view>
|
</template>
|
|
<script>
|
import { throttle } from '../../plugins/public';
|
export default {
|
data() {
|
return {
|
formRegister: {
|
photoUrl: ''
|
},
|
applyRecord: [],
|
applyDesc: '',
|
departId: '',
|
departName: '',
|
departData: [],
|
showDepart: false,
|
}
|
},
|
onLoad(option) {
|
this.getAllDepartmentData();
|
console.log(option,'--');
|
this.$api.reboSystem.getPlatUserapplyDetail({
|
userId: option.userId
|
}).then((res) => {
|
if(res.success) {
|
this.applyRecord = res.data.applyRecord;
|
this.formRegister = res.data.reginfo;
|
this.$set(this.formRegister, 'photoUrl', res.data.reginfo.photoUrl ?
|
`https://szpipe.thhy-tj.com/${res.data.reginfo.photoUrl}` : '');
|
this.$set(this.formRegister, 'sex', res.data.reginfo.sex == 0 ? '男' : '女');
|
}
|
})
|
},
|
methods: {
|
// 获取部门信息
|
async getAllDepartmentData() {
|
const { data } = await this.$api.system.getAllDepartmentData();
|
this.departData = [data];
|
},
|
// 打开选择部门
|
propDepart() {
|
this.showDepart = true;
|
this.departId = '';
|
this.departName = '';
|
},
|
// 选择部门信息
|
changeDepartment({ value }) {
|
this.departId = value[0].departId;
|
this.departName = value[0].departName;
|
this.showDepart = false;
|
},
|
// 审核入厂信息
|
submitCheck: throttle(function(number) {
|
this.$api.reboSystem.checkPlatUserInfo({
|
userId: this.formRegister.userId,
|
applyResult: number,
|
departId: this.departId,
|
applyDesc: this.applyDesc
|
}).then((res) => {
|
if(res.success) {
|
uni.$u.toast('审核完成');
|
setTimeout(() => {
|
uni.navigateBack();
|
}, 1000)
|
} else {
|
uni.$u.toast(res.statusMsg);
|
}
|
})
|
}, 3000),
|
// 返回
|
navigetBack() {
|
uni.navigateBack();
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.incom_detail {
|
position: relative;
|
padding: 0 10px;
|
|
.flow_content {
|
margin-top: 20px;
|
background: #E8F1FF;
|
border-radius: 4px;
|
|
.flow_content_title {
|
padding: 15px 10px 10px;
|
border-bottom: 1px solid #DBDDDF;
|
}
|
|
.flow_content_info {
|
display: flex;
|
padding: 15px 10px;
|
|
.info_item {
|
display: flex;
|
|
&:first-child {
|
flex: 2;
|
flex-direction: column;
|
|
&>text {
|
margin: 2px 0;
|
}
|
}
|
|
&:last-child {
|
justify-content: center;
|
}
|
}
|
}
|
}
|
|
.flow_textarea {
|
margin: 10px 0;
|
|
/deep/ .u-input__content__field-wrapper__field {
|
text-align: left !important;
|
}
|
}
|
|
.flow_button {
|
display: flex;
|
justify-content: space-between;
|
padding-bottom: 24px;
|
|
/deep/ .u-button--plain {
|
width: 48%;
|
}
|
|
/deep/ .u-button--square {
|
width: 48%;
|
}
|
}
|
|
.flow_buttons {
|
padding-bottom: 24px;
|
margin-top: 10px;
|
}
|
}
|
|
::v-deep .u-input__content__field-wrapper__field {
|
text-align: right !important;
|
}
|
</style>
|