/*
 * @Date: 2022-09-19 09:00:08
 * @LastEditors: 陈禹琨 cyk910622@163.com
 * @LastEditTime: 2022-09-23 09:24:45
 * @FilePath: \upcloud-wms-hnsy-web\src\views\kzyWMS\inBound\quality\recheckEditor\config\detail\index.js
 * @Description: cyk
 */
import { basicData } from "./basic-data";
import { extendFormItems } from "./extend";
import { operateFormItems } from "./operate";
import { packingColumns } from "./packing";

export function detailConfig(self) {
  return [
    {
      key: "one",
      checkedKey: "main",
      height: "120px",
      btns: [
        {
          label: "提取单据",
          click() {
            self.visible = true;
          },
        },
        {
          label: "保存",
          click() {
            self.submitData();
          },
        },
      ],
      list: [
        {
          key: "main",
          tab: "主要信息",
          item: { type: "p-grid-form", config: basicData },
        },
        // {
        //   key: "extend",
        //   tab: "次要信息",
        //   item: { type: "p-grid-form", config: extendFormItems },
        // },
        // {
        //   key: 'operate',
        //   tab: '操作信息',
        //   item: { type: 'p-grid-form', config: operateFormItems }
        // }
      ],
    },
    {
      key: "two",
      checkedKey: "list",
      list: [
        {
          key: "list",
          tab: "商品明细",
          item: {
            type: "p-table-sheet",
            rowKey: "taskRecheckId",
            rowSelectType: 2,
            config: packingColumns(self),
            colChange({ record, name, value }) {},
          },
        },
      ],
    },
  ];
}
