|
@@ -1,120 +1,56 @@
|
|
|
<template>
|
|
|
- <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
|
|
|
- :options-evens-group="optionsEvensGroup" :more-parameters="moreParameters" :column-parsing="columnParsing"
|
|
|
- :operation="operation()" :exportList="exportList">
|
|
|
- <div class="cartographer">
|
|
|
- <el-dialog title="明细" width="100%" :modal="false" :visible.sync="formDialog"
|
|
|
- :before-close="() => { formDialog = false }">
|
|
|
- <template-page v-if="formDialog" :get-list="getList2" :columnParsing="columnParsing2" />
|
|
|
- </el-dialog>
|
|
|
+ <zj-page-container>
|
|
|
+ <div class="tab">
|
|
|
+ <el-radio-group v-model="tabType" size="small" @change="tabTypeChange">
|
|
|
+ <el-radio-button label="collect">汇总</el-radio-button>
|
|
|
+ <el-radio-button label="offline">明细</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
</div>
|
|
|
- </template-page>
|
|
|
+ <zj-page-fill>
|
|
|
+ <collect v-if="tabTypeCk == 'collect'" key="collect" />
|
|
|
+ <offline v-if="tabTypeCk == 'offline'" key="offline" :websitId="websitId" :detailParams="detailParams" />
|
|
|
+ </zj-page-fill>
|
|
|
+ </zj-page-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
-import import_mixin from '@/components/template/import_mixin.js'
|
|
|
-import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
-import {
|
|
|
- increOrderSettleCountList,
|
|
|
- increOrderSettleCountListExport
|
|
|
-} from '@/api/orderBranchAccount'
|
|
|
-import { increOrderSettleList } from "@/api/orderSettleManag.js"
|
|
|
+import { EventBus } from '@/utils/eventBus'
|
|
|
+import collect from './pages/collect.vue'
|
|
|
+import offline from './pages/offline.vue'
|
|
|
export default {
|
|
|
- components: { TemplatePage },
|
|
|
- mixins: [import_mixin,operation_mixin],
|
|
|
+ components: { collect, offline },
|
|
|
data() {
|
|
|
return {
|
|
|
- // 事件组合
|
|
|
- optionsEvensGroup: [],
|
|
|
- // 表格属性
|
|
|
- tableAttributes: {
|
|
|
- // 启用勾选列
|
|
|
- selectColumn: false
|
|
|
- },
|
|
|
- // 表格事件
|
|
|
- tableEvents: {
|
|
|
- 'selection-change': this.selectionChange
|
|
|
- },
|
|
|
- // 勾选选中数据
|
|
|
- recordSelected: [],
|
|
|
- formDialog: false,
|
|
|
- detailParams: []
|
|
|
+ tabType: 'collect',
|
|
|
+ tabTypeCk: 'collect',
|
|
|
+ websitId: "",
|
|
|
+ detailParams: [],
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- // 更多参数
|
|
|
- moreParameters() {
|
|
|
- return []
|
|
|
- },
|
|
|
+ created() {
|
|
|
+ EventBus.$on("orderBranchAccount", ({ websitId, detailParams, tabTypeCk }) => {
|
|
|
+ this.websitId = websitId
|
|
|
+ this.detailParams = detailParams
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tabTypeCk = tabTypeCk
|
|
|
+ this.tabType = tabTypeCk
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
- // 列表请求函数
|
|
|
- getList(p) {
|
|
|
- this.detailParams = p.params.filter(item => item.param === "a.pay_time")
|
|
|
- return increOrderSettleCountList(p)
|
|
|
- },
|
|
|
- // 列表导出函数
|
|
|
- exportList: increOrderSettleCountListExport,
|
|
|
- // 表格列解析渲染数据更改
|
|
|
- columnParsing(item, defaultData) {
|
|
|
- return defaultData
|
|
|
- },
|
|
|
- // 监听勾选变化
|
|
|
- selectionChange(data) {
|
|
|
- this.recordSelected = data
|
|
|
- },
|
|
|
- // 表格操作列
|
|
|
- operation() {
|
|
|
- return this.operationBtn({
|
|
|
- detail: {
|
|
|
- btnType: 'text',
|
|
|
- click: ({ row, index, column }) => {
|
|
|
- this.detailParams = [...this.detailParams.filter(item => item.param === "a.pay_time"), {
|
|
|
- param: "a.websit_id",
|
|
|
- compare: "=",
|
|
|
- value: row.websitId
|
|
|
- }];
|
|
|
- this.$nextTick(() => {
|
|
|
- this.formDialog = true
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 明细列表
|
|
|
- getList2(p) {
|
|
|
- var pam = JSON.parse(JSON.stringify(p))
|
|
|
- pam.params = [...pam.params, ...this.detailParams,]
|
|
|
- try {
|
|
|
- return increOrderSettleList(pam)
|
|
|
- } catch (err) {
|
|
|
- }
|
|
|
- },
|
|
|
- // 表格列解析渲染数据更改
|
|
|
- columnParsing2(item, defaultData) {
|
|
|
- if (item.jname === 'residuNum') {
|
|
|
- defaultData.render = (h, { row, index, column }) => {
|
|
|
- return (
|
|
|
- <div style="padding:0 6px;cursor: pointer;">
|
|
|
- {row["increType"] != 1 ? row["residuNum"] : ""}
|
|
|
- </div>
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
- if (item.jname === 'serviceEndTime') {
|
|
|
- defaultData.render = (h, { row, index, column }) => {
|
|
|
- return (
|
|
|
- <div style="padding:0 6px;cursor: pointer;">
|
|
|
- {row[column.columnAttributes.prop] ? row[column.columnAttributes.prop].split(" ")[0] : ""}
|
|
|
- </div>
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
- return defaultData
|
|
|
- },
|
|
|
- }
|
|
|
+ tabTypeChange() {
|
|
|
+ this.websitId = ""
|
|
|
+ this.detailParams = []
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tabTypeCk = this.tabType
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tab {
|
|
|
+ padding: 20px 20px 0 20px;
|
|
|
+}
|
|
|
+</style>
|