cgFreight.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="app-content">
  3. <view class="ex-page">
  4. <view class="top-bar">
  5. <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
  6. </view>
  7. <view class="main-view">
  8. <view class="space-view ex-table">
  9. <block>
  10. <t-table :headerBackgroundColor="'#F0F2F6'">
  11. <t-tr header><t-th>时间</t-th><t-th>打包</t-th><t-th>短途</t-th><t-th>长途</t-th><t-th>提货</t-th><t-th>本地</t-th></t-tr>
  12. <block v-if=" profile.list && !$util.isEmpty(profile.list)">
  13. <view v-for="(item, index) in profile.list" :key="index">
  14. <t-tr>
  15. <t-td><view style="color:#333333;">{{item.entryTime.substr(5,5)}}</view></t-td>
  16. <t-td><view style="color:#333333;">{{item.packingCharge?parseFloat(item.packingCharge):0}}</view></t-td>
  17. <t-td><view style="color:#333333;">{{item.shortCharge?parseFloat(item.shortCharge):0}}</view></t-td>
  18. <t-td><view style="color:#333333;">{{item.longCharge?parseFloat(item.longCharge):0}}</view></t-td>
  19. <t-td><view style="color:#333333;">{{item.pickCharge?parseFloat(item.pickCharge):0}}</view></t-td>
  20. <t-td><view style="color:#333333;">{{item.localCharge?parseFloat(item.localCharge):0}}</view></t-td>
  21. </t-tr>
  22. </view>
  23. </block>
  24. <t-tr>
  25. <t-td><view style="color:black;font-weight:bold;">合计</view></t-td>
  26. <t-td><view style="color:black;font-weight:bold;">{{profile.total.packingCharge?parseFloat(profile.total.packingCharge):0}}</view></t-td>
  27. <t-td><view style="color:black;font-weight:bold;">{{profile.total.shortCharge?parseFloat(profile.total.shortCharge):0}}</view></t-td>
  28. <t-td><view style="color:black;font-weight:bold;">{{profile.total.longCharge?parseFloat(profile.total.longCharge):0}}</view></t-td>
  29. <t-td><view style="color:black;font-weight:bold;">{{profile.total.pickCharge?parseFloat(profile.total.pickCharge):0}}</view></t-td>
  30. <t-td><view style="color:black;font-weight:bold;">{{profile.total.localCharge?parseFloat(profile.total.localCharge):0}}</view></t-td>
  31. </t-tr>
  32. <t-tr>
  33. <t-td><view style="color:black;font-weight:bold;">总共{{profile.total.num}}笔</view></t-td>
  34. </t-tr>
  35. <block v-if="Number(profile.total.num)>16">
  36. <t-tr header><t-th>时间</t-th><t-th>打包</t-th><t-th>短途</t-th><t-th>长途</t-th><t-th>提货</t-th><t-th>本地</t-th></t-tr>
  37. </block>
  38. </t-table>
  39. </block>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import AppWrapperEmpty from "@/components/app-wrapper-empty";
  47. import SelectList from "@/components/plugin/selectList";
  48. import { getCgFreight } from "@/api/stat";
  49. import { list } from "@/mixins";
  50. import ShopSelect from "@/components/module/shopSelect";
  51. import DateSelect from "@/components/module/dateSelect";
  52. import AppSearchModule from "@/components/module/app-search";
  53. import {mapActions, mapGetters} from "vuex";
  54. export default {
  55. components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
  56. mixins: [list],
  57. computed: {
  58. ...mapGetters(["getDictionariesInfo","getLoginInfo"])
  59. },
  60. data() {
  61. return {
  62. isShow:false,
  63. customizationTime:[],
  64. shopId:'',
  65. itemId:'',
  66. nowTime: "",
  67. showTimeDropdown: false,
  68. nowShop: "",
  69. showShopDropdown: false,
  70. dataList: [],
  71. params:{ itemId: '', searchTime:'', startTime: "", endTime: "", shopId: "", },
  72. profile:{total:{packingCharge:0,shortCharge:0,longCharge:0,pickCharge:0,localCharge:0},list:[]},
  73. storageData:[],
  74. searchContent:'',
  75. };
  76. },
  77. methods: {
  78. ...mapActions(['setUserShopAll']),
  79. selectDateFn(val) {
  80. this.params = {...this.params,...val}
  81. this.init();
  82. },
  83. init() {
  84. this.getList();
  85. },
  86. getList() {
  87. let that = this
  88. uni.showLoading()
  89. getCgFreight(this.params).then(res => {
  90. uni.hideLoading()
  91. if(res.code == 1){
  92. that.profile = res.data
  93. }
  94. })
  95. }
  96. }
  97. };
  98. </script>
  99. <style lang="scss" scoped>
  100. .ex-page {
  101. background: white;
  102. padding-top:20upx;
  103. height: 100%;
  104. display: flex;
  105. flex-direction: column;
  106. .top-bar {
  107. position: absolute;
  108. left: 0;
  109. top:30upx;
  110. display: flex;
  111. width: 100%;
  112. z-index: 20;
  113. .bar{
  114. width: 50%;
  115. height: 100%;
  116. text-align: center;
  117. &:nth-child(1){
  118. border-right: 1upx solid #eeeeec;
  119. }
  120. }
  121. }
  122. .main-view {
  123. margin-top:80upx;
  124. flex: 1;
  125. background-color: #f9fbfc;
  126. .space-view {
  127. background-color: #fff;
  128. .change-level{
  129. font-size:22upx;
  130. padding:10upx 15upx;
  131. }
  132. }
  133. .ex-info {
  134. padding: 30upx;
  135. .info-cell {
  136. display: flex;
  137. align-items: center;
  138. font-size: 28upx;
  139. &:not(:first-child) {
  140. margin-top: 20upx;
  141. }
  142. .cell-label {
  143. width: 110upx;
  144. color: #666666;
  145. }
  146. .cell-value {
  147. margin-left: 40upx;
  148. color: #333;
  149. &.warning {
  150. color: #ffaf1d;
  151. }
  152. &.success {
  153. color: #27c325;
  154. }
  155. }
  156. }
  157. }
  158. .ex-table {
  159. ::v-deep.icon-info {
  160. color: #333333;
  161. }
  162. }
  163. }
  164. .bar-view {
  165. display: flex;
  166. justify-content: space-between;
  167. align-items: center;
  168. padding: 0 30upx;
  169. width: 100%;
  170. height: 100upx;
  171. box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
  172. .info-view {
  173. font-size: 26upx;
  174. }
  175. .btn-view {
  176. display: flex;
  177. .admin-button-com {
  178. margin: 0 10upx;
  179. }
  180. }
  181. }
  182. }
  183. </style>