const ConditionCustom = function(that) {
  return [
    {
      type: 'input',
      name: 'condition',
      label: '查询条件',
      span: 8,
      placeholder: '请输入名称/编码/助记码',

      value: ''
    },
    {
      type: 'buttonGroup',
      style: { textAlign: 'center' },
      span: 8,
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          // htmlType: '',
          on: {
            click(event, form) {
              //   console.log(that.cargoOwner.cargoOwnerId, that.warehouse.warehouseId)
              // that.cargoOwner.cargoOwnerId
              let data = {}
              that.$refs.CargoownerWH.form.validateFields((err, value) => {
                if (!err) {
                  console.log(value)
                  data.cargoOwnerId = value.cargoOwnerId
                  data.warehouseId = value.warehouseId
                  data.condition = form.getForm().getFieldsValue().condition
                  console.log(data)
                  that.remoteParams = data
                }
              })

              //   getFieldValue

              //   console.log(form.getForm().getFieldsValue(), data)
            }
          }
        },
        {
          value: '重置',
          name: 'ccz',
          icon: 'redo',
          on: {
            click(event, form) {
              // form.hiddenItem('field-number')
              console.log(form)
              // console.log(form.getForm().resetFields())
              that.$refs.CargoownerWH.resetFields()
              form.getForm().resetFields()
            }
          }
        }
      ]
    }
  ]
}

export default ConditionCustom
