GetMaterialIns.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 section-title">{{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. <page-foot :isShow="true" :showIndex="2"></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. GetMaterialIns
  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.$store.state.projectCode;
  89. let usercode = that.$store.state.user.userCode;
  90. let search = '';
  91. //let where='1=1 and projectcode=\''+this.$store.state.projectCode+'\'';
  92. GetMaterialIns(projectcode, usercode, search).then((res) => {
  93. console.info(res);
  94. res.forEach(function(item, index, array) {
  95. that.$set(that.listData, index, item);
  96. });
  97. console.info(that.listData);
  98. });
  99. },
  100. goDetail: function(id) {
  101. console.info('入库单 godetail',id);
  102. uni.navigateTo({
  103. url: '/pages/template/GetMaterialIn/GetMaterialIn?id=' + id
  104. });
  105. },
  106. }
  107. };
  108. </script>
  109. <style scoped lang="scss">
  110. .uni-list-item{
  111. border-bottom: $BgColorBlue;
  112. }
  113. </style>