import { remote } from './remote'
let grid = {
    labelCol: { span: 10 },
    wrapperCol: { span: 14 },
    span: 6,
    disabled:true,
};
let gridTwo = {
    labelCol: { span: 8 },
    wrapperCol: { span: 16 },
    span: 6,
    disabled:true,
};

// 商品属性
export const itemMain = function (self) {
  return [
    {
      type: "input", name: "itemCode", label: "商品编码", value: "",
      ...grid
    },
    {
      type: "input", name: "itemName", label: "商品中文名称", value: "",maxLength: 60,...grid
    },
    {
      type: "input", name: "itemShortName", label: "商品简称", value: "",
      ...grid
    },
    {
      type: "input", name: "itemNameEn", label: "商品英文名称", value: "",
      ...grid
    },
    {
      type: "input", name: "manufacturerId", label: "生产商", value: "",
      ...grid
    },
    {
      type: "input", name: "countryOriginId", label: "产地", value: "",
      ...grid
    },
    {
      type: "input", name: "itemAssistantCode", label: "助记码", value: "",
      ...grid
    },
    {
      type: "input", name: "specification", label: "商品规格", value: "",
      ...grid
    },
    // {
    //   type: "input", name: "status", label: "状态", value: "",
    //   ...grid
    // },
    {
      type: "switch", name: "isEnable", label: "启用标识", value: "",
      ...grid
    },
    {
        type: "textarea", name: "itemDesc", label: "备注", value: "", maxLength: 240,
        disabled:true,
      labelCol: { span: 2 }, span: 24, rows: 2
    }
  ]
}

// 扩展属性
export const itemExtend = function (self) {
  return [
    {
      type: "input", name: "cargoOwnerName", label: "货主名称", value: "",
      ...grid
    },
    {
      type: "input", name: "supplierName", label: "供应商名称", value: "",
      ...grid
    },
    {
      type: "input", name: "brandId", label: "品牌", value: "",
      ...grid
    },
    {
      type: "input", name: "seriesId", label: "系列", value: "",
      ...grid
    },
    {
      type: "input", name: "shelfLifeDays", label: "出库预留质保期天数", value: "",
      ...grid
    },
    {
        type: "input", name: "attribute21", label: "预留字段1", value: "", ...grid
    },
    {
        type: "input", name: "attribute22", label: "预留字段2", value: "", ...grid
    },
    {
        type: "input", name: "attribute23", label: "预留字段3", value: "", ...grid
    },
    {
        type: "input", name: "attribute24", label: "预留字段4", value: "", ...grid
    },
    {
        type: "input", name: "attribute25", label: "预留字段5", value: "", ...grid
    },
    {
        type: "input", name: "attribute26", label: "预留字段6", value: "", ...grid
    },
    {
        type: "input", name: "attribute27", label: "预留字段7", value: "", ...grid
    },
    {
        type: "input", name: "attribute28", label: "预留字段8", value: "", ...grid
    },
    {
        type: "input", name: "attribute29", label: "预留字段9", value: "", ...grid
    },
    {
        type: "input", name: "attribute30", label: "预留字段10", value: "", ...grid
    },
  ]
}

// 包装属性
export const itemPack = function (self) {
  return [
     {
        type: 'select', width: 100, title: "包装级别",
        dataIndex: "uomLevel", key: "uomLevel",
        ...remote('pub_pharm_code_info_packlevel')
    },
     {
        type: 'select', width: 100, title: "包装单位",
        dataIndex: "uom", key: "uom",
        ...remote('pub_itempack_packcode')
    },
    {
        type: 'txt', width: 100, title: "包装数量",
        dataIndex: "conversionRate", key: "conversionRate",
    },
     {
        type: 'switch', width: 90, title: "最小统计单位",
        dataIndex: "minSu", key: "minSu",
        value: false,
        transValues: ['Y', 'N'],
    },
     {
        type: 'switch', width: 90, title: "最大统计单位",
        dataIndex: "maxSu", key: "maxSu",
        value: false,
        transValues: ['Y', 'N'],
    },
    //      {
    //     type: 'txt', width: 170, title: "旧条码", maxLength: 30,
    //     dataIndex: "barcodeOld", key: "barcodeOld",
    // },
    // {
    //     type: 'txt', width: 170, title: "条码", /*required: true,*/ maxLength: 30,
    //     dataIndex: "barcode", key: "barcode",
    // },
     {
        type: 'txt', width: 100, title: "重量",
        dataIndex: "weight", key: "weight",
    },
     {
        type: 'txt', width: 100, title: "净重",
        dataIndex: "netWeight", key: "netWeight",
    },
     {
        type: 'txt', width: 100, title: "长(cm)",
        dataIndex: "length", key: "length",
    },
     {
        type: 'txt', width: 100, title: "宽(cm)",
        dataIndex: "width", key: "width",
    },
     {
        type: 'txt', width: 100, title: "高(cm)",
        dataIndex: "height", key: "height",
    },
     {
        type: 'txt', width: 80, title: "体积",
        dataIndex: "volume", key: "volume",
    },
     {
        type: 'txt', width: 80, title: "产地",
        dataIndex: "countryOrigin", key: "countryOrigin",
    },
  ]
}

