瀏覽代碼

转正申请

sunlupeng 1 年之前
父節點
當前提交
47c6b68e84

+ 96 - 0
api/oa/conversion.js

@@ -0,0 +1,96 @@
+import request from '@/utils/request'
+
+// 创建流程
+export function create(data) {
+    return request({
+      url: '/bpm/oa-conversion/commit',
+      method: 'post',
+      data: data
+    })
+  }
+  //驳回或撤回后再次提交通用用事项审批流程信息
+  export function reCommit(data) {
+    return request({
+      url: '/bpm/oa-conversion/reCommit',
+      method: 'post',
+      data: data
+    })
+  }
+  // 暂存数据保存
+  export function save(data) {
+    return request({
+      url: '/bpm/oa-conversion/staging',
+      method: 'post',
+      data: data
+    })
+  }
+  // 暂存数据删除
+  export function deleteById(id) {
+    return request({
+      url: 'bpm/oa-conversion/delete?id=' + id,
+      method: 'delete'
+    })
+  }
+  
+  // 关闭审批流程信息
+  export function closeById(id) {
+    return request({
+      url: '/bpm/oa-conversion/close?id=' + id,
+      method: 'delete'
+    })
+  }
+  
+  // 获得详情
+  export function getDetail(id) {
+    return request({
+      url: '/bpm/oa-conversion/get?id=' + id,
+      method: 'get'
+    })
+  }
+  
+  // 获得列表
+  export function getListData(query) {
+    return request({
+      url: '/bpm/oa-conversion/page',
+      method: 'get',
+      params: query
+    })
+  }
+  // 导出列表
+  export function exportList(query) {
+    return request({
+      url: '/bpm/oa-conversion/export-excel',
+      method: 'get',
+      params: query,
+      responseType: 'blob'
+    })
+  }
+  
+  //审批同意通用事项审批流程信息
+  export function agree(data) {
+    return request({
+      url: '/bpm/oa-conversion/agree',
+      method: 'post',
+      data: data
+    })
+  }
+  
+  //驳回通用事项审批流程信息
+  export function disagree(data) {
+    return request({
+      url: '/bpm/oa-conversion/disagree',
+      method: 'post',
+      data: data
+    })
+  }
+  
+  //撤回通用事项审批流程信息
+  export function revocation(data) {
+    return request({
+      url: '/bpm/oa-conversion/revocation',
+      method: 'post',
+      data: data
+    })
+  }
+  
+  

+ 5 - 0
pages.json

@@ -81,6 +81,11 @@
     "style": {
       "navigationBarTitleText": "入职审批"
     }
