diff --git a/package2/group/shopEvaluate.vue b/package2/group/shopEvaluate.vue index 37d6bde..a220895 100644 --- a/package2/group/shopEvaluate.vue +++ b/package2/group/shopEvaluate.vue @@ -7,7 +7,7 @@ - 商家评价 + {{isMerchant == 2 ? '配送评价' : '商家评价'}} @@ -80,18 +80,12 @@ - - + - - + {{item1.createByName}} : {{ item1.remark }} - - 展开 - 收起 - @@ -247,11 +241,6 @@ if(!that.shopComments[i].goodsList){ that.shopComments[i].goodsList = [] } - if(that.shopComments[i].comments && that.shopComments[i].comments.length > 0){ - for(let m=0;m {}); }, - toggleReply(i,m) { - this.shopComments[i].comments[m].isOpen = !this.shopComments[i].comments[m].isOpen; - this.$forceUpdate() - }, changeStatus(v){ this.shopComments[v].isReply = !this.shopComments[v].isReply this.$forceUpdate() @@ -667,66 +652,23 @@ margin-top:20rpx; } - /* 标题行:左标签 + 右按钮 */ .reply-header { display: flex; justify-content: space-between; - align-items: center; + align-items: flex-start; margin-bottom: 16rpx; } - .reply-label { - font-size: 28rpx; - font-weight: 500; - color: #333; - } - - .reply-expand-btn { - font-size: 24rpx; - padding: 4rpx 12rpx; - } - /* 回复内容基础样式 */ .reply-content { font-size: 26rpx; color: #555; padding: 12rpx; - transition: all 1s; - height: 70rpx; flex: 1; - } - - /* 折叠状态:单行省略 */ - .reply-content.collapsed { - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis; - } - - /* 展开状态:固定高度100px,可滚动 */ - .reply-content.expanded { display: block; height: auto; - /* 固定高度100px */ - overflow-y: auto; - /* 内容超长时滚动 */ - /* 重置折叠相关属性 */ - -webkit-line-clamp: unset; - -webkit-box-orient: unset; - text-overflow: clip; padding-bottom: 10px; - } - - /* 滚动条美化(可选) */ - .reply-content.expanded::-webkit-scrollbar { - width: 12rpx; - } - - .reply-content.expanded::-webkit-scrollbar-thumb { - background-color: #ccc; - border-radius: 20rpx; + overflow: visible; } .eval-num{ padding-bottom: 30rpx; diff --git a/package2/myCenter/addGoods.vue b/package2/myCenter/addGoods.vue index a0306db..d929c48 100644 --- a/package2/myCenter/addGoods.vue +++ b/package2/myCenter/addGoods.vue @@ -11,7 +11,7 @@ - + @@ -38,12 +38,12 @@ style="margin-left: 40rpx;line-height: 70rpx;"> - + - - + + - - + + {{item.title}} - - - - {{item.title}} - - - + + + + + {{item.title}} + + + + 该分类可选数量 - - - + + 取消 + 提交 + 维护属性 @@ -172,9 +182,11 @@ categorySonData:[], specValueArr:[], attrValueArr:[], + scrollTarget:'', editorIns: null, typeItem: {}, menuButtonInfo: {}, + shop:{}, formData: { id: '', shopId: '', @@ -221,6 +233,7 @@ }, onShow() { this.attrId = uni.getStorageSync('attrId'); + this.shop = uni.getStorageSync('shop'); this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() uni.authorize({ scope: 'scope.writePhotosAlbum', @@ -388,6 +401,15 @@ // 触发提交表单 submit() { let that = this; + if (!this.validateProductSpecs()) { + return + } + if (!this.validateProductNumbers()) { + return + } + if (!this.validateGroupBuyPrices()) { + return + } // this.$refs.form.validate((valid) => { // if (valid) { if (this.modalType == 0) { @@ -426,6 +448,81 @@ back() { uni.navigateBack() }, + validateProductSpecs() { + for (let i = 0; i < this.formData.attributeListPrice.length; i++) { + const specPrice = String(this.formData.attributeListPrice[i].specPrice).trim() + if (!this.isValidPrice(specPrice)) { + this.tui.toast('商品价格必须大于0且最多2位小数') + return false + } + const specNum = String(this.formData.attributeListPrice[i].specNum).trim() + if (!this.isValidInteger(specNum)) { + this.tui.toast('商品库存只能输入整数') + return false + } + } + return true + }, + validateProductNumbers() { + const lunchBox = String(this.formData.lunchBox).trim() + if (!this.isValidAmount(lunchBox)) { + this.tui.toast('餐盒费最多2位小数') + return false + } + const startPayNum = String(this.formData.startPayNum).trim() + if (startPayNum !== '' && !this.isValidInteger(startPayNum)) { + this.tui.toast('起售数量只能输入整数') + return false + } + return true + }, + validateGroupBuyPrices() { + const minSpecPrice = Math.min(...this.formData.attributeListPrice.map((item) => Number(item.specPrice))) + for (let i = 0; i < this.formData.productGroupBuyPrices.length; i++) { + const groupCount = Number(this.formData.productGroupBuyPrices[i].groupCount) + if (!groupCount || groupCount < 2) { + this.tui.toast('拼团人数不能小于2') + return false + } + const groupPrice = String(this.formData.productGroupBuyPrices[i].groupPrice).trim() + if (!this.isValidPrice(groupPrice)) { + this.tui.toast('拼团价必须大于0且最多2位小数') + return false + } + if (Number(groupPrice) >= minSpecPrice) { + this.tui.toast('拼团价必须低于商品价格') + return false + } + } + return true + }, + isValidPrice(value) { + return /^\d+(\.\d{1,2})?$/.test(value) && Number(value) > 0 + }, + isValidAmount(value) { + return /^\d+(\.\d{1,2})?$/.test(value) && Number(value) >= 0 + }, + isValidInteger(value) { + return /^\d+$/.test(value) + }, + changeSpecNum(e,index){ + this.formData.attributeListPrice[index].specNum = String(e.detail.value).replace(/\D/g, '') + if (this.specValueArr[index]) { + this.specValueArr[index].specNum = this.formData.attributeListPrice[index].specNum + } + }, + changeStartPayNum(e){ + this.formData.startPayNum = String(e.detail.value).replace(/\D/g, '') + }, + focusFormField(fieldId){ + this.scrollTarget = '' + this.$nextTick(() => { + this.scrollTarget = fieldId + }) + }, + blurFormField(){ + this.scrollTarget = '' + }, checkisMoreBuy(type){ this.formData.isMoreBuy = type; }, @@ -652,6 +749,10 @@ that.tui.request("/app/productAttribute/selectByCategoryId", "post", {categoryId:that.attrId}, false, true).then((res) => { if (res.code == 200) { that.categoryData = res.result + if (that.categoryData.length == 0) { + that.categorySonData = [] + return + } for (var i = 0; i < that.categoryData.length; i++) { that.categoryData[i].title = that.categoryData[i].attributeName if (i == that.categoryIndex) { @@ -740,10 +841,16 @@ addGroup(){ let data = { groupCount:'', - groupPrice:0 + groupPrice:'' } this.formData.productGroupBuyPrices.push(data) }, + goAttributeList(){ + this.$refs.addTypeDialog.close() + uni.navigateTo({ + url: '/package2/myCenter/attributeList' + }) + }, async upLoadFile(path) { let that = this; let hiver_token = uni.getStorageSync("hiver_token") @@ -784,19 +891,24 @@ font-size: 24rpx; background: #F5F8F5; color: #00231C; + overflow: hidden; } .page1 { width: 100%; - height: 100%; + height: 100vh; font-size: 24rpx; position: relative; + overflow: hidden; } .title { background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; width: 100%; height: 54%; + position: fixed; + top: 0; + left: 0; } .title-sreach { @@ -829,8 +941,9 @@ top: 200rpx; left: 2.5%; width: 95%; - overflow: scroll; - height: 85%; + bottom: 30rpx; + box-sizing: border-box; + overflow-y: scroll; } .upload-img { @@ -853,23 +966,99 @@ position: relative; overflow: hidden; flex: 1; - line-height: 1; + line-height: 70rpx; font-size: 28rpx; height: 70rpx; border: 4rpx solid #eee; padding-left: 20rpx; border-radius: 10rpx; + box-sizing: border-box; + min-width: 0; + } + .keyboard-safe-bottom { + height: 260rpx; } .add-popup-content { - align-items: center; - justify-content: center; - padding: 30rpx 30rpx 30rpx 0; - width: 600rpx; - height: 1050rpx; + width: 660rpx; + max-width: 92vw; + height: 78vh; background-color: #fff; - overflow: scroll; - border-radius: 20rpx; + overflow: hidden; + border-radius: 24rpx; + display: flex; + flex-direction: column; + box-sizing: border-box; + } + .attr-popup-body { + flex: 1; + min-height: 0; + display: flex; + } + .attr-popup-right { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + padding: 20rpx; + box-sizing: border-box; + } + .attr-value-scroll { + flex: 1; + min-height: 0; + } + .canbuy-box { + flex-shrink: 0; + padding-top: 18rpx; + background: #fff; + } + .canbuy-label { + font-size: 28rpx; + line-height: 56rpx; + font-weight: 700; + color: #00231C; + } + .attr-popup-footer { + flex-shrink: 0; + display: flex; + flex-wrap: wrap; + gap: 18rpx; + padding: 18rpx 28rpx 26rpx; + box-sizing: border-box; + background: #fff; + box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.04); + } + .attr-popup-btn { + flex: 1; + height: 82rpx; + line-height: 82rpx; + text-align: center; + border-radius: 82rpx; + font-size: 30rpx; + font-weight: 700; + box-sizing: border-box; + } + .attr-popup-btn.plain { + background: #F7F8F8; + color: #00231C; + } + .attr-popup-btn.primary { + background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); + color: #00231C; + } + .attr-manage-entry { + width: 100%; + height: 78rpx; + line-height: 78rpx; + margin: 0; + text-align: center; + border-radius: 78rpx; + border: 2rpx solid rgba(0, 35, 28, 0.18); + color: #00231C; + font-size: 28rpx; + font-weight: 700; + background: rgba(166, 255, 234, 0.2); + box-sizing: border-box; } .xiangxi-box{ flex: 1; @@ -897,8 +1086,7 @@ .content-left { width: 160rpx; background: rgba(247, 248, 248, 0.6); - height: 900rpx; - overflow: scroll; + height: 100%; scrollbar-width: none; } .content-low{ diff --git a/package2/myCenter/attributeList.vue b/package2/myCenter/attributeList.vue index 5ddb395..fa28d78 100644 --- a/package2/myCenter/attributeList.vue +++ b/package2/myCenter/attributeList.vue @@ -26,27 +26,20 @@ - - - - - - + 编辑属性 - + - - 属性名称: + + 属性名称 - - 删除 - 确认 + + 删除 + 确认 - + 新增属性 - + - - + + 属性名称 + + @@ -166,8 +174,16 @@ searchName: '', shopId:'', categoryId: '', + pages: 1, + status: 'loadmore', + gateType: '', } }, + computed: { + showLoadmore() { + return (this.shopList.length > 0 || this.shopList1.length > 0) && Number(this.pages) > 1 + }, + }, filters: { sliceMsg(val) { var name = '' @@ -189,15 +205,7 @@ }, onReachBottom() { - if (this.pageNum >= this.pages) return; - // this.status = 'loading'; - this.pageNum++; - if(this.gateType == 'search'){ - this.getShareList('search'); - }else{ - this.getShareList(); - } - + this.loadMore() }, methods: { back() { @@ -205,18 +213,31 @@ }, //顶部搜索框 search(e) { + const value = e && e.detail ? e.detail.value : e this.pageNum = 1 this.shopList1 = [] this.shopList = [] - if (e == '') { + this.pages = 1 + this.status = 'loadmore' + if (value == '') { this.searchName = "" this.getShareList() } else { - this.searchName = e + this.searchName = value this.getShareList('search') } }, + loadMore() { + if (this.status == 'loading' || this.pageNum >= this.pages) return; + this.status = 'loading'; + this.pageNum++; + if(this.gateType == 'search'){ + this.getShareList('search'); + }else{ + this.getShareList(); + } + }, changeShow(index,type){ if(type == 'shopList'){ this.shopList[index].isShow = !this.shopList[index].isShow @@ -350,31 +371,30 @@ let that = this this.tui.request("/app/product/getShareList", "POST", data, false, false).then((res) => { if (res.code == 200) { + const records = res.result.records || [] + this.pages = res.result.pages || 1 if (type == 'search') { this.shopList = [] - this.status = 'nomore'; - if (this.pages == 1) { - this.shopList1 = res.result.records + if (this.pageNum == 1) { + this.shopList1 = records } else { - this.shopList1 = [...this.shopList1, ...res.result.records] + this.shopList1 = [...this.shopList1, ...records] } for(let i=0;i= this.pages ? 'nomore' : 'loadmore' } else { this.tui.toast(res.message) } @@ -394,6 +414,8 @@ this.searchName = "" this.shopList1 = [] this.shopList = [] + this.pages = 1 + this.status = 'loadmore' this.getShareList() }, //初始化获取分类列表 @@ -403,6 +425,7 @@ }, false, true).then((res) => { if (res.code == 200) { this.indexList = res.result; + if (this.indexList.length == 0) return; for (var i = 0; i < this.indexList.length; i++) { if (i == 0) { this.indexList[i].parentId = true @@ -428,14 +451,15 @@ font-size: 24rpx; background: #F5F8F5; color: #00231C; + overflow: hidden; } .page1 { width: 100%; - height: 100%; + height: 100vh; font-size: 24rpx; position: relative; - + overflow: hidden; } .title{ background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; @@ -465,10 +489,21 @@ line-height: 54rpx; } } + .goods-layout { + width: 100%; + display: flex; + position: fixed; + top: 0; + left: 0; + bottom: 140rpx; + z-index: 80; + box-sizing: border-box; + padding-top: 28%; + } .content-left { width: 170rpx; + height: 100%; background: rgba(247, 248, 248, 0.6); - overflow: scroll; } .left-box { width: 100%; @@ -492,9 +527,9 @@ } .content-right { flex: 1; - overflow-y: scroll; height: 100%; background: #fff; + box-sizing: border-box; } .right-box { @@ -533,6 +568,29 @@ padding-right: 20rpx; height: 40rpx; } + .goods-tag-row { + display: flex; + align-items: center; + height: 40rpx; + padding: 5rpx 0; + } + .goods-tag { + display: inline-block; + height: 32rpx; + line-height: 32rpx; + padding: 0 12rpx; + margin-right: 10rpx; + border-radius: 16rpx; + font-size: 22rpx; + } + .goods-tag.recommend { + color: #ff6a00; + background: #fff2e6; + } + .goods-tag.must { + color: #e33b3b; + background: #ffecec; + } .box-right-price { display: flex; diff --git a/package2/myCenter/partTimeJobRegister.vue b/package2/myCenter/partTimeJobRegister.vue index 2879e11..173481f 100644 --- a/package2/myCenter/partTimeJobRegister.vue +++ b/package2/myCenter/partTimeJobRegister.vue @@ -375,12 +375,19 @@ formatMoneyInput(value) { value = String(value || ''); value = value.replace(/[^\d.]/g, ''); + if (value.indexOf('.') == 0) { + value = '0' + value; + } const dotIndex = value.indexOf('.'); if (dotIndex !== -1) { value = value.slice(0, dotIndex + 1) + value.slice(dotIndex + 1).replace(/\./g, ''); const parts = value.split('.'); value = parts[0] + '.' + parts[1].slice(0, 2); } + const amount = parseFloat(value); + if (!isNaN(amount) && amount > 200) { + return '200'; + } return value; }, formatOneDecimalInput(value) { @@ -438,6 +445,16 @@ item.orderBkge = isNaN(amount) ? '' : (Math.floor(amount * 100) / 100).toFixed(2).replace(/\.?0+$/, ''); return item.orderBkge; }, + isValidOrderBkge(value) { + const amount = parseFloat(value); + return !isNaN(amount) && amount > 0 && amount <= 200 && /^\d+(\.\d{1,2})?$/.test(String(value)); + }, + showOrderBkgeError(title) { + uni.showToast({ + title, + icon: 'none' + }); + }, onOrderBkgeInput(e, item) { const value = this.formatMoneyInput(e.detail.value); item.orderBkge = value; @@ -532,6 +549,11 @@ closeGuize() { let selectedQucan = this.qucan.filter(item => item.checked); let selectedSongcan = this.songcan.filter(item => item.checked); + this.defaultRoutePrice = this.formatMoneyInput(this.defaultRoutePrice); + const defaultRouteAmount = parseFloat(this.defaultRoutePrice); + if (!isNaN(defaultRouteAmount)) { + this.defaultRoutePrice = (Math.floor(defaultRouteAmount * 100) / 100).toFixed(2).replace(/\.?0+$/, ''); + } if (selectedQucan.length == 0 || selectedSongcan.length == 0) { uni.showToast({ @@ -540,6 +562,10 @@ }); return; } + if (!this.isValidOrderBkge(this.defaultRoutePrice)) { + this.showOrderBkgeError('最低配送费需大于0且不超过200'); + return; + } let currentRuleList = this.currentConfigType == 'waima' ? this.waimaRuleList : this.paotuiRuleList; let newRules = []; @@ -648,18 +674,18 @@ let workerRelaPriceList = []; if (this.formData.waima) { this.waimaRuleList.forEach(item => this.normalizeOrderBkge(item)); - let invalid = this.waimaRuleList.find(item => !item.orderBkge); + let invalid = this.waimaRuleList.find(item => !this.isValidOrderBkge(item.orderBkge)); if (invalid) return uni.showToast({ - title: '请填写外卖最低配送费', + title: '外卖最低配送费需大于0且不超过200', icon: 'none' }); workerRelaPriceList = workerRelaPriceList.concat(this.waimaRuleList); } if (this.formData.paotui) { this.paotuiRuleList.forEach(item => this.normalizeOrderBkge(item)); - let invalid = this.paotuiRuleList.find(item => !item.orderBkge); + let invalid = this.paotuiRuleList.find(item => !this.isValidOrderBkge(item.orderBkge)); if (invalid) return uni.showToast({ - title: '请填写快递最低配送费', + title: '快递最低配送费需大于0且不超过200', icon: 'none' }); workerRelaPriceList = workerRelaPriceList.concat(this.paotuiRuleList); diff --git a/package2/partTimeJob/partTimeJobCenter.vue b/package2/partTimeJob/partTimeJobCenter.vue index 73a47d3..2e6b676 100644 --- a/package2/partTimeJob/partTimeJobCenter.vue +++ b/package2/partTimeJob/partTimeJobCenter.vue @@ -19,12 +19,12 @@ {{worker.workerName}} - + alt="" style="width: 140rpx;height: 32rpx;background-size: 100%;margin: 20rpx;"> --> @@ -150,6 +150,14 @@ 排行 + + + + + + 退款/售后记录 + + @@ -241,9 +249,10 @@ url = '/package2/shop/ranking' break; case 'tui': - uni.navigateTo({ - url: '/package2/shop/afterService?type=worker' - }) + url = '/package2/shop/afterService?type=worker' + break; + case 'tuiRecord': + url = '/package2/shop/afterService?type=worker&mode=record' break; case 'pj': let item = { diff --git a/package2/partTimeJob/workerOrderList.vue b/package2/partTimeJob/workerOrderList.vue index b1c4ada..45cde3c 100644 --- a/package2/partTimeJob/workerOrderList.vue +++ b/package2/partTimeJob/workerOrderList.vue @@ -218,8 +218,7 @@ }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() - this.searchForm.shopId = uni.getStorageSync('shopId') - this.regionId = JSON.parse(uni.getStorageSync('area')).id + this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id }, onLoad(option) { if (option.index) { @@ -238,7 +237,9 @@ getList() { this.loadStatus = 'loading' let that = this - that.tui.request("/mall/delivery/pagebyworkerHistory", "POST", this.searchForm, false, false).then(( + const requestForm = Object.assign({}, this.searchForm) + delete requestForm.shopId + that.tui.request("/mall/delivery/pagebyworkerHistory", "POST", requestForm, false, false).then(( res) => { that.loadStatus = 'nomore'; if (res.code == 200) { diff --git a/package2/shop/afterService.vue b/package2/shop/afterService.vue index 267bd5f..67efeaa 100644 --- a/package2/shop/afterService.vue +++ b/package2/shop/afterService.vue @@ -7,13 +7,22 @@ - 待退款/售后{{returnCount}} + {{pageTitle}}{{returnCount}} + + + + {{searchDate ? '申请日期:' + searchDate : '选择申请日期'}} + + + 搜索 + 清空 + - {{item.status == 0?'待退款':item.status == 3?'待售后':""}} + {{getRefundStatusText(item)}} - 退款原因: {{item.refundTypeStatus == 1?'商家原因':item.refundTypeStatus == 2?'配送原因':item.refundTypeStatus == 3?'商家/配送都有原因(需要退配送费)':item.refundTypeStatus == 4?'平台退款':""}} + 退款原因: {{getRefundTypeStatusText(item)}} - 退款类型: {{item.refundType == 1?'退商品':item.refundType == 2?'退配送费':item.refundType == 3?'全额退款':""}} + 退款类型: {{getRefundTypeText(item)}} 退款/售后原因: {{item.reason || '无'}} + + 处理结果: {{getRefundStatusText(item)}} + + + 不同意原因: + {{item.rejectReason}} + + + 处理时间: {{item.successTime | formatISOTime}} + 退款/售后原因图片: @@ -62,20 +81,23 @@ - {{item.mallOrder.otherOrder == 1 ? '快递/跑腿单' : '查看商品'}} + {{item.mallOrder.otherOrder == 1 ? '快递/跑腿单' : '查看订单'}} 拼团详情 - + {{isSubmittingRefund(item) ? '处理中' : '不同意'}} - + {{isSubmittingRefund(item) ? '处理中' : '同意'}} + + 暂无{{pageTitle}} + @@ -196,9 +218,12 @@ linkId:"", pageNum:1, pageSize:100, - statusList:[0,3] + statusList:[0,3], + startDate:'', + endDate:'' }, type:'worker', + mode:'pending', returnFormData:{}, groupOrderIdList:[], tuanzhangOrder:[], @@ -206,6 +231,9 @@ orderDetail:{}, returnData:[], returnCount:0, + totalPages:1, + loadStatus:'more', + searchDate:'', submitLoading:false, submitRefundId:'', contactItem:{}, @@ -213,6 +241,11 @@ rejectReason:'' } }, + computed: { + pageTitle() { + return this.mode == 'record' ? '退款/售后记录' : '待退款/售后'; + } + }, filters:{ formatISOTime(isoString) { const date = new Date(isoString); @@ -250,9 +283,54 @@ if(option.type){ this.type = option.type } + if(option.mode){ + this.mode = option.mode + } + if(this.mode == 'record'){ + this.searchCountForm.statusList = [1,2,4,5] + this.searchCountForm.pageSize = 10 + }else{ + this.searchCountForm.statusList = [0,3] + this.searchCountForm.pageSize = 100 + } this.getReturnCount() }, + onReachBottom() { + this.loadMoreRecord() + }, methods: { + getRefundStatusText(item) { + if (!item) return ''; + return item.status == 0 ? '待退款' : item.status == 1 ? '已同意退款' : item.status == 2 ? '不同意退款' : item.status == 3 ? '待售后' : item.status == 4 ? '已同意售后' : item.status == 5 ? '不同意售后' : ''; + }, + getRefundTypeStatusText(item) { + if (!item) return ''; + return item.refundTypeStatus == 1 ? '商家原因' : item.refundTypeStatus == 2 ? '配送原因' : item.refundTypeStatus == 3 ? '商家/配送都有原因(需要退配送费)' : item.refundTypeStatus == 4 ? '平台退款' : ''; + }, + getRefundTypeText(item) { + if (!item) return ''; + return item.refundType == 1 ? '退商品' : item.refundType == 2 ? '退配送费' : item.refundType == 3 ? '全额退款' : ''; + }, + dateChange(e) { + this.searchDate = e.detail.value; + }, + searchRecordByDate() { + if(this.mode != 'record') return; + this.searchCountForm.pageNum = 1; + this.returnData = []; + this.searchCountForm.startDate = this.searchDate ? this.searchDate + ' 00:00:00' : ''; + this.searchCountForm.endDate = this.searchDate ? this.searchDate + ' 23:59:59' : ''; + this.getReturnCount(); + }, + clearDateSearch() { + if(this.mode != 'record') return; + this.searchDate = ''; + this.searchCountForm.pageNum = 1; + this.returnData = []; + this.searchCountForm.startDate = ''; + this.searchCountForm.endDate = ''; + this.getReturnCount(); + }, getGroupOrders(id){ this.tui.request("/mall/order/selectAllOrderByOrderId/"+id, "GET", {}, false, true).then((res) => { if (res.code == 200) { @@ -287,16 +365,14 @@ return this.formatMoney(total); }, orderDetailOpen(item){ - this.returnFormData.id = item.id; - this.returnFormData.linkId = item.linkId; - this.returnFormData.orderId = item.orderId; - this.returnFormData.deliveryType = item.mallOrder.deliveryType; - this.returnFormData.refundAmount = item.refundAmount; - this.returnFormData.refundType = item.refundType; - this.returnFormData.refundTypeStatus = item.refundTypeStatus; - this.orderDetail = item.mallOrder; - this.goodsList = item.items; - this.$refs.orderPopup.open(); + const orderId = item && item.mallOrder ? item.mallOrder.id : item && item.orderId; + if (!orderId) { + this.tui.toast('订单信息不存在'); + return; + } + uni.navigateTo({ + url: '/package1/order/orderDetail?id=' + orderId + }); }, makeCall(phone){ uni.makePhoneCall({ @@ -314,10 +390,16 @@ }else{ this.searchCountForm.linkId = uni.getStorageSync('shopId') } + if(this.mode == 'record'){ + this.loadStatus = 'loading' + } return this.tui.request("/mall/refund/page", "POST", this.searchCountForm, false, false).then((res) => { if (res.code == 200 && res.result != null) { - that.returnCount = res.result.records.length; - that.returnData = res.result.records + const records = res.result.records || []; + that.totalPages = res.result.pages || 1; + that.returnCount = that.mode == 'record' ? (res.result.total || records.length) : records.length; + that.returnData = that.mode == 'record' && that.searchCountForm.pageNum > 1 ? that.returnData.concat(records) : records + that.loadStatus = that.mode == 'record' && that.searchCountForm.pageNum < that.totalPages ? 'more' : 'nomore'; that.$forceUpdate(); } else { that.tui.toast(res.message); @@ -326,6 +408,12 @@ uni.hideLoading(); }).catch((res) => {}); }, + loadMoreRecord() { + if(this.mode != 'record') return; + if(this.loadStatus == 'loading' || this.searchCountForm.pageNum >= this.totalPages) return; + this.searchCountForm.pageNum++; + this.getReturnCount(); + }, getPictureList(pictures) { if (pictures == null || pictures === '') return []; if (Array.isArray(pictures)) { @@ -552,6 +640,50 @@ margin: 20rpx auto 0; padding-bottom: 60rpx; } + .record-search { + width: 95%; + margin: 0 auto 20rpx; + display: flex; + align-items: center; + gap: 14rpx; + } + .record-search picker { + flex: 1; + min-width: 0; + } + .record-date-picker { + width: 100%; + height: 64rpx; + padding: 0 20rpx; + box-sizing: border-box; + border-radius: 16rpx; + background: #fff; + color: #00231C; + font-size: 26rpx; + line-height: 64rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .record-search-btn, + .record-clear-btn { + flex-shrink: 0; + height: 64rpx; + padding: 0 24rpx; + border-radius: 16rpx; + font-size: 26rpx; + font-weight: 700; + line-height: 64rpx; + text-align: center; + } + .record-search-btn { + background: rgba(0, 35, 28, 1); + color: rgba(166, 255, 234, 1); + } + .record-clear-btn { + background: #fff; + color: #55716a; + } .box1 { width: 95%; margin: 20rpx auto; @@ -631,6 +763,10 @@ font-weight: 700; word-break: break-all; } + .refund-result-text { + color: #00231C; + font-weight: 700; + } .refund-pictures-row { margin: 10rpx 0; line-height: 40rpx; @@ -668,6 +804,18 @@ background: linear-gradient(90deg, #FF4500, #FFA07A); color: #fff; } + .empty-box { + width: 95%; + margin: 40rpx auto 0; + padding: 80rpx 20rpx; + box-sizing: border-box; + border-radius: 20rpx; + background: #fff; + color: #7a8582; + font-size: 28rpx; + font-weight: 700; + text-align: center; + } .popup-area-title { font-size: 36rpx; font-weight: bold; diff --git a/package2/shop/businessInfo.vue b/package2/shop/businessInfo.vue index 3cd5bbc..69d814d 100644 --- a/package2/shop/businessInfo.vue +++ b/package2/shop/businessInfo.vue @@ -93,9 +93,6 @@ }, { value: 1, text: '暂停营业' - }, { - value: 2, - text: '冻结' }] } }, diff --git a/package2/shop/merchantCenter.vue b/package2/shop/merchantCenter.vue index c90aa6c..e3194ac 100644 --- a/package2/shop/merchantCenter.vue +++ b/package2/shop/merchantCenter.vue @@ -217,6 +217,14 @@ 扫码核销 + + + + + + 退款/售后记录 + + @@ -372,9 +380,10 @@ url = '/package2/shop/shopOrderList' break; case 'tui': - uni.navigateTo({ - url: '/package2/shop/afterService?type=shop' - }) + url = '/package2/shop/afterService?type=shop' + break; + case 'tuiRecord': + url = '/package2/shop/afterService?type=shop&mode=record' break; case 'zd': url = '/package2/shop/shopBill' diff --git a/package2/shop/orderDetail.vue b/package2/shop/orderDetail.vue index ea65ba9..e923872 100644 --- a/package2/shop/orderDetail.vue +++ b/package2/shop/orderDetail.vue @@ -27,7 +27,7 @@ - {{data.deliveryType == 1?'配送订单':data.isPack == 1?'自取-打包':data.isPack == 0?'自取-堂食':'自取'}} + {{(data.deliveryType == 1 && data.orderType != 3)?'普通配送单':(data.deliveryType == 1 && data.orderType == 3)?'面对面配送单':(data.isPack == 1 && data.otherOrder == null)?'自取-打包':(data.isPack == 0 && data.otherOrder == null)?'自取-堂食':'到店消费'}} {{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}:{{getWorkerName(data)}} @@ -91,7 +91,7 @@ ¥{{formatAmount(data.packageFee)}} - + 配送费 @@ -135,17 +135,20 @@ - 退款/售后 + 退款/售后 + + 平台介入 + 申请时间 {{item.createTime | formatISOTime}} - + @@ -184,8 +187,12 @@ 退款/售后状态 {{getRefundStatusText(item)}} + + 拒绝原因 + {{item.rejectReason}} + - {{getAutoRefundTime(item.createTime)}} 之前未处理系统会自动退款 + {{getAutoRefundTime(item.createTime)}} 之前对方未处理系统会自动退款 处理退款/售后时间 @@ -311,7 +318,7 @@ - + 预计收入 @@ -626,6 +633,37 @@ phoneNumber: phone }); }, + callPlatformService() { + let regionId = this.getCurrentRegionId(); + if (!regionId) { + this.tui.toast("请选择校区"); + return; + } + let that = this; + that.tui.request("/mall/admin/seckillGroup/customerPhone/get", "GET", { + regionId: regionId + }, false, true).then((res) => { + if (res.code == 200) { + that.makeCall(res.result); + } else { + that.tui.toast(res.message || "获取客服电话失败"); + } + }).catch(() => { + that.tui.toast("获取客服电话失败"); + }); + }, + getCurrentRegionId() { + let area = uni.getStorageSync('area'); + if (!area) return ''; + if (typeof area === 'object') { + return area.id || ''; + } + try { + return JSON.parse(area).id || ''; + } catch (e) { + return ''; + } + }, back() { uni.navigateBack() }, @@ -689,7 +727,7 @@ } .content{ margin: 0 auto; - padding-bottom: 220rpx; + padding-bottom: 190rpx; } .box1 { width: 95%; @@ -738,7 +776,7 @@ .bottom{ position: fixed; bottom: 0; - height: 180rpx; + height: 170rpx; width: 100%; background: #fff; padding: 0 20rpx; @@ -802,6 +840,21 @@ line-height: 60rpx; font-size: 32rpx; font-weight: 700; + display: flex; + align-items: center; + } + .refund-service-btn { + width: 136rpx; + height: 54rpx; + text-align: center; + line-height: 54rpx; + border-radius: 999rpx; + background: rgba(255, 255, 255, 0.72); + border: 1px solid rgba(0, 35, 28, 0.1); + color: #60706c; + font-size: 20rpx; + font-weight: 800; + box-shadow: 0 8rpx 18rpx rgba(0, 35, 28, 0.05); } .refund-card { margin-top: 12rpx; diff --git a/package2/shop/shopOrderList.vue b/package2/shop/shopOrderList.vue index 3144516..2b351a4 100644 --- a/package2/shop/shopOrderList.vue +++ b/package2/shop/shopOrderList.vue @@ -61,13 +61,17 @@ 餐盒费 ¥{{formatMoney(item.packageFee)}} + + 合计 + ¥{{getOrderTotalAmount(item)}} + 备注 {{getOrderRemark(item)}} - {{(item.deliveryType == 1 && item.orderType != 3)?'普通配送单':(item.deliveryType == 1 && item.orderType == 3)?'面对面配送单':item.isPack == 1?'自取-打包':item.isPack == 0?'自取-堂食':'自取'}} + {{(item.deliveryType == 1 && item.orderType != 3)?'普通配送单':(item.deliveryType == 1 && item.orderType == 3)?'面对面配送单':(item.isPack == 1 && item.otherOrder == null)?'自取-打包':(item.isPack == 0 && item.otherOrder == null)?'自取-堂食':'到店消费'}} 拼团详情 @@ -77,11 +81,14 @@ 出餐 + + 面对面配送单需要一块出餐--点击拼团详情按钮并出餐 + - + 拼团详情 @@ -89,7 +96,7 @@ × - + 订单-{{item.numberCode || item.id}} @@ -117,6 +124,9 @@ 暂无拼团订单 + + 已全部出餐 + @@ -181,6 +191,11 @@ value: 8, checked: false }, + { + name: '已售后', + value: 12, + checked: false + }, { name: '已取消', value: 9, @@ -307,6 +322,9 @@ if (item.mallOrder && item.mallOrder.id) return item.mallOrder.id return item.orderId || item.mallOrderId || item.id || '' }, + isFaceDeliveryOrder(item) { + return !!item && item.deliveryType == 1 && item.orderType == 3 + }, getDeliveryInfo(item) { return item && item.deliveryInfo ? item.deliveryInfo : {} }, @@ -333,6 +351,14 @@ shouldShowPackageFee(order) { return !!order && (order.deliveryType == 1 || order.isPack == 1) }, + getOrderTotalAmount(order) { + if (!order) return this.formatMoney(0) + const goodsList = Array.isArray(order.goodsList) ? order.goodsList : [] + const goodsAmount = goodsList.reduce((total, goods) => { + return total + this.toNumber(goods.price) * this.toNumber(goods.quantity) + }, 0) + return this.formatMoney(goodsAmount + this.toNumber(order.packageFee)) + }, mealServing(item){ let that = this uni.showModal({ @@ -362,6 +388,36 @@ } }); }, + batchMealServing() { + const orderIdList = (Array.isArray(this.tuanzhangOrder) ? this.tuanzhangOrder : []) + .map(item => this.getOrderId(item)) + .filter(id => !!id) + if (orderIdList.length == 0) { + this.tui.toast('未找到拼团订单') + return + } + let that = this + uni.showModal({ + title: '提示', + content: '确定全部出餐吗?', + success: function (res) { + if (!res.confirm) return + that.tui.request('/mall/order/shopMakeTimeBatch', 'POST', { + orderIdList: orderIdList + }, false, false).then((res) => { + if (res.code == 200) { + that.$refs.pintuanPopup.close() + that.searchForm.pageNum = 1 + that.getList() + } else { + that.tui.toast(res.message) + return + } + uni.hideLoading() + }).catch((res) => {}) + } + }) + }, goDetail(item) { let id = this.getOrderId(item) if (!id) { @@ -656,7 +712,7 @@ .order-fee-row { display: flex; justify-content: space-between; - margin: 0 0 18rpx; + margin: 0 0 10rpx; padding-top: 16rpx; border-top: 1px dashed #e4ebe7; color: #52736b; @@ -664,6 +720,15 @@ font-weight: 700; } + .order-total-row { + display: flex; + justify-content: space-between; + margin: 0 0 18rpx; + color: #00231C; + font-size: 30rpx; + font-weight: 900; + } + .remark-box { display: flex; margin: 0 0 18rpx; @@ -741,6 +806,13 @@ border-radius: 10rpx; color: #fff; } + .face-delivery-tip { + padding: 0 0 18rpx; + color: #ff2d2d; + font-size: 24rpx; + font-weight: 800; + line-height: 34rpx; + } .group-popup { width: 660rpx; max-height: 880rpx; @@ -781,6 +853,23 @@ max-height: 690rpx; height: 690rpx; } + .group-popup-scroll-with-footer { + max-height: 600rpx; + height: 600rpx; + } + .group-popup-footer { + padding-top: 18rpx; + } + .group-all-meal-btn { + height: 72rpx; + line-height: 72rpx; + border-radius: 18rpx; + background: linear-gradient(90deg, #FF4500, #FFA07A); + color: #fff; + font-size: 28rpx; + font-weight: 900; + text-align: center; + } .group-order-card { margin-bottom: 18rpx; padding: 22rpx;