|
@@ -5,8 +5,10 @@
|
|
|
<template #header>
|
|
|
<el-button hc-btn type="primary" @click="systemPaymentClick">引用系统支付项</el-button>
|
|
|
</template>
|
|
|
- <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new
|
|
|
- :index-style="{ width: 60 }" is-current-row @row-click="viewRowClick">
|
|
|
+ <hc-table
|
|
|
+ :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new
|
|
|
+ :index-style="{ width: 60 }" is-current-row @row-click="viewRowClick"
|
|
|
+ >
|
|
|
<template #isDeduct="{ row }">
|
|
|
<span>{{ row?.isDeduct === 1 ? '是' : '否' }}</span>
|
|
|
</template>
|
|
@@ -19,13 +21,13 @@
|
|
|
</template>
|
|
|
</hc-table>
|
|
|
<template #action>
|
|
|
- <hc-pages :pages="searchForm" @change="pageChange"/>
|
|
|
+ <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
</template>
|
|
|
</hc-new-card>
|
|
|
</div>
|
|
|
<div :id="`hc_info_card_${uuid}`" class="flex-1">
|
|
|
<hc-new-card scrollbar>
|
|
|
- <infoTable :ids="rowViewId"/>
|
|
|
+ <infoTable :ids="rowViewId" />
|
|
|
<hc-title title="汇总项">
|
|
|
<template #extra>
|
|
|
<el-link type="primary" @click="addColloect">添加汇总项</el-link>
|
|
@@ -43,10 +45,10 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 引用系统支付项 -->
|
|
|
- <systemPay v-model="systemPayShow" @finish="finishSystemPay"/>
|
|
|
+ <systemPay v-model="systemPayShow" @finish="finishSystemPay" />
|
|
|
|
|
|
<!-- 修改项目支付项 -->
|
|
|
- <rowDataInfo v-model="isEditRowShow" :ids="rowDataId" @finish="finishEditRow"/>
|
|
|
+ <rowDataInfo v-model="isEditRowShow" :ids="rowDataId" @finish="finishEditRow" />
|
|
|
|
|
|
<!-- 添加汇总项 -->
|
|
|
<hc-new-dialog v-model="isCollectShow" is-table widths="1200px" title="添加汇总项" @save="collectModalSave">
|
|
@@ -79,15 +81,15 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, onActivated, onMounted, ref } from 'vue'
|
|
|
-import {getRandom} from 'js-fast-way'
|
|
|
+import { getRandom } from 'js-fast-way'
|
|
|
import infoTable from './components/pay/info-table.vue'
|
|
|
import systemPay from './components/pay/system-pay.vue'
|
|
|
import rowDataInfo from './components/pay/row-data.vue'
|
|
|
import payApi from '~api/project/debit/project/pay.js'
|
|
|
-import {arrToId, getArrValue, getObjValue} from 'js-fast-way'
|
|
|
-import {useAppStore} from '~src/store'
|
|
|
-import {delMessageV2} from '~com/message/index.js'
|
|
|
-import {getDictionary} from '~api/other'
|
|
|
+import { arrToId, getArrValue, getObjValue } from 'js-fast-way'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import { delMessageV2 } from '~com/message/index.js'
|
|
|
+import { getDictionary } from '~api/other'
|
|
|
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId)
|
|
@@ -123,7 +125,7 @@ const setSplitRef = () => {
|
|
|
//获支付项类型
|
|
|
const payOptions = ref([])
|
|
|
const gePayType = async () => {
|
|
|
- const {data} = await getDictionary({
|
|
|
+ const { data } = await getDictionary({
|
|
|
code: 'meter_pay_type',
|
|
|
})
|
|
|
payOptions.value = getArrValue(data)
|
|
@@ -135,7 +137,7 @@ const gePayType = async () => {
|
|
|
//获支付项适用类型
|
|
|
const payAppOptions = ref([])
|
|
|
const gePayAppType = async () => {
|
|
|
- const {data} = await getDictionary({
|
|
|
+ const { data } = await getDictionary({
|
|
|
code: 'meter_pay_applicable_type',
|
|
|
})
|
|
|
payAppOptions.value = getArrValue(data)
|
|
@@ -144,10 +146,10 @@ const gePayAppType = async () => {
|
|
|
})
|
|
|
}
|
|
|
//搜索表单
|
|
|
-const searchForm = ref({current: 1, size: 10, total: 0})
|
|
|
+const searchForm = ref({ current: 1, size: 20, total: 0 })
|
|
|
|
|
|
//分页
|
|
|
-const pageChange = ({current, size}) => {
|
|
|
+const pageChange = ({ current, size }) => {
|
|
|
searchForm.value.current = current
|
|
|
searchForm.value.size = size
|
|
|
getTableData()
|
|
@@ -156,18 +158,18 @@ const pageChange = ({current, size}) => {
|
|
|
//表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = ref([
|
|
|
- {key: 'payNumber', name: '支付项编号', width: 140},
|
|
|
- {key: 'payName', name: '支付项名称'},
|
|
|
- {key: 'payTypeName', name: '支付项类型', width: 160},
|
|
|
- {key: 'isDeduct', name: '是否为扣款项', width: 100},
|
|
|
- {key: 'isTotalTerms', name: '是否合计项', width: 100},
|
|
|
- {key: 'payApplicableTypeName', name: '适用类型', width: 100},
|
|
|
- {key: 'action', name: '操作', width: 100},
|
|
|
+ { key: 'payNumber', name: '支付项编号', width: 140 },
|
|
|
+ { key: 'payName', name: '支付项名称' },
|
|
|
+ { key: 'payTypeName', name: '支付项类型', width: 160 },
|
|
|
+ { key: 'isDeduct', name: '是否为扣款项', width: 100 },
|
|
|
+ { key: 'isTotalTerms', name: '是否合计项', width: 100 },
|
|
|
+ { key: 'payApplicableTypeName', name: '适用类型', width: 100 },
|
|
|
+ { key: 'action', name: '操作', width: 100 },
|
|
|
])
|
|
|
const tableData = ref([])
|
|
|
const getTableData = async () => {
|
|
|
tableLoading.value = true
|
|
|
- const {error, code, data} = await payApi.getProListPage({
|
|
|
+ const { error, code, data } = await payApi.getProListPage({
|
|
|
...searchForm.value,
|
|
|
projectId: projectId.value,
|
|
|
})
|
|
@@ -202,14 +204,14 @@ const finishSystemPay = () => {
|
|
|
}
|
|
|
//汇总项
|
|
|
const tableColumn1 = ref([
|
|
|
- {key: 'payNumber', name: '支付项编号'},
|
|
|
- {key: 'payName', name: '支付项名称'},
|
|
|
- {key: 'payTypeName', name: '支付项类型'},
|
|
|
- {key: 'contractFormulaIds', name: '合同计算公式'},
|
|
|
- {key: 'updateFormulaIds', name: '变更计算公式'},
|
|
|
- {key: 'currentFormulaIds', name: '本期计算公式'},
|
|
|
- {key: 'isDeduct', name: '是否为扣款项'},
|
|
|
- {key: 'action', name: '操作', width: 50},
|
|
|
+ { key: 'payNumber', name: '支付项编号' },
|
|
|
+ { key: 'payName', name: '支付项名称' },
|
|
|
+ { key: 'payTypeName', name: '支付项类型' },
|
|
|
+ { key: 'contractFormulaIds', name: '合同计算公式' },
|
|
|
+ { key: 'updateFormulaIds', name: '变更计算公式' },
|
|
|
+ { key: 'currentFormulaIds', name: '本期计算公式' },
|
|
|
+ { key: 'isDeduct', name: '是否为扣款项' },
|
|
|
+ { key: 'action', name: '操作', width: 50 },
|
|
|
])
|
|
|
const tableData1 = ref([])
|
|
|
|
|
@@ -224,7 +226,7 @@ const editRowClick = (row) => {
|
|
|
}
|
|
|
//获取节点详情
|
|
|
const getDetail = async (id) => {
|
|
|
- const {error, code, data} = await payApi.getProDetail({
|
|
|
+ const { error, code, data } = await payApi.getProDetail({
|
|
|
id,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
@@ -234,7 +236,7 @@ const getDetail = async (id) => {
|
|
|
tableData1.value = []
|
|
|
}
|
|
|
}
|
|
|
-const viewRowClick = ({row}) => {
|
|
|
+const viewRowClick = ({ row }) => {
|
|
|
rowViewId.value = row.id
|
|
|
getDetail(row.id)
|
|
|
}
|
|
@@ -255,7 +257,7 @@ const delRowClick = async (row) => {
|
|
|
})
|
|
|
}
|
|
|
const removeProPay = async (id) => {
|
|
|
- const {error, code} = await payApi.removeProList({
|
|
|
+ const { error, code } = await payApi.removeProList({
|
|
|
id: id,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
@@ -270,7 +272,7 @@ const collectSaveLoading = ref(false)
|
|
|
const collectModalSave = async () => {
|
|
|
|
|
|
collectSaveLoading.value = true
|
|
|
- const {error, code, msg} = await payApi.addCollect({
|
|
|
+ const { error, code, msg } = await payApi.addCollect({
|
|
|
bindIds: selectTableCollectIds.value,
|
|
|
id: rowViewId.value,
|
|
|
|
|
@@ -304,7 +306,7 @@ const delCollectRow = (row) => {
|
|
|
})
|
|
|
}
|
|
|
const removeCollectPay = async (id) => {
|
|
|
- const {error, code} = await payApi.removeCollect({
|
|
|
+ const { error, code } = await payApi.removeCollect({
|
|
|
id: rowViewId.value,
|
|
|
bindId: id,
|
|
|
})
|
|
@@ -315,18 +317,18 @@ const removeCollectPay = async (id) => {
|
|
|
}
|
|
|
//添加汇总项
|
|
|
const tableCollectColumn = ref([
|
|
|
- {key: 'payNumber', name: '支付项编号'},
|
|
|
- {key: 'payName', name: '支付项名称'},
|
|
|
- {key: 'payTypeName', name: '支付项类型'},
|
|
|
- {key: 'isDeduct', name: '是否为扣款项'},
|
|
|
- {key: 'isTotalTerms', name: '是否合计项'},
|
|
|
- {key: 'payApplicableTypeName', name: '支付项适用类型'},
|
|
|
+ { key: 'payNumber', name: '支付项编号' },
|
|
|
+ { key: 'payName', name: '支付项名称' },
|
|
|
+ { key: 'payTypeName', name: '支付项类型' },
|
|
|
+ { key: 'isDeduct', name: '是否为扣款项' },
|
|
|
+ { key: 'isTotalTerms', name: '是否合计项' },
|
|
|
+ { key: 'payApplicableTypeName', name: '支付项适用类型' },
|
|
|
])
|
|
|
const tableCollectData = ref([])
|
|
|
const tableCollectLoading = ref(false)
|
|
|
const getTableCollectData = async () => {
|
|
|
tableCollectLoading.value = true
|
|
|
- const {error, code, data} = await payApi.getProListPage({
|
|
|
+ const { error, code, data } = await payApi.getProListPage({
|
|
|
type: 1,
|
|
|
recordId: rowViewId.value,
|
|
|
projectId: projectId.value,
|