Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ab95d87c
authored
Oct 02, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade:优化门店的 list 列表,新增是否自提的配置项
parent
a9bbbc7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
34 deletions
+28
-34
src/views/mall/trade/config/index.vue
+4
-1
src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue
+12
-26
src/views/mall/trade/delivery/pickUpStore/index.vue
+12
-7
No files found.
src/views/mall/trade/config/index.vue
View file @
ab95d87c
...
...
@@ -64,6 +64,9 @@
商城商品满多少金额即可包邮,单位:元
</el-text>
</el-form-item>
<el-form-item
label=
"启用门店自提"
prop=
"deliveryPickUpEnabled"
>
<el-switch
v-model=
"formData.deliveryPickUpEnabled"
style=
"user-select: none"
/>
</el-form-item>
</el-tab-pane>
<!-- 分销 -->
<el-tab-pane
label=
"分销"
>
...
...
@@ -206,7 +209,6 @@
<
script
setup
lang=
"ts"
>
import
*
as
ConfigApi
from
'@/api/mall/trade/config'
import
{
BrokerageBindModeEnum
,
BrokerageEnabledConditionEnum
}
from
'@/utils/constants'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
defineOptions
({
name
:
'TradeConfig'
})
...
...
@@ -221,6 +223,7 @@ const formData = ref({
afterSaleReturnReasons
:
[],
deliveryExpressFreeEnabled
:
false
,
deliveryExpressFreePrice
:
0
,
deliveryPickUpEnabled
:
false
,
brokerageEnabled
:
false
,
brokerageEnabledCondition
:
undefined
,
brokerageBindMode
:
undefined
,
...
...
src/views/mall/trade/delivery/pickUpStore/PickUpStoreForm.vue
View file @
ab95d87c
...
...
@@ -51,7 +51,7 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"门店所在地区"
prop=
"areaId"
>
<el-cascader
v-model=
"formData.areaId"
:options=
"areaList"
:props=
"
areaTree
Props"
/>
<el-cascader
v-model=
"formData.areaId"
:options=
"areaList"
:props=
"
default
Props"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -99,7 +99,7 @@
</el-col>
</el-row>
<el-form-item
label=
"获取经纬度"
>
<el-button
type=
"primary"
@
click=
"mapDialogVisible
.value
= true"
>
获取
</el-button>
<el-button
type=
"primary"
@
click=
"mapDialogVisible = true"
>
获取
</el-button>
</el-form-item>
</el-form>
<template
#
footer
>
...
...
@@ -121,8 +121,9 @@
import
*
as
DeliveryPickUpStoreApi
from
'@/api/mall/trade/delivery/pickUpStore'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
import
{
defaultProps
}
from
'@/utils/tree'
import
{
getAreaTree
}
from
'@/api/system/area'
import
*
as
ConfigApi
from
'@/api/
infra
/config'
import
*
as
ConfigApi
from
'@/api/
mall/trade
/config'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -161,12 +162,6 @@ const formRules = reactive({
status
:
[{
required
:
true
,
message
:
'开启状态不能为空'
,
trigger
:
'blur'
}]
})
const
formRef
=
ref
()
// 表单 Ref
const
areaTreeProps
=
{
children
:
'children'
,
label
:
'name'
,
value
:
'id'
,
emitPath
:
false
}
const
areaList
=
ref
()
// 区域树
const
tencentLbsUrl
=
ref
(
''
)
// 腾讯位置服务 url
...
...
@@ -244,16 +239,8 @@ const selectAddress = function (loc: any): void {
mapDialogVisible
.
value
=
false
}
/** 初始化数据 */
const
initData
=
async
()
=>
{
formLoading
.
value
=
true
try
{
const
data
=
await
getAreaTree
()
areaList
.
value
=
data
}
finally
{
formLoading
.
value
=
false
}
// TODO @jason:要不创建一个 initTencentLbsMap
/** 初始化腾讯地图 */
const
initTencentLbsMap
=
async
()
=>
{
window
.
selectAddress
=
selectAddress
window
.
addEventListener
(
'message'
,
...
...
@@ -267,17 +254,16 @@ const initData = async () => {
},
false
)
const
data
=
await
ConfigApi
.
getConfigKey
(
'tencent.lbs.key'
)
let
key
=
''
if
(
data
&&
data
.
length
>
0
)
{
key
=
data
}
const
data
=
await
ConfigApi
.
getTradeConfig
()
const
key
=
data
.
tencentLbsKey
tencentLbsUrl
.
value
=
`https://apis.map.qq.com/tools/locpicker?type=1&key=
${
key
}
&referer=myapp`
}
/** 初始化 **/
onMounted
(()
=>
{
initData
()
onMounted
(
async
()
=>
{
areaList
.
value
=
await
getAreaTree
()
// 加载地图
await
initTencentLbsMap
()
})
</
script
>
<
style
lang=
"scss"
>
...
...
src/views/mall/trade/delivery/pickUpStore/index.vue
View file @
ab95d87c
...
...
@@ -65,16 +65,21 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号"
prop=
"id"
/>
<el-table-column
label=
"门店 logo"
prop=
"logo"
>
<el-table-column
label=
"编号"
min-width=
"80"
prop=
"id"
/>
<el-table-column
label=
"门店 logo"
min-width=
"100"
prop=
"logo"
>
<template
#
default=
"scope"
>
<img
v-if=
"scope.row.logo"
:src=
"scope.row.logo"
alt=
"门店 logo"
class=
"h-
10
0px"
/>
<img
v-if=
"scope.row.logo"
:src=
"scope.row.logo"
alt=
"门店 logo"
class=
"h-
5
0px"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"门店名称"
prop=
"name"
/>
<el-table-column
label=
"门店手机"
prop=
"phone"
/>
<el-table-column
align=
"center"
label=
"门店详细地址"
prop=
"detailAddress"
/>
<el-table-column
align=
"center"
label=
"开启状态"
prop=
"status"
>
<el-table-column
label=
"门店名称"
min-width=
"150"
prop=
"name"
/>
<el-table-column
label=
"门店手机"
min-width=
"100"
prop=
"phone"
/>
<el-table-column
label=
"地址"
min-width=
"100"
prop=
"detailAddress"
/>
<el-table-column
label=
"营业时间"
min-width=
"180"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
openingTime
}}
~
{{
scope
.
row
.
closingTime
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"开启状态"
min-width=
"100"
prop=
"status"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMON_STATUS"
:value=
"scope.row.status"
/>
</
template
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment