Commit 64ed158a by zhangxw

商户管理-商户上架需求开发

1 parent 997aa49d
...@@ -333,3 +333,39 @@ export function ruleAuditSituation(data) { ...@@ -333,3 +333,39 @@ export function ruleAuditSituation(data) {
data.method = `${path2}ruleAudit.situation` data.method = `${path2}ruleAudit.situation`
return request(data, "post") return request(data, "post")
} }
// 根据流量方查询当前已上架存在的业务类型数据
export function getBusinessTypeByDiversionMerchant(data) {
data.method = `${path2}scenemerchantref.listScene`
return request(data, "post")
}
// 获取数据列表(即账户中心中,嘀加智享车生活下的省代、市代园区店)
export function getContractAffiliationDataList(data) {
data.method = `${path2}shopMerchant.queryMerchantPaymentAccount`
return request(data, "post")
}
// 获取商户关系历史记录
export function getMerchantRelationRecordApi(data) {
data.method = `${path2}shopMerchant.queryMerchantRefDetailHistory`
return request(data, "post")
}
// 新增/编辑商户上架
export function merchantOnShelf(data) {
data.method = `${path2}shopMerchant.addOrUpdateSceneMerchantRefNew`
return request(data, "post")
}
// 获取商户关联关系详情
export function getMerchantRelationDetailApi(data) {
data.method = `${path2}shopMerchant.queryMerchantRefDetail`
return request(data, "post")
}
// 获取4s店和服务商门店数据
export function get4sAndServiceMerchantListApi(data) {
data.method = `${path}merchant.merchantAndService.page`
return request(data, "post")
}
...@@ -850,3 +850,39 @@ export const receiptModeList = [ ...@@ -850,3 +850,39 @@ export const receiptModeList = [
{ confId: 1, confValue: "T+1" }, { confId: 1, confValue: "T+1" },
{ confId: 2, confValue: "D+1" } { confId: 2, confValue: "D+1" }
] ]
// 发票税率
export const invoiceTaxRateList = [
{ confId: 0, confValue: "专票1%" },
{ confId: 1, confValue: "专票3%" },
{ confId: 2, confValue: "专票6%" },
{ confId: 3, confValue: "专票13%" },
{ confId: 4, confValue: "普票1%" },
{ confId: 5, confValue: "普票3%" },
{ confId: 6, confValue: "普票6%" },
{ confId: 7, confValue: "普票13%" },
{ confId: 8, confValue: "不需要开票"}
]
// 合作模式
export const cooperationModeList = [
{ confId: 0, confValue: "单店" },
{ confId: 1, confValue: "集团" }
]
// 收款方式
export const paymentMethodList = [
{ confId: 0, confValue: "嘀加收款" },
{ confId: 1, confValue: "门店收款" }
]
// 服务商分类
export const partnerClassifyList = [
{ confId: 0, confValue: "服务商" },
{ confId: 1, confValue: "直营" }
]
// 子业务
export const subBusinessList = [
{ confId: '0', confValue: "权益" },
{ confId: '1', confValue: "延保" }
]
...@@ -85,14 +85,14 @@ export const routerName = { ...@@ -85,14 +85,14 @@ export const routerName = {
} }
] ]
}, },
{ // {
authId: "9060307", // authId: "9060307",
parentId: "90603", // parentId: "90603",
label: "商户关联", // label: "商户关联",
category: "Button", // category: "Button",
type: "primary", // type: "primary",
handle: "handleMerchantRelate" // handle: "handleMerchantRelate"
}, // },
{ {
authId: "9060308", authId: "9060308",
parentId: "90603", parentId: "90603",
...@@ -144,10 +144,58 @@ export const routerName = { ...@@ -144,10 +144,58 @@ export const routerName = {
parentId: "90603012" parentId: "90603012"
} }
] ]
},
{
authId: "90603014",
parentId: "90603",
label: "商户上架",
category: "Button",
type: "primary",
handle: "handleMerchantGrounding",
addRoutePath: [
{
authId: "90603015",
name: "商户上架",
parentId: "90603"
}
]
},
{
authId: "90603016",
parentId: "90603",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "90603017",
parentId: "90603",
label: "编辑",
handle: "handleEditMerchantGrounding",
addRoutePath: [
{
authId: "90603015",
name: "商户上架",
parentId: "90603"
}
]
} }
], ],
component: _import("systemConfig/merchant/merchantManage") component: _import("systemConfig/merchant/merchantManage")
}, },
90603015: {
path: "/merchantGrounding",
name: "merchantGrounding",
meta: {
title: "商户上架",
authId: "90603015",
parentId: "90603",
cache: false,
activePath: "/merchantManage"
},
component: _import("systemConfig/merchant/merchantGrounding")
},
90604: { 90604: {
path: "/merchantDetail", path: "/merchantDetail",
name: "merchantDetail", name: "merchantDetail",
......
...@@ -458,10 +458,10 @@ export default { ...@@ -458,10 +458,10 @@ export default {
this.initFeeCategoryByType() this.initFeeCategoryByType()
this.getGoodsCategoryConfiguration() this.getGoodsCategoryConfiguration()
this.getLedgerHistoryRecordApi() this.getLedgerHistoryRecordApi()
const { merchantId } = this.routerInfo const { merchantId, scene } = this.routerInfo
// yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList') // yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList')
this.initPlatformLevelList() this.initPlatformLevelList()
merchantId && this.getMerchantLevel(merchantId, "merchantLevelList") merchantId && this.getMerchantLevel(merchantId, "merchantLevelList", scene)
}, },
methods: { methods: {
...mapActions("FinancialRules", ["reset"]), ...mapActions("FinancialRules", ["reset"]),
...@@ -1306,12 +1306,13 @@ export default { ...@@ -1306,12 +1306,13 @@ export default {
] ]
}) })
}, },
getMerchantLevel(id, name) { getMerchantLevel(id, name, scene) {
// console.log(this.merchantInfo) // console.log(this.merchantInfo)
// getPlatformMerchantList().then(res => { // getPlatformMerchantList().then(res => {
getMerchantLevelApi({ getMerchantLevelApi({
merchantId: id, merchantId: id,
channelType: 1 channelType: 1,
scene
}).then((res) => { }).then((res) => {
// console.log('res', res) // console.log('res', res)
// 取消渠道判断 // 取消渠道判断
...@@ -1345,6 +1346,21 @@ export default { ...@@ -1345,6 +1346,21 @@ export default {
}) })
}) })
// 追加一级流量方和流量通道方
if (res.firstFlowMerchantId) {
this.baseData[name].push({
merchantId: res.firstFlowMerchantId,
showMerchantName: res.firstFlowMerchantName,
merchantName: res.firstFlowMerchantName
})
}
if (res.flowChannelMerchantId) {
this.baseData[name].push({
merchantId: res.flowChannelMerchantId,
showMerchantName: res.flowChannelMerchantName,
merchantName: res.flowChannelMerchantName
})
}
// 没有追加默认导流方 // 没有追加默认导流方
if (this.baseData[name].length == 0 && name == "merchantLevelList") { if (this.baseData[name].length == 0 && name == "merchantLevelList") {
const { merchantId, merchantName, userType = 4 } = this.routerInfo const { merchantId, merchantName, userType = 4 } = this.routerInfo
...@@ -1355,8 +1371,16 @@ export default { ...@@ -1355,8 +1371,16 @@ export default {
userType userType
}) })
} }
// 将数据去重 (商户上架时一级流量方和流量通道方设置同一家门店)
this.baseData[name] = this.uniqueMerchant(this.baseData[name])
}) })
}, },
uniqueMerchant(arr) {
const res = new Map()
return arr.filter(
(a) => !res.has(a.merchantId) && res.set(a.merchantId, 1)
)
},
/* 函数定义 */ /* 函数定义 */
/* 活动标签切换时触发 */ /* 活动标签切换时触发 */
beforeLeave(currentName, oldName) { beforeLeave(currentName, oldName) {
......
...@@ -14,50 +14,30 @@ ...@@ -14,50 +14,30 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<!-- <span slot="left">园区店导流方关联列表</span> --> <!-- <span slot="left">园区店导流方关联列表</span> -->
<auth-button category="Button" /> <!-- <auth-button category="Button" /> -->
<auth-button category="Button" :show-btn-ids="['90603014', '90603016']"/>
</d2-table-header> </d2-table-header>
<!-- :get-list-api="getListApi" --> <!-- :get-list-api="getListApi" -->
<d2-table ref="merchantTable" :table-data="restructureList" :search-form="searchForm" :table-params="tableParams" <d2-table ref="merchantTable" :table-data="restructureList" :search-form="searchForm" :table-params="tableParams"
:has-num="false" :table-total="total" :array-span-method="arraySpanMethod" @refreshTable="jumpPage"> :has-num="false" :table-total="total" :array-span-method="arraySpanMethod" @refreshTable="jumpPage">
<el-button type="text" /> <el-button type="text" />
<div slot="auth-button" slot-scope="scope" v-if="!filterEmpty(scope.scope.scene)" class="btnClass"> <div slot="auth-button" slot-scope="scope" v-if="!filterEmpty(scope.scope.scene)" class="btnClass">
<!-- <auth-button slot="auth-button" <!-- 编辑 -->
:data="scope.scope" /> --> <auth-button slot="auth-button" :show-btn-ids="['90603017']" :data="scope.scope" />
<!-- 查看详情 -->
<auth-button slot="auth-button" :show-btn-ids="['9060303']" :data="scope.scope" />
<!-- 财务 --> <!-- 财务 -->
<auth-button slot="auth-button" :show-btn-ids="['9060301']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060301']" :data="scope.scope" />
<!-- 品牌设置 -->
<!-- <auth-button slot="auth-button"
:show-btn-ids="['9060306']"
:data="scope.scope" /> -->
<!-- 历史记录 -->
<auth-button slot="auth-button" :show-btn-ids="['9060304']" :data="scope.scope" />
<!-- 对账 --> <!-- 对账 -->
<auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" />
<!-- 质保卡配置 --> <!-- 查看详情 -->
<!-- <auth-button slot="auth-button" <auth-button slot="auth-button" :show-btn-ids="['9060303']" :data="scope.scope" />
v-if="scope.scope.scene != 3" <!-- 历史记录 -->
:show-btn-ids="['9060309']" <auth-button slot="auth-button" :show-btn-ids="['9060304']" :data="scope.scope" />
:data="scope.scope" /> -->
<!-- 下级商户配置 -->
<!-- <span v-if="scope.scope.scene == 1">
<auth-button slot="auth-button"
:show-btn-ids="['90603010']"
:data="scope.scope" />
</span> -->
<!-- 对账 -->
<!-- <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> -->
<!-- 配置 -->
<!-- <auth-button slot="auth-button"
:show-btn-ids="['90603012']"
:data="scope.scope" /> -->
<!-- 删除 --> <!-- 删除 -->
<auth-button slot="auth-button" :show-btn-ids="['9060305']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060305']" :data="scope.scope" />
</div> </div>
<span slot="newOperate" slot-scope="scope"> <!-- <span slot="newOperate" slot-scope="scope">
<auth-button slot="auth-button" :show-btn-ids="['90603011']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['90603011']" :data="scope.scope" />
</span> </span> -->
</d2-table> </d2-table>
</div> </div>
<relate-store-mer-dialog v-if="relateStoreVisible" ref="relateStore" :relate-store-visible="relateStoreVisible" <relate-store-mer-dialog v-if="relateStoreVisible" ref="relateStore" :relate-store-visible="relateStoreVisible"
...@@ -188,7 +168,7 @@ import { ...@@ -188,7 +168,7 @@ import {
configureCar, configureCar,
deleteShopRef deleteShopRef
} from "@api/merchant" } from "@api/merchant"
import { mapActions } from "vuex" import { mapActions, mapState } from "vuex"
import { getParkStore } from "@api/editCustomer" import { getParkStore } from "@api/editCustomer"
import { import {
BaseData, BaseData,
...@@ -237,7 +217,9 @@ export default { ...@@ -237,7 +217,9 @@ export default {
merchantType: "", merchantType: "",
channelType: "", channelType: "",
keyWord: "", keyWord: "",
merchantId: "" divisionType: "",
merchantId: "",
scene: ""
}, },
page: { page: {
pageSize: 10, pageSize: 10,
...@@ -246,24 +228,6 @@ export default { ...@@ -246,24 +228,6 @@ export default {
total: 0, total: 0,
showFormData: [ showFormData: [
{ {
label: "渠道",
name: "channelType",
type: "select",
optionList: [],
optionId: "value",
optionLabel: "name",
optionsName: "channelTypeList"
},
{
label: "商户分类",
name: "merchantType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "merchantClassifyList"
},
{
label: "商户名称", label: "商户名称",
name: "keyWord", name: "keyWord",
type: "input", type: "input",
...@@ -272,15 +236,6 @@ export default { ...@@ -272,15 +236,6 @@ export default {
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, },
{ {
label: "分账类型",
name: "divisionType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "autoFlagList"
},
{
label: "商户号", label: "商户号",
name: "merchantId", name: "merchantId",
type: "input", type: "input",
...@@ -289,8 +244,27 @@ export default { ...@@ -289,8 +244,27 @@ export default {
isClear: true, isClear: true,
maxlength: "9" maxlength: "9"
// keyFn: this.keyDowmGetList // keyFn: this.keyDowmGetList
}, { },
label: '场景名', {
label: "渠道",
name: "channelType",
type: "select",
optionList: [],
optionId: "value",
optionLabel: "name",
optionsName: "channelTypeList"
},
// {
// label: "商户分类",
// name: "merchantType",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confLabel",
// optionsName: "merchantClassifyList"
// },
{
label: '业务类型',
name: 'scene', name: 'scene',
type: 'select', type: 'select',
isClear: true, isClear: true,
...@@ -298,6 +272,15 @@ export default { ...@@ -298,6 +272,15 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'sceneTypeList' optionsName: 'sceneTypeList'
},
{
label: "分账类型",
name: "divisionType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "autoFlagList"
} }
], ],
getListApi: getList, getListApi: getList,
...@@ -353,7 +336,7 @@ export default { ...@@ -353,7 +336,7 @@ export default {
} }
}, },
{ {
label: "业务场景", label: "业务类型",
prop: "scene", prop: "scene",
formatter: (cellValue) => { formatter: (cellValue) => {
if (this.filterEmpty(cellValue.scene)) return '' if (this.filterEmpty(cellValue.scene)) return ''
...@@ -395,7 +378,7 @@ export default { ...@@ -395,7 +378,7 @@ export default {
if (cellValue.serviceList) { if (cellValue.serviceList) {
return cellValue.serviceList.reduce( return cellValue.serviceList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + `<p>${item.merchantName}</p>` merchString = merchString + `<p>${item?.merchantName}</p>`
return merchString return merchString
// return item.merchantName // return item.merchantName
}, },
...@@ -416,7 +399,7 @@ export default { ...@@ -416,7 +399,7 @@ export default {
if (cellValue.serviceList) { if (cellValue.serviceList) {
return cellValue.serviceList.reduce( return cellValue.serviceList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + `<p>${item.merchantId}</p>` merchString = merchString + `<p>${item?.merchantId}</p>`
return merchString return merchString
// return item.merchantName // return item.merchantName
}, },
...@@ -554,6 +537,11 @@ export default { ...@@ -554,6 +537,11 @@ export default {
qRcodeVisible: false qRcodeVisible: false
} }
}, },
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
...@@ -591,6 +579,7 @@ export default { ...@@ -591,6 +579,7 @@ export default {
methods: { methods: {
...mapActions("d2admin/base", ["get"]), ...mapActions("d2admin/base", ["get"]),
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: "d2admin/page/close" }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
...@@ -682,9 +671,14 @@ export default { ...@@ -682,9 +671,14 @@ export default {
merchantType: "", merchantType: "",
channelType: "", channelType: "",
keyWord: "", keyWord: "",
merchantId: "" divisionType: "",
merchantId: "",
scene: ""
} }
this.getOptionsList() this.getOptionsList()
// 重置分页
this.page.currentPage = 1
this.queryList()
}, },
getOptionsList() { getOptionsList() {
...@@ -786,6 +780,40 @@ export default { ...@@ -786,6 +780,40 @@ export default {
handleSearchStore() { handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1) this.$refs.relateStore.handleCurrentChange(1)
}, },
// 商户上架
handleMerchantGrounding() {
this.$router.push({
name: 'merchantGrounding',
query: {
addOrEdit: 'add'
}
})
},
// 导出
handleExport() {
var params = this.searchForm
params.method = 'dj.api.servicemerchantref.exportMerchantRef.Async'
const list = [
...this.dowloadList,
{
name: '商户管理列表',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 编辑
handleEditMerchantGrounding(row) {
this.$router.push({
name: 'merchantGrounding',
query: {
addOrEdit: 'edit',
params: JSON.stringify(row)
}
})
},
// 查看详情 // 查看详情
handleViewClose() { handleViewClose() {
this.viewDetailVisible = !this.viewDetailVisible this.viewDetailVisible = !this.viewDetailVisible
......
...@@ -1085,7 +1085,8 @@ export default { ...@@ -1085,7 +1085,8 @@ export default {
} else { } else {
const params = { const params = {
merchantId: this.merchantRow.merchantId, merchantId: this.merchantRow.merchantId,
channelType: 1 channelType: 1,
scene: this.merchantRow.scene
} }
const res = await getMerchantLevelListApi(params) const res = await getMerchantLevelListApi(params)
if (res) { if (res) {
......
<template>
<div class="text-tooltip">
<el-tooltip class="item" effect="dark" :disabled="isShowTooltip" :content="content" :placement="placement">
<p class="over-flow" :class="className" @mouseover="onMouseOver(refName)">
<span :ref="refName">{{content||'-'}}</span>
</p>
</el-tooltip>
</div>
</template>
<script>
export default {
name: 'textTooltip',
props: {
// 显示的文字内容
content: {
type: String,
default: () => {
return ''
}
},
// 位置
placement: {
type: String,
default: () => {
return 'top'
}
},
// 外层框的样式,在传入的这个类名中设置文字显示的宽度
className: {
type: String,
default: () => {
return 'text-hide'
}
},
// 为页面文字标识(如在同一页面中调用多次组件,此参数不可重复)
refName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
isShowTooltip: true
}
},
methods: {
onMouseOver(str) {
let parentWidth = this.$refs[str]?.parentNode?.offsetWidth;
let contentWidth = this.$refs[str]?.offsetWidth;
// 若子集比中间层更宽 开启tooltip功能
if (contentWidth>parentWidth) {
this.isShowTooltip = false;
} else { // 否则 关掉tooltip功能
this.isShowTooltip = true;
}
}
}
}
</script>
<style lang="scss" scoped>
.text-tooltip{
display: flex;
align-items: center;
width: 100%;
}
.over-flow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
p{
margin: 0;
}
.text-hide{
width: 100%;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="merchant-checkdetail"> <div class="merchant-checkdetail">
<div class="title"> <div class="title">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商户关系" name="third"></el-tab-pane>
<el-tab-pane label="分账规则" name="first"></el-tab-pane> <el-tab-pane label="分账规则" name="first"></el-tab-pane>
<el-tab-pane label="对账规则" name="second"></el-tab-pane> <el-tab-pane label="对账规则" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -12,6 +13,11 @@ ...@@ -12,6 +13,11 @@
<div class="btn" :class="{act:activeType==2}" @click="handleType(2)">特殊品类</div> <div class="btn" :class="{act:activeType==2}" @click="handleType(2)">特殊品类</div>
</div> --> </div> -->
<!-- 商户关系 -->
<template v-if="activeName == 'third'">
<merchantRelationships :form-item="checkDetailItem" />
</template>
<!-- 分账 --> <!-- 分账 -->
<template v-if="activeName == 'first'"> <template v-if="activeName == 'first'">
<ledgerAccount :items="checkDetailItem" /> <ledgerAccount :items="checkDetailItem" />
...@@ -37,16 +43,18 @@ ...@@ -37,16 +43,18 @@
<script> <script>
import ledgerAccount from './components/ledgerAccount.vue' import ledgerAccount from './components/ledgerAccount.vue'
import reconciliation from './components/reconciliation.vue' import reconciliation from './components/reconciliation.vue'
import merchantRelationships from './components/merchantRelationships.vue'
import { import {
getDistributeRuleApi, getDistributeRuleApi,
getEffectRuleApi getEffectRuleApi,
getMerchantRelationDetailApi
} from "@api/merchant" } from "@api/merchant"
export default { export default {
name: "MerchantCheckDetail", name: "MerchantCheckDetail",
props: {}, props: {},
data() { data() {
return { return {
activeName: "first", activeName: "third",
merchantRow: {}, merchantRow: {},
// 分账数据 // 分账数据
checkDetailItem: {}, checkDetailItem: {},
...@@ -59,16 +67,21 @@ export default { ...@@ -59,16 +67,21 @@ export default {
}, },
mounted() { mounted() {
// 分账 // 分账
this.getDistributeRule() // this.getDistributeRule()
// 商户关系
this.getMerchantRelationDetail()
}, },
methods: { methods: {
async init() { async init() {
if (this.activeName == "first") { if (this.activeName == "first") {
// 分账 // 分账
this.getDistributeRule() this.getDistributeRule()
} else { } else if (this.activeName == "second") {
// 对账 // 对账
this.getEffectRule() this.getEffectRule()
} else {
// 商户关系
this.getMerchantRelationDetail()
} }
}, },
// 分账 // 分账
...@@ -94,6 +107,15 @@ export default { ...@@ -94,6 +107,15 @@ export default {
// this.checkRecordList = res?.goodsTypeGroupReconciliationRules // this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// console.log('res: ', res) // console.log('res: ', res)
}, },
// 商户关系
async getMerchantRelationDetail() {
const params = {
merchantId: this.merchantRow.merchantId,
scene: this.merchantRow.scene
}
const res = await getMerchantRelationDetailApi(params)
this.checkDetailItem = res
},
getRowItem() { getRowItem() {
const params = this.$route.query?.params const params = this.$route.query?.params
if (params) { if (params) {
...@@ -121,7 +143,8 @@ export default { ...@@ -121,7 +143,8 @@ export default {
}, },
components: { components: {
ledgerAccount, ledgerAccount,
reconciliation reconciliation,
merchantRelationships
}, },
computed: {} computed: {}
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="merchant-checkrecord"> <div class="merchant-checkrecord">
<div class="title"> <div class="title">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商户关系" name="third"></el-tab-pane>
<el-tab-pane label="分账规则" name="first"></el-tab-pane> <el-tab-pane label="分账规则" name="first"></el-tab-pane>
<el-tab-pane label="对账规则" name="second"></el-tab-pane> <el-tab-pane label="对账规则" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
<div v-for="(formItem, index) in formArray " :ref="'resize' + index" :key="index"> <div v-for="(formItem, index) in formArray " :ref="'resize' + index" :key="index">
<p class="edit-sub-title" :class="{ 'sub-border': !formItem.show }"> <p class="edit-sub-title" :class="{ 'sub-border': !formItem.show }">
<span class="label"> <span class="label">
<template v-if="activeName != 'third'">
<span v-if="formItem.enableFlag != 2"> <span v-if="formItem.enableFlag != 2">
<span>{{ formItem.formatEffectStartDate }}</span> <span>{{ formItem.formatEffectStartDate }}</span>
<span v-if="formItem.formatEffectStartDate"> - </span> <span v-if="formItem.formatEffectStartDate"> - </span>
...@@ -24,15 +26,21 @@ ...@@ -24,15 +26,21 @@
<span v-if="formItem.enableFlag == 2"> <span v-if="formItem.enableFlag == 2">
<span>{{ formItem.formatEffectStartDate }}</span> <span>{{ formItem.formatEffectStartDate }}</span>
<span> - </span> <span> - </span>
<span :class="{ 'labelColorEff': !formItem.formatEffectEndDate }">{{ "待生效" <span :class="{ 'labelColorEff': !formItem.formatEffectEndDate }">{{ "待生效"}}</span>
}}</span>
</span> </span>
</template>
<!-- 商户关系 -->
<template v-else>
<span>{{ formItem.formatEffectStartDate }}</span>
<span> - </span>
<span :class="{ 'labelColor': !formItem.applyEndTime }">{{ formItem.applyEndTime ? formItem.formatEffectEndDate : "生效中"}}</span>
</template>
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo">
操作人: {{ formItem.updatedBy }} &nbsp; &nbsp; 操作时间: 操作人: {{ formItem.updatedBy }} &nbsp; &nbsp; 操作时间:
{{ formItem.formatUpdatedDate }} {{ formItem.formatUpdatedDate }}
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo" v-if="activeName != 'third'">
<span> <span>
审核人: {{ formItem.auditorName || '-' }} &nbsp; &nbsp; 审核时间: 审核人: {{ formItem.auditorName || '-' }} &nbsp; &nbsp; 审核时间:
{{ formItem.formatAuditDate || '-' }} {{ formItem.formatAuditDate || '-' }}
...@@ -58,6 +66,11 @@ ...@@ -58,6 +66,11 @@
<template v-if="activeName == 'second'"> <template v-if="activeName == 'second'">
<reconciliation :form-item="formItem" :items="formItem.typeList" /> <reconciliation :form-item="formItem" :items="formItem.typeList" />
</template> </template>
<!-- 商户关系 -->
<template v-if="activeName == 'third'">
<merchantRelationships :form-item="formItem" />
</template>
</div> </div>
</el-collapse-transition> </el-collapse-transition>
</div> </div>
...@@ -66,7 +79,8 @@ ...@@ -66,7 +79,8 @@
<div v-else class="nothingtips"> <div v-else class="nothingtips">
<img style="height: 109px; width: 109px" src="../images/empty.png" /> <img style="height: 109px; width: 109px" src="../images/empty.png" />
<p class="title" v-if="activeName == 'first'">暂无财务规则</p> <p class="title" v-if="activeName == 'first'">暂无财务规则</p>
<p class="title" v-else>暂无对账规则</p> <p class="title" v-if="activeName == 'second'">暂无对账规则</p>
<p class="title" v-if="activeName == 'third'">暂无商户关系</p>
<p class="tips">快去设置看看~</p> <p class="tips">快去设置看看~</p>
</div> </div>
...@@ -80,9 +94,11 @@ import dayjs from "dayjs" ...@@ -80,9 +94,11 @@ import dayjs from "dayjs"
import { getHistoryRecord } from "@api/publicAccount" import { getHistoryRecord } from "@api/publicAccount"
import ledgerAccount from "./components/ledgerAccount.vue" import ledgerAccount from "./components/ledgerAccount.vue"
import reconciliation from "./components/reconciliation.vue" import reconciliation from "./components/reconciliation.vue"
import merchantRelationships from "./components/merchantRelationships.vue"
import { import {
getLedgerHistoryRecordApi, getLedgerHistoryRecordApi,
getReconciliationHistoryRecordApi getReconciliationHistoryRecordApi,
getMerchantRelationRecordApi
} from "@api/merchant" } from "@api/merchant"
export default { export default {
name: "MerchantCheckRecord", name: "MerchantCheckRecord",
...@@ -98,7 +114,7 @@ export default { ...@@ -98,7 +114,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: "first", activeName: "third",
activeType: 1, activeType: 1,
merchantRow: {}, merchantRow: {},
formArray: [] formArray: []
...@@ -109,7 +125,7 @@ export default { ...@@ -109,7 +125,7 @@ export default {
}, },
mounted() { mounted() {
// this.getDetail() // this.getDetail()
this.getLedgerHistoryRecord() this.getMerchantRelationRecord()
}, },
methods: { methods: {
getRowItem() { getRowItem() {
...@@ -121,6 +137,7 @@ export default { ...@@ -121,6 +137,7 @@ export default {
}, },
handleClick(tab) { handleClick(tab) {
this.activeName = tab.name this.activeName = tab.name
this.formArray = []
this.init() this.init()
}, },
// handleType(num) { // handleType(num) {
...@@ -139,8 +156,10 @@ export default { ...@@ -139,8 +156,10 @@ export default {
init() { init() {
if (this.activeName == "first") { if (this.activeName == "first") {
this.getLedgerHistoryRecord() this.getLedgerHistoryRecord()
} else { } else if (this.activeName == "second") {
this.getReconciliationHistoryRecord() this.getReconciliationHistoryRecord()
} else {
this.getMerchantRelationRecord()
} }
}, },
// 分账 // 分账
...@@ -220,11 +239,34 @@ export default { ...@@ -220,11 +239,34 @@ export default {
} else { } else {
this.formArray = [] this.formArray = []
} }
},
// 商户关系
async getMerchantRelationRecord() {
const merchantId = this.merchantRow.merchantId
const scene = this.merchantRow.scene
const params = {
merchantId,
scene
}
const res = await getMerchantRelationRecordApi(params)
if (res.length != 0) {
const format = "YYYY/MM/DD HH:mm"
this.formArray = res.map((item) => {
item.formatEffectEndDate = item.applyEndTime ? dayjs(item.applyEndTime).format(format) : ""
item.formatEffectStartDate = item.applyStartTime ? dayjs(item.applyStartTime).format(format) : ""
item.formatUpdatedDate = dayjs(item.operateDate).format(format)
item.show = false
return item
})
} else {
this.formArray = []
}
} }
}, },
components: { components: {
ledgerAccount, ledgerAccount,
reconciliation reconciliation,
merchantRelationships
}, },
computed: {} computed: {}
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!