Commit c2e78f2c by 李伟康

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.0

2 parents 3000fc33 aa8085b1
import http from '../request/http'
module.exports = {
/** 报价单分页列表 */
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
...data
})
},
/** 根据id查询报价单数据 */
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
...data
})
},
/** 查询报价单信息 */
getQuotationInfoById(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
...data
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
...data
})
},
/** 报价单订单分状态统计信息 */
orderStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
...data
})
}
}
......@@ -12,6 +12,8 @@ import interceptionApi from './interceptionApi'
import popupApi from './popupApi'
import usedCarApi from './usedCar'
import equityApi from './equity'
import equitApi from './equit'
module.exports = {
commonApi,
systemApi,
......@@ -26,5 +28,6 @@ module.exports = {
evaluationApi,
usedCarApi,
activityApi,
equityApi
equityApi,
equitApi
}
No preview for this file type
......@@ -110,6 +110,9 @@
.mr-12 {
margin-right: toRpx(12);
}
.mr-20 {
margin-right: toRpx(20);
}
.mr-24 {
margin-right: toRpx(24);
}
......
......@@ -122,7 +122,7 @@ export default {
},
startStudy(item, index) {
let { pageNum, total, nothing = 'nothing', pageSize } = this;
uni.$track.add({ eventCode: 'app_completed_course', businessId: item.id, pagePath: '/pages/studyCenter/myCourse' })
uni.$track.add({ eventCode: 'app_completed_course', businessId: item.id, pagePath: '/pages/boutique/myCourse' })
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=completed&index=${index}&completedCourseList=${encodeURIComponent(JSON.stringify(this.completedCourseList))}&pageNum=${pageNum}&pageSize=${pageSize}&total=${total}`
})
......
......@@ -404,7 +404,7 @@ export default {
<style lang="scss" scoped>
.task-box {
padding-top: toRpx(32);
height: calc(100% - #{toRpx(100)});
height: calc(100% + #{toRpx(72)});
}
.tab-list {
......
......@@ -179,7 +179,7 @@ export default {
<style lang="scss" scoped>
.recommend-course {
height: calc(100% - #{toRpx(100)});
padding-bottom: toRpx(100);
.scroll-view {
margin-top: toRpx(40);
height: calc(100% - #{toRpx(70)});
......
......@@ -24,6 +24,7 @@
<view class="item-compare">
<text class="compare-text">对比上月</text>
<text class="compare-percent">25.6%</text>
<image class="compare-icon" :src="require('@/assets/images/studyCenter/up-arrow.png')" mode="aspectFit" />
</view>
</view>
</view>
......@@ -33,6 +34,7 @@
<view class="list-item" @click="goToMyCourse">
<image class="item-icon" :src="require('@/assets/images/studyCenter/my-courses.png')" mode="aspectFit" />
<view class="item-text">我的课程</view>
<view class="badge">2</view>
</view>
<view class="list-item" @click="goToMyExam">
<image class="item-icon" :src="require('@/assets/images/studyCenter/my-exam.png')" mode="aspectFit" />
......@@ -47,7 +49,46 @@
<view class="item-text">排行榜</view>
</view>
</view>
<!-- 我的学习时长 -->
<view class="study-duration-card">
<view class="card-title">
<text class="title-text">我的学习时长</text>
<view class="title-compare">
<text class="compare-label">对比上月</text>
<text class="compare-value" :style="{ color: monthCompare.color }">{{ monthCompare.percent }}</text>
<image class="compare-arrow" :src="monthCompare.icon" mode="aspectFit" />
</view>
</view>
<view class="duration-content">
<!-- 左边:累计 -->
<view class="duration-item">
<view class="item-label">累计</view>
<view class="item-value">
<text class="value-number">345</text>
<text class="value-unit">小时</text>
</view>
</view>
<!-- 右边:本月 -->
<view class="duration-item">
<view class="item-label">本月</view>
<view class="item-value">
<text class="value-number">25</text>
<text class="value-unit">小时</text>
</view>
<view class="item-compare">
<text class="compare-text">对比上月</text>
<text class="compare-percent" style=" color: #35c376; ">25.6%</text>
<image class="compare-icon" :src="require('@/assets/images/studyCenter/green.png')" mode="aspectFit" />
</view>
</view>
</view>
</view>
</view>
<!-- <view class="study-left">
<view class="title">学习看板</view>
<view class="study-board-box"> -->
......@@ -103,6 +144,9 @@
confirm-type="search"
@confirm="handleSearch"
/>
<view class="clear-btn" @click.stop="clearSearch" v-if="searchKeyword">
<uni-icons type="closeempty" size="16" color="#999ea8"></uni-icons>
</view>
</view>
</view>
......@@ -201,6 +245,13 @@ export default {
// 筛选相关数据
totalCourseCount: 123,
searchKeyword: '', // 搜索关键词
// 对比上月数据(临时模拟数据)
monthCompare: {
percent: '0%',
color: '#ff9d0a',
icon: require('@/assets/images/studyCenter/heng.png')
},
courseConfig: courseConfig, // 课程筛选配置
sortOptions: [
{ label: '综合排序', value: 'default' },
......@@ -276,6 +327,11 @@ export default {
console.log('搜索关键词:', this.searchKeyword)
// TODO: 调用课程列表接口,传入搜索关键词
},
// 清空搜索
clearSearch() {
this.searchKeyword = ''
this.handleSearch()
},
// 打开筛选弹窗
openFilter() {
this.$refs.orderScreen.open()
......@@ -295,19 +351,19 @@ export default {
console.log('筛选条件:', filterData)
// TODO: 调用课程列表接口,传入筛选条件
},
// 跳转到我的课程页面
// 跳转到我的课程
goToMyCourse() {
uni.navigateTo({
url: '/pages/studyCenter/myCourse'
url: '/pages/boutique/myCourse'
})
},
// 跳转到我的任务页面
// 跳转到我的任务
async goToMyTask() {
// 先检查权限
const hasPermission = await this.checkStudyCenterPermission()
if (hasPermission) {
uni.navigateTo({
url: '/pages/studyCenter/myTask'
url: '/pages/boutique/myTask'
})
} else {
uni.showToast({
......@@ -316,14 +372,16 @@ export default {
})
}
},
// 跳转到我的考试
goToMyExam() {
uni.navigateTo({
url: '/pages/studyCenter/myExam'
url: '/pages/boutique/myExam'
})
},
// 跳转到排行榜
goToLeaderboard() {
uni.navigateTo({
url: '/pages/studyCenter/leaderboard'
url: '/pages/boutique/leaderboard'
})
},
// 检查学习中心权限
......@@ -449,15 +507,49 @@ export default {
background: #ffffff;
padding: toRpx(24) toRpx(32) toRpx(28) toRpx(32);
.card-title {
width: toRpx(168);
height: toRpx(36);
color: #333333;
font-size: toRpx(28);
font-weight: 500;
font-family: "HarmonyOSSansSC";
text-align: left;
line-height: toRpx(36);
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: toRpx(24);
.title-text {
color: #333333;
font-size: toRpx(28);
font-weight: 500;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
}
.title-compare {
display: flex;
align-items: center;
.compare-label {
width: toRpx(104);
height: toRpx(36);
color: #666666;
font-size: toRpx(26);
font-weight: 400;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
}
.compare-value {
width: toRpx(36);
height: toRpx(36);
font-size: toRpx(26);
font-weight: 400;
font-family: "HarmonyOSSansSC";
line-height: toRpx(36);
margin-left: toRpx(4);
}
.compare-arrow {
width: toRpx(28);
height: toRpx(28);
margin-left: toRpx(4);
}
}
}
.duration-content {
......@@ -525,6 +617,11 @@ export default {
display: flex;
align-items: center;
margin-top: toRpx(8);
.compare-icon {
width: toRpx(28);
height: toRpx(28);
margin-left: toRpx(4);
}
}
.compare-text {
......@@ -557,13 +654,14 @@ export default {
display: flex;
flex-wrap: wrap;
gap: toRpx(28);
margin-bottom: toRpx(178);
.list-item {
width: toRpx(168);
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: toRpx(28);
position: relative;
.item-icon {
width: toRpx(96);
......@@ -580,6 +678,25 @@ export default {
font-family: "HarmonyOSSansSC";
text-align: center;
}
.badge {
position: absolute;
top: 0;
right: toRpx(24);
width: toRpx(24);
height: toRpx(24);
border-radius: toRpx(732);
background: #f24724;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: toRpx(20);
font-weight: 400;
font-family: "HarmonyOSSansSC";
text-align: center;
line-height: 1;
}
}
}
}
......@@ -783,6 +900,17 @@ export default {
color: #333333;
text-align: center;
}
.clear-btn {
position: absolute;
right: toRpx(32);
display: flex;
align-items: center;
justify-content: center;
width: toRpx(48);
height: toRpx(48);
cursor: pointer;
}
}
}
......@@ -844,8 +972,9 @@ export default {
font-size: toRpx(24);
color: #FF9D0A;
height: toRpx(48);
margin: toRpx(0) toRpx(40);
margin-top: toRpx(32);
margin-left: toRpx(18);
&-text {
margin-top: toRpx(4);
......
<template>
<view class="list">
<view @click="currentId = ''" :class="['item flex', { active: !currentId }]">
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view :key="index" @click="currentId = i.value" :class="['item flex', { active: currentId == i.value }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.name }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: 'ContractList',
inject: ['userInfo'],
data () {
return {
list: [],
currentId: '',
// 合同协议状态数据
zyPayStatus: [{
name: '待上传',
value: '1'
}, {
name: '已上传',
value: '2'
}],
}
},
props: {
params: Object,
data: [Object, Array],
},
watch: {
currentId: {
handler (value) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value
})
},
deep: true
}
},
mounted () {
this.initList(this.zyPayStatus)
},
methods: {
initList (list) {
this.list = list
let { data, params: { idKey } } = this
this.currentId = data[idKey]
this.$emit('onComplete')
},
}
}
</script>
<style scoped lang="scss">
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
<template>
<view class="list">
<view
v-for="(item, index) in options"
:key="index"
@click="selectOption(item)"
:class="['item flex', { active: currentId === item.value }]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ item.label }}
</view>
</view>
</template>
<script>
export default {
name: 'CourseOptionList',
data() {
return {
currentId: '',
options: []
}
},
props: {
params: Object,
data: [Object, Array]
},
watch: {
currentId: {
handler(value) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value
})
},
deep: true
}
},
mounted() {
this.getList()
},
methods: {
getList() {
const { params } = this
this.options = params.options || []
// 初始化选中值
let { data, params: { idKey } } = this
if (data && data[idKey]) {
this.currentId = data[idKey]
}
this.$emit('onComplete')
},
selectOption(item) {
// 如果点击已选中的选项,则取消选中
if (this.currentId === item.value) {
this.currentId = ''
} else {
this.currentId = item.value
}
}
}
}
</script>
<style scoped lang='scss'>
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
<template>
<view class="employee-list">
<view
@click="currentIds = []"
:class="['item flex',{active:!currentIds.length}]"
>
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="choose(i)"
:class="['item flex',{active:checkActive(i)}]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{i.staffName}}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'EmployeeList',
inject: ['userInfo'],
data () {
return {
list: [],
currentIds: []
}
},
props: {
params: Object,
data: [Array, Object],
},
watch: {
currentIds: {
handler (val) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value: val.length ? val : null
})
},
deep: true
}
},
mounted () {
this.getList()
},
methods: {
async getList () {
const { userInfo, params } = this,
{ cacheData } = params
if (cacheData && cacheData.length) {
this.initList(cacheData)
return
}
const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getOrderScreenEmployeeList({
merchantId: params.idKey == 'sellerUserIdList' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserIdList' ? '' : [sceneType]
})
if (data && data.length) {
this.initList(data)
params.cacheData = data
this.$emit('update:params', params)
}
},
initList (list) {
let { data, params: {idKey} } = this
this.list = list
let paramsData = idKey ? data[idKey] : data
if (paramsData && paramsData.length) paramsData.map(e => {
this.currentIds.push(e)
})
this.$emit('onComplete')
},
choose (i) {
if (i) {
let { uuid } = i,
{ currentIds } = this,
index = currentIds.indexOf(uuid)
if (index == -1) this.currentIds.push(uuid)
else this.currentIds.splice(index, 1)
}
},
checkActive (i) {
let { currentIds } = this,
active = false
if (currentIds.length) active = currentIds.includes(i.uuid)
return active
// return this.currentIds.includes(i.uuid)
},
}
}
</script>
<style scoped lang='scss'>
.employee-list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="list">
<view @click="currentId = ''" :class="['item flex', { active: !currentId }]">
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view :key="index" @click="currentId = i.id" :class="['item flex', { active: currentId == i.id }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.name }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: 'OrderStatusList',
inject: ['userInfo'],
data () {
return {
// 订单状态 (0待报价、1待确认、2待支付、3已支付、5已完成、6已退款、9已撤销、11错误订单、-1战败)
list: Object.freeze([
{
name: '待报价',
value: 0,
id: 1
},
{
name: '待确认',
value: 1,
id: 2
},
{
name: '待支付',
value: 2,
id: 3
},
{
name: '已支付',
value: 3,
id: 4
},
{
name: '已完成',
value: 5,
id: 5
},
{
name: '已退款',
value: 6,
id: 6
},
{
name: '已撤销',
value: 9,
id: 7
},
{
name: '错误订单',
value: 11,
id: 8
},
{
name: '战败',
value: -1,
id: 11
}
]),
currentId: '',
}
},
props: {
params: Object,
data: [Array, Object],
},
watch: {
currentId: {
handler (val) {
let { params: { idKey } } = this,
{ list } = this,
item = list.find(item => item.id == val)
this.$emit('choose', {
key: idKey,
value: item ? item.value : null
})
},
deep: true
}
},
mounted () {
this.initList()
},
methods: {
initList () {
let { data, params: { idKey }, list } = this
console.log(data, idKey ,'32938928392')
if (data[idKey] !== undefined && data[idKey] !== null && data[idKey] !== '') {
let item = list.find(val => val.value == data[idKey])
this.currentId = item ? item.id : ''
}
this.$emit('onComplete')
}
}
}
</script>
<style scoped lang="scss">
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="currentId = i.value"
:class="['item flex',{active:currentId == i.value}]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
const payTypeList = [{
name: '门店收款',
value: 2
},
{
name: '微信支付',
value: 1
},
{
name: 'POS机支付',
value: 3
},
{
name: '支付宝支付',
value: 4
},
{
name: '嘀加收款',
value: 5
}
]
export default {
name: 'PayList',
inject: ['userInfo'],
data () {
return {
list: [],
currentId: '',
}
},
props: {
params: Object,
data: [Object, Array],
},
watch: {
currentId: {
handler (value) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value
})
},
deep: true
}
},
mounted () {
this.getList()
},
methods: {
async getList () {
const { userInfo, params } = this,
{ cacheData } = params
if (cacheData && cacheData.length) {
this.initList(cacheData)
return
}
const { merchantId } = userInfo,
data = await uni.$api.popupApi.getYqStoreConfig({
yqMerchantId: merchantId
})
if (data) {
let obj = data || {}
let m = obj.supportPayTypes || []
let n = JSON.parse(JSON.stringify(payTypeList))
let payList = n.filter(k => {
let idx = m.find(j => j == k.value)
return idx >= 0
})
payList = [
...payList,
{
name: '对公转账',
value: '6'
},
{
name: '其它收款',
value: '7'
}
]
this.initList(payList)
params.cacheData = payList
this.$emit('update:params', params)
}
},
initList (list) {
this.list = list
let { data, params: { idKey } } = this
this.currentId = data[idKey]
this.$emit('onComplete')
},
}
}
</script>
<style scoped lang='scss'>
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="choose(i.id)"
:class="['item flex',{active:currentId == i.id}]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
</view>
</template>
<template v-if="currentId == 3 && customDate.startDate && customDate.endDate">
<view
class="calendar flex"
@click="$refs.calendar.open()"
>
<view class="item flex active">
{{customDate.startDate}}
</view>
<view class="splice">-</view>
<view class="item flex active">
{{customDate.endDate}}
</view>
</view>
</template>
<template v-else>
<view
@click="$refs.calendar.open()"
:class="['item flex']"
>
自定义
</view>
</template>
<uni-calendar
ref="calendar"
:insert="false"
range
:clearDate="false"
startDate="2020-10-01"
:endDate="endDate"
@confirm="confirmCalendar"
:rangeValue="rangeValue"
hideMask
showBottomBtn
/>
</view>
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
export default {
name: 'TimeList',
inject: ['userInfo'],
data () {
return {
list: Object.freeze([
{
name: '今日',
startDate: dayjs().format('YYYY-MM-DD'),
endDate: dayjs().format('YYYY-MM-DD'),
id: 1
}, {
name: '本月',
startDate: dayjs().startOf('month').format('YYYY-MM-DD'),
endDate: dayjs().format('YYYY-MM-DD'),
id: 2
}
]),
currentId: '',
endDate: dayjs().format('YYYY-MM-DD'),
customDate: {
startDate: '',
endDate: ''
},
rangeValue: {}
}
},
props: {
params: Object,
data: [Array, Object],
},
watch: {
currentId: {
handler (val) {
let { params: { idKey, currentIdKey } } = this
let { list } = this,
value = {}
if (val) {
let [startDateName, endDateName] = idKey
if (val == 3) {
value = {
[startDateName]: this.customDate.startDate,
[endDateName]: this.customDate.endDate
}
} else {
let item = list.find(e => e.id == val)
value = {
[startDateName]: item.startDate,
[endDateName]: item.endDate
}
}
}
this.$emit('choose', {
currentIdKey,
currentId: val,
keys: idKey,
value
})
},
deep: true
}
},
mounted () {
this.initList()
},
methods: {
async initList () {
let { data, params: { idKey, currentIdKey } } = this
if (data[currentIdKey] == 3) {
this.customDate = {
startDate: data[idKey[0]],
endDate: data[idKey[1]]
}
this.rangeValue = {
before: data[idKey[0]],
after: data[idKey[1]]
}
}
this.currentId = data[currentIdKey]
this.$emit('onComplete')
},
choose (i) {
this.currentId = i
},
confirmCalendar ({range}) {
let { data } = range
this.customDate = {
startDate: data[0] || dayjs().format('YYYY-MM-DD'),
endDate: data[data.length - 1] || dayjs().format('YYYY-MM-DD')
}
this.rangeValue = range
if (this.currentId == 3) {
let { params: { idKey } } = this,
[startDateName, endDateName] = idKey
this.$emit('choose', {
currentId: 3,
keys: idKey,
value: {
[startDateName]: this.customDate.startDate,
[endDateName]: this.customDate.endDate
}
})
} else this.currentId = 3
}
}
}
</script>
<style scoped lang='scss'>
.list {
display: flex;
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
width: toRpx(348);
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
\ No newline at end of file
const screenList = [
{
title: '转化人员',
suffix: 'merchantName',
componentName: 'EmployeeList',
params: {
cacheData: [],
idKey: 'transferIds'
},
hasToggle: true,
toggle: false
},
{
title: '销售顾问',
suffix: 'shopMerchantName',
componentName: 'EmployeeList',
params: {
cacheData: [],
idKey: 'referrerIds'
},
hasToggle: true,
toggle: false
},
{
title: '订单时间',
componentName: 'TimeList',
params: {
idKey: ['minCreateTime', 'maxCreateTime'],
currentIdKey: 'orderTimeId'
}
},
{
title: '支付时间',
componentName: 'TimeList',
params: {
idKey: ['minPayTime', 'maxPayTime'],
currentIdKey: 'payTimeId'
}
},
{
title: '订单状态',
componentName: 'OrderStatusList',
params: {
idKey: 'orderStatus'
}
},
{
title: '支付方式',
componentName: 'PayList',
params: {
idKey: 'payType'
}
},
{
title: '合同协议',
componentName: 'ContractList',
params: {
idKey: 'zyPayStatus'
}
}
]
export default { screenList }
const screenList = [
{
title: '选必修',
componentName: 'CourseOptionList',
params: {
idKey: 'required',
options: [
{ label: '必修', value: 'required' },
{ label: '选修', value: 'optional' }
]
}
},
{
title: '课程类型',
componentName: 'CourseOptionList',
params: {
idKey: 'courseType',
options: [
{ label: '视频', value: 'video' },
{ label: '文档', value: 'document' }
]
}
},
{
title: '评分',
componentName: 'CourseOptionList',
params: {
idKey: 'rating',
options: [
{ label: '4星以上', value: '4' },
{ label: '3星以上', value: '3' }
]
}
}
]
export default { screenList }
<template>
<popup ref="popup" @onConfirm="confirm" @onCancel="clear" cancelText="清除">
<view class="popup-title flex">
{{ popupTitle }}
<view class="popup-close flex" @click="close">
<uni-icons type="closeempty" size="16"></uni-icons>
</view>
</view>
<view class="popup-body" :key="viewKey">
<scroll-view scroll-y :class="['popup-scroll-view', { 'popup-show': loadComplete }]">
<template v-for="(i, index) in screenList">
<view class="item-box" :key="index">
<view class="title flex">
{{ i.title }}
<template v-if="i.suffix">({{ userInfo[i.suffix] }})</template>
<template v-if="i.hasToggle">
<view class="toggle-btn" @click="i.toggle = !i.toggle">{{ i.toggle ? '收起' : '展开' }}</view>
</template>
</view>
<view :class="['box', { fold: i.hasToggle }, { show: i.toggle }]">
<component :ref="`${i.componentName}_${index}`" :is="i.componentName" :params.sync="i.params" @choose="choose" :data="chooseContent" @onComplete="onComplete" :key="componentKey" />
</view>
</view>
</template>
</scroll-view>
<image v-if="!loadComplete" class="loading" src="../../assets/images/common/loadding.gif" />
</view>
</popup>
</template>
<script type="text/ecmascript-6">
import Popup from '@/components/Popup.vue'
import config from './config'
import EmployeeList from './components/EmployeeList.vue'
import TimeList from './components/TimeList.vue'
import OrderStatusList from './components/OrderStatusList.vue'
import PayList from './components/PayList.vue'
import CourseOptionList from './components/CourseOptionList.vue'
import ContractList from './components/ContractList.vue'
export default {
components: {
Popup,
EmployeeList,
TimeList,
OrderStatusList,
PayList,
CourseOptionList,
ContractList
},
name: 'OrderScreen',
props: {
configData: {
type: Object,
default: null
},
title: {
type: String,
default: '工单筛选'
}
},
data() {
return {
screenList: this.configData ? this.configData.screenList : config.screenList,
chooseContent: {},
viewKey: Date.now(),
componentKey: Date.now(),
onCompleteNum: 0
}
},
provide() {
return {
userInfo: this.userInfo,
}
},
computed: {
popupTitle() {
return this.title
},
userInfo() {
return uni.$storage.get("userInfo")
},
loadComplete() {
return this.onCompleteNum == this.screenList.length
}
},
mounted() {
},
methods: {
open(data) {
console.log('open', data)
const { orderStatus } =data
if(orderStatus !== undefined && orderStatus !== null && orderStatus !== '') {
this.$set(this.chooseContent, 'orderStatus', orderStatus)
}
this.$refs.popup.open()
},
clear() {
this.chooseContent = {}
this.viewKey = Date.now()
},
close() {
this.$refs.popup.close()
},
choose(i) {
let { key, value, keys, currentIdKey, currentId } = i;
console.log('choose', key, value)
let updatedChooseContent = { ...this.chooseContent };
let needRefresh = false;
// 有订单状态,将合同协议状态置为全部
if (key == 'orderStatus' && value) {
if (updatedChooseContent.zyPayStatus !== undefined) {
this.$delete(updatedChooseContent, 'zyPayStatus')
needRefresh = true
}
}
// 有合同协议状态时,将订单状态置为全部
if (key == 'zyPayStatus' && value) {
if (updatedChooseContent.orderStatus !== undefined) {
this.$delete(updatedChooseContent, 'orderStatus')
needRefresh = true
}
}
if (keys) {
if (currentIdKey) this.$set(updatedChooseContent, currentIdKey, currentId || '')
keys.map(e => {
if (value[e] !== undefined && value[e] !== null && value[e] !== '') this.$set(updatedChooseContent, e, value[e])
else this.$delete(updatedChooseContent, e)
})
} else {
if (value !== undefined && value !== null && value !== '') this.$set(updatedChooseContent, key, value)
else this.$delete(updatedChooseContent, key)
}
this.chooseContent = updatedChooseContent;
console.log('chooseContent',this.chooseContent)
if (needRefresh) {
this.componentKey = Date.now()
}
},
confirm() {
let chooseContent = JSON.parse(JSON.stringify(this.chooseContent))
delete chooseContent.payTimeId
delete chooseContent.orderTimeId
Object.keys(chooseContent).map(e => {
if (e == 'placeOrderStartDateStr' || e == 'installUpgradeBeginTimeStr') chooseContent[e] = `${chooseContent[e]} 00:00:00`
if (e == 'placeOrderEndDateStr' || e == 'installUpgradeEndTimeStr') chooseContent[e] = `${chooseContent[e]} 23:59:59`
})
this.$emit('onConfirm', chooseContent)
this.close()
},
onComplete() {
console.log('complete',this.chooseContent)
if (this.onCompleteNum == this.screenList.length) return
this.onCompleteNum += 1
}
}
}
</script>
<style scoped lang="scss">
.popup-box {
border-radius: toRpx(32) toRpx(32) 0 0;
background: #ffffff;
height: 70vh;
.popup-title {
height: toRpx(104);
justify-content: center;
position: relative;
color: #333333;
font-size: toRpx(36);
font-weight: 500;
.popup-close {
position: absolute;
height: 100%;
top: 0;
right: 0;
padding: 0 toRpx(48);
font-weight: 400;
color: #1a1a1a;
}
}
.popup-tips {
color: #999ea8;
font-size: toRpx(28);
padding-left: toRpx(48);
}
.popup-body {
height: calc(100% - #{toRpx(312)});
position: relative;
.popup-scroll-view {
opacity: 0;
height: 100%;
padding-top: toRpx(8);
.item-box {
margin-bottom: toRpx(32);
.title {
color: #888888;
font-size: toRpx(28);
height: toRpx(40);
background: #f5f7fa;
padding-left: toRpx(48);
margin-bottom: toRpx(16);
line-height: toRpx(40);
.toggle-btn {
margin-left: auto;
padding: 0 toRpx(48);
color: #4673ff;
font-size: toRpx(24);
}
}
.box {
overflow: hidden;
}
.fold {
height: toRpx(72);
}
.show {
height: auto !important;
}
}
}
.popup-show {
opacity: 1;
}
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: toRpx(64);
height: toRpx(64);
}
.show {
opacity: 1;
}
}
}
</style>
......@@ -116,25 +116,25 @@
}
},
{
"path": "pages/studyCenter/myTask",
"path": "pages/boutique/myTask",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/studyCenter/myCourse",
"path": "pages/boutique/myCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/studyCenter/myExam",
"path": "pages/boutique/myExam",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/studyCenter/leaderboard",
"path": "pages/boutique/leaderboard",
"style": {
"navigationStyle": "custom"
}
......
......@@ -14,12 +14,10 @@
<view class="content-layout">
<!-- 左侧排行榜 -->
<view class="left-panel">
<!-- 顶部占位图片 -->
<view class="top-image-wrapper">
<image class="panel-image" :src="require('@/assets/images/studyCenter/Leaderboard-bg.png')" mode="scaleToFill" />
</view>
<!-- Tab 切换和中位数 -->
<view class="tab-header">
<view class="tab-list">
<view
......@@ -34,7 +32,6 @@
<view class="median-text">学习时长中位数:{{ medianTime }}小时</view>
</view>
<!-- 排行榜列表 -->
<view class="rank-list">
<view
v-for="(item, index) in leaderboardList"
......@@ -42,7 +39,6 @@
:class="['rank-item', { 'current-user': item.isCurrentUser }]"
>
<view class="rank-left">
<!-- 排名显示 -->
<view v-if="item.rank <= 3 && !item.isCurrentUser" class="rank-badge medal">
<image class="medal-icon" :src="getMedalIcon(item.rank - 1)" mode="aspectFit" />
</view>
......@@ -50,11 +46,9 @@
<text class="rank-number">{{ item.rank >= 100 ? '99+' : item.rank }}</text>
</view>
<!-- 姓名 -->
<text class="user-name">{{ item.name }}</text>
</view>
<!-- 学习时长 -->
<text class="study-time">{{ item.hours }}小时</text>
</view>
</view>
......@@ -104,7 +98,6 @@ export default {
},
switchTab(index) {
this.currentTab = index
// TODO: 根据不同tab加载不同数据
this.generateMockData()
},
getMedalIcon(index) {
......@@ -116,11 +109,9 @@ export default {
return medals[index]
},
generateMockData() {
// 生成100条模拟数据
const names = ['孟伟', '任小宣', '谭亦云', '李晓夏', '李文歆', '袁佳', '刘轩华', '高强', '张明', '王芳', '李娜', '赵伟', '陈静', '周杰', '吴磊', '郑丽', '黄涛', '徐敏', '孙鹏', '马超']
this.leaderboardList = []
// 第一条:当前用户
this.leaderboardList.push({
rank: this.currentUserRank,
name: this.currentUser.name,
......@@ -128,10 +119,8 @@ export default {
isCurrentUser: true
})
// 其他99条数据
let baseHours = 250
for (let i = 0; i < 100; i++) {
// 跳过当前用户的排名位置
if ((i + 1) === this.currentUserRank) {
continue
}
......@@ -178,7 +167,6 @@ export default {
align-items: center;
justify-content: center;
height: toRpx(88);
margin-top: var(--status-bar-height);
position: relative;
.back {
......@@ -408,3 +396,4 @@ export default {
}
</style>
......@@ -30,11 +30,11 @@
<!-- 课程列表 -->
<view class="course-content">
<!-- 待学习 -->
<!-- 待学习 tab:使用 RecommendCourse 组件 -->
<RecommendCourse v-if="currentTab === 0" ref="recommendCourse" :cardWidth="530" />
<!-- 正在学习 -->
<!-- 正在学习 tab:使用 MyTask 组件 -->
<MyTask v-else-if="currentTab === 1" ref="myTask" :cardWidth="530" />
<!-- 已学完 -->
<!-- 已学完 tab:使用 CompletedCourse 组件 -->
<CompletedCourse v-else-if="currentTab === 2" ref="completedCourse" :cardWidth="530" />
</view>
</view>
......@@ -94,7 +94,8 @@ export default {
.header {
position: relative;
margin-bottom: toRpx(16);
z-index: 10;
background: transparent;
.nav-bar {
display: flex;
......@@ -127,7 +128,7 @@ export default {
display: flex;
align-items: center;
padding: 0 toRpx(64);
margin-top: toRpx(32);
margin-top: toRpx(52);
.tab-item {
width: toRpx(208);
height: toRpx(72);
......@@ -189,11 +190,13 @@ export default {
}
.course-content {
flex: 1;
height: calc(100vh - toRpx(300));
overflow: hidden;
width: 100%;
max-height: toRpx(1200);
overflow-y: auto;
padding: 0 toRpx(64);
}
}
</style>
......@@ -24,9 +24,9 @@
<!-- 考试列表 -->
<view class="exam-content">
<!-- 已通过 -->
<!-- 已通过 tab:使用 PassedExam 组件 -->
<PassedExam v-if="currentTab === 0" ref="passedExam" :cardWidth="530" />
<!-- 未通过 -->
<!-- 未通过 tab:使用 FailedExam 组件 -->
<FailedExam v-else-if="currentTab === 1" ref="failedExam" :cardWidth="530" />
</view>
</view>
......@@ -92,7 +92,6 @@ export default {
align-items: center;
justify-content: center;
height: toRpx(88);
margin-top: var(--status-bar-height);
position: relative;
.back {
......@@ -117,8 +116,8 @@ export default {
display: flex;
align-items: center;
padding: 0 toRpx(64);
margin-top: toRpx(32);
margin-bottom: toRpx(72);
margin-top: toRpx(52);
margin-bottom: toRpx(32);
.tab-item {
width: toRpx(208);
height: toRpx(72);
......@@ -161,9 +160,11 @@ export default {
.exam-content {
width: 100%;
height: calc(100vh - var(--status-bar-height) - toRpx(88) - toRpx(100));
max-height: toRpx(1200);
overflow-y: auto;
padding: 0 toRpx(64);
}
}
</style>
......@@ -12,16 +12,14 @@
<!-- 内容区域 -->
<view class="study-center">
<!-- 左侧:学习看板 -->
<view class="study-left">
<view class="title">学习看板</view>
<view class="study-board-box">
<!-- 累计学习看板 -->
<template v-if="isBeisen || (isHmzx && isYb)">
<LearnStatistics :dataInfo="dataInfo" :isBeisen="isBeisen" :isHmzx="isHmzx" :isYb="isYb" />
</template>
<!-- 周转化率看板 -->
<WeeklyConversionRate :dataInfo="dataInfo" :isBeisen="isBeisen" :isHmzx="isHmzx" :isYb="isYb" />
<!-- 能力分析看板 -->
<template v-if="isHmzx && isYb">
<view :class="['study-box3', isBeisen ? '' : 'big-height']">
<view :class="['study-box3-title', isBeisen ? '' : 'big-margin']">能力分析</view>
......@@ -30,6 +28,7 @@
</template>
</view>
</view>
<!-- 右侧:任务和课程列表 -->
<view class="study-right">
<view class="data-container">
<view :class="['type-box']">
......@@ -44,9 +43,11 @@
</view>
</view>
</view>
<!-- 我的任务 tab:使用 MyTask 组件 -->
<template v-if="firstIndex == 0">
<MyTask ref="myTask" />
</template>
<!-- 更多课程 tab:使用 RecommendCourse 组件(简化模式) -->
<template v-if="firstIndex == 1">
<RecommendCourse :simplified="true" />
</template>
......@@ -84,14 +85,13 @@
firstIndex: 0,
firstLeft: ['first', 'second'],
firstClass: ['short-first-nav', 'short-second-nav'],
isBeisen: false, // 是否是有北森权限,true 有,false无
isFlag: true, // 当前驻店人员所关联的门店非鸿蒙智行或非延保业务
isHmzx: false, // 当前驻店人员所关联的门店是否是鸿蒙智行
isYb: false, // 当前驻店人员所关联的门店是否是延保业务
isBeisen: false,
isFlag: true,
isHmzx: false,
isYb: false,
}
},
created () {
// 监听自定义事件
uni.$on('backStudyCenter', () => {
console.log('backStudyCenter', this.$refs.myTask)
const { tabIndex, finishIndex } = this.$refs.myTask
......@@ -109,28 +109,23 @@
console.log(beisenToken, 'beisenToken')
this.isBeisen = !!beisenToken
if (!beisenToken) {
// 没有北森权限则typeList没有推荐课程
this.typeList = [
{ tabName: '我的任务', num: () => '' }
]
}
this.isHmzx = studyCenterPermission.hmzxAuth
this.isYb = studyCenterPermission.authorizedBusinessList && studyCenterPermission.authorizedBusinessList.includes(1)
// this.getServerData();
this.getStudyBoard();
},
methods: {
// 返回上一页
back() {
uni.navigateBack()
},
// 跳转到我的任务页面
goToMyTask() {
uni.navigateTo({
url: '/pages/studyCenter/myTask'
url: '/pages/boutique/myTask'
})
},
// tab切换
changeType(index, tagIndex) {
this.firstIndex = index
},
......@@ -138,7 +133,6 @@
const res = await uni.$api.commonApi.getStudyBoard({})
console.log(111111, 'res', res)
this.dataInfo = res
// 虚增已完成学习学员比例
const boostRatio = (val) => {
const numVal = Number(val)
if (isNaN(numVal)) return val
......@@ -163,12 +157,10 @@
series: [
{
data: res.abilityAnalysisScore
// data: [1, 2, 3, 1, 2, 2, 3, 3, 3]
}
]
}
this.chartData = _chartData
// 设置雷达图标签颜色,1为红色,否则为灰色
if (_chartData.series && _chartData.series[0] && Array.isArray(_chartData.series[0].data)) {
const dataArr = _chartData.series[0].data;
let _labelColors = [];
......@@ -189,6 +181,7 @@
width: 100%;
height: 100vh;
position: relative;
overflow: hidden;
&::after {
content: '';
......@@ -203,9 +196,7 @@
z-index: -1;
}
// 导航栏样式
.header{
position: relative;
.nav-bar {
......@@ -236,8 +227,6 @@
}
}
.simple-popup-content {
width: 720rpx;
padding: 40rpx;
......@@ -260,8 +249,6 @@
padding: toRpx(56) toRpx(48) toRpx(80);
overflow: hidden;
padding-top: toRpx(44);
// 我的学习时长卡片
.study-left {
width: toRpx(656);
......@@ -401,4 +388,4 @@
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -19,7 +19,12 @@
class="webview-window"
v-if="webviewUrl"
>
<web-view :src="webviewUrl"></web-view>
<web-view :src="webviewUrl" @onPostMessage="handlePostMessage"></web-view>
</view>
<!-- 全屏 Loading -->
<view class="loading-overlay" v-if="showLoading">
<image class="loading-icon" src="../../assets/images/common/loadding.gif" mode="aspectFit" />
</view>
</view>
......@@ -33,7 +38,8 @@ export default {
webviewUrl: '',
pageTitle: '学习测评',
wv: null,
hotArea: null // 存储热区对象
hotArea: null, // 存储热区对象
showLoading: true // 控制 loading 显示
}
},
onLoad (options) {
......@@ -69,6 +75,14 @@ export default {
this.createHotArea()
// this.hideThirdPartyBackButton() // 不隐藏第三方按钮,只用热区拦截点击
}, 1000)
// 设置超时自动隐藏 loading(防止页面加载失败一直显示 loading)
setTimeout(() => {
if (this.showLoading) {
console.log('⏰ 超时自动关闭 loading')
this.showLoading = false
}
}, 10000) // 10秒后自动关闭
},
beforeDestroy() {
// 销毁热区
......@@ -112,6 +126,15 @@ export default {
height: 'calc(100% - 136rpx)' // 减去顶部导航栏高度
})
console.log('✅ webview 样式设置成功')
// 监听 webview 加载完成事件
wv.addEventListener('loaded', () => {
console.log('✅ webview 加载完成,关闭 loading')
setTimeout(() => {
this.showLoading = false
}, 300)
}, false)
return true
} else {
console.log('⚠️ 未找到 webview 对象')
......@@ -148,6 +171,17 @@ export default {
}
})
},
// 处理 webview 发送的消息
handlePostMessage(e) {
console.log('📨 收到 webview 消息:', e)
// webview 加载完成后隐藏 loading
if (this.showLoading) {
setTimeout(() => {
console.log('✅ webview 消息触发,关闭 loading')
this.showLoading = false
}, 500)
}
},
// 创建透明热区覆盖在返回按钮位置,拦截点击事件
createHotArea() {
// #ifdef APP-PLUS
......@@ -230,5 +264,23 @@ export default {
width: 100%;
height: 100vh;
}
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
.loading-icon {
width: toRpx(100);
height: toRpx(100);
}
}
</style>
......@@ -184,6 +184,18 @@ module.exports = {
],
grassInfo: {},
orderCode: '',
userInfo: {}
userInfo: {},
orderStatusObj: {
0: { text: '待报价', color: '#F7A431', background: '#FFF5E6' },
1: { text: '待确认', color: '#F7A431', background: '#FFF5E6' },
2: { text: '待支付', color: '#F7A431', background: '#FFF5E6' },
3: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
4: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
5: { text: '已完成', color: '#F7A431', background: '#FFF5E6' },
'-1': { text: '战败', color: '#F24724', background: '#FDECE9' },
9: { text: '已撤销', color: '#999999', background: ' #9999991a;' },
11: { text: '已失效', color: '#F7A431', background: '#FFF5E6' },
6: { text: '已退款', color: '#F7A431', background: '#FFF5E6' }
}
}
}
......@@ -2,43 +2,33 @@
<template>
<view class="order-card" @click.stop="cardClick">
<view class="order-card-top-box flex justify-between">
<text>{{ orderCardDetail.customer.customerName }}</text>
<view class="status text-center" :style="{ color: orderCardDetail.statuscolor, 'background-color': orderCardDetail.statusbackground }">
<view v-if="orderCardDetail.status == 1 || orderCardDetail.status == 3">
<view v-if="status[orderCardDetail.status].background">
<view class="flex item-center">
<text class="mr-20">{{ orderCardDetail.customerName }}</text>
<!-- 标记为已开票的 不可编辑客户信息 invoicing 2已开票 -->
<view v-if="isOrder">
<view v-if="orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 5 || orderCardDetail.orderStatus == -1" @click="jumpUpdate" :class="['updateInfo flex', orderCardDetail.orderStatus == '6' || orderCardDetail.invoicing == '2' ? 'isHide' : '']">
<view class="sprite-icon icon-edit mr-8"></view>
客户信息
</view>
</view>
</view>
<!-- 待上传合同协议且是已支付的订单 -->
<view class="status text-center" :style="{ color: status[0].color, 'background-color': status[0].background }" v-if="orderCardDetail.zyPayStatus == 1 && (orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 4 || orderCardDetail.orderStatus == 7)">待上传</view>
<view v-else class="status text-center" :style="{ color: status[orderCardDetail.orderStatus].color, 'background-color': status[orderCardDetail.orderStatus].background }">
<!-- <view v-if="orderCardDetail.orderStatus == 1 || orderCardDetail.orderStatus == 3">
<view v-if="status[orderCardDetail.orderStatus].background">
<view class="arc y-center">
<view class="outside box-center" :style="{ 'background-color': status[orderCardDetail.status].background }" />
<view class="inside box-center" :style="{ 'background-color': status[orderCardDetail.status].color }" />
<view class="outside box-center" :style="{ 'background-color': status[orderCardDetail.orderStatus].background }" />
<view class="inside box-center" :style="{ 'background-color': status[orderCardDetail.orderStatus].color }" />
</view>
</view>
</view>
</view> -->
<!-- 优先显示已撤销的 然后是已施工的 最后是其他的 -->
<!-- {{li.status==9?status[li.status].text: (li.constructionFlag == 'Y'?'已施工':status[li.status].text) }} -->
{{ orderCardDetail.statusText }}
{{ status[orderCardDetail.orderStatus].text }}
</view>
</view>
<view>
<view class="goods-list" :style="{ paddingBottom: orderCardDetail.subOrderList && orderCardDetail.subOrderList.length < 1 ? '0' : '' }" v-if="orderCardDetail.subOrderList && orderCardDetail.subOrderList.length > 0">
<view>
<view v-for="(i, sindex) in orderCardDetail.subOrderList" :key="sindex" class="goods flex justify-between" :class="{ 'no-margin': orderCardDetail.subOrderList.length === 1 }" v-if="orderCardDetail.showAllGoodsListFlag ? true : sindex < 2">
<view class="goods-name text-hide flex">
<view class="point"></view>
{{ i.upgradeGoodsAlias || i.upgradeGoodsName || i.packageName || '' }}
</view>
<view class="goods-price">
¥
<text>{{ i.totalPrice || 0 }}</text>
</view>
</view>
<view v-if="orderCardDetail.subOrderList.length > 2" class="goods-more">
<text @click.stop="showAllGoodsList">
{{ orderCardDetail.showAllGoodsListFlag ? '收起' : '查看全部' }}
</text>
(共{{ orderCardDetail.subOrderList.length }}件)
</view>
</view>
</view>
<view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center">
......@@ -142,7 +132,7 @@ export default {
return order_mixins.data.payType || {}
},
status() {
return order_mixins.data.status || {}
return order_mixins.data.orderStatusObj || {}
}
},
data() {
......@@ -153,48 +143,119 @@ export default {
pointsMultiObj: [
{
label: '销售顾问 /录单员',
arr: ['merchantName', 'employeeName']
arr: ['merchantName', 'referrerName']
},
{
label: '交付人员',
arr: ['merchantName', 'deliveryEmployeeName']
arr: ['merchantName', 'deliveryName']
},
{
label: '转化人员',
arr: ['sellerMerchantName', 'sellerName']
arr: ['parkMerchantName', 'transferName']
},
{
label: '车架号',
key: 'carVin'
},
{
label: '购买商品',
key: 'goodsNameAlias',
otherKey: 'goodsName'
},
{
label: '工单编号',
key: 'orderCode'
key: 'payId',
canCopy: true
},
{
label: '交易流水号',
key: 'tradeNo',
canCopy: true
},
{
label: '拒升原因',
key: 'remark'
},
{
label: '工单时间',
key: 'orderTime'
label: '支付时间',
key: 'payTime'
},
{
label: '创建时间',
key: 'createdTime'
},
{
label: '支付方式',
key: 'payType',
mapValue: {
1: '线上支付',
2: '门店收款',
5: '嘀加收款',
6: '对公转账',
7: '其它收款'
}
}
],
orderObj: [
{
label: '销售顾问',
arr: ['merchantName', 'employeeName']
arr: ['merchantName', 'referrerName']
},
{
label: '转化人员',
arr: ['sellerMerchantName', 'sellerName']
arr: ['parkMerchantName', 'transferName']
},
{
label: '车架号',
key: 'carVin'
},
{
label: '购买商品',
key: 'goodsNameAlias',
otherKey: 'goodsName'
},
{
label: '工单编号',
key: 'orderCode'
key: 'payId',
canCopy: true
},
{
label: '工单时间',
key: 'orderTime'
label: '交易流水号',
key: 'tradeNo',
// key: "transactionNo",
canCopy: true
},
{
label: '拒升原因',
key: 'remark'
},
{
label: '支付时间',
key: 'payTime'
},
{
label: '创建时间',
key: 'createdTime'
},
{
label: '支付方式',
key: 'payType',
mapValue: {
1: '线上支付',
2: '门店收款',
5: '嘀加收款',
6: '对公转账',
7: '其它收款'
}
}
],
localUserInfo: null
localUserInfo: null,
isOrder: null
}
},
mounted() {
this.localUserInfo = uni.$storage.get('userInfo')
this.isOrder = !(this.localUserInfo?.isSuper || this.localUserInfo?.loginRole == 3 || this.localUserInfo.loginRole == 5 || this.localUserInfo?.loginRole == 6)
},
methods: {
// 查看全部商品
......
<template>
<view class="order-management">
<view class="search-box">
<input class="search-input" placeholder-class="placeholder" v-model="keyword" confirm-type="search" @confirm="search" placeholder="输入客户姓名/商品名称/订单编号/手机号搜索" />
<input class="search-input" placeholder-class="placeholder" v-model="customerName" confirm-type="search" @confirm="search" placeholder="输入客户姓名/商品名称/订单编号/手机号搜索" />
<view class="clear flex" @click="clear">
<uni-icons type="closeempty" size="16" v-if="keyword"></uni-icons>
<uni-icons type="closeempty" size="16" v-if="customerName"></uni-icons>
</view>
</view>
<view class="tab-container flex justify-between">
<view class="tab-container flex">
<view class="flex">
<view class="tab-item" :class="{ active: tabIndex === index }" v-for="(item, index) in tabList" :key="index" @click="switchTab(index)">
<text>{{ item.tabName }}</text>
......@@ -137,7 +137,7 @@
</scroll-view>
</template>
</PublishPopup>
<order-screen ref="openFilter" @onConfirm="openFilterConfirm" />
<OrderScreenContract ref="openFilter" @onConfirm="openFilterConfirm" />
</view>
</template>
......@@ -149,14 +149,14 @@ import OrderCard from './OrderCard'
import PublishPopup from '@/components/PublishPopup.vue'
import dayjs from 'dayjs'
import utils from '@/utils/utils'
import OrderScreen from '@/components/OrderScreen/index.vue'
import OrderScreenContract from '@/components/OrderScreenContract/index.vue'
export default {
name: 'OrderManagement',
mixins: [ZPMixin, interceptionMixin],
components: {
OrderCard,
PublishPopup,
OrderScreen
OrderScreenContract
},
computed: {
orderObj() {
......@@ -193,10 +193,13 @@ export default {
}
],
tabList: [
{ tabName: '全部', num: 0 },
{ tabName: '待跟进', num: 0 },
{ tabName: '已升级', num: 0 },
{ tabName: '战败', num: 0 }
{ tabName: '全部', num: 0, value: null },
{ tabName: '待报价', num: 0, value: 0 },
{ tabName: '待支付', num: 0, value: 2 },
{ tabName: '已支付', num: 0, value: 3 },
{ tabName: '已完成', num: 0, value: 5 },
{ tabName: '战败', num: 0, value: -1 },
{ tabName: '待上传协议', num: 0, value: 7 }
],
tabIndex: 0,
waitinputorderTabList: [
......@@ -204,7 +207,7 @@ export default {
{ name: '超分账期', showQuestion: true }
],
activeIndex: 0,
keyword: '',
customerName: '',
searchObj: {},
dataList: [],
triggered: false,
......@@ -262,11 +265,11 @@ export default {
},
switchTab(index) {
this.tabIndex = index
delete this.searchObj.statusList
this.searchObj.orderStatus = this.tabList[index].value
this.search()
},
openFilter() {
this.$refs.openFilter.open()
this.$refs.openFilter.open(this.searchObj)
},
openFilterConfirm(val) {
console.log(val)
......@@ -298,18 +301,21 @@ export default {
}
},
getStatByStatus() {
if ((this.searchObj.statusList && this.searchObj.statusList[0] == 'Y') || (this.searchObj.statusList && this.searchObj.statusList[0] == 'N')) {
this.searchObj.constructionFlag = this.searchObj.statusList[0]
delete this.searchObj.statusList
const localUserInfo = uni.$storage.get('userInfo')
console.log(this.searchObj)
let params = {
customerName: this.customerName,
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
uni.$api.boutiqueApi
.statByStatus({
...this.searchObj,
keyword: this.keyword,
sceneType: 1
})
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equitApi
.orderStatistics(params)
.then(result => {
const labelList = ['totalCount', 'waitUpgradeCount', 'upgradedCount', 'notUpgradeCount']
const labelList = ['total', 'waitQuotation', 'waitPay', 'paySuccess', 'completed', 'defeat']
labelList.map((item, index) => {
this.tabList[index].num = result[item] ? result[item] : 0
})
......@@ -362,94 +368,28 @@ export default {
})
},
queryList(pageNo, pageSize) {
const localUserInfo = uni.$storage.get('userInfo')
console.log(this.searchObj)
let obj = {
keyword: this.keyword,
let params = {
pageSize,
pageNum: pageNo,
sceneType: 1,
currentPage: pageNo,
customerName: this.customerName,
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
// 待跟进状态需要特殊处理避免带出已关闭
if ([2, 3].includes(this.tabIndex)) {
let target = {
1: 'R',
2: 'Y',
3: 'N'
}
obj.upgradeFinishFlag = target[this.tabIndex]
} else if (this.tabIndex == 1) {
obj.statusList = [1]
}
console.log(this.searchObj.statusList)
console.log(this.searchObj.statusList && this.searchObj.statusList[0])
if ((this.searchObj.statusList && this.searchObj.statusList[0] == 'Y') || (this.searchObj.statusList && this.searchObj.statusList[0] == 'N')) {
this.searchObj.constructionFlag = this.searchObj.statusList[0]
delete obj.statusList
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
uni.$api.boutiqueApi
.getWorkPackageGoodsList(obj)
// if (staffUuid) {
// params.transferIds = [staffUuid]
// } else {
// params.merchantId = storeInfo?.merchantId
// }
uni.$api.equitApi
.quotationPage(params)
.then(result => {
const { list, total } = result
// 这个是用来判断哪些用户可以撤销的
let userType = (!this.localUserInfo.isSuper && this.localUserInfo.merchantType) || (this.localUserInfo.loginRole !== 3 && this.localUserInfo?.loginRole !== 6)
// let userType = true
list.map(e => {
if (e.orderTime) e.orderTime = dayjs(new Date(e.orderTime)).format('YYYY-MM-DD HH:mm:ss')
e.subOrderList.map(i => {
i.totalPrice = Number(utils.decimal(i.totalPrice, 2)).toFixed(2)
})
e.total_price = e.totalPrice
e.totalPrice = Number(utils.decimal(e.totalPrice, 2)).toFixed(2)
// 开票按钮
e.invoiceName = e.invoiceStatus == 2 ? '查看发票' : '申请开票'
// && e.status != 1 待跟进现在也能撤销
let orderType = (this.localUserInfo.userType == 1 || this.localUserInfo.userType == 2) && e.status != 9 && ![1, 3, 4].includes(e.selectPayType)
// let orderType = this.localUserInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
// console.log(userType);
// console.log(orderType);
e.repeal = userType && orderType
// 处理subOrderList 商品为空的情况
e.subOrderList = e.subOrderList.filter(item => item.merchantGoodsId)
e.packageGoodsList?.forEach(item => {
item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice ? Number(g.totalPrice) / Number(g.number) : g.upgradePrice
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count
item.totalPrice = utils.decimal(total, 2)
})
if (e.packageGoodsList && e.packageGoodsList.length) {
e.subOrderList = e.subOrderList.concat(e.packageGoodsList)
}
// e.subOrderList = e.subOrderList.filter(item => item.id)
// 处理显示订单右上角文字
let text = this.status[e.status].text
let color = this.status[e.status].color
let background = this.status[e.status].background
// 不是订单失效状态优先显示已施工
if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
text = '已施工'
color = '#347BFF'
background = '#F3F7FC'
}
e.statusText = text
e.statuscolor = color
e.statusbackground = background
// 商品是否包含太阳膜
e.isFilmOrder = e.subOrderList?.findIndex(subE => subE?.upgradeGoodsType == 1) > -1
})
console.log(list)
this.$refs.paging.complete(list)
console.log(result)
this.$refs.paging.complete(result.list)
})
.catch(err => {
this.$refs.paging.complete(false)
......@@ -623,6 +563,20 @@ export default {
// justify-content: start;
padding: toRpx(0) toRpx(48);
margin-bottom: toRpx(24);
position: relative;
.flex:first-child {
display: flex;
flex: 1;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
margin-right: toRpx(20);
&::-webkit-scrollbar {
display: none;
}
}
.filter-item {
// width: toRpx(164);
height: toRpx(72);
......@@ -633,6 +587,8 @@ export default {
font-size: toRpx(28);
font-weight: 400;
padding: toRpx(0) toRpx(40);
flex-shrink: 0;
white-space: nowrap;
}
}
......@@ -651,7 +607,7 @@ export default {
font-weight: normal;
background: #fff;
border: toRpx(2) solid #ffffffcc;
flex-shrink: 0;
&.active {
border: toRpx(2) solid #ffffff;
background: linear-gradient(180deg, #6795ff 0%, #4a84f9 100%);
......
......@@ -5,19 +5,19 @@ class LocalLog {
logger = null
constructor() {
this.logger={}
// this.logger = new LogCat()
this.logger = new LogCat()
}
debug(msg) {
// this.logger.writeLog(LogLevel.DEBUG, msg)
this.logger.writeLog(LogLevel.DEBUG, msg)
}
info(msg) {
// this.logger.writeLog(LogLevel.INFO, msg)
this.logger.writeLog(LogLevel.INFO, msg)
}
warn(msg) {
// this.logger.writeLog(LogLevel.WARN, msg)
this.logger.writeLog(LogLevel.WARN, msg)
}
error(msg) {
// this.logger.writeLog(LogLevel.ERROR, msg)
this.logger.writeLog(LogLevel.ERROR, msg)
}
getFiles(beginDate, endDate) {
const logFiles = this.logger.getLogFileList()
......
# 学习中心功能开发文档
## 一、页面路径
### 1. 我的课程页面
**路径**: `pages/boutique/myCourse.vue`
**使用的组件**:
- `components/HomeFrame/components/Study/RecommendCourse.vue` - 待学习 Tab
- `components/HomeFrame/components/Study/MyTask.vue` - 正在学习 Tab
- `components/HomeFrame/components/Study/CompletedCourse.vue` - 已学完 Tab
---
### 2. 我的考试页面
**路径**: `pages/boutique/myExam.vue`
**使用的组件**:
- `components/HomeFrame/components/Study/PassedExam.vue` - 已通过 Tab
- `components/HomeFrame/components/Study/FailedExam.vue` - 未通过 Tab
---
### 3. 我的任务页面
**路径**: `pages/boutique/myTask.vue`
**使用的组件**:
- `components/HomeFrame/components/Study/LearnStatistics.vue` - 累计学习统计
- `components/HomeFrame/components/Study/WeeklyConversionRate.vue` - 周转化率看板
- `pages/common/studyDetail/components/RadarChart.vue` - 能力分析雷达图
- `components/HomeFrame/components/Study/MyTask.vue` - 我的任务卡片
- `components/HomeFrame/components/Study/RecommendCourse.vue` - 更多课程卡片(简化模式)
---
### 4. 排行榜页面
**路径**: `pages/boutique/leaderboard.vue`
**使用的图片资源**:
- `assets/images/studyCenter/Leaderboard-bg.png` - 顶部占位图
- `assets/images/studyCenter/guan.png` - 冠军勋章
- `assets/images/studyCenter/ya.png` - 亚军勋章
- `assets/images/studyCenter/ji.png` - 季军勋章
- `assets/images/common/developing.webp` - 功能开发中图标
---
## 二、组件路径
### 1. 学习中心主页面
**路径**: `components/HomeFrame/components/StudyCenter.vue`
**使用的组件**:
- `components/TwoLevelSelectComponent.vue` - 二级筛选组件
- `components/SelectComponent.vue` - 单级筛选组件
- `components/OrderScreen/index.vue` - 筛选弹窗组件
- `components/HomeFrame/components/Study/RecommendCourse.vue` - 推荐课程卡片
- `components/HomeFrame/components/Study/MyTask.vue` - 正在学习卡片
---
### 2. 课程卡片组件
#### RecommendCourse.vue(推荐课程卡片)
**路径**: `components/HomeFrame/components/Study/RecommendCourse.vue`
**新增 Props**:
- `cardWidth`: Number, default 0 (0=响应式3列,530=固定宽度4列)
- `simplified`: Boolean, default false (true时仅显示背景图、标题和时间)
---
#### MyTask.vue(正在学习的课程任务卡片)
**路径**: `components/HomeFrame/components/Study/MyTask.vue`
**新增 Props**:
- `cardWidth`: Number, default 0 (0=响应式3列,530=固定宽度4列)
---
#### CompletedCourse.vue(已完成课程卡片)
**路径**: `components/HomeFrame/components/Study/CompletedCourse.vue`
**新增 Props**:
- `cardWidth`: Number, default 0 (0=响应式3列,530=固定宽度4列)
**使用的图片资源**:
- `assets/images/studyCenter/success.png` - 成功图标(144x144)
---
### 3. 考试卡片组件
#### PassedExam.vue(已通过考试卡片)
**路径**: `components/HomeFrame/components/Study/PassedExam.vue`
**说明**: 基于 RecommendCourse.vue 封装,显示绿色分数
---
#### FailedExam.vue(未通过考试卡片)
**路径**: `components/HomeFrame/components/Study/FailedExam.vue`
**说明**: 基于 RecommendCourse.vue 封装,显示红色分数
---
### 4. 筛选弹窗组件
#### OrderScreen/index.vue(筛选弹窗)
**路径**: `components/OrderScreen/index.vue`
**新增 Props**:
- `configData`: Array, default [] (支持外部传入筛选配置)
- `title`: String, default '工单筛选' (支持自定义弹窗标题)
---
#### OrderScreen/courseConfig.js(课程筛选配置)
**路径**: `components/OrderScreen/courseConfig.js`
**说明**: 定义课程筛选的配置项(必修/选修、课程类型、评分)
---
#### OrderScreen/components/CourseOptionList.vue(课程选项列表)
**路径**: `components/OrderScreen/components/CourseOptionList.vue`
**说明**: 处理课程筛选的选项列表组件
---
### 5. 权限弹窗组件
#### StudyCenterPermissionPopup.vue(学习中心权限弹窗)
**路径**: `components/StudyCenterPermissionPopup.vue`
**说明**: 点击"新建工单"时,如果没有学习中心权限,弹出提示
**使用的图片资源**:
- `assets/images/studyCenter/noquan.webp` - 无权限提示图
---
### 6. 其他组件
#### TwoLevelSelectComponent.vue(二级选择器)
**路径**: `components/TwoLevelSelectComponent.vue`
**修改说明**: 移除右箭头图标,调整二级弹窗位置,文字居中对齐
---
#### HomeFrame/index.vue(主框架)
**路径**: `components/HomeFrame/index.vue`
**新增功能**: 集成学习中心权限弹窗,点击"新建工单"时检查权限
---
## 三、路由配置
### pages.json
```json
{
"path": "pages/boutique/myTask",
"style": { "navigationStyle": "custom" }
},
{
"path": "pages/boutique/myCourse",
"style": { "navigationStyle": "custom" }
},
{
"path": "pages/boutique/myExam",
"style": { "navigationStyle": "custom" }
},
{
"path": "pages/boutique/leaderboard",
"style": { "navigationStyle": "custom" }
}
```
---
## 四、跳转路径总结
| 功能 | 跳转方法 | 页面路径 | 所在文件 |
|-----|---------|---------|---------|
| 我的课程 | `goToMyCourse()` | `/pages/boutique/myCourse` | StudyCenter.vue |
| 我的任务 | `goToMyTask()` | `/pages/boutique/myTask` | StudyCenter.vue |
| 我的考试 | `goToMyExam()` | `/pages/boutique/myExam` | StudyCenter.vue |
| 排行榜 | `goToLeaderboard()` | `/pages/boutique/leaderboard` | StudyCenter.vue |
---
## 五、图片资源路径
### 学习中心相关图片
- `assets/images/studyCenter/Required.png` - 必修标签(94x48)
- `assets/images/studyCenter/Elective.png` - 选修标签(94x48)
- `assets/images/studyCenter/liang.png` - 亮星星(40x40)
- `assets/images/studyCenter/zuo.png` - 半星星(40x40)
- `assets/images/studyCenter/hui.png` - 灰星星(40x40)
- `assets/images/studyCenter/rs.png` - 学习人数图标(32x32)
- `assets/images/studyCenter/success.png` - 完成图标(144x144)
- `assets/images/studyCenter/noquan.webp` - 无权限提示图
- `assets/images/studyCenter/Leaderboard-bg.png` - 排行榜顶部图(1084x128)
- `assets/images/studyCenter/guan.png` - 冠军勋章(80x80)
- `assets/images/studyCenter/ya.png` - 亚军勋章(80x80)
- `assets/images/studyCenter/ji.png` - 季军勋章(80x80)
### 通用图片
- `assets/images/common/home-bg-1.webp` - 学习中心背景图
- `assets/images/common/study-title.png` - 学习看板标题背景(656x104)
- `assets/images/common/developing.webp` - 功能开发中图标(344x208)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!