| | |
| | | { required: true, message: '必填' } |
| | | ], |
| | | }, |
| | | exportUrl: '/api/blade-cps/warehouse-station/export-template', |
| | | uploadUrl: '/api/blade-cps/warehouse-station/import-station', |
| | | exportUrl: '/api/smis/warehouse-station/export-template', |
| | | uploadUrl: '/api/smis/warehouse-station/import-station', |
| | | selection: [], |
| | | apiObj: { |
| | | get: async (data) => { |
| | |
| | | ...data, |
| | | ...this.params, |
| | | } |
| | | return await this.$HTTP.get(`/api/blade-cps/warehouse-station/page`, {}, { params }).then(res => { |
| | | return await this.$HTTP.get(`/api/smis/warehouse-station/page`, {}, { params }).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.$HTTP.get(`/api/blade-cps/warehouse-area/tree`).then(res => { |
| | | this.$HTTP.get(`/api/smis/warehouse-area/tree`).then(res => { |
| | | this.treeData = res.data |
| | | this.nodeClick(res.data?.[0]) |
| | | }) |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const loading = this.$loading(); |
| | | this.$HTTP.get(`/api/blade-cps/warehouse-area/station-count?id=${id}`).then(res => { |
| | | this.$HTTP.get(`/api/smis/warehouse-area/station-count?id=${id}`).then(res => { |
| | | if (res.data > 0) { |
| | | this.$message.warning("该库区已经绑定库位,请先清除库位!") |
| | | } else { |
| | | this.$HTTP.delete(`/api/blade-cps/warehouse-area/remove`, {}, { data: [id] }).then(res => { |
| | | this.$HTTP.delete(`/api/smis/warehouse-area/remove`, {}, { data: [id] }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.init() |
| | | }) |
| | |
| | | this.$refs.dialogForm.validate(async (valid) => { |
| | | if (valid) { |
| | | if (this.form.id) { |
| | | return this.$HTTP.put(`/api/blade-cps/warehouse-area/update`, { ...this.form }).then(res => { |
| | | return this.$HTTP.put(`/api/smis/warehouse-area/update`, { ...this.form }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.areaVisible = false |
| | | this.init() |
| | | }) |
| | | } |
| | | this.$HTTP.post(`/api/blade-cps/warehouse-area/insert`, { ...this.form, parentId: 1 }).then(res => { |
| | | this.$HTTP.post(`/api/smis/warehouse-area/insert`, { ...this.form, parentId: 1 }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.areaVisible = false |
| | | this.init() |
| | |
| | | this.optionVisible = true |
| | | }, |
| | | table_del(ids) { |
| | | this.$HTTP.delete(`/api/blade-cps/warehouse-station/remove`, {}, { data: ids.map(v => v.id) }).then(res => { |
| | | this.$HTTP.delete(`/api/smis/warehouse-station/remove`, {}, { data: ids.map(v => v.id) }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.search() |
| | | }) |
| | |
| | | this.$refs.dialogForm1.validate(async (valid) => { |
| | | if (valid) { |
| | | if (this.form1.id) { |
| | | return this.$HTTP.put(`/api/blade-cps/warehouse-station/update`, { ...this.form1, areaId: this.params.areaId }).then(res => { |
| | | return this.$HTTP.put(`/api/smis/warehouse-station/update`, { ...this.form1, areaId: this.params.areaId }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.optionVisible = false |
| | | this.search() |
| | | }) |
| | | } |
| | | this.$HTTP.post(`/api/blade-cps/warehouse-station/insert`, { ...this.form1, areaId: this.params.areaId }).then(res => { |
| | | this.$HTTP.post(`/api/smis/warehouse-station/insert`, { ...this.form1, areaId: this.params.areaId }).then(res => { |
| | | this.$message.success('操作成功') |
| | | this.optionVisible = false |
| | | this.search() |
| | |
| | | this.selection = selection |
| | | }, |
| | | getExport() { |
| | | this.$HTTP.post(`/api/blade-cps/warehouse-station/export-station`, { ...this.params }).then(res => { |
| | | this.$HTTP.post(`/api/smis/warehouse-station/export-station`, { ...this.params }).then(res => { |
| | | if (res.code == 200) { |
| | | window.open(res.data.link); |
| | | } |