From 518099de44b9b8ec63afbfcb3626957548e3479a Mon Sep 17 00:00:00 2001 From: fanfan Date: Wed, 28 Feb 2024 21:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BB=B7=E5=8F=8A=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 4 +- pages/news/recycling/confirm1.vue | 5 +- pages/news/recycling/order.vue | 2 +- pages/news/recycling/recoveryList.vue | 78 ++++++++++++++++++++++-- pages/news/recycling/timer.vue | 2 +- pages/news3/components/category.vue | 20 ++++-- pages/news3/vipPrice.vue | 88 +++++++++++++++++---------- pages/user/index.vue | 2 +- 8 files changed, 151 insertions(+), 50 deletions(-) diff --git a/pages.json b/pages.json index 9d78845..9934217 100644 --- a/pages.json +++ b/pages.json @@ -683,13 +683,13 @@ },{ "path": "recycling/recoveryList", "style": { - "navigationBarTitleText": "我的订单", + "navigationBarTitleText": "回收订单", "enablePullDownRefresh": false } },{ "path": "recycling/orderList", "style": { - "navigationBarTitleText": "我的订单", + "navigationBarTitleText": "服务订单", "enablePullDownRefresh": true } },{ diff --git a/pages/news/recycling/confirm1.vue b/pages/news/recycling/confirm1.vue index a43014b..e08b653 100644 --- a/pages/news/recycling/confirm1.vue +++ b/pages/news/recycling/confirm1.vue @@ -143,7 +143,7 @@ 免支付预购 - 提交订单 + {{source==2?'修改':'提交'}}订单 - 立即预约 + 修改预约 diff --git a/pages/news/recycling/recoveryList.vue b/pages/news/recycling/recoveryList.vue index be44fa8..0a02a25 100644 --- a/pages/news/recycling/recoveryList.vue +++ b/pages/news/recycling/recoveryList.vue @@ -50,12 +50,16 @@ - 修改订单 - 取消订单 + 修改订单 + + 取消订单 + 完成 + 验收 + 确认收款 @@ -81,9 +85,11 @@ total: 1, order_no: "", pageNum: 1, + userInfo: '' } }, onLoad(o) { + this.userInfo = uni.getStorageSync('userInfo') if (o.type) { this.classifyShow = o.type } @@ -143,6 +149,70 @@ } }) } + // 店长验收 + if (i == 5) { + uni.showModal({ + title: "温馨提示", + content: "是否验收该订单?", + confirmColor: "#F21A1C", + complete(res) { + if (res.confirm) { + that.toCheck(index, a.order_id); + } + } + }) + } + // 用户确认收款 + if (i == 6) { + uni.showModal({ + title: "温馨提示", + content: "是否确认收款?", + confirmColor: "#F21A1C", + complete(res) { + if (res.confirm) { + that.toCollection(index, a.order_id); + } + } + }) + } + }, + //完成验收 + async toCheck(index, order_id) { + const { + status, + message, + data + } = await newFunApi.completeOrder({ + order_id + }); + if (status == 200) { + uni.showToast({ + title: "验收成功" + }) + this.classifyShow = 2 + this.pageNum = 1; + this.goodsList = [] + this.getOrderList(1) + } + }, + //确认收款 + async toCollection(index, order_id) { + const { + status, + message, + data + } = await newFunApi.completeOrder({ + order_id + }); + if (status == 200) { + uni.showToast({ + title: "收款成功" + }) + this.classifyShow = 2 + this.pageNum = 1; + this.goodsList = [] + this.getOrderList(1) + } }, //完成订单 async toComplete(index, order_id) { diff --git a/pages/news/recycling/timer.vue b/pages/news/recycling/timer.vue index 2d00512..f2b88a5 100644 --- a/pages/news/recycling/timer.vue +++ b/pages/news/recycling/timer.vue @@ -54,7 +54,7 @@ } = await newFunApi.updateOrder(this.infor); if (status == 200) { uni.reLaunch({ - url: "/pages/news/recycling/orderList" + url: "/pages/news/recycling/recoveryList" }) } }, diff --git a/pages/news3/components/category.vue b/pages/news3/components/category.vue index 601b033..22df0f0 100644 --- a/pages/news3/components/category.vue +++ b/pages/news3/components/category.vue @@ -33,7 +33,7 @@ props: { tabList: Array, //自定义属性的值:数据类型 activeIndex: Array, - categoryId: String || Number + categoryId: String || Number, }, data() { return { @@ -47,6 +47,9 @@ this.activeIndex = [] }, getShop(item, category_id) { + if (uni.getStorageSync('list').indexOf(category_id) > -1) { + return this.$toast('此分类已被设置规则') + } let arrIndex = this.activeIndex.indexOf(category_id) if (arrIndex > -1) { this.activeIndex.splice(arrIndex, 1) @@ -57,18 +60,25 @@ }, submit() { let idList = []; - let nameList = [] this.tabList.forEach(item => { if (this.activeIndex.indexOf(item.category_id) > -1) { idList.push(item.category_id); - nameList.push(item.name) } }); + let storage = uni.getStorageSync('list') || [] + if (storage.length > 0 && idList.length > 0) { + idList = this.getArrDifference(idList, storage) + } this.$emit('getChoseCategory', { - category_id: idList.join(','), - category_name: nameList.length > 1 ? nameList.join(',') + '等' : nameList.join(',') + category_id: idList, }) + }, + getArrDifference(arr1, arr2) { + return arr1.concat(arr2).filter(function(v, i, arr) { + return arr.indexOf(v) === arr.lastIndexOf(v); + }); + } } } diff --git a/pages/news3/vipPrice.vue b/pages/news3/vipPrice.vue index 79e9ba8..c68db81 100644 --- a/pages/news3/vipPrice.vue +++ b/pages/news3/vipPrice.vue @@ -6,6 +6,16 @@ 利润空间(元) + + + + + 新增分类模板 + + + - + 删除分类模板 + + @@ -48,15 +58,8 @@ - - - + - 新增分类模板 - - - - - 删除分类模板 - + + 备注:利润低于_元的商品不展示在商城里。 @@ -69,7 +72,6 @@