From fe16bcfe65d2d5767f509f7368d897d3ee9d067f Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Mon, 22 Jun 2026 09:18:15 +0800 Subject: [PATCH] 1 --- pages/index/index.vue | 270 +++++++------ pages/myCenter/shopDetail.vue | 289 +++++++++++++- pages/shop/selfDeliveryOrderList.vue | 471 +++++++++++++++++++++++ pages/shop/transferDeliveryOrderList.vue | 183 +++++++++ 4 files changed, 1092 insertions(+), 121 deletions(-) create mode 100644 pages/shop/selfDeliveryOrderList.vue create mode 100644 pages/shop/transferDeliveryOrderList.vue diff --git a/pages/index/index.vue b/pages/index/index.vue index 8b7406b..84a6358 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -31,7 +31,7 @@ - + {{daichucan}} @@ -65,7 +65,7 @@ - + {{shopData.refundCount == undefined?0:shopData.refundCount}} @@ -80,7 +80,28 @@ 待回复差评 + + + {{shopData.shopDeliveryPendingCount == undefined?0:shopData.shopDeliveryPendingCount}} + + + 自配送订单 + + + + + {{shopData.transferDeliveryPendingCount == undefined?0:shopData.transferDeliveryPendingCount}} + + + 中转配送 + + + @@ -190,7 +211,8 @@ 请选择店铺 - + {{item.shop.shopName}} @@ -208,15 +230,16 @@ return { width: 0, currentIndex: 0, - businessStatus:1, - shop:{}, - areaList:[], + businessStatus: 1, + shop: {}, + shopConfig: {}, + areaList: [], shopList: [], - shopData:{}, - daixiaofei:0, - daichucan:0, - daiquhuo:0, - daisongda:0 + shopData: {}, + daixiaofei: 0, + daichucan: 0, + daiquhuo: 0, + daisongda: 0 } }, components: { @@ -228,11 +251,13 @@ this.indexInit() }, onLoad() { - + }, methods: { - indexInit(){ + indexInit() { let that = this + this.shopConfig = JSON.parse(uni.getStorageSync('area')).shop || {} + uni.getSystemInfo({ success: function(info) { that.width = info.screenWidth * 2; @@ -240,12 +265,13 @@ }); this.getData() this.getBusinessStatus() - if(!uni.getStorageSync('area')){ + if (!uni.getStorageSync('area')) { this.checkArea() } }, - checkArea(){ - this.NB.sendRequest("/auth/getShopByUser", {}, false, 'post', 'application/x-www-form-urlencoded').then((res) => { + checkArea() { + this.NB.sendRequest("/auth/getShopByUser", {}, false, 'post', 'application/x-www-form-urlencoded').then(( + res) => { if (res.code == 200) { this.areaList = res.result this.$refs.areaPopup.open() @@ -255,11 +281,11 @@ icon: 'none' }) } - + }) }, //获取营业状态 - getBusinessStatus(){ + getBusinessStatus() { this.NB.sendRequest("/app/shoptakeaway/getByShopId", { shopId: uni.getStorageSync('shopId') }, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { @@ -277,36 +303,38 @@ uni.hideLoading() }).catch((res) => {}) }, - onClickArea(item){ - - uni.setStorageSync('area',JSON.stringify(item)) + onClickArea(item) { + + uni.setStorageSync('area', JSON.stringify(item)) this.getBusinessStatus() this.getData() - + this.$refs.areaPopup.close() }, //更改营业状态 - updateStatus(){ + updateStatus() { let that = this; uni.showModal({ title: '提示', content: '要更改营业状态吗?', - success: function (res1) { + success: function(res1) { if (res1.confirm) { that.NB.sendRequest("/app/shoptakeaway/update", { shopId: uni.getStorageSync('shopId'), - status:that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' + status: that.businessStatus == "1" ? '0' : that.businessStatus == "0" ? + '1' : '2' }, false, 'post', 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { uni.showToast({ title: '更改成功', - icon:'none' + icon: 'none' }); - that.businessStatus = that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' + that.businessStatus = that.businessStatus == "1" ? '0' : that + .businessStatus == "0" ? '1' : '2' } else { uni.showToast({ title: res.message, - icon:'none' + icon: 'none' }); } uni.hideLoading() @@ -314,9 +342,9 @@ } } }); - + }, - goDetail(type,index) { + goDetail(type, index) { let url = '' switch (type) { case 'tj': @@ -328,53 +356,61 @@ case 'sp': url = '/pages/shop/goodsList' break; - case 'dp': - url = '' + case 'yy': + url = '/pages/myCenter/businessInfo' + break; + case 'sjxx': + url = '/pages/myCenter/shopDetail' + break; + case 'selfDelivery': + url = '/pages/shop/selfDeliveryOrderList' + break; + case 'transferDelivery': + url = '/pages/shop/transferDeliveryOrderList' break; case 'dd': url = '/pages/shop/shopOrderList' break; + case 'tui': + uni.navigateTo({ + url: '/pages/shop/shopReturnOrder?type=shop' + }) + break; case 'zd': url = '/pages/shop/shopBill' break; case 'pj': let item = { - shopScore:uni.getStorageSync('shopScore'), - id:uni.getStorageSync('shopId') + shopScore: uni.getStorageSync('shopScore'), + id: uni.getStorageSync('shopId') } - url = '/pages/shop/shopEvaluate?item=' + JSON.stringify(item) + '&isMerchant=1&isCha=' + (index =='cha'?1:0) - break; - case 'tui': - uni.navigateTo({ - url: '/pages/shop/shopReturnOrder?type=shop' - }) + url = '/pages/shop/shopEvaluate?item=' + JSON.stringify(item) + '&isMerchant=1&isCha=' + (index == + 'cha' ? 1 : 0) break; case 'hx': this.scanCodeAdd() break; - case 'dy': - url = '/pages/myCenter/setPrint' - break; default: } uni.navigateTo({ url: url }) }, - getData(){ + getData() { let that = this; - that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { + that.NB.sendRequest("/mall/order/countByShop/" + uni.getStorageSync('shopId'), {}, false, 'GET', + 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { this.shopData = res.result - for(let i=0;i { - if (res.code == 200) { - uni.showToast({ - title: '核销成功', - icon: 'none' - }) - } else { - uni.showToast({ - title: res.message, - icon: 'none' - }) - } - uni.hideLoading() - }).catch((res) => {}) + orderId: productId + }, false, 'post', + 'application/x-www-form-urlencoded').then(( + res) => { + if (res.code == 200) { + uni.showToast({ + title: '核销成功', + icon: 'none' + }) + } else { + uni.showToast({ + title: res.message, + icon: 'none' + }) + } + uni.hideLoading() + }).catch((res) => {}) } } }); - - + + } else { uni.showToast({ title: '未查询到此订单信息,请核实!', @@ -440,7 +478,7 @@ }) }, //底部tab切换组件状态改变 - changeIndex(index,type) { + changeIndex(index, type) { let that = this; this.lastIndex = this.currentIndex this.currentIndex = index @@ -449,7 +487,7 @@ this.indexInit() break; case 1: - + that.$refs.deLivery.init(type) break; case 2: @@ -464,19 +502,20 @@ diff --git a/pages/shop/transferDeliveryOrderList.vue b/pages/shop/transferDeliveryOrderList.vue new file mode 100644 index 0000000..49ae8d2 --- /dev/null +++ b/pages/shop/transferDeliveryOrderList.vue @@ -0,0 +1,183 @@ + + + + +