Browse Source

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

# Conflicts:
#	pages/market/data/statistics.vue
master
于宏哲PHP 9 months ago
parent
commit
f18fe1dc0e
  1. 8
      components/uni-popup/uni-popup-dialog.vue
  2. 15
      config.js
  3. 13
      pages/market/clue/add_clues.vue
  4. 344
      pages/market/clue/clue_info.vue
  5. 28
      pages/market/clue/edit_clues.vue
  6. 10
      pages/market/clue/index.vue
  7. 350
      pages/market/clue/order_list.vue
  8. 9
      pages/market/data/index.vue
  9. 2
      pages/market/data/statistics.vue
  10. 2
      pages/student/login/login.vue

8
components/uni-popup/uni-popup-dialog.vue

@ -217,7 +217,7 @@
} }
.uni-button-color { .uni-button-color {
color: $uni-color-primary; color: $color-primary;
} }
.uni-dialog-input { .uni-dialog-input {
@ -226,15 +226,15 @@
} }
.uni-popup__success { .uni-popup__success {
color: $uni-color-success; color: $color-success;
} }
.uni-popup__warn { .uni-popup__warn {
color: $uni-color-warning; color: $color-warning;
} }
.uni-popup__error { .uni-popup__error {
color: $uni-color-error; color: $color-error;
} }
.uni-popup__info { .uni-popup__info {

15
config.js

@ -1,15 +0,0 @@
export default {
server: "http://medication.zeyan.wang",
appName: "要药提醒",
// #ifdef APP-PLUS
version: plus.runtime.version,
varsionCode: plus.runtime.versionCode,
// #endif
// #ifndef APP-PLUS
version: '1.0.0',
// #endif
}

13
pages/market/clue/add_clues.vue

@ -74,7 +74,8 @@
<fui-form-item <fui-form-item
label="校区" label="校区"
labelSize='26' labelSize='26'
prop="" prop="campus"
asterisk asteriskPosition="right"
background='#434544' background='#434544'
labelColor='#fff' labelColor='#fff'
:bottomBorder='false' :bottomBorder='false'
@ -1215,6 +1216,16 @@ export default {
this.nextStep('0') this.nextStep('0')
return false return false
} }
//
if(!data.campus){
uni.showToast({
title: '校区必填',
icon: 'none'
})
this.nextStep('0')
return false
}
return true return true
}, },
// //

344
pages/market/clue/clue_info.vue

