| | |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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 :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å 餿 è®°"> |
| | | <a-input placeholder="请è¾å
¥å 餿 è®°" v-model="queryParam.delFlag"></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.scrapCode"></a-input> |
| | | <a-input |
| | | placeholder="请è¾å
¥åæ®å·" |
| | | v-model="queryParam.scrapCode" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åºåID"> |
| | | <a-input placeholder="请è¾å
¥åºåID" v-model="queryParam.inventoryId"></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.scrapReason"></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.scrapNum"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å¤ä»¶åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥å¤ä»¶åç§°" |
| | | v-model="queryParam.partName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <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> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | <a-col |
| | | :xl="6" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <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> |
| | | <a |
| | | @click="handleToggleSearch" |
| | | style="margin-left: 8px" |
| | | > |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <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-upload> |
| | | <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> --> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="batchDel" |
| | | ><a-icon type="delete" />å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | |
| | | |
| | | <!-- 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">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected" |
| | | >æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-show="record.scrapStatus === '1'" |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a |
| | | v-show="record.scrapStatus === '1'" |
| | | @click="handleConfirm(record)" |
| | | >å®¡æ ¸ç¡®è®¤</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a |
| | | v-show="record.scrapStatus === '1'" |
| | | class="ant-dropdown-link" |
| | | >æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu |
| | | v-show="record.scrapStatus === '1'" |
| | | slot="overlay" |
| | | > |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamSparePartScrap-modal ref="modalForm" @ok="modalFormOk"></eamSparePartScrap-modal> |
| | | <eamSparePartScrap-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></eamSparePartScrap-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import EamSparePartScrapModal from './modules/EamSparePartScrapModal.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import '@assets/less/TableExpand.less' |
| | | import EamSparePartScrapModal from './modules/EamSparePartScrap/EamSparePartScrapModal.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, getAction, postAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: "EamSparePartScrapList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | EamSparePartScrapModal |
| | | }, |
| | | 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: 'delFlag' |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | align:"center", |
| | | dataIndex: 'scrapCode' |
| | | }, |
| | | { |
| | | title: 'åºåID', |
| | | align:"center", |
| | | dataIndex: 'inventoryId' |
| | | }, |
| | | { |
| | | title: 'æ¥åºåå ', |
| | | align:"center", |
| | | dataIndex: 'scrapReason' |
| | | }, |
| | | { |
| | | title: 'æ¥åºæ°é', |
| | | align:"center", |
| | | dataIndex: 'scrapNum' |
| | | }, |
| | | { |
| | | title: 'ç³è¯·äºº', |
| | | align:"center", |
| | | dataIndex: 'reportUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align:"center", |
| | | dataIndex: 'approvalUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'approvalTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | export default { |
| | | name: "EamSparePartScrapList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSparePartScrapModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å¤åå¤ä»¶æ¥åºç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSparePartScrap/list", |
| | | delete: "/eam/eamSparePartScrap/delete", |
| | | deleteBatch: "/eam/eamSparePartScrap/deleteBatch", |
| | | exportXlsUrl: "eam/eamSparePartScrap/exportXls", |
| | | importExcelUrl: "eam/eamSparePartScrap/importExcel", |
| | | }, |
| | | }, |
| | | { |
| | | title: 'åæ®å·', |
| | | align: "center", |
| | | dataIndex: 'scrapCode' |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | align: "center", |
| | | dataIndex: 'partName' |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åå·', |
| | | align: "center", |
| | | dataIndex: 'partModel' |
| | | }, |
| | | { |
| | | title: 'æ¥åºåå ', |
| | | align: "center", |
| | | dataIndex: 'scrapReason' |
| | | }, |
| | | { |
| | | title: 'æ¥åºæ°é', |
| | | align: "center", |
| | | dataIndex: 'scrapNum' |
| | | }, |
| | | { |
| | | title: 'ç³è¯·äºº', |
| | | align: "center", |
| | | dataIndex: 'reportUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align: "center", |
| | | dataIndex: 'approvalUser' |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'approvalTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSparePartScrap/list", |
| | | delete: "/eam/eamSparePartScrap/delete", |
| | | deleteBatch: "/eam/eamSparePartScrap/deleteBatch", |
| | | exportXlsUrl: "eam/eamSparePartScrap/exportXls", |
| | | importExcelUrl: "eam/eamSparePartScrap/importExcel", |
| | | confirm: "/eam/eamSparePartScrap/confirm", |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | methods: { |
| | | handleConfirm(record) { |
| | | if (!this.url.confirm) { |
| | | this.$message.error('请设置url.confirm屿§!') |
| | | return |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: 'å¤ä»¶æ¥åºç¡®è®¤', |
| | | content: '确认å¤ä»¶æ¥åºå?', |
| | | onOk: function () { |
| | | that.loading = true; |
| | | postAction(that.url.confirm, record).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | that.loading = false |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |