import { genCargoownerAuthSearchModal } from "../../SearchModal";
import { upcloud_base_common } from "@/config/serviceSettings";
import moment from "moment";
let grid = {
  labelCol: { span: 8 },
  span: 6,
};

export function formItems(self) {
  let bizTypeOptions = [];
  //   console.log(self.businessData, "self.businessData");
  //   if (self.businessData == "kzy") {
  //     bizTypeOptions = [
  //       // 昆药只需要温度
  //       { label: "温度", value: "04" },
  //     ];
  //   } else {
  //     bizTypeOptions = [
  //       // 01供应商样张,02商品03随货同行单,04温度05报告单
  //       { label: "供应商样张", value: "01" },
  //       { label: "商品", value: "02" },
  //       { label: "随货同行单", value: "03" },
  //       { label: "温度", value: "04" },
  //       { label: "报告单", value: "05" },
  //     ];
  //   }

  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
          //   if (value == "01") {
          //     _this.$refs.gridForm.form.unhiddenItem(["supplierCode", "supplierName"]);
          //     _this.$refs.gridForm.form.hiddenItem([
          //       "itemCondition",
          //       "manufacturerName",
          //       "cargoOwnerName",
          //       "shipperCondition",
          //       "customerCode",
          //       "customerName",
          //       "itemName",
          //       "itemCode",
          //     ]);
          //     return;
          //   }

          //   if (value == "02") {
          //     _this.$refs.gridForm.form.unhiddenItem(["itemName", "itemCode"]);
          //     _this.$refs.gridForm.form.hiddenItem([
          //       "itemCondition",
          //       "manufacturerName",
          //       "cargoOwnerName",
          //       "shipperCondition",
          //       "supplierCode",
          //       "supplierName",
          //       "customerCode",
          //       "customerName",
          //     ]);
          //     return;
          //   }
          //   if (value == "06") {
          //     _this.$refs.gridForm.form.unhiddenItem(["customerCode", "customerName"]);
          //     _this.$refs.gridForm.form.hiddenItem([
          //       "itemCondition",
          //       "manufacturerName",
          //       "cargoOwnerName",
          //       "shipperCondition",
          //       "supplierCode",
          //       "supplierName",
          //       "itemName",
          //       "itemCode",
          //     ]);
          //     return;
          //   }

          //   _this.$refs.gridForm.form.hiddenItem([
          //     "shipperCondition",
          //     "supplierCode",
          //     "supplierName",
          //     "customerCode",
          //     "customerName",
          //     "itemName",
          //     "itemCode",
          //   ]);
          //   _this.$refs.gridForm.form.unhiddenItem(["itemCondition", "manufacturerName"]);
        },
      },
    },
    ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    { type: "input", name: "supplierName", label: "供应商名称", value: "", ...grid },
    { type: "input", name: "supplierCode", label: "供应商编码", value: "", ...grid },
    { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
      ],
    },
  ];
}

export function formItems1(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },

    { type: "input", name: "supplierCode", label: "供应商编码", value: "", ...grid },
    { type: "input", name: "supplierName", label: "供应商名称", value: "", ...grid },
    {
      type: "select",
      name: "supType",
      label: "图片类型",
      value: "",
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=SUP_IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          self.supType = value
        },
      },
    },
    {
      type: "select", name: "upFlag", label: "是否上传", value: "",
      options: [
        {label:'已上传',value:'1'},
        {label:'未上传',value:'0'},
      ],
      ...grid
    },
    // ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    //   { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    //   { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    //   { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
        {
          value: "打印",
          icon: "",
          btnType: "primary",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.handlePrint()
            },
          }
        },
      ],
    },
  ];
}

export function formItems7(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },

    // ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    {
      type: "select", name: "upFlag", label: "是否上传", value: "",
      options: [
        {label:'已上传',value:'1'},
        {label:'未上传',value:'0'},
      ],
      ...grid
    },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    //   { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      offset: 18,
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
        {
          value: "打印",
          icon: "",
          btnType: "primary",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.handlePrint()
            },
          }
        },
      ],
    },
  ];
}

