diff --git a/src/pageB/user_order/conponents/order-item.vue b/src/pageB/user_order/conponents/order-item.vue
index 9a065d0..3022a0b 100644
--- a/src/pageB/user_order/conponents/order-item.vue
+++ b/src/pageB/user_order/conponents/order-item.vue
@@ -1,35 +1,43 @@
-
+
- 订单编号:12345678954565
- 发货中
+ 订单编号:{{goods.sn}}
+ {{goods.status |payStatusText}}
-
+
-
+
- 商品名称商品名称商品名称商品商品名称商品名称商品名称商品商品名称商品名称商品名称商品
+ {{ite.name}}
- x 20
+ x {{ite.quantity}}
- 2022-2-15
- 共件5 应付总额:¥8888
+ {{goods.created_date}}
+ 共件{{total}} 应付总额:¥{{goods.total_amount}}
diff --git a/src/pageB/user_order/index.vue b/src/pageB/user_order/index.vue
index dd1ba3e..40f66fb 100644
--- a/src/pageB/user_order/index.vue
+++ b/src/pageB/user_order/index.vue
@@ -1,32 +1,82 @@
-
+
手机号:
-
+
+
-
+
+
@@ -34,4 +84,9 @@
.badge {
@apply bg-badge;
}
+ .suspension {
+ top:0;
+ // #ifdef H5
+ top: 44px // #endif
+ }
diff --git a/src/pageB/user_select_pro/index.vue b/src/pageB/user_select_pro/index.vue
index 7bec35b..a382566 100644
--- a/src/pageB/user_select_pro/index.vue
+++ b/src/pageB/user_select_pro/index.vue
@@ -1,30 +1,29 @@
-
+
+
-
+
- 商品名称商品名称商品名称商品商品名称商品名称商品名称商品商品名称商品名称商品名称商品
+ {{item.name}}
待提货
- x 20
+ x {{item.remain_quantity}}
已提货
- x 20
+ x {{item.quantity*1-item.remain_quantity*1}}
-
+
本次提货
-
+
@@ -32,11 +31,16 @@
-
-
- 提货
+
+
+
+ 提货
+
+
@@ -44,17 +48,65 @@
export default {
data() {
return {
- list: [{}, {}]
+ modeShow: false,
+ id: '',
+ isFirstLoading: true,
+ order: {},
};
+ },
+ onLoad({
+ id
+ }) {
+ this.id = id
+ this.getDate()
+ },
+ computed: {
+ //需要提货的商品
+ pickGoods() {
+ return this.order?.products?.filter(item => item.amount) ?? []
+ }
+ },
+ methods: {
+ async getDate() {
+ try {
+ const resDate = await this.$api.get(`/v1/order/underline/${this.id}`)
+ this.order = resDate
+ } catch (err) {} finally {
+ this.isFirstLoading = false
+ }
+ },
+ onSubmit() {
+ this.pickGoods.length == 0 ? this.$u.toast('请至少选择一个商品提货') : this.modeShow = true
+ },
+ //更新
+ update(e) {
+ this.order.products = [...this.order.products]
+ },
+ async confirm() {
+ try {
+ const arr = this.pickGoods.map(item => {
+ return {
+ amount: item.amount,
+ id: item.id
+ }
+ })
+ await this.$api.post(`/v1/order/underline/${this.id}/package`, {
+ products: arr
+ })
+ this.$u.toast('提货成功')
+ await this.getDate()
+ } catch (err) {}
+ }
}
}