Merge branch 'ymt-groupSet' of http://gitea.dctpay.com/yangjie/xuan-pay-cweb into feature/scanCodeOrder

# Conflicts:
#	Utils/groupBuying.js
#	pages.json
#	pages/welcome/welcome.vue
fix
游梦婷 1 year ago
commit 2481bf1438
  1. 2
      App.vue
  2. 15
      Utils/groupBuying.js
  3. 5
      components/evan-steps/evan-step.vue
  4. 5
      pages.json
  5. 4
      pages/tabBar/home/home.vue
  6. 9
      pages/welcome/welcome.vue
  7. 11
      subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue
  8. 130
      subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue
  9. 267
      subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue
  10. 436
      subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder.vue
  11. 18
      subpackages/groupBuyingConfiguration/storeImg/storeImgAdd.vue
  12. 21
      subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue
  13. 3
      subpackages/groupBuyingConfiguration/storeProduct/storeProductAdd.vue

@ -7,10 +7,12 @@
// url: 'https://pay.dctpay.com/crest', // url: 'https://pay.dctpay.com/crest',
// imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com', // imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com',
// redirectUrl:'https://pay.dctpay.com/cweb', // redirectUrl:'https://pay.dctpay.com/cweb',
// hsgUrl:'https://hsg.dctpay.com',
// //
url: 'https://gratia-pay.dctpay.com/crest', url: 'https://gratia-pay.dctpay.com/crest',
imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com', imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com',
redirectUrl:'https://gratia-pay.dctpay.com/cweb', redirectUrl:'https://gratia-pay.dctpay.com/cweb',
hsgUrl:'https://hsgcs.dctpay.com',
userInfo: "", userInfo: "",
openId: '', openId: '',
h5code: '', h5code: '',

