¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="颿µç»´æ¤å·¥å" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="å·¥åç¶æ"> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å·¥åç¶æ" |
| | | :triggerChange="true" |
| | | dictCode="repair_order_status" |
| | | v-model="queryParam.status" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç»´æ¤å·¥åç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç»´æ¤å·¥åç¼ç " |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤ç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤ç¼ç " |
| | | v-model="queryParam.equipmentNum" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | v-model="queryParam.equipmentName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <!-- <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | <a-button |
| | | v-if="selectedRowKeys.length > 0" |
| | | type="primary" |
| | | @click="batchAssign" |
| | | style="margin-left: 8px" |
| | | >工忴¾å·¥</a-button> --> |
| | | </div> |
| | | |
| | | <!-- 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(1900px + 50%)', y: 900 }" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | > |
| | | <!-- :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' && record.assignMode == '1'">é¢å</a> |
| | | </a-popconfirm> |
| | | <a |
| | | v-if="record.status == '2' && record.assignMode == '2' " |
| | | @click="handleAssignOrder(record)" |
| | | >派工</a> |
| | | <a |
| | | v-if="record.status == '2'&& record.assignMode == '3' && record.inspectionUserName != null " |
| | | @click="handleAssignOrder(record)" |
| | | >æ¹æ´¾</a> |
| | | <a |
| | | v-if="record.status == '3'" |
| | | @click="handleAssignOrder(record)" |
| | | >æ¹æ´¾</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)" |
| | | >æ§è¡</a> |
| | | <a-divider |
| | | v-if="record.status === '3' || record.status === '4' " |
| | | 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="num" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | >{{record.num}}</a> |
| | | <span v-else>{{record.num}}</span> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <predictive-work-order-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></predictive-work-order-model> |
| | | <predictive-work-order-drawer |
| | | ref="PredictiveWorkOrderDrawer" |
| | | @ok="modalFormOk" |
| | | ></predictive-work-order-drawer> |
| | | <order-assign-modal |
| | | ref="OrderAssign" |
| | | @ok="modalFormOk" |
| | | > |
| | | |
| | | </order-assign-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import PredictiveWorkOrderModel from './modules/predictiveWorkOrder/PredictiveWorkOrderModel' |
| | | import PredictiveWorkOrderDrawer from './modules/predictiveWorkOrder/PredictiveWorkOrderDrawer' |
| | | import OrderAssignModal from './modules/predictiveWorkOrder/OrderAssignModal.vue' |
| | | export default { |
| | | name: 'PredictiveWorkOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PredictiveWorkOrderModel, |
| | | PredictiveWorkOrderDrawer, |
| | | OrderAssignModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '颿µæ§ç»´æ¤å·¥å', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: 'çæ§ç±»å', |
| | | align: "center", |
| | | dataIndex: 'monitorType_dictText' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: "center", |
| | | dataIndex: 'model', |
| | | }, |
| | | { |
| | | title: 'æ åç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'planNum', |
| | | }, |
| | | { |
| | | title: 'çæ¬', |
| | | align: "center", |
| | | dataIndex: 'version', |
| | | }, |
| | | { |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'useId_dictText', |
| | | }, |
| | | { |
| | | title: '派工æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'assignMode_dictText', |
| | | }, |
| | | { |
| | | title: '责任çç»', |
| | | align: "center", |
| | | dataIndex: 'teamId_dictText', |
| | | width: 170 |
| | | |
| | | }, |
| | | { |
| | | title: '责任人', |
| | | align: "center", |
| | | dataIndex: 'maintenanceUserId_dictText', |
| | | width: 170 |
| | | }, |
| | | // { |
| | | // title: 'å·¥æ¶å®é¢ï¼å°æ¶ï¼', |
| | | // align: "center", |
| | | // dataIndex: 'planEndTime', |
| | | // width: 170 |
| | | // }, |
| | | { |
| | | title: 'å®é
å·¥æ¶', |
| | | align: "center", |
| | | dataIndex: 'actualWorkingHourQuota', |
| | | width: 170 |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'actualStartTime', |
| | | width: 170 |
| | | }, |
| | | { |
| | | title: 'å®é
ç»ææ¶é´', |
| | | align: "center", |
| | | dataIndex: 'actualEndTime', |
| | | width: 170 |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: "center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: 'åå»ºæ¥æ', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | width: 170 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/predictiveworkorder/pageOrderList", |
| | | delete: "/eam/specialtyMaintenanceOrder/delete", |
| | | deleteBatch: "/eam/specialtyMaintenanceOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/specialtyMaintenanceOrder/exportXls", |
| | | importExcelUrl: "eam/specialtyMaintenanceOrder/importExcel", |
| | | edit: "/eam/predictiveworkorder/editStatus", |
| | | orderGet: "/eam/predictiveworkorder/orderGet", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | 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: { |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | handleOrderExe(record) { |
| | | this.$refs. PredictiveWorkOrderDrawer.visible = true |
| | | this.$refs. PredictiveWorkOrderDrawer.title = 'ä¸ä¸ä¿å
»å·¥åæ§è¡' |
| | | this.$refs. PredictiveWorkOrderDrawer.handleShow(record) |
| | | if (record.status === '3') { |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true//ä¿åãæåãæ¥å·¥ |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = false//å¼å·¥æé® |
| | | } else if (record.status === '4') { |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = false |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '5') { |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = false |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } else if (record.status === '7') { |
| | | this.$refs. PredictiveWorkOrderDrawer.buttonDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.revocationDistable = true |
| | | this.$refs. PredictiveWorkOrderDrawer.SWbuttonDistable = true |
| | | } |
| | | }, |
| | | |
| | | 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: '1' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("å·¥åé¢åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("å·¥åé¢å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | //ä½åº |
| | | handleOrderCancel(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '7' }).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("工忢å¤å¤±è´¥ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | handleAssignOrder: function (record) { |
| | | this.$refs.OrderAssign.edit(record) |
| | | this.$refs.OrderAssign.title = 'å·¥åæ¹æ´¾' |
| | | this.$refs.OrderAssign.disableSubmit = false |
| | | }, |
| | | // modalFormOk() { |
| | | // alert(0) |
| | | // // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | // this.loadData(); |
| | | // //æ¸
空å表éä¸ |
| | | // this.onClearSelected() |
| | | // }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |