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