/*
 * @Date: 2022-07-04 15:59:20
 * @LastEditors: 陈禹琨 cyk910622@163.com
 * @LastEditTime: 2022-09-01 14:04:17
 * @FilePath: \upcloud-wms-hnsy-web\src\views\kzyWMS\inBound\receive\rcvEditor\config\detail\extend.js
 * @Description: cyk
 */
import { upcloud_base_wh_inbound, upcloud_base_common } from "@/config/serviceSettings";

let grid = {
  labelCol: { span: 8 },
  span: 6,
};

export const extendFormItems = [
  { hidden: true, type: "input", name: "rcvHeaderId", label: "rcvHeaderId", value: "", hidden: true },
  { hidden: true, type: "input", name: "srcMtlOwnerName", label: "srcMtlOwnerName", value: "", hidden: true },
  { hidden: true, type: "input", name: "srcMtlOwnerNum", label: "srcMtlOwnerNum", value: "", hidden: true },
  // { type: 'input', name: 'mtlOwnerName', label: 'mtlOwnerName', value: '', hidden: true, },
  { hidden: true, type: "input", name: "mtlOwnerNum", label: "mtlOwnerNum", value: "", hidden: true },

  { hidden: true, type: "input", name: "deliveryMan", label: "送货人", value: "", disabled: true, ...grid },
  { hidden: true, type: "input", name: "deliveryNum", label: "送货单号", value: "", disabled: true, ...grid },
  { hidden: true, type: "input", name: "deliveryDate", label: "送货时间", value: "", disabled: true, ...grid },

  {
    hidden: true,
    type: "input",
    name: "shipFromAdd",
    label: "发运地点",
    value: "",
    // required: true,
    disabled: true,
    ...grid,
  },
  {
    hidden: true,
    type: "select",
    name: "shipType",
    label: "运输方式",
    value: "",
    autoLoad: true,
    ...grid,
    // required: true,
    remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=transport_mode", method: "post" },
    replaceFields: {
      value: "dictCode",
      label: "dictName",
    },
  },
  {
    hidden: true,
    type: "input",
    name: "carriername",
    label: "运输单位",
    value: "",
    ...grid,
    // required: true,
    // autoLoad: true, remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=transport_agency', method: 'post' },
    // replaceFields: {
    //     value: 'dictCode',
    //     label: 'dictName'
    // },
  },
  {
    hidden: true,
    type: "input",
    name: "transportationParty",
    label: "运输方",
    value: "",
    // required: true,
    disabled: true,
    ...grid,
  },
  {
    hidden: true,
    type: "number",
    name: "onPassageDays",
    label: "在途时限",
    value: "",
    // required: true,
    min: 0,
    ...grid,
  },
  {
    hidden: true,
    type: "date",
    name: "shipFromDate",
    label: "起运时间",
    value: "",
    // required: true,
    format: "YYYY-MM-DD",
    ...grid,
  },
  /* 分割 */
  { hidden: true, type: "row", name: "xxxxxxxxxx", label: "", value: "", labelCol: { span: 0 }, span: 24 },
  /* 分割 */
  {
    type: "date",
    name: "shipDate",
    label: "启运时间",
    value: "",
    required: true,
    showTime: true,
    format: "YYYY-MM-DD HH:mm",
    ...grid,
  },
  {
    type: "date",
    name: "shipArriveTime",
    label: "到货时间",
    value: "",
    required: true,
    showTime: true,
    format: "YYYY-MM-DD HH:mm",
    ...grid,
  },
  {
    type: "select",
    name: "tempcontrolMode",
    label: "温控方式",
    value: "",
    autoLoad: true,
    ...grid,
    required: true,
    remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=tempcontrol_mode", method: "post" },
    replaceFields: {
      value: "dictCode",
      label: "dictName",
    },
  },
  {
    type: "input",
    name: "deviceNo",
    label: "到货温度设备号",
    value: "",
    required: true,
    /* disabled: true, */ ...grid,
  },
  {
    type: "number",
    name: "shipTemPerature",
    label: "启运温度",
    value: "",
    required: true /* precision: 0, */,
    /* disabled: true, */ ...grid,
  },
  {
    type: "number",
    name: "shipArriveTemPerature",
    label: "到货温度",
    value: "",
    required: true /* precision: 0, */,
    /* disabled: true, */ ...grid,
  },
  {
    type: "select",
    name: "tempcontrolStatus",
    label: "温控状态",
    value: "",
    autoLoad: true,
    ...grid,
    required: true,
    remoteUrl: { url: upcloud_base_common + "/dict/listbytype?dicttypeCodes=tempcontrol_status", method: "post" },
    replaceFields: {
      value: "dictCode",
      label: "dictName",
    },
  },
];
