wangfukang 3 weeks ago
parent
commit
eb885ef6b9
  1. 68
      package2/group/shopEvaluate.vue
  2. 266
      package2/myCenter/addGoods.vue
  3. 277
      package2/myCenter/attributeList.vue
  4. 124
      package2/myCenter/goodsList.vue
  5. 34
      package2/myCenter/partTimeJobRegister.vue
  6. 19
      package2/partTimeJob/partTimeJobCenter.vue
  7. 7
      package2/partTimeJob/workerOrderList.vue
  8. 188
      package2/shop/afterService.vue
  9. 3
      package2/shop/businessInfo.vue
  10. 15
      package2/shop/merchantCenter.vue
  11. 71
      package2/shop/orderDetail.vue
  12. 97
      package2/shop/shopOrderList.vue

68
package2/group/shopEvaluate.vue

@ -7,7 +7,7 @@
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
商家评价
{{isMerchant == 2 ? '配送评价' : '商家评价'}}
</view>
</view>
</view>
@ -80,18 +80,12 @@
<image v-for="(pic,picIndex) in getPictureList(item.picture)" :key="picIndex"
@tap="largeImg(item.picture, picIndex)" :src="pic" mode="aspectFill"></image>
</view>
<view class="reply-card" v-for="(item1,index1) in item.comments" :key="index1" :class="{'expanded': item1.isOpen}">
<!-- 标题行商家回复 + 展开/收起按钮 -->
<view class="reply-card" v-for="(item1,index1) in item.comments" :key="index1">
<view class="reply-header">
<!-- 回复内容区域动态类控制展开/折叠 -->
<view class="reply-content" :class="{ collapsed: !item1.isOpen, expanded: item1.isOpen }">
<view class="reply-content">
<text>{{item1.createByName}} : {{ item1.remark }}</text>
<image :src="item1.picture" @tap="largeImg(item1.picture)" v-if="item1.picture" class="upload-img" mode="aspectFill" style="margin-top: 10px;border-radius: 10px;"></image>
</view>
<view class="reply-expand-btn" @click="toggleReply(index,index1)">
<text v-if="!item1.isOpen">展开</text>
<text v-else>收起</text>
</view>
</view>
</view>
<view class="" v-if="(isMerchant == 1 || isMerchant == 2)">
@ -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<that.shopComments[i].comments.length;m++){
that.shopComments[i].comments[m].isOpen = false
}
}
}
that.total = res.result.pages; // pages =
that.$forceUpdate()
@ -299,10 +288,6 @@
uni.hideLoading();
}).catch((res) => {});
},
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;

266
package2/myCenter/addGoods.vue

