| | |
| | | return filterObj(this.param) |
| | | }, |
| | | add (nodeSelected) { |
| | | this.qrList = [] |
| | | this.classifyId = nodeSelected.key |
| | | this.model.classifyNum = nodeSelected.entity.classifyId |
| | | this.model.typeName = nodeSelected.entity.typeName |
| | |
| | | }, |
| | | handleOk() { |
| | | const that = this |
| | | if(this.dataSource.length == 0){ |
| | | that.$message.error("请先选择需要入库的工具!") |
| | | return |
| | | } |
| | | // 触发表单验证 |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.detailData = this.dataSource |
| | | formData.classifyId = this.classifyId |
| | | postAction(this.url.addInStorage, formData) |
| | | this.model.detailData = this.dataSource |
| | | this.model.classifyId = this.classifyId |
| | | postAction(this.url.addInStorage, this.model) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | if(formData.inStorehouseType === '1'){ |
| | | if(this.model.inStorehouseType === '1'){ |
| | | this.qrList = res.result.map((content, i) => ({ |
| | | content:res.result[i].content, |
| | | base64: res.result[i].image |