| | |
| | | <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="handleInbound(nodeSelected)" type="primary" icon="plus">申请单入库</a-button> |
| | | <a-button @click="handleInbound" type="primary">申请单入库</a-button> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | class="j-table-force-nowrap" |
| | | :customRow="customRow" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | |
| | | </a-tabs> |
| | | |
| | | <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model> |
| | | <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ParaCommonToolList from '.././baseTools/ParaCommonToolList' |
| | | import ParaBladeList from '.././baseTools/ParaBladeList' |
| | | import InboundModel from './InboundModel' |
| | | import InboundApplyModelList from './InboundApplyModelList.vue' |
| | | |
| | | export default { |
| | | name: 'InboundListRight', |
| | |
| | | ParaTurningToolsList, |
| | | ParaCommonToolList, |
| | | ParaBladeList, |
| | | InboundModel |
| | | InboundModel, |
| | | InboundApplyModelList |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | dataIndex: 'toolCode' |
| | | }, |
| | | { |
| | | title:'工具编号', |
| | | align:"center", |
| | | dataIndex: 'onlyCode' |
| | | }, |
| | | { |
| | | title:'入库类型', |
| | | align:"center", |
| | | dataIndex: 'inStorehouseType' |
| | | dataIndex: 'inStorehouseTypeName' |
| | | }, |
| | | { |
| | | title:'型号/图号', |
| | |
| | | { |
| | | title:'入库数量', |
| | | align:"center", |
| | | dataIndex: 'inStorageQuantity' |
| | | dataIndex: 'inNumber' |
| | | }, |
| | | // { |
| | | // title:'备注', |
| | |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/tms/inboundDetail/list", |
| | | list: "/tms/inStoreDetail/list", |
| | | paraHolesToolsList:"/tms/baseTools/paraHolesToolsList", |
| | | paraCommonToolList:"/tms/baseTools/paraCommonToolList", |
| | | paraThreadingToolList:"/tms/baseTools/paraThreadingToolList", |
| | |
| | | this.$refs.modalForm.title = "新增工具入库"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | }, |
| | | |
| | | handleInbound() { |
| | | this.$refs.inboundApplyModelList.show(); |
| | | }, |
| | | handleDelete(id) { |
| | | deleteAction(this.url.delete, {id: id}).then((res) => { |
| | | if (res.success) { |
| | |
| | | modalFormOk() { |
| | | this.loadData(); // 刷新表格数据 |
| | | this.$bus.$emit('queryTreeData') //刷新左侧树 |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys) { |
| | |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; // 更新表格数据 |
| | | this.ipagination.total = res.result.total |
| | | //默认选中第一条数据 |
| | | this.selectedRowKeys[0] = res.result.records[0].id |
| | | this.onSelectChange(this.selectedRowKeys) |
| | | } else { |
| | | this.$message.warning("请选择叶子节点进行查询"); |
| | | this.ipagination.total = 0 |