wkyy 1 年之前
父節點
當前提交
50bb9c023f

+ 9 - 0
apis/parents/course.js

@@ -1,6 +1,15 @@
 import requestStudent from '@/apis/utils/request.js';
 import Qs from 'qs';
 
+export function mobilePay(data) {
+	var url='/ums/mobilePay';
+	return requestStudent({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
 export function getTeacherCourseList(data) {
 	var url='/mobile/student/getTeacherCourseList';
 	return requestStudent({

+ 24 - 5
pages/parents/course/confirmOrder.vue

@@ -19,7 +19,7 @@
 					</view>
 					<view class="price">
 						<view class="price-left">
-							{{(item.unitPrice*item.courseAmount+item.waterElectricityAmount).toFixed(2)}}元
+							{{item.unitPrice*item.courseAmount+item.waterElectricityAmount}}元
 						</view>
 						<view class="order-amount">
 							<!-- x1 -->
@@ -84,7 +84,7 @@
 				</view>
 				<view class="value">
 					<view class="price">
-						{{payTotalMoney.toFixed(2)}}元
+						{{payTotalMoney}}元
 					</view>
 					<!-- <view class="price-info">
 						报名费{{entryFee.toFixed(2)}} 水电费{{weFee.toFixed(2)}}
@@ -104,7 +104,7 @@
 					合计
 				</view>
 				<view class="value">
-					{{payTotalMoney.toFixed(2)}}元
+					{{payTotalMoney}}元
 				</view>
 			</view>
 		</view>
@@ -145,7 +145,7 @@
 			<view class="money">
 				<view class="title">合计: </view>
 				<view class="value">
-					{{payTotalMoney.toFixed(2)}}元
+					{{payTotalMoney}}元
 				</view>
 			</view>
 			<view class="pay">
@@ -215,7 +215,8 @@
 			topayResult() {
 				this.submitForm.amount = 0.01;
 				if(this.payName == 'weixin') {
-					this.wxpy();
+					// this.wxpy();
+					this.getMobilePay();
 				} else if (this.payName == 'yushanfu') {
 
 				} else {
@@ -225,6 +226,24 @@
 					})
 				}
 			},
+			getMobilePay() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				courseApi.mobilePay({
+					id: this.id
+				}).then((response) => {
+					if (response.result) {
+						window.location.href = response.data;
+					}
+					uni.hideLoading()
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
 			wxpy() {
 				uni.showLoading({
 					title: "加载中",

+ 6 - 4
pages/parents/course/courseDetails.vue

@@ -176,9 +176,11 @@
 						
 						<view class="popup">
 							<view class="class-infos">
-								<view class="picture">
-									<img :src="courseBase.posterUrl!= null ?
-										courseBase.posterUrl : '../../../assets/img/courseD.png'" alt="">
+								<view class="picture" v-if="courseBase.posterUrl != null">
+									<img :src="courseBase.posterUrl" alt="">
+								</view>
+								<view class="picture" v-else>
+									<img src="../../../assets/img/courseD.png" alt="">
 								</view>
 								<view class="infos">
 									<view class="class-name">
@@ -186,7 +188,7 @@
 									</view>
 									<view class="price">
 										{{packageDetail.unitPrice!=null && packageDetail.courseAmount!=null ?
-											(packageDetail.unitPrice*packageDetail.courseAmount+packageDetail.waterElectricityAmount).toFixed(2) : '0.00'}}元
+											(packageDetail.unitPrice*packageDetail.courseAmount+packageDetail.waterElectricityAmount) : '0.00'}}元
 									</view>
 									<!-- <view class="price-detail" v-if="packageDetail.unitPrice!=null && packageDetail.courseAmount!=null">
 										(包含报名费{{(packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2)}}元 水电费{{packageDetail.waterElectricityAmount.toFixed(2)}}元)

+ 3 - 3
pages/parents/course/shoppingCar.vue

@@ -48,7 +48,7 @@
 				</view>
 				<!-- 价格 -->
 				<view class="price">
-					{{(item.coursePackage.unitPrice*item.coursePackage.courseAmount+item.coursePackage.waterElectricityAmount).toFixed(2)}}元
+					{{item.coursePackage.unitPrice*item.coursePackage.courseAmount+item.coursePackage.waterElectricityAmount}}元
 				</view>
 				<!-- <view :class="{priceInfo,editing:edit==true}">
 					包含 报名费{{(item.coursePackage.unitPrice*item.coursePackage.courseAmount).toFixed(2)}}元
@@ -73,7 +73,7 @@
 						总计
 					</view>
 					<view class="price">
-						{{totalMoney.toFixed(2)}}元
+						{{totalMoney}}元
 					</view>
 				</view>
 				<!-- 结算按钮 -->
@@ -104,7 +104,7 @@
 								{{courseBase.courseName}}
 							</view>
 							<view class="price">
-								{{(packageDetail.unitPrice*packageDetail.courseAmount+packageDetail.waterElectricityAmount).toFixed(2)}}元
+								{{Math.round(packageDetail.unitPrice*packageDetail.courseAmount+packageDetail.waterElectricityAmount)}}元
 							</view>
 							<!-- <view class="price-detail" v-if="packageDetail.unitPrice!=null && packageDetail.courseAmount!=null">
 								(包含报名费{{(packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2)}}元

+ 2 - 2
pages/parents/homePage/homePage.vue

@@ -256,8 +256,8 @@
 			this.tomorrow = this.getFormatDate(new Date(date.setDate(date.getDate() + 1)));
 
 			this.getStudentList();
-			this.getFindByCatalogName();
-			this.getReCoursesList();
+			// this.getFindByCatalogName();
+			// this.getReCoursesList();
 			this.getLoadBannerForShow();
 		},
 		onReachBottom() {

+ 24 - 1
pages/teacher/callNames/callNames.vue

@@ -94,7 +94,8 @@
 					<!-- <view class="history" @click="gotoUrl('pages/teacher/callNames/callHistory')">
 						历史记录
 					</view> -->
-					<view class="call-name" @click="gotoUrl('pages/teacher/callNames/classCall?id=' + item.sheetId)">
+					<view class="call-name" @click="gotoUrl('pages/teacher/callNames/classCall?id=' + item.sheetId)"
+						v-if="form.employeeRole == '4'">
 						点名签到
 					</view>
 
@@ -108,6 +109,7 @@
 
 <script>
 	import * as callNamesApi from '@/apis/teacher/callNames.js'
+	import * as loginApi from '@/apis/login.js'
 
 	export default {
 		data() {
@@ -129,12 +131,33 @@
 					timestamp: true
 				},
 				show: false,
+				form: {}
 			}
 		},
 		onReady() {
 			this.getToday();
+			this.getTeacherInfo();
 		},
 		methods: {
+			getTeacherInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				loginApi.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((response) => {
+					uni.hideLoading();
+					if(response.data.employee != null) {
+						this.form = response.data.employee;
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			confirm(params) {
 				this.weekDate = [];
 				let pickerDate = params.year + "-" + params.month + "-" + params.day;

+ 37 - 2
pages/teacher/myCourse/myCourse.vue

@@ -11,13 +11,17 @@
 				<view class="check" @click="beforeWeek">
 					<u-icon name="arrow-left" size="32"></u-icon>前一周
 				</view>
-				<view class="date">
+				<view class="date" @click="show = true">
 					{{date}}
 				</view>
 				<view class="check" @click="afterWeek">
 					后一周<u-icon name="arrow-right" size="32"></u-icon>
 				</view>
 			</view>
+			
+			<u-picker mode="time" v-model="show" :params="params" :defaultTime="defaultTime" @confirm="confirm">
+			</u-picker>
+			
 			<view class="date-item">
 				<view class="item" v-for="(item,index) in weekDate" :key="index"
 					:class="activeClass == index ? 'checked' : ''" @click="activeClassClick(item,index)">
@@ -72,13 +76,44 @@
 				activeClass: 0,
 				weekDate1: '',
 				courseList: [],
-				teacherId: ''
+				teacherId: '',
+				defaultTime: '',
+				params: {
+					year: true,
+					month: true,
+					day: true,
+					hour: false,
+					minute: false,
+					second: false,
+					timestamp: true
+				},
+				show: false,
 			}
 		},
 		onReady() {
 			this.getToday();
 		},
 		methods: {
+			confirm(params) {
+				this.weekDate = [];
+				let pickerDate = params.year + "-" + params.month + "-" + params.day;
+				let year = params.year;
+				let month = parseInt(params.month);
+				let day = parseInt(params.day);
+				let mydate = new Date(year, month - 1, day);
+				let weekday = mydate.getDay();
+				this.weekDate1 = new Date(year, month - 1, day + 1 - weekday);
+				
+				this.getWeekDate();
+				
+				for (var m = 0; m < this.weekDate.length; m++) {
+					if (pickerDate == this.weekDate[m].day) {
+						this.activeClass = m;
+						this.date = this.weekDate[m].day;
+					}
+				}
+				this.getCourseList();
+			},
 			getCourseList() {
 				this.courseList = [];
 				uni.showLoading({