Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop
Commits
944fb473
提交
944fb473
authored
5月 28, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
90a27164
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
208 行增加
和
22 行删除
+208
-22
tableList.vue
src/components/base/tableList.vue
+0
-1
index.html
src/index.html
+5
-0
edit.vue
src/pages/goods/goods/edit.vue
+7
-1
add.vue
src/pages/order/add.vue
+76
-0
detail.vue
src/pages/order/detail.vue
+39
-1
index.vue
src/pages/order/index.vue
+13
-13
contact.vue
src/pages/setting/contact.vue
+61
-5
routes.js
src/router/routes.js
+6
-0
axios.js
src/utils/axios.js
+1
-1
没有找到文件。
src/components/base/tableList.vue
浏览文件 @
944fb473
...
@@ -185,7 +185,6 @@ export default {
...
@@ -185,7 +185,6 @@ export default {
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.table-list
{
.table-list
{
padding
:
10px
;
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/index.html
浏览文件 @
944fb473
...
@@ -13,9 +13,14 @@
...
@@ -13,9 +13,14 @@
id=
"viewport"
id=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no, viewport-fit=cover"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no, viewport-fit=cover"
/>
/>
<link
rel=
"stylesheet"
href=
"https://cache.amap.com/lbs/static/main1119.css"
/>
</head>
</head>
<body>
<body>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<script
src=
"https://webapp-pub.ezijing.com/plugins/tinymce/tinymce.min.js"
></script>
<script
src=
"https://webapp-pub.ezijing.com/plugins/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://webapi.amap.com/maps?v=2.0&key=572e880cdfcfc420c7a2604e337e4e39"
></script>
</body>
</body>
</html>
</html>
src/pages/goods/goods/edit.vue
浏览文件 @
944fb473
...
@@ -36,7 +36,13 @@
...
@@ -36,7 +36,13 @@
<p
class=
"form-tips"
>
在商品详情页标题下面展示卖点信息,建议60字以内
</p>
<p
class=
"form-tips"
>
在商品详情页标题下面展示卖点信息,建议60字以内
</p>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品图片"
prop=
"chart_oss"
>
<el-form-item
label=
"商品图片"
prop=
"chart_oss"
>
<app-upload
v-model=
"ruleForm.chart_oss"
multiple
list-type=
"picture-card"
accept=
"image/*"
></app-upload>
<app-upload
v-model=
"ruleForm.chart_oss"
list-type=
"picture-card"
accept=
"image/*"
multiple
:limit=
"15"
></app-upload>
<p
class=
"form-tips"
>
建议尺寸:800*800像素,你可以拖拽图片调整顺序,最多上传15张
</p>
<p
class=
"form-tips"
>
建议尺寸:800*800像素,你可以拖拽图片调整顺序,最多上传15张
</p>
</el-form-item>
</el-form-item>
<el-form-item
label=
"主图视频"
prop=
"main_chart_oss"
>
<el-form-item
label=
"主图视频"
prop=
"main_chart_oss"
>
...
...
src/pages/order/add.vue
0 → 100644
浏览文件 @
944fb473
<
template
>
<div>
<el-form
:model=
"ruleForm"
:rules=
"rules"
label-position=
"top"
ref=
"ruleForm"
@
submit
.
native
.
prevent
>
<app-card
title=
"用户信息"
>
<el-form-item
label=
"关联用户"
prop=
"customer_id"
>
<el-input
v-model=
"ruleForm.customer_id"
/>
</el-form-item>
</app-card>
<app-card
title=
"商品信息"
>
<el-form-item
label=
"关联商品"
prop=
"customer_id"
>
<el-input
v-model=
"ruleForm.customer_id"
/>
</el-form-item>
<el-form-item
label=
"商品规格"
prop=
"customer_id"
>
<el-input
v-model=
"ruleForm.customer_id"
/>
</el-form-item>
</app-card>
<app-card
title=
"外部订单信息"
></app-card>
<div
class=
"form-footer"
>
<div
class=
"inner"
>
<el-button
type=
"primary"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
新增
</el-button>
</div>
</div>
</el-form>
</div>
</
template
>
<
script
>
import
AppCard
from
'@/components/base/card'
export
default
{
components
:
{
AppCard
},
data
()
{
return
{
ruleForm
:
{
spu_id
:
''
,
customer_id
:
''
},
rules
:
{
spu_name
:
[{
required
:
true
,
message
:
'商品名称不可为空'
,
trigger
:
'blur'
}],
chart_oss
:
[{
required
:
true
,
message
:
'最少需要添加一张商品图'
,
trigger
:
'blur'
}]
}
}
},
computed
:
{
shopId
()
{
return
this
.
$store
.
state
.
shopId
}
},
methods
:
{
// 确定
submit
()
{
this
.
$refs
.
ruleForm
.
validate
().
then
(
this
.
handleAdd
)
},
handleAdd
()
{}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.el-form--label-top
.el-form-item__label
{
padding
:
0
;
}
.form-footer
{
position
:
sticky
;
bottom
:
0
;
z-index
:
118
;
border-top
:
0
.5px
solid
rgba
(
0
,
0
,
0
,
0
.05
);
background-color
:
rgba
(
255
,
255
,
255
,
0
.95
);
.inner
{
height
:
80px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
</
style
>
src/pages/order/detail.vue
浏览文件 @
944fb473
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
<el-steps
:active=
"stepActive"
align-center
>
<el-steps
:active=
"stepActive"
align-center
>
<el-step
title=
"买家下单"
:description=
"data.create_time"
></el-step>
<el-step
title=
"买家下单"
:description=
"data.create_time"
></el-step>
<el-step
title=
"买家付款"
:description=
"data.pay_time"
></el-step>
<el-step
title=
"买家付款"
:description=
"data.pay_time"
></el-step>
<el-step
title=
"交易成功"
:description=
"data.update_time"
></el-step>
<el-step
title=
"交易成功"
>
<template
#
description
>
{{
data
.
update_time
}}
</
template
>
</el-step>
</el-steps>
</el-steps>
<!-- <el-row>
<!-- <el-row>
<el-col :span="8"></el-col>
<el-col :span="8"></el-col>
...
@@ -72,6 +74,22 @@
...
@@ -72,6 +74,22 @@
</div>
</div>
</
template
>
</
template
>
</table-list>
</table-list>
<div
class=
"order-footer"
>
<div
class=
"order-footer-item"
>
<div
class=
"order-footer-item__label"
>
商品总价:
</div>
<div
class=
"order-footer-item__content"
>
¥{{ data.product_price }}
</div>
</div>
<div
class=
"order-footer-item"
>
<div
class=
"order-footer-item__label"
>
优惠:
</div>
<div
class=
"order-footer-item__content"
>
¥{{ data.district_money }}
</div>
</div>
<div
class=
"order-footer-item"
>
<div
class=
"order-footer-item__label"
><b>
实收金额:
</b></div>
<div
class=
"order-footer-item__content"
>
<span
class=
"totalPrice"
>
¥{{ data.payment_money }}
</span>
</div>
</div>
</div>
</app-card>
</app-card>
</template>
</template>
...
@@ -211,4 +229,24 @@ export default {
...
@@ -211,4 +229,24 @@ export default {
flex
:
1
;
flex
:
1
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.order-footer-item
{
margin-top
:
10px
;
display
:
flex
;
justify-content
:
flex-end
;
}
.order-footer-item__label
{
width
:
100px
;
text-align
:
right
;
}
.order-footer-item__content
{
width
:
120px
;
text-align
:
right
;
}
.total
{
font-weight
:
700
;
}
.totalPrice
{
font-size
:
18px
;
color
:
#d40000
;
}
</
style
>
</
style
>
src/pages/order/index.vue
浏览文件 @
944fb473
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<el-tab-pane
:label=
"item.label"
:name=
"item.name"
v-for=
"item in tabList"
:key=
"item.name"
></el-tab-pane>
<el-tab-pane
:label=
"item.label"
:name=
"item.name"
v-for=
"item in tabList"
:key=
"item.name"
></el-tab-pane>
</el-tabs>
</el-tabs>
<template
#
header-aside
>
<template
#
header-aside
>
<router-link
to=
"/
goods
/add"
>
<router-link
to=
"/
order
/add"
>
<el-button
type=
"primary"
>
新增订单
</el-button>
<el-button
type=
"primary"
>
新增订单
</el-button>
</router-link>
</router-link>
</
template
>
</
template
>
...
@@ -45,12 +45,12 @@ export default {
...
@@ -45,12 +45,12 @@ export default {
activeName
:
'0'
,
activeName
:
'0'
,
tabList
:
[
tabList
:
[
{
label
:
'全部'
,
name
:
'0'
},
{
label
:
'全部'
,
name
:
'0'
},
{
label
:
'待付款'
,
name
:
'
2
'
},
{
label
:
'待付款'
,
name
:
'
1
'
},
{
label
:
'待发货'
,
name
:
'
3
'
},
{
label
:
'待发货'
,
name
:
'
2
'
},
{
label
:
'已发货'
,
name
:
'
4
'
},
{
label
:
'已发货'
,
name
:
'
3
'
},
{
label
:
'已完成'
,
name
:
'
5
'
},
{
label
:
'已完成'
,
name
:
'
4
'
},
{
label
:
'已关闭'
,
name
:
'
6
'
},
{
label
:
'已关闭'
,
name
:
'
5
'
},
{
label
:
'售后中'
,
name
:
'
7
'
}
{
label
:
'售后中'
,
name
:
'
6
'
}
]
]
}
}
},
},
...
@@ -73,12 +73,12 @@ export default {
...
@@ -73,12 +73,12 @@ export default {
type
:
'select'
,
type
:
'select'
,
prop
:
'order_status'
,
prop
:
'order_status'
,
options
:
[
options
:
[
{
label
:
'待付款'
,
name
:
'
2
'
},
{
label
:
'待付款'
,
name
:
'
1
'
},
{
label
:
'待发货'
,
name
:
'
3
'
},
{
label
:
'待发货'
,
name
:
'
2
'
},
{
label
:
'已发货'
,
name
:
'
4
'
},
{
label
:
'已发货'
,
name
:
'
3
'
},
{
label
:
'已完成'
,
name
:
'
5
'
},
{
label
:
'已完成'
,
name
:
'
4
'
},
{
label
:
'已关闭'
,
name
:
'
6
'
},
{
label
:
'已关闭'
,
name
:
'
5
'
},
{
label
:
'售后中'
,
name
:
'
7
'
}
{
label
:
'售后中'
,
name
:
'
6
'
}
],
],
valueKey
:
'name'
valueKey
:
'name'
}
}
...
...
src/pages/setting/contact.vue
浏览文件 @
944fb473
<
template
>
<
template
>
<app-card>
<app-card>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
style=
"width: 400px"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
>
<el-form-item
label=
"客户电话"
prop=
"shop_tel"
>
<el-form-item
label=
"客户电话"
prop=
"shop_tel"
>
<el-input
v-model=
"ruleForm.shop_tel"
></el-input>
<el-input
v-model=
"ruleForm.shop_tel"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"详细地址"
prop=
"shop_address"
>
<el-form-item
label=
"详细地址"
prop=
"shop_address"
>
<el-input
v-model=
"ruleForm.shop_address"
>
<el-input
v-model=
"ruleForm.shop_address"
>
<template
#
append
>
<template
#
append
>
<el-button>
搜索地图
</el-button>
<el-button
@
click=
"mapSearch"
>
搜索地图
</el-button>
</
template
>
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<div
class=
"map"
>
<div
id=
"map-container"
></div>
<div
id=
"map-panel"
></div>
</div>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
保存
</el-button>
</el-form-item>
</el-form-item>
...
@@ -25,11 +29,13 @@ export default {
...
@@ -25,11 +29,13 @@ export default {
components
:
{
AppCard
},
components
:
{
AppCard
},
data
()
{
data
()
{
return
{
return
{
ruleForm
:
{
shop_tel
:
''
,
shop_address
:
''
},
ruleForm
:
{
shop_tel
:
''
,
shop_address
:
''
,
shop_pos
:
''
},
rules
:
{
rules
:
{
shop_tel
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_tel
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_address
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
shop_address
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
},
map
:
null
,
placeSearch
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -55,9 +61,59 @@ export default {
...
@@ -55,9 +61,59 @@ export default {
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
this
.
$store
.
dispatch
(
'getShop'
)
this
.
$store
.
dispatch
(
'getShop'
)
})
})
},
initMap
()
{
this
.
map
=
new
window
.
AMap
.
Map
(
'map-container'
,
{
resizeEnable
:
true
,
zoom
:
18
,
center
:
[
116.24582
,
40.222615
]
})
window
.
AMap
.
plugin
([
'AMap.PlaceSearch'
],
()
=>
{
// 构造地点查询类
this
.
placeSearch
=
new
window
.
AMap
.
PlaceSearch
({
pageSize
:
5
,
// 单页显示结果条数
pageIndex
:
1
,
// 页码
map
:
this
.
map
,
// 展现结果的地图实例
panel
:
'map-panel'
,
// 结果列表将在此容器中进行展示。
autoFitView
:
true
// 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
})
this
.
placeSearch
.
on
(
'selectChanged'
,
e
=>
{
const
data
=
e
.
selected
.
data
this
.
ruleForm
.
shop_address
=
data
.
cityname
+
data
.
adname
+
data
.
name
this
.
ruleForm
.
shop_pos
=
JSON
.
stringify
(
data
.
location
.
pos
)
console
.
log
(
data
)
})
})
},
mapSearch
()
{
// 关键字查询
this
.
placeSearch
.
search
(
this
.
ruleForm
.
shop_address
)
}
}
},
mounted
()
{
this
.
initMap
()
},
destroyed
()
{
this
.
map
&&
this
.
map
.
destroy
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
.map
{
position
:
relative
;
height
:
480px
;
}
#map-container
{
height
:
480px
;
}
#map-panel
{
position
:
absolute
;
background-color
:
white
;
max-height
:
90%
;
overflow-y
:
auto
;
top
:
10px
;
right
:
10px
;
width
:
280px
;
}
</
style
>
src/router/routes.js
浏览文件 @
944fb473
...
@@ -75,6 +75,12 @@ export default [
...
@@ -75,6 +75,12 @@ export default [
path
:
'detail/:id'
,
path
:
'detail/:id'
,
component
:
()
=>
import
(
/* webpackChunkName: "order" */
'@/pages/order/detail'
),
component
:
()
=>
import
(
/* webpackChunkName: "order" */
'@/pages/order/detail'
),
meta
:
{
title
:
'订单详情'
}
meta
:
{
title
:
'订单详情'
}
},
{
name
:
'orderAdd'
,
path
:
'add'
,
component
:
()
=>
import
(
/* webpackChunkName: "order" */
'@/pages/order/add'
),
meta
:
{
title
:
'新增订单'
}
}
}
]
]
},
},
...
...
src/utils/axios.js
浏览文件 @
944fb473
...
@@ -35,7 +35,7 @@ httpRequest.interceptors.response.use(
...
@@ -35,7 +35,7 @@ httpRequest.interceptors.response.use(
function
(
response
)
{
function
(
response
)
{
const
{
data
}
=
response
const
{
data
}
=
response
if
(
data
.
code
)
{
if
(
data
.
code
)
{
if
(
!
[
1010
].
includes
(
data
.
code
))
{
if
(
!
[
1010
,
1001
].
includes
(
data
.
code
))
{
Message
.
error
(
data
.
msg
||
data
.
message
)
Message
.
error
(
data
.
msg
||
data
.
message
)
}
}
return
Promise
.
reject
(
data
)
return
Promise
.
reject
(
data
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论