From b4d09a09d2a8ffc939e97f8b400ff94a64d13eb7 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期一, 04 三月 2024 17:46:01 +0800 Subject: [PATCH] 优化用户管理页面表单填写界面选择设备功能,车间重新选择后重置选择设备 --- src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue | 114 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 87 insertions(+), 27 deletions(-) diff --git a/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue index ec52559..5f79a1d 100644 --- a/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue +++ b/src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue @@ -17,21 +17,21 @@ @click="handleSW" :disabled=SWbuttonDistable type="primary" - v-has="'dailyMaintenanceOrder:SW'" + v-has="'daily3MaintenanceOrder:SW'" >寮�宸�</a-button> <a-button :style="{marginRight: '8px'}" @click="handleReport" :disabled="buttonDistable" type="primary" - v-has="'dailyMaintenanceOrder:report'" + v-has="'daily3MaintenanceOrder:report'" >鎶ュ伐</a-button> <a-button :style="{marginRight: '8px'}" @click="handleReset" :disabled="revocationDistable" type="primary" - v-has="'dailyMaintenanceOrder:reset'" + v-has="'daily3MaintenanceOrder:reset'" >鎾ら攢</a-button> </a-row> </div> @@ -97,7 +97,7 @@ > <span v-if="this.model != null" - class="hight" + class="hightColor" >{{ this.model.teamName }}</span> <span v-else @@ -107,9 +107,9 @@ </a-col> </a-row> <a-row :gutter="24"> - <a-col :span="24"> + <a-col :span="17"> <a-form-item - label="闂鍙婂鐞嗘帾鏂芥弿杩�" + label="闂/澶勭悊鎺柦" :labelCol="{span:3}" :wrapperCol="{span:18}" class="hightColor" @@ -119,6 +119,21 @@ :disabled="this.model.status!='4'" :placeholder="'璇疯緭鍏ラ棶棰樺強澶勭悊鎺柦鎻忚堪'" v-model="model.description" + /> + </a-form-item> + </a-col> + <a-col :span="7"> + <a-form-item + label="鎶ュ伐浜�" + :labelCol="{span:4}" + :wrapperCol="{span:17}" + class="hightColor" + > + <a-input + :disabled="this.model.status!='4'" + allow-clear + placeholder="璇疯緭鍏ユ姤宸ヤ汉" + v-model="model.maintenanceUserId" /> </a-form-item> </a-col> @@ -156,11 +171,11 @@ > <div :key="col.dataIndex"> <span - v-if=" col.dataIndex == 'photo' && !text" + v-show=" col.dataIndex == 'photo' && !text" style="font-size: 12px;font-style: italic;" >鏃犲浘鐗�</span> <img - v-if="col.dataIndex == 'photo' && text" + v-show="col.dataIndex == 'photo' && text" :src="getImgView(text)" :preview="record.maintenanceStandardDetailId" height="25px" @@ -194,8 +209,9 @@ <a-input :value="text" - v-if="col.dataIndex == 'maintenanceOrderDetailUda1'" + v-show="col.dataIndex == 'maintenanceOrderDetailUda1'" @change="(e)=>handleChange(e, record.key, col, index)" + :disabled="record.disabled" /> </div> </template> @@ -221,7 +237,7 @@ </div> </a-tab-pane> - <a-tab-pane + <!-- <a-tab-pane tab='璁″垝鐢ㄦ枡' key="2" > @@ -268,7 +284,7 @@ :equipmentId="this.model.equipmentId" ></actual-material-edit-table> </div> - </a-tab-pane> + </a-tab-pane>--> <a-tab-pane tab='瀹為檯宸ユ椂' key="6" @@ -283,6 +299,17 @@ :equipmentId="this.model.equipmentId" :teamId="this.model.teamId" ></actual-work-hours-edit-table> + </div> + </a-tab-pane> + <a-tab-pane + tab='鐐夌被鎶ュ憡' + key="7" + > + <div + class="table-operator" + style="margin:-16px" + > + <stove-category-report-list :maintenanceStandardId='this.model.id' /> </div> </a-tab-pane> </a-tabs> @@ -332,6 +359,7 @@ import MaintenanceStandardWorkInstruction from '../dailyMaintenanceOrder/MaintenanceStandardWorkInstruction' import ActualMaterialEditTable from '../dailyMaintenanceOrder/ActualMaterialEditTable.vue' import ActualWorkHoursEditTable from '../dailyMaintenanceOrder/ActualWorkHoursEditTable.vue' +import StoveCategoryReportList from './StoveCategoryReportList.vue' export default { name: 'DailyMaintenanceOrderExeDrawer', @@ -344,7 +372,8 @@ MaintenanceStandardSafetyRequirement, MaintenanceStandardWorkInstruction, ActualMaterialEditTable, - ActualWorkHoursEditTable + ActualWorkHoursEditTable, + StoveCategoryReportList }, data() { return { @@ -358,6 +387,7 @@ revocationDistable: false, currentNodeSelect: '', maintenanceStandardId: '-1', + maintenanceOrderId: '-1', loading: false, dataSource: [], model: {}, @@ -369,6 +399,18 @@ wrapperCol: { xs: { span: 24 }, sm: { span: 18 }, + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 99, + pageSizeOptions: ['99'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 }, validatorRules: { // description: { @@ -390,25 +432,25 @@ }, { - title: '閮ㄤ綅', + title: '淇濆吇閮ㄤ綅', align: 'center', dataIndex: 'location', }, // class: "notshow" - { - title: '绀烘剰鍥�', - align: 'center', - dataIndex: 'photo', - scopedSlots: { customRender: 'photo' }, - }, + // { + // title: '绀烘剰鍥�', + // align: 'center', + // dataIndex: 'photo', + // scopedSlots: { customRender: 'photo' }, + // }, // class: "notshow" { - title: '淇濆吇椤圭洰', + title: '淇濆吇鍐呭', align: 'center', dataIndex: 'maintenanceProjectNum', }, { - title: '淇濆吇鏍囧噯', + title: '楠屾敹鏍囧噯', align: 'center', dataIndex: 'standard', }, @@ -472,6 +514,7 @@ handleShow(record) { this.model = Object.assign({}, record); this.maintenanceStandardId = record.maintenanceStandardId + this.maintenanceOrderId = record.id this.dataSource = [] this.visible = true; this.queryParam.dailyMaintenanceOrderId = record.id @@ -497,11 +540,11 @@ // } //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ this.dataSource = res.result.records || res.result; - if (res.result.total) { - this.ipagination.total = res.result.total; - } else { - this.ipagination.total = 0; - } + // if (res.result.total) { + // this.ipagination.total = res.result.total; + // } else { + // this.ipagination.total = 0; + // } //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ } else { this.$message.warning(res.message) @@ -521,6 +564,8 @@ return "background-color:rgba(127, 127, 127,0.08)"; }, handleCancel() { + debugger + this.maintenanceOrderId = '-1' this.$emit('ok'); this.alterFlag = new Date(); this.close() @@ -544,6 +589,7 @@ onOk() { requestPut(that.url.editStatus, { id: that.model.id, status: '4' }).then((res) => { if (res.success) { + that.loadData1(1) that.model.status = '4' that.$message.success("宸ュ崟寮�宸ユ垚鍔燂紒") that.buttonDistable = false @@ -563,13 +609,26 @@ handleReport() { const that = this; that.confirmLoading = true; + for (let i = 0; i < that.dataSource.length; i++) { + let o = this.dataSource[i] + if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') { + that.$message.warning("璇峰~鍐欑" + (i + 1) + "淇濆吇浜猴紒"); + that.confirmLoading = false; + return + } + } + if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") { + that.$message.warning("璇峰~鍐欐姤宸ヤ汉锛�"); + that.confirmLoading = false; + return + } this.$confirm({ title: '淇濆吇宸ュ崟鎶ュ伐', content: '鎻愮ず锛氭姤宸ュ悗淇濆吇瀹屽伐锛岃璋ㄦ厧鎿嶄綔锛�', okText: '纭', cancelText: '鍙栨秷', onOk() { - requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => { + requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => { if (res.success) { that.model.status = '5' that.$message.success(res.message) @@ -606,6 +665,7 @@ that.buttonDistable = false that.revocationDistable = true that.SWbuttonDistable = true + that.loadData1(1) } else { that.$message.warning(res.message) } -- Gitblit v1.9.3