RCTCdetails.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <div class="JCDetails" style="padding:0 50px;">
  3. <h1>售后进厂台次</h1>
  4. <!-- <div class="topbox">
  5. <div class="selec">
  6. <el-select v-model="value" clearable placeholder="请选择">
  7. <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
  8. </el-option>
  9. </el-select>
  10. </div>
  11. <div class="timeselec">
  12. </div>
  13. </div> -->
  14. <div class="topbox" style="display: flex;justify-content: space-between;">
  15. <div style="flex: 1;"></div>
  16. <div class="selec ershi">
  17. <el-select v-model="value" filterable multiple collapse-tags clearable placeholder="请选择">
  18. <el-option v-for="item in options" :key="item.value" :label="item.text" :value="item.value">
  19. </el-option>
  20. </el-select>
  21. </div>
  22. <div class="timeselec ershi">
  23. <el-date-picker v-model="value1" type="month" placeholder="选择日期">
  24. </el-date-picker>
  25. </div>
  26. <button class="ershi" style="width: 100px;height: 40px;background-color: aqua;"
  27. @click="chaxun(value, value1)">查询</button>
  28. </div>
  29. <div> <el-table ref="table" show-summary :height="taheight" :summary-method="getSummaries" :header-cell-style="{
  30. background: 'rgba(30, 111, 200,0.8)',
  31. color: 'white',
  32. textAlign: 'center',
  33. border: '1px rgb(70, 91, 117) solid',
  34. }" :data="tableData" style="width: 100%">
  35. <el-table-column prop="company" fixed label="店面" width="100">
  36. </el-table-column>
  37. <el-table-column label="总进厂台次">
  38. <el-table-column prop="shmb" sortable label="目标">
  39. </el-table-column>
  40. <el-table-column prop="shsj" sortable label="实际">
  41. </el-table-column>
  42. <el-table-column prop="shwcl" sortable label="完成率">
  43. </el-table-column>
  44. <el-table-column prop="shtby" sortable label="同比月">
  45. </el-table-column>
  46. <el-table-column prop="shhby" sortable label="环比月">
  47. </el-table-column>
  48. </el-table-column>
  49. <el-table-column label="进厂明细分类">
  50. <el-table-column prop="bptc" sortable label="其中事故车辆台次">
  51. </el-table-column>
  52. <el-table-column prop="sbtc" sortable label="首次进厂台次">
  53. </el-table-column>
  54. <el-table-column prop="sptc" sortable label="索赔进厂台词">
  55. </el-table-column>
  56. <el-table-column prop="dbtc" sortable label="定保进厂台次">
  57. </el-table-column>
  58. <el-table-column prop="pditc" sortable label="PDI检测">
  59. </el-table-column>
  60. </el-table-column>
  61. </el-table></div>
  62. </div>
  63. </template>
  64. <script>
  65. import { column } from "./tuozhuai";
  66. import { rctctabledataInfo } from "../../../servuces/prove";
  67. import { nowmonthy } from "../../../servuces/getnowtime";
  68. export default {
  69. data () {
  70. return {
  71. tableData: [],
  72. taheight: window.innerHeight - (window.innerHeight * 0.15),
  73. tableDatahj: [],
  74. options: [{
  75. value: '选项1',
  76. label: '黄金糕'
  77. }, {
  78. value: '选项2',
  79. label: '双皮奶'
  80. }, {
  81. value: '选项3',
  82. label: '蚵仔煎'
  83. }, {
  84. value: '选项4',
  85. label: '龙须面'
  86. }, {
  87. value: '选项5',
  88. label: '北京烤鸭'
  89. }],
  90. value: '',
  91. value1: '',
  92. }
  93. },
  94. created () {
  95. const data = sessionStorage.getItem('data')
  96. console.log(data);
  97. if (data) {
  98. this.options = JSON.parse(data)
  99. }
  100. },
  101. mounted () {
  102. column(this)
  103. this.rctctabledataapi()
  104. },
  105. updated () {
  106. this.$nextTick(() => {
  107. this.$refs.table.doLayout()
  108. })
  109. },
  110. methods: {
  111. chaxun (value, value1) {
  112. const strvalue = value.join(',')
  113. const date = new Date(value1)
  114. // 获取年份和月份
  115. const year = date.getFullYear();
  116. const month = date.getMonth() + 1; // 月份从0开始,需要加1
  117. // 将年份和月份拼接成所需形式的字符串
  118. const strvalue1 = `${year}-${month}`;
  119. rctctabledataInfo({ "company_ids": strvalue, "search_month": 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. getSummaries () {
  128. const keyindex = {
  129. 'company': 0,
  130. 'shmb': 1,
  131. 'shsj': 2,
  132. 'shwcl': 3,
  133. 'shtby': 4,
  134. 'shhby': 5,
  135. 'bptc': 6,
  136. 'sbtc': 7,
  137. 'sptc': 8,
  138. 'dbtc': 9,
  139. 'pditc': 10,
  140. }
  141. const item_value = []
  142. for (let key in this.tableDatahj) {
  143. let index = keyindex[key]
  144. item_value[index] = this.tableDatahj[key] + ''
  145. }
  146. // console.log(item_value);
  147. item_value[0] = '合计'
  148. return item_value
  149. },
  150. rctctabledataapi () {
  151. this.value1 = nowmonthy
  152. rctctabledataInfo({ "company_ids": '', "search_month": nowmonthy }).then(res => {
  153. this.tableData = res.data
  154. this.tableDatahj = res.footer
  155. console.log('入场台次', res);
  156. })
  157. }
  158. }
  159. }
  160. </script>
  161. <style>
  162. /* .el-table tr {
  163. background-color: none;
  164. color: white;
  165. } */
  166. .el-table .warning-row {
  167. background-color: rgba(15, 78, 146, 0.827);
  168. }
  169. .el-table .success-row {
  170. background-color: rgb(15, 78, 146, 0.5);
  171. }
  172. .has-gutter tr th:last-child {
  173. background-color: rgba(30, 111, 200, 0.8);
  174. }
  175. .el-table tr {
  176. background-color: rgb(15, 78, 146, 0.5);
  177. }
  178. </style>
  179. <style scoped lang="scss">
  180. .JCDetails {
  181. .selec {
  182. margin: 0 0 20px 0;
  183. }
  184. }
  185. ::v-deep .el-table__footer {
  186. border: none;
  187. tr {
  188. border: none;
  189. td {
  190. color: white;
  191. background-color: rgba(30, 111, 200, 0.8);
  192. }
  193. td:hover {
  194. color: white;
  195. }
  196. }
  197. }
  198. ::v-deep .el-table {
  199. background-color: transparent;
  200. border-color: rgb(70, 91, 117);
  201. }
  202. ::v-deep .el-table td,
  203. .building-top .el-table th.is-leaf {
  204. border-color: rgb(70, 91, 117);
  205. color: white;
  206. }
  207. ::v-deep .el-table td:hover {
  208. color: rgb(5, 51, 159);
  209. }
  210. ::v-deep .gutter {
  211. background-color: rgba(30, 111, 200, 0.8) !important;
  212. border: 0 !important;
  213. }
  214. ::v-deep .has-gutter th {
  215. border-color: rgb(70, 91, 117);
  216. }
  217. ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
  218. background-color: rgb(58, 147, 189);
  219. }
  220. ::v-deep #tab-first,
  221. ::v-deep #tab-second,
  222. ::v-deep #tab-third,
  223. ::v-deep #tab-fourth {
  224. color: #fff; //设置修改默认蚊子颜色,背景颜色,等
  225. }
  226. ::v-deep .el-table__body tr.hover-row>td.el-table__cell {
  227. background-color: rgb(58, 147, 189) !important;
  228. }
  229. ::v-deep .el-tabs__item.is-active {
  230. color: rgb(37, 99, 214) !important;
  231. }
  232. </style>