@ -11,7 +11,7 @@
</view>
</view>
</view>
<view class="formBox">
<scroll-view scroll-y class="formBox" :scroll-into-view="scrollTarget" scroll-with-animation>
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="170rpx">
<uni-forms-item label="商品名称" name="productName" required>
<uni-easyinput type="text" v-model="formData.productName" placeholder="请输入商品名称" trim="all" />
@ -38,12 +38,12 @@
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
</view>
</uni-forms-item>
<uni-forms-item label="商品格" name="attributeListPrice">
<uni-forms-item label="商品格" name="attributeListPrice">
<view>
<view v-for="(item,index) in formData.attributeListPrice" :key="index" style="display: flex;margin-top:10rpx;">
<input class="content-input" v-model="item.specName" v-if="item.specName != ''&& formData.attributeListPrice.length != 1" style="padding-right: 20rpx;" disabled />
<input class="content-input" v-model="item.specPrice" style="padding-right: 20rpx;margin-right: 20rpx;" @click="changePrice(index)" placeholder="商品价格" />
<input class="content-input" v-model="item.specNum" style="padding-right: 20rpx;" @click="changecount(index)" placeholder="商品库存"/>
<input type="digit" min="0.01" class="content-input" v-model="item.specPrice" style="padding-right: 20rpx;margin-right: 20rpx;" @click="changePrice(index)" placeholder="商品价格" />
<input type="number" class="content-input" v-model="item.specNum" style="padding-right: 20rpx;" @input="changeSpecNum($event,index)" placeholder="商品库存"/>
<button @click="deldantiaoguige(index)" v-if="formData.attributeListPrice.length>1" style="width: 240rpx;height: 60rpx;line-height: 60rpx;color: red;border:none;background: #fff;">删除</button>
</view>
<!-- <view @click="checkSpec('guige')" style="margin-top: 5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: rgba(0, 35, 28, 1);border-radius: 30px;color: rgba(166, 255, 234, 1);">
@ -54,8 +54,8 @@
<uni-forms-item label="拼团信息" name="productGroupBuyPrices">
<view>
<view v-for="(item,index) in formData.productGroupBuyPrices" :key="index" style="display: flex;margin-top:10rpx;">
<input class="content-input" v-model="item.groupCount" style="padding-right: 20rpx;margin-right: 20rpx;width: 100px;" placeholder="成团人数" />
<input class="content-input" v-model="item.groupPrice" style="padding-right: 20rpx;width: 100px;" placeholder="团价格"/>
<input type="number" min="2" class="content-input" v-model="item.groupCount" style="padding-right: 20rpx;margin-right: 20rpx;width: 100px;" placeholder="成团人数" />
<input type="digit" class="content-input" v-model="item.groupPrice" style="padding-right: 20rpx;width: 100px;" placeholder="团价格"/>
<view @click="delGroup(index)" v-if="formData.productGroupBuyPrices.length>1" style="width: 240rpx;height: 60rpx;line-height: 60rpx;color: red;border:none;background: #fff;">删除</view>
</view>
<view @click="addGroup()" style="margin-top: 10rpx;width: 160rpx;height: 60rpx;text-align: center;line-height: 60rpx;background: rgba(0, 35, 28, 1);border-radius: 60rpx;color: rgba(166, 255, 234, 1);">
@ -102,12 +102,18 @@
</view>
</view>
</uni-forms-item>
<uni-forms-item label="餐盒费" name="lunchBox">
<input type="digit" class="content-input" v-model="formData.lunchBox" placeholder="请输入餐盒费">
</uni-forms-item>
<uni-forms-item label="起售数量" name="startPayNum">
<input type="digit" class="content-input" v-model="formData.startPayNum" placeholder="请输入起售数量">
</uni-forms-item>
<view id="lunchBoxField" v-if="shop.merchantType == 1">
<uni-forms-item label="餐盒费" name="lunchBox">
<input type="digit" class="content-input" v-model="formData.lunchBox" placeholder="请输入餐盒费"
:adjust-position="false" :cursor-spacing="160" @focus="focusFormField('lunchBoxField')" @blur="blurFormField">
</uni-forms-item>
</view>
<view id="startPayNumField">
<uni-forms-item label="起售数量" name="startPayNum">
<input type="number" class="content-input" v-model="formData.startPayNum" @input="changeStartPayNum" placeholder="请输入起售数量"
:adjust-position="false" :cursor-spacing="160" @focus="focusFormField('startPayNumField')" @blur="blurFormField">
</uni-forms-item>
</view>
<uni-forms-item label="详细图文" name="startPayNum">
<view class="xiangxi-box">
<sp-editor
@ -123,33 +129,37 @@
<view>
<button @tap.stop="submit()">保存</button>
</view>
</view>
<view class="keyboard-safe-bottom"></view>
</scroll-view>
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view style="height:900rpx;display: flex;">
<view class="content-left">
<view class="attr-popup-body">
<scroll-view scroll-y class="content-left">
<view class="left-box" v-for="(item,index) in categoryData" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 100rpx;line-height: 100rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.title}}</text>
</view>
</view>
<view style="flex: 1;position: relative;padding: 20rpx;">
<view v-for="(item,index) in categorySonData" :key="index" @tap="checkSpecValue(index)" class="content-low" :class="item.checked?'checked':''">
{{item.title}}
</view>
<view style="position: absolute;bottom: 0;">
<view style="font-size: 28rpx;line-height: 60rpx;font-weight: 700;">
</scroll-view>
<view class="attr-popup-right">
<scroll-view scroll-y class="attr-value-scroll">
<view v-for="(item,index) in categorySonData" :key="index" @tap="checkSpecValue(index)" class="content-low" :class="item.checked?'checked':''">
{{item.title}}
</view>
</scroll-view>
<view class="canbuy-box" v-if="modalclassType == 'shuxing'">
<view class="canbuy-label">
该分类可选数量
</view>
<input type="digit" class="content-input" v-model="currentCanbuy" placeholder="该分类可选几个(默认1)">
</view>
</view>
</view>
<view slot="footer" style="display: flex;padding-left: 40rpx;margin-top: 20rpx;">
<button type="text" @tap="$refs.addTypeDialog.close()" style="margin-right: 20rpx;">取消</button>
<button type="text" @tap="guigeSubmit">提交</button>
<view class="attr-popup-footer">
<view class="attr-popup-btn plain" @tap="$refs.addTypeDialog.close()">取消</view>
<view class="attr-popup-btn primary" @tap="guigeSubmit">提交</view>
<view class="attr-manage-entry" v-if="modalclassType == 'shuxing'" @tap="goAttributeList">维护属性</view>
</view>
</view>
</uni-popup>
@ -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{

277
package2/myCenter/attributeList.vue

@ -26,27 +26,20 @@
</view>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此属性?'" showCancelButton="true" @cancel="show = false"
@confirm="delItemModal"></u-modal>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
@confirm="dialogInputConfirm" @close="dialogClose">
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="delDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-content attr-name-popup">
<view class="add-popup-title">
<text>编辑属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
<uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
</view>
<view class="add-popup-container">
<view style="width: 90%;margin: 40rpx auto 0;">
属性名称
<view class="form-field">
<view class="form-label">属性名称</view>
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入属性值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;color: #fff;display: flex;position: absolute;bottom: 0;">
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认属性'" @tap="dialogDel">删除</view>
<view style="flex: 1;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view>
<view class="popup-actions">
<view class="popup-action danger" v-if="inputVal != '默认属性'" @tap="dialogDel">删除</view>
<view class="popup-action primary" @tap="dialogInputConfirm">确认</view>
</view>
<!-- <ul>
<li v-for="(item,index) in defaultList" :key="index">
@ -66,16 +59,16 @@
</uni-popup>
<!-- 添加属性弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-content attr-name-popup">
<view class="add-popup-title">
<text>新增属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
<uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
</view>
<view class="add-popup-container">
<input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;"
placeholder="请输入属性名称">
<view class="form-field">
<view class="form-label">属性名称</view>
<input type="text" v-model="typeText" class="popup-input" placeholder="请输入属性名称">
</view>
<!-- <ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
@ -97,28 +90,32 @@
</uni-popup>
<uni-popup ref="attrValueDialog" background-color="#fff">
<view class="add-popup-content" style="width: 640rpx;max-height: 600px;overflow: scroll;">
<view class="add-popup-content attr-value-popup">
<view class="add-popup-title">
<text>管理属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
<uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
</view>
<view class="add-popup-container">
<view>
<text style="color:red;font-size:22rpx;">*点击+号可新增专属自己店铺的属性值</text>
<view class="popup-tip">
点击右侧+号可新增本店铺专属属性值
</view>
<view style="display: flex;font-weight: 700;font-size: 16px;height: 50px;line-height: 50px;padding-right: 10px;">
<view style="flex: 1;">
<view class="attr-value-header">
<view class="attr-value-title">
属性列表
</view>
<uni-icons type="plusempty" @tap="toggle()" color="#5fd9ee" size="20"></uni-icons>
<view class="add-value-btn" @tap="toggle()">
<uni-icons type="plusempty" color="#00231C" size="18"></uni-icons>
<text>新增</text>
</view>
</view>
<ul>
<ul class="attr-value-list">
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.value}}</view>
<view class="btn" v-if="inputVal != '默认属性'" @tap="editValue(item)">修改</view>
<view class="btn" v-if="inputVal != '默认属性'" @tap="delValue(item)">删除</view>
<view class="value-actions" v-if="inputVal != '默认属性'">
<view class="btn" @tap="editValue(item)">修改</view>
<view class="btn danger-text" @tap="delValue(item)">删除</view>
</view>
</view>
</li>
</ul>
@ -162,16 +159,23 @@
</view>
</view>
</uni-popup>
<uni-popup ref="addDialog" type="dialog">
<uni-popup-dialog
ref="addClose"
mode="input"
:title="'请输入属性名'"
v-model="specVal"
placeholder="请输入属性名称"
@confirm="addSpec"
@close="dialogClose">
</uni-popup-dialog>
<uni-popup ref="addDialog" background-color="#fff">
<view class="add-popup-content value-edit-popup">
<view class="add-popup-title">
<text>{{isEdieValue ? '修改属性值' : '新增属性值'}}</text>
<uni-icons class="popup-close" @tap='$refs.addDialog.close()' type="closeempty" color='#777' size="18"></uni-icons>
</view>
<view class="add-popup-container">
<view class="form-field">
<view class="form-label">属性值名称</view>
<input type="text" v-model="specVal" class="popup-input" placeholder="请输入属性值名称">
</view>
<view class="popup-actions">
<view class="popup-action plain" @tap="$refs.addDialog.close()">取消</view>
<view class="popup-action primary" @tap="addSpec(specVal)">确认</view>
</view>
</view>
</view>
</uni-popup>
</view>
@ -398,6 +402,9 @@
},
close(){
this.$refs.attrValueDialog.close()
this.$refs.delDialog.close()
this.$refs.addTypeDialog.close()
this.$refs.addDialog.close()
},
handleBlur(e){
this.inputVal = e.detail.value
@ -458,6 +465,10 @@
},
addSpec(e){
let that = this;
if(e == ''){
that.tui.toast("请输入属性值名称")
return
}
if(this.isEdieValue){
that.tui.request("/app/productAttributeValue/edit", "post", {
id: that.valueEditId,
@ -465,6 +476,7 @@
}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("修改成功")
that.$refs.addDialog.close()
that.goGategoryLow(that.editItem)
that.$forceUpdate()
} else {
@ -479,6 +491,7 @@
}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast("添加成功")
that.$refs.addDialog.close()
that.goGategoryLow(that.editItem)
that.$forceUpdate()
} else {
@ -551,15 +564,12 @@
default:
}
that.$refs.delDialog.close()
that.$refs.inputClose.val = ''
this.inputVal = ""
},
//
dialogClose() {
this.inputVal = '';
this.specVal = '';
this.$refs.inputClose.val = ''
this.$refs.addClose.val = ''
},
//
@ -850,13 +860,19 @@
left: 20rpx;
}
.btn{
flex: 1;
line-height: 25px;
min-width: 88rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
height: 25px;
color: #1E90FF;
border-radius: 7px;
margin: 5px 0 0 10px;
color: #00231C;
border-radius: 48rpx;
background: rgba(166, 255, 234, 0.45);
margin-left: 16rpx;
font-size: 24rpx;
}
.danger-text {
color: #FF5A4F;
background: #FFF0E6;
}
.title-search {
@ -908,24 +924,90 @@
border-radius: 70rpx;
}
.add-popup-content {
align-items: center;
justify-content: center;
padding: 30rpx;
width: 100%;
height: 325rpx;
background-color: #fff;
overflow: scroll;
width: 640rpx;
max-width: 92vw;
max-height: 82vh;
background: #fff;
border-radius: 28rpx;
padding: 34rpx 30rpx 30rpx;
box-sizing: border-box;
overflow: hidden;
}
.attr-name-popup {
width: 100vw;
max-width: 100vw;
border-radius: 28rpx 28rpx 0 0;
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
}
.add-popup-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
text-align: left;
position: relative;
color: #00231C;
padding-right: 70rpx;
}
.popup-close {
position: absolute !important;
top: 4rpx;
right: 0;
width: 48rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
border-radius: 50%;
background: #F7F8F8;
}
.add-popup-container {
margin-top: 20rpx;
margin-top: 28rpx;
}
.form-field {
margin-top: 26rpx;
}
.form-label {
font-size: 28rpx;
font-weight: 700;
color: #00231C;
margin-bottom: 16rpx;
}
.popup-input {
width: 100%;
height: 84rpx;
line-height: 84rpx;
border: 2rpx solid #E8ECEB;
background: #F7F8F8;
border-radius: 18rpx;
box-sizing: border-box;
padding: 0 24rpx;
font-size: 28rpx;
}
.popup-actions {
display: flex;
gap: 20rpx;
margin-top: 42rpx;
}
.popup-action {
flex: 1;
height: 84rpx;
line-height: 84rpx;
text-align: center;
border-radius: 84rpx;
font-size: 30rpx;
font-weight: 700;
}
.popup-action.primary {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
}
.popup-action.danger {
background: #FFF0E6;
color: #FF5A4F;
}
.popup-action.plain {
background: #F7F8F8;
color: #00231C;
}
.title-name {
padding-top: 110rpx;
@ -939,27 +1021,88 @@
height: 80rpx;
color: #fff;
line-height: 80rpx;
margin-top: 50rpx;
margin-top: 42rpx;
}
.add-popup-btn {
flex: 1;
text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB);
height: 84rpx;
line-height: 84rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
border-radius: 84rpx;
font-size: 30rpx;
font-weight: 700;
}
.attr-value-popup {
width: 680rpx;
padding-bottom: 20rpx;
}
.value-edit-popup {
width: 620rpx;
}
.popup-tip {
padding: 18rpx 22rpx;
background: rgba(166, 255, 234, 0.24);
color: #005849;
border-radius: 16rpx;
font-size: 24rpx;
line-height: 36rpx;
}
.attr-value-header {
display: flex;
align-items: center;
height: 88rpx;
}
.attr-value-title {
flex: 1;
font-size: 30rpx;
font-weight: 700;
color: #00231C;
}
.add-value-btn {
display: flex;
align-items: center;
height: 58rpx;
line-height: 58rpx;
padding: 0 22rpx;
border-radius: 58rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
font-size: 26rpx;
font-weight: 700;
color: #00231C;
}
.add-value-btn text {
margin-left: 6rpx;
}
.attr-value-list {
max-height: 58vh;
overflow-y: auto;
padding-bottom: 10rpx;
}
.title-fur {
width: 95%;
height: 70rpx;
width: 100%;
min-height: 82rpx;
margin: 0 auto;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
.name {
font-size: 30rpx;
width: 65%;
height: 70rpx;
line-height: 70rpx;
flex: 1;
min-width: 0;
line-height: 40rpx;
color: #00231C;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.value-actions {
display: flex;
align-items: center;
}
.content-fur {
padding-bottom: 25rpx;
}
@ -985,7 +1128,7 @@
}
@media screen and (min-width: 760px) {
.add-popup-content{
height: 700px !important;
max-height: 700px !important;
}
.vue-ref{
padding-bottom:0 !important;

124
package2/myCenter/goodsList.vue

@ -12,15 +12,15 @@
</view>
</view>
</view>
<view style="width: 100%;display: flex;height: 100%;padding-bottom: 60rpx;padding-top: 28%;position: fixed;top: 0;z-index:80;">
<view class="content-left">
<view class="goods-layout">
<scroll-view scroll-y class="content-left">
<view class="left-box" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right" style="padding-bottom: 140rpx;margin-bottom: 200rpx;">
</scroll-view>
<scroll-view scroll-y class="content-right" lower-threshold="80" @scrolltolower="loadMore">
<view class="right-box" v-for="(item,index) in shopList" :key="index">
<view style="position: relative;display: flex;">
<view class="box-left" @tap="largeImg(item)">
@ -35,7 +35,11 @@
{{item.productName == null ?'':item.productName}}
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num"></view>
<view class="goods-tag-row" v-if="item.isPush == 1 || item.isMust == 1">
<text class="goods-tag recommend" v-if="item.isPush == 1">推荐</text>
<text class="goods-tag must" v-if="item.isMust == 1">必点</text>
</view>
<view class="box-right-num" v-else></view>
<view class="box-right-price">
<view class="price-box">
<text>{{item.attributeListPrice | sliceMsg}}</text>
@ -92,7 +96,11 @@
<view class="box-right-name">
{{item.productName == null ?'':item.productName}}
</view>
<view class="box-right-num"></view>
<view class="goods-tag-row" v-if="item.isPush == 1 || item.isMust == 1">
<text class="goods-tag recommend" v-if="item.isPush == 1">推荐</text>
<text class="goods-tag must" v-if="item.isMust == 1">必点</text>
</view>
<view class="box-right-num" v-else></view>
<view class="box-right-price">
<view class="price-box">
<text>{{item.lunchBox}}</text>
@ -131,13 +139,13 @@
</view>
</view>
</view>
<u-loadmore v-if="showLoadmore" :status="status" />
</scroll-view>
</view>
<view class="bottom-box">
<view class="bottom-btn" @tap="goDetail('goods')" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">新增商品</view>
<view class="bottom-btn" @tap="$refs.payDialog.open()">更多</view>
</view>
<u-loadmore :status="status" />
<!-- 弹出输入框 -->
<uni-popup ref="payDialog" background-color="#fff">
<view class="popup-pay-content">
@ -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.shopList1.length;i++){
this.shopList1[i].isShow = false
}
this.pages = res.result.pages
} else {
this.shopList1 = []
this.status = 'nomore';
if (this.pages == 1) {
this.shopList = res.result.records
if (this.pageNum == 1) {
this.shopList = records
} else {
this.shopList = [...this.shopList, ...res.result.records]
this.shopList = [...this.shopList, ...records]
}
for(let i=0;i<this.shopList.length;i++){
this.shopList[i].isShow = false
}
this.pages = res.result.pages
}
this.status = this.pageNum >= 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;

34
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);

