index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view>
  3. <view class="charts-box">
  4. <view style="width: 100%;text-align: center;font-weight: bold;margin: 20rpx auto;">
  5. <u-divider>
  6. <text style="font-size: 28rpx;">最大库龄<text style="font-size: 46rpx;">{{data.stockDays}}</text>天</text>
  7. </u-divider>
  8. </view>
  9. <qiun-data-charts type="pie" :chartData="chartData" :inScrollView="true" :canvas2d="true"
  10. background="none" />
  11. <view class="ordertop" v-for="(item, index) in lisi" :key="index">
  12. <view>
  13. <view class="iconblue"></view>
  14. <text class="license">提单号:{{item.fMblno}}</text>
  15. <!-- <view class="various" @click="viewDetails(item)">{{item.fBilltype}}</view> -->
  16. </view>
  17. <view class="line">
  18. <u-line color="#ccc" border-style='dashed' />
  19. </view>
  20. <view class="basic">
  21. <view>客户名称</view>
  22. <view>{{item.customerName}}</view>
  23. </view>
  24. <view class="basic">
  25. <view>入库日期</view>
  26. <view>{{item.fBsdate}}</view>
  27. </view>
  28. <view class="basic">
  29. <view>毛重</view>
  30. <view>{{item.fGrossweight}}吨</view>
  31. </view>
  32. <view class="basic">
  33. <view>品名</view>
  34. <view>{{item.goodsName}}</view>
  35. </view>
  36. </view>
  37. <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. chartData: {
  46. series: [{
  47. data: []
  48. }]
  49. },
  50. nameList:[{
  51. name:'一周内',
  52. prop:'stockTotalA'
  53. },{
  54. name:'半月内',
  55. prop:'stockTotalB'
  56. },{
  57. name:'一个月内',
  58. prop:'stockTotalC'
  59. },{
  60. name:'两个月内',
  61. prop:'stockTotalD'
  62. },{
  63. name:'三个月内',
  64. prop:'stockTotalE'
  65. },{
  66. name:'六个月内',
  67. prop:'stockTotalF'
  68. },{
  69. name:'六个月以上',
  70. prop:'stockTotalG'
  71. }],
  72. status: 'loadmore',
  73. iconType: 'flower',
  74. loadText: {
  75. loadmore: '轻轻上拉',
  76. loading: '努力加载中',
  77. nomore: '实在没有了'
  78. },
  79. lisi: [],
  80. total:0,
  81. data:{},
  82. form: {
  83. pageNum: 1,
  84. pageSize: 10,
  85. },
  86. }
  87. },
  88. created() {
  89. this.$u.get('/warehouseBusiness/summary/cycleStockStatistics').then(res=>{
  90. this.data = res.data
  91. let data = []
  92. this.nameList.forEach((item,index) =>{
  93. data.push({
  94. name:item.name,
  95. value:Number(res.data[item.prop])
  96. })
  97. })
  98. this.chartAssignment(data)
  99. })
  100. this.lisi=[]
  101. this.form = {
  102. pageNum: 1,
  103. pageSize: 10,
  104. }
  105. this.query()
  106. },
  107. onReachBottom() {
  108. this.status = 'loading'
  109. if (this.lisi.length < this.total) {
  110. this.form.pageNum++
  111. this.query()
  112. } else {
  113. this.status = 'nomore'
  114. }
  115. },
  116. methods: {
  117. chartAssignment(data){
  118. this.chartData.series[0].data = data
  119. },
  120. query(){
  121. this.$u.get('/warehouseBusiness/summary/stockAfterMonthList',this.form).then(res=>{
  122. console.log(res)
  123. this.lisi = this.lisi.concat(res.rows)
  124. this.total = res.total
  125. })
  126. }
  127. }
  128. }
  129. </script>
  130. <style scoped lang="scss">
  131. .charts-box {
  132. width: 100%;
  133. height: 300px;
  134. }
  135. .basic {
  136. width: 94%;
  137. margin: 10rpx auto;
  138. display: flex;
  139. justify-content: space-between;
  140. }
  141. .basic>view {
  142. margin-bottom: 10rpx;
  143. }
  144. .basic>view:nth-child(1) {
  145. color: #797979;
  146. }
  147. .view {
  148. width: 96%;
  149. margin: 20rpx auto;
  150. display: flex;
  151. justify-content: space-between
  152. }
  153. .line {
  154. width: 92%;
  155. margin: 0 auto;
  156. }
  157. .oddnumber {
  158. width: 96%;
  159. margin: 20rpx auto;
  160. margin-bottom: 20rpx;
  161. }
  162. .ordertop {
  163. width: 96%;
  164. background-color: #fff;
  165. margin: 20rpx auto;
  166. border-radius: 20rpx;
  167. padding-top: 20rpx;
  168. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  169. padding-bottom: 10rpx;
  170. }
  171. .ordertop>view:nth-child(1) {
  172. width: 98%;
  173. margin-bottom: 60rpx;
  174. }
  175. .search {
  176. width: 96%;
  177. margin: 10rpx auto;
  178. }
  179. .iconblue {
  180. width: 10rpx;
  181. height: 45rpx;
  182. float: left;
  183. background-color: #3a63cf;
  184. margin-right: 10rpx;
  185. }
  186. .license {
  187. float: left;
  188. font-size: 32rpx;
  189. }
  190. .various {
  191. float: right;
  192. width: 150rpx;
  193. border: 2rpx solid #3a63cf;
  194. text-align: center;
  195. border-radius: 100rpx;
  196. color: #1669e6;
  197. }
  198. .condition {
  199. background-color: #1669e6;
  200. height: 60rpx;
  201. }
  202. .conditionone {
  203. width: 92%;
  204. height: 44rpx;
  205. margin: 0rpx auto;
  206. display: flex;
  207. justify-content: space-between;
  208. color: #fff;
  209. }
  210. .conditionone>view {
  211. color: #e6e8e8;
  212. }
  213. </style>