Commit a4d3eb16 authored by youjie's avatar youjie

no message

parent 20346528
...@@ -173,7 +173,7 @@ export function GetOrderPage(data) { ...@@ -173,7 +173,7 @@ export function GetOrderPage(data) {
*/ */
export function GetStudentPageList(data) { export function GetStudentPageList(data) {
return request({ return request({
url: '/User/GetStudentPageList', url: '/AppletCenter/GetStudentPageList',//'/User/GetStudentPageList'
method: 'post', method: 'post',
data data
}) })
......
...@@ -103,14 +103,14 @@ ...@@ -103,14 +103,14 @@
<view class="header-text">输入该账号注册的手机号</view> <view class="header-text">输入该账号注册的手机号</view>
<view class="header-input"> <view class="header-input">
<van-cell-group> <van-cell-group>
<van-field :value="msg.StuTel" placeholder="输入手机号" clearable input-align="center" @input="usernameInput"> <van-field type="tel" :value="Account" placeholder="输入手机号"
</van-field> clearable input-align="center" right-icon="search" @blur="usernameInput" @click-icon="clickIcon"/>
</van-cell-group> </van-cell-group>
</view> </view>
</view> </view>
<view> <view>
<view class="user-item" v-for="(item,index) in dataList" :key="index" <view class="user-item" v-for="(item,index) in dataList" :key="index"
@click="item.checked=!item.checked,clickChecked()"> @click="clickChecked(item)">
<view class="avatar"> <view class="avatar">
{{item.StuName.substring(0,1)}} {{item.StuName.substring(0,1)}}
</view> </view>
...@@ -128,10 +128,10 @@ ...@@ -128,10 +128,10 @@
</view> </view>
</scroll-view> </scroll-view>
<view v-if="loading" class="addChild-buttom" @click="addChild"> <view v-if="loading" class="addChild-buttom" @click="addChild">
已选2个,确认添加 已选{{list.length}}个,确认添加
</view> </view>
<view v-else class="addChild-buttom active"> <view v-else class="addChild-buttom active">
已选2个,确认添加 已选{{list.length}}个,确认添加
</view> </view>
</view> </view>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
import Loadmore from "../../components/loadmore.vue"; import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom"; import bottom from "../../components/bottom";
import { import {
GetOrderPage,GetStudentPageList GetStudentPageList,SetMyChild
} from "../../api/erp"; } from "../../api/erp";
export default { export default {
components: { components: {
...@@ -166,28 +166,19 @@ ...@@ -166,28 +166,19 @@
let data = reactive({ let data = reactive({
loading:true, loading:true,
Account:'', Account:'',
form:{
Id:'',
AccountId:'',
StuId:'',
OpenId:'',
WeChatName:'',
WeChatImg:'',
UnionId:''
},
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 1000,
KeyWords:"",//关键词 KeyWords: '',//关键词
StuName: "", //昵称
StuTel: "", //电话
CreateBy: "", //负责人
StuStage: "", //客户阶段
StartTime: "", //开始时间
EndTime: "", //结束时间
QQ: '',
WechatNo: '',
StuType: '',
QStudentStatus: 1, //客户状态 1有效 2无效
AdvisorStatus: '', //当前状态
StuChannel: "",
CreateIds: [],
CreateType: "", //来源类型
StuSourceId: "", //来源人编号
CategoryId: "", //同行编号
School_Id: 0,
ClassName: "", //班级名称
}, },
pageCount: 0, pageCount: 0,
dataList: [], dataList: [],
...@@ -196,25 +187,50 @@ ...@@ -196,25 +187,50 @@
timer: null, //防抖 timer: null, //防抖
}); });
const methods = { const methods = {
clickChecked(){ clickChecked(item){
data.dataList.forEach(item=>{ data.dataList.forEach(i=>{
if(item.checked){ i.checked=false
data.list.push(item) if(item.StuId==i.StuId){
data.list.push(i)
} }
}) })
item.checked = true
data.form = {
Id: item.Id,
AccountId: item.AccountId,
StuId: item.StuId,
OpenId: item.OpenId,
WeChatName: item.WeChatName,
WeChatImg: item.WeChatImg,
UnionId: item.UnionId
}
},
clickIcon(){
that.getData()
}, },
usernameInput(val) { usernameInput(val) {
data.msg.StuTel = val.detail; data.msg.KeyWords = val.detail.value
that.getData() that.getData()
}, },
addChild(){ async addChild(){
if(!data.form.Id){
uni.showToast({
title: '请选择需要添加的小孩',
icon: 'none',
duration: 1000
})
return
}
data.loading = false data.loading = false
setTimeout(()=>{ uni.showLoading()
let res = await SetMyChild(data.form);
if (res) {
uni.hideLoading()
data.loading = true data.loading = true
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
},2000) }
}, },
async getData() { async getData() {
uni.showLoading() uni.showLoading()
...@@ -229,6 +245,8 @@ ...@@ -229,6 +245,8 @@
}; };
addList(data); addList(data);
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
data.dataList = res.Data&&res.Data.PageData;
return
if (data.msg.pageIndex === 1) { if (data.msg.pageIndex === 1) {
data.dataList = res.Data&&res.Data.PageData; data.dataList = res.Data&&res.Data.PageData;
} else { } else {
......
...@@ -199,11 +199,8 @@ ...@@ -199,11 +199,8 @@
} from "vue"; } from "vue";
import Loadmore from "../../components/loadmore.vue"; import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom"; import bottom from "../../components/bottom";
// import {
// MyChildList
// } from "../../api/index";
import { import {
MyChildList MyChildList,RemoveMyChild
} from "../../api/erp"; } from "../../api/erp";
export default { export default {
components: { components: {
...@@ -248,11 +245,17 @@ ...@@ -248,11 +245,17 @@
DelData(item){ DelData(item){
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '将要删除数据,是否继续', content: '将要删除数据,是否继续',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
let Msg = { uni.showLoading()
let msg = {
Id: item.Id
}
let res = RemoveMyChild(msg);
if (res) {
uni.hideLoading()
that.getData()
} }
} else if (res.cancel) { } else if (res.cancel) {
...@@ -293,7 +296,7 @@ ...@@ -293,7 +296,7 @@
}; };
let that = methods; let that = methods;
onMounted(() => { onMounted(() => {
that.getData()
}); });
return { return {
...toRefs(data), ...toRefs(data),
...@@ -305,6 +308,9 @@ ...@@ -305,6 +308,9 @@
// title: this.pageTitle // title: this.pageTitle
// }); // });
}, },
onShow(){
this.getData()
},
onReachBottom() { onReachBottom() {
if (this.msg.pageIndex < this.pageCount) { if (this.msg.pageIndex < this.pageCount) {
data.pageState = "loading"; data.pageState = "loading";
......
...@@ -102,6 +102,10 @@ ...@@ -102,6 +102,10 @@
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 100% max-width: 100%
} }
.diNum{
color: #111111;
margin-top: 10rpx;
}
/* image { /* image {
width: 20px; width: 20px;
...@@ -131,6 +135,7 @@ ...@@ -131,6 +135,7 @@
{{item.GuestName}} {{item.GuestName}}
</view> </view>
<view class="di">学员</view> <view class="di">学员</view>
<view class="diNum">应收:{{item.PreferPrice}}</view>
</view> </view>
<view class="p-lc-item"> <view class="p-lc-item">
<view>总课时</view> <view>总课时</view>
...@@ -138,6 +143,7 @@ ...@@ -138,6 +143,7 @@
{{item.TotalHours}} {{item.TotalHours}}
</view> </view>
<view class="di">课时</view> <view class="di">课时</view>
<view class="diNum">实收:{{item.Income}}</view>
</view> </view>
<view class="p-lc-item" style="display: none;"> <view class="p-lc-item" style="display: none;">
<view>完成课时</view> <view>完成课时</view>
...@@ -145,6 +151,7 @@ ...@@ -145,6 +151,7 @@
{{item.CompleteHours}} {{item.CompleteHours}}
</view> </view>
<view class="di">课时</view> <view class="di">课时</view>
</view> </view>
<view class="p-lc-item"> <view class="p-lc-item">
<view>状态</view> <view>状态</view>
...@@ -168,6 +175,7 @@ ...@@ -168,6 +175,7 @@
<text class="di" v-if="item.OrderState==3">取消</text> <text class="di" v-if="item.OrderState==3">取消</text>
<text class="di" v-if="item.OrderState==4">待付款</text> <text class="di" v-if="item.OrderState==4">待付款</text>
</view> </view>
<view class="diNum">剩余:{{item.SurplusMoney}}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -129,7 +129,6 @@ ...@@ -129,7 +129,6 @@
<view class="Grade" style="margin-bottom:20rpx" v-if="item.ClassScrollType!==2">{{ <view class="Grade" style="margin-bottom:20rpx" v-if="item.ClassScrollType!==2">{{
item.ClassName item.ClassName
}}</view> }}</view>
<view class="Grade">等级:{{ item.CourseRate||'' }}</view>
<view><text class="Grade">状态:</text> <view><text class="Grade">状态:</text>
<text class="StatusName" v-if="item.TotalHours>item.CompleteHours"> <text class="StatusName" v-if="item.TotalHours>item.CompleteHours">
学习中 学习中
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment