Browse Source

车辆保养,出差申请,外出申请

sangwenwei 1 year ago
parent
commit
4587b31527

+ 39 - 0
src/api/jy/DriveInfoService.js

@@ -0,0 +1,39 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class DriveInfoService{
+	list (param) {
+		return request({
+			url: prefix +'/driveInfo/list',
+			method: 'get',
+			params: param
+		})
+	}
+
+	save (inputForm) {
+		return request({
+			url: prefix + `/driveInfo/saveOrUpdate`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	delete (ids) {
+		return request({
+			url: prefix+"/driveInfo/deleteById",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/driveInfo/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+
+
+}

+ 54 - 0
src/api/jy/DriveMaintainService.js

@@ -0,0 +1,54 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class DriveMaintainService{
+	list (param) {
+		return request({
+			url: prefix +'/driveMaintain/list',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/driveMaintain/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/driveMaintain/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/driveMaintain/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	delete (ids) {
+		return request({
+			url: prefix+"/driveMaintain/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+	updateInfo(inputForm) {
+		return request({
+			url: prefix + `/driveMaintain/updateInfo`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+
+
+}

+ 53 - 0
src/api/jy/EvectionService.js

@@ -0,0 +1,53 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class EvectionService{
+	list (param) {
+		return request({
+			url: prefix +'/evection/evectionList',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/evection/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/evection/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/evection/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	delete (ids) {
+		return request({
+			url: prefix+"/evection/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/evection/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+}

+ 53 - 0
src/api/jy/GoOutService.js

@@ -0,0 +1,53 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class GoOutService{
+	list (param) {
+		return request({
+			url: prefix +'/goOut/goOutList',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/goOut/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/goOut/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/goOut/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	delete (ids) {
+		return request({
+			url: prefix+"/goOut/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/goOut/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+}

+ 7 - 1
src/views/flowable/task/TaskForm.vue

@@ -708,6 +708,9 @@ export default {
 		// Process_1699843592979 嘉溢-发起通知
 		// Process_1701066187037 嘉溢-用车申请
 		// Process_1701066623812 嘉溢-用车结算
+		// Process_1701332165234 嘉溢-车辆维护
+		// Process_1701396100594 嘉溢-出差申请
+		// Process_1701410671521 嘉溢-外出申请
 
 		// 驳回
 		reject(vars) {
@@ -760,7 +763,10 @@ export default {
 				this.procDefId.includes('Process_1699428058248') ||
 				this.procDefId.includes('Process_1699843592979') ||
 				this.procDefId.includes('Process_1701066187037') ||
-				this.procDefId.includes('Process_1701066623812')
+				this.procDefId.includes('Process_1701066623812') ||
+				this.procDefId.includes('Process_1701332165234') ||
+				this.procDefId.includes('Process_1701396100594') ||
+				this.procDefId.includes('Process_1701410671521')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 7 - 6
src/views/jy/drive/DriveApplyForm.vue

@@ -143,12 +143,13 @@
 					projectList:[],
 					files: [], // 附件信息
 					procInsId: '',
+					useDate:[],
 				},
 				baseKey: '',
 				keyWatch: '',
 				dateList:[],
 				programRow:'',
-				useDate:[],
+
 			}
 		},
 		DriveService:null,
@@ -306,9 +307,9 @@
 					// 暂存
 					this.loading = true
 					this.inputForm.status = '1'
-					if (this.useDate !== undefined ||this.useDate !== null || this.useDate.length !== 0){
-						this.inputForm.useStartTime=this.useDate[0]
-						this.inputForm.useEndTime=this.useDate[1]
+					if (this.inputForm.useDate !== undefined ||this.inputForm.useDate !== null || this.inputForm.useDate.length !== 0){
+						this.inputForm.useStartTime=this.inputForm.useDate[0]
+						this.inputForm.useEndTime=this.inputForm.useDate[1]
 					}
 					if (this.$refs.uploadComponent.checkProgress()) {
 						this.loading = false
@@ -327,7 +328,7 @@
 						this.$message.error('请选择用车项目')
 						this.loading = false
 					}
-					if (this.useDate == undefined ||this.useDate == null || this.useDate.length <= 0 ) {
+					if (this.inputForm.useDate == undefined ||this.inputForm.useDate == null || this.inputForm.useDate.length <= 0 ) {
 						this.$message.error('请选择用车时间')
 						this.loading = false
 					}
@@ -440,7 +441,7 @@
 			insertEvent(type) {
 				if (type === 'base') {
 					if (this.inputForm.projectList.length>=1){
-						if (this.commonJS.isEmpty(this.inputForm.projectList[0].id)){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
 							this.$message.error('第一行不能为空')
 							return
 						}

+ 3 - 5
src/views/jy/drive/DriveEditForm.vue

@@ -218,7 +218,7 @@
 					remarks: '',
 					projectList:[],
 					files: [], // 附件信息
-
+					useDate:[],
 					procInsId: '',
 					contractProper: [],
 					status:''
@@ -234,7 +234,7 @@
 				keyWatch: '',
 				dateList:[],
 				programRow:'',
-				useDate:[],
+
 				activeName1: 'accountFiles',
 			}
 		},
@@ -446,11 +446,9 @@
 						this.inputForm.useEndTime=this.inputForm.useDate[1]
 						let param={driveApplyDTO : this.inputForm, driveAccountDTO:this.accountForm}
 						this.driveService.adminEditForm(param).then((data) => {
-							callback(data.businessTable, data.businessId, this.inputForm)
-							this.$refs.inputForm.resetFields()
-							this.$refs.accountForm.resetFields()
 							this.loading = false
 							this.visible = false
+							this.$emit('refreshList')
 						}).catch(() => {
 							this.$refs.inputForm.resetFields()
 							this.$refs.accountForm.resetFields()

+ 1 - 1
src/views/jy/drive/DriveList.vue

@@ -125,7 +125,7 @@
 			</div>
 		</div>
 
-		<DriveEditForm ref="driveEditForm"></DriveEditForm>
+		<DriveEditForm ref="driveEditForm" @refreshList="refreshList"></DriveEditForm>
 		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
 	</div>
 

+ 115 - 0
src/views/jy/driveInfo/DriveInfoAddForm.vue

@@ -0,0 +1,115 @@
+<template>
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="500px"
+			@close="close"
+			@keyup.enter.native="doSubmit"
+			v-model="visible">
+			<el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+					 label-width="100px" @submit.native.prevent>
+				<el-row  :gutter="15">
+					<el-col :span="21">
+						<el-form-item label="车牌号" prop="driveNumber"
+									  :rules="[
+                          {required: true, message:'车牌号不能为空', trigger:'blur'}
+                 ]">
+							<el-input v-model="inputForm.driveNumber" placeholder="请填写车牌号"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="21">
+						<el-form-item label="车辆识别号" prop="driveIdentifyNumber"
+									  :rules="[
+                 ]">
+							<el-input v-model="inputForm.driveIdentifyNumber" placeholder="请填写车辆识别号"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+			<span  class="dialog-footer">
+			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import DriveInfoService from '@/api/jy/DriveInfoService'
+	export default {
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					id:'',
+					driveNumber: '',
+					driveIdentifyNumber: '',
+				}
+			}
+		},
+		DriveInfoService: null,
+		created () {
+			this.driveInfoService = new DriveInfoService()
+		},
+		methods: {
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					id:'',
+					driveNumber: '',
+					driveIdentifyNumber: '',
+				}
+				if (method === 'add') {
+					this.title = `新建车辆信息`
+				} else if (method === 'edit') {
+					this.inputForm.id = id
+					this.title = '修改车辆信息'
+				} else if (method === 'view') {
+					this.inputForm.id = id
+					this.title = '查看车辆信息'
+				}
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					if (method === 'edit' || method === 'view') { // 修改或者查看
+						this.loading = true
+						this.driveInfoService.queryById(this.inputForm.id).then((data) => {
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+							this.loading = false
+						})
+					}
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						this.driveInfoService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.visible = false
+			}
+		}
+	}
+</script>

+ 150 - 0
src/views/jy/driveInfo/DriveInfoDia.vue

@@ -0,0 +1,150 @@
+<template>
+	<div>
+		<el-dialog
+			title="车辆信息"
+			:close-on-click-modal="false"
+			draggable
+			width="1000px"
+			append-to-body
+			height="500px"
+			@close="close"
+			@keyup.enter.native="getDrive"
+			v-model="visible">
+			<div style="height: calc(100%);">
+				<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+					<!-- 搜索框-->
+					<el-form-item prop="driveNumber">
+						<el-input v-model="searchForm.driveNumber" placeholder="请输入车牌号" clearable></el-input>
+					</el-form-item>
+					<el-form-item prop="driveIdentifyNumber">
+						<el-input v-model="searchForm.driveIdentifyNumber" placeholder="请输入车辆识别号" clearable></el-input>
+					</el-form-item>
+					<el-form-item>
+						<el-button type="primary" @click="refreshList()"  icon="el-icon-search">查询</el-button>
+						<el-button @click="resetSearch()"  icon="el-icon-refresh-right">重置</el-button>
+					</el-form-item>
+				</el-form>
+
+					<vxe-table
+						border="inner"
+						auto-resize
+						resizable
+						height="300"
+						:loading="loading"
+						size="small"
+						ref="driveTable"
+						show-header-overflow
+						show-overflow
+						highlight-hover-row
+						:menu-config="{}"
+						@sort-change="sortChangeHandle"
+						:sort-config="{remote:true}"
+						:data="dataList"
+						:tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+						:checkbox-config="{}">
+						<vxe-column type="seq" width="60" title="序号"></vxe-column>
+						<vxe-column type="radio" width="50"></vxe-column>
+						<vxe-column min-width="200" title="车牌号" field="driveNumber"></vxe-column>
+						<vxe-column min-width="200" title="车辆识别号" field="driveIdentifyNumber"></vxe-column>
+					</vxe-table>
+
+
+				<vxe-pager
+					background
+					size="small"
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+			<span slot="footer" class="dialog-footer">
+      			<el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+				<el-button size="small" type="primary" v-if="method != 'view'" @click="getDrive()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+   	 		</span>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import DriveInfoService from '@/api/jy/DriveInfoService'
+	export default {
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				dataList: [],
+				searchForm: {
+					driveNumber: '',
+					driveIdentifyNumber: ''
+				},
+
+			}
+		},
+		DriveInfoService: null,
+		created () {
+			this.driveInfoService = new DriveInfoService()
+		},
+		components: {
+		},
+		methods: {
+			init () {
+				this.visible = true
+				this.list()
+			},
+			// 表单提交
+			getDrive () {
+				let row = this.$refs.driveTable.getRadioRecord()
+				if (this.commonJS.isEmpty(row)) {
+					this.$message.error('请至少选择一条数据')
+				} else {
+					this.close()
+					this.$emit('getDrive', row)
+				}
+
+			},
+			list () {
+				this.loading = true
+				this.driveInfoService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+			},
+			// 当前页
+			currentChangeHandle ({currentPage, pageSize}) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.list()
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.list()
+			},
+			close () {
+				this.$refs.searchForm.resetFields()
+				this.visible = false
+			}
+		}
+	}
+</script>
+<style>
+	.messageZindex {
+		z-index:9999 !important;
+	}
+</style>

+ 168 - 0
src/views/jy/driveInfo/DriveInfoList.vue

@@ -0,0 +1,168 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item prop="driveNumber">
+				<el-input v-model="searchForm.driveNumber" placeholder="请输入车牌号" clearable></el-input>
+			</el-form-item>
+			<el-form-item prop="driveIdentifyNumber">
+				<el-input v-model="searchForm.driveIdentifyNumber" placeholder="请输入车辆识别号" clearable></el-input>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="primary" @click="refreshList()"  icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()"  icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button  type="primary"  icon="el-icon-plus" @click="add()">新建</el-button>
+<!--					<el-button  type="danger"   icon="el-icon-delete" @click="del()" :disabled="$refs.typeDictTable && $refs.typeDictTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+				</template>
+			</vxe-toolbar>
+			<div class="jp-table-body">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					size="small"
+					ref="typeDictTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="350" title="车牌号" field="driveNumber"></vxe-column>
+					<vxe-column min-width="350" title="车辆识别号" field="driveIdentifyNumber"></vxe-column>
+					<vxe-column title="操作" width="230px" fixed="right" align="center">
+						<template  #default="scope">
+							<el-button    @click="edit(scope.row.id)">修改</el-button>
+							<el-button    @click="del(scope.row.id)">删除</el-button>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				        <vxe-pager
+				          background
+				          size="small"
+				          :current-page="tablePage.currentPage"
+				          :page-size="tablePage.pageSize"
+				          :total="tablePage.total"
+				          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				          @page-change="currentChangeHandle">
+				        </vxe-pager>
+			</div>
+		</div>
+		<DriveInfoAddForm  ref="driveInfoAddForm" @refreshDataList="refreshList"></DriveInfoAddForm>
+	</div>
+</template>
+
+<script>
+	import DriveInfoService from '@/api/jy/DriveInfoService'
+	import DriveInfoAddForm from './DriveInfoAddForm'
+	export default {
+		data () {
+			return {
+				searchForm: {
+					driveNumber: '',
+					driveIdentifyNumber: ''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false
+			}
+		},
+		DriveInfoService: null,
+		created () {
+			this.driveInfoService = new DriveInfoService()
+		},
+		components: {
+			DriveInfoAddForm
+		},
+		mounted () {
+			this.refreshList()
+		},
+		methods: {
+			// 新增
+			add () {
+				this.$refs.driveInfoAddForm.init('add', '')
+			},
+			// 修改
+			edit (id) {
+				id = id || this.$refs.typeDictTable.getCheckboxRecords().map(item => {
+					return item.id
+				})[0]
+				this.$refs.driveInfoAddForm.init('edit', id)
+			},
+			// 查看
+			view (id) {
+				this.$refs.driveInfoAddForm.init('view', id)
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.driveInfoService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+					this.$nextTick(() => {
+						this.$refs.typeDictTable.setAllTreeExpand(true)
+					})
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.typeDictTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.driveInfoService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			}
+		}
+	}
+</script>

+ 431 - 0
src/views/jy/driveMaintain/DriveMaintain.vue

@@ -0,0 +1,431 @@
+<template>
+	<div class="page">
+		<el-form :inline="true"  v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="维护车辆" prop="driveNumber">
+				<el-input size="default" v-model="searchForm.driveNumber" placeholder="维护车辆" clearable></el-input>
+			</el-form-item>
+			<el-form-item label="维护类型" prop="driveMaintainType">
+				<el-select size="default" v-model="searchForm.driveMaintainType" placeholder="维护类型" clearable>
+					<el-option
+						v-for="item in $dictUtils.getDictList('jy_drive_maintain_type')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="维护时间" prop="dates">
+				<el-date-picker
+					v-model="searchForm.dates"
+					type="daterange"
+					start-placeholder="请选择开始时间"
+					end-placeholder="请选择结束时间"
+					value-format="YYYY-MM-DD">
+				</el-date-picker>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('drive:info:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+				</template>
+				<template #tools>
+					<vxe-button
+						text
+						type="primary"
+						:title="searchVisible ? '收起检索' : '展开检索'"
+						icon="vxe-icon-search"
+						class="tool-btn"
+						@click="searchVisible = !searchVisible"
+					></vxe-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="维护车辆" field="driveNumber">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.driveNumber}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="维护类型" field="driveMaintainType">
+						<template #default="scope">
+							{{ $dictUtils.getDictLabel("jy_drive_maintain_type", scope.row.driveMaintainType, '-') }}
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="维护开始时间" field="startTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="维护结束时间" field="endTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="status" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+
+		<DriveMaintainDia ref="driveMaintainDia" @refreshList="refreshList"></DriveMaintainDia>
+	</div>
+
+</template>
+
+<script>
+	import DriveMaintainService from '@/api/jy/DriveMaintainService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import DriveMaintainDia from './DriveMaintainDia'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					driveNumber: '',
+					driveMaintainType: '',
+					dates:[]
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				processDefinitionIdAccount:'',
+				procDefKey: '',
+				procDefKeyAccount: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		DriveMaintainService:null,
+		created () {
+			this.driveMaintainService=new DriveMaintainService()
+		},
+		components: {
+			DriveMaintainDia
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-车辆维护】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-车辆维护]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/driveMaintain/DriveMaintain'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢-车辆维护】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-车辆维护]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'jy_drive_maintain',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'jy_drive_maintain',
+							isShow: false,
+							routePath: '/jy/driveMaintain/DriveMaintain'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.driveMaintainDia.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.driveMaintainService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-车辆维护').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.driveService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.driveInfoId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.driveMaintainService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '车辆维护' + '流程详情',
+									formTitle: '车辆维护' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.driveMaintainService.queryById(row.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {status: '3', id: row.id}
+								this.driveMaintainService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.driveMaintainService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.driveMaintainService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/driveMaintain/DriveMaintain',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+			adminEdit(row){
+				this.$refs.driveMaintainDia.init('edit',row.id);
+			},
+
+
+
+
+
+		}
+	}
+</script>

+ 409 - 0
src/views/jy/driveMaintain/DriveMaintainAddForm.vue

@@ -0,0 +1,409 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="维护车辆" prop="driveNumber"
+								  :rules="[ {required: true, message:'维护车辆不能为空', trigger:'change'}]">
+						<el-input @focus="openDriveInfo" placeholder="请填写维护车辆" :readonly="true" v-model="inputForm.driveNumber" clearable/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="维护起止时间" prop="maintainDates"
+								  :rules="[
+
+								  {required: true, message:'维护时间不能为空', trigger:'change'}]">
+						<el-date-picker
+							v-model="inputForm.maintainDates"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+							@change="checkDate"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="维护类型" prop="driveMaintainType"
+								  :rules="[ {required: true, message:'维护类型不能为空', trigger:'blur'}]">
+						<el-select style="width:100%;" v-model="inputForm.driveMaintainType" placeholder="维护类型" clearable>
+							<el-option
+								v-for="item in $dictUtils.getDictList('jy_drive_maintain_type')"
+								:key="item.value"
+								:label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<DriveInfoDia ref="driveInfoDia" @getDrive="getDrive"></DriveInfoDia>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import DriveMaintainService from '@/api/jy/DriveMaintainService'
+	import { ElDatePicker } from 'element-plus';
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import DriveInfoDia from '../driveInfo/DriveInfoDia'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					driveNumber:'',
+					driveInfoId: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					driveMaintainType:'',
+					files: [], // 附件信息
+					procInsId: '',
+					status:'',
+					maintainDates:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		DriveMaintainService:null,
+		commonApi: null,
+		created () {
+			this.driveMaintainService=new DriveMaintainService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			UpLoadComponent,
+			DriveInfoDia,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					driveNumber:'',
+					driveInfoId: '',
+					maintainDates:[],
+					remarks: '',
+					driveMaintainType:'',
+					files: [], // 附件信息
+					procInsId: '',
+					status:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.driveMaintainService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'driveMaintain',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.driveMaintainService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.maintainDates !== undefined ||this.maintainDates !== null || this.maintainDates.length !== 0){
+						this.inputForm.startTime=this.maintainDates[0]
+						this.inputForm.endTime=this.maintainDates[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.driveMaintainService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.maintainDates == undefined ||this.inputForm.maintainDates == null || this.inputForm.maintainDates.length <= 0 ) {
+						this.$message.error('请选择维护时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.driveNumber)){
+						this.$message.error('请选择维护车辆')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.driveMaintainType)){
+						this.$message.error('请选择维护类型')
+						this.loading = false
+					}
+					this.inputForm.startTime=this.inputForm.maintainDates[0]
+					this.inputForm.endTime=this.inputForm.maintainDates[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.driveMaintainService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.driveMaintainService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.driveMaintainService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+
+			openDriveInfo() {
+				console.log('23123123')
+				this.$refs.driveInfoDia.init()
+			},
+			getDrive(rows) {
+				console.log('1',rows)
+				this.inputForm.driveInfoId=rows.id
+				this.inputForm.driveNumber=rows.driveNumber
+
+
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 434 - 0
src/views/jy/driveMaintain/DriveMaintainDia.vue

@@ -0,0 +1,434 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1300px"
+			@close="close"
+			@keyup.enter.native=""
+			v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method === 'view'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="维护车辆" prop="driveNumber"
+								  :rules="[ {required: true, message:'维护车辆不能为空', trigger:'change'}]">
+						<el-input  @focus="openDriveInfo" placeholder="请填写维护车辆" :readonly="true" v-model="inputForm.driveNumber" clearable/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="维护起止时间" prop="maintainDates"
+								  :rules="[
+
+								  {required: true, message:'维护时间不能为空', trigger:'change'}]">
+						<el-date-picker
+							v-model="inputForm.maintainDates"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+							@change="checkDate"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="维护类型" prop="driveMaintainType"
+								  :rules="[ {required: true, message:'维护类型不能为空', trigger:'blur'}]">
+						<el-select style="width:100%;" v-model="inputForm.driveMaintainType" placeholder="维护类型" clearable>
+							<el-option
+								v-for="item in $dictUtils.getDictList('jy_drive_maintain_type')"
+								:key="item.value"
+								:label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<DriveInfoDia ref="driveInfoDia" @getDrive="getDrive"></DriveInfoDia>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import DriveMaintainService from '@/api/jy/DriveMaintainService'
+	import { ElDatePicker } from 'element-plus';
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import DriveInfoDia from '../driveInfo/DriveInfoDia'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				visible: false,
+				inputForm: {
+					id: '',
+					driveNumber:'',
+					driveInfoId: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					driveMaintainType:'',
+					files: [], // 附件信息
+					procInsId: '',
+					status:'',
+					maintainDates:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		DriveMaintainService:null,
+		commonApi: null,
+		created () {
+			this.driveMaintainService=new DriveMaintainService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			UpLoadComponent,
+			DriveInfoDia,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					driveNumber:'',
+					driveInfoId: '',
+					maintainDates:[],
+					remarks: '',
+					driveMaintainType:'',
+					files: [], // 附件信息
+					procInsId: '',
+					status:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.visible=true
+				if (method === 'edit') {
+					this.title = '修改车辆维护信息'
+				} else if (method === 'view') {
+					this.title = '查看车辆维护信息'
+				}
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.driveMaintainService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'driveMaintain',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.driveMaintainService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.maintainDates !== undefined ||this.maintainDates !== null || this.maintainDates.length !== 0){
+						this.inputForm.startTime=this.maintainDates[0]
+						this.inputForm.endTime=this.maintainDates[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.driveMaintainService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.maintainDates == undefined ||this.inputForm.maintainDates == null || this.inputForm.maintainDates.length <= 0 ) {
+						this.$message.error('请选择维护时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.driveNumber)){
+						this.$message.error('请选择维护车辆')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.driveMaintainType)){
+						this.$message.error('请选择维护类型')
+						this.loading = false
+					}
+					this.inputForm.startTime=this.inputForm.maintainDates[0]
+					this.inputForm.endTime=this.inputForm.maintainDates[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inputForm.startTime=this.inputForm.maintainDates[0]
+						this.inputForm.endTime=this.inputForm.maintainDates[1]
+						this.inputForm.files = this.$refs.uploadComponent.getDataList()
+						this.driveMaintainService.updateInfo(this.inputForm).then((data) => {
+							this.visible = false
+							this.$emit('refreshList')
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+							this.visible = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.driveMaintainService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.driveMaintainService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.driveMaintainService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+
+			openDriveInfo() {
+				console.log('23123123')
+				this.$refs.driveInfoDia.init()
+			},
+			getDrive(rows) {
+				console.log('1',rows)
+				this.inputForm.driveInfoId=rows.id
+				this.inputForm.driveNumber=rows.driveNumber
+
+
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 553 - 0
src/views/jy/evection/EvectionEditForm.vue

@@ -0,0 +1,553 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1300px"
+			@close="close"
+			@keyup.enter.native=""
+			v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method === 'view'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>用车项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="method === 'view'"  @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						:disabled="method === 'view'"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input :disabled="method === 'view'"   @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="method === 'view'"  type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="出差人员" prop="evectionMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.evectionMen"
+											 @update:modelValue='(value) => {inputForm.evectionMen = value}'></UserSelectSignatory>					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出差起止时间" prop="useDate"
+								  :rules="[
+								  {required: true, message:'用车起止时间不能为空', trigger:'blur'}]">
+						<el-date-picker
+							v-model="inputForm.useDate"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item prop="targetCity" label="目的地"
+								  :rules="[ {required: true, message:'目的地不能为空', trigger:'blur'}]">
+						<SelectTree
+							ref="areaTree"
+							:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+							url="/system-server/sys/area/treeData"
+							:value="inputForm.targetCity"
+							:clearable="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.targetCity=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="出差原因" prop="evectionReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.evectionReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+		</el-form>
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import EvectionService from '@/api/jy/EvectionService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				visible: false,
+				inputForm: {
+					id: '',
+					evectionMen:'',
+					evectionReason: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+					useDate:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		EvectionService:null,
+		commonApi: null,
+		created () {
+			this.evectionService=new EvectionService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.visible= true
+				if (method === 'edit'){
+					this.title = '修改出差信息'
+				}else if (method === 'view'){
+					this.title = '查看出差信息'
+				}
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.evectionService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'evection',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.evectionService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.inputForm.useDate !== undefined ||this.inputForm.useDate !== null || this.inputForm.useDate.length !== 0){
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.evectionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择用车项目')
+						this.loading = false
+					}
+					if (this.inputForm.useDate == undefined ||this.inputForm.useDate == null || this.inputForm.useDate.length <= 0 ) {
+						this.$message.error('请选择用车时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionMen)){
+						this.$message.error('请选择出差人员')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionReason)){
+						this.$message.error('请选择出差原因')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.targetCity)){
+						this.$message.error("请选择目的地")
+						this.loading=false
+					}
+					this.inputForm.startTime=this.inputForm.useDate[0]
+					this.inputForm.endTime=this.inputForm.useDate[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+						this.evectionService.adminEditForm(this.inputForm).then((data) => {
+							this.visible = false
+							this.$emit('refreshList')
+
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.evectionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.evectionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 532 - 0
src/views/jy/evection/EvectionForm.vue

@@ -0,0 +1,532 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>关联项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input  :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="出差人员" prop="evectionMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.evectionMen"
+											 @update:modelValue='(value) => {inputForm.evectionMen = value}'></UserSelectSignatory>					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出差起止时间" prop="useDate"
+								  :rules="[
+								  {required: true, message:'用车起止时间不能为空', trigger:'blur'}]">
+						<el-date-picker
+							v-model="inputForm.useDate"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item prop="targetCity" label="目的地"
+								  :rules="[ {required: true, message:'目的地不能为空', trigger:'blur'}]">
+						<SelectTree
+							ref="areaTree"
+							:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+							url="/system-server/sys/area/treeData"
+							:value="inputForm.targetCity"
+							:clearable="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.targetCity=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="出差原因" prop="evectionReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.evectionReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import EvectionService from '@/api/jy/EvectionService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					evectionMen:'',
+					evectionReason: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+					useDate:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		EvectionService:null,
+		commonApi: null,
+		created () {
+			this.evectionService=new EvectionService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.evectionService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'evection',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.evectionService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.inputForm.useDate !== undefined ||this.inputForm.useDate !== null || this.inputForm.useDate.length !== 0){
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.evectionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择用车项目')
+						this.loading = false
+					}
+					if (this.inputForm.useDate == undefined ||this.inputForm.useDate == null || this.inputForm.useDate.length <= 0 ) {
+						this.$message.error('请选择用车时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionMen)){
+						this.$message.error('请选择出差人员')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionReason)){
+						this.$message.error('请选择出差原因')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.targetCity)){
+						this.$message.error("请选择目的地")
+						this.loading=false
+					}
+					this.inputForm.startTime=this.inputForm.useDate[0]
+					this.inputForm.endTime=this.inputForm.useDate[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.evectionService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.evectionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.evectionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 486 - 0
src/views/jy/evection/EvectionList.vue

@@ -0,0 +1,486 @@
+<template>
+	<div class="page">
+		<el-form :inline="true"  v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="关联项目" prop="projectName">
+				<el-input :limit="1" @focus="openProgramPageForm" placeholder="请填写项目名称" :readonly="true" :modelValue="searchForm.projectName"/>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="出差人员" prop="evectionMen">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.evectionMen"
+									 @update:modelValue='(value) => {searchForm.evectionMen = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem" label="申请人" prop="createById">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.createById"
+									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem"  prop="officeId" label="申请人部门">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.officeId"
+					size="default"
+					:accordion="true"
+					@getValue="(value) => {searchForm.officeId=value}"/>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="申请时间" prop="createDates">
+				<el-date-picker
+					placement="bottom-start"
+					format="YYYY-MM-DD"
+					value-format="YYYY-MM-DD"
+					v-model="searchForm.createDates"
+					type="daterange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" prop="targetCity" label="目的地">
+				<SelectTree
+					ref="areaTree"
+					:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+					url="/system-server/sys/area/treeData"
+					:value="searchForm.targetCity"
+					:clearable="true"
+					:accordion="true"
+					size="default"
+					@getValue="(value) => {searchForm.targetCity=value}"/>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('evection:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+				</template>
+				<template #tools>
+					<vxe-button
+						text
+						type="primary"
+						:title="searchVisible ? '收起检索' : '展开检索'"
+						icon="vxe-icon-search"
+						class="tool-btn"
+						@click="searchVisible = !searchVisible"
+					></vxe-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="项目" field="projectName">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.projectName}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="出差人员" field="userName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="出差开始时间" field="startTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="出差结束时间" field="endTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="目的地" field="cityName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人部门" field="officeName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="status" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+		<EvectionEditForm ref="evectionEditForm" @refreshList="refreshList"></EvectionEditForm>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import EvectionService from '@/api/jy/EvectionService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import EvectionEditForm from './EvectionEditForm'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					projectId: '',
+					projectName: '',
+					evectionMen: '',
+					officeId: '',
+					createById: '',
+					createDates:[],
+					targetCity:''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		EvectionService:null,
+		created () {
+			this.evectionService=new EvectionService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			ProjectForm,
+			UserSelectSignatory,
+			EvectionEditForm
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-出差申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-出差申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/evection/EvectionList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢- 出差申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-出差申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'jy_evection',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'jy_evection',
+							isShow: false,
+							routePath: '/jy/evection/EvectionList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.evectionEditForm.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.evectionService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-出差申请').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.evectionService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.evectionService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '出差申请' + '流程详情',
+									formTitle: '出差申请' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.evectionService.queryById(row.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {status: '3', id: row.id}
+								this.evectionService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.evectionService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.evectionService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/evection/EvectionList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+
+			adminEdit(row){
+				this.$refs.evectionEditForm.init('edit',row.id);
+			},
+			openProgramPageForm() {
+				this.$refs.projectForm.init('1',false)
+			},
+			getProgram(row){
+				console.log('row',row)
+				row.forEach(item=>{
+					this.searchForm.projectId = item.id
+					this.searchForm.projectName=item.name
+				})
+
+			}
+
+
+
+
+		}
+	}
+</script>

+ 553 - 0
src/views/jy/goOut/GoOutEditForm.vue

@@ -0,0 +1,553 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1300px"
+			@close="close"
+			@keyup.enter.native=""
+			v-model="visible">
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method === 'view'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>用车项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="method === 'view'"  @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						:disabled="method === 'view'"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input :disabled="method === 'view'"   @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="method === 'view'"  type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="出差人员" prop="outMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.outMen"
+											 @update:modelValue='(value) => {inputForm.outMen = value}'></UserSelectSignatory>					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出差起止时间" prop="useDate"
+								  :rules="[
+								  {required: true, message:'用车起止时间不能为空', trigger:'blur'}]">
+						<el-date-picker
+							v-model="inputForm.useDate"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item prop="targetCity" label="目的地"
+								  :rules="[ {required: true, message:'目的地不能为空', trigger:'blur'}]">
+						<SelectTree
+							ref="areaTree"
+							:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+							url="/system-server/sys/area/treeData"
+							:value="inputForm.targetCity"
+							:clearable="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.targetCity=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="出差原因" prop="outReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.outReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+		</el-form>
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import GoOutService from '@/api/jy/GoOutService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				visible: false,
+				inputForm: {
+					id: '',
+					outMen:'',
+					outReason: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+					useDate:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		GoOutService:null,
+		commonApi: null,
+		created () {
+			this.goOutService=new GoOutService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					outMen:'',
+					outReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.visible= true
+				if (method === 'edit'){
+					this.title = '修改外出信息'
+				}else if (method === 'view'){
+					this.title = '查看外出信息'
+				}
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.goOutService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'goOut',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.evectionService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.evectionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.inputForm.useDate !== undefined ||this.inputForm.useDate !== null || this.inputForm.useDate.length !== 0){
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.evectionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择用车项目')
+						this.loading = false
+					}
+					if (this.inputForm.useDate == undefined ||this.inputForm.useDate == null || this.inputForm.useDate.length <= 0 ) {
+						this.$message.error('请选择用车时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionMen)){
+						this.$message.error('请选择出差人员')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.evectionReason)){
+						this.$message.error('请选择出差原因')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.targetCity)){
+						this.$message.error("请选择目的地")
+						this.loading=false
+					}
+					this.inputForm.startTime=this.inputForm.useDate[0]
+					this.inputForm.endTime=this.inputForm.useDate[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+						this.inputForm.files = this.$refs.uploadComponent.getDataList()
+						this.goOutService.adminEditForm(this.inputForm).then((data) => {
+							this.visible = false
+							this.$emit('refreshList')
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.evectionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.evectionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.evectionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 532 - 0
src/views/jy/goOut/GoOutForm.vue

@@ -0,0 +1,532 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="160px" @submit.native.prevent>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>关联项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input  :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="出差人员" prop="outMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.outMen"
+											 @update:modelValue='(value) => {inputForm.outMen = value}'></UserSelectSignatory>					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出差起止时间" prop="useDate"
+								  :rules="[
+								  {required: true, message:'用车起止时间不能为空', trigger:'blur'}]">
+						<el-date-picker
+							v-model="inputForm.useDate"
+							type="daterange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item prop="targetCity" label="目的地"
+								  :rules="[ {required: true, message:'目的地不能为空', trigger:'blur'}]">
+						<SelectTree
+							ref="areaTree"
+							:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+							url="/system-server/sys/area/treeData"
+							:value="inputForm.targetCity"
+							:clearable="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.targetCity=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="出差原因" prop="outReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.outReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import GoOutService from '@/api/jy/GoOutService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					outMen:'',
+					outReason: '',
+					startTime:'',
+					endTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+					useDate:[],
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+
+			}
+		},
+		GoOutService:null,
+		commonApi: null,
+		created () {
+			this.goOutService=new GoOutService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					outMen:'',
+					outReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					targetCity:'',
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.goOutService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'goOut',null,null,null,null,null)
+							this.loading = false
+						})
+
+					}
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.goOutService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.goOutService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.goOutService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.goOutService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.inputForm.useDate !== undefined ||this.inputForm.useDate !== null || this.inputForm.useDate.length !== 0){
+						this.inputForm.startTime=this.inputForm.useDate[0]
+						this.inputForm.endTime=this.inputForm.useDate[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.goOutService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择用车项目')
+						this.loading = false
+					}
+					if (this.inputForm.useDate == undefined ||this.inputForm.useDate == null || this.inputForm.useDate.length <= 0 ) {
+						this.$message.error('请选择用车时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.outMen)){
+						this.$message.error('请选择出差人员')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.outReason)){
+						this.$message.error('请选择出差原因')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.targetCity)){
+						this.$message.error("请选择目的地")
+						this.loading=false
+					}
+					this.inputForm.startTime=this.inputForm.useDate[0]
+					this.inputForm.endTime=this.inputForm.useDate[1]
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.goOutService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.goOutService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.goOutService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.goOutService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.goOutService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 486 - 0
src/views/jy/goOut/GoOutList.vue

@@ -0,0 +1,486 @@
+<template>
+	<div class="page">
+		<el-form :inline="true"  v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="关联项目" prop="projectName">
+				<el-input :limit="1" @focus="openProgramPageForm" placeholder="请填写项目名称" :readonly="true" :modelValue="searchForm.projectName"/>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="出差人员" prop="outMen">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.outMen"
+									 @update:modelValue='(value) => {searchForm.outMen = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem" label="申请人" prop="createById">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.createById"
+									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem"  prop="officeId" label="申请人部门">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.officeId"
+					size="default"
+					:accordion="true"
+					@getValue="(value) => {searchForm.officeId=value}"/>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="申请时间" prop="createDates">
+				<el-date-picker
+					placement="bottom-start"
+					format="YYYY-MM-DD"
+					value-format="YYYY-MM-DD"
+					v-model="searchForm.createDates"
+					type="daterange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" prop="targetCity" label="目的地">
+				<SelectTree
+					ref="areaTree"
+					:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+					url="/system-server/sys/area/treeData"
+					:value="searchForm.targetCity"
+					:clearable="true"
+					:accordion="true"
+					size="default"
+					@getValue="(value) => {searchForm.targetCity=value}"/>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('evection:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+				</template>
+				<template #tools>
+					<vxe-button
+						text
+						type="primary"
+						:title="searchVisible ? '收起检索' : '展开检索'"
+						icon="vxe-icon-search"
+						class="tool-btn"
+						@click="searchVisible = !searchVisible"
+					></vxe-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="项目" field="projectName">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.projectName}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="出差人员" field="userName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="出差开始时间" field="startTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="出差结束时间" field="endTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="目的地" field="cityName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人部门" field="officeName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="status" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+		<GoOutEditForm ref="goOutEditForm" @refreshList="refreshList"></GoOutEditForm>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import GoOutService from '@/api/jy/GoOutService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
+	import ProjectForm from '../drive/ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import GoOutEditForm from './GoOutEditForm'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					projectId: '',
+					projectName: '',
+					outMen: '',
+					officeId: '',
+					createById: '',
+					createDates:[],
+					targetCity:''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		GoOutService:null,
+		created () {
+			this.goOutService=new GoOutService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			ProjectForm,
+			UserSelectSignatory,
+			GoOutEditForm
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-外出申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-外出申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/goOut/GoOutList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢- 外出申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-外出申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'jy_go_out',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'jy_go_out',
+							isShow: false,
+							routePath: '/jy/goOut/GoOutList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.goOutEditForm.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.goOutService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-外出申请').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.goOutService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.goOutService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '外出申请' + '流程详情',
+									formTitle: '外出申请' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.goOutService.queryById(row.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {status: '3', id: row.id}
+								this.goOutService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.goOutService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.goOutService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/goOut/GoOutList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+
+			adminEdit(row){
+				this.$refs.goOutEditForm.init('edit',row.id);
+			},
+			openProgramPageForm() {
+				this.$refs.projectForm.init('1',false)
+			},
+			getProgram(row){
+				console.log('row',row)
+				row.forEach(item=>{
+					this.searchForm.projectId = item.id
+					this.searchForm.projectName=item.name
+				})
+
+			}
+
+
+
+
+		}
+	}
+</script>