19
package2/partTimeJob/partTimeJobCenter.vue

@ -19,12 +19,12 @@
<view class="title22">
<view style="display: flex;font-size: 32rpx;font-weight: 700;">
{{worker.workerName}}
<img v-if="isBaozhang"
<!-- <img v-if="isBaozhang"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d27fa14c6bb7426482ed7821919d3aa7.png"
alt="" style="width: 140rpx;height: 32rpx;background-size: 100%;margin: 20rpx;">
<img v-else
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/176715c0f8ea41e7a9be8fa1c3edd670.png"
alt="" style="width: 140rpx;height: 32rpx;background-size: 100%;margin: 20rpx;">
alt="" style="width: 140rpx;height: 32rpx;background-size: 100%;margin: 20rpx;"> -->
</view>
</view>
<view class="title33" @tap="goDetail('xx')">
@ -150,6 +150,14 @@
排行
</view>
</view>
<view class="menu22" @tap="goDetail('tuiRecord')">
<view class="menu33">
<img src="/static/images/dingdan/dd1.png" alt="" />
</view>
<view class="menu44">
退款/售后记录
</view>
</view>
</view>
</view>
</view>
@ -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 = {

7
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) {

188
package2/shop/afterService.vue

@ -7,13 +7,22 @@
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
待退款/售后{{returnCount}}
{{pageTitle}}{{returnCount}}
</view>
</view>
</view>
</view>
<view class="after-service-fixed-holder"></view>
<view class="content">
<view class="record-search" v-if="mode == 'record'">
<picker mode="date" :value="searchDate" @change="dateChange">
<view class="record-date-picker">
{{searchDate ? '申请日期:' + searchDate : '选择申请日期'}}
</view>
</picker>
<view class="record-search-btn" @tap="searchRecordByDate">搜索</view>
<view class="record-clear-btn" v-if="searchDate" @tap="clearDateSearch">清空</view>
</view>
<!-- <view class="box1" style="display: flex;">
<view class="">
待退款/售后{{returnCount}}
@ -29,20 +38,30 @@
<!-- <text>已退款</text> -->
</view>
<view>
{{item.status == 0?'待退款':item.status == 3?'待售后':""}}
{{getRefundStatusText(item)}}
</view>
</view>
<view class="refund-info">
<view class="refund-info-content">
<view class="refund-main">
<view class="refund-text">
<view>退款原因: <text style="font-weight: 700;color:#00231C;">{{item.refundTypeStatus == 1?'商家原因':item.refundTypeStatus == 2?'配送原因':item.refundTypeStatus == 3?'商家/配送都有原因(需要退配送费)':item.refundTypeStatus == 4?'平台退款':""}}</text></view>
<view>退款原因: <text style="font-weight: 700;color:#00231C;">{{getRefundTypeStatusText(item)}}</text></view>
<view>退款类型: <text style="font-weight: 700;color:#00231C;">{{item.refundType == 1?'退商品':item.refundType == 2?'退配送费':item.refundType == 3?'全额退款':""}}</text></view>
<view>退款类型: <text style="font-weight: 700;color:#00231C;">{{getRefundTypeText(item)}}</text></view>
<view class="refund-reason-row">
退款/售后原因:
<text class="refund-reason-text">{{item.reason || '无'}}</text>
</view>
<view v-if="mode == 'record'">
处理结果: <text class="refund-result-text">{{getRefundStatusText(item)}}</text>
</view>
<view class="refund-reason-row" v-if="mode == 'record' && item.rejectReason">
不同意原因:
<text class="refund-reason-text">{{item.rejectReason}}</text>
</view>
<view v-if="mode == 'record' && item.successTime">
处理时间: <text class="refund-result-text">{{item.successTime | formatISOTime}}</text>
</view>
<view class="refund-pictures-row" v-if="getPictureList(item.pictures).length > 0">
<view class="refund-pictures-label">退款/售后原因图片:</view>
<view class="refund-pictures">
@ -62,20 +81,23 @@
<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;">
拼团详情
</view>
</view>
<view class="btn" :class="{'btn-disabled': isSubmittingRefund(item)}" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
<view class="btn" v-if="mode != 'record'" :class="{'btn-disabled': isSubmittingRefund(item)}" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
{{isSubmittingRefund(item) ? '处理中' : '不同意'}}
</view>
<view class="btn" :class="{'btn-disabled': isSubmittingRefund(item)}" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;">
<view class="btn" v-if="mode != 'record'" :class="{'btn-disabled': isSubmittingRefund(item)}" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;">
{{isSubmittingRefund(item) ? '处理中' : '同意'}}
</view>
</view>
</view>
<view class="empty-box" v-if="returnData.length == 0">
暂无{{pageTitle}}
</view>
<!-- 拼团详情弹窗 -->
<uni-popup ref="pintuanPopup" background-color="transparent">
@ -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;

3
package2/shop/businessInfo.vue

@ -93,9 +93,6 @@
}, {
value: 1,
text: '暂停营业'
}, {
value: 2,
text: '冻结'
}]
}
},

