1.更新了体检上门

2.修复自费成功页面无法隐藏加载中页面问题
This commit is contained in:
terry.wang
2025-11-28 16:19:59 +08:00
parent 493fa4f1e1
commit ecf417b189
22 changed files with 5187 additions and 30 deletions

View File

@@ -39,6 +39,8 @@
"pages/yib/yib",
"pages/kfdj/kfdj",
"pages/kfdjMgr/kfdjMgr",
"pages/tjsm/tjsm",
"pages/tjsmMgr/tjsmMgr",
"pages/xytj/xytj",
"pages/studentMgr/studentMgr",
"pages/studentMsgDel/studentMsgDel",
@@ -46,6 +48,8 @@
"pages/checkout/checkout",
"pages/categorykf/categorykf",
"pages/checkoutkf/checkoutkf",
"pages/categorysm/categorysm",
"pages/checkoutsm/checkoutsm",
"pages/wxDetail/wxDetail",
"pages/webwiew/webview",
"pages/view/view",

View File

@@ -4,6 +4,7 @@
// 局域网测试使用
// var WxApiRoot = 'http://192.168.10.172:58080/app-api/member/';
//var WxKFApiRoot = 'http://192.168.10.172:58081/kfapp-api/member/';
// var WxSMApiRoot = 'https://nxwj.btlsoln.com:58080/smapp-api/member/';
//var WxApiRoot = 'http://192.168.10.172:58080/app-api/member/';
// 云平台部署时使用
@@ -12,6 +13,7 @@
// 云平台上线时使用
var WxApiRoot = 'https://xytj.btlsoln.com/app-api/member/';
var WxKFApiRoot = 'https://xytj.btlsoln.com/kfapp-api/member/';
var WxSMApiRoot = 'https://xytj.btlsoln.com/smapp-api/member/';
module.exports = {
uploadimg: WxApiRoot + 'dept-info/upload', //图片文件上传服务器
@@ -34,6 +36,7 @@ module.exports = {
updateOrder: WxApiRoot + 'order-info/updateOrder', // 缴费项目
listOrder: WxApiRoot + 'order-info/listOrder', // 缴费项目
//康复到家部分
kfdeptinfo: WxKFApiRoot + 'dept-info/list-all-simple', //部门数据
kfstudentinfo: WxKFApiRoot + 'dept-info/list-student', //学生数据
kfiteminfo: WxKFApiRoot + 'dept-info/list-item', //项目数据
@@ -51,4 +54,21 @@ module.exports = {
kfupdateOrder: WxKFApiRoot + 'order-info/updateOrder', // 缴费项目
kflistOrder: WxKFApiRoot + 'order-info/listOrder', // 缴费项目
//体检上门部分
smdeptinfo: WxSMApiRoot + 'dept-info/list-all-simple', //部门数据
smstudentinfo: WxSMApiRoot + 'dept-info/list-student', //学生数据
smiteminfo: WxSMApiRoot + 'dept-info/list-item', //项目数据
smxyrwinfo: WxSMApiRoot + 'dept-info/list-xyrw', //任务信息
smcreatestudent: WxSMApiRoot + 'dept-info/create', //新建体检人
smupdatestudent: WxSMApiRoot + 'dept-info/update', //修改体检人
smdeletestudent: WxSMApiRoot + 'dept-info/delete', //删除体检人
smstudentByparent: WxSMApiRoot + 'dept-info/list-simple-student', //获取家长下的学生
smstudentByInit: WxSMApiRoot + 'dept-info/list-init-student', //获取待确认学生
smaddUser: WxSMApiRoot + 'dept-info/his/addUser', //下园学生建档
smorderinfo: WxSMApiRoot + 'order-info/payorder', // 缴费项目
smconfirmOrder: WxSMApiRoot + 'order-info/confirmOrder', // 缴费项目
smupdateOrder: WxSMApiRoot + 'order-info/updateOrder', // 缴费项目
smlistOrder: WxSMApiRoot + 'order-info/listOrder', // 缴费项目
};

View File

@@ -0,0 +1,221 @@
var util = require('../../utils/util.js');
var api = require('../../config/api.js');
var app = getApp();
Page({
data: {
//已选的项目
disablecheck : true,
//上一个页面带来的信息
selectName: '',
selectNationId: '',
selectClassName: '',
selectSchoolName: '',
selectPatid: '',
//学生信息
studentlist:[],
studentSwitch: false,
standardList: [],
smStandardList: [],
smStandardContent: '',
addtionList: [],
smAddtionList: [],
id: 0,
currentCategory: {},
scrollLeft: 0,
scrollTop: 0,
scrollHeight: 0,
page: 1,
limit: 10
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
this.setData({
selectName:options.name,
selectNationId:options.nationid,
selectClassName:options.classname,
selectSchoolName:options.schoolname,
selectPatid: options.patid
})
var that = this;
wx.getSystemInfo({
success: function(res) {
that.setData({
scrollHeight: res.windowHeight
});
}
});
},
//checkbox status
onCheckOptionChange(event) {
let itemIndex = event.target.dataset.itemIndex;
let that = this;
// console.log(itemIndex);
// console.log(event);
//编辑状态
let tmpCartData = this.data.smAddtionList.map(function(element, index, array) {
if (index == itemIndex) {
element.checked = !element.checked;
}
return element;
});
that.setData({
smAddtionList: tmpCartData
});
},
//checkbox status
onCheckStandardChange(event) {
let itemIndex = event.target.dataset.itemIndex;
let that = this;
// console.log(itemIndex);
// console.log(event);
//编辑状态
let tmpCartData = this.data.smStandardList.map(function(element, index, array) {
if (index == itemIndex) {
element.checked = !element.checked;
}
return element;
});
that.setData({
smStandardList: tmpCartData
});
},
numFilter(value){
console.log(value);
const realVal = parseFloat(value).toFixed(2);//表示保留一位函数
return realVal;
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
console.log("category onshow");
this.getstandardList();
this.getaddtionList();
//this.getPerList();
},
onHide: function() {
// 页面隐藏
},
getstandardList: function() {
var that = this;
util.request(api.smiteminfo, {
packageno: '666',
patid: this.data.selectPatid
})
.then(function(res) {
console.log(res.data);
that.setData({
standardList: res.data,
});
// 将后台返回的 res 数组数据进行新增一个字段
if(res.data != null){
res.data.forEach(function(item) {
// 获取图片数组length范围内的随机 index
//var randomIndex = Math.floor(Math.random() * that.data.srcList.length);
item.checked = 0;
});
that.setData({
smStandardList: res.data,
smStandardContent: res.data[0].itemno
})
}
});
},
getaddtionList: function() {
var that = this;
util.request(api.smiteminfo, {
packageno: '0',
patid: this.data.selectPatid
})
.then(function(res) {
console.log(res.data);
that.setData({
addtionList: res.data,
});
if(res.data != null){
// 将后台返回的 res 数组数据进行新增一个字段
res.data.forEach(function(item) {
// 获取图片数组length范围内的随机 index
//var randomIndex = Math.floor(Math.random() * that.data.srcList.length);
item.checked = 0;
});
that.setData({
smAddtionList: res.data
})
}
});
console.log(this.data.smAddtionList.length, "smAddtionList length");
},
addFast: function(){
var filterNum = this.data.smStandardList.filter(function(person,index,arrs){
return person.checked==true
});
var filterNum1 = this.data.smAddtionList.filter(function(person,index,arrs){
return person.checked==true
});
if( (filterNum.length == 0) && (filterNum1.length == 0)){
wx.showToast({
title: '没有选择项目',
})
}else{
app.globalData.gStandardList = this.data.smStandardList;
app.globalData.gAddtionList = this.data.smAddtionList;
app.globalData.gStandardContent = this.data.smStandardContent;
// 设置好list转到结算页面
try {
// wx.setStorageSync('cartId', res.data);
// wx.setStorageSync('grouponRulesId', checkedGroupon.id);
// wx.setStorageSync('grouponLinkId', that.data.grouponLink.id);
wx.navigateTo({
url: '/pages/checkoutsm/checkoutsm?name=' + this.data.selectName + '&nationid=' + this.data.selectNationId + '&classname=' + this.data.selectClassName + '&schoolname=' + this.data.selectSchoolName + '&patid=' + this.data.selectPatid,
})
} catch (e) {}
}
},
onTabItemTap(item) {
// 判断是否要阻止切换
console.log("切换tab");
if (app.globalData.hasXyrw == false) {
// 阻止切换
wx.switchTab({
url: '/pages/index/index'
})
return false;
}
// 允许切换
return true;
},
onUnload: function() {
// 页面关闭
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,110 @@
<!-- <view class="cart-bottom">
<van-checkbox value="checked" bind:change="checkedAll">全选5</van-checkbox>
</view> -->
<view class="container">
<!-- <view class="item">
<view class="item-header">
<view class="item-header-cont">
项目列表
</view>
</view>
</view> -->
<view class="form">
<!-- <view class="tjb-info-right" >
<view class="tjb-info-content">
<van-button round type="info" icon="exchange" bind:click="chgDefault" size="small">切换体检人</van-button>
</view>
</view> -->
<van-popup
show="{{ studentSwitch }}"
position="bottom"
custom-style="height: 50%"
bind:close="studentShutdown"
>
<view class = "pickempty" wx:if = "{{ studentlist.length == 0 }}">无数据</view>
<view wx:if = "{{ studentlist != 0 }}">
<van-picker
show-toolbar
title="请选择"
columns="{{ studentlist }}"
value-key="name"
bind:cancel="studentShutdown"
bind:confirm="studentIdentification"
/>
</view>
</van-popup>
<view class="container">请核对项目后,选择开单!开单后请及时缴费,超过开单当天24:00后,订单自动取消,如需缴费,请重新选择项目并开单!</view>
<view class="tjinfo" >
<!-- 默认160rpx 最多只能放6个汉字 -->
<view class="tjinfo-left">单位:</view>
<view class="tjinfo-middle">{{ selectSchoolName }}</view>
</view>
<!-- <view class="tjinfo" >
<view class="tjinfo-left">班级:</view>
<view class="tjinfo-middle">{{ selectClassName }}</view>
</view> -->
<view class="tjinfo" >
<view class="tjinfo-left">姓名:</view>
<view class="tjinfo-middle">{{ selectName }}</view>
</view>
<!-- 分割线 -->
<view class="view_fengexian">
<view ></view>
<view ></view>
</view>
<view class="tjitem" wx:if = "{{smAddtionList.length != 0}}" >
<view class="tjitem-left-header">体检项目</view>
</view>
<view class="tjitem" wx:if = "{{smAddtionList.length == 0 && smStandardList.length == 0 }}" >
<view class="tjitem-left-header">无项目</view>
</view>
<!-- <view class="tjitem" >
<view class="tjitem-list">静态心电图</view>
<view class="tjitem-right">¥80</view>
</view> -->
<view class="tjitem-list-wrap {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}"
wx:for="{{smAddtionList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex">
<view class="tjitem-check">
<view class="tjitem-check-wrap" wx:if = "{{iitem.showflag == 0}}" >
<van-checkbox value="{{ iitem.checked }}" bind:change="onCheckOptionChange" checked-color="#07c160" data-item-index="{{iindex}}"/>
</view>
<view class="tjitem-check-wrap" wx:if = "{{iitem.showflag == 1}}" >
<van-checkbox disabled value="{{ disablecheck }}" bind:change="onCheckOptionChange" checked-color="#07c160" data-item-index="{{iindex}}"/>
</view>
</view>
<view class="tjitem-list" wx:if = "{{iitem.showflag == 0}}">{{iitem.itemname}}</view>
<view class="tjitem-list-disable" wx:if = "{{iitem.showflag == 1}}">{{iitem.itemname}}</view>
<view class="tjitem-right" wx:if = "{{iitem.showflag == 0}}" >¥{{iitem.itemprice}}</view>
<view class="tjitem-right-disable" wx:if = "{{iitem.showflag == 1}}" >¥{{iitem.itemprice}}</view>
</view>
</view>
</view>
<!-- 确保信息显示 -->
<view class="area">
<view class="area-header">
<view class="area-header-cont">
</view>
</view>
</view>
<view class="bottom-btn">
<view class="c" bindtap="addFast" >提交订单</view>
</view>

View File

@@ -0,0 +1,554 @@
.container {
background: #f9f9f9;
}
.tjb-info-right{
height: 80rpx;
width: 100%;
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #0e0af1; */
}
.tjb-info-content{
width: 220rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-left: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjinfo{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #0e0af1; */
}
.tjinfo-left{
width: 160rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-left: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjinfo-middle{
flex: auto;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem{
height: 120rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-left-header{
height: 100%;
width: 300rpx;
font-size: 35rpx;
color: #333;
margin-left: 100rpx;
line-height: 120rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-left{
height: 100%;
width: 160rpx;
font-size: 25rpx;
color: #333;
margin-left: 20rpx;
line-height: 120rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-right{
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-right: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-right-disable{
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-right: 50rpx;
/* text-decoration:line-through; */
/* border: 1rpx solid #f10a0a; */
}
.tjitem-content{
height: 200rpx;
width: 100%;
font-size: 25rpx;
color: #333;
line-height: 50rpx;
margin-left: 30rpx;
margin-right: 50rpx;
margin-top: 10rpx;
/* border: 1rpx solid #340af1; */
}
.tjitem-content-disable{
height: 200rpx;
width: 100%;
font-size: 25rpx;
color: #333;
line-height: 50rpx;
margin-left: 30rpx;
margin-right: 50rpx;
margin-top: 10rpx;
/* text-decoration:line-through; */
/* border: 1rpx solid #340af1; */
}
.container{
font-size: 24rpx;
color:#000;
line-height: 40rpx;
background-color: #f2f0f4;
}
.view_fengexian {
width: 96%;
height: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin: 0rpx 2% 0rpx 2%;
}
/* 两个view的样式 */
.view_fengexian view {
width: 100%;
height: 2rpx;
/* background: linear-gradient(to right, #ead6ee, #a0f1ea); */
background: rgb(241, 237, 237);
}
/* 字体的样式 */
.text_fengexian {
font-size: 25rpx;
color: rgb(253, 143, 143);
margin: 0rpx 2% 0rpx 2%;
}
.tjitem-line{
height: 100%;
width: 100%;
font-size: 25rpx;
color: #333;
line-height: 10rpx;
margin-left: 30rpx;
/* border: 1rpx solid #340af1; */
}
.tjitem-list-wrap{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-list{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-list-disable{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
/* text-decoration:line-through; */
/* border: 1rpx solid #85f10a; */
}
.tjitem-list-big{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 35rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-list-big-disable{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 35rpx;
color: #333;
line-height: 80rpx;
/* text-decoration:line-through; */
/* border: 1rpx solid #85f10a; */
}
.tjitem-check{
height: 100%;
width: 50rpx;
font-size: 25rpx;
color: #333;
margin-left: 50rpx;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-check-wrap{
width: 50rpx;
font-size: 25rpx;
color: #333;
margin-top: 20rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-input{
flex: 1;
font-size: 25rpx;
color: #333;
line-height: 120rpx;
margin-left: 30rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-inputf{
flex: 1;
font-size: 25rpx;
color: #333;
line-height: 120rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-inputs{
display: flex !important;
}
.tjitem-sr{
border: 0;
}
.cart-bottom {
position: fixed;
bottom: 0;
left: 0;
height: 100rpx;
width: 100%;
background: #fff;
display: flex;
}
.item{
height: 100rpx;
margin-bottom: 100rpx;
position: relative;
background: #fff;
}
.item-header{
height: 120px;
width: 100%;
display: flex;
background-color: rgba(52,120,247);
border-radius: 15rpx;
}
.item-header .item-header-cont {
font-size: 35rpx;
font-weight: bold;
justify-content: center;
width: 95%;
margin: 60rpx auto;
height: 80rpx;
display: flex;
align-items: center;
}
.area{
height: 100rpx;
margin-bottom: 100rpx;
position: relative;
background: #f4f4f4;
}
.service{
font-size: 35rpx;
font-weight: bold;
display: flex;
align-items: center;
margin-top: 80rpx;
}
.service icon{
width: 40rpx;
height: 15rpx;
margin-right: 20rpx;
background-color: #50CEBB;
border-radius: 15rpx;
}
.wrap{
height: 100%;
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
}
.cate-nav {
position: fixed;
left: 0;
top: 0;
z-index: 1000;
}
.cate-nav-body {
height: 84rpx;
white-space: nowrap;
background: #fff;
border-top: 1px solid rgba(0, 0, 0, 0.15);
overflow: hidden;
}
.cate-nav .item {
display: inline-block;
height: 84rpx;
min-width: 130rpx;
padding: 0 15rpx;
}
.cate-nav .item .name {
display: block;
height: 84rpx;
padding: 0 20rpx;
line-height: 84rpx;
color: #333;
font-size: 30rpx;
width: auto;
}
.cate-nav .item.active .name {
color: #ab956d;
border-bottom: 2px solid #ab956d;
}
.cate-item {
margin-top: 94rpx;
margin-left: 25rpx;
height: auto;
overflow: hidden;
}
.cate-item .h {
height: 145rpx;
width: 750rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.cate-item .h .name {
display: block;
height: 35rpx;
margin-bottom: 18rpx;
font-size: 30rpx;
color: #333;
}
.cate-item .h .desc {
display: block;
height: 24rpx;
font-size: 24rpx;
color: #999;
}
.cate-item .b {
width: 750rpx;
padding: 0 6.25rpx;
height: auto;
overflow: hidden;
}
.cate-item .b .item {
float: left;
background: #fff;
width: 165rpx;
margin-bottom: 6.25rpx;
padding-bottom: 33.333rpx;
height: auto;
overflow: hidden;
text-align: center;
/* border: 2px solid #ab956d; */
}
.cate-item .b .item-b {
margin-left: 10.25rpx;
}
.cate-item .b .item {
margin-left: 10.25rpx;
}
.cate-item .item .img {
width: 82rpx;
height: 82rpx;
}
.cate-item .item .name {
display: block;
width: 165.625rpx;
height: 70rpx;
margin: 11.5rpx 0 22rpx 0;
text-align: center;
font-size: 28rpx;
color: #333;
/* text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
align-content: center; */
}
.cate-item .item .price {
display: block;
width: 165.625rpx;
height: 30rpx;
text-align: center;
font-size: 30rpx;
color: #ab956d;
}
.bottom-btn {
position: fixed;
left: 0;
bottom: 0;
z-index: 10;
width: 750rpx;
height: 100rpx;
display: flex;
background: #fff;
margin-bottom: 0rpx;
margin-right: 100rpx;
}
.bottom-btn .l {
float: left;
height: 100rpx;
width: 162rpx;
border: 1px solid #f4f4f4;
display: flex;
align-items: center;
justify-content: center;
}
.bottom-btn .l.l-collect {
border-right: none;
border-left: none;
text-align: center;
width: 90rpx;
}
.bottom-btn .l.l-collect .icon {
position: absolute;
top: 28rpx;
left: 20rpx;
font-size: 44rpx;
}
.bottom-btn .l.l-kefu {
position: relative;
height: 54rpx;
width: 63rpx;
}
.bottom-btn .l.l-cart .box {
position: relative;
height: 60rpx;
width: 60rpx;
}
.bottom-btn .l.l-cart .cart-count {
height: 28rpx;
width: 28rpx;
z-index: 10;
position: absolute;
top: 0;
right: 0;
background: #7232dd;
text-align: center;
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-radius: 50%;
}
.bottom-btn .l.l-cart .icon {
position: absolute;
top: 10rpx;
left: 0;
font-size: 44rpx;
}
.bottom-btn .c {
float: left;
background: #7232dd;
height: 80rpx;
line-height: 80rpx;
flex: 1;
text-align: center;
color: #fff;
border-radius: 30px 30px 30px 30px;
margin-top: 5rpx;
margin-bottom: 5rpx;
margin-right: 10rpx;
margin-left: 500rpx;
}
.bottom-btn .r {
border: 1px solid #CCB5F2;
background: #CCB5F2;
float: left;
height: 100rpx;
line-height: 96rpx;
flex: 1;
text-align: center;
color: #fff;
border-radius: 15px 0px 0px 15px;
}

View File

@@ -0,0 +1,229 @@
var util = require('../../utils/util.js');
var api = require('../../config/api.js');
var app = getApp();
Page({
data: {
isTipsShow: false, //控制确认提示信息对话框
//上一个页面带来的信息
isShow: false,
selectName: '',
selectNationId: '',
selectClassName: '',
selectSchoolName: '',
selectPatid: '',
list: [], //成功开单信息
listfail: [], //失败开单信息
hideStadndard: null,
hideAddtion: null,
checkStandardList: [],
checkStandardContent: '',
checkAddtionList: [],
orderTotalPrice: 0.00, //基础总价
orderTotalPriceAddtion: 0.00, //附加总价
totalPrice: 0.00, //总价
totalPriceDisp: '',
message: ''
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
var that = this;
that.setData({
checkStandardList: app.globalData.gStandardList,
checkStandardContent: app.globalData.gStandardContent,
checkAddtionList: app.globalData.gAddtionList
});
this.setData({
selectName:options.name,
selectNationId:options.nationid,
selectClassName:options.classname,
selectSchoolName:options.schoolname,
selectPatid: options.patid
})
// console.log(this.data.checkStandardList);
var filterNum = this.data.checkStandardList.filter(function(person,index,arrs){
return person.checked==true
});
if(filterNum.length == 0) {
that.setData({
hideStadndard: 0,
checkStandardList: filterNum
});
}else{
that.setData({
hideStadndard: 1,
checkStandardList: filterNum
});
}
// console.log(this.data.hideStadndard);
console.log("filterNum");
console.log(filterNum);
var filterNum1 = this.data.checkAddtionList.filter(function(person,index,arrs){
return person.checked==true
});
if(filterNum1.length == 0) {
that.setData({
hideAddtion: 0,
checkAddtionList: filterNum1
});
}else{
that.setData({
hideAddtion: 1,
checkAddtionList: filterNum1
});
}
// console.log(this.data.hideAddtion);
console.log("filterNum1");
console.log(filterNum1);
//计算总金额
this.data.checkStandardList.forEach((item) => {
console.log(item);
this.data.orderTotalPrice = this.data.orderTotalPrice + parseFloat(item.itemprice)*100;
});
console.log(this.data.orderTotalPrice/100);
this.data.checkAddtionList.forEach((item) => {
console.log(item);
this.data.orderTotalPriceAddtion = this.data.orderTotalPriceAddtion + parseFloat(item.itemprice)*100;
});
console.log(this.data.orderTotalPriceAddtion/100);
this.data.totalPrice = (this.data.orderTotalPrice + this.data.orderTotalPriceAddtion) / 100;
this.setData({
totalPriceDisp: this.data.totalPrice.toString()
});
console.log(this.data.totalPriceDisp);
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
//获取checkou信息
getCheckoutInfo: function() {
let that = this;
util.request(api.smCartCheckout, {
cartId: that.data.cartId,
addressId: that.data.addressId,
couponId: that.data.couponId,
userCouponId: that.data.userCouponId,
grouponRulesId: that.data.grouponRulesId
}).then(function(res) {
if (res.errno === 0) {
that.setData({
checkedGoodsList: res.data.checkedGoodsList,
checkedAddress: res.data.checkedAddress,
availableCouponLength: res.data.availableCouponLength,
actualPrice: res.data.actualPrice,
couponPrice: res.data.couponPrice,
grouponPrice: res.data.grouponPrice,
freightPrice: res.data.freightPrice,
goodsTotalPrice: res.data.goodsTotalPrice,
orderTotalPrice: res.data.orderTotalPrice,
addressId: res.data.addressId,
couponId: res.data.couponId,
userCouponId: res.data.userCouponId,
grouponRulesId: res.data.grouponRulesId,
});
}
wx.hideLoading();
});
},
bindMessageInput: function(e) {
this.setData({
message: e.detail.value
});
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
// wx.showLoading({
// title: '加载中...',
// });
//this.getCheckoutInfo();
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
onNavToJF: function() {
// setTimeout(item => {
// wx.navigateBack({
// delta: 3 //返回上一级页面
// })
// },1000)
wx.navigateBack({
delta: 3 //返回上一级页面
})
wx.navigateTo({
url: '/pages/payment/payment',
})
},
onConfirmTips: function(){
util.requestPost(api.smorderinfo, {
patid: this.data.selectPatid,
name: this.data.selectName,
className: this.data.selectClassName,
schoolName: this.data.selectSchoolName,
nationId: this.data.selectNationId,
iteminfo: this.data.checkStandardList,
itemkxinfo: this.data.checkAddtionList
}).then(res => {
console.log(res);
if (res.errCode === '0') {
this.setData({
list: res.list,
listfail: res.listF,
isShow: true
})
// wx.showToast({
// title: '开单成功',
// icon:'success'
// })
// setTimeout(item => {
// wx.navigateBack({
// delta: 3 //返回上一级页面
// })
// },1000)
} else {
util.showErrorToast(res.errmsg);
}
});
},
onCancelTips: function(){
wx.navigateBack({
delta: 1 //返回上一级页面
})
},
submitOrder: function() {
this.setData({
isTipsShow: true
});
console.log("tips");
}
});

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,113 @@
<view class="container">
<view class="message-box">
<van-field
value="{{ value }}"
placeholder="请核对项目后,选择开单!成功后,请到门诊结算付款!"
disabled
/>
</view>
<view class="tjinfo" >
<!-- 默认160rpx 最多只能放6个汉字 -->
<view class="tjinfo-left">学校:</view>
<view class="tjinfo-middle">{{ selectSchoolName }}</view>
</view>
<!-- <view class="tjinfo" >
<view class="tjinfo-left">班级:</view>
<view class="tjinfo-middle">{{ selectClassName }}</view>
</view> -->
<view class="tjinfo" >
<view class="tjinfo-left">姓名:</view>
<view class="tjinfo-middle">{{ selectName }}</view>
</view>
<!-- 分割线 -->
<view class="view_fengexian">
<view ></view>
<!-- <text class="text_fengexian"></text> -->
<view ></view>
</view>
<view hidden="{{!hideStadndard}}">
<view class="tjitem" >
<view class="tjitem-list-wrap {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}"
wx:for="{{checkStandardList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex">
<view class="tjitem-list-big" wx:if="{{iitem.checked}}">{{iitem.itemname}}</view>
<view class="tjitem-right" wx:if="{{iitem.checked}}">¥{{iitem.itemprice}}</view>
</view>
</view>
<view class="tjitem" >
<view class="tjitem-content"> {{checkStandardContent}} </view>
</view>
</view>
<!-- 分割线 -->
<view class="view_fengexian">
<view ></view>
<!-- <text class="text_fengexian"></text> -->
<view ></view>
</view>
<view hidden="{{!hideAddtion}}">
<view class="tjitem" >
<view class="tjitem-left-header">可选项目</view>
</view>
<view class="tjitem-list-wrap {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}"
wx:for="{{checkAddtionList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex">
<view class="tjitem-list" wx:if="{{iitem.checked}}">{{iitem.itemname}}</view>
<view class="tjitem-right" wx:if="{{iitem.checked}}">¥{{iitem.itemprice}}</view>
</view>
</view>
<!-- 确保信息显示 -->
<view class="area">
<view class="area-header">
<view class="area-header-cont">
</view>
</view>
</view>
<van-dialog
use-slot
title="开单成功,去缴费!"
bind:close="onNavToJF"
id="van-dialog"
confirm-button-text="去缴费"
show="{{ isShow }}"
>
<!-- <scroll-view class="kdlist" wx:if="{{isShow == true}}" scroll-y> -->
<scroll-view class="kdlist" scroll-y>
<van-cell-group custom-class="valueleft">
<van-cell wx:for="{{ list }}" wx:key="index" title="{{ item.itemname }}" title-width ="300rpx" value="{{ item.errMsg }}"/>
<van-cell wx:for="{{ listfail }}" wx:key="index" title="{{ item.itemname }}" title-width ="300rpx" value="失败"/>
</van-cell-group>
</scroll-view>
</van-dialog>
<van-dialog
use-slot
title="温馨提示"
bind:confirm="onConfirmTips"
bind:cancel="onCancelTips"
id="van-dialog1"
show-cancel-button
cancel-button-text="返回"
custom-class="tipsdialog"
show="{{ isTipsShow }}"
>
<view class="wrapStu" >
<text class="rwtips" space="ensp"> 请再次核对已选项目和价格,一旦点击“确认”后,所选项目无法取消,请仔细核对,如需修改,请按“返回”键后重新选择项目!</text>
</view>
</van-dialog>
<view class="order-total">
<view class="l">实付:¥{{totalPriceDisp}}</view>
<view class="r" bindtap="submitOrder">确认</view>
</view>
</view>

View File

@@ -0,0 +1,564 @@
page {
height: 100%;
background: #f4f4f4;
}
.item{
width: 100%;
display: flex;
/* justify-content: space-between; */
/* align-items: center; */
border-bottom: 1rpx solid #d10707;
}
.kdlist{
height: 600rpx;
width: 500rpx;
margin-left: 50rpx;
margin-top: 30rpx;
/* line-height: 120rpx; */
/* border: 1rpx solid #6306f8; */
}
.rwtips{
font-size: 30rpx;
font-weight: bold;
/* color: rgb(253, 6, 6); */
display: flex;
justify-content: center;
margin-top: 10rpx;
margin-left: 20rpx;
margin-right: 20rpx;
}
.tipsdialog{
color:rgb(253, 6, 6);
font-size: 30rpx;
font-weight: bold;
}
.tjb-info-right{
height: 80rpx;
width: 100%;
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #0e0af1; */
}
.tjb-info-content{
width: 220rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-left: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjinfo{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #0e0af1; */
}
.tjinfo-left{
width: 160rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-left: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjinfo-middle{
flex: auto;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem{
height: 120rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-left-header{
height: 100%;
width: 300rpx;
font-size: 35rpx;
color: #333;
margin-left: 30rpx;
line-height: 120rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-left{
height: 100%;
width: 160rpx;
font-size: 25rpx;
color: #333;
margin-left: 20rpx;
line-height: 120rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-right{
font-size: 25rpx;
color: #333;
line-height: 80rpx;
margin-right: 50rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-content{
height: 200rpx;
width: 100%;
font-size: 25rpx;
color: #333;
line-height: 50rpx;
margin-left: 30rpx;
margin-right: 50rpx;
margin-top: 10rpx;
/* border: 1rpx solid #340af1; */
}
.view_fengexian {
width: 96%;
height: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin: 0rpx 2% 0rpx 2%;
}
/* 两个view的样式 */
.view_fengexian view {
width: 100%;
height: 2rpx;
/* background: linear-gradient(to right, #ead6ee, #a0f1ea); */
background: rgb(241, 237, 237);
}
/* 字体的样式 */
.text_fengexian {
font-size: 25rpx;
color: rgb(253, 143, 143);
margin: 0rpx 2% 0rpx 2%;
}
.tjitem-line{
height: 100%;
width: 100%;
font-size: 25rpx;
color: #333;
line-height: 10rpx;
margin-left: 30rpx;
/* border: 1rpx solid #340af1; */
}
.tjitem-list-wrap{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 30rpx;
border-bottom: 1rpx solid #f8f8f8;
/* border: 1rpx solid #5b0af1; */
}
.tjitem-check{
height: 100%;
width: 50rpx;
font-size: 25rpx;
color: #333;
margin-left: 50rpx;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-list{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 25rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-list-big{
flex: 1;
height: 100%;
width: 200rpx;
font-size: 35rpx;
color: #333;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-check{
height: 100%;
width: 50rpx;
font-size: 25rpx;
color: #333;
margin-left: 50rpx;
line-height: 80rpx;
/* border: 1rpx solid #85f10a; */
}
.tjitem-check-wrap{
width: 50rpx;
font-size: 25rpx;
color: #333;
margin-top: 20rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-input{
flex: 1;
font-size: 25rpx;
color: #333;
line-height: 120rpx;
margin-left: 30rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-inputf{
flex: 1;
font-size: 25rpx;
color: #333;
line-height: 120rpx;
/* border: 1rpx solid #f10a0a; */
}
.tjitem-inputs{
display: flex !important;
}
.tjitem-sr{
border: 0;
}
.area{
height: 100rpx;
margin-bottom: 100rpx;
position: relative;
background: #f4f4f4;
}
.address-box {
width: 100%;
height: 166.55rpx;
background-size: 62.5rpx 10.5rpx;
margin-bottom: 20rpx;
padding-top: 10.5rpx;
}
.address-item {
display: flex;
height: 155.55rpx;
background: #fff;
padding: 41.6rpx 0 41.6rpx 31.25rpx;
}
.address-item.address-empty {
line-height: 75rpx;
text-align: center;
}
.address-box .l {
width: 125rpx;
height: 100%;
}
.address-box .l .name {
margin-left: 6.25rpx;
margin-top: -7.25rpx;
display: block;
width: 125rpx;
height: 43rpx;
line-height: 43rpx;
font-size: 30rpx;
color: #333;
margin-bottom: 5rpx;
}
.address-box .l .default {
margin-left: 6.25rpx;
display: block;
width: 62rpx;
height: 33rpx;
border-radius: 5rpx;
border: 1px solid #b4282d;
font-size: 20.5rpx;
text-align: center;
line-height: 29rpx;
color: #b4282d;
}
.address-box .m {
flex: 1;
height: 72.25rpx;
color: #999;
}
.address-box .mobile {
display: block;
height: 29rpx;
line-height: 29rpx;
margin-bottom: 6.25rpx;
font-size: 30rpx;
color: #333;
}
.address-box .address {
display: block;
height: 37.5rpx;
line-height: 37.5rpx;
font-size: 25rpx;
color: #666;
}
.address-box .r {
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
}
.address-box .r image {
width: 52.078rpx;
height: 52.078rpx;
}
.coupon-box {
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
}
.coupon-box .coupon-item {
width: 100%;
height: 108.3rpx;
overflow: hidden;
background: #fff;
display: flex;
padding-left: 31.25rpx;
}
.coupon-box .l {
flex: 1;
height: 43rpx;
line-height: 43rpx;
padding-top: 35rpx;
}
.coupon-box .l .name {
float: left;
font-size: 30rpx;
color: #666;
}
.coupon-box .l .txt {
float: right;
font-size: 30rpx;
color: #666;
}
.coupon-box .r {
margin-top: 15.5rpx;
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
}
.coupon-box .r image {
width: 52.078rpx;
height: 52.078rpx;
}
.message-box {
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
/* border: 1px solid rgb(226, 4, 4); */
}
.message-box .message-item {
height: 52.078rpx;
overflow: hidden;
background: #fff;
display: flex;
margin-left: 31.25rpx;
padding-right: 31.25rpx;
padding-top: 26rpx;
/* border: 1px solid rgb(226, 4, 4); */
}
.order-box {
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
}
.order-box .order-item {
height: 104.3rpx;
overflow: hidden;
background: #fff;
display: flex;
margin-left: 31.25rpx;
padding-right: 31.25rpx;
padding-top: 26rpx;
border-bottom: 1px solid #d9d9d9;
}
.order-box .order-item .l {
float: left;
height: 52rpx;
width: 50%;
line-height: 52rpx;
overflow: hidden;
}
.order-box .order-item .r {
float: right;
text-align: right;
width: 50%;
height: 52rpx;
line-height: 52rpx;
overflow: hidden;
}
.order-box .order-item.no-border {
border-bottom: none;
}
.goods-items {
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
padding-left: 31.25rpx;
margin-bottom: 120rpx;
}
.goods-items .item {
height: 192rpx;
padding-right: 31.25rpx;
display: flex;
align-items: center;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
.goods-items .item.no-border {
border-bottom: none;
}
.goods-items .item:last-child {
border-bottom: none;
}
.goods-items .img {
height: 145.83rpx;
width: 145.83rpx;
background-color: #f4f4f4;
margin-right: 20rpx;
}
.goods-items .img image {
height: 145.83rpx;
width: 145.83rpx;
}
.goods-items .info {
flex: 1;
height: 145.83rpx;
padding-top: 5rpx;
}
.goods-items .t {
height: 33rpx;
line-height: 33rpx;
margin-bottom: 10rpx;
overflow: hidden;
font-size: 30rpx;
color: #333;
}
.goods-items .t .name {
display: block;
float: left;
}
.goods-items .t .number {
display: block;
float: right;
text-align: right;
}
.goods-items .m {
height: 29rpx;
overflow: hidden;
line-height: 29rpx;
margin-bottom: 25rpx;
font-size: 25rpx;
color: #666;
}
.goods-items .b {
height: 41rpx;
overflow: hidden;
line-height: 41rpx;
font-size: 30rpx;
color: #333;
}
.order-total {
position: fixed;
left: 0;
bottom: 0rpx;
height: 100rpx;
width: 100%;
display: flex;
}
.order-total .l {
flex: 1;
height: 100rpx;
line-height: 100rpx;
color: #7232dd;
background: #fff;
font-size: 33rpx;
padding-left: 31.25rpx;
border-top: 1rpx solid rgba(0, 0, 0, 0.2);
border-bottom: 1rpx solid rgba(0, 0, 0, 0.2);
}
.order-total .r {
width: 233rpx;
height: 100rpx;
background: #7232dd;
border: 1px solid #7232dd;
line-height: 100rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
}

View File

@@ -108,6 +108,11 @@ Page({
icon: 'icon27',
SRC: '/pages/onehospitalization/onehospitalization'
},
{
name: '体检上门',
icon: 'icon25',
SRC: '/pages/tjsm/tjsm'
},
// {
// name: '院内统计',
// icon: 'icon23',

View File

@@ -19,8 +19,9 @@ Page({
name: '管理就诊人',
icon: "menu1"
},
{id:6,name:'管理体检人',icon:"menu1"},
{id:6,name:'管理儿童体检人',icon:"menu1"},
{id:7,name:'管理康复人员',icon:"menu1"},
{id:8,name:'管理体检人',icon:"menu1"},
{
id: 1,
name: '预约就诊记录',
@@ -130,8 +131,12 @@ Page({
wx.navigateTo({
url: '/pages/kfdjMgr/kfdjMgr',
})
}
},
}else if(id == 8){
wx.navigateTo({
url: '/pages/tjsmMgr/tjsmMgr',
})
}
},
getPhone() {
var tel = 18810399133;
tel = "" + tel;

100
pages/tjsm/actionsheet.wxss Normal file
View File

@@ -0,0 +1,100 @@
.actionsheet-mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 1000;
}
.actionsheet-panel {
position: absolute;
left: 0;
bottom: 0;
right: 0;
background-color: #fff;
z-index: 1001;
border-radius: 32rpx 32rpx 0 0;
max-height: 93vh;
overflow-y: auto;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.actionsheet-hd {
display: flex;
justify-content: space-between;
/* width: 100%; */
padding: 54rpx 40rpx 34rpx;
/* position: fixed;
top:0px;
z-index:999;
height: 100rpx; */
}
.actionsheet-hd-tt {
font-size: 40rpx;
line-height: 56rpx;
letter-spacing: 2rpx;
font-weight: bold;
color: #303133;
}
.actionsheet-icon-close {
display: block;
width: 48rpx;
height: 48rpx;
background: url('data:image/png;base64,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') center center no-repeat;
background-size: 100% 100%;
}
.actionsheet-box {
border: 2rpx solid #F8F8F8;
border-radius: 12rpx;
margin: 20rpx;
}
.actionsheet-box-hd {
position: relative;
font-size: 32rpx;
line-height: 44rpx;
font-weight: bold;
color: #303133;
margin: 50rpx 0 34rpx;
padding: 0 40rpx;
}
.actionsheet-box-hd:before {
content: '';
position: absolute;
left: 8rpx;
top: 50%;
width: 8rpx;
height: 34rpx;
transform: translateY(-50%);
background-color: #3B71EB;
}
.actionsheet-box-bd {
padding: 40rpx;
border-top: 2rpx solid #F8F8F8;
}
.actionsheet-box-item {
display: flex;
justify-content: space-between;
font-size: 28rpx;
line-height: 40rpx;
}
.actionsheet-box-item + .actionsheet-box-item {
margin-top: 24rpx;
}
.actionsheet-box-item-label {
color: #606266;
}
.actionsheet-box-item-sublabel {
color: #909399;
}
.actionsheet-box-item-value {
color: #606266;
}
.actionsheet-box-item-value.em {
color: #3B71EB;
}

816
pages/tjsm/tjsm.js Normal file
View File

@@ -0,0 +1,816 @@
const util = require('../../utils/util.js');
const api = require('../../config/api.js');
const user = require('../../utils/user.js');
//获取应用实例
const app = getApp();
Page({
data: {
actionsheetVisible: false,
listStand: [],
listAddtion: [],
//学生信息
list:[],
loadingHidden: true,
flag: false,
openid: '',
//任务信息
xyrwList: [],
rwname: '',
rwstatus: '',
rwempty: 0,
batchno: '',
//默认为0从根节点开始
parentid: 0,
//学生归属的学校id
deptid: 0,
//学生选择
studentxpList:[],
studentxpListBackup: [],
studentIndexes: '',
studentcurrent: '',
studentSwitch: false,
//班级选择
classxpList:[],
classxpListBackup: [],
classIndexes: '',
classcurrent: '',
classSwitch: false,
//学校选择
schoolxpList:[],
schoolxpListBackup: [],
schoolIndexes: '',
schoolcurrent: '',
schoolSwitch: false,
//社区选择
sqxpList:[],
sqxpListBackup: [],
sqIndexes: '',
sqcurrent: '',
sqSwitch: false,
//街道选择
deptxpList:[],
deptxpListBackup: [],
deptIndexes: '',
deptcurrent: '',
UserSwitch: false,
//体检部门信息
jdname: '',
sqname: '',
schoolname: '',
classname: '',
studentname: '',
xytjinfo: {
jdid: '',
jdname: '',
sqid: '',
sqname: '',
schoolid: '',
schoolname: '',
classid: '',
classname: ''
},
// 下拉框选项组件
dropvalue: '1',
droplists: [
{value:'1',text:'请选择项目名称'}
],
imgUrls: ["https://fy.btlsoln.com:8443/showFile/hospitalNotice/20220507/1651912958699.jpg",
"https://fy.btlsoln.com:8443/showFile/hospitalNotice/20220507/1651912958699.jpg"],
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
checked: true
},
naviToAdd(){
let state = 0
wx.navigateTo({
url: '/pages/tjsmMgr/tjsmMgr',
})
},
handleActionsheet() {
this.actionsheetVisible = !this.actionsheetVisible;
this.setData({
actionsheetVisible: this.actionsheetVisible
});
},
naviToDet: function(event) {
console.log("naviToDet");
console.log(event, "evnet");
const index = event.currentTarget.dataset.index
console.log(index, 'selectindex');
console.log(index.name, 'selectItem');
const selectName = index.name
const selectNationId = index.nationId
const selectClassName = index.className
const selectSchoolName = index.schoolName
const selectPatid = index.patid
wx.navigateTo({
url: '/pages/categorysm/categorysm?name=' + selectName + '&nationid=' + selectNationId + '&classname=' + selectClassName +
'&schoolname=' + selectSchoolName + '&patid=' + selectPatid,
})
},
naviToInfo: function(event) {
console.log("naviToInfo");
console.log(event, "evnet");
const index = event.currentTarget.dataset.index
console.log(index, 'selectindex');
if(index.feeflag == "1"){
this.getXyOrder(index.patid);
}
},
getXyOrder(patid){
let that = this;
util.requestPost(api.smlistOrder, {
patid: patid
})
.then(function(res) {
console.log(res);
if (res.errCode === '0') {
console.log("listOrder res:");
console.log(res);
that.setData({
listStand: res.listStand,
listAddtion: res.listAddtion,
actionsheetVisible: true
});
}
else{
}
});
},
//取学生列表
getPerList(batchno){
var that = this;
util.request(api.smstudentByparent, {
openid: app.globalData.openId,
batchno: batchno
})
.then(function(res) {
if (res.code === 0) {
console.log("list res:");
console.log(res);
console.log("list resdata:");
console.log(res.data);
that.setData({
list: res.data
});
console.log("list length", that.data.list.length);
if(that.data.list.length == 0 ){
that.setData({
loadingHidden: false,
flag: false
});
}else{
//有体检人,取出默认体检人
var filterNum = that.data.list.filter(function(person,index,arrs){
return person.defaultflag==0
});
console.log("fileter");
console.log(filterNum);
that.setData({
loadingHidden: true,
flag: true
});
}
that.setData({
loadingHidden: true
});
}
});
},
//获取下园任务列表
getXyrwList: function() {
var that = this;
util.request(api.smxyrwinfo, {
})
.then(function(res) {
if (res.code === 0) {
console.log("xyrwinfo resdata:");
console.log(res.data);
that.setData({
xyrwList: res.data
});
if(res.data.length == 0){
that.setData({
rwempty: 0
});
app.globalData.hasXyrw = false;
}else{
that.setData({
rwempty: 1,
rwname: res.data[0].batchName,
rwstatus: res.data[0].batchStatus
});
app.globalData.hasXyrw = true;
}
if(res.data[0].batchStatus == '1') {
that.setData({
rwstatus: '开始',
batchno: res.data[0].batchno
});
that.getPerList(res.data[0].batchno);
}
}
});
},
//学生
studentList: function() {
var that = this;
util.request(api.smstudentinfo, {
deptid: this.data.deptid
})
.then(function(res) {
if (res.code === 0) {
console.log("studentinfo res:");
console.log(res);
console.log("studentinfo resdata:");
console.log(res.data);
that.setData({
studentxpList: res.data,
studentxpListBackup: res.data
});
}
});
},
//开启控件
studentOn: function(){
this.setData({
studentSwitch: true
})
},
//关闭控件
studentShutdown: function(){
let List = [];
this.setData({
studentSwitch: false
})
//恢复数据
for(let i = 0;i < this.data.studentxpListBackup.length;i++){
List.push(this.data.studentxpListBackup[i]);
}
this.setData({
studentxpList: List,
studentIndexes: ''
})
},
//条件输入事件
setstudentIndexes(event){
this.setData({
studentIndexes: event.detail,
});
console.log("studentIndexes:" + event.detail)
},
//点击确定搜索时触发事件
studentGo: function(){
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1000
})
let row = [];
if(this.data.studentIndexes){
this.data.studentxpListBackup.forEach((item) => {
if (item.name.indexOf(this.data.studentIndexes) > -1) {
row.push(item);
}
});
}else{
row = this.data.studentxpListBackup
}
this.setData({
studentcurrent: this.data.studentIndexes,
studentxpList: row
})
},
//用户选择某个选项后触发事件
studentIdentification(event){
let List = [];
let Backups = this.data.studentxpListBackup;
let id = event.detail.value.id;
console.log("pick select value:");
console.log(event.detail.value);
console.log("pick select id:" + event.detail.index);
this.data.xytjinfo.studentid = event.detail.value.id;
this.data.xytjinfo.studentname = event.detail.value.name;
this.setData({ studentname: event.detail.value.name });
//根据选择的id获取下一级结构
//this.setData({ parentid: event.detail.value.id});
//this.studengList();
console.log("set select studentid:" + this.data.xytjinfo.studengid);
console.log("set select studentname:" + this.data.xytjinfo.studengname);
for(let i = 0;i < Backups.length;i++){
List.push(Backups[i]);
}
this.setData({
studentxpList: List,
})
console.log("pick after list:");
console.log(this.data.studentxpList);
console.log("pick after list backup");
console.log(this.data.studentxpListBackup);
this.studentShutdown();
},
//班级
classList: function() {
var that = this;
util.request(api.smdeptinfo, {
parentid: this.data.parentid
})
.then(function(res) {
if (res.code === 0) {
console.log("classinfo res:");
console.log(res);
console.log("classinfo resdata:");
console.log(res.data);
that.setData({
classxpList: res.data,
classxpListBackup: res.data
});
}
});
},
//开启控件
classOn: function(){
this.setData({
classSwitch: true
})
},
//关闭控件
classShutdown: function(){
let List = [];
this.setData({
classSwitch: false
})
//恢复数据
for(let i = 0;i < this.data.classxpListBackup.length;i++){
List.push(this.data.classxpListBackup[i]);
}
this.setData({
classxpList: List,
classIndexes: ''
})
},
//条件输入事件
setclassIndexes(event){
this.setData({
classIndexes: event.detail,
});
console.log("classIndexes:" + event.detail)
},
//点击确定搜索时触发事件
classGo: function(){
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1000
})
let row = [];
if(this.data.classIndexes){
this.data.classxpListBackup.forEach((item) => {
if (item.name.indexOf(this.data.classIndexes) > -1) {
row.push(item);
}
});
}else{
row = this.data.classxpListBackup
}
this.setData({
classcurrent: this.data.classIndexes,
classxpList: row
})
},
//用户选择某个选项后触发事件
classIdentification(event){
let List = [];
let Backups = this.data.classxpListBackup;
let id = event.detail.value.id;
console.log("pick select value:");
console.log(event.detail.value);
console.log("pick select id:" + event.detail.index);
this.data.xytjinfo.classid = event.detail.value.id;
this.data.xytjinfo.classname = event.detail.value.name;
this.setData({ classname: event.detail.value.name });
//根据选择的id获取下一级结构
this.setData({ deptid: event.detail.value.id});
this.studentList();
console.log("set select classid:" + this.data.xytjinfo.classid);
console.log("set select classname:" + this.data.xytjinfo.classname);
for(let i = 0;i < Backups.length;i++){
List.push(Backups[i]);
}
this.setData({
classxpList: List,
})
console.log("pick after list:");
console.log(this.data.classxpList);
console.log("pick after list backup");
console.log(this.data.classxpListBackup);
this.classShutdown();
},
//学校
schoolList: function() {
var that = this;
util.request(api.smdeptinfo, {
parentid: this.data.parentid
})
.then(function(res) {
if (res.code === 0) {
console.log("schoolinfo res:");
console.log(res);
console.log("schoolinfo resdata:");
console.log(res.data);
that.setData({
schoolxpList: res.data,
schoolxpListBackup: res.data
});
}
});
},
//开启控件
schoolOn: function(){
this.setData({
schoolSwitch: true
})
},
//关闭控件
schoolShutdown: function(){
let List = [];
this.setData({
schoolSwitch: false
})
//恢复数据
for(let i = 0;i < this.data.schoolxpListBackup.length;i++){
List.push(this.data.schoolxpListBackup[i]);
}
this.setData({
schoolxpList: List,
schoolIndexes: ''
})
},
//条件输入事件
setschoolIndexes(event){
this.setData({
schoolIndexes: event.detail,
});
console.log("schoolIndexes:" + event.detail)
},
//点击确定搜索时触发事件
schoolGo: function(){
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1000
})
let row = [];
if(this.data.schoolIndexes){
this.data.schoolxpListBackup.forEach((item) => {
if (item.name.indexOf(this.data.schoolIndexes) > -1) {
row.push(item);
}
});
}else{
row = this.data.schoolxpListBackup
}
this.setData({
schoolcurrent: this.data.schoolIndexes,
schoolxpList: row
})
},
//用户选择某个选项后触发事件
schoolIdentification(event){
let List = [];
let Backups = this.data.schoolxpListBackup;
let id = event.detail.value.id;
console.log("pick select value:");
console.log(event.detail.value);
console.log("pick select id:" + event.detail.index);
this.data.xytjinfo.schoolid = event.detail.value.id;
this.data.xytjinfo.schoolname = event.detail.value.name;
this.setData({ schoolname: event.detail.value.name });
//根据选择的id获取下一级结构
this.setData({ parentid: event.detail.value.id});
this.classList();
console.log("set select schoolid:" + this.data.xytjinfo.schoolid);
console.log("set select schoolname:" + this.data.xytjinfo.schoolname);
for(let i = 0;i < Backups.length;i++){
List.push(Backups[i]);
}
this.setData({
schoolxpList: List,
})
console.log("pick after list:");
console.log(this.data.schoolxpList);
console.log("pick after list backup");
console.log(this.data.schoolxpListBackup);
this.schoolShutdown();
},
//社区
sqList: function() {
var that = this;
util.request(api.smdeptinfo, {
parentid: this.data.parentid
})
.then(function(res) {
if (res.code === 0) {
console.log("sqinfo res:");
console.log(res);
console.log("sqinfo resdata:");
console.log(res.data);
that.setData({
sqxpList: res.data,
sqxpListBackup: res.data
});
}
});
},
//开启控件
sqOn: function(){
this.setData({
sqSwitch: true
})
},
//关闭控件
sqShutdown: function(){
let List = [];
this.setData({
sqSwitch: false
})
//恢复数据
for(let i = 0;i < this.data.sqxpListBackup.length;i++){
List.push(this.data.sqxpListBackup[i]);
}
this.setData({
sqxpList: List,
sqIndexes: ''
})
},
//条件输入事件
setsqIndexes(event){
this.setData({
sqIndexes: event.detail,
});
console.log("sqIndexes:" + event.detail)
},
//点击确定搜索时触发事件
sqGo: function(){
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1000
})
let row = [];
if(this.data.sqIndexes){
this.data.sqxpListBackup.forEach((item) => {
if (item.name.indexOf(this.data.sqIndexes) > -1) {
row.push(item);
}
});
}else{
row = this.data.sqxpListBackup
}
this.setData({
sqcurrent: this.data.sqIndexes,
sqxpList: row
})
},
//用户选择某个选项后触发事件
sqIdentification(event){
let List = [];
let Backups = this.data.sqxpListBackup;
let id = event.detail.value.id;
console.log("pick select value:");
console.log(event.detail.value);
console.log("pick select id:" + event.detail.index);
this.data.xytjinfo.sqid = event.detail.value.id;
this.data.xytjinfo.sqname = event.detail.value.name;
this.setData({ sqname: event.detail.value.name });
//根据选择的id获取下一级结构
this.setData({ parentid: event.detail.value.id});
this.schoolList();
console.log("set select sqid:" + this.data.xytjinfo.sqid);
console.log("set select sqname:" + this.data.xytjinfo.sqname);
for(let i = 0;i < Backups.length;i++){
List.push(Backups[i]);
}
this.setData({
sqxpList: List,
})
console.log("pick after list:");
console.log(this.data.sqxpList);
console.log("pick after list backup");
console.log(this.data.sqxpListBackup);
this.sqShutdown();
},
//街道
deptList: function() {
var that = this;
util.request(api.smdeptinfo, {
parentid: this.data.parentid
})
.then(function(res) {
if (res.code === 0) {
console.log("deptinfo res:");
console.log(res);
console.log("deptinfo resdata:");
console.log(res.data);
that.setData({
deptxpList: res.data,
deptxpListBackup: res.data
});
}
});
},
//条件输入事件
setDeptIndexes(event){
this.setData({
deptIndexes: event.detail,
});
console.log("deptIndexes:" + event.detail)
},
//点击确定搜索时触发事件
DeptGo: function(){
wx.showToast({
title: '加载中',
icon: "loading",
duration: 1000
})
let row = [];
if(this.data.deptIndexes){
this.data.deptxpListBackup.forEach((item) => {
if (item.name.indexOf(this.data.deptIndexes) > -1) {
row.push(item);
}
});
}else{
row = this.data.deptxpListBackup
}
this.setData({
deptcurrent: this.data.deptIndexes,
deptxpList: row
})
},
//开启控件
UserOn: function(){
this.setData({
UserSwitch: true
})
},
//关闭控件
UserShutdown: function(){
let List = [];
this.setData({
UserSwitch: false
})
//恢复数据
for(let i = 0;i < this.data.deptxpListBackup.length;i++){
List.push(this.data.deptxpListBackup[i]);
}
this.setData({
deptxpList: List,
deptIndexes: ''
})
},
//用户选择某个选项后触发事件
UserIdentification(event){
let List = [];
let Backups = this.data.deptxpListBackup;
let id = event.detail.value.id;
console.log("pick select value:");
console.log(event.detail.value);
console.log("pick select id:" + event.detail.index);
this.data.xytjinfo.jdid = event.detail.value.id;
this.data.xytjinfo.jdname = event.detail.value.name;
this.setData({ jdname: event.detail.value.name });
//根据选择的id获取下一级结构
this.setData({ parentid: event.detail.value.id});
this.sqList();
console.log("set select jdid:" + this.data.xytjinfo.jdid);
console.log("set select jdname:" + this.data.xytjinfo.jdname);
for(let i = 0;i < Backups.length;i++){
List.push(Backups[i]);
}
this.setData({
deptxpList: List,
})
console.log("pick after list:");
console.log(this.data.deptxpList);
console.log("pick after list backup");
console.log(this.data.deptxpListBackup);
this.UserShutdown();
},
onChange({ detail }) {
this.setData({ checked: detail });
},
onShareAppMessage: function() {
return {
title: '下园体检',
desc: '下园体检',
path: '/pages/index/index'
}
},
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
getImgList(){
wx.request({
url:'https://fy.btlsoln.com:8443/findHospitalNotice',
method:"GET",
data:{},
header: {
'content-type': 'application/json'
},
success: (res)=> {
console.log(res,'lunbotu')
this.setData({
imgUrls:res.data
})
}
})
},
onLoad: function(options) {
console.log("xytj load");
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
console.log("xytj onshow");
this.getXyrwList();
this.deptList();
// 页面初始化 options为页面跳转所带来的参数
//this.getPerList();
this.setData({
loadingHidden: false,
})
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
})

3
pages/tjsm/tjsm.json Normal file
View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

119
pages/tjsm/tjsm.wxml Normal file
View File

@@ -0,0 +1,119 @@
<!--index.wxml-->
<!-- <view class="banner">
<swiper indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" indicator-dots="true" circular="true">
<block wx:for="{{imgUrls}}" wx:key="item">
<swiper-item>
<image src="{{item}}{{item.IMG}}" class="slide-image" />
</swiper-item>
</block>
</swiper>
</view> -->
<view class="wrap">
<view class="service">
<icon></icon>
<text>当前批次</text>
</view>
<view class = "rwempty" wx:if = "{{ rwempty }}" >{{ rwname }}</view>
<!-- <view class = "pickempty" wx:if = "{{ rwempty }}" >{{ rwstatus }}</view> -->
<view class = "rwempty" wx:if = "{{ !rwempty }}" >当前无任务</view>
<view class="rwtips" wx:if = "{{ rwempty }}" >
<text>请点击体检人确定体检项目</text>
</view>
</view>
<view class="main">
<view class="content">
<loading hidden="{{loadingHidden}}">加载中...</loading>
<view wx:if="{{loadingHidden}}">
<view wx:if="{{flag == true}}">
<view class="studentitem" wx:for="{{list}}" wx:key="item" data-item="{{item}}" >
<view class="up" data-index="{{item}}" bindtap="naviToDet" >
<view class="name">{{item.name}}</view>
<view class="msg">
<view class="t1"></view>
<view class="icon" wx:if="{{item.feeflag == 0 || item.feeflag == null}}">
<view class="nofee" >未缴费</view>
</view>
<view class="icon" wx:else>
<view class="mr" >已缴费</view>
</view>
</view>
</view>
<view class="down" data-index="{{item}}" bindtap="naviToInfo">
<view>{{item.nationId}}</view>
<view class="msg">
<view class="t1"></view>
<view class="icon" wx:if="{{item.feeflag == 1}}">
<view class="detail" >查看详情</view>
</view>
</view>
</view>
</view>
</view>
<view wx:else="{{flag == false}}" class="zw">暂无体检人信息,请点击下方“添加体检人”按钮,确认体检人信息!</view>
<view class="btn" bindtap="naviToAdd">添加体检人</view>
</view>
</view>
<view
class="actionsheet"
hidden="{{!actionsheetVisible}}">
<view class="actionsheet-mask" bindtap="handleActionsheet"></view>
<scroll-view scroll-y class="actionsheet-panel">
<view class="actionsheet-hd">
<view class="actionsheet-hd-tt">缴费明细</view>
<icon class="actionsheet-icon-close" bindtap="handleActionsheet"></icon>
</view>
<view class="actionsheet-bd">
<view
class="actionsheet-box"
>
<!-- wx:for="{{prescriptionList}}" -->
<!-- wx:key="title" -->
<view class="actionsheet-box-hd" wx:if="{{listStand.length !=0}}">基本项目</view>
<!-- <view class="actionsheet-box-hd">{{item.title}}</view> -->
<view class="actionsheet-box-bd" wx:if="{{listStand.length !=0}}">
<view
class="actionsheet-box-item"
wx:for="{{listStand}}"
wx:key='item'
wx:for-item="items"
>
<view class="actionsheet-box-item-label-wrap">
<view class="actionsheet-box-item-label">{{items.itemname}}</view>
</view>
<view class="actionsheet-box-item-value">{{items.itemprice}}</view>
<!-- <view
class="actionsheet-box-item-value {{boxItem.highlight ? 'em' : ''}}">{{boxItem.xmje}}</view> -->
</view>
</view>
<view class="actionsheet-box-hd" wx:if="{{listAddtion.length !=0}}">可选项目</view>
<!-- <view class="actionsheet-box-hd">{{item.title}}</view> -->
<view class="actionsheet-box-bd" wx:if="{{listAddtion.length !=0}}">
<view
class="actionsheet-box-item"
wx:for="{{listAddtion}}"
wx:key='item'
wx:for-item="items"
>
<view class="actionsheet-box-item-label-wrap">
<view class="actionsheet-box-item-label">{{items.itemname}}</view>
</view>
<view class="actionsheet-box-item-value">{{items.itemprice}}</view>
<!-- <view
class="actionsheet-box-item-value {{boxItem.highlight ? 'em' : ''}}">{{boxItem.xmje}}</view> -->
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>

774
pages/tjsm/tjsm.wxss Normal file
View File

@@ -0,0 +1,774 @@
@import './actionsheet.wxss';
.main{
margin: 30rpx 0;
width: 750rpx;
}
.content{
width: 90%;
margin: 0 auto;
}
.studentitem{
height: 200rpx;
width: 100%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 5rpx #e2e2e2;
background: rgba(245,249,255);
padding: 30rpx;
box-sizing: border-box;
}
.zw{
height: 250rpx;
width: 100%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 15rpx #e2e2e2;
padding:0 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 33rpx;
color: #666;
}
.up{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
/* border: 1rpx solid #f10a44; */
}
.name{
font-size: 35rpx;
height: 80rpx;
padding-right: 30rpx;
line-height: 80rpx;
color: #333;
}
.msg{
flex: 1;
height: 70rpx;
line-height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
/* border: 1rpx solid #85f10a; */
}
.t1{
height: 50rpx;
width: 130rpx;
text-align: center;
line-height: 50rpx;
font-size:33rpx;
border-radius: 25rpx;
/* color: rgba(45,135,255);
background: rgba(226,237,254); */
}
.down{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
line-height: 80rpx;
font-size: 30rpx;
color: #666;
}
.icon{
height: 50rpx;
display: flex;
align-items: center;
}
.mr{
font-size: 33rpx;
color: rgb(16, 150, 11);
margin-right: 15rpx;
}
.nofee{
font-size: 33rpx;
color: rgb(150, 11, 23);
margin-right: 15rpx;
/* border: 1rpx solid #fd0404; */
}
.detail{
font-size: 33rpx;
color: rgba(52,120,247);
margin-right: 15rpx;
}
.sw{
margin-top: 5rpx;
}
.btn{
height: 100rpx;
margin-top: 150rpx;
margin-bottom: 40rpx;
width: 100%;
background: rgba(0,110,255);
color: #fff;
text-align: center;
line-height: 100rpx;
border-radius: 10rpx;
font-size: 35rpx;
letter-spacing: 5rpx;
}
.popsearch{
margin-right: 15rpx;
}
.pickempty{
font-size: 35rpx;
font-weight: bold;
display: flex;
justify-content: center;
margin-top: 80rpx;
}
.btnview{
justify-content: center;
display: flex;
margin-top: 80rpx;
}
.btnClass {
background: #4bc107 !important;
color: #fff !important;
}
.banner{
margin-bottom: 30rpx;
}
.slide-image{
width: 100%;
height: 100%;
}
.service{
font-size: 35rpx;
font-weight: bold;
display: flex;
align-items: center;
margin-top: 20rpx;
}
.service icon{
width: 40rpx;
height: 15rpx;
margin-right: 20rpx;
background-color: #50CEBB;
border-radius: 15rpx;
}
.wrap{
height: 100%;
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
}
.rwempty{
font-size: 35rpx;
font-weight: bold;
display: flex;
justify-content: center;
margin-top: 10rpx;
}
.rwtips{
font-size: 30rpx;
font-weight: bold;
color: rgb(253, 6, 6);
display: flex;
justify-content: center;
margin-top: 10rpx;
}
.banner image {
width: 100%;
height: 417rpx;
}
.banner video {
height: 100%;
width: 100%;
}
.m-menu {
background: #fff;
display: flex;
align-items: center;
flex-wrap: wrap;
padding-bottom: 0rpx;
padding-top: 25rpx;
}
.m-menu .item {
width: 150rpx;
height: 126rpx;
}
.m-menu image {
display: block;
width: 58rpx;
height: 58rpx;
margin: 0 auto;
margin-bottom: 12rpx;
}
.m-menu text {
display: block;
font-size: 24rpx;
text-align: center;
margin: 0 auto;
line-height: 1;
color: #333;
}
.a-section {
width: 750rpx;
height: auto;
overflow: hidden;
background: #fff;
color: #333;
margin-top: 20rpx;
}
.a-section .h {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
height: 130rpx;
}
.a-section .h .txt {
padding-right: 30rpx;
background-size: 16.656rpx 27rpx;
display: inline-block;
height: 36rpx;
font-size: 33rpx;
line-height: 36rpx;
}
.loc_light_icon {
color: #000;
font-size: 10px;
line-height: 30px;
text-align: center;
margin-top: 10px;
margin-bottom: 5px;
background-clip: content-box;
word-wrap:break-word;
background-color: #fff;
}
.loc_light {
color: #000;
font-size: 10px;
line-height: 10px;
text-align: left;
margin-bottom: 5px;
background-clip: content-box;
word-wrap:break-word;
background-color: #fff;
}
.dark,
.light {
color: #000;
font-size: 13px;
line-height: 18px;
text-align: left;
margin-bottom: 5px;
margin-top: 5px;
background-clip: content-box;
word-wrap:break-word;
}
.dark {
background-color: #39a9ed;
}
.light {
background-color: #fff;
}
.a-location .b{
width: 750rpx;
height: auto;
overflow: hidden;
position: relative;
}
.a-brand .b {
width: 750rpx;
height: auto;
overflow: hidden;
position: relative;
}
.a-brand .wrap {
position: relative;
}
.a-brand .img {
position: absolute;
left: 0;
top: 0;
}
.a-brand .mt {
position: absolute;
z-index: 2;
padding: 27rpx 31rpx;
left: 0;
top: 0;
}
.a-brand .mt .brand {
display: block;
font-size: 33rpx;
height: 43rpx;
color: #fff;
}
.a-brand .mt .price, .a-brand .mt .unit {
font-size: 25rpx;
color: #fff;
}
.a-brand .item-1 {
float: left;
width: 375rpx;
height: 252rpx;
overflow: hidden;
border-top: 1rpx solid #fff;
margin-left: 1rpx;
}
.a-brand .item-1:nth-child(2n+1) {
margin-left: 0;
width: 374rpx;
}
.a-brand .item-1 .img {
width: 375rpx;
height: 253rpx;
}
.a-coupon {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-coupon .b .item {
position: relative;
height: 200rpx;
width: 700rpx;
background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 10rpx;
margin-left: 30rpx;
margin-right: 30rpx;
padding-top: 30rpx;
}
.a-coupon .b .tag {
height: 32rpx;
background: #a48143;
padding-left: 16rpx;
padding-right: 16rpx;
position: absolute;
left: 20rpx;
color: #fff;
top: 20rpx;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
}
.a-coupon .b .content {
margin-top: 24rpx;
margin-left: 40rpx;
display: flex;
margin-right: 40rpx;
flex-direction: row;
}
.a-coupon .b .content .left {
flex: 1;
}
.a-coupon .b .discount {
font-size: 50rpx;
color: #b4282d;
}
.a-coupon .b .min {
color: #fff;
}
.a-coupon .b .content .right {
width: 400rpx;
}
.a-coupon .b .name {
font-size: 44rpx;
color: #fff;
margin-bottom: 14rpx;
}
.a-coupon .b .desc {
font-size: 24rpx;
color: #fff;
}
.a-coupon .b .time {
font-size: 24rpx;
color: #fff;
line-height: 30rpx;
}
.a-groupon {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-groupon .b .item {
border-top: 1px solid #d9d9d9;
margin: 0 20rpx;
height: 244rpx;
width: 710rpx;
}
.a-groupon .b .img {
margin-top: 12rpx;
margin-right: 12rpx;
float: left;
width: 220rpx;
height: 220rpx;
}
.a-groupon .b .right {
float: left;
height: 244rpx;
width: 476rpx;
display: flex;
flex-flow: row nowrap;
}
.a-groupon .b .text {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: center;
overflow: hidden;
height: 244rpx;
width: 476rpx;
}
.a-groupon .b .name {
float: left;
display: block;
color: #333;
line-height: 50rpx;
font-size: 30rpx;
}
.a-groupon .b .desc {
width: 476rpx;
display: block;
color: #999;
line-height: 50rpx;
font-size: 25rpx;
}
.a-groupon .b .price {
width: 476rpx;
display: flex;
color: #ab956d;
line-height: 50rpx;
font-size: 33rpx;
}
.a-groupon .b .counterPrice {
text-decoration: line-through;
font-size: 28rpx;
color: #999;
}
.a-groupon .b .retailPrice {
margin-left: 30rpx;
font-size: 28rpx;
color: #a78845;
}
.a-new .b {
width: 750rpx;
height: auto;
overflow: hidden;
padding: 0 31rpx 45rpx 31rpx;
}
.a-new .b .item {
float: left;
width: 302rpx;
margin-top: 10rpx;
margin-left: 21rpx;
margin-right: 21rpx;
}
.a-new .b .item-b {
margin-left: 42rpx;
}
.a-new .b .img {
width: 302rpx;
height: 302rpx;
border-radius: 10rpx;
overflow: hidden;
}
.a-new .b .name {
text-align: center;
display: block;
width: 302rpx;
height: 35rpx;
margin-bottom: 14rpx;
overflow: hidden;
font-size: 30rpx;
color: #333;
}
.a-new .b .price {
display: block;
text-align: center;
line-height: 30rpx;
font-size: 30rpx;
color: #ab956d;
}
.a-popular {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-popular .b .item {
border-top: 1px solid #d9d9d9;
margin: 0 20rpx;
height: 264rpx;
width: 710rpx;
}
.a-popular .b .img {
margin-top: 12rpx;
margin-right: 12rpx;
float: left;
width: 240rpx;
height: 240rpx;
border-radius: 10rpx;
overflow: hidden;
}
.a-popular .b .right {
float: left;
height: 264rpx;
width: 456rpx;
display: flex;
flex-flow: row nowrap;
}
.a-popular .b .text {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: center;
overflow: hidden;
height: 264rpx;
width: 456rpx;
}
.a-popular .b .name {
width: 456rpx;
display: block;
color: #333;
line-height: 50rpx;
font-size: 30rpx;
}
.a-popular .b .desc {
width: 456rpx;
display: block;
color: #999;
line-height: 50rpx;
font-size: 25rpx;
}
.a-popular .b .price {
width: 456rpx;
display: block;
color: #ab956d;
line-height: 50rpx;
font-size: 33rpx;
}
.a-topic .b {
height: 533rpx;
width: 750rpx;
padding: 0 0 48rpx 0;
}
.a-topic .b .list {
height: 533rpx;
width: 750rpx;
white-space: nowrap;
}
.a-topic .b .item {
display: inline-block;
height: 533rpx;
width: 680.5rpx;
margin-left: 30rpx;
overflow: hidden;
}
.a-topic .b .item:last-child {
margin-right: 30rpx;
}
.a-topic .b .img {
height: 387.5rpx;
width: 680.5rpx;
margin-bottom: 30rpx;
}
.a-topic .b .np {
height: 35rpx;
margin-bottom: 13.5rpx;
color: #333;
font-size: 30rpx;
}
.a-topic .b .np .price {
margin-left: 20.8rpx;
color: #ab956d;
}
.a-topic .b .desc {
display: block;
height: 30rpx;
color: #999;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.good-grid {
width: 750rpx;
height: auto;
overflow: hidden;
}
.good-grid .h {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
height: 130rpx;
font-size: 33rpx;
color: #333;
}
.good-grid .b {
width: 750rpx;
padding: 0 6.25rpx;
height: auto;
overflow: hidden;
}
.good-grid .b .item {
float: left;
background: #fff;
width: 365rpx;
margin-bottom: 6.25rpx;
height: 452rpx;
overflow: hidden;
text-align: center;
}
.good-grid .b .item .a {
height: 452rpx;
width: 100%;
}
.good-grid .b .item-b {
margin-left: 6.25rpx;
}
.good-grid .item .img {
margin-top: 20rpx;
width: 302rpx;
height: 302rpx;
}
.good-grid .item .name {
display: block;
width: 365.625rpx;
padding: 0 20rpx;
overflow: hidden;
height: 35rpx;
margin: 11.5rpx 0 22rpx 0;
text-align: center;
font-size: 30rpx;
color: #333;
}
.good-grid .item .price {
display: block;
width: 365.625rpx;
height: 30rpx;
text-align: center;
font-size: 30rpx;
color: #ab956d;
}
.good-grid .t {
height: 100rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.search {
height: 88rpx;
width: 100%;
padding: 0 30rpx;
background: #fff;
display: flex;
align-items: center;
}
.search .van-icon-search {
line-height: 59rpx;
}
.search .input {
width: 690rpx;
height: 56rpx;
background: #ededed;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.search .txt {
height: 42rpx;
line-height: 42rpx;
color: #666;
padding-left: 10rpx;
font-size: 30rpx;
}

372
pages/tjsmMgr/tjsmMgr.js Normal file
View File

@@ -0,0 +1,372 @@
const util = require('../../utils/util.js');
const api = require('../../config/api.js');
const user = require('../../utils/user.js');
//获取应用实例
const app = getApp();
Page({
data: {
isShow: false, //控制确认学生信息对话框
stulist: {},
xyrwList: [],
rwname:'',
rwempty: 0,
batchno: '',
nationId: '',
list:[],
loadingHidden: true,
flag: false,
openid: ''
},
isValidID:function (id) {
if (!/^\d{17}(\d|X)$/.test(id)) return false; // 检查格式是否正确
// 计算第18位校验码
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
const checkCode = '10X98765432';
let sum = 0;
for (let i = 0; i < id.length - 1; i++) {
sum += parseInt(id[i], 10) * weights[i];
}
sum = sum % 11;
// 验证第18位校验码是否正确
return checkCode[sum] === id[17].toUpperCase();
},
btnAdd: function(){
if(this.isValidID(this.data.nationId) == false){
wx.showToast({
title: '身份证不合法!',
icon:'success',
duration: 1000
})
this.setData({ nationId: '', });
return;
}
//根据身份证号和批次号查询学生信息
var that = this;
util.request(api.smstudentByInit, {
nationid: that.data.nationId,
batchno: this.data.batchno
})
.then(function(res) {
if (res.code === 0) {
console.log(res.data);
if(res.data == null){
wx.showToast({
title: '无此体检人员',
icon:'error'
})
}else{
that.setData({
stulist: res.data,
isShow: true
});
}
}
});
},
onCancelStudent: function(){
},
onConfirmStudent: function(){
let that = this;
let cardNum = this.data.stulist.nationId;
// let type = this.data.type
let hzxm =this.data.stulist.name;
let sex = this.getSexFromIdCard(this.data.stulist.nationId)
let age = this.calculateAge(this.data.stulist.nationId)
let userid = this.data.stulist.id;
// let classid = this.data.xytjinfo.classid;
let classname = this.data.stulist.classname;
let schoolname = this.data.stulist.schoolname;
let sqName = this.data.stulist.sqName;
let cardtype = "";
console.log(hzxm)
console.log(cardNum)
console.log(sex)
console.log(age)
console.log(userid)
//家长确认学生信息,进行建档和关联就诊人操作
util.requestPost(api.smcreatestudent, {
openid: app.globalData.openId,
name: hzxm,
deptId: userid,
sex: sex,
age: age,
className: classname,
schoolName: schoolname,
sqName: sqName,
nationId: cardNum
})
.then(function(res) {
console.log(res);
if (res.code === 0) {
console.log("createstudent res:");
console.log(res);
console.log("createstudent resdata:");
console.log(res.data);
cardtype = res.data;
// if(type == 0)
// {
// // app.globalData.gdefaultflag = type;
// app.globalData.gname = hzxm;
// app.globalData.gsex = sex;
// app.globalData.gage = age;
// // app.globalData.gdeptId = classid;
// app.globalData.gclassName = classname;
// app.globalData.gschoolName = schoolname;
// app.globalData.gnationId = cardNum;
// }
//自动建档并关联到父openid
that.linkUser(hzxm, cardNum, cardtype);
wx.showToast({
title: '添加成功',
icon:'success'
})
setTimeout(item => {
wx.navigateBack({
delta: 1 //返回上一级页面
})
},1000)
}
else{
wx.showToast({
title: res.msg,
icon:'error'
})
}
});
},
linkUser:function(gname, xPatid, cardtype){
//第二步 关联到父openid
console.log(xPatid, 'usrPatid');
wx.request({
url:'https://fy.btlsoln.com:8443/patientBindWXUser?cardno&cardtype&openid&relate&type&hzxm',
method:"GET",
data:{
cardno: xPatid,
cardtype: cardtype,
relate: '1', //都是子女
type: '1', //不当做默认就诊人
openid: app.globalData.openId,
hzxm: gname
},
header: {
'content-type': 'application/json'
},
success: (res)=> {
if(res.data.errCode == 0){
wx.showToast({
title: '关联就诊人成功',
icon:'success'
})
return true;
}else{
wx.showToast({
title: "关联就诊人失败",
icon:'error'
})
return false;
}
}
})
},
//获取下园任务列表
getXyrwList: function() {
var that = this;
util.request(api.smxyrwinfo, {
})
.then(function(res) {
if (res.code === 0) {
console.log("xyrwinfo resdata:");
console.log(res.data);
if(res.data.length == 0){
that.setData({
rwempty: 0
});
app.globalData.hasXyrw = false;
}else{
that.setData({
rwempty: 1,
xyrwList: res.data,
rwname: res.data[0].batchName,
batchno: res.data[0].batchno
});
app.globalData.hasXyrw = true;
that.getPerList(res.data[0].batchno);
}
}
});
},
//取列表
getPerList: function(resbatchno){
let that = this;
util.request(api.smstudentByparent, {
openid: app.globalData.openId,
batchno: resbatchno
})
.then(function(res) {
if (res.code === 0) {
console.log("list res:");
console.log(res);
console.log("list resdata:");
console.log(res.data);
that.setData({
list: res.data
});
console.log("list length", that.data.list.length);
if(that.data.list.length == 0 ){
that.setData({
loadingHidden: false,
flag: false
});
}else{
//有体检人,取出默认体检人
var filterNum = that.data.list.filter(function(person,index,arrs){
return person.defaultflag==0
});
console.log("fileter");
console.log(filterNum);
that.setData({
loadingHidden: true,
flag: true
});
}
that.setData({
loadingHidden: true
});
}
})
},
naviToAdd(){
let state = 0
wx.navigateTo({
url: '/pages/studentMsgDel/studentMsgDel?state='+state,
})
},
naviToDet(e){
return;
console.log(e.currentTarget.dataset.item)
let item = e.currentTarget.dataset.item
let idCard = item.nationId
let trueName = item.name
let type = item.defaultflag
let sex = item.sex
let age = item.age
let classid = item.deptId
let classname = item.className
let schoolname = item.schoolName
let state = 1
var id = 0;
id = item.id
wx.navigateTo({
url: '/pages/studentMsgDel/studentMsgDel?state='+state+'&classid='+classid+'&classname='+classname+'&schoolname='+schoolname+'&idCard='+idCard+'&trueName='+trueName+'&type='+type +'&sex='+sex +'&age='+age +'&id='+id,
})
},
naviToXytj(){
wx.navigateTo({
url: '/pages/xytj/xytj',
})
},
onChange({ detail }) {
this.setData({ checked: detail });
},
onShareAppMessage: function() {
},
onPullDownRefresh() {
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
this.getXyrwList();
this.setData({
loadingHidden: false,
})
},
onReady: function() {
// 页面渲染完成
wx.setNavigationBarTitle({
title: "管理体检人员"
})
},
onShow: function() {
// 页面显示
this.getPerList()
this.setData({
loadingHidden: false,
})
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
// 从身份证号码中提取性别信息
getSexFromIdCard: function(idCard){
var org_gender = idCard.substring(16, 17);
// var sex = org_gender % 2 == 1 ? "男" : "女";
var sex = org_gender % 2 == 1 ? 1 : 2;
return sex; // 这里假设身份证号码长度为18位并按照标准格式存放
},
// 从身份证号码中提取生日信息格式为YYYYMMDD
getBirthdayFromIdCard: function(idCard){
return idCard.substring(6, 14); // 这里假设身份证号码长度为18位并按照标准格式存放
},
// 将字符串类型的生日转换成Date对象
convertToDateObject: function(birthdayString){
const year = birthdayString.substr(0, 4);
const month = birthdayString.substr(4, 2);
const day = birthdayString.substr(6, 2);
return new Date(`${year}-${month}-${day}`);
},
// 计算年龄函数
calculateAge: function(idCard){
// 获取当前日期
const currentDate = new Date();
const birthdate = this.convertToDateObject(this.getBirthdayFromIdCard(idCard));
let age;
if (currentDate >= birthdate && !isNaN(currentDate)) {
age = Math.floor((currentDate - birthdate) / (365 * 24 * 60 * 60 * 1000));
} else {
console.error('无效的身份证号码或者未知错误');
}
return age || '';
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

139
pages/tjsmMgr/tjsmMgr.wxml Normal file
View File

@@ -0,0 +1,139 @@
<!--index.wxml-->
<view class="wrap">
<view class="service">
<icon></icon>
<text>当前批次</text>
</view>
<view class = "rwempty" wx:if = "{{ rwempty }}" >{{ rwname }}</view>
<view class = "rwempty" wx:if = "{{ !rwempty }}" >当前无任务</view>
</view>
<view class="main">
<view class="content">
<loading hidden="{{loadingHidden}}">加载中...</loading>
<view wx:if="{{loadingHidden}}">
<view wx:if="{{flag == true}}">
<view class="studentitem" wx:for="{{list}}" wx:key="item" data-item="{{item}}" bindtap="naviToDet">
<view class="up">
<view class="name">{{item.name}}</view>
<view class="msg">
<view class="t1"></view>
<view class="icon" wx:if="{{item.defaultflag == 0}}">
<view class="mr">默认体检人</view>
</view>
</view>
</view>
<view class="down">
<view>{{item.nationId}}</view>
</view>
</view>
</view>
<view wx:else="{{flag == false}}" class="zw">暂无体检人员信息,请将体检人员的身份证号输入下方,再次确认体检人员的身份信息!</view>
<view class="mobileItem">
<view class="left">身份证号:</view>
<view class="inputf">
<van-field
input-class="my-input-class"
model:value="{{ nationId }}"
placeholder="请输入体检人员的身份证号"
maxlength = "18"
type = "idcard"
/>
</view>
</view>
<view class="btn" bindtap="btnAdd">添加体检人员</view>
<!-- <view class="btn" bindtap="naviToXytj" >返回下园体检</view> -->
<van-dialog
use-slot
title="体检人员信息"
bind:confirm="onConfirmStudent"
bind:cancel="onCancelStudent"
id="van-dialog"
show-cancel-button
show="{{ isShow }}"
>
<view class="wrapStu" >
<view class="itemStu" >
<view class="leftStu">单位:</view>
<view class="rightStu">
{{ stulist.schoolName }}
</view>
</view>
<!-- <view class="itemStu" >
<view class="leftStu">年级:</view>
<view class="rightStu">
{{ stulist.sqName }}
</view>
</view> -->
<!-- <view class="itemStu" >
<view class="leftStu">班级:</view>
<view class="rightStu">
{{ stulist.className }}
</view>
</view> -->
<view class="itemStu" >
<view class="leftStu">姓名:</view>
<view class="rightStu">
{{ stulist.name }}
</view>
</view>
<view class="itemStu" >
<view class="leftStu">身份证:</view>
<view class="rightStu">
{{ stulist.nationId }}
</view>
</view>
</view>
<!-- <view class="stulist" >
<view class="confirmItem" >
<view class="confirmLeft">学校:</view>
<view class="input">
{{ stulist.schoolName }}
</view>
</view>
<view class="confirmItem" >
<view class="confirmLeft">年级:</view>
<view class="input">
{{ stulist.sqName }}
</view>
</view>
<view class="confirmItem" >
<view class="confirmLeft">班级:</view>
<view class="input">
{{ stulist.className }}
</view>
</view>
<view class="confirmItem" >
<view class="confirmLeft">姓名:</view>
<view class="input">
{{ stulist.name }}
</view>
</view>
<view class="confirmItem" >
<view class="confirmLeft">身份证号码:</view>
<view class="input">
{{ stulist.nationId }}
</view>
</view>
</view> -->
</van-dialog>
</view>
</view>
</view>
<!-- 确保信息显示 -->
<!-- <view class="area">
<view class="area-header">
<view class="area-header-cont">
</view>
</view>
</view> -->
<!-- <view class="tips" >结算处理中,请稍后...</view> -->
<!-- <view class="bottom-btn">
<view class="c" bindtap="naviToXytj" >返回下园体检</view>
</view> -->

959
pages/tjsmMgr/tjsmMgr.wxss Normal file
View File

@@ -0,0 +1,959 @@
/* pages/userMgr/userMgr.wxss */
.main{
margin: 30rpx 0;
width: 750rpx;
}
.content{
width: 90%;
margin: 0 auto;
}
.mobileItem{
height: 120rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #f8f8f8;
}
.left{
height: 100%;
width: 200rpx;
font-size: 35rpx;
color: #333;
line-height: 120rpx;
/* border: 1rpx solid #6306f8; */
}
.inputf{
flex: 1;
font-size: 35rpx;
color: #333;
line-height: 120rpx;
/* border: 1rpx solid #0af1a4; */
}
.input{
flex: 1;
font-size: 30rpx;
color: #333;
line-height: 120rpx;
/* border: 1rpx solid #f10c0c; */
margin-left: 30rpx;
}
.confirmItem{
height: 120rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #0e0d0d;
}
.confirmLeft{
height: 100%;
width: 200rpx;
font-size: 30rpx;
color: #333;
line-height: 120rpx;
margin-left: 30rpx;
align-items: left;
/* border: 1rpx solid #6306f8; */
}
.tips{
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
height: 300rpx; /* 容器高度,根据需要设置 */
font-size: 40rpx;
}
.studentitem{
height: 200rpx;
width: 100%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 5rpx #e2e2e2;
background: rgba(245,249,255);
padding: 30rpx;
box-sizing: border-box;
}
.zw{
height: 250rpx;
width: 100%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 15rpx #e2e2e2;
padding:0 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 33rpx;
color: #666;
}
.up{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.name{
font-size: 35rpx;
height: 80rpx;
padding-right: 30rpx;
line-height: 80rpx;
color: #333;
}
.msg{
flex: 1;
height: 70rpx;
line-height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.t1{
height: 50rpx;
width: 130rpx;
text-align: center;
line-height: 50rpx;
font-size:33rpx;
border-radius: 25rpx;
/* color: rgba(45,135,255);
background: rgba(226,237,254); */
}
.mr{
font-size: 30rpx;
color: #666;
}
.down{
height: 80rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
line-height: 80rpx;
font-size: 30rpx;
color: #666;
}
.icon{
height: 50rpx;
display: flex;
align-items: center;
}
.mr{
font-size: 33rpx;
color: #333;
margin-right: 15rpx;
}
.sw{
margin-top: 5rpx;
}
.btn{
height: 100rpx;
margin-top: 150rpx;
margin-bottom: 40rpx;
width: 100%;
background: rgba(0,110,255);
color: #fff;
text-align: center;
line-height: 100rpx;
border-radius: 10rpx;
font-size: 35rpx;
letter-spacing: 5rpx;
}
.popsearch{
margin-right: 15rpx;
}
.pickempty{
font-size: 35rpx;
font-weight: bold;
display: flex;
justify-content: center;
margin-top: 80rpx;
}
.btnview{
justify-content: center;
display: flex;
margin-top: 80rpx;
}
.btnClass {
background: #4bc107 !important;
color: #fff !important;
}
.banner{
margin-bottom: 30rpx;
}
.slide-image{
width: 100%;
height: 100%;
}
.service{
font-size: 35rpx;
font-weight: bold;
display: flex;
align-items: center;
margin-top: 20rpx;
}
.service icon{
width: 40rpx;
height: 15rpx;
margin-right: 20rpx;
background-color: #50CEBB;
border-radius: 15rpx;
}
.wrap{
height: 100%;
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
/* border: 1rpx solid #0af1a4; */
}
.rwempty{
font-size: 35rpx;
font-weight: bold;
display: flex;
justify-content: center;
margin-top: 10rpx;
}
.Stulist{
height: 600rpx;
width: 500rpx;
margin-left: 50rpx;
margin-top: 30rpx;
/* line-height: 120rpx; */
/* border: 20rpx solid #030303; */
}
.itemStu{
height: 120rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #e2e2e2;
}
.leftStu{
width: 30%;
font-size: 30rpx;
color: #666;
text-align-last:justify;
text-align:justify;
text-justify:distribute-all-lines;
}
.rightStu{
width: 66%;
height: 100%;
font-size: 30rpx;
color: #333;
display: flex;
align-items: center;
}
.wrapStu{
width: 90%;
border-radius: 5rpx;
margin: 40rpx auto;
box-shadow:0px 0px 15rpx #e2e2e2;
padding:0 30rpx;
box-sizing: border-box;
}
.my-input-class {
border-radius: 8px; /* 增加圆角边框 */
/* border: 1px solid rgb(248, 21, 21); */
font-size: 35rpx;
}
.banner image {
width: 100%;
height: 417rpx;
}
.banner video {
height: 100%;
width: 100%;
}
.m-menu {
background: #fff;
display: flex;
align-items: center;
flex-wrap: wrap;
padding-bottom: 0rpx;
padding-top: 25rpx;
}
.m-menu .item {
width: 150rpx;
height: 126rpx;
}
.m-menu image {
display: block;
width: 58rpx;
height: 58rpx;
margin: 0 auto;
margin-bottom: 12rpx;
}
.m-menu text {
display: block;
font-size: 24rpx;
text-align: center;
margin: 0 auto;
line-height: 1;
color: #333;
}
.a-section {
width: 750rpx;
height: auto;
overflow: hidden;
background: #fff;
color: #333;
margin-top: 20rpx;
}
.a-section .h {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
height: 130rpx;
}
.a-section .h .txt {
padding-right: 30rpx;
background-size: 16.656rpx 27rpx;
display: inline-block;
height: 36rpx;
font-size: 33rpx;
line-height: 36rpx;
}
.loc_light_icon {
color: #000;
font-size: 10px;
line-height: 30px;
text-align: center;
margin-top: 10px;
margin-bottom: 5px;
background-clip: content-box;
word-wrap:break-word;
background-color: #fff;
}
.loc_light {
color: #000;
font-size: 10px;
line-height: 10px;
text-align: left;
margin-bottom: 5px;
background-clip: content-box;
word-wrap:break-word;
background-color: #fff;
}
.dark,
.light {
color: #000;
font-size: 13px;
line-height: 18px;
text-align: left;
margin-bottom: 5px;
margin-top: 5px;
background-clip: content-box;
word-wrap:break-word;
}
.dark {
background-color: #39a9ed;
}
.light {
background-color: #fff;
}
.a-location .b{
width: 750rpx;
height: auto;
overflow: hidden;
position: relative;
}
.a-brand .b {
width: 750rpx;
height: auto;
overflow: hidden;
position: relative;
}
.a-brand .wrap {
position: relative;
}
.a-brand .img {
position: absolute;
left: 0;
top: 0;
}
.a-brand .mt {
position: absolute;
z-index: 2;
padding: 27rpx 31rpx;
left: 0;
top: 0;
}
.a-brand .mt .brand {
display: block;
font-size: 33rpx;
height: 43rpx;
color: #fff;
}
.a-brand .mt .price, .a-brand .mt .unit {
font-size: 25rpx;
color: #fff;
}
.a-brand .item-1 {
float: left;
width: 375rpx;
height: 252rpx;
overflow: hidden;
border-top: 1rpx solid #fff;
margin-left: 1rpx;
}
.a-brand .item-1:nth-child(2n+1) {
margin-left: 0;
width: 374rpx;
}
.a-brand .item-1 .img {
width: 375rpx;
height: 253rpx;
}
.a-coupon {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-coupon .b .item {
position: relative;
height: 200rpx;
width: 700rpx;
background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 10rpx;
margin-left: 30rpx;
margin-right: 30rpx;
padding-top: 30rpx;
}
.a-coupon .b .tag {
height: 32rpx;
background: #a48143;
padding-left: 16rpx;
padding-right: 16rpx;
position: absolute;
left: 20rpx;
color: #fff;
top: 20rpx;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
}
.a-coupon .b .content {
margin-top: 24rpx;
margin-left: 40rpx;
display: flex;
margin-right: 40rpx;
flex-direction: row;
}
.a-coupon .b .content .left {
flex: 1;
}
.a-coupon .b .discount {
font-size: 50rpx;
color: #b4282d;
}
.a-coupon .b .min {
color: #fff;
}
.a-coupon .b .content .right {
width: 400rpx;
}
.a-coupon .b .name {
font-size: 44rpx;
color: #fff;
margin-bottom: 14rpx;
}
.a-coupon .b .desc {
font-size: 24rpx;
color: #fff;
}
.a-coupon .b .time {
font-size: 24rpx;
color: #fff;
line-height: 30rpx;
}
.a-groupon {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-groupon .b .item {
border-top: 1px solid #d9d9d9;
margin: 0 20rpx;
height: 244rpx;
width: 710rpx;
}
.a-groupon .b .img {
margin-top: 12rpx;
margin-right: 12rpx;
float: left;
width: 220rpx;
height: 220rpx;
}
.a-groupon .b .right {
float: left;
height: 244rpx;
width: 476rpx;
display: flex;
flex-flow: row nowrap;
}
.a-groupon .b .text {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: center;
overflow: hidden;
height: 244rpx;
width: 476rpx;
}
.a-groupon .b .name {
float: left;
display: block;
color: #333;
line-height: 50rpx;
font-size: 30rpx;
}
.a-groupon .b .desc {
width: 476rpx;
display: block;
color: #999;
line-height: 50rpx;
font-size: 25rpx;
}
.a-groupon .b .price {
width: 476rpx;
display: flex;
color: #ab956d;
line-height: 50rpx;
font-size: 33rpx;
}
.a-groupon .b .counterPrice {
text-decoration: line-through;
font-size: 28rpx;
color: #999;
}
.a-groupon .b .retailPrice {
margin-left: 30rpx;
font-size: 28rpx;
color: #a78845;
}
.a-new .b {
width: 750rpx;
height: auto;
overflow: hidden;
padding: 0 31rpx 45rpx 31rpx;
}
.a-new .b .item {
float: left;
width: 302rpx;
margin-top: 10rpx;
margin-left: 21rpx;
margin-right: 21rpx;
}
.a-new .b .item-b {
margin-left: 42rpx;
}
.a-new .b .img {
width: 302rpx;
height: 302rpx;
border-radius: 10rpx;
overflow: hidden;
}
.a-new .b .name {
text-align: center;
display: block;
width: 302rpx;
height: 35rpx;
margin-bottom: 14rpx;
overflow: hidden;
font-size: 30rpx;
color: #333;
}
.a-new .b .price {
display: block;
text-align: center;
line-height: 30rpx;
font-size: 30rpx;
color: #ab956d;
}
.a-popular {
width: 750rpx;
height: auto;
overflow: hidden;
}
.a-popular .b .item {
border-top: 1px solid #d9d9d9;
margin: 0 20rpx;
height: 264rpx;
width: 710rpx;
}
.a-popular .b .img {
margin-top: 12rpx;
margin-right: 12rpx;
float: left;
width: 240rpx;
height: 240rpx;
border-radius: 10rpx;
overflow: hidden;
}
.a-popular .b .right {
float: left;
height: 264rpx;
width: 456rpx;
display: flex;
flex-flow: row nowrap;
}
.a-popular .b .text {
display: flex;
flex-wrap: nowrap;
flex-direction: column;
justify-content: center;
overflow: hidden;
height: 264rpx;
width: 456rpx;
}
.a-popular .b .name {
width: 456rpx;
display: block;
color: #333;
line-height: 50rpx;
font-size: 30rpx;
}
.a-popular .b .desc {
width: 456rpx;
display: block;
color: #999;
line-height: 50rpx;
font-size: 25rpx;
}
.a-popular .b .price {
width: 456rpx;
display: block;
color: #ab956d;
line-height: 50rpx;
font-size: 33rpx;
}
.a-topic .b {
height: 533rpx;
width: 750rpx;
padding: 0 0 48rpx 0;
}
.a-topic .b .list {
height: 533rpx;
width: 750rpx;
white-space: nowrap;
}
.a-topic .b .item {
display: inline-block;
height: 533rpx;
width: 680.5rpx;
margin-left: 30rpx;
overflow: hidden;
}
.a-topic .b .item:last-child {
margin-right: 30rpx;
}
.a-topic .b .img {
height: 387.5rpx;
width: 680.5rpx;
margin-bottom: 30rpx;
}
.a-topic .b .np {
height: 35rpx;
margin-bottom: 13.5rpx;
color: #333;
font-size: 30rpx;
}
.a-topic .b .np .price {
margin-left: 20.8rpx;
color: #ab956d;
}
.a-topic .b .desc {
display: block;
height: 30rpx;
color: #999;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.good-grid {
width: 750rpx;
height: auto;
overflow: hidden;
}
.good-grid .h {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
height: 130rpx;
font-size: 33rpx;
color: #333;
}
.good-grid .b {
width: 750rpx;
padding: 0 6.25rpx;
height: auto;
overflow: hidden;
}
.good-grid .b .item {
float: left;
background: #fff;
width: 365rpx;
margin-bottom: 6.25rpx;
height: 452rpx;
overflow: hidden;
text-align: center;
}
.good-grid .b .item .a {
height: 452rpx;
width: 100%;
}
.good-grid .b .item-b {
margin-left: 6.25rpx;
}
.good-grid .item .img {
margin-top: 20rpx;
width: 302rpx;
height: 302rpx;
}
.good-grid .item .name {
display: block;
width: 365.625rpx;
padding: 0 20rpx;
overflow: hidden;
height: 35rpx;
margin: 11.5rpx 0 22rpx 0;
text-align: center;
font-size: 30rpx;
color: #333;
}
.good-grid .item .price {
display: block;
width: 365.625rpx;
height: 30rpx;
text-align: center;
font-size: 30rpx;
color: #ab956d;
}
.good-grid .t {
height: 100rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.search {
height: 88rpx;
width: 100%;
padding: 0 30rpx;
background: #fff;
display: flex;
align-items: center;
}
.search .van-icon-search {
line-height: 59rpx;
}
.search .input {
width: 690rpx;
height: 56rpx;
background: #ededed;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.search .txt {
height: 42rpx;
line-height: 42rpx;
color: #666;
padding-left: 10rpx;
font-size: 30rpx;
}
.bottom-btn {
position: fixed;
float: middle;
left: 0;
bottom: 0;
z-index: 10;
width: 100%;
height: 100rpx;
display: flex;
background: #fff;
margin-bottom: 50rpx;
margin-right: 100rpx;
}
.bottom-btn .c {
float: middle;
background: #7232dd;
height: 80rpx;
line-height: 80rpx;
flex: 1;
text-align: center;
color: #fff;
border-radius: 30px 30px 30px 30px;
margin-right: 50rpx;
margin-left: 50rpx;
}
.bottom-btn .l {
float: left;
height: 100rpx;
width: 162rpx;
border: 1px solid #f4f4f4;
display: flex;
align-items: center;
justify-content: center;
}
.bottom-btn .l.l-collect {
border-right: none;
border-left: none;
text-align: center;
width: 90rpx;
}
.bottom-btn .l.l-collect .icon {
position: absolute;
top: 28rpx;
left: 20rpx;
font-size: 44rpx;
}
.bottom-btn .l.l-kefu {
position: relative;
height: 54rpx;
width: 63rpx;
}
.bottom-btn .l.l-cart .box {
position: relative;
height: 60rpx;
width: 60rpx;
}
.bottom-btn .l.l-cart .cart-count {
height: 28rpx;
width: 28rpx;
z-index: 10;
position: absolute;
top: 0;
right: 0;
background: #7232dd;
text-align: center;
font-size: 18rpx;
color: #fff;
line-height: 28rpx;
border-radius: 50%;
}
.bottom-btn .l.l-cart .icon {
position: absolute;
top: 10rpx;
left: 0;
font-size: 44rpx;
}
.bottom-btn .r {
border: 1px solid #CCB5F2;
background: #CCB5F2;
float: left;
height: 100rpx;
line-height: 96rpx;
flex: 1;
text-align: center;
color: #fff;
border-radius: 15px 0px 0px 15px;
}

View File

@@ -51,7 +51,13 @@ Page({
});
}
},
getWxDetail(id) {
hideLoading() {
this.setData({ loadingHidden: true });
},
showLoading() {
this.setData({ loadingHidden: false });
},
async getWxDetail(id) {
let reqDTO = {
out_trade_no: id,
}
@@ -77,8 +83,15 @@ Page({
console.log("获取的信息是:" + res.data.data)
console.log(res.data.data)
if(res.data.data.tradeState=='SUCCESS'){
await this.sendMessage(this.data.obj)
//await this.sendMessage(this.data.obj)
try {
await this.sendMessage(this.data.obj); // ✅ 等推送完成
console.log("推送完成,准备隐藏加载");
} catch (err) {
console.error("推送失败,但仍允许退出", err);
}
}
this.hideLoading(); //隐藏对话框
} else {
wx.showModal({
content: res.data.errMsg,
@@ -115,32 +128,63 @@ Page({
url: '/pages/payment/payment',
})
},
async sendMessage(data) {
console.log("开始推送消息")
let reqData = {
type: "jfcgwx",
operateTime: data.gmtOutCreate,
openId: app.globalData.openId,
amount: data.totalFee
}
console.log("reqData is :" + reqData)
//推送站内消息
wx.request({
url: 'https://fy.btlsoln.com:8443/generatePayMessage',
method: "GET",
data: reqData,
header: {
'content-type': 'application/json'
},
success: (responseData) => {
console.log(responseData)
}
})
sendMessage(data) {
return new Promise((resolve, reject) => {
console.log("开始推送消息");
const reqData = {
type: "jfcgwx",
operateTime: data.gmtOutCreate,
openId: app.globalData.openId,
amount: data.totalFee
};
wx.request({
url: 'https://fy.btlsoln.com:8443/generatePayMessage',
method: "GET",
data: reqData,
header: {
'content-type': 'application/json'
},
success: (res) => {
console.log("推送成功:", res);
resolve(res);
},
fail: (err) => {
console.error("推送失败:", err);
reject(err);
}
});
});
},
// async sendMessage(data) {
// console.log("开始推送消息")
// let reqData = {
// type: "jfcgwx",
// operateTime: data.gmtOutCreate,
// openId: app.globalData.openId,
// amount: data.totalFee
// }
// console.log("reqData is :" + reqData)
// //推送站内消息
// wx.request({
// url: 'https://fy.btlsoln.com:8443/generatePayMessage',
// method: "GET",
// data: reqData,
// header: {
// 'content-type': 'application/json'
// },
// success: (responseData) => {
// console.log(responseData)
// }
// })
// },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.showLoading();
wx.enableAlertBeforeUnload({
message: "支付内容更新中,确定要退出吗?",
success: function (res) {
@@ -159,9 +203,6 @@ Page({
// this.getWxDetail(data)
// // this.getWxDetail(options.hosp_out_trade_no)
// }
this.setData({
loadingHidden: false,
})
},