Commit 081efa6e by 前端

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

…ife-system into SAAS+V4.50.0-0311
2 parents 7cb51251 25b33c15
...@@ -74,19 +74,19 @@ ...@@ -74,19 +74,19 @@
> >
<el-form-item label="分账品类"> <el-form-item label="分账品类">
{{ {{
financialObj.goodsTypeGroupRules[editableTabsValue] financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.categoryType || "--" .categoryType || "--"
}}</el-form-item }}</el-form-item
> >
<el-form-item label=""> <el-form-item label="">
{{ {{
financialObj.goodsTypeGroupRules[editableTabsValue] financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.packageArrText .packageArrText
}}</el-form-item }}</el-form-item
> >
<template <template
v-for="(item, index) in financialObj.goodsTypeGroupRules[ v-for="(item, index) in financialObj.goodsTypeGroupRules[
editableTabsValue editableTabsValue - 1
].expenseCategoryRules" ].expenseCategoryRules"
> >
<el-form-item :key="index" :label="item.expenseCategoryName"> <el-form-item :key="index" :label="item.expenseCategoryName">
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<tableAccount <tableAccount
ref="tableAccount" ref="tableAccount"
:merchant-distribution-rules=" :merchant-distribution-rules="
financialObj.goodsTypeGroupRules[editableTabsValue] financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules .merchantDistributionRules
" "
:table-select-options="tableSelectOptions" :table-select-options="tableSelectOptions"
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
computed: { computed: {
tableClassificationObjSelect() { tableClassificationObjSelect() {
const filterObj = deepClone( const filterObj = deepClone(
this.financialObj.goodsTypeGroupRules[this.editableTabsValue] this.financialObj.goodsTypeGroupRules[this.editableTabsValue - 1]
.expenseCategoryRules .expenseCategoryRules
) )
const obj = { const obj = {
...@@ -177,12 +177,18 @@ export default { ...@@ -177,12 +177,18 @@ export default {
merchantName: info.realityPlatformMerchantName, merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1 targetMerchantType: 1
} }
// 4s 店 // 流量方
const merchantSideobj = { const merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1) merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName, merchantName: info.realityShopMerchantName,
targetMerchantType: 3 targetMerchantType: 3
} }
//服务商
const serviceObj = {
merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName,
targetMerchantType: 2
}
// // 如果勾选商户 就追加进去 // // 如果勾选商户 就追加进去
// if (info.djzhySubMerchantId) { // if (info.djzhySubMerchantId) {
// const dizhySubMerchantObj = { // const dizhySubMerchantObj = {
...@@ -197,10 +203,9 @@ export default { ...@@ -197,10 +203,9 @@ export default {
// merchantSideobj // merchantSideobj
// ] // ]
// } // }
return [platformSideobj, merchantSideobj] return [platformSideobj, merchantSideobj, serviceObj]
}
} }
},
}, },
watch: { watch: {
divisiObj: { divisiObj: {
...@@ -315,7 +320,6 @@ export default { ...@@ -315,7 +320,6 @@ export default {
) )
}) })
this.initSettleTimeObj() this.initSettleTimeObj()
console.log(this.financialObj, 555555555)
}, },
initSettleTimeObj() { initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj const { settleTimeType, settleTime } = this.financialObj
......
...@@ -17,23 +17,24 @@ ...@@ -17,23 +17,24 @@
<el-form label-suffix=":" label-width="154px"> <el-form label-suffix=":" label-width="154px">
<el-form-item label="分账品类"> <el-form-item label="分账品类">
{{ {{
financialObj[editableTabsValue].categoryType || "--" financialObj[editableTabsValue-1].categoryType || "--"
}}</el-form-item }}</el-form-item
> >
<el-form-item label=""> <el-form-item label="">
{{ {{
financialObj[editableTabsValue].packageArrText financialObj[editableTabsValue-1].packageArrText
}}</el-form-item }}</el-form-item
> >
<template <template
v-for="(item, index) in financialObj[editableTabsValue] 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(
item.expenseCategoryCalculateType, item.expenseCategoryCalculateType,
item.expenseCategoryValue item.expenseCategoryValue,
item.expenseCategoryName
) )
}}</span> }}</span>
</el-form-item> </el-form-item>
...@@ -76,11 +77,11 @@ export default { ...@@ -76,11 +77,11 @@ export default {
} }
}, },
methods: { methods: {
getExpenseCategoryCalculateType(value, num) { getExpenseCategoryCalculateType(value, num,name) {
if (!value || num == null) { if (!value || num == null) {
return "-" return "-"
} }
// console.log('num: ', num)
let res let res
switch (value) { switch (value) {
case 1: case 1:
...@@ -193,7 +194,6 @@ export default { ...@@ -193,7 +194,6 @@ export default {
}) })
this.$set(item, "expenseCategoryTypeRules", item.expenseCategoryTypeRules) this.$set(item, "expenseCategoryTypeRules", item.expenseCategoryTypeRules)
}) })
console.log(this.financialObj,76666)
} }
} }
} }
......
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
}, },
data() { data() {
return { return {
submitParams:'', submitParams: "",
verificationCodeVisible: false, verificationCodeVisible: false,
merchantTestVisible: false, merchantTestVisible: false,
rulesTestParams: {}, rulesTestParams: {},
...@@ -223,7 +223,9 @@ export default { ...@@ -223,7 +223,9 @@ export default {
djzhySubMerchantId: "", djzhySubMerchantId: "",
djzhySubMerchantName: "", djzhySubMerchantName: "",
multiPlatformMerchantFlag: "N", // 是否多平台 multiPlatformMerchantFlag: "N", // 是否多平台
goodsTypeGroupRules: [] goodsTypeGroupRules: [],
partnerMerchantId: "",
partnerMerchantName: ""
}, },
// 结算周期 // 结算周期
settleTimeObj: { settleTimeObj: {
...@@ -244,7 +246,6 @@ export default { ...@@ -244,7 +246,6 @@ export default {
}, },
// merchantId: '44211227', // merchantId: '44211227',
// yqMerchantId: '44209389', // yqMerchantId: '44209389',
rules: { rules: {
realityPlatformMerchantId: [ realityPlatformMerchantId: [
{ required: true, message: "请选择平台方", trigger: "change" } { required: true, message: "请选择平台方", trigger: "change" }
...@@ -399,7 +400,9 @@ export default { ...@@ -399,7 +400,9 @@ export default {
realityShopMerchantId, realityShopMerchantId,
realityShopMerchantName, realityShopMerchantName,
djzhySubMerchantId, djzhySubMerchantId,
djzhySubMerchantName djzhySubMerchantName,
partnerMerchantId,
partnerMerchantName
} = this.financialObj } = this.financialObj
return { return {
realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1) realityPlatformMerchantId, // 实际分账平台方商户id(嘀加智慧云为-1)
...@@ -407,7 +410,9 @@ export default { ...@@ -407,7 +410,9 @@ export default {
realityShopMerchantId, realityShopMerchantId,
realityShopMerchantName, realityShopMerchantName,
djzhySubMerchantName, djzhySubMerchantName,
djzhySubMerchantId djzhySubMerchantId,
partnerMerchantId,
partnerMerchantName
} }
} }
}, },
...@@ -448,16 +453,10 @@ export default { ...@@ -448,16 +453,10 @@ export default {
handler(val) { handler(val) {
console.log(val, "financialObj.multiPlatformMerchantFlag") console.log(val, "financialObj.multiPlatformMerchantFlag")
if (val == "Y") { if (val == "Y") {
// const { djzhySubMerchantId, djzhySubMerchantName } = this.DjzhySubMerchantObj
// console.log(djzhySubMerchantId, djzhySubMerchantName, 'djzhySubMerchantId')
this.financialObj = Object.assign( this.financialObj = Object.assign(
this.financialObj, this.financialObj,
this.DjzhySubMerchantObj this.DjzhySubMerchantObj
) )
// this.$forceUpdate()
// this.financialObj.djzhySubMerchantId = djzhySubMerchantId
// this.financialObj.djzhySubMerchantName = djzhySubMerchantName
console.log(this.financialObj, "this.financialObj")
} else { } else {
this.financialObj.djzhySubMerchantId = "" this.financialObj.djzhySubMerchantId = ""
this.financialObj.djzhySubMerchantName = "" this.financialObj.djzhySubMerchantName = ""
...@@ -478,27 +477,44 @@ export default { ...@@ -478,27 +477,44 @@ export default {
// this.getFinancialObj() // this.getFinancialObj()
// this.init4sServiceList() // this.init4sServiceList()
this.initFeeCategoryByType() this.initFeeCategoryByType()
this.getGoodsCategoryConfiguration() //商品分类 this.getGoodsCategoryConfiguration() // 商品分类
const { merchantId, scene } = this.routerInfo const { merchantId, scene } = this.routerInfo
// yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList') // yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList')
// this.initPlatformLevelList() // this.initPlatformLevelList()
// this.getFinancialObj() // this.getFinancialObj()
// let eventArr = [this.init4sServiceList(), this.getFinancialObj()] // let eventArr = [this.init4sServiceList(), this.getFinancialObj()]
let eventArr = [this.getFinancialObj()] const eventArr = [this.getFinancialObj()]
if (merchantId) eventArr.push(this.getMerchantLevel(merchantId, "merchantLevelList", scene)) if (merchantId) {
eventArr.push(
this.getMerchantLevel(merchantId, "merchantLevelList", scene)
)
}
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.checkSelectEmpty() this.checkSelectEmpty()
}) })
//平台方 this.$EventBus.$on("packageInfoList", (obj) => {
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{ console.log(obj)
this.getSelectingListPackage([], obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName
}) })
//服务商 // 平台方
this.$EventBus.$on('shelfUpdateParMer', (obj)=>{ this.$EventBus.$on("shelfUpdateConstractMer", (obj) => {
this.$set(this.financialObj, "realityPlatformMerchantId", obj.merchantId)
this.$set(
this.financialObj,
"realityPlatformMerchantName",
obj.merchantName
)
// this.financialObj.realityPlatformMerchantId = obj.merchantId
// this.financialObj.realityPlatformMerchantName = obj.merchantName
})
// 服务商
this.$EventBus.$on("shelfUpdateParMer", (obj) => {
console.log(obj, "this.$set")
this.$set(this.financialObj, "partnerMerchantId", obj.merchantId)
this.$set(this.financialObj, "partnerMerchantName", obj.merchantName)
// this.financialObj.partnerMerchantId = obj.merchantId
// this.financialObj.partnerMerchantName = obj.merchantName
}) })
}, },
methods: { methods: {
...@@ -531,7 +547,7 @@ export default { ...@@ -531,7 +547,7 @@ export default {
const { settleTimeType, settleTime } = this.financialObj const { settleTimeType, settleTime } = this.financialObj
this.settleTimeObj[settleTimeType == 1 ? "first" : "second"] = settleTime this.settleTimeObj[settleTimeType == 1 ? "first" : "second"] = settleTime
}, },
//按商品分类 // 按商品分类
getGoodsCategoryConfiguration() { getGoodsCategoryConfiguration() {
getGoodsCategoryConfiguration({}).then((result) => { getGoodsCategoryConfiguration({}).then((result) => {
const { list } = result const { list } = result
...@@ -586,7 +602,6 @@ export default { ...@@ -586,7 +602,6 @@ export default {
if (arrIdx.includes(obj.id)) { if (arrIdx.includes(obj.id)) {
prev.trafficSide.push(obj) prev.trafficSide.push(obj)
} }
} else if (applicationObjectType == 2) { } else if (applicationObjectType == 2) {
if (obj.id == 2) { if (obj.id == 2) {
prev.trafficSide.push(obj) prev.trafficSide.push(obj)
...@@ -625,25 +640,17 @@ export default { ...@@ -625,25 +640,17 @@ export default {
}) })
}, },
getFinancialObj() { getFinancialObj() {
console.log(666666)
return new Promise((resolve) => { return new Promise((resolve) => {
const { id } = this.routerInfo const { id } = this.routerInfo
merchantSettleDistributeRuleLastRule({ merchantSettleDistributeRuleLastRule({
id: 1 id: 1
}) })
.then((result) => { .then((result) => {
// 判空处理
// result.goodsTypeGroupRules = [...result?.goodsTypeGroupRules, ...result?.goodsTypeGroupRules, ...result?.goodsTypeGroupRules]
const goodsTypeGroupRules = const goodsTypeGroupRules =
result?.merchantSettleDistributeRule.goodsTypeGroupRules result?.merchantSettleDistributeRule.goodsTypeGroupRules
const createBusinessApproveMerchant =
result?.createBusinessApproveMerchant
result = result?.merchantSettleDistributeRule || this.financialObj result = result?.merchantSettleDistributeRule || this.financialObj
// result.autoFlag = null
// result.settleTimeType = null
// 解决老财务规则只做了一部分的问题 就不取老的了
// 处理 autoFlag 为空的兼容问题
// console.log(result.autoFlag)
// debugger
result.autoFlag = result.autoFlag ? result.autoFlag : "N" result.autoFlag = result.autoFlag ? result.autoFlag : "N"
result.settleTimeType = result.settleTimeType result.settleTimeType = result.settleTimeType
? result.settleTimeType ? result.settleTimeType
...@@ -651,6 +658,10 @@ export default { ...@@ -651,6 +658,10 @@ export default {
result && result.divisionRuleId && (this.financialObj = result) result && result.divisionRuleId && (this.financialObj = result)
result.multiPlatformMerchantFlag = result.multiPlatformMerchantFlag =
result.multiPlatformMerchantFlag || "N" result.multiPlatformMerchantFlag || "N"
result.partnerMerchantName =
createBusinessApproveMerchant.partnerMerchantName
result.partnerMerchantId =
createBusinessApproveMerchant.partnerMerchantId
const autoFlag = result?.autoFlag == "Y" const autoFlag = result?.autoFlag == "Y"
// 隐藏固定周期分账 处理历史数据 // 隐藏固定周期分账 处理历史数据
if (result?.settleTimeType == 2) result.settleTimeType = 1 if (result?.settleTimeType == 2) result.settleTimeType = 1
...@@ -715,7 +726,7 @@ export default { ...@@ -715,7 +726,7 @@ export default {
}) })
// 获取商品 // 获取商品
this.getSelectingList(upgradeArr) this.getSelectingList(upgradeArr)
this.getSelectingListPackage(packageArr) // this.getSelectingListPackage(packageArr)
this.initSettleTimeObj() this.initSettleTimeObj()
resolve() resolve()
}) })
...@@ -1253,33 +1264,40 @@ export default { ...@@ -1253,33 +1264,40 @@ export default {
) )
}, },
// 或者商品套餐 // 或者商品套餐
getSelectingListPackage(defaultSelect = []) { getSelectingListPackage(defaultSelect = [], packageArr = []) {
merchantPackageGoodsInfoPage({ packageArr = packageArr.map((item) => {
// goodsNameKeyword: this.goodsNameKeyword, item.packageCode = item.packageCode || item.timeId
currentPage: 1, item.packageName = item.packageName || item.val1
pageSize: 20, return item
status: 1,
sceneType: this.routerInfo.scene,
merchantIdList: [this.routerInfo.merchantId]
})
.then((res) => {
console.log(res, "merchantPackageGoodsInfoPage")
// this.allPages = res.pages
const resArr = []
res.list &&
res.list.forEach((val) => {
resArr.push({
packageCode: val.packageCode,
packageName: val.packageName
})
})
// console.log(resArr, 'resArr')
let arr = this.packageGoodsList.concat(resArr)
// console.log(arr, 'arr')
if (defaultSelect?.length) arr = arr.concat(defaultSelect)
this.packageGoodsList = this.uniquePackage(arr)
}) })
.catch(() => {}) console.log(packageArr, "packageArr")
this.packageGoodsList = this.uniquePackage(packageArr)
// merchantPackageGoodsInfoPage({
// // goodsNameKeyword: this.goodsNameKeyword,
// currentPage: 1,
// pageSize: 20,
// status: 1,
// sceneType: this.routerInfo.scene,
// merchantIdList: [this.routerInfo.merchantId]
// })
// .then((res) => {
// console.log(res, "merchantPackageGoodsInfoPage")
// // this.allPages = res.pages
// const resArr = []
// res.list &&
// res.list.forEach((val) => {
// resArr.push({
// packageCode: val.packageCode,
// packageName: val.packageName
// })
// })
// // console.log(resArr, 'resArr')
// // console.log(arr, 'arr')
// let arr = this.packageGoodsList.concat(resArr)
// if (defaultSelect?.length) arr = arr.concat(defaultSelect)
// this.packageGoodsList = this.uniquePackage(arr)
// })
// .catch(() => {})
}, },
uniquePackage(arr) { uniquePackage(arr) {
...@@ -1351,7 +1369,6 @@ export default { ...@@ -1351,7 +1369,6 @@ export default {
scene scene
}) })
.then((res) => { .then((res) => {
const attrToVal = deepClone(attrToValOptions) const attrToVal = deepClone(attrToValOptions)
if (name == "PlatformLevelList") { if (name == "PlatformLevelList") {
delete attrToVal[2] delete attrToVal[2]
...@@ -1600,7 +1617,7 @@ export default { ...@@ -1600,7 +1617,7 @@ export default {
console.log(upgradeArr, "upgradeArr") console.log(upgradeArr, "upgradeArr")
// 获取商品 // 获取商品
this.getSelectingList(upgradeArr) this.getSelectingList(upgradeArr)
this.getSelectingListPackage(packageArr) // this.getSelectingListPackage(packageArr)
// this.$forceUpdate() // this.$forceUpdate()
this.$message({ this.$message({
type: "success", type: "success",
......
...@@ -94,6 +94,8 @@ ...@@ -94,6 +94,8 @@
:prop="classificationObj.categoryType == 3 ? 'packageGoods' : 'empty'" :prop="classificationObj.categoryType == 3 ? 'packageGoods' : 'empty'"
label-width="20px" label-width="20px"
> >
<!-- @visible-change="visibleChangePackage" :remote-method="remoteMethodPackage"
v-el-select-loadmore-package="interestsLoadmorePackage" -->
<el-select <el-select
v-model="classificationObj.packageGoods" v-model="classificationObj.packageGoods"
multiple multiple
...@@ -101,9 +103,6 @@ ...@@ -101,9 +103,6 @@
remote remote
reserve-keyword reserve-keyword
placeholder="请选择套餐商品" placeholder="请选择套餐商品"
@visible-change="visibleChangePackage"
:remote-method="remoteMethodPackage"
v-el-select-loadmore-package="interestsLoadmorePackage"
style="width: 370px" style="width: 370px"
value-key="packageCode" value-key="packageCode"
filterable filterable
...@@ -445,6 +444,7 @@ export default { ...@@ -445,6 +444,7 @@ export default {
const list = this.goodsSelectList.filter((item) => { const list = this.goodsSelectList.filter((item) => {
// item.goodsType // item.goodsType
// const flag = selectList.findIndex(el => { return el.goodsType == item.goodsType }) // const flag = selectList.findIndex(el => { return el.goodsType == item.goodsType })
console.log(selectList, "selectList")
if ( if (
selectList.findIndex((el) => { selectList.findIndex((el) => {
return el.goodsType == item.goodsType return el.goodsType == item.goodsType
...@@ -488,7 +488,6 @@ export default { ...@@ -488,7 +488,6 @@ export default {
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户 // 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: { tableSelectOptions: {
get() { get() {
console.log(this.financialLedgerParty, "this.financialLedgerParty")
const info = this.financialLedgerParty const info = this.financialLedgerParty
// 平台方 // 平台方
const platformSideobj = { const platformSideobj = {
...@@ -496,12 +495,18 @@ export default { ...@@ -496,12 +495,18 @@ export default {
merchantName: info.realityPlatformMerchantName, merchantName: info.realityPlatformMerchantName,
targetMerchantType: 1 targetMerchantType: 1
} }
// 4s 店 // 流量方
const merchantSideobj = { const merchantSideobj = {
merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1) merchantId: info.realityShopMerchantId, // 实际分账商户方商户id(嘀加智慧云为-1)
merchantName: info.realityShopMerchantName, merchantName: info.realityShopMerchantName,
targetMerchantType: 3 targetMerchantType: 3
} }
//服务商
const serviceObj = {
merchantId: info.partnerMerchantId,
merchantName: info.partnerMerchantName,
targetMerchantType: 2
}
// 如果勾选商户 就追加进去 // 如果勾选商户 就追加进去
if (info.djzhySubMerchantId) { if (info.djzhySubMerchantId) {
const dizhySubMerchantObj = { const dizhySubMerchantObj = {
...@@ -512,13 +517,11 @@ export default { ...@@ -512,13 +517,11 @@ export default {
return [ return [
platformSideobj, platformSideobj,
dizhySubMerchantObj, dizhySubMerchantObj,
...this.serviceSelectList, merchantSideobj,
merchantSideobj serviceObj
] ]
} }
return info.realityShopMerchantId return [platformSideobj, merchantSideobj, serviceObj]
? [platformSideobj, ...this.serviceSelectList, merchantSideobj]
: [platformSideobj, ...this.serviceSelectList]
} }
}, },
tableClassificationObjSelect() { tableClassificationObjSelect() {
...@@ -533,7 +536,6 @@ export default { ...@@ -533,7 +536,6 @@ export default {
obj[key] = [] obj[key] = []
} }
filterObj[key].map((item) => { filterObj[key].map((item) => {
if (item.formType == 2) { if (item.formType == 2) {
obj[key].push(...item.feeCategoryNameList) obj[key].push(...item.feeCategoryNameList)
} else { } else {
...@@ -661,6 +663,8 @@ export default { ...@@ -661,6 +663,8 @@ export default {
handler(val, oldVal) { handler(val, oldVal) {
if (val) { if (val) {
this.copyPackageGoodsList = deepClone(val) this.copyPackageGoodsList = deepClone(val)
// 然后对比一下当前选择的套件是否还在队列,不在就删除
this.diffPackageGoodsList()
} }
}, },
deep: true deep: true
...@@ -748,6 +752,27 @@ export default { ...@@ -748,6 +752,27 @@ export default {
methods: { methods: {
...mapMutations("FinancialRules", ["setGoodsSource", "delGoodsSource"]), ...mapMutations("FinancialRules", ["setGoodsSource", "delGoodsSource"]),
diffPackageGoodsList() {
// copyPackageGoodsList 如果有变动,对比一下当前选择的套件是否还在队列,不在就删除
// 找到需要删除的对象
const deleteObj = this.classificationObj.packageGoods.find((item) => {
return this.copyPackageGoodsList.every(
(el) => el.packageCode != item.packageCode
)
})
// 如果找到需要删除的对象
if (deleteObj) {
this.$emit("deletePackageGoodsItem", deleteObj)
// 直接过滤掉删除的对象
this.classificationObj.packageGoods =
this.classificationObj.packageGoods.filter(
(item) => item.packageCode !== deleteObj.packageCode
)
}
console.log(deleteObj, "deleteObj")
},
clearValidate() { clearValidate() {
this.$refs.classification.clearValidate([ this.$refs.classification.clearValidate([
"goodsTypes", "goodsTypes",
......
...@@ -77,8 +77,13 @@ export default { ...@@ -77,8 +77,13 @@ export default {
merchantSettleDistributeRuleLastRule({ merchantSettleDistributeRuleLastRule({
id: 1 id: 1
}).then((result) => { }).then((result) => {
this.divisiObj = result.merchantSettleDistributeRule this.divisiObj = Object.assign(result.merchantSettleDistributeRule,{
partnerMerchantName:result.createBusinessApproveMerchant.partnerMerchantName,
partnerMerchantId:result.createBusinessApproveMerchant.partnerMerchantId
})
this.financialObj = result.merchantReconciliationRule this.financialObj = result.merchantReconciliationRule
}) })
}, },
handleBack() { handleBack() {
......
...@@ -47,18 +47,16 @@ ...@@ -47,18 +47,16 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from "vuex"
import BaseInfo from './components/editCon/BaseInfo.vue' import BaseInfo from "./components/editCon/BaseInfo.vue"
import ShopMerchantInfo from './components/editCon/ShopMerchantInfo' import ShopMerchantInfo from "./components/editCon/ShopMerchantInfo"
import AddMerchant from './components/editCon/AddMerchant' import AddMerchant from "./components/editCon/AddMerchant"
import GoodsInfo from './components/editCon/GoodsInfo.vue' import GoodsInfo from "./components/editCon/GoodsInfo.vue"
import DivisionConfig from './components/editCon/DivisionConfig.vue' import DivisionConfig from "./components/editCon/DivisionConfig.vue"
import FinanceConfig from './components/editCon/FinanceConfig.vue' import FinanceConfig from "./components/editCon/FinanceConfig.vue"
import { import { getBusisDetailBasic } from "@api/shelfManage"
getBusisDetailBasic
} from "@api/shelfManage"
export default { export default {
name: 'EditContract', name: "EditContract",
data() { data() {
return { return {
routeObj: {}, routeObj: {},
...@@ -88,30 +86,36 @@ export default { ...@@ -88,30 +86,36 @@ export default {
// 方法集合 // 方法集合
methods: { methods: {
...mapActions({ ...mapActions({
close: 'd2admin/page/close' close: "d2admin/page/close"
}), }),
getBasicDetail() { getBasicDetail() {
getBusisDetailBasic({ id: this.routeObj.id }).then(res => { getBusisDetailBasic({ id: this.routeObj.id })
console.log(res, 'res----') .then((res) => {
console.log(res, "res----")
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {} this.merchantEditData = res.createBusinessApproveMerchant || {}
}).finally(() => { })
.finally(() => {
this.isLoad = false this.isLoad = false
}) })
}, },
handleAddMerchant() { handleAddMerchant() {
console.log('新建---') console.log("新建---")
this.addMerVisible = !this.addMerVisible this.addMerVisible = !this.addMerVisible
}, },
handleConfirm(confirmType) { handleConfirm(confirmType) {
if (confirmType == 'save') { if (confirmType == "save") {
// 各模块校验 // 各模块校验
if (!this.$refs.shopMerchant.submit() || !this.$refs.divisionConfig.submit() || !this.$refs.financeConfig.submit()) { if (
!this.$refs.shopMerchant.submit() ||
!this.$refs.divisionConfig.submit() ||
!this.$refs.financeConfig.submit()
) {
return true return true
} }
} }
var params = { var params = {
saveDraft: confirmType == 'draft', saveDraft: confirmType == "draft",
businessCode: this.routeObj.businessCode, businessCode: this.routeObj.businessCode,
merchant: this.$refs.editData, merchant: this.$refs.editData,
settleDistributeRule: this.$refs.divisionConfig.submitParams, settleDistributeRule: this.$refs.divisionConfig.submitParams,
...@@ -119,9 +123,9 @@ export default { ...@@ -119,9 +123,9 @@ export default {
} }
}, },
handleCancel() { handleCancel() {
this.close({ tagName: '/shelfManage' }) this.close({ tagName: "/shelfManage" })
this.$router.push({ name: 'shelfManage' }) this.$router.push({ name: "shelfManage" })
this.close({ tagName: '/editContract' }) this.close({ tagName: "/editContract" })
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!