123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <!--气瓶申请-->
- <template>
- <view id="transportPerson">
- <scroll-view scroll-y @scrolltolower="scrollGet" class="scroll-box">
- <view class="list">
- <view class="list_li" v-for="(item,index) in dataList" @click="goInfo(item)">
- <view class="list_li_t">
- <img class="for-back-img" src="@/pages_manage/images/icon_ysclgl_cl.png">
- <text>申请时间:{{item.createTime}}</text>
- <text v-if="item.applyNum==item.storageNum">已全部入库</text>
- </view>
- <view class="list_li_b">
- <view>申请:<text>{{item.applyNum}}</text></view>
- <view>入库:<text>{{item.storageNum}}</text></view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="empty" v-if="pageType==4">
- <img class="for-back-img" src="@/pages_manage/images/img_ysrygl_zwsj.png">
- <view>暂无数据</view>
- </view>
- <view class="sub_btn" @click="subBtn()">提交申请</view>
- </view>
- </template>
- <script>
- import { gasApplyList } from '@/api/apiDemo/index.js'
- export default {
- name: "transportPerson",
- data() {
- return {
- pageType:0,
- //列表请求参数
- getData:{
- pageNum:1,
- pageSize:20,
- },
- pageType:0,
- dataList:[],
- }
- },
- onLoad() {
- },
- onShow() {
- },
- methods: {
- //滚动加载事件
- scrollGet(){
- this.getData.pageNum += 1;
- this.getList();
- },
- subBtn(){
- uni.redirectTo({
- url:'/pages_manage/gasBottle/gasApply/gasApplyAdd?status=0'
- });
- },
- goInfo(d){
- uni.redirectTo({
- url:'/pages_manage/gasBottle/gasApply/gasApplyList?item='+encodeURIComponent(JSON.stringify(d))
- });
- },
- //获取列表数据
- async getList(){
- let _this=this;
- const {data} = await gasApplyList(this.getData);
- if(data.code==200){
- let res=data.rows;
- if(_this.getData.pageNum==1){
- _this.dataList=res;
- if(res.length>0){
- _this.pageType=0;
- }else{
- _this.pageType=4;
- }
- }else{
- _this.dataList=_this.dataList.concat(res);
- }
- }
- },
- },
- mounted(){
- this.getList()
- },
- }
- </script>
- <style lang="stylus" scoped>
- #transportPerson {
- height: 100%;
- width: 100%;
- flex :1;
- display flex;
- flex-direction column
- overflow hidden;
- margin-top: 20rpx;
- .scroll-box{
- // flex:1;
- overflow-y scroll;
- padding-bottom: 180rpx;
- .list{
- background: #FFFFFF;
- border-radius: 20rpx;
- margin: 0 20rpx;
- padding: 0 20rpx;
- box-sizing: border-box;
- .list_li{
- border-bottom:1px solid #f5f5f5;
- padding: 30rpx 0 20rpx 0;
- box-sizing: border-box;
- .list_li_t{
- display: flex;
- align-items: center;
- >img{
- width: 30rpx;
- height: 30rpx;
- margin-right: 16rpx;
- }
- >text:nth-of-type(1){
- width: 530rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 28rpx;
- }
- >text:nth-of-type(2){
- width: 130rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #00CC26;
- line-height: 24rpx;
- }
- }
- .list_li_b{
- display: flex;
- margin-top: 42rpx;
- >view{
- width: 150rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 26rpx;
- >text{
- font-size: 26rpx;
- color: #0183FA;
- }
- }
- >view:nth-of-type(2){
- >text{
- font-size: 26rpx;
- color: #00CC26;
- }
- }
- }
- }
- }
- }
- .empty{
- text-align: center;
- margin-top: 316rpx;
- >img{
- width: 336rpx;
- height: 222rpx;
- margin-left: 208rpx;
- }
- >view{
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #E0E0E0;
- line-height: 30rpx;
- margin-top: 48rpx;
- }
- }
- /* 按钮 */
- .sub_btn{
- width: 650rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 20rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- margin-left: 50rpx;
- position: fixed;
- bottom:30rpx;
- z-index: 1000;
- }
- }
- </style>
|