ソースを参照

用车申请及用车结算

sangwenwei 1 年間 前
コミット
aa2bac27e9

+ 68 - 0
src/api/jy/DriveService.js

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

+ 8 - 0
src/api/jy/ProjectInfoService.js

@@ -68,6 +68,14 @@ export default class ProjectInfoService {
 		})
 	}
 
+	listByCreateOffice(param){
+		return request({
+			url: prefix + '/jyProject/getByCreateOffice',
+			method: 'get',
+			params: param
+		})
+	}
+
 	getByCreateOut(param){
 		return request({
 			url: prefix + '/jyProject/getByCreateOut',

+ 1 - 0
src/views/common/UpLoadComponent.vue

@@ -162,6 +162,7 @@
        *    showDivider=false时 ‘附件‘Divider隐藏
        */
       async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+      	console.log('fileList',fileList)
         await this.fileLoadingFalse()
         if (this.commonJS.isEmpty(fileList)) {
           this.fileLoading = true

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

@@ -706,6 +706,8 @@ export default {
 		// Process_1699235944179 嘉溢-环评项目资质
 		// Process_1699428058248 嘉溢-会议室预约
 		// Process_1699843592979 嘉溢-发起通知
+		// Process_1701066187037 嘉溢-用车申请
+		// Process_1701066623812 嘉溢-用车结算
 
 		// 驳回
 		reject(vars) {
@@ -756,7 +758,9 @@ export default {
 				this.procDefId.includes('Process_1698909233438') ||
 				this.procDefId.includes('Process_1699235944179') ||
 				this.procDefId.includes('Process_1699428058248') ||
-				this.procDefId.includes('Process_1699843592979')
+				this.procDefId.includes('Process_1699843592979') ||
+				this.procDefId.includes('Process_1701066187037') ||
+				this.procDefId.includes('Process_1701066623812')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 577 - 0
src/views/jy/drive/DriveAccountForm.vue

@@ -0,0 +1,577 @@
+<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':''"
+				 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="true" @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="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="true" @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="true" 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="useMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" :disabled="true" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.useMen"
+											 @update:modelValue='(value) => {inputForm.useMen = 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
+							:disabled="true"
+							v-model="inputForm.useDate"
+							type="datetimerange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							time-format="HH"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="用车原因" prop="useReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="true" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.useReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="true" type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.remarks" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+		</el-form>
+
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 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-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="开始里程数" prop="startMileage"
+								  :rules="[
+								  {required: true, message:'开始里程数不能为空', trigger:'blur'}]">
+						<el-input
+							v-on:input="inputForm.startMileage=inputForm.startMileage.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
+							placeholder="请输入开始里程数"
+							style="width:100%"
+							v-model="inputForm.startMileage"
+							clearable
+							></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="结束里程数" prop="endMileage"
+								  :rules="[{required: true, message:'结束里程数不能为空', trigger:'blur'}]">
+						<el-input
+							v-on:input="inputForm.endMileage=inputForm.endMileage.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							clearable
+							@blur="check" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" placeholder="请输入结束里程数"   style="width:100%" v-model="inputForm.endMileage" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="里程总数" prop="mileageCount"
+					>
+						<el-input  :disabled="true" style="width:100%" v-model="inputForm.mileageCount" ></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<el-tabs v-model="activeName1" type="border-card">
+				<el-tab-pane name="accountFiles">
+					<template v-slot:label>
+						<span><span style="color: red;border-top: 20px">*</span> 里程数附件信息</span>
+					</template>
+					<!--        合同文件-->
+					<UpLoadComponentAccount ref="upLoadComponentAccount"></UpLoadComponentAccount>
+				</el-tab-pane>
+			</el-tabs>
+		</el-form>
+
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import DriveService from '@/api/jy/DriveService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import UpLoadComponentAccount from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					applyId:'',
+					useMen:'',
+					useReason: '',
+					useStartTime:'',
+					useEndTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					accountFiles: [], // 附件信息
+					procInsId: '',
+					startMileage:'',
+					endMileage:'',
+					mileageCount:'',
+					contractProper: [],
+					status:''
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+				useDate:[],
+				activeName1: 'accountFiles',
+			}
+		},
+		DriveService:null,
+		commonApi: null,
+		created () {
+			this.driveService=new DriveService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			UpLoadComponentAccount
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					// this.$refs.upLoadComponentAccount.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)
+					this.$refs.upLoadComponentAccount.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				console.log('keyWatch',keyWatch)
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				console.log('casda a')
+				this.method = method
+				this.inputForm={
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					accountFiles: [], // 附件信息
+					procInsId: '',
+					startMileage:'',
+					endMileage:'',
+					contractProper: [],
+					mileageCount:'',
+					status:''
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					this.$refs.upLoadComponentAccount.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.driveService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							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, 'driveApply',null,null,null,null,null)
+							this.$refs.upLoadComponentAccount.newUpload(method, this.inputForm.accountFiles, 'driveAccount',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.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '0' && data.accountStatus !== '1' && data.accountStatus !== '3' && data.accountStatus !== '' && data.accountStatus !== null && data.accountStatus !== undefined) { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							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.driveService.queryById(this.inputForm.id).then((data) => {
+					if (data.accountStatus !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '5'
+						this.inputForm.applyId=this.inputForm.id
+						let param = {status: this.inputForm.status, applyId: this.inputForm.applyId}
+						this.inputForm=JSON.stringify(this.inputForm)
+						this.driveService.updateStatusByApplyId(param).then(() => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.driveService.queryById(this.inputForm.id).then((data) => {
+					if (data.accountStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				this.inputForm.applyId=this.inputForm.id
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.upLoadComponentAccount.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.accountFiles = this.$refs.upLoadComponentAccount.getDataList()
+					this.driveService.saveAccountForm(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.commonJS.isEmpty(this.inputForm.startMileage) || this.commonJS.isEmpty(this.inputForm.endMileage)){
+						this.$message.error('请输入里程数')
+						this.loading = false
+					}
+					this.inputForm.accountFiles = this.$refs.upLoadComponentAccount.getDataList()
+					if (this.inputForm.accountFiles.length === 0){
+						this.$message.error('请上传里程数图片')
+						this.loading = false
+						return
+					}
+					// 送审  待审核
+					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.driveService.saveAccountForm(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: '',
+					useMen:'',
+					useReason: '',
+					useStartTime:'',
+					useEndTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					accountFiles: [], // 附件信息
+					procInsId: '',
+					startMileage:'',
+					endMileage:'',
+					mileageCount:''
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				this.inputForm.applyId=this.inputForm.id
+				if (type === 'reject' || type === 'reback') {
+					this.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '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, applyId: this.inputForm.applyId}
+								this.driveService.updateStatusByApplyId(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							this.inputForm.applyId=this.inputForm.id
+							let param = {status: '1', applyId: this.inputForm.applyId}
+							this.driveService.updateStatusByApplyId(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
+			},
+			//计算所用里程数
+			check(){
+				let start=parseFloat(this.inputForm.startMileage)
+				let end=parseFloat(this.inputForm.endMileage)
+				if (end < start){
+					this.$message.error('结束里程数不能小于开始里程数')
+					return
+				}
+				let count=end-start
+				this.inputForm.mileageCount=count
+			}
+
+		}
+
+	}
+</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>

+ 508 - 0
src/views/jy/drive/DriveApplyForm.vue

@@ -0,0 +1,508 @@
+<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="useMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :modelValue="inputForm.useMen"
+											 @update:modelValue='(value) => {inputForm.useMen = 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="datetimerange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							time-format="HH"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="用车原因" prop="useReason"
+								  :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.useReason" 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 DriveService from '@/api/jy/DriveService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					useMen:'',
+					useReason: '',
+					useStartTime:'',
+					useEndTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+				useDate:[],
+			}
+		},
+		DriveService:null,
+		commonApi: null,
+		created () {
+			this.driveService=new DriveService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+		},
+		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: '',
+				}
+				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.driveService.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, 'driveApply',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.driveService.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.driveService.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.driveService.updateStatusById(param).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.driveService.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.useDate !== undefined ||this.useDate !== null || this.useDate.length !== 0){
+						this.inputForm.useStartTime=this.useDate[0]
+						this.inputForm.useEndTime=this.useDate[1]
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.driveService.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.useDate == undefined ||this.useDate == null || this.useDate.length <= 0 ) {
+						this.$message.error('请选择用车时间')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.useMen)){
+						this.$message.error('请选择用车人员')
+						this.loading = false
+					}
+					if (this.commonJS.isEmpty(this.inputForm.useReason)){
+						this.$message.error('请选择用车原因')
+						this.loading = false
+					}
+					this.inputForm.useStartTime=this.inputForm.useDate[0]
+					this.inputForm.useEndTime=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.driveService.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.driveService.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.driveService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.driveService.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.driveService.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].id)){
+							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>

+ 613 - 0
src/views/jy/drive/DriveEditForm.vue

@@ -0,0 +1,613 @@
+<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':''"
+				 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="useMen"
+								  :rules="[ {required: true, message:'用车人员不能为空', trigger:'blur'}]">
+						<UserSelectSignatory style="width: 100%"  ref="userSelect2" :disabled="method === 'view'"
+											 :readonly="true" :modelValue="inputForm.useMen"
+											 @update:modelValue='(value) => {inputForm.useMen = 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
+							:disabled="method === 'view'"
+							v-model="inputForm.useDate"
+							type="datetimerange"
+							start-placeholder="请选择开始时间"
+							end-placeholder="请选择结束时间"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							time-format="HH"
+						/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="用车原因" prop="useReason"
+								  :rules="[ {required: true, message:'用车原因不能为空', trigger:'blur'}]">
+						<el-input :disabled="method === 'view'"  type="textarea" placeholder="请输入说明"  maxlength="500"  style="width:100%" v-model="inputForm.useReason" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="24">
+					<el-form-item label="备注" prop="remarks"
+								  :rules="[ ]">
+						<el-input :disabled="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>
+
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+		</el-form>
+
+		<el-form :model="accountForm" ref="accountForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 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-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="开始里程数" prop="startMileage"
+								  :rules="[
+								  {required: true, message:'开始里程数不能为空', trigger:'blur'}]">
+						<el-input
+							v-on:input="accountForm.startMileage=accountForm.startMileage.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"
+							placeholder="请输入开始里程数"
+							style="width:100%"
+							v-model="accountForm.startMileage"
+							clearable
+							></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="结束里程数" prop="endMileage"
+								  :rules="[{required: true, message:'结束里程数不能为空', trigger:'blur'}]">
+						<el-input
+							v-on:input="accountForm.endMileage=accountForm.endMileage.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							clearable
+							@blur="check" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" placeholder="请输入结束里程数"   style="width:100%" v-model="accountForm.endMileage" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="里程总数" prop="mileageCount"
+					>
+						<el-input  :disabled="true" style="width:100%" v-model="accountForm.mileageCount" ></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<el-tabs v-model="activeName1" type="border-card">
+				<el-tab-pane name="accountFiles">
+					<template v-slot:label>
+						<span><span style="color: red;border-top: 20px">*</span> 里程数附件信息</span>
+					</template>
+					<!--        合同文件-->
+					<UpLoadComponentAccount ref="upLoadComponentAccount"></UpLoadComponentAccount>
+				</el-tab-pane>
+			</el-tabs>
+		</el-form>
+
+		<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 DriveService from '@/api/jy/DriveService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import UpLoadComponentAccount from '@/views/common/UpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	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: '',
+					useMen:'',
+					useReason: '',
+					useStartTime:'',
+					useEndTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+
+					procInsId: '',
+					contractProper: [],
+					status:''
+				},
+				accountForm:{
+					applyId:'',
+					startMileage:'',
+					endMileage:'',
+					mileageCount:'',
+					accountFiles: [], // 附件信息
+				},
+				baseKey: '',
+				keyWatch: '',
+				dateList:[],
+				programRow:'',
+				useDate:[],
+				activeName1: 'accountFiles',
+			}
+		},
+		DriveService:null,
+		commonApi: null,
+		created () {
+			this.driveService=new DriveService()
+			this.commonApi = new CommonApi()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			UpLoadComponentAccount,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					// this.$refs.upLoadComponentAccount.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()
+							this.$refs.accountForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+					this.$refs.upLoadComponentAccount.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				console.log('keyWatch',keyWatch)
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				console.log('casda a')
+				this.method = method
+				this.inputForm={
+					id: '',
+					useMen:'',
+					useReason: '',
+					useDate:[],
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					procInsId: '',
+					contractProper: [],
+					status:''
+				}
+				this.accountForm={
+					applyId:'',
+					startMileage:'',
+					endMileage:'',
+					mileageCount:'',
+					accountFiles: [], // 附件信息
+				}
+				this.inputForm.id = id
+				this.accountForm.applyId = id
+				this.loading = false
+				this.visible= true
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					this.$refs.upLoadComponentAccount.clearUpload()
+					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						console.log('this.inputForm.id', this.inputForm.id)
+						this.driveService.queryById(this.inputForm.id).then((data)=>{
+							this.inputForm = this.recover(this.inputForm, data)
+							this.accountForm = this.recover(this.accountForm, data)
+							console.log('s',this.inputForm)
+							console.log('sss',this.accountForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'driveApply',null,null,null,null,null)
+							this.$refs.upLoadComponentAccount.newUpload(method, this.accountForm.accountFiles, 'driveAccount',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.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '0' && data.accountStatus !== '1' && data.accountStatus !== '3' && data.accountStatus !== '' && data.accountStatus !== null && data.accountStatus !== undefined) { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							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.driveService.queryById(this.inputForm.id).then((data) => {
+					if (data.accountStatus !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '5'
+						this.inputForm.applyId=this.inputForm.id
+						let param = {status: this.inputForm.status, applyId: this.inputForm.applyId}
+						this.inputForm=JSON.stringify(this.inputForm)
+						this.driveService.updateStatusByApplyId(param).then(() => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.driveService.queryById(this.inputForm.id).then((data) => {
+					if (data.accountStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				this.inputForm.applyId=this.inputForm.id
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.upLoadComponentAccount.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.accountForm.accountFiles = this.$refs.upLoadComponentAccount.getDataList()
+					this.driveService.saveAccountForm(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.commonJS.isEmpty(this.inputForm.startMileage) || this.commonJS.isEmpty(this.inputForm.endMileage)){
+						this.$message.error('请输入里程数')
+						this.loading = false
+					}
+					this.accountForm.accountFiles = this.$refs.upLoadComponentAccount.getDataList()
+					if (this.accountForm.accountFiles.length === 0){
+						this.$message.error('请上传里程数图片')
+						this.loading = false
+						return
+					}
+					// 送审  待审核
+					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
+						this.inputForm.useStartTime=this.inputForm.useDate[0]
+						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
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.$refs.accountForm.resetFields()
+							this.loading = false
+							this.visible = false
+						})
+					} else {
+						this.loading = false
+						this.visible = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id: '',
+					useMen:'',
+					useReason: '',
+					useStartTime:'',
+					useEndTime:'',
+					remarks: '',
+					projectList:[],
+					files: [], // 附件信息
+					accountFiles: [], // 附件信息
+					procInsId: '',
+					startMileage:'',
+					endMileage:'',
+					mileageCount:''
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				this.inputForm.applyId=this.inputForm.id
+				if (type === 'reject' || type === 'reback') {
+					this.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '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, applyId: this.inputForm.applyId}
+								this.driveService.updateStatusByApplyId(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.driveService.queryById(this.inputForm.id).then((data) => {
+						if (data.accountStatus !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							this.inputForm.applyId=this.inputForm.id
+							let param = {status: '1', applyId: this.inputForm.applyId}
+							this.driveService.updateStatusByApplyId(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].id)){
+							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
+			},
+			//计算所用里程数
+			check(){
+				let start=parseFloat(this.accountForm.startMileage)
+				let end=parseFloat(this.accountForm.endMileage)
+				if (end < start){
+					this.$message.error('结束里程数不能小于开始里程数')
+					return
+				}
+				let count=end-start
+				this.accountForm.mileageCount=count
+			}
+
+		}
+
+	}
+</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>

+ 595 - 0
src/views/jy/drive/DriveList.vue

@@ -0,0 +1,595 @@
+<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="useMen">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.useMen"
+									 @update:modelValue='(value) => {searchForm.useMen = 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>
+				<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="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="useStartTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="用车结束时间" field="useEndTime"></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  min-width="150px" align="center" title="结算状态" field="accountStatus" fixed="right">
+						<template #default="scope">
+							<el-button @click="detailAccount(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.accountStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.accountStatus, '未登记')}} </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>
+								<el-button v-if="scope.row.status === '5'&&(scope.row.accountStatus === undefined ||scope.row.accountStatus === '' ||scope.row.accountStatus === null ||scope.row.accountStatus === '0' || scope.row.accountStatus === '1' || scope.row.accountStatus==='3')&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="account(scope.row)">用车结算</el-button>
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.accountStatus==='2'" text type="primary" size="small" @click="rebackAccount(scope.row)">结算撤回</el-button>
+
+								<el-button v-if="scope.row.accountStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineAccount(scope.row)">结算审核</el-button>
+								<el-button v-if="scope.row.accountStatus === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjustAccount(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>
+
+		<DriveEditForm ref="driveEditForm"></DriveEditForm>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import DriveService from '@/api/jy/DriveService'
+	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 DriveEditForm from './DriveEditForm'
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					projectId: '',
+					projectName: '',
+					useMen: '',
+					officeId: '',
+					createById: '',
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				processDefinitionIdAccount:'',
+				procDefKey: '',
+				procDefKeyAccount: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		DriveService:null,
+		created () {
+			this.driveService=new DriveService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			DriveEditForm,
+			ProjectForm,
+			UserSelectSignatory
+		},
+		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/drive/DriveList'
+						}
+					})
+				})
+			},
+			// 修改
+			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_apply',
+					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_apply',
+							isShow: false,
+							routePath: '/jy/drive/DriveList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.driveEditForm.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.driveService.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
+					}
+				})
+				processService.getByName('嘉溢-用车结算').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionIdAccount = data.id
+						this.procDefKeyAccount = 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.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.driveService.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.driveService.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.driveService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.driveService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.driveService.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/drive/DriveList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			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
+			},
+			//发起用车结算
+			account (row) {
+				let tabTitle = `发起流程【嘉溢-用车结算】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-用车结算]`
+				let status = 'startAndHold'
+				if (row.accountStatus === '3') {
+					status = 'startAndClose'
+				} else if (row.accountStatus === '4') {
+					status = 'reapplyFlag'
+				}
+				taskService.getTaskDef({ procDefId: this.processDefinitionIdAccount,
+					businessId: row.id,
+					businessTable: 'jy_drive_account'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionIdAccount,
+							procDefKey: this.procDefKeyAccount,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'jy_drive_account',
+							isShow: false,
+							status: status,
+							routePath: '/jy/drive/DriveList'
+						}
+					})
+				})
+			},
+			// 查看修改流程结果
+			detailAccount (row) {
+				if (row.accountStatus !== '0' && row.accountStatus !== '1') {
+					this.driveService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsIdAccount,
+							procDefId: this.processDefinitionIdAccount
+						}).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'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回用车结算
+			rebackAccount (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.driveService.queryById(row.id).then((data) => {
+						if (data.accountStatus !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsIdAccount).then((data) => {
+								let form = {status: '3', applyId: row.id}
+								this.driveService.updateStatusByApplyId(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjustAccount (row) {
+				this.driveService.queryById(row.id).then((data) => {
+					if (data.accountStatus !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoAccount(row)
+					}
+				})
+			},
+			// 审核
+			examineAccount (row) {
+				this.driveService.queryById(row.id).then((data) => {
+					if (data.accountStatus !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoAccount(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todoAccount (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskIdAccount
+				}).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/drive/DriveList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			adminEdit(row){
+				this.$refs.driveEditForm.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>

+ 365 - 0
src/views/jy/drive/ProjectForm.vue

@@ -0,0 +1,365 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div v-if="isShow">
+<!--        <el-radio v-model="checkType" label="1" style="margin-right: 20px">项目</el-radio>-->
+<!--        <el-radio v-model="checkType" label="2" style="margin-right: 20px">报告</el-radio>-->
+<!--	    <el-radio v-model="checkType" label="3" style="margin-right: 20px">其他</el-radio>-->
+      </div>
+		<!--报告        -->
+		<div v-if="checkType === '2'">
+			<el-form size="large" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+					 @submit.native.prevent>
+				<!-- 搜索框-->
+				<el-form-item label="项目名称" prop="projectName">
+					<el-input size="large" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告号" prop="reportNo">
+					<el-input size="large" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告创建时间" prop="createDates">
+					<el-date-picker
+						placement="bottom-start"
+						format="YYYY-MM-DD HH:mm:ss"
+						value-format="YYYY-MM-DD HH:mm:ss"
+						v-model="searchForm.createDates"
+						type="datetimerange"
+						range-separator="至"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期">
+					</el-date-picker>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="list1()" size="large" icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch1()" size="large" icon="el-icon-refresh-right">重置</el-button>
+				</el-form-item>
+			</el-form>
+
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="550px"
+				:loading="loading"
+				size="large"
+				ref="projectTable1"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				@sort-change=""
+				:sort-config="{remote:true}"
+				:data="dataList1"
+				:row-config="{isCurrent: true}"
+				:checkbox-config="{trigger: 'row'}"
+			>
+				<vxe-column type="seq" width="60" title="序号"></vxe-column>
+				<vxe-column type="checkbox" width="60px"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目名称" field="projectName" show-overflow="title"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目编号" field="projectNumber"></vxe-column>
+				<vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
+				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建时间" field="createTime"></vxe-column>
+
+			</vxe-table>
+			<vxe-pager
+				background
+				size="large"
+				:current-page="tablePage1.currentPage"
+				:page-size="tablePage1.pageSize"
+				:total="tablePage1.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle1">
+			</vxe-pager>
+		</div>
+      <div v-if="checkType === '1'" >
+          <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+            <!-- 搜索框-->
+            <el-form-item label="项目名称" prop="name">
+              <el-input v-model="searchForm.name" placeholder="请输入项目名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="项目编号" prop="no">
+              <el-input v-model="searchForm.no" placeholder="请输入项目编号" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="创建时间" prop="createDates">
+              <el-date-picker
+                placement="bottom-start"
+                format="YYYY-MM-DD HH:mm:ss"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                v-model="searchForm.createDates"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="list()"  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="550px"
+            :loading="loading"
+            ref="projectTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :row-config="{isCurrent: true}"
+            :checkbox-config="{trigger: 'row'}"
+          >
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column type="checkbox" width="60px"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目名称" field="name" show-overflow="title"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目编号" field="no"></vxe-column>
+            <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建人" field="createById"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></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 style="height: 500px;" v-if="checkType === '3'">
+        <el-form  label-width="80px" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<el-row  :gutter="15">
+            <el-col :span="21">
+              <el-form-item label="详情" prop="detail">
+                <el-input style="width: 100%" type="textarea" maxlength="500" v-model="detail" placeholder="请输入详情" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+		<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="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProjectInfoService from '@/api/jy/ProjectInfoService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
+        dataList: [],
+        dataList1: [],
+        searchForm: {
+          name: '',
+          no: '',
+          createBy: '',
+          projectMasterName: '',
+          projectNumber: '',
+          projectName: '',
+          createDates: [],
+		  reportNo: '',
+          status: ''
+        },
+        checkType: '',
+        detail: '',
+        isShow: true,
+        num: true,// num为true是多选,false是单选
+		reportType:''
+      }
+    },
+	  ProjectInfoService:null,
+    created () {
+    	this.projectInfoService=new ProjectInfoService()
+    },
+    components: {
+    },
+    methods: {
+      /**
+       * @param isShow
+       *      isShow为空,则可以选择“项目”或填写“其他”
+       *      isShow为false,则只可以选择“项目”,并且弹出提示
+       *      isShow为‘1’,则只可以选择“项目”,不弹出提示
+       *      isShow为其他任何值,则只可以填写“其他”
+       * @param num
+       *      num为空或者true,则允许多选
+       *      num为其他任何值,则只可以单选
+       */
+      init (isShow, num) {
+        if (this.commonJS.isEmpty(isShow)) {
+          this.isShow = true
+          this.checkType = '1'
+        } else {
+			if (isShow === false || isShow === 'false') {
+				if (this.checkType === '1') {
+					this.isShow = false
+					this.checkType = '1'
+					this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
+				} else if (this.checkType === '2') {
+					this.isShow = false
+					this.checkType = '2'
+					this.$message({message: '第一条为报告后面新增只能选择报告', type: 'warning', customClass: 'messageZindex'})
+				}
+			} else if (isShow === '1') {
+				this.isShow = false
+				this.checkType = '1'
+			}else if (isShow === '2') {
+				this.isShow = false
+				this.checkType = '2'
+			} else {
+				this.isShow = false
+				this.checkType = '3'
+			}
+        }
+        if (this.commonJS.isEmpty(num) || num === true) {
+          this.num = true // num为true是多选,false是单选
+        } else {
+          this.num = false
+        }
+        this.visible = true
+        this.list()
+	    // this.list1()
+      },
+      // 表单提交
+      getProgram () {
+        let rows
+	    let rowsType
+        if (this.checkType === '1') {
+          if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
+            this.$message.error('请至少选择一条数据')
+            return
+          }
+          if (this.num === false) {
+            if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+              this.$message.error('最多选择一条数据')
+              return
+            }
+          }
+          rows = this.$refs.projectTable.getCheckboxRecords()
+        } else if (this.checkType === '2') {
+			if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
+				this.$message.error('请至少选择一条数据')
+				return
+			}
+			if (this.num === false) {
+				if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
+					this.$message.error('最多选择一条数据')
+					return
+				}
+			}
+			rows = this.$refs.projectTable1.getCheckboxRecords()
+		} else {
+          if (this.commonJS.isEmpty(this.detail)) {
+            this.$message.error('请填写开票详情')
+            return
+          }
+          rows = [{projectName: this.detail}]
+		  rows.bj1 = 'bj1'
+        }
+
+        this.close()
+        this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.status = '5'
+		  this.projectInfoService.listByCreateOffice({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('aa',data.records)
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+	  // list1 () {
+		//   this.loading = true
+		//   this.searchForm.status = '5'
+		//   projectRecordsService.list1({
+		// 	'current': this.tablePage1.currentPage,
+		// 	'size': this.tablePage1.pageSize,
+		// 	'orders': this.tablePage1.orders,
+		// 	...this.searchForm
+		//   }).then((data) => {
+		// 	this.dataList1 = data.records
+		// 	this.tablePage1.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()
+      },
+	  currentChangeHandle1 ({currentPage, pageSize}) {
+		this.tablePage1.currentPage = currentPage
+		this.tablePage1.pageSize = pageSize
+		this.list1()
+	  },
+	  resetSearch1 () {
+		this.$refs.searchForm.resetFields()
+		this.list1()
+	  },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 1 - 1
src/views/jy/notify/NotifyTaskForm.vue

@@ -358,7 +358,7 @@
             if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
               this.inputForm.workAttachmentDtoList = []
             }
-            this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'jyNotify',null, null, null, null, false)
+            this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'jyNotify')
             this.loading = false
           })
         })