Commit 420629b9 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 e27b3549 2af55f25
......@@ -40,7 +40,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" v-if="dataInfo.unReadCount > 0">{{dataInfo.unReadCount}}</view>
<view class="badge" v-if="dataInfo.unReadCount > 0"></view>
</view>
<view class="list-item" @click="goToMyExam">
<image class="item-icon" :src="require('@/assets/images/studyCenter/my-exam.png')" mode="aspectFit" />
......@@ -651,10 +651,10 @@ export default {
.badge {
position: absolute;
top: toRpx(4);
right: toRpx(38);
width: toRpx(24);
height: toRpx(24);
top: toRpx(8);
right: toRpx(48);
width: toRpx(12);
height: toRpx(12);
border-radius: toRpx(732);
background: #f24724;
display: flex;
......
......@@ -550,7 +550,7 @@ export default {
{ sceneType } = this
if (!noInterceptPage.includes(item.name)) {
if (sceneType != 7) {
if (await this.inspectionOfProhibitionBill()) return
// if (await this.inspectionOfProhibitionBill()) return
// 检查是否限制录单
const res = await this.getLimitRecord()
if (res.lockOrder) {
......
......@@ -10,10 +10,10 @@
<!-- 第二段描述(橙色) -->
<view class="highlight-text">
<template v-if="lockReason === 0">
<template v-if="lockReason == '0'">
到学习中心-我的课程-待学习,完成课程学习后,即可解锁开单权限。
</template>
<template v-if="lockReason === 1">
<template v-if="lockReason == '1'">
到学习中心-我的任务,完成长课程学习任务后,即可解锁开单权限。
</template>
</view>
......@@ -34,8 +34,8 @@
export default {
props: {
lockReason: {
type: Number,
default: 0
type: String,
default: '0'
}
},
name: 'StudyCenterPermissionPopup',
......
......@@ -116,6 +116,10 @@
</view>
</template>
</PublishPopup>
<!-- 学习中心权限弹窗 -->
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.png')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
</view>
</template>
<script>
......@@ -124,6 +128,8 @@ import { interceptionMixin } from '@/mixin/index'
import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import PublishPopup from '@/components/PublishPopup.vue'
import StudyPopup from '@/components/StudyPopup.vue'
import StudyPopupContent from '@/components/StudyPopupContent.vue'
import { debounce } from 'lodash'
export default {
mixins: [interceptionMixin],
......@@ -135,7 +141,9 @@ export default {
}
},
components: {
PublishPopup
PublishPopup,
StudyPopup,
StudyPopupContent
},
computed: {
payType() {
......@@ -190,7 +198,9 @@ export default {
key: 'orderTime'
}
],
localUserInfo: null
localUserInfo: null,
showStudyPermissionPopup: false,
lockReason: ''
}
},
mounted() {
......@@ -228,7 +238,16 @@ export default {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport()
if (staffCheck) return false
if (name == 'CreateOrder' && (await this.inspectionOfProhibitionBill())) return /**禁止提单 */
// if (name == 'CreateOrder' && (await this.inspectionOfProhibitionBill())) return /**禁止提单 */
if (name == 'CreateOrder') {
// 提示去学习中心弹窗
const res = await this.getLimitRecord()
if (res.lockOrder) {
this.showStudyPermissionPopup = true
this.lockReason = res.lockReason
return
}
}
// 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) {
this.$emit('jump', 'ConfirmOrder', this.orderCardDetail)
......@@ -284,8 +303,14 @@ export default {
this.$refs.recordOrderPopup.closePopup()
console.log('this.selectType', this.selectType)
if (this.selectType == 1) {
console.log(await this.inspectionOfProhibitionBill())
if (await this.inspectionOfProhibitionBill()) return
// if (await this.inspectionOfProhibitionBill()) return
// 提示去学习中心弹窗
const res = await this.getLimitRecord()
if (res.lockOrder) {
this.showStudyPermissionPopup = true
this.lockReason = res.lockReason
return
}
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'createWithPay' })
} else if (this.selectType == 2 || this.selectType == 3) {
this.$emit('jump', 'DefeatOrder', { paramsData: this.orderCardDetail, type: 'createWithPay', isExpiredTraffic: this.selectType == 3 })
......@@ -309,7 +334,18 @@ export default {
},
cardClick: debounce(function () {
this.jumpClick(this.orderCardDetail.status == 3 ? 'ConfirmOrder' : this.orderCardDetail.status == 1 ? 'CreateOrder' : 'OrderDetail', this.orderCardDetail)
}, 300)
}, 300),
// 跳转学习中心
handleStudyPermissionConfirm() {
this.showStudyPermissionPopup = false
uni.navigateBack({
success: () => {
setTimeout(() => {
uni.$emit('studyCenter')
}, 100)
}
})
}
}
}
</script>
......
......@@ -57,6 +57,10 @@
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
<!-- 学习中心权限弹窗 -->
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.png')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
</view>
</template>
......@@ -72,6 +76,8 @@ import UploadProofOfPayment from './components/UploadProofOfPayment.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index'
import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
export default {
mixins: [interceptionMixin],
......@@ -84,7 +90,9 @@ export default {
ConfirmOrder,
NoticePopup,
UploadProofOfPayment,
OrderDetail
OrderDetail,
StudyPopup,
StudyCenterPermissionPopup
},
data () {
return {
......@@ -93,7 +101,9 @@ export default {
endDate: dayjs().format('YYYY-MM-DD'),
currentDate: dayjs().format('YYYY-MM-DD'),
currentMonth: dayjs().format('YYYY-MM'),
selectedDays: []
selectedDays: [],
lockReason: '',
showStudyPermissionPopup: false
}
},
onLoad (options) {
......@@ -110,8 +120,18 @@ export default {
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
if(this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 原禁止提单inspectionOfProhibitionBill方法被替换getLimitRecord
// if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()))) return
// 提示去学习中心弹窗
const res = await this.getLimitRecord()
if (res.lockOrder) {
this.showStudyPermissionPopup = true
this.lockReason = res.lockReason
return
}
// 保存当前选择的组件信息,但不立即切换
const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
......@@ -163,6 +183,17 @@ export default {
if (val) {
this.transmissionOfData = val
}
},
// 跳转学习中心
handleStudyPermissionConfirm() {
this.showStudyPermissionPopup = false
uni.navigateBack({
success: () => {
setTimeout(() => {
uni.$emit('studyCenter')
}, 100)
}
})
}
}
}
......
......@@ -83,7 +83,7 @@
<template v-if="showUpload">
<view class="upload-box">
<upload-proof-of-payment
@back="showUpload = false"
@back="clearPayMentDocList"
@confirm="uploadConfirm"
/>
</view>
......@@ -203,7 +203,7 @@ export default {
popupTitle: '',
pointsMultiRole: 'Y',
formKey: Date.now(),
validateState:null
validateState: null
}
......@@ -451,7 +451,7 @@ export default {
},
// 弹窗确认回调
onConfirm (val, flag) {
console.log(val, 'onConfirm')
console.log(JSON.parse(JSON.stringify(val)), 'onConfirm')
this.externalData = []
// // const { chooseContent } = val
const chooseContent = utils.deepClone(val.chooseContent)
......@@ -476,7 +476,7 @@ export default {
} else {
// 过滤出已选的goodFlag为2的对象
const selectedGoods = this.orderObj[_typeValue.key].filter(item => item.goodsFlag === 2)
const singleGoods = flag ? this.orderObj[_typeValue.key].filter(item => item.goodsFlag != 2) : chooseContent.filter(item => item.goodsFlag != 2)
const singleGoods = flag ? this.orderObj[_typeValue.key].filter(item => item.goodsFlag != 2) : chooseContent.filter(item => item.goodsFlag != 2)
const moreGoods = chooseContent
.filter(item => item.goodsFlag === 2)
.filter(item => {
......@@ -508,27 +508,30 @@ export default {
},
// 输入框失去焦点事件
inputBlur (e, val) {
console.log("SSSSSS");
console.log("SSSSSS");
console.log(e, val)
if (val.value == 'price') {
this.orderObj[val.value] = parseFloat(this.orderObj[val.value]) > 2000000 ? 2000000 : this.orderObj[val.value]
return
}
this.orderObj[val.value] = this.orderObj[val.value]
// VIN车架号动态校验:车架号字段,动态转换为大写
let carVinVal = this.orderObj.carVin;
if (val.value === 'carVin' && 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);
})
}
// VIN车架号动态校验:车架号字段,动态转换为大写
if (val.value === 'carVin') this.validateVin()
},
validateVin () {
let carVinVal = this.orderObj.carVin;
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);
})
}
},
// 校验必填等规则
checkRequired () {
......@@ -548,19 +551,19 @@ export default {
})
// VIN车架号-动态校验
const carVin = this.orderObj.carVin
console.log("validateState",this.validateState);
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
}
}
console.log("validateState", this.validateState);
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
}
}
// 遍历requiredArr,检查orderObj中是否有对应的值
for (let i = 0; i < requiredArr.length; i++) {
const item = requiredArr[i]
......@@ -606,7 +609,9 @@ export default {
([2, 5, 6, 7].includes(+payType)) &&
!(orderInfo.transactionNo && orderInfo.paymentDocList.length)
) return this.showUpload = true
if (orderInfo.pay2Time) orderInfo.pay2Time = dayjs(orderInfo.pay2Time).format('YYYY-MM-DD HH:mm:ss')
if (orderInfo.pay2Time && ![1, 3].includes(+payType)) orderInfo.pay2Time = dayjs(orderInfo.pay2Time).format('YYYY-MM-DD HH:mm:ss')
else delete orderInfo.pay2Time
uni.showLoading({
title: `${check ? '报价' : '保存'}中...`,
mask: true
......@@ -616,6 +621,7 @@ export default {
const data = await uni.$api.equityApi[apiName](orderInfo)
this.saveStatus = false
if (data) {
this.showUpload = false
wx.hideLoading()
if (check) {
if ([2, 5, 6, 7].includes(+payType)) return this.$emit('jump', 'OrderManagement')
......@@ -731,7 +737,7 @@ export default {
)
let keyList = ['mode', 'payee', 'payType', 'referrerId', 'referrer',
'deliveryId', 'deliveryName', 'total', 'notes', 'tradeNo',
'transactionNo', 'paymentDocList', 'pay2Time', 'id', 'orderId'
'transactionNo', 'paymentDocList', 'id', 'orderId', 'pay2Time'
],
customerKeyList = [
'owner', 'phone', 'certificateNo', 'carVin', 'seat', 'price',
......@@ -896,7 +902,6 @@ export default {
this.orderObj.transactionNo = outTradeNo
this.orderObj.tradeNo = outTradeNo
this.orderObj.paymentDocList = paymentDocList
this.showUpload = false
this.submit()
},
setCustomerInfo (customerInfo) {
......@@ -914,9 +919,10 @@ export default {
hobby: customerInfo.customerHobby,
companion: customerInfo.customerCompanion,
certificateNo: customerInfo.customerCertificateNo || '',
salesType
salesType,
carVin: customerInfo.carVin || '',
carColor: customerInfo.carColor || '',
})
this.formList[1].map(e => {
if (e.value == 'salesType') e.current = salesType
if (e.value == 'ownerGender') e.current = ownerGender
......@@ -950,6 +956,7 @@ export default {
}
this.orderObj = orderObj
this.formKey = Date.now()
this.validateVin()
console.log(this.orderObj)
},
jumpSuccess (params) {
......@@ -980,8 +987,13 @@ export default {
}
return parseFloat(strVal)
},
closePopup(){
closePopup () {
this.$emit('jump', 'OrderManagement')
},
clearPayMentDocList () {
this.showUpload = false
this.orderInfo.paymentDocList = []
this.orderInfo.transactionNo = ''
}
}
}
......
......@@ -24,6 +24,11 @@
</view>
</view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
<!-- 学习中心权限弹窗 -->
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.png')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
</view>
</template>
......@@ -39,6 +44,8 @@ import NoticePopup from '@/components/NoticePopup.vue'
import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index'
import UpdateOrderInfo from './components/UpdateOrderInfo.vue'
import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
export default {
mixins: [interceptionMixin],
......@@ -51,7 +58,9 @@ export default {
NoticePopup,
UploadProofOfPayment,
OrderDetail,
UpdateOrderInfo
UpdateOrderInfo,
StudyPopup,
StudyCenterPermissionPopup
},
data() {
return {
......@@ -60,7 +69,9 @@ export default {
endDate: dayjs().format('YYYY-MM-DD'),
currentDate: dayjs().format('YYYY-MM-DD'),
currentMonth: dayjs().format('YYYY-MM'),
selectedDays: []
selectedDays: [],
lockReason: '',
showStudyPermissionPopup: false
}
},
onLoad(options) {
......@@ -77,8 +88,17 @@ export default {
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick(item) {
if(this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()))) return
// 提示去学习中心弹窗
const res = await this.getLimitRecord()
if (res.lockOrder) {
this.showStudyPermissionPopup = true
this.lockReason = res.lockReason
return
}
// 保存当前选择的组件信息,但不立即切换
const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
......@@ -129,6 +149,17 @@ export default {
if (val) {
this.transmissionOfData = val
}
},
// 跳转学习中心
handleStudyPermissionConfirm() {
this.showStudyPermissionPopup = false
uni.navigateBack({
success: () => {
setTimeout(() => {
uni.$emit('studyCenter')
}, 100)
}
})
}
}
}
......
......@@ -111,6 +111,7 @@ export default {
this.currentMonth = dayjs(currentDate).format('YYYY-MM')
},
async entranceClick (item) {
if(this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()))) return
// 保存当前选择的组件信息,但不立即切换
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!