Browse Source

Merge branch 'master' of ssh://gitlab.frkj.cc:222/php/ZhiHuiJiaoWu_UniApp

master
王泽彦 10 months ago
parent
commit
d920b91a7a
  1. 99
      api/apiRoute.js
  2. 11
      pages.json
  3. 2
      pages/coach/home/index.vue
  4. 36
      pages/coach/job/add.vue
  5. 45
      pages/coach/my/index.vue
  6. 75
      pages/coach/my/info.vue
  7. 9
      pages/coach/my/teaching_management_info.vue
  8. 158
      pages/coach/my/update_pass.vue
  9. 6
      pages/coach/student/info.vue
  10. 144
      pages/coach/student/physical_examination.vue
  11. 547
      pages/common/contract_list.vue
  12. 64
      pages/common/my_attendance.vue
  13. 35
      pages/market/clue/clue_info.vue
  14. 163
      pages/market/clue/index.vue
  15. 767
      pages/market/clue/order_list.vue
  16. 17
      pages/student/my/my.vue

99
api/apiRoute.js

@ -66,6 +66,20 @@ export default {
return res; return res;
}) })
}, },
//公共端-获取全部课程列表
common_getCourseAll(data = {}) {
let url = '/common/getCourseAll'
return http.get(url, data).then(res => {
return res;
})
},
//公共端-获取全部班级列表
common_getClassAll(data = {}) {
let url = '/common/getClassAll'
return http.get(url, data).then(res => {
return res;
})
},
//公共端-教师/销售端验证旧密码是否正确 //公共端-教师/销售端验证旧密码是否正确
common_personnelCheckOldPwd(data = {}) { common_personnelCheckOldPwd(data = {}) {
let url = '/personnel/checkOldPwd' let url = '/personnel/checkOldPwd'
@ -143,6 +157,45 @@ export default {
//↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓ //↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//获取我的页面统计个数
getStatisticsInfo(data = {}) {
let url = '/class/Statistics/info'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业
jlPublishJob(data = {}) {
let url = '/class/jlPublishJob/add'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-学员列表
jlGetStudentList(data = {}) {
let url = '/class/jlGetStudentList/list'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-获取课程列表
jlGetCoursesList(data = {}) {
let url = '/class/jlGetCoursesList/list'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-获取班级列表
jlGetClassesList(data = {}) {
let url = '/class/jlGetClasses/list'
return http.get(url, data).then(res => {
return res;
})
},
//体测报告-详情 //体测报告-详情
physicalTestInfo(data = {}) { physicalTestInfo(data = {}) {
let url = '/class/physicalTest/info' let url = '/class/physicalTest/info'
@ -380,6 +433,30 @@ export default {
}) })
}, },
//员工端(销售)-订单管理-列表
xs_orderTableList(data = {}) {
let url = '/orderTable'
return http.get(url, data).then(res => {
return res;
})
},
//员工端(销售)-订单管理-详情
xs_orderTableInfo(data = {}) {
let url = '/orderTable/info'
return http.get(url, data).then(res => {
return res;
})
},
//员工端(销售)-订单管理-添加
xs_orderTableAdd(data = {}) {
let url = '/orderTable/add'
return http.post(url, data).then(res => {
return res;
})
},
@ -580,6 +657,28 @@ export default {
}) })
}, },
//学生端-订单管理-列表
xy_orderTableList(data = {}) {
let url = '/xy/orderTable'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-订单管理-详情
xy_orderTableInfo(data = {}) {
let url = '/xy/orderTable/info'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-订单管理-添加
xy_orderTableAdd(data = {}) {
let url = '/xy/orderTable/add'
return http.post(url, data).then(res => {
return res;
})
},

11
pages.json

@ -207,7 +207,7 @@
{ {
"path" : "pages/common/contract_list", "path" : "pages/common/contract_list",
"style": { "style": {
"navigationBarTitleText": "合同列表", "navigationBarTitleText": "订单列表",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#292929", "navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
@ -483,6 +483,15 @@
"navigationBarBackgroundColor": "#29d3b4", "navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},
{
"path": "pages/market/clue/order_list",
"style": {
"navigationBarTitleText": "订单列表",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black"
}
}, },
{ {
"path": "pages/market/clue/index", "path": "pages/market/clue/index",

2
pages/coach/home/index.vue

@ -4,7 +4,7 @@
<view class="navbar_section"> <view class="navbar_section">
<view class="left"></view> <view class="left"></view>
<view class="title">待办</view> <view class="title">待办</view>
<view class="right" @click="openObjAddView()">发布作业</view> <view class="right" @click="openObjAddView()" style="padding: 178rpx 0 20rpx;">发布作业</view>
</view> </view>
<view class="main_section"> <view class="main_section">

36
pages/coach/job/add.vue

@ -84,7 +84,7 @@
</view> </view>
<view> <view>
<fui-textarea required flexStart label="作业" placeholder="请输入内容" v-model="formData.content_text"></fui-textarea> <fui-textarea required flexStart label="作业" placeholder="请输入内容" v-model="formData.description"></fui-textarea>
</view> </view>
<view class="submet_btn" @click="submetForm">提交</view> <view class="submet_btn" @click="submetForm">提交</view>
@ -101,7 +101,7 @@
<script> <script>
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
import apiRoute from '@/api/apiRoute.js';
// //
const rules = [ const rules = [
// { // {
@ -115,7 +115,7 @@ const rules = [
msg: ["请选择课程"] msg: ["请选择课程"]
}, },
{ {
name: "content_text", name: "description",
rule: ["required"], rule: ["required"],
msg: ["请输入作业内容"] msg: ["请输入作业内容"]
}, },
@ -156,12 +156,12 @@ export default {
course_id_name: '',//id() course_id_name: '',//id()
content_type: '1',//()|1,2 content_type: '1',//()|1,2
content_text: '',// description: '',//
classes_id: '',//id() class_id: '',//id()
classes_id_name: '',//id() classes_id_name: '',//id()
students_ids: '',//id student_id: '',//id
students_ids_name:'',//id() students_ids_name:'',//id()
} }
} }
@ -185,7 +185,7 @@ export default {
// //
async getClassesList(){ async getClassesList(){
let res = await memberApi.jlGetClassesList({}) let res = await apiRoute.jlGetClassesList({})
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -196,14 +196,14 @@ export default {
this.options_class_arr = [] this.options_class_arr = []
res.data.forEach((v,k)=>{ res.data.forEach((v,k)=>{
this.options_class_arr.push({ this.options_class_arr.push({
text: v.name, text: v.class_name,
value: v.id, value: v.id,
}) })
}) })
}, },
// //
async getCoursesList(){ async getCoursesList(){
let res = await memberApi.jlGetCoursesList({}) let res = await apiRoute.jlGetCoursesList({})
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -215,7 +215,7 @@ export default {
this.options_course_arr = [] this.options_course_arr = []
res.data.forEach((v,k)=>{ res.data.forEach((v,k)=>{
this.options_course_arr.push({ this.options_course_arr.push({
text: v.name, text: v.course_name,
value: v.id, value: v.id,
}) })
}) })
@ -223,7 +223,7 @@ export default {
// //
async getStudentList() { async getStudentList() {
let res = await memberApi.jlGetStudentList({}) let res = await apiRoute.jlGetStudentList({})
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -246,7 +246,7 @@ export default {
//- //-
changeClass(e) { changeClass(e) {
console.log('选择器-班级', e); console.log('选择器-班级', e);
this.formData.classes_id = e.value; // class_id this.formData.class_id = e.value; // class_id
this.formData.classes_id_name = e.text; // class_name this.formData.classes_id_name = e.text; // class_name
this.show_class = false; // this.show_class = false; //
}, },
@ -267,7 +267,7 @@ export default {
name_arr.push(v.text) name_arr.push(v.text)
}) })
// //
this.formData.students_ids = id_arr.join(',') this.formData.student_id = id_arr.join(',')
this.formData.students_ids_name = name_arr.join(',') this.formData.students_ids_name = name_arr.join(',')
this.show_student = false; // this.show_student = false; //
}, },
@ -280,11 +280,11 @@ export default {
//1= //1=
if(e.detail.value == 1){ if(e.detail.value == 1){
// //
this.formData.students_ids = '' this.formData.student_id = ''
this.formData.students_ids_name = '' this.formData.students_ids_name = ''
}else{ }else{
// 2= // 2=
this.formData.classes_id = '' this.formData.class_id = ''
this.formData.classes_id_name = '' this.formData.classes_id_name = ''
} }
}, },
@ -318,13 +318,13 @@ export default {
if(data.type == 1){ if(data.type == 1){
// //
if(!data.classes_id){ if(!data.class_id){
this.showMsg('请选择班级') this.showMsg('请选择班级')
return return
} }
}else{ }else{
// //
if(!data.students_ids){ if(!data.student_id){
this.showMsg('请选择学员') this.showMsg('请选择学员')
return return
} }
@ -337,7 +337,7 @@ export default {
} }
// //
let res = await memberApi.jlPublishJob(data) let res = await apiRoute.jlPublishJob(data)
if (res.code != 1){ if (res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

45
pages/coach/my/index.vue

@ -18,7 +18,7 @@
<view class="btn"></view> <view class="btn"></view>
<!-- <view class="btn">切换身份</view>--> <!-- <view class="btn">切换身份</view>-->
<!-- <view class="btn" @click="openViewArrivalStatistics()">到课率统计</view> --> <!-- <view class="btn" @click="openViewArrivalStatistics()">到课率统计</view> -->
<view class="btn">到课率统计</view> <!-- <view class="btn">到课率统计</view> -->
<view class="btn"></view> <view class="btn"></view>
</view> </view>
</view> </view>
@ -30,24 +30,24 @@
<view class="course_box"> <view class="course_box">
<view class="top"> <view class="top">
<view class="item"> <view class="item">
<view class="num">{{memberInfo.zsks}}</view> <view class="num">{{statisticsInfo.courseNum}}</view>
<view class="intro">总授课数/</view> <view class="intro">总授课数/</view>
</view> </view>
<view class="item"> <view class="item">
<view class="num">{{memberInfo.zsbj}}</view> <view class="num">{{statisticsInfo.classNum}}</view>
<view class="intro">总授班级/</view> <view class="intro">总授班级/</view>
</view> </view>
<view class="item"> <view class="item">
<view class="num">{{memberInfo.zfzxy}}</view> <view class="num">{{statisticsInfo.studentNum}}</view>
<view class="intro">总负责学员/ <view class="intro">总负责学员/
</view> </view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
月授课数 月授课数
<text>12</text> <text>{{statisticsInfo.courseMonthNum}}</text>
月负责学员 月负责学员
<text>188</text> <text>{{statisticsInfo.studentMonthNum}}</text>
</view> </view>
</view> </view>
@ -66,25 +66,25 @@
<view>xxx场馆</view> <view>xxx场馆</view>
</view> </view>
<view class="item" @click="openViewDueSoon()"> <!-- <view class="item" @click="openViewDueSoon()"> -->
<view class="item">
<view>即将到期</view> <view>即将到期</view>
<view></view> <view></view>
</view> </view>
<!-- <view class="item" @click="openViewSchoolingStatistics()"> -->
<view class="item"> <view class="item">
<view>授课统计</view> <view>授课统计</view>
<view></view> <view></view>
</view> </view>
<!-- <view class="item" @click="openViewMyAttendance()"> --> <!-- <view class="item"> -->
<view class="item"> <view class="item" @click="openViewMyAttendance()">
<view>我的考勤</view> <view>我的考勤</view>
<view></view> <view></view>
</view> </view>
<!-- <view class="item" @click="openViewSchoolingStatistics()"> --> <!-- <view class="item"> -->
<view class="item"> <view class="item" @click="openViewSchoolingStatistics()">
<view>我的消息</view> <view>我的消息</view>
<view></view> <view></view>
</view> </view>
@ -125,6 +125,7 @@ export default {
data() { data() {
return { return {
memberInfo:{}, memberInfo:{},
statisticsInfo: []
} }
}, },
onLoad() { onLoad() {
@ -135,6 +136,7 @@ export default {
methods: { methods: {
async init(){ async init(){
this.getMemberInfo() this.getMemberInfo()
this.getStatistics()
}, },
//() //()
@ -150,6 +152,19 @@ export default {
this.memberInfo = res.data this.memberInfo = res.data
}, },
//
async getStatistics() {
let res = await apiRoute.getStatisticsInfo({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.statisticsInfo = res.data
},
// //
openViewArrivalStatistics(){ openViewArrivalStatistics(){
this.$navigateTo({ this.$navigateTo({
@ -164,10 +179,10 @@ export default {
}) })
}, },
// //
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
this.$navigateTo({ this.$navigateTo({
url: '/pages/coach/my/schooling_statistics' url: '/pages/common/my_message'
}) })
}, },
@ -202,7 +217,7 @@ export default {
//- //-
openViewMyAttendance(){ openViewMyAttendance(){
this.$navigateTo({ this.$navigateTo({
url: '/pages/common/my_attendance' url: `/pages/common/my_attendance`
}) })
}, },
} }

75
pages/coach/my/info.vue

@ -8,7 +8,7 @@
<image <image
@click="changeAvatar()" @click="changeAvatar()"
class="pic" class="pic"
:src="$util.img(formData.header)" :src="$util.img(formData.head_img)"
></image> ></image>
<view class="btn" @click="changeAvatar()">修改头像</view> <view class="btn" @click="changeAvatar()">修改头像</view>
@ -39,7 +39,8 @@
部门 <text class="required"></text> 部门 <text class="required"></text>
</view> </view>
<view class="input"> <view class="input">
<input disabled placeholder="暂无" /> <!-- <input disabled :placeholder="formData.department_name_str" />-->
<view class="dept disabled">{{formData.department_name_str || '暂无'}}</view>
</view> </view>
</view> </view>
@ -59,14 +60,14 @@
性别 <text class="required">*</text> 性别 <text class="required">*</text>
</view> </view>
<view class="input"> <view class="input">
<input placeholder="请选择性别" v-model="formData.gender" @click="picker_show_sex=true"/> <input placeholder="请选择性别" v-model="formData.gender_str" @click="picker_show_sex=true"/>
<fui-picker <fui-picker
layer="1" layer="1"
:linkage="true" :linkage="true"
:options="options_sex_arr" :options="options_sex_arr"
:show="picker_show_sex" :show="picker_show_sex"
@change="changePickerSex" @change="changePickerSex"
@cancel="picker_sex_show=false" @cancel="picker_show_sex=false"
></fui-picker> ></fui-picker>
</view> </view>
</view> </view>
@ -122,6 +123,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import marketApi from '@/api/market.js'; import marketApi from '@/api/market.js';
import { import {
Api_url Api_url
@ -136,11 +138,12 @@ export default {
data() { data() {
return { return {
formData:{ formData:{
header:'',// head_img:'',//
name:'',// name:'',//
username:'',// username:'',//
address:'',// address:'',//
gender:'',//|, gender:'',//|1,2
gender_str:'',
birthday:'',// birthday:'',//
email:'',// email:'',//
phone:'',// phone:'',//
@ -150,7 +153,7 @@ export default {
userInfo: {}, userInfo: {},
//APi //APi
uploadUrl: `${Api_url}/file/image`, uploadUrl: `${Api_url}/uploadImage`,
// //
picker_show_sex: false, picker_show_sex: false,
@ -197,7 +200,7 @@ export default {
// //
async getUserInfo(){ async getUserInfo(){
let res = await marketApi.member({}) let res = await apiRoute.getPersonnelInfo({})
if (res.code != 1){ if (res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -206,21 +209,28 @@ export default {
return return
} }
let gender_str = ''
if(res.data.gender == 1){
gender_str = '男'
}else if(res.data.gender == 2){
gender_str = '女'
}
// //
this.formData = { this.formData = {
header: res.data.headimg,// head_img: res.data.head_img,//
name: res.data.name,// name: res.data.name,//
username: res.data.username,// username: res.data.phone,//
address: res.data.address,// address: res.data.address,//
gender: res.data.gender,//|, gender: res.data.gender,//|1,2
gender_str:gender_str,
birthday: res.data.birthday,// birthday: res.data.birthday,//
email: res.data.email,// email: res.data.email || '',//
phone: res.data.phone,// phone: res.data.phone,//
wx: res.data.wx || '',// wx: res.data.wx || '',//
member_level_name: res.data.member_level_name || '',// member_level_name: res.data.member_level_name || '',//
department_name_str:res.data.department_name_str || '暂无',//
} }
console.log(123,this.formData);
}, },
// //
@ -250,7 +260,7 @@ export default {
console.log('上传成功2', res) console.log('上传成功2', res)
if (res.code == 1) { if (res.code == 1) {
this.upload_type = 2 this.upload_type = 2
this.formData.header = res.data.path this.formData.head_img = res.data.url
// this.editHeadimg = res.data.path // this.editHeadimg = res.data.path
// this.uploadHeadimg = res.data.url // this.uploadHeadimg = res.data.url
} else { } else {
@ -262,24 +272,12 @@ export default {
}, },
}); });
}, },
//Api
async editPic(pic) {
let res = await salesmanApi.editPic({pic: pic})
if (res.code >= 0) {
this.$util.showToast({
title: '修改成功'
})
} else {
this.$util.showToast({
title: res.message
})
}
},
// //
changePickerSex(e) { changePickerSex(e) {
console.log('监听选择', e) console.log('监听选择', e)
this.formData.gender = e.text this.formData.gender = e.value
this.formData.gender_str = e.text
this.picker_show_sex = false this.picker_show_sex = false
}, },
@ -334,7 +332,7 @@ export default {
async submit() { async submit() {
let data = {...this.formData} let data = {...this.formData}
if(!data.header){ if(!data.head_img){
uni.showToast({ uni.showToast({
title: '请上传头像', title: '请上传头像',
icon: 'none' icon: 'none'
@ -383,7 +381,7 @@ export default {
} }
let res = await marketApi.memberEdit(data) let res = await apiRoute.editPersonnelInfo(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -395,8 +393,10 @@ export default {
title: res.msg, title: res.msg,
icon: 'success' icon: 'success'
}) })
//1s
setTimeout(() => {
this.getUserInfo() this.getUserInfo()
}, 1000)
}, },
@ -456,6 +456,7 @@ export default {
.btn{} .btn{}
.title{ .title{
min-width: 100rpx;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 26rpx; font-size: 26rpx;
@ -466,9 +467,19 @@ export default {
} }
} }
.input{ .input{
display: flex;
justify-content: flex-end;
input{ input{
text-align: right; text-align: right;
} }
.dept{
width: 50%;
}
.disabled{
color: #808080;
//
cursor: not-allowed;
}
} }
} }
} }

9
pages/coach/my/teaching_management_info.vue

@ -7,19 +7,19 @@
{{arrayInfo.update_time}} {{arrayInfo.update_time}}
</view> </view>
<view class="url_style" v-if="arrayInfo.type == 1 && empty(arrayInfo.url)"> <view class="url_style" v-if="arrayInfo.type == 1 && arrayInfo.url">
<video style="margin: auto;" :src="arrayInfo.url" :enable-progress-gesture="true" <video style="margin: auto;" :src="arrayInfo.url" :enable-progress-gesture="true"
:show-fullscreen-btn="true" :show-play-btn="true" @error="onVideoError" @play="onPlay" :show-fullscreen-btn="true" :show-play-btn="true" @error="onVideoError" @play="onPlay"
@pause="onPause" /> @pause="onPause" />
</view> </view>
<view class="url_image_style" v-if="arrayInfo.type == 3 && empty(arrayInfo.url)"> <view class="url_image_style" v-if="arrayInfo.type == 3 && arrayInfo.url">
<image :src="arrayInfo.url" mode="aspectFill" @click="clickPreviewImage(arrayInfo.url)" <image :src="arrayInfo.url" mode="aspectFill" @click="clickPreviewImage(arrayInfo.url)"
style="width: 80%;margin: auto;"> style="width: 80%;margin: auto;">
</image> </image>
</view> </view>
<view class="url_file_style" v-if="arrayInfo.type == 2 && empty(arrayInfo.url)"> <view class="url_file_style" v-if="arrayInfo.type == 2 && arrayInfo.url">
<a style="cursor: pointer;color: blue;" @click="previewFile(arrayInfo.url)">素材文件</a> <a style="cursor: pointer;color: blue;" @click="previewFile(arrayInfo.url)">素材文件</a>
</view> </view>
@ -62,6 +62,9 @@
}); });
}, },
async previewFile(url) { async previewFile(url) {
console.log(url)
try { try {
// 1. // 1.
const { const {

158
pages/coach/my/update_pass.vue

@ -2,7 +2,7 @@
<template> <template>
<view> <view>
<view class="title"> <view class="title">
<view :class="{'green-text': tset_style === 1}">1.验证手机号</view> <view :class="{'green-text': tset_style === 1}">1.验证旧密</view>
<view :class="{'green-text': tset_style === 2}">2.设置新密码</view> <view :class="{'green-text': tset_style === 2}">2.设置新密码</view>
</view> </view>
<view :style="{'background-color':'#fff','width':'100%','height':'100vh' }"> <view :style="{'background-color':'#fff','width':'100%','height':'100vh' }">
@ -12,24 +12,36 @@
为保障您的账号安全修改密码前请填写原密码 为保障您的账号安全修改密码前请填写原密码
</view> </view>
<view style="width: 95%;margin:30rpx auto;"> <view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请输入原登录密码" v-model="user" @input="input" <fui-input borderTop placeholder="请输入原登录密码" v-model="old_password"
backgroundColor="#f2f2f2"></fui-input> backgroundColor="#f2f2f2"></fui-input>
</view> </view>
</view> </view>
<view v-if="tset_style == 2"> <view v-if="tset_style == 2">
<view style="width: 95%;margin:30rpx auto;"> <view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请设置6-20位新的登录密码" v-model="user" @input="input" <fui-input borderTop placeholder="请设置6-20位新的登录密码" v-model="formData.new_password" @input="input"
backgroundColor="#f2f2f2"></fui-input> backgroundColor="#f2f2f2"></fui-input>
</view> </view>
<view style="width: 95%;margin: auto;"> <view style="width: 95%;margin: auto;">
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="code" placeholder="请再次输入新的登录密码" @input="input" <fui-input borderTop :padding="['20rpx','32rpx']" v-model="formData.new_password_2" placeholder="请再次输入新的登录密码" @input="input"
backgroundColor="#f2f2f2"> backgroundColor="#f2f2f2">
</fui-input> </fui-input>
</view> </view>
</view> </view>
<view style="width: 95%;margin:60rpx auto;"> <view style="width: 95%;margin:60rpx auto;">
<fui-button background="#00be8c" radius="5rpx" @click="nextStep" v-if="tset_style == 1">下一步</fui-button> <view class="btn_box">
<fui-button
background="#465cff"
radius="5rpx"
@click="nextStep(1)"
v-if="tset_style != 1">上一步
</fui-button>
<fui-button background="#00be8c" radius="5rpx" @click="nextStep(2)" v-if="tset_style == 1">下一步</fui-button>
<fui-button background="#00be8c" radius="5rpx" @click="submit" v-if="tset_style == 2">提交</fui-button> <fui-button background="#00be8c" radius="5rpx" @click="submit" v-if="tset_style == 2">提交</fui-button>
</view>
<view style="width: 95%;margin:60rpx auto;"> <view style="width: 95%;margin:60rpx auto;">
<fui-button background="#fff" radius="5rpx" @click="forgot" color="#999999" v-if="tset_style == 1">忘记原密码</fui-button> <fui-button background="#fff" radius="5rpx" @click="forgot" color="#999999" v-if="tset_style == 1">忘记原密码</fui-button>
</view> </view>
@ -39,35 +51,139 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
return { return {
code: '', code: '',
user: '', user: '',
tset_style: 1, tset_style: 1,//tab|1=,2=
old_password:'',//
formData:{
phone:'',//
new_password:'',//
new_password_2:'',//
key_value:'',//key_value
},
} }
}, },
onLoad() { onLoad() {},
onShow() {
this.init()//
}, },
methods: { methods: {
sendCode() { //
// async init(){
setTimeout(() => { await this.getUserInfo()
// },
//... //
//success async getUserInfo() {
this.$refs.fui_cdv && this.$refs.fui_cdv.success() let res = await apiRoute.getPersonnelInfo({})
}, 800) if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.formData.phone = res.data.phone//
}, },
nextStep(){
this.tset_style = 2 ///
async nextStep(tset_style){
//tset_style|1=,2=
if(tset_style == 2){
if(!this.old_password){
uni.showToast({
title: '请输入原登录密码',
icon: 'none'
})
return
}
//
let params = {
old_password: this.old_password
}
//
let res = await apiRoute.common_personnelCheckOldPwd(params)
if(!res.code){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.formData.key_value = res.data.key_value
}
this.tset_style = Number(tset_style)
}, },
//
forgot() { forgot() {
this.$navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },
//
async submit() {
//
if (!this.formData.new_password) {
uni.showToast({
title: '请输入新密码',
icon: 'none'
})
return
}
if (this.formData.new_password.length < 6 || this.formData.new_password.length > 20) {
uni.showToast({
title: '新密码长度为6-20位',
icon: 'none'
})
return
}
if (!this.formData.new_password) {
uni.showToast({
title: '请输入新密码',
icon: 'none'
})
return
}
//
if (this.formData.new_password != this.formData.new_password_2) {
uni.showToast({
title: '两次密码不一致',
icon: 'none'
})
return
}
let res = await apiRoute.common_personnelEdidPassword(this.formData)
if(!res.code){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
uni.showToast({
title: res.msg,
icon: 'success'
})
//1s
setTimeout(() => {
//-
//
uni.redirectTo({
url: `/pages/coach/my/index`
})
}, 1000)
},
} }
} }
</script> </script>
@ -104,4 +220,10 @@
color: #999999; color: #999999;
padding-left: 30rpx; padding-left: 30rpx;
} }
.btn_box{
display: flex;
flex-direction: column;
gap: 40rpx;
}
</style> </style>

6
pages/coach/student/info.vue

@ -10,7 +10,7 @@
<view class="user_section"> <view class="user_section">
<view class="box"> <view class="box">
<view class="left"> <view class="left">
<image class="pic" :src="$util.img(studentsInfo.customerResources.member.headimg)"></image> <image class="pic" :src="studentsInfo.customerResources.member.headimg"></image>
<!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)"> <!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)">
<view class="btn">即将到期</view> <view class="btn">即将到期</view>
</view> --> </view> -->
@ -277,7 +277,9 @@ export default {
return return
} }
this.surveyList = this.surveyList.concat(res.data.data); // 使 concat console.log(res,111)
this.surveyList = this.surveyList.concat(res.data.physical_test.data); // 使 concat
console.log('列表',this.surveyList) console.log('列表',this.surveyList)
this.filteredData.total = res.data.total this.filteredData.total = res.data.total

144
pages/coach/student/physical_examination.vue

@ -1,34 +1,89 @@
<!--体测数据-详情页--> <!--体测数据-详情页-->
<template> <template>
<view class="overall"> <view class="overall">
<view class="date">{{$util.formatToDateTime(surveyInfo.create_time,'Y-m-d')}}</view> <view class="date">{{$util.formatToDateTime(surveyInfo.created_at,'Y-m-d')}}</view>
<view class="content"> <view class="content">
<view class="circle-container"> <view class="circle-container">
<view class="card-con-txt1-left"> <view class="card-con-txt1-left">
<image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image> <image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image>
</view> </view>
<view class="card-con-txt1-left-txt">{{v.score}}</view> <view class="card-con-txt1-left-txt">{{surveyInfo.calculateChildHealthScore}}</view>
<view class="card-con-txt1-left-txt top1">综合评分</view> <view class="card-con-txt1-left-txt top1">综合评分</view>
</view> </view>
<view style="height: 170rpx;"></view> <view style="height: 170rpx;"></view>
<view style="display: flex;justify-content: space-around;"> <view style="display: flex;justify-content: space-around;">
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view> <view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{(v.height * 100)}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{(surveyInfo.height)}}</view>
</view> </view>
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view> <view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{v.weight}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{surveyInfo.weight}}</view>
</view> </view>
</view> </view>
<view class="coach-message"> <!-- <view class="coach-message">-->
<view> <!-- <view>-->
<image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image> <!-- <image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image>-->
<!-- </view>-->
<!-- <view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>-->
<!-- </view>-->
<view class="list_box">
<!-- <view class="ul">
<view class="li">
<view class="li_title">坐位体前屈</view>
<view class="li_content">测试结果{{surveyInfo.seated_forward_bend}}</view>
</view>
<view class="li">
<view class="li_title">仰卧卷腹</view>
<view class="li_content">测试结果{{surveyInfo.sit_ups}}</view>
</view>
<view class="li">
<view class="li_title">九十度仰卧撑</view>
<view class="li_content">测试结果{{surveyInfo.push_ups}}</view>
</view>
<view class="li">
<view class="li_title">火烈鸟平衡测试</view>
<view class="li_content">测试结果{{surveyInfo.flamingo_balance}}</view>
</view>
<view class="li">
<view class="li_title">三十秒双脚连续跳</view>
<view class="li_content">测试结果{{surveyInfo.thirty_sec_jump}}</view>
</view>
<view class="li">
<view class="li_title">立定跳远</view>
<view class="li_content">测试结果{{surveyInfo.standing_long_jump}}</view>
</view>
<view class="li">
<view class="li_title">4乘10m灵敏折返跑</view>
<view class="li_content">测试结果{{surveyInfo.agility_run}}</view>
</view>
<view class="li">
<view class="li_title">走平衡木</view>
<view class="li_content">测试结果{{surveyInfo.balance_beam}}</view>
</view>
<view class="li">
<view class="li_title">网球掷远</view>
<view class="li_content">测试结果{{surveyInfo.tennis_throw}}</view>
</view>
<view class="li">
<view class="li_title">十米往返跑</view>
<view class="li_content">测试结果{{surveyInfo.ten_meter_shuttle_run}}</view>
</view>
</view> -->
<view v-for="(item,index) in surveyInfo.physical_test_report">
<view style="color: blue;" @click="previewFile(item)">{{surveyInfo.created_at}}体测报告{{index}}</view>
</view> </view>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>
</view> </view>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view> </view>
</view> </view>
</template> </template>
@ -71,6 +126,51 @@ import apiRoute from '@/api/apiRoute.js';
} }
this.surveyInfo = res.data this.surveyInfo = res.data
}, },
async previewFile(url) {
console.log(url)
try {
// 1.
const {
tempFilePath
} = await this.downloadFile(url);
// 2.
await uni.openDocument({
filePath: tempFilePath,
showMenu: true,
success: () => {
console.log('打开文档成功');
}
});
} catch (err) {
uni.showToast({
title: '预览失败',
icon: 'none'
});
console.error('预览失败:', err);
}
},
downloadFile(url) {
return new Promise((resolve, reject) => {
uni.downloadFile({
url,
success: (res) => {
if (res.statusCode === 200) {
resolve(res);
} else {
reject(new Error('下载失败'));
}
},
fail: (err) => {
reject(err);
}
});
});
}
} }
} }
</script> </script>
@ -153,4 +253,30 @@ import apiRoute from '@/api/apiRoute.js';
align-items: center; align-items: center;
} }
.list_box{
font-size: 30rpx;
// text-align: center;
margin-left: 50rpx;
margin-top: 20rpx;
.ul{
padding: 0 20rpx;
display: flex;
flex-wrap: wrap; /* 允许换行 */
justify-content: space-between;
align-items: center;
gap: 20rpx;
.li{
width: 48%; /* 每个列表项占宽度的48%,留出一些间距 */
display: flex;
flex-direction: column;
gap: 5rpx;
.li_title{
text-align: left;
}
.li_content{
text-align: left;
}
}
}
}
</style> </style>

547
pages/common/contract_list.vue

@ -1,4 +1,4 @@
<!--合同列表-列表--> <!--订单列表-列表-->
<template> <template>
<view class="main_box"> <view class="main_box">
@ -8,7 +8,7 @@
scroll-y="true" scroll-y="true"
:lower-threshold="lowerThreshold" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" @scrolltolower="loadMoreData"
style="height: 90vh;" style="height: 83vh;"
> >
<view <view
class="item" class="item"
@ -16,33 +16,210 @@
:key="k" :key="k"
> >
<view class="top"> <view class="top">
<view class="">企业合同</view> <view class="title">订单状态{{v.order_status == 'pending' ? '待支付':'已支付' }}</view>
<view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view> <!-- <view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view>-->
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="box"> <view class="box">
<view class="title">合同名称</view> <view class="title">客户姓名</view>
<view class="content">{{v.title}}</view> <view class="content">{{ v.resource_id_name || ''}}</view>
</view> </view>
<view class="box">
<view class="title">付款类型</view>
<view class="content">
{{ v.payment_type === 'cash' ? '现金支付' : v.payment_type === 'scan_code' ? '扫码支付' : '订阅支付' }}
</view>
</view>
<view class="box"> <view class="box">
<view class="title">签署方</view> <view class="title">订单金额</view>
<view class="content">{{v.signatory_a}}</view> <view class="content">{{ v.order_amount || ''}}</view>
</view> </view>
<view class="box"> <view class="box">
<view class="title">签署方</view> <view class="title">课程</view>
<view class="content">{{v.signatory_b}}</view> <view class="content">{{ v.course_id_name || ''}}</view>
</view> </view>
<view class="box">
<view class="title">班级</view>
<view class="content">{{ v.class_id_name }}</view>
</view>
<view class="box">
<view class="title">人员</view>
<view class="content">{{ v.staff_id_name || ''}}</view>
</view>
<view class="box">
<view class="title">支付时间</view>
<view class="content">{{ v.payment_time || '' }}</view>
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<!-- <view class="btn_section">-->
<!-- <view class="btn" style="background-color:#29d3b4;" @click="openOrderShow()">创建订单</view>-->
<!-- </view>-->
</view>
<!--创建订单弹出层-->
<fui-modal class="order_modal" :buttons="[]" width="600" :show="order_show">
<text class="fui-title">创建订单</text>
<text class="fui-descr"></text>
<fui-form class="form-section" ref="form" top="0" :model="formData" :show="false">
<view class="input-style">
<!--客户名称-->
<fui-form-item
label="客户名称"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<fui-input
:disabled="true"
:borderBottom="false"
:padding="[0]"
placeholder="请输入客户名称"
v-model="formData.resource_id_name"
backgroundColor="#fff"
size="26"
color="#000"
></fui-input>
</view>
</fui-form-item>
<!--付款类型-->
<fui-form-item
label="选择付款类型"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openPaymentType()">
{{ (formData.payment_type) ? formData.payment_type_name : '点击选择' }}
</view> </view>
</view> </view>
<fui-picker
:linkage='true'
:options="payment_type_options"
:layer="1"
:show="payment_type_show"
@change="changePaymentType"
@cancel="cancelPaymentType">
</fui-picker>
</fui-form-item>
<!--课程-->
<fui-form-item
label="选择课程"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCourseId()">
{{ (formData.course_id) ? formData.course_id_name : '点击选择' }}
</view>
</view>
<fui-picker
:linkage='true'
:options="course_id_options"
:layer="1"
:show="course_id_show"
@change="changeCourseId"
@cancel="cancelCourseId">
</fui-picker>
</fui-form-item>
<!--班级-->
<fui-form-item
label="选择班级"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openClassId()">
{{ (formData.class_id) ? formData.class_id_name : '点击选择' }}
</view>
</view>
<fui-picker
:linkage='true'
:options="class_id_options"
:layer="1"
:show="class_id_show"
@change="changeClassId"
@cancel="cancelClassId">
</fui-picker>
</fui-form-item>
<!--订单金额-->
<fui-form-item
label="订单金额"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<fui-input
:disabled="true"
:borderBottom="false"
:padding="[0]"
placeholder="订单金额"
v-model="formData.money"
backgroundColor="#fff"
size="26"
color="#000"
></fui-input>
</view>
</fui-form-item>
</view>
<view class="button_box">
<fui-button background="#fff" color="#414141" borderColor="#465CFF" btnSize="small" @click="closeOrderShow">取消</fui-button>
<fui-button background="#fff" color="#465CFF" borderColor="#465CFF" btnSize="small" @click="clickOrder({index:1})">确定</fui-button>
</view>
</fui-form>
<view class="fui-icon__close" @tap="closeOrderShow">
<fui-icon name="close" color="#B2B2B2" :size="48"></fui-icon>
</view>
</fui-modal>
</view>
</template> </template>
<script> <script>
import marketApi from '@/api/market.js'; import apiRoute from '@/api/apiRoute.js';
import commonApi from '@/api/common.js';
export default { export default {
components: { components: {
@ -58,11 +235,71 @@ export default {
page:1,// page:1,//
limit:10,// limit:10,//
total:10,// total:10,//
resource_id:'',//id
}, },
tableList:[],// tableList:[],//
//
formData:{
payment_type:'',//
payment_type_name:'',//
course_id:'',//ID
course_id_name:'',//ID
class_id:'',//ID
class_id_name:'',//ID
staff_id:'',//ID
staff_id_name:'',//ID
resource_id:'',//ID
resource_id_name:'',//ID
money:'',//|
},
order_show:false,//|true=,false=
//-
payment_type_options:[
// {
// text:'',
// value:'1'
// },
],//
payment_type_show:false,//
//-
course_id_options:[
// {
// text:'',
// value:'1',
// price:'1'//
// },
],//
course_id_show:false,//
//-
class_id_options:[
// {
// text:'',
// value:'1'
// },
],//
class_id_show:false,//
} }
}, },
onLoad(options) {}, onLoad(options) {
this.filteredData.resource_id = options.resource_id//id
this.formData.resource_id = options.resource_id//id
this.formData.resource_id_name = options.resource_name//id
this.formData.staff_id = options.staff_id//id
this.formData.staff_id_name = options.staff_id_name//id
},
onShow(){ onShow(){
this.init() this.init()
}, },
@ -75,8 +312,17 @@ export default {
methods: { methods: {
// //
async init(){ async init(){
//
await this.getPaymentTypeList()
//
await this.getCourseList()
//
await this.getClassList()
//
await this.getList(); await this.getList();
}, },
//() //()
loadMoreData() { loadMoreData() {
// //
@ -98,7 +344,7 @@ export default {
async getList(){ async getList(){
this.loading = true this.loading = true
let data = {...this.filteredData} let params = {...this.filteredData}
// //
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
@ -110,11 +356,11 @@ export default {
return return
} }
if(data.page == 1){ if(params.page == 1){
this.tableList = [] this.tableList = []
} }
let res = await marketApi.contractsList(data)// let res = await apiRoute.xy_orderTableList(params)//
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -133,13 +379,216 @@ export default {
this.filteredData.page++ this.filteredData.page++
}, },
// //
openViewArticleInfo(item) { async getPaymentTypeList(){
let id = item.id let res = await apiRoute.common_Dictionary({key:'payment_type'})
let redirect = item.redirect// if(res.code != 1){
uni.navigateTo({ uni.showToast({
url: `/pages/common/article_info?id=${id}` title: res.msg,
icon: 'none'
})
return
}
let dictionary = res.data.dictionary
let arr = []
dictionary.forEach((v,k)=>{
arr.push({
text: v.name,
value: v.value,
})
})
this.payment_type_options = arr
console.log('付款类型',this.payment_type_options)
},
//
async getCourseList(){
let params = {}
let res = await apiRoute.common_getCourseAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
let arr = []
res.data.forEach((v,k)=>{
arr.push({
text: `${v.course_name}`,
value: v.id,
price: v.price,
})
}) })
this.course_id_options = arr
console.log('课程列表',this.course_id_options)
},
//
async getClassList(){
let params = {
status:1,//(1 2)
}
let res = await apiRoute.common_getClassAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('班级列表',res.data)
let arr = []
res.data.forEach((v,k)=>{
arr.push({
text: `${v.campus_name}-${v.class_name}`,
value: v.id,
})
})
this.class_id_options = arr
},
//
//
openOrderShow(){
//
this.formData.payment_type = ''//
this.formData.payment_type_name = ''//
this.formData.course_id = ''//ID
this.formData.course_id_name = ''//ID
this.formData.class_id = ''//ID
this.formData.class_id_name = ''//ID
this.formData.money = ''//|
this.order_show = true//
},
//
closeOrderShow(){
this.order_show = false
},
//-
async clickOrder(e){
if(e.index == 0){
//
this.closeOrderShow()
}else{
console.log('提交',this.formData)
await this.submitFormData()
}
},
//
async submitFormData() {
let param = {...this.formData}
//
//...
if(!param.class_id){
uni.showToast({
title: '请选择班级',
icon: 'none'
})
return
}
if(!param.course_id){
uni.showToast({
title: '请选择课程',
icon: 'none'
})
return
}
if(!param.payment_type){
uni.showToast({
title: '请选择付款类型',
icon: 'none'
})
return
}
console.log('提交xxx',param)
this.closeOrderShow()
let res = await apiRoute.xy_orderTableAdd(param)
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
uni.showToast({
title: '操作成功',
icon: 'success'
})
//1s
setTimeout(() => {
this.resetFilteredData()//
this.getList();//
}, 1500)
},
//-
//-
changePaymentType(e){
this.formData.payment_type = e.value
this.formData.payment_type_name = e.text
this.cancelPaymentType()
},
//-
openPaymentType(){
this.payment_type_show = true
},
//-
cancelPaymentType(){
this.payment_type_show = false
},
//-
//-
changeCourseId(e){
console.log('课程',e)
this.formData.course_id = e.value
this.formData.course_id_name = e.text
this.formData.money = this.course_id_options.find(v=>v.value == e.value).price
// console.log('formData',this.formData)
this.cancelCourseId()
},
//-
openCourseId(){
this.course_id_show = true
},
//-
cancelCourseId(){
this.course_id_show = false
},
//-
//-
changeClassId(e){
this.formData.class_id = e.value
this.formData.class_id_name = e.text
this.cancelClassId()
},
//-
openClassId(){
this.class_id_show = true
},
//-
cancelClassId(){
this.class_id_show = false
}, },
// //
@ -223,6 +672,9 @@ export default {
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.title{
font-size: 30rpx;
}
.btn{ .btn{
display: flex; display: flex;
align-items: center; align-items: center;
@ -250,6 +702,19 @@ export default {
} }
} }
.btn_section{
display: flex;
justify-content: center;
align-items: center;
.btn{
border-radius: 10rpx;
padding: 15rpx 0;
width: 70%;
color: #fff;
font-size: 30rpx;
text-align: center;
}
}
@ -259,4 +724,42 @@ export default {
color: #999999; color: #999999;
padding-left: 30rpx; padding-left: 30rpx;
} }
//
.order_modal{
.fui-title {
font-size: 32rpx;
padding-top: 24rpx;
}
.fui-descr {
font-size: 24rpx;
color: #B2B2B2;
padding-top: 12rpx;
padding-bottom: 48rpx;
}
.fui-icon__close {
position: absolute;
right: 24rpx;
top: 20rpx;
}
.form-section{
.input-style {
text-align: right !important;
.input-title{}
}
.button_box{
margin-top: 30rpx;
padding: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20rpx;
}
}
}
</style> </style>

64
pages/common/my_attendance.vue

@ -73,39 +73,33 @@
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
> >
<view class="left"> <view class="left" @click="openInfo(v)">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
<view class="content"> <view class="content">
{{v.status_name}} {{v.status_name}}
</view> </view>
<view class="content"> <view class="content">
校区{{v.campus_id_name}} 校区{{v.campus_id_name || ''}}
</view> </view>
<view class="content"> <view class="content">
备注{{v.remarks || ''}} 备注{{v.remarks || ''}}
</view> </view>
<view class="content"> <view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text> <view class="item" v-if="v.status != 'leave'">
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text> <!--考勤-->
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text> <text>开始时间{{ v.attendance_date }} {{ v.check_in_time || '' }}</text>
</view> <text v-if="v.check_out_time">结束时间{{ v.attendance_date }} {{ v.check_out_time || '' }}</text>
</view>
<view class="right">
<view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view> </view>
<view class="content">
校区{{v.campus_id_name}} <!--请假-->
<view class="item" v-else>
<text>开始时间{{ v.attendance_date }} {{v.leave_start_time || ''}}</text>
<text>结束时间{{ v.attendance_date }} {{v.leave_end_time || ''}}</text>
</view> </view>
<view class="content">
备注{{v.remarks || ''}}
</view> </view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view> </view>
<view class="right">
<view v-if="v.status == 'present' && !v.check_out_time" class="btn" style="background-color: #00b0f0;" @click="openSignInShow('sign_out',v)">签退</view>
</view> </view>
</view> </view>
</view> </view>
@ -125,39 +119,33 @@
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
> >
<view class="left"> <view class="left" @click="openInfo(v)">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
<view class="content"> <view class="content">
{{v.status_name}} {{v.status_name}}
</view> </view>
<view class="content"> <view class="content">
校区{{v.campus_id_name}} 校区{{v.campus_id_name || ''}}
</view> </view>
<view class="content"> <view class="content">
备注{{v.remarks || ''}} 备注{{v.remarks || ''}}
</view> </view>
<view class="content"> <view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text> <view class="item" v-if="v.status != 'leave'">
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text> <!--考勤-->
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text> <text>开始时间{{ v.attendance_date }} {{ v.check_in_time || '' }}</text>
</view> <text v-if="v.check_out_time">结束时间{{ v.attendance_date }} {{ v.check_out_time || '' }}</text>
</view>
<view class="right">
<view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view> </view>
<view class="content">
校区{{v.campus_id_name}} <!--请假-->
<view class="item" v-else>
<text>开始时间{{ v.attendance_date }} {{v.leave_start_time || ''}}</text>
<text>结束时间{{ v.attendance_date }} {{v.leave_end_time || ''}}</text>
</view> </view>
<view class="content">
备注{{v.remarks || ''}}
</view> </view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view> </view>
<view class="right">
<view v-if="v.status == 'present' && !v.check_out_time" class="btn" style="background-color: #00b0f0;" @click="openSignInShow('sign_out',v)">签退</view>
</view> </view>
</view> </view>
</view> </view>

35
pages/market/clue/clue_info.vue

@ -261,6 +261,7 @@
<view @click="openViewEditClues()">编辑详情</view> <view @click="openViewEditClues()">编辑详情</view>
<view @click="callTel(clientInfo.student_phone)">拨打电话</view> <view @click="callTel(clientInfo.student_phone)">拨打电话</view>
<view @click="openViewEditCluesLog()">修改记录</view> <view @click="openViewEditCluesLog()">修改记录</view>
<view @click="openViewOrder()">订单列表</view>
</view> </view>
</view> </view>
</view> </view>
@ -280,6 +281,7 @@
resource_sharing_id:'',//id resource_sharing_id:'',//id
clientInfo:{ clientInfo:{
id:'',//id id:'',//id
resource_id:'',//id
customerResource:{},// customerResource:{},//
sixSpeed:{},// sixSpeed:{},//
},// },//
@ -288,6 +290,9 @@
followList:[], followList:[],
// //
listCallUp:[], listCallUp:[],
//
userInfo:{},
} }
}, },
onLoad(options) { onLoad(options) {
@ -299,10 +304,25 @@
methods: { methods: {
async init(){ async init(){
await this.getInfo()// await this.getInfo()//
// this.getFollowList()// this.getUserInfo()//
// this.getListCallUp()// // this.getListCallUp()//
}, },
//
async getUserInfo(){
let res = await apiRoute.getPersonnelInfo({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.userInfo = res.data
// console.log('',this.userInfo)
},
// //
async getInfo(){ async getInfo(){
let data = { let data = {
@ -374,6 +394,19 @@
}) })
}, },
//-
openViewOrder() {
let resource_id = this.clientInfo.resource_id//id
let resource_name = this.clientInfo.customerResource.name || ''//id
let staff_id = this.userInfo.id//id
let staff_id_name = this.userInfo.name || ''//
this.$navigateTo({
url: `/pages/market/clue/order_list?resource_id=${resource_id}&resource_name=${resource_name}&staff_id=${staff_id}&staff_id_name=${staff_id_name}`
})
},
//- //-
openViewNewTask() { openViewNewTask() {
this.$navigateTo({ this.$navigateTo({

163
pages/market/clue/index.vue

@ -13,10 +13,10 @@
> >
<view class="search_section" > <view class="search_section" >
<view class="item"> <view class="item">
<view class="input_box"> <view class="input_box" @click="openShowDrawer()">
<fui-input :clearable="true" label="时间筛选" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="filteredData_1.shared_at_str"></fui-input> <view class="input_box_text">用户名/手机号/时间范围</view>
</view> </view>
<view class="button" @click="searchData()">搜索</view> <view class="button" @click="openShowDrawer()">搜索</view>
</view> </view>
</view> </view>
<view class="card" v-for="(v,k) in tableList_1" :key="k"> <view class="card" v-for="(v,k) in tableList_1" :key="k">
@ -79,10 +79,10 @@
> >
<view class="search_section"> <view class="search_section">
<view class="item"> <view class="item">
<view class="input_box"> <view class="input_box" @click="openShowDrawer()">
<fui-input :clearable="true" label="时间筛选" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="filteredData_2.shared_at_str"></fui-input> <view class="input_box_text">用户名/手机号/时间范围</view>
</view> </view>
<view class="button" @click="searchData()">搜索</view> <view class="button" @click="openShowDrawer()">搜索</view>
</view> </view>
</view> </view>
<view class="card" v-for="(v,k) in tableList_2" :key="k"> <view class="card" v-for="(v,k) in tableList_2" :key="k">
@ -132,10 +132,54 @@
</view> </view>
</scroll-view> </scroll-view>
<!--下拉选择器-->
<fui-select :show="select_show" :options="select_options" title="请选择员工" @confirm="getSales" @close="closeAssign"></fui-select> <fui-select :show="select_show" :options="select_options" title="请选择员工" @confirm="getSales" @close="closeAssign"></fui-select>
<!-- 时间范围选择器-->
<fui-date-picker range :show="date_picker_show" type="3" @change="changeDatePicker" @cancel="cancelDatePicker"></fui-date-picker> <fui-date-picker range :show="date_picker_show" type="3" @change="changeDatePicker" @cancel="cancelDatePicker"></fui-date-picker>
<!-- 我的客户搜索条件栏目-->
<fui-drawer :show="showDrawer" direction="left" :maskClosable="true">
<view class="fui-scroll__view">
<view class="fui-title">筛选</view>
<scroll-view scroll-y style="height: 720rpx;">
<view class="drawer_box">
<fui-list-cell>
<view class="item">
<view class="title">时间筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="开始时间-结束时间" @click="openDatePicker" v-model="showDrawerForm.shared_at_str"></fui-input>
</view>
</view>
</fui-list-cell>
<fui-list-cell>
<view class="item">
<view class="title">姓名筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="姓名筛选" v-model="showDrawerForm.name"></fui-input>
</view>
</view>
</fui-list-cell>
<fui-list-cell>
<view class="item">
<view class="title">电话筛选</view>
<view class="input_box">
<fui-input :clearable="true" borderTop placeholder="电话筛选" v-model="showDrawerForm.phone_number"></fui-input>
</view>
</view>
</fui-list-cell>
</view>
</scroll-view>
<view class="fui-btn__box">
<fui-button type="success" width="400rpx" height="84rpx" text="搜索" bold @click="searchData()">
</fui-button>
<fui-button type="warning" width="400rpx" height="84rpx" text="关闭" bold @click="closeShowDrawer()">
</fui-button>
</view>
</view>
</fui-drawer>
<view style="height: 170rpx;"></view> <view style="height: 170rpx;"></view>
<AQTabber/> <AQTabber/>
@ -166,9 +210,6 @@ export default {
is_gh: '2',//1=,2= is_gh: '2',//1=,2=
}, },
//Tab //Tab
values: [ values: [
{ {
@ -191,6 +232,8 @@ export default {
total:10,// total:10,//
shared_by:'',//ID|0= shared_by:'',//ID|0=
shared_at_str:'',//|(Y-m-d)-(Y-m-d) shared_at_str:'',//|(Y-m-d)-(Y-m-d)
phone_number:'',//-
name:'',//-
}, },
// //
tableList_1:[],// tableList_1:[],//
@ -203,6 +246,8 @@ export default {
total:10,// total:10,//
shared_by:'0',//ID|0= shared_by:'0',//ID|0=
shared_at_str:'',//|[(Y-m-d),(Y-m-d)] shared_at_str:'',//|[(Y-m-d),(Y-m-d)]
phone_number:'',//-
name:'',//-
}, },
// //
tableList_2:[],// tableList_2:[],//
@ -220,6 +265,15 @@ export default {
// //
date_picker_show:false,// date_picker_show:false,//
//
showDrawer:false,//|false=
showDrawerForm:{
shared_at_str:'',//|[(Y-m-d),(Y-m-d)]
phone_number:'',//-
name:'',//-
},
} }
}, },
onLoad(options) {}, onLoad(options) {},
@ -435,12 +489,25 @@ export default {
//tag //tag
async segmented(param) { async segmented(param) {
this.segmented_type = param.id//1=,2= this.segmented_type = param.id//1=,2=
//
this.showDrawerForm.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.showDrawerForm.phone_number = ''//-
this.showDrawerForm.name = ''//-
if(this.segmented_type == 1){ if(this.segmented_type == 1){
this.filteredData_1.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = ''//-
this.filteredData_1.name = ''//-
// //
// //
await this.resetFilteredData_1() await this.resetFilteredData_1()
await this.getList_1() await this.getList_1()
}else{ }else{
this.filteredData_2.shared_at_str = ''//|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = ''//-
this.filteredData_2.name = ''//-
// //
// //
await this.resetFilteredData_2() await this.resetFilteredData_2()
@ -557,14 +624,7 @@ export default {
changeDatePicker(e){ changeDatePicker(e){
console.log('时间',e) console.log('时间',e)
let shared_at_str = `${e.startDate.result} ~ ${e.endDate.result}` let shared_at_str = `${e.startDate.result} ~ ${e.endDate.result}`
this.showDrawerForm.shared_at_str = shared_at_str
if (this.segmented_type == 1) {
//
this.filteredData_1.shared_at_str = shared_at_str
} else {
//
this.filteredData_2.shared_at_str = shared_at_str
}
this.cancelDatePicker() this.cancelDatePicker()
}, },
// //
@ -579,14 +639,30 @@ export default {
// //
async searchData(){ async searchData(){
if(this.segmented_type == 1){ if(this.segmented_type == 1){
this.filteredData_1.shared_at_str = this.showDrawerForm.shared_at_str//|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = this.showDrawerForm.phone_number//-
this.filteredData_1.name = this.showDrawerForm.name//-
// //
await this.resetFilteredData_1() await this.resetFilteredData_1()
await this.getList_1() await this.getList_1()
}else{ }else{
this.filteredData_2.shared_at_str = this.showDrawerForm.shared_at_str//|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = this.showDrawerForm.phone_number//-
this.filteredData_2.name = this.showDrawerForm.name//-
// //
await this.resetFilteredData_2() await this.resetFilteredData_2()
await this.getList_2() await this.getList_2()
} }
this.closeShowDrawer()
},
//
openShowDrawer(){
this.showDrawer = true
},
//
closeShowDrawer(){
this.showDrawer = false
} }
} }
} }
@ -609,8 +685,13 @@ export default {
justify-content: center; justify-content: center;
.input_box { .input_box {
width: 75%; width: 75%;
::v-deep .fui-input__wrap{ .input_box_text{
height: 100%; height: 60rpx;
line-height: 60rpx;
background-color: #fff;
padding-left: 20rpx;
color: #cccccc;
font-size: 28rpx;
} }
} }
.button{ .button{
@ -723,4 +804,48 @@ export default {
height: 50rpx; height: 50rpx;
background-color: #F59A23; background-color: #F59A23;
} }
//
.fui-scroll__view {
margin-top: 60rpx;
width: 520rpx;
flex: 1;
overflow: hidden;
.fui-title {
padding: 40rpx 32rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
font-weight: bold;
}
.drawer_box{
border: 1px solid red;
.item{
display: flex;
flex-direction: column;
gap: 15rpx;
.title{}
.input_box {
border: 1px solid #292929;
width: 450rpx;
::v-deep .fui-input__wrap{
padding: 10rpx !important;
height: 100%;
}
}
}
}
.fui-btn__box {
padding: 40rpx 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 30rpx;
}
}
</style> </style>

767
pages/market/clue/order_list.vue

@ -0,0 +1,767 @@
<!--订单列表-列表-->
<template>
<view class="main_box">
<view class="main_section">
<scroll-view
class="section_1"
scroll-y="true"
:lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData"
style="height: 83vh;"
>
<view
class="item"
v-for="(v,k) in tableList"
:key="k"
>
<view class="top">
<view class="title">订单状态{{v.order_status == 'pending' ? '待支付':'已支付' }}</view>
<!-- <view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view>-->
</view>
<view class="bottom">
<view class="box">
<view class="title">客户姓名</view>
<view class="content">{{ v.resource_id_name || ''}}</view>
</view>
<view class="box">
<view class="title">付款类型</view>
<view class="content">
{{ v.payment_type === 'cash' ? '现金支付' : v.payment_type === 'scan_code' ? '扫码支付' : '订阅支付' }}
</view>
</view>
<view class="box">
<view class="title">订单金额</view>
<view class="content">{{ v.order_amount || ''}}</view>
</view>
<view class="box">
<view class="title">课程</view>
<view class="content">{{ v.course_id_name || ''}}</view>
</view>
<view class="box">
<view class="title">班级</view>
<view class="content">{{ v.class_id_name }}</view>
</view>
<view class="box">
<view class="title">人员</view>
<view class="content">{{ v.staff_id_name || ''}}</view>
</view>
<view class="box">
<view class="title">支付时间</view>
<view class="content">{{ v.payment_time || '' }}</view>
</view>
</view>
</view>
</scroll-view>
<view class="btn_section">
<view class="btn" style="background-color:#29d3b4;" @click="openOrderShow()">创建订单</view>
</view>
</view>
<!--创建订单弹出层-->
<fui-modal class="order_modal" :buttons="[]" width="600" :show="order_show">
<text class="fui-title">创建订单</text>
<text class="fui-descr"></text>
<fui-form class="form-section" ref="form" top="0" :model="formData" :show="false">
<view class="input-style">
<!--客户名称-->
<fui-form-item
label="客户名称"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<fui-input
:disabled="true"
:borderBottom="false"
:padding="[0]"
placeholder="请输入客户名称"
v-model="formData.resource_id_name"
backgroundColor="#fff"
size="26"
color="#000"
></fui-input>
</view>
</fui-form-item>
<!--付款类型-->
<fui-form-item
label="选择付款类型"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openPaymentType()">
{{ (formData.payment_type) ? formData.payment_type_name : '点击选择' }}
</view>
</view>
<fui-picker
:linkage='true'
:options="payment_type_options"
:layer="1"
:show="payment_type_show"
@change="changePaymentType"
@cancel="cancelPaymentType">
</fui-picker>
</fui-form-item>
<!--课程-->
<fui-form-item
label="选择课程"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCourseId()">
{{ (formData.course_id) ? formData.course_id_name : '点击选择' }}
</view>
</view>
<fui-picker
:linkage='true'
:options="course_id_options"
:layer="1"
:show="course_id_show"
@change="changeCourseId"
@cancel="cancelCourseId">
</fui-picker>
</fui-form-item>
<!--班级-->
<fui-form-item
label="选择班级"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openClassId()">
{{ (formData.class_id) ? formData.class_id_name : '点击选择' }}
</view>
</view>
<fui-picker
:linkage='true'
:options="class_id_options"
:layer="1"
:show="class_id_show"
@change="changeClassId"
@cancel="cancelClassId">
</fui-picker>
</fui-form-item>
<!--订单金额-->
<fui-form-item
label="订单金额"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<fui-input
:disabled="true"
:borderBottom="false"
:padding="[0]"
placeholder="订单金额"
v-model="formData.money"
backgroundColor="#fff"
size="26"
color="#000"
></fui-input>
</view>
</fui-form-item>
</view>
<view class="button_box">
<fui-button background="#fff" color="#414141" borderColor="#465CFF" btnSize="small" @click="closeOrderShow">取消</fui-button>
<fui-button background="#fff" color="#465CFF" borderColor="#465CFF" btnSize="small" @click="clickOrder({index:1})">确定</fui-button>
</view>
</fui-form>
<view class="fui-icon__close" @tap="closeOrderShow">
<fui-icon name="close" color="#B2B2B2" :size="48"></fui-icon>
</view>
</fui-modal>
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
export default {
components: {
},
data() {
return {
loading:false,//
lowerThreshold: 100,//
isReachedBottom: false,//|true=|false=
//
filteredData:{
page:1,//
limit:10,//
total:10,//
resource_id:'',//id
},
tableList:[],//
//
formData:{
payment_type:'',//
payment_type_name:'',//
course_id:'',//ID
course_id_name:'',//ID
class_id:'',//ID
class_id_name:'',//ID
staff_id:'',//ID
staff_id_name:'',//ID
resource_id:'',//ID
resource_id_name:'',//ID
money:'',//|
},
order_show:false,//|true=,false=
//-
payment_type_options:[
// {
// text:'',
// value:'1'
// },
],//
payment_type_show:false,//
//-
course_id_options:[
// {
// text:'',
// value:'1',
// price:'1'//
// },
],//
course_id_show:false,//
//-
class_id_options:[
// {
// text:'',
// value:'1'
// },
],//
class_id_show:false,//
}
},
onLoad(options) {
this.filteredData.resource_id = options.resource_id//id
this.formData.resource_id = options.resource_id//id
this.formData.resource_id_name = options.resource_name//id
this.formData.staff_id = options.staff_id//id
this.formData.staff_id_name = options.staff_id_name//id
},
onShow(){
this.init()
},
//
async onPullDownRefresh() {
//
await this.resetFilteredData()
await this.getList()
},
methods: {
//
async init(){
//
await this.getPaymentTypeList()
//
await this.getCourseList()
//
await this.getClassList()
//
await this.getList();
},
//()
loadMoreData() {
//
if (!this.isReachedBottom) {
this.isReachedBottom = true;//
this.getList();
}
},
//
async resetFilteredData() {
this.isReachedBottom = false; // 便
this.filteredData.page = 1//
this.filteredData.limit = 10//
this.filteredData.total = 10//
},
//
async getList(){
this.loading = true
let params = {...this.filteredData}
//
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
this.loading = false
uni.showToast({
title: '暂无更多',
icon: 'none'
})
return
}
if(params.page == 1){
this.tableList = []
}
let res = await apiRoute.xs_orderTableList(params)//
this.loading = false
this.isReachedBottom = false;
if (res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.data); // 使 concat
// this.tableList.unshift(...res.data.data); //
console.log('列表',this.tableList)
this.filteredData.total = res.data.total
this.filteredData.page++
},
//
async getPaymentTypeList(){
let res = await apiRoute.common_Dictionary({key:'payment_type'})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
let dictionary = res.data.dictionary
let arr = []
dictionary.forEach((v,k)=>{
arr.push({
text: v.name,
value: v.value,
})
})
this.payment_type_options = arr
console.log('付款类型',this.payment_type_options)
},
//
async getCourseList(){
let params = {}
let res = await apiRoute.common_getCourseAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
let arr = []
res.data.forEach((v,k)=>{
arr.push({
text: `${v.course_name}`,
value: v.id,
price: v.price,
})
})
this.course_id_options = arr
console.log('课程列表',this.course_id_options)
},
//
async getClassList(){
let params = {
status:1,//(1 2)
}
let res = await apiRoute.common_getClassAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('班级列表',res.data)
let arr = []
res.data.forEach((v,k)=>{
arr.push({
text: `${v.campus_name}-${v.class_name}`,
value: v.id,
})
})
this.class_id_options = arr
},
//
//
openOrderShow(){
//
this.formData.payment_type = ''//
this.formData.payment_type_name = ''//
this.formData.course_id = ''//ID
this.formData.course_id_name = ''//ID
this.formData.class_id = ''//ID
this.formData.class_id_name = ''//ID
this.formData.money = ''//|
this.order_show = true//
},
//
closeOrderShow(){
this.order_show = false
},
//-
async clickOrder(e){
if(e.index == 0){
//
this.closeOrderShow()
}else{
console.log('提交',this.formData)
await this.submitFormData()
}
},
//
async submitFormData() {
let param = {...this.formData}
//
//...
if(!param.class_id){
uni.showToast({
title: '请选择班级',
icon: 'none'
})
return
}
if(!param.course_id){
uni.showToast({
title: '请选择课程',
icon: 'none'
})
return
}
if(!param.payment_type){
uni.showToast({
title: '请选择付款类型',
icon: 'none'
})
return
}
console.log('提交xxx',param)
this.closeOrderShow()
let res = await apiRoute.xs_orderTableAdd(param)
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
uni.showToast({
title: '操作成功',
icon: 'success'
})
//1s
setTimeout(() => {
this.resetFilteredData()//
this.getList();//
}, 1500)
},
//-
//-
changePaymentType(e){
this.formData.payment_type = e.value
this.formData.payment_type_name = e.text
this.cancelPaymentType()
},
//-
openPaymentType(){
this.payment_type_show = true
},
//-
cancelPaymentType(){
this.payment_type_show = false
},
//-
//-
changeCourseId(e){
console.log('课程',e)
this.formData.course_id = e.value
this.formData.course_id_name = e.text
this.formData.money = this.course_id_options.find(v=>v.value == e.value).price
// console.log('formData',this.formData)
this.cancelCourseId()
},
//-
openCourseId(){
this.course_id_show = true
},
//-
cancelCourseId(){
this.course_id_show = false
},
//-
//-
changeClassId(e){
this.formData.class_id = e.value
this.formData.class_id_name = e.text
this.cancelClassId()
},
//-
openClassId(){
this.class_id_show = true
},
//-
cancelClassId(){
this.class_id_show = false
},
//
async downloadFile(fileUrl) {
if (!fileUrl) {
this.$util.showToast({
title: '暂无电子发票'
});
return false;
}
uni.downloadFile({
url: fileUrl,
success: function (res) {
console.log('下载成功');
// uni.openDocument({
// filePath: res.tempFilePath,
// fileType: 'pdf',
// success: function (res) {
// console.log('');
// }
// });
}
});
}
}
}
</script>
<style lang="less" scoped>
.main_box {
background: #292929;
}
//
.navbar_section {
display: flex;
justify-content: center;
align-items: center;
background: #29d3b4;
.title {
padding: 20rpx 0;
font-size: 30rpx;
color: #315d55;
}
}
.main_section {
min-height: 100vh;
background: #292929 100%;
padding: 0 0rpx;
padding-top: 32rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.section {
background-color: #434544;
padding: 40rpx 40rpx;
}
.section_1{
padding: 0 24rpx;
display: flex;
flex-direction: column;
.item{
margin-bottom: 38rpx;
display: flex;
flex-direction: column;
padding: 32rpx 24rpx;
border-radius: 14rpx;
background-color: #434544;
color: #fff;
.top{
font-size: 28rpx;
display: flex;
justify-content: space-between;
.title{
font-size: 30rpx;
}
.btn{
display: flex;
align-items: center;
color: #29D3B4;
}
}
.bottom{
font-size: 26rpx;
margin-top: 25rpx;
display: flex;
flex-direction: column;
gap: 15rpx;
.box{
display: flex;
justify-content: space-between;
.title{
width: 180rpx;
}
.content{
width: 100%;
}
}
}
}
}
.btn_section{
display: flex;
justify-content: center;
align-items: center;
.btn{
border-radius: 10rpx;
padding: 15rpx 0;
width: 70%;
color: #fff;
font-size: 30rpx;
text-align: center;
}
}
}
.describe {
color: #999999;
padding-left: 30rpx;
}
//
.order_modal{
.fui-title {
font-size: 32rpx;
padding-top: 24rpx;
}
.fui-descr {
font-size: 24rpx;
color: #B2B2B2;
padding-top: 12rpx;
padding-bottom: 48rpx;
}
.fui-icon__close {
position: absolute;
right: 24rpx;
top: 20rpx;
}
.form-section{
.input-style {
text-align: right !important;
.input-title{}
}
.button_box{
margin-top: 30rpx;
padding: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20rpx;
}
}
}
</style>

17
pages/student/my/my.vue

@ -56,7 +56,7 @@
<!-- <view></view>--> <!-- <view></view>-->
<!-- </view>--> <!-- </view>-->
<view class="item" @click="openViewContractList()"> <view class="item" @click="openViewOrder()">
<view>我的订单</view> <view>我的订单</view>
<view></view> <view></view>
</view> </view>
@ -147,10 +147,19 @@
}) })
}, },
//- //-
openViewContractList(item) { openViewOrder() {
let resource_id = this.member_info.id//id
let resource_name = this.member_info.name || ''//id
// let staff_id = this.userInfo.id//id
// let staff_id_name = this.userInfo.name || ''//
let staff_id = ''//id
let staff_id_name = ''//
this.$navigateTo({ this.$navigateTo({
url: `/pages/common/contract_list` url: `/pages/common/contract_list?resource_id=${resource_id}&resource_name=${resource_name}&staff_id=${staff_id}&staff_id_name=${staff_id_name}`
}) })
}, },

Loading…
Cancel
Save