aXin-0810 1 anno fa
parent
commit
ae640530d1

+ 37 - 0
src/api/projectCollectionManagement.js

@@ -0,0 +1,37 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function enginPayList(data) {
+  return request({
+    url: `/engin/pay/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function enginPayListExport(data, name) {
+  return postBlob({
+    url: '/engin/pay/list/export',
+    data,
+    name
+  })
+}
+
+export function enginPayImport(data) {
+  return handleImport('/engin/pay/import', data.formdata, data.id || '')
+}
+
+export function enginPayGatherList(data) {
+  return request({
+    url: `/engin/pay/gather/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function enginPayGatherListExport(data, name) {
+  return postBlob({
+    url: '/engin/pay/gather/list/export',
+    data,
+    name
+  })
+}

+ 42 - 0
src/views/engineeringAuxiliaryParts/projectCollectionManagement/index.vue

@@ -0,0 +1,42 @@
+<template>
+  <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>
+    <zj-page-fill>
+      <collect v-if="tabTypeCk == 'collect'" key="collect" />
+      <offline v-if="tabTypeCk == 'offline'" key="offline" />
+    </zj-page-fill>
+  </zj-page-container>
+</template>
+
+<script>
+import { EventBus } from '@/utils/eventBus'
+import collect from './pages/collect.vue'
+import offline from './pages/offline.vue'
+export default {
+  components: { collect, offline },
+  data() {
+    return {
+      tabType: 'collect',
+      tabTypeCk: 'collect'
+    }
+  },
+  methods: {
+    tabTypeChange() {
+      this.$nextTick(() => {
+        this.tabTypeCk = this.tabType
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.tab {
+  padding: 20px 20px 0 20px;
+}
+</style>

+ 138 - 0
src/views/engineeringAuxiliaryParts/projectCollectionManagement/pages/collect.vue

@@ -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>

+ 76 - 0
src/views/engineeringAuxiliaryParts/projectCollectionManagement/pages/offline.vue

@@ -0,0 +1,76 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :columnParsing="columnParsing"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+  >
+  </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 { enginPayGatherList, enginPayGatherListExport } from '@/api/projectCollectionManagement'
+export default {
+  components: {
+    TemplatePage
+  },
+  mixins: [import_mixin, operation_mixin],
+  props: {
+    detailParams: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      formBool: false,
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      }
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: enginPayGatherList,
+
+    exportList: enginPayGatherListExport,
+
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+
+  ::v-deep & > .zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    & > div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>