GetMaterialOuts.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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">{{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. <page-foot :isShow="true" :showIndex="3"></page-foot>
  34. <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
  35. </view>
  36. </template>
  37. <script>
  38. import {
  39. getUnit,
  40. getUnitUser
  41. } from "@/common/api/commonApi.js";
  42. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  43. import {
  44. GetMaterialOuts
  45. } from "@/common/api/MaterialInOut.js";
  46. export default {
  47. components: {
  48. uniLoadMore
  49. },
  50. data() {
  51. return {
  52. listData: [],
  53. last_id: '',
  54. reload: false,
  55. status: 'more',
  56. contentText: {
  57. contentdown: '上拉加载更多',
  58. contentrefresh: '加载中',
  59. contentnomore: '没有更多'
  60. }
  61. };
  62. },
  63. onLoad() {
  64. console.info("当前登录状态:" + this.$store.state.isLogin);
  65. //console.info(this);
  66. this.$util.persistLogin(this);
  67. },
  68. onPullDownRefresh() {
  69. this.reload = true;
  70. this.last_id = '';
  71. this.getList();
  72. },
  73. onReachBottom() {
  74. this.status = 'more';
  75. this.getList();
  76. },
  77. created: function() {
  78. this.getList();
  79. },
  80. methods: {
  81. getList() {
  82. let that = this;
  83. let projectcode = that.$util.getState(that,'projectCode');
  84. let usercode = that.$util.getState(that,'userCode');
  85. let search = '';
  86. GetMaterialOuts(projectcode, search).then((res) => {
  87. console.info(res);
  88. res.forEach(function(item, index, array) {
  89. that.$set(that.listData, index, item);
  90. });
  91. console.info(that.listData);
  92. });
  93. },
  94. goDetail: function(id) {
  95. console.info('领料单 godetail',id);
  96. uni.navigateTo({
  97. url: '/pages/template/GetMaterialOutDetail/GetMaterialOutDetail?id=' + id
  98. });
  99. },
  100. }
  101. };
  102. </script>
  103. <style scoped>
  104. </style>