| | |
| | | label: 'name', |
| | | disabled: 'isArea' |
| | | }, |
| | | exportUrl: '/api/blade-cps/material-storage/excel/template', |
| | | uploadUrl: '/api/blade-cps/material-storage/excel/import', |
| | | exportUrl: '/api/smis/material-storage/excel/template', |
| | | uploadUrl: '/api/smis/material-storage/excel/import', |
| | | treeData: [], |
| | | selectNode: {}, |
| | | apiObj: { |
| | |
| | | ...data, |
| | | wareId: this.selectNode.id |
| | | } |
| | | return await this.$HTTP.post(`/api/blade-cps/material-storage/page`, {}, { params }).then(res => { |
| | | return await this.$HTTP.post(`/api/smis/material-storage/page`, {}, { params }).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.$HTTP.get(`/api/blade-cps/tray-storage/tree`).then(res => { |
| | | this.$HTTP.get(`/api/smis/tray-storage/tree`).then(res => { |
| | | this.treeData = res.data |
| | | }) |
| | | this.$HTTP.get(`/api/blade-cps/material-type/list`).then(res => { |
| | | this.$HTTP.get(`/api/smis/material-type/list`).then(res => { |
| | | this.options.typeId = res.data.map(item => ({ |
| | | label: item.name, |
| | | value: item.id |
| | |
| | | this.queryInfo(node.id) |
| | | }, |
| | | queryInfo(id) { |
| | | this.$HTTP.get(`/api/blade-cps/warehouse-station/get/${id}`).then(res => { |
| | | this.$HTTP.get(`/api/smis/warehouse-station/get/${id}`).then(res => { |
| | | this.selectNode = res.data |
| | | }) |
| | | }, |
| | | table_add() { |
| | | this.$HTTP.get(`/api/blade-cps/material-storage/material/not-bind`).then(res => { |
| | | this.$HTTP.get(`/api/smis/material-storage/material/not-bind`).then(res => { |
| | | if (res.data?.length > 0) { |
| | | this.todoList = res.data |
| | | this.dialogVisible = true |
| | |
| | | }) |
| | | }, |
| | | add() { |
| | | this.$HTTP.post(`/api/blade-cps/material-storage`, { warehouseStationId: this.selectNode.id, materialIds: [this.materialIds] }).then(res => { |
| | | this.$HTTP.post(`/api/smis/material-storage`, { warehouseStationId: this.selectNode.id, materialIds: [this.materialIds] }).then(res => { |
| | | this.$message.success("操作成功") |
| | | this.dialogVisible = false |
| | | this.$refs.table.reload() |
| | | }) |
| | | }, |
| | | table_del(ids) { |
| | | this.$HTTP.delete(`/api/blade-cps/material-storage`, ids.map(v => v.id)).then(res => { |
| | | this.$HTTP.delete(`/api/smis/material-storage`, ids.map(v => v.id)).then(res => { |
| | | this.$message.success("操作成功") |
| | | this.$refs.table.reload() |
| | | }) |