import { api } from "../../../api/common/dictionaries-type";
import { itemHealthCategory } from "./selects";

let grid = {
    labelCol: { span: 11 },
    wrapperCol: { span: 13 },
    span: 6
};

export const healthFormItems = [
    { ...itemHealthCategory, /*required: true,*/ ...grid },
    {
        type: "input", name: "itemHealthCategoryName", label: "itemHealthCategoryName", value: "", hidden: true,
    },
    {
        type: "input", name: "itemHealthType", label: "剂型", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthUsage", label: "用法", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthApprovalNbr", label: "批准文号", value: "",
        ...grid
    },
    {
        type: "select", name: "itemHealthIndustry", label: "类别", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=itemtype', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "input", name: "itemHealthCommonName", label: "通用名", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthBuyer", label: "采购员", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthRegisterNbr", label: "注册证号", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthRecordNbr", label: "备案号", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthExitemcode", label: "上游编号", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthChecknote", label: "验收注意点", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthStorenote", label: "储存注意事项", value: "",
        ...grid
    },
    {
        type: "input", name: "itemHealthCertificateNbr", label: "证书号码", value: "",
        ...grid
    },
    {
        type: "select", name: "itemHealthOtcFlag", label: "处方类型", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=otctype', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "number", name: "maintainCycle", label: "养护周期", value: '',
        ...grid
    },
    {
        type: "date", name: "certificateStartdate", label: "发证日期", value: '', format: 'YYYY-MM-DD',
        ...grid
    },
    {
        type: "date", name: "certificateEnddate", label: "证件有效期至", value: '', format: 'YYYY-MM-DD',
        ...grid
    },
    {
        type: "input", name: "itemHealthRegisterNbrEn", label: "进口注册证号", value: '',
        ...grid
    },
    {
        type: "input", name: "itemHealthListedLicensor", label: "上市许可持有人", value: '',
        ...grid
    },
    {
        type: "input", name: "itemHealthProduceLicense", label: "生产企业许可证号", value: '',
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthTwovoteflag", label: "是否两票制", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthIsPrintedDrug", label: "是否打印药检报告单", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthIsProtected", label: "是否重点品种", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthIsDouble", label: "是否双人验收", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthErrorproneflag", label: "是否易差错", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isBacteria", label: "是否无菌", value: 0,
        ...grid
    },
    {
        type: "SwitchValue", name: "isInstrument", label: "是否器械", value: 0,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthSuperviseflag", label: "是否追溯", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthAnticrossingflag", label: "是否防串", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthFirstopstatus", label: "是否首营状态", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthIsNed", label: "是否基药", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemHealthSubpackflag", label: "是否分装", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isDelegate", label: "是否委托生产", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isCheck", label: "是否验收", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isProtected", label: "是否重点养护", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isHerbalSlices", label: "是否中药饮片", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isHerbal", label: "是否中药材", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isPsychotropicDrugsOne", label: "是否一类精神药品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isPsychotropicDrugsTwo", label: "是否二类精神药品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isEfedrina", label: "是否含麻黄碱复方制剂", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isToxicDrugs", label: "是否毒性药品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isEasyToxicDrugs", label: "是否药品类易制毒化学品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isStupefacient", label: "是否麻醉药品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "isPreventionMaterial", label: "是否防疫物资", value: 1,
        ...grid
    },
    {
        type: "number", name: "preventionNum", label: "防疫储备量", value: 1,
        ...grid
    },
    {
        type: "input", name: "segment101", label: "药品负责人", value: '',
        ...grid
    },
    {
        type: "input", name: "segment102", label: "分销负责人", value: '',
        ...grid
    },
    {
        type: "input", name: "segment103", label: "终端负责人", value: '',
        ...grid
    },
    {
        type: "input", name: "segment104", label: "基药负责人", value: '',
        ...grid
    },
    {
        type: "input", name: "segment105", label: "推广负责人", value: '',
        ...grid
    },
    {
        type: "input", name: "attribute102", label: "来货渠道", value: '',
        ...grid
    },
    
    {
        type: "SwitchValue", name: "ATTRIBUTE101", label: "是否管理", value: 1,
        ...grid
    },
];