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