Blame view

ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiSomeContainer.vue 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<template>
  <!-- 定义在这里的参数都是不可在外部覆盖的,防止出现问题 -->
  <j-select-biz-component
    :value="value"
    :multiple="false"
    :ellipsisLength="25"
    :listUrl="url.list"
    :columns="columns"
    v-on="$listeners"
    v-bind="attrs"
  />
</template>

<script>
import JDate from '@comp/jeecg/JDate'
import JSelectBizComponent from './JSelectBizComponent'

export default {
  name: 'JSelectMultiSomeContainer',
  components: {JDate, JSelectBizComponent},
  props: {
    value: null, // any type
    queryConfig: {
      type: Array,
      default: () => []
    },
  },
  data() {
    return {
30
      url: {list: '/inventory/inventoryDetail/queryPageListList'},
31
      columns: [
肖超群 authored
32
        {title: this.$t('config.contianer'), align: 'center', dataIndex: 'containerCode'},
33
        {title: this.$t('config.location'), align: 'center', width: '15%', dataIndex: 'locationCode'},
34
        {
35
          title: this.$t('config.zone'), align: 'center', width: '15%', dataIndex: 'zoneCode', key: 'zoneCode',
36
37
          scopedSlots: {customRender: 'zoneCode'}
        },
38
39
40
        {title: this.$t('config.materialCode'), align: 'center', width: '15%', dataIndex: 'materialCode'},
        {title: this.$t('config.materialName'), align: 'center', width: '15%', dataIndex: 'materialName'},
        {title: this.$t('config.materialNumber'), align: 'center', width: '15%', dataIndex: 'qty'},
41
42
43
      ],
      // 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件
      default: {
44
        name: this.$t('config.container'),
谭毅彬 authored
45
        width: 1250,
46
47
        displayKey: 'containerCode',
        returnKeys: ['id', 'containerCode'],
48
        queryParamText: this.$t('config.inputContainerCode'),
49
50
51
52
      },
      // 多条件查询配置
      queryConfigDefault: [
        {
肖超群 authored
53
          key: 'materialCode',
54
          label: this.$t('config.materialCode'),
pengyongcheng authored
55
          placeholder: this.$t('config.inputMaterialCode')
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
        },
      ],
    }
  },
  computed: {
    attrs() {
      return Object.assign(this.default, this.$attrs, {
        queryConfig: this.queryConfigDefault.concat(this.queryConfig)
      })
    }
  }
}
</script>

<style lang="less" scoped></style>