123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <view>
- <view class="uni-list">
- <block v-for="(item, index) in listData" :key="index">
- <view class="uni-list-cell" hover-class="uni-list-cell-hover" @click="goDetail(item.requisitionCode)">
- <view class="uni-media-list">
- <view class="uni-media-list-body">
- <view class="uni-media-list-text-top" style="font-size:18px;"> {{item.requisitionName}} </view>
- <view style="font-size:13px;" class="uni-media-list-text-body">{{item.requisitionReason.substring(0,30)}}</view>
- <view class="uni-media-list-text-bottom">
- <text>申请人:{{item.person}}</text>
- <text>{{item.requisitionDate.substring(0,10)}}</text>
- </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- <view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
- <router-link :to="'/pages/template/requisitionadd/requisitionadd?type='+type" style="text-decoration: none;" title="签证申请添加">
- <uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
- </router-link>
- </view>
- <page-foot :isShow="true" :showIndex="1"></page-foot>
- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
- </view>
- </template>
- <script>
- import {
- getUnit,
- getUnitUser
- } from "@/common/api/commonApi.js";
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- import {
- GetRequisitionList
- } from "@/common/api/requisitionApi.js";
- export default {
- components: {
- uniLoadMore
- },
- data() {
- return {
- listData: [],
- last_id: '',
- reload: false,
- status: 'more',
- adpid: '',
- type:0,
- contentText: {
- contentdown: '上拉加载更多',
- contentrefresh: '加载中',
- contentnomore: '没有更多'
- }
- };
- },
- onLoad() {
- console.info("当前登录状态:" + this.$store.state.isLogin);
- //console.info(this);
- this.$util.persistLogin(this);
- this.adpid = this.$adpid;
-
- //this.getList();
- },
- onPullDownRefresh() {
- this.reload = true;
- this.last_id = '';
- this.getList();
- },
- onReachBottom() {
- this.status = 'more';
- this.getList();
- },
- created: function() {
- if(this.$util.getQuery("type")=="1")
- {
- this.type=1;
- uni.setNavigationBarTitle({
- title:'变更申请单'
- });
- }
- else{
- this.type=0;
- uni.setNavigationBarTitle({
- title:'签证申请单'
- });
- }
- this.getList();
- },
- methods: {
- getList() {
- let that = this;
- let projectCode=this.$util.getState(this,'projectCode');
- let type=this.$util.getQuery("type")-0;
- GetRequisitionList(projectCode,type).then((res) => {
- console.info(res);
- if(res=="-1"){
- uni.showToast({
- title:'项目编号或类型为空',
- duration:4000,
- icon:'none'
- });
- return;
- }
- res.forEach(function(item, index, array) {
- that.$set(that.listData, index, item);
- });
- console.info(that.listData);
- });
- },
- goDetail: function(id) {
- console.info('godetail');
- console.info(id);
- let type=this.$util.getQuery("type");
- uni.navigateTo({
- // requisitiondetail
- url: '../requisitiondetail/requisitiondetail?id=' + id
- });
- },
-
- }
- };
- </script>
- <style scoped>
- .uni-media-list-body {
- height: auto;
- justify-content: space-around;
- }
- .uni-media-list-text-top {
-
- height:35px;
- line-height: 35px;
- font-size: 15rpx;
- font-weight: 500;
- letter-spacing:1px;
- overflow: hidden;
- }
- .uni-media-list-text-body{
-
- flex-direction: row;
- height:50px;
- font-size: 13px;
- color: #8f8f94;
- letter-spacing:1px;
- }
- .uni-media-list-text-bottom {
- display: flex;
- justify-content: space-between;
- height:35px;
- line-height: 35px;
- font-size: 13px;
- color: #8f8f94;
- letter-spacing:1px;
- padding-bottom: 0;
- }
- </style>
|