|
|
@@ -24,7 +24,7 @@
|
|
24
|
24
|
|
|
25
|
25
|
<!-- 订单详情视图 -->
|
|
26
|
26
|
<OrderDetailView :order-detail="orderDetail" :top-info="topInfo" :order-id="orderId"
|
|
27
|
|
- :current-receipt="currentReceipt" />
|
|
|
27
|
+ :current-receipt="currentReceipt" @price-updated="refreshCurrentReceipt" />
|
|
28
|
28
|
|
|
29
|
29
|
<!-- 加一单模态窗 -->
|
|
30
|
30
|
<u-modal :show="addOneModalVisible" title="加一单" showCancelButton @cancel="handleAddOneCancel"
|
|
|
@@ -173,6 +173,24 @@ export default {
|
|
173
|
173
|
},
|
|
174
|
174
|
|
|
175
|
175
|
/**
|
|
|
176
|
+ * 刷新当前收单(用于价格等修改后同步顶部信息)
|
|
|
177
|
+ */
|
|
|
178
|
+ async refreshCurrentReceipt() {
|
|
|
179
|
+ if (!this.currentReceipt || !this.currentReceipt.id) return
|
|
|
180
|
+ try {
|
|
|
181
|
+ const res = await uni.$u.api.getReceiptForm(this.currentReceipt.id)
|
|
|
182
|
+ if (res.code === 200 && res.data) {
|
|
|
183
|
+ this.currentReceipt = res.data
|
|
|
184
|
+ this.topInfo.brand = res.data.brand || '暂无'
|
|
|
185
|
+ this.topInfo.model = res.data.model || '暂无'
|
|
|
186
|
+ this.topInfo.price = res.data.sellingPrice ?? '暂无'
|
|
|
187
|
+ }
|
|
|
188
|
+ } catch (error) {
|
|
|
189
|
+ console.error('刷新当前收单失败:', error)
|
|
|
190
|
+ }
|
|
|
191
|
+ },
|
|
|
192
|
+
|
|
|
193
|
+ /**
|
|
176
|
194
|
* 点击收单项
|
|
177
|
195
|
*/
|
|
178
|
196
|
async handleReceiptClick(item) {
|