From 28c3bcfbacc7af60e93210ba654fd681002a6849 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 14 八月 2025 15:59:09 +0800 Subject: [PATCH] 加流程节点 维修工单添加 领取按钮 领取后 生成维修开始时间 提交后 生成维修结束时间 计算 维修时长 故障时长 --- src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue | 10 ++ src/views/eam/repair/EamRepairOrderList.vue | 55 ++++++++++++- src/views/eam/repair/modules/EamRepairOrderList/EamRepairOrderModal.vue | 6 - src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue | 153 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 216 insertions(+), 8 deletions(-) diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 3ba12e2..e1913f3 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -35,6 +35,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> + <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟鍙拌处')">瀵煎嚭</a-button> <a-dropdown :disabled="selectedRowKeys.length == 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="handleBatchSubmit"> @@ -62,9 +63,12 @@ :scroll="{x:'max-content'}"> <span slot="action" slot-scope="text, record"> <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE' ||record.repairStatus=='REJECTED'"> - <a @click="handleFillIn(record)">濉姤</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> + <a-popconfirm v-if="record.claimStatus=='0' || record.claimStatus==null " title="纭畾鎻愪氦鍚�?" @confirm="() => handleClaim(record.id)"> + <a>棰嗗彇</a> + </a-popconfirm> + <a v-if="record.claimStatus=='1'" @click="handleFillIn(record)">缁翠慨</a> + <a-divider v-if="record.claimStatus=='1'" type="vertical"/> + <a-popconfirm v-if="record.claimStatus=='1'" title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> <a>鎻愪氦</a> </a-popconfirm> </template> @@ -163,6 +167,12 @@ fixed: 'left' }, { + title: '棰嗗彇鐘舵��', + align: 'center', + dataIndex: 'claimStatus_dictText', + fixed: 'left' + }, + { title: '宸ュ崟鍙�', align: 'center', dataIndex: 'repairCode', @@ -187,6 +197,18 @@ title: '缁翠慨缁撴潫鏃堕棿', align: 'center', dataIndex: 'actualEndTime', + width: 200 + }, + { + title: '缁翠慨鏃堕暱', + align: 'center', + dataIndex: 'repairDuration', + width: 200 + }, + { + title: '鏁呴殰鏃堕暱', + align: 'center', + dataIndex: 'faultDuration', width: 200 }, { @@ -246,8 +268,10 @@ url: { list: '/eam/eamRepairOrder/list', submit: '/eam/eamRepairOrder/submit', + claim: '/eam/eamRepairOrder/claim', delete: '/eam/eamRepairOrder/delete', - deleteBatch: '/eam/eamRepairOrder/deleteBatch' + deleteBatch: '/eam/eamRepairOrder/deleteBatch', + exportXlsUrl: "eam/eamRepairOrder/exportXls", } } }, @@ -300,6 +324,29 @@ }) }, + /** + * 鐐瑰嚮棰嗗彇鏃惰Е鍙� + * @param id + */ + handleClaim(id){ + this.loading = true + getAction(this.url.claim, { id }) + .then(res => { + if (res.success) { + this.$notification.success({ + message: '娑堟伅', + description: res.message + }) + this.loadData() + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + this.loading = false + } + }) + }, // 鎵归噺鎻愪氦鏃惰Е鍙� handleBatchSubmit() { diff --git a/src/views/eam/repair/modules/EamRepairOrderList/EamRepairOrderModal.vue b/src/views/eam/repair/modules/EamRepairOrderList/EamRepairOrderModal.vue index 85057ab..0ee708a 100644 --- a/src/views/eam/repair/modules/EamRepairOrderList/EamRepairOrderModal.vue +++ b/src/views/eam/repair/modules/EamRepairOrderList/EamRepairOrderModal.vue @@ -28,14 +28,14 @@ <a-form-model-item label="缁翠慨寮�濮嬫椂闂�" prop="actualStartTime"> <a-date-picker show-time v-model="model.actualStartTime" :allowClear="false" value-format="YYYY-MM-DD HH:mm:ss" - style="width:100%"/> + style="width:100%" disabled/> </a-form-model-item> </a-col> <a-col :span="customSpan"> <a-form-model-item label="缁翠慨缁撴潫鏃堕棿" prop="actualEndTime"> <a-date-picker show-time v-model="model.actualEndTime" :allowClear="false" value-format="YYYY-MM-DD HH:mm:ss" - style="width:100%"/> + style="width:100%" disabled/> </a-form-model-item> </a-col> <a-col :span="customSpan"> @@ -100,8 +100,6 @@ confirmLoading: false, spinning: false, validatorRules: { - actualStartTime: [{ required: true, message: '璇烽�夋嫨缁翠慨寮�濮嬫椂闂�', trigger: 'change' }], - actualEndTime: [{ required: true, message: '璇烽�夋嫨缁翠慨缁撴潫鏃堕棿', trigger: 'change' }], faultType: [{ required: true, message: '璇烽�夋嫨鏁呴殰绫诲瀷' }] }, detail: { diff --git a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue index 79e25b8..842dcf9 100644 --- a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue +++ b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue @@ -56,6 +56,21 @@ <a-tab-pane key='2' tab='娴佺▼鍥�' v-if="selectShenpiData.procInstId"> <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/> </a-tab-pane> + <a-tab-pane key='3' tab='娴佽浆鑺傜偣'> + <a-card> + <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.assignee_dictText}}</p> + <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> + <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> + <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> + <div class="left_qiu"><span>{{item.taskName}}</span></div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> </a-tabs> </a-col> @@ -168,6 +183,7 @@ }, disableSubmit: false, selectedRowKeys: [], + hitaskDataSource:[], detail: { dataSource: [], columns: [ @@ -246,6 +262,7 @@ this.model = {} this.getBasicInformationByApi(record) this.getFlowChartImageByApi(record) + this.getFlowTaskListByApi(record) }, /** @@ -255,6 +272,7 @@ handleDetail(record) { this.model = Object.assign({}, record) this.loadDetail(record.id) + this.getFlowTaskListByApi(record) }, /** @@ -306,6 +324,23 @@ description: err.message }) }) + }, + + + /** + * 鑾峰彇娴佽浆鑺傜偣 + * @param record + */ + getFlowTaskListByApi(record) { + let parmhis={ + 'procInstId': record.procInstId + } + getAction(this.url.queryHisTaskList,parmhis).then(res=>{ + this.hitaskDataSource=res.result + }).finally( + this.visible = true, + console.log('this.approveData---->', this.approveData) + ) }, /** @@ -391,4 +426,122 @@ } } } + + /* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */ + html.submitting, + html.submitting body { + pointer-events: none !important; + cursor: wait !important; + } + + /* 钂欏眰鏁堟灉澧炲己 */ + html.submitting::before { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.5); + z-index: 9998; + } + + /* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */ + html.submitting::after { + content: '鎻愪氦涓�...'; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #1890ff; + color: white; + padding: 10px 20px; + border-radius: 4px; + z-index: 9999; + } + + /* 绂佺敤鐘舵�佹寜閽牱寮� */ + .disabled-btn { + opacity: 0.6; + cursor: not-allowed !important; + } + + .shallow-hr { + border: 0; + height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ + background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ + margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ + } + .btn-custom { + background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ + color: white; /* 鐧借壊鏂囧瓧 */ + border: none; /* 鏃犺竟妗� */ + padding: 5px 15px; /* 鍐呰竟璺� */ + text-align: center; /* 鏂囧瓧灞呬腑 */ + text-decoration: none; /* 鏃犱笅鍒掔嚎 */ + display: inline-block; /* 琛屽唴鍧楀厓绱� */ + font-size: 12px; /* 瀛椾綋澶у皬 */ + margin: 4px 2px; /* 澶栬竟璺� */ + cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ + border-radius: 4px; /* 鍦嗚杈规 */ + } + + .bold-large-label { + font-weight: bold; + font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ + } + .left_qiu{ + position: absolute; + left: -74px; + top: 0; + width:54px; + border-radius: 50%; + height:54px; + font-size: 13px; + margin: auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + background: #0099ff; + transform: translate(0, 0); + } + /deep/ .ant-timeline-item-tail{ + left: -29px !important; + } + .left_qiu span{ + width: 3em; + display: block; + color: #fff; + text-align: center; + } + .img{ + width: 75%; + } + + .wrap{ + clear: both; + width: 100%; + display: flex; + height: 50px; + border: 1px solid #ccc; + /* background-color: aqua; */ + } + .box{ + width:21%; + height:50px; + border-right: 1px solid #ccc; + line-height: 50px; + /* background: red; */ + text-align:center; + margin: auto; + } + + /* 娣诲姞绂佺敤鏍峰紡 */ + .disabled-link { + color: #999; + cursor: not-allowed; + pointer-events: none; + text-decoration: none; + } </style> \ No newline at end of file diff --git a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue index 3e86632..3ea2799 100644 --- a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue +++ b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue @@ -39,6 +39,16 @@ <a-input v-model="model.actualEndTime" readOnly/> </a-form-model-item> </a-col> + <a-col :span="12"> + <a-form-model-item label="缁翠慨鏃堕暱" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input v-model="model.repairDuration" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏁呴殰鏃堕暱" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input v-model="model.faultDuration" readOnly/> + </a-form-model-item> + </a-col> <a-col :span="24"> <a-form-model-item label="鏁呴殰鐜拌薄"> <a-textarea :rows="5" v-model="model.faultPhenomenon" readOnly/> -- Gitblit v1.9.3