// 采销属性
export const itemPurchase = function (self) {
  return [
        {
        type: "number", name: "piecePurchasePriceTe", label: "不含税采购价", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "number", name: "piecePurchasePriceTi", label: "含税采购价", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "number", name: "pieceSalePriceTe", label: "不含税销售价", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "number", name: "pieceSalePriceTi", label: "含税销售价", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "number", name: "taxRatePurchase", label: "进项税率", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "number", name: "taxRateSale", label: "销项税率", value: "",
        max: 9999999999999999.9999, min: 0, precision: 4,
        ...gridTwo
    },
    {
        type: "select", name: "itemSaleAttribute1", label: "商品销售属性", value: "",
      ...gridTwo,
        ...remote('saleattribute')
    },
    {
        type: "switch", name: "purchaseIsEnable", label: "采购启用标识", 
        ...gridTwo,
    },
    {
        type: "switch", name: "purchaseReturnIsEnable", label: "采退启用标识", 
        ...gridTwo,
    },
    {
        type: "switch", name: "saleIsEnable", label: "销售启用标识", 
        ...gridTwo,
    },
    {
        type: "switch", name: "saleReturnIsEnable", label: "销退启用标识", 
        ...gridTwo,
    },


  ]
}

// 存储属性
export const itemSave = function (self) {
  return [
    {
        type: "select", name: "storeTemperature", label: "存储条件", value: "",
        ...grid,
        ...remote('wms_storagecondition')
    },
    {
      type: 'select', name: "abcType", label: "ABC属性", value: "",
      ...remote('abcgroup'),...grid },
    {
        type: "input", name: "storeUnit", label: "库存单位", value: "", maxLength: 10,
        ...grid
    },
    {
      type: "select", name: "codeCollectMode", label: "码采集", value: "",
      ...grid,
      ...remote('ettscodeflag')
    },
    {
        type: "number", name: "shelfLifeDays", label: "保质期(天)", value: "", min: 0,
        ...grid
    },
    {
        type: "number", name: "unsaleDay", label: "滞销期(天)", value: "", min: 0,
        ...grid
    },
    {
        type: "input", name: "inStoreDay", label: "入库预警保质期", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "outStoreDay", label: "出库预警保质期", value: "", maxLength: 10,
        ...grid
    },
    {
      type: "select", name: "expiryDateTrackLevel", label: "有效跟踪级别", value: "",
      ...grid,
      ...remote('datetracklevel')
    },
    {
      type: "select", name: "qcGroup", label: "质检分组", value: "",
      ...grid,
      ...remote('qa_group')
    },
    {
      type: "select", name: "palletPlacedRule", label: "托盘码放规则", value: "",
      ...grid,
      ...remote('stacktype')
    },
    {
        type: "input", name: "palletStdQuantity", label: "标准托盘量", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "stdCaseFactor", label: "标准箱系数", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "itemTemperatureHigh", label: "温控区间(上限)", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "itemTemperatureLow", label: "温控区间(下限)", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "switch", name: "isLock", label: "商品是否锁定", 
        ...grid
    },
    {
        type: "switch", name: "isHosted", label: "商品是否代管", 
        ...grid
    },
    {
        type: "switch", name: "itemIsRecheck", label: "商品是否复检", 
        ...grid
    },
    {
        type: "switch", name: "itemIsDangerous", label: "是否危险品", 
        ...grid
    },
    {
        type: "switch", name: "itemIsFragile", label: "是否易碎", 
        ...grid
    },
    {
        type: "switch", name: "itemIsImported", label: "是否进口", 
        ...grid
    },
    {
        type: "switch", name: "itemIsGift", label: "是否赠品", 
        ...grid
    },
    {
        type: "switch", name: "itemIsValuable", label: "是否贵重物品", 
        ...grid
    },
    {
        type: "switch", name: "itemIsWeighed", label: "是否称重", 
        ...grid
    },
    {
        type: "switch", name: "itemIsSpecial", label: "是否特殊品种", 
        ...grid
    },
    {
        type: "switch", name: "itemIsSpecialSharped", label: "是否异型", 
        ...grid
    },
    {
        type: "switch", name: "itemIsBatch", label: "是否批号", 
        ...grid
    },
    {
        type: "switch", name: "itemIsSeque", label: "是否序列号管理", 
        ...grid
    },
    {
        type: "switch", name: "itemIsExpire", label: "是否效期管理", 
        ...grid
    },
    {
        type: "switch", name: "itemIsLot", label: "是否批次", 
        ...grid
    },
    {
        type: "switch", name: "reacallIsEnable", label: "召回标识", 
        ...grid
    },
    {
        type: "switch", name: "itemIsUnpack", label: "是否允许拆中包装", 
        ...grid
    },
    {
        type: "switch", name: "isCaseOrPiece", label: "是否整散合一", 
        ...grid
    }
  ]
}

