|
@@ -1,104 +1,59 @@
|
|
|
<template>
|
|
|
- <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
|
|
|
- :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
|
|
|
- :moreParameters="moreParameters">
|
|
|
- <div class="cartographer_big">
|
|
|
- <el-dialog title="创建工单" width="100%" :modal="false" :visible.sync="createFormBool" :before-close="handleClose">
|
|
|
- </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" :workerId="workerId" :status="status" />
|
|
|
+ </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 { enginMaterialList, enginMaterialListExport } from "@/api/applicationWithoutFee.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 {
|
|
|
- // 创建表单
|
|
|
- createFormBool: false,
|
|
|
- // 表格属性
|
|
|
- tableAttributes: {
|
|
|
- // 启用勾选列
|
|
|
- selectColumn: false,
|
|
|
- },
|
|
|
- // 表格事件
|
|
|
- tableEvents: {
|
|
|
- 'selection-change': this.selectionChange
|
|
|
- },
|
|
|
+ tabType: 'collect',
|
|
|
+ tabTypeCk: 'collect',
|
|
|
+ websitId: "",
|
|
|
+ workerId: "",
|
|
|
+ status: "",
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- moreParameters() {
|
|
|
- return [
|
|
|
- {
|
|
|
- name: '状态',
|
|
|
- key: 'examineStatus',
|
|
|
- value: '',
|
|
|
- conditions: [
|
|
|
- { label: "全部", value: "" },
|
|
|
- { label: "待审核", value: "WAIT" },
|
|
|
- { label: "审核通过", value: "OK" },
|
|
|
- { label: "驳回", value: "FAIL" },
|
|
|
- { label: "取消", value: "NO" },
|
|
|
- { label: "已支付", value: "PAID" },
|
|
|
- { label: "未支付", value: "NO_PAID" },
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ created() {
|
|
|
+ EventBus.$on("tabTypeCkChange", ({ websitId, workerId, status, tabTypeCk }) => {
|
|
|
+ this.websitId = websitId
|
|
|
+ this.workerId = workerId
|
|
|
+ this.status = status
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tabTypeCk = tabTypeCk
|
|
|
+ this.tabType = tabTypeCk
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
- // 列表请求函数
|
|
|
- getList(p, cb) {
|
|
|
- try {
|
|
|
- var pam = JSON.parse(JSON.stringify(p))
|
|
|
- pam.params.push({ "param": "is_all_fee", "compare": "=", "value": "NO" })
|
|
|
- if (pam.examineStatus) {
|
|
|
- pam.params.push({ "param": "examine_status", "compare": "=", "value": pam.examineStatus })
|
|
|
- }
|
|
|
- cb && cb(pam)
|
|
|
- return enginMaterialList(pam)
|
|
|
- } catch (err) {
|
|
|
- console.log(err)
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 列表导出函数
|
|
|
- exportList: enginMaterialListExport,
|
|
|
-
|
|
|
- // 表格列解析渲染数据更改
|
|
|
- columnParsing(item, defaultData) {
|
|
|
- return defaultData
|
|
|
- },
|
|
|
-
|
|
|
- // 监听勾选变化
|
|
|
- selectionChange(data) {
|
|
|
- this.recordSelected = data
|
|
|
- },
|
|
|
-
|
|
|
- operation() {
|
|
|
- return this.operationBtn({
|
|
|
- edit: {
|
|
|
- click: ({ row, index, column }) => {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+ tabTypeChange() {
|
|
|
+ this.websitId = ""
|
|
|
+ this.workerId = ""
|
|
|
+ this.status = ""
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tabTypeCk = this.tabType
|
|
|
})
|
|
|
- },
|
|
|
-
|
|
|
- handleClose() {
|
|
|
- this.createFormBool = false
|
|
|
- },
|
|
|
-
|
|
|
- }
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tab {
|
|
|
+ padding: 20px 20px 0 20px;
|
|
|
+}
|
|
|
+</style>
|