|
@@ -261,20 +261,29 @@
|
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
|
:data="tableData">
|
|
:data="tableData">
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('orderNo')"
|
|
|
|
|
width="300"
|
|
width="300"
|
|
|
prop="orderNo"
|
|
prop="orderNo"
|
|
|
label="订单"
|
|
label="订单"
|
|
|
fixed="left"
|
|
fixed="left"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div class="order-info-item">
|
|
|
|
|
- <div class="label">订单号:</div>
|
|
|
|
|
- <div class="value">{{ scope.row.orderNo }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="order-info-item">
|
|
|
|
|
+ <div class="label">
|
|
|
|
|
+ 订单号:
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="value">
|
|
|
|
|
+ {{ scope.row.orderNo }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="order-info-item">
|
|
|
|
|
- <div class="label">合作方订单号:</div>
|
|
|
|
|
- <div class="value">{{ scope.row.partnerOrderNo }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="order-info-item">
|
|
|
|
|
+ <div class="label">
|
|
|
|
|
+ 合作方订单号:
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="value">
|
|
|
|
|
+ {{ scope.row.partnerOrderNo }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- <el-tag
|
|
<!-- <el-tag
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -286,7 +295,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('firstTicketTypeName')"
|
|
|
|
|
width="160"
|
|
width="160"
|
|
|
prop="firstTicketTypeName"
|
|
prop="firstTicketTypeName"
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
@@ -303,25 +311,31 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('isOnlineOrder')"
|
|
|
|
|
width="150"
|
|
width="150"
|
|
|
prop="isOnlineOrder"
|
|
prop="isOnlineOrder"
|
|
|
label="渠道"
|
|
label="渠道"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<div class="order-info-item">
|
|
<div class="order-info-item">
|
|
|
- <div class="label">销售来源:{{ scope.row.isOnlineOrder === 1 ? '线上' : '线下' }}</div>
|
|
|
|
|
|
|
+ <div class="label">
|
|
|
|
|
+ 销售来源:{{ scope.row.isOnlineOrder === 1 ? '线上' : '线下' }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="order-info-item">
|
|
|
|
|
- <div class="label">销售渠道:{{ scope.row.otaSourceName }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="order-info-item">
|
|
|
|
|
+ <div class="label">
|
|
|
|
|
+ 销售渠道:{{ scope.row.otaSourceName }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="order-info-item">
|
|
|
|
|
- <div class="label">支付渠道:{{ scope.row.payChannel }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="order-info-item">
|
|
|
|
|
+ <div class="label">
|
|
|
|
|
+ 支付渠道:{{ scope.row.payChannel }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('payStatus')"
|
|
|
|
|
label="支付状态"
|
|
label="支付状态"
|
|
|
width="100"
|
|
width="100"
|
|
|
fixed="right"
|
|
fixed="right"
|
|
@@ -339,8 +353,8 @@
|
|
|
label="支付时间"
|
|
label="支付时间"
|
|
|
width="140"
|
|
width="140"
|
|
|
prop="payTime">
|
|
prop="payTime">
|
|
|
- </el-table-column> -->
|
|
|
|
|
- <!-- <el-table-column
|
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
label="票种"
|
|
label="票种"
|
|
|
min-width="120">
|
|
min-width="120">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -351,24 +365,32 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('saleInfo')"
|
|
|
|
|
width="140"
|
|
width="140"
|
|
|
label="售票"
|
|
label="售票"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div>{{ scope.row.saleAdminName }}</div>
|
|
|
|
|
- <div>{{ scope.row.createTime | formatTime }}</div>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.saleAdminName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.createTime | formatTime }}
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('buyerInfo')"
|
|
|
|
|
width="160"
|
|
width="160"
|
|
|
label="购买方"
|
|
label="购买方"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div>{{ scope.row.buyerName }}</div>
|
|
|
|
|
- <div>{{ scope.row.buyerPhone }}</div>
|
|
|
|
|
- <div>{{ scope.row.buyerIdentify }}</div>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.buyerName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.buyerPhone }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.buyerIdentify }}
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- <el-table-column
|
|
<!-- <el-table-column
|
|
@@ -387,7 +409,6 @@
|
|
|
label="购买方证件号">
|
|
label="购买方证件号">
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('ticketNum')"
|
|
|
|
|
width="80"
|
|
width="80"
|
|
|
prop="ticketNum"
|
|
prop="ticketNum"
|
|
|
label="所含票数"
|
|
label="所含票数"
|
|
@@ -400,19 +421,18 @@
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ reduceCheckNum(scope.row.ticketList) }}
|
|
{{ reduceCheckNum(scope.row.ticketList) }}
|
|
|
</template>
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
|
|
- <!-- <el-table-column
|
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
width="80"
|
|
width="80"
|
|
|
label="游客信息"
|
|
label="游客信息"
|
|
|
prop="guestName">
|
|
prop="guestName">
|
|
|
- </el-table-column> -->
|
|
|
|
|
- <!-- <el-table-column
|
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
width="80"
|
|
width="80"
|
|
|
label="使用状态"
|
|
label="使用状态"
|
|
|
prop="ticketStatus">
|
|
prop="ticketStatus">
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('price')"
|
|
|
|
|
width="80"
|
|
width="80"
|
|
|
label="总价(¥)"
|
|
label="总价(¥)"
|
|
|
>
|
|
>
|
|
@@ -421,7 +441,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('status')"
|
|
|
|
|
width="100"
|
|
width="100"
|
|
|
label="订单状态"
|
|
label="订单状态"
|
|
|
fixed="right"
|
|
fixed="right"
|
|
@@ -431,7 +450,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- v-if="isColumnVisible('createOrderRemark')"
|
|
|
|
|
label="下单备注"
|
|
label="下单备注"
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
prop="createOrderRemark">
|
|
prop="createOrderRemark">
|
|
@@ -517,15 +535,34 @@
|
|
|
<OrderDetail ref="orderDetail"></OrderDetail>
|
|
<OrderDetail ref="orderDetail"></OrderDetail>
|
|
|
|
|
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="选择显示列"
|
|
|
|
|
|
|
+ title="选择导出列"
|
|
|
:visible.sync="dialogVisible"
|
|
:visible.sync="dialogVisible"
|
|
|
append-to-body>
|
|
append-to-body>
|
|
|
- <el-checkbox-group v-model="tempSelectedColumns">
|
|
|
|
|
- <el-checkbox v-for="column in fixedColumns" :key="column.value" :label="column.value">{{ column.label }}</el-checkbox>
|
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="group in columnGroups"
|
|
|
|
|
+ :key="group.name"
|
|
|
|
|
+ style="margin-bottom: 12px;">
|
|
|
|
|
+ <div style="font-weight: 600; margin-bottom: 6px;">
|
|
|
|
|
+ {{ group.name }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-checkbox-group v-model="tempSelectedFields">
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ v-for="field in group.fields"
|
|
|
|
|
+ :key="field.key"
|
|
|
|
|
+ :label="field.key">
|
|
|
|
|
+ {{ field.label }}
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span
|
|
|
|
|
+ slot="footer"
|
|
|
|
|
+ class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="saveUserConfig">确 定</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="saveUserConfig">
|
|
|
|
|
+ 确 定
|
|
|
|
|
+ </el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
@@ -1508,19 +1545,69 @@ import { getSystemConfigList } from '@/api/systemConfig'
|
|
|
import { addUserConfig, getUserConfig } from '@/api/configSetting'
|
|
import { addUserConfig, getUserConfig } from '@/api/configSetting'
|
|
|
import { EventBus } from '@/utils/eventBus'
|
|
import { EventBus } from '@/utils/eventBus'
|
|
|
|
|
|
|
|
-const fixedColumns = [
|
|
|
|
|
- { value: 'orderNo', label: '订单' },
|
|
|
|
|
- { value: 'firstTicketTypeName', label: '票种' },
|
|
|
|
|
- { value: 'isOnlineOrder', label: '渠道' },
|
|
|
|
|
- { value: 'payStatus', label: '支付状态' },
|
|
|
|
|
- { value: 'saleInfo', label: '售票' },
|
|
|
|
|
- { value: 'buyerInfo', label: '购买方' },
|
|
|
|
|
- { value: 'ticketNum', label: '所含票数' },
|
|
|
|
|
- { value: 'price', label: '总价(¥)' },
|
|
|
|
|
- { value: 'status', label: '订单状态' },
|
|
|
|
|
- { value: 'createOrderRemark', label: '下单备注' }
|
|
|
|
|
|
|
+const COLUMN_SCHEMA = [
|
|
|
|
|
+ { key: 'orderCategory', label: '订单类型', group: '订单', column: 'extra', apiKey: 'orderCategory' },
|
|
|
|
|
+ { key: 'firstTicketTypeName', label: '票种名称', group: '票种', column: 'firstTicketTypeName', apiKey: 'ticketTypeName' },
|
|
|
|
|
+ { key: 'orderNo', label: '订单号', group: '订单', column: 'orderNo', apiKey: 'orderNo' },
|
|
|
|
|
+ { key: 'partnerOrderNo', label: '合作方订单号', group: '订单', column: 'orderNo', apiKey: 'partnerOrderNo' },
|
|
|
|
|
+ { key: 'ticketNo', label: '票号', group: '票务', column: 'extra', apiKey: 'ticketNo' },
|
|
|
|
|
+ { key: 'payChannel', label: '支付方式', group: '渠道', column: 'isOnlineOrder', apiKey: 'payChannel' },
|
|
|
|
|
+ { key: 'payTime', label: '支付时间', group: '支付', column: 'extra', apiKey: 'payTime' },
|
|
|
|
|
+ { key: 'teamName', label: '团体名称', group: '订单', column: 'extra', apiKey: 'teamName' },
|
|
|
|
|
+ { key: 'guideName', label: '导游名称', group: '订单', column: 'extra', apiKey: 'guideName' },
|
|
|
|
|
+ { key: 'otaSourceName', label: '订单来源渠道', group: '渠道', column: 'isOnlineOrder', apiKey: 'otaSourceName' },
|
|
|
|
|
+ { key: 'saleAdminName', label: '售卖人名称', group: '售票', column: 'saleInfo', apiKey: 'saleAdminName' },
|
|
|
|
|
+ { key: 'buyerName', label: '购买方名称', group: '购买方', column: 'buyerInfo', apiKey: 'buyerName' },
|
|
|
|
|
+ { key: 'buyerPhone', label: '购买方电话', group: '购买方', column: 'buyerInfo', apiKey: 'buyerPhone' },
|
|
|
|
|
+ { key: 'buyerIdentify', label: '购买方证件号', group: '购买方', column: 'buyerInfo', apiKey: 'buyerIdentify' },
|
|
|
|
|
+ { key: 'price', label: '订单总额', group: '订单', column: 'price', apiKey: 'orderPrice' },
|
|
|
|
|
+ { key: 'ticketNum', label: '包含的票数量', group: '票务', column: 'ticketNum', apiKey: 'ticketNum' },
|
|
|
|
|
+ { key: 'status', label: '订单状态', group: '订单', column: 'status', apiKey: 'orderStatus' },
|
|
|
|
|
+ { key: 'isOnlineOrder', label: '是否是线上订单', group: '渠道', column: 'isOnlineOrder', apiKey: 'isOnlineOrder' },
|
|
|
|
|
+ { key: 'createOrderRemark', label: '下单备注', group: '订单', column: 'createOrderRemark', apiKey: 'createOrderRemark' },
|
|
|
|
|
+ { key: 'discountDescription', label: '优惠说明', group: '优惠', column: 'extra', apiKey: 'discountDescription' },
|
|
|
|
|
+ { key: 'adminRemark', label: '管理员备注', group: '订单', column: 'extra', apiKey: 'adminRemark' },
|
|
|
|
|
+ { key: 'checkNum', label: '售票人数', group: '票务', column: 'extra', apiKey: 'checkNum' },
|
|
|
|
|
+ { key: 'isPrint', label: '是否已取票', group: '取票', column: 'extra', apiKey: 'isPrint' },
|
|
|
|
|
+ { key: 'printAdminName', label: '取票操作人', group: '取票', column: 'extra', apiKey: 'printAdminName' },
|
|
|
|
|
+ { key: 'printTime', label: '取票时间', group: '取票', column: 'extra', apiKey: 'printTime' },
|
|
|
|
|
+ { key: 'printTermName', label: '取票自助机', group: '取票', column: 'extra', apiKey: 'printTermName' },
|
|
|
|
|
+ { key: 'ticketStatus', label: '门票状态', group: '票务', column: 'extra', apiKey: 'ticketStatus' },
|
|
|
|
|
+ { key: 'unitPrice', label: '门票单价', group: '票务', column: 'extra', apiKey: 'unitPrice' },
|
|
|
|
|
+ { key: 'ticketPrice', label: '门票价格', group: '票务', column: 'extra', apiKey: 'ticketPrice' },
|
|
|
|
|
+ { key: 'originalPrice', label: '门票原价', group: '票务', column: 'extra', apiKey: 'originalPrice' },
|
|
|
|
|
+ { key: 'discountPrice', label: '门票优免价格', group: '票务', column: 'extra', apiKey: 'discountPrice' },
|
|
|
|
|
+ { key: 'settlementPrice', label: '门票结算价格', group: '票务', column: 'extra', apiKey: 'settlementPrice' },
|
|
|
|
|
+ { key: 'guestName', label: '游客姓名', group: '游客', column: 'extra', apiKey: 'guestName' },
|
|
|
|
|
+ { key: 'guestPhone', label: '游客电话', group: '游客', column: 'extra', apiKey: 'guestPhone' },
|
|
|
|
|
+ { key: 'guestIdentify', label: '游客证件号', group: '游客', column: 'extra', apiKey: 'guestIdentify' },
|
|
|
|
|
+ { key: 'playDateBegin', label: '游玩时间', group: '游玩', column: 'extra', apiKey: 'playDateBegin' },
|
|
|
|
|
+ { key: 'playDateEnd', label: '游玩时间', group: '游玩', column: 'extra', apiKey: 'playDateEnd' },
|
|
|
|
|
+ { key: 'batchConfigName', label: '场次名称', group: '游玩', column: 'extra', apiKey: 'batchConfigName' },
|
|
|
|
|
+ { key: 'buyTime', label: '付款时间', group: '支付', column: 'extra', apiKey: 'buyTime' },
|
|
|
|
|
+ { key: 'firstCheckTime', label: '首次检票时间', group: '检票', column: 'extra', apiKey: 'firstCheckTime' },
|
|
|
|
|
+ { key: 'checkTime', label: '最后检票时间', group: '检票', column: 'extra', apiKey: 'checkTime' },
|
|
|
|
|
+ { key: 'checkerName', label: '最近一次检票设备', group: '检票', column: 'extra', apiKey: 'checkerName' },
|
|
|
|
|
+ { key: 'cancelSubmitTime', label: '申请退款时间', group: '退款', column: 'extra', apiKey: 'cancelSubmitTime' },
|
|
|
|
|
+ { key: 'cancelPrice', label: '退款金额', group: '退款', column: 'extra', apiKey: 'cancelPrice' },
|
|
|
|
|
+ { key: 'cancelAdminName', label: '退款操作人', group: '退款', column: 'extra', apiKey: 'cancelAdminName' },
|
|
|
|
|
+ { key: 'cancelCompleteTime', label: '退款完成时间', group: '退款', column: 'extra', apiKey: 'cancelCompleteTime' },
|
|
|
|
|
+ { key: 'isForceCancel', label: '是否强制取消', group: '退款', column: 'extra', apiKey: 'isForceCancel' }
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+const API_KEY_TO_FIELD = COLUMN_SCHEMA.reduce((acc, item) => {
|
|
|
|
|
+ acc[item.apiKey] = item.key
|
|
|
|
|
+ return acc
|
|
|
|
|
+}, {})
|
|
|
|
|
+
|
|
|
|
|
+const COLUMN_FIELD_MAP = COLUMN_SCHEMA.reduce((acc, item) => {
|
|
|
|
|
+ if (!acc[item.column]) acc[item.column] = []
|
|
|
|
|
+ acc[item.column].push(item.key)
|
|
|
|
|
+ return acc
|
|
|
|
|
+}, {})
|
|
|
|
|
+
|
|
|
|
|
+const DEFAULT_FIELD_KEYS = COLUMN_SCHEMA.map(item => item.key)
|
|
|
|
|
+
|
|
|
const STAT_KEY = 'orderDetail'
|
|
const STAT_KEY = 'orderDetail'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -1554,6 +1641,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
permissionList () {
|
|
permissionList () {
|
|
|
return this.$store.state.user.menuList || []
|
|
return this.$store.state.user.menuList || []
|
|
|
|
|
+ },
|
|
|
|
|
+ columnGroups () {
|
|
|
|
|
+ const groupList = []
|
|
|
|
|
+ const groupMap = {}
|
|
|
|
|
+ COLUMN_SCHEMA.forEach(item => {
|
|
|
|
|
+ if (!groupMap[item.group]) {
|
|
|
|
|
+ groupMap[item.group] = { name: item.group, fields: [] }
|
|
|
|
|
+ groupList.push(groupMap[item.group])
|
|
|
|
|
+ }
|
|
|
|
|
+ groupMap[item.group].fields.push({ key: item.key, label: item.label })
|
|
|
|
|
+ })
|
|
|
|
|
+ return groupList
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
@@ -1645,9 +1744,10 @@ export default {
|
|
|
{ value: 'updateScenicTimes', label: '检票次数' }
|
|
{ value: 'updateScenicTimes', label: '检票次数' }
|
|
|
],
|
|
],
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
- fixedColumns,
|
|
|
|
|
- selectedColumns: fixedColumns.map(i => i.value),
|
|
|
|
|
- tempSelectedColumns: fixedColumns.map(i => i.value),
|
|
|
|
|
|
|
+ columnSchema: COLUMN_SCHEMA,
|
|
|
|
|
+ columnFieldMap: COLUMN_FIELD_MAP,
|
|
|
|
|
+ selectedFields: [...DEFAULT_FIELD_KEYS],
|
|
|
|
|
+ tempSelectedFields: [...DEFAULT_FIELD_KEYS],
|
|
|
editOrderDialogVisible: false,
|
|
editOrderDialogVisible: false,
|
|
|
editOrderInfo: {
|
|
editOrderInfo: {
|
|
|
orderId: '',
|
|
orderId: '',
|
|
@@ -1710,36 +1810,36 @@ export default {
|
|
|
if (Array.isArray(fields) && fields.length) {
|
|
if (Array.isArray(fields) && fields.length) {
|
|
|
nextSelected = fields
|
|
nextSelected = fields
|
|
|
.filter(i => Number(i.isShow) === 1)
|
|
.filter(i => Number(i.isShow) === 1)
|
|
|
- .map(i => i.fieldKey)
|
|
|
|
|
|
|
+ .map(i => API_KEY_TO_FIELD[i.fieldKey] || i.fieldKey)
|
|
|
|
|
+ .filter(key => DEFAULT_FIELD_KEYS.includes(key))
|
|
|
} else {
|
|
} else {
|
|
|
- nextSelected = fixedColumns.map(i => i.value)
|
|
|
|
|
|
|
+ nextSelected = [...DEFAULT_FIELD_KEYS]
|
|
|
}
|
|
}
|
|
|
if (applyToTable) {
|
|
if (applyToTable) {
|
|
|
- this.selectedColumns = nextSelected
|
|
|
|
|
|
|
+ this.selectedFields = nextSelected
|
|
|
}
|
|
}
|
|
|
- this.tempSelectedColumns = [...nextSelected]
|
|
|
|
|
|
|
+ this.tempSelectedFields = [...nextSelected]
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
- const nextSelected = fixedColumns.map(i => i.value)
|
|
|
|
|
|
|
+ const nextSelected = [...DEFAULT_FIELD_KEYS]
|
|
|
if (applyToTable) {
|
|
if (applyToTable) {
|
|
|
- this.selectedColumns = nextSelected
|
|
|
|
|
|
|
+ this.selectedFields = nextSelected
|
|
|
}
|
|
}
|
|
|
- this.tempSelectedColumns = [...nextSelected]
|
|
|
|
|
|
|
+ this.tempSelectedFields = [...nextSelected]
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
saveUserConfig () {
|
|
saveUserConfig () {
|
|
|
- const fields = this.fixedColumns.map(item => ({
|
|
|
|
|
- fieldKey: item.value,
|
|
|
|
|
- fieldName: item.label,
|
|
|
|
|
- isShow: this.tempSelectedColumns.includes(item.value) ? 1 : 0
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ const fields = this.columnSchema
|
|
|
|
|
+ .filter(item => item.apiKey)
|
|
|
|
|
+ .map(item => ({
|
|
|
|
|
+ fieldKey: item.apiKey,
|
|
|
|
|
+ fieldName: item.label,
|
|
|
|
|
+ isShow: this.tempSelectedFields.includes(item.key) ? 1 : 0
|
|
|
|
|
+ }))
|
|
|
addUserConfig({ statKey: STAT_KEY, fields }).then(() => {
|
|
addUserConfig({ statKey: STAT_KEY, fields }).then(() => {
|
|
|
- this.selectedColumns = [...this.tempSelectedColumns]
|
|
|
|
|
|
|
+ this.selectedFields = [...this.tempSelectedFields]
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- isColumnVisible (columnKey) {
|
|
|
|
|
- return this.selectedColumns.includes(columnKey)
|
|
|
|
|
- },
|
|
|
|
|
hasPermission (key) {
|
|
hasPermission (key) {
|
|
|
return !!this.permissionList.some(item => item.code === key)
|
|
return !!this.permissionList.some(item => item.code === key)
|
|
|
},
|
|
},
|