From fa598c24625c2906eab9d9c7d0fe63450c1fba80 Mon Sep 17 00:00:00 2001 From: 2021 Date: Thu, 23 Sep 2021 16:52:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=94=AE=E5=90=8E=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/GoodsReturn/index.vue | 12 +-- pages/order/ReturnList/index.vue | 90 +++++---------------- pages/order/ReturnList/listItem.vue | 121 ++++++++++++++++++++++++---- utils/request.js | 4 +- 4 files changed, 138 insertions(+), 89 deletions(-) diff --git a/pages/order/GoodsReturn/index.vue b/pages/order/GoodsReturn/index.vue index 9db9751..7264110 100644 --- a/pages/order/GoodsReturn/index.vue +++ b/pages/order/GoodsReturn/index.vue @@ -154,6 +154,7 @@ export default { serviceType: null, // 选中售后商品 selectProduct: [], + productParamList: [], totalNum: 0, totalMoney: 0, isAllSelect: false @@ -237,7 +238,11 @@ export default { chooseType (val) { this.selectProduct = this.selectProduct.map(item => { if (item.checked) { - this.totalMoney += parseFloat(item.costPrice) + this.productParamList.push({ + productId: item.productId + }) + console.log(item.costPrice) + this.totalMoney += parseFloat(item.truePrice) this.totalNum += 1 return item } @@ -255,16 +260,13 @@ export default { }); return } - // this.listquery.productParamList.push({ - // productId: item.productId - // }) submitAfterSealsOrder({ orderCode: this.orderInfo.orderId, serviceType: this.serviceType, reasonForApplication: this.reason, applicationInstructions: refund_reason_wap_explain, applicationDescriptionPicture: this.refund_reason_wap_img.join(","), - productParamList: [] + productParamList: this.productParamList }).then(res => { if (res.status === 200) { uni.showToast({ diff --git a/pages/order/ReturnList/index.vue b/pages/order/ReturnList/index.vue index 89b3970..25f25ca 100644 --- a/pages/order/ReturnList/index.vue +++ b/pages/order/ReturnList/index.vue @@ -13,45 +13,13 @@ - - - - - 订单号:{{ order.orderId || '' }} - - - - - - - {{ cart.productInfo.storeName }} - x {{ cart.cartNum }} - - {{ cart.productInfo.attrInfo.sku }} - {{ cart.productInfo.storeName }} - ¥{{ cart.productInfo.price }} - - - - 共{{ order.cartInfo.length || 0 }}件商品,总金额 - ¥{{ order.payPrice || 0 }} - - + + + @@ -78,9 +46,10 @@ export default { orderList: [], listQuery: { page: 1, - limit: 20, + limit: 5, type: 0 }, + type: 0, loading: false, loaded: false }; @@ -92,44 +61,29 @@ export default { !this.loading && this.getOrderList(); }, methods: { - goGoodsCon(cart) { - this.$yrouter.push({ - path: "/pages/shop/GoodsCon/index", - query: { id: cart.productInfo.id } - }); - }, - goOrderDetails(order) { - this.$yrouter.push({ - // path: "/pages/order/OrderReturnDetail/index", - path: "/pages/order/OrderDetails/index", - query: { id: order.orderId } - }); - }, + // 售后详情 getOrderList() { - const { page, limit } = this; - if (this.loading || this.loaded) return; + if ((this.loading || this.loaded) && (this.type === this.listQuery.type)) return; this.loading = true; - // getOrderList({ - // page, - // limit, - // type: -3 - // }).then(res => { - // this.orderList = this.orderList.concat(res.data); - // this.loading = false; - // this.loaded = res.data.length < limit; - // this.page++; - // }); // 售后接口 getAfterSealsList(this.listQuery).then(res => { // console.log(res) - this.orderList = this.orderList.concat(res.data); + if (this.type === this.listQuery.type) { + this.orderList = [...this.orderList, ...res.data]; + } else { + this.orderList = res.data; + this.type = this.listQuery.type + } + this.listQuery.page++; + // 加载组件 this.loading = false; - this.loaded = res.data.length < limit; - this.page++; + this.loaded = res.data.length < this.listQuery.limit;// 查询到末尾 }) }, + // 分类查询 changeType (type) { this.listQuery.type = type + this.listQuery.page = 1; this.getOrderList() } } diff --git a/pages/order/ReturnList/listItem.vue b/pages/order/ReturnList/listItem.vue index 984cc50..41b1510 100644 --- a/pages/order/ReturnList/listItem.vue +++ b/pages/order/ReturnList/listItem.vue @@ -3,41 +3,79 @@ - {{ 'YSHOP商铺' }} - - - 审核中 + 订单号:{{ item.orderCode }} - - + + - 工装裤男秋冬季韩版潮流潮牌ins直筒宽松阔腿休闲百搭加绒长裤子 + {{ i.productInfo.storeName }} - 黑色 XL + {{ i.productInfo.attrInfo.sku || '' }} x {{ 1 }} - 退款:¥299.00 + 退款: + ¥{{ i.productInfo.price }} + - + + 审核中 + + + 退款: + ¥{{ item.refundAmount }} + + - + 删除记录 + 查看详情 diff --git a/utils/request.js b/utils/request.js index 1a86e9d..a375a1a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -22,12 +22,12 @@ fly.config.baseURL = VUE_APP_API_URL // 小程序测试请求域名 // #ifdef MP-WEIXIN -fly.config.baseURL = 'http://347i13244b.zicp.vip/api' +fly.config.baseURL = 'http://29e25012l6.qicp.vip/api' // #endif // #ifdef APP-PLUS // app端 -fly.config.baseURL = 'http://347i13244b.zicp.vip/api' +fly.config.baseURL = 'http://29e25012l6.qicp.vip/api' // #endif fly.interceptors.response.use(