Commit a99b50db by 前端

Merge branch 'SAAS+V5.6.4' into 'master'

上线合并

See merge request !16
2 parents 0a7345f7 b8973676
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
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;
......
...@@ -11,24 +11,27 @@ ...@@ -11,24 +11,27 @@
<text class="name">{{ item.upgradeGoodsName }}</text> <text class="name">{{ item.upgradeGoodsName }}</text>
</view> </view>
<view class="gray pl-24"> <view class="gray pl-24">
<text>原价¥{{ item.totalPrice }}</text> <text style="margin-bottom: 4rpx;margin-right: 12rpx;">商品单价¥{{ item.upgradePrice }}</text>
<text wx:if="{{ item.discountType && item.discountType != 3 && item.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ item.discountType == 1 || item.discountType == 2 }}">
<text wx:if="{{ item.discountType == 1 }}">{{ item.discountValue }}折</text>
<text wx:else>折扣¥{{ item.discountValue }}</text>
</block>
<block wx:if="{{ item.discountType == 4 }}"> <block wx:if="{{ item.discountType == 4 }}">
<text class="tag">赠品</text> <text class="tag">赠品</text>
</block> </block>
</view> </view>
</view> </view>
<view class="item-right"> <view class="item-right">
<view class="price">¥{{ item.finalPrice }}</view> <view class="price">¥{{ item.singleProductFinalPrice }}</view>
<view class="gray"> <view class="gray">
共<text class="split">{{ item.number }}</text>件 共<text class="split">{{ item.number }}</text>件
</view> </view>
</view> </view>
</view> </view>
<view class="gray pl-24">
<text>商品销售单价¥{{ item.singleProductSalesPrice }}</text>
<text wx:if="{{ item.discountType && (item.discountType == 1 || item.discountType == 2) }}" class="split">|</text>
<block wx:if="{{ item.discountType == 1 || item.discountType == 2 }}">
<text wx:if="{{ item.discountType == 1 }}">{{ item.discountValue }}折</text>
<text wx:else>折扣¥{{ item.discountValue }}</text>
</block>
</view>
</view> </view>
<!-- 套餐商品 --> <!-- 套餐商品 -->
...@@ -48,31 +51,36 @@ ...@@ -48,31 +51,36 @@
wx:for-item="subItem" wx:for-item="subItem"
wx:for-index="subIndex" wx:for-index="subIndex"
wx:key="subIndex" wx:key="subIndex"
class="list-item flex just-space flex-start" class="list-item"
> >
<view class="flex just-space flex-start">
<view class="item-left"> <view class="item-left">
<view class="flex flex-start pl-24"> <view class="flex flex-start pl-24">
<text class="name">{{ subItem.upgradeGoodsName }}</text> <text class="name">{{ subItem.upgradeGoodsName }}</text>
</view> </view>
<view class="gray pl-24"> <view class="gray pl-24">
<text>原价¥{{ subItem.totalPrice }}</text> <text style="margin-bottom: 4rpx;margin-right: 12rpx;">商品单价¥{{ subItem.upgradePrice }}</text>
<text wx:if="{{ subItem.discountType && subItem.discountType != 3 && subItem.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ subItem.discountType == 1 || subItem.discountType == 2 }}">
<text wx:if="{{ subItem.discountType == 1 }}">{{ subItem.discountValue }}折</text>
<text wx:else>折扣¥{{ subItem.discountValue }}</text>
</block>
<block wx:if="{{ subItem.discountType == 4 }}"> <block wx:if="{{ subItem.discountType == 4 }}">
<text class="tag">赠品</text> <text class="tag">赠品</text>
</block> </block>
</view> </view>
</view> </view>
<view class="item-right"> <view class="item-right">
<view class="price">¥{{ subItem.finalPrice }}</view> <view class="price">¥{{ subItem.singleProductFinalPrice }}</view>
<view class="gray"> <view class="gray">
共<text class="split">{{ subItem.number }}</text>件 共<text class="split">{{ subItem.number }}</text>件
</view> </view>
</view> </view>
</view> </view>
<view class="gray pl-24">
<text>商品销售单价¥{{ subItem.singleProductSalesPrice }}</text>
<text wx:if="{{ subItem.discountType && (subItem.discountType == 1 || subItem.discountType == 2) }}" class="split">|</text>
<block wx:if="{{ subItem.discountType == 1 || subItem.discountType == 2 }}">
<text wx:if="{{ subItem.discountType == 1 }}">{{ subItem.discountValue }}折</text>
<text wx:else>折扣¥{{ subItem.discountValue }}</text>
</block>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -56,6 +56,12 @@ Page({ ...@@ -56,6 +56,12 @@ Page({
image: true, image: true,
flexStart: true flexStart: true
}], }],
statusForShow: {
1: { text: '区域运营审核' },
2: { text: '线上运营审核', status: '通过' },
3: { status: '通过' },
4: { status: '驳回' }
}
}, },
/** /**
...@@ -126,6 +132,10 @@ Page({ ...@@ -126,6 +132,10 @@ Page({
if (code == 0) { if (code == 0) {
// 处理商品信息 // 处理商品信息
const processedData = this.processOrderData(res.data || {}) const processedData = this.processOrderData(res.data || {})
// 处理审核日志时间字段
res.data?.applyLogList?.forEach(val => {
val.createdDateStr = val.createdDate ? dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
})
this.setData({ this.setData({
orderInfo: processedData, orderInfo: processedData,
'orderInfo.applyDate': res.data.applyDate ? dayjs(res.data.applyDate).format('YYYY-MM-DD HH:mm:ss') : '-' 'orderInfo.applyDate': res.data.applyDate ? dayjs(res.data.applyDate).format('YYYY-MM-DD HH:mm:ss') : '-'
......
...@@ -87,6 +87,98 @@ page { ...@@ -87,6 +87,98 @@ page {
overflow: hidden; overflow: hidden;
} }
} }
.timeline {
.timeline-item {
display: flex;
position: relative;
overflow: visible;
.timeline-left {
width: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 10rpx;
position: relative;
flex-shrink: 0;
align-self: stretch;
.dot-wrapper {
width: 100%;
height: 44rpx;
display: flex;
align-items: center;
justify-content: center;
}
.dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background: #E5E5E5;
z-index: 2;
box-sizing: border-box;
}
.step-active {
background: #FFFFFF;
border: 4rpx solid #D6E4FF;
width: 28rpx;
height: 28rpx;
position: relative;
}
.step-active::after {
content: '';
position: absolute;
width: 10rpx;
height: 10rpx;
background: #FFFFFF;
border-radius: 50%;
border: 4rpx solid #347BFF;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.step-done {
background: #8EB2FB;
}
.statusLine {
position: absolute;
top: 38rpx;
bottom: -10rpx;
left: 50%;
transform: translateX(-50%);
width: 2rpx;
background: #D8E5FE;
z-index: 1;
}
}
.timeline-content {
font-size: 28rpx;
color: #333333;
.status-text {
margin-bottom: 16rpx;
font-weight: 600;
.mar-r16{
margin-right: 16rpx;
}
.success {
color: #35C376;
}
.error {
color: #F24724;
}
}
.flex {
display: flex;
align-items: flex-start;
margin-bottom: 16rpx;
.label {
width: 168rpx;
flex-shrink: 0;
color: #999999;
margin-right: 16rpx;
}
}
}
}
}
} }
} }
.empty-box { .empty-box {
......
...@@ -46,6 +46,43 @@ ...@@ -46,6 +46,43 @@
title="{{orderInfo.oldOrderCode ? '新订单商品信息' : '商品信息'}}" title="{{orderInfo.oldOrderCode ? '新订单商品信息' : '商品信息'}}"
goodsData="{{orderInfo.goodsOrderDTO}}" goodsData="{{orderInfo.goodsOrderDTO}}"
/> />
<view class="section" wx:if="{{orderInfo.status != 1}}">
<view class="section-title">审核日志</view>
<view class="log-box" wx:for="{{orderInfo.applyLogList}}" wx:key="index">
<view class="timeline">
<view class="timeline-item">
<view class="timeline-left">
<view class="dot-wrapper">
<view class="dot {{ index == 0 ? 'step-active' : 'step-done' }}"></view>
</view>
<view wx:if="{{orderInfo.applyLogList.length > 1 && index != (orderInfo.applyLogList.length - 1)}}" class="statusLine step-done"></view>
</view>
<view class="timeline-content">
<view class="status-text">
<text class='mar-r16'>{{statusForShow[item.beforeStatus].text}}</text>
<text class="status mar-r16 {{ item.afterStatus == 2 || item.afterStatus == 3 ? 'success' : 'error' }}">{{statusForShow[item.afterStatus].status}}</text>
<block wx:if="{{item.afterStatus == 4}}">
<text class="mar-r16">至</text>
<text>驻店销售</text>
</block>
</view>
<view class="flex" wx:if="{{item.remark}}">
<view class="label">{{item.afterStatus == 2 || item.afterStatus == 3 ? '备注' : '驳回原因'}}</view>
<view class="value">{{item.remark}}</view>
</view>
<view class="flex">
<view class="label">审核人</view>
<view class="value">{{item.operatorName}}</view>
</view>
<view class="flex">
<view class="label">审核时间</view>
<view class="value">{{item.createdDateStr}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="empty-box"></view> <view class="empty-box"></view>
</view> </view>
<view wx:if="{{orderInfo.status == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view wx:if="{{orderInfo.status == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
......
...@@ -6,18 +6,23 @@ import { reportFirstAutoObj } from "./reportFirstAuto"; ...@@ -6,18 +6,23 @@ import { reportFirstAutoObj } from "./reportFirstAuto";
import fn from "~/components/GLCustForm/ruleFn"; import fn from "~/components/GLCustForm/ruleFn";
import api from "../../api"; import api from "../../api";
import apiDefault from "~/api/api"; import apiDefault from "~/api/api";
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
var allRuleObj = {}; var allRuleObj = {};
import { setConfigInfo } from "~/store/index"; import { setConfigInfo } from "~/store/index";
const app = getApp(); const app = getApp();
Page({ Page({
behaviors: [reportPageTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
* selectWeek 0代表的本周 1代表下一周 -1代表上一周 * selectWeek 0代表的本周 1代表下一周 -1代表上一周
* timeBean 传递给组件的数据,数据的格式在一开始的工具类中明确 * timeBean 传递给组件的数据,数据的格式在一开始的工具类中明确
*/ */
data: { data: {
// 埋点信息
track_event_code: '',
scene: '',
IMG_URL, IMG_URL,
imgShow: false, imgShow: false,
isDisable: false, isDisable: false,
...@@ -88,6 +93,7 @@ Page({ ...@@ -88,6 +93,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
const { titleTxtObj } = this.data; const { titleTxtObj } = this.data;
let userInfo = wx.$util.getUserInfo() || {}
if (options.refresh) { if (options.refresh) {
const { routeParams } = this.data; const { routeParams } = this.data;
this.initData(options); this.initData(options);
...@@ -99,7 +105,10 @@ Page({ ...@@ -99,7 +105,10 @@ Page({
tmlpCode: routeParams.code || null, tmlpCode: routeParams.code || null,
reportType: routeParams.reportType || 1, reportType: routeParams.reportType || 1,
title: titleTxtObj[routeParams.reportTypeAttr || "daily"], title: titleTxtObj[routeParams.reportTypeAttr || "daily"],
track_event_code: routeParams.code.replace(/-/g, '_') + '_browse',
scene: userInfo?.sceneType
}); });
this.onPageShow();
this.initData(options); this.initData(options);
}); });
}, },
...@@ -196,6 +205,29 @@ Page({ ...@@ -196,6 +205,29 @@ Page({
} }
}, },
/**
* 生命周期函数--监听页面显示
*/
onShow() {
if(this.data.track_event_code) {
this.onPageShow();
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.onPageHide();
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.onPageHide()
},
async initData(options) { async initData(options) {
const { routeParams } = this.data; const { routeParams } = this.data;
// 获取配置服务数据 // 获取配置服务数据
...@@ -605,18 +637,35 @@ Page({ ...@@ -605,18 +637,35 @@ Page({
//改---------------- //改----------------
const hasDailyValue = const hasDailyValue =
timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false; timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false;
// 新增:如果是本周最后一天(周日,getDay() === 0)或是当月最后一天,也不可编辑
const selectedDateStr = timeBean.weekDayList[timeBean.selectDay].date;
const selDateObj = new Date(selectedDateStr);
const isSunday = selDateObj.getDay() === 0; // 周日
const lastDayOfMonth = new Date(selDateObj.getFullYear(), selDateObj.getMonth() + 1, 0).getDate();
const isLastOfMonth = selDateObj.getDate() === lastDayOfMonth;
const disableBecauseOfRules = hasDailyValue || isSunday || isLastOfMonth;
this.setData({ this.setData({
isDisable: hasDailyValue, isDisable: disableBecauseOfRules,
hasDailyValue: hasDailyValue, hasDailyValue: hasDailyValue
}); });
if (!hasDailyValue) { if (!disableBecauseOfRules) {
this.getUserStat(); this.getUserStat();
} }
} else if (tmlpEditList.includes(tmlpCode)) { } else if (tmlpEditList.includes(tmlpCode)) {
// 往期编辑 // 往期编辑
// 往期也需考虑周日或月底不可编辑
const selectedDateStr = timeBean.weekDayList[timeBean.selectDay].date;
const selDateObj = new Date(selectedDateStr);
const isSunday = selDateObj.getDay() === 0;
const lastDayOfMonth = new Date(selDateObj.getFullYear(), selDateObj.getMonth() + 1, 0).getDate();
const isLastOfMonth = selDateObj.getDate() === lastDayOfMonth;
this.setData({ this.setData({
isDisable: isDisable:
timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false, timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false || isSunday || isLastOfMonth,
}); });
} }
this.setData({ this.setData({
...@@ -1099,7 +1148,7 @@ Page({ ...@@ -1099,7 +1148,7 @@ Page({
secondConfirm(params) { secondConfirm(params) {
let that = this; let that = this;
const { titleTxtObj, routeParams } = this.data; const { titleTxtObj, routeParams, scene, hasDailyValue } = this.data;
wx.showModal({ wx.showModal({
title: "确认提示", title: "确认提示",
content: content:
...@@ -1119,6 +1168,10 @@ Page({ ...@@ -1119,6 +1168,10 @@ Page({
that.getRecordDetail(); that.getRecordDetail();
} }
wx.$util.showToast(res.code == "0" ? "提交成功" : res.message); wx.$util.showToast(res.code == "0" ? "提交成功" : res.message);
if(res.code == "0") {
const eventCode = params?.templateCode.replace(/-/g, '_') + (hasDailyValue ? '_edit' : '_add')
wx.$track.setTrackData(0, eventCode, {}, '', scene)
}
}) })
.finally(() => { .finally(() => {
that.setData({ that.setData({
......
...@@ -33,24 +33,21 @@ Page({ ...@@ -33,24 +33,21 @@ Page({
url: "packageWorkspace.supervisorDaily", url: "packageWorkspace.supervisorDaily",
icon: "warranty-supervisor-daily", icon: "warranty-supervisor-daily",
reportTypeAttr: "daily", reportTypeAttr: "daily",
reportTypeVal: "1", reportTypeVal: "1"
trackingCode: "regional-modifications-supervisor-daily",
}, },
{ {
name: "工作周报", name: "工作周报",
url: "packageWorkspace.supervisorDaily", url: "packageWorkspace.supervisorDaily",
icon: "modifications-supervisor-week", icon: "modifications-supervisor-week",
reportTypeAttr: "weekly", reportTypeAttr: "weekly",
reportTypeVal: "2", reportTypeVal: "2"
trackingCode: "regional-modifications-supervisor-daily",
}, },
{ {
name: "工作月报", name: "工作月报",
url: "packageWorkspace.supervisorDaily", url: "packageWorkspace.supervisorDaily",
icon: "modifications-supervisor-month", icon: "modifications-supervisor-month",
reportTypeAttr: "monthly", reportTypeAttr: "monthly",
reportTypeVal: "3", reportTypeVal: "3"
trackingCode: "regional-modifications-supervisor-daily",
}, },
{ {
name: "服务中心", name: "服务中心",
...@@ -58,7 +55,7 @@ Page({ ...@@ -58,7 +55,7 @@ Page({
icon: "server-center", icon: "server-center",
reportTypeAttr: "monthly", reportTypeAttr: "monthly",
reportTypeVal: "3", reportTypeVal: "3",
trackingCode: "no", trackingCode: "regional-assistant-server-center",
}, },
], ],
staffDevelopmentMenus: [ staffDevelopmentMenus: [
...@@ -144,6 +141,7 @@ Page({ ...@@ -144,6 +141,7 @@ Page({
}, },
onReportPopupSelect(e) { onReportPopupSelect(e) {
const selectedTemplate = e.detail; const selectedTemplate = e.detail;
let userInfo = wx.$util.getUserInfo()
this.setData({ this.setData({
showReportPopup: false, showReportPopup: false,
}); });
...@@ -158,6 +156,9 @@ Page({ ...@@ -158,6 +156,9 @@ Page({
...(selectedTemplate || {}), ...(selectedTemplate || {}),
}; };
const eventCode = params?.code.replace(/-/g, '_') + '_click'
wx.$track.setTrackData(0, eventCode, {}, '', userInfo?.sceneType)
wx.$router.go(item.url, { wx.$router.go(item.url, {
params: params, params: params,
}); });
...@@ -339,7 +340,9 @@ Page({ ...@@ -339,7 +340,9 @@ Page({
e.currentTarget.dataset.target e.currentTarget.dataset.target
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
// 埋点 // 埋点
if(trackingCode) {
wx.$track.setTrackData(0, trackingCode, {}, '', userInfo?.sceneType) wx.$track.setTrackData(0, trackingCode, {}, '', userInfo?.sceneType)
}
let item = e.currentTarget.dataset.target let item = e.currentTarget.dataset.target
if (item.url == 'packageWorkspace.supervisorDaily') { if (item.url == 'packageWorkspace.supervisorDaily') {
this.openWorkReportTemp(item) this.openWorkReportTemp(item)
......
...@@ -118,5 +118,9 @@ ...@@ -118,5 +118,9 @@
] ]
} }
}, },
"libVersion": "3.12.0" "libVersion": "3.14.3",
"projectname": "regional-assistant",
"setting": {
"compileHotReLoad": true
}
} }
\ 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!