export function formItems2(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },

    //   { type: "input", name: "supplierCode", label: "供应商名称", value: "", ...grid },
    //   { type: "input", name: "supplierName", label: "供应商编码", value: "", ...grid },
    // ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    { type: "input", name: "manufacturerLotNum", label: "批号", value: "", ...grid },
    {
      type: "select", name: "upFlag", label: "是否上传", value: "",
      options: [
        {label:'已上传',value:'1'},
        {label:'未上传',value:'0'},
      ],
      ...grid
    },
    // { type: "date", format: "YYYY-MM-DD", name: "rcvDate", label: "入库日期", value:'', ...grid },
    // { type: "input", name: "refBillNo", label: "订单编号", value: "", ...grid },
    { type: "input", name: "manufacturerId", label: "生产厂家", value: "", ...grid },

    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    //   { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
        {
          value: "打印",
          btnType: "primary",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.handlePrint()
            },
          },
        },
      ],
    },
  ];
}

export function formItems3(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },
  
    { type: "date", format: "YYYY-MM-DD", name: "rcvDate", label: "入库日期", value:'', ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "startDate", label: "入库日期", value: moment().subtract(7,'d').format('YYYY-MM-DD'), ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "endDate", label: "结束日期", value: moment().format("YYYY-MM-DD"), ...grid },
    //   { type: "input", name: "supplierName", label: "供应商编码", value: "", ...grid },
    ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },

    { type: "input", name: "shippername", label: "供应商名称", value: "", ...grid },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    //   { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
      ],
    },
  ];
}

