Commit 32bf1626 authored by 郭晓清's avatar 郭晓清

Merge branch 'master' of https://git.banshouhui.com/lijundan/self-support

# Conflicts:
#	src/pages/order/detail.vue
parents a5847e36 b886e773
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
if (userInfo && userInfo.token) { if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息 // 如果已经登录则直接获取相关信息
this.$u.vuex('vuex_token',userInfo.token); this.$u.vuex('vuex_token',userInfo.token);
this.$u.vuex('vuex_token',"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5"); // this.$u.vuex('vuex_token',"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5");
this.$u.vuex('vuex_user', userInfo); this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid); this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else { } else {
......
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
const collegeApiUrl = globalUrl.ucenterUrl.xueUrl
const testApiUrl = globalUrl.systemUrl.apiUrl
let assessmentApiFun = function(vm){
//申请考试题目//
let ExaminationQuestions = async (id) =>await vm.$u.post(testApiUrl+'/wxh-worker-rest/rest/exam/serviceRule/next/' + vm.vuex_token + '?userExamId='+id );
let nextClick = async (id,questionId,userAnswerIds) =>await vm.$u.post(testApiUrl+'/wxh-worker-rest/rest/exam/serviceRule/next/' + vm.vuex_token + '?userExamId='+id + '&questionId=' + questionId+'&userAnswerIds=' + userAnswerIds);
const assessmentApi = {
ExaminationQuestions,
nextClick
}
return assessmentApi
}
module.exports = {
assessmentApiFun
}
...@@ -9,11 +9,13 @@ import { ...@@ -9,11 +9,13 @@ import {
} from '@/common/api/settled.js'; } from '@/common/api/settled.js';
import {learnApiFun} from "@/common/api/learn.js"; import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js"; import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js"
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm) let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm) let learnApi=learnApiFun(vm)
let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm) let orderApi=orderApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...@@ -21,6 +23,7 @@ let apiFun = function(vm) { ...@@ -21,6 +23,7 @@ let apiFun = function(vm) {
...cloudApi, ...cloudApi,
...learnApi, ...learnApi,
...orderApi, ...orderApi,
...assessmentApi
} }
return apiUrl return apiUrl
} }
......
...@@ -54,15 +54,16 @@ ...@@ -54,15 +54,16 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.txt{ .txt{
color:#666; color:#333;
padding:10rpx 30rpx; padding:10rpx 30rpx;
margin: 5rpx; margin: 10rpx;
background: #F4F5F7; background: #F4F5F7;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
line-height: 50rpx; line-height: 50rpx;
max-width: 48%; max-width: 46%;
align-items: center;
&.active{ &.active{
background-color: #2272FF; background-color: #2272FF;
color:#fff; color:#fff;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<view> <view>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle" <u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false" :border="border"/> :custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC"/>
</view> </view>
</template> </template>
...@@ -27,9 +27,12 @@ ...@@ -27,9 +27,12 @@
}, },
computed: { computed: {
type() { type() {
if (this.item && this.item.fieldsType == 'password' || this.item.fieldsType == 'textarea') { let ty = this.item.fieldsType.toLocaleLowerCase()
if (this.item && ty == 'password') {
return this.item.fieldsType return this.item.fieldsType
} else { }else if (this.item && ty == 'text') {
return 'textarea'
}else {
return 'text' return 'text'
} }
}, },
...@@ -54,7 +57,7 @@ ...@@ -54,7 +57,7 @@
return this.type == 'textarea' return this.type == 'textarea'
}, },
backgroundColor() { backgroundColor() {
return this.textarea ? '#FFFFFF' : '#F4F5F7' return this.textarea ? 'transparent' : '#F4F5F7'
} }
}, },
watch: {}, watch: {},
......
...@@ -36,16 +36,16 @@ ...@@ -36,16 +36,16 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.txt{ .txt{
color:#666; color:#333;
padding:10rpx 30rpx; padding:10rpx 30rpx;
margin: 5rpx; margin: 10rpx;
background: #F4F5F7; background: #F4F5F7;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
line-height: 50rpx; line-height: 50rpx;
text-align: center; max-width: 46%;
max-width: 48%; align-items: center;
&.active{ &.active{
background-color: #2272FF; background-color: #2272FF;
color:#fff; color:#fff;
......
<!-- ******************* 单级/多级 选择 ******************* --> <!-- ******************* 单级/多级 选择 ******************* -->
<template> <template>
<view class="picker-box"> <view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker"> <view class="u-flex u-row-between text-view" @click="openPicker">
<view class="txt u-flex-1">{{text||''}}</view> <view class="txt u-flex-1 text-title">{{text||''}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon class="input-icon" color="#2272FF" :name="showPicker ? 'arrow-up' : 'arrow-down'"></u-icon>
</view> </view>
<u-picker v-model="showPicker" range-key="label" @columnchange="columnchange" :mode="isNotMulti?'selector':'multiSelector'" @confirm="pickerConfirm" :range="settings"></u-picker> <u-picker v-model="showPicker" range-key="label" @columnchange="columnchange" :mode="isNotMulti?'selector':'multiSelector'" @confirm="pickerConfirm" :range="settings"></u-picker>
<!-- :default-selector='[0, 1]' --> <!-- :default-selector='[0, 1]' -->
...@@ -154,5 +154,15 @@ ...@@ -154,5 +154,15 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.text-view {
background-color: #F4F5F7;
border-radius: 12rpx;
padding-left: 20rpx;
padding-right: 20rpx;
height: 76rpx;
.text-title {
font-size: 26rpx;
color: #333333;
}
}
</style> </style>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<view> <view>
<view v-if="showCountTime" class="bottom-left-view"> <view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view> <view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="44" show-days <u-count-down :timestamp="timestamp" font-size="40" show-days separator="zh"
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" ref="order-count-down"></u-count-down> :color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange"separator-color="#666666" ref="order-count-down"></u-count-down>
</view> </view>
<view v-else-if="showTime"> <view v-else-if="showTime">
<text>{{timeTitle}}</text> <text>{{timeTitle}}</text>
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
} }
this.timeout = this.orderData.currentOverTime < new Date().getTime() this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000) this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
}, },
methods: { methods: {
handleClick() { handleClick() {
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
color: #FFFFFF; color: #FFFFFF;
font-size: 26rpx; font-size: 26rpx;
background-color: #FF930D; background-color: #FF930D;
margin-right: 20rpx; margin-right: 16rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
......
...@@ -33,18 +33,14 @@ ...@@ -33,18 +33,14 @@
<view v-show="standardShow" class="page-mask" :z-index="10000"> <view v-show="standardShow" class="page-mask" :z-index="10000">
<photo-standard :currentItem="currentItem" /> <photo-standard :currentItem="currentItem" />
<view class="btn-close"> <view class="btn-close">
<image @click="closeShadow" class="icon icon-close" mode="aspectFit" src="/static/photo/icon-close.png"> <image @click="closeShadow" class="icon icon-close" mode="aspectFit" src="/static/photo/icon-close.png"></image>
</image>
</view> </view>
</view> </view>
</view> </view>
<photo-preview v-if="showType === 2" @changeType="changeType" @finish="finish" /> <photo-preview v-if="showType === 2" @changeType="changeType" @finish="finish" />
<photo-setting v-if="showType === 3" @changeType="changeType" /> <photo-setting v-if="showType === 3" @changeType="changeType" />
</view> </view>
</template> </template>
// 加载该组件需要在当前页面隐藏顶部导航栏,然后加上自定义导航栏,通过状态切换显示隐藏
<!-- <u-navbar v-if="!takeStatus" :is-back="false" :title-size="26" title-color="#000" title="我的"></u-navbar> -->
<script> <script>
let r = require("@/libs/bmap-wx.min.js"); let r = require("@/libs/bmap-wx.min.js");
...@@ -105,7 +101,7 @@ ...@@ -105,7 +101,7 @@
ratio: 0, ratio: 0,
cameraChange: false, cameraChange: false,
waterSetting: null, waterSetting: null,
shadowInitShow: true, // 第一次进入页面需显示弹窗 shadowInitShow: false, // 第一次进入页面需显示弹窗
} }
}, },
created(e) { created(e) {
...@@ -120,7 +116,10 @@ ...@@ -120,7 +116,10 @@
this.initData() this.initData()
photo.currentItem = this.currentItem photo.currentItem = this.currentItem
if (this.currentItem.images.length > 0) this.standardShow = true if (this.currentItem.images.length > 0) {
this.shadowInitShow = true
this.standardShow = true
}
}, },
computed: { computed: {
titleTxt() { titleTxt() {
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
"list": [ "list": [
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tab/shouye-1@3x.png", "iconPath": "static/tab/shouye-0@3x.png",
"selectedIconPath": "static/tab/shouye-1@3x.png", "selectedIconPath": "static/tab/shouye-1@3x.png",
"text": "首页" "text": "首页"
}, },
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
{ {
"pagePath": "pages/mine/index", "pagePath": "pages/mine/index",
"iconPath": "static/tab/wode-0@3x.png", "iconPath": "static/tab/wode-0@3x.png",
"selectedIconPath": "static/tab/wode-0@3x.png", "selectedIconPath": "static/tab/wode-1@3x.png",
"text": "我的" "text": "我的"
} }
] ]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<view class=""> <view class="">
<view class="" style="padding-left: 94rpx; margin: 36rpx 0"> <view class="" style="padding-left: 94rpx; margin: 36rpx 0">
<text class="dx">多选</text <text class="dx">单选</text
><text class="all">{{ ExaminationQuestions.progress }}</text> ><text class="all">{{ ExaminationQuestions.progress }}</text>
</view> </view>
<view class="" style="text-align: center"> <view class="" style="text-align: center">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
</view> </view>
</view> </view>
<button class="btn" @click="nextClick()">下一题</button> <button class="btn" @click="getNextClick()">下一题</button>
</view> </view>
</view> </view>
</template> </template>
...@@ -32,36 +32,34 @@ export default { ...@@ -32,36 +32,34 @@ export default {
list: [ list: [
{ {
isRight: false, isRight: false,
title: "A", content: "",
}, },
{ {
isRight: false, isRight: false,
title: "B", content: "",
}, },
{ {
isRight: false, isRight: false,
title: "C", content: "",
}, },
{ {
isRight: false, isRight: false,
title: "D", content: "",
},
{
isRight: false,
title: "E",
}, },
], ],
isSelect: false, isSelect: false,
selectId: [], selectId: [],
userExamId: null, userExamId: null,
ExaminationQuestions: null, ExaminationQuestions: {
progress: "",
question: {
content: "",
},
},
isQuestion: true, isQuestion: true,
}; };
}, },
onLoad(num) { onLoad(num) {
console.log("标识符4", this.userExamId);
console.log("标识符3" + num);
this.userExamId = num.userExamId; this.userExamId = num.userExamId;
this.getExaminationQuestions(); this.getExaminationQuestions();
}, },
...@@ -103,31 +101,33 @@ export default { ...@@ -103,31 +101,33 @@ export default {
} }
}, },
//申请考试题目 //申请考试题目
getExaminationQuestions: function () { getExaminationQuestions() {
uni.request({ this.$u.api.ExaminationQuestions(this.userExamId).then((res) => {
url: let that = this;
"http://192.168.1.22" + if (res.code == 200) {
"/wxh-worker-rest/rest/exam" + console.log("这是个标识符kao", this.ExaminationQuestions);
"/serviceRule/next/" +
this.vuex_token + if (res.data) {
"?userExamId=" + that.ExaminationQuestions = res.data;
this.userExamId, console.log(".......", this.ExaminationQuestions);
method: "POST", that.list = res.data.answerList;
header: { console.log("1111111", that);
"Content-Type": "application/x-www-form-urlencoded", console.log(
}, "这是个标识符kao",
success: (res) => { this.ExaminationQuestions
if (res.data.code == 200) { );
this.ExaminationQuestions = res.data.data;
this.list = res.data.data.answerList;
console.log(this.ExaminationQuestions);
} }
}, } else {
//接口请求失败
uni.showToast({
title: res.message,
icon: "none",
});
}
}); });
console.log("answer的userExamId是", this.userExamId);
}, },
//下一题 //下一题
nextClick: function () { getNextClick: function () {
//判断 //判断
if (this.isQuestion == "第20题/共20题") { if (this.isQuestion == "第20题/共20题") {
this.isQuestion = ""; this.isQuestion = "";
...@@ -175,6 +175,24 @@ export default { ...@@ -175,6 +175,24 @@ export default {
console.log("zzy", this.selectId); console.log("zzy", this.selectId);
}, },
}); });
this.$u.api
.nextClick(
this.userExamId,
this.ExaminationQuestions.question.id,
this.selectId
)
.then((res) => {
console.log("sssss", res);
if (res.data.code == 200) {
this.ExaminationQuestions = res.data.data;
this.list = res.data.data.answerList;
this.isQuestion = res.data.data.progress;
console.log("uuuuuuuu", this.ExaminationQuestions);
}
this.selectId = [];
console.log("zzy", this.selectId);
});
}, },
}, },
}; };
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<view class="test"> <view class="test">
<view class="text"> <view class="text">
<text class="left">考试科目:</text <text class="left">考试科目:</text
><text style="color: #007aff">{{ exam.examName }}</text> ><text style="color: #007aff">服务规范</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">合格条件:</text <text class="left">合格条件:</text
><text>{{ exam.ruleDisc }}</text> ><text>随机20题,答对20题</text>
</view> </view>
<view class="text"> <view class="text">
<text class="left">考试时间:</text><text>30分钟</text> <text class="left">考试时间:</text><text>30分钟</text>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom"> <scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="currency-class" :style="{'background-image':'url(/static/photo/jianbian@3x.png)'}"> <view class="currency-class" :style="{'background-image':'url(/static/photo/jianbian@3x.png)'}">
<view class="class1" @click=ccc(courselist[0].id)> <view class="class1" @click="goToPrint">
<image class="img" :src="rule.pic" mode=""></image> <image class="img" :src="rule.pic" mode=""></image>
<view class="right u-margin-left-30 u-padding-top-10 u-padding-bottom-14 width-360"> <view class="right u-margin-left-30 u-padding-top-10 u-padding-bottom-14 width-360">
<view class="u-font-32 font-bold"> <view class="u-font-32 font-bold">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<view class="top"> <view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view> <view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="class1" @click=ccc(courselist[0].id)> <view class="class1" @click=ccc(courselist[0].sectionId)>
<image class="img" :src="courselist[0].pic" mode=""></image> <image class="img" :src="courselist[0].pic" mode=""></image>
<view class="right"> <view class="right">
<view class="u-font-32 font-bold"> <view class="u-font-32 font-bold">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="class1 u-margin-top-40" @click=ccc(courselist[1].id)> <view class="class1 u-margin-top-40" @click=ccc(courselist[1].sectionId)>
<image class="img" :src="courselist[1].pic" mode=""></image> <image class="img" :src="courselist[1].pic" mode=""></image>
<view class="right"> <view class="right">
<view class="u-font-32 font-bold"> <view class="u-font-32 font-bold">
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</view> </view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view> <view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="class1" @click=ccc(courselist[2].id)> <view class="class1" @click=ccc(courselist[2].sectionId)>
<image class="img" :src="courselist[2].pic" mode=""></image> <image class="img" :src="courselist[2].pic" mode=""></image>
<view class="right"> <view class="right">
<view class="u-font-32 font-bold"> <view class="u-font-32 font-bold">
...@@ -221,7 +221,8 @@ ...@@ -221,7 +221,8 @@
percent: 0, percent: 0,
status: '', status: '',
pic: process.uniEnv.qn_base_url + "guifan1@3x.png", pic: process.uniEnv.qn_base_url + "guifan1@3x.png",
id: 173 id: 173,
sectionId: ''
}, },
{ {
title: '接单操作', title: '接单操作',
...@@ -229,7 +230,8 @@ ...@@ -229,7 +230,8 @@
percent: 0, percent: 0,
status: '', status: '',
pic: process.uniEnv.qn_base_url + "guifan2@3x.png", pic: process.uniEnv.qn_base_url + "guifan2@3x.png",
id: 173 id: 173,
sectionId: ''
}, },
{ {
title: '从0-1学习充电桩安装服务', title: '从0-1学习充电桩安装服务',
...@@ -237,7 +239,8 @@ ...@@ -237,7 +239,8 @@
percent: 0, percent: 0,
status: '', status: '',
pic: process.uniEnv.qn_base_url + "kecehng1@3x.png", pic: process.uniEnv.qn_base_url + "kecehng1@3x.png",
id: 173 id: 173,
sectionId: ''
} }
], ],
examList: [{ examList: [{
...@@ -356,6 +359,7 @@ ...@@ -356,6 +359,7 @@
res.data.learnedInfo.learnPercent *= 100; res.data.learnedInfo.learnPercent *= 100;
this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent); this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent);
this.courselist[i].percent = res.data.learnedInfo.learnPercent; this.courselist[i].percent = res.data.learnedInfo.learnPercent;
this.courselist[i].sectionId = res.data.learnedInfo.nextLearnedSectionId;
} }
} }
}) })
...@@ -418,7 +422,7 @@ ...@@ -418,7 +422,7 @@
//跳转到课程介绍 //跳转到课程介绍
ccc(id) { ccc(id) {
uni.navigateTo({ uni.navigateTo({
url: "./curriculum?course_id=" + id, url: "./section?section_id=" + 288,
}); });
}, },
//跳转到 //跳转到
...@@ -482,6 +486,7 @@ ...@@ -482,6 +486,7 @@
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.examList[i].examId = res.data.id; this.examList[i].examId = res.data.id;
this.examList[i].examStatus = res.data.examStatus;
let examResult = res.data.examLevelResult; let examResult = res.data.examLevelResult;
this.examList[i].status = examResult != '' ? examResult : '未通过'; this.examList[i].status = examResult != '' ? examResult : '未通过';
// examStatus 用户考试状态 0考试中 1考试完成 2未参与 // examStatus 用户考试状态 0考试中 1考试完成 2未参与
......
This diff is collapsed.
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<view class="com-content"> <view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check> <complete-check :show="completeCheckStatus" :list-data="completeCheckResult" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<view class="u-wrap" v-if="!takeStatus"> <view class="u-wrap" v-if="!takeStatus">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-tabs-swiper ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="120"></u-tabs-swiper> <u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper>
<view class="u-menu-wrap"> <view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1"> <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1">
<view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item" <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])"> <template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
<view class="title">{{groupItem.name}}</view> <view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex"
label-position="top" :prop="item.fieldsName" :border-bottom="false"> label-position="top" :prop="item.fieldsName" :border-bottom="false">
<view class="label" v-if="typeToComponentType(item.fieldsType)!=='location'"> <view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</u-form> </u-form>
</scroll-view> </scroll-view>
</view> </view>
<view class="btn-wrap flex-xc btn-bottom"> <view :class="['btn-wrap', 'flex-xc', {'btn-bottom': tabIndex > 0}]">
<u-button class="btn-submit" @click="saveComplete" <u-button class="btn-submit" @click="saveComplete"
type="primary" shape="circle" :custom-style="customStyle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :custom-style="customStyle" :hover-class="submitStatus ? '' : 'none'">
暂存 暂存
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => { self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
self.list = res.data.config self.list = res.data.config
self.form = res.data.value self.form = res.data.value || {}
} else { } else {
console.log(res.message, "获取订单完工项目失败!"); console.log(res.message, "获取订单完工项目失败!");
} }
...@@ -400,6 +400,7 @@ ...@@ -400,6 +400,7 @@
}else{ }else{
this.$set(this.form,innerItem.fieldsName,data.value) this.$set(this.form,innerItem.fieldsName,data.value)
} }
console.log(this.form)
}, },
nextStep() { nextStep() {
if (this.tabIndex < this.list.length - 1) { if (this.tabIndex < this.list.length - 1) {
...@@ -416,11 +417,14 @@ ...@@ -416,11 +417,14 @@
type = type.toLocaleLowerCase() type = type.toLocaleLowerCase()
switch (type) { switch (type) {
case 'text': case 'text':
formType = 'input'
break
case 'password': case 'password':
case 'textarea': case 'textarea':
case 'number': case 'number':
case 'decimal': case 'decimal':
case 'double': case 'double':
case 'integer':
formType = 'input' formType = 'input'
break break
case 'multiinput': case 'multiinput':
...@@ -595,9 +599,13 @@ ...@@ -595,9 +599,13 @@
.label { .label {
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
padding-bottom: 20rpx;
} }
.label-bold {
font-size: 32rpx;
font-weight: bold;
}
.required { .required {
padding-right: 10rpx; padding-right: 10rpx;
font-size: 28rpx; font-size: 28rpx;
...@@ -632,11 +640,18 @@ ...@@ -632,11 +640,18 @@
padding: 18rpx 30rpx; padding: 18rpx 30rpx;
} }
.order-tabs {
margin-top: 20rpx;
margin-bottom: 32rpx;
}
.u-menu-wrap { .u-menu-wrap {
flex: 1; flex: 1;
height: 100%;
display: flex; display: flex;
overflow: hidden; overflow: hidden;
border-radius: 12rpx 12rpx 0 0; border-radius: 12rpx 12rpx 0 0;
} }
.u-search-inner { .u-search-inner {
...@@ -692,7 +707,8 @@ ...@@ -692,7 +707,8 @@
} }
.right-box { .right-box {
background-color: rgb(250, 250, 250); // background-color: rgb(250, 250, 250);
background-color: #FFFFFF;
} }
.page-view { .page-view {
...@@ -700,7 +716,7 @@ ...@@ -700,7 +716,7 @@
} }
.class-item:last-child { .class-item:last-child {
min-height: 100vh; max-height: 100vh;
} }
.item-title { .item-title {
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
<text>x{{ order.orderProductCount }}</text> <text>x{{ order.orderProductCount }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>充电桩信息:</text>
<text class="cell-title">充电桩信息:</text> <text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
...@@ -118,8 +117,8 @@ ...@@ -118,8 +117,8 @@
</view> </view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime > 0" class="time-view"> <view v-if="order.currentOverTime" class="time-view">
<text>{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text> <text>{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
<u-count-down <u-count-down
:timestamp="timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
font-size="20" font-size="20"
...@@ -130,6 +129,10 @@ ...@@ -130,6 +129,10 @@
:ref="'uCountDown'" :ref="'uCountDown'"
show-days show-days
height="20" height="20"
:show-days="threeDays()"
:show-minutes="!threeDays()"
:show-seconds="!threeDays()"
:separator="threeDays() ? 'zh' : 'colon'"
@change="timeOutChange(order.currentOverTime)" > @change="timeOutChange(order.currentOverTime)" >
</u-count-down> </u-count-down>
</view> </view>
...@@ -492,12 +495,12 @@ ...@@ -492,12 +495,12 @@
} }
}else if (this.submitType === 'maintainWorkerCheckin') { // 签到 }else if (this.submitType === 'maintainWorkerCheckin') { // 签到
// 检查见到距离是否符合 // 检查见到距离是否符合
// if(!this.isErrorSign){ if(!this.isErrorSign){
// if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){ if(this.getDistance(this.order.contactAddressLatitud,this.order.contactAddressLongitud)>3){
// this.commonToast('签到失败,请点击异常签到处理或联系客服','error') this.commonToast('签到失败,请点击异常签到处理或联系客服','error')
// return return
// } }
// } }
data.exception = this.isErrorSign data.exception = this.isErrorSign
data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:'' data.coordinate = this.dataValue ? this.dataValue[0]+','+this.dataValue[1]:''
data.url = this.errorSignUrl?this.errorSignUrl:'' data.url = this.errorSignUrl?this.errorSignUrl:''
...@@ -627,6 +630,9 @@ ...@@ -627,6 +630,9 @@
uni.navigateTo({ uni.navigateTo({
url: 'pages/learn/index' url: 'pages/learn/index'
}) })
},
threeDays() {
return this.timestampDiff(this.order.currentOverTime) > 3600 * 24 * 3
} }
} }
}; };
...@@ -905,6 +911,8 @@ ...@@ -905,6 +911,8 @@
display: flex; display: flex;
font-size: 20rpx; font-size: 20rpx;
color: #FFFFFF; color: #FFFFFF;
align-items: center;
justify-content: space-around;
} }
} }
......
...@@ -94,10 +94,11 @@ ...@@ -94,10 +94,11 @@
this._freshing = false; this._freshing = false;
this.getLocation(); this.getLocation();
// this.getOrderCount(); // this.getOrderCount();
this.getOrderList(0); // this.getOrderList(0);
}, },
onShow() { onShow() {
this.getOrderCount() this.getOrderCount()
this.getOrderList(this.currentIndex);
}, },
computed: { computed: {
subList() { subList() {
......
...@@ -62,17 +62,28 @@ ...@@ -62,17 +62,28 @@
PopView PopView
}, },
onLoad(e) { onLoad(e) {
this.orderId = 111
if(e && e.orderId) { if(e && e.orderId) {
this.orderId = e.orderId this.orderId = e.orderId
} }
this.getRejectCount()
}, },
methods: { methods: {
changeReason(reason) { changeReason(reason) {
this.formData.rejectReason = reason this.formData.rejectReason = reason
}, },
getRejectCount() {
// 获取拒单次数
this.count = 3
},
handleClickSubmit() { handleClickSubmit() {
if(!this.orderId) {
uni.showToast({
icon: 'none',
title: '订单ID不能为空',
})
return
}
if (this.count > 0) { if (this.count > 0) {
this.visibale = true this.visibale = true
} else { } else {
......
src/static/photo/arrow.png

3.61 KB | W: | H:

src/static/photo/arrow.png

666 Bytes | W: | H:

src/static/photo/arrow.png
src/static/photo/arrow.png
src/static/photo/arrow.png
src/static/photo/arrow.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/continue.png

5.61 KB | W: | H:

src/static/photo/continue.png

1.99 KB | W: | H:

src/static/photo/continue.png
src/static/photo/continue.png
src/static/photo/continue.png
src/static/photo/continue.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/finish.png

5.31 KB | W: | H:

src/static/photo/finish.png

1.81 KB | W: | H:

src/static/photo/finish.png
src/static/photo/finish.png
src/static/photo/finish.png
src/static/photo/finish.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-back.png

2.46 KB | W: | H:

src/static/photo/icon-back.png

972 Bytes | W: | H:

src/static/photo/icon-back.png
src/static/photo/icon-back.png
src/static/photo/icon-back.png
src/static/photo/icon-back.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-close.png

2.54 KB | W: | H:

src/static/photo/icon-close.png

974 Bytes | W: | H:

src/static/photo/icon-close.png
src/static/photo/icon-close.png
src/static/photo/icon-close.png
src/static/photo/icon-close.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-light-auto.png

2.03 KB | W: | H:

src/static/photo/icon-light-auto.png

915 Bytes | W: | H:

src/static/photo/icon-light-auto.png
src/static/photo/icon-light-auto.png
src/static/photo/icon-light-auto.png
src/static/photo/icon-light-auto.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-light-off.png

2.46 KB | W: | H:

src/static/photo/icon-light-off.png

1.06 KB | W: | H:

src/static/photo/icon-light-off.png
src/static/photo/icon-light-off.png
src/static/photo/icon-light-off.png
src/static/photo/icon-light-off.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-light-on.png

1.42 KB | W: | H:

src/static/photo/icon-light-on.png

686 Bytes | W: | H:

src/static/photo/icon-light-on.png
src/static/photo/icon-light-on.png
src/static/photo/icon-light-on.png
src/static/photo/icon-light-on.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-light.png

1.58 KB | W: | H:

src/static/photo/icon-light.png

830 Bytes | W: | H:

src/static/photo/icon-light.png
src/static/photo/icon-light.png
src/static/photo/icon-light.png
src/static/photo/icon-light.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-setting.png

1.61 KB | W: | H:

src/static/photo/icon-setting.png

795 Bytes | W: | H:

src/static/photo/icon-setting.png
src/static/photo/icon-setting.png
src/static/photo/icon-setting.png
src/static/photo/icon-setting.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-standard.png

13.8 KB | W: | H:

src/static/photo/icon-standard.png

6.17 KB | W: | H:

src/static/photo/icon-standard.png
src/static/photo/icon-standard.png
src/static/photo/icon-standard.png
src/static/photo/icon-standard.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-switch.png

1.46 KB | W: | H:

src/static/photo/icon-switch.png

752 Bytes | W: | H:

src/static/photo/icon-switch.png
src/static/photo/icon-switch.png
src/static/photo/icon-switch.png
src/static/photo/icon-switch.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/icon-take.png

6.18 KB | W: | H:

src/static/photo/icon-take.png

1.59 KB | W: | H:

src/static/photo/icon-take.png
src/static/photo/icon-take.png
src/static/photo/icon-take.png
src/static/photo/icon-take.png
  • 2-up
  • Swipe
  • Onion skin
src/static/photo/shadow-bg.png

13 KB | W: | H:

src/static/photo/shadow-bg.png

2.2 KB | W: | H:

src/static/photo/shadow-bg.png
src/static/photo/shadow-bg.png
src/static/photo/shadow-bg.png
src/static/photo/shadow-bg.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/dingdan-0@3x.png

2.21 KB | W: | H:

src/static/tab/dingdan-0@3x.png

3.2 KB | W: | H:

src/static/tab/dingdan-0@3x.png
src/static/tab/dingdan-0@3x.png
src/static/tab/dingdan-0@3x.png
src/static/tab/dingdan-0@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/dingdan-1@3x.png

1.46 KB | W: | H:

src/static/tab/dingdan-1@3x.png

2.53 KB | W: | H:

src/static/tab/dingdan-1@3x.png
src/static/tab/dingdan-1@3x.png
src/static/tab/dingdan-1@3x.png
src/static/tab/dingdan-1@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/shouye-1@3x.png

1.77 KB | W: | H:

src/static/tab/shouye-1@3x.png

2.77 KB | W: | H:

src/static/tab/shouye-1@3x.png
src/static/tab/shouye-1@3x.png
src/static/tab/shouye-1@3x.png
src/static/tab/shouye-1@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/wode-0@3x.png

4.17 KB | W: | H:

src/static/tab/wode-0@3x.png

4.89 KB | W: | H:

src/static/tab/wode-0@3x.png
src/static/tab/wode-0@3x.png
src/static/tab/wode-0@3x.png
src/static/tab/wode-0@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/xuexi-0@3x.png

3.75 KB | W: | H:

src/static/tab/xuexi-0@3x.png

3.57 KB | W: | H:

src/static/tab/xuexi-0@3x.png
src/static/tab/xuexi-0@3x.png
src/static/tab/xuexi-0@3x.png
src/static/tab/xuexi-0@3x.png
  • 2-up
  • Swipe
  • Onion skin
src/static/tab/xuexi-1@3x.png

3.22 KB | W: | H:

src/static/tab/xuexi-1@3x.png

2.99 KB | W: | H:

src/static/tab/xuexi-1@3x.png
src/static/tab/xuexi-1@3x.png
src/static/tab/xuexi-1@3x.png
src/static/tab/xuexi-1@3x.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment