团购修改

ymt-groupSet
游梦婷 1 year ago
parent c3839f37ef
commit 432f7667f5
  1. 2
      Utils/groupBuying.js
  2. 6
      pages.json
  3. 2
      pages/index/merchant-details/merchant-details.vue
  4. 4
      pages/tabBar/home/home.vue
  5. 8
      pages/welcome/welcome.vue
  6. 6
      subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue
  7. 94
      subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue
  8. 3
      subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue
  9. 436
      subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder.vue
  10. 21
      subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue

@ -105,7 +105,7 @@ export const editStoreExtMsg = params => {
//查询门店扩展信息
export const findStoreExtMsgByStoreId = params => {
return POST('POST', `${base}/storeGroup/findStoreExtMsgByStoreId`, params).then(res => res.data);
return POST('GET', `${base}/storeGroup/findStoreExtMsgByStoreId`, params).then(res => res.data);
}
//查询获取团购内容code

@ -698,6 +698,12 @@
"navigationBarTitleText": "核销订单",
"enablePullDownRefresh": false
}
},{
"path":"groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder",
"style": {
"navigationBarTitleText": "核销订单"
}
}
]

@ -93,7 +93,7 @@
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,1)">绑定二维码</button>
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,2)">二维码列表</button>
<button class="btns mart10 margle10" @click.stop="jumpService(item.id)">绑定设备</button>
<!-- <button class="btns mart10 margle10" @click.stop="jumpGroupService(item.id)">团购配置</button> -->
<button class="btns mart10 margle10" @click.stop="jumpGroupService(item.id)">团购配置</button>
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,2)">设备列表</button> -->
</view>
<view class="lin10"></view>

@ -156,6 +156,10 @@
title: '设备申请',
url: '../../index/serviceApplicationList/serviceApplicationList',
img: '../../../static/img/apply.png'
},{
title: '核销订单',
url: '/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder',
img: '/static/img/apply.png'
}
]
return;

