Browse Source

首页新增下拉加载。优化申请开票布局

master
liaoxinyu 2 years ago
parent
commit
5ed0de9cc0
  1. 1
      pages.json
  2. 33
      pages/Invoicing/Invoicing.vue
  3. 18
      pages/index/index.vue
  4. 28
      pages/wxlogin/registerphone.vue

1
pages.json

@ -13,6 +13,7 @@
"navigationBarTitleText": "电子发票",
"navigationBarBackgroundColor": "#000",
"navigationBarTextStyle": "white"
// "navigationStyle": "custom"
// "onReachBottomDistance": 10//
}
},

33
pages/Invoicing/Invoicing.vue

@ -29,7 +29,7 @@
</uni-forms-item>
<uni-forms-item label="合并开票:" required name="name" :label-width="90">
<!-- <uni-data-checkbox v-model="list1.merge" :localdata="mergelist"></uni-data-checkbox> -->
<radio-group @change="radioChange" style="height: 100%;display: flex;align-items: center;">
<radio-group @change="radioChange" style="height: 100%;display: flex;align-items: center;margin-left: 20rpx;">
<label v-for="(item,index) in mergelist" :key="item.value">
<radio :value="item.value" :checked="list1.merge === item.value" /><text>{{item.text}}</text>
</label>
@ -51,11 +51,11 @@
</view>
</uni-forms-item>
<view class="form-title">接收方式</view>
<uni-forms-item label="手机号码:" required name="name" :label-width="90">
<uni-easyinput type="text" v-model="list1.phone" :styles="styles" :inputBorder="false" @blur="onInput" placeholder="请输入可用手机号码"></uni-easyinput>
<uni-forms-item label="手机号码" required name="name" :label-width="90">
<uni-easyinput style="margin-left: 16rpx;" type="text" v-model="list1.phone" :styles="styles" :inputBorder="false" @blur="onInput" placeholder="请输入可用手机号码"></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="邮箱号:" name="name" :label-width="78" style="margin-left: 40rpx;">
<uni-easyinput type="text" v-model="list1.email" :inputBorder="false" placeholder="请输入邮箱" @blur="validateEmail"></uni-easyinput>
<uni-forms-item label="邮箱" name="name" :label-width="82" style="margin-left: 40rpx;">
<uni-easyinput style="margin-left: 16rpx;" type="text" v-model="list1.email" :inputBorder="false" placeholder="请输入邮箱" @blur="validateEmail"></uni-easyinput>
</uni-forms-item>
</uni-forms>
</view>
@ -95,7 +95,7 @@
</uni-forms-item>
<view class="form-title">抬头信息</view>
<uni-forms-item label="抬头类型" name="name" :label-width="90">
<radio-group @change="radioChange2" style="height: 100%;display: flex;align-items: center;" >
<radio-group @change="radioChange2" style="height: 100%;display: flex;align-items: center;color: #999;" >
<label v-for="(item,index) in headerType" :key="item.value">
<radio :value="list2.type" :checked="list2.type === item.value" disabled /><text>{{item.text}}</text>
</label>
@ -104,14 +104,14 @@
<uni-forms-item label="名称" name="name" :label-width="90">
<view class="list3_box">{{list2.title}}</view>
</uni-forms-item>
<uni-forms-item label="税号" name="name" :label-width="90">
<uni-forms-item label="税号" name="name" :label-width="90" v-if="list2.type=='0'">
<view class="list3_box">{{list2.tax_number}}</view>
</uni-forms-item>
<view class="form-title">接收方式</view>
<uni-forms-item label="邮箱" name="name" :label-width="90">
<view class="list3_box">{{list1.email}}</view>
<uni-forms-item label="电子邮箱" name="name" :label-width="90">
<view class="list3_box" style="color: #999;">{{list1.email?list1.email:'请选择电子邮箱'}}</view>
</uni-forms-item>
<uni-forms-item label="手机号码" name="name" :label-width="90">
<uni-forms-item label="电话号码" name="name" :label-width="90">
<view class="list3_box">{{list1.phone}}</view>
</uni-forms-item>
</uni-forms>
@ -134,7 +134,7 @@
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="base" title=" " :showClose="false"
confirmText="知道了" content="该账单还未缴费,请先完成缴费。"></uni-popup-dialog>
confirmText="知道了" :content="text"></uni-popup-dialog>
</uni-popup>
<!-- 账期弹框 -->
<uni-popup ref="popup" type="bottom" background-color="#fff">
@ -232,6 +232,7 @@
mergelist: [{text: '不合并',value: '0'},{text: '合并',value: '1'}],
form1:{},
form2:{},
text:''
}
},
onLoad() {
@ -452,7 +453,8 @@
this.stepsIndex = 0;
}
API.validateFeePay(data, res => {
this.amount = res.data.amount
this.amount = res.data.amount;
this.text = res.msg;
if(!this.amount){
this.$refs.inputDialog.open();
this.stepsIndex = 0;
@ -667,7 +669,9 @@
/deep/.uni-radio-input{
width: 35rpx;
height: 35rpx;
margin-left: 20rpx;
}
/deep/.uni-label-pointer{
margin-right: 20rpx;
}
/deep/.uni-select__input-placeholder{
color: #999;
@ -676,6 +680,9 @@
/deep/.uni-easyinput__placeholder-class{
font-size: 28rpx;
}
/deep/.uni-easyinput__content-input{
padding-left: 0px !important;
}
.popup-header {
display: flex;
justify-content: space-between;

18
pages/index/index.vue

@ -12,7 +12,9 @@
</view>
</view>
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="onReachBottom1" :lower-threshold="0" :scroll-top="scrollTop" @scroll="scrolltop">
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="onReachBottom1" :lower-threshold="0"
:scroll-top="scrollTop" @scroll="scrolltop" refresher-enabled="true" :refresher-triggered="refreshing"
:refresher-threshold="50" @refresherrefresh="onRefresh">
<view class="index_list" v-for="(item, index) in universityList" :key="index" style="margin-bottom: 20rpx;" @click="toviewinvoice(item.serial_number,item.status)"
:class="item.status==='已作废'?'back1':'back2'">
<view class="d-flex jcontent-between">
@ -85,7 +87,8 @@
state:'',
scrollTop: 0,//
start_date:'',//
end_date:''//
end_date:'',//
refreshing: false,
}
},
onLoad(options) {
@ -115,6 +118,14 @@
}
},
methods: {
onRefresh() {
this.getUniversityList()
if (this.refreshing) return;
this.refreshing = true;
setTimeout(() => {
this.refreshing = false;
}, 1000)
},
// URL
getUrlParams(url) {
const params = {};
@ -398,7 +409,8 @@
.scroll-Y{
width: 100%;
/* #ifdef H5 */
height: calc(100vh - 154px);
height: calc(100vh - 308rpx);
// height: calc(100vh - 108px); //
/* #endif */
/* #ifdef MP-WEIXIN || APP-PLUS */
height: calc(100vh - 218rpx);

28
pages/wxlogin/registerphone.vue

@ -58,6 +58,15 @@
uni.showToast({title: '请输入手机号',icon: 'none'});
return
}
const phonePattern = /^1[3-9]\d{9}$/;
if (!phonePattern.test(this.mobile)) {
uni.showToast({
title: '您输入的手机号格式有误',
icon: 'none'
});
return
}
this.num = 60; //
localStorage.setItem('countdownNum', this.num);
this.intervalId = setInterval(this.countDownTimer, 1000);
@ -68,17 +77,7 @@
},
//
onInput(event) {
// 使
const phonePattern = /^1[3-9]\d{9}$/;
if (!phonePattern.test(event.detail.value) && event.detail.value) {
uni.showToast({
title: '您输入的手机号格式有误',
icon: 'none'
});
this.mobile = ''; //
}else{
this.mobile = event.detail.value
}
},
register(){
if(!this.mobile){
@ -93,6 +92,15 @@
uni.showToast({title: '请输入短信验证码',icon: 'none'});
return
}
const phonePattern = /^1[3-9]\d{9}$/;
if (!phonePattern.test(this.mobile)) {
uni.showToast({
title: '您输入的手机号格式有误',
icon: 'none'
});
return
}
const url = '/wechat/wechat/savePuCode'
let data = {
mobile:this.mobile,

Loading…
Cancel
Save