Commit a11e4ded by 张立顺

feat 嘀加上架功能开发

1 parent 9fae8594
<!-- 2 - 分账金额设置 --> <!-- 2 - 分账金额设置 -->
<template> <template>
<div class="division-rule"> <div class="division-rule">
<el-form <el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
class="formSty"
ref="divisionRuleRef"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px"
>
<el-form-item label="" label-width="54px"> <el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block"> <table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader"> <tr class="tableHeader">
...@@ -20,33 +13,19 @@ ...@@ -20,33 +13,19 @@
</tr> </tr>
<tr> <tr>
<td class="merchantNameTd p-b-20"> <td class="merchantNameTd p-b-20">
<p <p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
:title="item | filterMerchantType"
v-for="(item, index) in tableSelectOptions"
:key="index"
>
{{ item | filterMerchantType }} {{ item | filterMerchantType }}
</p> </p>
</td> </td>
<td <td class="p-b-20" v-for="(item, index) in radioList" :key="index + 'radioList'">
class="p-b-20"
v-for="(item, index) in radioList"
:key="index + 'radioList'"
>
<div class="line-td is-required el-form-item--medium wrap"> <div class="line-td is-required el-form-item--medium wrap">
<p <p v-for="(el, index) in tableSelectOptions" :key="index" class="el-radio-group">
v-for="(el, index) in tableSelectOptions" <span :class="[
:key="index"
class="el-radio-group"
>
<span
:class="[
'el-radio__input', 'el-radio__input',
form['id' + item.expenseCategoryId] == el.merchantId form['id' + item.expenseCategoryId] == el.merchantId
? 'is-checked' ? 'is-checked'
: '' : ''
]" ]">
>
<span class="el-radio__inner"></span> <span class="el-radio__inner"></span>
</span> </span>
</p> </p>
...@@ -67,7 +46,7 @@ export default { ...@@ -67,7 +46,7 @@ export default {
// 列选项 // 列选项
classificationObjSelect: { classificationObjSelect: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
merchantDistributionRules: { merchantDistributionRules: {
type: Array, type: Array,
...@@ -183,13 +162,13 @@ export default { ...@@ -183,13 +162,13 @@ export default {
// immediate: true // immediate: true
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
initList() { initList() {
// console.log('initList') console.log('initList')
// this.merchantDistributionRules
// console.log(this.merchantDistributionRules) // console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect const obj = this.classificationObjSelect
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1)
const form = {} const form = {}
console.log("obj", obj) console.log("obj", obj)
for (const key in obj) { for (const key in obj) {
...@@ -207,7 +186,10 @@ export default { ...@@ -207,7 +186,10 @@ export default {
// console.log(name) // console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId }) // const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex') // console.log(optIndex, 'optIndex')
form[name] = parseInt(findObj?.merchantId) || "" // 兼容多商户的id 处理
console.log(findObj, tableSelectOptionsId)
console.log(findObj.targetMerchantType == 3 && tableSelectOptionsId)
form[name] = parseInt(findObj.targetMerchantType == 3 && tableSelectOptionsId ? findObj?.targetMerchantLevel : findObj?.merchantId) || ""
}) })
} }
// 判断id是否有在选项里面 没有就去掉 // 判断id是否有在选项里面 没有就去掉
...@@ -241,7 +223,8 @@ export default { ...@@ -241,7 +223,8 @@ export default {
const id = this.form["id" + next.expenseCategoryId] const id = this.form["id" + next.expenseCategoryId]
// console.log(id) // console.log(id)
const merchantObj = this.tableSelectOptions.find( const merchantObj = this.tableSelectOptions.find(
(item) => item.merchantId == id // (item) => item.merchantId == id
(item) => (item.merchantId == id) || item.targetMerchantLevel == id
) )
// console.log(merchantObj, 'merchantObj') // console.log(merchantObj, 'merchantObj')
next = { next = {
...@@ -269,7 +252,7 @@ export default { ...@@ -269,7 +252,7 @@ export default {
const id = this.form["id" + next.expenseCategoryId] const id = this.form["id" + next.expenseCategoryId]
// console.log(id) // console.log(id)
const merchantObj = this.tableSelectOptions.find( const merchantObj = this.tableSelectOptions.find(
(item) => item.merchantId == id (item) => (item.merchantId == id) || item.targetMerchantLevel == id
) )
// console.log(merchantObj, 'merchantObj') // console.log(merchantObj, 'merchantObj')
next = { next = {
...@@ -277,25 +260,13 @@ export default { ...@@ -277,25 +260,13 @@ export default {
expenseCategoryId: next.expenseCategoryId, expenseCategoryId: next.expenseCategoryId,
...merchantObj ...merchantObj
} }
// console.log(next, 'next') console.log(next, 'next')
// const name = 'id' + next.id // const name = 'id' + next.id
// prev[name] = this.form[name] // prev[name] = this.form[name]
prev.push(next) prev.push(next)
return prev return prev
}, []) }, [])
return merchantDistributionRules return merchantDistributionRules
// console.log(this.merchantInfo)
// return new Promise((resolve, reject) => {
// this.$refs.divisionRuleRef.validate(valid => {
// if (valid) {
// // this.form
// } else {
// resolve(false)
// }
// })
// }
// )
} }
} }
} }
...@@ -356,13 +327,15 @@ export default { ...@@ -356,13 +327,15 @@ export default {
.p-b-20 { .p-b-20 {
padding-bottom: 26px !important; padding-bottom: 26px !important;
} }
.line-td { .line-td {
display: flex; display: flex;
align-items: center; align-items: center;
justify-items: center; justify-items: center;
flex-direction: column; flex-direction: column;
.el-radio-group{
flex:1; .el-radio-group {
flex: 1;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
} }
......
<template>
<div class="edit-page shop-merchant-info">
<div class="title">
<span>流量方信息</span>
</div>
<div class="content">
<el-tabs v-model="tabsValue" type="card" :before-leave="beforeLeave" class="my-tab-pane">
<el-tab-pane v-for="(item) in tabsList" :key="item.tabIndex" :name="item.tabIndex + ''">
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title }}
</span>
<span>
<!-- <shop-merchant-info :merchantInfo="merchantInfo"></shop-merchant-info> -->
<shop-merchant-info :merchantInfo="merchantsList[item.tabIndex]" :ref="`shopMerchant${item.tabIndex}`"
:key="item.tabIndex" :edit-data-obj="merchantsList[item.tabIndex]"></shop-merchant-info>
</span>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import ShopMerchantInfo from "./ShopMerchantInfo"
import { deepClone } from "@/common/util"
export default {
name: "EditMultilateralContract",
components: {
ShopMerchantInfo
},
props: {
merchantsList: {
type: Array,
default: () => { }
}
},
watch: {
merchantsList(val) {
this.tabsList = val.map((item, idx) => {
return {
title: item.merchantName,
tabIndex: idx
}
})
}
},
data() {
return {
tabsValue: 0,
tabsList: []
}
},
mounted() { },
methods: {
getAllParams() {
const list = deepClone(this.tabsList)
const merchants = []
// 需要使用for循环解决异步同步问题
for (var index = 0; index < list.length; index++) {
// const element = array[index];
const node = this.$refs[`shopMerchant${list[index].tabIndex}`][0]
const res = node.getParams()
merchants.push(res)
}
return merchants
// })
},
submit() {
return new Promise(async (resolve, reject) => {
let flag = true
const list = deepClone(this.tabsList)
// 需要使用for循环解决异步同步问题
for (var index = 0; index < list.length; index++) {
// const element = array[index];
const node = this.$refs[`shopMerchant${list[index].tabIndex}`][0]
const res = await node.submit()
flag = flag && res
}
this.$forceUpdate()
resolve(flag)
})
},
/* 活动标签切换时触发 */
beforeLeave(currentName, oldName) {
// console.log("currentName", currentName)
// 通过tab标签的切换事件触发增加的函数
this.currentIndex = currentName
}
}
}
</script>
<style scoped lang="scss">
@import "../../style/editdetailCon.scss";
.shop-merchant-info {
.add-mer-btn {
margin-left: 12px;
}
}
.content {
box-sizing: border-box;
margin: 20px 20px 0 20px;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -95,7 +95,7 @@ import { queryFeeCategoryByType } from "@/api/sys.base.js" ...@@ -95,7 +95,7 @@ import { queryFeeCategoryByType } from "@/api/sys.base.js"
import classificationCpt from "./components/classificationCpt.vue" import classificationCpt from "./components/classificationCpt.vue"
import { merchantPackageGoodsInfoPage } from "@api/grounding" import { merchantPackageGoodsInfoPage } from "@api/grounding"
export default { export default {
name: "FinancialRules", name: "DivisionConfig",
components: { components: {
classificationCpt classificationCpt
}, },
...@@ -446,10 +446,10 @@ export default { ...@@ -446,10 +446,10 @@ export default {
result?.merchantSettleDistributeRule.goodsTypeGroupRules result?.merchantSettleDistributeRule.goodsTypeGroupRules
const createBusinessApproveMerchant = const createBusinessApproveMerchant =
result?.createBusinessApproveMerchant result?.createBusinessApproveMerchant
console.log( // console.log(
createBusinessApproveMerchant, // createBusinessApproveMerchant,
"createBusinessApproveMerchant" // "createBusinessApproveMerchant"
) // )
result = result?.merchantSettleDistributeRule || this.financialObj result = result?.merchantSettleDistributeRule || this.financialObj
result.autoFlag = result.autoFlag ? result.autoFlag : "N" result.autoFlag = result.autoFlag ? result.autoFlag : "N"
result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1 result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1
......
...@@ -3,70 +3,32 @@ ...@@ -3,70 +3,32 @@
<div class="edit-page finance-config"> <div class="edit-page finance-config">
<div class="title"> <div class="title">
<span>对账配置</span> <span>对账配置</span>
<el-button <el-button icon="el-icon-plus" type="primary" size="small" plain v-if="addVisible" @click="addTab">新增</el-button>
icon="el-icon-plus"
type="primary"
size="small"
plain
v-if="addVisible"
@click="addTab"
>新增</el-button
>
</div> </div>
<div style="padding: 20px"> <div style="padding: 20px">
<div class="check-tab"> <div class="check-tab">
<!-- @tab-click="clickTab" --> <!-- @tab-click="clickTab" -->
<el-tabs <el-tabs v-model="editableTabsValue" type="card" @tab-remove="confirmRemove" :before-leave="beforeLeave"
v-model="editableTabsValue" class="my-tab-pane">
type="card" <el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name"
@tab-remove="confirmRemove" :closable="idx != 0">
:before-leave="beforeLeave" <span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title
class="my-tab-pane" }}
>
<el-tab-pane
v-for="(item, idx) in editableTabs"
:key="item.name"
:label="item.title"
:name="item.name"
:closable="idx != 0"
>
<span slot="label"
><i
class="el-icon-warning car-error-txt"
v-if="item.valiadError == 'Y'"
/>{{ item.title }}
</span> </span>
<div class="classificationCptContainer"> <div class="classificationCptContainer">
<classificationCpt <classificationCpt :goods-list="goodsTypeGroupRelations" :ref="`classification${item.name}`"
:goods-list="goodsTypeGroupRelations" :router-info="routerInfo" :goods-type-group-reconciliation-rules="goodsTypeGroupReconciliationRules
:ref="`classification${item.name}`" " :goods-select-list="goodsSelectList" :query-fee-category-by-type-flow="queryFeeCategoryByTypeFlow"
:router-info="routerInfo" :query-fee-category-by-type-serve="queryFeeCategoryByTypeServe" :query-fee-category-by-type-platform="queryFeeCategoryByTypePlatformFilter
:goods-type-group-reconciliation-rules=" " :tabindex="idx" :key="idx" @assignGoodsTypeList="assignGoodsTypeList"
goodsTypeGroupReconciliationRules @deleteGoodsTypeItem="deleteGoodsTypeItem" :upgrade-goods-list="upgradeGoodsList"
" @deleteUpgradeGoodsItem="deleteUpgradeGoodsItem" @assignUpgradeGoodsList="assignUpgradeGoodsList"
:goods-select-list="goodsSelectList" :select-upgrade-goods-list="selectUpgradeGoodsList" :package-goods-list="packageGoodsList"
:query-fee-category-by-type-flow="queryFeeCategoryByTypeFlow" @assignPackageGoodsList="assignPackageGoodsList" :select-package-goods-list="selectPackageGoodsList"
:query-fee-category-by-type-serve="queryFeeCategoryByTypeServe"
:query-fee-category-by-type-platform="
queryFeeCategoryByTypePlatformFilter
"
:tabindex="idx"
:key="idx"
@assignGoodsTypeList="assignGoodsTypeList"
@deleteGoodsTypeItem="deleteGoodsTypeItem"
:upgrade-goods-list="upgradeGoodsList"
@deleteUpgradeGoodsItem="deleteUpgradeGoodsItem"
@assignUpgradeGoodsList="assignUpgradeGoodsList"
:select-upgrade-goods-list="selectUpgradeGoodsList"
:package-goods-list="packageGoodsList"
@assignPackageGoodsList="assignPackageGoodsList"
:select-package-goods-list="selectPackageGoodsList"
@deletePackageGoodsItem="deletePackageGoodsItem" @deletePackageGoodsItem="deletePackageGoodsItem"
@deleteSelectUpgradeGoodsList="deleteSelectUpgradeGoodsList" @deleteSelectUpgradeGoodsList="deleteSelectUpgradeGoodsList"
@deleteSelectPackageGoodsList="deleteSelectPackageGoodsList" @deleteSelectPackageGoodsList="deleteSelectPackageGoodsList"
@deleteSelectGoodsTypeList="deleteSelectGoodsTypeList" @deleteSelectGoodsTypeList="deleteSelectGoodsTypeList" :ruleInfo="ruleInfo" />
:ruleInfo="ruleInfo"
/>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -84,7 +46,7 @@ import { getQueryFeeCategoryByTypeApi } from "@api/merchant" ...@@ -84,7 +46,7 @@ import { getQueryFeeCategoryByTypeApi } from "@api/merchant"
import classificationCpt from "./components/classificationCptCheck.vue" import classificationCpt from "./components/classificationCptCheck.vue"
import { getAllGoodsList, merchantPackageGoodsInfoPage } from "@api/grounding" import { getAllGoodsList, merchantPackageGoodsInfoPage } from "@api/grounding"
export default { export default {
name: "MerchantCheck", name: "FinanceConfig",
props: {}, props: {},
components: { components: {
classificationCpt classificationCpt
...@@ -129,7 +91,8 @@ export default { ...@@ -129,7 +91,8 @@ export default {
merchantSettleDistributeRuleLastRuleInfo: merchantSettleDistributeRuleLastRuleInfo:
"merchantSettleDistributeRuleLastRuleInfo", "merchantSettleDistributeRuleLastRuleInfo",
operationModeForm: "operationMode", operationModeForm: "operationMode",
shelfUpdateMerchant: "shelfUpdateMerchant" shelfUpdateMerchant: "shelfUpdateMerchant",
packageNoticeList: "packageNoticeList",
}), }),
routerInfo() { routerInfo() {
return this.$route.query ? this.$route.query : "" return this.$route.query ? this.$route.query : ""
...@@ -162,6 +125,12 @@ export default { ...@@ -162,6 +125,12 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
}, },
packageNoticeList: {
handler(val) {
console.log(val, "packageNoticeList")
this.getSelectingListPackage([], val)
}
},
operationModeForm: { operationModeForm: {
handler(val) { handler(val) {
console.log(val, "operationMode") console.log(val, "operationMode")
...@@ -185,14 +154,6 @@ export default { ...@@ -185,14 +154,6 @@ export default {
this.getQueryFeeCategoryByType() // 获取费用类别 this.getQueryFeeCategoryByType() // 获取费用类别
}, },
mounted() { mounted() {
// this.$EventBus.$on("shelfUpdatMerchantId", (obj) => {
// if (this.ruleInfo?.createBusinessApproveMerchant) {
// this.ruleInfo.createBusinessApproveMerchant.merchantId = obj.merchantId
// this.ruleInfo.createBusinessApproveMerchant.merchantName =
// obj.merchantName
// this.getSelectingListPackage()
// }
// })
this.getGoodsCategoryConfigurationData() this.getGoodsCategoryConfigurationData()
setTimeout(() => { setTimeout(() => {
this.getEffectRule() // 获取对账规则 this.getEffectRule() // 获取对账规则
...@@ -336,20 +297,20 @@ export default { ...@@ -336,20 +297,20 @@ export default {
}) })
// console.log(packageArr, "packageArr") // console.log(packageArr, "packageArr")
this.packageGoodsList = this.uniquePackage(packageArr) this.packageGoodsList = this.uniquePackage(packageArr)
this.ruleInfo?.createBusinessApproveMerchant && // this.ruleInfo?.createBusinessApproveMerchant &&
merchantPackageGoodsInfoPage({ merchantPackageGoodsInfoPage({
// goodsNameKeyword: this.goodsNameKeyword, // goodsNameKeyword: this.goodsNameKeyword,
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
status: 1, status: 1,
sceneType: 0, // 固定查权益类的 sceneType: 0, // 固定查权益类的
// merchantIdList: [this.routerInfo.merchantId]
merchantIdList: [ merchantIdList: [
this.ruleInfo.createBusinessApproveMerchant.merchantId this.merchantSettleDistributeRuleLastRuleInfo.merchantSettleDistributeRule.realityShopMerchantId
] ]
}) })
.then((res) => { .then((res) => {
// this.allPages = res.pages // this.allPages = res.pages
console.log(res, 'merchantPackageGoodsInfoPage')
const resArr = [] const resArr = []
res.list && res.list &&
res.list.forEach((val) => { res.list.forEach((val) => {
...@@ -363,7 +324,7 @@ export default { ...@@ -363,7 +324,7 @@ export default {
if (defaultSelect?.length) arr = arr.concat(defaultSelect) if (defaultSelect?.length) arr = arr.concat(defaultSelect)
this.packageGoodsList = this.uniquePackage(arr) this.packageGoodsList = this.uniquePackage(arr)
}) })
.catch(() => {}) .catch(() => { })
}, },
uniquePackage(arr) { uniquePackage(arr) {
...@@ -621,9 +582,12 @@ export default { ...@@ -621,9 +582,12 @@ export default {
// if (!params.id) return false // if (!params.id) return false
// const res = await merchantSettleDistributeRuleLastRule(params) // const res = await merchantSettleDistributeRuleLastRule(params)
const res = deepClone(this.merchantSettleDistributeRuleLastRuleInfo) const res = deepClone(this.merchantSettleDistributeRuleLastRuleInfo)
// 所有按具体商品已选中的商品数据
const upgradeArr = []
const packageArr = []
console.log(res, "getEffectRule") console.log(res, "getEffectRule")
if (res) { if (res) {
this.operationMode = res.createBusinessApproveMerchant.operationMode this.operationMode = res?.createBusinessApproveMerchantList[0].operationMode || 0
// debugger // debugger
this.ruleInfo = res this.ruleInfo = res
const typeList = const typeList =
...@@ -632,9 +596,7 @@ export default { ...@@ -632,9 +596,7 @@ export default {
this.goodsTypeGroupReconciliationRules = this.goodsTypeGroupReconciliationRules =
res?.merchantReconciliationRule.goodsTypeGroupReconciliationRules res?.merchantReconciliationRule.goodsTypeGroupReconciliationRules
this.formObj = res.merchantReconciliationRule this.formObj = res.merchantReconciliationRule
// 所有按具体商品已选中的商品数据
const upgradeArr = []
const packageArr = []
const hasAllGoodsType = this.goodsTypeGroupReconciliationRules.find( const hasAllGoodsType = this.goodsTypeGroupReconciliationRules.find(
(item) => item.groupType == 1 (item) => item.groupType == 1
) )
...@@ -697,12 +659,9 @@ export default { ...@@ -697,12 +659,9 @@ export default {
this.goodsTypeGroupReconciliationRules[index].upgradeGoods = [] this.goodsTypeGroupReconciliationRules[index].upgradeGoods = []
} }
}) })
}
this.getSelectingList(upgradeArr) this.getSelectingList(upgradeArr)
this.getSelectingListPackage(packageArr) this.getSelectingListPackage(packageArr)
} else {
this.getSelectingList()
this.getSelectingListPackage()
}
}, },
checkParamsType(array) { checkParamsType(array) {
const flag = array.every((item) => item) const flag = array.every((item) => item)
......
...@@ -3,64 +3,27 @@ ...@@ -3,64 +3,27 @@
<div class="edit-page goods-info"> <div class="edit-page goods-info">
<div class="title"> <div class="title">
<span>上架商品及测算</span> <span>上架商品及测算</span>
<span class="addBtnSpan" <span class="addBtnSpan"><el-button icon="el-icon-plus" type="primary" size="small" plain
><el-button @click="addPop">新增</el-button></span>
icon="el-icon-plus"
type="primary"
size="small"
plain
@click="addPop"
>新增</el-button
></span
>
</div> </div>
<div class="check-tab"> <div class="check-tab">
<el-tabs <el-tabs v-model="tabsValue" type="card" @tab-remove="confirmRemove" :before-leave="beforeLeave"
v-model="tabsValue" class="my-tab-pane">
type="card" <el-tab-pane v-for="(item, idx) in goodTabs" :key="item.name" :name="item.name" closable>
@tab-remove="confirmRemove" <span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title ?
:before-leave="beforeLeave" item.title + (idx + 1) : item.goodsName }}
class="my-tab-pane"
>
<el-tab-pane
v-for="(item, idx) in goodTabs"
:key="item.name"
:name="item.name"
closable
>
<span slot="label"
><i
class="el-icon-warning car-error-txt"
v-if="item.valiadError == 'Y'"
/>{{ item.title ? item.title + (idx + 1) : item.goodsName }}
</span> </span>
<span> <span>
<good-tab <good-tab :info="item.info" :ref="'goodTabRef' + idx" :tab-idx="item.tabIndex" />
:info="item.info"
:ref="'goodTabRef' + idx"
:tab-idx="item.tabIndex"
/>
</span> </span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane v-for="(item, idx) in packageTabs" :key="item.name" :name="item.name" closable>
v-for="(item, idx) in packageTabs" <span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title ?
:key="item.name" item.title + (idx + 1) : item.goodsName }}
:name="item.name"
closable
>
<span slot="label"
><i
class="el-icon-warning car-error-txt"
v-if="item.valiadError == 'Y'"
/>{{ item.title ? item.title + (idx + 1) : item.goodsName }}
</span> </span>
<span> <span>
<package-tab <package-tab :info="item.info" :ref="'packageTabRef' + idx" :tab-idx="item.tabIndex"
:info="item.info" @packageEditInfo="getPackageEditInfo_notice" />
:ref="'packageTabRef' + idx"
:tab-idx="item.tabIndex"
@packageEditInfo="getPackageEditInfo_notice"
/>
</span> </span>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane key="add" <!-- <el-tab-pane key="add"
...@@ -74,22 +37,10 @@ ...@@ -74,22 +37,10 @@
<!-- <div style="padding: 20px;"> <!-- <div style="padding: 20px;">
<div>啦啦啦</div> <div>啦啦啦</div>
</div> --> </div> -->
<d2-dialog <d2-dialog title="选择商品或套餐" v-if="chooseVisible" :is-visible="chooseVisible" @closeDialog="handleSignClose"
title="选择商品或套餐" @confirmDialog="handleConfirmSign">
v-if="chooseVisible" <glsx-combi-form :is-block="true" class="edit-form-container" ref="editFormRef" label-width="220px"
:is-visible="chooseVisible" default-width="400px" :form-obj="integralForm" :form-data="integralFormData">
@closeDialog="handleSignClose"
@confirmDialog="handleConfirmSign"
>
<glsx-combi-form
:is-block="true"
class="edit-form-container"
ref="editFormRef"
label-width="220px"
default-width="400px"
:form-obj="integralForm"
:form-data="integralFormData"
>
</glsx-combi-form> </glsx-combi-form>
</d2-dialog> </d2-dialog>
</div> </div>
...@@ -131,7 +82,7 @@ export default { ...@@ -131,7 +82,7 @@ export default {
{ confId: "1", confName: "商品" }, { confId: "1", confName: "商品" },
{ confId: "2", confName: "套餐" } { confId: "2", confName: "套餐" }
], ],
handleRadioChange: (val) => {} handleRadioChange: (val) => { }
} }
], ],
...@@ -154,7 +105,7 @@ export default { ...@@ -154,7 +105,7 @@ export default {
} }
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
...mapMutations("goodsInfoData", ["SET_DATA"]), ...mapMutations("goodsInfoData", ["SET_DATA"]),
submitParamsGoods() { submitParamsGoods() {
...@@ -201,8 +152,8 @@ export default { ...@@ -201,8 +152,8 @@ export default {
getGoodsDetail({ id: this.recordId }) getGoodsDetail({ id: this.recordId })
.then((res) => { .then((res) => {
this.goodsInfo = res this.goodsInfo = res
const goodsList = deepClone(res.goodsList) const goodsList = deepClone(res.goodsList) || []
const packageGoodsList = deepClone(res.packageGoodsList) const packageGoodsList = deepClone(res.packageGoodsList) || []
goodsList.forEach((item, idx) => { goodsList.forEach((item, idx) => {
const length = this.goodTabs.length const length = this.goodTabs.length
const tabIndex = const tabIndex =
......
...@@ -391,7 +391,7 @@ export default { ...@@ -391,7 +391,7 @@ export default {
} }
// 流量方 判断是多流量方还是单个,做不同的值处理 // 流量方 判断是多流量方还是单个,做不同的值处理
let merchantSideobj = {} let merchantSideobj = {}
if (!info.realityShopLevel) { if (!info.multiPlatformMerchantFlag) {
merchantSideobj = { merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1) merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName, merchantName: info.realityShopMerchantName,
......
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
}, },
data() { data() {
return { return {
copyMerchantInfo: {}, // 多商户存导流方id
form: { form: {
// settleTimeType: 1 // settleTimeType: 1
}, },
...@@ -170,6 +171,7 @@ export default { ...@@ -170,6 +171,7 @@ export default {
// this.merchantDistributionRules // this.merchantDistributionRules
// console.log(this.merchantDistributionRules) // console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect const obj = this.classificationObjSelect
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1)
const form = {} const form = {}
// console.log('obj', obj) // console.log('obj', obj)
for (const key in obj) { for (const key in obj) {
...@@ -181,13 +183,19 @@ export default { ...@@ -181,13 +183,19 @@ export default {
const findObj = this.merchantDistributionRules.find((el) => { const findObj = this.merchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId return el.expenseCategoryId == item.expenseCategoryId
}) })
if (findObj.targetMerchantType == 3 && tableSelectOptionsId) {
this.copyMerchantInfo = findObj
}
// 还要跟存在现在的选项里面 // 还要跟存在现在的选项里面
// console.log('findObj', findObj) // console.log('findObj', findObj)
// console.log(name) // console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId }) // const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex') // console.log(optIndex, 'optIndex')
form[name] = parseInt(findObj?.merchantId) || "" // form[name] = parseInt(findObj?.merchantId) || ""
// console.log(findObj, tableSelectOptionsId)
// console.log(findObj.targetMerchantType == 3 && tableSelectOptionsId)
form[name] = parseInt(findObj.targetMerchantType == 3 && tableSelectOptionsId ? findObj?.targetMerchantLevel : findObj?.merchantId) || ""
}) })
} }
// 判断id是否有在选项里面 没有就去掉 // 判断id是否有在选项里面 没有就去掉
...@@ -221,9 +229,14 @@ export default { ...@@ -221,9 +229,14 @@ export default {
const id = this.form["id" + next.expenseCategoryId] const id = this.form["id" + next.expenseCategoryId]
// console.log(id) // console.log(id)
const merchantObj = this.tableSelectOptions.find( const merchantObj = this.tableSelectOptions.find(
(item) => item.merchantId == id // (item) => item.merchantId == id
(item) => (item.merchantId == id) || (item.targetMerchantType == 3 && item.targetMerchantLevel == id)
) )
// console.log(merchantObj, 'merchantObj') // console.log(merchantObj, 'merchantObj')
if (merchantObj.merchantId == 1) {
merchantObj.merchantId = this.copyMerchantInfo.merchantId
merchantObj.merchantName = this.copyMerchantInfo.merchantName
}
next = { next = {
...next, ...next,
expenseCategoryId: next.expenseCategoryId, expenseCategoryId: next.expenseCategoryId,
...@@ -249,9 +262,15 @@ export default { ...@@ -249,9 +262,15 @@ export default {
const id = this.form["id" + next.expenseCategoryId] const id = this.form["id" + next.expenseCategoryId]
// console.log(id) // console.log(id)
const merchantObj = this.tableSelectOptions.find( const merchantObj = this.tableSelectOptions.find(
(item) => item.merchantId == id // (item) => item.merchantId == id
// (item) => (item.merchantId == id) || item.targetMerchantLevel == id
(item) => (item.merchantId == id) || (item.targetMerchantType == 3 && item.targetMerchantLevel == id)
) )
// console.log(merchantObj, 'merchantObj') if (merchantObj.merchantId == 1) {
merchantObj.merchantId = this.copyMerchantInfo.merchantId
merchantObj.merchantName = this.copyMerchantInfo.merchantName
}
console.log(merchantObj, 'merchantObj')
next = { next = {
...next, ...next,
expenseCategoryId: next.expenseCategoryId, expenseCategoryId: next.expenseCategoryId,
...@@ -264,18 +283,6 @@ export default { ...@@ -264,18 +283,6 @@ export default {
return prev return prev
}, []) }, [])
return merchantDistributionRules return merchantDistributionRules
// console.log(this.merchantInfo)
// return new Promise((resolve, reject) => {
// this.$refs.divisionRuleRef.validate(valid => {
// if (valid) {
// // this.form
// } else {
// resolve(false)
// }
// })
// }
// )
} }
} }
} }
......
...@@ -105,7 +105,7 @@ import classificationCpt from "../editCon/components/classificationCpt.vue" ...@@ -105,7 +105,7 @@ import classificationCpt from "../editCon/components/classificationCpt.vue"
import ruleUpdateDialog from "../editCon/components/ruleupdateDialog.vue" import ruleUpdateDialog from "../editCon/components/ruleupdateDialog.vue"
import { merchantPackageGoodsInfoPage } from "@api/grounding" import { merchantPackageGoodsInfoPage } from "@api/grounding"
export default { export default {
name: "FinancialRules", name: "DivisionConfig",
components: { components: {
classificationCpt, classificationCpt,
ruleUpdateDialog ruleUpdateDialog
...@@ -243,7 +243,8 @@ export default { ...@@ -243,7 +243,8 @@ export default {
djzhySubMerchantId, djzhySubMerchantId,
partnerMerchantId, partnerMerchantId,
partnerMerchantName, partnerMerchantName,
realityShopLevel realityShopLevel,
multiPlatformMerchantFlag: true // 是多商户
} }
} }
}, },
...@@ -472,10 +473,10 @@ export default { ...@@ -472,10 +473,10 @@ export default {
result?.merchantSettleDistributeRule.goodsTypeGroupRules result?.merchantSettleDistributeRule.goodsTypeGroupRules
const createBusinessApproveMerchant = const createBusinessApproveMerchant =
result?.createBusinessApproveMerchant result?.createBusinessApproveMerchant
console.log( // console.log(
createBusinessApproveMerchant, // createBusinessApproveMerchant,
"createBusinessApproveMerchant" // "createBusinessApproveMerchant"
) // )
result = result?.merchantSettleDistributeRule || this.financialObj result = result?.merchantSettleDistributeRule || this.financialObj
result.autoFlag = result.autoFlag ? result.autoFlag : "N" result.autoFlag = result.autoFlag ? result.autoFlag : "N"
result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1 result.settleTimeType = result.settleTimeType ? result.settleTimeType : 1
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basicInfo="basicInfo"></base-info> <base-info :basicInfo="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info :merchantInfo="merchantInfo"></shop-merchant-info> <!-- <shop-merchant-info :merchantInfo="merchantInfo"></shop-merchant-info> -->
<!-- 流量方信息 -->
<multilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData">
</multilateralShopMerchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info></goods-info> <goods-info></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -27,6 +30,7 @@ import GoodsInfo from "./components/detailCon/GoodsInfo.vue" ...@@ -27,6 +30,7 @@ import GoodsInfo from "./components/detailCon/GoodsInfo.vue"
import DivisionConfig from "./components/detailCon/DivisionConfig.vue" import DivisionConfig from "./components/detailCon/DivisionConfig.vue"
import FinanceConfig from "./components/detailCon/FinanceConfig.vue" import FinanceConfig from "./components/detailCon/FinanceConfig.vue"
import OperateList from "./components/detailCon/OperateList.vue" import OperateList from "./components/detailCon/OperateList.vue"
import multilateralShopMerchant from "./components/detailCon/multilateralShopMerchant.vue"
import { import {
merchantSettleDistributeRuleLastRule, merchantSettleDistributeRuleLastRule,
getBusisDetailBasic getBusisDetailBasic
...@@ -36,6 +40,7 @@ export default { ...@@ -36,6 +40,7 @@ export default {
data() { data() {
return { return {
isLoad: true, isLoad: true,
merchantEditData: [],
logList: [], logList: [],
editData: {}, editData: {},
basicInfo: {}, basicInfo: {},
...@@ -47,6 +52,7 @@ export default { ...@@ -47,6 +52,7 @@ export default {
components: { components: {
BaseInfo, BaseInfo,
multilateralShopMerchant,
ShopMerchantInfo, ShopMerchantInfo,
GoodsInfo, GoodsInfo,
DivisionConfig, DivisionConfig,
...@@ -74,6 +80,7 @@ export default { ...@@ -74,6 +80,7 @@ export default {
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
this.logList = res.logList this.logList = res.logList
this.merchantInfo = res.createBusinessApproveMerchant || {} this.merchantInfo = res.createBusinessApproveMerchant || {}
this.merchantEditData = res.createBusinessApproveMerchantList || []
}) })
}, },
getDetail() { getDetail() {
...@@ -85,7 +92,7 @@ export default { ...@@ -85,7 +92,7 @@ export default {
merchantSettleDistributeRuleLastRule({ merchantSettleDistributeRuleLastRule({
id id
}).then((result) => { }).then((result) => {
// console.log(result, "result") console.log(result, "result")
this.divisiObj = Object.assign(result.merchantSettleDistributeRule, { this.divisiObj = Object.assign(result.merchantSettleDistributeRule, {
partnerMerchantName: partnerMerchantName:
result.createBusinessApproveMerchant.partnerMerchantName, result.createBusinessApproveMerchant.partnerMerchantName,
......
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
.then((res) => { .then((res) => {
console.log(res, "res----") console.log(res, "res----")
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {} this.merchantEditData = res.createBusinessApproveMerchantList[0] || {}
this.SET_DATA({ this.SET_DATA({
name: "shelfUpdateMerchant", name: "shelfUpdateMerchant",
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
businessCode: this.routeObj.businessCode, businessCode: this.routeObj.businessCode,
goods: this.$refs.goodsInfo.submitParamsGoods(), goods: this.$refs.goodsInfo.submitParamsGoods(),
packages: this.$refs.goodsInfo.submitParamsPackages(), packages: this.$refs.goodsInfo.submitParamsPackages(),
merchant: this.$refs.shopMerchant.editData, merchant: [this.$refs.shopMerchant.editData],
settleDistributeRule: settleDistributeRule:
settleDistributeRule || this.$refs.divisionConfig.submitParams, settleDistributeRule || this.$refs.divisionConfig.submitParams,
reconciliationRule: reconciliationRule:
......
...@@ -125,10 +125,11 @@ export default { ...@@ -125,10 +125,11 @@ export default {
console.log(res, "res----") console.log(res, "res----")
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
// 调试用 // 调试用
for (let index = 0; index < 4; index++) { // for (let index = 0; index < 4; index++) {
this.merchantEditData.push(res.createBusinessApproveMerchant) // this.merchantEditData.push(res.createBusinessApproveMerchant)
} // }
// this.merchantEditData = res.createBusinessApproveMerchant || [] this.merchantEditData = res.createBusinessApproveMerchantList || []
console.log(this.merchantEditData, ' this.merchantEditData')
// this.$EventBus.$emit("shelfUpdatMerchantId", { // this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: this.merchantEditData.merchantId, // merchantId: this.merchantEditData.merchantId,
// merchantName: this.merchantEditData.merchantName, // merchantName: this.merchantEditData.merchantName,
......
<!-- 嘀加上架 --> <!-- 嘀加上架 -->
<template> <template>
<d2-container class="shelfManage"> <d2-container class="shelfManage">
<div class="header" <div class="header" slot="header">
slot="header"> <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"> :form-data="showFormData">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset"> 重置 </el-button>
@click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -24,56 +17,40 @@ ...@@ -24,56 +17,40 @@
<span slot="left"> <span slot="left">
<!-- 嘀加上架与销售合同 --> <!-- 嘀加上架与销售合同 -->
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" <auth-button category="Button" :show-btn-ids="['9031301']" />
:show-btn-ids="['9031301']" />
</span> </span>
<!-- 嘀加上架修改 --> <!-- 嘀加上架修改 -->
<auth-button style="display: inline-block" <auth-button style="display: inline-block" category="Button" :show-btn-ids="['9031303']" />
category="Button"
:show-btn-ids="['9031303']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="packageIndexTable" <d2-table ref="packageIndexTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope">
<!-- 查看 - 查看合同 --> <!-- 查看 - 查看合同 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" <auth-button :data="scope.scope" :show-btn-ids="['9031304']" />
:show-btn-ids="['9031304']" />
</span> </span>
<!-- 确认 - 编辑合同 --> <!-- 确认 - 编辑合同 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
v-if="scope.scope.systemStatus == 1"> <auth-button :data="scope.scope" :show-btn-ids="['9031306']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9031306']" />
</span> </span>
<!-- 驳回 --> <!-- 驳回 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="scope.scope.systemStatus == 1">
v-if="scope.scope.systemStatus == 1"> <auth-button :data="scope.scope" :show-btn-ids="['9031308']" />
<auth-button :data="scope.scope"
:show-btn-ids="['9031308']" />
</span> </span>
<!-- 重新发起 --> <!-- 重新发起 -->
<span style="margin-right: 10px" <span style="margin-right: 10px" v-if="
v-if="
scope.scope.systemStatus == 4 || scope.scope.systemStatus == 4 ||
scope.scope.approveStatus == 3 || scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 4 scope.scope.approveStatus == 4
"> ">
<auth-button :data="scope.scope" <auth-button :data="scope.scope" :show-btn-ids="['9031309']" />
:show-btn-ids="['9031309']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 驳回 --> <!-- 驳回 -->
<reject-dialog :reject-visible="rejectVisible" <reject-dialog :reject-visible="rejectVisible" :params-obj="recordInfo" v-if="rejectVisible"
:params-obj="recordInfo"
v-if="rejectVisible"
@dialogClose="rejectDialogClose" /> @dialogClose="rejectDialogClose" />
</d2-container> </d2-container>
</template> </template>
...@@ -306,11 +283,11 @@ export default { ...@@ -306,11 +283,11 @@ export default {
// 确认 - 编辑合同 // 确认 - 编辑合同
handleEditContract(row) { handleEditContract(row) {
console.log(row)
// this.close({ tagName: "/editContract" }) // this.close({ tagName: "/editContract" })
this.close({ tagName: "/editMultilateralContract" }) // this.close({ tagName: "/editMultilateralContract" })
this.$router.push({ this.$router.push({
name: "editMultilateralContract", name: row.shelfType == 1 ? 'editContract' : "editMultilateralContract",
// name: "editContract",
query: { query: {
id: row.id, id: row.id,
businessCode: row.businessCode businessCode: row.businessCode
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!