Commit a11e4ded by 张立顺

feat 嘀加上架功能开发

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