GetMaterialIns.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <uni-list>
  4. <uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.materialInCode)" clickable >
  5. <view slot="body" class="slot-box">
  6. <view class="row">
  7. <view class="column-left">入库编号:</view>
  8. <view class="column-right">{{item.materialInCode}}</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.purUserName}}</view>
  21. </view>
  22. <view class="row">
  23. <view class="column-left">入库时间:</view>
  24. <view class="column-right">{{item.inDate}}</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/MaterialInAdd/MaterialInAdd" style="text-decoration: none;" title="入库单添加">
  35. <uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
  36. </router-link>
  37. </view>
  38. <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. getUnit,
  44. getUnitUser
  45. } from "@/common/api/commonApi.js";
  46. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  47. import {
  48. GetMaterialIns
  49. } from "@/common/api/requisitionApi.js";
  50. export default {
  51. components: {
  52. uniLoadMore
  53. },
  54. data() {
  55. return {
  56. listData: [],
  57. last_id: '',
  58. reload: false,
  59. status: 'more',
  60. contentText: {
  61. contentdown: '上拉加载更多',
  62. contentrefresh: '加载中',
  63. contentnomore: '没有更多'
  64. }
  65. };
  66. },
  67. onLoad() {
  68. console.info("当前登录状态:" + this.$store.state.isLogin);
  69. //console.info(this);
  70. this.$util.persistLogin(this);
  71. },
  72. onPullDownRefresh() {
  73. this.reload = true;
  74. this.last_id = '';
  75. this.getList();
  76. },
  77. onReachBottom() {
  78. this.status = 'more';
  79. this.getList();
  80. },
  81. created: function() {
  82. this.getList();
  83. },
  84. methods: {
  85. getList() {
  86. let that = this;
  87. let projectcode = that.$store.state.projectCode;
  88. let usercode = that.$store.state.user.userCode;
  89. let search = '';
  90. //let where='1=1 and projectcode=\''+this.$store.state.projectCode+'\'';
  91. GetMaterialIns(projectcode, usercode, 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/GetMaterialIn/GetMaterialIn?id=' + id
  103. });
  104. },
  105. }
  106. };
  107. </script>
  108. <style scoped>
  109. </style>