Browse Source

1Merge branch 'master' of http://8.140.253.224:3000/root/school_uni

# Conflicts:
#	components/tab-bar/delivery.vue
#	package1/order/returnOrder.vue
master
tianyi 1 month ago
parent
commit
bbcd411241
  1. 22
      components/tab-bar/delivery.vue
  2. 57
      components/tab-bar/myCenter.vue
  3. 30
      components/tab-bar/tab-bar.vue
  4. 8
      package1/group/groupBuyList.vue
  5. 26
      package1/group/groupBuySingle.vue
  6. 6
      package1/myCenter/addGoods.vue
  7. 15
      package1/myCenter/goodsList.vue
  8. 32
      package1/order/orderDetail.vue
  9. 18
      package1/order/returnOrder.vue
  10. 11
      package2/partTimeJob/partTimeJobCenter.vue
  11. 9
      package2/shop/merchantCenter.vue

22
components/tab-bar/delivery.vue

@ -184,12 +184,12 @@
</view>
<view v-else style="width: 100%;height: 100rpx;margin-top: 32rpx;">
<img v-if="item.status == 1 && item.arriveTime == null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/be29461437924dcfa4a7a6adfc771638.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,1)"/>
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,1)"/>
<!-- <view style="width: 20%;" @tap="changeOthers(item,1)">转单</view> -->
<img v-if="item.status == 1 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,2)"/>
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,2)"/>
<img v-if="item.status == 2 && item.arriveTime != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/a8cdd6d86e9140df86d3c3c60356bd53.png"
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(item,3)" />
alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,3)" />
</view>
</view>
</scroll-view>
@ -623,7 +623,7 @@
checkArea() {
this.isArea = !this.isArea
},
changeStatus(item,status){
changeStatus(index,item,status){
let url = ''
if(status == 2){
url = "/mall/delivery/pickup"
@ -635,12 +635,18 @@
let that = this
that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => {
if (res.code == 200) {
that.tui.toast(res.message,1000);
that.searchForm.pageNum = 1
that.getDelivery()
if(status == 2 || status == 3){
that.pageData.splice(index, 1)
}else{
that.pageData[index].arriveTime = "qq"
}
that.tui.toast(res.message,200);
/* that.searchForm.pageNum = 1
that.getDelivery() */
that.$forceUpdate();
} else {
that.tui.toast(res.message,1000);
that.tui.toast(res.message,200);
return;
}
uni.hideLoading();

57
components/tab-bar/myCenter.vue

@ -2,9 +2,9 @@
<view class="page1">
<view>22222222</view>
<view style="margin-top: 100px;" @click="navigatorTo('merchant')">商家入驻</view>
<view style="margin-top: 100px;" @click="navigatorTo('merchantCenter')">商家中心</view>
<view style="margin-top: 100px;" @click="navigatorTo('merchantCenter')">商家中心-{{shopCounts}}</view>
<view style="margin-top: 100px;" @click="navigatorTo('jianzhizhuce')">兼职注册</view>
<view style="margin-top: 100px;" v-if="worker" @click="navigatorTo('jianzhizhuye')">兼职主页</view>
<view style="margin-top: 100px;" v-if="worker" @click="navigatorTo('jianzhizhuye')">兼职主页-{{workerCounts}}</view>
<!-- 未注册兼职弹窗 -->
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px">
<view class="jianzhi-content" @tap="navigatorTo('partTimeReg')">
@ -33,6 +33,8 @@
data() {
return {
schoolShop:[],
workerCounts:0,
shopCounts:0,
worker:uni.getStorageSync('worker')
}
},
@ -46,6 +48,55 @@
init(){
console.log("我的初始化")
this.schoolShop = uni.getStorageSync('schoolShop')
this.worker = uni.getStorageSync('worker')
let shopId = uni.getStorageSync('shopId')
let worker = uni.getStorageSync('worker')
this.workerCounts = 0
this.shopCounts = 0
if(worker){
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('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++){
if(res.result[i].status == 3){
this.workerCounts = Number(res.result[i].orderCount)
}
}
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
}
if(shopId){
this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => {
if (res.code == 200) {
this.shopData = res.result
for(let i=0;i<this.shopData.orderStatusCount.length;i++){
if(this.shopData.orderStatusCount[i].counttype){
if(this.shopData.orderStatusCount[i].counttype == 'daisong'){
this.shopCounts += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daiqu'){
this.shopCounts += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daixiaofei'){
this.shopCounts += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daichucan'){
this.shopCounts += Number(this.shopData.orderStatusCount[i].count)
}
}
}
this.shopCounts += Number(this.shopData.pendingBadReviewCount)
this.shopCounts += Number(this.shopData.refundCount)
that.$forceUpdate();
} else {
this.tui.toast(res.message)
}
uni.hideLoading()
}).catch((res) => {})
}
},
clickShop(item){
uni.setStorageSync('shopId',item.id)
@ -115,7 +166,7 @@
return
}
}else if(e=='jianzhizhuye'){
url = '/package2/partTimeJob/partTimeJobCenter'
url = '/package2/partTimeJob/partTimeJobCenter?type=worker'
}
uni.navigateTo({
url: url

30
components/tab-bar/tab-bar.vue

@ -122,7 +122,7 @@
let that = this
let shopId = uni.getStorageSync('shopId')
let worker = uni.getStorageSync('worker')
if(shopId || worker){
if(worker){
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
@ -132,7 +132,7 @@
}else if(res.result[i].status == 1 || res.result[i].status == 2){
this.indexWorkerCount += Number(res.result[i].orderCount)
}else{
this.indexMyCount = Number(res.result[i].orderCount)
this.indexMyCount += Number(res.result[i].orderCount)
}
}
}
@ -144,6 +144,32 @@
uni.hideLoading();
}).catch((res) => {});
}
if(shopId){
this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => {
if (res.code == 200) {
this.shopData = res.result
for(let i=0;i<this.shopData.orderStatusCount.length;i++){
if(this.shopData.orderStatusCount[i].counttype){
if(this.shopData.orderStatusCount[i].counttype == 'daisong'){
this.indexMyCount += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daiqu'){
this.indexMyCount += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daixiaofei'){
this.indexMyCount += Number(this.shopData.orderStatusCount[i].count)
}else if(this.shopData.orderStatusCount[i].counttype == 'daichucan'){
this.indexMyCount += Number(this.shopData.orderStatusCount[i].count)
}
}
}
this.indexMyCount += Number(this.shopData.pendingBadReviewCount)
this.indexMyCount += Number(this.shopData.refundCount)
that.$forceUpdate();
} else {
this.tui.toast(res.message)
}
uni.hideLoading()
}).catch((res) => {})
}
}
}
}

