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 {
url,
data
})
}
},
}
\ No newline at end of file
const url = '/rop-scrm-shopmall/router'
export default {
/** 获取门店商品列表 */
getGoodsList(currentPage) {
getGoodsList (currentPage) {
let data = {
method: 'scrm.api.shopmall.goods.wework.page',
pageSize: 10,
currentPage
currentPage,
needActivityInfo: true
}
return window.$HTTP({
url,
......@@ -13,7 +14,7 @@ export default {
})
},
/**获取商品海报 */
getGoodsPoster(data) {
getGoodsPoster (data) {
data.method = 'scrm.api.shopmall.goods.wework.posterUrl'
return window.$HTTP({
url,
......@@ -21,7 +22,7 @@ export default {
})
},
/** 获取商品链接 */
getGoodsLink(data) {
getGoodsLink (data) {
data.method = 'scrm.api.shopmall.goods.wework.url'
return window.$HTTP({
url,
......@@ -29,7 +30,7 @@ export default {
})
},
/** 获取商品海报企业微信素材mediaId */
getGoodsPosterMediaId(data) {
getGoodsPosterMediaId (data) {
data.method = 'scrm.api.shopmall.goods.wework.posterWorkWxMediaId'
return window.$HTTP({
url,
......@@ -38,7 +39,7 @@ export default {
},
/** 分页查询商品订单核销列表(待核销、已核销用查询参数区分) */
getGoodsVerficationList(data = {}) {
getGoodsVerficationList (data = {}) {
data.method = 'scrm.api.shopmall.wework.order.verfication.page'
data.pageSize = 10
return window.$HTTP({
......@@ -48,7 +49,7 @@ export default {
},
/**根据商城订单核销码获取商城订单详情以备核销 */
getGoodsVerficationDetail(verificationCode) {
getGoodsVerficationDetail (verificationCode) {
let data = {
method: 'scrm.api.shopmall.wework.order.detail.toVerfication',
verificationCode: verificationCode
......@@ -60,7 +61,7 @@ export default {
},
/** 商品订单核销 */
verficationGoods(verificationCode) {
verficationGoods (verificationCode) {
let data = {
method: 'scrm.api.shopmall.wework.order.verfication',
verificationCode: verificationCode
......@@ -69,5 +70,16 @@ export default {
url,
data
})
},
/**查看商品订单详情 */
getGoodsDetail (orderCode) {
let data = {
method: 'scrm.api.shopmall.weapp.order.detail',
orderCode
}
return window.$HTTP({
url,
data
})
}
}
......@@ -8,7 +8,8 @@ const WxConfig = {
if (e == 'chooseImage') jsApiList.push('getLocalImgData')
})
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 */
let data = {
corpId,
......@@ -57,7 +58,7 @@ const WxConfig = {
* expireTime 失效时间
* expireInterval 失效间隔
* appId 微信应用ID
* envVersion 要打开的小程序版本。正式版为:release,体验版为:trial,开发版为:develop,仅在微信外打开时生效
* envVersion 要打开的小程序版本。正式版为:release,体验版为: trial 开发版为:develop,仅在微信外打开时生效
*/
console.log('请求', data)
return window.$HTTP({
......@@ -227,7 +228,7 @@ const WxConfig = {
onHistoryBack () {
return new Promise(resolve => {
wx.onHistoryBack(function(res){
wx.onHistoryBack(function (res) {
resolve(res)
})
})
......@@ -365,19 +366,19 @@ const WxConfig = {
})
},
/**自建应用发起审批 */
/**自建应用发起审批 */
thirdPartyOpenPage (params) {
console.log(params,'参数')
console.log(params, '参数')
return new Promise(resolve => {
wx.invoke('thirdPartyOpenPage', params, function (res){
wx.invoke('thirdPartyOpenPage', params, function (res) {
if (res && res.err_msg == 'thirdPartyOpenPage:ok') {
resolve(res,'回调')
resolve(res, '回调')
}
})
})
},
}
export default WxConfig
.sprite-icon { background-image: url(../images/sprite.png);background-size: 290px 250px;}
.icon-coupon-0 { width: 32px; height: 32px; background-position: -134px -180px;}
.icon-coupon-1 { width: 32px; height: 32px; background-position: -176px -180px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 319px 250px;}
.icon-close { width: 12px; height: 12px; background-position: -231px -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-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-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-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-create { width: 16px; height: 16px; background-position: -270px -58px;}
.icon-gift-del { width: 18px; height: 18px; background-position: -270px -30px;}
.icon-gift-icon { width: 44px; height: 44px; background-position: -80px -180px;}
.icon-poster-close { width: 20px; height: 20px; background-position: -218px -180px;}
.icon-scan { width: 16px; height: 16px; background-position: -270px -84px;}
.icon-share { width: 20px; height: 20px; background-position: -270px 0px;}
.icon-gift-create { width: 16px; height: 16px; background-position: -300px -227px;}
.icon-gift-del { width: 18px; height: 18px; background-position: -300px -197px;}
.icon-gift-icon { width: 44px; height: 44px; background-position: -270px -59px;}
.icon-gift-logo { width: 89px; height: 27px; background-position: -80px -180px;}
.icon-goods-share { width: 16px; height: 16px; background-position: -179px -180px;}
.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;}
\ 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 {
{ text: '优惠券', value: 0 },
{ text: '精品礼券', value: 1 },
{ text: '商品订单', value: 2 },
{ text: '会员服务', value: 3 }
{ text: '门店服务', value: 3 }
],
searchValue: ''
}
......
......@@ -8,10 +8,10 @@
*/
// 本地环境配置
module.exports = {
envVersion: "develop",
envVersion: 'trial',
title: '嘀加企微管家',
request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......@@ -29,7 +29,8 @@ module.exports = {
code_message_map: {}
},
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
shopmall_appid: "wxe10067a63c1856ac",
// shopmall_appid: "wxfe82b8d65d07808f", //广汇
shopmall_appid: "wxe10067a63c1856ac", //嘀加
sign: {
appKey: "48e5e13229b82c1b4e6e8c96151f0637",
format: "json",
......
......@@ -5,7 +5,7 @@ const discountType = {
4: '兑换',
5: '购车代金',
6: '商品折扣',
7: '会员服务'
7: '门店服务'
}
export default {
data() {
......@@ -18,7 +18,7 @@ export default {
4: '兑换券',
5: '购车代金券',
6: '商品折扣券',
7: '会员服务'
7: '门店服务'
},
}
},
......
......@@ -7,6 +7,16 @@ export default {
},
mounted () {
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: {
wxInit () {
......
......@@ -103,7 +103,6 @@ const dialog = (params = {}) => {
const makePhoneCall = phoneNumber => {
window.location.href = `tel://${phoneNumber}`
}
/**是否全面屏 */
const isFullSucreen = () => {
let result = false
......@@ -121,7 +120,7 @@ const jumpChildrenPage = (to, params) => {
const setClipboardData = data => {
wx.setClipboardData({
data,
success(res) {
success (res) {
Toast('复制成功')
}
})
......@@ -165,6 +164,27 @@ const watchPageBack = () => {
const centsToyuan = price => {
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 = {
removeLocalStorage,
setClipboardData,
......@@ -184,6 +204,8 @@ const utils = {
touchstart,
showToast,
getParams,
setCookie,
getCookie,
getQuery,
touchend,
throttle,
......
......@@ -66,6 +66,7 @@
<div
class="btn text-center"
@click="submit"
v-if="!hideBtn"
>确认核销</div>
</div>
</template>
......@@ -77,6 +78,7 @@ export default {
data () {
return {
flag: false,
hideBtn: false,
detail: {},
total: 0,
price: 0,
......@@ -120,23 +122,35 @@ export default {
}
},
activated () {
let { verficationCode } = this.getParams()
let { verficationCode, orderCode } = this.getParams()
this.showLoading()
shopmallApi
if (orderCode) this.getGoodsDetail(orderCode)
else shopmallApi
.getGoodsVerficationDetail(verficationCode)
.then(res => {
res.orderGoods.map(e => (this.price += e.retailPrice))
this.detail = res
this.flag = true
this.total = this.price + res.expressFee
this.hideLoading()
console.log(res)
this.setData(res)
})
},
mounted () {
},
deactivated () {
Object.assign(this.$data, this.$options.data.call(this))
},
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 () {
let { verficationCode } = this.getParams()
this.showLoading()
......
......@@ -8,10 +8,28 @@
:updata="updata"
sticky
></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="list.length">
<scroll-view
class="list-box"
:class="['list-box',{'tips-type':showTips && tabIndex == 1}]"
@ReachBottom="onReachBottom"
ref="scrollView"
>
......@@ -64,6 +82,29 @@
<template v-else>
<router-view></router-view>
</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>
</template>
......@@ -75,11 +116,23 @@ export default {
mixins: [shareMixin, pageMixin, discountTypeMixin],
data () {
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: {
getList (pageNum) {
let { list, tabIndex } = this
......@@ -92,12 +145,61 @@ export default {
this.list = list.concat(res.list)
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>
<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 {
height: calc(100vh - 100px);
.item {
......@@ -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>
\ No newline at end of file
......@@ -30,13 +30,24 @@
class="item flex"
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">
<template v-if="i.format">
<div v-html="i.format(detail)"></div>
</template>
<template v-else>
{{detail[i.key] || ''}}
<template v-if="i.tipsValue">
<div
class="item-tips"
v-html="i.tipsValue(detail)"
></div>
</template>
</template>
</div>
</div>
......@@ -51,7 +62,7 @@
<div class="use-type">
<template v-if="detail.useType == 0">不限次数</template>
<template v-else-if="detail.useType == 1">
{{detail.effectiveType > 2 ? '' : '有效期'}}可用{{detail.useAllAmount}}次
{{detail.effectiveType > 2 ? '' : '有效期内'}}可用{{detail.useAllAmount}}次
</template>
<template v-else>
每隔{{detail.useLimitDays}}天
......@@ -61,9 +72,25 @@
</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>
</div>
<div
v-if="!hideBtn"
class="btn text-center"
@click="submit"
>确认核销</div>
......@@ -90,6 +117,14 @@ const couponObj = [
}
},
{
label: '所属定向礼包',
key: 'directionalGiftName',
tipsLabel: '领取条件',
tipsValue (item) {
return `${item.directionalGiftReceiveWay == 1 ? '手机号' : '车架号后6位'}:${item.directionalGiftReceiveCondition}`
}
},
{
label: '发放人',
key: 'issueName'
},
......@@ -111,8 +146,15 @@ const vipObj = [
key: 'couponName'
},
{
label: '类型',
key: 'discountType',
format () {
return '服务券'
}
},
{
label: '有效期',
KEY: 'effectiveType',
key: 'effectiveType',
format (item) {
let { effectiveType } = item
let str = ''
......@@ -121,7 +163,7 @@ const vipObj = [
else str = '无有效期'
return str
}
}
},
]
export default {
name: '',
......@@ -148,15 +190,17 @@ export default {
],
infoObj: [],
verficationCode: '',
flag: false
flag: false,
hideBtn: false
}
},
activated () {
let { verficationCode } = this.getParams()
let { verficationCode, hideBtn } = this.getParams()
this.showLoading()
this.hideBtn = hideBtn
couponApi.scan({ verficationCode }).then(res => {
this.hideLoading()
this.detail = res
this.detail = res || {}
this.infoObj = res.discountType == 7 ? vipObj : couponObj
this.verficationCode = verficationCode
this.flag = true
......@@ -165,6 +209,9 @@ export default {
mounted () {
},
deactivated(){
Object.assign(this.$data, this.$options.data.call(this))
},
methods: {
submit () {
let { detail: { discountType } } = this
......@@ -203,12 +250,23 @@ export default {
color: #3a3a3a;
padding: 0 16px;
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 {
border-bottom: none;
}
.value {
margin-left: auto;
color: #333333;
text-align: right;
&-btn {
font-size: 12px;
color: #3975c6;
......@@ -218,6 +276,9 @@ export default {
border-radius: 4px;
margin-right: 10px;
}
.item-tips {
color: #333333;
}
}
}
}
......
......@@ -6,7 +6,7 @@
:keyword="userName"
:index="type"
:updata="updata"
placeholder="输入客户姓名搜索"
placeholder="输入客户手机号或名称搜索"
></search-box>
<tab
:list="tab[type]"
......@@ -25,32 +25,30 @@
<div
:key="index"
class="item"
@click="jump(item)"
>
<!-- 0:优惠券 1:精品礼券 2:商品订单 3:会员服务 -->
<!-- 0:优惠券 1:精品礼券 2:商品订单 3:门店服务 -->
<template v-if="type == 0 || type == 1">
<div class="title flex">
{{item.userName || item.customerName}}
<div class="time">
<template v-if="type == 0">
<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 class="name text-hide">
<template v-if="type == 0">{{item.phone}}</template>
<template v-else>{{item.userName || item.customerName}}</template>
</div>
<template v-if="type == 0">
<template v-if="(item.directionalGiftId || item.directionalGiftName)">
<div class="sprite-icon icon-gift-logo"></div>
</template>
<template v-else>
</template>
<template v-else>
<div class="time">
<template v-if="tabIndex == 0">
核销时间: {{new Date(item.usedTime).format('yyyy/MM/dd')}}
</template>
<template v-else>
领券时间:{{new Date(item.createdDate).format('yyyy/MM/dd')}}
</template>
</template>
</div>
</div>
</template>
</div>
<div class="info">
<template v-for="(i,ind) in type == 0?itemObj:itemObj2">
......@@ -75,6 +73,21 @@
</template>
</template>
</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 v-else-if="type == 2">
<div class="title flex">
......@@ -109,8 +122,10 @@
</template>
<template v-else>
<div class="title flex">
{{item.userName}}
<span class="time">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</span>
{{item.phone}}
<template v-if="item.directionalGiftId || item.directionalGiftName">
<div class="sprite-icon icon-gift-logo"></div>
</template>
</div>
<div class="page">
<div class="page-item flex">
......@@ -118,10 +133,6 @@
<div class="value">{{item.couponName}}</div>
</div>
<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="value">
<template v-if="item.useType == 0">
......@@ -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>无有效期</template>
|
{{item.effectiveType > 2 ? '' : '有效期'}}可用{{item.useAllAmount}}次
{{item.effectiveType > 2 ? '' : '有效期内'}}可用{{item.useAllAmount}}次
</template>
<template v-else>
<template v-if="item.effectiveType > 2">无有效期</template>每隔{{item.useLimitDays}}天
......@@ -141,19 +152,22 @@
</template>
</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 class="bottom flex">
<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-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template>
<template v-else>不限次数</template>
</template>
</div>
<div
class="name"
v-if="item.verificationOperator"
>核销人:{{item.verificationOperator}}</div>
<div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
</div>
</template>
</div>
......@@ -225,7 +239,7 @@ export default {
list: [],
updata: new Date().getTime(),
tabIndex: 0,
type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:会员服务*/
type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:门店服务*/
flag: false,
pageNum: 1,
itemObj,
......@@ -421,7 +435,7 @@ export default {
this.getList()
},
scan () {
// let resultStr = 't=2&c=7498728184171335680'
// let resultStr = 't=1&c=3510671342174081024'
wxConfig.scanQRCode(1).then(({ resultStr }) => {
let name = 'verificationDetail'
let [t, c] = resultStr.split('&')
......@@ -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 {
margin-bottom: 10px;
.title {
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 {
font-size: 12px;
color: #999999;
margin-left: auto;
flex-shrink: 0;
}
}
.info {
......@@ -516,12 +572,10 @@ export default {
font-size: 14px;
min-height: 40px;
border-bottom: 1px solid #eff0f2;
padding: 0 12px;
padding-left: 12px;
.time {
padding-right: 12px;
margin-left: auto;
font-weight: 400;
font-size: 12px;
color: #666666;
}
}
.goods {
......@@ -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 {
......
......@@ -54,14 +54,14 @@
<template v-else>到店核销</template>
</template>
<template v-else>
可用1次
到店核销
</template>
</template>
</span>
</div>
</div>
</div>
<template v-if="tabIndex == 0">
<template>
<div class="stepper">
<van-stepper
v-model="i.num"
......@@ -73,9 +73,9 @@
/>
</div>
</template>
<template v-else>
<!-- <template v-else>
<div class="num text-center">x1</div>
</template>
</template> -->
</div>
</template>
</template>
......@@ -141,14 +141,15 @@ export default {
selectedList.map(i => {
if (i.couponId == e.id) {
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) {
// 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:会员服务
// 1:满减券,2:折扣券,3:代金券,4:兑换券 5:购车代金券 6:商品折扣券,7:门店服务
let { merchantId, uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { tabIndex } = this
let discountType = [7, 3, 2, 4][tabIndex]
......@@ -191,7 +192,7 @@ export default {
if (e.active) {
chooseItems.push({
couponId: e.id,
couponAmount: e.discountType == 7 ? e.num || 1 : 1,
couponAmount: e.num || 1,
couponAnticipatedCost: e.anticipatedCost,
discountType: e.discountType,
couponName: e.couponName,
......@@ -212,7 +213,8 @@ export default {
chooseItems.map(i => {
if (i.couponId == e.id) {
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 @@
:key="index"
>
<!-- 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>
<template v-for="(e,ind) in i.list">
<div
......
......@@ -51,7 +51,7 @@
:key="index"
>
<!-- 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>
<template v-for="(e,ind) in i.list">
<div
......
......@@ -201,7 +201,7 @@ export default {
let { uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { pageNum, tabIndex, list, name, giftToast } = this
if (giftToast) this.giftToast = ''
this.showLoading()
if(type!=='inApprove')this.showLoading()
const apiFunc = (type==='inApprove'|| tabIndex === 2) ? giftApi.getInApproveGiftList : giftApi.getGiftList
apiFunc({
pageNum,
......@@ -209,7 +209,6 @@ export default {
receivedFlag: (type==='inApprove'|| tabIndex === 2) ? '' : (tabIndex == 0 ? 1 : 2),
staffUUID: uuid
}).then(res => {
this.hideLoading()
if(type==='inApprove'){
this.$set(this.tab,2,`审批中(${res.total})`);
}else{
......@@ -218,6 +217,9 @@ export default {
this.total = res.total
if(tabIndex === 2) this.$set(this.tab,2,`审批中(${res.total})`);
}
if(type!=='inApprove') this.hideLoading()
})
},
search (e) {
......
......@@ -63,11 +63,20 @@
</div>
<div class="info">
<div class="name text-two-line">{{i.goodsName}}</div>
<div class="stock">库存:{{i.goodsStock}}</div>
<template v-if="i.price">
<div class="price">¥{{i.price.toFixed(2)}}</div>
<template v-if="i.price != null || i.activityPrice != null">
<div class="price flex">
<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>
<div class="btn text-center">分享给客户</div>
<div class="stock">库存:{{i.goodsStock}}</div>
<div class="sprite-icon icon-goods-share"></div>
</div>
</div>
</template>
......@@ -218,15 +227,25 @@ export default {
}
.price {
color: var(--themeColor);
font-weight: 500;
font-size: 16px;
font-size: 0;
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;
bottom: 10px;
right: 8px;
border-radius: 12px;
height: 20px;
right: 12px;
}
}
}
......
......@@ -50,7 +50,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}`
}
module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 本地调试时需登录时使用
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-lwk/', // 本地调试时需登录时使用
// publicPath: './',
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir: 'dist', // 生产环境构建文件的目录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!