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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
| <template>
| <el-bus-crud v-bind="tableConfig" />
| </template>
|
| <script>
| import { dateRangeOptions } from '@/utils/options'
| import CustomDateRange from '@/components/custom-date-range.vue'
| export default {
| data() {
| return {
| tableConfig: {
| url: 'flower/api/settlement/list',
| hasNew: false,
| hasEdit: false,
| hasDelete: false,
| hasExport: true,
| exportUrl: 'flower/api/settlement/export',
| onResetView: (row) => {
| this.$router.push(`${this.$route.path}/${row.id}`)
| },
| operationAttrs: {
| width: 120,
| fixed: 'right',
| },
| columns: [
| {
| label: '结算人',
| prop: 'userName',
| minWidth: 150,
| fixed: 'left',
| },
| {
| label: '结算金额(元)',
| prop: 'settlementAmount',
| minWidth: 120,
| fixed: 'left',
| },
| { label: '订单数量', prop: 'orderNum', minWidth: 100 },
| { label: '买家数量', prop: 'customerNum', minWidth: 100 },
| { label: '商品数量', prop: 'flowerNum', minWidth: 100 },
| { label: '结算合计(元)', prop: 'totalAmount', minWidth: 120 },
| { label: '结算均价(元)', prop: 'price', minWidth: 120 },
| { label: '降级扣款(元)', prop: 'checkFee', minWidth: 120 },
| { label: '缺货扣款(元)', prop: 'lackFee', minWidth: 120 },
| { label: '补货扣款(元)', prop: 'replaceFee', minWidth: 120 },
| { label: '售后理赔(元)', prop: 'salesFee', minWidth: 120 },
| { label: '服务费(元)', prop: 'serviceFee', minWidth: 120 },
| { label: '集货站运费(元)', prop: 'stationFee', minWidth: 120 },
| { label: '结算类型', prop: 'typeStr', minWidth: 120 },
| { label: '结算状态', prop: 'statusStr', minWidth: 120 },
| { label: '结算时间', prop: 'transferTime', minWidth: 180 },
| ],
| searchFormAttrs: {
| labelWidth: 'auto',
| },
| searchForm: [
| {
| type: 'row',
| items: [
| {
| label: '结算类型:',
| id: 'type',
| type: 'bus-radio',
| el: {
| hasAll: true,
| childType: 'el-radio-button',
| code: 'SETTLEMENT_TYPE',
| },
| default: '',
| span: 24,
| searchImmediately: true,
| },
| {
| label: '结算状态:',
| id: 'status',
| type: 'bus-radio',
| el: {
| hasAll: true,
| childType: 'el-radio-button',
| code: 'SETTLEMENT_STATUS',
| },
| default: '',
| span: 24,
| searchImmediately: true,
| },
| {
| label: '结算日期:',
| id: 'dateType',
| component: CustomDateRange,
| el: {
| options: dateRangeOptions,
| },
| searchImmediately: true,
| commonFormat: true,
| commonFormatProps: ['dateType', 'startDateStr', 'endDateStr'],
| span: 24,
| },
| { label: '结算人:', id: 'userName', type: 'input' },
| ],
| },
| ],
| extraButtons: [
| {
| text: '结算',
| show: (row) => row.status === 'PENDING' || row.status === 'FAILED',
| atClick: async (row) => {
| try {
| await this.$elBusUtil.confirm('确定要结算吗?')
| const { code } = await this.$elBusHttp.request(
| 'flower/api/settlement/list/transfer',
| {
| params: {
| id: row.id,
| },
| }
| )
| if (code === 0) {
| this.$message.success('结算成功')
| }
| } catch (e) {
| return false
| }
| },
| },
| ],
| },
| }
| },
| head() {
| return {
| title: '结算列表',
| }
| },
| }
| </script>
|
| <style lang="scss" scoped>
| ::v-deep {
| .el-bus-crud__filter__action {
| //display: none;
| }
| }
| </style>
|
|