tianyi 10 hours ago
parent
commit
3ed1a1abdf
  1. 5
      pages/index/index.vue
  2. 2
      pages/login/login.vue
  3. 16
      pages/shop/orderDetail.vue
  4. 45
      pages/shop/shopOrderList.vue

5
pages/index/index.vue

@ -96,7 +96,7 @@
<view class="data2"> <view class="data2">
<view class="data22"> <view class="data22">
<view class="data222"> <view class="data222">
{{shopData.orderRevenueAndCount.count}} {{shopData.orderRevenueAndCount.count == undefined ?0:shopData.orderRevenueAndCount.count}}
</view> </view>
<view class="data333"> <view class="data333">
今日订单 今日订单
@ -104,7 +104,7 @@
</view> </view>
<view class="data22"> <view class="data22">
<view class="data222"> <view class="data222">
{{shopData.orderRevenueAndCount.amount}} {{shopData.orderRevenueAndCount.amount == undefined ?0:shopData.orderRevenueAndCount.amount}}
</view> </view>
<view class="data333"> <view class="data333">
营业额 营业额
@ -354,6 +354,7 @@
}) })
}, },
getData(){ getData(){
let that = this;
that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.shopData = res.result this.shopData = res.result

2
pages/login/login.vue

@ -332,6 +332,8 @@
uni.setStorageSync('shopRemark',res.result.remark) uni.setStorageSync('shopRemark',res.result.remark)
uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone) uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone)
uni.setStorageSync('schoolShop',res.result.shop) uni.setStorageSync('schoolShop',res.result.shop)
uni.setStorageSync('schoolShop',res.result.shop)
uni.setStorageSync('shopTakeaway',item.shopTakeaway)
uni.setStorageSync('area',JSON.stringify(item)) uni.setStorageSync('area',JSON.stringify(item))
uni.setStorageSync("isShop",true) uni.setStorageSync("isShop",true)
setTimeout(() => { setTimeout(() => {

16
pages/shop/orderDetail.vue

@ -91,7 +91,7 @@
平台服务费 平台服务费
</view> </view>
<view class=""> <view class="">
12.00假的 {{(data.chouyong).toFixed(2)}}
</view> </view>
</view> </view>
</view> </view>
@ -119,7 +119,7 @@
用户账号 用户账号
</view> </view>
<view style="flex: 1;text-align: right;"> <view style="flex: 1;text-align: right;">
13521030111假的 {{data.receiverPhone}}
</view> </view>
</view> </view>
</view> </view>
@ -131,7 +131,7 @@
预计收入 预计收入
</view> </view>
<view style="color: red;font-weight: 700;"> <view style="color: red;font-weight: 700;">
10.32假的 {{(data.yujishouru).toFixed(2)}}
</view> </view>
</view> </view>
<view style="margin-top: 10px;"> <view style="margin-top: 10px;">
@ -179,6 +179,16 @@
if (res.code == 200) { if (res.code == 200) {
that.data = res.result that.data = res.result
//
let price = that.data.goodsAmount+that.data.packageFee
if(that.data.orderType == 1){
that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateOne
that.data.yujishouru = price - that.data.chouyong
}else{
that.data.chouyong = price/100 * uni.getStorageSync('shopTakeaway').commissionRateMore
that.data.yujishouru = price - that.data.chouyong
}
that.data.goodsNum = 0 that.data.goodsNum = 0
for(let m=0;m<that.data.goodsList.length;m++){ for(let m=0;m<that.data.goodsList.length;m++){
that.data.goodsNum += that.data.goodsList[m].quantity that.data.goodsNum += that.data.goodsList[m].quantity

45
pages/shop/shopOrderList.vue

@ -51,6 +51,12 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 40px;border-top: 1px solid #eee;display: flex;">
<view style="flex: 1;"></view>
<view @tap.stop="mealServing(item)" v-if="currentIndex == 13" class="btn" style="margin: 10px 0 0 10px;">
已出餐
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -194,6 +200,35 @@
uni.hideLoading(); uni.hideLoading();
}).catch((res) => {}); }).catch((res) => {});
}, },
mealServing(item){
let that = this
uni.showModal({
title: '提示',
content: '确定要出餐吗?',
success: function (res) {
if (res.confirm) {
let data = {}
let url = ''
if(item.deliveryType == 2){ //
url = '/mall/order/complete'
}else if(item.deliveryType == 1){ //
url = '/mall/order/shopMakeTime'
}
that.tui.request(url, "post", {
orderId:item.id
}, false, true).then((res) => {
if (res.code == 200) {
that.getList()
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
}
}
});
},
goDetail(id){ goDetail(id){
uni.navigateTo({ uni.navigateTo({
url:'/package2/shop/orderDetail?id=' + id url:'/package2/shop/orderDetail?id=' + id
@ -246,6 +281,16 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.btn{
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
padding:0 5px;
height: 30px;
border-radius: 7px;
line-height: 30px;
text-align: center;
font-weight: 700;
margin-top: 10px;
}
.title-name { .title-name {
padding-top: 110rpx; padding-top: 110rpx;

Loading…
Cancel
Save