15
package2/shop/merchantCenter.vue

@ -217,6 +217,14 @@
扫码核销
</view>
</view>
<view class="menu22" @tap="goDetail('tuiRecord')">
<view class="menu33">
<img src="/static/images/dingdan/dd1.png" alt="" />
</view>
<view class="menu44">
退款/售后记录
</view>
</view>
</view>
</view>
</view>
@ -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'

71
package2/shop/orderDetail.vue

@ -27,7 +27,7 @@
</view>
<view class="box1" style="display: flex;height: 100rpx;line-height: 100rpx;padding: 0 20rpx;">
<view style="border: 1px solid #48D1CC;height: 50rpx;line-height: 50rpx;padding: 0 20rpx;border-radius: 20rpx;margin-top: auto;margin-bottom: auto;color: #48D1CC;font-weight: 700;">
{{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)?'自取-堂食':'到店消费'}}
</view>
<view v-if="data.deliveryType == 1" style="display: flex;flex: 1;padding-left: 20rpx;">
<text style="flex: 1;">{{data.shopDelivery == 1 ? '商家配送员' : '配送员'}}{{getWorkerName(data)}}</text>
@ -91,7 +91,7 @@
{{formatAmount(data.packageFee)}}
</view>
</view>
<view style="display: flex;height: 60rpx;line-height: 60rpx;">
<view style="display: flex;height: 60rpx;line-height: 60rpx;" v-if="data.deliveryFee > 0">
<view style="flex: 1;">
配送费
</view>
@ -135,17 +135,20 @@
</view>
<view class="box1 refund-box" v-if="data.mallRefundRecord != null && data.mallRefundRecord.length > 0">
<view class="refund-title">
退款/售后
<text style="flex: 1;">退款/售后</text>
<view class="refund-service-btn" @tap="callPlatformService">
平台介入
</view>
</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-row">
<view class="refund-label">金额</view>
<view class="refund-value refund-amount">{{formatAmount(item.refundAmount)}}</view>
</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">
@ -184,8 +187,12 @@
<view class="refund-info-label">退款/售后状态</view>
<view class="refund-info-value">{{getRefundStatusText(item)}}</view>
</view>
<view class="refund-info-row" v-if="(item.status == 2 || item.status == 5) && item.rejectReason">
<view class="refund-info-label">拒绝原因</view>
<view class="refund-info-value">{{item.rejectReason}}</view>
</view>
<view class="auto-refund-tip" v-if="isRefundPending(item)">
{{getAutoRefundTime(item.createTime)}} 之前未处理系统会自动退款
{{getAutoRefundTime(item.createTime)}} 之前对方未处理系统会自动退款
</view>
<view class="refund-info-row" v-if="item.successTime != null">
<view class="refund-info-label">处理退款/售后时间</view>
@ -311,7 +318,7 @@
</view>
</view>
<view class="bottom">
<view style="height: 60rpx;line-height: 60rpx;display: flex;border-bottom: 1px solid #eee;font-size: 28rpx;">
<view v-if="data.status != 6 && data.status != 8" style="height: 66rpx;line-height: 66rpx;display: flex;border-bottom: 1px solid #eee;font-size: 33rpx;">
<view style="flex: 1;">
预计收入
</view>
@ -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;

