/*
 * @Date: 2023-05-08 21:51:53
 * @LastEditors: 陈禹琨 chenyukun@prolog-int.com
 * @LastEditTime: 2023-06-12 15:01:05
 * @FilePath: /upcloud-wms-henanyiyao-web/src/views/kzyWMS/inBound/printLibrary/printReceipt/config/detail/basic-data.js
 * @Description: cyk
 */
import moment from "moment";
let grid = {
  labelCol: { span: 6 },
  span: 10,
};
import { genWarehouseAuthSearchModal, genCargoownerAuthSearchModal } from "../../../../../SearchModal";

export const basicData = function (self) {
  return {
    searchItems: [
      ...genWarehouseAuthSearchModal(1, true, false, null, null, grid),
      ...genCargoownerAuthSearchModal(1, true, false, null, null, grid, { mapper: { cargoOwnerId: "mtlOwnerId" } }),
      { type: "input", name: "billNo", label: "ASN单号", value: "", ...grid },
      { type: "input", name: "rcvNo", label: "收货单号", value: "", ...grid },
      { type: "input", name: "shipperZjm", label: "单位助记码", value: "", ...grid },
      {
        type: "date",
        name: "startTime",
        format: "YYYY-MM-DD",
        label: "开始日期",
        value: moment().subtract(1, "week").format("YYYY-MM-DD"),
        ...grid,
      },
      {
        type: "date",
        name: "endTime",
        format: "YYYY-MM-DD",
        label: "结束日期",
        value: moment().format("YYYY-MM-DD"),
        ...grid,
      },
      {
        type: "select",
        name: "printStatus",
        label: "打印状态",
        value: "",
        options: [
          {
            label: "未打印",
            value: "0",
          },
          {
            label: "已打印",
            value: "1",
          },
        ],
        ...grid,
      },
    ],
    columns: [
      { hidden: true, title: "rqcHeaderId", dataIndex: "rqcHeaderId", key: "rqcHeaderId" },
      { hidden: true, title: "rcvHeaderId", dataIndex: "rcvHeaderId", key: "rcvHeaderId" },
      { title: "ASN单号", dataIndex: "asnBillNo", key: "asnBillNo", width: 90 },
      { title: "收货单号", dataIndex: "rcvBillNo", key: "rcvBillNo", width: 90 },
      { title: "日期", dataIndex: "rcvDate", key: "rcvDate", width: 90, hidden: true },
      { title: "业主编码", dataIndex: "mtlOwnerNum", key: "mtlOwnerNum", width: 90 },
      { title: "业主名称", dataIndex: "mtlOwnerName", key: "mtlOwnerName", width: 90 },
      { title: "单位编号", dataIndex: "vendorNum", key: "vendorNum", width: 90 },
      { title: "单位名称", dataIndex: "vendorName", key: "vendorName", width: 120 },
      { title: "单位助记码", dataIndex: "shipperZjm", key: "shipperZjm", width: 60 },
      { title: "采购员", dataIndex: "buyerMane", key: "buyerMane", width: 120 },
      { title: "收货员", dataIndex: "rcvUser", key: "rcvUser", width: 120 },
      { title: "验收员", dataIndex: "excuteUser", key: "excuteUser", width: 150 },
      { title: "操作员", dataIndex: "modifierName", key: "modifierName", width: 90 },
      // { title: "是否完成", dataIndex: "executorUser", key: "executorUser", width: 90 },
      { title: "备注", dataIndex: "remark", key: "remark", width: 140 },
      // { title: "联系人", dataIndex: "executorUser", key: "executorUser", width: 90 },
    ],
  };
};
