//客户选择
/**customer客户选择弹出查询配置 */
function setCustomer(obj = {}) {
    let vName = '人员'
    let code = 'person'
    let baseObject = { customercode: false, remoteData: {}, required: false, ...obj }
    const { name, targetValueKey, customercode, label, remoteData, search, ok, change, required } = baseObject
    return [
      {
        type: 'searchModal',
        label,
        targetClick: true,
        required,
        name: name || 'goodsresman',
        targetValueKey: code + 'Name',
        remoteData,
        remoteUrl: { url: '/api/oms-std-maindata/pubPerson/queryWindow', method: 'post' },
        tableConfig: {
          rowKey: code+'Id',
          columns: [
            {
              hidden: true,
              dataIndex: 'Id',
              title: 'Id'
            },
            {
              dataIndex: code + 'Code',
              title: vName + '编码'
            },
            {
              dataIndex: code + 'Name',
              title: vName + '名称'
            }
          ]
        },
        toolBar: {
          items: [
            {
              type: 'input',
              name: code + 'Code',
              label: vName + '编码',
              value: ''
            },
            {
              type: 'input',
              name: code + 'Name',
              label: vName + '名称',
              value: ''
            },
          ]
        },
        on: {
          change,
          search,
          ok
        }
      },
    //   { name: code + 'Code', required, label: vName + '编码', type: 'input', hidden: !customercode, disabled: true },
    //   { name: 'goodsresmanid', required, label: '药品责任人', type: 'input', hidden: true }
    ]
  }
  export default setCustomer
