import { F4_APIgetList } from '@/store/action/Fstorehouse/F4check'

export const getPanDianListFu = async (back: (list: any[]) => void, resFu: (val: any) => any) => {
  // 获取盘点单列表
  const res = await F4_APIgetList({}, true)
  if (res.code === 0) {
    let list = res.data.records || []
    list = list.map((v: any) => ({ value: v.num, label: `${v.num} - ${v.storageName}` }))
    const listRes: any[] = resFu(list)
    back(listRes)
  }
}
export const G1moreList = (list: any[]) => {
  return [
    {
      name: '关联盘点',
      type: 'Select',
      key: 'oderNum',
      placeholder: '请搜索盘点申请编号',
      options: list
    },
    {
      name: '责任人',
      type: 'Input',
      key: 'userName'
    },
    {
      name: '事故经过',
      type: 'TextArea',
      key: 'process',
      full: true
    },

    {
      name: '事故前&emsp;<br/>藏品状态',
      type: 'TextArea',
      key: 'beforeInfo',
      full: true
    },
    {
      name: '事故后&emsp;<br/>藏品状态',
      type: 'TextArea',
      key: 'afterInfo',
      full: true
    },
    {
      name: '备注',
      type: 'TextArea',
      key: 'remark',
      full: true
    }
  ]
}
