| | |
| | | <!-- |
| | | * @Date: 2024-05-08 21:29:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-05-09 21:12:56 |
| | | * @LastEditTime: 2024-06-16 14:41:35 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue |
| | | --> |
| | | <template> |
| | |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="额定库存" prop="lowerLimit"> |
| | | <el-input-number v-model="form.upperLimit" :precision="2" :step="0.01" :max="10" /> |
| | | <el-input-number v-model="form.lowerLimit" :precision="2" :step="0.01" :max="10" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadUrl: "/api/blade-cps/material/import-material", |
| | | exportUrl: "/api/blade-cps/material/export-template", |
| | | uploadUrl: "/api/smis/material/import-material", |
| | | exportUrl: "/api/smis/material/export-template", |
| | | options: { |
| | | status: [ |
| | | { |
| | |
| | | let params = { |
| | | ...data |
| | | } |
| | | return await this.$HTTP.get(`/api/blade-cps/material/page`, params).then(res => { |
| | | return await this.$HTTP.get(`/api/smis/material/page`, params).then(res => { |
| | | return res |
| | | }) |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | 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 |
| | |
| | | } |
| | | }, |
| | | getExport() { |
| | | this.$HTTP.post(`/api/blade-cps/material/export-material`, { ...this.params }).then(res => { |
| | | this.$HTTP.post(`/api/smis/material/export-material`, { ...this.params }).then(res => { |
| | | if (res.code == 200) { |
| | | window.open(res.data.link); |
| | | } |
| | |
| | | |
| | | }, |
| | | table_del(rowArr, type) { |
| | | this.$HTTP.delete(`/api/blade-cps/material/delete-material?ids=${rowArr.map(v => v.id).toString()}&type=${type}`).then(res => { |
| | | this.$HTTP.delete(`/api/smis/material/delete-material?ids=${rowArr.map(v => v.id).toString()}&type=${type}`).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.$refs.table.reload(this.params) |
| | |
| | | this.$refs.dialogForm.validate(async (valid) => { |
| | | if (valid) { |
| | | if (this.form.id) { |
| | | this.$HTTP.put(`/api/blade-cps/material/update-material`, { |
| | | this.$HTTP.put(`/api/smis/material/update-material`, { |
| | | ...this.form |
| | | }).then(res => { |
| | | this.drawer = false |
| | | this.$refs.table.reload(this.params) |
| | | }) |
| | | } else { |
| | | this.$HTTP.post(`/api/blade-cps/material/create-material`, { |
| | | this.$HTTP.post(`/api/smis/material/create-material`, { |
| | | ...this.form |
| | | }).then(res => { |
| | | this.drawer = false |