+  },{
+    "path": "pages/oa/conversion/index",
+    "style": {
+      "navigationBarTitleText": "转正申请"
+    }
   },{
 			"path": "pages/popleSelect/choose",
 			"style": {

+ 97 - 0
pages/oa/conversion/dataList.vue

@@ -0,0 +1,97 @@
+<template>
+	<view class='my-unit' @click="childClick">
+		<view class="unit-head">
+			<text style="font-weight: bold;font-size: 26upx;">{{ info.oaType }}</text>
+			<text style="color: gray;font-size: 20upx;">{{ parseTime(info.time) }}</text>
+		</view>
+		<view class="unit-body">
+			<text class="uni-ellipsis-1">转正人:{{ info.title }}</text>
+			<text class="uni-ellipsis-1">转正日期:{{ info.remarks }}</text>
+		</view>
+		<view class="unit-foot">
+			<text>{{ info.status }}</text>
+			<text style="color: orange;">{{ info.nickname }}</text>
+		</view>
+	</view>
+
+</template>
+
+<script>
+export default {
+	props: {
+		info: {
+			type: Object
+		},
+		initIndex: {
+			type: Number
+		}
+	},
+	data() {
+		return {}
+	},
+	methods: {
+		childClick(){
+			this.$emit('faClick', this.info)
+		}
+	},
+	computed: {
+
+	},
+	created() {
+
+	},
+}
+</script>
+<style lang='scss'>
+.my-unit {
+	margin: 20upx 10upx;
+	background-color: #ffffff;
+	font-size: 28upx;
+	transform: all 1s;
+	border-radius: 10upx;
+	box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3;
+
+	.unit-head {
+		font-size: 26upx;
+		padding: 20upx 20upx 10upx 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.unit-body {
+		padding: 0 20upx;
+		color: gray;
+		display: flex;
+		flex-direction: column;
+		font-size: 22upx;
+		line-height: 30upx;
+	}
+
+	.unit-foot {
+		font-size: 24upx;
+		height: 66upx;
+		padding: 0 20upx;
+		// border-top: 2upx solid #f5f5f5;
+		border-bottom: none;
+		line-height: 66upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+		font-weight: bold;
+	}
+}
+.uni-ellipsis-1 {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		text-overflow:ellipsis;
+		/* #endif */
+	}
+</style>

+ 357 - 0
pages/oa/conversion/detail.vue

@@ -0,0 +1,357 @@
+<template>
+	<view class="container">
+		<uni-forms ref="form" :model="form" labelWidth="80px" :label-position="alignment">
+			<uni-forms-item label="入职人">
+				<uni-easyinput v-model="form.entryName" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="部门">
+				<uni-easyinput v-model="form.deptName" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="职位">
+				<uni-easyinput v-model="form.position" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="员工类型">
+				<uni-easyinput v-model="form.employeeTypeDesc" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="性别">
+				<uni-easyinput v-model="form.gender" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="出生日期">
+				<uni-easyinput v-model="form.birthday" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="联系电话">
+				<uni-easyinput v-model="form.contactNumber" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="电子邮箱">
+				<uni-easyinput v-model="form.email" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="教育背景">
+				<uni-easyinput autoHeight type="textarea" v-model="form.education" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="工作经验">
+				<uni-easyinput autoHeight type="textarea" v-model="form.workExperience" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="附件">
+				<view class="upload-wrap">
+					<view class="mgb-16 file-wrap" v-for="(item, index) in form.fileList" :key="index">
+					  <view class="btn-click file-line" @click="handlePreview(item)">
+					    <view class="file-info">
+					      <image :src="icons.file" mode="aspectFill" class="file-icon" />
+					      <text class="file-name">{{ item.name || title[type] }}</text>
+					    </view>
+					  </view>
+					</view>
+				</view>
+			</uni-forms-item>
+			<uni-forms-item label="备注">
+				<uni-easyinput autoHeight type="textarea" v-model="form.remarks" disabled />
+			</uni-forms-item>
+			<uni-forms-item label="审批意见" required v-if="(form.auditStatus==2 || form.auditStatus==1) && name=='0'">
+				<uni-easyinput autoHeight maxlength="200" type="textarea" v-model="reason" placeholder="请输入审批建议" />
+			</uni-forms-item>
+			<uni-forms-item label="流程动态">
+				<uni-steps active-icon="medal" :options="tasks" active-color="#007AFF" :active="tasks.length" direction="column" />
+			</uni-forms-item>
+		</uni-forms>
+		<view class="button-group" v-if="name=='0'">
+			<button type="primary" size="mini" @click="handleAudit(true)">同意</button>
+			<button size="mini" @click="handleAudit(false)">驳回</button>
+		</view>
+		<view class="button-group" v-if="name=='2'">
+			<button type="warning" size="mini" @click="handleRevocation('form')">撤回</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getDetail,revocation,agree,disagree } from "@/api/oa/conversion.js"
+	export default {
+		props: {
+		    id: {
+		      type: [String, Number],
+		      default: undefined
+		    },
+		    name: {
+		      type: String,
+		      default: undefined
+		    },
+		  },
+		data() {
+			return {
+				reason:'',
+				active: -1,
+				tasks: [],
+				alignment:'top',
+				fileList: [],
+				icons: {
+				  file: '/static/icon_file.png',
+				},
+				// 表单数据
+				form: {},
+			}
+		},
+		watch: {
+		    id: {
+		      immediate: true,
+		      handler(val) {
+		        this.getDetail(val);
+		      }
+		    }
+		  },
+		methods: {
+			  /** 获得详情信息 */
+			    getDetail(val) {
+			      getDetail(val).then(response => {
+					let gender = response.data.gender==1?'男':'女';
+			        this.form = response.data;
+					this.form.gender = gender;
+			        let auditRecordList = response.data.auditRecordList;
+					let tasks = [];
+					auditRecordList.forEach(v => {
+						tasks.push({
+							title:'任务:' + v.assigneeUser.nickname + v.name,
+							desc:this.parseTime(v.endTime),
+						})
+					})
+					this.tasks = tasks;
+			      });
+			    },
+			// 预览
+			handlePreview(val) {
+			  console.log('PreviewFile', val);
+			  const fileType = this.getFileType(val.name);
+			  if (fileType === 'image') {
+			   uni.previewImage({
+			     current: 0,
+			     urls: [val.url],
+			   });
+			  }
+			  else if (fileType === 'office') {
+				  return uni.downloadFile({
+				    url: val.url, 
+				    success: function (res) {
+				      let filePath = res.filePath || res.tempFilePath;
+				      uni.openDocument({
+				        filePath: filePath,
+				        showMenu: true,
+				        success: function (res) {
+				          console.log('打开文档成功');
+				        }
+				      });
+				    }
+				  });
+			  }
+			  else{
+				  uni.showModal({
+				    title: '该类型文件无法预览',
+				    content: val.name,
+				    showCancel: false,
+				  });
+			  }
+			  
+			},
+			handleRevocation(){
+			      console.log(this.form.taskId);
+				  let that = this
+				  uni.showModal({
+				          title: '提示',
+				          content: '是否确认撤回?',
+				          success: function (res) {
+				            if (res.confirm) {
+				              console.log('用户点击确定');
+				              revocation({id:that.form.taskId}).then(response => {
+				               uni.showToast({
+				               	title: "撤回成功!"
+				               })
+				              })
+				            } else if (res.cancel) {
+				              console.log('用户点击取消');
+				            }
+				          }
+				        });
+			    },
+			    handleAudit(pass) {
+			      if (!this.reason) {
+					uni.showModal({
+						title: "提示",
+						content: "请填写审批意见",
+						showCancel: false,
+						confirmText: "确定"
+					})
+			        return;
+			      } else {
+			        const data = {
+			          id: this.form.taskId,
+			          reason: this.reason,
+			        }
+			        if (pass) {
+			          agree(data).then(response => {
+						  uni.showToast({
+						  	title: "审批通过成功!"
+						  })
+						  this.$emit('popupClose');
+			          });
+			        } else {
+			          disagree(data).then(response => {
+						  uni.showToast({
+						  	title: "驳回成功!"
+						  })
+						  this.$emit('popupClose');
+			          });
+			        }
+			      }
+			    },
+			
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.container {
+		padding: 15px;
+		background-color: #fff;
+	}
+
+	.segmented-control {
+		margin-bottom: 15px;
+	}
+
+	.button-group {
+		margin-top: 15px;
+		display: flex;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+
+	.button {
+		display: flex;
+		align-items: center;
+		height: 35px;
+		line-height: 35px;
+		margin-left: 10px;
+	}
+</style>
+<style lang="scss" scoped>
+	.user-avatar {
+	  width: 22px;
+	  height: 22px;
+	  line-height: 19px;
+	  font-size: 12px;
+	  background: #46c26f;
+	  border: 1px solid transparent;
+	  border-radius: 5px;
+	  color: #fff;
+	  display: inline-block;
+	  overflow: hidden;
+	  text-align: center;
+	  line-height: 22px;
+	  margin-bottom: 2px;
+	}
+	.popup-body{
+		z-index: 99;
+		height: 450px;
+		overflow-x: auto;
+		// margin-bottom: 60px;
+	}
+	.popup-close{
+		cursor: pointer;
+		height: 40px;
+		line-height: 40px;
+		padding-left: 10px;
+		border-bottom: 1px solid #eaecef;
+	}
+	.popup-content{
+		margin: 20px;
+	}
+.btn-click {
+  transition: all 0.3s;
+  opacity: 1;
+}
+
+.btn-click:active {
+  opacity: 0.5;
+}
+
+.mgb-16 {
+  margin-bottom: 16rpx;
+
+  &:last-child {
+    margin-bottom: 0;
+  }
+}
+
+.upload-wrap {
+  width: 100%;
+  border-radius: 16rpx;
+  background: white;
+  // padding: 32rpx;
+
+  .upload-btn {
+    width: 100%;
+    height: 176rpx;
+    border: 2rpx dashed #AAAAAA;
+    background: #FAFAFA;
+    border-radius: 16rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+
+    .upload-icon {
+      width: 48rpx;
+      height: 48rpx;
+      margin-bottom: 8rpx;
+    }
+
+    .upload-text {
+      font-size: 26rpx;
+      color: #9E9E9E;
+      line-height: 40rpx;
+    }
+  }
+
+  .file-wrap {
+    .file-line {
+      width: 100%;
+      background: #F5F5F5;
+      border-radius: 8rpx;
+      padding: 16rpx;
+      font-size: 26rpx;
+      color: #1A1A1A;
+      line-height: 40rpx;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+
+      .file-info {
+        width: 90%;
+        display: flex;
+        align-items: center;
+
+        .file-name {
+          max-width: 80%;
+          padding-left: 16rpx;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+      }
+
+      .file-icon {
+        width: 40rpx;
+        height: 40rpx;
+        flex-shrink: 0;
+      }
+
+      .file-empty {
+        color: #999999;
+      }
+    }
+  }
+}
+</style>

+ 660 - 0
pages/oa/conversion/edit.vue

@@ -0,0 +1,660 @@
+<template>
+	<view class="container">
+		<uni-forms ref="form" :rules="rules" :model="form" labelWidth="80px" :label-position="alignment">
+			<uni-forms-item label="入职人" required name="entryName">
+				<uni-easyinput v-model="form.entryName" placeholder="请输入"/>
+			</uni-forms-item>
+			<uni-forms-item label="部门" required name="deptId">
+				<uni-data-select v-model="form.deptId" :localdata="deptOptions">
+				</uni-data-select>
+			</uni-forms-item>
+			<uni-forms-item label="职位" required name="postId">
+				<uni-data-select v-model="form.postId" :localdata="postOptions">
+				</uni-data-select>
+			</uni-forms-item>
+			<uni-forms-item label="员工类型" required name="employeeType">
+				<uni-data-select v-model="form.employeeType" :localdata="employeeTypeListOpen">
+				</uni-data-select>
+			</uni-forms-item>
+			<uni-forms-item label="性别" required name="gender">
+				<uni-data-select v-model="form.gender" :localdata="userSexList">
+				</uni-data-select>
+			</uni-forms-item>
+			<uni-forms-item label="出生日期" required name="birthday">
+				<uni-datetime-picker type="date" v-model="form.birthday"/>
+			</uni-forms-item>
+			
+			<uni-forms-item label="联系电话" required name="contactNumber">
+				<uni-easyinput v-model="form.contactNumber" placeholder="请输入"/>
+			</uni-forms-item>
+			<uni-forms-item label="电子邮箱" required name="email">
+				<uni-easyinput v-model="form.email" placeholder="请输入"/>
+			</uni-forms-item>
+			<uni-forms-item label="教育背景">
+				<uni-easyinput maxlength="50" type="textarea" v-model="form.education" placeholder="请输入" />
+			</uni-forms-item>
+			<uni-forms-item label="工作经验">
+				<uni-easyinput maxlength="200" type="textarea" v-model="form.workExperience" placeholder="请输入" />
+			</uni-forms-item>
+			<uni-forms-item label="入职日期" required name="entryDate">
+				<uni-datetime-picker type="date" v-model="form.entryDate"/>
+			</uni-forms-item>
+			<uni-forms-item label="附件">
+				<view class="upload-wrap">
+					<button type="primary" size="mini" @click="handleUploadClick">点击上传</button>
+					<xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
+					<view class="mgb-16 file-wrap" v-for="(item, index) in fileList" :key="index">
+						<view class="btn-click file-line" @click="handlePreview(item)">
+							<view class="file-info">
+								<image :src="icons.file" mode="aspectFill" class="file-icon" />
+								<text class="file-name">{{ item.name || title[type] }}</text>
+							</view>
+							<image :src="icons.close" mode="aspectFill" class="file-icon"
+								@click.stop="handleDeleteFile(index)" />
+						</view>
+					</view>
+				</view>
+
+			</uni-forms-item>
+			<uni-forms-item label="备注">
+				<uni-easyinput maxlength="200" type="textarea" v-model="form.remarks" placeholder="请输入备注" />
+			</uni-forms-item>
+			<uni-forms-item label="审批人" required name="peopleList">
+				<uni-easyinput v-model="form.peopleList" style="display: none;" />
+				<view style="display: flex;justify-content: flex-start;align-items: center;">
+					<uni-icons type="folder-add" size="40" @click="gotochooseUser"></uni-icons>
+					<view style="display: flex;justify-content: flex-start;align-items: center;"
+						v-for="(tag, index) in nikeNamelist" :key="index">
+						<uni-icons type="right" size="20"></uni-icons>
+						<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;"
+							@click="handleClose(index)">
+							<span class="user-avatar">{{ tag.substring(0, 1) || 'U' }}</span>
+							<text style="font-size: 12px;">{{tag}}</text>
+						</view>
+
+					</view>
+				</view>
+			</uni-forms-item>
+			<uni-forms-item label="流程动态" v-if="tasks.length > 0">
+				<uni-steps active-icon="medal" :options="tasks" active-color="#007AFF" :active="tasks.length"
+					direction="column" />
+			</uni-forms-item>
+		</uni-forms>
+		<view class="button-group" v-if="name == '0'">
+			<button type="default" size="mini" @click="onReCommit('form')">提交</button>
+			<button type="primary" size="mini" @click="onClose()">关闭</button>
+		</view>
+		<view class="button-group" v-else>
+			<button type="primary" size="mini" @click="submit('form')">提交</button>
+			<button type="default" size="mini" @click="onSave()">暂存</button>
+			<button type="danger" size="mini" @click="onDelete()" v-if="form.auditStatus == 0">删除</button>
+		</view>
+
+		<view>
+			<!-- 普通弹窗 -->
+			<uni-popup ref="popup" background-color="#fff" border-radius="10px 10px 0 0">
+				<view class="popup-body">
+					<view class="popup-close">
+						<uni-icons type="closeempty" size="20" @click="popupClose"></uni-icons>
+					</view>
+					<view class="popup-content">
+						<pople-Select type="multiple" @submit="submitPeople" ref="popleSelect"></pople-Select>
+					</view>
+				</view>
+
+			</uni-popup>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getDetail,
+		create,
+		save,
+		deleteById,
+		closeById,
+		reCommit
+	} from "@/api/oa/conversion.js"
+	import {getDicts,getOpenDicts,listSimplePosts,listSimpleDepts } from "@/api/system/dict.js";
+	import {
+		uploadFile
+	} from "@/api/system/user"
+	import popleSelect from '../../popleSelect/choose.vue'
+	export default {
+		components: {
+			popleSelect
+		},
+		props: {
+			id: {
+				type: [String, Number],
+				default: undefined
+			},
+			name: {
+				type: String,
+				default: undefined
+			},
+		},
+		data() {
+			return {
+				deptOptions:[],
+				postOptions:[],
+				employeeTypeListOpen:[],
+				userSexList:[],
+				tasks: [],
+				userInfo: uni.getStorageSync('userInfo'),
+				alignment: 'top',
+				uploadOptions: {},
+				fileList: [],
+				icons: {
+					close: '/static/icon_close.png',
+					file: '/static/icon_file.png',
+				},
+				nikeNamelist: [],
+				// 表单数据
+				form: {
+					entryName: undefined,
+					deptId: undefined,
+					postId: undefined,
+					employeeType: undefined,
+					gender: undefined,
+					birthday: undefined,
+					contactNumber: undefined,
+					email: undefined,
+					education: undefined,
+					workExperience: undefined,
+					entryDate: undefined,
+					fileIdList: undefined,
+					remarks: undefined,
+					peopleList: '',
+				},
+				// 校验规则
+				rules: {
+					entryName: {
+						rules: [{
+							required: true,
+							errorMessage: '请输入'
+						}, ]
+					},
+					deptId: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					postId: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					employeeType: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					gender: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					birthday: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					contactNumber: {
+						rules: [{
+							required: true,
+							errorMessage: '请输入'
+						}, ]
+					},
+					email: {
+						rules: [{
+							required: true,
+							errorMessage: '请输入'
+						}, ]
+					},
+					entryDate: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择'
+						}, ]
+					},
+					peopleList: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择审批人'
+						}, ]
+					},
+				},
+			}
+		},
+		  watch: {
+		    id: {
+		      immediate: true,
+		      handler(val) {
+				this.getInfoDataList();
+		        if (val) {
+		          this.getDetail(val);
+		        }
+		      }
+		    }
+		  },
+		methods: {
+			maskClick(e) {
+				console.log('----maskClick事件:', e);
+			},
+			 /** 查询部门列表 */
+			 getInfoDataList() {
+				listSimpleDepts().then(response => {
+					response.data.forEach(v => {
+						this.deptOptions.push({
+							text: v.name,
+							value: v.id,
+						})
+					})
+				});
+				getDicts('system_user_sex').then(response => {
+					response.data.forEach(v => {
+						this.userSexList.push({
+							text: v.label,
+							value: v.value,
+						})
+					})
+				});
+				getOpenDicts('tenant_employee_type').then(response => {
+					response.data.forEach(v => {
+						this.employeeTypeListOpen.push({
+							text: v.label,
+							value: v.value,
+						})
+					})
+				});
+				listSimplePosts().then(response => {
+					response.data.forEach(v => {
+						this.postOptions.push({
+							text: v.name,
+							value: v.id,
+						})
+					})
+				});
+			},
+			/** 获得详情信息 */
+			getDetail(val) {
+				getDetail(val).then(response => {
+					this.form = response.data;
+					console.log(this.form);
+					this.fileList = response.data.fileList ? response.data.fileList : [];
+					let auditUserList = response.data.auditUserList;
+					if (auditUserList) {
+						let peopleList = [];
+						let nikeNamelist = [];
+						auditUserList.map(item => {
+							peopleList.push(item.id);
+							nikeNamelist.push(item.nickname)
+						});
+						this.$set(this.form, 'peopleList', peopleList.join(','));
+						this.nikeNamelist = nikeNamelist;
+					} else {
+						this.$set(this.form, 'peopleList', '');
+						this.nikeNamelist = [];
+					}
+					let auditRecordList = response.data.auditRecordList;
+					if (auditRecordList) {
+						let tasks = [];
+						auditRecordList.forEach(v => {
+							tasks.push({
+								title: '任务:' + v.assigneeUser.nickname + v.name,
+								desc: this.parseTime(v.endTime),
+							})
+						})
+						this.tasks = tasks;
+					}
+				});
+			},
+			// 关闭标签
+			handleClose(index) {
+				this.nikeNamelist.splice(index, 1);
+				let peopleList = this.form.peopleList.split(',');
+				peopleList.splice(index, 1);
+				this.form.peopleList = peopleList.join(',');
+			},
+			submitPeople(userList, nikeNamelist, userIdList) {
+				console.log(userList);
+				console.log(userIdList);
+				this.nikeNamelist = nikeNamelist;
+				this.form.peopleList = userIdList.join(',');
+				this.$refs.popup.close();
+			},
+			popupClose() {
+				this.$refs.popup.close();
+			},
+			gotochooseUser() {
+				this.$refs.popup.open('bottom');
+				setTimeout(() => {
+					this.$refs.popleSelect.getInfoData();
+				})
+			},
+			handleUploadClick() {
+				this.$refs.XeUpload.upload('file');
+			},
+			handleUploadCallback(e) {
+				console.log('UploadCallback', e);
+				let data = {
+					filePath: e.data[0].tempFilePath
+				}
+				uploadFile(data).then(response => {
+					const tmpFiles = ([response.data] || []).map(({
+						id,
+						url,
+						name,
+						type
+					}) => {
+						return {
+							id,
+							url,
+							name,
+							type,
+						};
+					});
+					this.fileList.push(...tmpFiles);
+				})
+			},
+			// 预览
+			handlePreview(val) {
+				console.log('PreviewFile', val);
+				const fileType = this.getFileType(val.name);
+				if (fileType === 'image') {
+					uni.previewImage({
+						current: 0,
+						urls: [val.url],
+					});
+				} else if (fileType === 'office') {
+					return uni.downloadFile({
+						url: val.url,
+						success: function(res) {
+							let filePath = res.filePath || res.tempFilePath;
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+								}
+							});
+						}
+					});
+				} else {
+					uni.showModal({
+						title: '该类型文件无法预览',
+						content: val.name,
+						showCancel: false,
+					});
+				}
+
+			},
+			handleDeleteFile(index) {
+				this.fileList.splice(index, 1);
+			},
+			submit(ref) {
+				this.$refs[ref].validate().then(res => {
+					this.form.startUserSelectAssignees = this.form.peopleList.split(',');
+					this.form.auditPass = true;
+					create(this.form).then(response => {
+						uni.showToast({
+							title: `提交成功`
+						})
+						if(this.id){
+							this.$emit('popupClose');
+						}else{
+							setTimeout(() => {
+								this.$router.go(0)
+							}, 500)
+						}
+						
+					}).catch(() => {
+						
+					});
+				}).catch(err => {
+					console.log('err', err);
+				})
+			},
+			//暂存
+			onSave() {
+				if (this.form.peopleList) {
+					this.form.startUserSelectAssignees = this.form.peopleList.split(',');
+				}
+				this.form.auditPass = false;
+				save(this.form).then(response => {
+					uni.showToast({
+						title: `暂存成功`
+					})
+					if(this.id){
+						this.$emit('popupClose');
+					}else{
+							setTimeout(() => {
+								this.$router.go(0)
+							}, 500)
+						}
+				}).catch(() => {
+					
+				});
+			},
+			//驳回或撤回后再次提交
+			    onReCommit(ref) {
+			      this.$refs[ref].validate().then(res => {
+			      	this.form.startUserSelectAssignees = this.form.peopleList.split(',');
+			      	this.form.auditPass = true;
+			      	reCommit(this.form).then(response => {
+						uni.showToast({
+							title: `提交成功`
+						})
+					  this.$emit('popupClose');
+			      	}).catch(() => {
+						
+					});
+			      }).catch(err => {
+			      	console.log('err', err);
+			      })
+			    },
+			//暂存删除
+			async onDelete() {
+				let that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否确认删除?',
+					success: function(res) {
+						if (res.confirm) {
+							console.log('用户点击确定');
+							deleteById(that.id).then(response => {
+								uni.showToast({
+									title: "删除成功!"
+								})
+								that.$emit('popupClose');
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
+			//暂存关闭
+			async onClose() {
+				let that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否确认关闭?',
+					success: function(res) {
+						if (res.confirm) {
+							console.log('用户点击确定');
+							closeById(that.id).then(response => {
+								uni.showToast({
+									title: "流程已关闭!"
+								})
+								that.$emit('popupClose');
+							})
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.container {
+		padding: 15px;
+		background-color: #fff;
+	}
+
+	.segmented-control {
+		margin-bottom: 15px;
+	}
+
+	.button-group {
+		margin-top: 15px;
+		display: flex;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		flex: 1;
+	}
+
+	.button {
+		display: flex;
+		align-items: center;
+		height: 35px;
+		line-height: 35px;
+		margin-left: 10px;
+	}
+</style>
+<style lang="scss" scoped>
+	.user-avatar {
+		width: 22px;
+		height: 22px;
+		line-height: 19px;
+		font-size: 12px;
+		background: #46c26f;
+		border: 1px solid transparent;
+		border-radius: 5px;
+		color: #fff;
+		display: inline-block;
+		overflow: hidden;
+		text-align: center;
+		line-height: 22px;
+		margin-bottom: 2px;
+	}
+
+	.popup-body {
+		z-index: 99;
+		margin-bottom: 30px;
+	}
+
+	.popup-close {
+		cursor: pointer;
+		height: 40px;
+		line-height: 40px;
+		padding-left: 10px;
+		border-bottom: 1px solid #eaecef;
+	}
+
+	.popup-content {
+		height: 450px;
+		overflow-x: auto;
+		margin: 20px;
+	}
+
+	.btn-click {
+		transition: all 0.3s;
+		opacity: 1;
+	}
+
+	.btn-click:active {
+		opacity: 0.5;
+	}
+
+	.mgb-16 {
+		margin-bottom: 16rpx;
+
+		&:last-child {
+			margin-bottom: 0;
+		}
+	}
+
+	.upload-wrap {
+		width: 100%;
+		border-radius: 16rpx;
+		background: white;
+		// padding: 32rpx;
+
+		.upload-btn {
+			width: 100%;
+			height: 176rpx;
+			border: 2rpx dashed #AAAAAA;
+			background: #FAFAFA;
+			border-radius: 16rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			.upload-icon {
+				width: 48rpx;
+				height: 48rpx;
+				margin-bottom: 8rpx;
+			}
+
+			.upload-text {
+				font-size: 26rpx;
+				color: #9E9E9E;
+				line-height: 40rpx;
+			}
+		}
+
+		.file-wrap {
+			.file-line {
+				width: 100%;
+				background: #F5F5F5;
+				border-radius: 8rpx;
+				padding: 16rpx;
+				font-size: 26rpx;
+				color: #1A1A1A;
+				line-height: 40rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.file-info {
+					width: 90%;
+					display: flex;
+					align-items: center;
+
+					.file-name {
+						max-width: 80%;
+						padding-left: 16rpx;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+				}
+
+				.file-icon {
+					width: 40rpx;
+					height: 40rpx;
+					flex-shrink: 0;
+				}
+
+				.file-empty {
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 185 - 0
pages/oa/conversion/index.vue

@@ -0,0 +1,185 @@
+<template>
+	<view class='purchase-list'>
+		<my-tabs @change="tapChange" :initIndex="initIndex"></my-tabs>
+		<scroll-view class="purchase-body" scroll-y="true" @scrolltolower="scrolltolower" @scroll="scroll">
+			<view v-if="initIndex === 0">
+				<!-- <form-Create></form-Create> -->
+				<form-Edit @popupClose="popupClose"></form-Edit>
+			</view>
+			<view v-if="initIndex === 1">
+				<view class="searchBox">
+					<uni-search-bar placeholder="请输入搜索内容" @confirm="search" @blur="blur" @cancel="cancel" @clear="clear">
+					</uni-search-bar>
+				</view>
+				<data-List v-for="(item,index) in listData" :key="index" :info="item" @faClick="handdle"></data-List>
+				<uni-fab :pattern="pattern" :horizontal="horizontal" :vertical="vertical"
+									:direction="direction" @fabClick="fabClick" />
+				<!-- 普通弹窗 -->
+				<uni-popup ref="popup" background-color="#fff" border-radius="10px 10px 0 0">
+					<view class="popup-body">
+						<view class="popup-close">
+							<uni-icons type="closeempty" size="20" @click="popupClose"></uni-icons>
+						</view>
+						<view class="popup-content">
+							<form-Edit :id="id" v-if="status=='暂存'" @popupClose="popupClose"></form-Edit>
+							<form-Detail :id="id" v-else @popupClose="popupClose"></form-Detail>
+						</view>
+					</view>
+					
+				</uni-popup>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import { getListData } from "@/api/oa/conversion"
+	import myTabs from '../myTabs.vue'
+	import dataList from './dataList.vue'
+	import formDetail from './detail.vue'
+	import formEdit from './edit.vue'
+	import myPull from '@/static/js/myPull.js'
+	export default {
+		components:{myTabs,dataList,formEdit,formDetail},
+		data() {
+			return {
+				id:'',
+				status:'',
+				initIndex: 0,
+				employeeName:'',
+				pageNo: 1,
+				pageSize: 10,
+				horizontal: 'right',
+				vertical: 'bottom',
+				direction: 'horizontal',
+				pattern: {
+					color: '#7A7E83',
+					backgroundColor: '#fff',
+					selectedColor: '#007AFF',
+					buttonColor: '#007AFF',
+					iconColor: '#fff'
+				},
+			}
+		},
+		onLoad(){
+			this.refresh();
+		},
+		methods: {
+			fabClick() {
+				this.initIndex = 0;
+							
+			},
+			search(res) {
+				this.employeeName = res.value;
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			},
+			clear(res) {
+				this.employeeName = '';
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			},
+			blur(res) {
+				this.employeeName = res.value;
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			},
+			cancel(res) {
+				this.employeeName = '';
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			},
+			popupClose(){
+				this.$refs.popup.close();
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			},
+			handdle(row) {
+				this.$refs.popup.open('bottom');
+			    this.id = row.id;
+				this.status = row.status;
+			},
+			fabClick() {
+				this.initIndex = 0;
+			},
+			/**
+			 * @name 获取列表
+			 */
+			getList(page,done){
+				if(this.initIndex==1){
+					getListData({pageNo:page,pageSize: this.pageSize,employeeName:this.employeeName}).then(response => {
+						let dataList = response.data.list;
+						let list = []
+						dataList.forEach(v => {
+							list.push({
+								id:v.id,
+								oaType:v.applyEmployeeName+'提交的转正申请',
+								time:v.createTime,
+								title:v.employeeName,
+								remarks:v.conversionDate,
+								status: v.auditStatusDesc,
+								nickname:v.currentAuditEmployeeName
+							})
+						})
+						done(list);
+					});
+				}
+			},
+			
+			/**
+			 * @name 触底加载
+			 */
+			scrolltolower(event){
+				this.getList(this.page,this.__pulldone)
+			},
+			
+			scroll(e){
+				// 重新设置pulldown
+				this.setPullDown(e.detail.scrollTop<10)
+			},
+			/**
+			 * @name 改变tab
+			 * @param val 索引
+			 */
+			tapChange(val){
+				this.initIndex=val;
+				this.page = 1;
+				this.getList(this.page,this.__pulldone)
+			}
+		},
+		mixins:[myPull({})],
+		
+	}
+</script>
+<style lang='scss' scoped>
+	.searchBox{
+		background-color: #fff;
+		position: -webkit-sticky; /* Safari */
+		position: sticky;
+		top: 0; /* 设置元素距离顶部的位置 */
+		width: 100%;
+	}
+	.popup-body{
+		z-index: 99;
+	}
+	.popup-close{
+		cursor: pointer;
+		height: 40px;
+		line-height: 40px;
+		padding-left: 10px;
+		border-bottom: 1px solid #eaecef;
+	}
+	.popup-content{
+		height: 450px;
+		overflow-x: auto;
+	}
+	.purchase-list {
+		background-color: #f5f5f5;
+		height: 100%;
+		overflow: hidden;
+		
+		.purchase-body{
+			height: calc(100% - 88upx);
+			overflow: auto
+		}
+	}
+</style>

+ 97 - 0
pages/oa/entry/dataList.vue

@@ -0,0 +1,97 @@
+<template>
+	<view class='my-unit' @click="childClick">
+		<view class="unit-head">
+			<text style="font-weight: bold;font-size: 26upx;">{{ info.oaType }}</text>
+			<text style="color: gray;font-size: 20upx;">{{ parseTime(info.time) }}</text>
+		</view>
+		<view class="unit-body">
+			<text class="uni-ellipsis-1">入职人:{{ info.title }}</text>
+			<text class="uni-ellipsis-1">入职日期:{{ info.remarks }}</text>
+		</view>
+		<view class="unit-foot">
+			<text>{{ info.status }}</text>
+			<text style="color: orange;">{{ info.nickname }}</text>
+		</view>
+	</view>
+
+</template>
+
+<script>
+export default {
+	props: {
+		info: {
+			type: Object
+		},
+		initIndex: {
+			type: Number
+		}
+	},
+	data() {
+		return {}
+	},
+	methods: {
+		childClick(){
+			this.$emit('faClick', this.info)
+		}
+	},
+	computed: {
+
+	},
+	created() {
+
+	},
+}
+</script>
+<style lang='scss'>
+.my-unit {
+	margin: 20upx 10upx;
+	background-color: #ffffff;
+	font-size: 28upx;
+	transform: all 1s;
+	border-radius: 10upx;
+	box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3;
+
+	.unit-head {
+		font-size: 26upx;
+		padding: 20upx 20upx 10upx 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.unit-body {
+		padding: 0 20upx;
+		color: gray;
+		display: flex;
+		flex-direction: column;
+		font-size: 22upx;
+		line-height: 30upx;
+	}
+
+	.unit-foot {
+		font-size: 24upx;
+		height: 66upx;
+		padding: 0 20upx;
+		// border-top: 2upx solid #f5f5f5;
+		border-bottom: none;
+		line-height: 66upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+		font-weight: bold;
+	}
+}
+.uni-ellipsis-1 {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		text-overflow:ellipsis;
+		/* #endif */
+	}
+</style>

+ 3 - 3
pages/oa/entry/index.vue

@@ -34,7 +34,7 @@
 <script>
 	import { getListData } from "@/api/oa/entry"
 	import myTabs from '../myTabs.vue'
-	import dataList from '../dataList.vue'
+	import dataList from './dataList.vue'
 	import formDetail from './detail.vue'
 	import formEdit from './edit.vue'
 	import myPull from '@/static/js/myPull.js'
@@ -114,8 +114,8 @@
 								id:v.id,
 								oaType:v.applyEmployeeName+'提交的入职审批',
 								time:v.createTime,
-								title:v.title,
-								remarks:v.remarks,
+								title:v.entryName,
+								remarks:v.entryDate,
 								status: v.auditStatusDesc,
 								nickname:v.currentAuditEmployeeName
 							})

+ 97 - 0
pages/oa/universal/dataList.vue

@@ -0,0 +1,97 @@
+<template>
+	<view class='my-unit' @click="childClick">
+		<view class="unit-head">
+			<text style="font-weight: bold;font-size: 26upx;">{{ info.oaType }}</text>
+			<text style="color: gray;font-size: 20upx;">{{ parseTime(info.time) }}</text>
+		</view>
+		<view class="unit-body">
+			<text class="uni-ellipsis-1">事项标题:{{ info.title }}</text>
+			<text class="uni-ellipsis-1">详细描述:{{ info.remarks }}</text>
+		</view>
+		<view class="unit-foot">
+			<text>{{ info.status }}</text>
+			<text style="color: orange;">{{ info.nickname }}</text>
+		</view>
+	</view>
+
+</template>
+
+<script>
+export default {
+	props: {
+		info: {
+			type: Object
+		},
+		initIndex: {
+			type: Number
+		}
+	},
+	data() {
+		return {}
+	},
+	methods: {
+		childClick(){
+			this.$emit('faClick', this.info)
+		}
+	},
+	computed: {
+
+	},
+	created() {
+
+	},
+}
+</script>
+<style lang='scss'>
+.my-unit {
+	margin: 20upx 10upx;
+	background-color: #ffffff;
+	font-size: 28upx;
+	transform: all 1s;
+	border-radius: 10upx;
+	box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 3;
+
+	.unit-head {
+		font-size: 26upx;
+		padding: 20upx 20upx 10upx 20upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.unit-body {
+		padding: 0 20upx;
+		color: gray;
+		display: flex;
+		flex-direction: column;
+		font-size: 22upx;
+		line-height: 30upx;
+	}
+
+	.unit-foot {
+		font-size: 24upx;
+		height: 66upx;
+		padding: 0 20upx;
+		// border-top: 2upx solid #f5f5f5;
+		border-bottom: none;
+		line-height: 66upx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+		font-weight: bold;
+	}
+}
+.uni-ellipsis-1 {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		text-overflow:ellipsis;
+		/* #endif */
+	}
+</style>

+ 1 - 1
pages/oa/universal/index.vue

@@ -34,7 +34,7 @@
 <script>
 	import { getListData } from "@/api/oa/universal"
 	import myTabs from '../myTabs.vue'
-	import dataList from '../dataList.vue'
+	import dataList from './dataList.vue'
 	import formDetail from './detail.vue'
 	import formEdit from './edit.vue'
 	import myPull from '@/static/js/myPull.js'

+ 285 - 267
pages/popleSelect/choose.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="pur-list">
 		<view class="pur-hadder">
-			<uni-search-bar style="width: 100%;" placeholder="请输入姓名" @confirm="search" @clear="clear"@blur="blur" clearButton="auto"cancelButton="none" />
+			<uni-search-bar style="width: 100%;" placeholder="请输入姓名" @confirm="search" @clear="clear" @blur="blur"
+				clearButton="auto" cancelButton="none" />
 		</view>
 		<view class="pur-body">
 			<!-- 面包屑 -->
@@ -10,21 +11,21 @@
 				<view style='margin-right:5rpx;' @click='goBigBread()'>
 					通讯录
 				</view>
-				<view v-for='(it,i) in breadList' @click='goBread(it,i)' :key='i'>
+				<view v-for='(it, i) in breadList' @click='goBread(it, i)' :key='i'>
 					<text style='margin-left: 5px;margin-right: 5px;'>></text>
-					<text style='margin-left: 5px;margin-right: 5px;'>{{it.name}}</text>
+					<text style='margin-left: 5px;margin-right: 5px;'>{{ it.name }}</text>
 				</view>
 			</view>
 			<view v-if='isShow' class="" style='width: 750rpx;height: 15rpx;background-color:#f1f0f5;'>
 
 			</view>
-			<view class="" style='padding-bottom: 160rpx;width: 750rpx;' :style='{marginTop:isShow?"0px":"80rpx"}'>
+			<view class="" style='padding-bottom: 160rpx;width: 750rpx;' :style='{ marginTop: isShow ? "0px" : "80rpx" }'>
 				<view class="list" v-if='deptIdTree.length'>
 					<view
 						style="display: flex;flex-direction: row;justify-content: space-between;margin-left: 40rpx;margin-right: 40rpx;height: 110rpx;border-bottom: 1px solid #f0f0f0;"
-						v-for="(it,i) in deptIdTree" :key='i' @click='godept(it)'>
+						v-for="(it, i) in deptIdTree" :key='i' @click='godept(it)'>
 						<view v-if='it.name' style='display: flex;height: 110rpx;flex-direction: row;'>
-							<text style='font-size: 36rpx;line-height: 110rpx;'>{{it.name}} </text>
+							<text style='font-size: 36rpx;line-height: 110rpx;'>{{ it.name }} </text>
 							<!-- <text style='color:#ccc;line-height: 110rpx;'>({{it.children.length}})</text> -->
 						</view>
 						<view class="" v-if='it.children' style='padding-top: 40rpx;'>
@@ -34,14 +35,16 @@
 					</view>
 				</view>
 				<view v-if='userList.length'>
-					<view class="" v-for='(it,i) in userList' :key='it.id' style='display: flex;flex-direction: row;height: 110rpx;margin-left: 5px;padding-top: 20px;padding-left: 10px;position: relative;border-bottom: 1px solid #f0f0f0;'>
-							<label class="radio" v-if='selectType' @click="isChecked($event,i,it)">
-								<radio :value='it.id.toString()' :checked="it.checked" />
-							</label>
-							<text class="avatar" style='position: absolute;top:12px;left:40px' :style='{left:selectType?"40px":"10px"}'>{{it.name.length>2?it.name.substr(it.name.length-2):it.name}}</text>
-							<view style='margin-left: 90rpx;'>
-								<text style='font-size: 36rpx;'>{{it.name}}</text>
-							</view>
+					<view class="" v-for='(it, i) in userList' :key='it.id'
+						style='display: flex;flex-direction: row;height: 110rpx;margin-left: 5px;padding-top: 20px;padding-left: 10px;position: relative;border-bottom: 1px solid #f0f0f0;'>
+						<label class="radio" v-if='selectType' @click="isChecked($event, i, it)">
+							<radio :value='it.id.toString()' :checked="it.checked" />
+						</label>
+						<text class="avatar" style='position: absolute;top:12px;left:40px'
+							:style='{ left: selectType ? "40px" : "10px" }'>{{ it.name.length > 2 ? it.name.substr(it.name.length - 2) : it.name }}</text>
+						<view style='margin-left: 90rpx;'>
+							<text style='font-size: 36rpx;'>{{ it.name }}</text>
+						</view>
 					</view>
 				</view>
 				<view v-if="!userList.length" style='width: 750rpx;text-align: center;padding-top: 100rpx;'>
@@ -54,7 +57,7 @@
 		<view class="list-bottom">
 			<view class="list-bottom-lianxi" @click='open'>
 				<text>已选择</text>
-				<text class="list-bottom-queding" v-if='checkList.length'>{{checkList.length}}个</text>
+				<text class="list-bottom-queding" v-if='checkList.length'>{{ checkList.length }}个</text>
 				<text>联系人</text>
 			</view>
 			<view @click="determine" v-if='checkList.length'>
@@ -67,23 +70,23 @@
 
 		<!-- 底部弹框 -->
 		<my-popup id="popup" ref="popup" type="bottom" :animation="false" @change="change">
-			<view class="popup-content" :style='{height:checkList.length>3?"auto":"500rpx"}'
+			<view class="popup-content" :style='{ height: checkList.length > 3 ? "auto" : "500rpx" }'
 				style='padding-bottom: 100rpx;'>
 				<view class="" style='display: flex;flex-direction: row;justify-content: space-between;height: 100rpx;'>
 					<view class="" style='display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 40rpx;'>
 						<text style='color: #333;'>已选择</text>
-						<text style='color:#007AFF;font-size: 36rpx;'>{{checkList.length}}</text>人
+						<text style='color:#007AFF;font-size: 36rpx;'>{{ checkList.length }}</text>人
 					</view>
 					<view class="" style='margin-right: 20rpx;margin-top: 20rpx;' @click='submit'>
 						<text style='margin-right:10px;color:#007AFF;font-size: 36rpx;line-height: 50rpx;'>关闭</text>
 					</view>
 				</view>
-				<view class="" v-for='(it,i) in checkList' :key='i'
+				<view class="" v-for='(it, i) in checkList' :key='i'
 					style='display: flex;flex-direction: row;border-bottom: 1px solid #f0f0f0;width: 750rpx;justify-content: space-between;height: 100rpx;'>
 					<view class="" style='position: relative;'>
 						<text class="avatar" v-if='it.name'
-							style='position: absolute;top:8px;left:20px'>{{it.name.length>2?it.name.substr(it.name.length-2):it.name}}</text>
-						<view style='margin-left: 130rpx;margin-top: 15px;color: #333;font-size: 36rpx;'>{{it.name}}
+							style='position: absolute;top:8px;left:20px'>{{ it.name.length > 2 ? it.name.substr(it.name.length - 2) : it.name }}</text>
+						<view style='margin-left: 130rpx;margin-top: 15px;color: #333;font-size: 36rpx;'>{{ it.name }}
 						</view>
 					</view>
 					<view class="" style='margin-right: 20px;padding-top: 35rpx;'>
@@ -98,278 +101,293 @@
 </template>
 
 <script>
-	import {
-		listSimpleDepts,
-		listForSelectEmployee
-	} from "@/api/peopleSelect/index"
-	import resource from '../../js/data.js';
-	import myPopup from '../../components/my-popup/my-popup.vue';
-	export default {
-		data() {
-			return {
-				// 查询参数
-				queryParams: {
-					name: undefined,
-					deptId: undefined,
-					auth: undefined
-				},
-				deptIdTree: [],
-				userList: [],
-				breadList: [],
-				selectType: true,
-				active: null,
-				checkList: [],
-				breadId: null,
-				isShow: true, //是否显示面包屑
-			}
-		},
-		components: {
-			myPopup
+import {
+	listSimpleDepts,
+	listForSelectEmployee
+} from "@/api/peopleSelect/index"
+import myPopup from '../../components/my-popup/my-popup.vue';
+export default {
+	props: {
+		type: {
+			type: String,
+			default: 'single' //single or multiple
 		},
-		onLoad() {
+	},
+	data() {
+		return {
+			// 查询参数
+			queryParams: {
+				name: undefined,
+				deptId: undefined,
+				auth: undefined
+			},
+			deptIdTree: [],
+			userList: [],
+			breadList: [],
+			selectType: true,
+			active: null,
+			checkList: [],
+			breadId: null,
+			isShow: true, //是否显示面包屑
+		}
+	},
+	components: {
+		myPopup
+	},
+	onLoad() {
+		this.getInfoData();
+	},
+	onShow() {
+		this.getInfoData();
+	},
+	methods: {
+		getInfoData() {
+			if (this.type == 'multiple') {
+				this.queryParams.auth = 0;
+			} else {
+				this.queryParams.auth = 1;
+			}
 			this.getDeptTree()
 			this.getList()
 		},
-		onShow() {
-			this.getDeptTree()
-			this.getList()
+		/** 查询部门下拉树结构 */
+		getDeptTree() {
+			listSimpleDepts().then(response => {
+				// 处理 deptIdTree 参数
+				this.deptIdTree = [];
+				this.deptIdTree.push(...this.handleTree(response.data, "id"));
+				console.log(this.deptIdTree);
+			});
+		},
+		/** 查询用户列表 */
+		getList() {
+			listForSelectEmployee(this.queryParams).then(response => {
+				this.userList = response.data
+				console.log(this.userList);
+			})
+		},
+		search(res) {
+			console.log('----search:', res)
+			this.queryParams.name = res.value;
+			this.getList();
+		},
+		clear(res) {
+			console.log('----clear:', res)
+			this.queryParams.name = '';
+			this.getList();
+		},
+		blur(res) {
+			console.log('----blur:', res)
+			this.queryParams.name = res.value;
+			this.getList();
 		},
-		methods: {
-			getInfoData() {
-				this.getDeptTree()
-				this.getList()
-			},
-			/** 查询部门下拉树结构 */
-			getDeptTree() {
-				listSimpleDepts().then(response => {
-					// 处理 deptIdTree 参数
-					this.deptIdTree = [];
-					this.deptIdTree.push(...this.handleTree(response.data, "id"));
-					console.log(this.deptIdTree);
-				});
-			},
-			/** 查询用户列表 */
-			getList() {
-				listForSelectEmployee(this.queryParams).then(response => {
-					this.userList = response.data
-					console.log(this.userList);
-				})
-			},
-			search(res) {
-				console.log('----search:', res)
-				this.queryParams.name = res.value;
-				this.getList();
-			},
-			clear(res) {
-				console.log('----clear:', res)
-				this.queryParams.name = '';
-				this.getList();
-			},
-			blur(res) {
-				console.log('----blur:', res)
-				this.queryParams.name = res.value;
-				this.getList();
-			},
-			
-			// 弹窗确认
-			submit() {
-				this.$refs.popup.close()
-			},
-			deleteUser(it) {
-				this.userList.forEach(its => {
-					if (its.id == it.id) {
-						its.checked = false
-					}
-				})
-				this.checkList = this.checkList.filter(item => {
-					let itId = it.id.toString();
-					let itemId = item.id.toString();
-					return !itId.includes(itemId);
-				})
-			},
-			change() {},
-			open() {
-				let that = this;
-				that.$refs.popup.open();
-			},
-			goBread(it, i) {
-				if (it.it.children) {
-					this.deptIdTree = it.it.children
-				} else {
-					this.deptIdTree = []
-				}
-				this.breadId = it
-				this.breadList = this.breadList.slice(0, i + 1)
-				this.queryParams.deptId = it.id;
-				this.getList();
-			},
-			goBigBread() {
-				this.queryParams.deptId = undefined;
-				this.getDeptTree();
-				this.getList();
-				this.breadList = []
-			},
-			isChecked(e, i, it) {
-				this.active = i;
-				console.log("12")
-				// #ifdef APP-NVUE
-				console.log("123")
-				e.stopPropagation()
-				// #endif
-				this.userList[i].checked = !this.userList[i].checked
-				if (this.selectType) {
-					if (this.userList[i].checked) {
-						console.log('push进去', this.checkList)
-						this.checkList.push(it)
-					} else {
-						this.checkList.splice(this.checkList.indexOf(it), 1);
-					}
-				} else {
 
+		// 弹窗确认
+		submit() {
+			this.$refs.popup.close()
+		},
+		deleteUser(it) {
+			this.userList.forEach(its => {
+				if (its.id == it.id) {
+					its.checked = false
 				}
-			},
-			godept(it) {
-				console.log('人员', it)
-				if (it.name) {
-					this.breadId = it.id
-					this.breadList.push({
-						name: it.name,
-						id: it.id,
-						it: it,
-						color: '#0066CC'
-					})
+			})
+			this.checkList = this.checkList.filter(item => {
+				let itId = it.id.toString();
+				let itemId = item.id.toString();
+				return !itId.includes(itemId);
+			})
+		},
+		change() { },
+		open() {
+			let that = this;
+			that.$refs.popup.open();
+		},
+		goBread(it, i) {
+			if (it.it.children) {
+				this.deptIdTree = it.it.children
+			} else {
+				this.deptIdTree = []
+			}
+			this.breadId = it
+			this.breadList = this.breadList.slice(0, i + 1)
+			this.queryParams.deptId = it.id;
+			this.getList();
+		},
+		goBigBread() {
+			this.queryParams.deptId = undefined;
+			this.getDeptTree();
+			this.getList();
+			this.breadList = []
+		},
+		isChecked(e, i, it) {
+			this.active = i;
+			console.log("12")
+			// #ifdef APP-NVUE
+			console.log("123")
+			e.stopPropagation()
+			// #endif
+			this.userList[i].checked = !this.userList[i].checked
+			if (this.selectType) {
+				if (this.userList[i].checked) {
+					console.log('push进去', this.checkList)
+					this.checkList.push(it)
+				} else {
+					this.checkList.splice(this.checkList.indexOf(it), 1);
 				}
-				if (!it.children) {
-					this.deptIdTree = []
+			} else {
+
+			}
+		},
+		godept(it) {
+			console.log('人员', it)
+			if (it.name) {
+				this.breadId = it.id
+				this.breadList.push({
+					name: it.name,
+					id: it.id,
+					it: it,
+					color: '#0066CC'
+				})
+			}
+			if (!it.children) {
+				this.deptIdTree = []
+			} else {
+				this.deptIdTree = it.children
+			}
+			this.queryParams.deptId = it.id;
+			this.getList();
+		},
+		//获取选中的人员昵称列表
+		getNickNameList(uns) {
+			let result = []
+
+			uns.forEach(item => {
+				result.push(item.name)
+			})
+
+			return result
+		},
+		//获取选中的人员ID列表
+		getUserIdList(uns) {
+			let result = []
+			uns.forEach(item => {
+				result.push(item.id)
+			})
+
+			return result
+		},
+		// 确认
+		determine() {
+			if (this.type == 'single') {
+				if(this.checkList.length>1){
+					uni.showModal({
+					content: "请选择一个成员!",
+					showCancel: false,
+					confirmText: "确定",
+				})
 				}else{
-					this.deptIdTree = it.children
+					this.$emit('submit', this.checkList, this.getNickNameList(this.checkList), this.getUserIdList(this.checkList))
 				}
-				this.queryParams.deptId = it.id;
-				this.getList();
-			},
-			//获取选中的人员昵称列表
-			        getNickNameList(uns) {
-			          let result = []
-			  
-			          uns.forEach(item => {
-						   result.push(item.name)
-			          })
-			  
-			          return result
-			        },
-					//获取选中的人员ID列表
-					        getUserIdList(uns) {
-					          let result = []
-					          uns.forEach(item => {
-								  result.push(item.id)
-					          })
-					  
-					          return result
-					        },
-			// 确认
-			determine() {
-				console.log(this.checkList)
-				this.$emit('submit', this.checkList,this.getNickNameList(this.checkList), this.getUserIdList(this.checkList))
-				
-				// uni.navigateTo({
-				// 	url: '/pages/oa/universal/index?list=' + JSON.stringify(this.checkList)
-				// })
-			},
-		}
+			} else {
+				this.$emit('submit', this.checkList, this.getNickNameList(this.checkList), this.getUserIdList(this.checkList))
+			}
+			
+		},
 	}
+}
 </script>
-<style>
-</style>
+<style></style>
 <style lang="scss">
-	.pur-list {
-		background-color: #fff;
-		height: 100%;
-		overflow: hidden;
+.pur-list {
+	background-color: #fff;
+	height: 100%;
+	overflow: hidden;
 
-		.pur-hadder {
-			background-color: #ffffff;
-			height: 55px;
-			font-size: 14px;
-			display: flex;
-			position: -webkit-sticky;
-			position: sticky;
-			box-sizing: border-box;
-			min-width: 100%;
-			overflow-x: auto;
-		}
-
-		.pur-body {
-			height: calc(100% - 88upx);
-			overflow: auto
-		}
+	.pur-hadder {
+		background-color: #ffffff;
+		height: 55px;
+		font-size: 14px;
+		display: flex;
+		position: -webkit-sticky;
+		position: sticky;
+		box-sizing: border-box;
+		min-width: 100%;
+		overflow-x: auto;
 	}
 
-	.avatar {
-		width: 70rpx;
-		height: 70rpx;
-		background: #3489ff;
-		text-align: center;
-		line-height: 70rpx;
-		border-radius: 15rpx;
-		font-size: 26rpx;
-		color: #fff;
+	.pur-body {
+		height: calc(100% - 88upx);
+		overflow: auto
 	}
+}
 
-	.popup-content {
-		width: 750rpx;
-		height: 500rpx;
-		z-index: 99999;
-		background-color: #fff
-	}
+.avatar {
+	width: 70rpx;
+	height: 70rpx;
+	background: #3489ff;
+	text-align: center;
+	line-height: 70rpx;
+	border-radius: 15rpx;
+	font-size: 26rpx;
+	color: #fff;
+}
 
-	.list-bottom {
-		position: fixed;
-		height: 150rpx;
-		background-color: #FFFFFF;
-		width: 760rpx;
-		bottom: 0;
-		left: 0;
-		display: flex;
-		flex-direction: row;
-		flex-wrap: nowrap;
-		font-size: 20rpx;
-		justify-content: space-between;
-		padding: 50rpx 30rpx;
-	}
+.popup-content {
+	width: 750rpx;
+	height: 500rpx;
+	z-index: 99999;
+	background-color: #fff
+}
 
-	.list-bottom-queding {
-		color: #007AFF;
+.list-bottom {
+	position: fixed;
+	height: 150rpx;
+	background-color: #FFFFFF;
+	width: 760rpx;
+	bottom: 0;
+	left: 0;
+	display: flex;
+	flex-direction: row;
+	flex-wrap: nowrap;
+	font-size: 20rpx;
+	justify-content: space-between;
+	padding: 50rpx 30rpx;
+}
 
-	}
+.list-bottom-queding {
+	color: #007AFF;
 
-	.list-bottom-lianxi {
-		display: flex;
-		flex-direction: row;
-	}
+}
 
-	.search {
-		position: relative;
-		width: 700rpx;
-		height: 80rpx;
-		box-sizing: border-box;
-		line-height: 80rpx;
-		background: #f1f0f5;
-		border-radius: 26rpx;
-		margin-left: 15%;
+.list-bottom-lianxi {
+	display: flex;
+	flex-direction: row;
+}
 
+.search {
+	position: relative;
+	width: 700rpx;
+	height: 80rpx;
+	box-sizing: border-box;
+	line-height: 80rpx;
+	background: #f1f0f5;
+	border-radius: 26rpx;
+	margin-left: 15%;
 
-	}
 
-	.fdj {
-		position: absolute;
-		top: 35rpx;
-		transform: translateY(-50%);
-		right: 70rpx;
-		color: #999;
-		font-size: 40rpx;
-	}
+}
 
-	.list {
-		width: 750rpx;
-	}
+.fdj {
+	position: absolute;
+	top: 35rpx;
+	transform: translateY(-50%);
+	right: 70rpx;
+	color: #999;
+	font-size: 40rpx;
+}
+
+.list {
+	width: 750rpx;
+}
 </style>