wangfukang 1 month ago
parent
commit
2418bb83ca
  1. 284
      package2/group/groupBuyDetail.vue
  2. 23
      package2/group/groupBuySingle.vue
  3. 406
      package2/myCenter/couponList.vue
  4. 21
      package2/partTimeJob/partTimeJobCenter.vue
  5. 24
      package2/seckill/seckillGroup.vue
  6. 2
      package2/shop/afterService.vue
  7. 39
      package2/shop/merchantCenter.vue
  8. 291
      package2/shop/orderDetail.vue

284
package2/group/groupBuyDetail.vue

@ -11,20 +11,30 @@
</view>
</view>
</view>
<view class="content">
<view class="box1" style="display: flex;">
<view class="content" v-if="detailLoaded">
<view class="box1 shop-card">
<view class="left">
<view style="display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/3721d2aa18ac4700aa7ac4dfeb272b09.png" alt="" style="width: 48rpx;height: 48rpx;"/>
<text style="height: 48rpx;line-height: 48rpx;font-size: 28rpx;font-weight: 700;margin-left: 10rpx;">{{shopItem.shopName || ''}}</text>
<text class="shop-name">{{shopItem.shopName || '商家详情'}}</text>
</view>
<view style="line-height: 60rpx;height: 60rpx;color: #777;">
<uni-icons type="location" size="13"></uni-icons>
<text style="padding-left: 10rpx;">{{shopItem.shopAddress || '暂无地址'}}</text>
<view class="shop-subtitle" v-if="shopItem.subtitle">{{shopItem.subtitle}}</view>
<view class="shop-meta">
<text>{{shopTypeText}}</text>
<text>评分 {{shopScoreText}}</text>
<text>销量 {{saleCountText}}</text>
</view>
<view style="line-height: 60rpx;height: 60rpx;color: #777;">
<uni-icons type="loop" size="13"></uni-icons>
<text style="padding-left: 10rpx;">{{businessTimeText}}</text>
<view class="shop-info-row">
<uni-icons class="shop-info-icon" type="location" size="13"></uni-icons>
<text class="shop-info-text">{{shopItem.shopAddress || '暂无地址'}}</text>
</view>
<view class="shop-info-row">
<uni-icons class="shop-info-icon" type="loop" size="13"></uni-icons>
<text class="shop-info-text">{{businessTimeText}}</text>
</view>
<view class="shop-info-row">
<uni-icons class="shop-info-icon" type="paperplane" size="13"></uni-icons>
<text class="shop-info-text">{{deliveryText}}</text>
</view>
</view>
<view class="right">
@ -38,9 +48,14 @@
商家资质
</text>
</view>
<view style="display: flex;margin-top: 20rpx;">
<img @tap="largeImg(item)" :src="item" v-for="(item,index) in shopImages" :key="index" alt="" style="width: 156rpx;height: 48rpx;margin-right: 40rpx;" />
<text v-if="shopImages.length == 0" style="color: #777;">暂无资质图片</text>
<view class="qualification-list" v-if="qualificationImages.length > 0">
<view class="qualification-item" v-for="(item,index) in qualificationImages" :key="index" @tap="largeImg(item.url)">
<image :src="item.url" mode="aspectFill"></image>
<text>{{item.label}}</text>
</view>
</view>
<view class="empty-text" v-else>
暂无资质图片
</view>
</view>
<view class="box1">
@ -52,6 +67,33 @@
公告{{shopItem.remark || '暂无公告'}}
</view>
</view>
<view class="box1">
<view style="display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/3721d2aa18ac4700aa7ac4dfeb272b09.png" alt="" style="width: 48rpx;height: 48rpx;" />
<text style="height: 48rpx;line-height: 48rpx;font-size: 28rpx;font-weight: 700;margin-left: 10rpx;">商家信息</text>
</view>
<view class="detail-list">
<view class="detail-row" v-if="shopItem.shopLename">
<text>法人</text>
<text>{{shopItem.shopLename}}</text>
</view>
<view class="detail-row" v-if="shopItem.contactPhone">
<text>联系电话</text>
<text>{{shopItem.contactPhone}}</text>
</view>
<view class="detail-row" v-if="shopItem.shopAreaTitle">
<text>所属区域</text>
<text>{{shopItem.shopAreaTitle}}</text>
</view>
<view class="detail-row" v-if="shopItem.isbrandflag != null">
<text>品牌店铺</text>
<text>{{shopItem.isbrandflag == 1 ? '是' : '否'}}</text>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="box1 empty-text">商家信息加载中...</view>
</view>
</view>
</template>
@ -63,7 +105,9 @@
menuButtonInfo: {},
isPintuan:true,
shopItem:{},
shopImages:[]
shopImages:[],
qualificationImages:[],
detailLoaded:false
}
},
computed: {
@ -71,6 +115,32 @@
const takeaway = this.shopItem.shopTakeaway || {};
if (!takeaway.businessHourBegin || !takeaway.businessHourEnd) return '营业时间暂无';
return '周一到周日 ' + takeaway.businessHourBegin + '-' + takeaway.businessHourEnd;
},
shopTypeText() {
const takeaway = this.shopItem.shopTakeaway || {};
return this.shopItem.shopTypeTitle || takeaway.type || '美食';
},
shopScoreText() {
return this.shopItem.shopScore || '5.0';
},
saleCountText() {
return this.shopItem.saleCount != null ? this.shopItem.saleCount : 0;
},
deliveryText() {
if (this.shopItem.supportShopDelivery == 1) {
const fee = this.shopItem.orderBkge != null ? this.shopItem.orderBkge : 0;
const duration = this.shopItem.shopDeliveryDuration ? this.shopItem.shopDeliveryDuration + '分钟' : '尽快送达';
const location = this.shopItem.shopDeliveryLocation == 1 ? '送到宿舍' : this.shopItem.shopDeliveryLocation == 2 ? '送到楼下' : '支持自配送';
return '商家自配送 ' + duration + ',' + location + ',配送费¥' + fee;
}
if (this.shopItem.supportTransferDelivery == 1) {
const duration = this.shopItem.transferDeliveryDuration ? this.shopItem.transferDeliveryDuration + '分钟' : '尽快送达';
return '中转配送 ' + duration + (this.shopItem.transferAddressName ? ',' + this.shopItem.transferAddressName : '');
}
if (this.shopItem.groupDeliveryTime) {
return '预计配送 ' + this.shopItem.groupDeliveryTime + '分钟';
}
return '配送信息暂无';
}
},
components: {
@ -84,15 +154,15 @@
},
methods: {
initShopItem(option) {
const cacheItem = uni.getStorageSync('groupShopDetail');
if (cacheItem) {
this.shopItem = cacheItem;
} else if (option.item) {
this.shopItem = this.parseRouteItem(option.item) || {};
let id = option.id || '';
if (!id && option.item) {
const routeItem = this.parseRouteItem(option.item) || {};
id = routeItem.id || (routeItem.shop && routeItem.shop.id) || '';
}
this.setShopImages();
if (option.id || this.shopItem.id) {
this.getShopDetail(option.id || this.shopItem.id);
if (id) {
this.getShopDetail(id);
} else {
this.detailLoaded = true;
}
},
parseRouteItem(item) {
@ -107,25 +177,77 @@
}
}
},
normalizeDetailResult(result) {
const shop = result.shop ? result.shop : result;
const shopTakeaway = result.shopTakeaway || shop.shopTakeaway || {};
const products = result.products || shop.products || [];
return {
...shop,
shopTakeaway,
products,
groupDeliveryTime: shop.groupDeliveryTime || result.groupDeliveryTime
};
},
setShopImages() {
if (!this.shopItem.shopImages) {
const imageText = this.shopItem.shopImages;
if (!imageText) {
this.shopImages = [];
this.qualificationImages = [];
return;
}
this.shopImages = this.shopItem.shopImages.split('@@').filter(item => item && item !== 'undefined' && item !== 'null');
const labels = ['', '', '营业执照'];
const images = [];
String(imageText).split('@@').forEach((item, index) => {
if (!item || item === 'undefined' || item === 'null') return;
if (index < 2) return;
if (index === 3) {
this.parseExtraImages(item).forEach((url, extraIndex) => {
images.push({
label: extraIndex === 0 ? '补充证照' : '补充证照' + (extraIndex + 1),
url
});
});
return;
}
images.push({
label: labels[index] || '资质图片' + (index + 1),
url: item
});
});
this.qualificationImages = images.filter(item => item.url);
this.shopImages = this.qualificationImages.map(item => item.url);
},
parseExtraImages(value) {
try {
const parsed = JSON.parse(value);
if (Array.isArray(parsed)) {
return parsed.filter(item => item && item !== 'undefined' && item !== 'null');
}
return parsed ? [parsed] : [];
} catch (e) {
return value ? [value] : [];
}
},
getShopDetail(id) {
let area = uni.getStorageSync('area');
let regionId = '';
try {
regionId = area ? JSON.parse(area).id : '';
} catch (e) {}
this.tui.request("/app/shop/getShopInfoById", "POST", {
id: id,
regionId: JSON.parse(uni.getStorageSync('area')).id
}, false, false).then((res) => {
regionId: regionId
}, false, true).then((res) => {
if (res.code == 200 && res.result) {
this.shopItem = res.result;
uni.setStorageSync('groupShopDetail', res.result);
this.shopItem = this.normalizeDetailResult(res.result);
uni.setStorageSync('groupShopDetail', this.shopItem);
this.setShopImages();
}
this.detailLoaded = true;
uni.hideLoading();
}).catch(() => {});
}).catch(() => {
this.detailLoaded = true;
});
},
//
largeImg(img) {
@ -204,11 +326,113 @@
border-radius: 20rpx;
padding: 20rpx;
}
.shop-name{
flex: 1;
min-width: 0;
height: 48rpx;
line-height: 48rpx;
font-size: 28rpx;
font-weight: 700;
margin-left: 10rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.shop-subtitle{
color: #08735d;
line-height: 36rpx;
margin-top: 12rpx;
}
.shop-meta{
display: flex;
flex-wrap: wrap;
margin-top: 16rpx;
}
.shop-meta text{
padding: 4rpx 14rpx;
background: rgba(223, 255, 176, 1);
color: #08735d;
border-radius: 8rpx;
line-height: 32rpx;
margin-right: 12rpx;
margin-bottom: 12rpx;
}
.shop-card{
display: flex;
align-items: flex-start;
}
.shop-info-row{
display: flex;
align-items: flex-start;
color: #777;
line-height: 40rpx;
margin-top: 20rpx;
}
.shop-info-icon{
flex-shrink: 0;
line-height: 40rpx;
}
.shop-info-text{
flex: 1;
min-width: 0;
padding-left: 10rpx;
word-break: break-all;
}
.qualification-list{
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
}
.qualification-item{
width: 156rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.qualification-item image{
display: block;
width: 156rpx;
height: 104rpx;
border-radius: 8rpx;
background: #f5f5f5;
}
.qualification-item text{
display: block;
color: #777;
line-height: 36rpx;
text-align: center;
font-size: 22rpx;
}
.detail-list{
margin-top: 16rpx;
}
.detail-row{
display: flex;
justify-content: space-between;
color: #777;
line-height: 44rpx;
}
.detail-row text:first-child{
flex-shrink: 0;
margin-right: 24rpx;
color: #00231C;
}
.detail-row text:last-child{
flex: 1;
text-align: right;
word-break: break-all;
}
.empty-text{
color: #777;
line-height: 48rpx;
}
.left{
width: 80%;
flex: 1;
min-width: 0;
}
.right{
width: 20%;
flex-shrink: 0;
width: 120rpx;
height: 160rpx;
position: relative;
}
</style>

23
package2/group/groupBuySingle.vue

@ -3,7 +3,7 @@
<page-meta :page-style="popupPageStyle"></page-meta>
<view class="page1" :class="{'store-group-page': isStoreGroupOrder}">
<!-- 固定顶部导航栏悬浮在背景图之上 -->
<view class="nav-bar"
<view class="nav-bar" :class="{'nav-bar--popup-open': bottomPopupOpenCount > 0}"
:style="{'padding-top': menuButtonInfo.top +'px','background':((orderListWait.length > 0 && lastScrollTop>217) || (orderListWait.length == 0 && lastScrollTop>149))?'#fff':''}">
<view class="back-btn" @tap="back">
<uni-icons type="left" size="28"></uni-icons>
@ -573,8 +573,11 @@
</view>
</view>
</view>
<view class="pay-refund-tip">
若拼团失败将会为您自动退款
<view class="pay-refund-tip" v-if="isStoreGroupOrder">
若24小时内拼团失败将会为您自动退款
</view>
<view class="pay-refund-tip" v-if="!isStoreGroupOrder">
若1小时内拼团失败将会为您自动退款
</view>
</view>
<view class="box1" style="display: flex;padding: 40rpx;"
@ -1753,7 +1756,7 @@
uni.showLoading({
title: '创建订单中....'
});
if(isStoreGroupOrder){
if(this.isStoreGroupOrder){
payload.otherOrder = 2
}
this.tui.request("/mall/order/create", "POST", payload, false, false).then(res => {
@ -1983,6 +1986,7 @@
selectMoreBuy(item, index) {
this.checkMoreBuyIndex = item.id
this.moreBuyList[index].isChecked = !this.moreBuyList[index].isChecked;
let isHas = false
let index1 = ''
for (let i = 0; i < this.moreBuyList.length; i++) {
@ -2025,6 +2029,9 @@
this.selectedGroupRule.groupPriceAndMore = 0.01
}
}
if(this.moreBuyList[index].isChecked == false){
this.vModelValue = 0
}
},
sliceMsg2(val) {
var name = ''
@ -2163,7 +2170,7 @@
let amount = this.getFaceToFaceGoodsAmount();
return this.tui.request('/mall/coupon/available', 'GET', {
userId: userId,
applyScene: 1,
applyScene: this.isStoreGroupOrder ? 4 : 1,
regionId: regionId,
amount: amount,
merchantId: this.shopItem.id || '0'
@ -2244,6 +2251,10 @@
box-sizing: border-box;
}
.nav-bar--popup-open {
z-index: 90;
}
.radio-check {
background: linear-gradient(90deg, #e3ff96, #a6ffea);
width: 42rpx;
@ -3686,7 +3697,7 @@
display: flex;
align-items: center;
justify-content: center;
gap: 18rpx;
gap: 38rpx;
line-height: normal;
}

406
package2/myCenter/couponList.vue

@ -1,53 +1,87 @@
<template>
<!-- 优惠券列表 -->
<view class="page1">
<view class="title">
<view class="title-sreach">
<view class="back-btn" @tap="back" :style="{'padding-top': menuButtonInfo.top +'px'}">
<uni-icons type="left" size="28"></uni-icons>
<view class="coupon-page">
<view class="title-wrap">
<view class="title-search">
<view class="back-btn" @tap="back"
:style="{'top': menuButtonInfo.top + 'px','width': menuButtonInfo.height + 'px','height': menuButtonInfo.height + 'px'}">
<uni-icons type="left" size="28" color="#08735d"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
优惠券
<view class="title-name" :style="{'padding-top': menuButtonInfo.top + 'px'}">
我的优惠券
</view>
</view>
<view class="hero-copy">
<view class="hero-title">可用优惠券</view>
<view class="hero-sub">仅展示当前校区未使用未锁定且未过期的优惠券</view>
</view>
</view>
<view class="content">
<view class="box1">
<view class="">
可用于老王的店
<view class="summary-card">
<view class="summary-left">
<view class="summary-label">当前校区</view>
<view class="summary-name">{{regionName || '未选择校区'}}</view>
</view>
<view class="">
满10减1
<view class="summary-count">{{totalCount}} 张可用</view>
</view>
<view class="empty-card" v-if="couponList.length === 0 && loadStatus !== 'loading'">
<view class="empty-icon"></view>
<view class="empty-title">暂无可用优惠券</view>
<view class="empty-sub">已使用锁定和过期的优惠券不会显示在这里</view>
</view>
<view class="box1">
<view class="">
可用于老王的店
<view class="coupon-card" v-for="item in couponList" :key="item.id">
<view class="coupon-main">
<view class="amount-box">
<view class="amount"><text>¥</text>{{formatAmount(item.discountAmount)}}</view>
<view class="threshold">{{thresholdText(item.minAmount)}}</view>
</view>
<view class="">
无门槛券3
<view class="coupon-info">
<view class="coupon-title">{{sceneText(item.applyScene)}}优惠券</view>
<view class="tag-row">
<text>{{issuerText(item)}}</text>
<text>未使用</text>
</view>
<view class="info-row">领取时间{{formatDate(item.receiveTime)}}</view>
<view class="info-row">有效期至{{formatDate(item.validEndTime)}}</view>
</view>
</view>
</view>
<uni-load-more :status="loadStatus" v-if="couponList.length > 0 || loadStatus === 'loading'" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
menuButtonInfo: {}
menuButtonInfo: {
top: 0,
height: 32
},
regionName: '',
totalCount: 0,
totalPages: 1,
loadStatus: 'more',
searchForm: {
pageNum: 1,
pageSize: 10,
userId: '',
regionId: ''
},
couponList: []
}
},
onReachBottom() {
if (this.searchForm.pageNumber >= this.totalPages) return;
// this.status = 'loading';
this.searchForm.pageNumber++;
this.getShopList();
if (this.loadStatus === 'loading' || this.searchForm.pageNum >= this.totalPages) return
this.searchForm.pageNum += 1
this.getCouponList()
},
onLoad(option) {
this.initQuery()
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
@ -55,9 +89,95 @@
methods: {
back() {
uni.navigateBack()
},
initQuery() {
const area = uni.getStorageSync('area')
this.searchForm.userId = uni.getStorageSync('id') || ''
if (area) {
try {
const areaInfo = typeof area === 'string' ? JSON.parse(area) : area
this.searchForm.regionId = areaInfo.id || ''
this.regionName = areaInfo.title || areaInfo.name || ''
} catch (e) {
this.searchForm.regionId = ''
this.regionName = ''
}
}
if (!this.searchForm.userId) {
this.tui.toast('请先登录')
return
}
if (!this.searchForm.regionId) {
this.tui.toast('请先选择校区')
return
}
this.getCouponList()
},
getCouponList() {
this.loadStatus = 'loading'
this.tui.request('/mall/coupon/userList', 'POST', this.searchForm, false, false).then((res) => {
if (res.code == 200) {
const result = res.result || {}
const records = Array.isArray(result.records) ? result.records : []
if (this.searchForm.pageNum == 1) {
this.couponList = records
} else {
this.couponList = [...this.couponList, ...records]
}
this.totalCount = result.total || this.couponList.length
this.totalPages = result.pages || 1
this.loadStatus = this.searchForm.pageNum >= this.totalPages ? 'nomore' : 'more'
} else {
this.loadStatus = 'nomore'
this.tui.toast(res.message)
}
}).catch(() => {
this.loadStatus = 'nomore'
this.tui.toast('优惠券加载失败')
})
},
formatAmount(value) {
const num = Number(value || 0)
if (Number.isNaN(num)) return '0'
return num % 1 === 0 ? String(num) : num.toFixed(2)
},
thresholdText(value) {
const amount = Number(value || 0)
if (!amount) return '无门槛'
return '满' + this.formatAmount(amount) + '可用'
},
sceneText(value) {
const sceneMap = {
0: '通用',
1: '外卖/买饭',
2: '快递/跑腿',
3: '二手交易',
4: '团购'
}
return sceneMap[value] || '通用'
},
issuerText(item) {
if (item.issuerType == 1) return '平台发放'
if (item.issuerType == 2) return '商家:' + (item.issuerId || '-')
return '发放方:' + (item.issuerId || '-')
},
formatDate(value) {
if (!value) return '-'
const text = String(value)
const match = text.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}))?/)
if (match) {
return `${match[1]}-${match[2]}-${match[3]} ${match[4] || '00'}:${match[5] || '00'}`
}
const date = new Date(text)
if (Number.isNaN(date.getTime())) return text
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hour = String(date.getHours()).padStart(2, '0')
const minute = String(date.getMinutes()).padStart(2, '0')
return `${year}-${month}-${day} ${hour}:${minute}`
}
}
}
</script>
@ -65,60 +185,238 @@
page {
width: 100%;
min-height: 100%;
font-size: 24rpx;
background: #F5F8F5;
background: #f4f8f5;
color: #00231C;
font-size: 24rpx;
}
.page1 {
.coupon-page {
width: 100%;
min-height: 100vh;
font-size: 24rpx;
position: relative;
display: flex;
flex-direction: column;
padding-bottom: 40rpx;
box-sizing: border-box;
}
.title {
flex-shrink: 0;
.title-wrap {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
background-size: 100%;
width: 100%;
height: 400rpx;
padding-bottom: 20rpx;
height: 390rpx;
position: relative;
}
.title-sreach{
.title-search {
width: 100%;
display: flex;
height: 200rpx;
height: 160rpx;
position: relative;
}
.back-btn{
.back-btn {
position: absolute;
left: 18rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
}
.title-name{
padding-top: 110rpx;
.title-name {
font-size: 36rpx;
font-weight: 700;
flex: 1;
text-align: center;
color: #063d32;
}
.hero-copy {
padding: 20rpx 48rpx 0;
}
.hero-title {
font-size: 48rpx;
font-weight: 800;
color: #063d32;
line-height: 1.3;
}
.hero-sub {
margin-top: 14rpx;
font-size: 26rpx;
color: rgba(0, 35, 28, 0.62);
}
.content {
flex: 1;
width: 95%;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
width: 92%;
margin: -48rpx auto 0;
position: relative;
z-index: 1;
}
.summary-card {
width: 100%;
min-height: 112rpx;
background: #ffffff;
border-radius: 28rpx;
box-shadow: 0 18rpx 42rpx rgba(8, 115, 93, 0.08);
padding: 20rpx 28rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
}
.summary-label {
font-size: 22rpx;
color: rgba(0, 35, 28, 0.48);
}
.summary-name {
margin-top: 4rpx;
font-size: 32rpx;
font-weight: 800;
color: #063d32;
}
.summary-count {
padding: 12rpx 22rpx;
border-radius: 999rpx;
background: linear-gradient(90deg, #e3ff96, #a6ffea);
color: #063d32;
font-size: 24rpx;
font-weight: 700;
}
.coupon-card {
width: 100%;
background: #fff;
border-radius: 24rpx;
margin-bottom: 18rpx;
overflow: hidden;
box-shadow: 0 12rpx 30rpx rgba(8, 115, 93, 0.06);
position: relative;
}
.coupon-card::before,
.coupon-card::after {
content: '';
position: absolute;
top: 200rpx;
left: 2.5%;
top: 106rpx;
width: 24rpx;
height: 24rpx;
border-radius: 50%;
background: #f4f8f5;
z-index: 2;
}
.coupon-card::before {
left: -12rpx;
}
.coupon-card::after {
right: -12rpx;
}
.coupon-main {
display: flex;
min-height: 168rpx;
}
.amount-box {
width: 214rpx;
background: linear-gradient(160deg, #08735d, #0fb894);
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20rpx 14rpx;
box-sizing: border-box;
}
.amount {
font-size: 54rpx;
font-weight: 900;
line-height: 1;
}
.amount text {
font-size: 28rpx;
margin-right: 4rpx;
}
.threshold {
margin-top: 10rpx;
font-size: 23rpx;
color: rgba(255, 255, 255, 0.86);
}
.coupon-info {
flex: 1;
padding: 22rpx 24rpx 18rpx;
box-sizing: border-box;
min-width: 0;
}
.coupon-title {
font-size: 30rpx;
font-weight: 800;
color: #063d32;
}
.tag-row {
display: flex;
flex-wrap: wrap;
margin: 10rpx 0 8rpx;
}
.box1 {
.tag-row text {
margin-right: 12rpx;
margin-bottom: 6rpx;
padding: 4rpx 12rpx;
border-radius: 999rpx;
background: rgba(8, 115, 93, 0.08);
color: #08735d;
font-size: 22rpx;
}
.info-row {
font-size: 22rpx;
line-height: 1.55;
color: rgba(0, 35, 28, 0.62);
word-break: break-all;
}
.empty-card {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
border-radius: 28rpx;
padding: 70rpx 30rpx;
box-sizing: border-box;
text-align: center;
box-shadow: 0 12rpx 30rpx rgba(8, 115, 93, 0.06);
}
.empty-icon {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
margin: 0 auto 24rpx;
background: linear-gradient(160deg, #e3ff96, #a6ffea);
color: #08735d;
line-height: 96rpx;
font-size: 40rpx;
font-weight: 800;
}
.empty-title {
font-size: 32rpx;
font-weight: 800;
color: #063d32;
}
.empty-sub {
margin-top: 12rpx;
font-size: 24rpx;
color: rgba(0, 35, 28, 0.5);
}
</style>

21
package2/partTimeJob/partTimeJobCenter.vue

@ -171,16 +171,25 @@
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.worker = uni.getStorageSync('worker')
this.getData()
this.refreshPage()
},
onLoad(option) {
},
methods: {
refreshPage() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.worker = uni.getStorageSync('worker') || {}
this.getData()
},
getData() {
this.tui.request("/mall/delivery/countOrderByStatusIndex", "POST", {workerId:uni.getStorageSync('worker').workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
const worker = uni.getStorageSync('worker') || {}
this.daiquCount = 0
this.daisongCount = 0
this.shouhouCount = 0
this.chapingCount = 0
this.orderData = {}
this.tui.request("/mall/delivery/countOrderByStatusIndex", "POST", {workerId:worker.workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
for(let i = 0;i<res.result.length;i++){
@ -197,9 +206,9 @@
}
}
}
that.$forceUpdate();
this.$forceUpdate();
} else {
that.tui.toast(res.message);
this.tui.toast(res.message);
return;
}
uni.hideLoading();

24
package2/seckill/seckillGroup.vue

@ -1,5 +1,6 @@
<template>
<view class="seckill-page">
<view class="fixed-header">
<view class="hero">
<image class="hero-bg" src="/static/images/img/miaosha.jpg" mode="scaleToFill"></image>
<view class="top-bar" :style="{'padding-top': menuButtonInfo.top + 'px'}">
@ -47,6 +48,9 @@
<view class="sort-item" :class="{'active': sortType === 'asc'}" @tap="setSort('asc')">价格升序</view>
<view class="sort-item" :class="{'active': sortType === 'desc'}" @tap="setSort('desc')">价格降序</view>
</view>
</view>
<view class="header-spacer" :style="{height: headerSpacerHeight}"></view>
<view class="goods-list">
<view class="goods-card" v-for="(item,index) in currentList" :key="item.id" @tap="grabItem(item)">
@ -149,6 +153,9 @@
computed: {
currentList() {
return this.seckillList
},
headerSpacerHeight() {
return 'calc(' + this.menuButtonInfo.top + 'px + 474rpx)'
}
},
onLoad() {
@ -424,6 +431,23 @@
box-sizing: border-box;
}
.fixed-header {
width: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 20;
padding-bottom: 12rpx;
background: linear-gradient(180deg, #ff6a2a 0%, #fff1df 260rpx, #fff8ee 520rpx);
box-sizing: border-box;
}
.header-spacer {
width: 100%;
flex-shrink: 0;
}
.hero {
min-height: 372rpx;
padding: 0 22rpx 24rpx;

2
package2/shop/afterService.vue

@ -62,7 +62,7 @@
<view style="height: 80rpx;border-top: 1px solid #eee;display: flex;">
<view style="flex: 1;">
<view class="btn" @tap="orderDetailOpen(item)" style="display: inline-block;">
{{item.mallOrder.otherOrder == 1 ? '快递/跑腿单' : '查看订单'}}
{{item.mallOrder.otherOrder == 1 ? '快递/跑腿单' : '查看商品'}}
</view>
<view class="btn group-detail-btn" v-if="item.mallOrder && item.mallOrder.orderType != 1" @tap.stop="getGroupOrders(item.mallOrder.id || item.orderId)" style="display: inline-block;">
拼团详情

39
package2/shop/merchantCenter.vue

@ -130,6 +130,22 @@
营业额
</view>
</view>
<view class="data22">
<view class="data222">
{{shopData.orderRevenueAndCount.afterSaleCount == undefined?0:shopData.orderRevenueAndCount.afterSaleCount}}
</view>
<view class="data333">
售后笔数
</view>
</view>
<view class="data22">
<view class="data222">
{{shopData.orderRevenueAndCount.afterSaleAmount == undefined?0:shopData.orderRevenueAndCount.afterSaleAmount}}
</view>
<view class="data333">
售后金额
</view>
</view>
</view>
</view>
<view class="shop-order">
@ -207,7 +223,10 @@
businessStatus:1,
shop:{},
shopConfig:{},
shopData:{},
shopData:{
orderStatusCount:[],
orderRevenueAndCount:{}
},
daixiaofei:0,
daichucan:0,
daiquhuo:0,
@ -215,19 +234,28 @@
}
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.getBusinessStatus()
this.getData()
this.refreshPage()
},
onLoad(option) {
},
methods: {
refreshPage(){
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.getBusinessStatus()
this.getData()
},
getData(){
this.refreshShopConfig()
this.daixiaofei = 0
this.daichucan = 0
this.daiquhuo = 0
this.daisongda = 0
this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => {
if (res.code == 200) {
this.shopData = res.result
this.shopData = res.result || {}
this.shopData.orderStatusCount = this.shopData.orderStatusCount || []
this.shopData.orderRevenueAndCount = this.shopData.orderRevenueAndCount || {}
for(let i=0;i<this.shopData.orderStatusCount.length;i++){
if(this.shopData.orderStatusCount[i].counttype){
if(this.shopData.orderStatusCount[i].counttype == 'daisong'){
@ -241,6 +269,7 @@
}
}
}
this.$forceUpdate()
} else {
this.tui.toast(res.message)
}

291
package2/shop/orderDetail.vue

@ -128,6 +128,66 @@
</view>
</view>
</view>
<view class="box1 refund-box" v-if="data.mallRefundRecord != null && data.mallRefundRecord.length > 0">
<view class="refund-title">
退款/售后
</view>
<view class="refund-card" v-for="(item,index) in data.mallRefundRecord" :key="index">
<view class="refund-row">
<view class="refund-label">申请时间</view>
<view class="refund-value">{{item.createTime | formatISOTime}}</view>
</view>
<!-- <view class="refund-row">
<view class="refund-label">金额</view>
<view class="refund-value refund-amount">{{formatAmount(item.refundAmount)}}</view>
</view> -->
<view class="refund-goods-card" v-for="(goods,goodsIndex) in item.items" :key="goodsIndex"
v-if="item.items != null && item.items.length > 0">
<view class="refund-goods-img">
<img :src="goods.productPicture" alt="">
</view>
<view class="refund-goods-content">
<view class="refund-goods-name">{{goods.productName}}</view>
<view class="refund-goods-spec">{{goods.specs | delNode}}</view>
<view class="refund-goods-bottom">
<text>X{{goods.quantity}}</text>
<text>{{formatAmount(goods.price)}}</text>
</view>
<view class="refund-goods-bottom" v-if="goods.packageFee != undefined && goods.packageFee > 0 && data.packageFee > 0">
<text>餐盒费</text>
<text>{{formatAmount(goods.packageFee)}}</text>
</view>
</view>
</view>
<view class="refund-info-row">
<view class="refund-info-label">原因</view>
<view class="refund-info-value">{{item.reason != null ? item.reason : ''}}</view>
</view>
<view class="refund-info-row" v-if="getPictureList(item.pictures).length > 0">
<view class="refund-info-label">图片</view>
<view class="refund-info-value refund-image-list">
<image class="refund-image" v-for="(picture,pictureIndex) in getPictureList(item.pictures)"
:key="pictureIndex" :src="picture" mode="aspectFill"
@tap="previewRefundImage(item.pictures,pictureIndex)"></image>
</view>
</view>
<view class="refund-info-row">
<view class="refund-info-label">退款/售后类型</view>
<view class="refund-info-value">{{getRefundTypeText(item)}}<text v-if="item.refundTypeStatus != null"> | {{getRefundReasonTypeText(item)}}</text></view>
</view>
<view class="refund-info-row">
<view class="refund-info-label">退款/售后状态</view>
<view class="refund-info-value">{{getRefundStatusText(item)}}</view>
</view>
<view class="auto-refund-tip" v-if="isRefundPending(item)">
{{getAutoRefundTime(item.createTime)}} 之前未处理系统会自动退款
</view>
<view class="refund-info-row" v-if="item.successTime != null">
<view class="refund-info-label">处理退款/售后时间</view>
<view class="refund-info-value">{{item.successTime | formatISOTime}}</view>
</view>
</view>
</view>
<view class="box1">
<view class="">
<view style="display: flex;height: 60rpx;line-height: 60rpx;">
@ -355,6 +415,105 @@
if (value === undefined || value === null || value === '') return '0';
return value;
},
toAmount(value) {
let num = Number(value);
return isNaN(num) ? 0 : num;
},
getSettlementAmount(item) {
if (!item) return 0;
let price = this.toAmount(item.goodsAmount) + this.toAmount(item.packageFee);
if (item.status == 8 || this.hasMerchantFullRefund(item.mallRefundRecord)) {
return 0;
}
price -= this.getMerchantGoodsRefundAmount(item.mallRefundRecord);
return Math.max(0, Number(price.toFixed(2)));
},
isRefundAgreed(item) {
return item && (item.status == 1 || item.status == 4);
},
hasMerchantFullRefund(list) {
if (!Array.isArray(list)) return false;
for (let i = 0; i < list.length; i++) {
let item = list[i];
if (this.isRefundAgreed(item) && item.refundType == 3 && (item.refundTypeStatus == 1 || item.refundTypeStatus == 3)) {
return true;
}
}
return false;
},
getMerchantGoodsRefundAmount(list) {
if (!Array.isArray(list)) return 0;
let amount = 0;
for (let i = 0; i < list.length; i++) {
let item = list[i];
if (this.isRefundAgreed(item) && item.refundType == 1) {
amount += this.getRefundGoodsAmount(item);
}
}
return Number(amount.toFixed(2));
},
getRefundGoodsAmount(item) {
if (!item || !Array.isArray(item.items) || item.items.length == 0) {
return this.toAmount(item && item.refundAmount);
}
let amount = 0;
for (let i = 0; i < item.items.length; i++) {
let goods = item.items[i];
let quantity = this.toAmount(goods.quantity);
quantity = quantity > 0 ? quantity : 1;
amount += (this.toAmount(goods.price) + this.toAmount(goods.packageFee)) * quantity;
}
return Number(amount.toFixed(2));
},
getPictureList(pictures) {
if (pictures == null || pictures === '') return [];
if (Array.isArray(pictures)) {
return pictures.filter(item => item != null && item !== '');
}
return String(pictures).split(',').map(item => item.trim()).filter(item => item !== '');
},
previewRefundImage(pictures, index) {
const urls = this.getPictureList(pictures);
if (urls.length === 0) return;
uni.previewImage({
urls,
current: urls[index]
});
},
getRefundTypeText(item) {
if (!item) return '';
if (item.refundType == 1) return '退商品';
if (item.refundType == 2) return '退配送费';
return '全额退款';
},
getRefundReasonTypeText(item) {
if (!item) return '';
if (item.refundTypeStatus == 1) return '商家原因';
if (item.refundTypeStatus == 2) return '配送员原因';
if (item.refundTypeStatus == 3) {
return item.linkId && String(item.linkId).indexOf('W') != -1 ? '配送员原因' : '商家原因';
}
return '平台退款';
},
getRefundStatusText(item) {
if (!item) return '';
if (item.status == 0) return '处理退款中';
if (item.status == 1) return '同意退款';
if (item.status == 2) return '拒绝退款';
if (item.status == 3) return '处理售后中';
if (item.status == 4) return '同意售后';
return '拒绝售后';
},
isRefundPending(item) {
return item && (item.status == 0 || item.status == 3);
},
getAutoRefundTime(value) {
if (!value) return '';
const date = new Date(value);
if (isNaN(date.getTime())) return '';
date.setHours(date.getHours() + 1);
return this.$options.filters.formatISOTime(date);
},
getHeaderTimeLabel(item) {
if (item && item.deliveryType == 1) return item.deliveryInfo && item.deliveryInfo.finishTime ? '送达时间' : '预计送达'
if (item && item.payTime) return '支付时间'
@ -380,7 +539,7 @@
that.data = res.result
//
let price = Number(that.data.goodsAmount || 0) + Number(that.data.packageFee || 0)
let price = that.getSettlementAmount(that.data)
let shopTakeaway = uni.getStorageSync('shopTakeaway') || {}
if(that.data.orderType == 1){
that.data.chouyong = (price/100 * Number(shopTakeaway.commissionRateOne || 0)).toFixed(2)
@ -572,6 +731,136 @@
font-size: 22rpx;
line-height: 30rpx;
}
.refund-title {
width: 100%;
height: 60rpx;
line-height: 60rpx;
font-size: 32rpx;
font-weight: 700;
}
.refund-card {
margin-top: 12rpx;
padding: 20rpx;
background: rgba(247, 248, 248, 0.8);
border-radius: 20rpx;
}
.refund-row {
display: flex;
height: 70rpx;
line-height: 70rpx;
}
.refund-label {
flex: 1;
color: #777;
font-weight: 700;
}
.refund-value {
color: #00231C;
font-weight: 700;
text-align: right;
}
.refund-amount {
color: red;
font-size: 30rpx;
}
.refund-goods-card {
display: flex;
padding: 18rpx;
margin: 12rpx 0;
background: #fff;
border-radius: 18rpx;
box-sizing: border-box;
}
.refund-goods-img {
width: 132rpx;
height: 132rpx;
flex-shrink: 0;
border-radius: 18rpx;
overflow: hidden;
background: #f0f5f3;
}
.refund-goods-img img {
width: 100%;
height: 100%;
border-radius: 18rpx;
}
.refund-goods-content {
flex: 1;
min-width: 0;
padding-left: 18rpx;
}
.refund-goods-name {
color: #00231C;
font-size: 28rpx;
font-weight: 700;
line-height: 38rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.refund-goods-spec {
margin-top: 8rpx;
color: #777;
font-size: 22rpx;
line-height: 32rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.refund-goods-bottom {
display: flex;
justify-content: space-between;
margin-top: 12rpx;
color: #00231C;
font-size: 24rpx;
font-weight: 700;
line-height: 34rpx;
}
.refund-info-row {
display: flex;
align-items: flex-start;
padding: 16rpx 0;
border-bottom: 1px solid #eee;
}
.refund-info-label {
width: 180rpx;
flex-shrink: 0;
color: #777;
font-weight: 700;
line-height: 38rpx;
}
.refund-info-value {
flex: 1;
min-width: 0;
color: #00231C;
font-weight: 700;
line-height: 38rpx;
text-align: right;
word-break: break-all;
}
.refund-image-list {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
gap: 12rpx;
}
.refund-image {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
background: #f0f5f3;
}
.auto-refund-tip {
margin: 8rpx 0 12rpx;
padding: 16rpx 18rpx;
border-radius: 16rpx;
background: rgba(255, 244, 232, 0.9);
border: 1rpx solid rgba(255, 180, 118, 0.48);
color: #b4572d;
font-size: 24rpx;
font-weight: 700;
line-height: 34rpx;
}
.group-content{
background: #fff;
width: 300px;

Loading…
Cancel
Save