From 15e22fc7a5b6ee006ff88e0eb0d1bd36f14d683f Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 01 四月 2025 15:21:28 +0800 Subject: [PATCH] 修改审签工作流 --- src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue | 221 ++++++++++++++++++++++++++----------------------------- 1 files changed, 104 insertions(+), 117 deletions(-) diff --git a/src/views/flowable/workflow/FlowNcZpi.vue b/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue similarity index 61% copy from src/views/flowable/workflow/FlowNcZpi.vue copy to src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue index f958e3c..4d153bb 100644 --- a/src/views/flowable/workflow/FlowNcZpi.vue +++ b/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue @@ -1,3 +1,8 @@ +<!-- + Description: 宸ヤ綔娴�-NC瀹$澶勭悊椤甸潰 List + Author: 浣滆�� liuyh + Date: 2025-02-27 +--> <template> <a-modal :title="title" @@ -12,10 +17,10 @@ <br> <br> <a-tag color="blue"> - 澶勭悊浜� {{ selectShenpiData.assignee }} + 褰撳墠澶勭悊浜� {{ selectShenpiData.assignee_dictText }} </a-tag> <a-tag color="blue"> - 鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} + 浠诲姟鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} </a-tag> <br> <br> @@ -26,7 +31,7 @@ <hr class="shallow-hr"> </div> <div> - <b>鎸囨淳璇︽儏</b> + <b>瀹$璇︽儏</b> <br> <a-form :form='form'> <a-spin :spinning="spinning"> @@ -35,61 +40,37 @@ <a-form-model ref='form' :model='tableRowRecord' :rules='validatorRules'> <a-row> <a-col :span='span'> - <a-form-model-item label='浜у搧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='productName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.productName'></a-input> + <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> </a-form-model-item> </a-col> <a-col :span='span'> - <a-form-model-item label='閮ㄤ欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> + <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='publishVersion'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.publishVersion'></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label='鏂囨。鍚庣紑' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docSuffix'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.docSuffix'></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='绯荤粺鎸囧畾鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='componentId'> <a-input :disabled='coldisabled' v-model='tableRowRecord.componentName'></a-input> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span='span'> - <a-form-model-item label='闆朵欢鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='partsName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.partsName'></a-input> + <a-form-model-item label='鍑哄簱鐘舵��' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullStatus_dictText'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.pullStatus_dictText'></a-input> </a-form-model-item> </a-col> <a-col :span='span'> - <a-form-model-item label='宸ュ簭鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='processName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.processName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='宸ユ鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='stepName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.stepName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementCode'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementCode'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='璁惧绫诲悕绉�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='deviceManagementName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.deviceManagementName'></a-input> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='docName'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.docName'></a-input> - </a-form-model-item> - </a-col> - <a-col :span='span'> - <a-form-model-item label='鏂囨。鐗堟湰' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='version'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.version'></a-input> + <a-form-model-item label='鍑哄簱浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='pullUser_dictText'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.pullUser_dictText'></a-input> </a-form-model-item> </a-col> </a-row> @@ -100,13 +81,12 @@ <a-timeline style="padding:0 1% 0 12%" > <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> <div class="bottom"> - <p>寮�濮嬫椂闂达細{{item.startTime}}</p> - <p>缁撴潫鏃堕棿锛歿{item.endTime}}</p> - <p>澶勭悊浜猴細{{item.assignee}}</p> - <p>鍔炵悊绫诲瀷锛歿{item.bllx_dictText}}</p> - <p v-if="item.name == '鎻愪氦鐢宠'">鎸囨淳鍘熷洜锛歿{item.cause}}</p> - <p v-else >澶勭悊鎰忚锛歿{item.cause}}</p> - <div class="left_qiu"><span>{{item.name}}</span></div> + <p>澶勭悊浜猴細{{item.assignee_dictText}}</p> + <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> + <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> + <p v-if="index1 ===0">鐢宠鍘熷洜锛歿{item.description}}</p> + <p v-else >澶勭悊鎰忚锛歿{item.description}}</p> + <div class="left_qiu"><span>{{item.taskName}}</span></div> </div> </a-timeline-item> </a-timeline> @@ -123,34 +103,19 @@ <br> <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> <a-row> - <a-col ::span='span'> - <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='applyUser'> - <a-input :disabled='coldisabled' v-model='tableRowRecord.applyUser'></a-input> + <a-col ::span='span' v-if="selectShenpiData.taskDefKey ==='task_proofread'" class="btxx"> + <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> + <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='nc_sq_handle_type_jd' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> </a-form-model-item > </a-col> - <a-col ::span='span'> - <a-form-model-item label="鐢宠鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyReason"> - <a-textarea :disabled='coldisabled' v-model="tableRowRecord.applyReason" rows="4" /> + <a-col ::span='span' v-if="selectShenpiData.taskDefKey ==='task_approve' || selectShenpiData.taskDefKey ==='task_cut' || selectShenpiData.taskDefKey ==='task_finalize'" class="btxx"> + <a-form-model-item label="澶勭悊绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='status'> + <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='nc_sq_handle_type' placeholder="璇烽�夋嫨澶勭悊绫诲瀷" /> </a-form-model-item > - </a-col> - <a-col ::span='span'> - <a-form-model-item label="鐢宠鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyTime"> - <a-input :disabled='coldisabled' v-model='tableRowRecord.applyTime'></a-input> - </a-form-model-item > - </a-col> - <a-col :span="24"> - <a-form-item label="瀵嗙骇涓�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag type='list' v-model='assignFileStream.secretLevel' dictCode='dnc_secret_level' placeholder="璇烽�夋嫨瀵嗙骇" /> - </a-form-item> </a-col> <a-col :span="24" class="btxx"> - <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <j-dict-select-tag type='list' v-model='assignFileStream.status' dictCode='dnc_assign_stream_status' placeholder="璇烽�夋嫨瀹℃壒鐘舵��" /> - </a-form-item> - </a-col> - <a-col :span="24" class="btxx"> - <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鎵规剰瑙�"/> + <a-form-model-item label="澶勭悊鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-textarea v-model="assignFileStream.approveContent" rows="4" placeholder="璇疯緭鍏ュ鐞嗘剰瑙�"/> </a-form-model-item > </a-col> </a-row> @@ -168,9 +133,9 @@ <script> -import '@/assets/less/TableExpand.less' +import '@assets/less/TableExpand.less' import { mixinDevice } from '@/utils/mixin' -import { getAction, deleteAction, postAction, downFile, httpAction } from '@/api/manage' +import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' export default { name: 'FlowShenPi', mixins: [mixinDevice], @@ -206,26 +171,6 @@ sm: { span: 16 } }, validatorRules: { - version: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗g増鏈�!'}, - ] - }, - applyUser: { - rules: [ - { required: true, message: '璇烽�夋嫨鐢宠浜�!'}, - ] - }, - approveContent: { - rules: [ - { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!'}, - ] - }, - docName: { - rules: [ - { required: true, message: '璇疯緭鍏ユ枃妗e悕绉�!'}, - ] - }, status: { rules: [ { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, @@ -234,15 +179,16 @@ }, approveData: {}, flowData: {}, - title: '瀹℃壒椤甸潰', + title: '璇︽儏椤甸潰', width: 1000, visible: false, // 琛ㄥご url: { - queryBomDataById: '/nc/activit/selectVoById', - diagramView: '/nc/assign/flow/diagramView', - queryHisTaskList:'/nc/assign/flow/queryHisTaskList', - approve:"/nc/activit/assign/file/approve", + queryBomDataById: '/dncFlow/dispatchFile/selectVoById', + diagramView: '/assign/flow/diagramView', + queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList', + approve:"/dncFlow/dispatchFile/approval", + saveDispatchFile:"/dncFlow/dispatchFile/saveDispatchFile" }, dictOptions: {}, superFieldList: [], @@ -286,12 +232,43 @@ }, submitForm () { const that = this; - if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ - this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') + if (that.selectShenpiData.taskDefKey ==='task_prepare'){ + // 瑙﹀彂琛ㄥ崟楠岃瘉-閲嶆柊鍚姩 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let url=this.url.saveDispatchFile; + let method = 'post'; + let flowTaskVo = {} + flowTaskVo.comment =that.assignFileStream.approveContent; + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.taskId = this.selectShenpiData.id + console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) + httpAction(url,flowTaskVo,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.visible = false + //鍒锋柊琛ㄦ牸 + that.$emit('searchReset') + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + }) + //璺冲嚭鏂规硶 return false; + }else { + if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ + this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�') + return false; + } } if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { - this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') + this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒') return false; } // 瑙﹀彂琛ㄥ崟楠岃瘉 @@ -300,24 +277,35 @@ that.confirmLoading = true; let url=this.url.approve let method = 'post'; + let handle =that.assignFileStream.status === '1'; let flowTaskVo = {} - flowTaskVo.status=that.assignFileStream.status; - flowTaskVo.approveContent =that.assignFileStream.approveContent; + switch (that.selectShenpiData.taskDefKey){ + case "task_approve": + flowTaskVo.ratify=handle; + break; + case "task_cut": + flowTaskVo.cut=handle; + break; + case "task_finalize": + flowTaskVo.stereotype=handle; + break; + } + if (that.selectShenpiData.taskDefKey ==='task_proofread'){ + flowTaskVo.proofreadStatus =that.assignFileStream.status; + } flowTaskVo.comment =that.assignFileStream.approveContent; - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; flowTaskVo.dataId = this.selectShenpiData.dataId flowTaskVo.taskId = this.selectShenpiData.id flowTaskVo.userId = this.selectShenpiData.assignee flowTaskVo.instanceId = this.selectShenpiData.procInstId - flowTaskVo.targetKey = this.selectShenpiData.taskDefKey flowTaskVo.values = this.selectShenpiData.variables - flowTaskVo.assignee = this.selectShenpiData.assignee - flowTaskVo.secretLevel = that.assignFileStream.secretLevel; console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) httpAction(url,flowTaskVo,method).then((res)=>{ if(res.success){ that.$message.success(res.message); - that.$emit('ok'); + that.visible = false + //鍒锋柊琛ㄦ牸 + that.$emit('searchReset') }else{ that.$message.warning(res.message); } @@ -325,7 +313,6 @@ that.confirmLoading = false; }) } - }) }, getAllApproveData(item) { @@ -335,14 +322,14 @@ 'id': item.dataId } let parmhis={ - 'drapprovedataId': item.dataId + 'procInstId': item.procInstId } getAction(this.url.queryHisTaskList,parmhis).then(res=>{ this.hitaskDataSource=res.result getAction(this.url.queryBomDataById, param).then((res => { if (res.success) { - this.tableRowRecord = res.result - console.log('this.tableRowRecord----->', this.tableRowRecord) + this.tableRowRecord = res.result[0] + console.log('this.tableRowRecord----->', this.tableRowRecord[0]) } })) }).finally( -- Gitblit v1.9.3