瀏覽代碼

no message

aXin-0810 9 月之前
父節點
當前提交
e151405f73

+ 66 - 0
src/api/feesWillBeRefunded.js

@@ -0,0 +1,66 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 列表
+export function dailySummaryReduceTotal(data) {
+  return request({
+    url: `/daily/summary/reduce/total?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+// 执行
+export function dailySummaryReduceDo(params) {
+  return request({
+    url: `/daily/summary/reduce/do`,
+    method: 'post',
+    params
+  })
+}
+
+// 删除
+export function dailySummaryReduceDelete(params) {
+  return request({
+    url: `/daily/summary/reduce/delete`,
+    method: 'post',
+    params
+  })
+}
+
+// export function dailySummaryIncrDecrCostImport(data) {
+//   return handleImport('/daily/summary/incrDecrCost/import', data.formdata, data.id || '')
+// }
+
+// 明细列表
+export function dailySummaryReduceList(data) {
+  return request({
+    url: `/daily/summary/reduce/list?moduleId=${data.moduleId}22`,
+    method: 'post',
+    data
+  })
+}
+
+// 明细导出
+export function dailySummaryReduceListExport(data, name) {
+  return postBlob({
+    url: '/daily/summary/reduce/list/export',
+    data,
+    name
+  })
+}
+
+export function dailySummaryReduceItemDo(params) {
+  return request({
+    url: `/daily/summary/reduce/item/do`,
+    method: 'post',
+    params
+  })
+}
+
+export function dailySummaryReduceItemDelete(params) {
+  return request({
+    url: `/daily/summary/reduce/item/delete`,
+    method: 'post',
+    params
+  })
+}

+ 276 - 0
src/views/engineerFeeSettlement/dailyMaintenanceBalance/feesWillBeRefunded/index.vue

@@ -0,0 +1,276 @@
+<template>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{ activeKey, data }">
+      <div
+        :style="{
+          width: '100%',
+          height: activeKey == 'list' ? '100%' : '0px',
+          overflow: 'hidden'
+        }"
+      >
+        <template-page
+          ref="pageRef"
+          :get-list="getList"
+          :table-attributes="tableAttributes"
+          :table-events="tableEvents"
+          :options-evens-group="optionsEvensGroup"
+          :moreParameters="moreParameters"
+          :column-parsing="columnParsing"
+          :operationColumnWidth="180"
+          :operation="operation()"
+        >
+        </template-page>
+      </div>
+      <div
+        v-if="activeKey == 'view'"
+        :style="{
+          width: '100%',
+          height: '100%',
+          overflow: 'hidden'
+        }"
+      >
+        <template-page
+          ref="pageRef2"
+          :operationColumnWidth="180"
+          :table-attributes="tableAttributes2"
+          :table-events="tableEvents2"
+          :get-list="getList2"
+          :exportList="exportList2"
+          :options-evens-group="optionsEvensGroup2"
+          :operation="operation2()"
+          expCode="exp2"
+        >
+        </template-page>
+      </div>
+    </template>
+  </zj-tab-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 {
+  dailySummaryReduceTotal,
+  dailySummaryReduceDo,
+  dailySummaryReduceDelete,
+  dailySummaryReduceList,
+  dailySummaryReduceListExport,
+  dailySummaryReduceItemDo,
+  dailySummaryReduceItemDelete
+} from '@/api/feesWillBeRefunded'
+import { dailySummaryOrderImport } from '@/api/settlementDataImport'
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      // 表格属性
+      tableAttributes2: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents2: {
+        'selection-change': this.selectionChange2
+      },
+      // 勾选选中行
+      recordSelected2: [],
+      // 表单
+      formData: {}
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('import', ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(dailySummaryOrderImport, moduleName, { type: 'reduce' })
+                }
+              }
+            })
+          ]
+        ]
+      ]
+    },
+    //
+    optionsEvensGroup2() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('batchExecute2', {
+              click: () => {
+                if (this.recordSelected2.length === 0) {
+                  this.$message.warning('请勾选')
+                  return
+                }
+                dailySummaryReduceItemDo({
+                  ids: this.recordSelected2.map(item => item.id).join(',')
+                }).then(res => {
+                  this.$message({ type: 'success', message: '设置成功!' })
+                  this.$refs.pageRef2.refreshList()
+                })
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth('batchDel2', {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选')
+                  return
+                }
+                dailySummaryReduceItemDelete({
+                  ids: this.recordSelected.map(item => item.id).join(',')
+                }).then(res => {
+                  this.$message({ type: 'success', message: '删除成功!' })
+                  this.$refs.pageRef2.refreshList()
+                })
+              }
+            })
+          ]
+        ]
+      ]
+    },
+    formItems() {
+      return []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        cb && cb(p)
+        return dailySummaryReduceTotal(p)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    getList2(p, cb) {
+      try {
+        cb && cb(p)
+        return dailySummaryReduceList(p)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    // 列表导出函数
+    exportList2: dailySummaryReduceListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    selectionChange2(data) {
+      this.recordSelected2 = data
+    },
+    operation() {
+      return this.operationBtn({
+        view: {
+          click: ({ row, index, column }) => {
+            this.$refs.tabPage.addTab({
+              // 对应显示的模块
+              activeKey: 'view',
+              // 唯一标识
+              key: 'view',
+              // 页签名称
+              label: '明细',
+              // 打开时事件
+              triggerEvent: () => {},
+              // 关闭时事件
+              closeEvent: () => {}
+            })
+          }
+        },
+        execute: {
+          prompt: '确定执行吗?',
+          click: ({ row, index, column }) => {
+            dailySummaryReduceDo({ importBatchNos: row.importBatchNo }).then(res => {
+              this.$message({ type: 'success', message: '执行成功!' })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
+        coverImport: {
+          import: true,
+          click: ({ row, index, column, file }) => {
+            var formdata = new FormData()
+            formdata.append('file', file)
+            formdata.append('type', 'reduce')
+            formdata.append('importBatchNo', row.importBatchNo)
+            dailySummaryOrderImport({ formdata })
+              .then(res => {
+                this.$refs.pageRef.refreshList()
+                this.$message({
+                  type: 'success',
+                  message: '导入成功!'
+                })
+              })
+              .catch(err => {
+                this.$message({
+                  type: 'error',
+                  message: err.message || '导入失败'
+                })
+              })
+          }
+        },
+        del: {
+          prompt: '确定删除吗?',
+          click: ({ row, index, column }) => {
+            dailySummaryReduceDelete({ importBatchNo: row.importBatchNo }).then(res => {
+              this.$message({ type: 'success', message: '删除成功!' })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        }
+      })
+    },
+    operation2() {
+      return this.operationBtn({
+        execute2: {
+          click: ({ row, index, column }) => {
+            dailySummaryReduceItemDo({ ids: row.id }).then(res => {
+              this.$message({ type: 'success', message: '设置成功!' })
+              this.$refs.pageRef2.refreshList()
+            })
+          }
+        },
+        del2: {
+          prompt: '确定删除吗?',
+          click: ({ row, index, column }) => {
+            dailySummaryReduceItemDelete({ ids: row.id }).then(res => {
+              this.$message({ type: 'success', message: '删除成功!' })
+              this.$refs.pageRef2.refreshList()
+            })
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 14
src/views/engineerFeeSettlement/dailyMaintenanceBalance/increaseAndDecreaseExpense/index.vue

@@ -49,20 +49,7 @@
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import ImageUpload from '@/components/file-upload'
 import operation_mixin from '@/components/template/operation_mixin.js'
-import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import {
-  dailySummaryList,
-  dailySummaryOrderImport,
-  dailySummaryRepairDelete,
-  dailySummaryRepairSummary,
-  dailySummaryRepairDetailList,
-  dailySummaryRepairDetailListExport,
-  dailySummaryRepairItemDelete,
-  dailySummaryRepairItemWait,
-  dailySummaryRepairItemResummary
-} from '@/api/settlementDataImport'
 import {
   dailySummaryReduceCountList,
   dailySummaryIncrDecrCostList,
@@ -74,7 +61,7 @@ import {
   dailySummaryReduceCountDo
 } from '@/api/increaseAndDecreaseExpense'
 export default {
-  components: { TemplatePage, ImageUpload },
+  components: { TemplatePage },
   mixins: [import_mixin, operation_mixin],
   data() {
     return {

+ 2 - 3
src/views/engineerFeeSettlement/dailyMaintenanceBalance/settlementDataImport/index.vue

@@ -48,9 +48,7 @@
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
-import ImageUpload from '@/components/file-upload'
 import operation_mixin from '@/components/template/operation_mixin.js'
-import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import {
   dailySummaryList,
   dailySummaryOrderImport,
@@ -63,7 +61,7 @@ import {
   dailySummaryRepairItemResummary
 } from '@/api/settlementDataImport'
 export default {
-  components: { TemplatePage, ImageUpload },
+  components: { TemplatePage },
   mixins: [import_mixin, operation_mixin],
   data() {
     return {
@@ -236,6 +234,7 @@ export default {
           click: ({ row, index, column, file }) => {
             var formdata = new FormData()
             formdata.append('file', file)
+            formdata.append('type', 'repair')
             formdata.append('importBatchNo', row.importBatchNo)
             dailySummaryOrderImport({ formdata })
               .then(res => {