123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <template>
- <div class="JCDetails" style="padding: 50px;">
- <h1>售后进厂台次</h1>
- <!-- <div class="topbox">
- <div class="selec">
- <el-select v-model="value" clearable placeholder="请选择">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="timeselec">
- </div>
- </div> -->
- <div class="topbox" style="display: flex;justify-content: space-between;">
- <div style="width: 60%;"></div>
- <div class="selec">
- <el-select v-model="value" filterable multiple collapse-tags clearable placeholder="请选择">
- <el-option v-for="item in options" :key="item.value" :label="item.text" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="timeselec">
- <el-date-picker v-model="value1" type="month" placeholder="选择日期">
- </el-date-picker>
- </div>
- <button style="width: 100px;height: 40px;background-color: aqua;" @click="chaxun(value, value1)">查询</button>
- </div>
- <div> <el-table show-summary :summary-method="getSummaries" :header-cell-style="{
- background: 'rgba(30, 111, 200,0.8)',
- color: 'white',
- textAlign: 'center',
- border: '1px rgb(70, 91, 117) solid',
- }" :data="tableData" style="width: 100%">
- <el-table-column prop="company" label="店面" width="100">
- </el-table-column>
- <el-table-column label="总进厂台次">
- <el-table-column prop="shmb" label="目标">
- </el-table-column>
- <el-table-column prop="shsj" label="实际">
- </el-table-column>
- <el-table-column prop="shwcl" label="完成率">
- </el-table-column>
- <el-table-column prop="shtby" label="同比月">
- </el-table-column>
- <el-table-column prop="shhby" label="环比月">
- </el-table-column>
- </el-table-column>
- <el-table-column label="进厂明细分类">
- <el-table-column prop="bptc" label="其中事故车辆台次">
- </el-table-column>
- <el-table-column prop="sbtc" label="首次进厂台次">
- </el-table-column>
- <el-table-column prop="sptc" label="索赔进厂台词">
- </el-table-column>
- <el-table-column prop="dbtc" label="定保进厂台次">
- </el-table-column>
- <el-table-column prop="pditc" label="PDI检测">
- </el-table-column>
- </el-table-column>
- </el-table></div>
- </div>
- </template>
- <script>
- import { column } from "./tuozhuai";
- import { rctctabledataInfo } from "../../../servuces/prove";
- export default {
- data() {
- return {
- tableData: [],
- tableDatahj: [],
- options: [{
- value: '选项1',
- label: '黄金糕'
- }, {
- value: '选项2',
- label: '双皮奶'
- }, {
- value: '选项3',
- label: '蚵仔煎'
- }, {
- value: '选项4',
- label: '龙须面'
- }, {
- value: '选项5',
- label: '北京烤鸭'
- }],
- value: '',
- value1: '',
- activeName: 'second'
- }
- },
- created() {
- const data = sessionStorage.getItem('data')
- console.log(data);
- if (data) {
- this.options = JSON.parse(data)
- }
- },
- mounted() {
- column(this.tableData)
- this.rctctabledataapi()
- },
- methods: {
- chaxun(value, value1) {
- const strvalue = value.join(',')
- const date = new Date(value1)
- // 获取年份和月份
- const year = date.getFullYear();
- const month = date.getMonth() + 1; // 月份从0开始,需要加1
- // 将年份和月份拼接成所需形式的字符串
- const strvalue1 = `${year}-${month}`;
- rctctabledataInfo({ "company_ids": strvalue, "search_month": strvalue1 }).then(res => {
- console.log('查询分期业务', res);
- this.tableData = res.data
- this.tableDatahj = res.footer
- }
- )
- // console.log(strvalue, strvalue1);
- },
- getSummaries() {
- const keyindex = {
- 'company': 0,
- 'shmb': 1,
- 'shsj': 2,
- 'shwcl': 3,
- 'shtby': 4,
- 'shhby': 5,
- 'bptc': 6,
- 'sbtc': 7,
- 'sptc': 8,
- 'dbtc': 9,
- 'pditc': 10,
- }
- const item_value = []
- for (let key in this.tableDatahj) {
- let index = keyindex[key]
- item_value[index] = this.tableDatahj[key] + ''
- }
- // console.log(item_value);
- item_value[0] = '合计'
- return item_value
- },
- rctctabledataapi() {
- rctctabledataInfo().then(res => {
- this.tableData = res.data
- this.tableDatahj = res.footer
- console.log('入场台次', res);
- })
- }
- }
- }
- </script>
- <style>
- /* .el-table tr {
- background-color: none;
- color: white;
- } */
- .el-table .warning-row {
- background-color: rgba(15, 78, 146, 0.827);
- }
- .el-table .success-row {
- background-color: rgb(15, 78, 146, 0.5);
- }
- .has-gutter tr th:last-child {
- background-color: rgba(30, 111, 200, 0.8);
- }
- .el-table tr {
- background-color: rgb(15, 78, 146, 0.5);
- }
- </style>
- <style scoped lang="scss">
- .JCDetails {
- .selec {
- margin: 0 0 20px 0;
- }
- }
- ::v-deep .el-table__footer {
- border: none;
- tr {
- border: none;
- td {
- color: white;
- background-color: rgba(30, 111, 200, 0.8);
- }
- td:hover {
- color: white;
- }
- }
- }
- ::v-deep .el-table {
- background-color: transparent;
- border-color: rgb(70, 91, 117);
- }
- ::v-deep .el-table td,
- .building-top .el-table th.is-leaf {
- border-color: rgb(70, 91, 117);
- color: white;
- }
- ::v-deep .el-table td:hover {
- color: rgb(5, 51, 159);
- }
- ::v-deep .has-gutter th {
- border-color: rgb(70, 91, 117);
- }
- ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td {
- background-color: rgb(58, 147, 189);
- }
- ::v-deep #tab-first,
- ::v-deep #tab-second,
- ::v-deep #tab-third,
- ::v-deep #tab-fourth {
- color: #fff; //设置修改默认蚊子颜色,背景颜色,等
- }
- ::v-deep .el-tabs__item.is-active {
- color: rgb(37, 99, 214) !important;
- }
- </style>
|