init version kelfy-mini for new gitea

This commit is contained in:
terry.wang
2025-11-13 13:38:59 +08:00
commit 493fa4f1e1
763 changed files with 55626 additions and 0 deletions

View File

@@ -0,0 +1,219 @@
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);
},
//获取checkou信息
getCheckoutInfo: function() {
let that = this;
util.request(api.kfCartCheckout, {
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() {
wx.navigateBack({
delta: 3 //返回上一级页面
})
wx.navigateTo({
url: '/pages/payment/payment',
})
},
onConfirmTips: function(){
util.requestPost(api.kforderinfo, {
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,91 @@
<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>
<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;
}