|
@@ -0,0 +1,138 @@
|
|
|
+<template>
|
|
|
+ <template-page
|
|
|
+ ref="pageRef"
|
|
|
+ :getList="getList"
|
|
|
+ :operation="operation()"
|
|
|
+ :exportList="exportList"
|
|
|
+ :columnParsing="columnParsing"
|
|
|
+ :tableAttributes="tableAttributes"
|
|
|
+ :tableEvents="tableEvents"
|
|
|
+ :optionsEvensGroup="optionsEvensGroup"
|
|
|
+ >
|
|
|
+ <div slot="moreSearch">
|
|
|
+ <el-radio-group v-model="examineStatus" size="mini" @change="changeType">
|
|
|
+ <el-radio-button label="">全部</el-radio-button>
|
|
|
+ <el-radio-button label="WAIT">待审核</el-radio-button>
|
|
|
+ <el-radio-button label="WAIT_PAY">待收款</el-radio-button>
|
|
|
+ <el-radio-button label="PART_PAY">部分收款</el-radio-button>
|
|
|
+ <el-radio-button label="PAY">收款完成</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <br /><br />
|
|
|
+ </div>
|
|
|
+ </template-page>
|
|
|
+</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 { enginPayList, enginPayListExport, enginPayImport } from '@/api/projectCollectionManagement'
|
|
|
+import { commonTemplateDownload } from '@/api/common.js'
|
|
|
+import { EventBus } from '@/utils/eventBus'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ TemplatePage
|
|
|
+ },
|
|
|
+ mixins: [import_mixin, operation_mixin],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ formBool: false,
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: false
|
|
|
+ },
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
+ },
|
|
|
+ formData: {},
|
|
|
+ detailParams: [],
|
|
|
+ examineStatus: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 事件组合
|
|
|
+ optionsEvensGroup() {
|
|
|
+ return [
|
|
|
+ [
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth('add', {
|
|
|
+ click: () => {}
|
|
|
+ })
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ this.optionsEvensAuth(['imp', 'template'], {
|
|
|
+ name: '导入',
|
|
|
+ click: () => {}
|
|
|
+ }),
|
|
|
+ this.optionsEvensAuth('imp', ({ moduleName }) => {
|
|
|
+ return {
|
|
|
+ name: moduleName,
|
|
|
+ render: () => {
|
|
|
+ return this.importButton(enginPayImport, moduleName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ this.optionsEvensAuth('template', {
|
|
|
+ click: () => {
|
|
|
+ commonTemplateDownload({ name: '工程收款管理模板.xlsx' }, `工程收款管理模板`)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '下载成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('下载失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 列表请求函数
|
|
|
+ getList(p) {
|
|
|
+ try {
|
|
|
+ var pam = JSON.parse(JSON.stringify(p))
|
|
|
+ if (this.examineStatus) {
|
|
|
+ pam.params.push({ param: 'a.status', compare: '=', value: this.examineStatus })
|
|
|
+ }
|
|
|
+ return enginPayList(pam)
|
|
|
+ } catch (error) {}
|
|
|
+ },
|
|
|
+
|
|
|
+ // 列表导出函数
|
|
|
+ exportList: enginPayListExport,
|
|
|
+
|
|
|
+ // 切换状态
|
|
|
+ changeType(val) {
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 表格列解析渲染数据更改
|
|
|
+ columnParsing(item, defaultData) {
|
|
|
+ return defaultData
|
|
|
+ },
|
|
|
+
|
|
|
+ // 监听勾选变化
|
|
|
+ selectionChange(data) {
|
|
|
+ this.recordSelected = data
|
|
|
+ },
|
|
|
+
|
|
|
+ operation() {
|
|
|
+ return this.operationBtn({
|
|
|
+ details: {
|
|
|
+ btnType: 'text',
|
|
|
+ click: ({ row, index, column }) => {}
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|