Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
4ff9ddc5
提交
4ff9ddc5
编写于
8月 20, 2020
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单管理接口联调
上级
ad17dc8a
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
360 行增加
和
227 行删除
+360
-227
index.js
src/utils/shop/index.js
+12
-1
order-detail.vue
src/views/goods/order-detail.vue
+17
-11
order-manage.vue
src/views/goods/order-manage.vue
+53
-21
create-shop.vue
src/views/shop/create-shop.vue
+189
-87
shop-list.vue
src/views/shop/shop-list.vue
+89
-107
未找到文件。
src/utils/shop/index.js
浏览文件 @
4ff9ddc5
...
...
@@ -19,7 +19,7 @@ export const queryStore = (params) => {
return
fetch
({
headers
,
url
:
getBaseUrl
(
`store/query`
),
method
:
'
ge
t'
,
method
:
'
pos
t'
,
data
:
params
,
description
:
'查询店铺信息'
,
})
...
...
@@ -33,4 +33,15 @@ export const queryOrderDetail = (orderId) => {
// params: params,
description
:
'查询订单详情'
,
})
};
///trade/order/admin/query/list
export
const
queryOrderList
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`trade/order/admin/query/list`
),
method
:
'get'
,
params
:
params
,
description
:
'查询订单列表'
,
})
};
\ No newline at end of file
src/views/goods/order-detail.vue
浏览文件 @
4ff9ddc5
...
...
@@ -4,11 +4,11 @@
<div
class=
"order-detail-content screenSet"
id=
"screenSet"
>
<div
class=
"header-title"
>
订单详情
</div>
<div
class=
"detail-all-info"
>
<div
class=
"trade-status"
v-if=
"orderStatus == 1"
><img
src=
"../../assets/image/order/order_status1.png"
/>
交易成功
</div>
<div
class=
"trade-status"
v-if=
"orderStatus == 2"
><img
src=
"../../assets/image/order/order_status2.png"
/>
已发货
</div>
<div
class=
"trade-status"
v-if=
"orderStatus == 3"
><img
src=
"../../assets/image/order/order_status3.png"
/>
待发货
</div>
<div
class=
"trade-status"
v-if=
"order
Status == 4"
><img
src=
"../../assets/image/order/order_status4.png"
/>
待支付
</div>
<div
class=
"trade-status"
v-if=
"orderStatus == 5"
><img
src=
"../../assets/image/order/order_status5.png"
/>
交易关闭
</div>
<div
class=
"trade-status"
v-if=
"order
DetailData.show
Status == 1"
><img
src=
"../../assets/image/order/order_status1.png"
/>
交易成功
</div>
<div
class=
"trade-status"
v-if=
"order
DetailData.show
Status == 2"
><img
src=
"../../assets/image/order/order_status2.png"
/>
已发货
</div>
<div
class=
"trade-status"
v-if=
"order
DetailData.show
Status == 3"
><img
src=
"../../assets/image/order/order_status3.png"
/>
待发货
</div>
<div
class=
"trade-status"
v-if=
"order
DetailData.showStatus == 4"
><img
src=
"../../assets/image/order/order_status4.png"
/>
等待买家付款
</div>
<div
class=
"trade-status"
v-if=
"order
DetailData.show
Status == 5"
><img
src=
"../../assets/image/order/order_status5.png"
/>
交易关闭
</div>
<div
class=
"trade-info"
>
<el-card
class=
"left-card"
>
<div
slot=
"header"
class=
"clearfix"
>
...
...
@@ -32,7 +32,7 @@
<div>
<p>
订单编号:
{{
orderDetailData
.
orderNo
}}
</p>
<p>
下单时间:
{{
orderDetailData
.
createdTime
}}
</p>
<p>
支付方式:
微信支付
</p>
<p>
支付方式:
{{
orderDetailData
.
payChannel
}}
</p>
<p>
支付时间:
{{
orderDetailData
.
paymentTime
}}
</p>
<p>
发货时间:
{{
orderDetailData
.
sendTime
}}
</p>
<p>
成交时间:
{{
orderDetailData
.
finishTime
}}
</p>
...
...
@@ -63,9 +63,9 @@
</el-table-column>
</el-table>
<div
class=
"total-set"
>
<p><span>
商品总额:
</span><span>
¥
180.00
</span></p>
<p><span>
优惠:
</span><span>
¥
10.00
</span></p>
<p
class=
"total-price"
><span>
实付:
</span><span>
¥
170.00
</span></p>
<p><span>
商品总额:
</span><span>
¥
{{orderDetailData.totalPrice}}
</span></p>
<p><span>
优惠:
</span><span>
¥
{{orderDetailData.totalCouponFee}}
</span></p>
<p
class=
"total-price"
><span>
实付:
</span><span>
¥
{{orderDetailData.amount}}
</span></p>
</div>
</div>
</div>
...
...
@@ -85,8 +85,9 @@
curmbSecond
:
'订单管理'
,
jumPathThird
:
'/order-manage'
,
curmbThird
:
'订单详情'
,
orderId
:
1
,
orderStatus
:
1
,
orderId
:
111
,
showStatus
:
1
,
storeType
:
null
,
orderDetailData
:
{
amount
:
''
,
//订单实付总金额
createdTime
:
''
,
//下单时间
...
...
@@ -103,11 +104,15 @@
totalPrice
:
''
,
//订单总金额
remark
:
''
,
//备注
sendTime
:
''
,
//发货时间
payChannel
:
''
,
//支付方式
showStatus
:
null
,
//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
},
tableData
:
[],
}
},
created
()
{
this
.
orderId
=
this
.
$route
.
query
.
id
;
this
.
init
();
},
methods
:
{
...
...
@@ -117,6 +122,7 @@
if
(
res
.
code
==
'000000'
)
{
const
{
goodsInfoDtoList
}
=
res
.
data
;
this
.
orderDetailData
=
{...
res
.
data
};
this
.
storeType
=
res
.
data
.
storeType
;
this
.
tableData
=
goodsInfoDtoList
;
}
})
...
...
src/views/goods/order-manage.vue
浏览文件 @
4ff9ddc5
...
...
@@ -7,17 +7,17 @@
<el-row
:gutter=
"30"
type=
"flex"
style=
"margin-top: 10px"
>
<el-col
:span=
"18"
>
<el-form-item
label=
"商品名称"
>
<el-input
v-model=
"searchForm.
n
ame"
size=
"small"
placeholder=
"请输入商品名称"
></el-input>
<el-input
v-model=
"searchForm.
goodsN
ame"
size=
"small"
placeholder=
"请输入商品名称"
></el-input>
</el-form-item>
<el-form-item
label=
"订单号"
>
<el-input
v-model=
"searchForm.
id
"
size=
"small"
placeholder=
"请输入订单号"
></el-input>
<el-input
v-model=
"searchForm.
orderNo
"
size=
"small"
placeholder=
"请输入订单号"
></el-input>
</el-form-item>
<el-form-item
label=
"买家名称"
>
<el-input
v-model=
"searchForm.
name
"
size=
"small"
placeholder=
"请输入买家名称"
></el-input>
<el-input
v-model=
"searchForm.
receiver
"
size=
"small"
placeholder=
"请输入买家名称"
></el-input>
</el-form-item>
<el-form-item
label=
"下单时间"
>
<el-date-picker
v-model=
"searchForm.order
Tim
e"
v-model=
"searchForm.order
Dat
e"
type=
"datetime"
size=
"small"
value-format=
"yyyy-MM-dd HH:mm:ss"
...
...
@@ -41,7 +41,7 @@
</el-tabs>
<el-table
:data=
"tableData"
border
max-height=
"1000"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"id"
label=
"订单号"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
n
ame"
label=
"商品名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
goodsN
ame"
label=
"商品名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"status"
label=
"交易状态"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
...
...
@@ -49,20 +49,20 @@
</el-table-column>
<el-table-column
prop=
"name"
label=
"实收款"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"买家"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
name
"
label=
"数量"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
nam
e"
label=
"规格"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
nam
e"
label=
"单价"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
goodsQuantity
"
label=
"数量"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
siz
e"
label=
"规格"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
pric
e"
label=
"单价"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createdTime"
label=
"下单时间"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
name
"
label=
"备注"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
comments
"
label=
"备注"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
min-width=
"250"
align=
"center"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<div>
<
el-button
@
click=
"closeTrade(scope.row)"
type=
"text"
size=
"small"
>
关闭交易
</el-button
>
<
el-button
@
click=
"changePrice(scope.row)"
type=
"text"
size=
"small"
>
修改价格
</el-button
>
<
!--
<el-button
@
click=
"closeTrade(scope.row)"
type=
"text"
size=
"small"
>
关闭交易
</el-button>
--
>
<
!--
<el-button
@
click=
"changePrice(scope.row)"
type=
"text"
size=
"small"
>
修改价格
</el-button>
--
>
<el-button
@
click=
"sendGoods(scope.row)"
type=
"text"
size=
"small"
>
发货
</el-button>
<el-button
@
click=
"distribute(scope.row)"
type=
"text"
size=
"small"
>
配送
</el-button>
<el-button
@
click=
"viewLogistics(scope.row)"
type=
"text"
size=
"small"
>
查看物流
</el-button>
...
...
@@ -188,6 +188,7 @@
// import { openLoading, closeLoading } from "../../utils/utils";
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
SendSetDialog
from
"@/components/shop/send-set-dialog"
;
import
{
queryOrderList
}
from
"@/utils/shop"
;
export
default
{
components
:
{
SendSetDialog
,
...
...
@@ -200,9 +201,12 @@
showAllFlag
:
false
,
showNewFlag
:
false
,
searchForm
:
{
name
:
''
,
id
:
''
,
orderTime
:
''
,
showStatus
:
-
1
,
storeId
:
0
,
goodsName
:
''
,
orderNo
:
''
,
receiver
:
''
,
orderDate
:
''
,
pageNo
:
1
,
pageSize
:
10
,
},
...
...
@@ -255,17 +259,28 @@
}
},
created
()
{
this
.
searchList
();
},
methods
:
{
searchList
(){
queryOrderList
(
this
.
searchForm
).
then
(
res
=>
{
console
.
log
(
'查询结果'
,
res
)
if
(
res
.
code
==
'000000'
)
{
this
.
tableData
=
res
.
data
.
orderSingleDtoList
;
this
.
totalRows
=
res
.
data
.
totalNum
;
}
})
},
resetForm
()
{
this
.
searchForm
=
{
name
:
''
,
id
:
''
,
orderTime
:
''
showStatus
:
-
1
,
storeId
:
0
,
goodsName
:
''
,
orderNo
:
''
,
receiver
:
''
,
orderDate
:
''
,
pageNo
:
1
,
pageSize
:
10
,
};
this
.
searchList
();
},
...
...
@@ -308,7 +323,24 @@
this
.
searchForm
.
pageNo
=
val
;
this
.
searchList
();
},
handleClick
(
tab
,
event
)
{},
handleClick
(
tab
,
event
)
{
//-1全部,1已完成,2已发货,3待发货,4待支付,5交易关闭
if
(
tab
==
'all'
)
{
//全部
this
.
searchForm
.
showStatus
=
-
1
;
}
else
if
(
tab
==
'first'
)
{
//等待买家付款
this
.
searchForm
.
showStatus
=
4
;
}
else
if
(
tab
==
'second'
)
{
//待发货
this
.
searchForm
.
showStatus
=
3
;
}
else
if
(
tab
==
'third'
)
{
//已发货
this
.
searchForm
.
showStatus
=
2
;
}
else
if
(
tab
==
'fourth'
)
{
//交易成功
this
.
searchForm
.
showStatus
=
1
;
}
else
if
(
tab
==
'five'
)
{
//交易关闭
this
.
searchForm
.
showStatus
=
5
;
}
this
.
searchForm
.
pageNo
=
1
;
this
.
searchList
();
},
//关闭交易
closeTrade
(
row
)
{
this
.
closeTradeDialog
=
true
;
...
...
@@ -398,7 +430,7 @@
this
.
$router
.
push
({
path
:
`/order-detail`
,
query
:{
// storeId: row.orderI
d,
id
:
row
.
i
d
,
}
})
},
...
...
src/views/shop/create-shop.vue
浏览文件 @
4ff9ddc5
<
template
>
<div
class=
"create-shop-wrapper"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
></bread-crumb>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
></bread-crumb>
<div
class=
"create-shop-content screenSet"
id=
"screenSet"
>
<el-row
class=
"step-content"
>
<el-col
:span=
"20"
>
...
...
@@ -91,10 +91,10 @@
></el-option>
</el-select>
</el-form-item>
<div
v-if=
"formData.storeType ==
'1'
"
>
<div
v-if=
"formData.storeType ==
1
"
>
<el-row>
<el-col
:span=
"10"
>
<el-form-item
label=
"入驻企业名称"
class=
"required-label"
>
<el-form-item
label=
"入驻企业名称"
prop=
"compainName"
class=
"required-label"
>
<el-input
type=
"text"
maxlength=
"40"
...
...
@@ -106,7 +106,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"10"
:offset=
"1"
>
<el-form-item
label=
"联系手机号"
label-width=
"95px"
class=
"required-label"
>
<el-form-item
label=
"联系手机号"
prop=
"phoneNum"
label-width=
"95px"
class=
"required-label"
>
<el-input
type=
"text"
size=
"small"
...
...
@@ -246,9 +246,9 @@
</div>
</el-form-item>
</div>
<div
v-if=
"formData.storeType ==
'2'
"
>
<div
v-if=
"formData.storeType ==
2
"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"医生姓名"
class=
"required-label"
>
<el-form-item
label=
"医生姓名"
prop=
"docName"
class=
"required-label"
>
<el-input
type=
"text"
maxlength=
"40"
...
...
@@ -260,10 +260,11 @@
</el-form-item>
</el-col>
<el-col
:span=
"10"
:offset=
"1"
>
<el-form-item
label=
"联系手机号"
label-width=
"95px"
class=
"required-label"
>
<el-form-item
label=
"联系手机号"
prop=
"docPhone"
label-width=
"95px"
class=
"required-label"
>
<el-input
type=
"text"
size=
"small"
maxlength=
"11"
v-model=
"formData.docPhone"
placeholder=
"请输入联系电话"
style=
"width:85%;"
...
...
@@ -271,9 +272,9 @@
</el-form-item>
</el-col>
</div>
<div
v-if=
"formData.storeType ==
'3'
"
>
<div
v-if=
"formData.storeType ==
3
"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"入驻药店名称"
class=
"required-label"
>
<el-form-item
label=
"入驻药店名称"
prop=
"drugstoreName"
class=
"required-label"
>
<el-input
type=
"text"
maxlength=
"40"
...
...
@@ -285,10 +286,11 @@
</el-form-item>
</el-col>
<el-col
:span=
"10"
:offset=
"1"
>
<el-form-item
label=
"联系电话"
label-width=
"95px"
class=
"required-label"
>
<el-form-item
label=
"联系电话"
prop=
"drugstorePhone"
label-width=
"95px"
class=
"required-label"
>
<el-input
type=
"text"
size=
"small"
maxlength=
"11"
v-model=
"formData.drugstorePhone"
placeholder=
"请输入联系电话"
style=
"width:85%;"
...
...
@@ -409,6 +411,7 @@
import
{
doUpload
,
getFilePath
}
from
"../../utils/qiniu-util"
;
import
Cropper
from
'@/components/common/cropper.vue'
import
{
saveStore
,
queryStore
}
from
'@/utils/shop'
;
import
{
checkMobile
}
from
'@/utils/patients/checkValid'
export
default
{
components
:
{
BreadCrumb
,
...
...
@@ -426,16 +429,18 @@
};
return{
curmbFirst: '云鹊店铺',
curmbSecond: '新建店铺',
storeData: {},
typeList: [
{
label: '供货商',
value:
'1'
,
value:
1
,
}, {
label: '医生小店',
value:
'2'
,
value:
2
,
}, {
label: '小药房',
value:
'3'
,
value:
3
,
}
],
formData: {
...
...
@@ -448,11 +453,13 @@
storeOwner: '',
storePhone: '',
imageList: [],
adminList: [{
adminList: [
{
adminName: '',
adminMobile: '',
id: null,
}],//供货商-管理员信息
}
],//供货商-管理员信息
compainName: '',//供货商-入驻企业名称
phoneNum: '',//供货商-联系电话
imgUrlP1: '',//证明图1
...
...
@@ -466,6 +473,42 @@
imgUrlC2: '',//证明图2
imgUrlC3: '',//证明图3
},
supplierImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: '',
},
supplierImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: '',
},
supplierImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: '',
},
drugstoreImg1: {
id: null,
imageSort: 1,
imageType: 2,
imageUrl: '',
},
drugstoreImg2: {
id: null,
imageSort: 2,
imageType: 2,
imageUrl: '',
},
drugstoreImg3: {
id: null,
imageSort: 3,
imageType: 2,
imageUrl: '',
},
showCropper: false,
currentOption: {
offset_x: 120,
...
...
@@ -508,7 +551,28 @@
],
storeType: [
{ required: true, message: "
请选择店铺类型
", trigger: "
blur
" },
]
],
compainName: [
{ required: true, message: "
请输入入驻企业名称
", trigger: "
blur
" },
],
phoneNum: [
{ required: true, message: "
请输入联系电话
", trigger: "
blur
" },
{validator: checkMobile, trigger: ['change','blur']}
],
docName: [
{ required: true, message: "
请输入医生姓名
", trigger: "
blur
" },
],
docPhone: [
{ required: true, message: "
请输入联系电话
", trigger: "
blur
" },
{validator: checkMobile, trigger: ['change','blur']}
],
drugstoreName: [
{ required: true, message: "
请输入入驻药店名称
", trigger: "
blur
" },
],
drugstorePhone: [
{ required: true, message: "
请输入联系电话
", trigger: "
blur
" },
{validator: checkMobile, trigger: ['change','blur']}
],
},
imgMouseOver1: false,
uploadImgMessage1: false,//未上传图片,校验提示语
...
...
@@ -525,25 +589,95 @@
watch: {
'formData.adminList': function(val) {
val.map((item,index) => {
// item.flag = false;
// if (val.length == index) {
// item.flag = true;
// }
})
},
},
created() {
vm = this;
this.enterType = this.$route.query.enterType;
this.formData.storeId = this.$route.query.storeId || null;
if (this.formData.storeId) {//回显
this.initInfo();
this.storeData = this.$route.query.storeData || {};
if (this.storeData) {
this.storeData = JSON.parse(this.storeData);
}
if (this.formData.storeId) {
this.curmbSecond = '编辑店铺';
// this.initInfo();
this.getStoreInfo();
}else {
this.curmbSecond = '新建店铺';
}
},
methods: {
//回显数据处理
getStoreInfo() {
if (!this.storeData || !this.storeData.tradeStore) return;
const { storeLogo, storeName, storeDescription, storeType, storeOwner, storePhone, } = this.storeData.tradeStore;
this.formData.storeLogo = storeLogo;
this.formData.storeName = storeName;
this.formData.storeDescription = storeDescription;
this.formData.storeType = storeType;
if (storeType == 1) {
this.formData.compainName = storeOwner;
this.formData.phoneNum = storePhone;
if (this.storeData.imageList && this.storeData.imageList.length) {
this.storeData.imageList.map(item => {
if (item.imageSort == 1) {
this.supplierImg1 = item;
this.formData.imgUrlP1 = item.imageUrl;
}else if (item.imageSort == 2) {
this.supplierImg2 = item;
this.formData.imgUrlP2 = item.imageUrl;
}else if (item.imageSort == 3) {
this.supplierImg3 = item;
this.formData.imgUrlP3 = item.imageUrl;
}
})
}else {
this.formData.imgUrlP1 = '';
this.formData.imgUrlP2 = '';
this.formData.imgUrlP3 = '';
}
//处理管理员数据
if (this.storeData.adminList && this.storeData.adminList.length) {
this.formData.adminList = this.storeData.adminList
}else {
this.formData.adminList = [{
adminName: '',
adminMobile: '',
id: null,
}]
}
}else if (storeType == 2) {
this.formData.docName = storeOwner;
this.formData.docPhone = storePhone;
}else if (storeType == 3) {
this.formData.drugstoreName = storeOwner;
this.formData.drugstorePhone = storePhone;
if (this.storeData.imageList && this.storeData.imageList.length) {
this.storeData.imageList.map(item => {
if (item.imageSort == 1) {
this.drugstoreImg1 = item;
this.formData.imgUrlC1 = item.imageUrl;
}else if (item.imageSort == 2) {
this.drugstoreImg2 = item;
this.formData.imgUrlC2 = item.imageUrl;
}else if (item.imageSort == 3) {
this.drugstoreImg3 = item;
this.formData.imgUrlC3 = item.imageUrl;
}
})
}else {
this.formData.imgUrlC1 = '';
this.formData.imgUrlC2 = '';
this.formData.imgUrlC3 = '';
}
}
},
initInfo() {
let req = {
storeId: this.formData.storeId
};
queryStore(req).then(res => {
if (res.code == '000000') {
...
...
@@ -556,21 +690,21 @@
complete() {
let flag = this.submitForm();
if (flag) {
let para = {
storeId: this.formData.storeId,
userId: this.formData.userId,
storeLogo: this.formData.storeLogo,//店铺logo
storeName: this.formData.storeName,
storeDescription: this.formData.storeDescription,
storeType: Number(this.formData.storeType),
storeOwner:this.formData.storeOwner,
storePhone: this.formData.storePhone,
imageList: this.formData.imageList,
adminList:this.formData.adminList,
}
// let para = {
// storeId: this.formData.storeId,
// userId: this.formData.userId,
// storeLogo: this.formData.storeLogo,//店铺logo
// storeName: this.formData.storeName,
// storeDescription: this.formData.storeDescription,
// storeType: Number(this.formData.storeType),
// storeOwner:this.formData.storeOwner,
// storePhone: this.formData.storePhone,
// imageList: this.formData.imageList,
// adminList:this.formData.adminList,
// }
this.formData.storeType = Number(this.formData.storeType);
console.log('提交的数据',this.formData)
saveStore({req: para}).then(res => {
console.log('保存数据',res);
saveStore(this.formData).then(res => {
if (res.code == '000000') {
this.$message.success("
保存成功
");
this.$router.push({
...
...
@@ -593,31 +727,16 @@
this.formData.storeOwner = this.formData.compainName;
this.formData.storePhone = this.formData.phoneNum;
if (this.formData.imgUrlP1) {
this.formData.imageList.push({
id: null,
imageSort: 1,
imageType: 2,
imageUrl: this.formData.imgUrlP1,
storeId: null,
})
this.supplierImg1.imageUrl = this.formData.imgUrlP1;
this.formData.imageList.push(this.supplierImg1);
}
if (this.formData.imgUrlP2) {
this.formData.imageList.push({
id: null,
imageSort: 2,
imageType: 2,
imageUrl: this.formData.imgUrlP2,
storeId: null,
})
this.supplierImg2.imageUrl = this.formData.imgUrlP2;
this.formData.imageList.push(this.supplierImg2);
}
if (this.formData.imgUrlP3) {
this.formData.imageList.push({
id: null,
imageSort: 3,
imageType: 2,
imageUrl: this.formData.imgUrlP3,
storeId: null,
})
this.supplierImg3.imageUrl = this.formData.imgUrlP3;
this.formData.imageList.push(this.supplierImg3);
}
}else if (type == 2) {
this.formData.storeOwner = this.formData.docName;
...
...
@@ -628,37 +747,22 @@
this.formData.storePhone = this.formData.drugstorePhone;
this.formData.adminList = [];
if (this.formData.imgUrlC1) {
this.formData.imageList.push({
id: null,
imageSort: 1,
imageType: 2,
imageUrl: this.formData.imgUrlC1,
storeId: null,
})
this.drugstoreImg1.imageUrl = this.formData.imgUrlC1;
this.formData.imageList.push(this.drugstoreImg1);
}
if (this.formData.imgUrlC2) {
this.formData.imageList.push({
id: null,
imageSort: 2,
imageType: 2,
imageUrl: this.formData.imgUrlC2,
storeId: null,
})
this.drugstoreImg2.imageUrl = this.formData.imgUrlC2;
this.formData.imageList.push(this.drugstoreImg2);
}
if (this.formData.imgUrlC3) {
this.formData.imageList.push({
id: null,
imageSort: 3,
imageType: 2,
imageUrl: this.formData.imgUrlC3,
storeId: null,
})
this.drugstoreImg3.imageUrl = this.formData.imgUrlC3;
this.formData.imageList.push(this.drugstoreImg3);
}
}
},
setTypeForData() {
let flag = false;
if (this.formData.storeType ==
'1'
) {
if (this.formData.storeType ==
1
) {
if (!this.formData.compainName) {
this.$message.warning('请输入入驻企业名称');
return;
...
...
@@ -692,7 +796,7 @@
flag = true;
}
if (this.formData.storeType ==
'2'
) {
if (this.formData.storeType ==
2
) {
if (!this.formData.docName) {
this.$message.warning('请输入医生姓名');
return;
...
...
@@ -708,7 +812,7 @@
}
flag = true;
}
if (this.formData.storeType ==
'3'
) {
if (this.formData.storeType ==
3
) {
if (!this.formData.drugstoreName) {
this.$message.warning('请输入入驻药店名称');
return;
...
...
@@ -730,8 +834,10 @@
submitForm() {
let formName = "
formData
";
let submitFlag = false;
if (!this.formData.storeLogo){
this.uploadImgMessage1 = true;
return;
}else {
this.uploadImgMessage1 = false;
}
...
...
@@ -744,7 +850,6 @@
submitFlag = true;
} else {
submitFlag = false;
console.log("
error
submit
!!
");
}
});
return submitFlag;
...
...
@@ -857,9 +962,6 @@
};
};
return isJPG && isLt2M;
},
getKey(type) {
},
//删除图片
deleteImg(type) {
...
...
src/views/shop/shop-list.vue
浏览文件 @
4ff9ddc5
...
...
@@ -7,7 +7,7 @@
<el-row
:gutter=
"30"
type=
"flex"
style=
"margin-top: 10px"
>
<el-col
:span=
"18"
>
<el-form-item
label=
"店铺名称"
>
<el-input
v-model=
"searchForm.
n
ame"
size=
"small"
placeholder=
"请输入店铺名称"
></el-input>
<el-input
v-model=
"searchForm.
storeN
ame"
size=
"small"
placeholder=
"请输入店铺名称"
></el-input>
</el-form-item>
<el-form-item
label=
"店铺ID"
>
<el-input
v-model=
"searchForm.id"
size=
"small"
placeholder=
"请输入店铺ID"
></el-input>
...
...
@@ -39,22 +39,35 @@
</el-row>
</el-form>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"id"
label=
"店铺ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"店铺名称"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"type"
label=
"店铺类型"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"id"
label=
"店铺ID"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
t
ype
|
dynamicFlagStatus
}}
</span>
<span>
{{
scope
.
row
.
t
radeStore
.
id
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"st
atus"
label=
"店铺状态
"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"st
oreName"
label=
"店铺名称
"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
<span>
{{
scope
.
row
.
tradeStore
.
storeName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"storeType"
label=
"店铺类型"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
tradeStore
.
storeType
|
storeTypeFormat
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"storeStatus"
label=
"店铺状态"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
tradeStore
.
storeStatus
|
statusFormat
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"num"
label=
"已上架商品数"
min-width=
"120"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
tradeStore
.
count
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"num"
label=
"已上架商品数"
min-width=
"120"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createdTime"
label=
"创建时间"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
<!--
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
-->
<span>
{{
scope
.
row
.
tradeStore
.
createdTime
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
...
...
@@ -84,7 +97,7 @@
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
// import { getRangeList,updateRangeStatus} from "../../utils/yqrange/yqrangeApi"
;
import
{
queryStore
}
from
'@/utils/shop'
;
export
default
{
components
:
{
BreadCrumb
...
...
@@ -95,38 +108,32 @@
showAllFlag
:
false
,
showNewFlag
:
false
,
searchForm
:
{
n
ame
:
''
,
id
:
''
,
type
:
''
,
storeN
ame
:
''
,
storeId
:
0
,
storeType
:
0
,
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
type
:
null
,
},
totalRows
:
0
,
tableData
:
[
// {
// id: '',
// name: '',
// type: null,
// status: '',
// num: null,
// createdTime: '',
// }
],
typeList
:
[{
tableData
:
[],
typeList
:
[
{
label
:
'供货商'
,
value
:
'1'
,
value
:
1
,
},
{
label
:
'医生小店'
,
value
:
'2'
,
value
:
2
,
},
{
label
:
'小药房'
,
value
:
'3'
,
value
:
3
,
}]
}
},
created
()
{
// this.initPrivilege();
//
this.searchList();
this
.
searchList
();
},
methods
:
{
initPrivilege
(){
...
...
@@ -160,113 +167,63 @@
searchList
()
{
openLoading
(
this
);
let
params
=
this
.
searchForm
;
/* getRangeList(params).then((res) => {
if
(
this
.
searchForm
.
id
)
{
params
.
storeId
=
this
.
searchForm
.
id
;
}
else
{
params
.
storeId
=
0
;
}
if
(
this
.
searchForm
.
type
)
{
params
.
storeType
=
this
.
searchForm
.
type
;
}
else
{
params
.
storeType
=
0
;
}
queryStore
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
this.tableData = res.data.
circleList
;
this.totalRows = res.data.
c
ount;
this
.
tableData
=
res
.
data
.
tradeStore
;
this
.
totalRows
=
res
.
data
.
totalC
ount
;
}
else
{
this
.
tableData
=
[];
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
"请重试"
);
})
*/
})
},
resetForm
()
{
this
.
searchForm
=
{
name
:
''
,
id
:
''
,
type
:
''
storeName
:
''
,
storeId
:
0
,
storeType
:
0
,
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
type
:
null
,
};
this
.
searchList
();
},
//新建店铺
createShop
()
{
let
enterType
=
1
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
`/create-shop
?enterType=
${
enterType
}
`
path
:
`/create-shop`
})
},
//上线
publishRange
(
row
)
{
this
.
$confirm
(
`确定上线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'上线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
// confirm
this
.
updateStatus
(
row
.
id
,
"30"
);
}).
catch
(()
=>
{
// cancel
// this.$message.error("上线失败");
});
},
//下线
unPublishRange
(
row
)
{
this
.
$confirm
(
`确定下线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'下线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"40"
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
// 更新圈子状态(上线,下线)
updateStatus
(
id
,
status
){
let
params
=
{
"id"
:
id
,
"status"
:
status
};
updateRangeStatus
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"40"
){
this
.
$message
.
success
(
"下线成功"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
success
(
"上线成功"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
success
(
"解散成功"
);
}
this
.
searchList
();
}
else
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
}
}).
catch
((
error
)
=>
{
if
(
status
==
"40"
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
})
},
//店铺管理
shopManage
(
row
)
{
this
.
$router
.
push
({
path
:
'/role-manage?id='
+
row
.
id
,
path
:
'/goods-manage'
,
query
:
{
storeId
:
row
.
tradeStore
.
id
,
}
})
},
//编辑
editShop
(
row
)
{
let
enterType
=
2
;
//1:add 2 edit
this
.
$router
.
push
({
path
:
`/create-shop
?enterType
`
,
path
:
`/create-shop`
,
query
:{
storeId
:
row
.
storeI
d
,
enterType
:
enterType
,
storeId
:
row
.
tradeStore
.
i
d
,
storeData
:
JSON
.
stringify
(
row
)
,
}
})
},
...
...
@@ -280,6 +237,31 @@
this
.
searchList
();
},
},
filters
:
{
storeTypeFormat
:
function
(
value
){
if
(
!
value
&&
value
!=
0
)
{
return
"-"
;
}
else
{
let
hash
=
{
1
:
"供货商"
,
2
:
"医生小店"
,
3
:
"小药房"
};
return
hash
[
value
];
}
},
statusFormat
(
value
)
{
if
(
!
value
&&
value
!=
0
)
{
return
"-"
;
}
else
{
let
hash
=
{
0
:
"下线"
,
1
:
"上线"
,
};
return
hash
[
value
];
}
},
},
}
</
script
>
<
style
lang=
"scss"
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录