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 {
return
obj
&&
flag
},
async
submit
()
{
const
res
=
await
this
.
handlerConfirm
()
const
goodsTypeGroupRules
=
await
this
.
getGoodsTypeGroupRules
(
this
.
editableTabs
)
if
(
!
this
.
checkParamsType
(
res
,
goodsTypeGroupRules
))
{
this
.
$message
.
warning
(
"请完善分账规则"
)
return
false
}
// const res = await this.handlerConfirm()
// const goodsTypeGroupRules = await this.getGoodsTypeGroupRules(
// this.editableTabs
// )
// console.log(res, goodsTypeGroupRules, "goodsTypeGroupRules")
// if (!this.checkParamsType(res, goodsTypeGroupRules)) {
// this.$message.warning("请完善分账规则")
// return false
// }
try
{
// 并行执行关键异步操作
const
[
res
,
goodsTypeGroupRules
]
=
await
Promise
.
all
([
this
.
handlerConfirm
(),
this
.
getGoodsTypeGroupRules
(
this
.
editableTabs
)
])
if
(
!
this
.
checkParamsType
(
res
,
goodsTypeGroupRules
))
{
this
.
$message
.
warning
(
"请完善分账规则"
)
return
}
this
.
submitParams
=
{
...
res
,
goodsTypeGroupRules
}
console
.
log
(
this
.
submitParams
,
"this.submitParams "
)
//
console.log(this.submitParams, "this.submitParams ")
this
.
checkCalculateType
()
this
.
verificationCodeVisible
=
true
console
.
log
(
this
.
submitParams
,
"this.submitParams "
)
return
true
}
catch
(
error
)
{}
}
catch
(
error
)
{
console
.
log
(
error
,
"submitError"
)
}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验
},
checkCalculateType
()
{
...
...
src/views/goods/shelfManage/components/editCon/components/classificationCpt.vue
View file @
1f03338
...
...
@@ -1445,10 +1445,8 @@ export default {
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
)
...
...
@@ -1463,31 +1461,15 @@ export default {
const
res
=
this
.
$refs
.
tableAccount
.
getTableAccountParams
()
// console.log("res", { ...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
)
{
if
(
this
.
classificationObj
[
item
][
index
])
if
(
this
.
classificationObj
[
item
][
index
])
{
this
.
$set
(
this
.
classificationObj
[
item
][
index
],
"calculateModeError"
,
flag
)
}
}
},
beforeDestroy
()
{
...
...
src/views/goods/shelfManage/editContract.vue
View file @
1f03338
...
...
@@ -103,22 +103,14 @@ export default {
console
.
log
(
"新建---"
)
this
.
addMerVisible
=
!
this
.
addMerVisible
},
handleConfirm
(
confirmType
)
{
// this.$refs.divisionConfig.submit()
// this.$refs.financeConfig.submit()
async
handleConfirm
(
confirmType
)
{
const
divisionSubmitResult
=
await
this
.
$refs
.
divisionConfig
.
submit
()
const
financeSubmitResult
=
await
this
.
$refs
.
financeConfig
.
submit
()
if
(
confirmType
==
"save"
)
{
// console.log(
// !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
if
(
!
divisionSubmitResult
||
!
financeSubmitResult
)
{
// 校验失败,处理逻辑
return
}
}
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