8
package1/group/groupBuyList.vue

@ -69,8 +69,8 @@
</view>
<view class="shop-top">
<view class="shop-img">
<img :src="item.shopIcon" alt="">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
<img :src="item.shopIcon" lazy-load alt="">
<img lazy-load src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/6c4ab92a43c842d8bb22035bce1f65cc.png"
alt=""
style="width:30rpx;height:30rpx;position: absolute;top: 0;left: 0;background-size: 100%;" />
</view>
@ -111,7 +111,7 @@
<view class="menu-member" v-if='item1.isPush == 1 && item1.delFlag == 1'
v-for="(item1,index1) in item.products" :key="index1" @tap="goDetail('product',item1)">
<view class="menu-img">
<img :src="item1.productPicture" alt="">
<img :src="item1.productPicture" lazy-load alt="">
</view>
<view class="menu-content">
<view class="shop-menu-name">
@ -274,9 +274,9 @@
},
onLoad() {
this.getShopList();
this.getEatType();
this.getShopArea();
this.getShopList();
this.getOnlineWorkerCountByCanteenArea();
},
onShow() {

26
package1/group/groupBuySingle.vue

@ -118,7 +118,7 @@
</view>
<view class="goods-content-center">
<view class="goods-deal1">
销量 <text> {{item.tailWarn}}</text>
销量 <text> {{item.tailWarn != null ? item.tailWarn : 0}}</text>
</view>
</view>
<view class="shop-tag1">
@ -601,9 +601,13 @@
onlineWorkerInterval:2500,
onlineWorkerDuration:500,
menuList: [{
categoryName: '猜你喜欢',
id: '1',
categoryName: '推荐',
id: 'tuijian',
checked: true
},{
categoryName: '必点',
id: 'bidian',
checked: false
}],
shopRecommend:[],
availableCoupons: [],
@ -797,6 +801,8 @@
} else {
that.productItem = [...that.productItem, ...res.result.records];
}
let hasTuijian = false
let bidian = false
for(let i = 0;i<that.productItem.length;i++){
if(this.productItem[i].sellBeginTime !='' && this.productItem[i].sellEndTime != ''){
let isEndTime = this.isWithinBusinessHours(this.productItem[i].sellBeginTime,this.productItem[i].sellEndTime)
@ -808,6 +814,20 @@
that.productItem[i].isChecked = false
that.moreBuyList.push(that.productItem[i])
}
if(that.productItem[i].isPush == 1){
that.productItem[i].categoryId = 'tuijian'
hasTuijian = true
}
if(that.productItem[i].isMust == 1){
that.productItem[i].categoryId = 'bidian'
bidian = true
}
}
if(hasTuijian == false){
that.menuList.splice(0,1)
}
if(bidian == false){
that.menuList.splice(1,1)
}
console.log('好的',that.productItem)
//

