From ef4e8205a30f83c5478f09182e455528df236e84 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期一, 20 十一月 2023 19:04:28 +0800 Subject: [PATCH] 生产线 --- src/views/eam/DailyMaintenanceOrderList.vue | 272 +++++++++++++++++++++++++++--------------------------- 1 files changed, 135 insertions(+), 137 deletions(-) diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue index 0c3b90a..014bc4c 100644 --- a/src/views/eam/DailyMaintenanceOrderList.vue +++ b/src/views/eam/DailyMaintenanceOrderList.vue @@ -1,7 +1,7 @@ <template> <a-card :bordered="false" - title="鏃ュ父淇濆吇宸ュ崟" + title="浜岀骇淇濆吇" > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> @@ -66,6 +66,13 @@ icon="plus" v-has="'dailyMaintenanceOrder:add'" >鏂板</a-button> + <a-button + v-if="selectedRowKeys.length == 1 && selectionRows[0].status == '8'" + @click="handlePrintInfo(selectionRows[0])" + type="primary" + style="margin-left: 8px" + >绉讳氦鍗曟墦鍗� + </a-button> <!-- <a-button v-if="selectedRowKeys.length > 0" type="primary" @@ -117,7 +124,7 @@ <a-table ref="table" size="middle" - :scroll="{ x: 'calc(2500px + 50%)', y: 900 }" + :scroll="{ x: 'calc(2800px + 50%)', y: 900 }" bordered rowKey="id" :columns="columns" @@ -127,106 +134,19 @@ class="j-table-force-nowrap" @change="handleTableChange" :rowSelection="rowSelection" + :rowClassName="tableRowClass" > - <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> - <!-- <span - slot="action" - slot-scope="text, record" - > - <a-popconfirm - title="纭畾涓嬪彂宸ュ崟鍚�?" - @confirm="() => handleOrderIssue(record)" - > - <a v-if="record.status === '1'">涓嬪彂</a> - </a-popconfirm> - <a-divider - v-if="record.status === '1'" - type="vertical" - /> - <a-popconfirm - title="纭畾鎾ゅ洖宸ュ崟鍚�?" - @confirm="() => handleOrderReset(record)" - > - <a v-if="record.status === '2'">鎾ゅ洖</a> - </a-popconfirm> - <a-divider - v-if="record.status === '2'" - type="vertical" - /> - <a-popconfirm - title="纭畾鎭㈠宸ュ崟鍚�?" - @confirm="() => handleOrderRecover(record)" - > - <a v-if="record.status === '7'">鎭㈠</a> - </a-popconfirm> - <a-divider - v-if="record.status === '7'" - type="vertical" - /> - <a-popconfirm - title="纭畾浣滃簾宸ュ崟鍚�?" - @confirm="() => handleOrderCancel(record)" - > - <a v-if="record.status === '2'">浣滃簾</a> - </a-popconfirm> - <a-divider - v-if="record.status === '2'" - type="vertical" - /> - <a-popconfirm - title="纭畾棰嗗彇宸ュ崟鍚�?" - @confirm="() => handleOrderGet(record)" - > - <a v-if="record.status === '2'">棰嗗彇</a> - </a-popconfirm> - <a-divider - v-if="record.status === '2'" - type="vertical" - /> - <a - v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " - @click="handleOrderExe(record)" - >鎵ц</a> - <a-divider - v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " - type="vertical" - /> - <a - v-if="record.status === '1'" - @click="handleEdit(record)" - >缂栬緫</a> - <a-divider - v-if="record.status === '1'" - type="vertical" - /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - <a-menu-item> - <a-popconfirm - title="纭畾鍒犻櫎鍚�?" - @confirm="() => handleDelete(record.id)" - > - <a v-if="record.status === '1'">鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> --> <span slot="action" slot-scope="text, record" > <a-popconfirm - title="纭畾涓嬪彂宸ュ崟鍚�?" + title="纭畾鎺ユ敹宸ュ崟鍚�?" @confirm="() => handleOrderIssue(record)" v-has="'dailyMaintenanceOrder:issue'" > - <a v-if="record.status == '1'">涓嬪彂</a> + <a v-if="record.status == '1'">鎺ユ敹</a> </a-popconfirm> <a-divider v-if="record.status == '1'" @@ -243,7 +163,7 @@ v-if="record.status == '2'" type="vertical" /> - <a-popconfirm + <!-- <a-popconfirm title="纭畾鎭㈠宸ュ崟鍚�?" @confirm="() => handleOrderRecover(record)" v-has="'dailyMaintenanceOrder:recover'" @@ -253,14 +173,14 @@ <a-divider v-if="record.status == '7'" type="vertical" - /> - <a-popconfirm + /> --> + <!-- <a-popconfirm title="纭畾浣滃簾宸ュ崟鍚�?" @confirm="() => handleOrderCancel(record)" v-has="'dailyMaintenanceOrder:recover'" > <a v-if="record.status == '2'">浣滃簾</a> - </a-popconfirm> + </a-popconfirm> --> <a-divider v-if="record.status == '2'" type="vertical" @@ -277,11 +197,11 @@ @click="handleAssignOrder(record)" v-has="'dailyMaintenanceOrder:assign'" >娲惧伐</a> - <a + <!-- <a v-if="record.status == '3'&& record.assignMode == '2' && record.maintenanceUserName != null " @click="handleAssignOrder(record)" v-has="'dailyMaintenanceOrder:assign'" - >鏀规淳</a> + >鏀规淳</a> --> <!-- <a v-if="record.status == '3'" @click="handleAssignOrder(record)" @@ -310,6 +230,14 @@ >缂栬緫</a> <a-divider v-if="record.status === '1'" + type="vertical" + /> + <a + v-if="record.status === '5' || record.status === '8'" + @click="handleFinish(record)" + >瀹屽伐绉讳氦鍗�</a> + <a-divider + v-if="record.status === '5' || record.status === '8'" type="vertical" /> <a-dropdown> @@ -350,6 +278,10 @@ ref="modalForm" @ok="modalFormOk" ></maintenance-order-modal> + <finish-devolution-modal + ref="FinishDevolutionModal" + @ok="modalFormOk" + ></finish-devolution-modal> <maintenance-order-assign-modal ref="MaintenanceOrderAssignModal" @ok="modalFormOk" @@ -367,6 +299,7 @@ import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal' +import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal' import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal' import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer' import { getAction, postAction, requestPut } from '@/api/manage' @@ -376,12 +309,14 @@ mixins: [JeecgListMixin, mixinDevice], components: { MaintenanceOrderModal, + FinishDevolutionModal, MaintenanceOrderAssignModal, DailyMaintenanceOrderExeDrawer }, data() { return { - description: '鏃ュ父淇濆吇宸ュ崟', + description: '浜岀骇淇濆吇宸ュ崟', + queryParam: { maintenanceType: '2' }, // 琛ㄥご columns: [ { @@ -395,28 +330,35 @@ } }, { - title: '鐘舵��', - align: "center", - dataIndex: 'statusName' - }, - { title: '淇濆吇宸ュ崟鍙�', align: "center", dataIndex: 'num', scopedSlots: { customRender: 'num' } }, { - title: '淇濆吇鍛ㄦ湡', + title: '鐘舵��', align: "center", - dataIndex: 'maintenanceCycleName', + width: 100, + dataIndex: 'statusName' }, + // { + // title: '淇濆吇绫诲瀷', + // align: "center", + // dataIndex: 'maintenanceTypeName', + // }, + // { + // title: '淇濆吇鍛ㄦ湡', + // align: "center", + // dataIndex: 'maintenanceCycleName', + // }, { title: '娲惧伐鏂瑰紡', align: "center", - dataIndex: 'assignModeName' + dataIndex: 'assignModeName', + width: 100, }, { - title: '璁惧缂栫爜', + title: '缁熶竴缂栫爜', align: "center", dataIndex: 'equipmentNum', }, @@ -430,11 +372,11 @@ align: "center", dataIndex: 'equipmentModel', }, - { - title: '淇濆吇鏍囧噯缂栫爜', - align: "center", - dataIndex: 'maintenanceStandardNum', - }, + // { + // title: '淇濆吇鏍囧噯缂栫爜', + // align: "center", + // dataIndex: 'maintenanceStandardNum', + // }, { title: '浣跨敤閮ㄩ棬', @@ -446,23 +388,23 @@ align: "center", dataIndex: 'teamName' }, - { - title: '宸ユ椂瀹氶', - align: "center", - dataIndex: 'workingHourQuota' - }, - { - title: '璁″垝寮�濮嬫椂闂�', - align: "center", - dataIndex: 'planStartTime', - //width: '120px', - }, - { - title: '璁″垝缁撴潫鏃堕棿', - align: "center", - dataIndex: 'planEndTime', - //width: '120px', - }, + // { + // title: '宸ユ椂瀹氶', + // align: "center", + // dataIndex: 'workingHourQuota' + // }, + // { + // title: '璁″垝寮�濮嬫椂闂�', + // align: "center", + // dataIndex: 'planStartTime', + // //width: '120px', + // }, + // { + // title: '璁″垝缁撴潫鏃堕棿', + // align: "center", + // dataIndex: 'planEndTime', + // //width: '120px', + // }, { title: '瀹為檯寮�濮嬫椂闂�', align: "center", @@ -475,15 +417,20 @@ dataIndex: 'actualEndTime', //width: '120px', }, - { - title: '瀹為檯鐢ㄦ椂', - align: "center", - dataIndex: 'actualWorkingHourQuota', - }, + // { + // title: '瀹為檯鐢ㄦ椂', + // align: "center", + // dataIndex: 'actualWorkingHourQuota', + // }, { title: '鎵ц浜�', align: "center", dataIndex: 'maintenanceUserName' + }, + { + title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�', + align: "center", + dataIndex: 'description' }, { title: '鍒涘缓浜�', @@ -551,9 +498,14 @@ this.selectionRows = selectionRows; }, + handlePrintInfo(record) { + let href = `${window._CONFIG['domianURL']}/jmreport/view/857408393168490496?id=` + record.id; //缃戠珯閾炬帴 + window.open(href, "_blank"); + }, + handleOrderExe(record) { this.$refs.DailyMaintenanceOrderExeDrawer.visible = true - this.$refs.DailyMaintenanceOrderExeDrawer.title = '鏃ュ父淇濆吇宸ュ崟鎵ц' + this.$refs.DailyMaintenanceOrderExeDrawer.title = '浜岀骇淇濆吇宸ュ崟鎵ц' this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record) if (record.status === '3') { this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� @@ -572,6 +524,12 @@ this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true } + }, + + handleFinish: function (record) { + this.$refs.FinishDevolutionModal.edit(record); + this.$refs.FinishDevolutionModal.title = "鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�"; + this.$refs.FinishDevolutionModal.disableSubmit = false; }, handleOrderIssue(record) { @@ -640,6 +598,11 @@ this.$refs.MaintenanceOrderAssignModal.title = '宸ュ崟鏀规淳' this.$refs.MaintenanceOrderAssignModal.disableSubmit = false }, + + searchReset() { + this.queryParam = { maintenanceType: '2' } + this.loadData(1); + }, // modalFormOk() { // alert(0) // // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 @@ -647,9 +610,44 @@ // //娓呯┖鍒楄〃閫変腑 // this.onClearSelected() // }, + + //棰勮棰滆壊 + tableRowClass(record, index) { + if ("1" == record.status || "2" == record.status) { + if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) { + return 'yellow' + } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) { + return 'error' + } else if (record.planStartTime < record.currentDateTime) { + return 'frozenRowClass' + } + } + }, } } </script> -<style scoped> +<style > @import '~@assets/less/common.less'; +.frozenRowClass { + color: #c9c9c9; + font-weight: bold; +} +.success { + color: green; +} +.error { + color: red; + font-weight: bold; +} +.yellow { + color: rgba(255, 255, 0, 0.443); + font-weight: bold; +} +.fontweight { + font-weight: bold; +} + +.ant-table-tbody .red { + background-color: red !important; +} </style> \ No newline at end of file -- Gitblit v1.9.3