init version kelfy-mini for new gitea
This commit is contained in:
251
pages/onehospitalization/onehospitalization.js
Normal file
251
pages/onehospitalization/onehospitalization.js
Normal file
@@ -0,0 +1,251 @@
|
||||
// pages/onehospitalization/onehospitalization.js
|
||||
var app = getApp()
|
||||
let common = require('../../config/common.js')
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
name: '',
|
||||
painId: '',
|
||||
show: false,
|
||||
list1: [],
|
||||
date: '',
|
||||
showData: [],
|
||||
cardNum: '',
|
||||
cardType: '',
|
||||
inHosNum: '',
|
||||
},
|
||||
async changeDate(e) {
|
||||
console.log('picker发送选择改变,携带值为', e.detail.value)
|
||||
this.setData({
|
||||
date: e.detail.value
|
||||
})
|
||||
await this.getShowData()
|
||||
},
|
||||
showPop() {
|
||||
this.setData({
|
||||
show: true
|
||||
});
|
||||
this.getPerList()
|
||||
},
|
||||
//绑定就诊人
|
||||
getPerList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/getPatientByOpenid?openid',
|
||||
method: "GET",
|
||||
data: {
|
||||
openid: app.globalData.openId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res) => {
|
||||
let data = res.data
|
||||
console.log(data)
|
||||
data.map((item, index) => {
|
||||
if (item.TYPE == 0) {
|
||||
this.setData({
|
||||
name: item.TRUE_NAME,
|
||||
painId: item.PATIENT_ID, //正式打开,测试切换功能可打开
|
||||
// painId:'421322',
|
||||
relate: item.RELATE,
|
||||
cardNum: item.MEDICAL_CARD,
|
||||
cardType: item.CARD_TYPE,
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
if (res.data.length > 0) {
|
||||
this.setData({
|
||||
list1: data
|
||||
})
|
||||
resolve(res.data)
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '您还未绑定就诊人,请先绑定就诊人信息!',
|
||||
cancelText: "否",
|
||||
confirmText: '是',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/userMsgDel/userMsgDel?state=0',
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
onClose() {
|
||||
this.setData({
|
||||
show: false
|
||||
});
|
||||
},
|
||||
async initPage() {
|
||||
await this.getPerList()
|
||||
await this.getShowData()
|
||||
},
|
||||
async changePatient(e) {
|
||||
let user = e.currentTarget.dataset.item
|
||||
this.setData({
|
||||
name: user.TRUE_NAME,
|
||||
painId: user.PATIENT_ID,
|
||||
relate: user.RELATE,
|
||||
card: user.ID_CARD,
|
||||
show: false,
|
||||
cardNum: user.MEDICAL_CARD,
|
||||
cardType: user.CARD_TYPE,
|
||||
payList: [],
|
||||
noData: false,
|
||||
loadingHidden: true
|
||||
});
|
||||
await this.getShowData()
|
||||
},
|
||||
getInhosNum() {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/his/getZyPatient?cardno&cardtype&hzxm',
|
||||
data: {
|
||||
cardno: this.data.cardNum,
|
||||
cardtype: this.data.cardType,
|
||||
hzxm: this.data.name
|
||||
},
|
||||
success: (res) => {
|
||||
let tempList = res.data.list
|
||||
if (tempList.length > 0) {
|
||||
this.setData({
|
||||
inHosNum: tempList[0].syxh
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
resolve(res.data.list)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async getShowData() {
|
||||
await this.getInhosNum()
|
||||
return new Promise((resolve, reject) => {
|
||||
var selectDate = this.data.date.replaceAll("-", "")
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/his/getOneInHosMoney?selectDate&patient',
|
||||
data: {
|
||||
selectDate: selectDate,
|
||||
patient: this.data.inHosNum
|
||||
// selectDate: '20241103',
|
||||
// patient: '20949'
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.data.list.length > 0) {
|
||||
this.setData({
|
||||
showData: res.data.list
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
resolve(res.data.list)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = ('0' + (now.getMonth() + 1)).slice(-2);
|
||||
const day = ('0' + now.getDate()).slice(-2);
|
||||
const formattedTime = year + "-" + month + "-" + day;
|
||||
this.setData({
|
||||
date: formattedTime
|
||||
})
|
||||
if (app.globalData.openId == "" || app.globalData.openId == null) {
|
||||
common.checkGlobalOpenId().then(res => {
|
||||
app.globalData.openId = res
|
||||
this.initPage()
|
||||
wx.setNavigationBarTitle({
|
||||
title: '住院日结单'
|
||||
})
|
||||
},
|
||||
err => {
|
||||
//初始化失败,弹框提示
|
||||
})
|
||||
} else {
|
||||
this.initPage()
|
||||
wx.setNavigationBarTitle({
|
||||
title: '住院日结单'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
3
pages/onehospitalization/onehospitalization.json
Normal file
3
pages/onehospitalization/onehospitalization.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
58
pages/onehospitalization/onehospitalization.wxml
Normal file
58
pages/onehospitalization/onehospitalization.wxml
Normal file
@@ -0,0 +1,58 @@
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<view class="headerLocation">
|
||||
<picker mode="date" header-text="选择时间" value="{{date}}" bindchange="changeDate">
|
||||
<view class="font30">
|
||||
<text class="color3">住院时间:</text>
|
||||
<text class="color6">{{date}}</text>
|
||||
<text class="timeIcon">▼</text>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="hu" bindtap="showPop">
|
||||
<view class="tjitem-left">当前就诊人: {{name}}</view>
|
||||
<view class="tjitem-right">
|
||||
<view class="tjitem-right1">切换就诊人</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item4">
|
||||
<view class="xmTitle">
|
||||
<view>项目名称</view>
|
||||
<view>单价</view>
|
||||
<view>单位</view>
|
||||
<view>数量</view>
|
||||
<view>总金额</view>
|
||||
</view></view>
|
||||
</view>
|
||||
|
||||
<van-popup show="{{ show }}" round closeable position="bottom" bind:close="onClose">
|
||||
<view class="popWrap">
|
||||
<view class="title1">选择就诊人</view>
|
||||
<view class="userWrap">
|
||||
<view class="userItem" wx:for="{{list1}}" wx:key="item" data-item="{{item}}" bindtap="changePatient">
|
||||
<view class="msg1">
|
||||
<view class="up1">
|
||||
<view class="name1">{{item.TRUE_NAME}}</view>
|
||||
<view wx:if="{{item.RELATE == 0}}" class="guanxi1">本人</view>
|
||||
<view wx:elif="{{item.RELATE == 1}}" class="guanxi1">子女</view>
|
||||
<view wx:elif="{{item.RELATE == 2}}" class="guanxi1">夫妻 </view>
|
||||
<view wx:elif="{{item.RELATE == 3}}" class="guanxi1">父母 </view>
|
||||
<view wx:elif="{{item.RELATE == 4}}" class="guanxi1">朋友 </view>
|
||||
</view>
|
||||
<view class="down1">{{item.MEDICAL_CARD}}</view>
|
||||
</view>
|
||||
<view class="icon1">></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
<view class="item3">
|
||||
<view class="xmMsg"wx:for="{{showData}}" wx:key="item">
|
||||
<view>{{item.ypmc}}</view>
|
||||
<view>{{item.ypdj}}</view>
|
||||
<view>{{item.ypdw}}</view>
|
||||
<view>{{item.ypsl}}</view>
|
||||
<view>{{item.zje}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
209
pages/onehospitalization/onehospitalization.wxss
Normal file
209
pages/onehospitalization/onehospitalization.wxss
Normal file
@@ -0,0 +1,209 @@
|
||||
/* pages/onehospitalization/onehospitalization.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.content{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.hu {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
background-color: #fcf6e6;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tjitem-left {
|
||||
height: 80rpx;
|
||||
width: 70%;
|
||||
display: flex;
|
||||
/* justify-content: space-between; */
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
/* color:#d78b6a; */
|
||||
|
||||
/* border:2rpx solid #d78b6a; */
|
||||
}
|
||||
|
||||
.tjitem-right {
|
||||
width: 250rpx;
|
||||
height: 60rpx;
|
||||
border: 2rpx solid #d78b6a;
|
||||
color: #d78b6a;
|
||||
font-size: 25rpx;
|
||||
line-height: 60rpx;
|
||||
margin-right: 80rpx;
|
||||
/* align-items: center;
|
||||
justify-content: center; */
|
||||
}
|
||||
|
||||
.tjitem-right1 {
|
||||
margin-left: 50rpx;
|
||||
/* border:2rpx solid #7503f7; */
|
||||
}
|
||||
|
||||
.popWrap {
|
||||
height: 75%;
|
||||
width: 100%;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title1 {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 33rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.userWrap {
|
||||
height: 100%;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.userItem {
|
||||
height: 160rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
|
||||
.msg1 {
|
||||
height: 160rpx;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.up1 {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.name1 {
|
||||
font-size: 33rpx;
|
||||
height: 80rpx;
|
||||
color: #333;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.guanxi1 {
|
||||
height: 60rpx;
|
||||
width: 120rpx;
|
||||
margin-left: 20rpx;
|
||||
background: rgba(228, 240, 255);
|
||||
border-radius: 30rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
color: rgba(0, 110, 255);
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.down1 {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
color: rgb(158, 154, 154);
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.icon1 {
|
||||
color: rgb(180, 179, 179);
|
||||
padding-right: 15rpx;
|
||||
}
|
||||
|
||||
.font30 {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.color3 {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.color6 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.timeIcon {
|
||||
color: #666;
|
||||
font-size: 18rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
|
||||
.item3 {
|
||||
width: 100%;
|
||||
/* margin-top: 50rpx; */
|
||||
margin-top: 23vh;
|
||||
border-radius: 10rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 15rpx #e2e2e2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.item4 {
|
||||
width: 100%;
|
||||
margin-top: 3vh;
|
||||
border-radius: 10rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 15rpx #e2e2e2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.xmTitle {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #e2e2e2;
|
||||
}
|
||||
|
||||
.xmMsg {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #e2e2e2;
|
||||
}
|
||||
|
||||
.xmMsg view {
|
||||
width: 20%;
|
||||
padding: 20rpx 0;
|
||||
word-wrap: break-word;
|
||||
font-size: 25rpx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.xmTitle view {
|
||||
height: 100rpx;
|
||||
width: 20%;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.headerLocation{
|
||||
width: 90%;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
Reference in New Issue
Block a user