yangfeng
2024-03-12 19f5949491976905f3cd3fd53407ff4898080a46
src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -51,6 +51,7 @@
                    v-model="editConfig.infomation.purchaseTypeId"
                    clearable
                    style="width: calc(100% - 30px)"
                    @visible-change="selPurchaseChange"
                  >
                    <el-option
                      v-for="ele in plcBrandList"
@@ -370,7 +371,7 @@
      editConfig: this.editCommonConfig,
      rules: {
        purchaseTypeId: [{ required: true, message: "请选择", trigger: "change" }],
        supplierName: [{ required: true, message: "请选择", trigger: "change" }],
        supplierName: [{ required: true, message: "请选择供应商名称", trigger: "change" }],
        phone: [
          {
            required: false,
@@ -396,7 +397,9 @@
          { validator: this.validatorNumThree, trigger: "change" }
        ],
        number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }],
        warehouse: [{ required: true, message: "请选择", trigger: "change" }]
        warehouse: [{ required: true, message: "请选择收货仓库", trigger: "change" }],
        signingDate: [{ required: true, message: "请选择签约日期", trigger: "change" }],
        deliveryDate: [{ required: true, message: "请选择交付日期", trigger: "change" }]
      },
      productTableList: {},
      showSummary: {
@@ -404,7 +407,7 @@
        total: false,
        sumProp: ["price", "total"],
        multiply: ["amount", "price"],
        titleProp: ["编号", "产品名称", "产品编号", "计量单位", "规格型号", "采购单价", "描述"],
        titleProp: ["编号", "产品名称", "产品编号", "计量单位", "规格", "型号", "采购单价", "描述"],
        mergeNumber: 4,
        totalName: "小计"
      },
@@ -432,7 +435,9 @@
  },
  created() {
    console.log(this.editConfig, "参数")
    this.handleGetBomKindDictList()
    if (this.editConfig.title == "新建") {
      this.handleGetBomKindDictList()
    }
    this.getWarehouseInfo()
    this.$store.dispatch("getSupplier")
    this.formInfo()
@@ -446,7 +451,9 @@
    "editCommonConfig.visible": {
      immediate: true,
      handler: function () {
        this.handleGetBomKindDictList(true)
        if (this.editConfig.title == "新建") {
          this.handleGetBomKindDictList(true)
        }
      }
    }
  },
@@ -520,6 +527,12 @@
          }
        }
      })
    },
    // 选择采购类型下拉方法
    selPurchaseChange(val) {
      if (val) {
        this.handleGetBomKindDictList()
      }
    },
    handleConfirmSave(data) {
      console.log(data, "data")
@@ -830,7 +843,8 @@
          },
          { label: "产品编号", prop: "number", min: 150 },
          { label: "计量单位", prop: "unit" },
          { label: "规格型号", prop: "specifications" },
          { label: "规格", prop: "specifications" },
          { label: "型号", prop: "modelNumber" },
          { label: "数量", prop: "amount", inputNumber: true, disabled: this.editConfig.isDisabled },
          {
            label: "采购单价",