diff --git a/Utils/groupBuying.js b/Utils/groupBuying.js index 430efa2..9c8f3ef 100644 --- a/Utils/groupBuying.js +++ b/Utils/groupBuying.js @@ -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 diff --git a/pages.json b/pages.json index 8314c87..a24c944 100644 --- a/pages.json +++ b/pages.json @@ -698,6 +698,12 @@ "navigationBarTitleText": "核销订单", "enablePullDownRefresh": false } + },{ + "path":"groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder", + "style": { + "navigationBarTitleText": "核销订单" + } + } ] diff --git a/pages/index/merchant-details/merchant-details.vue b/pages/index/merchant-details/merchant-details.vue index cbaa166..9939fa0 100644 --- a/pages/index/merchant-details/merchant-details.vue +++ b/pages/index/merchant-details/merchant-details.vue @@ -93,7 +93,7 @@ - + diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue index db39bcb..638f462 100644 --- a/pages/tabBar/home/home.vue +++ b/pages/tabBar/home/home.vue @@ -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; diff --git a/pages/welcome/welcome.vue b/pages/welcome/welcome.vue index bfad874..a18fb9d 100644 --- a/pages/welcome/welcome.vue +++ b/pages/welcome/welcome.vue @@ -16,10 +16,10 @@ } }, onLoad(options) { - // uni.reLaunch({ - // url: '../tabBar/home/home' - // }) - // return + uni.reLaunch({ + url: '/pages/login/login' + }) + return let that = this; /* diff --git a/subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue b/subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue index 076e1af..5a9bad7 100644 --- a/subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue +++ b/subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue @@ -40,11 +40,11 @@ 价格 - {{productDetail.price}} + {{productDetail.price}}元 原价 - {{productDetail.originalPrice}} + {{productDetail.originalPrice}}元 限制 @@ -60,7 +60,7 @@ 有效期 - {{productDetail.validity}} + {{productDetail.validity.replace(',',"至")}} 图片 diff --git a/subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue b/subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue index dfd6598..f386425 100644 --- a/subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue +++ b/subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue @@ -37,11 +37,20 @@ - - 有效期: + + 有效时间: + + + + {{startdate?startdate:'请选择开始时间'}} + + + + {{enddate?enddate:'请选择结束时间'}} + - + 团购限制: @@ -64,7 +73,6 @@ - @@ -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) { @@ -274,10 +341,19 @@ 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 - .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(","); diff --git a/subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue b/subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue index 9cb453a..4690802 100644 --- a/subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue +++ b/subpackages/groupBuyingConfiguration/groupVerify/groupVerify.vue @@ -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(); diff --git a/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder.vue b/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder.vue new file mode 100644 index 0000000..88963ae --- /dev/null +++ b/subpackages/groupBuyingConfiguration/groupVerifyOrder/groupVerifyOrder.vue @@ -0,0 +1,436 @@ + + + + + \ No newline at end of file diff --git a/subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue b/subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue index 4d73c59..5fe4f15 100644 --- a/subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue +++ b/subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue @@ -15,18 +15,27 @@ placeholder-class="font15" :maxlength="999"> - 门店标签: + + 门店标签: + + (用'#'隔开)例如:可电话预订#可吸烟 + + placeholder="请输入门店标签" placeholder-class="font15" :maxlength="999"> - 门店关键词: + + 门店关键词: + + (用'#'隔开)例如:火锅#川菜 + + + placeholder="请输入门店关键词" placeholder-class="font15" :maxlength="999"> @@ -148,4 +157,8 @@ line-height: 50px; } } + + .group-title{ + width:80px; + } \ No newline at end of file