|
@@ -40,6 +40,7 @@ |
|
@@ -40,6 +40,7 @@ |
|
40
|
import CardList from '@/components/card/index.vue'
|
40
|
import CardList from '@/components/card/index.vue'
|
|
41
|
import { customerQueryApi } from '@/api/devManage.js'
|
41
|
import { customerQueryApi } from '@/api/devManage.js'
|
|
42
|
import { userSelector } from '@/api/system/user.js'
|
42
|
import { userSelector } from '@/api/system/user.js'
|
|
|
|
43
|
+import { listCanRevokeOrChangeOrderInfo } from '@/api/order_list.js'
|
|
43
|
|
44
|
|
|
44
|
export default {
|
45
|
export default {
|
|
45
|
name: 'RelateSelectSheet',
|
46
|
name: 'RelateSelectSheet',
|
|
@@ -52,6 +53,8 @@ export default { |
|
@@ -52,6 +53,8 @@ export default { |
|
52
|
// 如果未提供 fetchFn,可通过 source 指定内置数据源:'customer' | 'user'
|
53
|
// 如果未提供 fetchFn,可通过 source 指定内置数据源:'customer' | 'user'
|
|
53
|
source: { type: String, default: '' },
|
54
|
source: { type: String, default: '' },
|
|
54
|
fetchFn: { type: Function, default: null },
|
55
|
fetchFn: { type: Function, default: null },
|
|
|
|
56
|
+ // 为内置数据源传递额外参数,如 { queryType: 'CHANGE' }
|
|
|
|
57
|
+ sourceExtra: { type: Object, default: () => ({}) },
|
|
55
|
pageSize: { type: Number, default: 10 },
|
58
|
pageSize: { type: Number, default: 10 },
|
|
56
|
multiple: { type: Boolean, default: false },
|
59
|
multiple: { type: Boolean, default: false },
|
|
57
|
rowKey: { type: String, default: 'id' },
|
60
|
rowKey: { type: String, default: 'id' },
|
|
@@ -108,6 +111,8 @@ export default { |
|
@@ -108,6 +111,8 @@ export default { |
|
108
|
open() {
|
111
|
open() {
|
|
109
|
this.$refs.popup && this.$refs.popup.open()
|
112
|
this.$refs.popup && this.$refs.popup.open()
|
|
110
|
this.$emit('update:visible', true)
|
113
|
this.$emit('update:visible', true)
|
|
|
|
114
|
+ // 合并外部传入的额外参数
|
|
|
|
115
|
+ this.listExtra = { ...this.listExtra, ...this.sourceExtra }
|
|
111
|
},
|
116
|
},
|
|
112
|
close() {
|
117
|
close() {
|
|
113
|
this.$refs.popup && this.$refs.popup.close()
|
118
|
this.$refs.popup && this.$refs.popup.close()
|
|
@@ -140,6 +145,17 @@ export default { |
|
@@ -140,6 +145,17 @@ export default { |
|
140
|
const hasNext = _data.hasNext || false
|
145
|
const hasNext = _data.hasNext || false
|
|
141
|
return { records, totalCount, hasNext }
|
146
|
return { records, totalCount, hasNext }
|
|
142
|
})
|
147
|
})
|
|
|
|
148
|
+ } else if (this.source === 'orderAssoc') {
|
|
|
|
149
|
+ // 订单关联表(可撤销/变更的订货单)
|
|
|
|
150
|
+ const queryType = (extra && extra.queryType) || ''
|
|
|
|
151
|
+ const params = { pageIndex, pageSize, orderNo: name, queryType }
|
|
|
|
152
|
+ return listCanRevokeOrChangeOrderInfo(params).then(res => {
|
|
|
|
153
|
+ const _data = res.data || {}
|
|
|
|
154
|
+ const records = _data.datas || _data.records || _data.list || []
|
|
|
|
155
|
+ const totalCount = _data.totalCount || _data.count || 0
|
|
|
|
156
|
+ const hasNext = _data.hasNext || false
|
|
|
|
157
|
+ return { records, totalCount, hasNext }
|
|
|
|
158
|
+ })
|
|
143
|
}
|
159
|
}
|
|
144
|
} catch (e) {
|
160
|
} catch (e) {
|
|
145
|
return Promise.resolve({ records: [], totalCount: 0, hasNext: false })
|
161
|
return Promise.resolve({ records: [], totalCount: 0, hasNext: false })
|
|
@@ -233,6 +249,6 @@ export default { |
|
@@ -233,6 +249,6 @@ export default { |
|
233
|
}
|
249
|
}
|
|
234
|
}
|
250
|
}
|
|
235
|
.row { display: flex; gap: 16rpx; margin-bottom: 12rpx; &:last-child { margin-bottom: 0; } }
|
251
|
.row { display: flex; gap: 16rpx; margin-bottom: 12rpx; &:last-child { margin-bottom: 0; } }
|
|
236
|
-.label { color: rgba(0,0,0,0.6); }
|
|
|
|
237
|
-.value { color: rgba(0,0,0,0.9); }
|
|
|
|
238
|
-</style> |
|
|
|
|
|
252
|
+.label { color: rgba(0,0,0,0.6); width: 150rpx; }
|
|
|
|
253
|
+.value { color: rgba(0,0,0,0.9); flex: 1; }
|
|
|
|
254
|
+</style> |