export function formItems4(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },
    { type: "date", format: "YYYY-MM-DD", name: "rcvDate", label: "入库日期", value:'', ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "startDate", label: "入库日期", value: moment().subtract(7,'d').format('YYYY-MM-DD'), ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "endDate", label: "结束日期", value: moment().format("YYYY-MM-DD"), ...grid },
    //   { type: "input", name: "supplierCode", label: "供应商名称", value: "", ...grid },
    //   { type: "input", name: "supplierName", label: "供应商编码", value: "", ...grid },
    ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    { type: "input", name: "manufacturerLotNum", label: "批号", value: "", ...grid },
    { type: "input", name: "billNo", label: "单据编号", value: "", ...grid },
    { type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },

    { type: "input", name: "shippername", label: "供应商名称", value: "", ...grid },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },

    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
      ],
    },
  ];
}
export function formItems5(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },
    { type: "date", format: "YYYY-MM-DD", name: "rcvDate", label: "入库日期", value:'', ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "startDate", label: "入库日期", value: moment().subtract(7,'d').format('YYYY-MM-DD'), ...grid },
    // { type: "date", format: "YYYY-MM-DD", name: "endDate", label: "结束日期", value: moment().format("YYYY-MM-DD"), ...grid },

    //   { type: "input", name: "supplierName", label: "供应商编码", value: "", ...grid },
    // ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },

    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    // { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    { type: "input", name: "manufacturerLotNum", label: "批号", value: "", ...grid },
    { type: "input", name: "billNo", label: "单据编号", value: "", ...grid },
    { type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },

    { type: "input", name: "shippername", label: "供应商名称", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
      ],
    },
  ];
}
export function formItems6(self) {
  let _this = self;
  return [
    {
      type: "select",
      name: "bizType",
      label: "资料类型",
      value: "",
      required: true,
      ...grid,

      //   options: bizTypeOptions,
      autoLoad: true,
      remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=IMAGE_TYPE", method: "post" },
      replaceFields: {
        value: "dictCode",
        // value: "dictName",
        label: "dictName",
      },
      on: {
        change(value, label) {
          console.log(value, label, "value,label");
          var data = {};
          data.bizType = value;
          _this.getList(data);
        },
      },
    },

    //   { type: "input", name: "supplierCode", label: "供应商名称", value: "", ...grid },
    //   { type: "input", name: "supplierName", label: "供应商编码", value: "", ...grid },
    ...genCargoownerAuthSearchModal(1, false, false, null, null, grid),
    //   { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { type: "input", name: "customerCode", label: "客户编码", value: "", ...grid },
    //   { type: "input", name: "customerName", label: "客户名称", value: "", ...grid },
    { type: "input", name: "itemName", label: "商品名称", value: "", ...grid },
    { type: "input", name: "itemCode", label: "商品编码", value: "", ...grid },
    //   // ...genSupplierSearchModal(1, false, false, null, null, grid,),
    //   // { type: "input", name: "cargoOwnerCode", label: "货主编号", value: "",...grid, },
    //   { hidden: true, type: "input", name: "itemCondition", label: "商品", value: "", ...grid },
    //   { type: "input", name: "shipperCondition", label: "单位", value: "", ...grid },
    //   { hidden: true, type: "input", name: "manufacturerName", label: "生产厂家", value: "", ...grid },
    {
      type: "buttonGroup",
      ...grid,
      options: [
        {
          value: "查询",
          icon: "search",
          btnType: "primary",
          style: "margin-left:10px",
          htmlType: "submit",
        },
        {
          value: "重置",
          icon: "redo",
          style: "margin-left:10px",
          on: {
            click: () => {
              self.$refs.gridForm.form.resetFields();
            },
          },
        },
      ],
    },
  ];
}
export function tableColumns1(_this) {
  return [
    // { hidden:true, title: "id", dataIndex: "id", className: "v_top" },
    { hidden:true, title: "bizId", dataIndex: "bizId", className: "v_top" },
    { hidden:true,title: "货主编号", dataIndex: "cargoOwnerCode", width: 120 },
    { hidden:true,title: "货主名称", dataIndex: "cargoOwnerName", width: 220 },
    { title: "供应商编号", dataIndex: "supplierCode", className: "v_top" },
    { hidden:true,title: "供应ID", dataIndex: "supplierId", className: "v_top" },
    { title: "供应商名称", dataIndex: "supplierName", className: "v_top" },
    { title: "印章印模", dataIndex: "yzupflag", className: "v_top", scopedSlots: { customRender: "yzupflag" } },
    { title: "销售清单", dataIndex: "xsqdupflag", className: "v_top", scopedSlots: { customRender: "xsqdupflag" } },
    { title: "药品生产许可证", dataIndex: "ypupflag", className: "v_top", scopedSlots: { customRender: "ypupflag" } },
    { title: "发票样式", dataIndex: "fpupflag", className: "v_top", scopedSlots: { customRender: "fpupflag" } },
    { hidden:true,title: "文件ID", dataIndex: "id" },
    { hidden:true,title: "文件类型", dataIndex: "fileType" },
    { hidden:true,title: "名称", dataIndex: "name" },
    { hidden:true,title: "文件名称", dataIndex: "fileName" },
    { hidden:true,title: "文件路径", dataIndex: "fileUrl" },
    { hidden:true,title: "文件文件夹", dataIndex: "fileFolderId" },
    { hidden:true,title: "文件真实路径", dataIndex: "relativePath" },
    { hidden:true,title: "创建人", dataIndex: "createBy" },
    { hidden:true,title: "创建时间", dataIndex: "createDate" },
    { hidden:true,title: "修改人", dataIndex: "lastmodifyBy" },
    { hidden:true,title: "修改时间", dataIndex: "lastmodifyDate" },
    { hidden:true,title: "创建人名称", dataIndex: "createName" },
    { hidden:true,title: "修改人名称", dataIndex: "lastmodifyName" },
    { hidden:true,title: "数据类型", dataIndex: "dataType" },
    // { title: "备注", dataIndex: "remark", width: 220 },
    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      width: 200,
      scopedSlots: { customRender: "action" },
    },
  ];
}

export function customerCodeColumns(_this) {
  return [
    { title: "id", dataIndex: "id", className: "v_top" },
    { title: "bizId", dataIndex: "bizId", className: "v_top" },
    { title: "客户编号", dataIndex: "customerId", className: "v_top" },
    { title: "客户ID", dataIndex: "customerCode", className: "v_top" },
    { title: "客户名称", dataIndex: "customerName", className: "v_top" },
    { title: "备注", dataIndex: "remark", width: 220 },
    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      width: 100,
      scopedSlots: { customRender: "action" },
    },
  ];
}

