增加点餐订单,给门店添加扫码点餐,退款记录中增加退款,

fix
游梦婷 12 months ago
parent d95fe3d2f5
commit 437a6b283f
  1. 5
      Utils/Api.js
  2. 9
      Utils/groupBuying.js
  3. 7
      pages.json
  4. 61
      pages/index/collectNotes/collectNotes.vue
  5. 103
      pages/index/order-list-details/order-list-details.vue
  6. 2
      pages/tabBar/home/home.vue
  7. 33
      subpackages/groupBuyingConfiguration/groupBuyingConfiguration.vue
  8. 0
      subpackages/groupBuyingConfiguration/scanOrderList/editTableOrder.vue
  9. 221
      subpackages/groupBuyingConfiguration/scanOrderList/scanOrderList.vue
  10. 15
      subpackages/groupBuyingConfiguration/tableMessage/tableMessage.vue

@ -407,3 +407,8 @@ export const recover = params => {
export const getActivityAccount = params => { export const getActivityAccount = params => {
return POST('GET', `${base}/rebateActivityAccount/getActivityAccount`, params).then(res => res.data); return POST('GET', `${base}/rebateActivityAccount/getActivityAccount`, params).then(res => res.data);
} }
//退款
export const refund = params => {
return POST('POST', `${base}/tradeOrderRefund/refund`, params).then(res => res.data);
}

@ -196,4 +196,13 @@ export const queryCurrentOrder = params => {
// 操作订单产品 // 操作订单产品
export const operateOrderProduct = params => { export const operateOrderProduct = params => {
return POST('POST', `${base}/mealTableOrder/operateOrderProduct`, params).then(res => res.data); return POST('POST', `${base}/mealTableOrder/operateOrderProduct`, params).then(res => res.data);
}
//查询订单列表
export const queryOrderList = params => {
return POST('GET', `${base}/mealTableOrder/queryOrderList`, params).then(res => res.data);
}
//查询订单详情
export const queryOrderDetail = params => {
return POST('GET', `${base}/mealTableOrder/queryOrderDetail`, params).then(res => res.data);
} }

@ -716,10 +716,15 @@
"navigationBarTitleText": "桌台信息" "navigationBarTitleText": "桌台信息"
} }
},{ },{
"path":"groupBuyingConfiguration/tableMessage/editTableOrder", "path":"groupBuyingConfiguration/scanOrderList/editTableOrder",
"style": { "style": {
"navigationBarTitleText": "修改订单" "navigationBarTitleText": "修改订单"
} }
},{
"path":"groupBuyingConfiguration/scanOrderList/scanOrderList",
"style": {
"navigationBarTitleText": "点餐订单"
}
} }
] ]

