From 4f6b976ffd719d73812bcc645b986c1d081a564b Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 16 四月 2024 17:29:44 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/system/work-order/index.vue | 151 +++++++++++++++++++++++++------------------------- 1 files changed, 76 insertions(+), 75 deletions(-) diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue index 1ccba98..fd607ab 100644 --- a/src/views/system/work-order/index.vue +++ b/src/views/system/work-order/index.vue @@ -16,6 +16,14 @@ <el-option label="璁惧閬楀け" value="璁惧閬楀け"></el-option> </el-select> </el-form-item> + <el-form-item label="瀹℃牳鐘舵��" prop="status"> + <el-select v-model="queryParams.status" placeholder="瀹℃牳鐘舵��" clearable @clear="handleQuery"> + <el-option label="宸蹭笅鍙�" value="DISTRIBUTED"></el-option> + <el-option label="杩愮淮宸插鐞�" value="YW_HANDLE"></el-option> + <el-option label="瀹℃牳閫氳繃" value="AUDITING_SUCCESS"></el-option> + <el-option label="瀹℃牳涓嶉�氳繃" value="AUDITING_FAIL"></el-option> + </el-select> + </el-form-item> <el-form-item label="杩愮淮澶勭悊鏃堕棿"> <el-date-picker clearable @@ -131,15 +139,15 @@ <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> <el-input v-model="auditingForm.ywPeopleName" disabled /> </el-form-item> - <el-form-item label="鐜板満鎯呭喌"> + <el-form-item label="鐜板満鎯呭喌" v-if="auditingForm.condition"> <el-input type="textarea" v-html="auditingForm.condition" disabled /> </el-form-item> - <el-form-item label="浣愯瘉鏉愭枡"> + <el-form-item label="浣愯瘉鏉愭枡" v-if="auditingForm.proofMaterials"> <el-link v-for="item in auditingForm.proofMaterials != null ? auditingForm.proofMaterials.split(',') : auditingForm.proofMaterials" :underline="false" :key="item" @click="handleDownload(item)">{{ item.substring(item.lastIndexOf("/") + 1) }}</el-link> </el-form-item> <el-form-item label="瀹℃牳缁撴灉" prop="auditingResult"> - <el-radio v-model="auditingForm.auditingResult" label="pass">閫氳繃</el-radio> - <el-radio v-model="auditingForm.auditingResult" label="return">椹冲洖</el-radio> + <el-radio v-model="auditingForm.auditingResult" label="AUDITING_SUCCESS">閫氳繃</el-radio> + <el-radio v-model="auditingForm.auditingResult" label="AUDITING_FAIL">椹冲洖</el-radio> </el-form-item> <el-form-item label="瀹℃牳澶囨敞" prop="auditingRemark"> <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/> @@ -152,7 +160,7 @@ </el-dialog> <el-dialog title="杩愮淮鎯呭喌璁板綍" :visible.sync="ywConditionOpen" width="500px" append-to-body> - <el-form ref="ywConditionForm" :model="ywConditionForm" :rules="ywConditionRules" label-width="80px"> + <el-form ref="form" :model="form" :rules="ywConditionRules" label-width="80px"> <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> <el-input v-model="ywConditionForm.workOrderNo" disabled /> </el-form-item> @@ -160,13 +168,13 @@ <el-input v-model="ywConditionForm.unitName" disabled /> </el-form-item> <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> - <el-input v-model="ywConditionForm.ywPeopleName" /> + <el-input v-model="ywConditionForm.ywPeopleName" disabled /> </el-form-item> - <el-form-item label="鐜板満鎯呭喌" prop="reportContent"> - <editor v-model="form.condition" :min-height="192"/> + <el-form-item label="鐜板満鎯呭喌" prop="ywCondition"> + <editor v-model="form.ywCondition" :min-height="192"/> </el-form-item> - <el-form-item label="浣愯瘉鏉愭枡" prop="reportMaterials"> - <file-upload v-model="form.proofMaterials"/> + <el-form-item label="浣愯瘉鏉愭枡" prop="ywProofMaterials"> + <file-upload v-model="form.ywProofMaterials"/> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -179,7 +187,7 @@ <!-- 杩囩▼鍥� --> <el-dialog title="杩囩▼鍥�" :visible.sync="flowOpen" width="1200px" :close-on-click-modal="false" append-to-body> <div> - <el-steps :active="2" :space="500"> + <el-steps :active="ywAuditingList.length != 0 ? 3 : ywHandleList.length != 0 ? 2 : 1" :space="500"> <el-step title="浜х敓宸ュ崟"> <template slot="description"> <div> @@ -195,88 +203,54 @@ <div class="flow-item-x"> 鍒涘缓鏃堕棿锛歿{flowForm.createTime}} </div> - <div class="flow-item-x"> - 澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">12灏忔椂</el-tag> + <div class="flow-item-x" v-if="flowForm.processingPeriod"> + 澶勭悊鏈熼檺锛�<el-tag type="danger" size="small">{{ flowForm.processingPeriod }}</el-tag> </div> </div> </template> </el-step> <el-step title="杩愮淮澶勭悊"> <template slot="description"> - <div class="y-item"> + <div class="y-item" v-for="(item, index) in ywHandleList"> <div class="y-item-1"> <div class="flow-item-x"> - 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag> + 鐜板満鎯呭喌锛� + <el-tooltip class="item" effect="dark" :content="item.ywCondition" placement="top"> + <el-tag size="small" class="line-limit-length">{{ item.ywCondition }}</el-tag> + </el-tooltip> </div> - <div class="flow-item-x"> - 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag> - </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> <div class="y-item-2"> <div > - {{flowForm.ywHandleTime}} + {{ parseTime(item.createTime) }} </div> <div > - 绗嚑娆★細1 + 绗嚑娆★細{{ index + 1 }} </div> </div> </div> - <div class="y-item"> - <div class="y-item-1"> - <div class="flow-item-x"> - 杩愮淮鐘舵�侊細<el-tag type="danger" size="small">缁撴灉涓婃姤</el-tag> - </div> - <div class="flow-item-x"> - 杩愮淮浜哄憳锛�<el-tag type="danger" size="small">{{flowForm.ywPeopleName}}</el-tag> - </div> - </div> - <div class="y-item-2"> - <div > - {{flowForm.ywHandleTime}} - </div> - <div > - 绗嚑娆★細2 - </div> - </div> - </div> - </template> </el-step> <el-step title="缁撴灉瀹℃牳"> <template slot="description"> - <div class="y-item"> + <div class="y-item" v-for="(item, index) in ywAuditingList"> <div class="y-item-1"> <div class="flow-item-x"> - 瀹℃牳缁撴灉锛�<el-tag type="danger" size="small">椹冲洖</el-tag> + 瀹℃牳缁撴灉锛�<el-tag :type="item.result == '瀹℃牳閫氳繃' ? 'success' : 'danger'" size="small">{{ item.result }}</el-tag> </div> <div class="flow-item-x"> - 瀹℃牳璇存槑锛�<el-tag type="danger" size="small">鏈垚鍔熷鐞�</el-tag> + 瀹℃牳璇存槑锛�<el-tag size="small" v-if="item.remark">{{ item.remark }}</el-tag> </div> </div> <div class="y-item-2"> <div > - {{flowForm.ywHandleTime}} + {{ parseTime(item.createTime) }} </div> <div > - 绗嚑娆★細1 - </div> - </div> - </div> - <div class="y-item"> - <div class="y-item-1"> - <div class="flow-item-x"> - 瀹℃牳鐘舵�侊細<el-tag type="info" size="small">瀹℃牳涓�</el-tag> - </div> - <div class="flow-item-x"> - 瀹℃牳璇存槑锛� - </div> - </div> - <div class="y-item-2"> - <div > - {{flowForm.ywHandleTime}} - </div> - <div > - 绗嚑娆★細2 + 绗嚑娆★細{{ index + 1 }} </div> </div> </div> @@ -308,13 +282,16 @@ } </style> <script> -import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order"; +import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition, getYwCondition, getYwConditionList, getYwAuditingList } from "@/api/platform/work-order"; +import { addReport } from "@/api/platform/report"; export default { name: "Work-order", components: { }, data() { return { + ywHandleList: [], + ywAuditingList: [], reportFormRules: { reportContent: [ { required: true, message: "鎶ュ鍐呭涓嶈兘涓虹┖", trigger: "blur" } @@ -326,7 +303,7 @@ reportOpen: false, reportForm: { reportType: "浜嬪悗鎶ュ", - pointId: "鐞间簬闀�3琛�1鍙锋憚鍍忓ご", + pointId: "", errorType: "", reportContent: "", reportMaterials: "" @@ -423,7 +400,7 @@ submitReportForm() { this.$refs["reportForm"].validate(valid => { if (valid) { - addReport(this.form).then(response => { + addReport(this.reportForm).then(response => { this.$modal.msgSuccess("鎴愬姛鎻愪氦鎶ュ"); this.open = false; this.getList(); @@ -439,14 +416,20 @@ // 瀹℃牳鎸夐挳 handleAuditing(row) { this.auditingForm = row; - this.auditingForm.condition = '璁惧寮傚父閬尅锛岀幇鍦轰慨澶嶅畬鎴�' - this.auditingForm.proofMaterials = '30璺敱閰嶇疆_20240411101816A008.png' - this.auditingOpen = true; + getYwCondition(row.id).then(response => { + if (response.data) { + this.auditingForm.condition = response.data.ywCondition; + this.auditingForm.proofMaterials = response.data.ywProofMaterials; + } + this.auditingOpen = true; + }); }, // 杩愮淮鎯呭喌鎸夐挳 handleYwCondition(row) { + this.form = {}; this.ywConditionForm = row; this.ywConditionOpen = true; + this.form.id = row.id; }, // 杩愮淮缁撴灉鎸夐挳 handleYwResult(row) { @@ -460,8 +443,18 @@ }, // 杩囩▼鍥炬煡鐪� handleFlow(row) { - this.flowOpen = true; this.flowForm = row; + getYwAuditingList(row.id).then(response => { + if (response.data) { + this.ywAuditingList = response.data; + } + }); + getYwConditionList(row.id).then(response => { + if (response.data) { + this.ywHandleList = response.data; + } + this.flowOpen = true; + }); }, // 鎻愪氦瀹℃牳 submitAuditing() { @@ -470,6 +463,7 @@ auditing(this.auditingForm).then(res => { this.auditingOpen = false; this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + this.getList(); }) } }) @@ -507,11 +501,12 @@ }, // 鎻愪氦杩愮淮鎯呭喌 submitYwCondition() { - this.$refs["ywConditionForm"].validate(valid => { + this.$refs["form"].validate(valid => { if (valid) { - ywCondition(this.ywConditionForm).then(res => { + ywCondition(this.form).then(res => { this.ywConditionOpen = false; this.$modal.msgSuccess("鎿嶄綔鎴愬姛"); + this.getList(); }) } }) @@ -540,10 +535,9 @@ getList() { this.loading = true; this.queryParams.params = {}; - if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) { - this.queryParams["start"] = this.daterangeYwHandleTime[0]; - this.queryParams["end"] = this.daterangeYwHandleTime[1]; - } + this.queryParams["start"] = this.daterangeYwHandleTime[0]; + this.queryParams["end"] = this.daterangeYwHandleTime[1]; + if (this.queryParams["status"] == "") { this.queryParams["status"] = "DISTRIBUTED"; } listWorkOrder(this.queryParams).then(response => { this.workOrderList = response.data; this.total = response.total; @@ -673,4 +667,11 @@ height: 150px; padding: 10px; } + +.line-limit-length { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 200px; +} </style> -- Gitblit v1.8.0