export function itemColumns2(_this) {
  return [
    // { title: "id", dataIndex: "id", className: "v_top" },
    { title: "bizId", dataIndex: "bizId", className: "v_top", width: 120 },
    // { title: "订单编号", dataIndex: "refBillNo", width: 120 },
    // { title: "收货单号", dataIndex: "billNo", width: 120 },
    { title: "商品编号", dataIndex: "itemCode", className: "v_top" },
    { title: "批号", dataIndex: "manufacturerLotNum"},
    { title: "商品名称", dataIndex: "itemName", className: "v_top" },
    { title: "规格", dataIndex: "specification", width: 120 },
    { title: "生产厂家", dataIndex: "manufacturerId", width: 120 },
    { title: "是否上传", dataIndex: "upFlag", width: 120, scopedSlots: { customRender: "upFlag" } },
    // { title: "入库日期", dataIndex: "rcvDate", width: 120 },
    { hidden:true,title: "文件ID", dataIndex: "id" },
    { hidden:true,title: "文件类型", dataIndex: "fileType" },
    { hidden:true,title: "名称", dataIndex: "name" },
    { hidden:true,title: "文件名称", dataIndex: "fileName" },
    { hidden:true,title: "文件路径", dataIndex: "fileUrl" },
    { hidden:true,title: "文件文件夹", dataIndex: "fileFolderId" },
    { hidden:true,title: "文件真实路径", dataIndex: "relativePath" },
    { hidden:true,title: "创建人", dataIndex: "createBy" },
    { hidden:true,title: "创建时间", dataIndex: "createDate" },
    { hidden:true,title: "修改人", dataIndex: "lastmodifyBy" },
    { hidden:true,title: "修改时间", dataIndex: "lastmodifyDate" },
    { hidden:true,title: "创建人名称", dataIndex: "createName" },
    { hidden:true,title: "修改人名称", dataIndex: "lastmodifyName" },
    { hidden:true,title: "数据类型", dataIndex: "dataType" },
    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      scopedSlots: { customRender: "action" },
    },
  ];
}

