changeList.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <scroll-view scroll-y scroll-with-animation class="main-view">
  5. <view class="space-view ex-table">
  6. <block v-if="!$util.isEmpty(list.data)">
  7. <t-table :headerBackgroundColor="'#F0F2F6'">
  8. <t-tr header>
  9. <t-th><view style="width:200upx;color:#333333;font-size:30upx;font-weight:bold;">时间</view></t-th>
  10. <t-th><view style="color:#333333;font-size:30upx;font-weight:bold;">操作</view></t-th>
  11. <t-th><view style="color:#333333;font-size:30upx;font-weight:bold;">事项</view></t-th>
  12. <t-th><view style="color:#333333;font-size:30upx;font-weight:bold;">价格</view></t-th>
  13. </t-tr>
  14. <t-tr v-for="(item, index) in list.data" :key="index">
  15. <t-td align="center" color="info">
  16. <view style="width:200upx;color:#333333;font-size:30upx;">
  17. <view>{{ item.addTime.substr(5,11) }}</view>
  18. <view>{{item.ptStyle==1?'零售':'批发'}}</view>
  19. </view>
  20. </t-td>
  21. <t-td><view style="color:#333333;font-size:30upx;">{{item.staffName}}</view></t-td>
  22. <t-td><view style="color:#333333;font-size:30upx;">{{item.event}}</view></t-td>
  23. <t-td>
  24. <view style="color:#333333;font-size:30upx;">
  25. <view>¥{{item.skPrice?parseFloat(item.skPrice):0}}</view>
  26. </view>
  27. </t-td>
  28. </t-tr>
  29. </t-table>
  30. </block>
  31. <block v-else>
  32. <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  33. </block>
  34. </view>
  35. </scroll-view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  41. import { getPriceChangeList } from "@/api/item";
  42. import { list } from "@/mixins";
  43. export default {
  44. components: { AppWrapperEmpty},
  45. mixins: [list],
  46. data() {
  47. return {
  48. };
  49. },
  50. onPullDownRefresh() {
  51. this.resetList();
  52. this.getChangeList(this.option.id).then(res => {
  53. uni.stopPullDownRefresh();
  54. });
  55. },
  56. onReachBottom() {
  57. if (!this.list.finished) {
  58. this.getChangeList(this.option.id).then((res) => {
  59. uni.stopPullDownRefresh();
  60. });
  61. } else {
  62. uni.stopPullDownRefresh();
  63. }
  64. },
  65. methods: {
  66. async init() {
  67. this.getChangeList(this.option.id);
  68. },
  69. getChangeList(id) {
  70. return getPriceChangeList({id:id,page: this.list.page}).then(res => {
  71. this.completes(res);
  72. });
  73. }
  74. }
  75. };
  76. </script>
  77. <style lang="scss" scoped>
  78. .ex-page {
  79. height: 100%;
  80. display: flex;
  81. flex-direction: column;
  82. .top-bar {
  83. position: absolute;
  84. left: 0;
  85. display: flex;
  86. width: 100%;
  87. // box-shadow: 0 5upx 5upx 5upx rgba($color: #000000, $alpha: 0.2);
  88. z-index: 20;
  89. .bar{
  90. width: 50%;
  91. height: 100%;
  92. text-align: center;
  93. &:nth-child(1){
  94. border-right: 1upx solid #eeeeec;
  95. }
  96. }
  97. }
  98. .main-view {
  99. /*margin-top: 80upx;*/
  100. flex: 1;
  101. background-color: #f9fbfc;
  102. .space-view {
  103. background-color: #fff;
  104. }
  105. .ex-info {
  106. padding: 30upx;
  107. .info-cell {
  108. display: flex;
  109. align-items: center;
  110. font-size: 28upx;
  111. &:not(:first-child) {
  112. margin-top: 20upx;
  113. }
  114. .cell-label {
  115. width: 110upx;
  116. color: #666666;
  117. }
  118. .cell-value {
  119. margin-left: 40upx;
  120. color: #333;
  121. &.warning {
  122. color: #ffaf1d;
  123. }
  124. &.success {
  125. color: #27c325;
  126. }
  127. }
  128. }
  129. }
  130. .ex-table {
  131. ::v-deep.icon-info {
  132. color: #333333;
  133. }
  134. }
  135. }
  136. .bar-view {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. padding: 0 30upx;
  141. width: 100%;
  142. height: 100upx;
  143. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  144. .info-view {
  145. font-size: 26upx;
  146. }
  147. .btn-view {
  148. display: flex;
  149. .admin-button-com {
  150. margin: 0 10upx;
  151. }
  152. }
  153. }
  154. }
  155. </style>