¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | title="维修工å" |
| | | :bordered="false" |
| | | > |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <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 |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="åæ®å·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥åæ®å·" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="设å¤ç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤ç¼ç " |
| | | v-model="queryParam.equipmentNum" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="3"> |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a |
| | | @click="handleToggleSearch" |
| | | style="margin-left: 8px" |
| | | > |
| | | {{ toggleSearchStatus ? 'æ¥è¯¢æ¡ä»¶æ¶èµ·' : 'è¯¦ç»æ¥è¯¢' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | v-model="queryParam.equipmentName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-dropdown> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="handleAddPre(1)" |
| | | ><a-icon type="smile" />èªå»º</a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | @click="handleAddPre(2)" |
| | | ><a-icon type="copy" />åç
§ä¿ä¿®æ
éå</a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | @click="handleAddPre(3)" |
| | | ><a-icon type="copy" />åç
§é¡¹ç®æ§ç»´ä¿®</a-menu-item> |
| | | </a-menu> |
| | | <a-button |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </a-dropdown> |
| | | |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | style="margin-right: 5px" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | hidden |
| | | type="primary" |
| | | icon="plus" |
| | | @click="handleDispatch()" |
| | | :disabled="selectionRows.length==0" |
| | | >派工</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('维修工å')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> --> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> --> |
| | | </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" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{ x: 'calc(2700px + 50%)', y: 900 }" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenSelect" |
| | | > |
| | | <!-- :rowSelection="rowSelection" --> |
| | | |
| | | <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)" |
| | | ><j-ellipsis :value="text" :length="15"/></a> |
| | | <span v-else> <j-ellipsis :value="text" :length="15"/></span> |
| | | </span> |
| | | |
| | | <!-- <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®ä¸åå?" |
| | | @confirm="() => handleDistribute(record)" |
| | | > |
| | | <a v-if="record.status=='0'">ä¸å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.status=='0'" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå?" |
| | | @confirm="() => handleWithdraw(record)" |
| | | > |
| | | <a v-if="record.status=='1'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.status=='1'" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®é¢åå?" |
| | | @confirm="() => handleReceive(record)" |
| | | > |
| | | <a v-if="record.status=='1'">é¢å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.status=='1'" |
| | | /> |
| | | <a |
| | | v-if="record.status === '2' || record.status === '3' ||record.status === '4'" |
| | | @click="handleOrderExe(record)" |
| | | >æ§è¡</a> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.status === '2' || record.status === '3' ||record.status === '4'" |
| | | /> |
| | | <a |
| | | @click="handleEditPre(record)" |
| | | v-if="record.status=='0'" |
| | | >ç¼è¾</a> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.status=='0'" |
| | | /> |
| | | <a-dropdown v-if="record.status=='0'"> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> --> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®ä¸åå·¥åå?" |
| | | @confirm="() => handleDistribute(record)" |
| | | > |
| | | <a v-if="record.status == '0'">ä¸å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '0'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå·¥åå?" |
| | | @confirm="() => handleWithdraw(record)" |
| | | > |
| | | <a v-if="record.status == '1'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status == '1'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®é¢åå·¥åå?" |
| | | @confirm="() => handleReceive(record)" |
| | | > |
| | | <a v-if="record.status == '1' && record.dispatchMethod == '2'">é¢å</a> |
| | | </a-popconfirm> |
| | | <a |
| | | v-if="record.status == '1' && record.dispatchMethod == '1' " |
| | | @click="handleAssignOrder(record)" |
| | | >派工</a> |
| | | <a |
| | | v-if="record.status == '2' && record.dispatchMethod != null " |
| | | @click="handleAssignOrder(record)" |
| | | >æ¹æ´¾</a> |
| | | <a-divider |
| | | v-if="record.status == '1' || record.status == '2' " |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '2' || record.status === '3' " |
| | | @click="handleOrderExe(record)" |
| | | >æ§è¡</a> |
| | | <a-divider |
| | | v-if="record.status === '2' || record.status === '3' " |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '0'" |
| | | @click="handleEditPre(record)" |
| | | >ç¼è¾</a> |
| | | <a-divider |
| | | v-if="record.status === '0'" |
| | | 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 === '0'">å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | tab="æ
éæè¿°" |
| | | key="1" |
| | | > |
| | | <FaultDescriptionList ref="FaultDescriptionList" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="ç»´ä¿®è¦æ±" |
| | | key="2" |
| | | > |
| | | <RepairOrderDetailList |
| | | :mainId="repairOrderDetailMainId" |
| | | :addStatus="sonsAddStatus" |
| | | /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="计åç¨æ" |
| | | key="3" |
| | | forceRender |
| | | > |
| | | <RepairOrderPlanMaterialList |
| | | :addStatus="sonsAddStatus" |
| | | :mainId="repairOrderPlanMaterialMainId" |
| | | /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="å±é©é²æ§" |
| | | key="4" |
| | | forceRender |
| | | > |
| | | <RepairOrderRiskPreventionList |
| | | :addStatus="sonsAddStatus" |
| | | :mainId="repairOrderRiskPreventionMainId" |
| | | /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="ä½ä¸æå¯¼ä¹¦" |
| | | key="5" |
| | | forceRender |
| | | > |
| | | <EquipmentDocumentList |
| | | :addStatus="sonsAddStatus" |
| | | :mainId="equipmentDocumentMainId" |
| | | /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="å®é
ç¨æ" |
| | | key="6" |
| | | forceRender |
| | | v-if="!sonsAddStatus&&selectedRowKeys.length!=0" |
| | | > |
| | | <RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="å®é
å·¥æ¶" |
| | | key="7" |
| | | forceRender |
| | | v-if="!sonsAddStatus&&selectedRowKeys.length!=0" |
| | | > |
| | | <RepairOrderActualWorkHoursList :mainId="repairOrderActualWorkHoursMainId" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="æ
éåæ" |
| | | key="8" |
| | | forceRender |
| | | v-if="!sonsAddStatus&&selectedRowKeys.length!=0" |
| | | > |
| | | <RepairOrderFaultAnalysisList :mainId="repairOrderFaultAnalysisMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <repairOrder-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | :isSelfCreate="isSelfCreate" |
| | | ></repairOrder-modal> |
| | | <repair-order-assign-task |
| | | ref="RepairOrderAssignModal" |
| | | @ok="modalFormOk" |
| | | > |
| | | </repair-order-assign-task> |
| | | <repair-order-excute-drawer |
| | | ref="repairOrderExcuteDrawer" |
| | | @ok="modalFormOk" |
| | | :repairOrder="excuteRepairOrder" |
| | | > |
| | | </repair-order-excute-drawer> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import RepairOrderModal from './modules/repairorder/RepairOrderModal' |
| | | import { getAction } from '@/api/manage' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import RepairOrderDetailList from './RepairOrderDetailList' |
| | | import RepairOrderRiskPreventionList from './RepairOrderRiskPreventionList' |
| | | import RepairOrderFaultAnalysisList from './RepairOrderFaultAnalysisList' |
| | | import RepairOrderPlanMaterialList from './RepairOrderPlanMaterialList' |
| | | import RepairOrderActualMaterialList from './RepairOrderActualMaterialList' |
| | | import RepairOrderActualWorkHoursList from './RepairOrderActualWorkHoursList' |
| | | import EquipmentDocumentList from './RepairOrderEquipmentDocumentList' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { putAction } from '../../api/manage' |
| | | import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue' |
| | | import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue' |
| | | import FaultDescriptionList from './FaultDescriptionList' |
| | | export default { |
| | | name: "RepairOrderList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | RepairOrderDetailList, |
| | | RepairOrderRiskPreventionList, |
| | | RepairOrderFaultAnalysisList, |
| | | RepairOrderPlanMaterialList, |
| | | RepairOrderActualMaterialList, |
| | | RepairOrderActualWorkHoursList, |
| | | EquipmentDocumentList, |
| | | RepairOrderModal, |
| | | RepairOrderAssignTask, |
| | | RepairOrderExcuteDrawer, |
| | | FaultDescriptionList |
| | | }, |
| | | 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: 'businessType_dictText' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText' |
| | | }, |
| | | { |
| | | title: 'ç´§æ¥ç¨åº¦', |
| | | align: "center", |
| | | dataIndex: 'urgency_dictText' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'maintenanceMethod_dictText' |
| | | }, |
| | | { |
| | | title: 'å§å¤åä½', |
| | | align: "center", |
| | | dataIndex: 'outsourcingUnitName' |
| | | }, |
| | | { |
| | | title: '责任çç»', |
| | | align: "center", |
| | | dataIndex: 'teamId_dictText' |
| | | }, |
| | | { |
| | | title: '责任人', |
| | | align: "center", |
| | | dataIndex: 'responsibilityId_dictText' |
| | | }, |
| | | { |
| | | title: '派工æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'dispatchMethod_dictText' |
| | | }, |
| | | // { |
| | | // title: 'ç¹ç§è®¾å¤', |
| | | // align: "center", |
| | | // dataIndex: 'specificEquipment_dictText' |
| | | // }, |
| | | { |
| | | title: 'æ
éæè¿°', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | }, |
| | | // { |
| | | // title: 'æ
éæ¶é´', |
| | | // align: "center", |
| | | // dataIndex: 'faultTime' |
| | | // }, |
| | | // { |
| | | // title: 'æ
éç
§ç', |
| | | // align: "center", |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'imgSlot' } |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦åæº', |
| | | // align: "center", |
| | | // dataIndex: 'isStop_dictText' |
| | | // }, |
| | | { |
| | | title: 'å·¥æ¶å®é¢', |
| | | align: "center", |
| | | dataIndex: 'workingHourQuota' |
| | | }, |
| | | { |
| | | title: 'å®é
å·¥æ¶', |
| | | align: "center", |
| | | dataIndex: 'actualHour' |
| | | }, |
| | | { |
| | | title: '计åå¼å§æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'planStartTime' |
| | | }, |
| | | { |
| | | title: '计åç»ææ¶é´', |
| | | align: "center", |
| | | dataIndex: 'planEndTime' |
| | | }, |
| | | { |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'actualStartTime' |
| | | }, |
| | | { |
| | | title: 'å®é
ç»ææ¶é´', |
| | | align: "center", |
| | | dataIndex: 'actualEndTime' |
| | | }, |
| | | { |
| | | 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/repairOrder/list", |
| | | delete: "/eam/repairOrder/delete", |
| | | deleteBatch: "/eam/repairOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/repairOrder/exportXls", |
| | | importExcelUrl: "eam/repairOrder/importExcel", |
| | | orderDistribute: "eam/repairOrder/distribute", |
| | | orderWithdraw: "eam/repairOrder/withdraw", |
| | | orderDispatch: "eam/repairOrder/dispatch", |
| | | orderReceive: "eam/repairOrder/receive", |
| | | orderStart: "eam/repairOrder/start" |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId: '', |
| | | // superFieldList: [], |
| | | repairOrderDetailMainId: '', |
| | | repairOrderRiskPreventionMainId: '', |
| | | repairOrderFaultAnalysisMainId: '', |
| | | repairOrderPlanMaterialMainId: '', |
| | | repairOrderActualMaterialMainId: '', |
| | | repairOrderActualWorkHoursMainId: '', |
| | | equipmentDocumentMainId: '', |
| | | isSelfCreate: '1', |
| | | excuteRepairOrder: {}, |
| | | assignTaskList: [], |
| | | sonsAddStatus: false, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.onSelectChange(selectedRowKeys, selectedRows); |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | }, |
| | | |
| | | watch: { |
| | | selectionRows() { |
| | | this.$bus.$emit('repairOrderSelectionRows', this.selectionRows); |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedMainId = '' |
| | | this.repairOrderDetailMainId = '' |
| | | this.repairOrderRiskPreventionMainId = '' |
| | | this.repairOrderFaultAnalysisMainId = '' |
| | | this.repairOrderPlanMaterialMainId = '' |
| | | this.repairOrderActualMaterialMainId = '' |
| | | this.repairOrderActualWorkHoursMainId = '' |
| | | this.equipmentDocumentMainId = '' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.selectedMainId = selectedRowKeys[0] |
| | | this.repairOrderDetailMainId = selectionRows[0]['id'] |
| | | this.repairOrderRiskPreventionMainId = selectionRows[0]['id'] |
| | | this.repairOrderFaultAnalysisMainId = selectionRows[0]['id'] |
| | | this.repairOrderPlanMaterialMainId = selectionRows[0]['id'] |
| | | this.repairOrderActualMaterialMainId = selectionRows[0]['id'] |
| | | this.repairOrderActualWorkHoursMainId = selectionRows[0]['id'] |
| | | this.equipmentDocumentMainId = selectionRows[0]['id'] |
| | | this.sonsAddStatus = (selectionRows[0]['status'] == '0') |
| | | this.$refs.FaultDescriptionList.faultId = selectedRowKeys[0] |
| | | } else { |
| | | this.$refs.FaultDescriptionList.faultId = '-1' |
| | | this.selectedMainId = '' |
| | | this.repairOrderDetailMainId = '' |
| | | this.repairOrderRiskPreventionMainId = '' |
| | | this.repairOrderFaultAnalysisMainId = '' |
| | | this.repairOrderPlanMaterialMainId = '' |
| | | this.repairOrderActualMaterialMainId = '' |
| | | this.repairOrderActualWorkHoursMainId = '' |
| | | this.equipmentDocumentMainId = '' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.assignTaskList = []; |
| | | for (var i = 0; i < selectionRows.length; i++) { |
| | | if (selectionRows[i].status == '1') { |
| | | this.assignTaskList.push(selectionRows[i]); |
| | | } |
| | | } |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.repairOrderType = 0; |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | this.$refs.FaultDescriptionList.faultId = '-1' |
| | | this.excuteRepairOrder = {} |
| | | }) |
| | | }, |
| | | |
| | | handleAddPre(isSelfCreate) { |
| | | this.isSelfCreate = isSelfCreate; |
| | | this.handleAdd(); |
| | | }, |
| | | handleEditPre(record) { |
| | | console.log(record); |
| | | if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') { |
| | | this.isSelfCreate = '2'; |
| | | } |
| | | else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') { |
| | | this.isSelfCreate = '3'; |
| | | } else { |
| | | this.isSelfCreate = '1'; |
| | | } |
| | | this.handleEdit(record); |
| | | }, |
| | | //å·¥åæµç¨æä½ |
| | | handleDistribute(record) { |
| | | putAction(this.url.orderDistribute, record).then(res => { |
| | | if (res.result) { |
| | | this.$message.success('ä¸åæå'); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error('ä¸ååºç°å¼å¸¸') |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | handleDispatch() { |
| | | if (this.assignTaskList.length == 0) { |
| | | this.$message.warn('æéå·¥åæ éæ´¾å·¥'); |
| | | } else { |
| | | this.$refs.RepairOrderAssignModal.visible = true |
| | | this.$refs.RepairOrderAssignModal.title = 'ç»´ä¿®å·¥åæ´¾å·¥' |
| | | this.$refs.RepairOrderAssignModal.selectionRows |
| | | this.$refs.RepairOrderAssignModal.handleShow() |
| | | } |
| | | }, |
| | | //æ¹æ´¾ |
| | | handleAssignOrder: function (record) { |
| | | this.$refs.RepairOrderAssignModal.edit(record) |
| | | this.$refs.RepairOrderAssignModal.title = 'å·¥åæ¹æ´¾' |
| | | this.$refs.RepairOrderAssignModal.disableSubmit = false |
| | | }, |
| | | handleWithdraw(record) { |
| | | putAction(this.url.orderWithdraw, record).then(res => { |
| | | if (res.result) { |
| | | this.$message.success('æ¤éæå'); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error('æ¤éåºç°å¼å¸¸') |
| | | } |
| | | }) |
| | | }, |
| | | handleReceive(record) { |
| | | putAction(this.url.orderReceive, record).then(res => { |
| | | if (res.result) { |
| | | this.$message.success('é¢åæå'); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error('é¢ååºç°å¼å¸¸') |
| | | } |
| | | }) |
| | | }, |
| | | handleOrderExe(record) { |
| | | this.excuteRepairOrder = record; |
| | | this.$refs.repairOrderExcuteDrawer.visible = true |
| | | this.$refs.repairOrderExcuteDrawer.title = 'ç»´ä¿®å·¥åæ§è¡' |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.onClearSelected() |
| | | this.$refs.FaultDescriptionList.faultId = '-1' |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | this.onClearSelected() |
| | | this.$refs.FaultDescriptionList.faultId = '-1' |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |