123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 |
- <!-- 回收申请 -->
- <template>
- <view id="register">
- <view class="register_li">
- <view class="register_li_min" @click="handleClick('examination')">
- <view>资格申请</view>
- <view>{{zgCount}}</view>
- <img src="@/images/basicsModules/icon_04.png">
- </view>
- <view class="register_li_min" @click="handleClick('gas')" style="border: none;">
- <view>用气申请</view>
- <view>{{yqCount}}</view>
- <img src="@/images/basicsModules/icon_04.png">
- </view>
- </view>
- <view v-if="dataList2.length>0" class="small_title" @click="handleClick('gasList')">气瓶信息<img src="@/images/basicsModules/icon_wdwg_gd.png"></view>
- <view v-if="dataList2.length>0" class="register_li2" >
- <viwe class="register_li2_min" @tap="goInfo2(item2)" v-for="(item2,index2) in dataList2" :key="index2">
- <view class="register_li2_t">{{item2.airName}}-{{item2.configName}}</view>
- <view class="register_li2_b">
- <img src="@/pages_student/images/icon_qpgl_syl.png">
- <view>余量: {{item2.pressure==null?'-':item2.pressure}}Mpa</view>
- <img src="@/images/basicsModules/icon_wtzg_sj.png">
- <view>最近使用时间: {{item2.useTimeApp==null?'-':item2.useTimeApp}}</view>
- </view>
- </viwe>
- </view>
- <view v-if="dataList.length>0" class="small_title" @click="handleClick('useRecord')">使用记录<img src="@/images/basicsModules/icon_wdwg_gd.png"></view>
- <view v-if="dataList.length>0" class="register_li2">
- <viwe class="register_li2_min" @tap="goInfo(item)" v-for="(item,index) in dataList" :key="index">
- <view class="register_li2_t">{{item.airName}}-{{item.configName}}</view>
- <view class="register_li2_b" style="border:none">
- <img src="@/pages_student/images/icon_qpgl_syl.png">
- <view>使用量: {{item.pressure==null?'-':item.pressure}}Mpa</view>
- </view>
- <view class="register_li2_b2" style="border-bottom: 1rpx solid #f5f5f5;">
- <img src="@/images/basicsModules/icon_wtzg_sj.png">
- <view>使用时间: {{item.useTimeApp==null?'-':item.useTimeApp}} - {{item.backTimeApp==null?'-':item.backTimeApp}}</view>
- </view>
- </viwe>
- </view>
- <view class="btn" v-if="userApplyNumberYq || userApplyNumberZg">
- <view class="btn_l" @click="handleClick('gasApply')">气瓶申请</view>
- <view class="btn_r" @click="handleClick('QRcode')">使用/归还</view>
- </view>
- </view>
- </template>
- <script>
- import {useRecordList,listuseRecordByUserId,getUserApplyCount,useRegisterDetail } from '@/api/apiDemo/index.js'
- import { config } from '@/api/request/config.js'
- export default {
- data() {
- return {
- form:{
- name:'',
- },
- //列表请求参数
- getData:{
- pageNum:1,
- pageSize:3,
- },
- dataList:[],
- dataList2:[],
- yqCount:0,
- zgCount:0,
- userApplyNumberYq:null,//大于0显示使用人,等于零显示规格
- userApplyNumberZg:null,//大于0显示使用人,等于零显示规格
- electronicTag:'',
- }
- },
- onLoad(option) {
- this.getCount();
- },
- onShow(){
- },
- methods: {
- handleClick(doType) {
- let _this=this;
- if(doType=='examination'){//资格申请
- uni.navigateTo({
- url:'/pages_student/examination/examination'
- });
- }else if(doType=='gas'){//用气申请
- uni.navigateTo({
- url:'/pages_student/useGasApply/useGasApply'
- });
- }else if(doType=='audit'){//资格审核
- uni.navigateTo({
- url:'/pages_student/aptitudeAudit/aptitudeAudit'
- });
- }else if(doType=='useRecord'){//使用记录
- uni.navigateTo({
- url:'/pages_student/useRecord/useRecord'
- });
- }else if(doType=='gasApply'){//气瓶申请
- uni.navigateTo({
- url:'/pages_student/gasApply/gasApply'
- });
- }else if(doType=='gasList'){//气瓶列表
- uni.navigateTo({
- url:'/pages_student/gasList/gasList'
- });
- }else if(doType=='QRcode'){//
- uni.scanCode({
- onlyFromCamera: true,
- success: function (res) {
- _this.electronicTag=res.result
- _this.getInfo()
- }
- });
- }
- },
- //使用记录跳转详情
- goInfo(d){
- uni.navigateTo({
- url:'/pages_student/useRecord/useRecordDetail?item='+encodeURIComponent(JSON.stringify(d))
- });
- },
- //气瓶信息跳转详情
- goInfo2(d){
- uni.navigateTo({
- url:'/pages_student/gasList/gasListDetail?item='+encodeURIComponent(JSON.stringify(d))
- });
- },
- async getInfo(){
- let _this=this;
- const {data} = await useRegisterDetail({electronicTag:_this.electronicTag});
- if(data.code==200){
- let res = data.data;
- let userId=uni.getStorageSync('userId');
- if(res.currentStatus==4 && res.currentUserId==userId){
- uni.navigateTo({
- url:'/pages_student/useRegister/giveRegister?code='+_this.electronicTag
- });
- }else{
- uni.navigateTo({
- url:'/pages_student/useRegister/useRegister?code='+_this.electronicTag
- });
- }
- }
- },
- //获取使用记录列表
- async getList(){
- let _this = this;
- const {data} = await useRecordList(_this.getData)
- if(data.code==200){
- let res=data.rows
- _this.dataList=res
- }
- },
- //获取气瓶信息列表
- async getList2(){
- let _this = this;
- const {data} = await listuseRecordByUserId(_this.getData)
- if(data.code==200){
- let res=data.rows
- _this.dataList2=res
- }
- },
- //获取数量
- async getCount(){
- let _this = this;
- const {data} = await getUserApplyCount()
- if(data.code==200){
- let res=data.data
- _this.yqCount=res.yqCount;
- _this.zgCount=res.zgCount;
- _this.userApplyNumberYq=res.userApplyNumberYq;
- _this.userApplyNumberZg=res.userApplyNumberZg;
- }
- },
- },
- mounted() {
- this.getList();
- this.getList2();
- }
- }
- </script>
- <style lang="stylus" scoped>
- #register{
- height:auto;
- width:100%;
- display flex;
- flex-direction column;
- padding-bottom: 220rpx;
- .register_li{
- background #fff;
- border-radius:20rpx;
- margin:20rpx 20rpx 0;
- padding:20rpx 0;
- box-sizing: border-box;
- .register_li_min{
- margin:0 26rpx;
- display flex;
- align-items center;
- border-bottom: 1px solid #F5F5F5;
- view{
- line-height:100rpx;
- }
- view:nth-child(1){
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height:100rpx;
- }
- view:nth-child(2){
- flex:1;
- color: #0183FA;
- text-align: right;
- margin-right: 38rpx;
- }
- >img{
- width: 12rpx;
- height: 24rpx;
- }
- }
- }
- .small_title{
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 100rpx;
- margin: 0 40rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- >img{
- width: 24rpx;
- height: 24rpx;
- }
- }
- .register_li2{
- background #fff;
- border-radius:20rpx;
- margin:0 20rpx 0;
- padding:0 20rpx;
- box-sizing: border-box;
- .register_li2_min{
- .register_li2_t{
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 28rpx;
- margin-top: 28rpx;
- }
- .register_li2_b{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-top: 42rpx;
- padding-bottom: 28rpx;
- border-bottom: 1rpx solid #f5f5f5;
- >img{
- width: 28rpx;
- height: 28rpx;
- margin-right: 10rpx;
- }
- >view{
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 24rpx;
- }
- >view:nth-of-type(1){
- width: 230rpx;
- }
- >view:nth-child(2){
- }
- }
- .register_li2_b2{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- padding-bottom: 28rpx;
- >img{
- width: 28rpx;
- height: 28rpx;
- margin-right: 10rpx;
- }
- >view{
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 26rpx;
- }
- >view:nth-child(1){
- width: 200rpx;
- }
- >view:nth-child(2){
- flex: 1;
- }
- }
- }
- }
- /* 按钮 */
- .btn{
- display: flex;
- position: fixed;
- bottom: 0;
- .btn_l{
- width: 250rpx;
- background: #F28E26;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- .btn_r{
- width: 500rpx;
- background: #0183FA;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- }
- }
- /deep/.input-value-border{
- display :none !important;
- }
- </style>
|