¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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="设å¤ID">–>--> |
| | | <!--<!– <j-search-select-tag placeholder="è¯·éæ©è®¾å¤ID" v-model="queryParam.equipmentId" dict="mom_eam_equipment,num,id"/>–>--> |
| | | <!--<!– </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>--> |
| | | <!-- <template v-if="toggleSearchStatus">--> |
| | | <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
| | | <!-- <a-form-item label="æ¥åºæ¥æ">--> |
| | | <!-- <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©æ¥åºæ¥æ" v-model="queryParam.scrapDate"></j-date>--> |
| | | <!-- </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">--> |
| | | <!-- {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }}--> |
| | | <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> |
| | | <!-- </a>--> |
| | | <!-- </span>--> |
| | | <!-- </a-col>--> |
| | | <!-- </a-row>--> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <!-- <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>--> |
| | | <!-- <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button>--> |
| | | <!-- </a-dropdown>--> |
| | | </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" |
| | | :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="equipmentPhoto" 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 @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <equipmentScrapDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></equipmentScrapDetail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentScrapDetailModal from './EquipmentScrapDetailModal' |
| | | |
| | | export default { |
| | | name: "EquipmentScrapDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: { EquipmentScrapDetailModal }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['equipmentChangeId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设å¤åå¨ç®¡ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | // { |
| | | // title:'设å¤åå¨åid', |
| | | // align:"center", |
| | | // dataIndex: 'equipmentChangeId' |
| | | // }, |
| | | // { |
| | | // title:'设å¤ID', |
| | | // align:"center", |
| | | // dataIndex: 'equipmentId_dictText', |
| | | // }, |
| | | { |
| | | title:'设å¤ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title:'èµäº§ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'assetNumber' |
| | | }, |
| | | { |
| | | title:'ç¹ç§è®¾å¤', |
| | | align:"center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | }, |
| | | { |
| | | title:'设å¤åç§°', |
| | | align:"center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title:'设å¤åå·', |
| | | align:"center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title:'设å¤è§æ ¼', |
| | | align:"center", |
| | | dataIndex: 'specification' |
| | | }, |
| | | { |
| | | title:'设å¤ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | }, |
| | | { |
| | | title:'ææ¯ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'technologyStatus_dictText', |
| | | }, |
| | | { |
| | | title:'设å¤ä½ç½®', |
| | | align:"center", |
| | | dataIndex: 'location' |
| | | }, |
| | | { |
| | | title:'éè¦åº¦', |
| | | align:"center", |
| | | dataIndex: 'equipmentImportanceId_dictText', |
| | | }, |
| | | { |
| | | title:'设å¤å¾ç', |
| | | align:"center", |
| | | dataIndex: 'equipmentPhoto', |
| | | scopedSlots: {customRender: "equipmentPhoto"} |
| | | }, |
| | | { |
| | | title:'æ¥åºåå ', |
| | | align:"center", |
| | | dataIndex: 'scrapReason' |
| | | }, |
| | | { |
| | | title:'æ¥åºæ¥æ', |
| | | align:"center", |
| | | dataIndex: 'scrapDate' |
| | | }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentScrap/listEquipmentScrapDetailByMainId", |
| | | delete: "/eam/equipmentScrap/deleteEquipmentScrapDetail", |
| | | deleteBatch: "/eam/equipmentScrap/deleteBatchEquipmentScrapDetail", |
| | | exportXlsUrl: "/eam/equipmentScrap/exportEquipmentScrapDetail", |
| | | importUrl: "/eam/equipmentScrap/importEquipmentScrapDetail", |
| | | submit: '/eam/equipmentScrap/submit', |
| | | revocation: '/eam/equipmentScrap/revocation', |
| | | submitBatch: '/eam/equipmentDisposal/submitBatch', |
| | | revocationBatch: '/eam/equipmentDisposal/revocationBatch' |
| | | }, |
| | | dictOptions:{ |
| | | auditStatus:[], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |