From 886b5efb69b16112276a163b606c2c00ac0d225b Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 05 三月 2024 20:23:31 +0800 Subject: [PATCH] 工单优化 --- src/views/system/work-order/index.vue | 302 ++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 244 insertions(+), 58 deletions(-) diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue index ecb0621..c476d51 100644 --- a/src/views/system/work-order/index.vue +++ b/src/views/system/work-order/index.vue @@ -1,16 +1,19 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" placeholder="璇疯緭鍏ュ伐鍗曞彿" clearable + @clear="handleQuery" @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="杩愮淮澶勭悊鏃堕棿"> <el-date-picker + clearable + @clear="handleQuery" v-model="daterangeYwHandleTime" style="width: 240px" value-format="yyyy-MM-dd" @@ -27,27 +30,27 @@ </el-form> <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['x:work-order:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['x:work-order:edit']" - >淇敼</el-button> - </el-col> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="primary"--> +<!-- plain--> +<!-- icon="el-icon-plus"--> +<!-- size="mini"--> +<!-- @click="handleAdd"--> +<!-- v-hasPermi="['x:work-order:add']"--> +<!-- >鏂板</el-button>--> +<!-- </el-col>--> +<!-- <el-col :span="1.5">--> +<!-- <el-button--> +<!-- type="success"--> +<!-- plain--> +<!-- icon="el-icon-edit"--> +<!-- size="mini"--> +<!-- :disabled="single"--> +<!-- @click="handleUpdate"--> +<!-- v-hasPermi="['x:work-order:edit']"--> +<!-- >淇敼</el-button>--> +<!-- </el-col>--> <el-col :span="1.5"> <el-button type="danger" @@ -74,38 +77,48 @@ <el-table v-loading="loading" :data="workOrderList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="宸ュ崟鍙�" align="center" prop="workOrderNo" /> - <el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitId" /> - <el-table-column label="杩愮淮浜哄憳" align="center" prop="ywPeopleId" /> - <el-table-column label="杩愮淮澶勭悊鏃堕棿" align="center" prop="ywHandleTime" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.ywHandleTime, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> + <el-table-column label="宸ュ崟鍙�" align="center" prop="workOrderNo" width="170"/> + <el-table-column label="杩愮淮鍗曚綅" align="center" prop="unitName" width="150"/> + <el-table-column label="杩愮淮浜哄憳" align="center" prop="ywPeopleName" /> + <el-table-column label="杩愮淮澶勭悊鏃堕棿" align="center" prop="ywHandleTime" width="180"/> <el-table-column label="杩愮淮缁撴灉" align="center" prop="ywResult" /> - <el-table-column label="杩愮淮鎯呭喌" align="center" prop="ywCondition" /> - <el-table-column label="杩愮淮妫�娴嬬粨鏋�" align="center" prop="ywCheckResult" /> - <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"> + <el-table-column label="杩愮淮鎯呭喌" align="center" prop="ywCondition" width="150"/> + <el-table-column label="杩愮淮妫�娴嬬粨鏋�" align="center" prop="ywCheckResult" width="230"/> + <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180"/> + + <el-table-column label="鎿嶄綔" fixed="right" width="150" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> - <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- icon="el-icon-edit"--> +<!-- @click="handleUpdate(scope.row)"--> +<!-- v-hasPermi="['x:work-order:edit']"--> +<!-- >淇敼</el-button>--> <el-button size="mini" type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['x:work-order:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" + @click="handleAuditing(scope.row)" v-hasPermi="['x:work-order:remove']" - >鍒犻櫎</el-button> + >瀹℃牳</el-button> + <el-button + size="mini" + type="text" + @click="handleYwCondition(scope.row)" + v-hasPermi="['x:work-order:remove']" + >杩愮淮鎯呭喌</el-button> + <el-button + size="mini" + type="text" + @click="handleYwResult(scope.row)" + v-hasPermi="['x:work-order:remove']" + >杩愮淮缁撴灉</el-button> + <el-button + size="mini" + type="text" + @click="handleCheckResult(scope.row)" + v-hasPermi="['x:work-order:remove']" + >妫�娴嬬粨鏋�</el-button> </template> </el-table-column> </el-table> @@ -117,6 +130,95 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> + + <el-dialog title="宸ュ崟瀹℃牳" :visible.sync="auditingOpen" width="500px" append-to-body> + <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="80px"> + <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> + <el-input v-model="auditingForm.workOrderNo" disabled /> + </el-form-item> + <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> + <el-input v-model="auditingForm.unitName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> + <el-input v-model="auditingForm.ywPeopleName" disabled /> + </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-form-item> + <el-form-item label="瀹℃牳澶囨敞" prop="auditingRemark"> + <el-input v-model="auditingForm.auditingRemark" type="textarea" maxlength="30" show-word-limit/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitAuditing">纭� 瀹�</el-button> + <el-button @click="cancelAuditing">鍙� 娑�</el-button> + </div> + </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-item label="宸ュ崟鍙�" prop="workOrderNo"> + <el-input v-model="ywConditionForm.workOrderNo" disabled /> + </el-form-item> + <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> + <el-input v-model="ywConditionForm.unitName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> + <el-input v-model="ywConditionForm.ywPeopleName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮鎯呭喌" prop="ywCondition"> + <el-input v-model="ywConditionForm.ywCondition" type="textarea" maxlength="150" show-word-limit/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitYwCondition">纭� 瀹�</el-button> + <el-button @click="cancelYwCondition">鍙� 娑�</el-button> + </div> + </el-dialog> + + + <el-dialog title="杩愮淮缁撴灉璁板綍" :visible.sync="ywResultOpen" width="500px" append-to-body> + <el-form ref="ywResultForm" :model="ywResultForm" :rules="ywResultRules" label-width="80px"> + <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> + <el-input v-model="ywResultForm.workOrderNo" disabled /> + </el-form-item> + <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> + <el-input v-model="ywResultForm.unitName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> + <el-input v-model="ywResultForm.ywPeopleName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮缁撴灉" prop="ywResult"> + <el-input v-model="ywResultForm.ywResult" type="textarea" maxlength="150" show-word-limit/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitYwResult">纭� 瀹�</el-button> + <el-button @click="cancelYwResult">鍙� 娑�</el-button> + </div> + </el-dialog> + + <el-dialog title="杩愮淮妫�娴嬬粨鏋�" :visible.sync="checkResultOpen" width="500px" append-to-body> + <el-form ref="ywResultForm" :model="checkResultForm" :rules="checkResultRules" label-width="120px"> + <el-form-item label="宸ュ崟鍙�" prop="workOrderNo"> + <el-input v-model="checkResultForm.workOrderNo" disabled /> + </el-form-item> + <el-form-item label="杩愮淮鍗曚綅" prop="unitName"> + <el-input v-model="checkResultForm.unitName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮浜哄憳" prop="ywPeopleName"> + <el-input v-model="checkResultForm.ywPeopleName" disabled /> + </el-form-item> + <el-form-item label="杩愮淮妫�娴嬬粨鏋�" prop="ywCheckResult"> + <el-input v-model="checkResultForm.ywCheckResult" type="textarea" maxlength="150" show-word-limit/> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitYwResult">纭� 瀹�</el-button> + <el-button @click="cancelYwResult">鍙� 娑�</el-button> + </div> + </el-dialog> <!-- 娣诲姞鎴栦慨鏀硅繍缁村伐鍗曞璇濇 --> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> @@ -187,31 +289,115 @@ }, // 琛ㄥ崟鍙傛暟 form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { - workOrderNo: [ - { required: true, message: "宸ュ崟鍙蜂笉鑳戒负绌�", trigger: "blur" } + // 瀹℃牳琛ㄥ崟 + auditingForm: {}, + auditingOpen: false, + // 杩愮淮鎯呭喌琛ㄥ崟 + ywConditionForm: {}, + ywConditionOpen: false, + // 杩愮淮缁撴灉琛ㄥ崟 + ywResultForm: { + + }, + ywResultOpen: false, + // 杩愮淮妫�娴嬬粨鏋� + checkResultForm: { + + }, + checkResultOpen: false, + // 瀹℃牳琛ㄥ崟鏍¢獙 + auditingRules: { + auditingResult: [ + { required: true, message: "瀹℃牳缁撴灉涓嶈兘涓虹┖", trigger: "blur" } ], - unitId: [ - { required: true, message: "杩愮淮鍗曚綅涓嶈兘涓虹┖", trigger: "change" } + }, + // 杩愮淮鎯呭喌鏍¢獙 + ywConditionRules: { + ywCondition: [ + { required: true, message: "杩愮淮鎯呭喌涓嶈兘涓虹┖", trigger: "blur" } ], - } + }, + // 杩愮淮缁撴灉鏍¢獙 + ywResultRules: { + ywResult: [ + { required: true, message: "杩愮淮缁撴灉涓嶈兘涓虹┖", trigger: "blur" } + ], + }, + // 杩愮淮妫�娴嬬粨鏋滄牎楠� + checkResultRules: { + ywCheckResult: [ + { required: true, message: "杩愮淮妫�娴嬬粨鏋滀笉鑳戒负绌�", trigger: "blur" } + ], + }, }; }, created() { this.getList(); }, methods: { + // 瀹℃牳鎸夐挳 + handleAuditing(row) { + this.auditingForm = row; + this.auditingOpen = true; + }, + // 杩愮淮鎯呭喌鎸夐挳 + handleYwCondition(row) { + this.ywConditionForm = row; + this.ywConditionOpen = true; + }, + // 杩愮淮缁撴灉鎸夐挳 + handleYwResult(row) { + this.ywResultForm = row; + this.ywResultOpen = true; + }, + // 杩愮淮妫�娴嬬粨鏋滄寜閽� + handleCheckResult(row) { + this.checkResultForm = row; + this.checkResultOpen = true; + }, + // 鎻愪氦瀹℃牳 + submitAuditing() { + // todo + }, + // 鍙栨秷瀹℃牳 + cancelAuditing() { + this.auditingForm = {}; + this.auditingOpen = false; + }, + // 鎻愪氦杩愮淮鎯呭喌 + submitYwCondition() { + // todo + }, + cancelYwCondition() { + this.ywConditionForm = {}; + this.ywConditionOpen = false; + }, + // 鎻愪氦杩愮淮缁撴灉 + submitYwResult() { + // todo + }, + cancelYwResult() { + this.ywResultForm = {}; + this.ywResultOpen = false; + }, + // 鎻愪氦妫�娴嬬粨鏋� + submitCheckResult() { + // todo + }, + cancelCheckResult() { + this.checkResultForm = {}; + this.checkResultOpen = false; + }, /** 鏌ヨ杩愮淮宸ュ崟鍒楄〃 */ getList() { this.loading = true; this.queryParams.params = {}; if (null != this.daterangeYwHandleTime && '' != this.daterangeYwHandleTime) { - this.queryParams.params["beginYwHandleTime"] = this.daterangeYwHandleTime[0]; - this.queryParams.params["endYwHandleTime"] = this.daterangeYwHandleTime[1]; + this.queryParams["start"] = this.daterangeYwHandleTime[0]; + this.queryParams["end"] = this.daterangeYwHandleTime[1]; } listWorkOrder(this.queryParams).then(response => { - this.workOrderList = response.rows; + this.workOrderList = response.data; this.total = response.total; this.loading = false; }); -- Gitblit v1.8.0