From 5e05c419086b6d24c5b7b156e5319a9449220bac Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期一, 15 四月 2024 18:05:35 +0800 Subject: [PATCH] 工单处理:审核、运维情况 --- src/views/system/work-order/index.vue | 44 ++++++++++++++++++++++++-------------------- 1 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue index 1ccba98..2cc9be8 100644 --- a/src/views/system/work-order/index.vue +++ b/src/views/system/work-order/index.vue @@ -131,15 +131,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 +152,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 +160,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"> @@ -308,7 +308,7 @@ } </style> <script> -import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order"; +import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition, getYwCondition } from "@/api/platform/work-order"; export default { name: "Work-order", components: { @@ -439,14 +439,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) { @@ -507,9 +513,9 @@ }, // 鎻愪氦杩愮淮鎯呭喌 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("鎿嶄綔鎴愬姛"); }) @@ -540,10 +546,8 @@ 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]; listWorkOrder(this.queryParams).then(response => { this.workOrderList = response.data; this.total = response.total; -- Gitblit v1.8.0