@ -3,7 +3,8 @@ import {
} from './Request.js'; } from './Request.js';
let app = getApp(); let app = getApp();
let base = app.globalData.url; let base = app.globalData.url;
let hsgCrest = app.globalData.hsgUrl+'/crest';
let hsgOrder = app.globalData.hsgUrl+'/order';
//新增门店图片 //新增门店图片
export const insertStoreImg = params => { export const insertStoreImg = params => {
@ -141,3 +142,15 @@ export const getALLCategory = params => {
export const getStoreProduct = params => { export const getStoreProduct = params => {
return POST('GET', `${base}/storeProductCategory/getStoreProduct`, params).then(res => res.data); return POST('GET', `${base}/storeProductCategory/getStoreProduct`, params).then(res => res.data);
} }
//查询获取团购内容code
export const getGroupContentByCode = params => {
return POST('GET', `${hsgCrest}/group/getGroupContentByCode`, params).then(res => res.data);
}
//核销团购码
export const gorOrderNotify = params => {
return POST('GET', `${hsgOrder}/groupOrder/gorOrderNotify`, params).then(res => res.data);
}

@ -347,11 +347,11 @@
position: absolute; position: absolute;
height: 30px; height: 30px;
top: 0; top: 0;
left: 30px; left: 50%;
/* #ifdef APP-NVUE */ /* #ifdef APP-NVUE */
right: -39px; right: -39px;
/* #endif */ /* #endif */
padding: 0 0px 0 40px; padding:0;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
width: 100%; width: 100%;
@ -390,6 +390,7 @@
.evan-step__circle--horizontal { .evan-step__circle--horizontal {
margin-left: 0px; margin-left: 0px;
z-index: 1;
} }
.evan-step__circle--finish {} .evan-step__circle--finish {}

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

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

@ -16,10 +16,12 @@
} }
}, },
onLoad(options) { onLoad(options) {
uni.reLaunch({ uni.reLaunch({
url: '../tabBar/home/home' url: '../tabBar/home/home'
}) })
return return
let that = this; let that = this;
/* /*
@ -101,11 +103,16 @@
// 0001https://gratia-pay.dctpay.com/cweb?accountId=0001&key=123 // 0001https://gratia-pay.dctpay.com/cweb?accountId=0001&key=123
if (app.globalData.accountId == '0001' && app.globalData.h5code){ if (app.globalData.accountId == '0001' && app.globalData.h5code){
let orderKey = uni.getStorageSync("urlKey"); let orderKey = uni.getStorageSync("urlKey");
if(orderKey){ if(orderKey&&this.userInfo.store.id){
uni.redirectTo({ uni.redirectTo({
url: '/subpackages/groupBuyingConfiguration/groupVerify/groupVerify?orderKey='+orderKey, url: '/subpackages/groupBuyingConfiguration/groupVerify/groupVerify?orderKey='+orderKey,
}) })
return false; return false;
}else{
uni.redirectTo({
url: '/pages/login/login'
})
return false;
} }
} }
return true; return true;

@ -20,7 +20,7 @@
</view> </view>
<view class="flex-1 fotct text1">{{item.name}}</view> <view class="flex-1 fotct text1">{{item.name}}</view>
<view class="flex-1 fotct text1">{{item.price}}</view> <view class="flex-1 fotct text1">{{item.price}}</view>
<view class="flex-1 fotct text1">{{item.status | filterStatus}}</view> <view :class="'flex-1 fotct text1'+(item.status == 2 ? ' fcorred ':'')">{{item.status | filterStatus}}</view>
<next-bubble-menu class="flex-1 fotct font14" :d-width="150" :dataList="item.status | filterDataList" <next-bubble-menu class="flex-1 fotct font14" :d-width="150" :dataList="item.status | filterDataList"
bingEleId="imgType" @change="getItem($event,item)"> bingEleId="imgType" @change="getItem($event,item)">
<view class=" font14 fcor41c " id="imgType">操作<text class="icon xia font14 fcor41c"></text></view> <view class=" font14 fcor41c " id="imgType">操作<text class="icon xia font14 fcor41c"></text></view>
@ -40,11 +40,11 @@
</view> </view>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">价格</view> <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>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">原价</view> <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>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">限制</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight40">限制</view>
@ -52,7 +52,7 @@
</view> </view>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">状态</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight40">状态</view>
<view class="flex-1 fotct ">{{productDetail.status | filterStatus}}</view> <view :class="'flex-1 fotct'+(productDetail.status == 2 ? ' fcorred ':'') ">{{productDetail.status | filterStatus}}</view>
</view> </view>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">使用时间</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight40">使用时间</view>
@ -60,7 +60,7 @@
</view> </view>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">有效期</view> <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>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight80">图片</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight80">图片</view>
@ -288,6 +288,7 @@
.titleWidth { .titleWidth {
width: 80px; width: 80px;
text-align: center; text-align: center;
align-self: stretch;
} }
.minheight40 { .minheight40 {

@ -37,11 +37,20 @@
<input type="text" name="name" v-model.trim="productData.serviceTime" <input type="text" name="name" v-model.trim="productData.serviceTime"
placeholder-class="corf6 font15" class=" flex-1 " placeholder="请输入使用时间"> placeholder-class="corf6 font15" class=" flex-1 " placeholder="请输入使用时间">
</view> </view>
<view class="dis-flex marb10 bor-botm1"> <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>
<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> </view>
<input type="text" name="name" v-model.trim="productData.validity" placeholder-class="corf6 font15" <!-- <input type="text" name="name" v-model.trim="productData.validity" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="有效期"> class=" flex-1 " placeholder="有效期"> -->
</view> </view>
<view class="dis-flex marb10 bor-botm1"> <view class="dis-flex marb10 bor-botm1">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">团购限制: <view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">团购限制:
@ -64,7 +73,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 产品详情 --> <!-- 产品详情 -->
@ -77,7 +85,7 @@
<view class="content dis-flex flex-sp" v-for="(item2,index2) in item.list" :key="index2"> <view class="content dis-flex flex-sp" v-for="(item2,index2) in item.list" :key="index2">
<view class="text">{{item2.productName}}</view> <view class="text">{{item2.productName}}</view>
<view class="dis-flex"> <view class="dis-flex">
<view class="text">{{item2.count}}</view> <view class="text">{{item2.productSpec}}</view>
<view class="icon shanchu margle20 font16 fcorred" @click.stop="deleteGroupDetail(item2.id)"></view> <view class="icon shanchu margle20 font16 fcorred" @click.stop="deleteGroupDetail(item2.id)"></view>
</view> </view>
@ -100,9 +108,11 @@
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="footer-btn backcorfff"> <view class="footer-btn backcorfff">
<view v-if="(status==2&&merchart>1)" class="height50 flex-1 fcor089 fotct" @click="merchart--">上一步</view> <!-- <view v-if="(status==2&&merchart>1)" class="height50 flex-1 fcor089 fotct" @click="merchart--">上一步</view>
<button class="backcor89 flex-1 fcorfff" @click="clickToSave" v-if="merchart!=2">保存</button> <button class="backcor89 flex-1 fcorfff" @click="clickToSave" v-if="merchart!=2">保存</button>
<view v-if="(status==2&&merchart<3)||merchart==2" class="height50 flex-1 fcor089 fotct" @click="merchart++">下一步</view> <view v-if="(status==2&&merchart<3)||merchart==2" class="height50 flex-1 fcor089 fotct" @click="merchart++">下一步</view> -->
<view v-if="(status==2&&merchart>1)" class="height50 flex-1 fcor089 fotct" @click="merchart--">上一步</view>
<button class="backcor89 flex-1 fcorfff" @click="clickToSave" >保存</button>
</view> </view>
@ -177,7 +187,10 @@
const app = getApp(); const app = getApp();
export default { export default {
data() { data() {
const currentDate = this.getDate()
return { return {
startdate: '',
enddate: '',
reqUrl: app.globalData.url, // reqUrl: app.globalData.url, //
imgUrl: app.globalData.imgUrl, //访 imgUrl: app.globalData.imgUrl, //访
status: '', //1. 2. status: '', //1. 2.
@ -217,10 +230,15 @@
return true return true
}, },
isShowAdd() { isShowAdd() {
return true return true
}, },
validity(){
if(this.startdate&&this.enddate){
return this.startdate+','+this.enddate
}else{
return '';
}
}
}, },
onLoad(option) { onLoad(option) {
@ -248,6 +266,7 @@
this.findGroupServeRuleByGroup();// this.findGroupServeRuleByGroup();//
} }
console.log(option, "=======") console.log(option, "=======")
}, },
components: { components: {
@ -255,6 +274,56 @@
wybPopup wybPopup
}, },
methods: { 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() { validate() {
var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/; var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
if (!reg.test(this.productData.price) || this.productData.price == 0) { if (!reg.test(this.productData.price) || this.productData.price == 0) {
@ -274,10 +343,19 @@
return false return false
} }
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 if (!this.productData.name || !this.productData.price || !this.productData.originalPrice || !this.productData.astrict || !this.productData
.serviceTime || !this.productData.validity) { .serviceTime) {
uni.showToast({ uni.showToast({
title: "请填写完整哦!", title: "请填写完整哦!",
icon: "none" icon: "none"
@ -298,6 +376,7 @@
return true return true
}, },
clickToSave() { clickToSave() {
if (this.merchart == 1) { if (this.merchart == 1) {
/* 第一步:团购基本内容*/ /* 第一步:团购基本内容*/
if (!this.validate()) return; // if (!this.validate()) return; //
@ -311,7 +390,10 @@
return return
} }
} }
if(this.merchart == 2){} if(this.merchart == 2){
this.merchart = this.merchart+1;
return
}
if(this.merchart==3){/* 第三步规则内容 */ if(this.merchart==3){/* 第三步规则内容 */
if(!this.ruleData.content){ if(!this.ruleData.content){
@ -339,6 +421,8 @@
this.productData.img = res.return_data.img; this.productData.img = res.return_data.img;
this.productData.serviceTime = res.return_data.serviceTime; this.productData.serviceTime = res.return_data.serviceTime;
this.productData.validity = res.return_data.validity; 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.productData.originalPrice = res.return_data.originalPrice;
this.imgValue = this.productData.img.split(","); this.imgValue = this.productData.img.split(",");
@ -360,7 +444,7 @@
this.groupId = res.return_data.id; this.groupId = res.return_data.id;
this.productDetail.groupId = res.return_data.id; this.productDetail.groupId = res.return_data.id;
this.ruleData.groupId = res.return_data.id; this.ruleData.groupId = res.return_data.id;
this.merchart = 2; this.merchart = this.merchart+1;
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
@ -374,17 +458,17 @@
/* 修改配置团购基本内容*/ /* 修改配置团购基本内容*/
editGroupContent() { editGroupContent() {
editGroupContent(this.productData).then(res => { editGroupContent(this.productData).then(res => {
let title;
if (res.return_code == '000000') { if (res.return_code == '000000') {
title = res.return_data; this.merchart = this.merchart+1;
} else { } else {
title = res.return_msg; uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
} }
uni.showToast({
title: title,
icon: 'none',
duration: 2000
})
this.merchart = 2; this.merchart = 2;
}) })
}, },

@ -1,22 +1,265 @@
<template> <template>
<view> <view class="all-container backcor9 pd-main font15">
========={{key}}======== <view v-if="detailData">
</view> <view class="border-8r backcorfff marb10 pd-main border-box " >
<view class="bgLight border-8r paddbotm15 fcorfff">
<view class="pd10 ">
<view class="font22 fontwig6 fontspec">{{detailData.name}}</view>
<view class=" dis-flex margle font18 mart10 ">
<view class=" dis-flex fontspec">现价:¥<view class="font18 fontwig6 ">{{detailData.price}}</view>
</view>
<view class="corf6 dis-flex fontspec margle text-lt font13" v-if="detailData.originalPrice">原价:¥<view>{{detailData.originalPrice}}</view>
</view>
</view>
</view>
<view class=" width100 circle pr">
<view class="border-dash width100"></view>
</view>
</view>
<view class=" paddtop10">
<view class="dis-flex marb5" >
<view class="flex-s0 fcor333 paddtright10 fontwig6">限制</view>
<view class="dis-flex flex-1">
{{detailData.astrict}}
</view>
</view>
<view class="dis-flex marb5" >
<view class="flex-s0 fcor333 paddtright10 fontwig6">须知</view>
<view class="dis-flex flex-1">
<text>{{detailData.serviceTime}}</text>
<text class="icon-ymt to-right font13 fontColor "></text>
</view>
</view>
<!-- <view class="dis-flex marb5" >
<view class="flex-s0 fcor333 paddtright10 fontwig6">保障</view>
<view class="dis-flex flex-1">
<text>随时退</text>
</view>
</view> -->
</view>
</view>
<view class=" font16 fontwig6 paddtop10 paddbotm10 ">
团购
</view>
<view class="border-8r backcorfff marb10 font14 pd-main border-box " v-if="detailData.groupDetails">
<view :class=" 'paddbotm5 '+(index<detailData.groupDetails.length-1?'border-b-666':'') "
v-for="(item,index) in detailData.groupDetails" :key="index">
<view class="dis-flex paddtop5 ">
<view class="dot bgb2"></view>
<view class="fontwig6">
{{item.name}}
</view>
</view>
<view class=" dis-flex flex-sp " v-for="(item2,index2) in item.list" :key="item2.id">
<view class="flex-1 fc333 paddleft10 dis-flex ">
<view class="dot bg33"></view>
<view class="dis-flex flex-1 flex-sp">
<view>{{item2.productName}}</view>
<view>({{item2.count}})</view>
</view>
</view>
<!-- <view class="flex-s0 paddleft10">
{{item2.price}}
</view> -->
</view>
</view>
</view>
<view class=" font16 fontwig6 paddtop10 paddbotm10 ">
购买须知
</view>
<view class="border-8r backcorfff marb10 font14 pd-main border-box ">
<view class=" paddbotm5 border-b-666 ">
<view class=" paddtop5 fontwig6">有效期</view>
<view class=" dis-flex paddleft10">
<view class="dot bgb2"></view>
<view>
{{detailData.validity.replace(',','至') || ''}}
</view>
</view>
</view>
<view class=" paddbotm5 border-b-666 ">
<view class=" paddtop5 fontwig6">使用时间</view>
<view class=" dis-flex paddleft10">
<view class="dot bgb2"></view>
<view>
{{detailData.serviceTime || ''}}
</view>
</view>
</view>
<view class=" paddbotm5 " v-if="detailData.storeGroupServeRule">
<view class=" paddtop5 fontwig6">使用规则</view>
<view class=" dis-flex paddleft10">
<view class="dot bgb2"></view>
<view>
{{detailData.storeGroupServeRule.content || ''}}
</view>
</view>
</view>
</view>
<view class="btn92 mart10 marb10" @click="comfirmVerify()">
立即核销
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { import {getGroupContentByCode,gorOrderNotify} from '@/Utils/groupBuying.js';
data(){
return{ const app = getApp();
key:'', export default {
data(){
return{
groupCode:'',
detailData:null,//
imgUrl: app.globalData.imgUrl, //访
instructionList:[],//使
}
},
onLoad(option){
if(option.orderKey){
this.groupCode = option.orderKey;
this.getGroupContentByCode();//
}
},
methods:{
getGroupContentByCode(){
let params={
groupCode:this.groupCode
}
uni.showLoading({
title:"加载中...",
mask:true,
})
getGroupContentByCode(params).then(res=>{
uni.hideLoading();
if (res.return_code == '000000') {
this.detailData = res.return_data;
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
/* 立即核销 */
comfirmVerify(){
uni.showLoading({
title:"核销中...",
mask:true,
})
let params={
groupCode:this.groupCode,
storeId:app.globalData.userInfo.store.id
}
gorOrderNotify(params).then(res=>{
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title:res.return_data,
icon: 'none',
duration: 2000
})
// setTimeout(()=>{
// uni.navigateBack();
// },1000)
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
} }
},
onLoad(option){
this.key = option.orderKey;
} }
}
</script> </script>
<style scoped> <style lang="scss" scoped>
.pr {
position: relative;
}
.border-box{
box-sizing: border-box;
}
.text-lt{
text-decoration: line-through;
}
/* ======== */
.bgLight {
background-color: #089bf5;
}
.pd10 {
padding: 10px;
}
.border-dash {
border-bottom: 1px dashed #f6f6f6;
position: absolute;
top: 9px;
}
.circle {
height:40px;
&::before {
content: "";
width: 20px;
height: 20px;
background-color: #ffffff;
position: absolute;
left: -10px;
top: 0px;
display: block;
z-index: 99;
border-radius: 50%;
}
&::after {
content: "";
display: block;
width: 20px;
height: 20px;
background-color: #ffffff;
position: absolute;
right: -10px;
top: 0px;
z-index: 99;
border-radius: 50%;
}
}
//end
//content
.dot {
width: 5px;
height: 5px;
border-radius: 50%;
flex-shrink: 0;
margin-right: 8px;
&.bgb2 {
background-color: #b2b2b2;
}
&.bg33 {
background-color: #333333;
}
}
</style> </style>

@ -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>

@ -68,11 +68,12 @@
return true return true
}, },
isShowAdd(){ isShowAdd(){
if(this.imgValue.length>=1){ // if(this.imgValue.length>=1){
return false // return false
}else{ // }else{
return true // return true
} // }
return true;
}, },
}, },
@ -167,6 +168,9 @@
// //
uploadFile(imgURL) { uploadFile(imgURL) {
const that = this; const that = this;
uni.showLoading({
title:'加载中...'
})
uni.uploadFile({ uni.uploadFile({
url: that.reqUrl + '/fileUpload/uploadfile', url: that.reqUrl + '/fileUpload/uploadfile',
filePath: imgURL, filePath: imgURL,
@ -175,8 +179,12 @@
}, },
name: 'files', name: 'files',
success: function(uploadFileRes) { success: function(uploadFileRes) {
uni.hideLoading();
that.getImgSignedUrl(JSON.parse(uploadFileRes.data) that.getImgSignedUrl(JSON.parse(uploadFileRes.data)
.return_data); .return_data);
},
fail: function() {
uni.hideLoading();
} }
}); });
}, },

@ -15,18 +15,27 @@
placeholder-class="font15" :maxlength="999"></textarea> placeholder-class="font15" :maxlength="999"></textarea>
</view> </view>
<view class="dis-flex marb10 bor-botm1 margin10"> <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> </view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false" <textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeLabel" :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>
<view class="dis-flex marb10 bor-botm1 margin10"> <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> </view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false" <textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeTag" :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>
<view class="footer-btn"> <view class="footer-btn">
<button class="backcor89 fcorfff" @click="clickToSave">保存</button> <button class="backcor89 fcorfff" @click="clickToSave">保存</button>
@ -148,4 +157,8 @@
line-height: 50px; line-height: 50px;
} }
} }
.group-title{
width:80px;
}
</style> </style>

@ -14,7 +14,8 @@
class=" flex-1 " placeholder="请输入价格(保留两位小数)"> class=" flex-1 " placeholder="请输入价格(保留两位小数)">
</view> </view>
<view class="dis-flex marb10 bor-botm1"> <view class="dis-flex marb10 bor-botm1">
<view class=" marRight10 fontwig6 padleft15 paddtright10">规格: <view class=" marRight10 fontwig6 padleft15 paddtright10">
规格:
</view> </view>
<input type="text" name="name" v-model.trim="productData.spec" placeholder-class="corf6" <input type="text" name="name" v-model.trim="productData.spec" placeholder-class="corf6"
class=" flex-1 " placeholder="请输入规格"> class=" flex-1 " placeholder="请输入规格">

Loading…
Cancel
Save