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 e746d531
authored
May 27, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 优化
1 parent
78d10b7c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
44 deletions
src/store/modules/goodsInfoData/index.js
src/views/goods/shelfManage/components/editCon/BaseInfo.vue
src/views/goods/shelfManage/editContract.vue
src/views/goods/shelfManage/editMultilateralContract.vue
src/store/modules/goodsInfoData/index.js
View file @
e746d53
import
{
getGoodsCategoryConfiguration
}
from
"@/api/sys.base.js"
import
{
getGoodsCategoryConfiguration
}
from
"@/api/sys.base.js"
import
{
getAllGoodsList
}
from
"@api/grounding"
import
{
getAllGoodsList
}
from
"@api/grounding"
import
{
merchantSettleDistributeRuleLastRule
}
from
"@api/shelfManage"
import
{
merchantSettleDistributeRuleLastRule
}
from
"@api/shelfManage"
import
{
set
}
from
"nprogress"
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
state
:
{
state
:
{
...
@@ -138,12 +139,32 @@ export default {
...
@@ -138,12 +139,32 @@ export default {
data
:
response
.
list
,
data
:
response
.
list
,
name
:
"goodsCategoryConfigurationList"
name
:
"goodsCategoryConfigurationList"
})
})
// 判断一下是商户多还是分账规则多, 去最大值做loading
const
{
createBusinessApproveMerchantList
,
merchantSettleDistributeRule
}
=
response
let
timeNum
=
Math
.
max
(
createBusinessApproveMerchantList
?.
length
||
0
,
merchantSettleDistributeRule
?.
goodsTypeGroupRules
||
0
,
15
)
console
.
log
(
timeNum
,
"timeNum"
)
timeNum
=
timeNum
>=
15
?
timeNum
:
0
console
.
log
(
timeNum
,
"timeNum"
)
setTimeout
(()
=>
{
commit
(
"SET_LOADING"
,
{
isLoading
:
false
,
name
:
"isLoadingGoodsCategoryConfiguration"
})
},
timeNum
*
1000
)
return
response
.
list
return
response
.
list
}
finally
{
}
finally
{
commit
(
"SET_LOADING"
,
{
//
commit("SET_LOADING", {
isLoading
:
false
,
//
isLoading: false,
name
:
"isLoadingGoodsCategoryConfiguration"
//
name: "isLoadingGoodsCategoryConfiguration"
})
//
})
commit
(
"SET_PROMISE"
,
{
commit
(
"SET_PROMISE"
,
{
promise
:
null
,
promise
:
null
,
name
:
"promiseGetGoodsCategoryConfiguration"
name
:
"promiseGetGoodsCategoryConfiguration"
...
@@ -270,6 +291,9 @@ export default {
...
@@ -270,6 +291,9 @@ export default {
firstLineSunshine2OnlinePointsFlagAsync
(
state
)
{
firstLineSunshine2OnlinePointsFlagAsync
(
state
)
{
return
state
.
firstLineSunshine2OnlinePointsFlag
return
state
.
firstLineSunshine2OnlinePointsFlag
},
},
isLoadingGoodsCategoryConfiguration
(
state
)
{
return
state
.
isLoadingGoodsCategoryConfiguration
},
shelfType
(
state
)
{
shelfType
(
state
)
{
// 多商户
// 多商户
return
(
return
(
...
...
src/views/goods/shelfManage/components/editCon/BaseInfo.vue
View file @
e746d53
...
@@ -6,12 +6,8 @@
...
@@ -6,12 +6,8 @@
</div>
</div>
<div
style=
"padding: 20px 20px 0"
>
<div
style=
"padding: 20px 20px 0"
>
<el-form
:model=
"basicInfo"
label-width=
"150px"
>
<el-form
:model=
"basicInfo"
label-width=
"150px"
>
<el-form-item
<el-form-item
v-for=
"(item, index) in editFormData"
:key=
"index"
class=
"form-item"
v-for=
"(item, index) in editFormData"
:style=
"
{ width: [2, 7].includes(item.inputType) ? '100%' : '48%' }">
:key=
"index"
class=
"form-item"
:style=
"
{ width: [2, 7].includes(item.inputType) ? '100%' : '48%' }"
>
<span
slot=
"label"
class=
"label"
>
{{
item
.
title
}}
:
</span>
<span
slot=
"label"
class=
"label"
>
{{
item
.
title
}}
:
</span>
<div
v-if=
"item.inputType == 7"
>
<div
v-if=
"item.inputType == 7"
>
<div
v-if=
"item.fileList.length == 0"
>
-
</div>
<div
v-if=
"item.fileList.length == 0"
>
-
</div>
...
@@ -24,7 +20,7 @@
...
@@ -24,7 +20,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<span
v-else
>
{{
item
.
showValue
||
"-"
}}
</span>
<span
v-else
class=
"rich-text"
>
{{
item
.
showValue
||
"-"
}}
</span>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -37,7 +33,7 @@ export default {
...
@@ -37,7 +33,7 @@ export default {
props
:
{
props
:
{
basicInfo
:
{
basicInfo
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
}
},
},
...
@@ -58,7 +54,7 @@ export default {
...
@@ -58,7 +54,7 @@ export default {
}
}
},
},
mounted
()
{},
mounted
()
{
},
methods
:
{
methods
:
{
dealFormData
()
{
dealFormData
()
{
...
@@ -88,7 +84,7 @@ export default {
...
@@ -88,7 +84,7 @@ export default {
url
:
this
.
basicInfo
.
goodsCreateExcel
,
url
:
this
.
basicInfo
.
goodsCreateExcel
,
fileName
:
fileName
:
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
)[
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
)[
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
).
length
-
1
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
).
length
-
1
]
]
})
})
}
}
...
@@ -97,7 +93,7 @@ export default {
...
@@ -97,7 +93,7 @@ export default {
url
:
this
.
basicInfo
.
submitGoodsCreateExcel
,
url
:
this
.
basicInfo
.
submitGoodsCreateExcel
,
fileName
:
fileName
:
this
.
basicInfo
.
submitGoodsCreateExcel
.
split
(
"/"
)[
this
.
basicInfo
.
submitGoodsCreateExcel
.
split
(
"/"
)[
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
).
length
-
1
this
.
basicInfo
.
goodsCreateExcel
.
split
(
"/"
).
length
-
1
]
]
})
})
}
}
...
@@ -139,5 +135,11 @@ export default {
...
@@ -139,5 +135,11 @@ export default {
.download
{
.download
{
margin-left
:
8px
;
margin-left
:
8px
;
}
}
.rich-text
{
display
:
inline-block
;
max-width
:
90%
;
overflow-wrap
:
break-word
;
}
}
}
</
style
>
</
style
>
src/views/goods/shelfManage/editContract.vue
View file @
e746d53
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
-->
-->
<!-- 编辑 - 运营确认 -->
<!-- 编辑 - 运营确认 -->
<
template
>
<
template
>
<d2-container
class=
"edit-contract"
v-loading=
"isLoad"
>
<d2-container
class=
"edit-contract"
v-loading=
"isLoad
ingGoodsCategoryConfiguration
"
>
<!-- 基础信息 -->
<!-- 基础信息 -->
<base-info
:basic-info=
"basicInfo"
></base-info>
<base-info
:basic-info=
"basicInfo"
></base-info>
<!-- 流量方信息 -->
<!-- 流量方信息 -->
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapActions
,
mapMutations
}
from
"vuex"
import
{
mapActions
,
mapMutations
,
mapGetters
}
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"
...
@@ -54,6 +54,14 @@ const getBackoffInterval = (attempt, base = 1000) =>
...
@@ -54,6 +54,14 @@ const getBackoffInterval = (attempt, base = 1000) =>
Math
.
min
(
base
*
2
**
attempt
,
30000
)
// 最大间隔30秒
Math
.
min
(
base
*
2
**
attempt
,
30000
)
// 最大间隔30秒
export
default
{
export
default
{
name
:
"EditContract"
,
name
:
"EditContract"
,
components
:
{
BaseInfo
,
ShopMerchantInfo
,
AddMerchant
,
GoodsInfo
,
DivisionConfig
,
FinanceConfig
},
data
()
{
data
()
{
return
{
return
{
routeObj
:
{},
routeObj
:
{},
...
@@ -74,15 +82,12 @@ export default {
...
@@ -74,15 +82,12 @@ export default {
MAX_DURATION
:
5
*
60
*
1000
// 5分钟超时
MAX_DURATION
:
5
*
60
*
1000
// 5分钟超时
}
}
},
},
computed
:
{
components
:
{
...
mapGetters
(
"goodsInfoData"
,
{
BaseInfo
,
isLoadingGoodsCategoryConfiguration
:
"isLoadingGoodsCategoryConfiguration"
ShopMerchantInfo
,
})
AddMerchant
,
GoodsInfo
,
DivisionConfig
,
FinanceConfig
},
},
created
()
{
created
()
{
this
.
isLoad
=
true
this
.
isLoad
=
true
this
.
routeObj
=
this
.
$route
.
query
this
.
routeObj
=
this
.
$route
.
query
...
...
src/views/goods/shelfManage/editMultilateralContract.vue
View file @
e746d53
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
-->
-->
<!-- 编辑 - 运营确认 -->
<!-- 编辑 - 运营确认 -->
<
template
>
<
template
>
<d2-container
class=
"edit-contract"
v-loading=
"isLoad"
>
<d2-container
class=
"edit-contract"
v-loading=
"isLoad
ingGoodsCategoryConfiguration
"
>
<!-- 基础信息 -->
<!-- 基础信息 -->
<base-info
:basic-info=
"basicInfo"
></base-info>
<base-info
:basic-info=
"basicInfo"
></base-info>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapActions
,
mapMutations
}
from
"vuex"
import
{
mapActions
,
mapMutations
,
mapGetters
}
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
multilateralShopMerchant
from
"./components/editMultilateralCon/multilateralShopMerchant"
import
multilateralShopMerchant
from
"./components/editMultilateralCon/multilateralShopMerchant"
...
@@ -56,6 +56,15 @@ const getBackoffInterval = (attempt, base = 1000) =>
...
@@ -56,6 +56,15 @@ const getBackoffInterval = (attempt, base = 1000) =>
Math
.
min
(
base
*
2
**
attempt
,
30000
)
// 最大间隔30秒
Math
.
min
(
base
*
2
**
attempt
,
30000
)
// 最大间隔30秒
export
default
{
export
default
{
name
:
"EditMultilateralContract"
,
name
:
"EditMultilateralContract"
,
components
:
{
BaseInfo
,
// ShopMerchantInfo,
AddMerchant
,
GoodsInfo
,
DivisionConfig
,
FinanceConfig
,
multilateralShopMerchant
},
data
()
{
data
()
{
return
{
return
{
routeObj
:
{},
routeObj
:
{},
...
@@ -77,14 +86,11 @@ export default {
...
@@ -77,14 +86,11 @@ export default {
}
}
},
},
components
:
{
BaseInfo
,
computed
:
{
// ShopMerchantInfo,
...
mapGetters
(
"goodsInfoData"
,
{
AddMerchant
,
isLoadingGoodsCategoryConfiguration
:
"isLoadingGoodsCategoryConfiguration"
GoodsInfo
,
})
DivisionConfig
,
FinanceConfig
,
multilateralShopMerchant
},
},
created
()
{
created
()
{
this
.
routeObj
=
this
.
$route
.
query
this
.
routeObj
=
this
.
$route
.
query
...
@@ -92,7 +98,6 @@ export default {
...
@@ -92,7 +98,6 @@ export default {
// this.getMerchantSettleDistributeRuleLastRule()
// this.getMerchantSettleDistributeRuleLastRule()
},
},
mounted
()
{
mounted
()
{
this
.
getBasicDetail
()
this
.
getBasicDetail
()
this
.
$EventBus
.
$on
(
"requestData"
,
this
.
sendData
)
this
.
$EventBus
.
$on
(
"requestData"
,
this
.
sendData
)
// 页面可见性监听
// 页面可见性监听
...
@@ -135,11 +140,6 @@ export default {
...
@@ -135,11 +140,6 @@ export default {
// }
// }
this
.
merchantEditData
=
res
.
createBusinessApproveMerchantList
||
[]
this
.
merchantEditData
=
res
.
createBusinessApproveMerchantList
||
[]
console
.
log
(
this
.
merchantEditData
,
' this.merchantEditData'
)
console
.
log
(
this
.
merchantEditData
,
' this.merchantEditData'
)
// this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: this.merchantEditData.merchantId,
// merchantName: this.merchantEditData.merchantName,
// scene: this.merchantEditData.sceneType
// })
this
.
SET_DATA
({
this
.
SET_DATA
({
name
:
"shelfUpdateMerchant"
,
name
:
"shelfUpdateMerchant"
,
data
:
{
data
:
{
...
@@ -148,9 +148,6 @@ export default {
...
@@ -148,9 +148,6 @@ export default {
scene
:
this
.
merchantEditData
[
0
].
sceneType
scene
:
this
.
merchantEditData
[
0
].
sceneType
}
}
})
})
// })
// .finally(() => {
// })
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
isLoad
=
false
this
.
isLoad
=
false
},
3000
)
},
3000
)
...
...
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