¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="" |
| | | > |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div |
| | | class="ant-alert ant-alert-info" |
| | | style="margin-bottom: 16px;" |
| | | > |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected" |
| | | >æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{ x: 'calc(2200px + 50%)', y: 900 }" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowClassName="tableRowClass" |
| | | > |
| | | <!-- :rowSelection="rowSelection" --> |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¥æ¶å·¥åå?" |
| | | @confirm="() => handleOrderIssue(record)" |
| | | v-has="'dailyInspectionOrder:issue'" |
| | | > |
| | | <a v-if="record.status == '1'">æ¥æ¶</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '1'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå·¥åå?" |
| | | @confirm="() => handleOrderReset(record)" |
| | | v-has="'dailyInspectionOrder:issue'" |
| | | > |
| | | <a v-if="record.status == '2'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> |
| | | <!-- <a-popconfirm |
| | | title="ç¡®å®æ¢å¤å·¥åå?" |
| | | @confirm="() => handleOrderRecover(record)" |
| | | v-has="'dailyInspectionOrder:recover'" |
| | | > |
| | | <a v-if="record.status == '7'">æ¢å¤</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '7'" |
| | | type="vertical" |
| | | /> --> |
| | | <!-- <a-popconfirm |
| | | title="ç¡®å®ä½åºå·¥åå?" |
| | | @confirm="() => handleOrderCancel(record)" |
| | | v-has="'dailyInspectionOrder:recover'" |
| | | > |
| | | <a v-if="record.status == '2'">ä½åº</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> --> |
| | | <a-popconfirm |
| | | title="ç¡®å®é¢åå·¥åå?" |
| | | @confirm="() => handleOrderGet(record)" |
| | | v-has="'dailyInspectionOrder:get'" |
| | | > |
| | | <a v-if="record.status == '2' && record.assignMode == '1'">é¢å</a> |
| | | </a-popconfirm> |
| | | <!-- <a |
| | | v-if="record.status == '2' && record.assignMode == '2' " |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | | >派工</a> --> |
| | | <!-- <a |
| | | v-if="record.status == '2'&& record.assignMode == '3' && record.inspectionUserName != null " |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | | >æ¹æ´¾</a> |
| | | <a |
| | | v-if="record.status == '3'" |
| | | @click="handleAssignOrder(record)" |
| | | v-has="'dailyInspectionOrder:assign'" |
| | | >æ¹æ´¾</a>--> |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> |
| | | <a-divider |
| | | v-if="record.status === '3'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '3' || record.status === '4' " |
| | | @click="handleOrderExe(record)" |
| | | v-has="'dailyInspectionOrder:exe'" |
| | | >æ§è¡</a> |
| | | <a-divider |
| | | v-if="record.status === '3' || record.status === '4' " |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="维修人确认å®å·¥å?" |
| | | @confirm="() => handleOrderRepairConfirm(record)" |
| | | v-has="'dailyInspectionOrder:repairConfirm'" |
| | | > |
| | | <a v-if="record.status == '5'">维修确认</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '5'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '1'" |
| | | @click="handleEdit(record)" |
| | | v-has="'dailyInspectionOrder:edit'" |
| | | >ç¼è¾</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)" |
| | | v-has="'dailyInspectionOrder:delete'" |
| | | > |
| | | <a v-if="record.status === '1'">å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | <span |
| | | slot="num" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '6' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | >{{record.num}}</a> |
| | | <span v-else>{{record.num}}</span> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <daily-inspection-order-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></daily-inspection-order-modal> |
| | | |
| | | <inspection-order-assign-modal |
| | | ref="InspectionOrderAssignModal" |
| | | @ok="modalFormOk" |
| | | ></inspection-order-assign-modal> |
| | | |
| | | <inspection-order-exe-modal |
| | | ref="InspectionOrderExeModal" |
| | | @ok="modalFormOk" |
| | | ></inspection-order-exe-modal> |
| | | <daily-inspection-order-exe-drawer |
| | | ref="DailyInspectionOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ></daily-inspection-order-exe-drawer> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DailyInspectionOrderModal from '@/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderModal' |
| | | import InspectionOrderAssignModal from '@/views/eam/modules/dailyInspectionOrder/InspectionOrderAssignModal' |
| | | import InspectionOrderExeModal from '@/views/eam/modules/dailyInspectionOrder/InspectionOrderExeModal' |
| | | import DailyInspectionOrderExeDrawer from '@/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'DailyInspectionOrderListComponent', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | DailyInspectionOrderModal, |
| | | InspectionOrderExeModal, |
| | | DailyInspectionOrderExeDrawer, |
| | | InspectionOrderAssignModal |
| | | }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.queryParam['equipmentId'] = 'NAN' |
| | | this.loadData(1); |
| | | }else{ |
| | | this.queryParam['equipmentId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'èªä¸»ç»´æ¤ç¹æ£å·¥å', |
| | | finishTime: [], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | |
| | | { |
| | | title: 'ç¹æ£å·¥åå·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£å¨æ', |
| | | align: "center", |
| | | width: 100, |
| | | dataIndex: 'inspectionCycleName' |
| | | }, |
| | | // { |
| | | // title: 'ç¹æ£æ¥æ', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionDate', |
| | | // customRender: function (text) { |
| | | // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | // }, |
| | | // { |
| | | // title: 'ç¹æ£æ¶é´', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionTime', |
| | | // // customRender: function (text) { |
| | | // // return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text) |
| | | // // } |
| | | // }, |
| | | // { |
| | | // title: 'æªæ¢æ¶é´', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionDeadline', |
| | | // }, |
| | | |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'useDepartName' |
| | | }, |
| | | { |
| | | title: '责任çç»', |
| | | align: "center", |
| | | dataIndex: 'teamName' |
| | | }, |
| | | // { |
| | | // title: 'å¼å·¥æ¡ä»¶', |
| | | // align: "center", |
| | | // dataIndex: 'startWorkCondition', |
| | | // customRender: (text) => { |
| | | // if (text == '1') { |
| | | // return "æ¯"; |
| | | // } else if (text == '0') { |
| | | // return "å¦"; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // { |
| | | // title: 'ç¹æ£æ åç¼ç ', |
| | | // align: "center", |
| | | // dataIndex: 'inspectionStandardNum' |
| | | // }, |
| | | |
| | | // { |
| | | // title: '派工æ¹å¼', |
| | | // align: "center", |
| | | // dataIndex: 'assignModeName' |
| | | // }, |
| | | // { |
| | | // title: 'ç¹æ£ç»æ', |
| | | // align: "center", |
| | | // dataIndex: 'result' |
| | | // }, |
| | | { |
| | | title: 'ç¹æ£äºº', |
| | | align: "center", |
| | | dataIndex: 'inspectionUserName' |
| | | }, |
| | | { |
| | | title: 'ç¹æ£æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'actualEndTime', |
| | | // customRender: function (text) { |
| | | // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | { |
| | | title: '维修确认人', |
| | | align: "center", |
| | | dataIndex: 'repairConfirmPerson' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'repairConfirmDate', |
| | | // customRender: function (text) { |
| | | // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) |
| | | // } |
| | | }, |
| | | // { |
| | | // title: 'å建人', |
| | | // align: "center", |
| | | // dataIndex: 'createBy' |
| | | // }, |
| | | // { |
| | | // title: 'åå»ºæ¥æ', |
| | | // align: "center", |
| | | // dataIndex: 'createTime', |
| | | // }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 230, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/inspectionOrder/getInspectionOrderList", |
| | | delete: "/eam/inspectionOrder/delete", |
| | | deleteBatch: "/eam/inspectionOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/inspectionOrder/exportXls", |
| | | importExcelUrl: "eam/inspectionOrder/importExcel", |
| | | edit: "/eam/inspectionOrder/editStatus", |
| | | orderGet: "/eam/inspectionOrder/orderGet", |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.onSelectChange(selectedRows); |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | }, |
| | | methods: { |
| | | |
| | | // handleOrderExe(record) { |
| | | // this.$refs.InspectionOrderExeModal.visible = true |
| | | // this.$refs.InspectionOrderExeModal.title = 'æ¥å¸¸ç¹æ£æ§è¡' |
| | | // this.$refs.InspectionOrderExeModal.handleShow(record) |
| | | // }, |
| | | //æ¹æ´¾ |
| | | handleAssignOrder: function (record) { |
| | | this.$refs.InspectionOrderAssignModal.edit(record) |
| | | this.$refs.InspectionOrderAssignModal.title = 'å·¥åæ¹æ´¾' |
| | | this.$refs.InspectionOrderAssignModal.disableSubmit = false |
| | | }, |
| | | handleOrderExe(record) { |
| | | this.$refs.DailyInspectionOrderExeDrawer.visible = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.title = 'èªä¸»ç»´æ¤ç¹æ£æ§è¡' |
| | | this.$refs.DailyInspectionOrderExeDrawer.handleShow(record) |
| | | if (record.status === '3') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true//ä¿åãæåãæ¥å·¥ |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = false//å¼å·¥æé® |
| | | } else if (record.status === '4') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = false |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '5') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = false |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '6') { |
| | | this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true |
| | | this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | handleOrderIssue(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("å·¥åä¸åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("å·¥åä¸å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | //æ¤å |
| | | handleOrderReset(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '1' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工忤åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工忤å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | handleOrderGet(record) { |
| | | const that = this; |
| | | requestPut(that.url.orderGet, { id: record.id, status: '3' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("å·¥åé¢åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("å·¥åé¢å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | //维修确认 |
| | | handleOrderRepairConfirm(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '6' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("å·¥åå®å·¥æåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("å·¥åå®å·¥å¤±è´¥ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //æ¢å¤ |
| | | handleOrderRecover(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工忢夿åï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工忢å¤å¤±è´¥ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //é¢è¦é¢è² |
| | | tableRowClass(record, index) { |
| | | if (("1" == record.status || "2" == record.status) && "1æ¥" == record.inspectionCycleName) { |
| | | if (record.redWarningTime < record.currentDateTime) { |
| | | return 'error' |
| | | } |
| | | } |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <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> |