Commit 7b45ac4f by 李伟康

```plaintext

refactor(evaluation): 删除评估单相关API模块

移除旧版评估单管理的所有HTTP请求接口定义,包括:
- 评估单列表、详情、创建、更新等基础操作;
- 合同签订与取消、交车确认、支付定金等业务流程;
- OCR识别、合同预览、保管人协议等相关功能。

这些接口已迁移至新版架构或由其他服务统一维护。

refactor(interceptionApi): 移除拦截相关API模块

删除员工日报、打卡配置、处罚检查等接口定义,
相关逻辑已在新版本中重构或整合至其他模块。

refactor(point): 删除积分系统相关API模块

移除驻店积分规则、记录查询、奖励配置、考勤统计等功能接口,
后续将通过新的积分中心统一提供服务。

refactor(popupApi): 删除弹窗相关API模块

移除员工列表、优惠券、商品信息等通用弹窗组件依赖的API,
现由全局公共服务替代实现。

refactor(receptionApi): 删除接待中心相关API模块

清理对话内容查询、质检结果、话术标签及业绩看板等接口,
相关能力已整合进智能客服系统。

refactor(usedCar): 删除二手车相关API模块

移除二手车驻店日报、交付单管理等后端接口声明,
功能现已统一接入新车二手车一体化平台。

refactor(components): 移除入口导航与客服组件

删除以下无用组件文件:
- Entrance.vue:主页功能入口组件;
- KfBox.vue:客服二维码弹窗组件;
- CaseItem.vue:案例展示项组件。
以上组件已被新版UI体系替换。
```
1 parent 698e5bad
Showing 55 changed files with 2 additions and 4983 deletions
// ${pathEnum.evaluation}
import { gscPost } from '../request/signHttp'
module.exports = {
/** 评估单列表 */
evalOrderList(data) {
return gscPost(
`/evalOrder/page`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单详情 */
evalOrderDetail(data) {
return gscPost(
`/evalOrder/detail`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单创建 */
evalOrderCreate(data) {
return gscPost(
`/evalOrder/create`,
{
...data
},
{ returnAll: true, duplicatePrevention: true }
)
},
/** 评估单分页状态数量 */
evalOrderPageCount(data) {
return gscPost(
`/evalOrder/pageCount`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单更新 */
evalOrderUpdate(data) {
return gscPost(
`/evalOrder/edit`,
{
...data
},
{ returnAll: true, duplicatePrevention: true }
)
},
/** 评估单重新报价 */
evalOrderOwnerReQuote(data) {
return gscPost(
`/evalOrder/ownerReQuote`,
{
...data
},
{ returnAll: true }
)
},
/** 签订买卖合同 */
evalOrderSignContract(data) {
return gscPost(
`/evalOrder/signingSaleContract`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单取消合同 */
evalOrderCancelContract(data) {
return gscPost(
`/evalOrder/cancelSaleContract`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) {
return gscPost(
`/confirmVehicleDelivery/reSubmit`,
{
...data
},
{ returnAll: true }
)
},
/** 确认交车 */
confirmDelivery(data) {
return gscPost(
`/confirmVehicleDelivery/confirmVehicleDelivery`,
{
...data
},
{ returnAll: true }
)
},
/** 支付定金 */
payDepositApplication(data) {
return gscPost(
`/applyPayment/payDepositApplication`,
{
...data
},
{ returnAll: true }
)
},
/** 发起代保管协议签署 */
signAgreement(data) {
return gscPost(
`/applyPayment/payFinal`,
{
...data
},
{ returnAll: true }
)
},
/** 检查代保管协议签署状态 */
checkSignAgreement(data) {
return gscPost(
`/applyPayment/checkSignAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return gscPost(
`/evalOrder/checkRepeat`,
{
...data
},
{ returnAll: true }
)
},
/** 车辆ocr识别 */
vinOcr(data) {
return gscPost(
`/evalOrder/vinOcr`,
{
...data
},
{ returnAll: true }
)
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return gscPost(
`/evalOrder/carLicenseOcr`,
{
...data
},
{ returnAll: true }
)
},
/** 获取合同详情 */
getContractDetail(data) {
return gscPost(
`/evalElectronicContract/getDetail`,
{
...data
},
{ returnAll: true }
)
},
/** 获取保管人列表 */
getCustodyAgreementList(data) {
return gscPost(
`/custodyAgreement/custodyAgreementList`,
{
...data
},
{ returnAll: true }
)
},
/** 新增保管人 */
addCustodyAgreement(data) {
return gscPost(
`/custodyAgreement/addCustodyAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 发送代保管人协议 */
sendCustodyAgreement(data) {
return gscPost(
`/custodyAgreement/sendCustodyAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 销售协议预览 */
salesAgreementPreview(data) {
return gscPost(
`/evalOrder/salesAgreementPreview`,
{
...data
},
{ returnAll: true }
)
},
/** 线上合同预览 */
viewOnlineContract(data) {
return gscPost(
`/evalOrder/viewOnlineContract`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单简单详情 */
evalOrderSimpleDetail(data) {
return gscPost(
`/evalOrder/simpleDetail`,
{
...data
},
{ returnAll: true }
)
},
/**省市区 */
apiRegion(data) {
const queryString = Object.keys(data)
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(data[key])}`)
.join('&')
return gscPost(`/evalOrder/apiRegion/search${queryString ? '?' + queryString : ''}`, { ...data }, { returnAll: true })
}
}
import http from '../request/http'
import { gscPost } from '../request/signHttp'
module.exports = {
/** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid (data) {
return http.post({
method: 'dj.api.smartcarlife.staff.daily.report.popup.need',
projectName: 'boutique',
...data
})
},
/** 校验手机号是否配置打卡和是否打卡 */
clockInConfigPhone (data) {
return http.post({
method: 'dj.api.smartcarlife.clock.in.config.phone',
projectName: 'boutique',
...data
})
},
/**
* 查询当前员工处罚情况
*/
checkStaffStudyPunish (data) {
return http.post({
method: 'dj.api.carboutique.staff.study.punish',
projectName: 'boutique',
...data
})
},
/**
* 二手车查询员工昨天是否新入职或调店
*/
checkUsedCarStaffIsNew (data) {
return http.post({
method: 'dj.api.smartcarlife.secondHandCar.staffDailyReport.popup.need',
projectName: 'boutique',
...data
})
},
/**
* 查询员工是否需要填写二手车日报
*/
checkUsedCarStaffDailyReportValid (data) {
return gscPost('/carDailyReport/yesterday/check', {
...data
})
},
}
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-23 17:19:15
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import http from '../request/http'
module.exports = {
/**驻店规则列表 */
pointRuleList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.list',
projectName: 'boutique',
...data
})
} /**驻店规则详情列表 */,
pointRuleDetail(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.detail.list',
projectName: 'boutique',
...data
})
} /**积分记录 */,
pointRecordList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.record.list',
projectName: 'boutique',
...data
})
} /**驻店月份排名 */,
pointMonthRanking(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.ranking',
projectName: 'boutique',
...data
})
} /**每日积分-项目完成情况 */,
pointDayTask(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.every.day.task',
projectName: 'boutique',
...data
})
},
/**积分首页 */
getPoint(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique',
...data
})
},
/**积分奖励规则 */
rewardRule(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.reward.rule',
projectName: 'boutique',
...data
})
},
badgeList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.badge.list',
projectName: 'boutique',
...data
})
},
incomeMeasurementConfig(data) {
return http.post({
method: 'dj.smartcarlife.api.incomeMeasurement.switch.config.search',
projectName: 'boutique',
...data
})
},
/**员工收入测算获取员工信息 */
incomeCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.staffInfo',
projectName: 'boutique',
...data
})
},
/**获取员工绩效测算详情 */
incomeCalculationDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.detail',
projectName: 'boutique',
...data
})
},
/**分页查询员工月度工资统计列表 */
pageStat(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.pageStat',
projectName: 'boutique',
...data
})
},
/**获取员工(测算/历史)月度工资明细 */
monthSalaryDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.detail',
projectName: 'boutique',
...data
})
},
/**获取试算门店工资绩效配置详细 */
getLatestConfigDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.getLatestConfigDetail',
projectName: 'boutique',
...data
})
},
/**员工工资试算*/
monthSalaryCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.monthSalaryCalculation',
projectName: 'boutique',
...data
})
},
/**员工考勤日历 */
calendarDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.clock.in.staff.calendar',
projectName: 'boutique',
...data
})
},
/**查询员工提示信息 */
getTipsMessage(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.tipsMessage.list',
projectName: 'boutique',
...data
})
},
/**直级介绍配置查询 */
getJobConfig(data) {
return http.post({
method: 'dj.smartcarlife.api.job.rank.config.search',
projectName: 'boutique',
...data
})
},
/** 优惠券二级列表 */
getGrantRecord(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.grant.record',
projectName: 'boutique',
...data
})
},
/** 优惠券领取 */
receiveCoupon(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.receive',
projectName: 'boutique',
...data
})
},
/** 统计 优惠券 类型总数 */
statisticsCount(data) {
return http.post({
method: 'dj.api.smartcarlife.resident.coupon.statistics.count',
projectName: 'boutique',
...data
})
},
/** 查询附近地址 */
searchStoreAddress(data) {
return http.post({
method: 'dj.api.car.boutique.resident.coupon.address.search',
projectName: 'boutique',
...data
})
},
/** 查询勋章列表 */
searchLevelConfig(data) {
return http.post({
method: 'dj.api.car.boutique.resident.level.config.page',
projectName: 'boutique',
...data
})
},
/** 我的考勤相关接口 */
/** 员工考勤日历 */
newCalendar(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.calendar.new',
projectName: 'boutique',
...data
})
},
/** 打卡申诉列表 */
getAppealList(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.list',
projectName: 'boutique',
...data
})
},
/** 提交打卡申诉 */
appealCommit(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.commit',
projectName: 'boutique',
...data
})
},
/** 考勤出勤明细 */
attendanceDetail(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.attendance.detail',
projectName: 'boutique',
...data
})
},
appealExist(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.exist',
projectName: 'boutique',
...data
})
}
}
import http from '../request/http'
module.exports = {
/** 销售顾问/录单员 & 交付专员 */
getEmployeeList (data) {
return http.post({
method: 'dj.api.smartcarlife.employee.onTheJob.getByMerchantId',
projectName: 'boutique',
...data
})
},
/**
* 二级流量方
*/
getDiversionMerchantRef (data) {
return http.post({
method: 'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef',
projectName: 'boutique',
...data
})
},
/**
* 获取门店品牌车型
*/
getMerchantCarBrandList (data) {
return http.post({
method: 'dj.api.get.car.brandList',
projectName: 'boutique',
needCarSeries: true,
...data
})
},
/***
* 获取门店礼券列表
*/
getMerchantCouponList (data) {
return http.post({
method: 'dj.api.smartCarLife.merchant.coupon.list',
projectName: 'boutique',
...data
})
},
/**
* 获取客户礼券列表
*/
getCustomerCouponList (data) {
return http.post({
method: 'dj.api.customer.coupon.list',
projectName: 'boutique',
...data
})
},
/**
* 获取商品列表
*/
getGoodsList (data) {
return http.post({
method: 'dj.api.smartcarlife.selectOrderGoods.list',
projectName: 'boutique',
...data
})
},
/**获取订单列表筛选转化人员&销售顾问 */
getOrderScreenEmployeeList (data) {
return http.post({
method: 'dj.api.smartcarlife.employee.getByMerchantId',
projectName: 'boutique',
...data
})
},
/**
* 获取园区店配置
*/
getYqStoreConfig (data) {
return http.get({
method: 'dj.api.smarcarlife.yqMerchantConfig.detail',
projectName: 'boutique',
...data
})
},
/**
* 战败下单商品列表
*
*/
getOrderUpgradeGoodsList (data) {
return http.post({
method: 'dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId',
projectName: 'boutique',
...data
})
},
/**
* 获取精品升级场景 太阳膜类商品部位数据
*/
getPositionList (data) {
return http.post({
method: 'dj.api.smartcarlife.goodsPosition.list',
projectName: 'boutique',
...data
})
}
}
\ No newline at end of file \ No newline at end of file
import http from '../request/http'
module.exports = {
/**
* 查询对话内容
*/
findConversationDetailByBatchIdNew(data){
return http.post({
method: 'dj.pad.api.reception.findConversationDetailByBatchIdNew',
projectName: 'pad',
...data
})
},
/**查询质检列表|侧边栏 */
findCheckResultByBatchId (data) {
return http.post({
method: 'dj.pad.api.reception.findCheckResultByBatchId',
projectName: 'pad',
...data
})
},
/**话术标签 */
findRecordingTagByBatchId(data) {
return http.post({
method: 'dj.pad.api.reception.findRecordingTagByBatchId',
projectName: 'pad',
...data
})
},
getShortUrl(data){
return http.post({
method: 'dj.api.car.boutique.inspection.batch.file.short.url',
projectName: 'boutique',
...data
})
},
/**业绩看板 */
getMerchantPerformance(data){
return http.post({
method: 'dj.api.car.boutique.inspection.findMerchantPerformance',
projectName: 'boutique',
...data
})
},
}
import { gscPost } from '../request/signHttp'
module.exports = {
/** 二手车驻店日报列表 */
getCarDailyReportList (data) {
return gscPost('/carDailyReport/list', {
...data
})
},
/**
* 新增二手车驻店日报
*/
addCarDailyReport (data) {
return gscPost('/carDailyReport/add', {
...data
})
},
/**
* 二手车驻店日报详情
*/
getCarDailyReportDetail (data) {
return gscPost('/carDailyReport/detail', {
...data
})
},
/**
* 修改二手车驻店日报
*/
editCarDailyReport (data) {
return gscPost('/carDailyReport/edit', {
...data
})
},
/**
* 交付单列表
*/
getDeliveryOrderPageList (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data ,{
returnAll: true
})
},
/**
* 交付单列表按照支付状态统计数量
*/
getDeliveryOrderListCount (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderListCount', data)
},
/**
* 交付单详情
*/
getDeliveryOrderDetail (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderDetail', data)
},
/**
* 交付单操作日志
*/
getDeliveryOrderOpLog (data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderOpLog', data)
},
/**
* 客户确认到店
*/
confirmArrive (data) {
return gscPost('/deliveryOrderManage/confirmArrive', data, { returnAll: true })
},
/**
* 客户确认提车
*/
confirmDelivery (data) {
return gscPost('/deliveryOrderManage/confirmDelivery', data, { returnAll: true })
},
}
<template>
<view class="entrance-box">
<template v-if="entranceList.length">
<view class="entrance-container">
<view class="entrance-list">
<view
class="entrance-item"
v-for="(item, index) in entranceList"
:key="index"
@click="handleClick(item)"
>
<view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="developing flex">
<image
class="developing-icon"
src="../assets/images/common/developing.webp"
/>
功能开发中
</view>
</template>
</view>
</template>
<script>
export default {
name: 'Entrance',
data () {
return {
}
},
computed: {
entranceList () {
let { sceneType } = uni.$storage.get('userInfo'),
entranceList = [
{
icon: 'daily-report',
label: '驻店日报',
name: 'DailyReport',
},
{
icon: 'create-order',
label: '新建工单',
name: 'CreateOrder'
},
{
icon: 'defeat-order',
label: '战败下单',
name: 'DefeatOrder'
},
{
icon: 'order-management',
label: '工单列表',
name: 'OrderManagement'
},
{
icon: 'evaluation-management',
label: '评估单管理',
name: 'EvaluationFormList'
}, {
icon: 'delivery-management',
label: '交付管理',
name: 'DeliveryManagement',
page: '/pages/usedCar/deliveryManagement/index'
}
]
if (sceneType == 0) return []
else if (sceneType === 7) {
return entranceList.filter(e => ['DailyReport', 'EvaluationFormList', 'DeliveryManagement'].includes(e.name));
}
if (sceneType === 1) {
return entranceList.filter(e => !['EvaluationFormList', 'DeliveryManagement'].includes(e.name));
}
}
},
methods: {
handleClick (item) {
// 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item)
}
}
}
</script>
<style scoped lang="scss">
.entrance-container {
width: 100%;
// margin-top: toRpx(64);
display: flex;
// justify-content: center;
}
.entrance-list {
display: flex;
flex-wrap: wrap;
gap: toRpx(68);
justify-content: flex-start;
}
.entrance-item {
min-width: toRpx(120);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: toRpx(28);
color: #333;
.entrance-name {
margin-top: toRpx(8);
}
}
.developing {
height: 100%;
flex-direction: column;
color: #999999;
font-size: toRpx(20);
&-icon {
width: toRpx(344);
height: toRpx(208);
}
}
</style>
<template>
<uni-popup
ref="popup"
type="bottom"
border-radius="16px"
>
<view class="kf-box">
<view
class="close flex"
@click="close"
>
<uni-icons
type="closeempty"
:size="18"
color="#1A1A1A"
></uni-icons>
</view>
<view class="title flex">
<view class="sprite-icon icon-qw"></view>
嘀加智慧云
</view>
<view class="info flex">
<view class="text">
<view class="name flex">
云小白 <view class="duty">产品经理</view>
</view>
<view class="content">嘀加智慧云|产品中心</view>
<view class="tool">
<template v-for="(i,index) in tool">
<view
class="tool-item flex"
:key="index"
>
<view :class="['sprite-icon',`icon-kf-${index}`]"></view>
{{i}}
</view>
</template>
</view>
</view>
<view class="qr-box flex">
<image
class="qr"
:src="qr"
/>
使用企业微信扫码
</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
tool: ['使用反馈', '功能建议', '心得分享', '吐槽拍砖'],
qr: require('@/assets/images/common/qr.webp')
}
},
mounted () {
},
methods: {
open () {
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
}
}
}
</script>
<style scoped lang='scss'>
.kf-box {
position: relative;
width: toRpx(864);
height: toRpx(478);
background: #ffffff;
border-radius: toRpx(32);
padding: 0 toRpx(48);
box-sizing: border-box;
.close {
position: absolute;
width: toRpx(120);
height: toRpx(120);
top: 0;
right: 0;
justify-content: center;
}
.title {
font-weight: 500;
font-size: toRpx(32);
padding: toRpx(46) 0;
.sprite-icon {
margin-right: toRpx(16);
}
}
.info {
.name {
position: relative;
width: toRpx(480);
font-weight: 600;
font-size: toRpx(48);
align-items: baseline;
padding-bottom: toRpx(24);
border-bottom: toRpx(2) solid #e6e6e6;
.duty {
font-weight: 400;
font-size: toRpx(28);
margin-left: toRpx(16);
}
&::after {
position: absolute;
left: 0;
bottom: toMinusRpx(2);
width: toRpx(280);
height: toRpx(4);
background: #2c66f7;
content: "";
}
}
.content {
padding: toRpx(28) 0;
font-weight: 500;
font-size: toRpx(28);
}
.tool {
display: flex;
flex-wrap: wrap;
&-item {
flex: 50%;
font-size: toRpx(28);
color: #666666;
margin-bottom: toRpx(20);
.sprite-icon {
margin-right: toRpx(8);
}
}
}
}
.qr-box {
margin-left: toRpx(48);
flex-shrink: 0;
flex-direction: column;
font-weight: 500;
font-size: toRpx(28);
.qr {
width: toRpx(240);
height: toRpx(240);
margin-bottom: toRpx(8);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view
class="case-item-component"
@click="jumpDetail(item)"
>
<image
class="img"
:src="item.cover || 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp'"
:style="imgStyle"
mode="aspectFill"
></image>
<view class="case-info">
<view class="case-name text-hide">{{ item.title }}</view>
<template v-for="(j, ind) in caseInfo">
<view
class="case-text flex"
:key="ind"
>
<view class="case-label">{{ j.label }}:</view>
<view :class="['case-value', j.class]">
<template v-if="j.format">
{{ j.format(item) }}
</template>
<template v-else>
{{ item[j.key] || '--' }}
</template>
</view>
</view>
</template>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CaseItem',
props: {
item: Object,
source: {
type: Number,
default: 1
},
visitsId: [Number, String],
imgStyle: String
},
data () {
return {
caseInfo: [
{
label: '业务场景',
class: 'text-hide',
format: (val) => {
// 业务场景:0-会员权益/升级;1-精品升级;2-次新车转化;3-售后众筹;4-积分商城
return val ? {
0: '会员权益/升级',
1: '精品升级',
2: '次新车转化',
3: '售后众筹',
4: '积分商城'
}[val.scene] : '--'
}
},
{
label: '客户标签',
key: 'tags',
class: 'text-hide'
},
{
label: '适用套餐',
key: 'goods',
class: 'text-two-line'
},
],
}
},
mounted () {
},
methods: {
jumpDetail (item) {
const { source, visitsId } = this
let params = `id=${item.id}&source=${source}`
if (visitsId) params += `&visitsId=${visitsId}`
// 类型:0-图片;1-视频;2-pdf;3-富文本
let url = `/pages/common/caseDetail?${params}`
if (item.type != 3) {
let fileUrl = item?.detailInfos[0]?.image
if (item.type == 2) url = `/pages/common/webview?fileUrl=${fileUrl}&title=${item.title}&${params}`
if (item.type == 1 || item.type == 0) url = `/pages/boutique/preview?tabName=${item.title}&sourceType=${item.type == 1 ? 2 : 1}&detailUrl=${fileUrl}&${params}`
}
uni.navigateTo({
url: `${url}`
})
},
}
}
</script>
<style scoped lang='scss'>
.case-item-component {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a;
border-radius: toRpx(16);
display: flex;
flex-direction: column;
overflow: hidden;
.img {
width: 100%;
height: toRpx(324);
}
.case-name {
font-weight: 500;
font-size: toRpx(28);
color: #333333;
line-height: toRpx(48);
padding: toRpx(16) toRpx(32) toRpx(8);
}
.case-text {
align-items: flex-start;
font-size: toRpx(24);
color: #666666;
line-height: toRpx(40);
padding: 0 toRpx(32);
margin-bottom: toRpx(4);
}
.case-label {
width: toRpx(120);
flex-shrink: 0;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="customer-flow-box">
<view class="customer-flow-title">门店客流情况</view>
<view class="sprite-icon icon-customer-flow"></view>
<view class="deliveries flex">
累计交付数
<view class="num">{{formattedNumber('cumulativeDeliveryCount')}}</view>
</view>
<view class="touchpoints flex">
实际触客数
<view class="num">{{formattedNumber('actualContactCount')}}</view>
</view>
<view class="touchpoint-rate">
实际触客率
<view :class="['num',{'rate-color':dataShow && pageData.contactRate}]">{{formattedNumber('contactRate', '%')}}</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
pageData: {
type: Object,
default: () => { }
},
dataShow: {
type: Boolean,
default: true
}
},
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
formattedNumber (key, unit) {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || !num) num = '--'
return num
}
}
}
</script>
<style scoped lang='scss'>
.customer-flow-box {
position: relative;
height: toRpx(422);
color: #333333;
.customer-flow-title {
font-size: toRpx(28);
font-weight: 500;
padding: toRpx(24) toRpx(32) 0;
}
.sprite-icon {
position: absolute;
top: 0;
left: 0;
zoom: 2;
}
.deliveries,
.touchpoints,
.touchpoint-rate {
position: absolute;
font-size: toRpx(20);
box-sizing: border-box;
flex-direction: column;
.num {
transition: all 0.15s;
}
}
.deliveries,
.touchpoints {
color: #ffffff;
width: toRpx(400);
height: toRpx(128);
left: toRpx(32);
.num {
font-size: toRpx(24);
font-weight: 500;
}
}
.deliveries {
top: toRpx(108);
padding-top: toRpx(54);
}
.touchpoints {
top: toRpx(236);
padding-top: toRpx(37);
}
.touchpoint-rate {
top: toRpx(208);
left: toRpx(424);
.num {
font-size: toRpx(28);
font-weight: 700;
}
.rate-color {
color: #4673ff;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<MessageBox
ref="customerTagstVisible"
position="bottom"
:isFooter="false"
:title="title"
:maxHeight="1040"
@close="$emit('close')"
>
<view class="select-views">
<template v-for="(i,index) in list">
<view
class="select-group"
:key="index"
>
<view class="select-title">{{ i.labelName }}</view>
<view class="select-box">
<view
class="select-item flex"
:class="{ checked: checkedItem(item) }"
@click="handleSelect(item)"
v-for="(item, ind) in i.nextList"
:key="ind"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ item.labelName }}
</view>
</view>
</view>
</template>
</view>
<view class="footer-btns">
<view
class="btn cancel"
@click="clearSwitch ? clear() : close()"
>{{cancelText}}</view>
<view
:class="['btn',{disabled: disabled}]"
@click="choose"
>确定</view>
</view>
</MessageBox>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CustomerTags',
props: {
chooseList: Array,
title: {
type: String,
default: '请选择客户标签'
},
disabledSwitch: {
type: Boolean,
default: true
},
cancelText: {
type: String,
default: '取消'
},
clearSwitch: {
type: Boolean,
default: false
},
sceneNumber: {
type: [Number, String],
default: -1
}
},
data () {
return {
list: [],
component_chooseList: [],
}
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.close()
}
},
chooseList: {
immediate: true,
handler (newval) {
this.component_chooseList = JSON.parse(JSON.stringify(newval))
}
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
disabled () {
return this.disabledSwitch && this.component_chooseList.length == 0
}
},
mounted () {
},
methods: {
open () {
this.$refs.customerTagstVisible.open()
const userInfo = uni.$storage.get("userInfo"),
{ sceneType } = userInfo,
{ sceneNumber } = this
uni.$api.customerApi
.findCustomerTags({
scene: sceneNumber > -1 ? sceneNumber : sceneType,
})
.then((res) => {
this.list = res || []
})
},
handleSelect (item) {
let { component_chooseList } = this,
index = component_chooseList.findIndex(e => e.labelId == item.labelId)
if (index == -1) component_chooseList.push(item)
else component_chooseList.splice(index, 1)
this.component_chooseList = component_chooseList
this.$forceUpdate()
},
close () {
this.$refs?.customerTagstVisible?.close()
},
checkedItem (item) {
let { component_chooseList } = this
return component_chooseList.findIndex(e => e.labelId == item.labelId) != -1
},
choose () {
if (this.disabled) return
this.$emit('select', this.component_chooseList)
this.close();
},
clear () {
this.component_chooseList = []
this.$forceUpdate()
}
}
}
</script>
<style scoped lang='scss'>
.select-views {
overflow-y: scroll;
max-height: 60vh;
position: relative;
padding-bottom: toRpx(128);
.select-group {
margin: toRpx(32) 0;
.select-title {
font-size: toRpx(28);
color: #999999;
margin-bottom: toRpx(10);
}
.select-box {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: toRpx(32);
.select-item {
text-align: center;
justify-content: center;
opacity: 1;
border: toRpx(2) solid #dce0e6;
color: #333;
font-size: toRpx(32);
border-radius: toRpx(8);
position: relative;
box-sizing: border-box;
padding: toRpx(13) toRpx(40);
word-break: break-all;
line-height: toRpx(44);
.sprite-icon {
display: none;
position: absolute;
right: toMinusRpx(2);
top: toMinusRpx(2);
}
}
.checked {
border: toRpx(2) solid #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
}
}
.footer-btns {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: toRpx(176);
background: #ffffff;
box-sizing: border-box;
padding-top: toRpx(32);
display: flex;
justify-content: center;
gap: 0 toRpx(34);
.btn {
width: toRpx(718);
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: toRpx(48);
display: flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: toRpx(32);
color: #ffffff;
}
.cancel {
background: #dae9ff;
color: #2c66f7;
}
.disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="line-bar-box">
<view class="tabs">
<page-tabs
:list="tabList"
@changeTab="changeTab"
size="small"
/>
</view>
<view class="canvas">
<qiun-data-charts
type="bar"
:opts="opts"
:chartData="chartData"
:tooltipShow="false"
/>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import PageTabs from '@/components/PageTabs.vue'
const rateList = {
excellentStoreAvgDealRate: '优秀门店均值',
thisStoreDealRate: '本门店',
personalDealRate: '个人'
},
priceList = {
excellentStoreAvgDeal: '优秀门店均值',
thisStoreKdj: '本门店',
personalKdj: '个人'
}
export default {
components: {
PageTabs
},
props: {
pageData: {
type: Object,
default: () => { }
},
dataShow: {
type: Boolean,
default: true
},
sceneType: Number,
isHarmony: Boolean, // 是否为鸿蒙
bussinessType: Number
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
this.getServerData()
}
}
},
name: '',
data () {
return {
tabIndex: 0,
tabList: ['本月交付成交率', '本月交付客单价'],
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: Object.freeze({
fontColor: '#333',
fontSize: 12,
color: ["#2C66F7"],
padding: [20, 80, 0, 0],
enableScroll: false,
legend: {
show: false
},
xAxis: {
disabled: true,
gridColor: '#fff',
},
yAxis: {
axisLineColor: '#cfd4e3'
},
extra: {
bar: {
type: "group",
width: 6,
barColorList: [
['#389FFF', '#2C66F7'],
['#708DFF', '#6858F5'],
['#94CBFF', '#3283FB']
],
linearType: 'custom',
barBorderCircle: true,
}
}
})
}
},
mounted () {
},
methods: {
getServerData () {
let { dataShow, tabIndex, pageData, sceneType, isHarmony, bussinessType } = this
/**
* (sceneType 0: 2.1场景, 1:1.1场景) (bussinessType 1:延保, 3:权益)
* 2.1场景 鸿蒙---问界/鸿蒙 [本月交付客单价] 改成 [整车延保成交数]
* 2.1场景 非鸿蒙---选延保 [本月交付客单价] 改成 [整车延保成交数]
* 2.1场景 非鸿蒙---权益 [本月交付成交率] 改为 [广联权益渗透率]; [本月交付客单价] 改成 [广联权益成交数]
*/
if (sceneType == 0) {
if (isHarmony) {
this.tabList[1] = '整车延保成交数'
} else {
if (bussinessType == 1) this.tabList[1] = '整车延保成交数'
else this.tabList = ['广联权益渗透率', '广联权益成交数']
}
}
let list = [],
categories = [],
data = [],
defaultList = []
if (tabIndex == 0) Object.keys(rateList).map(key => {
list.push({
text: rateList[key],
value: pageData[key]
})
})
else Object.keys(priceList).map(key => {
list.push({
text: priceList[key],
value: pageData[key]
})
})
list.sort((a, b) => b.value - a.value)
list.map(e => {
categories.push(e.text)
data.push(e.value || 0)
defaultList.push(e.value == null)
})
let series = [{
defaultList,
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data
}]
if (tabIndex == 0) series[0].afterUnit = '%'
if (sceneType == 1 && tabIndex == 1) series[0].beforeUnit = '¥' //轻改
this.chartData = {
categories,
series,
}
},
changeTab (index) {
this.tabIndex = index
this.getServerData()
}
}
}
</script>
<style scoped lang="scss">
.line-bar-box {
height: toRpx(388);
box-sizing: border-box;
padding: toRpx(24);
.tabs {
width: toRpx(544);
height: toRpx(64);
}
.canvas {
height: toRpx(260);
}
}
</style>
<template>
<view class="output-value-box">
<view class="output-value-title">本月产值</view>
<view class="output-value">
<view class="value">
{{formattedNumber('actualProduction')}}<view class="unit">万</view>
</view>
<view class="sub-value flex">
个人产值<view class="num">{{formattedNumber('personalProduction')}}万</view>
</view>
</view>
<view class="output-canvas">
<qiun-data-charts
type="arcbar"
:opts="opts"
:chartData="chartData"
:tooltipShow="false"
/>
</view>
<view class="output-view flex">
<view class="item flex">目标<view class="num">{{formattedNumber('targetProduction')}}万</view>
</view>
<view class="item flex">达成比例<view class="num">{{formattedNumber('achievementRatio','%')}}</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import NP from 'number-precision'
export default {
name: '',
props: {
pageData: {
type: Object,
default: () => { }
},
dataShow: {
type: Boolean,
default: true
}
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
if (Object.keys(this.chartData).length) this.getServerData()
}
},
pageData: {
immediate: true,
handler (newval) {
this.getServerData()
}
}
},
data () {
return {
chartData: {},
opts: {
padding: undefined,
title: {
name: "产值贡献",
fontSize: 12,
color: "#333"
},
subtitle: {
fontSize: 14,
color: "#4673FF"
},
extra: {
arcbar: {
type: "circle",
width: 11,
backgroundColor: "#4673ff1a",
startAngle: 1.5,
endAngle: 0.25,
gap: 2,
linearType: 'custom',
customColor: ['#2C66F7', '#389FFF']
}
}
}
}
},
mounted () {
},
methods: {
getServerData () {
let { dataShow } = this,
data = this.pageData.productionContribution
this.opts.subtitle.name = data == null ? '--' : `${this.pageData.productionContribution}%`
this.chartData = {
series: [
{
hideData: !dataShow,
data: NP.divide(data || 0, 100)
}
]
}
},
formattedNumber (key, unit) {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || num == null) num = '--'
return num
}
}
}
</script>
<style scoped lang='scss'>
.output-value-box {
height: toRpx(366);
position: relative;
.output-value-title {
font-size: toRpx(28);
font-weight: 500;
padding: toRpx(24) toRpx(32) 0;
}
.output-value {
padding: toRpx(54) 0 0 toRpx(52);
.value {
display: flex;
align-items: baseline;
color: #4673ff;
font-size: toRpx(40);
line-height: toRpx(48);
font-weight: 700;
margin-bottom: toRpx(14);
.unit {
color: #333333;
font-size: toRpx(26);
font-weight: 400;
margin-left: toRpx(4);
line-height: toRpx(36);
}
}
.sub-value {
color: #333333;
font-size: toRpx(24);
.num {
color: #4673ff;
font-size: toRpx(28);
font-weight: 700;
margin-left: toRpx(8);
}
}
}
.output-canvas {
position: absolute;
right: toRpx(40);
top: toRpx(60);
width: toRpx(200);
height: toRpx(200);
}
.output-view {
position: absolute;
left: 50%;
bottom: toRpx(32);
transform: translateX(-50%);
width: toRpx(528);
height: toRpx(58);
border-radius: toRpx(450);
background: #4673ff0d;
color: #333333;
font-size: toRpx(24);
&::after {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
content: '';
width: toRpx(2);
height: toRpx(28);
background: #cfd4e3;
}
.item {
justify-content: center;
width: 50%;
flex-shrink: 0;
.num {
margin-left: toRpx(8);
color: #4673ff;
font-size: toRpx(28);
font-weight: 700;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<MessageBox
ref="receptionSceneVisible"
position="bottom"
:isFooter="false"
title="请选择接待场景"
:maxHeight="1000"
@close="$emit('close')"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: id == item.id }"
@click="handleSelect(item)"
v-for="(item, index) in list"
:key="index"
>
{{ item.receptionSceneName }}
</view>
</view>
</MessageBox>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ReceptionSence',
props: {
customerInfo: Object
},
data () {
return {
list: [],
id: ''
}
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.close()
}
},
watchCustomerInfo: {
immediate: true,
handler (newval) {
this.id = newval.receptionScene
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
watchCustomerInfo () {
return this.customerInfo
},
},
mounted () {
},
methods: {
open () {
this.$refs.receptionSceneVisible.open()
const userInfo = uni.$storage.get("userInfo"),
{ sceneType } = userInfo;
/**获取接待场景 */
uni.$api.customerApi
.findAllSence({
scene: sceneType,
})
.then((res) => {
this.list = res || []
}).catch(err => {
this.list = []
})
},
handleSelect (item) {
this.close();
this.id = item.id
this.$emit('select', item)
},
close () {
this.$refs?.receptionSceneVisible?.close()
}
}
}
</script>
<style scoped lang='scss'>
.select-box {
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: toRpx(68);
line-height: toRpx(44);
opacity: 1;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: toRpx(2) solid #292d33;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="data-container">
<view class="nav-bar" @click="$emit('cancel')">
<view class="back" @click="$emit('update:showPayPage', false)">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">接待记录</view>
</view>
<view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
<view class="form">
<template v-for="(i, index) in formObject">
<view :class="['form-item', { active: focusIndex == index }]" :key="index">
<view class="label required">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) }]">
<template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.key]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" />
</template>
<template v-else>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view class="text-hide">{{ customerInfo[i.key] || i.placeholder }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
<view class="footer-box">
<view class="cancel-btn" @click="$emit('cancel')">取消</view>
<view class="submit-btn" @click="handleSave">提交</view>
</view>
<car-brands ref="carBrandListVisible" @select="handleSelect($event, 'carBrandListVisible')" />
<employee ref="employeeBoxVisible" :salesPropsUuid="customerInfo.salesUuid" @select="handleSelect($event, 'employeeBoxVisible')" />
<MessageBox ref="receptionStatusVisible" position="bottom" :isFooter="false" title="请选择接待结果" :maxHeight="1000">
<view class="select-box">
<view class="select-item" :class="{ checked: customerInfo.receptionStatus == item.label }" @click="selectReception(item.label)" v-for="(item, index) in receptionList" :key="index">
{{ item.label }}
</view>
</view>
</MessageBox>
</view>
</template>
<script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue'
import Employee from '@/components/Employee.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import utils from "@/utils/utils";
export default {
components: {
CarBrands,
Employee,
CustomerAutocomplete
},
props: {
customerInfoVal: {
type: Object,
default: () => ({})
}
},
data() {
return {
errorTip:false,
receptionList: Object.freeze([{
label: '成交',
value: 1
},
{
label: '战败',
value: 0
}
]),
formObject: Object.freeze([{
label: "车主姓名",
placeholder: '车主姓名',
key: 'customerName',
type: 'input',
inputType: 'text',
maxlength: 50
},
{
label: "车主电话",
placeholder: '车主电话',
key: 'phoneNumber',
type: 'input',
inputType: 'tel',
maxlength: 11
},
{
label: "品牌车型",
placeholder: '品牌车型',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
},
{
label: "接待结果",
key: "receptionStatus",
type: "select",
popKey: "receptionStatusVisible",
placeholder: '请选择',
},
{
label: "销售姓名",
key: "salesName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择',
},
]),
focusIndex: -1,
customerInfo:{}
}
},
mounted() {
this.customerInfo = utils.deepClone(this.customerInfoVal)
const i = this.receptionList.findIndex(e => e.value === this.customerInfo.receptionStatus)
this.$set(this.customerInfo, 'receptionStatus', i == -1?'':this.receptionList[i].label)
},
methods: {
selectReception(value) {
this.customerInfo.receptionStatus = value
this.$refs.receptionStatusVisible.close()
},
showError(key) {
let flag = !this.customerInfo[key]
if (key == 'phoneNumber' && this.customerInfo[key]) flag = !phoneRex.test(this.customerInfo[key])
return flag
},
handleSave() {
const result = this.check(true)
if (!result) return this.errorTip = true
const i = this.receptionList.findIndex(e => e.label == this.customerInfo.receptionStatus)
this.customerInfo.receptionStatus = this.receptionList[i].value
this.$emit('submit',this.customerInfo)
},
check(all = false) {
let flag = true
try {
this.formObject.map(e => {
if (!this.customerInfo[e.key]) throw false
if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.customerInfo[e.key])) {
uni.showToast({
title: "请输入正确的车主电话",
icon: "none",
});
throw false
}
})
} catch (error) {
flag = error
}
return flag
},
handleSelect(item, popkey) {
this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.salesName = item.staffName
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carBrand = item.carChildsBrandName
this.customerInfo.carBrandId = item.carChildsBrandId
this.customerInfo.oneCarBrand = item.carBrand
this.customerInfo.oneCarBrandId = item.carBrandId
}
this.resetFocusIndex()
this.errorTip = false
},
showPopup(e, index) {
this.focusIndex = index
this.$refs[e].open()
},
resetFocusIndex() {
this.focusIndex = -1
this.errorTip = false
}
}
}
</script>
<style scoped lang="scss">
.error-tip {
font-size: toRpx(28);
padding: toRpx(32) toRpx(60) toRpx(24);
margin-top: toRpx(100);
margin-bottom: toMinusRpx(80);
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
}
.data-container {
background: #ffffff59;
border-radius: toRpx(48);
margin: toRpx(80) toRpx(66) toRpx(80) 0;
height: calc(100% - #{toRpx(160)});
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box;
position: relative;
.nav-bar {
position: absolute;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(28);
z-index: 9;
text-align: center;
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
line-height: toRpx(96);
.back {
position: absolute;
left: 0;
top: 0;
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.form {
display: flex;
flex-wrap: wrap;
gap: toRpx(80) toRpx(160);
padding: toRpx(80);
margin-top: toRpx(60);
&-item {
width: calc(50% - #{toRpx(80)});
display: flex;
align-items: center;
color: #6c6c70;
font-size: toRpx(30);
height: toRpx(80);
box-sizing: border-box;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: toRpx(124);
margin-right: toRpx(30);
}
.required {
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: toMinusRpx(20);
top: 50%;
transform: translate(0, -50%);
}
}
.value {
height: toRpx(80);
flex: 1;
border: toRpx(2) solid #e8e8ea;
background: #ffffff;
margin-left: toRpx(32);
box-sizing: border-box;
padding: 0 toRpx(40);
border-radius: toRpx(8);
&.error {
border: toRpx(2) solid #f24724;
border-radius: toRpx(8);
}
.input,
.select {
width: 100%;
height: 100%;
border: none !important;
outline: none;
padding: 0 !important;
font-size: toRpx(30);
color: #333;
&::placeholder {
color: #c9c9c9;
}
}
.placeholderStyle {
color: #999999;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
}
}
.footer-box {
display: flex;
align-items: center;
justify-content: center;
gap: toRpx(34);
padding: 0 toRpx(280);
.cancel-btn {
height: toRpx(80);
background: #dae9ff;
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
color: #2c66f7;
flex: 1;
}
.submit-btn {
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: toRpx(48);
line-height: toRpx(80);
text-align: center;
flex: 1;
color: #ffffff;
}
}
}
.select-box {
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: toRpx(20);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: toRpx(68);
line-height: toRpx(68);
opacity: 1;
border: toRpx(2) solid #dce0e6;
color: #292d33;
font-size: toRpx(28);
border-radius: toRpx(8);
&.checked {
border: toRpx(2) solid #292d33;
}
}
}
</style>
<template>
<view
class="material-item flex"
@click="jump"
>
<!-- <view :class="['status', {'status-green':item.readStatus == 0}]">{{readStatusEnum[item.readStatus]}}</view> -->
<view class="icon">
<template v-if="item.cover">
<image
class="image"
:src="item.cover"
/>
</template>
<template v-else>
<image
class="image"
:src="imgUrl(item)"
/>
</template>
<view class="label">{{materialTypeEnum[item.type]}}</view>
</view>
<view class="text">
<view class="title">{{item.title}}</view>
<view class="tags">
<template v-for="i in item.sceneMarketTagsList">
<view
class="tag"
:key="i.id"
>{{i.tagName}}</view>
</template>
</view>
<view class="date">{{item.date||''}}</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
item: Object,
sceneMarketLevelTwoItem: Object
},
name: '',
data () {
return {
materialTypeEnum: Object.freeze({
0: '图片',
1: '视频',
2: 'PDF',
3: '富文本',
4: 'Excel',
5: 'Word'
}),
// readStatusEnum: Object.freeze({
// 0: '已查看',
// 1: '未查看'
// })
}
},
mounted () {
},
methods: {
imgUrl (item) {
return `https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/material/material-${item.type}.png`
},
async jump () {
let { item, sceneMarketLevelTwoItem } = this,
params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag}&directoryName=${sceneMarketLevelTwoItem.directoryName}`
// 类型:0-图片;1-视频;2-pdf;3-富文本; 4-Excel; 5-Word
let url = `/pages/common/caseDetail?${params}`
uni.$track.add({ eventCode: 'scene_market', businessId: item.id })
if (item.type != 3) {
uni.showLoading({
mask: true
})
const data = await uni.$api.customerApi.getMaterialDetail({
id: item.id
})
uni.hideLoading()
let fileUrl = data?.detailInfos[0]?.image
if (item.type == 1 || item.type == 0) url = `/pages/boutique/preview?tabName=${item.title}&sourceType=${item.type == 1 ? 2 : 1}&detailUrl=${fileUrl}&${params}`
else url = `/pages/common/materialDetail/index?fileUrl=${fileUrl}&title=${item.title}&${params}`
}
uni.navigateTo({
url: `${url}`
})
}
}
}
</script>
<style scoped lang='scss'>
.material-item {
display: flex;
position: relative;
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 toRpx(16);
.status {
position: absolute;
right: 0;
top: 0;
height: toRpx(40);
line-height: toRpx(40);
width: fit-content;
padding: 0 toRpx(12);
font-size: toRpx(22);
color: #999999;
background: #9999991a;
border-radius: toRpx(4);
}
.status-green {
color: #35c376;
background: #35c3761a;
}
.icon {
width: toRpx(128);
height: toRpx(128);
margin-right: toRpx(16);
flex-shrink: 0;
position: relative;
.image {
width: 100%;
height: 100%;
border-radius: toRpx(8);
overflow: hidden;
}
.label {
display: flex;
align-items: center;
padding: 0 toRpx(6);
position: absolute;
width: fit-content;
color: #ffffff;
left: toRpx(8);
top: toRpx(8);
height: toRpx(28);
background: #00000066;
border-radius: toRpx(4);
font-size: toRpx(20);
}
}
.text {
width: calc(100% - #{toRpx(144)});
.title {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333333;
font-size: toRpx(30);
font-weight: 700;
}
.tags {
display: flex;
align-items: center;
gap: 0 toRpx(8);
margin: toRpx(8) 0;
.tag {
display: flex;
align-items: center;
height: toRpx(40);
background: #75bcff1a;
padding: 0 toRpx(12);
width: fit-content;
color: #2d66f7;
font-size: toRpx(22);
border-radius: toRpx(4);
}
}
.date {
color: #999999;
font-size: toRpx(24);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<scroll-view
class="scene-list-box"
scroll-y
>
<template v-if="requestComplete">
<view class="material-box">
<template v-if="materialList.length">
<template v-for="(item,index) in materialList">
<view
class="item"
:key="index"
>
<material
:item="item"
:sceneMarketLevelTwoItem="sceneMarketLevelTwoItem"
></material>
</view>
</template>
<view class="bottom flex">-已经到底了-</view>
</template>
<template v-else>
<view class="list-nothing flex">
<image
class="icon"
src="../../../../../assets/images/home/nothing.webp"
/>
暂无内容
</view>
</template>
</view>
</template>
</scroll-view>
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
import Material from './Material.vue'
export default {
props: {
requestParams: Object,
sceneMarketLevelTwoItem:Object
},
components: {
Material
},
name: '',
data () {
return {
requestComplete: false,
materialList: []
}
},
mounted () {
},
methods: {
async getSceneMarketMaterialList () {
try {
uni.showLoading({
title: '加载中',
mask: true
})
const {
requestParams
} = this,
data = await uni.$api.sceneMarketApi.getSceneMarketMaterialList(requestParams)
uni.hideLoading()
data?.map(e => {
e.date = dayjs(e.createdDate).format('YYYY-MM-DD')
})
this.materialList = data
this.requestComplete = true
} catch (error) {
uni.hideLoading()
uni.showToast({
title: error,
icon: "error",
})
}
},
}
}
</script>
<style scoped lang='scss'>
.scene-list-box {
width: 100%;
height: 100%;
.material-box {
width: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
gap: toRpx(28) toRpx(48);
padding: 0 toRpx(44);
align-content: flex-start;
.item {
width: calc((100% - #{toRpx(96)}) / 3);
height: toRpx(164);
border-radius: toRpx(16);
background: #ffffff;
box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a;
}
.bottom {
margin-top: auto;
width: 100%;
justify-content: center;
color: #999;
text-align: center;
padding: toRpx(50) 0;
font-size: toRpx(24);
}
}
.list-nothing {
width: 100%;
flex-direction: column;
margin-top: toRpx(260);
font-size: toRpx(28);
color: #999999;
.icon {
width: toRpx(678);
height: toRpx(284);
margin-bottom: toRpx(24);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="scene-market-box">
<type-tab-component
:typeList="typeList"
:tabIndex="tabIndex"
@tabClick="tabBarClick"
nameKey="directoryName"
></type-tab-component>
<view class="scene-market-content">
<view class="tabs flex">
<template v-for="i in sceneMarketLevelTwoList">
<view
:class="['tab flex',{active: tagId == i.id}]"
:key="i.id"
@click="tabClick(i)"
>{{i.directoryName}}</view>
</template>
</view>
<scene-list
class="scene-list"
ref="sceneListRef"
:requestParams="requestParams"
:sceneMarketLevelTwoItem="sceneMarketLevelTwoItem"
/>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import TypeTabComponent from '../../../TypeTabComponent.vue'
import SceneList from './compontens/SceneList.vue'
export default {
components: {
TypeTabComponent,
SceneList
},
name: '',
data () {
return {
typeList: [],
tabIndex: -1,
tagId: '',
requestParams: {}
}
},
computed: {
sceneListRef () {
return this.$refs.sceneListRef
},
sceneMarketLevelTwoList () {
return this.typeList[this.tabIndex]?.sceneMarketLevelTwoList || []
},
sceneMarketLevelTwoItem () {
return this.sceneMarketLevelTwoList.find(e => e.id == this.tagId)
}
},
mounted () {
this.getSceneMarketMaterialMenu()
},
methods: {
async getSceneMarketMaterialMenu () {
const typeList = await uni.$api.sceneMarketApi.getSceneMarketMaterialMenu()
this.typeList = typeList
this.tabBarClick(0)
},
tabBarClick (index) {
if (this.tabIndex == index) return
const tabIndex = index,
{
typeList
} = this
this.tabIndex = tabIndex
let detail = typeList[tabIndex].code
if (typeList[tabIndex]?.sceneMarketLevelTwoList.length) detail = typeList[tabIndex].sceneMarketLevelTwoList[0]
this.tabClick(detail)
},
tabClick ({ code: businessCode, id }) {
this.tagId = id
if (this.requestParams.businessCode == businessCode) return
this.requestParams.businessCode = businessCode
this.sceneListRef.requestComplete = false
this.sceneListRef.getSceneMarketMaterialList()
},
}
}
</script>
<style scoped lang='scss'>
.scene-market-box {
height: calc(100vh - #{toRpx(144)});
margin: toRpx(64) toRpx(48) 0 0 ;
border-radius: toRpx(48);
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
box-sizing: border-box;
overflow: hidden;
border: toRpx(2) solid #ffffff;
.scene-market-content {
width: 100%;
height: calc(100% - #{toRpx(128)});
background: #ffffff;
transform: translateY(toMinusRpx(32));
box-sizing: border-box;
border-radius: toRpx(48);
.tabs {
gap: toRpx(24);
padding: toRpx(40) toRpx(44);
.tab {
height: toRpx(80);
background: #f2f2f2;
padding: 0 toRpx(32);
color: #666666;
font-size: toRpx(28);
border-radius: toRpx(16);
}
.active {
background: #2d66f71a;
color: #2d66f7;
font-weight: 500;
}
}
.scene-list {
height: calc(100% - #{toRpx(160)});
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -82,7 +82,6 @@ ...@@ -82,7 +82,6 @@
</view> </view>
</template> </template>
<script> <script>
import SceneMarket from './components/SceneMarket/index.vue'
// import myClick from '@/mixin/click' // import myClick from '@/mixin/click'
import timeout from '@/mixin/timeout' import timeout from '@/mixin/timeout'
import recorder from '@/mixin/record/recorder' import recorder from '@/mixin/record/recorder'
...@@ -91,10 +90,9 @@ import versionCheck from '@/mixin/versionCheck.js' ...@@ -91,10 +90,9 @@ import versionCheck from '@/mixin/versionCheck.js'
import LeftSide from './components/LeftSide.vue' import LeftSide from './components/LeftSide.vue'
import merge from '@/mixin/record/merge.js' import merge from '@/mixin/record/merge.js'
import Material from '@/components/MaterialIndex.vue' import Material from '@/components/MaterialIndex.vue'
import { interceptionMixin } from '@/mixin/index'
export default { export default {
mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin], mixins: [recorder, uploader, timeout, versionCheck, merge],
components: { SceneMarket, LeftSide, Material }, components: { LeftSide, Material },
props: { props: {
id: [String, Number], id: [String, Number],
finishDoneText: String, finishDoneText: String,
......
<template>
<view :class="['layout',{'byd-layout':isByd}]">
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
@scale="$emit('scale',$event)"
:scaleSwitch="false"
>
<template slot="customContent">
<view class="layout-content">
<view class="title">
<view class="text">{{title}}</view>
</view>
<view class="content">
<view
class="form-box"
:key="watchStatus"
>
<view class="form">
<template v-for="(i, index) in formObject">
<view
:class="['form-item' ,{active:focusIndex == index}]"
:key="index"
>
<view class="form-item-box">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
@input="inputCustomer"
:placeholder="i.placeholder"
@focus="focusIndex = index"
@blur="resetFocusIndex"
:data-key="i.key"
/>
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
v-if="i.hasCustomerAutocomplete"
/>
<template v-if="i.unit">
<view class="unit">{{i.unit}}</view>
</template>
</template>
<template v-else>
<view
:class="['select flex',{placeholderStyle:!customerInfo[i.key]}]"
@click="showPopup(i.popKey,index)"
>
<view class="value text-hide">{{customerInfo[i.key] ||i.placeholder}}</view>
<uni-icons
class="arrow"
type="right"
:size="16"
></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
</view>
</view>
<insurance-table
:isPreview="isPreview"
:show="show"
/>
</view>
</template>
</wnCanvas>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
@close="resetFocusIndex"
/>
<carBuyers
ref="carBuyersVisible"
@select="handleSelect($event,'carBuyersVisible')"
@close="resetFocusIndex"
/>
</view>
</template>
<script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue'
import InsuranceTable from './components/InsuranceTable.vue'
import carBuyers from './components/carBuyers.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
export default {
components: { CarBrands, InsuranceTable, CustomerAutocomplete, carBuyers },
props: {
penSwitch: Boolean,
show: Boolean,
title: String,
isPreview: Boolean,
isByd: Boolean,
madiaId: Number
},
name: 'Reception',
data () {
return {
formObject: [
{
placeholder: '车主姓名',
key: 'customerName',
type: 'input',
inputType: 'text',
maxlength: 50,
hasCustomerAutocomplete: true
},
{
placeholder: '车主电话',
key: 'phoneNumber',
type: 'input',
inputType: 'tel',
maxlength: 11,
hasCustomerAutocomplete: true
},
{
placeholder: '品牌车型',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible',
},
{
placeholder: '新车开票价',
key: 'newCarFare',
type: 'input',
inputType: 'digit',
maxlength: 10,
unit: '元',
},
{
placeholder: '购车方式',
key: 'carBuyers',
type: 'select',
popKey: 'carBuyersVisible',
}
],
customerInfo: {},
focusIndex: -1,
insuranceList: []
}
},
watch: {
watchCustomerInfo: {
immediate: true,
handler (newval) {
if (newval) this.customerInfo = newval
}
},
},
computed: {
watchCustomerInfo () {
return this.$store.state.user.customerInfo
},
watchStatus () {
return this.$store.state.user.historyStatus
},
},
methods: {
inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
handleSelect (item, popkey) {
this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.staffName = item.staffName
} else if (popkey == 'carBuyersVisible') {
this.customerInfo.carBuyers = item.name
this.customerInfo.carPurchaseMethod = item.id
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carModelId = item.id
}
this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
showPopup (e, index) {
this.focusIndex = index
this.$refs[e].open()
},
closeAllPopup () {
this.$refs.carBrandListVisible.close()
this.resetFocusIndex()
},
resetFocusIndex (e) {
this.focusIndex = -1
if (e?.currentTarget && e?.target) {
const { key } = e.currentTarget.dataset
if (e.target.value.length == 0) return
if (key == 'newCarFare') {
let value = Number(e.target.value) >= 9999999 ? 9999999 : e.target.value
// 判断是否为整数
if (!Number.isInteger(value)) value = String(value).replace(/(\d*\.?\d{0,2})\d*/, '$1')
value = Number(String(value).replace(/^0+/, ''))
this.customerInfo[key] = Number(value).toFixed(2) ? Number(value).toFixed(2) >= 0 ? value : '' : ''
this.inputCustomer()
}
}
},
chooseCustomer (e) {
this.customerInfo = {
...this.customerInfo,
phoneNumber: e.ownerPhone,
customerName: e.ownerName,
carModel: e.brandModel
}
this.inputCustomer()
}
}
}
</script>
<style scoped lang="scss">
.layout {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/media/insurance-bg.webp');
background-size: 100%;
&-content {
height: 100%;
margin: $margin;
position: relative;
}
.title {
padding: toRpx(120) 0 toRpx(48) toRpx(128);
.text {
line-height: toRpx(80);
font-weight: 500;
font-size: toRpx(56);
color: #333333;
}
}
.content {
.form-box {
height: toRpx(80);
padding: 0 toRpx(128);
.form {
display: flex;
gap: 0 toRpx(28);
height: 100%;
&-item {
width: toRpx(368);
height: 100%;
position: relative;
&-box {
position: relative;
width: 100%;
height: 100%;
background: #ffffff;
border: toRpx(3) solid #a8c1ff;
border-radius: toRpx(16);
box-sizing: border-box;
padding: 0 toRpx(24);
z-index: 2;
display: flex;
align-items: center;
.unit {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: toRpx(24);
font-weight: 300;
font-size: toRpx(28);
color: #292d33;
line-height: toRpx(36);
}
}
.input,
.select {
width: 100%;
height: toRpx(60);
border: none !important;
outline: none;
font-size: toRpx(28);
color: #333333;
border-radius: toRpx(16);
box-sizing: border-box;
padding: 0 !important;
display: flex;
align-items: center;
&::placeholder {
color: #999999;
}
}
.placeholderStyle {
color: #999999;
line-height: toRpx(80);
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
.active {
&::after {
position: absolute;
left: toMinusRpx(2);
top: toMinusRpx(2);
width: calc(100% + #{toRpx(4)});
height: calc(100% + #{toRpx(4)});
content: '';
background-image: linear-gradient(#2f6af7, #75bcff);
box-shadow: 0 0 0 toRpx(8) #2c66f71a;
border-radius: toRpx(16);
}
}
}
}
}
}
.byd-layout {
background-image: url('@/assets/images/media/byd-insurance-bg.webp') !important;
.title {
padding: toRpx(120) toRpx(128) toRpx(48);
.text {
text-align: center;
}
}
}
</style>
<template>
<uni-popup
ref="popup"
type="bottom"
>
<!-- :mask-click="false" -->
<view class="detail-box">
<view
class="close-box flex"
@click="close"
>
<uni-icons
type="clear"
:size="28"
color="#76787f"
></uni-icons>
</view>
<view class="sprite-icon icon-bao"></view>
<view class="title text-hide">
{{item.itemName}}
</view>
<view class="type">{{item.main}}</view>
<view class="content">
<rich-text :nodes="item.itemDesc"></rich-text>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
item: Object
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
}
}
}
</script>
<style scoped lang='scss'>
.detail-box {
position: relative;
width: toRpx(720);
max-height: toRpx(640);
border-radius: toRpx(40);
padding: toRpx(48) toRpx(64) toRpx(88);
box-sizing: border-box;
overflow: hidden;
&::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: toRpx(240);
background-image: linear-gradient(180deg, #e5edfe 0%, #ffffff 100%);
content: '';
z-index: -1;
}
&::after {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
content: '';
background-color: #fff;
z-index: -2;
}
.icon-bao {
position: absolute;
top: toRpx(48);
right: toRpx(68);
}
.close-box {
position: absolute;
width: toRpx(136);
height: toRpx(136);
top: 0;
right: 0;
justify-content: center;
z-index: 2;
}
.title {
font-weight: 500;
font-size: toRpx(40);
color: #292d33;
line-height: toRpx(64);
padding: toRpx(48) 0 toRpx(24);
}
.type {
background: #f2f2f2;
border-radius: toRpx(6);
padding: toRpx(2) toRpx(16);
font-size: toRpx(26);
color: #666666;
line-height: toRpx(40);
width: fit-content;
}
.content {
margin-top: toRpx(48);
max-height: toRpx(276);
font-size: toRpx(30);
color: #292d33;
line-height: toRpx(48);
overflow-y: auto;
word-break: break-all;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<MessageBox
ref="carBuyersVisible"
position="bottom"
:isFooter="false"
:title="`请选择${title}`"
:maxHeight="1000"
@close="$emit('close')"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: carBuyers == item.name }"
@click="handleSelect(item)"
v-for="(item, index) in carBuyersList"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
</template>
<script type="text/ecmascript-6">
export default {
name: 'carBuyers',
props: {
title: {
type: String,
default: '购车方式'
},
salesPropsUuid: {
type: String,
default: ''
}
},
data () {
return {
carBuyersList: [
{
name: '全款',
id: 1
},
{
name: '按揭',
id: 2
}
]
}
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.close()
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
carBuyers () {
return this.$store.state.user.customerInfo.carBuyers
},
},
mounted () {
},
methods: {
open () {
this.$refs.carBuyersVisible.open()
},
handleSelect (item) {
this.close();
this.$emit('select', item)
},
close () {
this.$refs?.carBuyersVisible?.close()
}
}
}
</script>
<style scoped lang="scss">
.select-box {
margin: toRpx(40) 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: toRpx(32);
overflow-y: scroll;
max-height: 50vh;
padding-bottom: toRpx(60);
.select-item {
text-align: center;
height: toRpx(68);
line-height: toRpx(44);
opacity: 1;
border: toRpx(2) solid #dce0e6;
color: #333;
font-size: toRpx(32);
border-radius: toRpx(8);
&.checked {
border: toRpx(2) solid #292d33;
}
}
}
</style>
<template>
<uni-popup
ref="learnPopup"
type="center"
:is-mask-click="false"
>
<view class="learn-box">
<view class="sprite-icon icon-learn-bg"></view>
<view class="learn-content">
<view class="learn-title">退出提醒</view>
<text class="learn-text">{{content}}</text>
</view>
<view class="learn-footer flex">
<view
class="learn-btn learn-confirm"
@click="confirm"
>确认退出</view>
<view
class="learn-btn learn-cancel"
@click="cancel"
>继续学习</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
content: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
computed: {
learnRef () {
return this.$refs.learnPopup
}
},
mounted () {
},
methods: {
open () {
this.learnRef.open()
},
cancel () {
this.close()
this.$emit('cancel')
},
close () {
this.learnRef.close()
},
confirm () {
this.close()
this.$emit('confirm')
}
}
}
</script>
<style scoped lang='scss'>
.learn-box {
width: toRpx(848);
height: toRpx(648);
border-radius: toRpx(48);
background: #ffffff;
position: relative;
overflow: hidden;
.sprite-icon{
position: absolute;
top: 0;
left: 0;
zoom: 2;
}
.learn-content {
padding: toRpx(296) toRpx(64) toRpx(32);
text-align: center;
.learn-title {
color: #333333;
font-size: toRpx(40);
font-weight: 500;
margin-bottom: toRpx(16);
}
.learn-text {
color: #666666;
font-size: toRpx(32);
}
}
.learn-footer {
height: toRpx(160);
padding: 0 toRpx(64);
justify-content: space-between;
.learn-btn {
width: toRpx(344);
height: toRpx(80);
border-radius: toRpx(64);
background: #f0f1f5;
display: flex;
align-items: center;
justify-content: center;
color: #1a1a1a;
font-size: toRpx(28);
}
.learn-cancel {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!--针对弹窗穿透滚动,统一封装的popup-->
<template>
<page-meta :page-style="'overflow:' + (show ? 'hidden' : 'visible')"></page-meta>
<uni-popup :class="popupClass" ref="publishPopup" :type="type" @change="change" :is-mask-click="isMaskClick" :safe-area="safeArea" :showClose="showClose">
<!-- 顶部标题栏插槽 -->
<slot name="header">
<view class="popup-top-box flex align-center" v-if="showTitle">
<text class="popup-top-box-title">{{ title }}</text>
<view @click.stop="closePopup">
<uni-icons class="icon-close" type="closeempty"></uni-icons>
</view>
</view>
</slot>
<!-- 主要内容插槽 -->
<slot name="content"></slot>
<!-- 底部插槽 插槽有内容就优先自定义内容-->
<slot name="footer">
<view class="footer-box flex justify-center" v-if="isShowFooter">
<view class="cancle-btn btn" @click.stop="closePopup">{{ cancelText }}</view>
<view class="sure-btn btn" @click.stop="confirm">{{ confirmText }}</view>
</view>
</slot>
</uni-popup>
</template>
<script>
export default {
name: 'PublishPopup',
props: {
type: {
type: String,
default: 'bottom'
},
isMaskClick: {
type: Boolean,
default: true
},
safeArea: {
type: Boolean,
default: true
},
popupClass: {
type: String,
default: ''
},
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ''
},
showTitle: {
type: Boolean,
default: true
},
isShowFooter: {
type: Boolean,
default: true
},
cancelText: {
type: String,
default: '取消'
},
confirmText: {
type: String,
default: '确定'
}
},
data() {
return {
show: false
}
},
methods: {
open() {
this.$nextTick(() => {
console.log(this.$refs)
if (this.$refs.publishPopup) {
this.$refs.publishPopup.open()
}
})
return new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
})
},
change(e) {
this.show = e.show
},
closePopup() {
this.$refs.publishPopup.close()
if (this.reject) {
this.reject(null)
}
this.$emit('close')
},
confirm() {
if (this.resolve) {
this.$refs.publishPopup.close()
this.resolve()
}
this.$emit('confirm')
}
}
}
</script>
<style scoped lang="scss">
.popup-top-box {
color: #333333;
font-size: toRpx(36);
font-weight: 500;
text-align: center;
padding: toRpx(32);
.popup-top-box-title {
flex: 1;
}
.icon-close {
text-align: end;
}
}
.justify-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.align-center {
align-items: center;
}
.uniui-closeempty {
color: #1a1a1a;
font-size: toRpx(24);
font-weight: 600;
}
.footer-box {
width: 100%;
height: toRpx(164);
background-color: #fff;
position: absolute;
border-radius: 0 0 toRpx(42) toRpx(42);
bottom: 0;
.btn {
width: 40%;
height: toRpx(80);
border-radius: toRpx(48);
opacity: 1;
line-height: toRpx(80);
text-align: center;
color: rgba(26, 26, 26, 0.6);
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
margin-left: toRpx(32);
}
}
</style>
<template>
<view class="select-box">
<view
class="select"
@click.stop="isSelect = !isSelect"
>
{{selectList[selectIndex].label}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<view
class="pop-box"
v-if="isSelect"
>
<view
v-for="(i,index) in selectList"
:key="index"
class="type-item flex"
:class="index == selectIndex ? 'active' : ''"
@click="chooseType(index, i)"
>{{i[labelKey]}}</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
selectList: Array,
labelKey: {
type: String,
default: 'label'
}
},
name: '',
data () {
return {
selectIndex: 0,
isSelect: false
}
},
mounted () {
},
methods: {
hideSelect () {
this.isSelect = false
},
chooseType (index, item) {
this.selectIndex = index
this.isSelect = false
this.$emit('chooseType', { item, index })
},
}
}
</script>
<style scoped lang='scss'>
.select-box {
position: relative;
z-index: 5;
.select {
display: flex;
align-items: center;
justify-content: flex-end;
height: toRpx(84);
border-radius: toRpx(16);
opacity: 1;
background: #f2f2f2;
padding: 0 toRpx(24) 0 toRpx(40);
}
.arrow-bottom {
width: toRpx(48);
height: toRpx(48);
}
.pop-box {
position: absolute;
top: toRpx(100);
left: 0;
width: 100%;
background: #ffffff;
box-shadow: 0 0 toRpx(16) 0 #99999933;
border-radius: toRpx(16);
padding: toRpx(16) 0;
text-align: center;
animation: show-view-opacity 0.15s forwards;
.type-item {
padding: 0 toRpx(28);
margin-bottom: toRpx(8);
height: toRpx(84);
justify-content: center;
&:last-child {
margin-bottom: 0;
}
&.active {
background-color: #ecf1ff;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="type-tab">
<view class="type-box">
<view
class="tab-item"
v-for="(i, index) in typeList"
:key="index"
@click="tabClick(index)"
>
<view
:class="['sprite-icon',tabClass(index)]"
:style="{
left:blockLeft
}"
></view>
<view
class="text"
:class="[tabIndex == index ? `active` : '']"
>
{{ i[nameKey] }}
</view>
</view>
</view>
<view class="mask-box"></view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
typeList: Array,
tabIndex: {
type: Number,
default: 0
},
nameKey: {
type: String,
default: 'tabName'
}
},
name: '',
data () {
return {
firstClass: Object.freeze(['first-nav', 'second-nav']),
}
},
computed: {
blockLeft () {
let { tabIndex } = this
return `${(tabIndex * 400) - (tabIndex == 0 ? 0 : 48)}rpx`
}
},
mounted () {
},
methods: {
tabClass (index) {
let className = ''
if (this.tabIndex == index) {
className = 'active icon-'
if (index == 0) className += 'first-nav'
else className += 'second-nav'
}
return className
},
tabClick (index) {
this.$emit('update:tabIndex', index)
this.$emit('tabClick',index)
}
}
}
</script>
<style scoped lang='scss'>
.type-tab {
position: relative;
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(160);
line-height: toRpx(128);
border-radius: toRpx(48) toRpx(48) 0 0;
overflow: hidden;
z-index: 0;
.tab-item {
width: toRpx(400);
text-align: center;
font-weight: 500;
font-size: toRpx(40);
color: #1f2133;
.text {
position: relative;
text-align: center;
width: toRpx(400);
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(40);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
.sprite-icon {
transition: left 0.15s;
}
}
}
.mask-box {
position: absolute;
height: 100vh;
width: 100%;
background: #fff;
left: 0;
top: toRpx(128);
border-radius: toRpx(48);
overflow: hidden;
}
}
</style>
\ No newline at end of file \ No newline at end of file
export default {
data () {
return {
AIUrl: ''
}
},
mounted () {
},
methods: {
async getAiagent (options, agentCode = 'AI6') {
const { phone } = uni.$storage.get('userInfo'),
[data] = await uni.$api.sceneMarketApi.getAiagent({
ownerShipType: 1,
accountPhone: phone,
agentCode
})
if (data) {
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo'),
bussinessType = sceneType == 0 ? 1 : 2,// sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
brand = {
1: '问界',
2: '比亚迪',
3: '其他'
}[channelType]
let title = options.directoryName
if(options.title) title += `-${options.title}`
let { agentUrl, domainName } = data,
url = `${agentUrl}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}`
if (options.id) url += `&enter_id=${options.id}`
this.AIUrl = url
this.setWebviewStyle()
} else uni.showToast({
title: '获取智能体失败',
icon: 'error'
})
},
setWebviewStyle () {
const setWebviewStyleWithRetry = () => {
const currentWebview = this.$scope.$getAppWebview()
let [wv1, wv2] = currentWebview.children()
let wv1Flag = false,
wv2Flag = false
if (wv2) {
if (wv1) {
wv1.setStyle({
left: '0',
top: '9.37%',
height: '90.63%',
width: '71.36%'
});
wv1Flag = true;
}
if (wv2) {
wv2.setStyle({
left: '71.9%',
top: '17.18%',
height: '82.82%',
width: '28.3%'
});
wv2Flag = true;
}
} else {
if (wv1) {
wv1.setStyle({
left: '71.9%',
top: '17.18%',
height: '82.82%',
width: '28.3%'
});
wv1Flag = true;
wv2Flag = true;
}
}
return wv1Flag && wv2Flag
};
const retrySetWebviewStyle = () => {
if (!setWebviewStyleWithRetry()) {
// 如果未成功,继续重试
setTimeout(retrySetWebviewStyle, 50);
} else {
// 成功设置样式,结束循环
console.log('Webview样式设置成功');
}
};
setTimeout(retrySetWebviewStyle, 100);
}
}
}
import loginMixin from './loginMixin'
import receptionTrackMixin from './receptionTrackMixin' import receptionTrackMixin from './receptionTrackMixin'
import aiUrlMixin from './aiUrlMixin'
import report from './report'
import interceptionMixin from './interceptionMixin'
module.exports = { module.exports = {
loginMixin,
receptionTrackMixin, receptionTrackMixin,
aiUrlMixin,
report,
interceptionMixin
} }
let modalQueue = [],
eventRequest = []
export default {
data () {
return {}
},
computed: {
userInfo () {
return uni.$storage.get('userInfo') || {}
}
},
mounted () { },
methods: {
/**
*
* @param {是否需要检测企微打卡} checkWW
* @returns
*/
async checkDailyReport (checkWW = true) {
modalQueue = []
eventRequest = []
let { sceneType, isSuper, loginRole } = this.userInfo
if (!(isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6)) {
// 判断员工是否已打卡上班
if (checkWW) eventRequest.push(this.clockedIntoWork())
let apiName = {
0: this.equityStaffDailyReport,
1: this.staffDailyReport,
7: this.usedCarDailyReport
}
eventRequest.push(apiName[sceneType]())
}
return new Promise(resolve => {
Promise.all(eventRequest).then(results => {
results = results.slice(-2)
let resultFlag = results.some(item => item)
this.showNextModal()
resolve(resultFlag)
})
})
},
showNextModal () {
if (modalQueue.length > 0) {
const modalInfo = modalQueue.pop()
// if (wx.__HAS_SHOW_MODAL) return;
// wx.__HAS_SHOW_MODAL = true;
uni.showModal({
title: modalInfo.title,
content: modalInfo.content,
showCancel: modalInfo.showCancel,
cancelColor: '#292D33',
confirmText: modalInfo.confirmText,
confirmColor: '#347BFF',
success: function (res) {
// wx.__HAS_SHOW_MODAL = false;
// if (res.cancel) _this.showNextModal();
if (res.cancel) showNextModal()
modalInfo.eventCallback(res)
}
})
}
},
/**
* 轻改日报
*/
staffDailyReport () {
let { userInfo } = this
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
.staffDailyReportMerchantValid({
merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid,
sceneType: 1
})
.then(data => {
if (data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
// if (wx.__HAS_NOTLOGIN_MODAL) return false; //
this.addModalToQueue('日报提醒', '您有未填写的日报,请点击前往。', '前往填写', false, 2, res => {
if (res.confirm) {
console.log(formattedDate)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve()
})
})
},
/**
* 二手车日报
*/
usedCarDailyReport () {
let { userInfo } = this
return new Promise(async (resolve, reject) => {
const data = await uni.$api.interceptionApi.checkUsedCarStaffIsNew({
merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid,
staffPhone: userInfo.phone,
sceneType: 7
})
if (!data) resolve(false) //检测是否新员工或调店 flase不检测日报 true检测日报
else {
const _data = await uni.$api.interceptionApi.checkUsedCarStaffDailyReportValid({
sellerMerchantId: userInfo.shopMerchantId,
}) //true 已填写 false 未填写
if (!_data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
this.addModalToQueue('日报提醒', '您有未填写的日报,请点击前往。', '前往填写', false, 2, res => {
if (res.confirm) {
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/usedCar/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({
url: `/pages/usedCar/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
resolve(true)
} else resolve(false)
}
})
},
clockedIntoWork () {
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
.clockInConfigPhone({})
.then(res => {
let { need, clockIn } = res
// 已配置未打卡
if (need == 1 && clockIn == 0) {
// 有配置并且没有打卡就提示
this.addModalToQueue('打卡提醒', '您当前企微未打卡,无法录单,请前往企微打卡后再试,如有异议请联系管理员。', '知道了', false, 4, res => {
if (res.confirm) {
// wx.$router.go("tabWorkOrder.staffDaily", {
// // reportDate: formattedDate,
// });
}
})
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve(false)
})
})
},
/**延保日报 */
equityStaffDailyReport () { },
addModalToQueue (title, content, confirmText, showCancel, priority, eventCallback) {
if (modalQueue.findIndex(val => val.content == content) < 0)
modalQueue.push({
title,
content,
confirmText,
showCancel,
priority,
eventCallback
})
modalQueue.sort((a, b) => a.priority - b.priority)
},
/**
* 查询当前员工处罚情况
*/
async inspectionOfProhibitionBill () {
const data = await uni.$api.interceptionApi.checkStaffStudyPunish()
if (data)
uni.showModal({
title: '温馨提示',
content: '未完成学习任务,禁止提单!\n请在平板电脑上展业助手-学习中心完成学习。',
showCancel: false,
cancelColor: '#292D33',
confirmText: '确定',
confirmColor: '#347BFF'
})
return Promise.resolve(data)
}
}
}
import dayjs from 'dayjs'
export default {
data() {
return {
IncomeList: [
{
label: '基本工资',
icon: 'jbgz-icon',
content: '实发底薪=应发底薪÷应出勤天数x实际出勤天数',
value: 'actualBasicSalary',
recordKey: 'refundOffsetRecords',
showNext: true,
sort: 1,
base: true,
customize: true,
basicList: [
{
label: '应发底薪',
tips: '',
prop: 'basicSalary',
actualProp: 'actualBasicSalary',
value: 3000
},
{
label: '应出勤天数',
value: 27,
prop: 'shouldWorkDay',
unit: '天'
},
{
label: '实际出勤天数',
value: 22,
prop: 'actualWorkDay',
unit: '天'
}
],
performance: {
label: '绩效工资',
prop: 'performanceSalary',
actualProp: 'actualPerformanceSalary',
},
},
{
label: '退单冲减',
icon: 'tdcj-icon',
content: '历史已发放提成订单客户本月退单,当月冲减该月提成',
value: 'refundOffset',
recordKey: 'refundOffsetRecords',
sort: 4,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '退单记录描述'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
'remark',
{
key: 'deduction',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '会员权益/升级',
icon: 'qytc-icon',
content: '权益提成 = 权益产值 × 提成系数 × 提成比例',
subContent: '延保提成 = 售前延保产值×提成系数×安心包Max考核系数×提成比例 +售后延保产值×提成比例 +安心包Max产值×提成系数×提成比例',
warnList: [
{ style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;', message: '当安心包Max渗透率<15%,安心包Max考核系数为 0.8' },
{
style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;',
message: '当安心包Max渗透率>15%,安心包Max考核系数为 1.0'
},
{
style: 'font-size: 28rpx;color: #F47F13;line-height: 48rpx;',
message: '问界安心包、安心包PRO、轮胎服务,三项合计交付渗透率>15% 的部分,可以计入安心包Max渗透率;如三项渗透率为20%,其中5%计入安心包Max考核。'
}
],
value: 'equityCommission',
recordKey: 'equityMerchantCommissions',
sort: 2,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
{
name: val => {
const typeName = val.thirdLevelGoodsTypeName || val.secondaryGoodsTypeName || val.goodsTypeName
return `${val.merchantName}${typeName ? `-${typeName}` : ''}`
},
style: val => {
return val == 1 ? 'color: #3773F8;background-color:rgba(55, 115, 248, .2)' : 'color: #7C2CF5;background-color: rgba(124, 44, 245, .2);'
},
type: 'configCarType',
text: val => {
const typeMap = {
1: '问界',
2: '其他',
3: '鸿蒙'
}
return typeMap[val] || ''
}
},
'commission'
]
},
{
label: '日报扣款',
icon: 'rbkk-icon',
content: '日报填写错误或未在约定时间内填写日报',
value: 'dailyDeductMoney',
recordKey: 'dailyDeductionRecords',
sort: 5,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '轻改提成',
icon: 'qgtc-icon',
content: '轻改产值x提成系数x提成比例',
value: 'lightCommission',
recordKey: 'lightMerchantCommissions',
sort: 3,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: [
{
name: val => {
const typeName = val.thirdLevelGoodsTypeName || val.secondaryGoodsTypeName || val.goodsTypeName
return `${val.merchantName}${typeName ? `-${typeName}` : ''}`
}
},
'commission'
]
},
{
label: '平板接待扣款',
icon: 'pbjd-icon',
content: '无效或虚假平板接待以及未使用平板接待',
value: 'padDeductMoney',
recordKey: 'padDeductionRecords',
sort: 6,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '本月递延金',
icon: 'bydyj-icon',
content: '本月递延金 = 本月提成 × 10%',
desc: '递延金将于6个月后提成发放时返还',
value: 'deferExpenses',
sort: 7,
showUnit: '-'
},
{
label: '返还递延金',
icon: 'ffdyj-icon',
content: '本月递延金 = 提成(M-6)× 10%',
desc: '6个月前提成递延金在本月返还',
value: 'deferIncome',
sort: 8
},
{
label: '其他',
icon: 'qt-icon',
content: '其他扣款、奖励事项',
recordKey: 'otherDeductionRecords',
sort: 9,
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '备注'
},
{
title: '金额',
width: 20
}
],
tabelTr: [
{
key: 'createdDate',
format: val => {
return dayjs(val).format('YYYY-MM-DD')
}
},
'remark',
'deduction'
],
value: 'otherDeduction'
}
],
year: '',
month: '',
currentMonth: '',
date: ''
}
},
mounted() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
this.year = year
this.month = month
this.day = day
this.currentMonth = month
this.getDetail && this.getDetail(`${this.year}-${this.month}`, day)
this.date = `${this.year}-${this.month}-${day}`
},
methods: {
formatNumber(num, decimalPlaces = 2) {
// 保证小数部分精度
let [integer, decimal] = Number(num).toFixed(decimalPlaces).split('.')
// 格式化整数部分(千分位)
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
// 如果有小数部分,则保留小数部分
return decimal ? `${integer}.${decimal}` : integer
},
back() {
console.log(88)
this.$emit('backHome')
},
prevTab() {
this.month = this.month - 1
if (this.month < 1) {
this.month = 12
this.year = this.year - 1
}
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
},
nextTab() {
this.month = this.month + 1
// if (this.month < 1) {
// this.month = 12
// this.year = this.year - 1
// }
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
}
}
}
/*
* @Author: yangming@didihu.com.cn yangming@didihu.com.cn
* @Date: 2025-05-01 11:00:20
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-05-07 09:58:48
* @FilePath: \gl-tape\mixin\pointTrack.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const FILTER_PAGE = ['收入测算试算页']
const REPORT_MAN = 5
let REPORT_STATUS = false
import dayjs from 'dayjs'
export default {
data() {
return {
currentTime: null
}
},
mounted() {
if (!FILTER_PAGE.includes(this.pageName) && this.pageName) {
this.enterPage()
}
},
methods: {
init() {
this.enterPage()
},
// 上报埋点
report(recordList) {
REPORT_STATUS = true
uni.$api.commonApi
.recordInsert({ recordList })
.then(res => {
if (res) {
let recordTrackList = uni.$storage.get('recordTrackList') || []
recordTrackList = recordTrackList.slice(REPORT_MAN)
uni.$storage.set('recordTrackList', recordTrackList)
REPORT_STATUS = false
}
})
.catch(err => {
REPORT_STATUS = false // 允许下次重试
})
},
collect() {
const { phone: phoneNumber, name: loginAccount, uuid, sceneType: scene, userType } = uni.$storage.get('userInfo')
const params = {
userType,
loginAccount,
phoneNumber,
uuid,
scene,
prePagePath: '/',
pagePath: this.pageName,
eventCode: this.eventCode,
eventTime: dayjs(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
batchId: this.currentTime,
systemSource: 3,
eventType: 2
}
const recordTrackList = uni.$storage.get('recordTrackList') || []
recordTrackList.push(params)
uni.$storage.set('recordTrackList', recordTrackList)
if (recordTrackList.length >= REPORT_MAN && !REPORT_STATUS) {
this.report(recordTrackList.slice(0, REPORT_MAN))
}
},
// 离开页面埋点
leavePage() {
this.collect()
},
// 进入页面埋点
enterPage() {
this.currentTime = Date.now()
this.collect()
}
},
beforeDestroy() {
if (!FILTER_PAGE.includes(this.pageName) && this.pageName) {
this.leavePage()
}
}
}
export default {
data () {
return {
list: [],
dateIndex: 0,
pageNum: 1,
total: 0,
flag: true,
nothing: false,
pageSize: 18,
total: 0,
isEnd: false
};
},
mounted () { },
methods: {
async getList (api, params) {
try {
uni.showLoading({
mask: true
});
const { list, total } = await uni.$api.boutiqueApi[api](params);
uni.hideLoading();
this.list = [...(params.pageNum == 1 ? [] : this.list), ...list];
this.flag = true;
this.total = total;
} catch (error) {
uni.hideLoading()
this.flag = true;
this.isEnd = true
throw error;
}
},
},
};
export default {
data () {
return {
goodsId: '',
visitsId: '',
source: ''
}
},
onLoad (options) {
this.visitsId = options.visitsId || ''
this.goodsId = options.id
if (options.source) this.source = options.source
this.addRecord()
},
methods: {
addRecord () {
const { shopMerchantId: merchantId, shopMerchantName: merchantName } = uni.$storage.get('userInfo')
if (!merchantId || !this.goodsId) return
const params = {
goodsId: this.goodsId,
goodsType: 0,
merchantId,
merchantName,
}
if (this.visitsId) params.visitsId = this.visitsId
if (this.source) params.searchSource = this.source
uni.$api.commonApi.addRecord(params).then(res => {
this.addId = res
})
}
},
onUnload () {
if (!this.addId) return
const params = {
id: this.addId
}
if (this.visitsId) params.visitsId = this.visitsId
uni.$api.commonApi.leaveRecord(params).then(res => {
})
}
}
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-28 18:19:19
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-30 13:31:51
* @FilePath: \gl-tape\pages\common\webview.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view>
<view
class="header"
@click="back"
>
<view class="nav-bar">
<view class="back">
<uni-icons
type="left"
:size="20"
color="#000000"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
</view>
</view>
<view
class="ai-window"
v-if="url"
>
<web-view :src="url"></web-view>
</view>
<learn-popup
ref="learn"
content="您还没有完成本次对练考核,\n是否确定退出?"
@cancel="cancel"
@confirm="confirm"
/>
</view>
</template>
<script type="text/ecmascript-6">
import LearnPopup from '@/components/LearnPopup.vue'
export default {
components: {
LearnPopup
},
name: '',
data () {
return {
url: '',
title: '广联AI集市',
wv: null,
studyId: '',
}
},
computed: {
learnRef () {
return this.$refs.learn
},
},
onLoad (options) {
if (options.studyId) this.studyId = options.studyId
if (options.pageTitle) this.title = options.pageTitle
const { sceneType, uuid, phone, channelType = 1 } = uni.$storage.get('userInfo')
const bussinessType = sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
const brand = {
1: '问界',
2: '比亚迪',
3: '其他'
}[channelType]
this.url = `${options.url}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${options.domain}&presuppositionProblem=${options.presuppositionProblem}`
if (options.practice_status) {
this.url += `&practice_status=${options.practice_status}`
}
if (options.businessType) {
this.url += `&businessType=${options.businessType}`
}
if (options.brandType) {
this.url += `&brandType=${options.brandType}`
}
if (options.date) {
this.url += `&date=${options.date}`
}
console.log(this.url, 999)
// this.url='http://assistant.test.glsx.com.cn/chat/jHpvpOmuMWPxYxKo?business_type=12&brand=%E9%97%AE%E7%95%8C&one_id=266&platformType=2&no_header=1&domain=http://aiassistant.test.glsx.com.cn'
setTimeout(() => {
const currentWebview = this.$scope.$getAppWebview()
const wv = currentWebview.children()[0]
if (wv) {
this.wv = wv
wv.setStyle({ top: '10%', height: '90%' })
}
}, 1000)
},
onBackPress (options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back()
return true
}
// 其他情况允许正常返回
return false
},
mounted () {
},
methods: {
async back () {
try {
const { studyId } = this
if (studyId) {
uni.showLoading()
const { aiReviewReport } = await uni.$api.commonApi.getShortCourseDetail({ id: this.studyId })
uni.hideLoading()
let open = false
aiReviewReport.map(e => {
if (e.examStatus != 2 && !open) open = true
})
if (open) {
this.learnRef.open()
this.wv.setVisible(false)
} else this.confirm()
} else throw false
} catch (error) {
uni.hideLoading()
this.confirm()
}
},
cancel () {
this.wv.setVisible(true)
},
confirm () {
uni.navigateBack()
uni.$emit('refreshStudyList')
}
}
}
</script>
<style scoped lang="scss">
.header {
// background: url('https://img02.glsx.com.cn/weapp/resource/saas/ai/ai-app-bg.jpg');
padding-top: 30px;
background-color: #f5f9ff;
z-index: 9;
background-size: 100% 100%;
position: fixed;
height: 10%;
width: 100%;
.nav-bar {
width: 100%;
height: 48px;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
.title {
color: #333333;
flex: 1;
font-size: 16px;
font-weight: 700;
text-align: center;
}
}
}
.ai-window {
background-color: #f5f9ff;
position: absolute;
top: 10%;
left: 0;
width: 100%;
height: 90vh;
z-index: 1;
}
</style>
<template>
<view class="audio-box flex">
<view
:class="['sprite-icon',`${paused? 'icon-play' : 'icon-pause'}`]"
@click="play"
></view>
<slider
@change="sliderChange"
backgroundColor="#D8D8D8"
block-color="#2C66F7"
block-size="5"
class="progress-box"
:max="innerAudioContext[audioKey].duration||10"
:value="innerAudioContext[audioKey].currentTime||0"
/>
<view class="duration">{{currentTime}}/{{duration}}</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'AudioComponent',
props: {
src: String,
auto: Boolean,
audioKey: String
},
data () {
return {
innerAudioContext: {},
currentTime: '00:00',
duration: '00:00',
paused: true,
progress: ''
}
},
watch: {
src: {
immediate: true,
handler (newval) {
if (newval) this.init(newval)
}
},
},
computed: {
},
destroyed () {
this.innerAudioContext[this.audioKey].destroy()
},
mounted () {
},
methods: {
init (src) {
const innerAudioContext = uni.createInnerAudioContext(),
{ audioKey } = this
innerAudioContext.src = src
innerAudioContext.sessionCategory = 'soloAmbient'
innerAudioContext.onCanplay(this.onCanplay)
innerAudioContext.onPlay(() => this.paused = false)
innerAudioContext.onPause(() => this.paused = true)
innerAudioContext.onTimeUpdate(this.onTimeUpdate)
this.innerAudioContext[audioKey] = innerAudioContext
},
onCanplay () {
this.duration = this.formatTime(this.innerAudioContext[this.audioKey].duration)
},
onTimeUpdate () {
const {
duration,
currentTime
} = this.innerAudioContext[this.audioKey],
mergedOffset = Math.ceil(currentTime)
this.progress = mergedOffset / duration * 100
this.currentTime = this.formatTime(currentTime)
},
formatTime (num) {
num = Math.floor(num);
let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds
return `${minutes}:${seconds}`
},
play () {
if (this.paused) {
if (this.auto) this.innerAudioContext[this.audioKey].play()
this.$emit('onPlay')
}
else this.innerAudioContext[this.audioKey].pause()
},
stop () {
this.currentTime = '00:00'
this.innerAudioContext[this.audioKey].stop()
},
seek (e) {
let query = uni.createSelectorQuery()
query.select('.progress-box').boundingClientRect(data => {
const seconds = (e.changedTouches[0].clientX - data.left) / data.width * this.innerAudioContext[this.audioKey].duration
this.innerAudioContext[this.audioKey].seek(seconds)
}).exec()
},
sliderChange (e) {
this.innerAudioContext[this.audioKey].seek(e.detail.value)
}
}
}
</script>
<style scoped lang='scss'>
.audio-box {
width: toRpx(1120);
height: toRpx(80);
background-image: url('@/assets/images/common/audio-bg.webp');
background-size: 100%;
margin-bottom: toRpx(24);
box-sizing: border-box;
padding: 0 toRpx(32);
font-size: toRpx(28);
color: #333333;
.sprite-icon {
margin-right: toRpx(16);
}
.progress-box {
width: toRpx(796);
margin: 0 !important;
/deep/.uni-slider-track {
background-image: linear-gradient(90deg, #2c66f7 0%, #75bcff 100%);
}
/deep/.uni-slider-thumb {
&::after {
width: toRpx(14);
height: toRpx(14);
border: toRpx(2) solid #f4f4f4;
content: '';
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 100%;
box-sizing: border-box;
}
}
}
.duration {
margin-left: auto;
flex-shrink: 0;
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!