From 1168b0243adb3330a252c4594fc23a4e1173a1bc Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 13 三月 2024 10:39:27 +0800
Subject: [PATCH] 点位优化
---
src/views/system/work-order/index.vue | 386 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 327 insertions(+), 59 deletions(-)
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index ecb0621..2ead84c 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -1,19 +1,22 @@
<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"
+ value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="寮�濮嬫棩鏈�"
@@ -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"
@@ -56,7 +59,6 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
- v-hasPermi="['x:work-order:remove']"
>鍒犻櫎</el-button>
</el-col>
<el-col :span="1.5">
@@ -74,38 +76,47 @@
<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="source" width="170"/>
+ <el-table-column label="鏁呴殰绫诲瀷" align="center" prop="errorType" 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>
+ @click="handleAuditing(scope.row)"
+ >瀹℃牳</el-button>
<el-button
size="mini"
type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['x:work-order:remove']"
- >鍒犻櫎</el-button>
+ @click="handleYwCondition(scope.row)"
+ >杩愮淮鎯呭喌</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleYwResult(scope.row)"
+ >杩愮淮缁撴灉</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleCheckResult(scope.row)"
+ >妫�娴嬬粨鏋�</el-button>
</template>
</el-table-column>
</el-table>
@@ -117,6 +128,123 @@
: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="picture">
+ <el-upload
+ class="avatar-uploader"
+ action="/dev-api/common/upload"
+ name="file"
+ :headers="{'Authorization': 'Bearer ' + getToken()}"
+ :on-success="pictureUploadSuccess"
+ :on-remove="pictureRemove"
+ :file-list="pictureList"
+ list-type="picture">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
+ </el-upload>
+ </el-form-item>
+ <el-form-item label="浣愯瘉鏉愭枡" prop="certificates">
+ <el-upload
+ class="avatar-uploader"
+ action="/dev-api/common/upload"
+ name="file"
+ :headers="{'Authorization': 'Bearer ' + getToken()}"
+ :on-success="certificateUploadSuccess"
+ :on-remove="certificateRemove"
+ :file-list="certificateList"
+ list-type="picture">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
+ </el-upload>
+ </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>
@@ -148,12 +276,14 @@
</template>
<script>
-import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder } from "@/api/platform/work-order";
+import { listWorkOrder, getWorkOrder, delWorkOrder, addWorkOrder, updateWorkOrder,auditing, ywCondition } from "@/api/platform/work-order";
export default {
name: "Work-order",
data() {
return {
+ certificateList:[],
+ pictureList: [],
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
@@ -187,31 +317,155 @@
},
// 琛ㄥ崟鍙傛暟
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() {
+ this.$refs["auditingForm"].validate(valid => {
+ if (valid) {
+ auditing(this.auditingForm).then(res => {
+ this.auditingOpen = false;
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ })
+ }
+ })
+ },
+ // 鍙栨秷瀹℃牳
+ cancelAuditing() {
+ this.auditingForm = {};
+ this.auditingOpen = false;
+ },
+ pictureRemove(file, fileList) {
+ this.form.picture = null,
+
+ this.pictureList = this.pictureList.filter(item => item.name !== file.name)
+ },
+ certificateRemove(file, fileList) {
+ this.form.certificate = null,
+
+ this.certificateList = this.certificateList.filter(item => item.name !== file.name)
+ },
+ pictureUploadSuccess(response, file, fileList) {
+ this.form.picture = response.fileName,
+ this.pictureList.push({
+ name: response.originalFilename,
+ url: response.url,
+ fileName: response.fileName
+ })
+ },
+ certificateUploadSuccess(response, file, fileList) {
+ this.form.certificate = response.fileName,
+ this.certificateList.push({
+ name: response.originalFilename,
+ url: response.url,
+ fileName: response.fileName
+ })
+ },
+ // 鎻愪氦杩愮淮鎯呭喌
+ submitYwCondition() {
+ this.$refs["ywConditionForm"].validate(valid => {
+ if (valid) {
+ ywCondition(this.ywConditionForm).then(res => {
+ this.ywConditionOpen = false;
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ })
+ }
+ })
+ },
+ 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;
});
@@ -269,6 +523,20 @@
this.form = response.data;
this.open = true;
this.title = "淇敼杩愮淮宸ュ崟";
+ this.pictureList = JSON.parse(response.data.picture).map(item => {
+ return {
+ name: item,
+ url: process.env.VUE_APP_FILE_API + '/' + item,
+ fileName: item
+ }
+ })
+ this.certificateList = JSON.parse(row.certificate).map(item => {
+ return {
+ name: item,
+ url: process.env.VUE_APP_FILE_API + '/' + item,
+ fileName: item
+ }
+ })
});
},
/** 鎻愪氦鎸夐挳 */
--
Gitblit v1.8.0