Commit 27de45e6 by 陈婉清

Merge branch 'saas+v4.22.0_0529' into 'develop'

Saas+v4.22.0 0529上线后,代码合并。

See merge request !28
2 parents 3ead2ed1 81b93dcc
Showing 41 changed files with 757 additions and 120 deletions
...@@ -85,6 +85,17 @@ const deleteTechnician = data => { ...@@ -85,6 +85,17 @@ const deleteTechnician = data => {
) )
} }
// 查询开店申请列表
const getReviewList = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchant.review.list',
...data
},
true
)
}
export default { export default {
getAllServiceList, getAllServiceList,
getServiceList, getServiceList,
...@@ -93,5 +104,6 @@ export default { ...@@ -93,5 +104,6 @@ export default {
getTechnicianList, getTechnicianList,
addTechnician, addTechnician,
updateTechnician, updateTechnician,
deleteTechnician deleteTechnician,
getReviewList
} }
\ No newline at end of file \ No newline at end of file
...@@ -133,6 +133,30 @@ class outputApi { ...@@ -133,6 +133,30 @@ class outputApi {
}) })
} }
/** 业务经营汇总列表查询-次新车转化 */
getActivityList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.expanded.gold.activity.page',
...data
})
}
/** 业务经营汇总列表查询-次新车转化-总收益 */
getActivityTotal(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.expanded.gold.activity.total.output.value',
...data
})
}
/** 业务经营汇总列表查询-详情页-次新车转化-总收益 */
getActivityStatistics(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.expanded.gold.activity.statistics',
...data
})
}
// 我的员工 // 我的员工
/** 服务商查询园区店员工产值统计 */ /** 服务商查询园区店员工产值统计 */
getStaffList(data) { getStaffList(data) {
......
// components/Nothing-tips/nothingTips.js // components/Nothing-tips/nothingTips.js
Component({ Component({
externalClasses: ['custom-class'],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
......
<!-- components/Nothing-tips/nothingTips.wxml --> <!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon" style="background-color: {{bgColor}};"> <view class="nothingCon custom-class" style="background-color: {{bgColor}};">
<image <image
wx:if="{{bg}}" wx:if="{{bg}}"
class="bg" class="bg"
......
...@@ -25,11 +25,15 @@ Component({ ...@@ -25,11 +25,15 @@ Component({
type: Boolean, type: Boolean,
value: true value: true
}, },
listIdx: {
type: Number,
value: -1
},
sceneInfo: { sceneInfo: {
type: Object, type: Object,
value: () => {}, value: () => { },
observer(n) { observer(n) {
if(n.hasOwnProperty('sceneList')) { if (n.hasOwnProperty('sceneList')) {
this.findIsOpen() this.findIsOpen()
} }
} }
...@@ -47,31 +51,10 @@ Component({ ...@@ -47,31 +51,10 @@ Component({
IMGURL: IMG_URL, IMGURL: IMG_URL,
openedIcon: `${IMG_URL}/output/openedIcon.png`, openedIcon: `${IMG_URL}/output/openedIcon.png`,
scenceList scenceList
// custSceneList: [
// {
// title: '新车洽谈场景',
// subTitle: '1.0新车权益升级'
// },
// {
// title: '新车交付场景',
// subTitle: '1.1新车精品升级'
// },
// {
// title: '0-6个月',
// subTitle: '1.2次新车膨胀金活动'
// },
// {
// title: '6个月以上',
// subTitle: '1.3售后直播众筹活动'
// }
// ]
}, },
lifetimes: { lifetimes: {
attached() { attached() { }
// console.log(this.data.sceneInfo, 'sceneInfo--')
// console.log(this.data.scenceList, 'scenceList--')
}
}, },
/** /**
...@@ -90,7 +73,8 @@ Component({ ...@@ -90,7 +73,8 @@ Component({
}, },
handleClick(e) { handleClick(e) {
let { idx, scenecode } = e.currentTarget.dataset let { idx, scenecode } = e.currentTarget.dataset
this.triggerEvent('handleSceneChange', { sceneIdx: idx, sceneCode: scenecode }) let { listIdx } = this.data
this.triggerEvent('handleSceneChange', { sceneIdx: idx, sceneCode: scenecode, listIdx: listIdx })
} }
} }
}) })
...@@ -11,6 +11,7 @@ Page({ ...@@ -11,6 +11,7 @@ Page({
IMG_URL, IMG_URL,
maxNum: 99, maxNum: 99,
bgUrl: `${IMG_URL}/personal/empty_tran.png`, bgUrl: `${IMG_URL}/personal/empty_tran.png`,
active: 'customer',
selectInfo: { selectInfo: {
yqMerchantName: '全部服务中心' yqMerchantName: '全部服务中心'
}, },
...@@ -26,6 +27,13 @@ Page({ ...@@ -26,6 +27,13 @@ Page({
isAsk: false isAsk: false
}, },
tabChange(e) {
let { name } = e.detail
this.setData({
active: name
})
},
// 筛选服务中心 // 筛选服务中心
filterTypeFn() { filterTypeFn() {
this.setData({ this.setData({
...@@ -128,7 +136,13 @@ Page({ ...@@ -128,7 +136,13 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options?.activeTab) {
this.tabChange({
detail: {
name: options?.activeTab
}
})
}
}, },
/** /**
......
{ {
"navigationBarTitleText": "客户管理", "navigationBarTitleText": "客户管理",
"usingComponents": { "usingComponents": {
"select-service-popup": "../../../components/selectServicePopup/selectServicePopup" "select-service-popup": "../../../components/selectServicePopup/selectServicePopup",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"store-apply": "../../serviceManage/components/StoreApply/StoreApply"
} }
} }
\ No newline at end of file \ No newline at end of file
<!--packageMine/pages/customerManagement/customerList/customerList.wxml--> <!--packageMine/pages/customerManagement/customerList/customerList.wxml-->
<!-- <wxs src="../index.wxs" module="format" /> --> <!-- <wxs src="../index.wxs" module="format" /> -->
<view class="customer-list-page"> <van-tabs active="{{active}}" bind:change="tabChange">
<van-tab name="customer" title="客户"></van-tab>
<van-tab name="apply" title="开店申请"></van-tab>
</van-tabs>
<!-- 客户 -->
<view wx:if="{{active == 'customer'}}" class="customer-list-page">
<view class="btn_box" bindtap="handleEdit" data-type="add"> <view class="btn_box" bindtap="handleEdit" data-type="add">
<glsx-image src="index/apply.png" class="icon" /> <glsx-image src="index/apply.png" class="icon" />
<text>创建新客户</text> <text>创建新客户</text>
...@@ -66,4 +71,6 @@ ...@@ -66,4 +71,6 @@
<nothing-tips tips="暂无客户~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" /> <nothing-tips tips="暂无客户~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view> </view>
</view> </view>
<!-- 开店申请 -->
<store-apply wx:else merchantType="2"></store-apply>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="handleSearch" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" /> <select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="handleSearch" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
\ No newline at end of file \ No newline at end of file
...@@ -166,7 +166,7 @@ Page({ ...@@ -166,7 +166,7 @@ Page({
wx.$api.showToast('请至少选择一个产品') wx.$api.showToast('请至少选择一个产品')
return return
} }
let message = addOrEdit == 'add' ? '是否确定客户?' : '是否确定修改客户?' let message = addOrEdit == 'add' ? '是否确定提交客户开通申请?' : '是否确定修改客户?'
delete formData.serviceCenterMerchantName delete formData.serviceCenterMerchantName
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
......
// packageMine/pages/serviceManage/components/StoreApply/StoreApply.js
import { IMG_URL } from '~/utils/constantData'
import mineServiceApi from '~/api/mineApi/mineService'
import { getNowMonth } from '~/utils/format'
Component({
/**
* 组件的属性列表
*/
properties: {
// 1-服务中心(园区店) 2-客户(4s店)
merchantType: {
type: Number,
value: 1
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
serviceList: [],
total: -1,
pageCof: {
currentPage: 1,
pageSize: 10
},
isAsk: false,
reviewStatusObj: {
1: {
label: '审核中',
color: '#3666FE'
},
2: {
label: '已通过',
color: '#21AB60'
},
3: {
label: '已驳回',
color: '#F36261'
}
}
},
lifetimes: {
attached() {
this.handleSearch()
}
},
/**
* 组件的方法列表
*/
methods: {
handleSearch() {
this.setData({
['pageCof.currentPage']: 1,
total: -1
})
this.getList(true)
},
scrollonReachBottom() {
this.getList()
},
getList(isReset = false) {
let { serviceList, pageCof, total, isAsk, merchantType } = this.data
let _this = this
if (total == serviceList.length || isAsk) {
return true
}
let params = {
...pageCof,
merchantType: merchantType
}
this.setData({
isAsk: true
})
mineServiceApi.getReviewList(params).then(res => {
let { list, total } = res.data
const dateFormat = merchantType == 1 ? 'yyyy-MM-dd hh:mm:ss' : 'yyyy-MM-dd'
list.forEach(item => {
item.createdDate = item.createdDate ? new Date(item.createdDate).format(dateFormat).replace(/-/g, '.') : ''
})
this.setData({
serviceList: pageCof.currentPage == 1 ? (list || []) : serviceList.concat(list),
['pageCof.currentPage']: pageCof.currentPage + 1,
triggered: false,
total
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
}).finally(function () {
_this.setData({
isAsk: false
})
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageMine/pages/serviceManage/components/StoreApply/StoreApply.wxss */
.service-list-page {
width: 100%;
box-sizing: border-box;
padding: 20rpx;
background-color: #F2F3F7;
.title-box {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
color: #323436;
font-size: 28rpx;
font-weight: 600;
.number {
color: var(--btnColor)
}
}
}
.nothingCon {
width: calc(100vw - 40rpx);
height: calc(100vh - 140rpx);
// background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.item-box {
width: 100%;
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
.top {
display: flex;
justify-content: space-between;
// align-items: center;
padding: 24rpx 32rpx;
.message {
display: flex;
.avatar {
flex-shrink: 0;
width: 72rpx;
height: 72rpx;
margin-right: 12rpx;
}
.message-text {
display: flex;
flex-flow: column;
justify-content: center;
.merchant {
color: #323436;
font-size: 28rpx;
}
.contact {
color: #858A94;
font-size: 26rpx;
}
}
}
}
.reject-reason {
background: #F8F9FC;
border-radius: 8rpx;
padding: 16rpx;
margin: 24rpx 32rpx;
color: #F36261;
}
.bottom {
padding: 18rpx 32rpx;
background-color: #FFF9F2;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
color: #8A8C90;
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageMine/pages/serviceManage/components/StoreApply/StoreApply.wxml-->
<view class="service-list-page">
<view class="content-box" wx:if="{{serviceList.length}}">
<view class="title-box">
<view class="title">我的开店申请:<text class="number">{{total < 0 ? 0 : total}}</text>
</view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
<glsx-image wx:if="{{merchantType == 1}}" src="personal/service_head.png" class="avatar" />
<glsx-image wx:else src="personal/customer_head.png" class="avatar" />
<view class="message-text">
<view class="merchant">{{item.merchantName}}</view>
<view class="contact">联系人:{{item.contactName}} {{item.phone}}</view>
</view>
</view>
<view style="color: {{reviewStatusObj[item.reviewStatus].color}};">{{item.reviewStatus ? reviewStatusObj[item.reviewStatus].label : ''}}</view>
</view>
<view wx:if="{{item.reviewStatus == 3}}" class="reject-reason">
驳回原因:{{item.rejectedReason || ''}}
</view>
<view wx:if="{{merchantType == 1}}" class="bottom">
申请时间:{{item.createdDate || ''}}
</view>
<view wx:else class="bottom">
<view>所属:{{item.yqMerchantName || '无'}}</view>
<view>{{item.createdDate || ''}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{serviceList.length == total}}">到底啦!</view>
</scroll-view>
</view>
<view wx:else>
<nothing-tips custom-class="nothingCon" tips="暂无开店申请~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
wx.$api.showToast(validObj.message) wx.$api.showToast(validObj.message)
return return
} }
let message = addOrEdit == 'add' ? '是否确定创建服务中心?' : '是否确定修改服务中心信息?' let message = addOrEdit == 'add' ? '是否确定提交服务中心开通申请?' : '是否确定修改服务中心信息?'
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: message, content: message,
......
...@@ -9,6 +9,7 @@ Page({ ...@@ -9,6 +9,7 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
bgUrl: `${IMG_URL}/personal/empty_tran.png`, bgUrl: `${IMG_URL}/personal/empty_tran.png`,
active: 'service',
serviceList: [], serviceList: [],
total: -1, total: -1,
pageCof: { pageCof: {
...@@ -18,6 +19,13 @@ Page({ ...@@ -18,6 +19,13 @@ Page({
isAsk: false isAsk: false
}, },
tabChange(e) {
let { name } = e.detail
this.setData({
active: name
})
},
handleEdit(e) { handleEdit(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
let params = { let params = {
...@@ -76,7 +84,13 @@ Page({ ...@@ -76,7 +84,13 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options?.activeTab) {
this.tabChange({
detail: {
name: options?.activeTab
}
})
}
}, },
/** /**
......
{ {
"navigationBarTitleText": "服务中心管理", "navigationBarTitleText": "服务中心管理",
"usingComponents": {} "usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"store-apply": "../components/StoreApply/StoreApply"
}
} }
\ No newline at end of file \ No newline at end of file
<!--packagesList/mineDetail/pages/serviceManage/serviceList/serviceList.wxml--> <!--packagesList/mineDetail/pages/serviceManage/serviceList/serviceList.wxml-->
<view class="service-list-page"> <van-tabs active="{{active}}" bind:change="tabChange">
<van-tab name="service" title="服务中心"></van-tab>
<van-tab name="apply" title="开店申请"></van-tab>
</van-tabs>
<!-- 服务中心 -->
<view wx:if="{{active == 'service'}}" class="service-list-page">
<view class="btn_box" bindtap="handleEdit" data-type="add"> <view class="btn_box" bindtap="handleEdit" data-type="add">
<glsx-image src="index/apply.png" class="icon" /> <glsx-image src="index/apply.png" class="icon" />
<text>创建新的服务中心</text> <text>创建新的服务中心</text>
</view> </view>
<view class="content-box" wx:if="{{serviceList.length}}"> <view class="content-box" wx:if="{{serviceList.length}}">
<view class="title-box"> <view class="title-box">
<view class="title">服务中心数量:<text class="number">{{total < 0 ? 0 : total}}</text></view> <view class="title">服务中心数量:<text class="number">{{total < 0 ? 0 : total}}</text>
</view>
</view> </view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}"> <scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}"> <view class="item-box" wx:for="{{serviceList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
...@@ -34,3 +40,5 @@ ...@@ -34,3 +40,5 @@
<nothing-tips tips="暂无服务中心~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" /> <nothing-tips tips="暂无服务中心~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view> </view>
</view> </view>
<!-- 开店申请 -->
<store-apply wx:else></store-apply>
\ No newline at end of file \ No newline at end of file
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
const obj = { const obj = {
service: { service: {
navigationTitle: '创建服务中心', navigationTitle: '创建服务中心',
primaryBtn: '继续创建服务中心', primaryBtn: '查看我的申请',
primaryCallback: 'packageMine.editService?addOrEdit=add&isRedirect=true', // primaryCallback: 'packageMine.editService?addOrEdit=add&isRedirect=true',
cancelBtn: 'S后自动跳转我的服务中心' primaryCallback: 'packageMine.serviceList?activeTab=apply',
cancelBtn: 'S后自动跳转我的服务中心',
tipTxt: '工作人员正在加急审核,审核通过后会自动帮你开通门店,请耐心等待。'
}, },
customer: { customer: {
navigationTitle: '创建客户', navigationTitle: '创建客户',
primaryBtn: '邀请销售顾问', primaryBtn: '查看我的申请',
primaryCallback: 'packageMine.saleList', primaryCallback: 'packageMine.customerList?activeTab=apply',
cancelBtn: 'S后自动跳转我的客户' cancelBtn: 'S后自动跳转我的客户',
tipTxt: '工作人员正在加急审核,审核通过后会自动帮你开通客户,请耐心等待。'
}, },
staff: { staff: {
navigationTitle: '创建员工', navigationTitle: '创建员工',
......
/* packagesList/mineDetail/pages/successPage/successPage.wxss */ /* packagesList/mineDetail/pages/successPage/successPage.wxss */
.success-page{ .success-page {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
background-color: #ffffff; background-color: #ffffff;
...@@ -8,32 +8,49 @@ ...@@ -8,32 +8,49 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 160rpx; padding-bottom: 160rpx;
.success_icon{
.success-content {
display: flex;
flex-flow: column;
align-items: center;
}
.success_icon {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
} }
.success_text{
.success_text {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 600;
font-size: 42rpx; font-size: 42rpx;
color: #323436; color: #323436;
margin-top: 52rpx; margin-top: 52rpx;
} }
.btn-box{
view{ .success_tips {
font-size: 24rpx;
color: #5A6066;
margin: 20rpx 174rpx 0;
}
.btn-box {
view {
width: 440rpx; width: 440rpx;
height: 88rpx; height: 88rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.btn-blue{
.btn-blue {
background: var(--btnColor); background: var(--btnColor);
border-radius: 8rpx; border-radius: 8rpx;
color: #FFFFFF; color: #FFFFFF;
font-size: 28rpx; font-size: 28rpx;
} }
.btn-cancel{
.btn-cancel {
width: 436rpx; width: 436rpx;
height: 84rpx; height: 84rpx;
background: #FFFFFF; background: #FFFFFF;
......
<!--packagesList/mineDetail/pages/successPage/successPage.wxml--> <!--packagesList/mineDetail/pages/successPage/successPage.wxml-->
<navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">{{paramsObj.navigationTitle}}</navigation-bar> <navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">{{paramsObj.navigationTitle}}</navigation-bar>
<view class="success-page" style="height: 100vh;padding:calc({{tabBarStyle}}px + 160rpx) 0 calc(160rpx + env(safe-area-inset-bottom)) 0;"> <view class="success-page" style="height: 100vh;padding:calc({{tabBarStyle}}px + 160rpx) 0 calc(160rpx + env(safe-area-inset-bottom)) 0;">
<view> <view class="success-content">
<glsx-image src="personal/success.png" class="success_icon" /> <glsx-image src="personal/success.png" class="success_icon" />
<view class="success_text">创建成功</view> <view class="success_text">提交成功</view>
<view wx:if="{{paramsObj.tipTxt}}" class="success_tips">{{paramsObj.tipTxt}}</view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view class="btn-blue" bindtap="jump" data-type="primary">{{paramsObj.primaryBtn}}</view> <view class="btn-blue" bindtap="jump" data-type="primary">{{paramsObj.primaryBtn}}</view>
......
...@@ -18,6 +18,10 @@ Component({ ...@@ -18,6 +18,10 @@ Component({
n && this.dealStaffList() n && this.dealStaffList()
} }
}, },
sceneCode: {
type: String,
value: 'SC004'
},
hasReport: { hasReport: {
type: Boolean, type: Boolean,
value: true value: true
...@@ -63,11 +67,13 @@ Component({ ...@@ -63,11 +67,13 @@ Component({
{ {
label: '订单数', label: '订单数',
name: 'orderCount', name: 'orderCount',
SC003Name: 'totalOrderCount',
className: 'font-number' className: 'font-number'
}, },
{ {
label: '产值', label: '产值',
name: 'realAmount', name: 'realAmount',
SC003Name: 'totalOutputValue',
className: 'red font-number', className: 'red font-number',
prefix: '¥', prefix: '¥',
isNumber: true isNumber: true
...@@ -77,7 +83,8 @@ Component({ ...@@ -77,7 +83,8 @@ Component({
name: 'predictAmount', name: 'predictAmount',
className: 'font-number', className: 'font-number',
prefix: '¥', prefix: '¥',
isNumber: true isNumber: true,
isHide: false
} }
], ],
tableHeadList: [ tableHeadList: [
...@@ -110,11 +117,27 @@ Component({ ...@@ -110,11 +117,27 @@ Component({
] ]
}, },
lifetimes: {
attached() {
let { sceneCode, merchantFormList } = this.data
if (sceneCode == 'SC003') {
let idx = merchantFormList.findIndex(item => item.name == 'predictAmount')
this.setData({
[`merchantFormList[${idx}].isHide`]: true
})
}
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
dealStaffList() { dealStaffList() {
let { sceneCode } = this.data
if (sceneCode != 'SC004') {
return true
}
var list = this.data.orderObj var list = this.data.orderObj
list && list &&
list.activityList?.forEach(item => { list.activityList?.forEach(item => {
...@@ -300,6 +323,18 @@ Component({ ...@@ -300,6 +323,18 @@ Component({
// crowdPosterItem: posterItem, // crowdPosterItem: posterItem,
// isShowTip: false // isShowTip: false
// }) // })
},
// 活动详情-跳转门店助手
toActivity(e) {
const { item } = e.currentTarget.dataset
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'packageShopmall/packageExpandedGold/pages/activity/index/index?id=' + item.activityId + '&noOperate=true',
envVersion: 'trial',
success(res) {
// 打开成功
}
})
} }
} }
}) })
...@@ -17,18 +17,20 @@ ...@@ -17,18 +17,20 @@
<view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}"> <view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}">
{{item.activityName}} {{item.activityName}}
</view> </view>
<view class="head-link" bindtap="download" data-item="{{item}}"> <view wx:if="{{sceneCode != 'SC003'}}" class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image> <image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
母链海报 母链海报
</view> </view>
<view class="down-tips" wx:if="{{index == 0 && isShowTip}}">下载活动海报分享给门店开展活动</view> <view class="down-tips" wx:if="{{index == 0 && isShowTip && sceneCode != 'SC003'}}">下载活动海报分享给门店开展活动</view>
</view> </view>
<view class="content"> <view class="content">
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <view wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-row" wx:if="{{!subItem.isHide}}">
<view class="content-label">{{subItem.label}}</view> <view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}"> <view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text> <text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{subItem.isNumber ? filter.money_three_for_two_thousands(item[subItem.name]) : item[subItem.name]}} {{subItem.isNumber ? filter.money_three_for_two_thousands(item[sceneCode == 'SC003' ? (subItem.SC003Name || subItem.name) : subItem.name]) : item[sceneCode == 'SC003' ? (subItem.SC003Name || subItem.name) : subItem.name]}}
</view>
</view> </view>
</view> </view>
<!-- 排名 --> <!-- 排名 -->
...@@ -80,9 +82,10 @@ ...@@ -80,9 +82,10 @@
</view> </view>
</view> </view>
<!-- 战报 --> <!-- 战报 -->
<view class="new-report" wx:if="{{item.activityStatus != 1 && hasReport}}"> <view class="new-report">
<view class="report-left" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view> <view class="report-left" wx:if="{{item.activityStatus != 1 && hasReport}}" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view>
<view class="report-left" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view> <view class="report-left" wx:if="{{item.activityStatus != 1 && hasReport}}" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view>
<view wx:if="{{sceneCode == 'SC003'}}" class="report-left" bindtap="toActivity" data-item="{{item}}" data-idx="{{index}}">活动详情</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 活动 --> <!-- 产品 -->
<view class="p-rl-20 bg-white"> <view wx:if="{{sceneCodeActive != 'SC003'}}" class="p-rl-20 bg-white">
<!-- <view class="p-rl-20 bg-white"> -->
<scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}"> <scroll-view scroll-x="{{true}}" enable-flex class="activity-box" scroll-with-animation scroll-left="{{scrollLeft}}">
<view class="flex"> <view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{(item.productStatus == 2 || item.productStatus == 3) ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}"> <view class="activity-item {{ activityActive == index ? 'active' : ''}} {{(item.productStatus == 2 || item.productStatus == 3) ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">
...@@ -31,18 +32,20 @@ ...@@ -31,18 +32,20 @@
<view class="activity-title title bg-white p-l-20 no-border"> <view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view> <view>看产值</view>
<view wx:if="{{sceneCodeActive != 'SC001'}}" class="select" bindtap="handleSearch"> <view wx:if="{{sceneCodeActive != 'SC001'}}" class="select" bindtap="handleSearch">
<view wx:if="{{(sceneCodeActive == 'SC002' || sceneCodeActive == 'SC003') && !isMock.SC002}}" class="select-txt"> <view wx:if="{{(sceneCodeActive == 'SC002') && !isMock.SC002}}" class="select-txt">
{{baseData.timeList[sceneCodeActive == 'SC002' ? searchForm.sceneSC002 : searchForm.sceneSC003]}} {{baseData.timeList[sceneCodeActive == 'SC002' ? searchForm.sceneSC002 : searchForm.sceneSC003]}}
<!-- {{baseData.timeList[searchForm.sceneSC002]}} -->
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" /> <image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view> </view>
<view wx:if="{{sceneCodeActive == 'SC004' && !isMock.SC004}}" class="select-txt"> <view wx:if="{{(sceneCodeActive == 'SC004' || sceneCodeActive == 'SC003') && !isMock.SC004}}" class="select-txt">
{{baseData.actStatusList[searchForm.sceneSC004]}} {{baseData.actStatusList[sceneCodeActive == 'SC004' ? searchForm.sceneSC004 : searchForm.sceneSC003]}}
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" /> <image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view> </view>
</view> </view>
</view> </view>
<output-transform wx:if="{{sceneCodeActive != 'SC004'}}" formData="{{activityList[activityActive].orderTotal}}" hasNavigate="{{sceneCodeActive != 'SC001' && !isMock.SC002}}" sceneCode="{{sceneCodeActive}}" /> <output-transform wx:if="{{sceneCodeActive != 'SC004' && sceneCodeActive != 'SC003'}}" formData="{{activityList[activityActive].orderTotal}}" hasNavigate="{{sceneCodeActive != 'SC001' && !isMock.SC002}}" sceneCode="{{sceneCodeActive}}" />
<output-crowdfund wx:if="{{sceneCodeActive == 'SC004'}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack" hasReport="{{!isMock.SC004}}" /> <output-crowdfund wx:if="{{sceneCodeActive == 'SC004'}}" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack" hasReport="{{!isMock.SC004}}" />
<output-crowdfund wx:if="{{sceneCodeActive == 'SC003'}}" sceneCode="SC003" orderObj="{{activityList[activityActive].outputData}}" bind:handleZhanReport="handleZhanReport" bind:posterTrack="posterTrack" hasReport="true" />
</view> </view>
<view wx:else class="content-empty bg-white"> <view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" /> <image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
......
...@@ -73,4 +73,12 @@ ...@@ -73,4 +73,12 @@
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
} }
.row-two {
width: 50%;
}
.row-four {
width: 25%;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="title">{{info.merchantName || info.merchantName4s || ''}}</view> <view class="title">{{info.merchantName || info.merchantName4s || ''}}</view>
</view> </view>
<view class="content"> <view class="content">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item"> <view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item {{sceneCode == -1 ? 'row-two' : ''}}">
<view wx:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view> <view wx:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view>
<view wx:else="" class="price"> <view wx:else="" class="price">
{{item.prefix || ''}} {{item.prefix || ''}}
......
...@@ -12,6 +12,11 @@ const clientFormObj = { ...@@ -12,6 +12,11 @@ const clientFormObj = {
prefix: '¥', prefix: '¥',
isNum: true isNum: true
}, { }, {
label: '次新车转化',
name: 'carTransform',
prefix: '¥',
isNum: true
}, {
label: '售后众筹', label: '售后众筹',
name: 'afterSalesCrowdfunding', name: 'afterSalesCrowdfunding',
prefix: '¥', prefix: '¥',
...@@ -90,6 +95,11 @@ const staffFormObj = { ...@@ -90,6 +95,11 @@ const staffFormObj = {
name: 'totalVdAmount', name: 'totalVdAmount',
prefix: '¥', prefix: '¥',
isNum: true isNum: true
}, {
label: '次新车转化',
name: 'carTransformAmount',
prefix: '¥',
isNum: true
}], }],
'SC002': [{ 'SC002': [{
label: '营业额', label: '营业额',
...@@ -140,6 +150,18 @@ const staffFormObj = { ...@@ -140,6 +150,18 @@ const staffFormObj = {
label: '转化率', label: '转化率',
name: 'convertRate', name: 'convertRate',
suffix: '%' suffix: '%'
}],
'SC003': [{
label: '营业额',
name: 'totalOutputValue',
prefix: '¥',
isNum: true
}, {
label: '订单',
name: 'totalOrderCount'
}, {
label: '访客',
name: 'totalFansCount'
}] }]
} }
......
// pages/tab/output/components/StaffSort/StaffSort.js // pages/tab/output/components/StaffSort/StaffSort.js
import { scenceList } from '~/pages/tab/index/constant/data' import { scenceList } from '~/pages/tab/index/constant/data'
const busiOptSceneCode = ['-1', 'SC001', 'SC002'] const busiOptSceneCode = ['-1', 'SC001', 'SC002', 'SC003']
import mineApi from '~/api/mineApi/index' import mineApi from '~/api/mineApi/index'
import { getNowMonth } from '~/utils/format' import { getNowMonth } from '~/utils/format'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
......
// pages/tab/output/components/TotalTab/TotalTab.js // pages/tab/output/components/TotalTab/TotalTab.js
import { scenceList } from '~/pages/tab/index/constant/data' import { scenceList } from '~/pages/tab/index/constant/data'
const busiOptSceneCode = ['-1', 'SC002', 'SC004', 'SC001'] const busiOptSceneCode = ['-1', 'SC002', 'SC004', 'SC001', 'SC003']
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import { getNowMonth } from '~/utils/format' import { getNowMonth } from '~/utils/format'
Component({ Component({
...@@ -127,14 +127,21 @@ Component({ ...@@ -127,14 +127,21 @@ Component({
}) })
}, },
handleTimeChange() { handleTimeChange(e) {
let { baseData: { timeList } } = this.data let { scenecode } = e.currentTarget.dataset
let { baseData: { timeList, actStatusList } } = this.data
wx.showActionSheet({ wx.showActionSheet({
itemList: timeList, itemList: scenecode == 'SC003' ? actStatusList : timeList,
success: res => { success: res => {
if (scenecode == 'SC003') {
this.setData({
['formData.statusIdx']: res.tapIndex
})
} else {
this.setData({ this.setData({
['formData.timeIdx']: res.tapIndex ['formData.timeIdx']: res.tapIndex
}) })
}
this.handleBusiSearch() this.handleBusiSearch()
} }
}) })
...@@ -210,6 +217,7 @@ Component({ ...@@ -210,6 +217,7 @@ Component({
dealSearchStatus() { dealSearchStatus() {
let { formData } = this.data let { formData } = this.data
var activityStatuList = [] var activityStatuList = []
let activityStatus = ''
switch (formData.statusIdx) { switch (formData.statusIdx) {
case 0: case 0:
activityStatuList = [1, 2, 3] activityStatuList = [1, 2, 3]
...@@ -217,17 +225,23 @@ Component({ ...@@ -217,17 +225,23 @@ Component({
// 申请中 // 申请中
case 1: case 1:
activityStatuList = [1] activityStatuList = [1]
activityStatus = '1'
break break
// 活动中 // 活动中
case 2: case 2:
activityStatuList = [2] activityStatuList = [2]
activityStatus = '2'
break break
// 已结束 // 已结束
case 3: case 3:
activityStatuList = [3] activityStatuList = [3]
activityStatus = '3'
break break
} }
return activityStatuList return {
activityStatuList,
activityStatus
}
}, },
dealSearchCrowd() { dealSearchCrowd() {
...@@ -240,9 +254,11 @@ Component({ ...@@ -240,9 +254,11 @@ Component({
'PC008': 4, 'PC008': 4,
'PC009': 5 'PC009': 5
} }
if (formData.busiIdx == 2 && formData?.proIdx) { if (formData.sceneCode == 'SC003') {
params.activityStatus = this.dealSearchStatus().activityStatus
} else if (formData.busiIdx == 2 && formData?.proIdx) {
params.categoryList = [attrToNum[proList[formData?.proIdx].productCode] || '-1'] params.categoryList = [attrToNum[proList[formData?.proIdx].productCode] || '-1']
params.activityStatusList = this.dealSearchStatus() params.activityStatusList = this.dealSearchStatus().activityStatusList
} }
return params return params
}, },
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
</view> </view>
<view class="right-box" wx:if="{{tabActive =='business'}}"> <view class="right-box" wx:if="{{tabActive =='business'}}">
<view wx:if="{{busiOptSceneCode[formData.busiIdx] == 'SC004'}}" bindtap="handleCrowdPopup">{{baseData.proList[formData.proIdx].productName}}</view> <view wx:if="{{busiOptSceneCode[formData.busiIdx] == 'SC004'}}" bindtap="handleCrowdPopup">{{baseData.proList[formData.proIdx].productName}}</view>
<view wx:else bindtap="handleTimeChange">{{baseData.timeList[formData.timeIdx]}}</view> <view wx:elif="{{busiOptSceneCode[formData.busiIdx] == 'SC003'}}" data-scenecode="{{busiOptSceneCode[formData.busiIdx]}}" bindtap="handleTimeChange">{{baseData.actStatusList[formData.statusIdx]}}</view>
<glsx-image src="output/icon-arrow.png" class="icon" bindtap="{{busiOptSceneCode[formData.busiIdx] == 'SC004' ? 'handleCrowdPopup' : 'handleTimeChange'}}"/> <view wx:else bindtap="handleTimeChange" data-scenecode="{{busiOptSceneCode[formData.busiIdx]}}">{{baseData.timeList[formData.timeIdx]}}</view>
<glsx-image src="output/icon-arrow.png" class="icon" bindtap="{{busiOptSceneCode[formData.busiIdx] == 'SC004' ? 'handleCrowdPopup' : 'handleTimeChange'}}" data-scenecode="{{busiOptSceneCode[formData.busiIdx]}}"/>
</view> </view>
</view> </view>
<!-- 众筹-筛选 --> <!-- 众筹-筛选 -->
......
// pages/tab/output/components/client/client.js // pages/tab/output/components/client/client.js
import outputApi from '~/api/outputApi/index' import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import { deleteSecond } from '~/utils/format'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -86,10 +87,13 @@ Component({ ...@@ -86,10 +87,13 @@ Component({
// 升降序 // 升降序
handleSort(e) { handleSort(e) {
let { detail } = e let { detail } = e
let { formData } = this.data
if (!['SC003', 'SC004'].includes(formData.sceneCode)) {
let sortTabModule = this.selectComponent("#sortTab") let sortTabModule = this.selectComponent("#sortTab")
let sortTabFixModule = this.selectComponent("#sortTabFix") let sortTabFixModule = this.selectComponent("#sortTabFix")
sortTabModule.syncVal(detail) sortTabModule.syncVal(detail)
sortTabFixModule.syncVal(detail) sortTabFixModule.syncVal(detail)
}
this.getBusiStatistics(true) this.getBusiStatistics(true)
}, },
...@@ -108,15 +112,28 @@ Component({ ...@@ -108,15 +112,28 @@ Component({
}) })
}, },
// 众筹数据处理 // 阻止冒泡事件
dealCrowdObj(data) { sceneCatch() { },
let _obj = {
totalNum: data.activityTotal, // 点击场景
totalOrderCount: data.orderTotal, handleSceneChange(e) {
totalAmount: data.totalAmount, let { detail } = e
activityList: data.activityList || [] this.handleJump({
currentTarget: {
dataset: {
idx: detail.listIdx,
sceneCode: detail.sceneCode
}
}
})
},
dealToTime(list, sceneCode = 'SC004') {
list.forEach(k => {
// 特殊处理
if (sceneCode == 'SC003') {
k.totalOutputValue = (k.totalOutputValue / 100).toFixed(2)
} }
_obj.activityList.forEach(k => {
// 时间 // 时间
k.time = k.startTime.slice(0, 16).replace(/-/g, '.') + ' - ' + k.endTime.slice(0, 16).replace(/-/g, '.') k.time = k.startTime.slice(0, 16).replace(/-/g, '.') + ' - ' + k.endTime.slice(0, 16).replace(/-/g, '.')
let startTimeFormat = k.startTime.slice(0, 10).replace(/-/g, '/') + ' 00:00:00' let startTimeFormat = k.startTime.slice(0, 10).replace(/-/g, '/') + ' 00:00:00'
...@@ -139,6 +156,34 @@ Component({ ...@@ -139,6 +156,34 @@ Component({
break break
} }
}) })
return list
},
// 次新车转化-总收益
getActivityTotal() {
let { userInfo } = wx.$storage.get()
let totalTabModule = this.selectComponent('#totalTab')
let busiSearchData = totalTabModule ? totalTabModule.dealParams() : {}
let params = {
...busiSearchData,
serviceMerchantId: userInfo.subLoginUser.merchantId
}
outputApi.getActivityTotal(params).then(res => {
this.setData({
['crowdOrderObj.totalAmount']: (res / 100).toFixed(2)
})
})
},
// 众筹数据处理
dealCrowdObj(data) {
let _obj = {
totalNum: data.activityTotal,
totalOrderCount: data.orderTotal,
totalAmount: data.totalAmount,
activityList: data.activityList || []
}
_obj.activityList = this.dealToTime(_obj.activityList)
this.setData({ this.setData({
crowdOrderObj: _obj crowdOrderObj: _obj
}) })
...@@ -165,12 +210,15 @@ Component({ ...@@ -165,12 +210,15 @@ Component({
let params = { let params = {
...busiSearchData, ...busiSearchData,
...sortSearchData, ...sortSearchData,
serviceMerchantId: userInfo.subLoginUser.merchantId serviceMerchantId: userInfo.subLoginUser.merchantId,
pageNum: 1,
pageSize: 99999,
} }
this.setData({ this.setData({
['isAsk.business']: true ['isAsk.business']: true
}) })
outputApi.getBusiStatistics(params).then(res => { let apiName = formData.sceneCode == 'SC003' ? 'getActivityList' : 'getBusiStatistics'
outputApi[apiName](params).then(res => {
this.resetBusiData() this.resetBusiData()
if (isReset) { if (isReset) {
this.setData({ this.setData({
...@@ -182,6 +230,12 @@ Component({ ...@@ -182,6 +230,12 @@ Component({
}) })
if (formData.sceneCode == 'SC004') { if (formData.sceneCode == 'SC004') {
this.dealCrowdObj(res) this.dealCrowdObj(res)
} else if (formData.sceneCode == 'SC003') {
let list = this.dealToTime(res?.list || [], 'SC003')
this.getActivityTotal()
this.setData({
['crowdOrderObj.activityList']: list
})
} else { } else {
let _list = [] let _list = []
switch (formData.sceneCode) { switch (formData.sceneCode) {
...@@ -197,6 +251,9 @@ Component({ ...@@ -197,6 +251,9 @@ Component({
}, { }, {
code: 'SC001', code: 'SC001',
name: 'vdUpgrade' name: 'vdUpgrade'
}, {
code: 'SC003',
name: 'carTransform'
}] }]
_list.forEach(item => { _list.forEach(item => {
_openList.forEach(k => { _openList.forEach(k => {
...@@ -305,7 +362,8 @@ Component({ ...@@ -305,7 +362,8 @@ Component({
}) })
this.setData({ this.setData({
list: list, list: list,
totalPages: res.pages totalPages: res.pages,
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
}) })
}).finally(function () { }).finally(function () {
_this.setData({ _this.setData({
...@@ -314,12 +372,9 @@ Component({ ...@@ -314,12 +372,9 @@ Component({
}) })
}, },
onReachBottom() { onReachBottom() {
if (this.data.totalPages != -1 && this.data.pageObj.currentPage == this.data.totalPages) { if (this.data.totalPages != -1 && this.data.pageObj.currentPage == (this.data.totalPages + 1)) {
return true return true
} }
this.setData({
['pageObj.currentPage']: this.data.pageObj.currentPage + 1
})
this.getClientApi() this.getClientApi()
}, },
handleJumpIdx() { handleJumpIdx() {
...@@ -356,8 +411,68 @@ Component({ ...@@ -356,8 +411,68 @@ Component({
activityId activityId
}) })
}, },
/**战报 */
handleReport(e) {
const { item, idx } = e.detail.currentTarget.dataset
wx.$api.showLoading('战报生成中')
outputApi
.getNewReportUrl({ activityId: item.activityId })
.then(res => {
if (!res.url) {
wx.$api.showToast('战报生成失败')
return true
}
var posterItem = {
...item,
posterUrl: res.url,
updatedTime: deleteSecond(res.updatedDate),
type: 'warReport'
}
this.setData({
posterItem: posterItem,
isShowTip: false
})
wx.$api.hideLoading()
this.triggerEvent('handleZhanReport', { item: item, idx: idx, posterItem: posterItem })
})
.catch(() => {
wx.$api.showToast('下载战报失败')
})
.finally(() => {
wx.$api.hideLoading()
})
},
/**喜报 */
handleXiReport(e) {
const { item } = e.detail.currentTarget.dataset
wx.$api.showLoading('喜报生成中')
outputApi
.getNewGoodUrl({ activityId: item.activityId })
.then(res => {
if (!res.goodUrl) {
wx.$api.showToast('暂无喜报')
return true
}
var posterItem = {
...item,
posterUrl: res.goodUrl,
updatedTime: res.goodReportDate ? deleteSecond(res.goodReportDate) : '',
type: 'warReport'
}
this.setData({
posterItem: posterItem
})
wx.$api.hideLoading()
})
.catch(() => {
wx.$api.showToast('下载喜报失败')
})
.finally(() => {
})
},
handleJump(e) { handleJump(e) {
let { idx } = e.currentTarget.dataset let { idx, sceneCode } = e.currentTarget.dataset
var currentItem = this.data.list[idx] var currentItem = this.data.list[idx]
var params = { var params = {
merchantId: currentItem.merchantId, merchantId: currentItem.merchantId,
...@@ -366,6 +481,9 @@ Component({ ...@@ -366,6 +481,9 @@ Component({
pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName, pMerchantName: this.data.pMerchantInfo.subLoginUser.merchantName,
isSuper: this.data.pMerchantInfo.isSuper isSuper: this.data.pMerchantInfo.isSuper
} }
if (sceneCode == 'SC003') {
params.fixSceneCode = sceneCode
}
wx.$router.go('/packagesList/packageOutput/pages/summary', params) wx.$router.go('/packagesList/packageOutput/pages/summary', params)
} }
// 门店经营汇总-end // 门店经营汇总-end
......
<!-- pages/tab/output/components/client/client.wxml --> <!-- pages/tab/output/components/client/client.wxml -->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<total-tab id="totalTab" bindbusiSearch="handleBusiSearch" bindtabChange="handleTabChange"></total-tab> <total-tab id="totalTab" bindbusiSearch="handleBusiSearch" bindtabChange="handleTabChange"></total-tab>
<view class="sort-fix {{stickyScrollTop >= 96 ? '' : 'sort-hide'}}" wx:if="{{tabActive == 'business'}}"> <view class="sort-fix {{stickyScrollTop >= 96 ? '' : 'sort-hide'}}" wx:if="{{tabActive == 'business' && formData.sceneCode != 'SC004' && formData.sceneCode != 'SC003'}}">
<sort-tab id="sortTabFix" sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab> <sort-tab id="sortTabFix" sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab>
</view> </view>
<scroll-view wx:if="{{tabActive == 'store'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindscrolltolower="onReachBottom" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}"> <scroll-view wx:if="{{tabActive == 'store'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindscrolltolower="onReachBottom" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}">
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
</view> </view>
<!-- 场景内容 --> <!-- 场景内容 -->
<view class="box-content"> <view class="box-content">
<scene-box sceneInfo="{{item}}" hasLockIcon="{{false}}" scenePriceList="{{item.scenePriceList}}" /> <view catchtap="sceneCatch">
<scene-box sceneInfo="{{item}}" hasLockIcon="{{false}}" scenePriceList="{{item.scenePriceList}}" listIdx="{{index}}" bindhandleSceneChange="handleSceneChange"/>
</view>
<!-- 通知 --> <!-- 通知 -->
<view class="box-bottom"> <view class="box-bottom">
<view wx:if="{{item.msgList.length}}" class="flex"> <view wx:if="{{item.msgList.length}}" class="flex">
...@@ -51,7 +53,7 @@ ...@@ -51,7 +53,7 @@
<view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view> <view class="btn-share" catchtap="handleShare" data-idx="{{index}}">去分享</view>
</view> </view>
</view> </view>
<view wx:if="{{totalPages != -1 && pageObj.currentPage == totalPages}}" class="end-txt"> <view wx:if="{{totalPages != -1 && pageObj.currentPage == (totalPages + 1)}}" class="end-txt">
到底啦! 到底啦!
</view> </view>
</view> </view>
...@@ -59,7 +61,7 @@ ...@@ -59,7 +61,7 @@
<scroll-view wx:if="{{tabActive == 'business'}}" class="client" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSort" lower-threshold='50' bind:scroll="handleBusiScroll" scroll-top="{{busiScrollTop}}"> <scroll-view wx:if="{{tabActive == 'business'}}" class="client" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSort" lower-threshold='50' bind:scroll="handleBusiScroll" scroll-top="{{busiScrollTop}}">
<view class="client-box"> <view class="client-box">
<!-- 总收益 --> <!-- 总收益 -->
<view wx:if="{{formData.sceneCode != 'SC004'}}"> <view wx:if="{{formData.sceneCode != 'SC004' && formData.sceneCode != 'SC003'}}">
<view class="profit-box flex-between"> <view class="profit-box flex-between">
<text>总收益</text> <text>总收益</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text> <text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text>
...@@ -69,8 +71,8 @@ ...@@ -69,8 +71,8 @@
</view> </view>
</view> </view>
<!-- 售后众筹 --> <!-- 售后众筹 -->
<view class="output-box" wx:if="{{formData.sceneCode == 'SC004'}}"> <view class="output-box" wx:if="{{formData.sceneCode == 'SC004' || formData.sceneCode == 'SC003'}}">
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004'}}" orderObj="{{crowdOrderObj}}" proIdx="{{formData.proIdx}}"></output-crowdfund> <output-crowdfund wx:if="{{formData.sceneCode == 'SC004' || formData.sceneCode == 'SC003'}}" orderObj="{{crowdOrderObj}}" sceneCode="{{formData.sceneCode}}" proIdx="{{formData.sceneCode == 'SC003' ? '0' : formData.proIdx}}" bindhandleReport="handleReport" bindhandleXiReport="handleXiReport"></output-crowdfund>
<view class="end-txt"> <view class="end-txt">
{{ crowdOrderObj.activityList.length ? '到底啦!' : '暂无数据' }} {{ crowdOrderObj.activityList.length ? '到底啦!' : '暂无数据' }}
</view> </view>
......
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js // packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import outputApi from '~/api/outputApi/index'
import { deleteSecond } from '~/utils/format'
const IMAGES = Object.freeze({ const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp` download: `${IMG_URL}/output/download.webp`
}) })
...@@ -16,6 +18,10 @@ Component({ ...@@ -16,6 +18,10 @@ Component({
type: Boolean, type: Boolean,
value: true value: true
}, },
sceneCode: {
type: String,
value: 'SC004'
},
proIdx: { proIdx: {
type: String, type: String,
value: '0' value: '0'
...@@ -61,11 +67,13 @@ Component({ ...@@ -61,11 +67,13 @@ Component({
{ {
label: '订单数', label: '订单数',
name: 'orderCount', name: 'orderCount',
SC003Name: 'totalOrderCount',
className: 'font-number' className: 'font-number'
}, },
{ {
label: '产值', label: '产值',
name: 'realAmount', name: 'realAmount',
SC003Name: 'totalOutputValue',
className: 'red font-number', className: 'red font-number',
prefix: '¥', prefix: '¥',
isNumber: true isNumber: true
...@@ -75,13 +83,48 @@ Component({ ...@@ -75,13 +83,48 @@ Component({
name: 'predictAmount', name: 'predictAmount',
className: 'font-number', className: 'font-number',
prefix: '¥', prefix: '¥',
isNumber: true isNumber: true,
isHide: false
} }
] ]
}, },
lifetimes: {
attached() {
let { sceneCode, merchantFormList } = this.data
if (sceneCode == 'SC003') {
let idx = merchantFormList.findIndex(item => item.name == 'predictAmount')
this.setData({
[`merchantFormList[${idx}].isHide`]: true
})
}
}
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: {} methods: {
/**战报 */
handleReport(e) {
this.triggerEvent('handleReport', e)
},
/**喜报 */
handleXiReport(e) {
this.triggerEvent('handleXiReport', e)
},
// 活动详情-跳转门店助手
toActivity(e) {
const { item } = e.currentTarget.dataset
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'packageShopmall/packageExpandedGold/pages/activity/index/index?id=' + item.activityId + '&noOperate=true',
envVersion: 'trial',
success(res) {
// 打开成功
}
})
},
}
}) })
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
} }
.merchant { .merchant {
padding: 0 32rpx 32rpx; padding: 0 0 32rpx;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52; box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
.head { .head {
...@@ -51,15 +51,21 @@ ...@@ -51,15 +51,21 @@
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
// height: 70rpx;
// line-height: 70rpx;
padding: 16rpx 0;
line-height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
border-bottom: 1rpx dashed #CCCED1;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.head-title {
box-sizing: border-box;
display: flex;
height: 60rpx;
line-height: 60rpx;
justify-content: space-between;
width: calc(100% - 40rpx);
border-bottom: 2rpx dotted #E0E0E0;
// padding-bottom: 14rpx;
}
.icon { .icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
...@@ -110,7 +116,22 @@ ...@@ -110,7 +116,22 @@
} }
} }
.bf-blue {
padding: 0;
}
.bf-blue::before {
display: inline-block;
content: '';
width: 6rpx;
height: 28rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
margin: 0 16rpx 0 0;
}
.content { .content {
padding: 0 32rpx;
&-title { &-title {
font-size: 28rpx; font-size: 28rpx;
...@@ -392,22 +413,21 @@ ...@@ -392,22 +413,21 @@
.new-report { .new-report {
display: flex; display: flex;
margin-top: 20rpx; margin-top: 20rpx;
height: 52rpx; height: 54rpx;
line-height: 52rpx; line-height: 54rpx;
font-size: 20rpx; font-size: 20rpx;
color: #5A6066; color: #5A6066;
.report-left { .report-left {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
font-size: 20rpx; font-size: 24rpx;
color: #3666FE; color: #3666FE;
padding: 0 20rpx; padding: 0 20rpx;
height: 100%; height: 100%;
background: rgba(54, 102, 254, 0.06);
border: 2rpx solid rgba(62, 113, 254, 0.70); border: 2rpx solid rgba(62, 113, 254, 0.70);
border-radius: 30rpx; border-radius: 30rpx;
margin-right: 4rpx; margin-right: 32rpx;
.icon-report { .icon-report {
width: 32rpx; width: 32rpx;
......
...@@ -16,22 +16,31 @@ ...@@ -16,22 +16,31 @@
</view> </view>
</view> </view>
<view class="crowdfund-box merchant" wx:for="{{orderObj.activityList}}" wx:key="index"> <view class="crowdfund-box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head"> <view class="head bf-blue">
<!-- text-hide --> <!-- text-hide -->
<glsx-image src="output/icon-head.png" class="icon" /> <!-- <glsx-image src="output/icon-head.png" class="icon" /> -->
<view class="head-title">{{item.merchantName}}</view> <view class="head-title">{{item.merchantName}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="content-title" data-item="{{item}}"> <view class="content-title" data-item="{{item}}">
{{item.activityName}} {{item.activityName}}
</view> </view>
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx"> <view wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-row" wx:if="{{!subItem.isHide}}">
<view class="content-label">{{subItem.label}}</view> <view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}"> <view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text> <text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{subItem.isNumber ? filter.money_three_for_two_thousands(item[subItem.name]) : item[subItem.name]}} {{subItem.isNumber ? filter.money_three_for_two_thousands(item[sceneCode == 'SC003' ? (subItem.SC003Name || subItem.name) : subItem.name]) : item[sceneCode == 'SC003' ? (subItem.SC003Name || subItem.name) : subItem.name]}}
</view> </view>
</view> </view>
</view> </view>
<!-- 战报 -->
<view class="new-report" wx:if="{{sceneCode == 'SC003'}}">
<view class="report-left" wx:if="{{item.activityStatus != 1}}" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view>
<view class="report-left" wx:if="{{item.activityStatus != 1}}" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view>
<view class="report-left" bindtap="toActivity" data-item="{{item}}" data-idx="{{index}}">活动详情</view>
</view>
</view>
</view> </view>
</view> </view>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{false}}" bindlongtouch="longtouch" />
\ No newline at end of file \ No newline at end of file
...@@ -39,6 +39,10 @@ Component({ ...@@ -39,6 +39,10 @@ Component({
label: '会员权益/升级', label: '会员权益/升级',
asc: '', asc: '',
value: 3 value: 3
}, {
label: '次新车转化',
asc: '',
value: 10
}], }],
'SC002': [{ 'SC002': [{
label: '营业额', label: '营业额',
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
.sort-scroll { .sort-scroll {
display: flex; display: flex;
width: calc(100% - 196rpx); width: 100%;
// width: calc(100% - 196rpx);
.item { .item {
display: flex; display: flex;
......
<!--pages/tab/output/components/sortTab/sortTab.wxml--> <!--pages/tab/output/components/sortTab/sortTab.wxml-->
<view class="sort-tab"> <view class="sort-tab">
<ciew class="title">{{title}}</ciew> <!-- <ciew class="title">{{title}}</ciew> -->
<scroll-view class="sort-scroll" scroll-x="true"> <scroll-view class="sort-scroll" scroll-x="true">
<view class="flex"> <view class="flex">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="item" bindtap="handleSort" data-idx="{{index}}"> <view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="item" bindtap="handleSort" data-idx="{{index}}">
......
...@@ -61,9 +61,17 @@ Component({ ...@@ -61,9 +61,17 @@ Component({
let attrToNum = { let attrToNum = {
'': 'totalStat', '': 'totalStat',
'1': 'vdStat', '1': 'vdStat',
'2': 'boutiqueStat' '2': 'boutiqueStat',
'3': 'carTransformStat'
} }
_list = res[attrToNum[staffSearchData.sceneType || '']] || [] _list = res[attrToNum[staffSearchData.sceneType || '']] || []
if (staffSearchData.sceneType == '3') {
_list.forEach(item => {
item.list?.forEach(k => {
k.totalOutputValue = (k.totalOutputValue / 100).toFixed(2)
})
})
}
this.setData({ this.setData({
staffList: _list staffList: _list
}) })
......
...@@ -75,7 +75,7 @@ Page({ ...@@ -75,7 +75,7 @@ Page({
// 重新刷新 // 重新刷新
// let { detail } = e || null // let { detail } = e || null
// console.log(detail) // console.log(detail)
console.log(e) // console.log(e)
if (e) { if (e) {
this.setUserInfo() this.setUserInfo()
let clientModule = this.selectComponent('#client') let clientModule = this.selectComponent('#client')
......
import { preReleaseAppId } from '~/config' import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
// const mockObj = {
// test: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=business-assistant-config&env=test',
// product: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=business-assistant-config&env=production'
// }
const mockObj = { const mockObj = {
test: 'https://oss-config.dev.glsx.com.cn/mock/63fd6c2034c4d918e2f4df4d/config', test: 'https://oss-config.dev.glsx.com.cn/mock/63fd6c2034c4d918e2f4df4d/config',
product: 'https://oss-config.test.glsx.com.cn/mock/63ff0b507dc47c4edc786e82/config' product: 'https://oss-config.test.glsx.com.cn/mock/63ff0b507dc47c4edc786e82/config'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!