songshankun
2023-10-12 82d43b47413a4fd5eb7a5c83aa4692b2c6a8bc41
src/views/sales/contractManage/AddContractManageDialog.vue
@@ -253,7 +253,8 @@
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入", trigger: "blur" }],
        number: [{ required: true, validator: this.checkCode, trigger: "blur" }],
        client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }],
        member_id: [{ required: true, message: "请选择", trigger: "change" }]
      },
      memberOptions: [],
@@ -344,6 +345,7 @@
    },
    saveParams() {
      let data = this.editConfig.infomation
      console.log(data)
      let params = {
        id: this.editConfig.title === "新建" ? 0 : data.id,
        client_id: this.clientId || 0,
@@ -436,6 +438,14 @@
        this.unflodCollapseStr = "收起"
        this.isUnflod = true
      }
    },
    // 订单编码单独校验
    checkCode(rule, value, callback) {
      if (this.editConfig.infomation.number && this.editConfig.infomation.number.length > 0) {
        callback()
      } else {
        callback(new Error("请输入单据编号"))
      }
    }
  }
}