index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view>
  3. <view class="status_bar">
  4. <!-- 这里是状态栏 -->
  5. </view>
  6. <uni-nav-bar shadow left-icon="left" title="入库列表" @clickLeft="back" />
  7. <view v-for="item in dataList" :key="item.id">
  8. <uni-card :is-shadow="false" margin="5px" @click='goPage(item)'>
  9. <template v-slot:title>
  10. <uni-list>
  11. <uni-list-item :title="'入库单号:'+item.fBillno" showArrow />
  12. </uni-list>
  13. </template>
  14. <view class="card-content">
  15. <text>提单号/入库日期:{{item.fMblno}}/{{item.fBsdate}}</text>
  16. <text>客户名称:{{item.fName}}</text>
  17. <text>货物名称:{{item.goodsName}}</text>
  18. <text>库区:{{item.fWarehouseInformation}}</text>
  19. <text>件数/重量:{{item.fQty}}/{{item.fGrossweight}}</text>
  20. <text>属性/属性详情:{{item.fBusinessType|storageFilters}}/{{item.fMarks}}</text>
  21. </view>
  22. </uni-card>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. dataList: [],
  31. query: {
  32. billtype: "SJRK",
  33. },
  34. userName: null,
  35. };
  36. },
  37. onLoad() {
  38. uni.setStorageSync('type', 1);
  39. this.userName = uni.getStorageSync('userName')
  40. this.getList()
  41. },
  42. onPullDownRefresh() {
  43. this.getList()
  44. },
  45. filters: {
  46. storageFilters: function(row) {
  47. let list = uni.getStorageSync('storageType');
  48. let name = ""
  49. if (row) {
  50. list.forEach(e => {
  51. if (e.dictValue == row) {
  52. name = e.dictLabel
  53. }
  54. })
  55. }
  56. return name
  57. }
  58. },
  59. methods: {
  60. back() {
  61. uni.navigateBack({
  62. delta: 1
  63. })
  64. },
  65. goPage(row) {
  66. uni.navigateTo({
  67. url: `../addTags?fId=${row.fId}&itemId=${row.itemId}&fType=1&storekeeper=${this.userName}&fQty=${row.fQty}`,
  68. });
  69. },
  70. getList() {
  71. this.query.storekeeper = this.userName
  72. uni.showLoading({
  73. title: '加载中...'
  74. });
  75. this.$u.get('/appHold/warehouseBills/list', this.query).then(res => {
  76. this.dataList = res.rows
  77. uni.stopPullDownRefresh();
  78. })
  79. .finally(() => {
  80. uni.hideLoading();
  81. });
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. .status_bar {
  88. height: var(--status-bar-height);
  89. width: 100%;
  90. background-color: rgb(52, 120, 243);
  91. }
  92. .card-content {
  93. display: flex;
  94. flex-direction: column;
  95. text: {
  96. color: #000000
  97. }
  98. }
  99. </style>