export function tableColumns2(_this) {
  return [
    { hidden: true, title: "rowId", dataIndex: "rowId", className: "v_top" },
    { title: "bizId", dataIndex: "bizId", className: "v_top", width: 120 },
    { title: "货主编号", dataIndex: "cargoOwnerCode", width: 120 },
    { title: "货主名称", dataIndex: "cargoOwnerName", width: 220 },
    { title: "图片数量", dataIndex: "count", width: 60 },
    { title: "商品编号", dataIndex: "itemCode", width: 220 },
    { title: "商品名称", dataIndex: "itemName", width: 220 },
    { title: "商品代码", dataIndex: "shipperZjm", width: 220 },
    { title: "产品规格", dataIndex: "specification", width: 120 },
    { title: "助记码", dataIndex: "itemZjm", width: 120 },
    { title: "产品条码", dataIndex: "shippercode", width: 220 },
    { title: "生产厂家", dataIndex: "manufacturerName", width: 220 },
    { title: "备注", dataIndex: "remark", width: 220 },

    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      scopedSlots: { customRender: "action" },
    },
  ];
}
export function columns(_this) {
  return [
    { hidden: true, title: "rowId", dataIndex: "rowId", className: "v_top" },
    { title: "bizId", dataIndex: "bizId", className: "v_top", width: 120 },
    { title: "货主编号", dataIndex: "cargoOwnerCode", width: 120 },
    { title: "货主名称", dataIndex: "cargoOwnerName", width: 220 },
    { title: "订单编号", dataIndex: "refBillNo", width: 220 },
    { title: "单据编号", dataIndex: "billNo", width: 120 },
    { title: "入库日期", dataIndex: "rcvDate", width: 220 },
    { title: "供应商名称", dataIndex: "shippername", width: 220 },
    { title: "图片数量", dataIndex: "count", width: 60 },
    { title: "商品编号", dataIndex: "itemCode", width: 220 },
    { title: "商品名称", dataIndex: "itemName", width: 220 },
    { title: "商品代码", dataIndex: "shipperZjm", width: 120 },
    { title: "产品规格", dataIndex: "specification", width: 120 },
    { title: "批号", dataIndex: "manufacturerLotNum", width: 120 },
    { title: "助记码", dataIndex: "itemZjm", width: 120 },
    { title: "产品条码", dataIndex: "shippercode", width: 220 },
    { title: "生产厂家", dataIndex: "manufacturerName", width: 220 },
    { title: "备注", dataIndex: "remark", width: 220 },

    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      scopedSlots: { customRender: "action" },
    },
  ];
}
export function tableColumns3(_this) {
  return [
    { hidden: true, title: "rowId", dataIndex: "rowId", className: "v_top" },
    { title: "bizId", dataIndex: "bizId", className: "v_top", width: 120 },
    { title: "货主编号", dataIndex: "cargoOwnerCode", width: 120 },
    { title: "图片数量", dataIndex: "count", width: 60 },
    { title: "商品编号", dataIndex: "itemCode", width: 120 },
    { title: "商品名称", dataIndex: "itemName", width: 120 },
    { title: "商品代码", dataIndex: "shipperZjm", width: 120 },
    { title: "产品规格", dataIndex: "specification", width: 120 },
    { title: "助记码", dataIndex: "itemZjm", width: 120 },
    { title: "产品条码", dataIndex: "shippercode", width: 120 },
    { title: "生产厂家", dataIndex: "manufacturerName", width: 120 },
    { title: "备注", dataIndex: "remark", width: 220 },

    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      scopedSlots: { customRender: "action" },
    },
  ];
}
export function tableColumns7(_this) {
  return [
    // { hidden: true, title: "rowId", dataIndex: "rowId", className: "v_top" },
    { hidden: true,title: "bizId", dataIndex: "bizId", className: "v_top", width: 120 },
    { title: "商品编号", dataIndex: "itemCode" },
    { title: "商品名称", dataIndex: "itemName" },
    { title: "规格", dataIndex: "specification" },
    { title: "生产厂家", dataIndex: "manufacturerId" },
    { title: "产地", dataIndex: "countryOriginId" },
    { title: "是否上传", dataIndex: "upFlag", width: 120, scopedSlots: { customRender: "upFlag" } },
    { hidden:true,title: "文件ID", dataIndex: "id" },
    { hidden:true,title: "文件类型", dataIndex: "fileType" },
    { hidden:true,title: "名称", dataIndex: "name" },
    { hidden:true,title: "文件名称", dataIndex: "fileName" },
    { hidden:true,title: "文件路径", dataIndex: "fileUrl" },
    { hidden:true,title: "文件文件夹", dataIndex: "fileFolderId" },
    { hidden:true,title: "文件真实路径", dataIndex: "relativePath" },
    { hidden:true,title: "创建人", dataIndex: "createBy" },
    { hidden:true,title: "创建时间", dataIndex: "createDate" },
    { hidden:true,title: "修改人", dataIndex: "lastmodifyBy" },
    { hidden:true,title: "修改时间", dataIndex: "lastmodifyDate" },
    { hidden:true,title: "创建人名称", dataIndex: "createName" },
    { hidden:true,title: "修改人名称", dataIndex: "lastmodifyName" },
    { hidden:true,title: "数据类型", dataIndex: "dataType" },

    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      width: 120,
      scopedSlots: { customRender: "action" },
    },
  ];
}

export function detailColumns(_this) {
  return [
    // {hidden:true, title: 'id', dataIndex: 'id', className: 'v_top', },
    { title: "文件ID", dataIndex: "id", width: 120 },
    { title: "文件类型", dataIndex: "fileType", width: 120 },
    { title: "文件名称", dataIndex: "fileName", width: 120 },
    { title: "文件类别", dataIndex: "name", width: 120 },
    { title: "文件路径", dataIndex: "relativePath", width: 120 },
    { title: "文件地址", dataIndex: "fileUrl", width: 120 },
    {
      title: "操作",
      key: "operate",
      align: "center",
      fixed: "right",
      scopedSlots: { customRender: "action" },
    },
  ];
}