// 大健康属性
export const itemHealth = function (self) {
  return [
    { type: 'select',name: 'itemHealthCategory',label: '商品大类',value: '', ...grid,
      ...remote('item_health_category')
    },
    {
        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,
        ...remote('itemtype')
    },
    {
        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,
        ...remote('otctype')
    },
    {
        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: "switch", name: "itemHealthTwovoteflag", label: "是否两票制", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthIsPrintedDrug", label: "是否打印药检报告单", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthIsProtected", label: "是否重点品种", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthIsDouble", label: "是否双人验收", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthErrorproneflag", label: "是否易差错", 
        ...grid
    },
    {
        type: "switch", name: "isBacteria", label: "是否无菌", 
        ...grid
    },
    {
        type: "switch", name: "isInstrument", label: "是否器械", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthSuperviseflag", label: "是否监管", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthAnticrossingflag", label: "是否防串", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthFirstopstatus", label: "是否首营状态", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthIsNed", label: "是否基药", 
        ...grid
    },
    {
        type: "switch", name: "itemHealthSubpackflag", label: "是否分装", 
        ...grid
    },
    {
        type: "switch", name: "isDelegate", label: "是否委托生产", 
        ...grid
    },
    {
        type: "switch", name: "isCheck", label: "是否验收", 
        ...grid
    },
    {
        type: "switch", name: "isProtected", label: "是否重点养护", 
        ...grid
    },
    {
        type: "switch", name: "isHerbalSlices", label: "是否中药饮片", 
        ...grid
    },
    {
        type: "switch", name: "isHerbal", label: "是否中药材", 
        ...grid
    },
    {
        type: "switch", name: "isPsychotropicDrugsOne", label: "是否一类精神药品", 
        ...grid
    },
    {
        type: "switch", name: "isPsychotropicDrugsTwo", label: "是否二类精神药品", 
        ...grid
    },
    {
        type: "switch", name: "isEfedrina", label: "是否含麻黄碱复方制剂", 
        ...grid
    },
    {
        type: "switch", name: "isToxicDrugs", label: "是否毒性药品", 
        ...grid
    },
    {
        type: "switch", name: "isEasyToxicDrugs", label: "是否药品类易制毒化学品", 
        ...grid
    },
    {
        type: "switch", name: "isStupefacient", label: "是否麻醉药品", 
        ...grid
    },
    {
        type: "switch", name: "isPreventionMaterial", label: "是否防疫物资", 
        ...grid
    },
    {
        type: "number", name: "preventionNum", label: "防疫储备量", 
        ...grid
    },
  ]
}

