¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOutbound(record)">åºåº</a> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { postAction } from '../../../../api/manage' |
| | | |
| | | export default { |
| | | name: "OutboundDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | console.log('mainId',val) |
| | | this.queryParam['outStorehouseId'] = val |
| | | this.queryParam.status = ['1','2'].join(',') |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'tms_outbound_order管ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:30, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼ç ', |
| | | align:"left", |
| | | dataIndex: 'toolNum' |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼å·', |
| | | align:"left", |
| | | dataIndex: 'toolId' |
| | | }, |
| | | { |
| | | title:'å·¥å
፱Ȍ', |
| | | align:"center", |
| | | dataIndex: 'applicationType_dictText' |
| | | }, |
| | | { |
| | | title:'䏿åç§°', |
| | | align:"center", |
| | | dataIndex: 'chineseName' |
| | | }, |
| | | { |
| | | title:'åå·/å¾å·', |
| | | align:"left", |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title:'ç³è¯·åºåºæ°é', |
| | | align:"left", |
| | | dataIndex: 'outboundQuantity' |
| | | }, |
| | | // { |
| | | // title:'å·²åºåºæ°é', |
| | | // align:"left", |
| | | // dataIndex: 'outActualCount' |
| | | // }, |
| | | { |
| | | title:'åºåºç¶æ', |
| | | align:"center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title:'åå
·ææ', |
| | | align:"center", |
| | | dataIndex: 'toolMaterial' |
| | | }, |
| | | { |
| | | title:'é¶ä»¶ææ', |
| | | align:"center", |
| | | dataIndex: 'partMaterial' |
| | | }, |
| | | { |
| | | title:'åå®¶', |
| | | align:"center", |
| | | dataIndex: 'supplierId' |
| | | }, |
| | | { |
| | | title:'ä»åº', |
| | | align:"center", |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | | title:'åºåºåºä½', |
| | | align:"center", |
| | | dataIndex: 'outboundLocation' |
| | | }, |
| | | // { |
| | | // title:'å¯ç¨åºåæ°é', |
| | | // align:"left", |
| | | // dataIndex: 'quantity' |
| | | // }, |
| | | { |
| | | title:'å建æ¶é´', |
| | | align:"left", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:50, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/outboundOrder/listOutboundDetailByMainId", |
| | | outbound: "/tms/outboundOrder/outBoundByApply", |
| | | delete: "/tms/outboundOrder/deleteOutboundDetail", |
| | | deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", |
| | | exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", |
| | | importUrl: "/tms/outboundOrder/importOutboundDetail", |
| | | }, |
| | | dictOptions:{ |
| | | outStorehouseType:[], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.$emit('select-change', selectedRowKeys, selectionRows) |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | handleOutbound(record) { |
| | | console.log(this.mainId) |
| | | console.log(record) |
| | | const params = [ |
| | | { |
| | | outBoundOrderId: this.mainId, |
| | | outboundDetailId: record.id, |
| | | outboundQuantity: record.outboundQuantity |
| | | } |
| | | ] |
| | | postAction(this.url.outbound, params).then(res=>{ |
| | | if(res.success){ |
| | | this.loadData(1) |
| | | this.$emit("ok") |
| | | this.$message.success(res.message) |
| | | }else{ |
| | | this.$message |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |