CLKCdetails_20230710144332.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <div class="JCDetails" style="padding: 50px;">
  3. <h1>车辆库存</h1>
  4. <el-tabs v-model="activeName" @tab-click="handleClick">
  5. <el-tab-pane label="进销存报表" name="first">
  6. <div class="topbox" style="display: flex;justify-content: space-between;">
  7. <div style="width: 60%;"></div>
  8. <div class="selec">
  9. <el-select v-model="value" filterable multiple collapse-tags clearable placeholder="请选择">
  10. <el-option v-for="item in options" :key="item.value" :label="item.text" :value="item.value">
  11. </el-option>
  12. </el-select>
  13. </div>
  14. <div class="timeselec">
  15. <el-date-picker v-model="value2" type="date" placeholder="选择日期">
  16. </el-date-picker>
  17. </div>
  18. <button style="width: 100px;height: 40px;background-color: aqua;" @click="chaxun2(value, value2)">查询</button>
  19. </div>
  20. <div> <el-table :header-cell-style="{
  21. background: 'rgba(30, 111, 200,0.8)',
  22. color: 'white',
  23. textAlign: 'center',
  24. border: '1px rgb(70, 91, 117) solid',
  25. }" :data="tableData" style="width: 100%">
  26. <el-table-column prop="company" label="店面" width="100">
  27. </el-table-column>
  28. <el-table-column prop="tqxl" label="同期销量">
  29. </el-table-column>
  30. <el-table-column prop="ymb" label="月目标">
  31. </el-table-column>
  32. <el-table-column prop="rzdj" label="日增定交">
  33. </el-table-column>
  34. <el-table-column prop="lcdd" label="留存订单">
  35. </el-table-column>
  36. <el-table-column prop="drjc" label="当日交车">
  37. </el-table-column>
  38. <el-table-column prop="yljc" label="月累交车">
  39. </el-table-column>
  40. <el-table-column prop="wcl" label="完成率">
  41. </el-table-column>
  42. <el-table-column prop="hb" label="环比">
  43. </el-table-column>
  44. <el-table-column prop="tqxl_jzdq" label="同期销量(截至当前)">
  45. </el-table-column>
  46. <el-table-column prop="tb" label="同比">
  47. </el-table-column>
  48. <el-table-column prop="kczl" label="库存总量">
  49. </el-table-column>
  50. <el-table-column prop="kcje" label="库存金额">
  51. </el-table-column>
  52. <el-table-column prop="kcsd" label="库存深度">
  53. </el-table-column>
  54. <el-table-column prop="yplqcltc" label="银票临期车辆台次">
  55. </el-table-column>
  56. <el-table-column prop="180zb" label="180天以上库存占比">
  57. </el-table-column>
  58. <el-table-column prop="180je" label="180以上车辆金额">
  59. </el-table-column>
  60. <el-table-column prop="xjczb" label="现金车占比">
  61. </el-table-column>
  62. <el-table-column prop="xjcje" label="现金车金额">
  63. </el-table-column>
  64. <el-table-column prop="ymygkcsd" label="月末预估库存深度">
  65. </el-table-column>
  66. </el-table></div>
  67. </el-tab-pane>
  68. <el-tab-pane label="分渠道销量统计分析" name="second">
  69. <div> <el-table :header-cell-style="{
  70. background: 'rgba(30, 111, 200,0.8)',
  71. color: 'white',
  72. textAlign: 'center',
  73. border: '1px rgb(70, 91, 117) solid',
  74. }" :data="tableData2" style="width: 100%">
  75. <el-table-column prop="date" label="店面" width="100">
  76. </el-table-column>
  77. </el-table></div>
  78. </el-tab-pane>
  79. </el-tabs>
  80. </div>
  81. </template>
  82. <script>
  83. import { column } from "./tuozhuai";
  84. import { jxctabledataInfo, fqdxltabledataInfo } from "../../../servuces/prove";
  85. export default {
  86. data () {
  87. return {
  88. //进销存
  89. tableData: [],
  90. tableData2: [],
  91. options: [],
  92. value: '',
  93. value2: '',
  94. activeName: 'first'
  95. }
  96. },
  97. created () {
  98. const data = sessionStorage.getItem('data')
  99. console.log(data);
  100. if (data) {
  101. this.options = JSON.parse(data)
  102. }
  103. },
  104. mounted () {
  105. column(this.tableData)
  106. this.jxctabledataapi()
  107. this.fqdxltabledataapi()
  108. },
  109. methods: {
  110. chaxun2 (value, value2) {
  111. const strvalue = value.join(',')
  112. const date = new Date(value2)
  113. // 获取年份和月份
  114. const year = date.getFullYear();
  115. const month = date.getMonth() + 1; // 月份从0开始,需要加1
  116. const day = date.getDate()
  117. // 将年份和月份拼接成所需形式的字符串
  118. const strvalue1 = `${year}-${month}-${day}`;
  119. jxctabledataInfo({ "company_ids": strvalue, "search_date": strvalue1 }).then(res => {
  120. // console.log('查询分期业务', res);
  121. this.tableData = res.data
  122. // this.tableDatahj = res.footer
  123. }
  124. )
  125. console.log(strvalue, strvalue1);
  126. },
  127. handleClick (tab, event) {
  128. console.log(tab, event);
  129. },
  130. //进销存接口数据
  131. jxctabledataapi () {
  132. jxctabledataInfo().then(res => {
  133. // console.log(res);
  134. this.tableData = res.data
  135. })
  136. },
  137. //分渠道销量统计
  138. fqdxltabledataapi () {
  139. fqdxltabledataInfo().then(res => {
  140. console.log('分销渠道', res.data);
  141. this.tableData2 = res
  142. })
  143. }
  144. }
  145. }
  146. </script>
  147. <style>
  148. /* .el-table tr {
  149. background-color: none;
  150. color: white;
  151. } */
  152. .el-table .warning-row {
  153. background-color: rgba(15, 78, 146, 0.827);
  154. }
  155. .el-table .success-row {
  156. background-color: rgb(15, 78, 146, 0.5);
  157. }
  158. .has-gutter tr th:last-child {
  159. background-color: rgba(30, 111, 200, 0.8);
  160. }
  161. .el-table tr {
  162. background-color: rgb(15, 78, 146, 0.5);
  163. }
  164. </style>
  165. <style scoped lang="scss">
  166. .JCDetails {
  167. .selec {
  168. margin: 0 0 20px 0;
  169. }
  170. }
  171. ::v-deep .el-table {
  172. background-color: transparent;
  173. border-color: rgb(70, 91, 117);
  174. }
  175. ::v-deep .el-table td,
  176. .building-top .el-table th.is-leaf {
  177. border-color: rgb(70, 91, 117);
  178. color: white;
  179. }
  180. ::v-deep .el-table td:hover {
  181. color: rgb(5, 51, 159);
  182. }
  183. ::v-deep .has-gutter th {
  184. border-color: rgb(70, 91, 117);
  185. }
  186. ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
  187. background-color: rgb(58, 147, 189);
  188. }
  189. ::v-deep #tab-first,
  190. ::v-deep #tab-second,
  191. ::v-deep #tab-third,
  192. ::v-deep #tab-fourth {
  193. color: #fff; //设置修改默认蚊子颜色,背景颜色,等
  194. }
  195. ::v-deep .el-tabs__item.is-active {
  196. color: rgb(37, 99, 214) !important;
  197. }
  198. </style>