rules: {
    
    pkMarbasclass: [
      {
        required: false, message: "匹配类型为物料分类,物料分类不能为空", trigger: "blur", validator(rule, value, callback, source, options) {
          console.log("物料分类主键:form.value.matchType...")
          console.log(form.value.matchType)
          if (form.value.matchType === '1' && (value === '' || value === undefined)) {
            callback(new Error('匹配类型为物料分类,物料分类不能为空'));
          } else {
            callback();
          }
        },
      }
    ],
    pkMaterial: [
      {
        required: false, message: "匹配类型为物料,物料不能为空", trigger: "blur", validator(rule, value, callback, source, options) {
          console.log("物料主键:form.value.matchType...")
          console.log(form.value.matchType)
          if (form.value.matchType === '0' && (value === '' || value === undefined)) {
            callback(new Error('匹配类型为物料,物料不能为空'));
          } else {
            callback();
          }
        },
      }
    ],
    matchType: [
      {required: true, message: "匹配类型不能为空", trigger: "change"}
    ]
    
  }