hyingbo
2025-07-09 2f519ead537a0b38019bbf64a6075cbb6e08f9b4
src/views/tms/modules/inbound/InboundModel.vue
@@ -283,6 +283,7 @@
      return filterObj(this.param)
    },
    add (nodeSelected) {
      this.qrList = []
      this.classifyId = nodeSelected.key
      this.model.classifyNum =  nodeSelected.entity.classifyId
      this.model.typeName =  nodeSelected.entity.typeName
@@ -325,17 +326,20 @@
    },
    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