export const extendFormItems = [
  { title: "ASN头ID", dataIndex: "asnHeaderId", hidden: true, value: "" },
  { title: "ASN行ID", dataIndex: "asnLineId", hidden: true, value: "" },
  { title: "批次ID", dataIndex: "batchId", hidden: true, value: "" },
  { title: "商品ID", dataIndex: "itemId", hidden: true, value: "" },
  { title: "收货单头ID", dataIndex: "rcvHeaderId", hidden: true, value: "" },
  { title: "收货行头ID", dataIndex: "rcvLineId", hidden: true, value: "" },
  { title: "来源单类型", dataIndex: "srcBillType", hidden: true, value: "" },
  { title: "来源单头ID", dataIndex: "srcHeaderId", hidden: true, value: "" },
  { title: "来源单行ID", dataIndex: "srcLineId", hidden: true, value: "" },

  { title: "生产厂家", dataIndex: "manufacturerName", key: "manufacturerName", width: 120 },
  { title: "产地", dataIndex: "productionPlace", key: "productionPlace", width: 60 },
  { title: "批准文号", dataIndex: "approvalNumber", key: "approvalNumber", width: 120 },
  { title: "上市许可持有人", dataIndex: "itemHealthListedLicensor", key: "itemHealthListedLicensor", width: 120 },
  { title: "注册证号", dataIndex: "itemHealthRegisterNbr", key: "itemHealthRegisterNbr", width: 120 },
  { title: "生产企业许可证号", dataIndex: "itemHealthProduceLicense", key: "itemHealthProduceLicense", width: 120 },
  { title: "包装单位", dataIndex: "uom", key: "uom", width: 120 },
  { title: "包装数", dataIndex: "conversionRate", key: "conversionRate", width: 120 },
  { title: "数量", dataIndex: "pieceQty", key: "pieceQty", width: 120 },
  { title: "件数", dataIndex: "caseQty", key: "caseQty", width: 80 },
  { title: "零散数", dataIndex: "oddPieceQty", key: "oddPieceQty", width: 80 },
  { title: "批号", dataIndex: "manufacturerLotNum", key: "manufacturerLotNum", width: 120 },
  { title: "显示生产日期", dataIndex: "showProductionDateOld", key: "showProductionDateOld", width: 120 },
  { title: "显示有效期至", dataIndex: "showExpiredDateOld", key: "showExpiredDateOld", width: 120 },
  { title: "生产日期", dataIndex: "productionDateOld", key: "productionDateOld", width: 120 },
  { title: "有效期至", dataIndex: "expiredDateOld", key: "expiredDateOld", width: 120, type: "txt" },
  { title: "库房", dataIndex: "whRoom", key: "whRoom", width: 100, value: "" },
  { title: "容器号", dataIndex: "containerCode", key: "containerCode", width: 100, value: "" },
  { title: "存储分类", dataIndex: "itemHealthStoreCategory", key: "itemHealthStoreCategory", width: 120 },
];

export function detailFormItems(_this, object) {
  return [
    { type: "input", name: "batchIdNew", label: "供应商批次号", hidden: true, value: "" },
    { type: "input", name: "lineNum", label: "行号", hidden: true, value: "" },
    { type: "input", name: "vendorBatchNumNew", label: "供应商批次号", hidden: true, value: "" },
    { type: "input", name: "manufacturerLotNumNew", label: "生产商批号", hidden: true, value: "" },
    { type: "input", name: "nodeType", label: "错误发现节点（收货/验收/质检/上架）", hidden: true, value: "" },
    { type: "input", name: "conversionRate", label: "包装含量", hidden: true, value: "" },
    { type: "input", name: "shelfLifeUnit", label: "保质期单位", hidden: true, value: "" },
    { type: "input", name: "shelfLifeDays", label: "保质期天数", hidden: true, value: "" },

    { type: "input", name: "itemNum", label: "商品编号", value: "", disabled: true },
    { type: "input", name: "itemName", label: "商品名称", value: "", disabled: true },
    { type: "input", name: "specification", label: "商品规格", value: "", disabled: true },
    { type: "input", name: "categoryName", label: "商品大类", value: "", disabled: true },
    { type: "input", name: "manufacturerName", label: "生产厂家", value: "", disabled: true },
    { type: "input", name: "productionPlace", label: "产地", value: "", disabled: true },
    { type: "input", name: "approvalNumber", label: "批准文号", value: "", disabled: true },
    { type: "input", name: "itemHealthListedLicensor", label: "上市许可持有人", value: "", disabled: true },
    { type: "input", name: "uom", label: "单位", value: "", disabled: true },
    { type: "input", name: "qtyNew", label: "包装数量", value: "", disabled: true },
  ];
}
