Commit 8fbcd91d by 前端

Merge branch 'develop' into 'master'

上线合并

See merge request !351
2 parents d0cdb7a9 9a18b0d6
Showing 49 changed files with 788 additions and 163 deletions
...@@ -178,7 +178,7 @@ module.exports = { ...@@ -178,7 +178,7 @@ module.exports = {
return api.post("dj.api.smartcarlife.order.search", params); return api.post("dj.api.smartcarlife.order.search", params);
}, },
/**搜索订单(含套餐) */ /**搜索订单(含套餐) */
getWorkPackageGoodsList(data){ getWorkPackageGoodsList(data) {
let params = data || {} let params = data || {}
params.sceneType = 1 params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search.containPackageGoods', { return api.post('dj.api.smartcarlife.order.search.containPackageGoods', {
...@@ -319,6 +319,12 @@ module.exports = { ...@@ -319,6 +319,12 @@ module.exports = {
return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data); return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data);
}, },
/** 校验手机号是否配置打卡和是否打卡 */
clockInConfigPhone(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post("dj.api.smartcarlife.clock.in.config.phone", data);
},
// 获取积分审批列表数据 // 获取积分审批列表数据
getPointsReviewListAPI(data) { getPointsReviewListAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.page', data) return api.post('dj.api.smartcarlife.staff.motivation.page', data)
......
...@@ -28,6 +28,11 @@ import eventbus from "./utils/eventbus"; ...@@ -28,6 +28,11 @@ import eventbus from "./utils/eventbus";
import api from "./api/api"; import api from "./api/api";
import { Version } from "glsx-common-sdk"; import { Version } from "glsx-common-sdk";
import { areaList } from "@vant/area-data"; //预加载省市区 import { areaList } from "@vant/area-data"; //预加载省市区
/**全埋点 */
import Track from '~/utils/track'
const $Track = new Track()
// 将 api.reNoSignIn() 函数包装为防抖函数 // 将 api.reNoSignIn() 函数包装为防抖函数
const debouncedReNoSignIn = debounce(function (noSignInUuid, that) { const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
console.log("debouncedReNoSignIn2222"); console.log("debouncedReNoSignIn2222");
...@@ -75,6 +80,7 @@ App({ ...@@ -75,6 +80,7 @@ App({
wx.$api = wxApi; wx.$api = wxApi;
wx.$eventbus = eventbus; wx.$eventbus = eventbus;
wx.$areaList = areaList; wx.$areaList = areaList;
wx.$track = $Track
let userInfo = util.getStorageSync("dj_boutique_user_info"); let userInfo = util.getStorageSync("dj_boutique_user_info");
// ,this.globalData, userInfo // ,this.globalData, userInfo
userInfo && this.gobalCheckYqdSuper(userInfo); userInfo && this.gobalCheckYqdSuper(userInfo);
......
...@@ -71,6 +71,7 @@ page { ...@@ -71,6 +71,7 @@ page {
} }
.isFullSucreen { .isFullSucreen {
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom) !important; padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important; padding-bottom: env(safe-area-inset-bottom) !important;
// padding-bottom: 34px !important; // padding-bottom: 34px !important;
......
...@@ -9,6 +9,9 @@ Component({ ...@@ -9,6 +9,9 @@ Component({
} }
} }
}, },
selectPay:{
type:Number
}
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="fixed-box fixed-date-box" catchtouchmove="noScroll"> <view class="fixed-box fixed-date-box" catchtouchmove="noScroll">
<view class="fixed-bg" data-name="showDateSelect"></view> <view class="fixed-bg" data-name="showDateSelect"></view>
<view class="fixed-content"> <view class="fixed-content">
<view class="fixed-title text-center">门店收款时间</view> <view class="fixed-title text-center">{{selectPay==2?'门店收款时间':'嘀加收款时间'}}</view>
<view class="fixed-body"> <view class="fixed-body">
<picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate"> <picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate">
<picker-view-column> <picker-view-column>
......
...@@ -213,7 +213,7 @@ Component({ ...@@ -213,7 +213,7 @@ Component({
}, 1000) }, 1000)
console.log(thisPage, 'thisPage'); console.log(thisPage, 'thisPage');
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if (orderType == 2) { if (orderType == 2 || orderType == 5) {
if (payVoucherList.length && outTradeNo) { if (payVoucherList.length && outTradeNo) {
thisPage.setData({ thisPage.setData({
outTradeNo, outTradeNo,
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll"> <view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup-bg" bindtap="close" /> <view class="order-popup-bg" bindtap="close" />
<view class="order-popup-content"> <view class="order-popup-content">
<view class="title" wx:if="{{orderType == 2}}">上传付款凭证</view> <view class="title" wx:if="{{orderType == 2 || orderType == 5}}">上传付款凭证</view>
<view class="order-popup-close" bindtap="close"> <view class="order-popup-close" bindtap="close">
<image src="../images/order-close.png" /> <image src="../images/order-close.png" />
</view> </view>
<!-- 4s店 开始 --> <!-- 4s店 开始 -->
<block wx:if="{{orderType == 2}}"> <block wx:if="{{orderType == 2 || orderType == 5}}">
<view class="input-item"> <view class="input-item">
<view class="input-box"> <view class="input-box">
<input type="text" class="input" bindinput="input" value="{{outTradeNo}}" placeholder="输入交易流水号" placeholder-class="outTradeNo_placeholder" maxlength="150" /> <input type="text" class="input" bindinput="input" value="{{outTradeNo}}" placeholder="输入交易流水号" placeholder-class="outTradeNo_placeholder" maxlength="150" />
......
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 4; let index = 2;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
module.exports = Behavior({
data: {
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false
},
methods: {
onHide() {
this.setData({
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false,
})
},
onPageShow() {
if (this.data.track_page_view_flag) return
if (!this.data.track_batchId) this.setData({
track_batchId: wx.$track.setRandomId('batch')
})
this.setData({
track_page_view_flag: true,
track_timerFlag: true
})
this.setBrowseTrackData()
},
onPageHide() {
wx.$track.setTrackData(2, this.data.track_event_code, this.track_businessParam, this.data.track_batchId)
if (this.timer) clearTimeout(this.timer)
this.setData({
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false
})
this.timer = null
},
setBrowseTrackData() {
try {
if (!this.data.track_timerFlag) return this.onPageHide()
else this.timer = setTimeout(() => {
this.setBrowseTrackData()
}, 10e3)
wx.$track.setTrackData(2, this.data.track_event_code, this.track_businessParam, this.data.track_batchId)
} catch (error) {
console.log(error)
}
},
}
})
\ No newline at end of file \ No newline at end of file
...@@ -170,7 +170,7 @@ Page({ ...@@ -170,7 +170,7 @@ Page({
let { index } = e.currentTarget.dataset let { index } = e.currentTarget.dataset
let { customPayVoucher } = _this.data let { customPayVoucher } = _this.data
customPayVoucher.splice(index, 1) customPayVoucher.splice(index, 1)
this.setData({customPayVoucher}) this.setData({ customPayVoucher })
}, },
// 门店收款确认 // 门店收款确认
confirm() { confirm() {
...@@ -435,15 +435,15 @@ Page({ ...@@ -435,15 +435,15 @@ Page({
selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode() selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode()
}, },
onPageScroll({scrollTop}){ onPageScroll({ scrollTop }) {
this.setData({ this.setData({
navStyle:scrollTop > 20 ? '' : navStyle navStyle: scrollTop > 20 ? '' : navStyle
}) })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -474,15 +474,15 @@ Page({ ...@@ -474,15 +474,15 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
...@@ -650,6 +650,9 @@ Page({ ...@@ -650,6 +650,9 @@ Page({
*/ */
onUnload() { onUnload() {
time && clearTimeout(time); time && clearTimeout(time);
let { tabIndex } = this.data;
this.selectComponent(`#page-${tabIndex}`)?.onUnload &&
this.selectComponent(`#page-${tabIndex}`).onUnload();
}, },
/** /**
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;"> <view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}"> <block wx:if="{{ navBarHeight && showPage }}">
<!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" --> <!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" -->
<quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" /> <quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}"/>
<home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}"></home> <home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}" show="{{tabIndex == 0}}"></home>
<equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" /> <equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" />
<makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material> <makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material>
<tab-mine showCollege="{{ enableBusinessSchool }}" id="page-4" class="pagedetail {{ tabIndex == 4?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine> <tab-mine showCollege="{{ enableBusinessSchool }}" id="page-4" class="pagedetail {{ tabIndex == 4?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine>
......
...@@ -116,8 +116,7 @@ Page({ ...@@ -116,8 +116,7 @@ Page({
const { id, entry, sector, sparringType } = this.data; const { id, entry, sector, sparringType } = this.data;
if (id) { if (id) {
// 都为延保 sparringType 1.话术演练 2.攻防演练 ,暂时只有延保、安心包,再多需修改代码 // 都为延保 sparringType 1.话术演练 2.攻防演练 ,暂时只有延保、安心包,再多需修改代码
sector == '延保' ? sparringType == 1 ? sparringType == 2 ? sector == '延保' ? wx.navigateTo({url: `/packageEquity/pages/aiCheck/defense/defense?id=2`}) : wx.navigateTo({url: `/packageEquity/pages/aiCheck/defense/defense?id=3`}) : wx.navigateTo({url: `/packageEquity/pages/aiCheck/scene/scene`})
wx.navigateTo({url: `/packageEquity/pages/aiCheck/scene/scene`}) : wx.navigateTo({url: `/packageEquity/pages/aiCheck/defense/defense?id=2`}) : wx.navigateTo({url: `/packageEquity/pages/aiCheck/defense/defense?id=3`})
} else if (entry == "other") { } else if (entry == "other") {
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene`, url: `/packageEquity/pages/aiCheck/scene/scene`,
......
...@@ -2,37 +2,23 @@ ...@@ -2,37 +2,23 @@
<view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll"> <view class="order-popup" wx:if="{{show}}" catchtouchmove="noScroll">
<view class="order-popup-bg" bindtap="close" /> <view class="order-popup-bg" bindtap="close" />
<view class="order-popup-content"> <view class="order-popup-content">
<view class="title" wx:if="{{orderType == 2}}">上传付款凭证</view> <view class="title" wx:if="{{orderType == 2 ||orderType == 5}}">上传付款凭证</view>
<view class="order-popup-close" bindtap="close"> <view class="order-popup-close" bindtap="close">
<image src="./images/order-close.png" /> <image src="./images/order-close.png" />
</view> </view>
<!-- 门店 开始 --> <!-- 门店 开始 -->
<block wx:if="{{orderType == 2}}"> <block wx:if="{{orderType == 2 ||orderType == 5}}">
<view class="input-item"> <view class="input-item">
<view class="title-text">交易流水号</view> <view class="title-text">交易流水号</view>
<view class="input-box" wx:if="{{resetOrder}}">{{resetTransNo}}</view> <view class="input-box" wx:if="{{resetOrder}}">{{resetTransNo}}</view>
<view wx:else class="input-box"> <view wx:else class="input-box">
<input <input type="text" class="input" bindinput="input" value="{{outTradeNo}}" placeholder="输入交易流水号" placeholder-class="outTradeNo_placeholder" maxlength="150" />
type="text"
class="input"
bindinput="input"
value="{{outTradeNo}}"
placeholder="输入交易流水号"
placeholder-class="outTradeNo_placeholder"
maxlength="150" />
</view> </view>
</view> </view>
<view class="upload-content"> <view class="upload-content">
<view class="title-text">上传图片</view> <view class="title-text">上传图片</view>
<view class="upload-box"> <view class="upload-box">
<van-uploader <van-uploader file-list="{{ payVoucherList }}" max-count="9" deletable preview-size="var(--fontSize160)" bind:after-read="upLoad" bind:delete="deletePayVoucher">
file-list="{{ payVoucherList }}"
max-count="9"
deletable
preview-size="var(--fontSize160)"
bind:after-read="upLoad"
bind:delete="deletePayVoucher"
>
</van-uploader> </van-uploader>
</view> </view>
</view> </view>
...@@ -42,4 +28,3 @@ ...@@ -42,4 +28,3 @@
<!-- 4s店 end --> <!-- 4s店 end -->
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -134,6 +134,10 @@ Component({ ...@@ -134,6 +134,10 @@ Component({
name: '微信支付', name: '微信支付',
value: 1 value: 1
}, },
{
name: '嘀加收款',
value: 5
}
], ],
storeType: 1, // 门店数据类型 默认园区店 storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false showStoreSelectPopup: false
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
background: #fff; background: #fff;
} }
.goods.total-box{ .goods.total-box {
background: #fff; background: #fff;
} }
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
margin-left: auto; margin-left: auto;
} }
.goods-box .goods .price-box text{ .goods-box .goods .price-box text {
position: absolute; position: absolute;
left: var(--fontSize16); left: var(--fontSize16);
top: 50%; top: 50%;
...@@ -469,3 +469,68 @@ ...@@ -469,3 +469,68 @@
border-top: var(--fontSize1) solid #EFF0F2; border-top: var(--fontSize1) solid #EFF0F2;
} }
} }
.payType-box {
display: flex;
align-items: center;
// flex-wrap: wrap;
padding-top: var(--fontSize20);
/* justify-content: space-between; */
}
.payType-box .item {
white-space: nowrap;
margin-right: 4px;
margin-bottom: var(--fontSize20);
/* margin: var(--fontSize20) var(--fontSize8) 0 0; */
}
.payType-box .wxPayIcon {
width: var(--fontSize48);
height: var(--fontSize48);
margin-right: var(--fontSize5);
}
.payType-box .item:last-child {
margin-right: 0;
}
.box .item-disabled {
opacity: .4;
}
.payType-box .item {
box-sizing: border-box;
background: #F7F8FA;
border-radius: 4rpx;
font-size: var(--fontSize28);
color: #999999;
height: var(--fontSize56);
padding: 0 var(--fontSize24);
position: relative;
}
.payType-box .item.disabled {
opacity: .4;
}
.payType-box .item.active {
color: #347BFF;
border: var(--fontSize2) solid #347BFF;
border-color: #347BFF;
background: #347bff1a;
}
.payType-box .item .active-icon {
display: none;
width: var(--fontSize20);
height: var(--fontSize20);
position: absolute;
right: 0;
bottom: 0;
}
.payType-box .item.active .active-icon {
display: block;
}
\ No newline at end of file \ No newline at end of file
...@@ -73,17 +73,32 @@ ...@@ -73,17 +73,32 @@
<view class="label">其他信息</view> <view class="label">其他信息</view>
</view> </view>
</view> </view>
<gl-cell wx:if="{{ !orderInfo.outTradeNo || orderInfo.resetOrder }}" border class="pay-type" label="支付方式" valueAlign="right" labelWidth="var(--fontSize140)"> <!-- <gl-cell
wx:if="{{ !orderInfo.outTradeNo || orderInfo.resetOrder }}"
border
class="pay-type"
label="支付方式"
valueAlign="right"
labelWidth="var(--fontSize140)"
>
<view class="only-select-text" wx:if="{{ orderInfo.resetOrder }}">门店收款</view> <view class="only-select-text" wx:if="{{ orderInfo.resetOrder }}">门店收款</view>
<view wx:else class="switch-box"> <view wx:else class="switch-box">
<view class="block text-center {{ orderInfo.payType==1?'':'right' }}" /> <view class="block text-center {{ orderInfo.payType==1?'':'right' }}" />
<view class="left text-center {{ orderInfo.payType == 1?'active':'' }}" bindtap="changePayType" data-payType="1">线上支付</view> <view class="left text-center {{ orderInfo.payType == 1?'active':'' }}" bindtap="changePayType" data-payType="1">线上支付</view>
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view> <view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
</view> </view>
</gl-cell> -->
<gl-cell border class="pay-type" label="支付方式" valueAlign="right" wx:if="{{ !orderInfo.outTradeNo || orderInfo.resetOrder }}" labelWidth="var(--fontSize140)">
<view class="payType-box">
<view class="item text-center active" wx:if="{{ orderInfo.resetOrder }}">门店收款</view>
<block wx:else>
<block wx:for="{{ payTypeList }}" wx:key="index">
<view class="item text-center {{ orderInfo.payType == item.value?'active':'' }}" bindtap="changePayType" data-payType="{{ item.value }}">{{item.name}}</view>
</block>
</block>
</view>
</gl-cell> </gl-cell>
<gl-cell wx:if="{{ (orderInfo.payType == 2&&!orderInfo.resetOrder) }}" value="{{successDateTime}}" bind:click="toSelectDate" haveArrow="{{true}}" placeholder="请选择时间" required="{{true}}" requiredAfter="{{true}}" border class="pay-type" label="门店收款时间" valueAlign="right" labelWidth="var(--fontSize200)"> <gl-cell wx:if="{{ (orderInfo.payType == 2 ||orderInfo.payType ==5 )&&!orderInfo.resetOrder }}" value="{{ successDateTime }}" bind:click="toSelectDate" haveArrow="{{ true }}" placeholder="请选择时间" required="{{ true }}" requiredAfter="{{ true }}" border class="pay-type" label="{{orderInfo.payType == 2?'门店收款时间':'嘀加收款时间'}}" valueAlign="right" labelWidth="var(--fontSize200)"></gl-cell>
</gl-cell>
<view class="box"> <view class="box">
<view class="title remarkTitle">备注</view> <view class="title remarkTitle">备注</view>
<van-field type="textarea" maxlength="30" autosize class="inputBox" border="{{ false }}" data-hold-keyboard value="{{ orderInfo.notes }}" data-attrName="notes" placeholder="请输入(30字以内)" data-attrType="" bindinput="handleInput"></van-field> <van-field type="textarea" maxlength="30" autosize class="inputBox" border="{{ false }}" data-hold-keyboard value="{{ orderInfo.notes }}" data-attrName="notes" placeholder="请输入(30字以内)" data-attrType="" bindinput="handleInput"></van-field>
...@@ -94,4 +109,4 @@ ...@@ -94,4 +109,4 @@
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" /> <Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" />
</view> </view>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
<date-select show="{{showDateSelect}}" bind:close="closeDateModal" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file \ No newline at end of file
<date-select show="{{ showDateSelect }}" bind:close="closeDateModal" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file \ No newline at end of file
...@@ -318,8 +318,8 @@ Page({ ...@@ -318,8 +318,8 @@ Page({
if (!orderInfo.vdQuotationGoodsList.length) if (!orderInfo.vdQuotationGoodsList.length)
return wx.$util.showToast("请选择增值车损险商品"); return wx.$util.showToast("请选择增值车损险商品");
// 非标记错误,门店收款 // 非标记错误,门店收款
if (!orderInfo.pay2Time && orderInfo.payType == 2 && !orderInfo.resetOrder) if (!orderInfo.pay2Time && (orderInfo.payType == 2 || orderInfo.payType == 5) && !orderInfo.resetOrder)
return wx.$util.showToast("请选择门店收款时间"); return wx.$util.showToast(orderInfo.payType == 2 ? "请选择门店收款时间" : "请选择嘀加收款时间");
// 修改权益报价逻辑 // 修改权益报价逻辑
if (confirmStatus) return false; if (confirmStatus) return false;
this.setData({ this.setData({
...@@ -335,7 +335,7 @@ Page({ ...@@ -335,7 +335,7 @@ Page({
// 如果是门店收款 并且付款凭证没有填 // 如果是门店收款 并且付款凭证没有填
orderInfo.paymentDocList = orderInfo.paymentDocList || []; orderInfo.paymentDocList = orderInfo.paymentDocList || [];
if ( if (
orderInfo.payType == 2 && (orderInfo.payType == 2 || orderInfo.payType == 5) &&
!(orderInfo.transactionNo && orderInfo.paymentDocList.length) !(orderInfo.transactionNo && orderInfo.paymentDocList.length)
) )
return this.setData({ return this.setData({
...@@ -371,7 +371,7 @@ Page({ ...@@ -371,7 +371,7 @@ Page({
// 校验生成告知书是否成功 // 校验生成告知书是否成功
if (id) { if (id) {
// 门店付款就直接返回列表 // 门店付款就直接返回列表
if (orderInfo.payType == 2) if (orderInfo.payType == 2 || orderInfo.payType == 5)
return wx.$router.reLaunch("packageEquity.equityPage", { return wx.$router.reLaunch("packageEquity.equityPage", {
tabIndex: 1, tabIndex: 1,
}); });
......
...@@ -83,6 +83,7 @@ Component({ ...@@ -83,6 +83,7 @@ Component({
mapValue: { mapValue: {
1: "线上支付", 1: "线上支付",
2: "门店收款", 2: "门店收款",
5: "嘀加收款"
}, },
}, },
], ],
......
...@@ -68,6 +68,7 @@ Page({ ...@@ -68,6 +68,7 @@ Page({
mapValue: { mapValue: {
1: "线上支付", 1: "线上支付",
2: "门店收款", 2: "门店收款",
5: "嘀加收款"
}, },
}, },
], ],
...@@ -125,7 +126,7 @@ Page({ ...@@ -125,7 +126,7 @@ Page({
merchantId, merchantId,
customerPhones customerPhones
} }
if(staffUuid){ if (staffUuid) {
params.transferIds = [staffUuid] params.transferIds = [staffUuid]
} }
......
// packageEquity/pages/receptionDetail/components/quality/index.js // packageEquity/pages/receptionDetail/components/quality/index.js
import api from "../../../../carEquityApi"; import api from "../../../../carEquityApi";
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import watchScrollMixin from '../watchScrollMixin'
Component({ Component({
behaviors: [watchScrollMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
batchId: Number, batchId: Number,
defenceResultFlag:Number defenceResultFlag: Number
}, },
lifetimes: { lifetimes: {
ready() { ready() {
...@@ -35,8 +37,9 @@ Component({ ...@@ -35,8 +37,9 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
this.setData({ this.setData({
activeIndex: index, activeIndex: index,
scrollTop:0 scrollTop: 0
}) })
this.setTrackData('offense_and_defense_toggle')
}, },
getReceptionResult() { getReceptionResult() {
let { let {
...@@ -84,11 +87,12 @@ Component({ ...@@ -84,11 +87,12 @@ Component({
activeIndex, activeIndex,
list list
} = this.data; } = this.data;
this.setTrackData('go_to_dialogue_view')
let mergedOffset = list.detailList[activeIndex].mergedOffset; let mergedOffset = list.detailList[activeIndex].mergedOffset;
thisPage.seek(mergedOffset) thisPage.seek(mergedOffset)
thisPage.setData({ thisPage.setData({
activeIndex: 0, activeIndex: 0,
avgDefence:'' avgDefence: ''
}, () => { }, () => {
thisPage.dialogueRef().toDefenceItem(mergedOffset) thisPage.dialogueRef().toDefenceItem(mergedOffset)
thisPage.play() thisPage.play()
...@@ -97,6 +101,15 @@ Component({ ...@@ -97,6 +101,15 @@ Component({
}, },
practiceHandle() { practiceHandle() {
},
/**设置埋点数据 */
setTrackData(code) {
let {
batchId
} = this.data
wx.$track.setTrackData(0, code, {
batchId
})
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view scroll-y class="attack-content" scroll-top="{{scrollTop}}"> <scroll-view scroll-y class="attack-content" scroll-top="{{scrollTop}}" bindscroll="watchScrollTrack" data-event-code="offense_and_defense">
<view class="content"> <view class="content">
<view class="left attack"> <view class="left attack">
攻 攻
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="more" bind:tap="lookMore">去对话查看</view> <view class="more" bind:tap="lookMore" >去对话查看</view>
</view> </view>
<view class="safeAreaInset"></view> <view class="safeAreaInset"></view>
</scroll-view> </scroll-view>
......
// packageEquity/pages/receptionDetail/components/dialogue/dialogue.js // packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
import api from "~/utils/request/request.js"; import api from "~/utils/request/request.js";
let thisPage = null let thisPage = null
import watchScrollMixin from '../watchScrollMixin'
Component({ Component({
behaviors: [watchScrollMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
recordData: Object recordData: Object,
batchId: Number
}, },
lifetimes: { lifetimes: {
ready() { ready() {
thisPage = wx.$router.getPageInstance() thisPage = wx.$router.getPageInstance()
this.innerAudioContext = thisPage.qualityAudio this.innerAudioContext = thisPage.qualityAudio
const { const {
recordData batchId
} = this.data } = this.data
const data = { const data = {
batchId: recordData.batchId, batchId,
currentPage: 1, currentPage: 1,
pageSize: 999999, pageSize: 999999,
}; };
...@@ -100,7 +102,7 @@ Component({ ...@@ -100,7 +102,7 @@ Component({
}) })
this.touchend() this.touchend()
}, },
seekPlay(e) { seekPlay(e, report = true) {
let { let {
item, item,
click, click,
...@@ -108,15 +110,25 @@ Component({ ...@@ -108,15 +110,25 @@ Component({
} = e.currentTarget.dataset, { } = e.currentTarget.dataset, {
activeId activeId
} = this.data } = this.data
if(!item) return
thisPage.seek(item.mergedOffset) thisPage.seek(item.mergedOffset)
this.setTopId(item, scroll) this.setTopId(item, scroll)
if (report) this.setTrackData('dialogue_time_point')
if (click && item.text_id == activeId) { if (click && item.text_id == activeId) {
const { const {
paused paused
} = this.innerAudioContext } = this.innerAudioContext
if (paused) this.triggerEvent('play') if (paused) this.triggerEvent('play')
else thisPage.onPause() else thisPage.onPause()
} else this.triggerEvent('play') thisPage.setData({
isOperate: !paused
})
} else {
this.triggerEvent('play')
thisPage.setData({
isOperate: false
})
}
}, },
formatTime(num) { formatTime(num) {
let minutes = Math.floor(num / 60) || '0', let minutes = Math.floor(num / 60) || '0',
...@@ -380,6 +392,7 @@ Component({ ...@@ -380,6 +392,7 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
let target = `dialogueList[${index}]` let target = `dialogueList[${index}]`
if (ind > -1) target = `dialogueList[${index}].conversationCheckDetailDTO[${ind}]` if (ind > -1) target = `dialogueList[${index}].conversationCheckDetailDTO[${ind}]`
this.setTrackData(key == 'showDefenceDetail' ? 'offense_and_defense_bout' : 'dialogue_intention_matching')
this.setData({ this.setData({
[`${target}.${key}`]: !value [`${target}.${key}`]: !value
}) })
...@@ -411,6 +424,7 @@ Component({ ...@@ -411,6 +424,7 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
if (item.conversationDetailAppealId) return if (item.conversationDetailAppealId) return
this.triggerEvent('pause') this.triggerEvent('pause')
this.setTrackData('appeal')
this.setData({ this.setData({
chooseItem: { chooseItem: {
...item, ...item,
...@@ -483,6 +497,9 @@ Component({ ...@@ -483,6 +497,9 @@ Component({
offsetList = dialogueList.map(i => i.mergedOffset), offsetList = dialogueList.map(i => i.mergedOffset),
mergedOffset = findNearest(offsetList, duration * progress / 100), mergedOffset = findNearest(offsetList, duration * progress / 100),
item = dialogueList.find(i => i.mergedOffset == mergedOffset) item = dialogueList.find(i => i.mergedOffset == mergedOffset)
this.setTrackData('audio_progress_bar', {
mergedOffset
})
this.seekPlay({ this.seekPlay({
currentTarget: { currentTarget: {
dataset: { dataset: {
...@@ -490,8 +507,18 @@ Component({ ...@@ -490,8 +507,18 @@ Component({
scroll: true scroll: true
} }
} }
}) }, false)
} }
},
/**设置埋点数据 */
setTrackData(code, params = {}) {
let {
batchId
} = this.data
wx.$track.setTrackData(0, code, {
...params,
batchId
})
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<block wx:if="{{dialogueList.length}}"> <block wx:if="{{dialogueList.length}}">
<scroll-view class="scroll-view" enhanced scroll-y <scroll-view class="scroll-view" enhanced scroll-y
scroll-into-view="{{toId}}" show-scrollbar="{{false}}" bindtouchstart="touchstart" bindtouchend="touchend" scroll-with-animation> scroll-into-view="{{toId}}" show-scrollbar="{{false}}" bindtouchstart="touchstart" bindtouchend="touchend" scroll-with-animation bindscroll="watchScrollTrack" data-event-code="dialogue">
<block wx:for="{{dialogueList}}" wx:key="index"> <block wx:for="{{dialogueList}}" wx:key="index">
<view class="item {{activeId == item.text_id?'active':''}} {{item.conversationCheckDetailDTO || item.defenceDetail ? 'hide-margin' :''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}"> <view class="item {{activeId == item.text_id?'active':''}} {{item.conversationCheckDetailDTO || item.defenceDetail ? 'hide-margin' :''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{item.visible}}"> <block wx:if="{{item.visible}}">
......
// packageEquity/pages/receptionDetail/components/quality/index.js // packageEquity/pages/receptionDetail/components/quality/index.js
import api from "../../../../carEquityApi"; import api from "../../../../carEquityApi";
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import watchScrollMixin from '../watchScrollMixin'
Component({ Component({
behaviors: [watchScrollMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -158,9 +160,10 @@ Component({ ...@@ -158,9 +160,10 @@ Component({
} = e.currentTarget.dataset; } = e.currentTarget.dataset;
let { let {
activeIndex, activeIndex,
list list,
batchId
} = this.data; } = this.data;
this.setTrackData('quality_inspection_matching')
list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].isdown = !list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].isdown list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].isdown = !list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].isdown
this.setData({ this.setData({
list list
...@@ -175,6 +178,12 @@ Component({ ...@@ -175,6 +178,12 @@ Component({
list, list,
activeIndex activeIndex
} = this.data; } = this.data;
this.setTrackData( {
0: 'reception_link',
1: 'vehicle_interaction',
2: 'demand_mining',
3: 'make_deal'
} [index])
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
thisPage.onPause() thisPage.onPause()
this.setData({ this.setData({
...@@ -255,6 +264,7 @@ Component({ ...@@ -255,6 +264,7 @@ Component({
activeIndex, activeIndex,
list list
} = this.data; } = this.data;
this.setTrackData('go_to_dialogue_view')
let item = list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[0]; let item = list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[0];
item.text_id = `text_${item.id}` item.text_id = `text_${item.id}`
thisPage.onPause() thisPage.onPause()
...@@ -294,6 +304,7 @@ Component({ ...@@ -294,6 +304,7 @@ Component({
activeIndex, activeIndex,
list list
} = this.data; } = this.data;
this.setTrackData('play_verbal')
let time = list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].mergedOffset; let time = list[activeIndex].conversationCheckDetailDTOList[findex].conversationDetailDTOList[sindex].mergedOffset;
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
list[activeIndex].conversationCheckDetailDTOList.forEach(sitem => { list[activeIndex].conversationCheckDetailDTOList.forEach(sitem => {
...@@ -329,6 +340,15 @@ Component({ ...@@ -329,6 +340,15 @@ Component({
} = e.currentTarget.dataset } = e.currentTarget.dataset
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
thisPage.practiceHandle(stage) thisPage.practiceHandle(stage)
},
/**设置埋点数据 */
setTrackData(code) {
let {
batchId
} = this.data
wx.$track.setTrackData(0, code, {
batchId
})
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="score"><text class="{{(item.totalGetScore/item.totalScore)<0.5?'fail':''}}">{{item.totalGetScore||item.totalGetScore===0?item.totalGetScore:'-'}}</text>/{{item.totalScore||item.totalScore===0?item.totalScore:'-'}}</view> <view class="score"><text class="{{(item.totalGetScore/item.totalScore)<0.5?'fail':''}}">{{item.totalGetScore||item.totalGetScore===0?item.totalGetScore:'-'}}</text>/{{item.totalScore||item.totalScore===0?item.totalScore:'-'}}</view>
</view> </view>
</view> </view>
<scroll-view scroll-y class="quality-reception-wrap" scroll-top="{{scrollTop}}"> <scroll-view scroll-y class="quality-reception-wrap" scroll-top="{{scrollTop}}" bindscroll="watchScrollTrack" data-event-code="quality_inspection">
<block wx-if="{{list[activeIndex].conversationCheckDetailDTOList.length}}"> <block wx-if="{{list[activeIndex].conversationCheckDetailDTOList.length}}">
<view class="link-list" wx:for="{{list[activeIndex].conversationCheckDetailDTOList}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'> <view class="link-list" wx:for="{{list[activeIndex].conversationCheckDetailDTOList}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<view class="link-title"> <view class="link-title">
......
module.exports = Behavior({
methods: {
watchScrollTrack: wx.$util.throttle(function(e) {
const {
batchId
} = this.data, {
eventCode
} = e.currentTarget.dataset
wx.$track.setTrackData(1, eventCode, {
batchId
})
}, 1e3)
}
})
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/receptionDetail/receptionDetail.js // packageEquity/pages/receptionDetail/receptionDetail.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({ Page({
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -16,7 +18,8 @@ Page({ ...@@ -16,7 +18,8 @@ Page({
activeIndex: 0, activeIndex: 0,
status: 'pause', status: 'pause',
currentTime: '00:00', //当前音频的播放位置 currentTime: '00:00', //当前音频的播放位置
isOperate: true isOperate: true,
track_event_code: 'reception_detail', //埋点动作类型
}, },
/** /**
...@@ -39,6 +42,9 @@ Page({ ...@@ -39,6 +42,9 @@ Page({
} else { } else {
this.onPause() this.onPause()
} }
this.setTrackData(isOperate ? 'play_audio' : 'pause_audio', {
mergedOffset: this.qualityAudio.currentTime
})
this.setData({ this.setData({
isOperate: !isOperate isOperate: !isOperate
}) })
...@@ -62,11 +68,13 @@ Page({ ...@@ -62,11 +68,13 @@ Page({
}, },
practiceHandle(stage) { practiceHandle(stage) {
let { let {
tag tag,
batchId
} = this.data.record; } = this.data.record;
let _this = this; let _this = this;
let regex = new RegExp('环节', 'g') let regex = new RegExp('环节', 'g')
stage = stage.replace(regex, '') stage = stage.replace(regex, '')
this.setTrackData('quick_exercise')
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否前往AI趣练练习该对话环节', content: '是否前往AI趣练练习该对话环节',
...@@ -146,6 +154,10 @@ Page({ ...@@ -146,6 +154,10 @@ Page({
onRoute(options) { onRoute(options) {
if (Object.keys(options).length) { if (Object.keys(options).length) {
options.staticDate = new Date(options.staticDate).format('MM月dd日') options.staticDate = new Date(options.staticDate).format('MM月dd日')
this.track_businessParam = {
batchId: options.batchId
} //埋点业务参数
this.setData({ this.setData({
record: options record: options
}, () => { }, () => {
...@@ -158,6 +170,11 @@ Page({ ...@@ -158,6 +170,11 @@ Page({
let { let {
index index
} = e.currentTarget.dataset } = e.currentTarget.dataset
this.setTrackData({
0: 'dialogue',
1: 'quality_inspection',
2: 'offense_and_defense'
} [index])
this.setData({ this.setData({
activeIndex: index activeIndex: index
}) })
...@@ -204,6 +221,9 @@ Page({ ...@@ -204,6 +221,9 @@ Page({
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址 // 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, fileUrl].join(' - ') let text = [record.merchantName, wx.$util.tsFormatTime(startTime, 'Y年M月D日 h:m:s'), wx.$util.tsFormatTime(endTime, 'Y年M月D日 h:m:s'), this.format(totalDuration), receptionStatus, fileUrl].join(' - ')
wx.$util.setCopyData(text) wx.$util.setCopyData(text)
this.setTrackData('copy_content', {
context: text,
})
// wx.$util.showToast('复制成功') // wx.$util.showToast('复制成功')
}, },
format(seconds) { format(seconds) {
...@@ -237,7 +257,7 @@ Page({ ...@@ -237,7 +257,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.onPageShow()
}, },
/** /**
...@@ -245,6 +265,7 @@ Page({ ...@@ -245,6 +265,7 @@ Page({
*/ */
onHide() { onHide() {
this.qualityAudio.stop() this.qualityAudio.stop()
this.onPageHide()
}, },
/** /**
...@@ -252,6 +273,7 @@ Page({ ...@@ -252,6 +273,7 @@ Page({
*/ */
onUnload() { onUnload() {
this.qualityAudio.stop() this.qualityAudio.stop()
this.onPageHide()
}, },
/** /**
...@@ -273,5 +295,15 @@ Page({ ...@@ -273,5 +295,15 @@ Page({
*/ */
onShareAppMessage() { onShareAppMessage() {
},
/**设置埋点数据 */
setTrackData(code, params = {}) {
let {
record
} = this.data
wx.$track.setTrackData(0, code, {
...params,
batchId: record.batchId
})
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="type {{activeIndex==index?'active':''}}" wx:for="{{typeLists}}" data-index="{{index}}" bind:tap="changeType">{{item}}<text class="avg" wx:if="{{activeIndex==index&&avgDefence!==''}}" wx:key="index">{{avgDefence}}分</text></view> <view class="type {{activeIndex==index?'active':''}}" wx:for="{{typeLists}}" data-index="{{index}}" bind:tap="changeType">{{item}}<text class="avg" wx:if="{{activeIndex==index&&avgDefence!==''}}" wx:key="index">{{avgDefence}}分</text></view>
</view> </view>
<view class="reception-operate"> <view class="reception-operate">
<gl-image class="img share" webp src="/equity/share-icon.png" bind:tap="share"/> <gl-image class="img share" webp src="/equity/share-icon.png" bind:tap="share" />
<view class="audio-wrap" bind:tap="onHandle"> <view class="audio-wrap" bind:tap="onHandle">
<gl-image class="img" webp src="/equity/play.png" wx:if="{{status=='pause'||status=='ending'}}" /> <gl-image class="img" webp src="/equity/play.png" wx:if="{{status=='pause'||status=='ending'}}" />
<gl-image class="img" webp src="/equity/stop.png" wx:else /> <gl-image class="img" webp src="/equity/stop.png" wx:else />
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view class="type-wrap" style="height:calc(100vh - {{receptionWrapHeight}})"> <view class="type-wrap" style="height:calc(100vh - {{receptionWrapHeight}})">
<block wx:if="{{receptionWrapHeight && activeIndex != -1}}"> <block wx:if="{{receptionWrapHeight && activeIndex != -1}}">
<view hidden="{{activeIndex ==1||activeIndex == 2}}" style="height:calc(100vh - {{receptionWrapHeight}})"> <view hidden="{{activeIndex ==1||activeIndex == 2}}" style="height:calc(100vh - {{receptionWrapHeight}})">
<dialogue id="dialogue" bindplay="play" bindpause="onPause" recordData="{{record}}"></dialogue> <dialogue id="dialogue" bindplay="play" bindpause="onPause" recordData="{{record}}" batchId="{{record.batchId}}"></dialogue>
</view> </view>
<quality id="quality" wx:if="{{activeIndex==1}}" batchId="{{record.batchId}}"></quality> <quality id="quality" wx:if="{{activeIndex==1}}" batchId="{{record.batchId}}"></quality>
<attack wx:elif="{{activeIndex==2}}" defenceResultFlag="{{record.defenceResultFlag}}" batchId="{{record.batchId}}"></attack> <attack wx:elif="{{activeIndex==2}}" defenceResultFlag="{{record.defenceResultFlag}}" batchId="{{record.batchId}}"></attack>
......
// packageEquity/pages/receptionRecords/receptionRecords.js // packageEquity/pages/receptionRecords/receptionRecords.js
import { getReceptionRecordList, getRecordDetailList } from "../../receptionRecordsApi" import {
getReceptionRecordList,
getRecordDetailList
} from "../../receptionRecordsApi"
import carLifeApi from "../../carEquityApi"; import carLifeApi from "../../carEquityApi";
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({ Page({
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -17,7 +21,8 @@ Page({ ...@@ -17,7 +21,8 @@ Page({
nothing: false, nothing: false,
showEmployeeName: false, // 是否展示销售顾问字段 showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true, isShowDefeatBtn: true,
loaded: false loaded: false,
track_event_code:'staff_reception_list', //埋点动作类型
}, },
/** /**
...@@ -25,7 +30,10 @@ Page({ ...@@ -25,7 +30,10 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({showEmployeeName: true, isShowDefeatBtn: false}) if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({
showEmployeeName: true,
isShowDefeatBtn: false
})
// 超管获取所有质检门店/员工 // 超管获取所有质检门店/员工
this.setData({ this.setData({
nothing: false nothing: false
...@@ -56,7 +64,12 @@ Page({ ...@@ -56,7 +64,12 @@ Page({
}) })
}, },
getParams() { getParams() {
let { searchForm, isFilterDefeat, isFilterUpgrade, storeRangeList } = this.data let {
searchForm,
isFilterDefeat,
isFilterUpgrade,
storeRangeList
} = this.data
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
const now = new Date(); const now = new Date();
const threeMonthsAgo = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate() + 1) const threeMonthsAgo = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate() + 1)
...@@ -71,14 +84,18 @@ Page({ ...@@ -71,14 +84,18 @@ Page({
customerTypes: searchForm?.customerTypes, customerTypes: searchForm?.customerTypes,
carModels: searchForm?.carModels, carModels: searchForm?.carModels,
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {if (v.merchantNo) return v.merchantNo}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo, merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {
if (v.merchantNo) return v.merchantNo
}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
}, },
// 详情页面 // 详情页面
goReceptionDetail(e) { goReceptionDetail(e) {
let { item } = e.currentTarget.dataset let {
item
} = e.currentTarget.dataset
wx.$router.go('receptionDetail', item) wx.$router.go('receptionDetail', item)
}, },
navbarReady(e) { navbarReady(e) {
...@@ -89,7 +106,10 @@ Page({ ...@@ -89,7 +106,10 @@ Page({
}, },
showScreenPop() { showScreenPop() {
let { isFilterDefeat, isFilterUpgrade } = this.data let {
isFilterDefeat,
isFilterUpgrade
} = this.data
this.setData({ this.setData({
showScreen: true, showScreen: true,
showReceptionRendering: true, showReceptionRendering: true,
...@@ -118,6 +138,7 @@ Page({ ...@@ -118,6 +138,7 @@ Page({
listData: [] listData: []
}, () => { }, () => {
this.getReceptionList() this.getReceptionList()
wx.$track.setTrackData(0, 'staff_reception_search', this.getParams())
}) })
this.containerBack(); this.containerBack();
}, },
...@@ -128,19 +149,27 @@ Page({ ...@@ -128,19 +149,27 @@ Page({
// 获取接待记录统计数据 // 获取接待记录统计数据
getReceptionList() { getReceptionList() {
let { listData } = this.data let {
listData
} = this.data
let params = this.getParams() let params = this.getParams()
this.setData({ this.setData({
loaded: false loaded: false
}, () => { }, () => {
wx.showLoading({title: '加载中'}) wx.showLoading({
title: '加载中'
})
getReceptionRecordList({ getReceptionRecordList({
merchantNo: params.merchantNo, merchantNo: params.merchantNo,
startDateTime: params.startDateTime, startDateTime: params.startDateTime,
endDateTime: params.endDateTime, endDateTime: params.endDateTime,
staffUuids: params.staffUuids staffUuids: params.staffUuids
}).then(res => { }).then(res => {
let { code, message, data } = res let {
code,
message,
data
} = res
if (code == 0) { if (code == 0) {
data?.forEach(val => { data?.forEach(val => {
val.receptionStaticInfoDTOList = [] val.receptionStaticInfoDTOList = []
...@@ -163,15 +192,26 @@ Page({ ...@@ -163,15 +192,26 @@ Page({
}, },
// 获取接待记录接待时间轴详情数据 // 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() { getReceptionRecordDetailInfo() {
let { pageNum, listData, nothing } = this.data let {
pageNum,
listData,
nothing
} = this.data
let params = { let params = {
pageNum, pageNum,
...this.getParams() ...this.getParams()
} }
if (nothing) return if (nothing) return
wx.showLoading({title: '加载中'}) wx.showLoading({
title: '加载中'
})
this.track_businessParam = params //埋点业务参数
getRecordDetailList(params).then(res => { getRecordDetailList(params).then(res => {
let { code, data, message } = res let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
listData?.forEach(val => { listData?.forEach(val => {
data?.list?.forEach(subV => { data?.list?.forEach(subV => {
...@@ -196,8 +236,14 @@ Page({ ...@@ -196,8 +236,14 @@ Page({
}, },
// 过滤升级/战败接待记录数据 // 过滤升级/战败接待记录数据
filterItemData(e) { filterItemData(e) {
let { type } = e.currentTarget.dataset let {
let { isFilterUpgrade, isFilterDefeat, searchForm } = this.data type
} = e.currentTarget.dataset
let {
isFilterUpgrade,
isFilterDefeat,
searchForm
} = this.data
let orderResult = searchForm?.orderResult || [] let orderResult = searchForm?.orderResult || []
let index let index
if (type == 'upgrade' || type == 'defeat') { if (type == 'upgrade' || type == 'defeat') {
...@@ -246,9 +292,14 @@ Page({ ...@@ -246,9 +292,14 @@ Page({
this.getReceptionList() this.getReceptionList()
}) })
}, },
goto(e){ goto(e) {
let {record} = e.currentTarget.dataset let {
wx.$router.go('packageEquity.receptionDetail',record ) record
} = e.currentTarget.dataset
wx.$router.go('packageEquity.receptionDetail', record)
wx.$track.setTrackData(0, 'reception_detail', {
batchId: record.batchId
})
}, },
back() { back() {
wx.$router.back() wx.$router.back()
...@@ -265,21 +316,21 @@ Page({ ...@@ -265,21 +316,21 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.onPageShow()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
this.onPageHide()
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
this.onPageHide()
}, },
/** /**
......
...@@ -145,6 +145,10 @@ Component({ ...@@ -145,6 +145,10 @@ Component({
{ {
name: '支付宝支付', name: '支付宝支付',
value: 4 value: 4
},
{
name: '嘀加收款',
value: 5
} }
], ],
storeType: 1, // 门店数据类型 默认园区店 storeType: 1, // 门店数据类型 默认园区店
......
...@@ -42,7 +42,8 @@ Page({ ...@@ -42,7 +42,8 @@ Page({
tabListTemplate: ["全部", "待跟进", "已升级", "战败"], tabListTemplate: ["全部", "待跟进", "已升级", "战败"],
isMake: true, isMake: true,
selectType: 1, selectType: 1,
isSettingExpiredTraffic: false // 是否启用流量失效 isSettingExpiredTraffic: false, // 是否启用流量失效
isScan: false // 是否扫码核销
}, },
// 创建一个动画实例 // 创建一个动画实例
// createAnimation: function () { // createAnimation: function () {
...@@ -68,10 +69,11 @@ Page({ ...@@ -68,10 +69,11 @@ Page({
}); });
}, },
// 确定是否要显示 // 确定是否要显示
showSelectType({ scene = "", item = {} }) { showSelectType({ scene = "", item = {}}, scan = false) {
let {isSettingExpiredTraffic} = this.data let {isSettingExpiredTraffic} = this.data
this.setData({isScan: scan})
// 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单 // 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单
if (!isSettingExpiredTraffic && this.data.selectType == 3) { if ((!isSettingExpiredTraffic || scan) && this.data.selectType == 3) {
this.setData({ this.setData({
selectType: 1 selectType: 1
}) })
...@@ -218,7 +220,7 @@ Page({ ...@@ -218,7 +220,7 @@ Page({
wx.scanCode({ wx.scanCode({
success(res) { success(res) {
let { result } = res; let { result } = res;
that.showSelectType({ scene: result }); that.showSelectType({ scene: result }, true);
// console.log(result) // console.log(result)
// wx.$router.go("tabWorkOrder.createOrder", { // wx.$router.go("tabWorkOrder.createOrder", {
// scene: result, // scene: result,
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
<gl-image class="icon" src="/miniProgram/order3.png"></gl-image> <gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
战败下单 战败下单
</view> </view>
<view wx:if="{{isSettingExpiredTraffic}}" class="modalbox cancle {{ selectType == 3?'act': '' }}" bindtap="selectType" data-type="3"> <view wx:if="{{isSettingExpiredTraffic && !isScan}}" class="modalbox cancle {{ selectType == 3?'act': '' }}" bindtap="selectType" data-type="3">
<gl-image class="icon" src="/miniProgram/order4.png"></gl-image> <gl-image class="icon" src="/miniProgram/order4.png"></gl-image>
失效客户 失效客户
</view> </view>
......
...@@ -6,6 +6,8 @@ const checkDailyReport = async (sceneType) => { ...@@ -6,6 +6,8 @@ const checkDailyReport = async (sceneType) => {
// 判读是否要填写日报 // 判读是否要填写日报
if (!(userInfo?.isSuper || userInfo?.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3)) {
// 判断员工是否已打卡上班
eventRequest.push(clockedIntoWork());
eventRequest.push( eventRequest.push(
sceneType ? equityStaffDailyReport(userInfo) : staffDailyReport(userInfo) sceneType ? equityStaffDailyReport(userInfo) : staffDailyReport(userInfo)
); );
...@@ -13,10 +15,13 @@ const checkDailyReport = async (sceneType) => { ...@@ -13,10 +15,13 @@ const checkDailyReport = async (sceneType) => {
return new Promise((resolve) => { return new Promise((resolve) => {
Promise.all(eventRequest).then((results) => { Promise.all(eventRequest).then((results) => {
const [reportStatus] = results; // const [reportStatus] = results;
console.log(reportStatus, results, results.length, results[results.length - 1], 'reportStatus'); results = results.slice(-2)
// console.log(reportStatus, results, results.length, results[results.length - 1], 'reportStatus');
let resultFlag = results.some((item) => item);
showNextModal(); showNextModal();
resolve(results[results.length - 1]); console.log(resultFlag, "resultFlag");
resolve(resultFlag);
}); });
}); });
}; };
...@@ -137,7 +142,40 @@ const equityStaffDailyReport = (userInfo) => { ...@@ -137,7 +142,40 @@ const equityStaffDailyReport = (userInfo) => {
} else { } else {
resolve(false); resolve(false);
} }
})
.catch((err) => {
resolve(false);
});
});
};
const clockedIntoWork = (userInfo) => {
return new Promise((resolve, reject) => {
api
.clockInConfigPhone({})
.then((res) => {
let { need, clockIn } = res.data;
// console.log(res, need == 0 && clockIn == 0, "clockInConfigPhone");
// 已配置未打卡
if (need == 1 && clockIn == 0) {
// 有配置并且没有打卡就提示
addModalToQueue(
"打卡提醒",
"您当前企微未打卡,无法录单,请前往企微打卡后再试,如有异议请联系管理员。",
"知道了",
false,
4,
(res) => {
if (res.confirm) {
// wx.$router.go("tabWorkOrder.staffDaily", {
// // reportDate: formattedDate,
// });
}
}
);
resolve(true);
} else {
resolve(false);
}
}) })
.catch((err) => { .catch((err) => {
resolve(false); resolve(false);
......
...@@ -114,7 +114,7 @@ Page({ ...@@ -114,7 +114,7 @@ Page({
} }
} else { } else {
if (!successDate && !isErrorOrder && selectPayType != 0) if (!successDate && !isErrorOrder && selectPayType != 0)
return wx.$util.showToast("请选择门店付款时间"); return wx.$util.showToast(selectPayType == 5 ? "请选择嘀加收款时间" : "请选择门店收款时间");
this.setData({ this.setData({
showPopup: true, showPopup: true,
}); });
...@@ -132,7 +132,7 @@ Page({ ...@@ -132,7 +132,7 @@ Page({
orderCode, orderCode,
payType: selectPayType, payType: selectPayType,
}; };
if (selectPayType == 2 && !isErrorOrder) { if ((selectPayType == 2 || selectPayType == 5) && !isErrorOrder) {
obj.successDate = new Date(successDate).format("yyyy-MM-dd hh:mm:ss"); obj.successDate = new Date(successDate).format("yyyy-MM-dd hh:mm:ss");
} }
if (payVoucherList?.length && outTradeNo) { if (payVoucherList?.length && outTradeNo) {
...@@ -312,8 +312,7 @@ Page({ ...@@ -312,8 +312,7 @@ Page({
data.customerCoupon.customerCouponCode.split("-")[0]; data.customerCoupon.customerCouponCode.split("-")[0];
} }
if (data.customer.carSeriesName) { if (data.customer.carSeriesName) {
data.carType = `${data.customer.carBrand || ""}-${ data.carType = `${data.customer.carBrand || ""}-${data.customer.carChildsBrandName || ""
data.customer.carChildsBrandName || ""
}-${data.customer.carSeriesName || ""}`; }-${data.customer.carSeriesName || ""}`;
} }
this.setData({ this.setData({
...@@ -343,7 +342,7 @@ Page({ ...@@ -343,7 +342,7 @@ Page({
// this.isArtificer(data) // this.isArtificer(data)
// } // }
// 是门店收款并且不是错误订单 自动打开门店收款弹窗 // 是门店收款并且不是错误订单 自动打开门店收款弹窗
if (!isErrorOrder && data.selectPayType == 2) { if (!isErrorOrder && (data.selectPayType == 2 || data.selectPayType == 5)) {
this.toshowDateModal(); this.toshowDateModal();
} }
// 获取园区店技师配置信息 // 获取园区店技师配置信息
...@@ -412,7 +411,7 @@ Page({ ...@@ -412,7 +411,7 @@ Page({
}); });
} }
}); });
} catch (err) {} } catch (err) { }
}, },
isArtificer(data) { isArtificer(data) {
let { customerObj, orderInfo } = this.data; let { customerObj, orderInfo } = this.data;
...@@ -496,17 +495,17 @@ Page({ ...@@ -496,17 +495,17 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () {}, onShow: function () { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
...@@ -519,17 +518,17 @@ Page({ ...@@ -519,17 +518,17 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
// 返回 // 返回
goBack: function () { goBack: function () {
......
...@@ -3,6 +3,5 @@ ...@@ -3,6 +3,5 @@
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup", "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"date-select":"/components/DateSelect/dateSelect" "date-select":"/components/DateSelect/dateSelect"
} }
} }
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<view class="main {{isFullSucreen&&!userInfo.isSuper && userInfo.userType == 2?'isFullSucreen':''}}"> <view class="main {{isFullSucreen&&!userInfo.isSuper && userInfo.userType == 2?'isFullSucreenCom':''}}">
<view class="status-box"> <view class="status-box">
<block wx:if="{{orderInfo.selectPayType == 3 || orderInfo.selectPayType == 1 }}"> <block wx:if="{{orderInfo.selectPayType == 3 || orderInfo.selectPayType == 1 }}">
<view class="content">等待客户付款</view> <view class="content">等待客户付款</view>
<view class="tips">点击下一步,锁定并生成工单码。</view> <view class="tips">点击下一步,锁定并生成工单码。</view>
</block> </block>
<block wx:if="{{orderInfo.selectPayType == 2 }}"> <block wx:if="{{orderInfo.selectPayType == 2 ||orderInfo.selectPayType == 5}}">
<view class="content">请上传付款凭证结束工单</view> <view class="content">请上传付款凭证结束工单</view>
<view class="tips">点击确认工单,提交付款凭证。</view> <view class="tips">点击确认工单,提交付款凭证。</view>
</block> </block>
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
<view class="tips">点击确认工单,根据操作结束工单。</view> <view class="tips">点击确认工单,根据操作结束工单。</view>
</block> </block>
</view> </view>
<view wx:if="{{!isErrorOrder&&orderInfo.selectPayType==2}}" class="box date-box"> <view wx:if="{{!isErrorOrder&&(orderInfo.selectPayType == 2 ||orderInfo.selectPayType==5)}}" class="box date-box">
<view class="date-box-label">收款时间<text class='required'>*</text></view> <view class="date-box-label">收款时间<text class='required'>*</text></view>
<view class="date-box-value">{{successDate || '请选择门店收款时间'}}</view> <view class="date-box-value">{{successDate || (orderInfo.selectPayType == 2?'请选择门店收款时间':'请选择嘀加收款时间')}}</view>
<view class="handlerBtn" bind:tap="toshowDateModal">编辑</view> <view class="handlerBtn" bind:tap="toshowDateModal">编辑</view>
</view> </view>
<view class="box"> <view class="box">
...@@ -216,4 +216,4 @@ ...@@ -216,4 +216,4 @@
<!-- orderInfo.selectPayType showPopup --> <!-- orderInfo.selectPayType showPopup -->
<order-popup orderType="{{orderInfo.selectPayType }}" wx:if="{{showPopup}}" show="{{showPopup}}" qrCode="{{orderInfo.payOrder.outTradeNo || ''}}" price="{{orderInfo.total_price}}" orderCode="{{orderInfo.orderCode}}" /> <order-popup orderType="{{orderInfo.selectPayType }}" wx:if="{{showPopup}}" show="{{showPopup}}" qrCode="{{orderInfo.payOrder.outTradeNo || ''}}" price="{{orderInfo.total_price}}" orderCode="{{orderInfo.orderCode}}" />
<artificer-select-popup show="{{artificerSelectPopup}}" title="选择技师" copyArtificerList="{{artificerList}}" orderInfo="{{orderInfo}}" artificerSelectObj="{{artificerSelectObj}}" bindconfirm="changeArtificer" /> <artificer-select-popup show="{{artificerSelectPopup}}" title="选择技师" copyArtificerList="{{artificerList}}" orderInfo="{{orderInfo}}" artificerSelectObj="{{artificerSelectObj}}" bindconfirm="changeArtificer" />
<date-select show="{{showDateSelect}}" bind:confirm="getSelectDate"></date-select>
\ No newline at end of file \ No newline at end of file
<date-select selectPay="{{orderInfo.selectPayType}}" show="{{showDateSelect}}" bind:confirm="getSelectDate"></date-select>
\ No newline at end of file \ No newline at end of file
...@@ -26,18 +26,22 @@ ...@@ -26,18 +26,22 @@
.pay_value .wxpay{ .pay_value .wxpay {
display: inline-block; display: inline-block;
width: var(--fontSize48); width: var(--fontSize48);
height: var(--fontSize48); height: var(--fontSize48);
margin-right: var(--fontSize12); margin-right: var(--fontSize12);
} }
.payTips { .payTips {
color: #999;margin-left: var(--fontSize20); color: #999;
margin-left: var(--fontSize20);
} }
.tips-btn{
.tips-btn {
flex-direction: column; flex-direction: column;
} }
.btn-box .tips { .btn-box .tips {
box-sizing: border-box; box-sizing: border-box;
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
...@@ -47,6 +51,7 @@ margin-right: var(--fontSize12); ...@@ -47,6 +51,7 @@ margin-right: var(--fontSize12);
.placeholder { .placeholder {
color: #C3C3C3; color: #C3C3C3;
} }
.arrow { .arrow {
position: absolute; position: absolute;
right: var(--fontSize40); right: var(--fontSize40);
...@@ -55,27 +60,32 @@ margin-right: var(--fontSize12); ...@@ -55,27 +60,32 @@ margin-right: var(--fontSize12);
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize26); height: var(--fontSize26);
} }
.date-box{
.date-box {
display: flex; display: flex;
align-items: center; align-items: center;
padding: var(--fontSize40); padding: var(--fontSize40);
position: relative; position: relative;
} }
.date-box-label{
.date-box-label {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #999EA8; color: #999EA8;
margin-right: var(--fontSize40); margin-right: var(--fontSize40);
} }
.date-box-value{
.date-box-value {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #292D33; color: #292D33;
} }
.required { .required {
color: #f00; color: #f00;
} }
.handlerBtn{
.handlerBtn {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #347BFF; color: #347BFF;
...@@ -148,7 +158,7 @@ margin-right: var(--fontSize12); ...@@ -148,7 +158,7 @@ margin-right: var(--fontSize12);
.meal-bd-head .price { .meal-bd-head .price {
font-family: "numberNor"; font-family: "numberNor";
margin-left:auto; margin-left: auto;
} }
.meal-bd-bottom { .meal-bd-bottom {
...@@ -157,9 +167,17 @@ margin-right: var(--fontSize12); ...@@ -157,9 +167,17 @@ margin-right: var(--fontSize12);
font-weight: 400; font-weight: 400;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #757980; color: #757980;
margin-left:var(--fontSize24); margin-left: var(--fontSize24);
} }
.meal-bd-bottom .count { .meal-bd-bottom .count {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.isFullSucreenCom {
padding-bottom: var(--fontSize228) !important;
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68) !important;
}
\ No newline at end of file \ No newline at end of file
...@@ -763,7 +763,7 @@ Page({ ...@@ -763,7 +763,7 @@ Page({
.then((result) => { .then((result) => {
let { code, data: url, message } = result; let { code, data: url, message } = result;
console.log(url); console.log(url);
if (code == 0) { if (code == 0 && url) {
this.setData({ this.setData({
customerService: url, customerService: url,
}); });
......
...@@ -49,10 +49,10 @@ Page({ ...@@ -49,10 +49,10 @@ Page({
name: "POS机", name: "POS机",
value: 3, value: 3,
}, },
// { {
// name: '战败', name: '嘀加收款',
// value: 0 value: 5
// }, },
{ {
name: "微信支付", name: "微信支付",
value: 1, value: 1,
...@@ -174,9 +174,19 @@ Page({ ...@@ -174,9 +174,19 @@ Page({
}, },
chooseCustomerInfo(e) { chooseCustomerInfo(e) {
let { detail } = e; let { detail } = e;
let { outTradeNo } = this.data let { outTradeNo, showPayList, orderObj: { associateOrderType, associateOrderCode } } = this.data
detail.outTradeNo = outTradeNo detail.outTradeNo = outTradeNo
console.log(detail, 'detail'); console.log(detail, 'detail');
// 解决补录订单 这两个参数丢失问题
if (associateOrderType || associateOrderCode) {
detail.associateOrderType = associateOrderType
detail.associateOrderCode = associateOrderCode
}
// detail.selectPayType = 3
// 判断一下档案支付方式现在是否还在,在就替换,没有就去掉这个参数
if (!showPayList.some(item => { item.value == detail.selectPayType })) {
delete detail.selectPayType
}
this.onRoute(detail); this.onRoute(detail);
}, },
closeTips() { closeTips() {
...@@ -525,6 +535,11 @@ Page({ ...@@ -525,6 +535,11 @@ Page({
"packageGoodsList", "packageGoodsList",
"expenseCategoryList", "expenseCategoryList",
"merchantDistributionList", "merchantDistributionList",
"orderTime",
"createdBy",
"createdDate",
"updatedBy",
"updatedDate"
]; ];
for (const prop of propertiesToDelete) { for (const prop of propertiesToDelete) {
......
...@@ -155,11 +155,15 @@ page { ...@@ -155,11 +155,15 @@ page {
.payType-box { .payType-box {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; // flex-wrap: wrap;
padding-top: var(--fontSize20); padding-top: var(--fontSize20);
/* justify-content: space-between; */ /* justify-content: space-between; */
} }
.error-box {
flex-wrap: wrap;
}
.payType-box .item { .payType-box .item {
white-space: nowrap; white-space: nowrap;
margin-right: 4px; margin-right: 4px;
......
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<block wx:if="{{ flag }}"> <block wx:if="{{ flag }}">
<!-- {{ isFullSucreen?'isFullSucreen':''}} --> <!-- {{ isFullSucreen?'isFullSucreen':''}} -->
<view class="main {{tipsProps.showTips?'fullSucreen-tips':'' }} {{showTips? 'showTips':''}}"> <view class="main {{ tipsProps.showTips?'fullSucreen-tips':'' }} {{showTips? 'showTips':'' }}">
<view class="box"> <view class="box">
<view class="userId"> <view class="userId">
<gl-cell border valueAlign="right" label="销售顾问" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" data-show-name="selesBox" placeholder="点击选择" disabled="{{ orderObj.orderSource == 5 }}"> <gl-cell border valueAlign="right" label="销售顾问" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" data-show-name="selesBox" placeholder="点击选择" disabled="{{ orderObj.orderSource == 5 }}">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<text class="required">*</text> <text class="required">*</text>
</view> </view>
<block wx:if="{{ frontGearArr.length }}"> <block wx:if="{{ frontGearArr.length }}">
<gl-cell border valueAlign="right" label="前挡" logoSrc="{{windshield}}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="1" /> <gl-cell border valueAlign="right" label="前挡" logoSrc="{{ windshield }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="1" />
<block wx:if="{{ goodsList.length > 0 }}"> <block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</block> </block>
</block> </block>
<block wx:if="{{ sideRearGearArr.length }}"> <block wx:if="{{ sideRearGearArr.length }}">
<gl-cell border valueAlign="right" label="侧后挡" logoSrc="{{tricorn}}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" /> <gl-cell border valueAlign="right" label="侧后挡" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" />
<block wx:if="{{ goodsList.length > 0 }}"> <block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
</block> </block>
</block> </block>
<block wx:if="{{ skylightArr.length }}"> <block wx:if="{{ skylightArr.length }}">
<gl-cell border valueAlign="right" label="天窗" logoSrc="{{skylight}}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="3" /> <gl-cell border valueAlign="right" label="天窗" logoSrc="{{ skylight }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="3" />
<block wx:if="{{ goodsList.length > 0 }}"> <block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ g.price }}" class="{{ g.errorTarget? 'error':''}}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed /> <input type="digit" value="{{ g.price }}" class="{{ g.errorTarget? 'error':'' }}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -293,20 +293,14 @@ ...@@ -293,20 +293,14 @@
<gl-cell border label="支付方式" valueAlign="right" wx:if="{{ orderCreateType != 'additionRecordOrder'&& !associateOrderType && !isErrorOrder && orderObj.selectPayType != 0 }}" labelWidth="var(--fontSize152)"> <gl-cell border label="支付方式" valueAlign="right" wx:if="{{ orderCreateType != 'additionRecordOrder'&& !associateOrderType && !isErrorOrder && orderObj.selectPayType != 0 }}" labelWidth="var(--fontSize152)">
<view class="payType-box"> <view class="payType-box">
<block wx:for="{{ showPayList }}" wx:key="index"> <block wx:for="{{ showPayList }}" wx:key="index">
<view class="item text-center {{ orderObj.selectPayType == item.value?'active':''}} {{goodsList.length > 0 && item.value == 0?'disabled':'' }}" bindtap="changePayType" data-item="{{ item }}" data-index="{{ index }}"> <view class="item text-center {{ orderObj.selectPayType == item.value?'active':''}} {{goodsList.length > 0 && item.value == 0?'disabled':'' }}" bindtap="changePayType" data-item="{{ item }}" data-index="{{ index }}">{{item.name}}</view>
{{item.name}}
<!-- <view class="active-icon">
<image src="../../images/active.png" />
</view> -->
</view>
</block> </block>
</view> </view>
</gl-cell> </gl-cell>
<!-- 错误订单补录 --> <!-- 错误订单补录 -->
<gl-cell border label="支付方式" valueAlign="right" labelStyle="margin-top:-40px" wx:if="{{ isErrorOrder }}" cellHeight="{{ false }}" labelWidth="var(--fontSize152)"> <gl-cell border label="支付方式" valueAlign="right" labelStyle="margin-top:-40px" wx:if="{{ isErrorOrder }}" cellHeight="{{ false }}" labelWidth="var(--fontSize152)">
<view class="payType-box"> <view class="payType-box error-box">
<block wx:for="{{ payTypeList }}" wx:key="index"> <block wx:for="{{ showPayList }}" wx:key="index">
<!-- bindtap="changePayType" -->
<view class="item text-center {{ item.value==2?'active':''}} {{item.value != 2?'disabled':'' }}" data-item="{{ item }}" data-index="{{ index }}"> <view class="item text-center {{ item.value==2?'active':''}} {{item.value != 2?'disabled':'' }}" data-item="{{ item }}" data-index="{{ index }}">
<image class="wxPayIcon" src="{{ item.imgurl }}" wx:if="{{ item.imgurl }}" /> <image class="wxPayIcon" src="{{ item.imgurl }}" wx:if="{{ item.imgurl }}" />
{{item.name}} {{item.name}}
...@@ -317,7 +311,6 @@ ...@@ -317,7 +311,6 @@
</block> </block>
</view> </view>
</gl-cell> </gl-cell>
</view> </view>
<view class="box"> <view class="box">
<!-- <gl-cell wx:if="{{orderObj.selectPayType==2}}" value="{{successDateTime}}" bind:click="toSelectDate" haveArrow placeholder="请选择时间" required requiredAfter border class="pay-type" label="门店收款时间" valueAlign="right" labelWidth="var(--fontSize200)"> <!-- <gl-cell wx:if="{{orderObj.selectPayType==2}}" value="{{successDateTime}}" bind:click="toSelectDate" haveArrow placeholder="请选择时间" required requiredAfter border class="pay-type" label="门店收款时间" valueAlign="right" labelWidth="var(--fontSize200)">
...@@ -333,14 +326,14 @@ ...@@ -333,14 +326,14 @@
</view> </view>
</view> </view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="tipsadd" wx:if="{{showTips}}"> <view class="tipsadd" wx:if="{{ showTips }}">
<image wx:if="{{!tradeNo}}" class=" tipsIcon" src="../../../images/tips.png" /> <image wx:if="{{ !tradeNo }}" class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText"> <view class="contentText">
<view>交易参考号:{{tradeNo}}</view> <view>交易参考号:{{tradeNo}}</view>
<view>支付时间:{{accountDate}}</view> <view>支付时间:{{accountDate}}</view>
<view class="tipsbox"> <view class="tipsbox">
<view>支付金额:{{totalFee/100}}</view> <view>支付金额:{{totalFee/100}}</view>
<view class="btn" wx:if="{{tradeNo}}" bindtap="tipsEvent">补录订单</view> <view class="btn" wx:if="{{ tradeNo }}" bindtap="tipsEvent">补录订单</view>
</view> </view>
</view> </view>
<!-- <image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" /> --> <!-- <image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" /> -->
...@@ -352,10 +345,10 @@ ...@@ -352,10 +345,10 @@
</view> </view>
</block> </block>
<!-- &&!outTradeNo --> <!-- &&!outTradeNo -->
<view class="waitOrderCon {{showTips? 'showTips':''}}" wx:if="{{ waitInputCount && !associateOrderType && !isErrorOrder&&!outTradeNo }}"> <view class="waitOrderCon {{ showTips? 'showTips':'' }}" wx:if="{{ waitInputCount && !associateOrderType && !isErrorOrder&&!outTradeNo }}">
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view> </view>
<recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{ showOrderpop && !(isErrorOrder) }}" outTradeNo="{{ outTradeNo }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1" /> <merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" /> <merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" />
<sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" /> <sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" />
...@@ -367,4 +360,4 @@ ...@@ -367,4 +360,4 @@
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource"> <van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" /> <van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
</van-popup> </van-popup>
<set-meal wx:if="{{packageBox}}" show="{{ packageBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{ true }}" baseConfigData="{{ baseConfigData }}" />
\ No newline at end of file \ No newline at end of file
<set-meal wx:if="{{ packageBox }}" show="{{ packageBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{ true }}" baseConfigData="{{ baseConfigData }}" />
\ No newline at end of file \ No newline at end of file
...@@ -23,7 +23,7 @@ page { ...@@ -23,7 +23,7 @@ page {
} }
.main { .main {
padding-bottom: var(--fontSize160); padding-bottom: var(--fontSize160) !important;
} }
.status-box { .status-box {
...@@ -616,6 +616,7 @@ page { ...@@ -616,6 +616,7 @@ page {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.meal-box { .meal-box {
background: #F7F8FA; background: #F7F8FA;
border: var(--fontSize1) solid #EFF0F2; border: var(--fontSize1) solid #EFF0F2;
...@@ -679,7 +680,7 @@ page { ...@@ -679,7 +680,7 @@ page {
.meal-bd-head .price { .meal-bd-head .price {
font-family: "numberNor"; font-family: "numberNor";
margin-left:auto; margin-left: auto;
} }
.meal-bd-bottom { .meal-bd-bottom {
...@@ -688,7 +689,7 @@ page { ...@@ -688,7 +689,7 @@ page {
font-weight: 400; font-weight: 400;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #757980; color: #757980;
margin-left:var(--fontSize24); margin-left: var(--fontSize24);
} }
.meal-bd-bottom .count { .meal-bd-bottom .count {
......
...@@ -23,6 +23,7 @@ export const STORAGE_OBJECTkEY = { ...@@ -23,6 +23,7 @@ export const STORAGE_OBJECTkEY = {
crowdFundingParams: 'crowdFundingParams', crowdFundingParams: 'crowdFundingParams',
dateStaffPop: 'dateStaffPop', dateStaffPop: 'dateStaffPop',
mock_data: 'mock_data', mock_data: 'mock_data',
recordList:'recordList'
} }
// export const IMG_VERSION = () => { // export const IMG_VERSION = () => {
......
import { envIndex } from "~/config"; import {
envIndex
} from "~/config";
// console.log(envIndex, 'envIndex') // console.log(envIndex, 'envIndex')
...@@ -108,5 +110,6 @@ module.exports = { ...@@ -108,5 +110,6 @@ module.exports = {
dj: secretKey_items[target[envIndex]], dj: secretKey_items[target[envIndex]],
scrm: scrmSecretKey_items[target[envIndex]], scrm: scrmSecretKey_items[target[envIndex]],
merchants: scrmSecretKey_items[target[envIndex]], merchants: scrmSecretKey_items[target[envIndex]],
clue: scrmSecretKey_items[target[envIndex]]
}, },
}; };
\ No newline at end of file \ No newline at end of file
/**
*/
import api from "~/utils/request/request.js"
// 实例化对象存储
import {
Storage
} from "~/utils/cache/storage";
const $Storage = new Storage()
let TRACK_TIME = null
const track_interval_time = 30 * 1e3,
filterFun = ['data', 'onLoad', 'onShow', 'onReady', 'onHide', 'onUnload', 'onPullDownRefresh', 'onReachBottom', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap']
class TRACK {
constructor() {
console.log('---------------- 埋点初始化 ----------------')
this.initPageProxy()
this.sendTrack()
this.appHide()
}
/**监听页面 */
pageLeaveProxy(thisPage) {
let _this = this,
onHide = thisPage.onHide,
onUnload = thisPage.onUnload,
onLoad = thisPage.onLoad,
onShow = thisPage.onShow,
onTabItemTap = thisPage.onTabItemTap,
keys = [],
fun = JSON.parse(JSON.stringify(Object.keys(thisPage)))
const filtered = filterFun.filter(e => !keys.includes(e))
keys.push(...fun.filter(e => !filtered.includes(e)))
fun = fun.filter(e => filtered.includes(e))
keys.map(key => {
if (typeof thisPage[key] === 'function') {
const FUN = thisPage[key]
thisPage[key] = function (event) {
if (event && event.type == 'tap') {
let {
eventCode,
track
} = event.currentTarget.dataset
if (eventCode) _this.setTrackData(0, eventCode, track)
}
return FUN.apply(this, arguments)
}
}
})
.
thisPage.onTabItemTap = function (options) {
onTabItemTap && onTabItemTap.apply(this, arguments)
// , _this.setTrackData({}, 1)
}
thisPage.onLoad = function () {
onLoad && onLoad.apply(this, arguments)
//, _this.setTrackData({
// enterTime: new Date().format('yyyy-MM-dd hh:mm:ss')
// })
}
thisPage.onShow = function () {
onShow && onShow.apply(this, arguments)
// , (_this.getPageInstance().page_show_time = Date.now())
}
thisPage.onHide = function () {
let {
page_show_time
} = _this.getPageInstance()
onHide && onHide.apply(this, arguments)
// ,_this.setTrackData(
// {
// duration: getDuration(page_show_time)
// },
// 2
// )
}
thisPage.onUnload = function () {
let {
page_show_time
} = _this.getPageInstance()
onUnload && onUnload.apply(this, arguments)
// ,_this.setTrackData(
// {
// duration: getDuration(page_show_time)
// },
// 2
// )
}
const getDuration = page_show_time => (Date.now() - page_show_time) / 1e3
}
/**全局注册事件 */
initPageProxy() {
let thisPage = Page
let _this = this
Page = function (el) {
try {
el || (el = {}), _this.pageLeaveProxy(el), thisPage.apply(this, arguments)
} catch (el) {
thisPage.apply(this, arguments)
}
}
}
appShow() {
wx.onAppShow(() => {
if (TRACK_TIME) clearInterval(TRACK_TIME)
this.sendTrack()
wx.offAppShow()
this.appHide()
console.log('---------------- 重新打开埋点 ----------------')
})
}
appHide() {
wx.onAppHide(() => {
if (TRACK_TIME) clearInterval(TRACK_TIME)
wx.offAppHide()
this.appShow()
console.log('---------------- APP隐藏 埋点停止推送 ----------------')
})
}
/**设置埋点数据
* eventType:动作类型枚举 0点击 1滚动 2浏览
* eventCode:事件别名枚举
* businessParam:业务参数
* batchId 浏览批次id,当浏览-进入事件发生时,必填
*/
setTrackData(eventType, eventCode = '', businessParam = '', batchId) {
let recordList = $Storage.get('recordList'),
{
route
} = this.getPageInstance(),
prePagePath = this.getPageInstance(2),
{
accountName,
uuid,
userType
} = wx.$util.getUserInfo(),
item = {
loginAccount: accountName,
uuid,
userType,
systemSource: 0,
eventTime: new Date().format('yyyy-MM-dd hh:mm:ss'),
eventType,
prePagePath: prePagePath ? prePagePath.route : '/',
pagePath: route
}
// console.log(new Date().format('yyyy-MM-dd hh:mm:ss'),'当前页:',route,'=========')
if (batchId) item.batchId = batchId
if (eventCode) item.eventCode = eventCode
if (businessParam) item.businessParam = JSON.stringify(businessParam)
if (!recordList) recordList = [item]
else recordList.push(item)
$Storage.set('recordList', recordList)
if (recordList.length > 9) this.sendData() //10条
}
getGuestNo() {
let guest_no = $Storage.get('guest_no')
if (!guest_no) {
guest_no = this.setRandomId()
$Storage.set('guest_no', guest_no)
}
return guest_no
}
/**定时发送埋点数据 */
sendTrack() {
TRACK_TIME = setInterval(() => {
this.sendData()
}, track_interval_time)
}
/**调取API */
sendData() {
let recordList = $Storage.get('recordList')
if (recordList && recordList.length)
api.post(
'clue.api.burial.point.record.batch.insert', {
recordList
},
[],
'/rop-scrm-clue/router',
"scrm",
false
).then(({
code,
data,
message
}) => {
if (code == 0 && data) {
$Storage.set('recordList', [])
console.log('---------------- 埋点定时推送成功 ----------------', new Date().format('yyyy-MM-dd hh:mm:ss'), ':', recordList)
} else console.log('---------------- 埋点定时推送失败 ----------------', new Date().format('yyyy-MM-dd hh:mm:ss'), ':', message)
})
}
/**获取页面对象实例 */
getPageInstance = (size = 1) => {
const pages = getCurrentPages()
return pages[pages.length - size]
}
/**获取页面标题 */
getPageTitle() {
let {
route,
navigationBarTitleText
} = this.getPageInstance()
if ('\u672a\u53d6\u5230' === route || !route) return ''
let title = ''
if (__wxConfig) {
let {
window
} = __wxConfig.page[`${route}.html`]
title = window.navigationStyle == 'custom' ? navigationBarTitleText : window.navigationBarTitleText
}
if (!title) title = '生意助手员工版'
return title
}
/**获取设备信息 */
getSystemInfo() {
let {
SDKVersion,
brand,
model,
system,
version
} = $Storage.get('system_info')
return {
SDK_version: SDKVersion,
brand,
model,
system,
version
}
}
/**获取门店信息 */
getMerchantInfo() {
let {
merchantId
} = $Storage.get('merchant_info')
return {
merchant_id: merchantId
}
}
/**设置随机ID */
setRandomId(prefix = 'DJ', length = 30) {
let name = '',
n = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
for (let i = 0; i < Number(length); i++) {
name += n[Math.round(Math.random() * (n.length - 1))]
}
return `${prefix}_${name}_${Date.now()}`
}
}
export default TRACK
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!