@ -120,145 +120,29 @@
<!-- 通话记录--> <!-- 通话记录-->
<view class="call-log" v-if="switch_tags_type == 3"> <view class="call-log" v-if="switch_tags_type == 3">
<!-- 添加备注按钮 --> <view class="call-record-wrapper" v-for="(v,k) in listCallUp" :key="k">
<view style="width: 92%; margin: 20rpx auto; display: flex; justify-content: center;"> <view class="call-record-item">
<button type="primary" style="background-color: #29D3B4; color: white;" @click="openAddRemark">添加备注</button> <view class="call-record-header">
</view> <view class="call-name">{{v.name}}</view>
<view style="margin-top: 20rpx" v-for="(v,k) in listCallUp" :key="k"> <view class="call-time">{{v.create_time}}</view>
<!-- <view class="basic-message">08-23</view>-->
<view class="follow-records-list">
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>{{v.name}}</view>
<view>{{v.create_time}}</view>
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>呼叫时间{{v.created_at}}</view>
<view>呼叫备注{{v.remarks}}</view>
</view>
</view>
</view>
<view style="height: 200rpx;"></view>
</view>
<!-- 在籍客户-->
<view class="registered-clients" v-if="switch_tags_type == 4">
<view class="search">
<view :class="{'selected': select_type === 1, 'not-selected': select_type !== 1}" @click="getSelect(1)">
全部(320)
</view>
<view :class="{'selected': select_type === 2, 'not-selected': select_type !== 2}" @click="getSelect(2)">
同校(8)
</view>
<view :class="{'selected': select_type === 3, 'not-selected': select_type !== 3}" @click="getSelect(3)">
同班(15)
</view>
<view :class="{'selected': select_type === 4, 'not-selected': select_type !== 4}" @click="getSelect(4)">
同小区(12)
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="false">
同小区
</view>
<view class="coeducation" v-if="true">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="false">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="true">
同班
</view> </view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;"> <view class="call-record-content">
<view>包子皮</view> <view class="call-detail">
</view> <text class="call-label">呼叫时间</text>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;"> <text>{{v.created_at}}</text>
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view> </view>
<view>课程课程名称1</view> <button
</view> type="primary"
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view> size="mini"
</view> class="remark-btn"
</view> @click="openAddRemark(v)">
<view style="margin: 16rpx;"> 添加备注
<view class="follow-records-list"> </button>
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view> </view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;"> <view class="call-remark">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view> <text class="call-label">呼叫备注</text>
<view>课程课程名称1</view> <text class="call-remark-content">{{v.remarks || '无'}}</text>
</view> </view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view> </view>
</view> </view>
<view style="height: 200rpx;"></view> <view style="height: 200rpx;"></view>
@ -275,15 +159,19 @@
<!-- 添加备注弹窗 --> <!-- 添加备注弹窗 -->
<uni-popup ref="remarkPopup" type="dialog"> <uni-popup ref="remarkPopup" type="dialog">
<uni-popup-dialog <uni-popup-dialog
title="添加备注" :title="currentRecord ? `添加备注 (${currentRecord.name || '未知'})` : '添加备注'"
:before-close="true" :before-close="true"
@confirm="confirmRemark" @confirm="confirmRemark"
@close="closeRemark"> @close="closeRemark">
<uni-easyinput <view class="remark-textarea-container">
type="textarea" <textarea
v-model="remark_content" class="remark-textarea"
placeholder="请输入备注内容"> v-model="remark_content"
</uni-easyinput> placeholder="请输入备注内容"
maxlength="200"
></textarea>
<text class="remark-count">{{remark_content.length}}/200</text>
</view>
</uni-popup-dialog> </uni-popup-dialog>
</uni-popup> </uni-popup>
</view> </view>
@ -294,8 +182,12 @@
import apiRoute from '@/api/apiRoute.js'; import apiRoute from '@/api/apiRoute.js';
import marketApi from '@/api/market.js'; import marketApi from '@/api/market.js';
export default { export default {
components: {
//
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
uniPopupDialog: () => import('@/components/uni-popup/uni-popup-dialog.vue'),
},
data() { data() {
return { return {
switch_tags_type: 1, switch_tags_type: 1,
@ -319,6 +211,8 @@
// //
remark_content: '', remark_content: '',
//
currentRecord: null,
} }
}, },
onLoad(options) { onLoad(options) {
@ -607,8 +501,9 @@
}, },
// //
openAddRemark() { openAddRemark(record) {
this.remark_content = ''; this.remark_content = '';
this.currentRecord = record;
this.$refs.remarkPopup.open(); this.$refs.remarkPopup.open();
}, },
@ -638,6 +533,12 @@
tag: null // tag: null //
}; };
// ID
if (this.currentRecord && this.currentRecord.id) {
params.related_record_id = this.currentRecord.id; // ID
console.log('添加备注到通话记录:', this.currentRecord);
}
const res = await apiRoute.xs_communicationRecordsAdd(params); const res = await apiRoute.xs_communicationRecordsAdd(params);
if (res.code !== 1) { if (res.code !== 1) {
@ -890,11 +791,50 @@
background: #fff; background: #fff;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 30rpx; padding: 0 30rpx;
} }
//
.remark-textarea-container {
width: 100%;
position: relative;
padding: 10rpx 0;
}
.remark-textarea {
width: 100%;
height: 200rpx;
border: 1px solid #ddd;
border-radius: 8rpx;
padding: 20rpx;
font-size: 28rpx;
background-color: #f8f8f8;
box-sizing: border-box;
}
.remark-count {
position: absolute;
bottom: 20rpx;
right: 20rpx;
font-size: 24rpx;
color: #999;
}
//
.remark-btn {
background-color: #29D3B4 !important;
color: white !important;
margin: 0 !important;
padding: 0 20rpx !important;
height: 60rpx !important;
line-height: 60rpx !important;
font-size: 24rpx !important;
border-radius: 30rpx !important;
}
.follow-records-list{ .follow-records-list{
width: 92%; width: 92%;
background: #434544; background: #434544;
@ -959,4 +899,120 @@
padding: 12rpx 8rpx; padding: 12rpx 8rpx;
text-align: center; text-align: center;
} }
.call-record-item {
width: 100%;
background: #434544;
border-radius: 16rpx;
margin: auto;
padding: 16rpx;
color: #fff;
position: relative;
}
.call-record-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.call-name {
font-size: 28rpx;
font-weight: bold;
}
.call-time {
font-size: 24rpx;
color: #999;
}
.call-record-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.call-detail {
display: flex;
align-items: center;
}
.call-label {
font-size: 24rpx;
color: #999;
margin-right: 10rpx;
}
.call-remark {
margin-top: 10rpx;
}
.call-remark-content {
font-size: 24rpx;
color: #fff;
}
//
.call-log {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
}
.call-record-wrapper {
margin-bottom: 20rpx;
}
.call-record-item {
width: 100%;
background: #3D3D3D;
border-radius: 16rpx;
padding: 20rpx;
color: #fff;
box-sizing: border-box;
}
.call-record-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
border-bottom: 1px solid #4A4A4A;
padding-bottom: 10rpx;
}
.call-name {
font-size: 28rpx;
font-weight: bold;
color: #fff;
}
.call-time {
font-size: 24rpx;
color: #999;
}
.call-record-content {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
}
.call-detail {
display: flex;
align-items: center;
}
.call-label {
font-size: 24rpx;
color: #999;
margin-right: 10rpx;
}
.call-remark {
margin-top: 10rpx;
padding-top: 10rpx;
border-top: 1px solid #4A4A4A;
}
.call-remark-content {
font-size: 24rpx;
color: #fff;
word-break: break-all;
display: inline-block;
width: 90%;
vertical-align: top;
}
</style> </style>

