123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <template>
- <view>
- <view>
- <uni-search-bar :radius="100" @confirm="search" @input="input" @cancel="cancel"></uni-search-bar>
- </view>
- <uni-list>
- <uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.materialInCode)" clickable >
- <view slot="body" class="slot-box">
- <view class="row">
- <view class="column-left">编号:</view>
- <view class="column-right">{{item.viseId}}</view>
- </view>
- <view class="row">
- <view class="column-left">名称:</view>
- <view class="column-right">{{item.viseName}}</view>
- </view>
- <view class="row">
- <view class="column-left">日期:</view>
- <view class="column-right">{{item.viseDate}}</view>
- </view>
- <view class="row">
- <view class="column-left">所属部门:</view>
- <view class="column-right">{{item.unitFullName}}</view>
- </view>
- <view class="row">
- <view class="column-left">关联合同:</view>
- <view class="column-right">{{item.contractName}}</view>
- </view>
- <view class="row">
- <view class="column-left">状态:</view>
- <view class="column-right">{{item.stateName}}</view>
- </view>
- </view>
- </uni-list-item>
- </uni-list>
- <view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
- <router-link to="/pages/template/MaterialInAdd/MaterialInAdd" style="text-decoration: none;" title="入库单添加">
- <uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
- </router-link>
- </view>
- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
- </view>
- </template>
- <script>
- import {
- GetVises
- } from "@/common/api/viseApi.js";
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-
- export default {
- components: {
- uniLoadMore
- },
- data() {
- return {
- listData: [],
- searchvalue:'',
- last_id: '',
- reload: false,
- status: 'more',
- contentText: {
- contentdown: '上拉加载更多',
- contentrefresh: '加载中',
- contentnomore: '没有更多'
- }
- };
- },
- onLoad() {
- console.info("当前登录状态:" + this.$store.state.isLogin);
- //console.info(this);
- this.$util.persistLogin(this);
- },
- onPullDownRefresh() {
- this.reload = true;
- this.last_id = '';
- this.getList();
- },
- onReachBottom() {
- this.status = 'more';
- this.getList();
- },
- created: function() {
- this.getList();
- },
- methods: {
- getList() {
- let that = this;
- let projectcode = that.$util.getState(that,'projectCode');
- let search = this.searchvalue;
-
- GetVises(projectcode, search).then((res) => {
- console.info(res);
- that.listData=[];
- res.forEach(function(item, index, array) {
- that.$set(that.listData, index, item);
- });
- console.info(that.listData);
- });
- },
- goDetail: function(id) {
- console.info('待审签证godetail',id);
- uni.navigateTo({
- url: '/pages/template/GetVise/GetVise?id=' + id
- });
- },
- search(res) { //回车搜索
- this.searchvalue = res.value; //赋值
-
- this.getList(); //调用搜索方法
- },
- input(res) {
- this.searchVal = res.value
- },
- cancel(res) {
- console.info('点击取消,输入值为:' + res.value);
-
- }
- }
- };
- </script>
- <style scoped>
-
- </style>
|