Pārlūkot izejas kodu

app2.0 老生缴费金额校验 扫码报到功能

西昌缴费二期
杨晓琪 pirms 2 gadiem
vecāks
revīzija
ca785b64f7
6 mainītis faili ar 122 papildinājumiem un 66 dzēšanām
  1. +1
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js
  2. +33
    -37
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/R_EnterSchool/list.vue
  3. +26
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue
  4. +62
    -28
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/WelcomNewStudents/ConfirmStudentsCheckIn/list.vue
  5. Binārs
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/static/img-stuEnter/scanbtn.png
  6. Binārs
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/static/img-stuEnter/titlelogo.png

+ 1
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 33
- 37
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/R_EnterSchool/list.vue Parādīt failu

@@ -1,46 +1,42 @@
<template>
<view class="page">
<view class="btn scanCodeBtn" @click="tapScan">扫码</view>
<scanCode ref="refScanCode"></scanCode>
</view>
<view class=""><view class="btn" @click="tabCode">扫码</view></view>
</template>

<script>
import scanCode from "@/components/scanCode.vue"
import scanCodeFun from '@/common/js/scanCodeFun.js';
export default {
components:{scanCode},
data() {
return {};
},
methods: {
tapScan() {
this.$refs['refScanCode'].scanCode().then(res=>{
if (!res) return;
var userInfo = this.GET_GLOBAL("loginUser");
var result = this.HTTP_GET(
"learun/adms/EducationalAdministration/StuInfoBasic/stuinfo",
{
userid: userInfo.userId,
meetid: res.result,
},
"扫码出错"
).then(res1=>{
this.TOAST(res1.result)
data() {
return {};
},
methods: {
init() {
let _this = this;
// 允许从相机和相册扫码
scanCodeFun.scanCodeFun().then(res => {
//console.log(res);
if(!res) return
_this.LOADING('正在提交数据…');
_this.HTTP_GET('learun/adms/EducationalAdministration/StuInfoBasic/stuinfo', res.result, '加载数据时出错').then(res => {
_this.HIDE_LOADING();
//console.log(res);
if(res){
let url = res.HealthStatus == '0'? '../StudentQRCode/Normal/list' : res.HealthStatus == '1'? '../StudentQRCode/AbNormalWeak/list' : res.HealthStatus == '2'? '../StudentQRCode/AbNormalSerious/list' : '../StudentQRCode/Normal/list';
_this.NAV_TO(url, {stuNo:res.StuNo}, true);
}
})
})
})
},
},
},
tabCode() {
this.init();
}
},
mounted() {
let _this = this;
setTimeout(function() {
_this.init();
}, 100);
}
};
</script>

<style lang="less" scoped>
@import "~@/common/css/sidepage.less";
@import "~@/common/css/customlist.less";
.scanCodeBtn{
width: 120px;
height: 120px;
border-radius: 50%;
line-height: 120px;
margin-top: 180px;
}
</style>
<style></style>

+ 26
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue Parādīt failu

@@ -264,8 +264,16 @@ export default{
getpayfeetotal(){
let value = 0
this.FinaChargesStandardList.map(item=>{
let strValue = item.SJAmount.toString()
// if(strValue.split(".")[1]&&strValue.split(".")[1].length>2){
// item.SJAmount = strValue.match(/^\d+(?:\.\d{0,2})?/)
// }
if(/^-?\d+(,\d{3})*(\.\d{1,2})?$/.test(item.SJAmount)){
value += Number(item.SJAmount)
if(strValue.indexOf(".") == -1&&Number(item.SJAmount)%1 === 0){
item.SJAmount = Number(item.SJAmount)
}
value = this.numSub(value,Number(item.SJAmount))
// value += Number(item.SJAmount)
}
})
this.payfeetotal = value
@@ -280,6 +288,23 @@ export default{
})
this.item = item
},
numSub(num1, num2) {
var baseNum, baseNum1, baseNum2;
var precision;// 精度
try {
baseNum1 = num1.toString().split(".")[1].length;
} catch (e) {
baseNum1 = 0;
}
try {
baseNum2 = num2.toString().split(".")[1].length;
} catch (e) {
baseNum2 = 0;
}
baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
precision = (baseNum1 >= baseNum2) ? baseNum1 : baseNum2;
return ((num1 * baseNum + num2 * baseNum) / baseNum).toFixed(precision);
}
},
created() {
this.init()


+ 62
- 28
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/WelcomNewStudents/ConfirmStudentsCheckIn/list.vue Parādīt failu

@@ -1,39 +1,73 @@
<template>
<view class="page">
<view class="btn" @click="tapScan">
扫码
</view>
<view class="container">
<image class="logo" src="@/static/xc-logo.png" mode="widthFix"></image>
<image class="titlelogo" src="@/static/img-stuEnter/titlelogo.png" mode="widthFix"></image>
<image class="btn" src="@/static/img-stuEnter/scanbtn.png" mode="widthFix" @click="tapScan"></image>
<!-- <view class="page">
<view class="btn scanCodeBtn" @click="tapScan">扫码</view>
</view> -->
<scanCode ref="refScanCode"></scanCode>
</view>
</template>

<script>
import scanCodeFun from '@/common/js/scanCodeFun.js';
import scanCode from "@/components/scanCode.vue"
export default {
data() {
return {}
},
methods:{
init() {
let _this = this;
scanCodeFun.scanCodeFun().then(res => {
if(!res) return;
this.NAV_TO('./from', { StuNo: res.result }, true);
})
},
tapScan() {
this.init();
}
},
mounted() {
let _this = this;
setTimeout(function() {
_this.init();
}, 100);
}
components:{scanCode},
data() {
return {};
},
methods: {
tapScan() {
this.$refs['refScanCode'].scanCode().then(res=>{
if (!res) return;
// var userInfo = this.GET_GLOBAL("loginUser");
this.NAV_TO('./from', { StuNo: res.result }, true);
// var result = this.HTTP_GET(
// "learun/adms/EducationalAdministration/StuInfoBasic/stuinfo",
// {
// userid: userInfo.userId,
// meetid: res.result,
// },
// "扫码出错"
// ).then(res1=>{
// this.TOAST(res1.result)
// })
})
},
},
};
</script>

<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
// @import "~@/common/css/sidepage.less";
// @import "~@/common/css/customlist.less";
// .scanCodeBtn{
// width: 120px;
// height: 120px;
// border-radius: 50%;
// line-height: 120px;
// }
.logo{
width: 258px;
}
.titlelogo{
width: 268px;
margin-top: 52px;
margin-bottom: 20px;
}
.btn{
width: 184px;
}
.container{
height: 100vh;
text-align: center;
box-sizing: border-box;
background-image: url("@/static/stu-bg.png");
background-repeat: no-repeat;
background-size: 100%;
background-color: #0c86d8;
}
</style>

Binārs
Learun.Framework.Ultimate V7/LearunApp-2.2.0/static/img-stuEnter/scanbtn.png Parādīt failu

Pirms Pēc
Platums: 367  |  Augstums: 366  |  Izmērs: 20 KiB

Binārs
Learun.Framework.Ultimate V7/LearunApp-2.2.0/static/img-stuEnter/titlelogo.png Parādīt failu

Pirms Pēc
Platums: 540  |  Augstums: 155  |  Izmērs: 13 KiB

Notiek ielāde…
Atcelt
Saglabāt