Commit c2d45b05 by 前端

Merge branch 'liwk_dev_v2.1.0_0427' into 'master'

Liwk dev v2.1.0 0427  ==》 master 封版

See merge request !2
2 parents 6f47f1f5 d8cbd117
...@@ -55,5 +55,5 @@ export default { ...@@ -55,5 +55,5 @@ export default {
url, url,
data data
}) })
} },
} }
\ No newline at end of file \ No newline at end of file
const url = '/rop-scrm-shopmall/router' const url = '/rop-scrm-shopmall/router'
export default { export default {
/** 获取门店商品列表 */ /** 获取门店商品列表 */
getGoodsList(currentPage) { getGoodsList (currentPage) {
let data = { let data = {
method: 'scrm.api.shopmall.goods.wework.page', method: 'scrm.api.shopmall.goods.wework.page',
pageSize: 10, pageSize: 10,
currentPage currentPage,
needActivityInfo: true
} }
return window.$HTTP({ return window.$HTTP({
url, url,
...@@ -13,7 +14,7 @@ export default { ...@@ -13,7 +14,7 @@ export default {
}) })
}, },
/**获取商品海报 */ /**获取商品海报 */
getGoodsPoster(data) { getGoodsPoster (data) {
data.method = 'scrm.api.shopmall.goods.wework.posterUrl' data.method = 'scrm.api.shopmall.goods.wework.posterUrl'
return window.$HTTP({ return window.$HTTP({
url, url,
...@@ -21,7 +22,7 @@ export default { ...@@ -21,7 +22,7 @@ export default {
}) })
}, },
/** 获取商品链接 */ /** 获取商品链接 */
getGoodsLink(data) { getGoodsLink (data) {
data.method = 'scrm.api.shopmall.goods.wework.url' data.method = 'scrm.api.shopmall.goods.wework.url'
return window.$HTTP({ return window.$HTTP({
url, url,
...@@ -29,7 +30,7 @@ export default { ...@@ -29,7 +30,7 @@ export default {
}) })
}, },
/** 获取商品海报企业微信素材mediaId */ /** 获取商品海报企业微信素材mediaId */
getGoodsPosterMediaId(data) { getGoodsPosterMediaId (data) {
data.method = 'scrm.api.shopmall.goods.wework.posterWorkWxMediaId' data.method = 'scrm.api.shopmall.goods.wework.posterWorkWxMediaId'
return window.$HTTP({ return window.$HTTP({
url, url,
...@@ -38,7 +39,7 @@ export default { ...@@ -38,7 +39,7 @@ export default {
}, },
/** 分页查询商品订单核销列表(待核销、已核销用查询参数区分) */ /** 分页查询商品订单核销列表(待核销、已核销用查询参数区分) */
getGoodsVerficationList(data = {}) { getGoodsVerficationList (data = {}) {
data.method = 'scrm.api.shopmall.wework.order.verfication.page' data.method = 'scrm.api.shopmall.wework.order.verfication.page'
data.pageSize = 10 data.pageSize = 10
return window.$HTTP({ return window.$HTTP({
...@@ -48,7 +49,7 @@ export default { ...@@ -48,7 +49,7 @@ export default {
}, },
/**根据商城订单核销码获取商城订单详情以备核销 */ /**根据商城订单核销码获取商城订单详情以备核销 */
getGoodsVerficationDetail(verificationCode) { getGoodsVerficationDetail (verificationCode) {
let data = { let data = {
method: 'scrm.api.shopmall.wework.order.detail.toVerfication', method: 'scrm.api.shopmall.wework.order.detail.toVerfication',
verificationCode: verificationCode verificationCode: verificationCode
...@@ -60,7 +61,7 @@ export default { ...@@ -60,7 +61,7 @@ export default {
}, },
/** 商品订单核销 */ /** 商品订单核销 */
verficationGoods(verificationCode) { verficationGoods (verificationCode) {
let data = { let data = {
method: 'scrm.api.shopmall.wework.order.verfication', method: 'scrm.api.shopmall.wework.order.verfication',
verificationCode: verificationCode verificationCode: verificationCode
...@@ -69,5 +70,16 @@ export default { ...@@ -69,5 +70,16 @@ export default {
url, url,
data data
}) })
},
/**查看商品订单详情 */
getGoodsDetail (orderCode) {
let data = {
method: 'scrm.api.shopmall.weapp.order.detail',
orderCode
}
return window.$HTTP({
url,
data
})
} }
} }
...@@ -8,7 +8,8 @@ const WxConfig = { ...@@ -8,7 +8,8 @@ const WxConfig = {
if (e == 'chooseImage') jsApiList.push('getLocalImgData') if (e == 'chooseImage') jsApiList.push('getLocalImgData')
}) })
let [redirectUrl] = window.location.href.split('#') let [redirectUrl] = window.location.href.split('#')
const { corpId } = util.getLocalStorage('dj_scrm_corpId') let { corpId } = util.getQuery()
if (!corpId) corpId = util.getLocalStorage('dj_scrm_corpId').corpId
/** 获取企微应用AgentConfig */ /** 获取企微应用AgentConfig */
let data = { let data = {
corpId, corpId,
...@@ -57,7 +58,7 @@ const WxConfig = { ...@@ -57,7 +58,7 @@ const WxConfig = {
* expireTime 失效时间 * expireTime 失效时间
* expireInterval 失效间隔 * expireInterval 失效间隔
* appId 微信应用ID * appId 微信应用ID
* envVersion 要打开的小程序版本。正式版为:release,体验版为:trial,开发版为:develop,仅在微信外打开时生效 * envVersion 要打开的小程序版本。正式版为:release,体验版为: trial 开发版为:develop,仅在微信外打开时生效
*/ */
console.log('请求', data) console.log('请求', data)
return window.$HTTP({ return window.$HTTP({
...@@ -227,7 +228,7 @@ const WxConfig = { ...@@ -227,7 +228,7 @@ const WxConfig = {
onHistoryBack () { onHistoryBack () {
return new Promise(resolve => { return new Promise(resolve => {
wx.onHistoryBack(function(res){ wx.onHistoryBack(function (res) {
resolve(res) resolve(res)
}) })
}) })
...@@ -365,19 +366,19 @@ const WxConfig = { ...@@ -365,19 +366,19 @@ const WxConfig = {
}) })
}, },
/**自建应用发起审批 */ /**自建应用发起审批 */
thirdPartyOpenPage (params) { thirdPartyOpenPage (params) {
console.log(params,'参数') console.log(params, '参数')
return new Promise(resolve => { return new Promise(resolve => {
wx.invoke('thirdPartyOpenPage', params, function (res){ wx.invoke('thirdPartyOpenPage', params, function (res) {
if (res && res.err_msg == 'thirdPartyOpenPage:ok') { if (res && res.err_msg == 'thirdPartyOpenPage:ok') {
resolve(res,'回调') resolve(res, '回调')
} }
}) })
}) })
}, },
} }
export default WxConfig export default WxConfig
.sprite-icon { background-image: url(../images/sprite.png);background-size: 290px 250px;} .sprite-icon { background-image: url(../images/sprite.png);background-size: 319px 250px;}
.icon-coupon-0 { width: 32px; height: 32px; background-position: -134px -180px;} .icon-close { width: 12px; height: 12px; background-position: -231px -180px;}
.icon-coupon-1 { width: 32px; height: 32px; background-position: -176px -180px;} .icon-coupon-0 { width: 32px; height: 32px; background-position: -270px -113px;}
.icon-coupon-1 { width: 32px; height: 32px; background-position: -270px -155px;}
.icon-coupon-lose { width: 70px; height: 70px; background-position: -180px -90px;} .icon-coupon-lose { width: 70px; height: 70px; background-position: -180px -90px;}
.icon-coupon-success { width: 70px; height: 70px; background-position: 0px -180px;} .icon-coupon-success { width: 70px; height: 70px; background-position: 0px -180px;}
.icon-coupon-tips { width: 49px; height: 49px; background-position: -270px 0px;}
.icon-coupon { width: 80px; height: 80px; background-position: 0px 0px;} .icon-coupon { width: 80px; height: 80px; background-position: 0px 0px;}
.icon-discount { width: 80px; height: 80px; background-position: -90px 0px;} .icon-discount { width: 80px; height: 80px; background-position: -90px 0px;}
.icon-down { width: 12px; height: 12px; background-position: -270px -110px;} .icon-down { width: 12px; height: 12px; background-position: -80px -217px;}
.icon-exchange { width: 80px; height: 80px; background-position: 0px -90px;} .icon-exchange { width: 80px; height: 80px; background-position: 0px -90px;}
.icon-gift-add { width: 12px; height: 12px; background-position: -270px -132px;} .icon-gift-add { width: 12px; height: 12px; background-position: -102px -217px;}
.icon-gift-bg { width: 80px; height: 80px; background-position: -90px -90px;} .icon-gift-bg { width: 80px; height: 80px; background-position: -90px -90px;}
.icon-gift-create { width: 16px; height: 16px; background-position: -270px -58px;} .icon-gift-create { width: 16px; height: 16px; background-position: -300px -227px;}
.icon-gift-del { width: 18px; height: 18px; background-position: -270px -30px;} .icon-gift-del { width: 18px; height: 18px; background-position: -300px -197px;}
.icon-gift-icon { width: 44px; height: 44px; background-position: -80px -180px;} .icon-gift-icon { width: 44px; height: 44px; background-position: -270px -59px;}
.icon-poster-close { width: 20px; height: 20px; background-position: -218px -180px;} .icon-gift-logo { width: 89px; height: 27px; background-position: -80px -180px;}
.icon-scan { width: 16px; height: 16px; background-position: -270px -84px;} .icon-goods-share { width: 16px; height: 16px; background-position: -179px -180px;}
.icon-share { width: 20px; height: 20px; background-position: -270px 0px;} .icon-poster-close { width: 20px; height: 20px; background-position: -270px -197px;}
.icon-scan { width: 16px; height: 16px; background-position: -205px -180px;}
.icon-share { width: 20px; height: 20px; background-position: -270px -227px;}
.icon-vip { width: 80px; height: 80px; background-position: -180px 0px;} .icon-vip { width: 80px; height: 80px; background-position: -180px 0px;}
\ No newline at end of file \ No newline at end of file

119 KB | W: | H:

128 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
{ text: '优惠券', value: 0 }, { text: '优惠券', value: 0 },
{ text: '精品礼券', value: 1 }, { text: '精品礼券', value: 1 },
{ text: '商品订单', value: 2 }, { text: '商品订单', value: 2 },
{ text: '会员服务', value: 3 } { text: '门店服务', value: 3 }
], ],
searchValue: '' searchValue: ''
} }
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
*/ */
// 本地环境配置 // 本地环境配置
module.exports = { module.exports = {
envVersion: "develop", envVersion: 'trial',
title: '嘀加企微管家', title: '嘀加企微管家',
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
...@@ -29,7 +29,8 @@ module.exports = { ...@@ -29,7 +29,8 @@ module.exports = {
code_message_map: {} code_message_map: {}
}, },
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b", secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
shopmall_appid: "wxe10067a63c1856ac", // shopmall_appid: "wxfe82b8d65d07808f", //广汇
shopmall_appid: "wxe10067a63c1856ac", //嘀加
sign: { sign: {
appKey: "48e5e13229b82c1b4e6e8c96151f0637", appKey: "48e5e13229b82c1b4e6e8c96151f0637",
format: "json", format: "json",
......
...@@ -5,7 +5,7 @@ const discountType = { ...@@ -5,7 +5,7 @@ const discountType = {
4: '兑换', 4: '兑换',
5: '购车代金', 5: '购车代金',
6: '商品折扣', 6: '商品折扣',
7: '会员服务' 7: '门店服务'
} }
export default { export default {
data() { data() {
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
4: '兑换券', 4: '兑换券',
5: '购车代金券', 5: '购车代金券',
6: '商品折扣券', 6: '商品折扣券',
7: '会员服务' 7: '门店服务'
}, },
} }
}, },
......
...@@ -7,6 +7,16 @@ export default { ...@@ -7,6 +7,16 @@ export default {
}, },
mounted () { mounted () {
if (this.$route.meta.isTab || this.$route.meta.isIndex) this.wxInit() if (this.$route.meta.isTab || this.$route.meta.isIndex) this.wxInit()
// wxConfig
// .createMiniprogramUrlLink({
// path: 'packageEquity/pages/active/active',
// appId: 'wxfe82b8d65d07808f',
// query: '?ss=ss',
// envVersion: 'release'
// })
// .then(url => {
// console.log(url)
// })
}, },
methods: { methods: {
wxInit () { wxInit () {
......
...@@ -103,7 +103,6 @@ const dialog = (params = {}) => { ...@@ -103,7 +103,6 @@ const dialog = (params = {}) => {
const makePhoneCall = phoneNumber => { const makePhoneCall = phoneNumber => {
window.location.href = `tel://${phoneNumber}` window.location.href = `tel://${phoneNumber}`
} }
/**是否全面屏 */ /**是否全面屏 */
const isFullSucreen = () => { const isFullSucreen = () => {
let result = false let result = false
...@@ -121,7 +120,7 @@ const jumpChildrenPage = (to, params) => { ...@@ -121,7 +120,7 @@ const jumpChildrenPage = (to, params) => {
const setClipboardData = data => { const setClipboardData = data => {
wx.setClipboardData({ wx.setClipboardData({
data, data,
success(res) { success (res) {
Toast('复制成功') Toast('复制成功')
} }
}) })
...@@ -165,6 +164,27 @@ const watchPageBack = () => { ...@@ -165,6 +164,27 @@ const watchPageBack = () => {
const centsToyuan = price => { const centsToyuan = price => {
return decimal(price / 100, 2).toFixed(2) return decimal(price / 100, 2).toFixed(2)
} }
/**设置cookie */
const setCookie = (c_name, value, expiredays = 365) => {
let exdate = new Date()
console.log(c_name, value)
exdate.setDate(exdate.getDate() + expiredays)
document.cookie = c_name + '=' + value +
((expiredays == null) ? '' : ';expires=' + exdate.toGMTString())
}
/**获取cookie */
const getCookie = c_name => {
if (document.cookie.length > 0) {
let c_start = document.cookie.indexOf(c_name + '=')
if (c_start != -1) {
c_start = c_start + c_name.length + 1
let c_end = document.cookie.indexOf(';', c_start)
if (c_end == -1) c_end = document.cookie.length
return unescape(document.cookie.substring(c_start, c_end))
}
}
return ''
}
const utils = { const utils = {
removeLocalStorage, removeLocalStorage,
setClipboardData, setClipboardData,
...@@ -184,6 +204,8 @@ const utils = { ...@@ -184,6 +204,8 @@ const utils = {
touchstart, touchstart,
showToast, showToast,
getParams, getParams,
setCookie,
getCookie,
getQuery, getQuery,
touchend, touchend,
throttle, throttle,
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<div <div
class="btn text-center" class="btn text-center"
@click="submit" @click="submit"
v-if="!hideBtn"
>确认核销</div> >确认核销</div>
</div> </div>
</template> </template>
...@@ -77,6 +78,7 @@ export default { ...@@ -77,6 +78,7 @@ export default {
data () { data () {
return { return {
flag: false, flag: false,
hideBtn: false,
detail: {}, detail: {},
total: 0, total: 0,
price: 0, price: 0,
...@@ -120,23 +122,35 @@ export default { ...@@ -120,23 +122,35 @@ export default {
} }
}, },
activated () { activated () {
let { verficationCode } = this.getParams() let { verficationCode, orderCode } = this.getParams()
this.showLoading() this.showLoading()
shopmallApi if (orderCode) this.getGoodsDetail(orderCode)
else shopmallApi
.getGoodsVerficationDetail(verficationCode) .getGoodsVerficationDetail(verficationCode)
.then(res => { .then(res => {
res.orderGoods.map(e => (this.price += e.retailPrice)) this.setData(res)
this.detail = res
this.flag = true
this.total = this.price + res.expressFee
this.hideLoading()
console.log(res)
}) })
}, },
mounted () { mounted () {
}, },
deactivated () {
Object.assign(this.$data, this.$options.data.call(this))
},
methods: { methods: {
setData (res) {
res.orderGoods.map(e => (this.price += e.retailPrice))
this.detail = res
this.flag = true
this.total = this.price + res.expressFee
this.hideLoading()
},
getGoodsDetail (orderCode) {
shopmallApi.getGoodsDetail(orderCode).then(res => {
this.setData(res)
this.hideBtn = true
})
},
submit () { submit () {
let { verficationCode } = this.getParams() let { verficationCode } = this.getParams()
this.showLoading() this.showLoading()
......
...@@ -8,10 +8,28 @@ ...@@ -8,10 +8,28 @@
:updata="updata" :updata="updata"
sticky sticky
></tab> ></tab>
<template v-if="tabIndex==1 && showTips">
<div class="tips flex">
<div class="label">温馨提示:</div>
<div class="text">
<van-notice-bar
scrollable
speed="30"
text="多次发送同张优惠券给客户,客户可领取多张,请注意控制成本"
/>
</div>
<div
class="close flex"
@click="closeTips"
>
<div class="sprite-icon icon-close"></div>
</div>
</div>
</template>
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length"> <template v-if="list.length">
<scroll-view <scroll-view
class="list-box" :class="['list-box',{'tips-type':showTips && tabIndex == 1}]"
@ReachBottom="onReachBottom" @ReachBottom="onReachBottom"
ref="scrollView" ref="scrollView"
> >
...@@ -64,6 +82,29 @@ ...@@ -64,6 +82,29 @@
<template v-else> <template v-else>
<router-view></router-view> <router-view></router-view>
</template> </template>
<template v-if="tabIndex == 1">
<van-dialog
v-model="showCouponModal"
confirmButtonText="我知道了"
confirmButtonColor="#3975C6"
@confirm="closeCouponModal"
>
<div class="modal-content flex">
<div class="sprite-icon icon-coupon-tips"></div>
<div class="modal-content-title">温馨提示</div>
<div class="modal-content-text">多次发送同张优惠券给客户,客户可领取多张,请注意控制成本</div>
<div class="modal-content-radio flex">
<van-checkbox
v-model="modalChecked"
checked-color="#3975C6"
shape="square"
icon-size="16px"
></van-checkbox>
以后不再提示
</div>
</div>
</van-dialog>
</template>
</div> </div>
</template> </template>
...@@ -75,11 +116,23 @@ export default { ...@@ -75,11 +116,23 @@ export default {
mixins: [shareMixin, pageMixin, discountTypeMixin], mixins: [shareMixin, pageMixin, discountTypeMixin],
data () { data () {
return { return {
// tabList: ['商城优惠券'] tabList: ['新车精品礼券', '商城优惠券'],
tabList: ['新车精品礼券', '商城优惠券'] showTips: true,
showCouponModal: false,
modalChecked: false,
corpId: ''
} }
}, },
mounted () { }, mounted () {
let { corpId } = this.getQuery()
if (!corpId) corpId = this.getLocalStorage('dj_scrm_corpId').corpId
const tomorrow = this.getLocalStorage(`tips_${corpId}`)
const couponModal = this.getLocalStorage(`modal_${corpId}`)
this.corpId = corpId
console.log(couponModal, tomorrow, corpId)
if (tomorrow) this.showTips = new Date().getTime() >= tomorrow
this.showCouponModal = !couponModal
},
methods: { methods: {
getList (pageNum) { getList (pageNum) {
let { list, tabIndex } = this let { list, tabIndex } = this
...@@ -92,12 +145,61 @@ export default { ...@@ -92,12 +145,61 @@ export default {
this.list = list.concat(res.list) this.list = list.concat(res.list)
this.total = res.total this.total = res.total
}) })
},
closeTips () {
let { corpId } = this
this.showTips = false
let tomorrow = new Date(`${new Date(new Date().setDate(new Date().getDate() + 1)).format('yyyy/MM/dd')} 00:00:00`).getTime()
this.setLocalStorage(`tips_${corpId}`, tomorrow)
},
closeCouponModal () {
let { modalChecked, corpId } = this
if (!modalChecked) return
this.setLocalStorage(`modal_${corpId}`, true)
} }
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.tips {
position: sticky;
top: 50px;
height: 32px;
background: #e5effd;
z-index: 2;
font-size: 12px;
color: #333333;
padding-left: 16px;
&::before {
content: '';
width: 1px;
height: 14px;
background-color: #3975c6;
margin-right: 7px;
}
.label {
flex-shrink: 0;
}
.close {
margin-left: auto;
width: 32px;
height: 100%;
justify-content: flex-end;
padding-right: 16px;
}
.text {
width: calc(100% - 100px);
.van-notice-bar {
padding: 0;
background: #e5effd;
color: #333333;
font-size: 12px;
height: 100%;
line-height: normal;
}
}
}
.list-box { .list-box {
height: calc(100vh - 100px); height: calc(100vh - 100px);
.item { .item {
...@@ -184,4 +286,32 @@ export default { ...@@ -184,4 +286,32 @@ export default {
} }
} }
} }
.tips-type {
height: calc(100vh - 132px);
}
.modal-content {
flex-direction: column;
padding: 24px 24px 9px;
color: rgba(10, 17, 26, 0.5);
font-size: 15px;
&-title {
font-size: 17px;
font-weight: 500;
color: #000000;
margin: 19px 0 8px;
}
&-text {
text-align: center;
}
&-radio {
margin-top: 8px;
font-size: 14px;
color: #666666;
height: 16px;
justify-content: center;
.van-checkbox {
margin-right: 4px;
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -30,13 +30,24 @@ ...@@ -30,13 +30,24 @@
class="item flex" class="item flex"
v-if="detail[i.key]" v-if="detail[i.key]"
> >
<div class="label">{{i.label}}</div> <div class="label">
{{i.label}}
<template v-if="i.tipsLabel">
<div class="item-tips">{{i.tipsLabel}}</div>
</template>
</div>
<div class="value"> <div class="value">
<template v-if="i.format"> <template v-if="i.format">
<div v-html="i.format(detail)"></div> <div v-html="i.format(detail)"></div>
</template> </template>
<template v-else> <template v-else>
{{detail[i.key] || ''}} {{detail[i.key] || ''}}
<template v-if="i.tipsValue">
<div
class="item-tips"
v-html="i.tipsValue(detail)"
></div>
</template>
</template> </template>
</div> </div>
</div> </div>
...@@ -51,7 +62,7 @@ ...@@ -51,7 +62,7 @@
<div class="use-type"> <div class="use-type">
<template v-if="detail.useType == 0">不限次数</template> <template v-if="detail.useType == 0">不限次数</template>
<template v-else-if="detail.useType == 1"> <template v-else-if="detail.useType == 1">
{{detail.effectiveType > 2 ? '' : '有效期'}}可用{{detail.useAllAmount}}次 {{detail.effectiveType > 2 ? '' : '有效期内'}}可用{{detail.useAllAmount}}次
</template> </template>
<template v-else> <template v-else>
每隔{{detail.useLimitDays}}天 每隔{{detail.useLimitDays}}天
...@@ -61,9 +72,25 @@ ...@@ -61,9 +72,25 @@
</div> </div>
</div> </div>
</div> </div>
<template v-if="detail.directionalGiftName">
<div class="item flex">
<div class="label">
所属定向礼包
<div class="item-tips">领取条件</div>
</div>
<div class="value">
{{detail.directionalGiftName}}
<div class="item-tips">
{{detail.directionalGiftReceiveWay == 1?'手机号':'车架号后6位'}}:{{detail.directionalGiftReceiveCondition}}
</div>
</div>
</div>
</template>
</template> </template>
</div> </div>
<div <div
v-if="!hideBtn"
class="btn text-center" class="btn text-center"
@click="submit" @click="submit"
>确认核销</div> >确认核销</div>
...@@ -90,6 +117,14 @@ const couponObj = [ ...@@ -90,6 +117,14 @@ const couponObj = [
} }
}, },
{ {
label: '所属定向礼包',
key: 'directionalGiftName',
tipsLabel: '领取条件',
tipsValue (item) {
return `${item.directionalGiftReceiveWay == 1 ? '手机号' : '车架号后6位'}:${item.directionalGiftReceiveCondition}`
}
},
{
label: '发放人', label: '发放人',
key: 'issueName' key: 'issueName'
}, },
...@@ -111,8 +146,15 @@ const vipObj = [ ...@@ -111,8 +146,15 @@ const vipObj = [
key: 'couponName' key: 'couponName'
}, },
{ {
label: '类型',
key: 'discountType',
format () {
return '服务券'
}
},
{
label: '有效期', label: '有效期',
KEY: 'effectiveType', key: 'effectiveType',
format (item) { format (item) {
let { effectiveType } = item let { effectiveType } = item
let str = '' let str = ''
...@@ -121,7 +163,7 @@ const vipObj = [ ...@@ -121,7 +163,7 @@ const vipObj = [
else str = '无有效期' else str = '无有效期'
return str return str
} }
} },
] ]
export default { export default {
name: '', name: '',
...@@ -148,15 +190,17 @@ export default { ...@@ -148,15 +190,17 @@ export default {
], ],
infoObj: [], infoObj: [],
verficationCode: '', verficationCode: '',
flag: false flag: false,
hideBtn: false
} }
}, },
activated () { activated () {
let { verficationCode } = this.getParams() let { verficationCode, hideBtn } = this.getParams()
this.showLoading() this.showLoading()
this.hideBtn = hideBtn
couponApi.scan({ verficationCode }).then(res => { couponApi.scan({ verficationCode }).then(res => {
this.hideLoading() this.hideLoading()
this.detail = res this.detail = res || {}
this.infoObj = res.discountType == 7 ? vipObj : couponObj this.infoObj = res.discountType == 7 ? vipObj : couponObj
this.verficationCode = verficationCode this.verficationCode = verficationCode
this.flag = true this.flag = true
...@@ -165,6 +209,9 @@ export default { ...@@ -165,6 +209,9 @@ export default {
mounted () { mounted () {
}, },
deactivated(){
Object.assign(this.$data, this.$options.data.call(this))
},
methods: { methods: {
submit () { submit () {
let { detail: { discountType } } = this let { detail: { discountType } } = this
...@@ -203,12 +250,23 @@ export default { ...@@ -203,12 +250,23 @@ export default {
color: #3a3a3a; color: #3a3a3a;
padding: 0 16px; padding: 0 16px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3); border-bottom: 1px solid rgba(195, 195, 195, 0.3);
&-tips {
color: #666666;
margin-top: 10px;
font-size: 12px;
}
.label {
.item-tips {
margin-left: 8px;
}
}
&:last-of-type { &:last-of-type {
border-bottom: none; border-bottom: none;
} }
.value { .value {
margin-left: auto; margin-left: auto;
color: #333333; color: #333333;
text-align: right;
&-btn { &-btn {
font-size: 12px; font-size: 12px;
color: #3975c6; color: #3975c6;
...@@ -218,6 +276,9 @@ export default { ...@@ -218,6 +276,9 @@ export default {
border-radius: 4px; border-radius: 4px;
margin-right: 10px; margin-right: 10px;
} }
.item-tips {
color: #333333;
}
} }
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:keyword="userName" :keyword="userName"
:index="type" :index="type"
:updata="updata" :updata="updata"
placeholder="输入客户姓名搜索" placeholder="输入客户手机号或名称搜索"
></search-box> ></search-box>
<tab <tab
:list="tab[type]" :list="tab[type]"
...@@ -25,32 +25,30 @@ ...@@ -25,32 +25,30 @@
<div <div
:key="index" :key="index"
class="item" class="item"
@click="jump(item)"
> >
<!-- 0:优惠券 1:精品礼券 2:商品订单 3:会员服务 --> <!-- 0:优惠券 1:精品礼券 2:商品订单 3:门店服务 -->
<template v-if="type == 0 || type == 1"> <template v-if="type == 0 || type == 1">
<div class="title flex"> <div class="title flex">
{{item.userName || item.customerName}} <div class="name text-hide">
<div class="time"> <template v-if="type == 0">{{item.phone}}</template>
<template v-if="type == 0"> <template v-else>{{item.userName || item.customerName}}</template>
<template v-if="tabIndex == 0"> </div>
核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}} <template v-if="type == 0">
</template> <template v-if="(item.directionalGiftId || item.directionalGiftName)">
<template v-else-if="tabIndex == 1"> <div class="sprite-icon icon-gift-logo"></div>
领取时间:{{new Date(item.receiveTime).format('yyyy/MM/dd')}}
</template>
<template v-else>
发放时间:{{new Date(item.issueDate).format('yyyy/MM/dd')}}
</template>
</template> </template>
<template v-else> </template>
<template v-else>
<div class="time">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
核销时间: {{new Date(item.usedTime).format('yyyy/MM/dd')}} 核销时间: {{new Date(item.usedTime).format('yyyy/MM/dd')}}
</template> </template>
<template v-else> <template v-else>
领券时间:{{new Date(item.createdDate).format('yyyy/MM/dd')}} 领券时间:{{new Date(item.createdDate).format('yyyy/MM/dd')}}
</template> </template>
</template> </div>
</div> </template>
</div> </div>
<div class="info"> <div class="info">
<template v-for="(i,ind) in type == 0?itemObj:itemObj2"> <template v-for="(i,ind) in type == 0?itemObj:itemObj2">
...@@ -75,6 +73,21 @@ ...@@ -75,6 +73,21 @@
</template> </template>
</template> </template>
</div> </div>
<template v-if="type == 0">
<div class="bottom flex">
<div class="name">
<template v-if="tabIndex == 0">
核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}}
</template>
<template v-else-if="tabIndex == 1">
领取时间:{{new Date(item.receiveTime).format('yyyy/MM/dd')}}
</template>
<template v-else>
发放时间:{{new Date(item.issueDate).format('yyyy/MM/dd')}}
</template>
</div>
</div>
</template>
</template> </template>
<template v-else-if="type == 2"> <template v-else-if="type == 2">
<div class="title flex"> <div class="title flex">
...@@ -109,8 +122,10 @@ ...@@ -109,8 +122,10 @@
</template> </template>
<template v-else> <template v-else>
<div class="title flex"> <div class="title flex">
{{item.userName}} {{item.phone}}
<span class="time">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</span> <template v-if="item.directionalGiftId || item.directionalGiftName">
<div class="sprite-icon icon-gift-logo"></div>
</template>
</div> </div>
<div class="page"> <div class="page">
<div class="page-item flex"> <div class="page-item flex">
...@@ -118,10 +133,6 @@ ...@@ -118,10 +133,6 @@
<div class="value">{{item.couponName}}</div> <div class="value">{{item.couponName}}</div>
</div> </div>
<div class="page-item flex"> <div class="page-item flex">
<div class="label">所属套餐</div>
<div class="value">{{item.packageName}}</div>
</div>
<div class="page-item flex">
<div class="label">有效期</div> <div class="label">有效期</div>
<div class="value"> <div class="value">
<template v-if="item.useType == 0"> <template v-if="item.useType == 0">
...@@ -132,7 +143,7 @@ ...@@ -132,7 +143,7 @@
<template v-else-if="item.effectiveType == 2">{{new Date(item.effectiveStartTime).format('yyyy/MM/dd')}} ~ {{new Date(item.effectiveEndTime).format('yyyy/MM/dd')}}</template> <template v-else-if="item.effectiveType == 2">{{new Date(item.effectiveStartTime).format('yyyy/MM/dd')}} ~ {{new Date(item.effectiveEndTime).format('yyyy/MM/dd')}}</template>
<template v-else>无有效期</template> <template v-else>无有效期</template>
| |
{{item.effectiveType > 2 ? '' : '有效期'}}可用{{item.useAllAmount}}次 {{item.effectiveType > 2 ? '' : '有效期内'}}可用{{item.useAllAmount}}次
</template> </template>
<template v-else> <template v-else>
<template v-if="item.effectiveType > 2">无有效期</template>每隔{{item.useLimitDays}}天 <template v-if="item.effectiveType > 2">无有效期</template>每隔{{item.useLimitDays}}天
...@@ -141,19 +152,22 @@ ...@@ -141,19 +152,22 @@
</template> </template>
</div> </div>
</div> </div>
<template v-if="item.verificationOperator">
<div class="page-item flex">
<div class="label">核销人</div>
<div class="value">{{item.verificationOperator}}</div>
</div>
</template>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="vip-btn text-center"> <div class="vip-btn text-center">
<template v-if="tabIndex == 0">已核销{{item.useAllAmount}}次</template> <template v-if="tabIndex == 0">已核销{{item.usedAmount}}次</template>
<template v-else> <template v-else>
<template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template> <template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template>
<template v-else>不限次数</template> <template v-else>不限次数</template>
</template> </template>
</div> </div>
<div <div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
class="name"
v-if="item.verificationOperator"
>核销人:{{item.verificationOperator}}</div>
</div> </div>
</template> </template>
</div> </div>
...@@ -225,7 +239,7 @@ export default { ...@@ -225,7 +239,7 @@ export default {
list: [], list: [],
updata: new Date().getTime(), updata: new Date().getTime(),
tabIndex: 0, tabIndex: 0,
type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:会员服务*/ type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:门店服务*/
flag: false, flag: false,
pageNum: 1, pageNum: 1,
itemObj, itemObj,
...@@ -421,7 +435,7 @@ export default { ...@@ -421,7 +435,7 @@ export default {
this.getList() this.getList()
}, },
scan () { scan () {
// let resultStr = 't=2&c=7498728184171335680' // let resultStr = 't=1&c=3510671342174081024'
wxConfig.scanQRCode(1).then(({ resultStr }) => { wxConfig.scanQRCode(1).then(({ resultStr }) => {
let name = 'verificationDetail' let name = 'verificationDetail'
let [t, c] = resultStr.split('&') let [t, c] = resultStr.split('&')
...@@ -435,6 +449,22 @@ export default { ...@@ -435,6 +449,22 @@ export default {
} }
}) })
}) })
},
jump (item) {
let { type, tabIndex } = this
const { userCouponVerificationCode, verificationCode, orderCode } = item
if ((type == 0 && tabIndex == 2) || type == 1) return
let name = type == 2 ? 'goodsVerification' : 'verificationDetail'
let params = type == 2 ? {
orderCode
} : {
verficationCode: userCouponVerificationCode || verificationCode,
hideBtn: true
}
this.$router.push({
name: `coupon.${name}`,
params
})
} }
} }
} }
...@@ -450,6 +480,31 @@ export default { ...@@ -450,6 +480,31 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
.title { .title {
color: #333333; color: #333333;
position: relative;
.sprite-icon {
position: absolute;
right: 0;
top: 0;
}
}
.bottom {
color: #666666;
font-size: 12px;
padding: 0 12px;
min-height: 40px;
border-top: 1px solid #eff0f2;
.name {
flex-shrink: 0;
margin-left: auto;
}
.vip-btn {
height: 24px;
background: rgba(57, 117, 198, 0.15);
border-radius: 4px;
padding: 0 6px;
font-size: 12px;
color: #3975c6;
}
} }
} }
} }
...@@ -467,6 +522,7 @@ export default { ...@@ -467,6 +522,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
margin-left: auto; margin-left: auto;
flex-shrink: 0;
} }
} }
.info { .info {
...@@ -516,12 +572,10 @@ export default { ...@@ -516,12 +572,10 @@ export default {
font-size: 14px; font-size: 14px;
min-height: 40px; min-height: 40px;
border-bottom: 1px solid #eff0f2; border-bottom: 1px solid #eff0f2;
padding: 0 12px; padding-left: 12px;
.time { .time {
padding-right: 12px;
margin-left: auto; margin-left: auto;
font-weight: 400;
font-size: 12px;
color: #666666;
} }
} }
.goods { .goods {
...@@ -577,25 +631,6 @@ export default { ...@@ -577,25 +631,6 @@ export default {
} }
} }
} }
.bottom {
color: #666666;
font-size: 12px;
padding: 0 12px;
min-height: 40px;
border-top: 1px solid #eff0f2;
.name {
flex-shrink: 0;
margin-left: auto;
}
.vip-btn {
height: 24px;
background: rgba(57, 117, 198, 0.15);
border-radius: 4px;
padding: 0 6px;
font-size: 12px;
color: #3975c6;
}
}
} }
} }
.scan { .scan {
......
...@@ -54,14 +54,14 @@ ...@@ -54,14 +54,14 @@
<template v-else>到店核销</template> <template v-else>到店核销</template>
</template> </template>
<template v-else> <template v-else>
可用1次 到店核销
</template> </template>
</template> </template>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<template v-if="tabIndex == 0"> <template>
<div class="stepper"> <div class="stepper">
<van-stepper <van-stepper
v-model="i.num" v-model="i.num"
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
/> />
</div> </div>
</template> </template>
<template v-else> <!-- <template v-else>
<div class="num text-center">x1</div> <div class="num text-center">x1</div>
</template> </template> -->
</div> </div>
</template> </template>
</template> </template>
...@@ -141,14 +141,15 @@ export default { ...@@ -141,14 +141,15 @@ export default {
selectedList.map(i => { selectedList.map(i => {
if (i.couponId == e.id) { if (i.couponId == e.id) {
e.active = true e.active = true
if (tabIndex == 0) e.num = i.couponAmount || 1 e.num = i.couponAmount || 1
// if (tabIndex == 0) e.num = i.couponAmount || 1
} }
}) })
}) })
}) })
}, },
getCouponList (callBack) { getCouponList (callBack) {
// 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:会员服务 // 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:门店服务
let { merchantId, uuid } = this.getLocalStorage('dj_scrm_userInfo') let { merchantId, uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { tabIndex } = this let { tabIndex } = this
let discountType = [7, 3, 2, 4][tabIndex] let discountType = [7, 3, 2, 4][tabIndex]
...@@ -191,7 +192,7 @@ export default { ...@@ -191,7 +192,7 @@ export default {
if (e.active) { if (e.active) {
chooseItems.push({ chooseItems.push({
couponId: e.id, couponId: e.id,
couponAmount: e.discountType == 7 ? e.num || 1 : 1, couponAmount: e.num || 1,
couponAnticipatedCost: e.anticipatedCost, couponAnticipatedCost: e.anticipatedCost,
discountType: e.discountType, discountType: e.discountType,
couponName: e.couponName, couponName: e.couponName,
...@@ -212,7 +213,8 @@ export default { ...@@ -212,7 +213,8 @@ export default {
chooseItems.map(i => { chooseItems.map(i => {
if (i.couponId == e.id) { if (i.couponId == e.id) {
e.active = true e.active = true
if (tabIndex == 0) e.num = i.couponAmount || 1 e.num = i.couponAmount || 1
// if (tabIndex == 0) e.num = i.couponAmount || 1
} }
}) })
}) })
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
:key="index" :key="index"
> >
<!-- status 优惠券状态(1:未生效,2:生效中,3:已失效) --> <!-- status 优惠券状态(1:未生效,2:生效中,3:已失效) -->
<!-- 优惠券类型 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:会员服务 --> <!-- 优惠券类型 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:门店服务 -->
<span class="detail-title text-center">{{discountEnum[i.discountType]}}</span> <span class="detail-title text-center">{{discountEnum[i.discountType]}}</span>
<template v-for="(e,ind) in i.list"> <template v-for="(e,ind) in i.list">
<div <div
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
:key="index" :key="index"
> >
<!-- status 优惠券状态(1:未生效,2:生效中,3:已失效) --> <!-- status 优惠券状态(1:未生效,2:生效中,3:已失效) -->
<!-- 优惠券类型 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:会员服务 --> <!-- 优惠券类型 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:门店服务 -->
<span class="detail-title text-center">{{discountEnum[i.discountType]}}</span> <span class="detail-title text-center">{{discountEnum[i.discountType]}}</span>
<template v-for="(e,ind) in i.list"> <template v-for="(e,ind) in i.list">
<div <div
......
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
let { uuid } = this.getLocalStorage('dj_scrm_userInfo') let { uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { pageNum, tabIndex, list, name, giftToast } = this let { pageNum, tabIndex, list, name, giftToast } = this
if (giftToast) this.giftToast = '' if (giftToast) this.giftToast = ''
this.showLoading() if(type!=='inApprove')this.showLoading()
const apiFunc = (type==='inApprove'|| tabIndex === 2) ? giftApi.getInApproveGiftList : giftApi.getGiftList const apiFunc = (type==='inApprove'|| tabIndex === 2) ? giftApi.getInApproveGiftList : giftApi.getGiftList
apiFunc({ apiFunc({
pageNum, pageNum,
...@@ -209,7 +209,6 @@ export default { ...@@ -209,7 +209,6 @@ export default {
receivedFlag: (type==='inApprove'|| tabIndex === 2) ? '' : (tabIndex == 0 ? 1 : 2), receivedFlag: (type==='inApprove'|| tabIndex === 2) ? '' : (tabIndex == 0 ? 1 : 2),
staffUUID: uuid staffUUID: uuid
}).then(res => { }).then(res => {
this.hideLoading()
if(type==='inApprove'){ if(type==='inApprove'){
this.$set(this.tab,2,`审批中(${res.total})`); this.$set(this.tab,2,`审批中(${res.total})`);
}else{ }else{
...@@ -218,6 +217,9 @@ export default { ...@@ -218,6 +217,9 @@ export default {
this.total = res.total this.total = res.total
if(tabIndex === 2) this.$set(this.tab,2,`审批中(${res.total})`); if(tabIndex === 2) this.$set(this.tab,2,`审批中(${res.total})`);
} }
if(type!=='inApprove') this.hideLoading()
}) })
}, },
search (e) { search (e) {
......
...@@ -63,11 +63,20 @@ ...@@ -63,11 +63,20 @@
</div> </div>
<div class="info"> <div class="info">
<div class="name text-two-line">{{i.goodsName}}</div> <div class="name text-two-line">{{i.goodsName}}</div>
<div class="stock">库存:{{i.goodsStock}}</div> <template v-if="i.price != null || i.activityPrice != null">
<template v-if="i.price"> <div class="price flex">
<div class="price">¥{{i.price.toFixed(2)}}</div> <template v-if="i.activityPrice">
<div class="activity">秒杀价</div>
</template>
<div class="unit">¥</div>
<div class="num">
<template v-if="i.activityPrice != null">{{i.activityPrice.toFixed(2)}}</template>
<template v-else>{{i.price.toFixed(2)}}</template>
</div>
</div>
</template> </template>
<div class="btn text-center">分享给客户</div> <div class="stock">库存:{{i.goodsStock}}</div>
<div class="sprite-icon icon-goods-share"></div>
</div> </div>
</div> </div>
</template> </template>
...@@ -218,15 +227,25 @@ export default { ...@@ -218,15 +227,25 @@ export default {
} }
.price { .price {
color: var(--themeColor); color: var(--themeColor);
font-weight: 500; font-size: 0;
font-size: 16px; align-items: baseline;
letter-spacing: -0.5px;
.activity {
font-size: 8px;
}
.unit {
font-size: 10px;
}
.num {
font-size: 16px;
font-weight: 500;
// font-family:;
}
} }
.btn { .icon-goods-share {
position: absolute; position: absolute;
bottom: 10px; bottom: 10px;
right: 8px; right: 12px;
border-radius: 12px;
height: 20px;
} }
} }
} }
......
...@@ -50,7 +50,7 @@ const spritesmithFunction = data => { ...@@ -50,7 +50,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}` return `${shared}\n${perSprite}`
} }
module.exports = { module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 本地调试时需登录时使用 publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-lwk/', // 本地调试时需登录时使用
// publicPath: './', // publicPath: './',
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用 // publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir: 'dist', // 生产环境构建文件的目录 outputDir: 'dist', // 生产环境构建文件的目录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!