97
package2/shop/shopOrderList.vue

@ -61,13 +61,17 @@
<text>餐盒费</text>
<text>{{formatMoney(item.packageFee)}}</text>
</view>
<view class="order-total-row" v-if="shouldShowPackageFee(item)">
<text>合计</text>
<text>{{getOrderTotalAmount(item)}}</text>
</view>
<view class="remark-box" v-if="getOrderRemark(item)">
<view class="remark-label">备注</view>
<view class="remark-content">{{getOrderRemark(item)}}</view>
</view>
<view class="order-footer">
<view class="delivery-tag" @tap.stop="tanchuang(item.deliveryType)">
{{(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)?'自取-堂食':'到店消费'}}
</view>
<view v-if="item.orderType != 1" @tap.stop="getGroupOrders(item)" class="pinzi btn meal-btn">
拼团详情
@ -77,11 +81,14 @@
出餐
</view>
</view>
<view class="face-delivery-tip" v-if="isFaceDeliveryOrder(item)">
面对面配送单需要一块出餐--点击拼团详情按钮并出餐
</view>
</view>
<view style="width:100%;height:60rpx;"></view>
<!-- 拼团详情弹窗 -->
<uni-popup ref="pintuanPopup" background-color="transparent">
<view class="group-popup">
<view class="group-popup" @touchmove.stop>
<view class="group-popup-header">
<view>
<view class="group-popup-title">拼团详情</view>
@ -89,7 +96,7 @@
</view>
<view class="group-popup-close" @tap="$refs.pintuanPopup.close()">×</view>
</view>
<scroll-view scroll-y class="group-popup-scroll">
<scroll-view scroll-y class="group-popup-scroll" :class="{ 'group-popup-scroll-with-footer': isFaceDeliveryOrder(groupOrderCheck) }">
<view class="group-order-card" v-for="(item,index) in tuanzhangOrder" :key="index">
<view class="group-order-head">
<view class="group-order-code">订单-{{item.numberCode || item.id}}</view>
@ -117,6 +124,9 @@
</view>
<view class="group-popup-empty" v-if="tuanzhangOrder.length == 0">暂无拼团订单</view>
</scroll-view>
<view class="group-popup-footer" v-if="isFaceDeliveryOrder(groupOrderCheck)">
<view class="group-all-meal-btn" @tap="batchMealServing">已全部出餐</view>
</view>
</view>
</uni-popup>
</view>
@ -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;

Loading…
Cancel
Save