RCTCdetails_20230710085553.vue 6.0 KB

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