Commit 3208540e by cen

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

2 parents 8fa1de09 e9ca3bbd

2.94 MB | W: | H:

2.94 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
nothing: false, nothing: false,
total: 0, total: 0,
pageNum: 1, pageNum: 1,
pageSize: 9, pageSize: 12,
scrollTop: 0, scrollTop: 0,
COURSE_TYPE COURSE_TYPE
} }
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
<!-- 考试次数 --> <!-- 考试次数 -->
<view class="exam-times"> <view class="exam-times">
<text class="times-value">剩余考试次数</text> <text class="times-value">剩余考试次数</text>
<template v-if="!item.examTimes">不限次数</template>
<template v-else>
<text>{{ filterValue(item.remainingTimes) }}/{{ filterValue(item.examTimes) }}次</text> <text>{{ filterValue(item.remainingTimes) }}/{{ filterValue(item.examTimes) }}次</text>
</template>
</view> </view>
<!-- 最高得分 --> <!-- 最高得分 -->
...@@ -31,7 +34,7 @@ ...@@ -31,7 +34,7 @@
</view> </view>
<!-- 重新考试按钮 --> <!-- 重新考试按钮 -->
<view v-if="item.remainingTimes > 0" class="retake-btn"> <view v-if="!item.examTimes || item.remainingTimes > 0" class="retake-btn">
<text class="retake-text">重新考试</text> <text class="retake-text">重新考试</text>
</view> </view>
</view> </view>
......
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
<!-- 考试次数 --> <!-- 考试次数 -->
<view class="exam-times"> <view class="exam-times">
<text class="times-value">剩余考试次数</text> <text class="times-value">剩余考试次数</text>
<template v-if="!item.examTimes">不限次数</template>
<template v-else>
<text>{{ filterValue(item.remainingTimes) }}/{{ filterValue(item.examTimes) }}次</text> <text>{{ filterValue(item.remainingTimes) }}/{{ filterValue(item.examTimes) }}次</text>
</template>
</view> </view>
<!-- 最高得分 --> <!-- 最高得分 -->
...@@ -30,7 +33,7 @@ ...@@ -30,7 +33,7 @@
</view> </view>
<!-- 重新考试按钮 --> <!-- 重新考试按钮 -->
<view v-if="item.remainingTimes > 0" class="retake-btn"> <view v-if="!item.examTimes || item.remainingTimes > 0" class="retake-btn">
<text class="retake-text">重新考试</text> <text class="retake-text">重新考试</text>
</view> </view>
</view> </view>
......
...@@ -222,7 +222,8 @@ export default { ...@@ -222,7 +222,8 @@ export default {
], ],
currentSortValue: 0, currentSortValue: 0,
searchParams: { searchParams: {
sortType: 0 sortType: 0,
sortOrder: 'desc'
} }
} }
}, },
...@@ -293,6 +294,7 @@ export default { ...@@ -293,6 +294,7 @@ export default {
handleSearch() { handleSearch() {
console.log('搜索关键词:', this.searchKeyword) console.log('搜索关键词:', this.searchKeyword)
this.searchParams.title = this.searchKeyword this.searchParams.title = this.searchKeyword
this.$refs.allCourse.pageNum = 1
this.$refs.allCourse.getALlCourse() this.$refs.allCourse.getALlCourse()
// TODO: 调用课程列表接口,传入搜索关键词 // TODO: 调用课程列表接口,传入搜索关键词
}, },
...@@ -318,6 +320,7 @@ export default { ...@@ -318,6 +320,7 @@ export default {
this.searchParams.sortType = item.value this.searchParams.sortType = item.value
// } // }
this.searchParams.title = this.searchKeyword this.searchParams.title = this.searchKeyword
this.$refs.allCourse.pageNum = 1
this.$refs.allCourse.getALlCourse() this.$refs.allCourse.getALlCourse()
}, },
// 处理分类变化 // 处理分类变化
...@@ -325,21 +328,28 @@ export default { ...@@ -325,21 +328,28 @@ export default {
console.log('分类变化:', item, level, parent) console.log('分类变化:', item, level, parent)
this.searchParams.courseCategoryId = item.id this.searchParams.courseCategoryId = item.id
this.searchParams.title = this.searchKeyword this.searchParams.title = this.searchKeyword
this.$refs.allCourse.pageNum = 1
this.$refs.allCourse.getALlCourse() this.$refs.allCourse.getALlCourse()
// TODO: 调用课程列表接口,传入分类参数 // TODO: 调用课程列表接口,传入分类参数
}, },
// 处理筛选确认 // 处理筛选确认
handleFilterConfirm(filterData) { handleFilterConfirm(filterData) {
console.log('筛选条件:', filterData) console.log('筛选条件:', filterData)
const {planCourseType, courseFileType, totalStar} = this.searchParams const keys = ['planCourseType', 'courseFileType', 'totalStar']
if (Object.keys(filterData).length === 0) { keys.forEach(k => {
planCourseType && delete this.searchParams.planCourseType if (Object.prototype.hasOwnProperty.call(filterData, k)) {
courseFileType && delete this.searchParams.courseFileType this.searchParams[k] = filterData[k]
totalStar && delete this.searchParams.totalStar
} else { } else {
this.searchParams = Object.assign(this.searchParams, filterData) delete this.searchParams[k]
} }
})
Object.keys(filterData).forEach(k => {
if (!keys.includes(k)) {
this.searchParams[k] = filterData[k]
}
})
this.searchParams.title = this.searchKeyword this.searchParams.title = this.searchKeyword
this.$refs.allCourse.pageNum = 1
this.$refs.allCourse.getALlCourse() this.$refs.allCourse.getALlCourse()
// TODO: 调用课程列表接口,传入筛选条件 // TODO: 调用课程列表接口,传入筛选条件
}, },
...@@ -416,7 +426,8 @@ export default { ...@@ -416,7 +426,8 @@ export default {
this.currentSortValue = 0 this.currentSortValue = 0
this.$refs.orderScreen.clear() this.$refs.orderScreen.clear()
this.searchParams = { this.searchParams = {
sortType: 0 sortType: 0,
sortOrder: 'desc'
} }
} }
} }
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<!-- 学习中心 等级考试弹窗 --> <!-- 学习中心 等级考试弹窗 -->
<StudyPopup :show.sync="showStudyPopup" title="开始您的学习之旅" :topImage="require('@/assets/images/common/study-center-bg.png')" :topImageWidth="848" :topImageHeight="248"> <StudyPopup :show.sync="showStudyPopup" title="开始您的学习之旅" :topImage="require('@/assets/images/common/study-center-bg.png')" :topImageWidth="848" :topImageHeight="248">
<StudyPopupContent cardTitle="个性化学习路径" description="根据您当前的学习情况,我们将为您定制专属的学习计划,帮助您高效提升技能,实现职业突破。" :listItems="['基于当前能力水平评估', '结合岗位发展目标制定', '定期跟踪学习进度和效果']" tipText="true" :courseName="courseInfo.title" buttonText="开始测评" @button-click="handleStartAssessment" /> <StudyPopupContent cardTitle="个性化学习路径" description="根据您当前的学习情况,我们将为您定制专属的学习计划,帮助您高效提升技能,实现职业突破。" :listItems="['基于当前能力水平评估', '结合岗位发展目标制定', '定期跟踪学习进度和效果']" tipText="true" :courseName="courseInfo.title" buttonText="开始测评" @cancel="handleStudyPopupCancel" @button-click="handleStartAssessment" />
</StudyPopup> </StudyPopup>
<!-- 考试提交确认弹窗 --> <!-- 考试提交确认弹窗 -->
...@@ -322,6 +322,19 @@ export default { ...@@ -322,6 +322,19 @@ export default {
} }
} }
}, },
// 处理学习弹窗取消
handleStudyPopupCancel() {
this.showStudyPopup = false
// 切换到学习中心 tab
const tabs = this.$refs.leftBox?.tabs
if (tabs) {
const homeIndex = tabs.findIndex(tab => tab.name === 'HomeSlot')
if (homeIndex !== -1) {
this.tabIndex = homeIndex
this.changeTab({ item: tabs[homeIndex], index: homeIndex })
}
}
},
// 检查学习中心权限 // 检查学习中心权限
async checkStudyCenterPermission() { async checkStudyCenterPermission() {
try { try {
...@@ -382,7 +395,7 @@ export default { ...@@ -382,7 +395,7 @@ export default {
if (this.$refs.pointRef && typeof this.$refs.pointRef.getMyStudyTime === 'function') { if (this.$refs.pointRef && typeof this.$refs.pointRef.getMyStudyTime === 'function') {
setTimeout(() => { setTimeout(() => {
this.$refs.pointRef.getMyStudyTime() this.$refs.pointRef.getMyStudyTime()
}, 200) }, 500)
} }
} else { } else {
this.examPopInfo.isExamLoading = false this.examPopInfo.isExamLoading = false
......
...@@ -137,9 +137,12 @@ export default { ...@@ -137,9 +137,12 @@ export default {
districts.push(d) districts.push(d)
} }
}) })
const uniqueDistricts = districts.filter((item, index, self) =>
index === self.findIndex(obj => obj.name === item.name)
)
return { return {
letter: c, letter: c,
list: districts list: uniqueDistricts
} }
}) })
list.push(i) list.push(i)
......
...@@ -30,10 +30,15 @@ ...@@ -30,10 +30,15 @@
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
<view class="button-group">
<view class="cancel-button" @click="handleCancel">
暂不测评
</view>
<view v-if="buttonText" class="action-button" @click="handleButtonClick"> <view v-if="buttonText" class="action-button" @click="handleButtonClick">
{{ buttonText }} {{ buttonText }}
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -68,6 +73,9 @@ export default { ...@@ -68,6 +73,9 @@ export default {
methods: { methods: {
handleButtonClick() { handleButtonClick() {
this.$emit('button-click') this.$emit('button-click')
},
handleCancel() {
this.$emit('cancel')
} }
} }
} }
...@@ -160,9 +168,28 @@ export default { ...@@ -160,9 +168,28 @@ export default {
color: rgba(59, 115, 255, 1); color: rgba(59, 115, 255, 1);
} }
} }
.button-group {
display: flex;
align-items: center;
justify-content: center;
gap: toRpx(16);
margin-top: auto;
}
.cancel-button {
width: toRpx(344);
height: toRpx(80);
border-radius: toRpx(64);
background: #f0f1f5;
color: #1a1a1a;
font-size: toRpx(28);
font-weight: 400;
font-family: "HarmonyOSSansSC";
text-align: center;
line-height: toRpx(80);
}
.action-button { .action-button {
width: toRpx(720); width: toRpx(360);
height: toRpx(80); height: toRpx(80);
border-radius: toRpx(48); border-radius: toRpx(48);
background: linear-gradient(180deg, rgba(44, 102, 247, 1) 0%, rgba(72, 166, 255, 1) 100%); background: linear-gradient(180deg, rgba(44, 102, 247, 1) 0%, rgba(72, 166, 255, 1) 100%);
......
...@@ -129,7 +129,7 @@ import utils from '@/utils/utils' ...@@ -129,7 +129,7 @@ import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils' import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import PublishPopup from '@/components/PublishPopup.vue' import PublishPopup from '@/components/PublishPopup.vue'
import StudyPopup from '@/components/StudyPopup.vue' import StudyPopup from '@/components/StudyPopup.vue'
import StudyPopupContent from '@/components/StudyPopupContent.vue' import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import { debounce } from 'lodash' import { debounce } from 'lodash'
export default { export default {
mixins: [interceptionMixin], mixins: [interceptionMixin],
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
components: { components: {
PublishPopup, PublishPopup,
StudyPopup, StudyPopup,
StudyPopupContent StudyCenterPermissionPopup
}, },
computed: { computed: {
payType() { payType() {
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
nothing: false, nothing: false,
total: 0, total: 0,
pageNum: 1, pageNum: 1,
pageSize: 9, pageSize: 12,
scrollTop: 0, scrollTop: 0,
taskList: [], taskList: [],
timer: null // 只需要一个定时器 timer: null // 只需要一个定时器
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
this.initCountdownFieldsForList(newList); this.initCountdownFieldsForList(newList);
} }
if (pageNum == 1) { if (pageNum == 1) {
this.taskList = newList.concat(newList) this.taskList = newList
} else { } else {
// 合并新数据到已有数据 // 合并新数据到已有数据
this.taskList = this.taskList.concat(newList) this.taskList = this.taskList.concat(newList)
......
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-right: toRpx(20); margin-right: toRpx(20);
background-color: #ffffff; background-color: #f7f7f7;
&.medal { &.medal {
background: transparent; background: transparent;
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
} }
.rank-number { .rank-number {
width: toRpx(40); // width: toRpx(40);
height: toRpx(40); height: toRpx(40);
color: #2d66f7; color: #2d66f7;
font-size: toRpx(34); font-size: toRpx(34);
......
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
:type="noticeObj.type || 'success'" :type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons" :buttons="noticeObj.buttons"
></NoticePopup> ></NoticePopup>
<EquityVinCheck ref="vinCheckRef" />
</view> </view>
</template> </template>
...@@ -122,8 +121,7 @@ import EquityUpload from './EquityForm/EquityUpload.vue' ...@@ -122,8 +121,7 @@ import EquityUpload from './EquityForm/EquityUpload.vue'
import EquityConversion from './EquityForm/EquityConversion.vue' import EquityConversion from './EquityForm/EquityConversion.vue'
import NP from 'number-precision' import NP from 'number-precision'
import NoticePopup from '@/components/NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
import EquityVinCheck from './EquityForm/EquityVinCheck.vue' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const codeToAttr = { const codeToAttr = {
YB0001: 'invoice', YB0001: 'invoice',
YB0003: 'driveFront', YB0003: 'driveFront',
...@@ -162,8 +160,7 @@ export default { ...@@ -162,8 +160,7 @@ export default {
EquityTire, EquityTire,
EquityUpload, EquityUpload,
EquityConversion, EquityConversion,
NoticePopup, NoticePopup
EquityVinCheck
}, },
props: { props: {
transmissionOfData: { transmissionOfData: {
...@@ -184,8 +181,8 @@ export default { ...@@ -184,8 +181,8 @@ export default {
conSecondObj: { conSecondObj: {
vin: '' vin: ''
}, },
noticeObj: {} noticeObj: {},
validateState: true
} }
}, },
watch: { watch: {
...@@ -203,10 +200,25 @@ export default { ...@@ -203,10 +200,25 @@ export default {
} }
}, },
mounted () { mounted () {
// this.$refs.vinCheckRef.open()
}, },
methods: { methods: {
// 车架号动态校验
validateVin () {
let carVinVal = this.orderObj.vin;
if (carVinVal) {
this.orderObj.carVin = formatVinInput(carVinVal)
validateVin(this.orderObj.carVin).then(result => {
console.log("validateVin", result);
let { valid } = result.data;
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
}).catch(err => {
console.log("validateVinErr", result);
})
}
},
// 单选框change事件 // 单选框change事件
radioChange (e, val) { radioChange (e, val) {
this.$set(this.orderObj, val.value, e.detail.value) this.$set(this.orderObj, val.value, e.detail.value)
...@@ -243,6 +255,8 @@ export default { ...@@ -243,6 +255,8 @@ export default {
}, },
inputBlur (e, val) { inputBlur (e, val) {
this.orderObj[val.value] = this.orderObj[val.value] this.orderObj[val.value] = this.orderObj[val.value]
// VIN车架号动态校验:车架号字段,动态转换为大写
if (val.value === 'vin') this.validateVin()
}, },
async getServiceInfoDetail (contractNo) { async getServiceInfoDetail (contractNo) {
try { try {
...@@ -401,6 +415,20 @@ export default { ...@@ -401,6 +415,20 @@ export default {
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
async submit (operationType) { async submit (operationType) {
// VIN车架号-动态校验
const carVin = this.orderObj.vin
if (carVin) {
// 前置判断
if (carVin.length !== 17) {
uni.showToast({ title: '请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)', icon: 'none' })
return false
}
// 根据接口校验结果判断
if (carVin.length === 17 && !this.validateState) {
uni.showToast({ title: '车架号校验不匹配,请核对后重新输入', icon: 'none' })
return false
}
}
uni.showLoading({ uni.showLoading({
title: '提交中...', title: '提交中...',
mask: true mask: true
...@@ -420,9 +448,12 @@ export default { ...@@ -420,9 +448,12 @@ export default {
attributeGroup: item.attributeGroup, attributeGroup: item.attributeGroup,
attributeName: item.attributeName attributeName: item.attributeName
}) })
params[item.attr] = tireObj[item.attr]
} }
}) })
params.attributeList = attributeList params.attributeList = attributeList
params.tireBrand = tireObj.tireBrand
params.tireScale = tireObj.tireScale
} }
if (goodsRef) { if (goodsRef) {
let goodInfoList = utils.deepClone(goodsRef.goodInfoList) let goodInfoList = utils.deepClone(goodsRef.goodInfoList)
...@@ -462,6 +493,7 @@ export default { ...@@ -462,6 +493,7 @@ export default {
this.confirm(params, operationType) this.confirm(params, operationType)
return return
} }
console.log(params)
if (!this.checkOrder(params)) return uni.hideLoading() if (!this.checkOrder(params)) return uni.hideLoading()
const { code, message } = await uni.$api.equityApi.checkVinBuyEquityOrder({ const { code, message } = await uni.$api.equityApi.checkVinBuyEquityOrder({
vin: orderObj.vin vin: orderObj.vin
...@@ -531,7 +563,6 @@ export default { ...@@ -531,7 +563,6 @@ export default {
if (res && res.message) throw res.message if (res && res.message) throw res.message
} }
} }
}) })
} }
}) })
...@@ -591,6 +622,10 @@ export default { ...@@ -591,6 +622,10 @@ export default {
this.$emit('jump', 'EquityManagement') this.$emit('jump', 'EquityManagement')
}, 1500) }, 1500)
} else { } else {
uni.showLoading({
mask: true
})
setTimeout(async () => {
// 从URL获取文件名 // 从URL获取文件名
const getFileNameFromUrl = (url) => { const getFileNameFromUrl = (url) => {
return url.split('/').pop().split('?')[0] || '未知文件' return url.split('/').pop().split('?')[0] || '未知文件'
...@@ -623,6 +658,7 @@ export default { ...@@ -623,6 +658,7 @@ export default {
uni.hideLoading() uni.hideLoading()
this.$refs.reportNotice.open() this.$refs.reportNotice.open()
}, 100) }, 100)
}, 1500)
} }
} else throw message } else throw message
......
...@@ -240,6 +240,7 @@ export default { ...@@ -240,6 +240,7 @@ export default {
return item return item
} }
) )
if (!owner.ownerGender) owner.ownerGender = '男'
if (owner.carSeriesId) { if (owner.carSeriesId) {
orderObj.carInfo = { orderObj.carInfo = {
carBrand: owner.carBrand, carBrand: owner.carBrand,
...@@ -357,6 +358,9 @@ export default { ...@@ -357,6 +358,9 @@ export default {
if (owner[key] != null) orderObj[key] = owner[key] if (owner[key] != null) orderObj[key] = owner[key]
}) })
if (owner.id) orderObj.ownerId = owner.id if (owner.id) orderObj.ownerId = owner.id
let payeeCell = this.formList[4].find(item => item.value === 'payee')
if (payeeCell) payeeCell.current = orderObj.payee
this.orderObj = orderObj this.orderObj = orderObj
this.getConfig() this.getConfig()
setTimeout(() => { setTimeout(() => {
...@@ -508,7 +512,6 @@ export default { ...@@ -508,7 +512,6 @@ export default {
}, },
// 输入框失去焦点事件 // 输入框失去焦点事件
inputBlur (e, val) { inputBlur (e, val) {
console.log("SSSSSS");
console.log(e, val) console.log(e, val)
if (val.value == 'price') { if (val.value == 'price') {
this.orderObj[val.value] = parseFloat(this.orderObj[val.value]) > 2000000 ? 2000000 : this.orderObj[val.value] this.orderObj[val.value] = parseFloat(this.orderObj[val.value]) > 2000000 ? 2000000 : this.orderObj[val.value]
......
...@@ -739,7 +739,7 @@ export default { ...@@ -739,7 +739,7 @@ export default {
item[key] = '' item[key] = ''
this.dateKey[`${key}_${index}`] = Date.now() this.dateKey[`${key}_${index}`] = Date.now()
} }
if (['deliveryCount', 'notDeliveryCount'].includes(key) && orderObj.onBreak == 'N') { if (['deliveryCount', 'notDeliveryCount'].includes(key)) {
let checkName = `${key}Record`, let checkName = `${key}Record`,
checkValue = carBandList[index][checkName] checkValue = carBandList[index][checkName]
if ( if (
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!