¶Ô±ÈÐÂÎļþ |
| | |
| | | <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-row> |
| | | </a-form> |
| | | </div> |
| | | <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="audit_status" |
| | | v-model="queryParam.auditStatus" |
| | | /> |
| | | </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 |
| | | :md="4" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | v-model="queryParam.equipmentName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col |
| | | :md="4" |
| | | :sm="8" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | style="margin-right: 5px" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <!-- <a-dropdown> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="handleAddPre(true)" |
| | | ><a-icon type="smile" />èªå»º</a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | @click="handleAddPre(false)" |
| | | ><a-icon type="copy" />åç
§ä¿ä¿®æ
éå</a-menu-item> |
| | | </a-menu> |
| | | <a-button |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | </a-dropdown> |
| | | <a-button |
| | | type="primary" |
| | | icon="plus" |
| | | @click="handleDispatch()" |
| | | :disabled="selectionRows.length==0" |
| | | v-if="false" |
| | | >派工</a-button> --> |
| | | <a-button |
| | | type="primary" |
| | | icon="plus" |
| | | @click="handleAddPre(true)" |
| | | >æ°å¢</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" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{ x: 'calc(1900px + 50%)', y: 900 }" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenSelect" |
| | | > |
| | | <!-- :rowSelection="rowSelection" --> |
| | | <template |
| | | slot="htmlSlot" |
| | | slot-scope="text" |
| | | > |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template |
| | | slot="imgSlot" |
| | | slot-scope="text,record" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ å¾ç</span> |
| | | <img |
| | | v-else |
| | | :src="getImgView(text)" |
| | | :preview="record.id" |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | </template> |
| | | <template |
| | | slot="fileSlot" |
| | | slot-scope="text" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)" |
| | | > |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == 'notSubmitted'" |
| | | title="确认æäº¤å?" |
| | | @confirm="() =>handleCommit(record, 'commit')" |
| | | > |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == 'pendingApproval'" |
| | | title="确认æ¤åå?" |
| | | @confirm="() =>handleCommit(record, 'back')" |
| | | > |
| | | <a>æ¤å</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider |
| | | v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.auditStatus == 'notSubmitted' " |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | <a |
| | | v-if="record.auditStatus == 'pendingApproval'" |
| | | @click="handleApprove(record)" |
| | | >审æ¹</a> |
| | | <a-divider |
| | | v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" |
| | | 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 v-if="record.auditStatus == 'notSubmitted'"> |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == 'notSubmitted'" |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <!-- <a-menu-item v-if="record.auditStatus == '3' || record.auditStatus == '4'"> |
| | | <a-popconfirm |
| | | v-if="record.auditStatus == '3' || record.auditStatus == '4'" |
| | | title="确认æ¤éå?" |
| | | @confirm="() =>handleFinish(record, 'revoke')" |
| | | > |
| | | <a>æ¤é</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> --> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | <!-- <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <span |
| | | v-if="record.auditStatus=='7'" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >已确认</span> |
| | | <a-popconfirm |
| | | title="ç¡®å®æäº¤å?" |
| | | @confirm="() => handleReport(record)" |
| | | > |
| | | <a v-if="record.auditStatus=='0'">æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.auditStatus=='0'" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå?" |
| | | @confirm="() => handleWithdraw(record)" |
| | | > |
| | | <a v-if="record.auditStatus=='4'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.auditStatus=='4'" |
| | | /> |
| | | <a-popconfirm |
| | | title="确认å?" |
| | | @confirm="() => handleConfirm(record)" |
| | | > |
| | | <a v-if="record.auditStatus=='4'">确认</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.auditStatus=='1'" |
| | | /> |
| | | <a |
| | | @click="handleEditPre(record)" |
| | | v-if="record.auditStatus=='0'" |
| | | >ç¼è¾</a> |
| | | <a-divider |
| | | type="vertical" |
| | | v-if="record.auditStatus=='0'" |
| | | /> |
| | | <a-dropdown v-if="record.auditStatus=='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> --> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | tab="æ
éæè¿°" |
| | | key="1" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <FaultDescriptionList ref="FaultDescriptionList" /> |
| | | </div> |
| | | |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="å®é
ç©æ" |
| | | key="2" |
| | | forceRender |
| | | > |
| | | <RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="å®é
å·¥æ¶" |
| | | key="3" |
| | | forceRender |
| | | > |
| | | <RepairOrderActualWorkHoursList :mainId="repairOrderActualWorkHoursMainId" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab="æ
éåæ" |
| | | key="4" |
| | | forceRender |
| | | > |
| | | <RepairOrderFaultAnalysisList :mainId="repairOrderFaultAnalysisMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <repairOrder-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | :isSelfCreate="isSelfCreate" |
| | | ></repairOrder-modal> |
| | | <approvel-modal |
| | | ref='approvalModalForm' |
| | | @ok='approvalModalFormOk' |
| | | @cancel='approvalModalFormOk' |
| | | @loadData = "loadData" |
| | | ></approvel-modal> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@/api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { putAction } from '../../api/manage' |
| | | import RepairOrderModal from './modules/repairorderfinished/RepairOrderFinishedReportModel' |
| | | import RepairOrderActualMaterialList from './repairOrderFinishedReport/RepairOrderActualMaterialReport.vue' |
| | | import RepairOrderActualWorkHoursList from './repairOrderFinishedReport/RepairOrderActualHoursReport' |
| | | import RepairOrderFaultAnalysisList from './repairOrderFinishedReport/RepairOrderFaultAnalysisReport.vue' |
| | | import RepairOrderDetailList from './repairOrderFinishedReport/RepairOrderDetailReport.vue' |
| | | import FaultDescriptionList from './FaultDescriptionList' |
| | | import ApprovelModal from './repairOrderFinishedReport/modules/ApprovelModal' |
| | | export default { |
| | | name: "RepairOrderFinishedReport", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | RepairOrderDetailList, |
| | | RepairOrderFaultAnalysisList, |
| | | RepairOrderActualMaterialList, |
| | | RepairOrderActualWorkHoursList, |
| | | RepairOrderModal, |
| | | FaultDescriptionList, |
| | | ApprovelModal |
| | | }, |
| | | 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: 'auditStatusName' |
| | | }, |
| | | { |
| | | /*åæ®å·*/ |
| | | title: 'åæ®å·', |
| | | align: "center", |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | /*è°æ´å段*/ |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'departName' |
| | | }, |
| | | { |
| | | title: 'å·¥æ¶å®é¢', |
| | | align: "center", |
| | | dataIndex: 'workingHourQuota' |
| | | }, |
| | | { |
| | | title: 'æ
éæè¿°', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | }, |
| | | { |
| | | title: 'æ
éæ¶é´', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'faultTime' |
| | | }, |
| | | /* { |
| | | title: 'æ
éç
§ç', |
| | | align: "center", |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'imgSlot' } |
| | | },*/ |
| | | // { |
| | | // title: 'æ¥ä¿®äºº', |
| | | // align: "center", |
| | | // dataIndex: 'reportUserName' |
| | | // }, |
| | | /* { |
| | | title: 'æ¯å¦åæº', |
| | | align: "center", |
| | | dataIndex: 'isStop_dictText' |
| | | },*/ |
| | | { |
| | | title: 'ç»´ä¿æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'maintenanceMethodName' |
| | | }, |
| | | |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: '责任çç»', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'teamName' |
| | | }, |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: '责任人', |
| | | align: "center", |
| | | dataIndex: 'responsibilityName' |
| | | }, |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: 'å®é
å·¥æ¶', |
| | | align: "center", |
| | | dataIndex: 'actualHour' |
| | | }, |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: 'å®é
å¼å§æ¶é´', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'actualStartTime' |
| | | }, |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: 'å®é
宿æ¶é´', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'actualEndTime' |
| | | }, |
| | | { |
| | | /*æ°å¢å段éè¦ä¿®æ¹*/ |
| | | title: 'å§å¤åä½', |
| | | align: "center", |
| | | dataIndex: 'outsourcingUnitName' |
| | | }, |
| | | |
| | | { |
| | | title: 'å建人', |
| | | align: "center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/reportAfterRepair/getReportAfterRepairList", |
| | | edit: "/eam/reportAfterRepair/edit", |
| | | delete: "/eam/reportAfterRepair/delete", |
| | | deleteBatch: "/eam/reportAfterRepair/deleteBatch", |
| | | exportXlsUrl: "/eam/reportAfterRepair/exportXls", |
| | | importExcelUrl: "/eam/reportAfterRepair/importExcel", |
| | | orderReport: "eam/repairOrder/report", |
| | | orderWithdraw: "eam/repairOrder/withdraw", |
| | | orderDispatch: "eam/repairOrder/dispatch", |
| | | orderReceive: "eam/repairOrder/receive", |
| | | orderStart: "eam/repairOrder/start", |
| | | orderConfirm: "eam/repairOrder/confirm" |
| | | }, |
| | | dictOptions: { |
| | | }, |
| | | /* å页忰 */ |
| | | 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: '', |
| | | repairOrderFaultAnalysis: {}, |
| | | repairOrderPlanMaterialMainId: '', |
| | | repairOrderActualMaterialMainId: '', |
| | | repairOrderActualWorkHoursMainId: '', |
| | | equipmentDocumentMainId: '', |
| | | isSelfCreate: true, |
| | | excuteRepairOrder: {}, |
| | | assignTaskList: [], |
| | | sonsAddStatus: false, |
| | | } |
| | | }, |
| | | // created() { |
| | | // this.getSuperFieldList(); |
| | | // }, |
| | | watch: { |
| | | selectionRows() { |
| | | this.$bus.$emit('repairOrderSelectionRows', this.selectionRows); |
| | | }, |
| | | }, |
| | | 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, |
| | | }; |
| | | }, |
| | | }, |
| | | 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 = '' |
| | | this.repairOrderFaultAnalysis = {} |
| | | }, |
| | | 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.repairOrderFaultAnalysis = selectionRows[0] |
| | | console.log(this.repairOrderActualMaterial) |
| | | 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' || selectionRows[0]['status'] == '1' || selectionRows[0]['status'] == '2') |
| | | 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 = 1; |
| | | 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' |
| | | }) |
| | | }, |
| | | handleAddPre(isSelfCreate) { |
| | | this.isSelfCreate = isSelfCreate; |
| | | this.handleAdd(); |
| | | }, |
| | | handleEditPre(record) { |
| | | console.log(record); |
| | | if (record.reportRepairId == null && record.reportRepairId == undefined && record.reportRepairId == '') { |
| | | this.isSelfCreate = true; |
| | | } |
| | | else { |
| | | this.isSelfCreate = false; |
| | | } |
| | | this.handleEdit(record); |
| | | }, |
| | | //å·¥åæµç¨æä½ |
| | | handleCommit(record, type) { |
| | | type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' |
| | | putAction(this.url.edit, record).then(res => { |
| | | if (res.success) { |
| | | if (type === 'commit') { |
| | | this.$message.success("æäº¤æåï¼"); |
| | | } else { |
| | | this.$message.success("æ¤åæåï¼"); |
| | | } |
| | | |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | handleApprove: function (record) { |
| | | let edit |
| | | edit = this.url.edit |
| | | this.$refs.approvalModalForm.showModals(record, edit, 'Approved', 'Rejected') |
| | | this.$refs.approvalModalForm.title = '审æ¹' |
| | | this.$refs.approvalModalForm.disableSubmit = false |
| | | |
| | | }, |
| | | 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() |
| | | } |
| | | }, |
| | | handleWithdraw(record) { |
| | | putAction(this.url.orderWithdraw, record).then(res => { |
| | | if (res.result) { |
| | | this.$message.success('æ¤éæå'); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error('æ¤éåºç°å¼å¸¸') |
| | | } |
| | | }) |
| | | }, |
| | | handleConfirm(record) { |
| | | putAction(this.url.orderConfirm, record).then(res => { |
| | | if (res.result) { |
| | | this.$message.success('确认æå'); |
| | | this.loadData(); |
| | | } else { |
| | | this.$message.error('确认åºç°å¼å¸¸') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | 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> |