Commit 729d2d4a by 前端

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

上线合并

See merge request !29
2 parents 1734315f a4aca32a
...@@ -527,4 +527,8 @@ module.exports = { ...@@ -527,4 +527,8 @@ module.exports = {
'/rop-dj-business-school-miniprogram/router' '/rop-dj-business-school-miniprogram/router'
) )
}, },
// 获取潜客列表
getPotentialCustomersPage(data) {
return api.post('dj.api.staff.miniprogram.recruitment.demand.potentialCustomers.page', data)
},
} }
...@@ -100,7 +100,9 @@ ...@@ -100,7 +100,9 @@
"pages/performanceRating/batchOperation/batchOperation", "pages/performanceRating/batchOperation/batchOperation",
"pages/validReferralCount/referraCountEdit/referraCountEdit", "pages/validReferralCount/referraCountEdit/referraCountEdit",
"pages/attendanceStatis/attendanceDetail/attendanceDetail", "pages/attendanceStatis/attendanceDetail/attendanceDetail",
"pages/appealFormManage/appealFormDetail/appealFormDetail" "pages/appealFormManage/appealFormDetail/appealFormDetail",
"pages/cashFlowReview/pages/cashFlowList/cashFlowList",
"pages/cashFlowReview/pages/cashFlowDetail/cashFlowDetail"
] ]
}, },
{ {
......
import api from '~/utils/request/request.js'
module.exports = {
// 获取流水审批列表
getCashFlowReviewList(data) {
return api.post('dj.api.smartcarlife.abnormalFlowDeclaration.page', data)
},
// 获取流水审批详情
getCashFlowDetail(data) {
return api.post('dj.api.smartcarlife.abnormalFlowDeclaration.detail', data)
},
// 流水审批
auditCashFlow(data) {
return api.post('dj.api.smartcarlife.abnormalFlowDeclaration.regionManagerApprove', data)
},
// 获取运营经理关联的所有4s店数据
getMerchantListByRole(data) {
return api.post('dj.api.smartcarlife.abnormalFlowDeclaration.getAreaSupervisionShops', data)
}
}
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/orderApprovalManage/components/approvalPopup/approvalPopup.js
Component({
/**
* 组件的属性列表
*/
properties: {
infoData: {
type: Object
},
show: {
type: Boolean,
observer: function(val) {
this.setData({remark: '', contentLength: 0})
}
}
},
/**
* 组件的初始数据
*/
data: {
contentLength: 0,
remark: ''
},
/**
* 组件的方法列表
*/
methods: {
textAreaInput(e) {
let val = e.detail.value || ""
if (val.length > 200) {
val = val.substring(0, 200)
}
this.setData({
remark: val,
contentLength: val.length
})
},
onConfirm() {
let { infoData, remark } = this.data
if (infoData.type == 2 && !remark) return wx.$util.showToast('请输入驳回备注')
this.triggerEvent('confirm', remark)
},
onCancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageWorkspace/pages/orderApprovalManage/components/approvalPopup/approvalPopup.wxss */
.container {
.label {
margin: 32rpx 0 16rpx;
font-size: 28rpx;
color: #222222;
.requiredLabel {
color: #F24724;
}
}
.textarea-wrap{
position: relative;
.textarea-input {
width: 100%;
height: 550rpx;
border-radius: 28rpx;
background: #f4f5f7;
padding: 24rpx;
box-sizing: border-box;
font-size: 28rpx;
}
.counter {
position: absolute;
right: 16rpx;
bottom: 8rpx;
font-size: 24rpx;
color: #BBBBBB;
}
}
.tips {
color: #999999;
font-size: 26rpx;
margin: 16rpx 0;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageWorkspace/pages/orderApprovalManage/components/approvalPopup/approvalPopup.wxml-->
<popup show="{{show}}" title="{{infoData.title}}" height="68%" bind:confirm="onConfirm" bind:cancel="onCancel" customPopupSlotStyle="overflow:auto;">
<scroll-view class="container">
<view class="label">{{infoData.label}}<text class="requiredLabel" wx:if="{{infoData.type == 2}}">*</text></view>
<view class="textarea-wrap">
<textarea class="textarea-input" placeholder-style="color:#BEC1C7" placeholder="请输入" maxlength="200" value="{{remark}}" bindinput="textAreaInput" />
<view class="counter">{{contentLength}}/200</view>
</view>
<view wx:if="{{infoData.type == 3}}" class="tips">审批通过后将自动流转至线上运营审批</view>
<view wx:if="{{infoData.type == 2}}" class="tips">驳回后流转至驻店报备节点</view>
</scroll-view>
</popup>
\ No newline at end of file \ No newline at end of file
// 异常类型
const exceptionTypes = [
{
name: '已付款未录单',
value: '1'
},
{
name: '多流水对应一单',
value: '2'
},
{
name: '一流水对应多单',
value: '3'
},
{
name: '对公收款',
value: '4'
},
{
name: '混合支付',
value: '5'
},
{
name: '金额不一致',
value: '6'
},
{
name: '其他异常',
value: '7'
}
]
// 收款来源
const payTypeMap = [
{
name: '线上微信支付',
value: '1'
},
{
name: '线下收款',
value: '2'
},
{
name: 'POS机收款',
value: '3'
},
{
name: '支付宝支付',
value: '4'
},
{
name: '嘀加收款',
value: '5'
},
{
name: '对公转账',
value: '6'
},
{
name: '其他收款',
value: '7'
}
]
// 分账状态
const distributionStatusMap = [
{
name: '未分账',
value: '0'
},
{
name: '已分帐',
value: '1'
}
]
// 退款状态
const refundStatusMap = [
{
name: '未退款',
value: '0'
},
{
name: '已退款',
value: '1'
}
]
export default{
exceptionTypes,
payTypeMap,
distributionStatusMap,
refundStatusMap
}
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail.js
import NP from 'number-precision'
import dayjs from "dayjs"
import constantData from '../../constant'
import cashflowApi from '~/packageWorkspace/pages/cashFlowReview/api'
Page({
/**
* 页面的初始数据
*/
data: {
// 订单信息
detailInfo: {
tradeInfo: {}, // 流水信息
declarationInfo: {}, // 报备信息
approvalLogs: [] // 审批日志
},
constantData,
approvalStatusMap: {
'1': {name: '待审批', color: '#FF9D0A', background: '#ff9d0a1a'},
'2': {name: '审批驳回', color: '#F24724', background: '#f247241a'},
'3': {name: '待线上运营审批', color: '#7A66FE', background: '#7a66fe14'},
'5': {name: '审批通过', color: '#35C376', background: '#35C3761a'}, //
'4': {name: '审批驳回', color: '#F24724', background: '#f247241a'}
},
orderForm:[{
label: '交易参考号',
key: 'tradeNo'
}, {
label: '原支付金额',
key: 'totalPrice',
unit: '¥',
customerClass: 'blue-text'
}, {
label: '结余金额',
key: 'notRefundedTotalPrice',
unit: '¥',
customerClass: 'blue-text'
}, {
label: '终端编码',
key: 'posTrmNo'
}, {
label: '支付时间',
key: 'payDateStr'
}, {
label: '所属园区店',
key: 'yqMerchantName'
}, {
label: '支付渠道',
key: 'payChannel'
}, {
label: '收款来源',
key: 'payTypeText'
}, {
label: '分账状态',
key: 'distributionStatusText'
}, {
label: '所属流量方',
key: 'merchantName'
}, {
label: '退款状态',
key: 'refundStatusText'
}],
registerForm: [{
label: '驻店姓名',
key: 'createdBy'
}, {
label: '提交报备时间',
key: 'createdDate'
}, {
label: '异常类型',
key: 'abnormalTypeText'
}, {
label: '凭证',
key: 'voucherImageUrls',
image: true,
flexStart: true
}, {
label: '报备备注',
key: 'remark',
flexStart: true
}],
statusForShow: {
3: { text: '区域运营审批', status: '通过' },
5: { text: '线上运营审批', status: '通过' },
2: { text: '区域运营审批', status: '驳回' },
4: { text: '线上运营审批', status: '驳回' }
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 可以从 options 中获取订单ID,然后加载详情
const { id } = options
this.setData({queryId: id})
if (id) {
this.loadOrderDetail(id)
}
},
processOrderData(rawOrder) {
if (!rawOrder) return rawOrder
const processed = { ...rawOrder }
// 处理普通商品订单(goodsOrderDTO)
if (processed.goodsOrderDTO) {
processed.goodsOrderDTO = this.addPackagePrice(processed.goodsOrderDTO)
}
// 处理原错误订单(oldGoodsOrderDTO)
if (processed.oldGoodsOrderDTO) {
processed.oldGoodsOrderDTO = this.addPackagePrice(processed.oldGoodsOrderDTO)
}
return processed
},
addPackagePrice(orderDTO) {
const dto = { ...orderDTO }
if (Array.isArray(dto.packageGoodsList)) {
dto.packageGoodsList = dto.packageGoodsList.map(pkg => {
let total = 0
if (Array.isArray(pkg.packageGoodsOrderList)) {
total = pkg.packageGoodsOrderList.reduce((sum, item) => {
// const itemTotal = NP.times(item.finalPrice || 0, item.number || 1)
return NP.plus(sum, item.finalPrice)
}, 0)
}
return {
...pkg,
packagePrice: total
}
})
}
return dto
},
previewImage(e) {
let { url, index } = e.currentTarget.dataset
let urlList = url.map(v => {
return v.payVoucher
})
wx.previewImage({
urls: urlList,
current: urlList[index]
})
},
/**
* 加载订单详情
*/
loadOrderDetail(id) {
let { orderForm } = this.data
wx.$util.showLoading()
cashflowApi.getCashFlowDetail({id}).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
// 异常类型
data.declarationInfo.abnormalTypeText = constantData.exceptionTypes.find(v => v.value == data.declarationInfo?.abnormalType)?.name
// 收款来源
data.tradeInfo.payTypeText = constantData.payTypeMap?.find(v => v.value == data.tradeInfo.payType)?.name
// 分账状态
data.tradeInfo.distributionStatusText = constantData.distributionStatusMap?.find(v => v.value == data.tradeInfo.distributionStatus)?.name
// 退款状态
data.tradeInfo.refundStatusText = constantData.refundStatusMap?.find(v => v.value == data.tradeInfo.refundStatus)?.name
// 处理审批日志时间字段
data?.approvalLogs?.forEach(val => {
val.createdDateStr = val.createdDate ? dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
})
if (data.tradeInfo.payDate) {
data.tradeInfo.payDateStr = dayjs(data.tradeInfo.payDate).format('YYYY-MM-DD HH:mm:ss')
}
this.setData({
detailInfo: data || {tradeInfo: {}, declarationInfo: {}, approvalLogs: []}
})
} else {
wx.$util.showToast(message)
}
})
},
/**
* 通过审批
*/
pass() {
this.setData({
showPopup: true,
popupInfo: {
type: '3',
title: '审批通过',
label: '通过备注'
}
})
},
/**
* 驳回
*/
reject() {
this.setData({
showPopup: true,
popupInfo: {
type: '2',
title: '审批驳回',
label: '驳回备注'
}
})
},
/**
* 提交审批结果
*/
handlePopupConfirm(e) {
if (this.data.submitFlag) return
this.setData({
submitFlag: true
})
wx.$util.showLoading()
const { popupInfo, queryId } = this.data
cashflowApi.auditCashFlow({approvalStatus: popupInfo?.type, id: queryId, remark: e.detail}).then(res => {
wx.$util.hideLoading()
this.setData({
submitFlag: false
})
let { code, data, message } = res
if (code == 0) {
this.loadOrderDetail(queryId)
const pages = getCurrentPages()
if (pages?.[pages.length - 2]) { // 从列表进入,审批后返回列表页
wx.navigateBack()
} else { // 企微消息直接进入页面 审批后关闭页面跳转到列表页
wx.reLaunch({url: '/packageWorkspace/pages/cashFlowReview/pages/cashFlowList/cashFlowList'})
}
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
this.setData({
submitFlag: false
})
})
},
hidePopup() {
this.setData({showPopup: false})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"approval-popup": "../../components/approvalPopup/approvalPopup"
},
"navigationBarTitleText": "审批详情"
}
\ No newline at end of file \ No newline at end of file
page {
background: #F2F3F7;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.flex {
display: flex;
align-items: center;
}
.column {
flex-flow: column;
}
.flex-start {
align-items: flex-start;
}
.page-container {
padding: 24rpx;
.content-scroll {
.status-section {
.status-text {
font-size: 36rpx;
font-weight: 500;
color: #222222;
margin-left: 20rpx;
}
.status-tip {
font-size: 26rpx;
color: #999999;
margin-left: 52rpx;
}
}
.section {
border-radius: 32rpx;
background: #ffffff;
margin: 24rpx 0;
padding: 24rpx 32rpx;
.section-title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
color: #222222;
margin-bottom: 24rpx;
.status {
font-size: 24rpx;
font-weight: 400;
height: 48rpx;
line-height: 48rpx;
border-radius: 8rpx;
padding: 0 12rpx;
}
}
.info-item {
display: flex;
align-items: center;
font-size: 26rpx;
color: #222222;
margin-bottom: 12rpx;
&.flex-start {
align-items: flex-start;
}
&:last-child {
margin-bottom: 0;
}
.info-label {
width: 184rpx;
margin-right: 32rpx;
color: #999999;
flex-shrink: 0;
}
.blue-text {
color: #2C66F7;
}
.info-value {
word-break: break-all;
.text-hide {
max-width: 280rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.name {
max-width: 120rpx;
}
}
.split {
margin: 0 8rpx;
}
}
}
.image-value {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 16rpx;
.image-item {
width: 112rpx;
height: 112rpx;
border-radius: 16rpx;
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;
}
.value {
word-break: break-all;
}
}
}
}
}
}
}
.empty-box {
width: 100%;
height: 180rpx;
}
.footerBtn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
z-index: 99;
padding: 20rpx 32rpx;
.btn {
width: 320rpx;
height: 80rpx;
border-radius: 20rpx;
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
}
.cancel {
height: 76rpx;
line-height: 76rpx;
border: 2rpx solid #2C66F7;
background: #f0f4ff;
color: #2C66F7;
}
.confirm {
color: #ffffff;
font-weight: 500;
height: 80rpx;
line-height: 80rpx;
background: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail.wxml-->
<view class="page-container">
<!-- 页面内容 -->
<view class="content-scroll">
<view class="status-section" wx:if="{{detailInfo.declarationInfo.approvalStatus == 1}}">
<view class="status-badge">
<van-icon name="more-o" color="#FF9D0A"></van-icon>
<text class="status-text">待审批</text>
</view>
<text class="status-tip">请尽快处理</text>
</view>
<!-- 审批日志 -->
<view class="section" wx:if="{{detailInfo.declarationInfo.approvalStatus != 1 && detailInfo.approvalLogs.length}}">
<view class="section-title">
<view>审批日志</view>
<view class="status text-center" style="color:{{ approvalStatusMap[detailInfo.declarationInfo.approvalStatus].color }};background-color:{{approvalStatusMap[detailInfo.declarationInfo.approvalStatus].background }};">
{{approvalStatusMap[detailInfo.declarationInfo.approvalStatus].name }}
</view>
</view>
<view class="log-box" wx:for="{{detailInfo.approvalLogs}}" 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="{{detailInfo.approvalLogs.length > 1 && index != (detailInfo.approvalLogs.length - 1)}}" class="statusLine step-done"></view>
</view>
<view class="timeline-content">
<view class="status-text">
<text class='mar-r16'>{{statusForShow[item.approvalStatus].text}}</text>
<text class="status mar-r16 {{ item.approvalStatus == 3 || item.approvalStatus == 5 ? 'success' : 'error' }}">{{statusForShow[item.approvalStatus].status}}</text>
<block wx:if="{{item.approvalStatus == 2 || item.approvalStatus == 4}}">
<text class="mar-r16">至</text>
<text>驻店销售</text>
</block>
</view>
<view class="flex" wx:if="{{item.remark}}">
<view class="label">{{item.approvalStatus == 3 || item.approvalStatus == 5 ? '备注' : '驳回备注'}}</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="section">
<view class="section-title">流水信息</view>
<view class="info-item flex-start" wx:for="{{orderForm}}" wx:key="index">
<text class="info-label">{{item.label}}</text>
<block>
<text class="info-value {{item.customerClass}}"><text style="margin-right: 8rpx;" wx:if="{{item.unit}}">{{item.unit}}</text>{{ detailInfo.tradeInfo[item.key] || '-' }}</text>
</block>
</view>
</view>
<!-- 驻店报备信息 -->
<view class="section">
<view class="section-title">驻店报备信息</view>
<view class="info-item flex-start" wx:for="{{registerForm}}" wx:key="index">
<text class="info-label">{{item.label}}</text>
<block wx:if="{{item.image}}">
<view class="image-value" wx:if="{{detailInfo.declarationInfo[item.key].length}}">
<view class="image-item" bindtap="previewImage" data-index="{{ subIndex }}" data-url="{{ detailInfo.declarationInfo[item.key] }}" wx:for="{{detailInfo.declarationInfo[item.key]}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<image src="{{subItem}}" mode=""/>
</view>
</view>
<view wx:else>-</view>
</block>
<block wx:else>
<text class="info-value"><text style="margin-right: 8rpx;" wx:if="{{item.unit}}">{{item.unit}}</text>{{ detailInfo.declarationInfo[item.key] || '-' }}</text>
</block>
</view>
</view>
<view class="empty-box"></view>
</view>
<view wx:if="{{detailInfo.declarationInfo.approvalStatus == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn cancel" bindtap="reject">驳回</view>
<view class="btn confirm" bindtap="pass">通过</view>
</view>
</view>
<approval-popup wx:if="{{showPopup}}" show="{{ showPopup }}" infoData="{{popupInfo}}" bindconfirm="handlePopupConfirm" bindcancel="hidePopup"></approval-popup>
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/cashFlowReview/pages/cashFlowList/cashFlowList.js
import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
import constantData from '../../constant'
import cashflowApi from '~/packageWorkspace/pages/cashFlowReview/api'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
filterObj: {
merchantId: '',
approvalStatuses: '1',
date: ''
},
maxDate: new Date().format('yyyy-MM-dd'),
merchantMap: {
'': '门店名称'
},
approvalStatusesMap: {
'': '流水状态',
'1': '待审批',
'3': '待线上运营审批',
'5': '审批通过',
'2,4': '审批驳回'
},
listAuditStatusMap: {
'1': {name: '待审批', color: '#FF9D0A', background: '#ff9d0a1a'},
'2': {name: '审批驳回', color: '#F24724', background: '#f247241a'}, // 包含区域经理驳回和线上运营驳回
'3': {name: '待线上运营审批', color: '#7A66FE', background: '#7a66fe14'},
'5': {name: '审批通过', color: '#35C376', background: '#35C3761a'}, //
'4': {name: '审批驳回', color: '#F24724', background: '#f247241a'}
},
merchantList: [{
merchantId: '',
merchantName: '全部'
}, {
merchantId: 123456,
merchantName: '明明崇文明明崇文明明崇文明明崇文明明崇文'
}, {
merchantId: 123123,
merchantName: '崇文11'
}],
constantData,
approvalStatusesList: [{
name: '全部',
value: ''
}, {
name: '待审批',
value: '1'
}, {
name: '待线上运营审批',
value: '3'
}, {
name: '审批通过',
value: '5'
}, {
name: '审批驳回',
value: '2,4'
}],
list: [],
orderItems: [{
label: '驻店姓名',
key: 'submitterName'
}, {
label: '异常类型',
key: 'abnormalTypeText',
}, {
label: '交易参考号',
key: 'tradeNo'
}, {
label: '原支付金额',
key: 'totalPrice',
unit: '¥',
customerClass: 'blue-text'
}, {
label: '结余金额',
key: 'notRefundedTotalPrice',
unit: '¥',
customerClass: 'blue-text'
}, {
label: '支付时间',
key: 'accountDateStr'
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getSearchMerchantList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.search()
},
getSearchMerchantList() {
cashflowApi.getMerchantListByRole({}).then(res => {
const allItems = [{merchantId: '', merchantName: '全部'}]
this.setData({
merchantList: allItems.concat(res?.data)
})
})
},
input(e) {
let { value } = e.detail
this.setData({sellerName: value})
},
clear() {
this.setData({sellerName: ''})
this.search()
},
search() {
this.setData({
list: [],
pageNum: 1,
flag: false,
nothing: false,
})
this.getList()
},
getList() {
let { pageNum, nothing, filterObj, sellerName, endStr, startStr } = this.data
let userInfo = wx.$util.getUserInfo()
// 未获取到再获取一次
if ((userInfo?.sceneType) ?? '' === '') userInfo = wx.$util.getUserInfo()
if (nothing) return
wx.$util.showLoading()
let params = {
sellerName,
appShopMerchantId: filterObj.merchantId,
approvalStatuses: filterObj.approvalStatuses ? filterObj.approvalStatuses?.split(',') : [],
pageNum,
pageSize: 10,
accountStartDate: startStr ? `${startStr} 00:00:00` : '',
accountEndDate: endStr ? `${endStr} 23:59:59` : ''
}
cashflowApi.getCashFlowReviewList(params).then(res => {
wx.$util.hideLoading()
let total = 0
let list = []
let {
code,
data,
message
} = res
data?.list?.forEach(val => {
val.abnormalTypeText = constantData.exceptionTypes?.find(v => v.value == val.abnormalType)?.name
val.accountDateStr = val.accountDate ? dayjs(val.accountDate).format('YYYY-MM-DD HH:mm:ss') : '-'
})
if (code == 0) {
list = data.list
total = data.total
} else {
wx.$util.showToast(message)
}
if (total != 0) {
this.setData({
[`list[${pageNum - 1}]`]: list
})
}
this.setData({
total,
flag: true,
triggered: false,
pageNum: pageNum + 1,
nothing: pageNum == data?.pages
})
})
},
scrollonReachBottom() {
this.getList()
},
handleDetail(e) {
let { target } = e.currentTarget.dataset
wx.navigateTo({
url: `/packageWorkspace/pages/cashFlowReview/pages/cashFlowDetail/cashFlowDetail?id=${target.id}`,
})
},
rangeSelect(e) {
let {
date: { start, end }
} = e.detail
this.setData({
['filterObj.date']: `${start} 至 ${end}`,
startStr: start,
endStr: end
}, () => {
this.search()
})
},
// 重置筛选条件
handleFilterReset() {
this.setData({
filterObj: {
merchantId: '',
approvalStatuses: '',
date: ''
},
startStr: '',
endStr: '',
merchantMap: {'': '门店名称'}
}, () => {
this.search()
})
},
// 选择门店
handleMerchantFilter() {
let {
filterObj,
merchantList
} = this.data
this.setData({
showSelectPopup: true,
selectOptions: merchantList,
selectTitle: '选择门店',
selectMultiple: false,
selectValue: [filterObj.merchantId],
selectType: 'merchantId',
labelKey: 'merchantName',
valueKey: 'merchantId'
})
},
// 选择处理状态
handleOrderStatusFilter() {
let {
filterObj,
approvalStatusesList
} = this.data
this.setData({
showSelectPopup: true,
selectOptions: approvalStatusesList,
selectTitle: '选择状态',
selectMultiple: false,
selectValue: [filterObj.approvalStatuses],
selectType: 'approvalStatuses',
labelKey: 'name',
valueKey: 'value'
})
},
handlePopupConfirm(e) {
let { values, items } = e.detail
let { selectType } = this.data
if (selectType == 'merchantId') {
this.setData({
merchantMap: values[0] ? {[items[0].merchantId]: items[0].merchantName} : {'': '门店名称'}
})
}
this.setData({
[`filterObj.${selectType}`]: values[0]
}, () => {
this.search()
})
this.hideSelectPopup()
},
hideSelectPopup() {
this.setData({
showSelectPopup: false
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"select-popup": "/packageWorkspace/components/selectPopup/selectPopup"
},
"navigationBarTitleText": "流水审批"
}
\ No newline at end of file \ No newline at end of file
/* packageWorkspace/pages/cashFlowReview/pages/cashFlowList/cashFlowList.wxss */
page {
background: #F2F3F7;
}
.list-page {
.flex {
display: flex;
align-items: center;
}
.top-box {
background: #FFFFFF;
padding: 16rpx 24rpx 24rpx;
.search-input {
background: #F7F8FA;
border-radius: var(--fontSize72);
width: 100%;
height: var(--fontSize72);
display: flex;
align-items: center;
margin-bottom: 16rpx;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.input {
font-size: var(--fontSize28);
height: var(--fontSize38);
line-height: var(--fontSize38);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: #BBBBBB;
}
}
.filter-box {
justify-content: space-between;
.filter-item {
height: 56rpx;
border-radius: 56rpx;
background: #F7F8FA;
padding: 0 16rpx 0 24rpx;
font-size: 26rpx;
color: #666666;
margin-right: 16rpx;
&.active {
color: #2C66F7;
}
.hide-text {
max-width: 150rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
text {
line-height: 40rpx;
}
image {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
}
.reset-btn {
color: #222222;
font-size: 26rpx;
}
}
}
.list {
.empty-box {
width: 100%;
height: 24rpx;
}
.item {
margin: 0 24rpx 24rpx;
border-radius: 32rpx;
background: #FFFFFF;
padding: 24rpx 32rpx;
.item-top {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 -24rpx;
padding: 0 24rpx;
font-size: 26rpx;
font-weight: 500;
color: #666666;
.code {
width: calc(100% - 220rpx);
}
.code-text {
display: inline-block;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
color: #222222;
font-size: 32rpx;
}
.status {
height: 48rpx;
line-height: 48rpx;
border-radius: 8rpx;
padding: 0 12rpx;
}
}
.order-list {
padding: 24rpx 0;
font-size: 26rpx;
.order {
margin-bottom: 12rpx;
font-size: 26rpx;
color: #222222;
&:last-child {
margin-bottom: 0;
}
.order-label {
width: 184rpx;
margin-right: 32rpx;
color: #999999;
}
.order-value {
width: calc(100% - 184rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.blue-text {
color: #2C66F7;
}
}
}
.btn-box {
justify-content: flex-end;
font-weight: 500;
.label {
font-size: 26rpx;
color: #666666;
margin-right: 16rpx;
}
.btn {
font-weight: 400;
width: 168rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 16rpx;
font-size: 26rpx;
color: #2C66F7;
background: #2c66f71a;
&.primary {
color: #FFFFFF;
background: #2c66f7;
}
}
}
}
}
.list-nothing {
padding: 0 0 50rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!-- packageWorkspace/pages/cashFlowReview/pages/cashFlowList/cashFlowList.wxml-->
<view class="list-page">
<view class="top-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名/交易参考号/门店名称" class="input" value="{{ sellerName }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ sellerName }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<view class="filter-box flex">
<view class="flex">
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" calenderColor="#347BFF" vertical dateType='range' minDate="2025-06-01" maxDate="{{ maxDate }}" isComponents>
<view class="filter-item flex {{filterObj.date ? 'active': ''}}">
<text class="hide-text">{{filterObj.date || '支付时间'}}</text>
<image src="{{IMG_URL}}{{filterObj.date ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view>
</calendar>
<view class="filter-item flex {{filterObj.merchantId ? 'active': ''}}" bindtap="handleMerchantFilter">
<text class="hide-text">{{merchantMap[filterObj.merchantId]}}</text><image src="{{IMG_URL}}{{filterObj.merchantId ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view>
<view class="filter-item flex {{filterObj.approvalStatuses ? 'active': ''}}" bindtap="handleOrderStatusFilter">
<text class="hide-text">{{approvalStatusesMap[filterObj.approvalStatuses]}}</text><image src="{{IMG_URL}}{{filterObj.approvalStatuses ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view>
</view>
<view class="reset-btn" bindtap="handleFilterReset">重置</view>
</view>
</view>
<scroll-view scroll-y enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom"
class="list"
style="height:calc(100vh - var(--fontSize184));"
refresher-threshold="104"
refresher-triggered="{{ triggered }}">
<block wx:if="{{ list.length > 0 }}">
<view class="empty-box"></view>
<block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
<view
data-ind="{{ ind }}"
data-index="{{ index }}"
>
<view
class="item content"
data-ind="{{ ind }}"
data-index="{{ index }}"
data-item="{{ li }}"
>
<view class="item-top">
<view class="code">
<text class="code-text">{{li.merchantName}}</text>
</view>
<view class="status text-center" style="color:{{ listAuditStatusMap[li.approvalStatus].color }};background-color:{{listAuditStatusMap[li.approvalStatus].background }};">
{{listAuditStatusMap[li.approvalStatus].name }}
</view>
</view>
<view class="order-list">
<block wx:for="{{orderItems }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order flex">
<view class="order-label">{{i.label}}</view>
<view class="order-value {{i.customerClass}}">
<block><text wx:if="{{i.unit}}">{{i.unit}}</text>{{li[i.key] || ''}}</block>
</view>
</view>
</block>
</view>
<view class="btn-box flex">
<view bindtap="handleDetail" data-target="{{li}}" class="btn {{li.approvalStatus == 1 ? 'primary' : ''}}">{{li.approvalStatus == 1 ? '去审批' : '查看'}}</view>
</view>
</view>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</scroll-view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" height="60%" multiple="{{ selectMultiple }}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" title="{{ selectTitle }}" bindcancel="hideSelectPopup" customIsTab="{{ true }}" labelKey="{{labelKey}}" valueKey="{{valueKey}}"></select-popup>
\ No newline at end of file \ No newline at end of file
...@@ -48,6 +48,15 @@ module.exports = { ...@@ -48,6 +48,15 @@ module.exports = {
'/rop-dj-staff-miniprogram/router' '/rop-dj-staff-miniprogram/router'
) )
}, },
// 获取潜客门店列表
getPotentialCustomersPage(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.potentialCustomers.page',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 招聘管理字典查询 // 招聘管理字典查询
getStaffDictListAPI(data) { getStaffDictListAPI(data) {
return api.post( return api.post(
......
...@@ -7,27 +7,24 @@ ...@@ -7,27 +7,24 @@
<view class="checkbox {{ bySystemMerchant ? 'checked' : '' }}"> <view class="checkbox {{ bySystemMerchant ? 'checked' : '' }}">
<van-icon wx:if="{{ bySystemMerchant }}" name="success" size="12px" color="#fff" /> <van-icon wx:if="{{ bySystemMerchant }}" name="success" size="12px" color="#fff" />
</view> </view>
<text class="checkbox-text">未创建系统门店</text> <!-- <text class="checkbox-text">未创建系统门店</text> -->
<text class="checkbox-text">选择潜客门店</text>
</view> </view>
</view> </view>
</view> </view>
<view class="form"> <view class="form">
<block wx:for="{{ formList }}" wx:key="index"> <block wx:for="{{ formList }}" wx:key="index">
<block wx:if="{{ index === 0 || index > 4 || (index > 0 && index <= 4 && bySystemMerchant) }}">
<view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}"> <view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label"> <view class="label">
{{item.label}} {{item.label}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text> <text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view> </view>
<view class="value" wx:if="{{ item.label === '门店名称' && bySystemMerchant }}"> <view class="value" wx:if="{{ item.label === '门店名称' }}">
<input class="number-input" type="text" placeholder="请输入门店名称" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onStoreNameInput" maxlength="50" />
</view>
<view class="value" wx:elif="{{ item.label === '门店名称' && !bySystemMerchant }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text> <text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view> </view>
<view class="value" wx:elif="{{ item.label === '近一月新车销量' }}"> <!-- <view class="value" wx:elif="{{ item.label === '近一月新车销量' }}">
<input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onSalesInput" /> <input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onSalesInput" />
</view> </view>
<view class="value" wx:elif="{{ item.label === '所属省市' }}"> <view class="value" wx:elif="{{ item.label === '所属省市' }}">
...@@ -41,11 +38,11 @@ ...@@ -41,11 +38,11 @@
</view> </view>
<view class="value" wx:elif="{{ item.label === '详细地址' }}"> <view class="value" wx:elif="{{ item.label === '详细地址' }}">
<input class="number-input" type="text" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onAddressDetailInput" maxlength="60" /> <input class="number-input" type="text" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onAddressDetailInput" maxlength="60" />
</view> </view> -->
<view class="value" wx:elif="{{ item.label === '是否急招' }}"> <view class="value" wx:elif="{{ item.label === '是否急招' }}">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" /> <switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view> </view>
<view class="value" wx:elif="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' && item.label !== '详细地址' }}"> <view class="value" wx:elif="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text> <text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
...@@ -62,7 +59,6 @@ ...@@ -62,7 +59,6 @@
</block> </block>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="footer"> <view class="footer">
<view class="btn" bind:tap="submit">提交</view> <view class="btn" bind:tap="submit">提交</view>
...@@ -75,7 +71,7 @@ ...@@ -75,7 +71,7 @@
<!-- 固定顶部区域 --> <!-- 固定顶部区域 -->
<view class="popup-fixed-top"> <view class="popup-fixed-top">
<view class="popup-title">选择{{currentItem.label}}</view> <view class="popup-title">选择{{currentItem.label}}</view>
<view class="search-box" wx:if="{{ currentIndex === 0 || currentIndex === 2 }}"> <view class="search-box" wx:if="{{ currentIndex === 0 }}">
<view class="search-input"> <view class="search-input">
<block wx:if="{{ !keyWord }}"> <block wx:if="{{ !keyWord }}">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
......
...@@ -57,6 +57,12 @@ Page({ ...@@ -57,6 +57,12 @@ Page({
reportTypeVal: "3", reportTypeVal: "3",
trackingCode: "regional-assistant-server-center", trackingCode: "regional-assistant-server-center",
}, },
{
name: "流水审批",
url: "packageWorkspace.cashFlowList",
icon: "cashflow-review",
trackingCode: "regional-assistant-cashflow-review",
}
], ],
staffDevelopmentMenus: [ staffDevelopmentMenus: [
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!