From f0951a398a2c1470422f55de1b73004e458a8137 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 25 八月 2024 15:17:25 +0800
Subject: [PATCH] 工单优化
---
src/views/system/work-order/index.vue | 159 ++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 114 insertions(+), 45 deletions(-)
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index e2eab08..9a3801c 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -70,7 +70,7 @@
</div>
<div class="work-order">
<el-row class="work-order-item">
- <el-col :span="24" class="time">宸ュ崟缂栧彿锛歿{ item.workOrderNo }}</el-col>
+ <el-col :span="24" class="time">宸ュ崟鍙凤細{{ item.workOrderNo }}</el-col>
</el-row>
<el-row class="work-order-item">
<el-col :span="24" class="time">鏁呴殰鏃堕棿锛歿{ item.createTime }}</el-col>
@@ -92,6 +92,8 @@
class="my-button"
size="mini"
type="text"
+ v-hasPermi="['work:order:condition:add']"
+ v-show="item.status !== 'AUDITING_SUCCESS'"
@click="handleYwCondition(item)"
>杩愮淮鎯呭喌
</el-button>
@@ -108,6 +110,7 @@
type="text"
@click="handleReport(item)"
v-hasPermi="['system:report:add']"
+ v-show="item.status !== 'AUDITING_SUCCESS'"
>浜嬪悗鎶ュ
</el-button>
</el-row>
@@ -259,22 +262,25 @@
<el-step title="浜х敓宸ュ崟">
<template slot="description">
<div>
- <div class="flow-item-x">
- 宸ュ崟鏉ユ簮锛�
- <el-tag type="danger" size="small">{{ flowForm.source }}</el-tag>
+ <div class="row flow-item-x">
+ <div class="flex1">鏁呴殰鐐逛綅锛�</div>
+ <div class="flex2"><el-tag type="danger" size="small">{{ flowForm.source }}</el-tag></div>
</div>
- <div class="flow-item-x">
- 鏁呴殰绫诲瀷锛歿{ flowForm.errorType }}
+ <div class="row flow-item-x">
+ <div class="flex1">鏁呴殰绫诲瀷锛�</div>
+ <div class="flex2">{{ flowForm.errorType }}</div>
</div>
- <div class="flow-item-x">
- 杩愮淮鍗曚綅锛歿{ flowForm.unitName }}
+ <div class="row flow-item-x">
+ <div class="flex1">杩愮淮鍗曚綅锛�</div>
+ <div class="flex2">{{ flowForm.unitName }}</div>
</div>
- <div class="flow-item-x">
- 鍒涘缓鏃堕棿锛歿{ flowForm.createTime }}
+ <div class="row flow-item-x">
+ <div class="flex1">鍒涘缓鏃堕棿锛�</div>
+ <div class="flex2">{{ flowForm.createTime }}</div>
</div>
- <div class="flow-item-x" v-if="flowForm.processingPeriod">
- 澶勭悊鏈熼檺锛�
- <el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag>
+ <div class="row flow-item-x" v-if="flowForm.processingPeriod">
+ <div class="flex1">澶勭悊鏈熼檺锛�</div>
+ <div class="flex2"><el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag></div>
</div>
</div>
</template>
@@ -282,26 +288,47 @@
<el-step title="杩愮淮澶勭悊">
<template slot="description">
<div style="max-height: 450px;overflow-y: scroll">
- <div class="y-item" v-for="(item, index) in ywHandleList" :key="index">
- <div class="y-item-1">
- <div class="flow-item-x">
- 鐜板満鎯呭喌锛�
- <!-- <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top"> -->
- <span v-html="item.ywCondition"></span>
- <!-- </el-tooltip> -->
- </div>
- <!-- <div class="flow-item-x">
- <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
- </div> -->
+ <div v-for="(item, index) in ywHandleList" :key="index">
+ <div v-if="item.sysMsg" class="row flow-item-x">
+ <div class="cflex1">绯荤粺娑堟伅锛�</div>
+ <div class="cflex2">{{item.ywCondition}}</div>
+ <div class="cflex3">{{item.createTime}}</div>
</div>
- <div class="y-item-2">
- <div>
- {{ parseTime(item.createTime) }}
+ <div v-else style="width: 100%">
+ <div style="display: flex; flex-direction: row;width: 100%;position: relative">
+ <div class="cflex1">杩愮淮鎯呭喌锛�</div>
+ <div class="cflex2"><el-link style="font-size: 14px" type="danger" @click="openDrawer(item)">鐐瑰嚮鏌ョ湅</el-link></div>
+ <div class="cflex3">{{item.createTime}}</div>
</div>
- <div>
- 绗瑊{ index + 1 }}娆�
- </div>
+ <el-drawer
+ title="杩愮淮鎯呭喌"
+ :visible.sync="drawer"
+ direction="rtl"
+ :modal="false"
+ :before-close="drawerClose">
+ <div style="padding: 20px">
+ <div class="row flow-item-x">
+ <div class="flex1">涓婃姤鍐呭锛�</div>
+ <div class="flex2" v-html="ywData.content"></div>
+ </div>
+ <div class="row flow-item-x">
+ <div class="flex1">浣愯瘉鏉愭枡锛�</div>
+ <div class="flex2">
+ <el-link type="primary"
+ v-for="item in ywData.fileList != null ? ywData.fileList.split(',') : ywData.fileList"
+ :underline="false" :key="item.id" @click="handleDownload(item)"
+ >{{ item.substring(item.lastIndexOf('/') + 1) }}
+ </el-link>
+ </div>
+
+ </div>
+ </div>
+ </el-drawer>
+ <!-- <div class="flow-item-x">
+ <el-tag size="small" v-for="file in item.ywProofMaterials != null ? item.ywProofMaterials.split(',') : item.ywProofMaterials" :key="file" @click="handleDownload(file)">{{ file.substring(file.lastIndexOf("/") + 1) }}</el-tag>
+ </div> -->
</div>
+
</div>
</div>
</template>
@@ -309,25 +336,26 @@
<el-step title="瀹℃牳缁撴灉">
<template slot="description">
<div style="max-height: 450px;overflow-y: scroll">
- <div class="y-item" v-for="(item, index) in ywAuditingList" :key="index">
- <div class="y-item-1">
- <div class="flow-item-x">
+ <div v-for="(item, index) in ywAuditingList" :key="index">
+ <div class="row flow-item-x">
+ <div class="cflex1">
瀹℃牳缁撴灉锛�
+ </div>
+ <div class="cflex2">
<el-tag :type="item.result == '瀹℃牳閫氳繃' ? 'success' : 'danger'" size="small">{{
item.result
}}
</el-tag>
</div>
- <div class="flow-item-x">
- 瀹℃牳璇存槑锛�<span v-html="item.remark"></span>
+ <div class="cflex3">
+ {{ item.createTime }}
</div>
</div>
- <div class="y-item-2">
- <div>
- {{ parseTime(item.createTime) }}
- </div>
- <div>
- 绗瑊{ index + 1 }}娆�
+ <div class="row flow-item-x">
+ <div class="flex1">瀹℃牳璇存槑锛�</div>
+ <div class="flex2">
+ <span v-if="item.remark" v-html="item.remark"></span>
+ <span v-else>鏃�</span>
</div>
</div>
</div>
@@ -341,6 +369,26 @@
</div>
</template>
<style scoped>
+.flex1 {
+ flex: 2;
+}
+.flex2 {
+ flex: 9;
+}
+.cflex1 {
+ flex: 2;
+}
+.cflex2 {
+ flex: 5;
+ flex-wrap: wrap;
+}
+.cflex3 {
+ flex: 4;
+}
+.row {
+ display: flex;
+ flex-direction: row;
+}
.flow-item-x {
margin: 5px 0;
}
@@ -351,7 +399,8 @@
background-color: #d9d9d9;
display: flex;
flex-direction: row;
- align-items: center
+ align-items: center;
+ width: 100%;
}
.y-item-2 {
@@ -384,6 +433,7 @@
components: {},
data() {
return {
+ drawer: false,
empty: false,
openShowCurrent: null,
ywConditions: [],
@@ -488,6 +538,11 @@
errorTypes: [
{ required: true, message: '璇烽�夋嫨鏁呴殰绫诲瀷', trigger: 'change' }
]
+ },
+ // 杩愮淮鎯呭喌
+ ywData: {
+ content: '',
+ fileList: ''
}
}
},
@@ -495,6 +550,17 @@
this.getList()
},
methods: {
+ openDrawer(item) {
+ this.ywData.content = item.ywCondition
+ this.ywData.fileList = item.ywProofMaterials
+ this.drawer = true
+ },
+ drawerClose() {
+ this.ywData = {
+ content: '',
+ fileList: ''
+ }
+ },
// 鎵归噺瀹℃牳
batchAuditing(result) {
this.batchAuditingWorkOrder.auditingResult = result
@@ -534,7 +600,7 @@
// 瀹℃牳鎸夐挳
handleAuditing(row) {
this.auditingForm = row
- getYwCondition(row.id).then(response => {
+ getYwCondition(row.workOrderNo).then(response => {
this.ywConditions = response.data
this.auditingOpen = true
})
@@ -559,12 +625,12 @@
// 杩囩▼鍥炬煡鐪�
handleFlow(row) {
this.flowForm = row
- getYwAuditingList(row.id).then(response => {
+ getYwAuditingList(row.workOrderNo).then(response => {
if (response.data) {
this.ywAuditingList = response.data
}
})
- getYwCondition(row.id).then(response => {
+ getYwCondition(row.workOrderNo).then(response => {
if (response.data) {
this.ywHandleList = response.data
}
@@ -840,4 +906,7 @@
.my-col {
margin-bottom: 20px; box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; position: relative;
}
+::v-deep el-step__description.is-finish {
+ color: gray;
+}
</style>
--
Gitblit v1.8.0