|
|
|
|
@ -20,10 +20,7 @@
|
|
|
|
|
</headers>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<scroll-view
|
|
|
|
|
:style="{ height: scrollHeight + 'px' }"
|
|
|
|
|
scroll-y="true" class="scroll-view"
|
|
|
|
|
>
|
|
|
|
|
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
|
|
|
|
|
<view class="group_4 flex-col">
|
|
|
|
|
<view class="block_1 flex-row justify-between" @click="show = true">
|
|
|
|
|
<text class="text_19">是否通过</text>
|
|
|
|
|
@ -37,28 +34,17 @@
|
|
|
|
|
<view class="text-wrapper_7 flex-row justify-between">
|
|
|
|
|
<text class="text_4">分数</text>
|
|
|
|
|
<view class="text_5_1 ">
|
|
|
|
|
<u--input
|
|
|
|
|
placeholder="请输入分数"
|
|
|
|
|
border="none"
|
|
|
|
|
v-model="process.examScore"
|
|
|
|
|
maxlength="3"
|
|
|
|
|
inputAlign="right"
|
|
|
|
|
>分
|
|
|
|
|
<u--input placeholder="请输入分数" border="none" v-model="process.examScore" maxlength="3"
|
|
|
|
|
inputAlign="right">分
|
|
|
|
|
</u--input>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text-wrapper_8 flex-row justify-between">
|
|
|
|
|
<text class="text_20">时间</text>
|
|
|
|
|
<view>
|
|
|
|
|
<u-datetime-picker
|
|
|
|
|
:show="showTimePicker"
|
|
|
|
|
v-model="process.examTime"
|
|
|
|
|
mode="datetime"
|
|
|
|
|
:minDate="minTime"
|
|
|
|
|
:maxDate="maxTime"
|
|
|
|
|
@confirm="onConfirmExamTime"
|
|
|
|
|
@cancel="showTimePicker = false"
|
|
|
|
|
></u-datetime-picker>
|
|
|
|
|
<u-datetime-picker :show="showTimePicker" v-model="process.examTime" mode="datetime"
|
|
|
|
|
:minDate="minTime" :maxDate="maxTime" @confirm="onConfirmExamTime"
|
|
|
|
|
@cancel="showTimePicker = false"></u-datetime-picker>
|
|
|
|
|
<text class="text_3" @click="showTimePicker = true">
|
|
|
|
|
{{ process.examTime ? formatDate(process.examTime) : '选择时间' }}
|
|
|
|
|
</text>
|
|
|
|
|
@ -111,14 +97,8 @@
|
|
|
|
|
<u--textarea class="text_17" v-model="process.remark" placeholder="请输入内容" count></u--textarea>
|
|
|
|
|
<text class="text_18">图片</text>
|
|
|
|
|
<view class="image-wrapper_4 flex-row justify-between">
|
|
|
|
|
<u-upload
|
|
|
|
|
|
|
|
|
|
:fileList="displayFileList"
|
|
|
|
|
@afterRead="afterRead"
|
|
|
|
|
@delete="deletePic"
|
|
|
|
|
multiple
|
|
|
|
|
:maxCount="2"
|
|
|
|
|
></u-upload>
|
|
|
|
|
<u-upload :fileList="displayFileList" @afterRead="afterRead" @delete="deletePic" multiple
|
|
|
|
|
:maxCount="2"></u-upload>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
@ -133,7 +113,9 @@
|
|
|
|
|
<script>
|
|
|
|
|
import upload from '@/utils/upload.js'
|
|
|
|
|
import request from '@/utils/request.js'
|
|
|
|
|
import {getLocalUserInfo} from '../../utils/auth';
|
|
|
|
|
import {
|
|
|
|
|
getLocalUserInfo
|
|
|
|
|
} from '../../utils/auth';
|
|
|
|
|
import headers from "@/components/header/headers.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
@ -145,8 +127,12 @@ export default {
|
|
|
|
|
show: false,
|
|
|
|
|
showTimePicker: false,
|
|
|
|
|
subjectShow: false,
|
|
|
|
|
ifPassColumns: [['已通过', '未通过']],
|
|
|
|
|
subjectColumns: [['科目一']],
|
|
|
|
|
ifPassColumns: [
|
|
|
|
|
['已通过', '未通过']
|
|
|
|
|
],
|
|
|
|
|
subjectColumns: [
|
|
|
|
|
['科目一']
|
|
|
|
|
],
|
|
|
|
|
selectedValue: '',
|
|
|
|
|
subjectValue: '',
|
|
|
|
|
fileList: [],
|
|
|
|
|
@ -186,6 +172,7 @@ export default {
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
console.log('options', options)
|
|
|
|
|
this.userInfo = getLocalUserInfo()
|
|
|
|
|
console.log('userInfo', this.userInfo)
|
|
|
|
|
// this.getUserOrderDetails()
|
|
|
|
|
this.process.subject = options.subject
|
|
|
|
|
this.opTenantId = options.tenantId
|
|
|
|
|
@ -216,9 +203,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const prefix = this.$imagesUrl.endsWith('/') ? this.$imagesUrl : `${this.$imagesUrl}/`;
|
|
|
|
|
const fullUrl = item.url.startsWith('/')
|
|
|
|
|
? `${prefix}${item.url.slice(1)}`
|
|
|
|
|
: `${prefix}${item.url}`;
|
|
|
|
|
const fullUrl = item.url.startsWith('/') ?
|
|
|
|
|
`${prefix}${item.url.slice(1)}` :
|
|
|
|
|
`${prefix}${item.url}`;
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
@ -284,9 +271,12 @@ export default {
|
|
|
|
|
|
|
|
|
|
formatSubject(subject) {
|
|
|
|
|
switch (Number(subject)) {
|
|
|
|
|
case 2: return '科目二';
|
|
|
|
|
case 3: return '科目三';
|
|
|
|
|
default: return '未知科目';
|
|
|
|
|
case 2:
|
|
|
|
|
return '科目二';
|
|
|
|
|
case 3:
|
|
|
|
|
return '科目三';
|
|
|
|
|
default:
|
|
|
|
|
return '未知科目';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
@ -372,13 +362,16 @@ export default {
|
|
|
|
|
if (this.courseCompleteStatusList.length > 0) {
|
|
|
|
|
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
|
|
|
|
|
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
|
|
|
|
|
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item.subject === 4)
|
|
|
|
|
const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item
|
|
|
|
|
.subject === 4)
|
|
|
|
|
if (subject1Or4) {
|
|
|
|
|
this.courseType = subject1Or4.courseType
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (subject2?.status === '2' && subject3?.status === '2') {
|
|
|
|
|
this.subjectColumns = [['科目一', '科目四']]
|
|
|
|
|
this.subjectColumns = [
|
|
|
|
|
['科目一', '科目四']
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -394,8 +387,12 @@ export default {
|
|
|
|
|
|
|
|
|
|
saveData() {
|
|
|
|
|
console.log('process', this.process)
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
|
|
|
|
|
.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '信息填写不完整',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.process.subject == 1 || this.process.subject == 4) {
|
|
|
|
|
@ -407,24 +404,35 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
saveDataOne() {
|
|
|
|
|
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
|
|
|
|
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '请联系驾校人员!',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
|
|
|
|
|
uni.showToast({title: '请联系驾校人员!', icon: 'none'});
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '请联系驾校人员!',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const postData = {
|
|
|
|
|
...this.process, // 先拷贝 process 原有数据
|
|
|
|
|
remark: this.process.remark,
|
|
|
|
|
userName: this.userInfo.nickname,
|
|
|
|
|
images: this.fileList?.map(item => item.url).join(',') || '',
|
|
|
|
|
}
|
|
|
|
|
// this.process.images = this.fileList?.map(item => item.url).join(',') || '';
|
|
|
|
|
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
|
|
|
|
|
.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '信息填写不完整',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log('postData', postData)
|
|
|
|
|
@ -446,7 +454,10 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}, 1500);
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.data?.message || '保存失败',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -455,18 +466,24 @@ export default {
|
|
|
|
|
...this.process, // 先拷贝 process 原有数据
|
|
|
|
|
tenantId: this.opTenantId,
|
|
|
|
|
fraction: this.process.examScore,
|
|
|
|
|
ifPass: this.process.examStatus,
|
|
|
|
|
ifPass: this.process.examStatus === 1,
|
|
|
|
|
id: this.batchItemId,
|
|
|
|
|
remark: this.process.remark,
|
|
|
|
|
userName: this.userInfo.nickname,
|
|
|
|
|
images: this.fileList?.map(item => item.url).join(',') || '',
|
|
|
|
|
}
|
|
|
|
|
console.log('postData', postData)
|
|
|
|
|
/* this.process.userId = this.userInfo.id
|
|
|
|
|
this.process.tenantId = this.opTenantId
|
|
|
|
|
this.process.fraction = this.process.examScore
|
|
|
|
|
this.process.ifPass = this.process.examStatus
|
|
|
|
|
this.process.images = this.fileList?.map(item => item.url).join(',') || ''; */
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({title: '信息填写不完整', icon: 'none'});
|
|
|
|
|
if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process
|
|
|
|
|
.examStatus === null || !this.process.examTime) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '信息填写不完整',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
request({
|
|
|
|
|
@ -487,7 +504,10 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}, 1500);
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({title: res.data?.message || '保存失败', icon: 'none'});
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.data?.message || '保存失败',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -498,5 +518,4 @@ export default {
|
|
|
|
|
<style lang='scss'>
|
|
|
|
|
@import '../common/common.scss';
|
|
|
|
|
@import './assets/style/index.rpx.scss';
|
|
|
|
|
|
|
|
|
|
</style>
|