6
package1/myCenter/addGoods.vue

@ -137,6 +137,9 @@
</view>
</view>
<view slot="footer" style="display: flex;padding-left: 40rpx;margin-top: 20rpx;">
<uni-forms-item label="设置最大选择数" name="maxSelect">
<input type="digit" class="content-input" v-model="maxSelect" placeholder="可设置最大选择数">
</uni-forms-item>
<button type="text" @tap="$refs.addTypeDialog.close()" style="margin-right: 20rpx;">取消</button>
<button type="text" @tap="guigeSubmit">提交</button>
</view>
@ -151,6 +154,7 @@
return {
dataList: {},
modalType:0,
maxSelect:1,
categoryData:[],
categoryIndex: 0,
modalclassType:'',
@ -637,7 +641,7 @@
if(this.attrValueArr.length>0){
let index1 = false
for (var m = 0; m < this.attrValueArr.length; m++) {
if(this.attrValueArr[m].title == this.categorySonData[i].title){
if(this.attrValueArr[m].title == this.categorySonData[i].title && this.attrValueArr[m].parentName == this.typeToAttrName){
index1 = true
this.categorySonData[i].checked = true
}

15
package1/myCenter/goodsList.vue

@ -37,6 +37,10 @@
</view>
<view class="box-right-num"></view>
<view class="box-right-price">
<view class="price-box">
<text>{{item.attributeListPrice | sliceMsg}}</text>
<text>价格</text>
</view>
<view class="price-box">
<text>{{item.lunchBox}}</text>
<text>餐盒费</text>
@ -151,7 +155,16 @@
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name = newObj[as].specPrice
}
}
return name;
},
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()

32
package1/order/orderDetail.vue

@ -135,7 +135,7 @@
<view class="status-btn" style="top: 0;" v-if="orderStatus(orderDetail)" @tap="returnPopupProp(orderDetail)">
取消订单
</view>
<view class="status-btn" style="top: 0;" v-if="orderDetail.status == 5 && orderDetail.mallRefundRecord.length < 1" @tap="returnProducts(orderDetail)">
<view class="status-btn" style="top: 0;" v-if="orderDetail.status == 5 && hasRefund == false" @tap="returnProducts(orderDetail)">
申请售后
</view>
<view class="status-btn" style="top: 70rpx;" @tap="refreah(orderDetail)">
@ -441,6 +441,16 @@
查看评价 >
</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="hasRefund">
<view style="flex: 1;color: #777;font-weight: 700;">
申请平台介入
</view>
<view style="color: #000;font-weight: 700;" @tap="checkEvaluate">
<img @tap="makeCall('15533910775')"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
alt="" style="width: 40rpx;height: 40rpx;margin: 20rpx 0 0 20rpx;" />
</view>
</view>
</view>
</view>
</view>
@ -504,20 +514,20 @@
</uni-popup>
<uni-popup ref="returnPopup" background-color="#fff">
<view class="car-content" style="height: auto;padding: 20rpx;" v-if="orderDetail.deliveryType == 1 && orderDetail.status != 10 && orderDetail.otherOrder != 1">
<view class="car-content" style="height: auto;padding: 20rpx;" v-if="orderDetail.status != 10">
<view class="car-title" style="padding: 0 20rpx;">
选择退款原因
</view>
<view class="" style="padding: 0 20rpx;">
<view style="height:80rpx;">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
<view style="height:80rpx;" v-if="orderDetail.otherOrder != 1">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
全额退款商家原因
</view>
<view style="height:80rpx;">
<view style="height:80rpx;" v-if="payData.deliveryType ==1">
<radio :checked="sellTime==3" name="sellTime" @click="checkSellTime(3)" />
全额退款配送员原因
</view>
<view style="height:80rpx;">
<view style="height:80rpx;" v-if="payData.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" />
全额退款商家+配送员原因
</view>
@ -612,6 +622,7 @@
refundType:3,
refundTypeStatus:4,
shopTime:'',
hasRefund:false,
peisongTime:'',
shopItem:{},
orderId:'',
@ -770,7 +781,7 @@
},
checkEvaluate(){
console.log(this.orderDetail)
if(this.orderDetail.comments.length>0){
if(this.orderDetail.comments != null && this.orderDetail.comments.length>0){
this.$refs.evaluatePopup.open()
}else{
this.tui.toast("暂无评价");
@ -964,6 +975,13 @@
that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => {
if (res.code == 200) {
that.orderDetail = res.result;
if(that.orderDetail.mallRefundRecord != null && that.orderDetail.mallRefundRecord.length > 0){
for(let i = 0; i < that.orderDetail.mallRefundRecord.length;i++){
if(that.orderDetail.mallRefundRecord[i].status >= 3){
that.hasRefund = true
}
}
}
if(that.orderDetail.groupInfo){
// 0: 1: 2: 3:()
if(that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2){

18
package1/order/returnOrder.vue

@ -223,30 +223,26 @@
选择退款原因
</view>
<view style="padding: 0 20rpx;">
<view style="height:80rpx;">
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==0" name="sellTime" @click="checkSellTime(0)" />
只退商品
商品退款
</view>
<view style="height:80rpx;" v-if="orderDetail.deliveryType == 1">
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==1" name="sellTime" @click="checkSellTime(1)" />
退配送费
</view>
<view style="height:80rpx;">
<view style="height:80rpx;" v-if="orderDetail.otherOrder != 1">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
全额退款商家原因
</view>
<view style="height:80rpx;" v-if="orderDetail.deliveryType == 1">
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1">
<radio :checked="sellTime==3" name="sellTime" @click="checkSellTime(3)" />
全额退款配送员原因
</view>
<view style="height:80rpx;" v-if="orderDetail.deliveryType == 1">
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" />
全额退款商家+配送员原因
</view>
</view>
<view class="btn" @tap="chooseReturnType()">确认</view>

11
package2/partTimeJob/partTimeJobCenter.vue

@ -195,6 +195,7 @@
pageSize:100,
statusList:[0,3]
},
type:'worker',
returnFormData:{},
groupOrderIdList:[],
goodsList:[],
@ -219,7 +220,10 @@
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.searchCountForm.linkId = uni.getStorageSync('worker').workerId
},
onLoad() {
onLoad(option) {
if(option.type){
this.type = option.type
}
this.getReturnCount()
},
methods: {
@ -242,6 +246,11 @@
},
getReturnCount(){
let that = this
if(this.type == 'worker'){
this.searchCountForm.linkId = uni.getStorageSync('worker').workerId
}else{
this.searchCountForm.linkId = uni.getStorageSync('shopId')
}
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;

9
package2/shop/merchantCenter.vue

@ -65,7 +65,7 @@
待消费
</view>
</view>
<view class="order33" @tap="goDetail('db',11)">
<view class="order33" @tap="goDetail('tui',11)">
<view class="order44">
{{shopData.refundCount == undefined?0:shopData.refundCount}}
</view>
@ -97,7 +97,7 @@
<view class="data2">
<view class="data22">
<view class="data222">
{{shopData.orderRevenueAndCount.count}}
{{shopData.orderRevenueAndCount.count == undefined?0:shopData.orderRevenueAndCount.count}}
</view>
<view class="data333">
今日订单
@ -275,6 +275,11 @@
case 'dd':
url = '/package2/shop/shopOrderList'
break;
case 'tui':
uni.navigateTo({
url: '/package2/partTimeJob/partTimeJobCenter?type=shop'
})
break;
case 'zd':
url = '/package2/shop/shopBill'
break;

Loading…
Cancel
Save