| | |
| | | <template> |
| | | <win-md class="stock-edit" :title="`${setting.title}采购入库`" @close="close" :width="'800px'"> |
| | | <win-md class="stock-edit" :title="`${setting.title}采购入库`" @close="close" :width="'800px'" :loading="loading"> |
| | | <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> |
| | | <div class="main-w"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | |
| | | callback(); |
| | | }; |
| | | return { |
| | | loading: false, |
| | | loading: true, |
| | | buyTypeOptions: [ |
| | | { |
| | | label: '集采', |
| | |
| | | return item; |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | }, |
| | | |
| | | // 获取入库仓库列表 |
| | |
| | | handleSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true; |
| | | console.log('formData', this.formData); |
| | | debugger; |
| | | if (!this.setting.id) { |
| | | procureAdd(this.formData) |
| | | .then((res) => { |
| | |
| | | }) |
| | | .catch((err) => { |
| | | console.log('create err', err); |
| | | this.loading = false; |
| | | this.$message.error('保存失败'); |
| | | }); |
| | | } else { |
| | |
| | | }) |
| | | .catch((err) => { |
| | | console.log('edit err', err); |
| | | this.loading = false; |
| | | this.$message.error('保存失败'); |
| | | }); |
| | | } |