@ -15,7 +15,14 @@
<view class="datetim fcorfff">{{enddate}}<i class="down"></i></view> <view class="datetim fcorfff">{{enddate}}<i class="down"></i></view>
</picker> </picker>
</view> </view>
<view class="mart15 width90 alijusstart">
<view class="fcorfff font14 margleri10 width25 fotlt">订单类型 :</view>
<picker mode="selector" class="width75" :range="statusList" range-key="name"
@change="bindDateChange5">
<view class="fcorfff fotrt font14" v-if="statusName">{{statusName}}<i class="down"></i></view>
<view class="fcorfff fotrt font14" v-else>请选择<i class="down"></i></view>
</picker>
</view>
<view class="mart15 width90 alijusstart" v-if="userInfo.secUser.objectType == 2"> <view class="mart15 width90 alijusstart" v-if="userInfo.secUser.objectType == 2">
<view class="fcorfff font14 margleri10 width25 fotlt">业务员 :</view> <view class="fcorfff font14 margleri10 width25 fotlt">业务员 :</view>
<picker mode="selector" class="width75" :range="salesmanList" range-key="name" <picker mode="selector" class="width75" :range="salesmanList" range-key="name"
@ -62,12 +69,22 @@
<!-- <view style="width: 1px;" class="height80 backcor6"></view> --> <!-- <view style="width: 1px;" class="height80 backcor6"></view> -->
</view> </view>
<view class="width100 fotct height40p alijus font14 fcor333"> <view class="width100 fotct height40p alijus font14 fcor333">
<view class="width50 "> <template v-if="status==3">
交易金额 <view class="width50 ">
</view> 交易金额
<view class="width50"> </view>
交易笔数 <view class="width50">
</view> 交易笔数
</view>
</template>
<template v-if="status==6">
<view class="width50 ">
退款金额
</view>
<view class="width50">
退款笔数
</view>
</template>
</view> </view>
</view> </view>
<view v-if="notesList == ''" class="mart60 fotct font14 fcor666"> <view v-if="notesList == ''" class="mart60 fotct font14 fcor666">
@ -148,6 +165,16 @@
salesmanList: [], // salesmanList: [], //
salesmanid: '', //id salesmanid: '', //id
salesmanname: '', // salesmanname: '', //
status:3,//
statusName:"已支付",
statusList:[{
name:'已支付',
id:3
},{
name:'已退款',
id:6
}]
} }
}, },
computed: { computed: {
@ -171,6 +198,12 @@
if (this.userInfo.secUser.objectType == 4) { if (this.userInfo.secUser.objectType == 4) {
this.getStoreListByMer(this.userInfo.mer.id); this.getStoreListByMer(this.userInfo.mer.id);
} }
},
onShow() {
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList(); this.getTradeOrderList();
}, },
onReachBottom() { onReachBottom() {
@ -286,7 +319,17 @@
this.isNoMoreData = false; this.isNoMoreData = false;
this.getTradeOrderList(); this.getTradeOrderList();
}, },
//
bindDateChange5(e){
console.log(this.statusList[e.target.value])
this.status = this.statusList[e.target.value].id;
this.statusName = this.statusList[e.target.value].name;
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
toSearch() { toSearch() {
this.pageNum = 1; this.pageNum = 1;
this.notesList = []; this.notesList = [];
@ -308,7 +351,7 @@
let endTime = b + 57599000; let endTime = b + 57599000;
let pagenum = this.pageNum; let pagenum = this.pageNum;
let datas = { let datas = {
status: 3, status: this.status,
payTimeS: startTime, payTimeS: startTime,
payTimeE: endTime, payTimeE: endTime,
outTradeNo: this.orderNo, outTradeNo: this.orderNo,

@ -64,17 +64,32 @@
<view class="font14 fcor333 text2 width75 fotrt">{{orderByOutTradeOrder.platformMerNo}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{orderByOutTradeOrder.platformMerNo}}</view>
</view> </view>
<!-- 退款按钮 -->
<template v-if="orderByOutTradeOrder&&orderByOutTradeOrder.status==3&&userInfo.secUser.objectType == 4">
<view class="width100 height45"></view>
<view class=" btn-fix backcorfff">
<button class="btn " @click.stop="toRefund">退款</button>
</view>
</template>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog mode="input" title="输入退款金额" :before-close="true" :value="refundAmount"
placeholder="请输入退款金额" @confirm="dialogInputConfirm" @close="close"></uni-popup-dialog>
</uni-popup>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getOrderByOutTradeOrder getOrderByOutTradeOrder,
refund
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp();
export default { export default {
data() { data() {
return { return {
userInfo: app.globalData.userInfo, //
statusList: { statusList: {
1: "待支付", 1: "待支付",
2: "支付中", 2: "支付中",
@ -84,7 +99,8 @@
6: "已退款" 6: "已退款"
}, },
orderid: '', // orderid: '', //
orderByOutTradeOrder: '' // orderByOutTradeOrder: '' ,//
refundAmount:'',//退
} }
}, },
onLoad(options) { onLoad(options) {
@ -106,7 +122,70 @@
} }
uni.hideLoading(); uni.hideLoading();
}) })
} },
/* 点击退款 */
toRefund(){
this.refundAmount = this.orderByOutTradeOrder.tradeAmount;
this.$refs.inputDialog.open()
},
close(){
this.$refs.inputDialog.close();
},
dialogInputConfirm(e) {
let reg = /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0.\d{1,2}$/;
if (!reg.test(e)) {
uni.showToast({
title: '请输入大于0的数字哦!',
icon: 'none',
duration: 2000
})
return
}
if(e>this.orderByOutTradeOrder.tradeAmount){
uni.showToast({
title: '退款金额大于支付金额',
icon: 'none',
duration: 2000
})
return
}
this.refundAmount = e;
this.refund();
},
refund(){
uni.showLoading({
title:'退款中...',
mask:true
})
let params={
"outTradeNo":this.orderid,
"refundAmount":this.refundAmount
}
refund(params).then(res=>{
uni.hideLoading()
this.$refs.inputDialog.close();
if (res.return_code == '000000') {
this.getOrderByOutTradeOrder();
uni.showToast({
title: '退款成功',
icon: 'none',
duration: 2000
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
} }
} }
</script> </script>
@ -123,4 +202,20 @@
padding: 30rpx 0 30rpx 20rpx; padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
} }
.btn-fix{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 10px 0;
.btn{
width: 70%;
color: white;
background-color: #089bf5;
border-radius: 6px;
height: 45px;
line-height: 45px;
}
}
</style> </style>

@ -161,7 +161,7 @@
url: '/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder', url: '/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder',
img: '/static/img/apply.png' img: '/static/img/apply.png'
},{ },{
title:'团购配置', title:'扫码点餐',
url:"/subpackages/groupBuyingConfiguration/groupBuyingConfiguration?storeId="+this.userInfo.store.id, url:"/subpackages/groupBuyingConfiguration/groupBuyingConfiguration?storeId="+this.userInfo.store.id,
img: '/static/img/home4.png' img: '/static/img/home4.png'
} }

