GetMaterialOuts.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view>
  3. <uni-list>
  4. <uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.materialOutCode)" clickable >
  5. <view slot="body" class="slot-box">
  6. <view class="row">
  7. <view class="column-left">领料编号:</view>
  8. <view class="column-right section-title">{{item.materialOutCode}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="column-left">状态:</view>
  12. <view class="column-right">{{item.statusName}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="column-left">领料类型:</view>
  16. <view class="column-right">{{item.groupName}}</view>
  17. </view>
  18. <view class="row">
  19. <view class="column-left">调拨人:</view>
  20. <view class="column-right">{{item.outPersonName}}</view>
  21. </view>
  22. <view class="row">
  23. <view class="column-left">领料日期:</view>
  24. <view class="column-right">{{item.outDate}}</view>
  25. </view>
  26. <view class="row">
  27. <view class="column-left">工程合同:</view>
  28. <view class="column-right">{{item.contractName}}</view>
  29. </view>
  30. </view>
  31. </uni-list-item>
  32. </uni-list>
  33. <view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
  34. <router-link to="/pages/template/MaterialOutAdd/MaterialOutAdd" style="text-decoration: none;" title="领料单添加">
  35. <uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
  36. </router-link>
  37. </view>
  38. <page-foot :isShow="true" :showIndex="3"></page-foot>
  39. <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. getUnit,
  45. getUnitUser
  46. } from "@/common/api/commonApi.js";
  47. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  48. import {
  49. GetMaterialOuts
  50. } from "@/common/api/MaterialInOut.js";
  51. export default {
  52. components: {
  53. uniLoadMore
  54. },
  55. data() {
  56. return {
  57. listData: [],
  58. last_id: '',
  59. reload: false,
  60. status: 'more',
  61. contentText: {
  62. contentdown: '上拉加载更多',
  63. contentrefresh: '加载中',
  64. contentnomore: '没有更多'
  65. }
  66. };
  67. },
  68. onLoad() {
  69. console.info("当前登录状态:" + this.$store.state.isLogin);
  70. //console.info(this);
  71. this.$util.persistLogin(this);
  72. },
  73. onPullDownRefresh() {
  74. this.reload = true;
  75. this.last_id = '';
  76. this.getList();
  77. },
  78. onReachBottom() {
  79. this.status = 'more';
  80. this.getList();
  81. },
  82. created: function() {
  83. this.getList();
  84. },
  85. methods: {
  86. getList() {
  87. let that = this;
  88. let projectcode = that.$util.getState(that,'projectCode');
  89. let usercode = that.$util.getState(that,'userCode');
  90. let search = '';
  91. GetMaterialOuts(projectcode, search).then((res) => {
  92. console.info(res);
  93. res.forEach(function(item, index, array) {
  94. that.$set(that.listData, index, item);
  95. });
  96. console.info(that.listData);
  97. });
  98. },
  99. goDetail: function(id) {
  100. console.info('领料单 godetail',id);
  101. uni.navigateTo({
  102. url: '/pages/template/GetMaterialOutDetail/GetMaterialOutDetail?id=' + id
  103. });
  104. },
  105. }
  106. };
  107. </script>
  108. <style scoped lang="scss">
  109. .uni-list-item{
  110. border-bottom: $BgColorBlue;
  111. }
  112. </style>