28
pages/market/clue/edit_clues.vue

@ -1237,7 +1237,33 @@
}, },
// //
async validatorForm(data) { async validatorForm(data) {
//
if(!data.name){
uni.showToast({
title: '学生姓名必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if(!data.phone_number){
uni.showToast({
title: '电话必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if(!data.campus){
uni.showToast({
title: '校区必填',
icon: 'none'
})
this.nextStep('0')
return false
}
return true return true
}, },
// //

10
pages/market/clue/index.vue

@ -63,7 +63,7 @@
是否有效{{ v.sixSpeed && v.sixSpeed.efficacious === 1 ? '有效' : '无效' }} 是否有效{{ v.sixSpeed && v.sixSpeed.efficacious === 1 ? '有效' : '无效' }}
</view> </view>
<view style="padding: 12rpx;"> <view style="padding: 12rpx;">
<image v-if="v.sixSpeed.efficacious === 1" <image v-if=" v.sixSpeed && v.sixSpeed.efficacious === 1"
:src="$util.img('/uniapp_src/static/images/index/intention2.png')" :src="$util.img('/uniapp_src/static/images/index/intention2.png')"
class="drop-image-x"></image> class="drop-image-x"></image>
<image v-else :src="$util.img('/uniapp_src/static/images/index/intention3.png')" <image v-else :src="$util.img('/uniapp_src/static/images/index/intention3.png')"
@ -667,18 +667,18 @@
// //
async searchData() { async searchData() {
if (this.segmented_type == 1) { if (this.segmented_type == 1) {
this.filteredData_1.shared_at_str = this.showDrawerForm this.filteredData_1.shared_at_str = this.showDrawerForm.shared_at_str //|[(Y-m-d),(Y-m-d)]
.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = this.showDrawerForm.phone_number //- this.filteredData_1.phone_number = this.showDrawerForm.phone_number //-
this.filteredData_1.name = this.showDrawerForm.name //- this.filteredData_1.name = this.showDrawerForm.name //-
this.filteredData_1.campus_name = this.showDrawerForm.campus_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 this.filteredData_2.shared_at_str = this.showDrawerForm.shared_at_str //|[(Y-m-d),(Y-m-d)]
.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = this.showDrawerForm.phone_number //- this.filteredData_2.phone_number = this.showDrawerForm.phone_number //-
this.filteredData_2.name = this.showDrawerForm.name //- this.filteredData_2.name = this.showDrawerForm.name //-
this.filteredData_2.campus_name = this.showDrawerForm.campus_name //-
// //
await this.resetFilteredData_2() await this.resetFilteredData_2()
await this.getList_2() await this.getList_2()

350
pages/market/clue/order_list.vue

@ -291,14 +291,23 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.resource_id = options.resource_id//id console.log('页面加载参数:', options)
// options
if (!options || !options.resource_id) {
uni.showToast({
title: '缺少必要参数',
icon: 'none'
})
return
}
this.formData.resource_id = options.resource_id//id this.filteredData.resource_id = options.resource_id // id
this.formData.resource_id_name = options.resource_name//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 = options.staff_id || '' // id
this.formData.staff_id_name = options.staff_id_name//id this.formData.staff_id_name = options.staff_id_name || '' // id
}, },
onShow(){ onShow(){
this.init() this.init()
@ -312,15 +321,23 @@ export default {
methods: { methods: {
// //
async init(){ async init(){
// try {
await this.getPaymentTypeList() //
// await this.getPaymentTypeList()
await this.getCourseList() //
// await this.getCourseList()
await this.getClassList() //
await this.getClassList()
//
await this.getList(); //
await this.getList();
} catch (error) {
console.error('初始化失败:', error)
uni.showToast({
title: '初始化数据失败',
icon: 'none'
})
}
}, },
//() //()
@ -381,75 +398,96 @@ export default {
// //
async getPaymentTypeList(){ async getPaymentTypeList(){
let res = await apiRoute.common_Dictionary({key:'payment_type'}) try {
if(res.code != 1){ let res = await apiRoute.common_Dictionary({key:'payment_type'})
uni.showToast({ if(res.code != 1){
title: res.msg, uni.showToast({
icon: 'none' title: res.msg || '获取付款类型失败',
}) icon: 'none'
return })
} return
}
let dictionary = res.data.dictionary let dictionary = res.data
let arr = [] let arr = []
dictionary.forEach((v,k)=>{ dictionary.forEach((v,k) => {
arr.push({ arr.push({
text: v.name, text: v.name,
value: v.value, value: v.value,
})
}) })
}) this.payment_type_options = arr
this.payment_type_options = arr console.log('付款类型', this.payment_type_options)
console.log('付款类型',this.payment_type_options) } catch (error) {
console.error('获取付款类型失败:', error)
}
}, },
// //
async getCourseList(){ async getCourseList(){
let params = {} try {
let params = {}
let res = await apiRoute.common_getCourseAll(params) let res = await apiRoute.common_getCourseAll(params)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg || '获取课程列表失败',
icon: 'none' icon: 'none'
}) })
return return
} }
if (!res.data || !Array.isArray(res.data)) {
console.error('课程列表数据格式错误:', res.data)
return
}
let arr = [] let arr = []
res.data.forEach((v,k)=>{ res.data.forEach((v,k) => {
arr.push({ arr.push({
text: `${v.course_name}`, text: `${v.course_name}`,
value: v.id, value: v.id,
price: v.price, price: v.price,
})
}) })
}) this.course_id_options = arr
this.course_id_options = arr console.log('课程列表', this.course_id_options)
console.log('课程列表',this.course_id_options) } catch (error) {
console.error('获取课程列表失败:', error)
}
}, },
// //
async getClassList(){ async getClassList(){
let params = { try {
status:1,//(1 2) 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
}
let res = await apiRoute.common_getClassAll(params) if (!res.data || !Array.isArray(res.data)) {
if(res.code != 1){ console.error('班级列表数据格式错误:', res.data)
uni.showToast({ return
title: res.msg, }
icon: 'none'
let arr = []
res.data.forEach((v,k) => {
arr.push({
text: `${v.campus_name}-${v.class_name}`,
value: v.id,
})
}) })
return this.class_id_options = arr
console.log('班级列表', this.class_id_options)
} catch (error) {
console.error('获取班级列表失败:', error)
} }
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
}, },
@ -488,67 +526,116 @@ export default {
}, },
// //
async submitFormData() { async submitFormData() {
let param = {...this.formData} try {
// let param = {...this.formData}
//... //
if(!param.class_id){ if(!param.resource_id){
uni.showToast({ uni.showToast({
title: '请选择班级', title: '客户信息缺失',
icon: 'none' icon: 'none'
}) })
return return
} }
if(!param.course_id){ if(!param.class_id){
uni.showToast({ uni.showToast({
title: '请选择课程', title: '请选择班级',
icon: 'none' icon: 'none'
}) })
return return
} }
if(!param.payment_type){ if(!param.course_id){
uni.showToast({ uni.showToast({
title: '请选择付款类型', title: '请选择课程',
icon: 'none' icon: 'none'
}) })
return return
} }
if(!param.payment_type){
uni.showToast({
title: '请选择付款类型',
icon: 'none'
})
return
}
if(!param.staff_id){
uni.showToast({
title: '员工信息缺失',
icon: 'none'
})
return
}
if(!param.money){
uni.showToast({
title: '订单金额为空',
icon: 'none'
})
return
}
console.log('提交xxx',param) console.log('提交订单数据:', param)
this.closeOrderShow() this.closeOrderShow()
uni.showLoading({
title: '提交中...'
})
let res = await apiRoute.xs_orderTableAdd(param)
uni.hideLoading()
if (res.code != 1) {
uni.showToast({
title: res.msg || '创建订单失败',
icon: 'none'
})
return
}
let res = await apiRoute.xs_orderTableAdd(param)
if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: '创建订单成功',
icon: 'success'
})
//1s
setTimeout(() => {
this.resetFilteredData()//
this.getList();//
}, 1500)
} catch (error) {
uni.hideLoading()
console.error('提交订单失败:', error)
uni.showToast({
title: '创建订单失败,请重试',
icon: 'none' icon: 'none'
}) })
return
} }
uni.showToast({
title: '操作成功',
icon: 'success'
})
//1s
setTimeout(() => {
this.resetFilteredData()//
this.getList();//
}, 1500)
}, },
//- //-
//- //-
changePaymentType(e){ changePaymentType(e){
console.log('选择的付款类型:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的付款类型',
icon: 'none'
})
return
}
this.formData.payment_type = e.value this.formData.payment_type = e.value
this.formData.payment_type_name = e.text this.formData.payment_type_name = e.text
this.cancelPaymentType() this.cancelPaymentType()
}, },
//- //-
openPaymentType(){ openPaymentType(){
if (!this.payment_type_options || this.payment_type_options.length === 0) {
uni.showToast({
title: '付款类型数据加载中,请稍后再试',
icon: 'none'
})
this.getPaymentTypeList() //
return
}
this.payment_type_show = true this.payment_type_show = true
}, },
//- //-
@ -559,17 +646,38 @@ export default {
//- //-
//- //-
changeCourseId(e){ changeCourseId(e){
console.log('课程',e) console.log('选择的课程:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的课程',
icon: 'none'
})
return
}
this.formData.course_id = e.value this.formData.course_id = e.value
this.formData.course_id_name = e.text this.formData.course_id_name = e.text
this.formData.money = this.course_id_options.find(v=>v.value == e.value).price //
const selectedCourse = this.course_id_options.find(v => v.value == e.value)
if (selectedCourse && selectedCourse.price) {
this.formData.money = selectedCourse.price
} else {
this.formData.money = ''
console.warn('未找到所选课程的价格信息')
}
// console.log('formData',this.formData)
this.cancelCourseId() this.cancelCourseId()
}, },
//- //-
openCourseId(){ openCourseId(){
if (!this.course_id_options || this.course_id_options.length === 0) {
uni.showToast({
title: '课程数据加载中,请稍后再试',
icon: 'none'
})
this.getCourseList() //
return
}
this.course_id_show = true this.course_id_show = true
}, },
//- //-
@ -580,12 +688,28 @@ export default {
//- //-
//- //-
changeClassId(e){ changeClassId(e){
console.log('选择的班级:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的班级',
icon: 'none'
})
return
}
this.formData.class_id = e.value this.formData.class_id = e.value
this.formData.class_id_name = e.text this.formData.class_id_name = e.text
this.cancelClassId() this.cancelClassId()
}, },
//- //-
openClassId(){ openClassId(){
if (!this.class_id_options || this.class_id_options.length === 0) {
uni.showToast({
title: '班级数据加载中,请稍后再试',
icon: 'none'
})
this.getClassList() //
return
}
this.class_id_show = true this.class_id_show = true
}, },
//- //-

9
pages/market/data/index.vue

@ -4,9 +4,6 @@
<!--自定义导航栏--> <!--自定义导航栏-->
<view class="navbar_section"> <view class="navbar_section">
<view class="title">数据</view> <view class="title">数据</view>
<view class="statistics-btn" @click="goToStatistics">
<text>统计表格</text>
</view>
</view> </view>
<!-- 市场人员展示--> <!-- 市场人员展示-->
@ -337,12 +334,6 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
//
goToStatistics() {
uni.navigateTo({
url: '/pages/market/data/statistics'
});
},
async init(){ async init(){
await this.getUserInfo() await this.getUserInfo()

2
pages/market/data/statistics.vue

@ -313,4 +313,4 @@ export default {
font-weight: bold; font-weight: bold;
} }
} }
</style> </style>

2
pages/student/login/login.vue

@ -179,7 +179,7 @@
this.openViewHome(); this.openViewHome();
} else { } else {
uni.showToast({ uni.showToast({
title: res || '登录失败', title: res.msg || '登录失败',
icon: 'none' icon: 'none'
}); });
} }

Loading…
Cancel
Save