
function setVisibleByInputType(inputType,setFieldVisibleByBatch) {
  let inputTypeIsQty=inputType===1;
  const inputTypeIsEnum=inputType===2;
  const arrayList=[];
  arrayList.push({field: 'LOWER_LIMIT_QTY',visible:inputTypeIsQty});
  arrayList.push({field:'UPPER_LIMIT_QTY',visible:inputTypeIsQty});
  arrayList.push({field:'STANDARD_QTY',visible:inputTypeIsQty});
  arrayList.push({field:'UNIT',visible:inputTypeIsQty});

  arrayList.push({field:'INPUT_ENUM',visible:inputTypeIsEnum});
  arrayList.push({field:'INPUT_ENUM_ANSWER',visible:inputTypeIsEnum});
  setFieldVisibleByBatch(arrayList);
}


//	产品样本配置编辑
export default {
  onChange: ({value,colInfo,setFieldVisibleByBatch}) => {
    if(colInfo.FIELD_NAME=='INPUT_TYPE'){
      setVisibleByInputType(value,setFieldVisibleByBatch);
    }
  },
  onBeforeEdit:({stateData,setFieldVisibleByBatch})=>{
    setVisibleByInputType(stateData.INPUT_TYPE,setFieldVisibleByBatch);
  },
}
