正元同步配置
This commit is contained in:
1 parent
d10f8a1d16
commit
a6dcf72061
1 file changed
+80
-9
@@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div v-loading="syncLoading" class="layout-padding-auto layout-padding-view">
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8" style="width: 100%">
|
||||||
<el-button type="primary" @click="merchantInfoSync">商户信息同步</el-button>
|
<el-button type="primary" :disabled="syncLoading" @click="merchantInfoSync">商户信息同步</el-button>
|
||||||
<el-button type="primary" @click="unitOfAccountSync">记账单位同步</el-button>
|
<el-button type="primary" :disabled="syncLoading" @click="unitOfAccountSync">记账单位同步</el-button>
|
||||||
<el-button type="primary" @click="accountInfoSync">账户信息同步</el-button>
|
<el-button type="primary" :disabled="syncLoading" @click="accountInfoSync">账户信息同步</el-button>
|
||||||
<el-button type="primary" @click="identityInfoSync">身份信息同步</el-button>
|
<el-button type="primary" :disabled="syncLoading" @click="identityInfoSync">身份信息同步</el-button>
|
||||||
|
<el-button type="primary" :disabled="syncLoading" @click="transactionDataSync">交易数据同步</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -75,6 +76,8 @@ import { fetchList } from "/@/api/wallet/third-zy-log"
|
|||||||
import { useDict } from "/@/hooks/dict"
|
import { useDict } from "/@/hooks/dict"
|
||||||
import VueJsonPretty from "vue-json-pretty"
|
import VueJsonPretty from "vue-json-pretty"
|
||||||
import "vue-json-pretty/lib/styles.css"
|
import "vue-json-pretty/lib/styles.css"
|
||||||
|
import { syncAllDept, syncAllMch, syncAllRole, syncAllUser } from "/@/api/wallet/mch-thrid-zy"
|
||||||
|
import { useMessage } from "/@/hooks/message"
|
||||||
|
|
||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
|
|
||||||
@@ -86,6 +89,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
queryForm: {},
|
queryForm: {},
|
||||||
pageList: fetchList,
|
pageList: fetchList,
|
||||||
})
|
})
|
||||||
|
const syncLoading = ref<boolean>()
|
||||||
|
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state)
|
||||||
|
|
||||||
@@ -96,11 +100,78 @@ const handleClickJsonView = (json: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 商户信息同步
|
// 商户信息同步
|
||||||
const merchantInfoSync = () => {}
|
const merchantInfoSync = async () => {
|
||||||
|
syncLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await syncAllMch()
|
||||||
|
if (res.code === 0) {
|
||||||
|
return useMessage().success("同步成功")
|
||||||
|
}
|
||||||
|
useMessage().error("同步失败")
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error("错误")
|
||||||
|
} finally {
|
||||||
|
syncLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
// 记账单位同步
|
// 记账单位同步
|
||||||
const unitOfAccountSync = () => {}
|
const unitOfAccountSync = async () => {
|
||||||
|
syncLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await syncAllDept()
|
||||||
|
if (res.code === 0) {
|
||||||
|
return useMessage().success("同步成功")
|
||||||
|
}
|
||||||
|
useMessage().error("同步失败")
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error("错误")
|
||||||
|
} finally {
|
||||||
|
syncLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
// 账户信息同步
|
// 账户信息同步
|
||||||
const accountInfoSync = () => {}
|
const accountInfoSync = async () => {
|
||||||
|
syncLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await syncAllRole()
|
||||||
|
if (res.code === 0) {
|
||||||
|
return useMessage().success("同步成功")
|
||||||
|
}
|
||||||
|
useMessage().error("同步失败")
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error("错误")
|
||||||
|
} finally {
|
||||||
|
syncLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
// 身份信息同步
|
// 身份信息同步
|
||||||
const identityInfoSync = () => {}
|
const identityInfoSync = async () => {
|
||||||
|
syncLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await syncAllUser()
|
||||||
|
if (res.code === 0) {
|
||||||
|
return useMessage().success("同步成功")
|
||||||
|
}
|
||||||
|
useMessage().error("同步失败")
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error("错误")
|
||||||
|
} finally {
|
||||||
|
syncLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 交易数据同步
|
||||||
|
const transactionDataSync = async () => {
|
||||||
|
// syncLoading.value = true
|
||||||
|
// try {
|
||||||
|
// const res = await ()
|
||||||
|
// if (res.code === 0) {
|
||||||
|
// return useMessage().success("同步成功")
|
||||||
|
// }
|
||||||
|
// useMessage().error("同步失败")
|
||||||
|
// } catch (error) {
|
||||||
|
// useMessage().error("错误")
|
||||||
|
// } finally {
|
||||||
|
// syncLoading.value = false
|
||||||
|
// }
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user