Commit c3bb5c4c by 前端

Merge branch 'SAAS+V4.53.0-0528' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.53.0-0528
2 parents 90f85a5d 7b7d262d
...@@ -481,7 +481,7 @@ export const routerName = { ...@@ -481,7 +481,7 @@ export const routerName = {
parentId: "90313" parentId: "90313"
}, },
{ {
authId: "9031308", authId: "9031310",
name: "运营确认", name: "运营确认",
parentId: "90313" parentId: "90313"
} }
...@@ -545,7 +545,7 @@ export const routerName = { ...@@ -545,7 +545,7 @@ export const routerName = {
}, },
component: _import("goods/shelfManage/editContract") component: _import("goods/shelfManage/editContract")
}, },
9031308: { 9031310: {
path: "/editMultilateralContract", path: "/editMultilateralContract",
name: "editMultilateralContract", name: "editMultilateralContract",
meta: { meta: {
......
...@@ -212,6 +212,10 @@ export default { ...@@ -212,6 +212,10 @@ export default {
}, },
firstLineSunshine2OnlinePointsFlagAsync(state) { firstLineSunshine2OnlinePointsFlagAsync(state) {
return state.firstLineSunshine2OnlinePointsFlag return state.firstLineSunshine2OnlinePointsFlag
},
shelfType(state) {
// 多商户
return state.merchantSettleDistributeRuleLastRule.basicInfo.shelfType == 2
} }
} }
} }
...@@ -137,20 +137,10 @@ export default { ...@@ -137,20 +137,10 @@ export default {
get() { get() {
const info = this.financialObj const info = this.financialObj
// 平台方 // 平台方
const platformSideobj = { let platformSideobj = {}
merchantId: info.realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1,
targetMerchantLevel: 1
}
// 流量方
// const merchantSideobj = {
// merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
// merchantName: info.realityShopMerchantName,
// targetMerchantType: 3
// }
// 流量方 判断是多流量方还是单个,做不同的值处理 // 流量方 判断是多流量方还是单个,做不同的值处理
let merchantSideobj = {} let merchantSideobj = {}
let serviceObj = {}
if (!info.multiPlatformMerchantFlag) { if (!info.multiPlatformMerchantFlag) {
merchantSideobj = { merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1) merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
...@@ -158,35 +148,41 @@ export default { ...@@ -158,35 +148,41 @@ export default {
targetMerchantType: 3, targetMerchantType: 3,
targetMerchantLevel: 1 targetMerchantLevel: 1
} }
platformSideobj = {
merchantId: info.realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1,
targetMerchantLevel: 1
}
// 服务商
serviceObj = {
merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName,
targetMerchantType: 2,
targetMerchantLevel: 1
}
} else { } else {
merchantSideobj = { merchantSideobj = {
merchantId: info.realityShopMerchantId, merchantId: 3,
merchantName: info.realityShopLevel == 1 ? '门店' : '上级', merchantName: info.realityShopLevel == 1 ? '流量方' : '上级流量方',
targetMerchantType: 3, targetMerchantType: 3,
targetMerchantLevel: info.realityShopLevel targetMerchantLevel: info.realityShopLevel
} }
platformSideobj = {
merchantId: 1, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: '平台方',
targetMerchantType: 1,
targetMerchantLevel: 1
}
// 服务商
serviceObj = {
merchantId: 2,
merchantName: '服务商',
targetMerchantType: 2,
targetMerchantLevel: 1
}
} }
// 服务商
const serviceObj = {
merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName,
targetMerchantType: 2,
targetMerchantLevel: 1
}
// // 如果勾选商户 就追加进去
// if (info.djzhySubMerchantId) {
// const dizhySubMerchantObj = {
// merchantId: info.djzhySubMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
// merchantName: info.djzhySubMerchantName,
// targetMerchantType: 4
// }
// return [
// platformSideobj,
// dizhySubMerchantObj,
// ...this.serviceSelectList,
// merchantSideobj
// ]
// }
return [platformSideobj, merchantSideobj, serviceObj] return [platformSideobj, merchantSideobj, serviceObj]
} }
} }
......
...@@ -6,12 +6,7 @@ ...@@ -6,12 +6,7 @@
</div> </div>
<div style="padding: 20px"> <div style="padding: 20px">
<el-tabs v-model="editableTabsValue" type="card" class="my-tab-pane"> <el-tabs v-model="editableTabsValue" type="card" class="my-tab-pane">
<el-tab-pane <el-tab-pane v-for="(item, index) in editableTabs" :key="index" :label="item.title" :name="item.name">
v-for="(item, index) in editableTabs"
:key="index"
:label="item.title"
:name="item.name"
>
<div class="classificationCptContainer"> <div class="classificationCptContainer">
<el-form label-suffix=":" label-width="154px"> <el-form label-suffix=":" label-width="154px">
<h3 v-if="financialObj[editableTabsValue - 1].groupType == 1"> <h3 v-if="financialObj[editableTabsValue - 1].groupType == 1">
...@@ -21,18 +16,14 @@ ...@@ -21,18 +16,14 @@
<el-form-item label="对账品类" style="min-width: 250px"> <el-form-item label="对账品类" style="min-width: 250px">
{{ {{
financialObj[editableTabsValue - 1].categoryType || "--" financialObj[editableTabsValue - 1].categoryType || "--"
}}</el-form-item }}</el-form-item>
>
<el-form-item label=""> <el-form-item label="">
{{ {{
financialObj[editableTabsValue - 1].packageArrText financialObj[editableTabsValue - 1].packageArrText
}}</el-form-item }}</el-form-item>
>
</div> </div>
<template <template v-for="(item, index) in financialObj[editableTabsValue - 1]
v-for="(item, index) in financialObj[editableTabsValue - 1] .expenseCategoryTypeRules">
.expenseCategoryTypeRules"
>
<el-form-item :key="index" :label="item.expenseCategoryName"> <el-form-item :key="index" :label="item.expenseCategoryName">
<span>{{ <span>{{
getExpenseCategoryCalculateType( getExpenseCategoryCalculateType(
...@@ -59,7 +50,7 @@ export default { ...@@ -59,7 +50,7 @@ export default {
props: { props: {
financeObj: { financeObj: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
watch: { watch: {
...@@ -211,6 +202,9 @@ export default { ...@@ -211,6 +202,9 @@ export default {
item.expenseCategoryTypeRules.push(type) item.expenseCategoryTypeRules.push(type)
} }
}) })
// if (this.merchantEditData[0].operationMode == 0) {
// // item.expenseCategoryTypeRules = item.expenseCategoryTypeRules.fit
// }
this.$set( this.$set(
item, item,
"expenseCategoryTypeRules", "expenseCategoryTypeRules",
......
<!-- 查看 - 流量方信息 --> <!-- 查看 - 流量方信息 -->
<template> <template>
<div class="edit-page shop-merchant-info-detail"> <div class="edit-page shop-merchant-info-detail">
<!-- <div class="title">
<span>流量方信息</span>
</div> -->
<div style="padding: 20px 20px 0"> <div style="padding: 20px 20px 0">
<el-form :model="merchantInfo" label-width="250px"> <el-form :model="merchantInfoDetail" label-width="250px">
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ width: '48%' }"> <el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ width: '48%' }">
<span slot="label" class="label">{{ item.label }}:</span> <span slot="label" class="label">{{ item.label }}:</span>
<span>{{ merchantInfo[item.name] || "-" }}{{ item.suffix }}</span> <span>{{ merchantInfoDetail[item.name] || "-" }}{{ item.suffix }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -16,6 +13,7 @@ ...@@ -16,6 +13,7 @@
</template> </template>
<script> <script>
import { deepClone } from "@/common/util"
import { sceneCodeList } from "@/common/constants.js" import { sceneCodeList } from "@/common/constants.js"
import { import {
busiModeList, busiModeList,
...@@ -38,11 +36,12 @@ export default { ...@@ -38,11 +36,12 @@ export default {
this.dealInitData() this.dealInitData()
} }
}, },
deep: true deep: true,
immediate: true
} }
}, },
data() { data() {
//这里存放数据 // 这里存放数据
return { return {
editFormData: [ editFormData: [
{ {
...@@ -115,7 +114,8 @@ export default { ...@@ -115,7 +114,8 @@ export default {
sceneCodeList: sceneCodeList, sceneCodeList: sceneCodeList,
operationModeList: operationModeList, operationModeList: operationModeList,
onlinePointsEnabledList onlinePointsEnabledList
} },
merchantInfoDetail: {}
} }
}, },
methods: { methods: {
...@@ -128,7 +128,11 @@ export default { ...@@ -128,7 +128,11 @@ export default {
(k) => (k) =>
k[item.optionId || "confId"] == this.merchantInfo[item.attrName] k[item.optionId || "confId"] == this.merchantInfo[item.attrName]
) || {} ) || {}
this.merchantInfo[item.name] = obj[item.optionLabel || "confName"] // console.log(this.merchantInfo[item.attrName], this.baseData[item.optionsName])
// console.log(obj, 'dealInitData')
this.merchantInfoDetail[item.name] = deepClone(obj[item.optionLabel || "confName"])
} else {
this.merchantInfoDetail[item.name] = deepClone(this.merchantInfo[item.name])
} }
}) })
} }
......
...@@ -12,15 +12,20 @@ ...@@ -12,15 +12,20 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="merchantNameTd p-b-20"> <td class="merchantNameTd p-b-20" v-if="!tableSelectOptionsId">
<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 }} {{ item | filterMerchantType }}
</p> </p>
</td> </td>
<td class="merchantNameTd p-b-20" v-if="tableSelectOptionsId">
<p :title="item.merchantName" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item.merchantName }}
</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"> <div class="line-td is-required el-form-item--medium wrap">
<p v-for="(el, index) in tableSelectOptions" :key="index" class="el-radio-group"> <p v-for="(el, index) in tableSelectOptions" :key="index" class="el-radio-group">
<span :class="[ <span v-if="!tableSelectOptionsId" :class="[
'el-radio__input', 'el-radio__input',
form['id' + item.expenseCategoryId] == el.merchantId form['id' + item.expenseCategoryId] == el.merchantId
? 'is-checked' ? 'is-checked'
...@@ -28,6 +33,14 @@ ...@@ -28,6 +33,14 @@
]"> ]">
<span class="el-radio__inner"></span> <span class="el-radio__inner"></span>
</span> </span>
<span v-if="tableSelectOptionsId" :class="[
'el-radio__input',
form['id' + item.expenseCategoryId] == el.targetMerchantType
? 'is-checked'
: ''
]">
<span class="el-radio__inner"></span>
</span>
</p> </p>
</div> </div>
</td> </td>
...@@ -71,7 +84,7 @@ export default { ...@@ -71,7 +84,7 @@ export default {
4: "平台方" 4: "平台方"
} }
const type = val.targetMerchantType const type = val.targetMerchantType
return `${name[type]}: ${val.merchantName}` return tableSelectOptionsId ? val.merchantName : `${name[type]}: ${val.merchantName}`
} }
}, },
data() { data() {
...@@ -136,6 +149,9 @@ export default { ...@@ -136,6 +149,9 @@ export default {
}) })
// console.log("list", arr) // console.log("list", arr)
return arr return arr
},
tableSelectOptionsId() {
return this.tableSelectOptions.some(item => item.merchantId == 1)
} }
}, },
watch: { watch: {
...@@ -168,30 +184,38 @@ export default { ...@@ -168,30 +184,38 @@ export default {
console.log('initList') console.log('initList')
// 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) if (this.tableSelectOptionsId) {
for (const key in obj) { for (const key in obj) {
obj[key].map((item) => { obj[key].map((item) => {
// 数字转字符串 // 数字转字符串
const name = "id" + item.expenseCategoryId const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id') // console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据 // 做回显用数据
const findObj = this.merchantDistributionRules.find((el) => { const findObj = this.merchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId return el.expenseCategoryId == item.expenseCategoryId
})
form[name] = findObj?.targetMerchantType || ""
}) })
// 还要跟存在现在的选项里面 }
} else {
console.log('findObj', findObj?.merchantId) for (const key in obj) {
// console.log(name) obj[key].map((item) => {
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId }) // 数字转字符串
// console.log(optIndex, 'optIndex') const name = "id" + item.expenseCategoryId
// 兼容多商户的id 处理 // console.log(name, item.id || item.expenseCategoryId, 'item.id')
// console.log(findObj, tableSelectOptionsId) // 做回显用数据
// console.log(findObj.targetMerchantType == 3 && tableSelectOptionsId) const findObj = this.merchantDistributionRules.find((el) => {
form[name] = parseInt(findObj.targetMerchantType == 3 && tableSelectOptionsId ? findObj?.targetMerchantLevel : findObj?.merchantId) || "" return el.expenseCategoryId == item.expenseCategoryId
}) })
form[name] = findObj?.merchantId || ""
})
}
} }
// console.log("obj", obj)
// 判断id是否有在选项里面 没有就去掉 // 判断id是否有在选项里面 没有就去掉
this.form = form this.form = form
// console.log(this.form, "this.form") // console.log(this.form, "this.form")
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<div class="edit-page division-config"> <div class="edit-page division-config">
<div class="title"> <div class="title">
<span>分账配置</span> <span>分账配置</span>
<el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true">变更说明</el-button> <el-button class="ruleBtn" type="text"
v-if="merchantSettleDistributeRuleLastRuleInfo && merchantSettleDistributeRuleLastRuleInfo.settleDistributeRuleDiffList && merchantSettleDistributeRuleLastRuleInfo.basicInfo.shelfType == 1"
@click="ruleUpdateDialogShow = true">变更说明</el-button>
<el-button icon="el-icon-plus" type="primary" v-if="addVisible" size="small" plain @click="addTab">新增</el-button> <el-button icon="el-icon-plus" type="primary" v-if="addVisible" size="small" plain @click="addTab">新增</el-button>
</div> </div>
<div class="publicContainer"> <div class="publicContainer">
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<div class="edit-page finance-config"> <div class="edit-page finance-config">
<div class="title"> <div class="title">
<span>对账配置</span> <span>对账配置</span>
<el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true">变更说明</el-button> <el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true"
v-if="merchantSettleDistributeRuleLastRuleInfo && merchantSettleDistributeRuleLastRuleInfo.reconciliationRuleDiffList && merchantSettleDistributeRuleLastRuleInfo.basicInfo.shelfType == 1">变更说明</el-button>
<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>
<div style="padding: 20px"> <div style="padding: 20px">
......
...@@ -110,8 +110,10 @@ ...@@ -110,8 +110,10 @@
</template> </template>
</div> </div>
</el-form> </el-form>
<tableAccount ref="tableAccount" :merchant-distribution-rules="goodsTypeGroupRules.merchantDistributionRules <tableAccount v-if="!shelfType" ref="tableAccount" :merchant-distribution-rules="goodsTypeGroupRules.merchantDistributionRules
" :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" /> " :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
<tableAccountMultilateral v-if="shelfType" ref="tableAccount" :merchant-distribution-rules="goodsTypeGroupRules.merchantDistributionRules
" :table-select-options="tableSelectOptionsMult" :classification-obj-select="tableClassificationObjSelect" />
</div> </div>
</template> </template>
...@@ -135,11 +137,12 @@ import { ...@@ -135,11 +137,12 @@ import {
goodsSourceList goodsSourceList
} from "@/common/constant/merchant" } from "@/common/constant/merchant"
// import tipsDialog from "./tipsDialog" // import tipsDialog from "./tipsDialog"
// import financialCalculationDialog from "./financialCalculationDialog.vue" import tableAccountMultilateral from "../../editMultilateralCon/tableAccountMultilateral"
export default { export default {
name: "ClassificationCpt", name: "ClassificationCpt",
components: { components: {
tableAccount tableAccount,
tableAccountMultilateral
}, },
props: { props: {
goodsTypeGroupRules: { goodsTypeGroupRules: {
...@@ -327,6 +330,11 @@ export default { ...@@ -327,6 +330,11 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters("goodsInfoData", {
merchantSettleDistributeRuleLastRuleInfo:
"merchantSettleDistributeRuleLastRuleInfo",
shelfType: "shelfType"
}),
...mapGetters("FinancialRules", { goodsSourceSet: "goodsSourceSet" }), ...mapGetters("FinancialRules", { goodsSourceSet: "goodsSourceSet" }),
// 不可选择的商品分类 // 不可选择的商品分类
disabledGoodsTypeList() { disabledGoodsTypeList() {
...@@ -401,7 +409,7 @@ export default { ...@@ -401,7 +409,7 @@ export default {
} else { } else {
merchantSideobj = { merchantSideobj = {
merchantId: info.realityShopLevel, merchantId: info.realityShopLevel,
merchantName: info.realityShopLevel == 1 ? '门店' : '上级', merchantName: info.realityShopLevel == 1 ? '流量方' : '上级流量方',
targetMerchantType: 3, targetMerchantType: 3,
targetMerchantLevel: info.realityShopLevel targetMerchantLevel: info.realityShopLevel
} }
...@@ -416,6 +424,35 @@ export default { ...@@ -416,6 +424,35 @@ export default {
return [platformSideobj, merchantSideobj, serviceObj] return [platformSideobj, merchantSideobj, serviceObj]
} }
}, },
tableSelectOptionsMult: {
get() {
const info = this.financialLedgerParty
// 平台方
const platformSideobj = {
// merchantId: 1, // 实际分账平台方商户id(嘀加智慧云为-1)
merchantName: '平台方',
targetMerchantType: 1,
targetMerchantLevel: 1
}
// 流量方 判断是多流量方还是单个,做不同的值处理
let merchantSideobj = {}
merchantSideobj = {
// merchantId: 3,
merchantName: info.realityShopLevel == 1 ? '流量方' : '上级流量方',
targetMerchantType: 3,
targetMerchantLevel: info.realityShopLevel
}
// 服务商
const serviceObj = {
// merchantId: 2,
merchantName: '服务商',
targetMerchantType: 2,
targetMerchantLevel: 1
}
return [platformSideobj, merchantSideobj, serviceObj]
}
},
tableClassificationObjSelect() { tableClassificationObjSelect() {
// console.log(this.classificationObjSelect, "this.classificationObjSelect") // console.log(this.classificationObjSelect, "this.classificationObjSelect")
// return false // return false
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"
// import { userType } from '@/common/constants' // import { userType } from '@/common/constants'
export default { export default {
name: "TableAccount", name: "TableAccount",
...@@ -139,6 +140,9 @@ export default { ...@@ -139,6 +140,9 @@ export default {
// console.log('list', arr) // console.log('list', arr)
return arr return arr
} }
// ...mapGetters("goodsInfoData", {
// shelfType: "shelfType"
// })
}, },
watch: { watch: {
classificationObjSelect: { classificationObjSelect: {
...@@ -167,6 +171,7 @@ export default { ...@@ -167,6 +171,7 @@ export default {
mounted() { }, mounted() { },
methods: { methods: {
initList() { initList() {
// console.log('initList') // console.log('initList')
// this.merchantDistributionRules // this.merchantDistributionRules
// console.log(this.merchantDistributionRules) // console.log(this.merchantDistributionRules)
...@@ -174,6 +179,7 @@ export default { ...@@ -174,6 +179,7 @@ export default {
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1) 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) {
obj[key].map((item) => { obj[key].map((item) => {
// 数字转字符串 // 数字转字符串
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<div class="edit-page division-config"> <div class="edit-page division-config">
<div class="title"> <div class="title">
<span>分账配置</span> <span>分账配置</span>
<el-button class="ruleBtn" type="text" @click="ruleUpdateDialogShow = true">变更说明</el-button>
<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>
<div class="publicContainer"> <div class="publicContainer">
...@@ -156,11 +155,11 @@ export default { ...@@ -156,11 +155,11 @@ export default {
merchantLevelList: [], merchantLevelList: [],
realityShopLevelList: [{ realityShopLevelList: [{
realityShopLevel: 1, realityShopLevel: 1,
realityShopLevelName: "门店" realityShopLevelName: "流量方"
}, },
{ {
realityShopLevel: 2, realityShopLevel: 2,
realityShopLevelName: "上级" realityShopLevelName: "上级流量方"
}], }],
PlatformLevelList: [ PlatformLevelList: [
{ {
...@@ -208,7 +207,8 @@ export default { ...@@ -208,7 +207,8 @@ export default {
packageNoticeList: "packageNoticeList", packageNoticeList: "packageNoticeList",
shelfUpdateContractMer: "shelfUpdateContractMer", shelfUpdateContractMer: "shelfUpdateContractMer",
shelfUpdateMerchant: "shelfUpdateMerchant", shelfUpdateMerchant: "shelfUpdateMerchant",
shelfUpdateParMer: "shelfUpdateParMer" shelfUpdateParMer: "shelfUpdateParMer",
shelfType: "shelfType"
}), }),
routerInfo() { routerInfo() {
return this.$route.query ? this.$route.query : "" return this.$route.query ? this.$route.query : ""
...@@ -244,8 +244,7 @@ export default { ...@@ -244,8 +244,7 @@ export default {
djzhySubMerchantId, djzhySubMerchantId,
partnerMerchantId, partnerMerchantId,
partnerMerchantName, partnerMerchantName,
realityShopLevel, realityShopLevel
multiPlatformMerchantFlag: true // 是多商户
} }
} }
}, },
......
...@@ -269,6 +269,10 @@ export default { ...@@ -269,6 +269,10 @@ export default {
optionLabel: "confName", optionLabel: "confName",
optionsName: "operationModeList", optionsName: "operationModeList",
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
const loading = this.$loading()
setTimeout(() => {
loading.close()
}, 1000)
this.dealPartnerMer() this.dealPartnerMer()
this.SET_DATA({ this.SET_DATA({
name: "operationModeAsync", name: "operationModeAsync",
...@@ -321,7 +325,6 @@ export default { ...@@ -321,7 +325,6 @@ export default {
optionLabel: "confName", optionLabel: "confName",
optionsName: "onlinePointsEnabledList", optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({ this.SET_DATA({
name: "firstLineSunshineOnlinePointsFlag", name: "firstLineSunshineOnlinePointsFlag",
data: value data: value
...@@ -338,7 +341,6 @@ export default { ...@@ -338,7 +341,6 @@ export default {
optionLabel: "confName", optionLabel: "confName",
optionsName: "onlinePointsEnabledList", optionsName: "onlinePointsEnabledList",
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
this.dealPartnerMer()
this.SET_DATA({ this.SET_DATA({
name: "firstLineSunshine2OnlinePointsFlag", name: "firstLineSunshine2OnlinePointsFlag",
data: value data: value
......
<!-- 2 - 分账金额设置 -->
<template>
<div class="division-rule">
<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">
<td>分账对象/分账类目</td>
<!-- <td>平台方分账金额</td> -->
<td v-for="(item, index) in radioList" :key="index">
{{ item.applicationObjectName || item.expenseCategoryName }}
</td>
</tr>
<tr>
<td class="merchantNameTd p-b-20">
<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'">
<el-form-item label-width="0" :prop="`id${item.expenseCategoryId}`" :rules="[
{
required: true,
message: `请选择${item.applicationObjectName}`,
trigger: 'change'
}
]">
<el-radio-group v-model="form['id' + item.expenseCategoryId]" @change="
(e) => handleClearValid(e, 'id' + item.expenseCategoryId)
">
<el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+el.targetMerchantType" />
</el-radio-group>
</el-form-item>
</td>
</tr>
</table>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { mapGetters } from "vuex"
// import { userType } from '@/common/constants'
export default {
name: "TableAccount",
props: {
// 列选项
classificationObjSelect: {
type: Object,
default: () => { }
},
merchantDistributionRules: {
type: Array,
default: () => {
return []
}
},
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
type: Array,
default: () => []
}
},
filters: {
// 过滤商户类型
filterMerchantType(val) {
const name = {
1: "平台方",
2: "服务商",
3: "流量方",
4: "平台方"
}
const type = val.targetMerchantType
// ${name[type]}:
return ` ${val.merchantName}`
}
},
data() {
return {
copyMerchantInfo: {}, // 多商户存导流方id
form: {
// settleTimeType: 1
},
platformSideLabel: 0,
merchantAccountInfo: {},
partnerSettleAccountModel: "",
djDivisionDefalut: 1,
rules: {},
// 导流方下拉选项对应
attrToVal: [
{
confId: 3,
confLabel: "city"
},
{
// confId: 4,
confId: 2,
confLabel: "province"
},
{
confId: 1,
confLabel: "factory"
}
],
baseData: {
merchantLevelList: [],
PlatformLevelList: []
}
}
},
computed: {
radioList: function () {
const obj = this.classificationObjSelect
let list = []
let arr = []
const arrIdx = [1, 2, 302, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
arrIdx.includes(item.id) ||
arrIdx.includes(item.expenseCategoryId)
) {
list.push(item)
}
})
}
arr = list.filter((item) => {
return (
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
)
})
// console.log('list', arr)
return arr
}
// ...mapGetters("goodsInfoData", {
// shelfType: "shelfType"
// })
},
watch: {
classificationObjSelect: {
handler() {
this.initList()
},
deep: true,
immediate: true
},
merchantDistributionRules: {
handler() {
this.initList()
},
deep: true
// immediate: true
},
tableSelectOptions: {
handler(val) {
// this.initList()
this.changFormList()
},
deep: true
// immediate: true
}
},
mounted() { },
methods: {
initList() {
const obj = this.classificationObjSelect
const form = {}
// console.log('obj', obj)
// 判断是不是多商户的,是改一下结构绑定
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据
const findObj = this.merchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId
})
// 还要跟存在现在的选项里面
form[name] = parseInt(findObj?.targetMerchantType) || ""
})
}
// 判断id是否有在选项里面 没有就去掉
this.form = form
// console.log(this.form,'this.form')
},
changFormList() {
// console.log(this.form,'this.form')
// 判断id是否有在选项里面 没有就去掉
for (const key in this.form) {
const element = this.form[key]
this.tableSelectOptions.findIndex((opt) => {
return opt.targetMerchantType == element
}) == -1 && (this.form[key] = "")
}
},
handleClearValid(e, validField) {
this.$forceUpdate()
// this.handleConfirm()
// console.log('validField', validField)
this.$refs.divisionRuleRef.clearValidate(validField)
},
handleConfirm() {
// console.log(this.merchantInfo)
return new Promise((resolve, reject) => {
this.$refs.divisionRuleRef.validate((valid) => {
if (valid) {
// this.form
const merchantDistributionRules = this.radioList.reduce(
(prev, next) => {
const id = this.form["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
(item) => item.targetMerchantType == id
)
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
},
[]
)
resolve(merchantDistributionRules)
} else {
resolve(false)
}
})
})
},
getTableAccountParams() {
const merchantDistributionRules = this.radioList.reduce((prev, next) => {
const id = this.form["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
(item) => item.targetMerchantType == id
)
console.log(merchantObj, 'merchantObj')
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
}, [])
return merchantDistributionRules
}
}
}
</script>
<style scoped lang="scss">
.formSty {
overflow-x: scroll;
}
.division-rule table {
width: 98%;
color: #666666;
border: 1px solid #e5e6e7;
border-width: 1px 0 0 1px;
}
.division-rule table tr {
height: 50px;
line-height: 50px;
}
.division-rule table th,
.division-rule table td {
font-size: 12px;
font-weight: normal;
padding: 0px 10px;
border: 1px solid #e5e6e7;
border-width: 0px 1px 1px 0px;
border-spacing: 0;
text-align: center;
min-width: 100px;
white-space: nowrap;
/* white-space: nowrap; */
/* overflow: hidden; */
/* text-overflow: ellipsis; */
}
.division-rule table .merchantNameTd {
min-width: 150px;
}
.division-rule .flex {
display: flex;
justify-content: space-around;
}
.table-block td {
font-size: 14px !important;
;
}
.division-rule .table-block .el-radio {
display: block;
height: 60px;
line-height: 42px;
margin-right: 0;
}
.p-b-20 {
padding-bottom: 26px !important;
}
.division-rule ::v-deep {
.table-block .el-radio__label {
display: none !important;
}
}
</style>
...@@ -93,14 +93,21 @@ export default { ...@@ -93,14 +93,21 @@ export default {
id id
}).then((result) => { }).then((result) => {
console.log(result, "result") console.log(result, "result")
const realityShopMerchantName = result.basicInfo.shelfType == 1 ? result.merchantSettleDistributeRule.realityShopMerchantName : result.merchantSettleDistributeRule.realityShopLevel == 1 ? '门店' : '上级' const realityShopMerchantName = result.basicInfo.shelfType == 1 ? result.merchantSettleDistributeRule.realityShopMerchantName : result.merchantSettleDistributeRule.realityShopLevel == 1 ? '流量方' : '上级流量方'
console.log(result.createBusinessApproveMerchantList[0].parentMerchantId, 'partnerMerchantName') console.log(result.createBusinessApproveMerchantList[0].parentMerchantId, 'partnerMerchantName')
this.divisiObj = Object.assign(result.merchantSettleDistributeRule, { this.divisiObj = Object.assign(result.merchantSettleDistributeRule, {
realityShopMerchantName, realityShopMerchantName,
partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName, partnerMerchantName: result.createBusinessApproveMerchantList[0].partnerMerchantName,
partnerMerchantId: result.createBusinessApproveMerchantList[0].partnerMerchantId partnerMerchantId: result.createBusinessApproveMerchantList[0].partnerMerchantId
}) })
const operationMode = result.createBusinessApproveMerchantList[0].operationMode
if (operationMode == 0) { // 非直营过滤掉人力成本
result.merchantReconciliationRule.goodsTypeGroupReconciliationRules = result.merchantReconciliationRule.goodsTypeGroupReconciliationRules.map(item => {
item.expenseCategoryRules = item.expenseCategoryRules.filter(el => el.expenseCategoryId != 807)
return item
})
}
// result.merchantReconciliationRule
this.financialObj = result.merchantReconciliationRule this.financialObj = result.merchantReconciliationRule
}) })
}, },
......
...@@ -25,6 +25,17 @@ ...@@ -25,6 +25,17 @@
</d2-table-header> </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"> :before-search-fn="beforeSearchFn">
<div slot="merchantName" slot-scope="scope">
<el-tooltip class="item" :content="scope.scope.merchantName" placement="right">
<span>
{{
scope.scope.merchantName.length > 10
? scope.scope.merchantName.substring(0, 10) + "..."
: scope.scope.merchantName
}}
</span>
</el-tooltip>
</div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- 查看 - 查看合同 --> <!-- 查看 - 查看合同 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
...@@ -160,7 +171,8 @@ export default { ...@@ -160,7 +171,8 @@ export default {
}, },
{ {
label: "流量方信息", label: "流量方信息",
prop: "merchantName" prop: "merchantName",
addHtml: "merchantName"
}, },
{ {
label: "上架类型", label: "上架类型",
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店员工:" :prop="operationType =='add'?'staffUuid':''"> <el-form-item label="驻店员工:" :prop="operationType =='add'?'staffUuid':''">
<div v-if="operationType =='add'"> <div v-if="operationType =='add'">
<el-select v-model="formData.staffUuid" class="sortInput" placeholder="请先选择业务类型"> <el-select v-model="formData.staffUuid" filterable class="sortInput" placeholder="请先选择业务类型">
<el-option v-for="(subItem, subIndex) in baseData.staffList" <el-option v-for="(subItem, subIndex) in baseData.staffList"
:key="subIndex" :key="subIndex"
:label="subItem.staffName" :label="subItem.staffName"
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<!-- <span slot="left"> <!-- <span slot="left">
<auth-button category="Button" :show-btn-ids="['9061003']" /> <auth-button category="Button" :show-btn-ids="['9061003']" />
</span> --> </span> -->
<d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams" :before-search-fn="beforeSearchFn">
<template slot="yqMerchantName" slot-scope="scope"> <template slot="yqMerchantName" slot-scope="scope">
<div v-if="scope.scope.yseMerchantRefs && scope.scope.yseMerchantRefs.length > 0"> <div v-if="scope.scope.yseMerchantRefs && scope.scope.yseMerchantRefs.length > 0">
<!-- width="200" --> <!-- width="200" -->
...@@ -49,15 +49,15 @@ ...@@ -49,15 +49,15 @@
</d2-table> </d2-table>
</div> </div>
<subordinateMerchantDialog v-if="subordinateMerchantVisible" <subordinateMerchantDialog v-if="subordinateMerchantVisible"
:subordinate-merchant-visible="subordinateMerchantVisible" :sub-shop-merchant-info="merchantRow" :subordinate-merchant-visible="subordinateMerchantVisible" :sub-shop-merchant-info="merchantRow"
@dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog> @dialogClose="colseSubordinateMerchant"></subordinateMerchantDialog>
<virtualAccountManagementDetailDialog :account-detail-visible="accountDetailVisibleDialog" :merchant-row="merchantRow" <virtualAccountManagementDetailDialog :account-detail-visible="accountDetailVisibleDialog"
@dialogClose="accountDetailVisibleDialog = false"> :merchant-row="merchantRow" @dialogClose="accountDetailVisibleDialog = false">
</virtualAccountManagementDetailDialog> </virtualAccountManagementDetailDialog>
<baseDialog :is-show.sync="accountDetailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" <baseDialog :is-show.sync="accountDetailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"> @closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible" <account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" /> :merchant-row="merchantRow" />
</baseDialog> </baseDialog>
</div> </div>
</template> </template>
...@@ -301,7 +301,7 @@ export default { ...@@ -301,7 +301,7 @@ export default {
} }
</script> </script>
<style> <style scoped>
.header { .header {
background-color: #fff; background-color: #fff;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!