@ -11,9 +11,11 @@
</template> </template>
<script> <script>
let app = getApp();
export default { export default {
data(){ data(){
return{ return{
userInfo: app.globalData.userInfo, //
funcList:[ funcList:[
{ {
title: '门店图片', title: '门店图片',
@ -41,6 +43,10 @@
url:'./tableMessage/tableMessage', url:'./tableMessage/tableMessage',
img: '/static/img/home4.png' img: '/static/img/home4.png'
},{
title: '点餐订单',
url:'./scanOrderList/scanOrderList',
img: '/static/img/home4.png'
} }
], ],
@ -51,6 +57,33 @@
if(options.storeId){ if(options.storeId){
this.storeId = options.storeId; this.storeId = options.storeId;
} }
//
if(this.userInfo.secUser.objectType == 5){
this.funcList=[
{
title: '门店产品',
url: './storeProduct/storeProduct',
img: '/static/img/home4.png'
},{
title: '分类配置',
url:'./categorySetting/categorySetting',
img: '/static/img/home4.png'
},{
title: '桌台信息',
url:'./tableMessage/tableMessage',
img: '/static/img/home4.png'
},{
title: '点餐订单',
url:'./scanOrderList/scanOrderList',
img: '/static/img/home4.png'
}
]
}
}, },
methods:{ methods:{
/** /**

@ -0,0 +1,221 @@
<template>
<view class="all-container pd-main backcor6 font15">
<view class="mart20 backcorfff marb20">
<view class="dis-flex height40 bor-botm1">
<view class="flex-1 fotct fontwig6 ">桌台名称</view>
<view class="flex-1 fotct fontwig6">订单金额</view>
<view class="flex-1 fotct fontwig6">状态</view>
<view class="flex-1 fotct fontwig6">操作</view>
</view>
<view class="dis-flex bor-botm1 paddtop10 paddbotm10 font14" @click="openOrderDetail(item)"
v-for="(item,index) in orderList" :key="index">
<view class="flex-1 fotct text1">
{{item.tableName}}
</view>
<view class="flex-1 fotct text1">
{{item.orderAmount}}
</view>
<view class="flex-1 fotct text1" :class="{'fcorred':item.status==1}">
{{item.status | filterStatus}}
</view>
<view class="flex-1 fotct text1 dis-flex fcor41c" style="justify-content: space-around;">
<text>详情</text>
<text class="margle" @click.stop="goEditTableOrder(item)" v-if="item.status==1">编辑</text>
</view>
</view>
</view>
<!-- 查看详情 -->
<uni-popup ref="popupDetail" type="bottom" background-color="#ffffff">
<view style="height: 70vh;overflow-y: auto;" class="backcorfff border-10r-lr pd-main font16">
<view class="pop-contain pd-main">
<view class="pop-title fontwig6"><text>详情</text></view>
<view class="" v-if="orderDetail">
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">桌台编号</view>
<view class="flex-1 fotct ">{{orderDetail.tableNumber}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">桌台名称</view>
<view class="flex-1 fotct ">{{orderDetail.tableName}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">桌台状态</view>
<view class="flex-1 fotct " :class="{'fcorred':orderDetail.status==1}">{{orderDetail.status | filterStatus}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">用餐人数</view>
<view class="flex-1 fotct ">{{orderDetail.peopleNum}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">订单金额</view>
<view class="flex-1 fotct ">{{orderDetail.orderAmount}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">创建时间</view>
<view class="flex-1 fotct ">{{orderDetail.createTime | timeFormat}}</view>
</view>
<view class="width100 dis-flex bor-botm1 ">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">订单编号 </view>
<view class="flex-1 fotct wb">{{orderDetail.orderNo}}</view>
</view>
<view class="width100 dis-flex bor-botm1 " v-if="orderDetail.status==2">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">支付单号 </view>
<view class="flex-1 fotct wb" >{{orderDetail.payOrderNo}}</view>
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {queryOrderList,queryOrderDetail} from '@/Utils/groupBuying.js'
export default {
data(){
return{
storeId:'',//id
pageNum: 1,
pageSize: 30,
isNoMoreData: false, //
totalNum:0,
orderList:[],
orderDetail:null,
}
},
onLoad(options) {
this.storeId = options.storeId;
},
onShow(){
this.formatOrderList();
},
onReachBottom() {
this.queryOrderList();
},
filters:{
filterStatus(type){
switch (type) {
case 0:
return '不可用';
case 1:
return '未结账';
case 2:
return '已结账';
default:
return '未知';
}
},
},
methods:{
/* 查询订单列表 */
queryOrderList(){
if (this.isNoMoreData) {
return false;
}
uni.showLoading({
title: '加载中...'
})
let params={
storeId:this.storeId,
pageNum:this.pageNum,
pageSize:this.pageSize,
}
queryOrderList(params).then(res=>{
uni.hideLoading();
if (res.return_code == '000000' ) {
this.totalNum = res.return_data.total;
this.isNoMoreData = res.return_data.isLastPage;
this.orderList = this.orderList.concat(res.return_data.list);
if(!this.isNoMoreData){
this.pageNum+=1
}
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
},
formatOrderList(){
this.pageNum=1;
this.isNoMoreData=false;
this.orderList=[];
this.queryOrderList();
},
goEditTableOrder(item){
uni.navigateTo({
url:`./editTableOrder?storeId=${item.storeId}&serialNumber=${item.serialNumber}`
})
},
/* 查询订单详情 */
openOrderDetail(item){
this.orderDetail=null;
let params={
orderNo:item.orderNo
}
uni.showLoading({
mask:true
})
queryOrderDetail(params).then(res=>{
uni.hideLoading()
if (res.return_code == '000000') {
this.orderDetail=res.return_data.order;
this.$refs.popupDetail.open('bottom');
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
/* 详情弹窗 */
.pop-contain {
text-align: center;
padding-top: 50px;
background-color: #ffffff;
.pop-title {
text-align: center;
height: 50px;
line-height: 50px;
font-size: 18px;
position: fixed;
z-index: 10;
top: 0;
left: 0;
right: 0;
background: #ffffff;
}
.titleWidth {
min-width: 80px;
text-align: center;
}
.minheight40 {
padding: 15px 0;
}
.wb{
word-break: break-all;
}
}
</style>

@ -161,7 +161,7 @@
}, },
filters: { filters: {
/* type:桌台状态 0:不可用 1:未开台 2:已开台 */ /* type:桌台状态 0:不可用 1:未开台 2:已开台 */
/* 1:编辑,2:开台,3:关台,4:删除,5查看订单 */ /* 1:编辑,2:开台,3:关台,4:删除, */
filterDataList(type) { filterDataList(type) {
switch (type) { switch (type) {
case 0: case 0:
@ -193,10 +193,7 @@
}, { }, {
id: 4, id: 4,
text: '删除', text: '删除',
}, { } ];
id: 5,
text: '订单',
}, ];
default: default:
return [{ return [{
id: 1, id: 1,
@ -237,16 +234,10 @@
this.endTableMethod(item) this.endTableMethod(item)
}else if (data.id == 4) { // }else if (data.id == 4) { //
this.toDeleteTable(item) this.toDeleteTable(item)
}else if(data.id == 5){
this.goEditTableOrder(item)
} }
console.log(data, item) console.log(data, item)
}, },
goEditTableOrder(item){
uni.navigateTo({
url:`./editTableOrder?storeId=${item.storeId}&serialNumber=${item.serialNumber}`
})
},
/* 开台 -确认 pupup-回调 */ /* 开台 -确认 pupup-回调 */
dialogOpenTableConfirm(e){ dialogOpenTableConfirm(e){
let reg = /^\+?[1-9][0-9]*$/; let reg = /^\+?[1-9][0-9]*$/;

Loading…
Cancel
Save