import { rcvTypeOptions } from "../../../../config/options";
import { upcloud_base_common,  } from "@/config/serviceSettings";

let grid = {
  labelCol: { span: 8 },
  wrapperCol: { span: 16 },
  span: 6
};
let ops = [...rcvTypeOptions];
ops.shift();

export const basicData = [
  { hidden: true, type: 'input', name: 'srcWarehouseId', label: 'srcWarehouseId', value: '', },
  { hidden: true, type: 'input', name: 'pieceQty', label: 'pieceQty', value: '1', },
  { hidden: true, type: 'input', name: 'caseQty', label: 'caseQty', value: '1', },
  { hidden: true, type: 'input', name: 'warehouseId', label: '仓库ID', value: '', },
  { hidden: true, type: 'input', name: 'orgnId', label: '部门id', value: '', },
  { hidden: true, type: 'input', name: 'vendorId', label: 'vendorId', value: '', },
  { hidden: true, type: 'input', name: 'mtlOwnerId', label: 'mtlOwnerId', value: '', },
  // { hidden: true, type: 'input', name: 'asnHeaderId', label: 'asnHeaderId', value: '', },
  { hidden: true, type: 'input', name: 'srcBillType', label: 'srcBillType', value: '', },
  { hidden: true, type: 'input', name: 'srcHeaderId', label: 'srcHeaderId', value: '', },
  { hidden: true, type: 'input', name: 'customerId', label: '客户id' },
  // { hidden: true, type: 'input', name: 'shipperZjm', label: '单位助记码', },

  // { type: 'input', name: '', label: '明细信息需要显示单价(含税)', value: '',  labelCol: { span: 8 },span: 6},
  // { type: 'input', name: '', label: '退货原因', value: '', placeholder: '', ...grid},
  // { type: 'input', name: '', label: '采购审核意见', value: '',placeholder: '', ...grid },

  { type: 'input', name: 'warehouseName', label: '仓库', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'asnHeaderId', label: '单据ID', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'autoBillNum', label: '自动单号', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'asnAutoBillNum', label: '单据编号', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'saleBillNo', label: '销售开票单号', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'saleBillType', label: '账期类型', value: '', disabled: true, placeholder: '', ...grid },
  // { type: 'input', name: 'department', label: '部门', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'bizUser', label: '业务员', value: '', disabled: true, placeholder: '', ...grid },
  { hidden: true, type: 'input', name: 'shipperZjm', label: '单位助记码', value: '', disabled: true, placeholder: '', ...grid },
  // {
  //   type: 'select', name: 'rcvType', label: '入库类型', value: '', disabled: true, placeholder: '', ...grid,
  //   options: ops
  // },
  {
    type: 'select', name: 'rcvType', label: '入库类型', value: '', disabled: true,
    remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=oms_asn_bill_type', method: 'post' },
    replaceFields: { value: 'dictCode', label: 'dictName' },
    ...grid
  },
  { type: 'input', name: 'refBilltype', label: '源单类型', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'customerNum', label: '客户编号', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'customerName', label: '客户名称', value: '', disabled: true, placeholder: '', ...grid },
  // { type: 'input', name: 'vendorNum', label: '客户编号', value: '', disabled: true, placeholder: '', ...grid },
  // { type: 'input', name: 'vendorName', label: '客户名称', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'customBillNum', label: '手工单号', value: '', placeholder: '', ...grid, },
  { type: 'input', name: 'department', label: '部门', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'date', name: 'shipArriveTime', format: 'YYYY-MM-DD', label: '到货日期', value: '', disabled: true, ...grid },
  { type: 'input', name: 'mtlOwnerName', label: '货主', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'srcAutoBillNum', label: '源单号', value: '', disabled: true, placeholder: '', ...grid },
  { hidden: true, type: 'input', name: 'buyerMane', label: '采购员', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'date', name: 'rcvDate', format: 'YYYY-MM-DD', label: '收货日期', value: '', required: true, ...grid },
  // { type: 'input', name: 'asnAutoBillNum', label: 'ASN单号', value: '', disabled: true, placeholder: '', ...grid },
  { type: 'input', name: 'asnRemark', label: '销售退回单备注', value: '', disabled: true, placeholder: '', ...grid },
  // {
  //   type: 'select', name: 'bldgId', label: '建筑物', value: '',
  //   remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=po_billh_arrivalmode', method: 'post' },
  //   replaceFields: { value: 'dictCode', label: 'dictName' },
  //   ...grid
  // },
  {
    type: 'select', name: 'returnType', label: '退货类型', value: '', placeholder: '', disabled: true,
    remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=rcv_return_type', method: 'post' },
    replaceFields: { value: 'dictCode', label: 'dictName' }, ...grid
  },
  {
    type: 'select', name: 'arrivalMode', label: '到货方式', value: '',
    remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=po_billh_arrivalmode', method: 'post' },
    replaceFields: { value: 'dictCode', label: 'dictName' },
    ...grid
  },
  { type: 'input', name: 'returnType', label: '退回类型', value: '', placeholder: '', hidden: true, ...grid },
  { type: 'input', name: 'executorUser', label: '收货员', value: '', placeholder: '', disabled: true, ...grid },
  { type: 'input', name: 'caozy', label: '开票员', value: '', placeholder: '', disabled: true, ...grid },
  { hidden: true, type: 'input', name: 'test1', label: '建筑物', value: '', placeholder: '', ...grid },
  { type: 'textarea', name: 'comments', label: '备注', value: '', span: 12, labelCol: { span: 4 }, wrapperCol: { span: 20}, }
  // { type: 'textarea', name: 'comments', label: '备注', value: '', span: 16, labelCol: { span: 3 }, wrapperCol: { span: 21 }, }
]
