Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1f033386
authored
Feb 28, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 功能联调
1 parent
bd5ff9e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
45 deletions
src/views/goods/shelfManage/components/editCon/DivisionConfig.vue
src/views/goods/shelfManage/components/editCon/components/classificationCpt.vue
src/views/goods/shelfManage/editContract.vue
src/views/goods/shelfManage/components/editCon/DivisionConfig.vue
View file @
1f03338
...
@@ -785,25 +785,38 @@ export default {
...
@@ -785,25 +785,38 @@ export default {
return
obj
&&
flag
return
obj
&&
flag
},
},
async
submit
()
{
async
submit
()
{
const
res
=
await
this
.
handlerConfirm
()
// const res = await this.handlerConfirm()
const
goodsTypeGroupRules
=
await
this
.
getGoodsTypeGroupRules
(
// const goodsTypeGroupRules = await this.getGoodsTypeGroupRules(
this
.
editableTabs
// this.editableTabs
)
// )
if
(
!
this
.
checkParamsType
(
res
,
goodsTypeGroupRules
))
{
// console.log(res, goodsTypeGroupRules, "goodsTypeGroupRules")
this
.
$message
.
warning
(
"请完善分账规则"
)
// if (!this.checkParamsType(res, goodsTypeGroupRules)) {
return
false
// this.$message.warning("请完善分账规则")
}
// return false
// }
try
{
try
{
// 并行执行关键异步操作
const
[
res
,
goodsTypeGroupRules
]
=
await
Promise
.
all
([
this
.
handlerConfirm
(),
this
.
getGoodsTypeGroupRules
(
this
.
editableTabs
)
])
if
(
!
this
.
checkParamsType
(
res
,
goodsTypeGroupRules
))
{
this
.
$message
.
warning
(
"请完善分账规则"
)
return
}
this
.
submitParams
=
{
this
.
submitParams
=
{
...
res
,
...
res
,
goodsTypeGroupRules
goodsTypeGroupRules
}
}
console
.
log
(
this
.
submitParams
,
"this.submitParams "
)
//
console.log(this.submitParams, "this.submitParams ")
this
.
checkCalculateType
()
this
.
checkCalculateType
()
this
.
verificationCodeVisible
=
true
this
.
verificationCodeVisible
=
true
console
.
log
(
this
.
submitParams
,
"this.submitParams "
)
console
.
log
(
this
.
submitParams
,
"this.submitParams "
)
return
true
return
true
}
catch
(
error
)
{}
}
catch
(
error
)
{
console
.
log
(
error
,
"submitError"
)
}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验
},
},
checkCalculateType
()
{
checkCalculateType
()
{
...
...
src/views/goods/shelfManage/components/editCon/components/classificationCpt.vue
View file @
1f03338
...
@@ -1445,10 +1445,8 @@ export default {
...
@@ -1445,10 +1445,8 @@ export default {
this
.
$refs
.
classification
.
validate
(
async
(
valid
)
=>
{
this
.
$refs
.
classification
.
validate
(
async
(
valid
)
=>
{
// console.log(valid)
// console.log(valid)
if
(
valid
)
{
if
(
valid
)
{
// console.log(this.getParams())
const
obj
=
this
.
getParams
()
const
obj
=
this
.
getParams
()
const
res
=
await
this
.
$refs
.
tableAccount
.
handleConfirm
()
const
res
=
await
this
.
$refs
.
tableAccount
.
handleConfirm
()
// console.log("res", { ...obj, merchantDistributionRules: res })
res
res
?
resolve
({
...
obj
,
merchantDistributionRules
:
res
})
?
resolve
({
...
obj
,
merchantDistributionRules
:
res
})
:
resolve
(
false
)
:
resolve
(
false
)
...
@@ -1463,31 +1461,15 @@ export default {
...
@@ -1463,31 +1461,15 @@ export default {
const
res
=
this
.
$refs
.
tableAccount
.
getTableAccountParams
()
const
res
=
this
.
$refs
.
tableAccount
.
getTableAccountParams
()
// console.log("res", { ...obj, merchantDistributionRules: res })
// console.log("res", { ...obj, merchantDistributionRules: res })
return
{
...
obj
,
merchantDistributionRules
:
res
}
return
{
...
obj
,
merchantDistributionRules
:
res
}
// : resolve(false)
// return new Promise((resolve, reject) => {
// this.$refs.classification.validate(async (valid) => {
// console.log(valid)
// if (valid) {
// // console.log(this.getParams())
// const obj = this.getParams()
// const res = await this.$refs.tableAccount.handleConfirm()
// console.log("res", { ...obj, merchantDistributionRules: res })
// res
// ? resolve({ ...obj, merchantDistributionRules: res })
// : resolve(false)
// } else {
// resolve(false)
// }
// })
// })
},
},
setCalculateError
(
index
,
item
,
flag
=
true
)
{
setCalculateError
(
index
,
item
,
flag
=
true
)
{
if
(
this
.
classificationObj
[
item
][
index
])
if
(
this
.
classificationObj
[
item
][
index
])
{
this
.
$set
(
this
.
$set
(
this
.
classificationObj
[
item
][
index
],
this
.
classificationObj
[
item
][
index
],
"calculateModeError"
,
"calculateModeError"
,
flag
flag
)
)
}
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
...
src/views/goods/shelfManage/editContract.vue
View file @
1f03338
...
@@ -103,22 +103,14 @@ export default {
...
@@ -103,22 +103,14 @@ export default {
console
.
log
(
"新建---"
)
console
.
log
(
"新建---"
)
this
.
addMerVisible
=
!
this
.
addMerVisible
this
.
addMerVisible
=
!
this
.
addMerVisible
},
},
handleConfirm
(
confirmType
)
{
// this.$refs.divisionConfig.submit()
async
handleConfirm
(
confirmType
)
{
// this.$refs.financeConfig.submit()
const
divisionSubmitResult
=
await
this
.
$refs
.
divisionConfig
.
submit
()
const
financeSubmitResult
=
await
this
.
$refs
.
financeConfig
.
submit
()
if
(
confirmType
==
"save"
)
{
if
(
confirmType
==
"save"
)
{
// console.log(
if
(
!
divisionSubmitResult
||
!
financeSubmitResult
)
{
// !this.$refs.shopMerchant.submit(),
// 校验失败,处理逻辑
// !this.$refs.divisionConfig.submit(),
return
// !this.$refs.financeConfig.submit()
// )
// 各模块校验
if
(
// !this.$refs.shopMerchant.submit() ||
!
this
.
$refs
.
divisionConfig
.
submit
()
||
!
this
.
$refs
.
financeConfig
.
submit
()
)
{
return
true
}
}
}
}
var
params
=
{
var
params
=
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment