/*
 * @Date: 2022-07-04 15:59:20
 * @LastEditors: 陈禹琨 chenyukun@prolog-int.com
 * @LastEditTime: 2023-07-18 17:56:12
 * @FilePath: /upcloud-wms-henanyiyao-web/src/views/kzyWMS/inBound/receive/rcvEditor/config/detail/basic-data.js
 * @Description: cyk
 */
// import { rcvTypeOptions } from "../../../../config/options";
import { upcloud_base_wh_inbound, upcloud_base_common } from "@/config/serviceSettings";

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

export const basicData = function (self) {
  return [
    { 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: "categoryId", label: "categoryId", value: "" },
    { hidden: true, type: "input", name: "shipperZjm", label: "单位助记码" },
    { hidden: true, type: "input", name: "billno", label: "billno" },

    { type: "input", name: "warehouseName", label: "仓库", value: "", disabled: true, placeholder: "", ...grid },
    {
      hidden: true,
      type: "input",
      name: "asnHeaderId",
      label: "单据ID",
      value: "",
      disabled: true,
      placeholder: "",
      ...grid,
    },
    { type: "input", name: "asnAutoBillNum", label: "单据编号", value: "", disabled: true, placeholder: "", ...grid },
    { type: "input", name: "autoBillNum", label: "自动单号", value: "", disabled: true, placeholder: "", ...grid },
    {
      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: "needDept", label: "要货部门", value: "", disabled: true, placeholder: "", ...grid },
    { type: "input", name: "needUser", label: "要货业务员", value: "", disabled: true, placeholder: "", ...grid },
    { type: "input", name: "agent", 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 HH:mm", label: "到货日期", value: "", ...grid },
    { type: "input", name: "mtlOwnerName", label: "货主", value: "", disabled: true, placeholder: "", ...grid },
    { type: "input", name: "srcAutoBillNum", label: "源单号", value: "", disabled: true, placeholder: "", ...grid },
    { 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: "ASN单备注", value: "", disabled: true, placeholder: "", ...grid },
    {
      type: "input",
      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: "executorUser", label: "收货员", value: "", placeholder: "", disabled: true, ...grid },
    // { type: 'input', name: 'test1', label: '建筑物', value: '', placeholder: '', ...grid },

    // { type: 'textarea', name: 'comments', label: '备注', value: '', span: 24, labelCol: { span: 2 }, wrapperCol: { span: 22}, }
    { type: "textarea", name: "comments", label: "备注", value: "", ...grid },
    {
      hidden: true,
      type: "radio",
      name: "inventoryOpType",
      label: "是否转换代管",
      value: "0",
      ...grid,
      options: [
        { label: "是", value: "1" },
        { label: "否", value: "0" },
      ],
      on: {
        change(p1, p2) {
          self.checkDG(p1);
        },
      },
    },
  ];
};