@ -16,10 +16,10 @@
}
},
onLoad(options) {
// uni.reLaunch({
// url: '../tabBar/home/home'
// })
// return
uni.reLaunch({
url: '/pages/login/login'
})
return
let that = this;
/*

@ -40,11 +40,11 @@
</view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">价格</view>
<view class="flex-1 fotct ">{{productDetail.price}}</view>
<view class="flex-1 fotct ">{{productDetail.price}}</view>
</view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">原价</view>
<view class="flex-1 fotct ">{{productDetail.originalPrice}}</view>
<view class="flex-1 fotct ">{{productDetail.originalPrice}}</view>
</view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">限制</view>
@ -60,7 +60,7 @@
</view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">有效期</view>
<view class="flex-1 fotct ">{{productDetail.validity}}</view>
<view class="flex-1 fotct ">{{productDetail.validity.replace(',',"至")}}</view>
</view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight80">图片</view>

@ -38,10 +38,19 @@
placeholder-class="corf6 font15" class=" flex-1 " placeholder="请输入使用时间">
</view>
<view class="dis-flex marb10 bor-botm1 ">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">有效:
<view class="flex-s0 group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">有效时间:
</view>
<input type="text" name="name" v-model.trim="productData.validity" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="有效期">
<view class="alijus paddbotm10 paddleft5 flex-1">
<picker mode="date" :value="startdate" @change="bindDateChange">
<view class="dis-flex ">{{startdate?startdate:'请选择开始时间'}}<text class="icon xia font14"></text></view>
</picker>
<view class="paddleft10 paddtright10"></view>
<picker mode="date" :value="enddate" @change="bindDateChange1">
<view class="dis-flex ">{{enddate?enddate:'请选择结束时间'}}<text class="icon xia font14"></text></view>
</picker>
</view>
<!-- <input type="text" name="name" v-model.trim="productData.validity" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="有效期"> -->
</view>
<view class="dis-flex marb10 bor-botm1">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">团购限制:
@ -64,7 +73,6 @@
</view>
</view>
</view>
</view>
<!-- 产品详情 -->
@ -177,7 +185,10 @@
const app = getApp();
export default {
data() {
const currentDate = this.getDate()
return {
startdate: '',
enddate: '',
reqUrl: app.globalData.url, //
imgUrl: app.globalData.imgUrl, //访
status: '', //1. 2.
@ -217,10 +228,15 @@
return true
},
isShowAdd() {
return true
},
validity(){
if(this.startdate&&this.enddate){
return this.startdate+','+this.enddate
}else{
return '';
}
}
},
onLoad(option) {
@ -248,6 +264,7 @@
this.findGroupServeRuleByGroup();//
}
console.log(option, "=======")
},
components: {
@ -255,6 +272,56 @@
wybPopup
},
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
bindDateChange(e) {
if(this.enddate){
if((new Date(this.enddate)).getTime()<(new Date(e.target.value)).getTime()){
uni.showToast({
icon:'none',
title:"开始时间不能大于结束时间",
duration:2000,
})
this.startdate = "";
return
}
}
this.startdate = e.target.value;
},
bindDateChange1(e) {
if(this.startdate){
if((new Date(this.startdate)).getTime()>(new Date(e.target.value)).getTime()){
uni.showToast({
icon:'none',
title:"开始时间不能大于结束时间",
duration:2000,
})
this.enddate = "";
return
}
}
this.enddate = e.target.value;
},
validate() {
var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
if (!reg.test(this.productData.price) || this.productData.price == 0) {
@ -275,9 +342,18 @@
}
if(!this.validity){
uni.showToast({
title: "请选择有效时间",
icon: "none"
})
this.startdate = "";
this.enddate = "";
return false
}
this.productData.validity = this.validity;
if (!this.productData.name || !this.productData.price || !this.productData.originalPrice || !this.productData.astrict || !this.productData
.serviceTime || !this.productData.validity) {
.serviceTime) {
uni.showToast({
title: "请填写完整哦!",
icon: "none"
@ -339,6 +415,8 @@
this.productData.img = res.return_data.img;
this.productData.serviceTime = res.return_data.serviceTime;
this.productData.validity = res.return_data.validity;
this.startdate = this.productData.validity.split(",")[0];
this.enddate = this.productData.validity.split(",")[1];
this.productData.originalPrice = res.return_data.originalPrice;
this.imgValue = this.productData.img.split(",");

@ -159,7 +159,8 @@
mask:true,
})
let params={
groupCode:this.groupCode
groupCode:this.groupCode,
storeId:app.globalData.userInfo.store.id
}
gorOrderNotify(params).then(res=>{
uni.hideLoading();

@ -0,0 +1,436 @@
<template>
<view>
<view class="headsearch width94 mart15 paddtop5 paddbotm10 fotct">
<view class="mart10 width90 alijusstart">
<view class="fcorfff font14 margleri10 width60 fotlt">开始时间 :</view>
<picker mode="date" :value="startdate" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="datetim fcorfff">{{startdate}}<i class="down"></i></view>
</picker>
</view>
<view class="mart10 width90 alijusstart">
<view class="fcorfff font14 margleri10 width60 fotlt">结束时间 :</view>
<picker mode="date" :value="enddate" :start="startDate" :end="endDate" @change="bindDateChange1">
<view class="datetim fcorfff">{{enddate}}<i class="down"></i></view>
</picker>
</view>
<view class="mart15 width90 alijusstart" v-if="userInfo.secUser.objectType == 2">
<view class="fcorfff font14 margleri10 width25 fotlt">业务员 :</view>
<picker mode="selector" class="width75" :range="salesmanList" range-key="name"
@change="bindDateChange4">
<view class="fcorfff fotrt font14" v-if="salesmanname">{{salesmanname}}<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 || userInfo.secUser.objectType == 3">
<view class="fcorfff font14 margleri10 width25 fotlt">商户 :</view>
<picker mode="selector" class="width75" :range="merList" range-key="merName" @change="bindDateChange2">
<view class="fcorfff fotrt font14" v-if="merName">{{merName}}<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 || userInfo.secUser.objectType == 3 || userInfo.secUser.objectType == 4">
<view class="fcorfff font14 margleri10 width25 fotlt">门店 :</view>
<picker mode="selector" class="width75" :range="storeListByMer" range-key="name"
@change="bindDateChange3">
<view class="fcorfff fotrt font14" v-if="storename">{{storename}}<i class="down"></i></view>
<view class="fcorfff fotrt font14" v-else>请选择<i class="down"></i></view>
</picker>
</view>
<view class="input-box">
<view class="icon search"></view>
<input placeholder="请输入订单编号" v-model="orderNo" placeholder-style="color:#c0c0c0;" @input="toSearch()" />
</view>
</view>
<view class="width100 height90 backcorfff marb5 mart15" style="border-radius: 22px 0 22px 0;">
<view class="width100 fotct height40p alijus font20 fcor333">
<view class="width50">
{{totalPrice}}
</view>
<view class="width50 ">
{{totalNum}}
</view>
<!-- <view style="width: 1px;" class="height80 backcor6"></view> -->
</view>
<view class="width100 fotct height40p alijus font14 fcor333">
<view class="width50 ">
交易金额
</view>
<view class="width50">
交易笔数
</view>
</view>
</view>
<view v-if="notesList == ''" class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" src="/static/img/noorder.png"></image>
</view>
<view class="width100 backcorfff" v-for="(item,index) in notesList" :key="index"
@click="jumpOderdetails(item.outTradeNo)">
<view class="width94 paddtop10 paddbotm10 alijusstart bor-botm1">
<view class="width15">
<image src="/static/img/wechat.png" mode="widthFix" class="iconw40"
v-if="item.payMode == 'WECHAT'"></image>
<image src="/static/img/alipay.png" mode="widthFix" class="iconw40"
v-if="item.payMode == 'ALIPAY'"></image>
</view>
<view class="width85">
<view class="font15 fcor666 width100">{{item.outTradeNo}}</view>
<view class="alijusstart font14 fcor999">
<view class="width50 text1">扫一扫</view>
<view class="width50 fotrt">{{statusList[item.status]}}</view>
</view>
<view class="alijusstart font14 paddtop5 fcor999">
<view class="width15 text1" v-if="userInfo.secUser.objectType == 2">{{item.salesmanName}}</view>
<view class="width85 text1" v-if="userInfo.secUser.objectType != 2">{{item.storeName}}</view>
<view class="width85 fotrt" v-if="userInfo.secUser.objectType == 2">{{item.storeName}}</view>
</view>
<view class="alijusstart font14 paddtop5 fcor999">
<view class="width70">{{item.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
<view class="width30 fotrt">¥ {{item.tradeAmount}}</view>
</view>
</view>
</view>
</view>
<!-- <view @click="scanCode()">
扫码核销
</view> -->
</view>
</template>
<script>
import {
getTradeOrderList,
getMerList,
getStoreListByMer,
querySalesmanList
} from '@/Utils/Api.js';
let app = getApp();
export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
startdate: currentDate,
enddate: currentDate,
notesList: [],
statusList: {
1: "待支付",
2: "支付中",
3: "支付成功",
4: "支付失败",
5: "已取消",
6: "已退款"
},
pageNum: 1,
pageSize: 10,
isNoMoreData: false, //
orderNo: '', //
totalPrice: 0, //
totalNum: 0, //
userInfo: app.globalData.userInfo, //
merList: [], //
merno: '', //
merName: '', //
storeListByMer: [], //
storeno: '', //
storename: '', //,
salesmanList: [], //
salesmanid: '', //id
salesmanname: '', //
}
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
onLoad() {
//
if (this.userInfo.secUser.objectType == 2) {
this.querySalesmanList();
}
//
if (this.userInfo.secUser.objectType == 3) {
this.getMerList(this.userInfo.salesman.id);
}
//
if (this.userInfo.secUser.objectType == 4) {
this.getStoreListByMer(this.userInfo.mer.id);
}
this.getTradeOrderList();
},
onReachBottom() {
this.getTradeOrderList();
},
methods: {
scanCode(){
// wx.scanQRCode({
// needResult: 0, // 01
// scanType: ["qrCode","barCode"], //
// success: function (res) {
// var result = res.resultStr; // needResult 1
// }
// });
},
//
querySalesmanList() {
let datas = {
pageNum: 1,
pageSize: 9999,
agentId: this.userInfo.agent.id
}
querySalesmanList(datas).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
this.salesmanList = res.return_data.list;
// this.salesmanid = res.return_data.list[0].id;
// this.getStoreListByMer(res.return_data.list[0].id);
// this.salesmanname = res.return_data.list[0].name;
}
})
},
//
getMerList(item) {
let datas = {
pageNum: 1,
pageSize: 9999,
merStatus:1,
salesmanId: item
}
getMerList(datas).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
this.merList = res.return_data.list;
// this.merno = res.return_data.list[0].id;
// this.getStoreListByMer(res.return_data.list[0].id);
// this.merName = res.return_data.list[0].merName;
}
})
},
//
getStoreListByMer(item) {
let datas = {
pageNum: 1,
pageSize: 9999,
merId: item
}
getStoreListByMer(datas).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
this.storeListByMer = res.return_data.list;
// this.storeno = res.return_data.list[0].id;
// this.storename = res.return_data.list[0].name;
}
})
},
//
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
bindDateChange(e) {
this.startdate = e.target.value;
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
bindDateChange1(e) {
this.enddate = e.target.value;
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
//
bindDateChange4(e) {
this.salesmanid = this.salesmanList[e.target.value].id;
this.salesmanname = this.salesmanList[e.target.value].name;
this.getMerList(this.salesmanList[e.target.value].id);
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
//
bindDateChange2(e) {
this.merno = this.merList[e.target.value].id;
this.merName = this.merList[e.target.value].merName;
this.getStoreListByMer(this.merList[e.target.value].id);
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
//
bindDateChange3(e) {
this.storeno = this.storeListByMer[e.target.value].id;
this.storename = this.storeListByMer[e.target.value].name;
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
toSearch() {
this.pageNum = 1;
this.notesList = [];
this.isNoMoreData = false;
this.getTradeOrderList();
},
//
getTradeOrderList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let a = new Date(this.startdate).getTime();
let b = new Date(this.enddate).getTime();
let startTime = a - 28800000;
let endTime = b + 57599000;
let pagenum = this.pageNum;
let datas = {
status: 3,
payTimeS: startTime,
payTimeE: endTime,
outTradeNo: this.orderNo,
pageNum: pagenum,
salesmanId:this.salesmanid,
merId: this.merno,
storeId: this.storeno,
pageSize: this.pageSize
}
getTradeOrderList(datas).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.pageInfo.list) {
this.totalPrice = res.return_data.totalPrice;
this.totalNum = res.return_data.totalNum;
this.isNoMoreData = res.return_data.pageInfo.list.length == this.pageSize ? false : true;
this.notesList = this.notesList.concat(res.return_data.pageInfo.list);
if (res.return_data.pageInfo.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.pageInfo.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.notesList = [];
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
})
},
//
jumpOderdetails(item) {
uni.navigateTo({
url: '/pages/index/order-list-details/order-list-details?orderid=' + item
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #f8f9f9;
}
.input-box {
width: 90%;
margin-left: 5%;
margin-top: 15px;
margin-bottom: 15px;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
.icon {
display: flex;
align-items: center;
position: absolute;
top: 2px;
left: 5px;
width: 60upx;
height: 60upx;
font-size: 34upx;
color: #c0c0c0;
}
input {
padding-left: 50upx;
height: 28upx;
font-size: 28upx;
width: 100%;
}
}
i {
border: solid #ffffff;
border-width: 0 2px 2px 0;
display: inline-block;
padding: 4px;
margin-left: 10px;
vertical-align: 3px;
}
.down {
-webkit-transform: rotate(45deg);
}
.font306adb {
color: #306adb;
}
.stus {
float: right;
margin-right: 20px;
}
.headsearch {
border-radius: 8px;
background-color: #4c7fe6;
}
.datetim {
width: 130px;
height: 30px;
line-height: 30px;
text-align: right;
border-radius: 15px;
}
</style>

@ -15,18 +15,27 @@
placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="dis-flex marb10 bor-botm1 margin10">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">门店标签:
<view class="group-title marRight10 padleft15 paddtright10 flex-s0 self-top">
<view class="fontwig6">门店标签:</view>
<view class="font14 fcor999 mart5">
('#'隔开)例如:可电话预订#可吸烟
</view>
</view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeLabel"
placeholder="请输入门店标签(用','隔开)例如:可电话预订,可吸烟" placeholder-class="font15" :maxlength="999"></textarea>
placeholder="请输入门店标签" placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="dis-flex marb10 bor-botm1 margin10">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">门店关键词:
<view class="group-title marRight10 padleft15 paddtright10 flex-s0 self-top">
<view class="fontwig6">门店关键词:</view>
<view class="font14 fcor999 mart5">
('#'隔开)例如:火锅#川菜
</view>
</view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeTag"
placeholder="请输入门店关键词(用','隔开)例如:火锅,川菜" placeholder-class="font15" :maxlength="999"></textarea>
placeholder="请输入门店关键词" placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="footer-btn">
<button class="backcor89 fcorfff" @click="clickToSave">保存</button>
@ -148,4 +157,8 @@
line-height: 50px;
}
}
.group-title{
width:80px;
}
</style>
Loading…
Cancel
Save