cloudroam
2025-03-28 cef2bb0eeeb91a22860cf5d23c7348af1ba921dc
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<template>
  <el-bus-crud ref="crud" v-bind="tableConfig"></el-bus-crud>
</template>
 
<script>
import { getPartnerListConfig } from '@/utils/form-item-config'
export default {
  props: {
    value: {
      type: String,
      default: null,
    },
  },
  data() {
    return {
      tableConfig: {
        url: 'flower/api/warehouse/location/list/orders',
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        hasView: false,
        saveQuery: false,
        columns: [
          {
            label: '序号',
            type: 'index',
          },
          { label: '订单号', prop: 'orderNo' },
          { label: '下单人姓名', prop: 'customer' },
          { label: '下单人联系电话', prop: 'customerTel' },
          {
            label: '下单人地址',
            formatter: (row) =>
              `${row.customerProvince || ''}${row.customerCity || ''}${
                row.customerRegion || ''
              }${row.customerAddress || ''}`,
          },
          { label: '所属合伙人', prop: 'partnerName' },
        ],
        searchForm: [
          {
            type: 'row',
            items: [
              { label: '订单号', id: 'orderNo', type: 'input' },
              { ...getPartnerListConfig() },
            ],
          },
        ],
        extraButtons: [
          {
            text: '选择',
            show: (row) => this.value !== row.id,
            atClick: (row) => {
              this.$emit('input', row.id)
              return false
            },
          },
          {
            text: '已选择',
            disabled: () => true,
            show: (row) => this.value === row.id,
          },
        ],
      },
    }
  },
}
</script>