| | |
| | | <template> |
| | | <a-row :gutter="10"> |
| | | <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px"> |
| | | <a-col |
| | | :md="leftColMd" |
| | | :sm="24" |
| | | style="margin-bottom: 20px" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- æç´¢åºå --> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="8"> |
| | | <a-col |
| | | :md="12" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="请è´åå·"> |
| | | <j-input placeholder="请è¾å
¥è¯·è´åå·" v-model="queryParam.requisitionCode"></j-input> |
| | | <j-input |
| | | placeholder="请è¾å
¥è¯·è´åå·" |
| | | v-model="queryParam.requisitionCode" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="ç³è¯·äºº"> |
| | | <a-input placeholder="请è¾å
¥ç³è¯·äºº" v-model="queryParam.reportUser"></a-input> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç³è¯·äºº" |
| | | v-model="queryParam.reportUser" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="请è´ç¶æ"> |
| | | <a-input placeholder="请è¾å
¥è¯·è´ç¶æ" v-model="queryParam.requisitionStatus"></a-input> |
| | | <a-input |
| | | placeholder="请è¾å
¥è¯·è´ç¶æ" |
| | | v-model="queryParam.requisitionStatus" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å®¡æ ¸äºº"> |
| | | <a-input placeholder="请è¾å
¥å®¡æ ¸äºº" v-model="queryParam.approvalUser"></a-input> |
| | | <a-input |
| | | placeholder="请è¾å
¥å®¡æ ¸äºº" |
| | | v-model="queryParam.approvalUser" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-col |
| | | :md="12" |
| | | :sm="24" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | style="margin-left: 21px" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</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-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</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> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <div |
| | | class="ant-alert ant-alert-info" |
| | | style="margin-bottom: 16px;" |
| | | > |
| | | <i class="anticon anticon-info-circle ant-alert-icon"> |
| | | </i> 已鿩 <a><b>{{ selectedRowKeys1.length }}</b></a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected1">æ¸
空</a> |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected1" |
| | | >æ¸
空</a> |
| | | </div> |
| | | <div style="margin-top: 15px"> |
| | | <a-table |
| | |
| | | :loading="loading" |
| | | :customRow="customRow" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}" |
| | | @change="handleTableChange"> |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOpen(record)">æç»</a> |
| | | <a-divider v-if="record.requisitionStatus !== '3' && record.requisitionStatus !== '5'" type="vertical" /> |
| | | <a-dropdown v-if="record.requisitionStatus === '1' || record.requisitionStatus === '4'"> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleConfirm(record)">æäº¤</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <a v-if="record.requisitionStatus === '2'" @click="handleExamine(record)">å®¡æ ¸</a> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a @click="handleOpen(record)">æç»</a> |
| | | <a-divider |
| | | v-if="record.requisitionStatus !== '3' && record.requisitionStatus !== '5'" |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown v-if="record.requisitionStatus === '1' || record.requisitionStatus === '4'"> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleConfirm(record)">æäº¤</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <a |
| | | v-if="record.requisitionStatus === '2'" |
| | | @click="handleExamine(record)" |
| | | >å®¡æ ¸</a> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamSparePartRequisition-modal ref="modalForm" @ok="modalFormOk"></eamSparePartRequisition-modal> |
| | | <eamSparePartRequisition-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></eamSparePartRequisition-modal> |
| | | |
| | | <eamSparePartRequisitionExamine-modal ref="modalExamine" @ok="modalFormOk2"></eamSparePartRequisitionExamine-modal> |
| | | <eamSparePartRequisitionExamine-modal |
| | | ref="modalExamine" |
| | | @ok="modalFormOk2" |
| | | ></eamSparePartRequisitionExamine-modal> |
| | | |
| | | </a-card> |
| | | </a-col> |
| | | <a-col :md="rightColMd" :sm="24" v-if="this.rightColVal === 1"> |
| | | <a-col |
| | | :md="rightColMd" |
| | | :sm="24" |
| | | v-if="this.rightColVal === 1" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div style="text-align: right;"> |
| | | <a-icon type="close-circle" @click="hideSpareDetailList" /> |
| | | <a-icon |
| | | type="close-circle" |
| | | @click="hideSpareDetailList" |
| | | /> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="9" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery2" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | <a-col |
| | | :md="9" |
| | | :sm="24" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery2" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset2" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" :md="24" :sm="24"> |
| | | <a-button @click="handleAdd2" type="primary" icon="plus">æ°å¢</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> |
| | | <div |
| | | class="table-operator" |
| | | :md="24" |
| | | :sm="24" |
| | | > |
| | | <a-button |
| | | @click="handleAdd2" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</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> |
| | | <a-dropdown v-if="selectedRowKeys2.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel2"> |
| | | <a-icon type="delete"/> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="batchDel2" |
| | | > |
| | | <a-icon type="delete" /> |
| | | æ¹éå é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <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">{{ selectedRowKeys2.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected2">æ¸
空</a> |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected2" |
| | | >æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | |
| | | :loading="loading2" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}" |
| | | @change="handleTableChange2"> |
| | | @change="handleTableChange2" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm @click="handleEdit2(record)"> |
| | | <a>ç¼è¾</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete2(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm @click="handleEdit2(record)"> |
| | | <a>ç¼è¾</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete2(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import EamSparePartRequisitionModal from './modules/EamSparePartRequisitionModal.vue' |
| | | import EamSparePartRequisitionExamineModal from './modules/EamSparePartRequisitionExamineModal.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, getAction, postAction } from '@api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | import '@assets/less/TableExpand.less' |
| | | import EamSparePartRequisitionModal from './modules/EamSparePartRequisition/EamSparePartRequisitionModal.vue' |
| | | import EamSparePartRequisitionExamineModal from './modules/EamSparePartRequisition/EamSparePartRequisitionExamineModal.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, getAction, postAction } from '@api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: "EamSparePartRequisitionList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | EamSparePartRequisitionModal, |
| | | EamSparePartRequisitionExamineModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å¤ä»¶è¯·è´å管ç页é¢', |
| | | model1: {}, |
| | | model2: {}, |
| | | queryParam1: {}, |
| | | queryParam2: {}, |
| | | dataSource: [], |
| | | dataSource2: [], |
| | | spareRequisitionId: '', |
| | | iPagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | export default { |
| | | name: "EamSparePartRequisitionList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSparePartRequisitionModal, |
| | | EamSparePartRequisitionExamineModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å¤ä»¶è¯·è´å管ç页é¢', |
| | | model1: {}, |
| | | model2: {}, |
| | | queryParam1: {}, |
| | | queryParam2: {}, |
| | | dataSource: [], |
| | | dataSource2: [], |
| | | spareRequisitionId: '', |
| | | iPagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | iPagination2: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | iPagination2: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | iSorter1: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | iSorter1: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | iSorter2: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | filters1: {}, |
| | | filters2: {}, |
| | | loading: false, |
| | | loading2: false, |
| | | selectedRowKeys1: [], |
| | | selectedRowKeys2: [], |
| | | selectionRows1: [], |
| | | selectionRows2: [], |
| | | rightColVal: 0, |
| | | // é«çº§æ¥è¯¢åæ° |
| | | superQueryParams2: '', |
| | | // é«çº§æ¥è¯¢æ¼æ¥æ¡ä»¶ |
| | | superQueryMatchType2: 'and', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '请è´åå·', |
| | | align: "center", |
| | | dataIndex: 'requisitionCode' |
| | | }, |
| | | iSorter2: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'requisitionStatus_dictText' |
| | | }, |
| | | filters1: {}, |
| | | filters2: {}, |
| | | loading: false, |
| | | loading2: false, |
| | | selectedRowKeys1: [], |
| | | selectedRowKeys2: [], |
| | | selectionRows1: [], |
| | | selectionRows2: [], |
| | | rightColVal: 0, |
| | | // é«çº§æ¥è¯¢åæ° |
| | | superQueryParams2: '', |
| | | // é«çº§æ¥è¯¢æ¼æ¥æ¡ä»¶ |
| | | superQueryMatchType2: 'and', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '请è´åå·', |
| | | align:"center", |
| | | dataIndex: 'requisitionCode' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'requisitionStatus_dictText' |
| | | }, |
| | | { |
| | | title: '请è´äºº', |
| | | align:"center", |
| | | dataIndex: 'reportUser' |
| | | }, |
| | | { |
| | | title: 'è¯·è´æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align:"center", |
| | | dataIndex: 'approvalUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'approvalTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | // å表表头 |
| | | columns2: [ |
| | | { |
| | | title: 'å¤åå¤ä»¶ID', |
| | | align:"center", |
| | | dataIndex: 'partId' |
| | | }, |
| | | { |
| | | title: 'è¯·è´æ°é', |
| | | align:"center", |
| | | dataIndex: 'requisitionNum' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSparePartRequisition/list", |
| | | list2: "/eam/eamSparePartRequisitionDetail/list", |
| | | delete: "/eam/eamSparePartRequisition/delete", |
| | | delete2: "/eam/eamSparePartRequisitionDetail/delete", |
| | | deleteBatch: "/eam/eamSparePartRequisition/deleteBatch", |
| | | deleteBatch2: "/eam/eamSparePartRequisitionDetail/deleteBatch", |
| | | exportXlsUrl: "eam/eamSparePartRequisition/exportXls", |
| | | exportXlsUrl2: "eam/eamSparePartRequisitionDetail/exportXls", |
| | | importExcelUrl: "eam/eamSparePartRequisition/importExcel", |
| | | importExcelUrl2: "eam/eamSparePartRequisitionDetail/importExcel", |
| | | submit: "eam/eamSparePartRequisition/submitSpareRequisition" |
| | | }, |
| | | { |
| | | title: '请è´äºº', |
| | | align: "center", |
| | | dataIndex: 'reportUser' |
| | | }, |
| | | { |
| | | title: 'è¯·è´æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align: "center", |
| | | dataIndex: 'approvalUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'approvalTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | // å表表头 |
| | | columns2: [ |
| | | { |
| | | title: 'å¤åå¤ä»¶ID', |
| | | align: "center", |
| | | dataIndex: 'partId' |
| | | }, |
| | | { |
| | | title: 'è¯·è´æ°é', |
| | | align: "center", |
| | | dataIndex: 'requisitionNum' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSparePartRequisition/list", |
| | | list2: "/eam/eamSparePartRequisitionDetail/list", |
| | | delete: "/eam/eamSparePartRequisition/delete", |
| | | delete2: "/eam/eamSparePartRequisitionDetail/delete", |
| | | deleteBatch: "/eam/eamSparePartRequisition/deleteBatch", |
| | | deleteBatch2: "/eam/eamSparePartRequisitionDetail/deleteBatch", |
| | | exportXlsUrl: "eam/eamSparePartRequisition/exportXls", |
| | | exportXlsUrl2: "eam/eamSparePartRequisitionDetail/exportXls", |
| | | importExcelUrl: "eam/eamSparePartRequisition/importExcel", |
| | | importExcelUrl2: "eam/eamSparePartRequisitionDetail/importExcel", |
| | | submit: "eam/eamSparePartRequisition/submitSpareRequisition" |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | leftColMd() { |
| | |
| | | return this.selectedRowKeys1.length === 0 ? 0 : 12 |
| | | } |
| | | }, |
| | | methods: { |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | dblclick:() => { |
| | | this.handleOpen(record) |
| | | } |
| | | methods: { |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | dblclick: () => { |
| | | this.handleOpen(record) |
| | | } |
| | | } |
| | | }, |
| | | onSelectChange1(selectedRowKeys, selectionRows) { |
| | | this.rightColVal = 1 |
| | | this.selectedRowKeys1 = selectedRowKeys |
| | | this.selectionRows1 = selectionRows |
| | | this.model1 = Object.assign({}, selectionRows[0]) |
| | | this.spareRequisitionId = selectedRowKeys[0] |
| | | this.loadData2() |
| | | }, |
| | | onSelectChange2(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys2 = selectedRowKeys |
| | | this.selectionRows2 = selectionRows |
| | | }, |
| | | /** |
| | | * ç¹å»å½åè¡è½¦é´é项å触åäºä»¶ |
| | | * @param record å½åè¡æ°æ® |
| | | */ |
| | | handleOpen: function (record) { |
| | | this.rightColVal = 1 |
| | | this.selectedRowKeys1 = [record.id] |
| | | this.model1 = Object.assign({}, record) |
| | | this.spareRequisitionId = record.id |
| | | this.onClearSelected2() |
| | | this.loadData2() |
| | | }, |
| | | searchQuery2: function () { |
| | | this.loadData2(1) |
| | | }, |
| | | searchReset2: function () { |
| | | this.queryParam2 = {} |
| | | this.loadData2(1) |
| | | }, |
| | | handleTableChange2: function (pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.iSorter2.column = sorter.field |
| | | this.iSorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | }, |
| | | onSelectChange1(selectedRowKeys, selectionRows) { |
| | | this.rightColVal = 1 |
| | | this.selectedRowKeys1 = selectedRowKeys |
| | | this.selectionRows1 = selectionRows |
| | | this.model1 = Object.assign({}, selectionRows[0]) |
| | | this.spareRequisitionId = selectedRowKeys[0] |
| | | this.loadData2() |
| | | }, |
| | | onSelectChange2(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys2 = selectedRowKeys |
| | | this.selectionRows2 = selectionRows |
| | | }, |
| | | /** |
| | | * ç¹å»å½åè¡è½¦é´é项å触åäºä»¶ |
| | | * @param record å½åè¡æ°æ® |
| | | */ |
| | | handleOpen: function (record) { |
| | | this.rightColVal = 1 |
| | | this.selectedRowKeys1 = [record.id] |
| | | this.model1 = Object.assign({}, record) |
| | | this.spareRequisitionId = record.id |
| | | this.onClearSelected2() |
| | | this.loadData2() |
| | | }, |
| | | searchQuery2: function () { |
| | | this.loadData2(1) |
| | | }, |
| | | searchReset2: function () { |
| | | this.queryParam2 = {} |
| | | this.loadData2(1) |
| | | }, |
| | | handleTableChange2: function (pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.iSorter2.column = sorter.field |
| | | this.iSorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.iPagination2 = pagination |
| | | this.loadData2() |
| | | }, |
| | | onClearSelected2: function () { |
| | | this.selectedRowKeys2 = [] |
| | | this.selectionRows2 = [] |
| | | }, |
| | | loadData2: function (arg) { |
| | | if (!this.url.list2) { |
| | | this.$message.error('请设置url.list2屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.iPagination2.current = 1 |
| | | } |
| | | if (this.currentWorkshopId === '') return |
| | | let params = this.getQueryParams2() //æ¥è¯¢æ¡ä»¶ |
| | | params.spareRequisitionId = this.spareRequisitionId |
| | | this.loading2 = true |
| | | getAction(this.url.list2, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource2 = res.result.records |
| | | this.iPagination2.total = res.result.total |
| | | } else { |
| | | this.dataSource2 = [] |
| | | } |
| | | this.iPagination2 = pagination |
| | | this.loadData2() |
| | | }, |
| | | onClearSelected2: function () { |
| | | this.selectedRowKeys2 = [] |
| | | this.selectionRows2 = [] |
| | | }, |
| | | loadData2: function (arg) { |
| | | if (!this.url.list2) { |
| | | this.$message.error('请设置url.list2屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.iPagination2.current = 1 |
| | | } |
| | | if (this.currentWorkshopId === '') return |
| | | let params = this.getQueryParams2() //æ¥è¯¢æ¡ä»¶ |
| | | params.spareRequisitionId = this.spareRequisitionId |
| | | this.loading2 = true |
| | | getAction(this.url.list2, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource2 = res.result.records |
| | | this.iPagination2.total = res.result.total |
| | | }else{ |
| | | this.dataSource2=[] |
| | | } |
| | | this.loading2 = false |
| | | }) |
| | | }, |
| | | getQueryParams2() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams2) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams2) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType2 |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam2, this.iSorter2, this.filters2) |
| | | param.field = this.getQueryField2() |
| | | param.pageNo = this.iPagination2.current |
| | | param.pageSize = this.iPagination2.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | getQueryField2() { |
| | | var str = 'id,' |
| | | this.columns2.forEach(function(value) { |
| | | str += ',' + value.dataIndex |
| | | }) |
| | | return str |
| | | }, |
| | | hideSpareDetailList: function () { |
| | | this.selectedRowKeys1 = [] |
| | | }, |
| | | handleEdit2: function(record) { |
| | | this.$refs.modalForm2.title = 'ç¼è¾' |
| | | this.loading2 = false |
| | | }) |
| | | }, |
| | | getQueryParams2() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams2) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams2) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType2 |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam2, this.iSorter2, this.filters2) |
| | | param.field = this.getQueryField2() |
| | | param.pageNo = this.iPagination2.current |
| | | param.pageSize = this.iPagination2.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | getQueryField2() { |
| | | var str = 'id,' |
| | | this.columns2.forEach(function (value) { |
| | | str += ',' + value.dataIndex |
| | | }) |
| | | return str |
| | | }, |
| | | hideSpareDetailList: function () { |
| | | this.selectedRowKeys1 = [] |
| | | }, |
| | | handleEdit2: function (record) { |
| | | this.$refs.modalForm2.title = 'ç¼è¾' |
| | | // this.$refs.modalForm2.roleDisabled = true |
| | | this.$refs.modalForm2.edit(record) |
| | | }, |
| | | handleAdd2: function () { |
| | | if (this.spareRequisitionId === '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè¯·è´å!') |
| | | } else { |
| | | // this.$refs.modalForm2.roleDisabled = true |
| | | this.$refs.modalForm2.edit(record) |
| | | }, |
| | | handleAdd2: function () { |
| | | if (this.spareRequisitionId === '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè¯·è´å!') |
| | | this.$refs.modalForm2.title = 'æ°å¢' |
| | | this.$refs.modalForm2.edit({ selectedSpareRequisitions: this.spareRequisitionId }) |
| | | } |
| | | }, |
| | | handleDelete2: function (id) { |
| | | if (!this.url.delete2) { |
| | | this.$message.error('请设置url.delete2屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete2, { spareRequisitionId: this.spareRequisitionId, spareRequisitionDetailId: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | } else { |
| | | // this.$refs.modalForm2.roleDisabled = true |
| | | this.$refs.modalForm2.title = 'æ°å¢' |
| | | this.$refs.modalForm2.edit({selectedSpareRequisitions:this.spareRequisitionId}) |
| | | that.$message.warning(res.message) |
| | | } |
| | | }, |
| | | handleDelete2: function (id) { |
| | | if (!this.url.delete2) { |
| | | this.$message.error('请设置url.delete2屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete2, { spareRequisitionId: this.spareRequisitionId, spareRequisitionDetailId: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | batchDel2: function() { |
| | | if (!this.url.deleteBatch2) { |
| | | this.$message.error('请设置url.deleteBatch2屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys2.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | return |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys2.length; a++) { |
| | | ids += this.selectedRowKeys2[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'æ¯å¦å é¤é䏿°æ®?', |
| | | onOk: function() { |
| | | deleteAction(that.url.deleteBatch2, { spareRequisitionId: that.spareRequisitionId, spareRequisitionDetailIds: ids }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | that.onClearSelected2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onClearSelected1() { |
| | | this.selectedRowKeys1 = [] |
| | | this.selectionRows1 = [] |
| | | }, |
| | | handleConfirm(record) { |
| | | if (!this.url.submit) { |
| | | this.$message.error('请设置url.submit屿§!') |
| | | return |
| | | }) |
| | | }, |
| | | batchDel2: function () { |
| | | if (!this.url.deleteBatch2) { |
| | | this.$message.error('请设置url.deleteBatch2屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys2.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | return |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys2.length; a++) { |
| | | ids += this.selectedRowKeys2[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认æäº¤', |
| | | content: 'ç¡®å®æäº¤å?', |
| | | onOk: function() { |
| | | postAction(that.url.submit, record).then((res) => { |
| | | title: '确认å é¤', |
| | | content: 'æ¯å¦å é¤é䏿°æ®?', |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch2, { spareRequisitionId: that.spareRequisitionId, spareRequisitionDetailIds: ids }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | // that.onClearSelected1() |
| | | that.loadData2() |
| | | that.onClearSelected2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleExamine: function (record) { |
| | | this.$refs.modalExamine.examine(record); |
| | | this.$refs.modalExamine.title = "å®¡æ ¸"; |
| | | this.$refs.modalExamine.disableSubmit = false; |
| | | }, |
| | | modalFormOk2: function () { |
| | | this.loadData() |
| | | } |
| | | }, |
| | | onClearSelected1() { |
| | | this.selectedRowKeys1 = [] |
| | | this.selectionRows1 = [] |
| | | }, |
| | | handleConfirm(record) { |
| | | if (!this.url.submit) { |
| | | this.$message.error('请设置url.submit屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认æäº¤', |
| | | content: 'ç¡®å®æäº¤å?', |
| | | onOk: function () { |
| | | postAction(that.url.submit, record).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | // that.onClearSelected1() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleExamine: function (record) { |
| | | this.$refs.modalExamine.examine(record); |
| | | this.$refs.modalExamine.title = "å®¡æ ¸"; |
| | | this.$refs.modalExamine.disableSubmit = false; |
| | | }, |
| | | modalFormOk2: function () { |
| | | this.loadData() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |