dynamics.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="order-list content">
  3. <view class="swiper-box">
  4. <template v-if="tableData.length">
  5. <view class="order-card" v-for="item in tableData" :key="item.id">
  6. <view class="order-card-title">
  7. 单据编号:{{item.billCode}}
  8. </view>
  9. <view class="order-info">
  10. <p class="info-line">
  11. <text class="label">操作人:</text>
  12. <text class="info">{{item.createUser || ''}}</text>
  13. </p>
  14. <p class="info-line">
  15. <text class="label">操作时间:</text>
  16. <text class="info">{{item.createDate || ''}}</text>
  17. </p>
  18. <p class="info-line">
  19. <text class="label">单据类型:</text>
  20. <text class="info" v-if="item.kind == '11'">入库</text>
  21. <text class="info" v-if="item.kind == '21'">入库退货</text>
  22. <text class="info" v-if="item.kind == '14'">出库</text>
  23. <text class="info" v-if="item.kind == '24'">出库退货</text>
  24. <text class="info" v-if="item.kind == '16'">盘库</text>
  25. </p>
  26. <p class="info-line">
  27. <text class="label">操作前数量:</text>
  28. <text class="info">{{item.beginNum}}</text>
  29. </p>
  30. <p class="info-line">
  31. <text class="label">操作数量:</text>
  32. <text class="info">{{item.operateNum}}</text>
  33. </p>
  34. <p class="info-line">
  35. <text class="label">操作后数量:</text>
  36. <text class="info">{{item.finishNum}}</text>
  37. </p>
  38. <p class="info-line">
  39. <text class="label">操作类型:</text>
  40. <text class="info" v-if="item.operate == 'add'">增加</text>
  41. <text class="info" v-if="item.operate == 'eqs'">不变</text>
  42. <text class="info" v-if="item.operate == 'sub'">减少</text>
  43. </p>
  44. <p class="info-line">
  45. <text class="label">备注:</text>
  46. <text class="info">{{item.remark || ''}}</text>
  47. </p>
  48. </view>
  49. </view>
  50. </template>
  51. <template v-else>
  52. <u-empty mode="list" icon="https://cdn.uviewui.com/uview/empty/list.png">
  53. </u-empty>
  54. </template>
  55. </view>
  56. <u-loading-page
  57. color="#666"
  58. loading-mode="semicircle"
  59. :loading="loading">
  60. </u-loading-page>
  61. </view>
  62. </template>
  63. <script>
  64. import dayjs from 'dayjs'
  65. import {request} from '../../utils/request'
  66. import { getLabel } from '../../utils/util'
  67. import {getLiveRecordsByMaterialId} from '../../api/stock'
  68. export default {
  69. components:{
  70. },
  71. data() {
  72. return {
  73. getLabel,
  74. tableData:[],
  75. loading:false,
  76. code:'',
  77. unitList:[],
  78. id:"",
  79. store:'',
  80. };
  81. },
  82. onLoad(options) {
  83. this.id = options.materialId
  84. this.store = options.store
  85. this.getList()
  86. this.getOption()
  87. },
  88. // onShow() {
  89. // this.getList()
  90. // },
  91. methods: {
  92. //获取单位
  93. getOption(){
  94. request({
  95. url:'/admin/dict/type/spare_unit',
  96. method:'get',
  97. })
  98. .then(res=>{
  99. if(res.data.code == 0){
  100. this.unitList = res.data.data
  101. }
  102. })
  103. },
  104. //获取订单列表
  105. getList() {
  106. this.loading = true
  107. let data = {
  108. materialId:this.id,
  109. store:this.store
  110. }
  111. getLiveRecordsByMaterialId(data).then((res) => {
  112. if (res.data.code == 0) {
  113. this.tableData = res.data.data
  114. this.loading = false
  115. }
  116. });
  117. },
  118. },
  119. };
  120. </script>
  121. <style>
  122. /* #ifndef APP-NVUE */
  123. view {
  124. /* display: flex; */
  125. box-sizing: border-box;
  126. /* flex-direction: column; */
  127. }
  128. page {
  129. box-sizing: border-box;
  130. /* padding: 40rpx 40rpx 80rpx; */
  131. height: 100%;
  132. }
  133. /* #endif*/
  134. </style>
  135. <style lang="scss" scoped>
  136. @import '../../common/css/public.scss';
  137. .order-list {
  138. // height: calc(100vh - var(--window-top)) ;
  139. // overflow: hidden;
  140. background-color: #f8f8f8;
  141. .qrcode-wrap{
  142. padding: 24rpx;
  143. text-align: center;
  144. .info-line{
  145. text-align: center;
  146. font-size: 32rpx;
  147. margin-top: 24rpx;
  148. }
  149. }
  150. }
  151. .popupShow {
  152. overflow: hidden;
  153. position: fixed;
  154. }
  155. </style>