|
|
@@ -20,88 +20,44 @@
|
|
20
|
20
|
</u-navbar>
|
|
21
|
21
|
|
|
22
|
22
|
<!-- 收单列表切换 -->
|
|
23
|
|
- <u-tabs
|
|
24
|
|
- keyName="brand"
|
|
25
|
|
- :list="receiptList"
|
|
26
|
|
- @click="handleReceiptClick"
|
|
27
|
|
- class="receipt-tabs"
|
|
28
|
|
- />
|
|
|
23
|
+ <u-tabs keyName="brand" :list="receiptList" @click="handleReceiptClick" class="receipt-tabs" />
|
|
29
|
24
|
|
|
30
|
25
|
<!-- 订单详情视图 -->
|
|
31
|
|
- <OrderDetailView
|
|
32
|
|
- :order-detail="orderDetail"
|
|
33
|
|
- :top-info="topInfo"
|
|
34
|
|
- :order-id="orderId"
|
|
35
|
|
- :current-receipt="currentReceipt"
|
|
36
|
|
- />
|
|
|
26
|
+ <OrderDetailView :order-detail="orderDetail" :top-info="topInfo" :order-id="orderId"
|
|
|
27
|
+ :current-receipt="currentReceipt" />
|
|
37
|
28
|
|
|
38
|
29
|
<!-- 加一单模态窗 -->
|
|
39
|
|
- <u-modal
|
|
40
|
|
- :show="addOneModalVisible"
|
|
41
|
|
- title="加一单"
|
|
42
|
|
- showCancelButton
|
|
43
|
|
- @cancel="handleAddOneCancel"
|
|
44
|
|
- @confirm="handleAddOneConfirm"
|
|
45
|
|
- >
|
|
|
30
|
+ <u-modal :show="addOneModalVisible" title="加一单" showCancelButton @cancel="handleAddOneCancel"
|
|
|
31
|
+ @confirm="handleAddOneConfirm">
|
|
46
|
32
|
<view class="add-one-modal-content">
|
|
47
|
33
|
<view class="add-one-form-item">
|
|
48
|
34
|
<text class="form-label">品牌<text class="required">*</text></text>
|
|
49
|
|
- <u-button
|
|
50
|
|
- type="primary"
|
|
51
|
|
- plain
|
|
52
|
|
- @click="showBrandSelector = true"
|
|
53
|
|
- class="brand-select-btn"
|
|
54
|
|
- >
|
|
|
35
|
+ <u-button type="primary" plain @click="showBrandSelector = true" class="brand-select-btn">
|
|
55
|
36
|
{{ currentAddBrand.dictLabel || '点击请选择品牌' }}
|
|
56
|
37
|
</u-button>
|
|
57
|
38
|
</view>
|
|
58
|
39
|
<view class="add-one-form-item">
|
|
59
|
40
|
<text class="form-label">型号</text>
|
|
60
|
|
- <u-input
|
|
61
|
|
- v-model="currentAddModel"
|
|
62
|
|
- placeholder="请输入型号"
|
|
63
|
|
- class="form-input"
|
|
64
|
|
- />
|
|
|
41
|
+ <u-input v-model="currentAddModel" placeholder="请输入型号" class="form-input" />
|
|
65
|
42
|
</view>
|
|
66
|
43
|
<view class="add-one-form-item">
|
|
67
|
44
|
<text class="form-label">价格</text>
|
|
68
|
|
- <u-input
|
|
69
|
|
- v-model="currentAddPrice"
|
|
70
|
|
- placeholder="请输入价格"
|
|
71
|
|
- type="number"
|
|
72
|
|
- class="form-input"
|
|
73
|
|
- />
|
|
|
45
|
+ <u-input v-model="currentAddPrice" placeholder="请输入价格" type="number" class="form-input" />
|
|
74
|
46
|
</view>
|
|
75
|
47
|
</view>
|
|
76
|
48
|
</u-modal>
|
|
77
|
49
|
|
|
78
|
50
|
<!-- 品牌选择器 -->
|
|
79
|
|
- <u-picker
|
|
80
|
|
- :show="showBrandSelector"
|
|
81
|
|
- :columns="brandColumns"
|
|
82
|
|
- keyName="dictLabel"
|
|
83
|
|
- @confirm="handleBrandConfirm"
|
|
84
|
|
- @cancel="showBrandSelector = false"
|
|
85
|
|
- />
|
|
|
51
|
+ <u-picker :show="showBrandSelector" :columns="brandColumns" keyName="dictLabel" @confirm="handleBrandConfirm"
|
|
|
52
|
+ @cancel="showBrandSelector = false" />
|
|
86
|
53
|
|
|
87
|
54
|
<!-- 编辑品牌选择器 -->
|
|
88
|
|
- <u-picker
|
|
89
|
|
- :show="editBrandSelectorVisible"
|
|
90
|
|
- :columns="brandColumns"
|
|
91
|
|
- keyName="dictLabel"
|
|
92
|
|
- @confirm="handleEditBrandConfirm"
|
|
93
|
|
- @cancel="editBrandSelectorVisible = false"
|
|
94
|
|
- />
|
|
|
55
|
+ <u-picker :show="editBrandSelectorVisible" :columns="brandColumns" keyName="dictLabel"
|
|
|
56
|
+ @confirm="handleEditBrandConfirm" @cancel="editBrandSelectorVisible = false" />
|
|
95
|
57
|
|
|
96
|
58
|
<!-- 修改型号/价格弹窗 -->
|
|
97
|
|
- <CustomModal
|
|
98
|
|
- :visible="modalVisible"
|
|
99
|
|
- :title="modalConfig.title"
|
|
100
|
|
- :value="modalConfig.value"
|
|
101
|
|
- :placeholder="modalConfig.placeholder"
|
|
102
|
|
- @cancel="handleModalCancel"
|
|
103
|
|
- @confirm="handleModalConfirm"
|
|
104
|
|
- />
|
|
|
59
|
+ <CustomModal :visible="modalVisible" :title="modalConfig.title" :value="modalConfig.value"
|
|
|
60
|
+ :placeholder="modalConfig.placeholder" @cancel="handleModalCancel" @confirm="handleModalConfirm" />
|
|
105
|
61
|
</view>
|
|
106
|
62
|
</template>
|
|
107
|
63
|
|
|
|
@@ -219,11 +175,18 @@ export default {
|
|
219
|
175
|
/**
|
|
220
|
176
|
* 点击收单项
|
|
221
|
177
|
*/
|
|
222
|
|
- handleReceiptClick(item) {
|
|
223
|
|
- this.currentReceipt = item
|
|
224
|
|
- this.topInfo.brand = item.brand || '暂无'
|
|
225
|
|
- this.topInfo.model = item.model || '暂无'
|
|
226
|
|
- this.topInfo.price = item.sellingPrice || '暂无'
|
|
|
178
|
+ async handleReceiptClick(item) {
|
|
|
179
|
+ console.log('点击了收单', item)
|
|
|
180
|
+ //获取当前的收单form详情
|
|
|
181
|
+ const res = await uni.$u.api.getReceiptForm(item.id)
|
|
|
182
|
+ console.log('收单详情', res)
|
|
|
183
|
+
|
|
|
184
|
+ if (res.code === 200) {
|
|
|
185
|
+ this.currentReceipt = res.data || {}
|
|
|
186
|
+ this.topInfo.brand = res.data.brand || '暂无'
|
|
|
187
|
+ this.topInfo.model = res.data.model || '暂无'
|
|
|
188
|
+ this.topInfo.price = res.data.sellingPrice || '暂无'
|
|
|
189
|
+ }
|
|
227
|
190
|
},
|
|
228
|
191
|
|
|
229
|
192
|
/**
|
|
|
@@ -349,7 +312,7 @@ export default {
|
|
349
|
312
|
uni.$u.toast('请选择品牌')
|
|
350
|
313
|
return
|
|
351
|
314
|
}
|
|
352
|
|
-
|
|
|
315
|
+
|
|
353
|
316
|
try {
|
|
354
|
317
|
await uni.$u.api.addReceiptForm({
|
|
355
|
318
|
brand: this.currentAddBrand.dictValue,
|
|
|
@@ -403,7 +366,7 @@ export default {
|
|
403
|
366
|
font-weight: bold;
|
|
404
|
367
|
color: #333;
|
|
405
|
368
|
font-size: 28rpx;
|
|
406
|
|
-
|
|
|
369
|
+
|
|
407
|
370
|
&.price {
|
|
408
|
371
|
color: blueviolet;
|
|
409
|
372
|
}
|
|
|
@@ -443,7 +406,7 @@ export default {
|
|
443
|
406
|
|
|
444
|
407
|
.add-one-form-item {
|
|
445
|
408
|
margin-bottom: 30rpx;
|
|
446
|
|
-
|
|
|
409
|
+
|
|
447
|
410
|
&:last-child {
|
|
448
|
411
|
margin-bottom: 0;
|
|
449
|
412
|
}
|