|
@@ -1,6 +1,6 @@
|
|
|
<!-- 交易商结算单 -->
|
|
<!-- 交易商结算单 -->
|
|
|
<template>
|
|
<template>
|
|
|
- <app-drawer title="交易商结算单" :width="1000" v-model:show="show" :refresh="refresh" :show-close="false">
|
|
|
|
|
|
|
+ <app-drawer title="交易商结算单" :width="1000" v-model:show="show" :show-close="!!reportAgree[agreeIndex]?.isAgree">
|
|
|
<div class="el-form--horizontal">
|
|
<div class="el-form--horizontal">
|
|
|
<div class="el-form-item--col">
|
|
<div class="el-form-item--col">
|
|
|
<el-select placeholder="请选择" v-model="reporttype" @change="onChange" style="width: 160px;">
|
|
<el-select placeholder="请选择" v-model="reporttype" @change="onChange" style="width: 160px;">
|
|
@@ -42,17 +42,19 @@
|
|
|
<app-table :data="tradedetails" v-model:columns="tradeDetailsTableColumns" />
|
|
<app-table :data="tradedetails" v-model:columns="tradeDetailsTableColumns" />
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <el-button type="info" @click="onDisAgree">不同意</el-button>
|
|
|
|
|
- <el-button type="primary" @click="onAgree">同意</el-button>
|
|
|
|
|
|
|
+ <el-button type="info" @click="show = false" v-if="!!reportAgree[agreeIndex]?.isAgree">关闭</el-button>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <el-button type="info" @click="onDisAgree">不同意</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="onAgree">同意</el-button>
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
</app-drawer>
|
|
</app-drawer>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, shallowRef, computed } from 'vue'
|
|
import { ref, shallowRef, computed } from 'vue'
|
|
|
-import { useRouter } from 'vue-router'
|
|
|
|
|
import eventBus from '@/services/bus'
|
|
import eventBus from '@/services/bus'
|
|
|
-import { useAccountStore, useUserStore } from '@/stores'
|
|
|
|
|
|
|
+import { useLoginStore, useAccountStore, useUserStore } from '@/stores'
|
|
|
import { formatDate } from '@/filters'
|
|
import { formatDate } from '@/filters'
|
|
|
import { localData } from '@/stores/storage'
|
|
import { localData } from '@/stores/storage'
|
|
|
import { onMounted } from 'vue'
|
|
import { onMounted } from 'vue'
|
|
@@ -62,8 +64,6 @@ import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
|
|
|
|
|
const show = ref(true)
|
|
const show = ref(true)
|
|
|
-const refresh = ref(false)
|
|
|
|
|
-const router = useRouter()
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
/// 报表类型 日报表-1 月报表-2
|
|
/// 报表类型 日报表-1 月报表-2
|
|
|
const reporttype = ref(1)
|
|
const reporttype = ref(1)
|
|
@@ -73,6 +73,7 @@ const cycletime = shallowRef(formatDate(new Date().toISOString(), 'YYYYMMDD'))
|
|
|
const pickerType = computed(() => reporttype.value === 1 ? 'date' : 'month')
|
|
const pickerType = computed(() => reporttype.value === 1 ? 'date' : 'month')
|
|
|
const pickerFormat = computed(() => reporttype.value === 1 ? 'YYYYMMDD' : 'YYYYMM')
|
|
const pickerFormat = computed(() => reporttype.value === 1 ? 'YYYYMMDD' : 'YYYYMM')
|
|
|
|
|
|
|
|
|
|
+const loginStore = useLoginStore()
|
|
|
const currentAccount = useAccountStore().currentAccount
|
|
const currentAccount = useAccountStore().currentAccount
|
|
|
const userInfo = useUserStore().userInfo
|
|
const userInfo = useUserStore().userInfo
|
|
|
|
|
|
|
@@ -81,19 +82,32 @@ const logs = shallowRef<Model.ReportBankAccountOutInLogRsp[]>([])
|
|
|
const dpostions = shallowRef<Model.ReportReckonDayPositionRsp[]>([])
|
|
const dpostions = shallowRef<Model.ReportReckonDayPositionRsp[]>([])
|
|
|
const tradedetails = shallowRef<Model.ReportTradeDetailRsp[]>([])
|
|
const tradedetails = shallowRef<Model.ReportTradeDetailRsp[]>([])
|
|
|
|
|
|
|
|
|
|
+const reportAgree = localData.getValue('reportAgree')
|
|
|
|
|
+const agreeIndex = reportAgree.findIndex((e) => e.loginId === loginStore.loginId)
|
|
|
|
|
+
|
|
|
const onAgree = () => {
|
|
const onAgree = () => {
|
|
|
|
|
+ if (agreeIndex > -1) {
|
|
|
|
|
+ reportAgree[agreeIndex].isAgree = true
|
|
|
|
|
+ reportAgree[agreeIndex].agreedTime = new Date().toISOString()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ reportAgree.push({
|
|
|
|
|
+ loginId: loginStore.loginId,
|
|
|
|
|
+ isAgree: true,
|
|
|
|
|
+ agreedTime: new Date().toISOString()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
/// 记录时间和是否同意
|
|
/// 记录时间和是否同意
|
|
|
- localData.setValue('isReportAgree', true)
|
|
|
|
|
- localData.setValue('reportTime', new Date().toISOString())
|
|
|
|
|
|
|
+ localData.setValue('reportAgree', reportAgree)
|
|
|
show.value = false
|
|
show.value = false
|
|
|
- refresh.value = false
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const onDisAgree = () => {
|
|
const onDisAgree = () => {
|
|
|
- /// 记录时间和是否同意
|
|
|
|
|
- localData.setValue('isReportAgree', false)
|
|
|
|
|
|
|
+ if (agreeIndex > -1) {
|
|
|
|
|
+ reportAgree.splice(agreeIndex, 1)
|
|
|
|
|
+ /// 记录时间和是否同意
|
|
|
|
|
+ localData.setValue('reportAgree', reportAgree)
|
|
|
|
|
+ }
|
|
|
eventBus.$emit('LogoutNotify')
|
|
eventBus.$emit('LogoutNotify')
|
|
|
- router.replace({ name: 'login' })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const reloadData = () => {
|
|
const reloadData = () => {
|