Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
adc9945d
提交
adc9945d
编写于
6月 11, 2021
作者:
vino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分佣设置
上级
9dedf482
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
279 行增加
和
455 行删除
+279
-455
index.js
src/utils/freight/index.js
+1
-1
freight-config-backup.vue
src/views/freight/freight-config-backup.vue
+0
-343
freight-config.vue
src/views/freight/freight-config.vue
+131
-44
shop-list.vue
src/views/shop/shop-list.vue
+147
-67
未找到文件。
src/utils/freight/index.js
浏览文件 @
adc9945d
...
@@ -40,7 +40,7 @@ export const getFreightConfig = (value) => {
...
@@ -40,7 +40,7 @@ export const getFreightConfig = (value) => {
export
const
saveFreightConfig
=
(
params
)
=>
{
export
const
saveFreightConfig
=
(
params
)
=>
{
return
fetch
({
return
fetch
({
headers
,
headers
,
url
:
`/store/admin/express/fee/store/config/save`
,
url
:
getBaseUrl
(
`/store/admin/express/fee/store/config/save`
)
,
method
:
'post'
,
method
:
'post'
,
data
:
params
,
data
:
params
,
description
:
'后台-店铺运费配置信息-save'
,
description
:
'后台-店铺运费配置信息-save'
,
...
...
src/views/freight/freight-config-backup.vue
已删除
100644 → 0
浏览文件 @
9dedf482
<
template
>
<div
class=
"order-detail-wrapper"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
></bread-crumb>
<div
class=
"order-detail-content screenSet"
id=
"screenSet"
>
<div
class=
"header-title"
>
店铺运费
</div>
<div
class=
"detail-all-info"
>
<div
class=
"trade-info"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-form
ref=
"configForm"
:rules=
"setPriceRules"
:model=
"freightConfigForm"
label-width=
"250px"
label-suffix=
":"
label-position=
"right"
size=
"mini"
style=
"width: 100%;"
>
<div
v-for=
"(item, index) in freightConfigForm.freightList"
:key=
"index"
>
<div
style=
"margin-top: 10px;margin-left: 10px;"
>
<div
style=
"float:left;margin-left: 20px;margin-top:10px;"
>
0
</div>
<div
style=
"float:left;margin-left: 20px;margin-top:10px;"
><</div>
<div
style=
"float:left;margin-left: 20px;margin-top:10px;"
>
订单金额
</div>
<div
style=
"float:left;margin-left: 20px;"
><el-input-number
v-model=
"item.price1"
></el-input-number><span
style=
"margin-left: 5px;"
>
元
</span></div>
<div
style=
"float:left;margin-left: 20px;margin-top:10px;"
>
运费:
</div>
<div
style=
"float:left;margin-left: 20px;"
><el-input-number
v-model=
"item.price2"
></el-input-number><span
style=
"margin-left: 5px;"
>
元
</span></div>
<div
style=
"float:left;margin-left: 20px;margin-top:5px;"
v-if=
"index > 0"
><el-button
type=
"danger"
size=
"small"
@
click=
"del(index)"
>
删除
</el-button></div>
</div>
<div
style=
"margin-top: 10px;margin-left: 10px;"
v-if=
"index == 0"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"add"
>
添加条件
</el-button>
</div>
</div>
<div
style=
"float:left;margin-left: 20px;margin-top:5px;"
>
提示文案
</div>
<el-form-item
label=
"运费说明"
prop=
"commissionType"
>
<el-col
:span=
"4"
>
<el-input></el-input>
</el-col>
</el-form-item>
<div
style=
"margin-top: 60px;margin-left: 150px;"
>
<el-button
type=
"primary"
@
click=
"save"
center
>
保存
</el-button>
<!--
<el-button
@
click=
"cancle()"
>
取 消
</el-button>
-->
</div>
</el-form>
</div>
</div>
<el-table
:data=
"tableData"
border
class=
"item-table"
style=
"width: 100%;margin-top: 30px;"
>
<el-table-column
prop=
"goodsName"
label=
"商品名称"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div
style=
"cursor: pointer;color: #449284"
@
click=
"goGoodsEdit(scope.row)"
>
{{
scope
.
row
.
goodsName
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"size"
label=
"规格"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodsQuantity"
label=
"数量"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
×
{{
scope
.
row
.
goodsQuantity
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"price"
label=
"单价"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
¥
{{
scope
.
row
.
price
|
toFixed2
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
orderDetailData
.
showStatusStr
}}
</span>
</
template
>
</el-table-column>
</el-table>
<div
class=
"total-set"
>
<p><span>
商品总额:
</span><span>
¥{{orderDetailData.totalPrice | toFixed2}}
</span></p>
<p><span>
优惠:
</span><span>
-¥{{orderDetailData.totalCouponFee | toFixed2}}
</span></p>
<p><span>
运费:
</span><span>
¥{{orderDetailData.expressFee | toFixed2}}
</span></p>
<p
class=
"total-price"
v-if=
"showStatus == 1 || showStatus == 2 || showStatus == 3"
><span>
实付:
</span><span>
¥{{orderDetailData.amount | toFixed2}}
</span></p>
<p
class=
"total-price"
v-if=
"showStatus == 4"
><span>
应付:
</span><span>
¥{{(orderDetailData.totalPrice)| toFixed2}}
</span></p>
<p
class=
"total-price"
v-if=
"showStatus == 5"
><span>
实付:
</span><span>
¥0.00
</span></p>
</div>
</div>
<send-set-dialog
:sendGoodsDialog=
"sendGoodsDialog"
:dialogTitle=
"dialogTitle"
:sendSetFormData=
"sendSetForm"
@
closeSendSet=
"closeSendSet"
>
</send-set-dialog>
</div>
</div>
</template>
<
script
>
// import { openLoading, closeLoading } from "../../utils/utils";
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
queryOrderDetail
}
from
'@/utils/shop'
;
import
SendSetDialog
from
"@/components/shop/send-set-dialog"
;
export
default
{
components
:
{
BreadCrumb
,
SendSetDialog
},
data
(){
return
{
curmbFirst
:
'云鹊店铺'
,
curmbSecond
:
'运费配置'
,
storeId
:
null
,
orderId
:
null
,
showStatus
:
null
,
//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
storeType
:
null
,
//店铺类型,1供应商,2小药房,3医生小店
orderDetailData
:
{
amount
:
''
,
//订单实付总金额
createdTime
:
''
,
//下单时间
expressId
:
''
,
//物流id
expressName
:
''
,
//物流公司名称
receiverAddr
:
''
,
//收货地址
expressNo
:
''
,
//快递单号
expressStatus
:
''
,
//物流状态
finishTime
:
''
,
//成交时间
orderNo
:
''
,
//订单编号
orderStatus
:
''
,
//订单状态:1待支付,2支付中,3支付失败,4订单超时,5支付成功,6交易完成,7交易关闭
paymentTime
:
''
,
//支付时间
totalCouponFee
:
''
,
//优惠券金额
totalPrice
:
''
,
//订单总金额
remark
:
''
,
//备注
sendTime
:
''
,
//发货时间
payChannel
:
''
,
//支付方式
// showStatus: null,//订单展示状态,1已完成,2已发货,3待发货,4待支付,5交易关闭
},
tableData
:
[],
sendGoodsDialog
:
false
,
dialogTitle
:
''
,
sendSetForm
:
{},
freightConfigForm
:{
freightList
:[{
price1
:
''
,
price2
:
''
}],
commissionType
:
1
,
price1
:
''
,
price2
:
''
,
storeId
:
''
,
goodsId
:
''
,
maxPrice
:
''
},
}
},
created
()
{
const
{
id
,
storeId
,
storeType
}
=
this
.
$route
.
query
;
this
.
orderId
=
id
;
this
.
storeId
=
storeId
;
this
.
storeType
=
storeType
;
this
.
jumPathThird
=
`/order-manage?storeId=
${
this
.
storeId
}
`
;
this
.
init
();
},
methods
:
{
init
()
{
queryOrderDetail
(
this
.
orderId
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
const
{
goodsInfoDtoList
}
=
res
.
data
;
this
.
orderDetailData
=
{...
res
.
data
};
this
.
showStatus
=
res
.
data
.
showStatus
;
this
.
tableData
=
goodsInfoDtoList
;
}
})
},
showSendDialog
()
{
this
.
sendGoodsDialog
=
true
;
this
.
sendSetForm
=
this
.
orderDetailData
;
if
(
this
.
storeType
==
1
)
{
this
.
dialogTitle
=
'发货设置'
}
else
{
this
.
dialogTitle
=
'配送设置'
}
},
closeSendSet
(
val
)
{
//保存操作
if
(
val
.
type
==
2
)
{
this
.
init
();
}
this
.
sendGoodsDialog
=
false
;
},
//跳转至商品编辑页
goGoodsEdit
(
row
)
{
// this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this
.
$router
.
push
({
path
:
'/create-good'
,
query
:
{
id
:
row
.
goodsId
,
storeId
:
this
.
storeId
,
}
})
},
// 添加条件
add
(){
this
.
freightConfigForm
.
freightList
.
push
({
price1
:
""
,
price2
:
""
});
},
// 删除
del
(
index
){
this
.
freightConfigForm
.
freightList
.
splice
(
index
,
1
);
},
// 保存
save
(){
}
},
filters
:
{
toFixed2
:
function
(
value
)
{
let
val
;
if
(
value
)
{
val
=
(
value
/
100
).
toFixed
(
2
);
}
else
{
val
=
0.00
}
return
val
;
},
payChanelFormat
:
function
(
value
)
{
let
str
=
''
;
if
(
value
==
1
)
{
str
=
'微信支付'
}
return
str
;
}
},
}
</
script
>
<
style
lang=
"scss"
>
.order-detail-wrapper
{
.order-detail-content
{
background
:
#fff
;
padding
:
10px
;
.header-title
{
padding
:
10px
12px
;
font-size
:
13px
;
color
:
#449284
;
border-bottom
:
1px
solid
#efefef
;
}
.detail-all-info
{
.trade-status
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
30px
0
;
text-align
:
center
;
font-size
:
24px
;
img
{
width
:
25px
;
height
:
25px
;
margin-right
:
15px
;
}
.set-icon
{
color
:
#449284
;
font-size
:
28px
;
margin-right
:
10px
;
}
}
.trade-info
{
width
:
100%
;
box-sizing
:
border-box
;
display
:
flex
;
font-size
:
13px
;
justify-content
:
space-between
;
.el-card__body
{
padding-top
:
10px
;
}
.left-card
{
width
:
69%
;
display
:
inline-block
;
margin-right
:
2%
;
.trade-status1
{
height
:
26px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding-bottom
:
5px
;
.send-status
{
margin-left
:
10px
;
display
:
inline-block
;
}
}
}
.right-card
{
width
:
28%
;
display
:
inline-block
;
}
.left-card
,
.right-card
{
p
{
color
:
#838683
;
line-height
:
22px
;
}
}
.clearfix
:before
,
.clearfix
:after
{
display
:
table
;
content
:
""
;
}
.clearfix
:after
{
clear
:
both
}
}
.total-set
{
text-align
:
right
;
margin-top
:
10px
;
p
{
font-size
:
13px
;
color
:
#999999
;
line-height
:
24px
;
span
:first-child
{
display
:
inline-block
;
width
:
72px
;
text-align
:
left
;
}
span
:last-child
{
display
:
inline-block
;
width
:
90px
;
}
}
.total-price
{
font-size
:
15px
;
color
:
#333333
;
margin-top
:
5px
;
}
}
}
}
.el-button--text
{
color
:
#449284
;
font-size
:
14px
;
&
:
:
after
{
content
:
''
;
position
:
relative
;
height
:
14px
;
/*border-right: 1px solid #EBEEF5;*/
border-right
:
1px
solid
#aaaaaa
;
padding-right
:
10px
;
}
&
:last-of-type
{
&
:
:
after
{
content
:
''
;
position
:
relative
;
width
:
1px
;
height
:
14px
;
border-right
:
none
;
}
}
}
}
</
style
>
src/views/freight/freight-config.vue
浏览文件 @
adc9945d
...
@@ -124,21 +124,31 @@
...
@@ -124,21 +124,31 @@
@
click=
"addGoodsCondition"
@
click=
"addGoodsCondition"
>
添加条件
>
添加条件
</el-button>
</el-button>
<el-table
:data=
"
tableData"
border
class=
"item-table"
style=
"width: 100%;margin-top: 30px;"
>
<el-table
:data=
"
resultForm.goodConditionReqList"
@
row-click=
'handleRowClickRole'
border
class=
"item-table"
style=
"width: 100%;margin-top: 30px;"
>
<el-table-column
prop=
"good
sIdList
"
label=
"商品ID"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"good
Ids
"
label=
"商品ID"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
v-for=
"(item, index) in scope.row.good
sIdList
"
:key=
"index"
>
<div
v-for=
"(item, index) in scope.row.good
Ids
"
:key=
"index"
>
<div
style=
"cursor: pointer;color: #449284"
@
click=
"viewGoods(item)"
>
{{
item
.
goodsId
}}
</div>
<div
style=
"cursor: pointer;color: #449284"
@
click=
"viewGoods(item)"
>
{{
item
}}
</div>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"condition"
label=
"包邮条件"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"conditionType"
label=
"包邮条件"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"desc"
label=
"说明"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.conditionType == 1"
>
满
{{
scope
.
row
.
number
}}
件包邮
</div>
<div
v-if=
"scope.row.conditionType == 2"
>
满
{{
scope
.
row
.
number
}}
元包邮
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"intro"
label=
"说明"
min-width=
"100"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"status"
label=
"操作"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"status"
label=
"操作"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"small"
@
click=
"editGoodsFreight(scope.row)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"editGoodsFreight(scope.row)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"delGoodsFreight(scope.row)"
>
删除
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"delGoodsFreight(scope.row
,scope.$index
)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -160,7 +170,7 @@
...
@@ -160,7 +170,7 @@
:visible
.
sync=
"setAddVisible"
:visible
.
sync=
"setAddVisible"
width=
"60%"
>
width=
"60%"
>
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref=
"
set
PriceForm"
<el-form
ref=
"
Goods
PriceForm"
:rules=
"addRules"
:rules=
"addRules"
:model=
"goodCondition"
:model=
"goodCondition"
label-width=
"250px"
label-width=
"250px"
...
@@ -183,7 +193,7 @@
...
@@ -183,7 +193,7 @@
<el-option
<el-option
v-for=
"item in nameList"
v-for=
"item in nameList"
:key=
"item.id"
:key=
"item.id"
:label=
"item.
name
"
:label=
"item.
id
"
:value=
"item.id"
>
:value=
"item.id"
>
<span>
{{item.value}}
</span>
<span>
{{item.value}}
</span>
</el-option>
</el-option>
...
@@ -206,10 +216,10 @@
...
@@ -206,10 +216,10 @@
</el-col>
</el-col>
<el-col
:span=
"9"
style=
"margin-left: 5px;"
>
<el-col
:span=
"9"
style=
"margin-left: 5px;"
>
<span
style=
"margin-left: 5px;"
>
满
</span>
<span
style=
"margin-left: 5px;"
>
满
</span>
<el-input-number
v-if=
"
model
.conditionType == 1"
v-model=
"goodCondition.number"
style=
"margin-left: 5px;"
size=
"small"
:precision=
"0"
:min=
"1"
:max=
"100000"
></el-input-number>
<el-input-number
v-if=
"
goodCondition
.conditionType == 1"
v-model=
"goodCondition.number"
style=
"margin-left: 5px;"
size=
"small"
:precision=
"0"
:min=
"1"
:max=
"100000"
></el-input-number>
<el-input-number
v-if=
"
model
.conditionType == 2"
v-model=
"goodCondition.number"
style=
"margin-left: 5px;"
size=
"small"
:precision=
"2"
:min=
"0.00"
:max=
"99999.99"
></el-input-number>
<el-input-number
v-if=
"
goodCondition
.conditionType == 2"
v-model=
"goodCondition.number"
style=
"margin-left: 5px;"
size=
"small"
:precision=
"2"
:min=
"0.00"
:max=
"99999.99"
></el-input-number>
<span
style=
"margin-left: 5px;"
v-if=
"
model.t
ype == 1"
>
件包邮
</span>
<span
style=
"margin-left: 5px;"
v-if=
"
goodCondition.conditionT
ype == 1"
>
件包邮
</span>
<span
style=
"margin-left: 5px;"
v-if=
"
model.t
ype == 2"
>
元包邮
</span>
<span
style=
"margin-left: 5px;"
v-if=
"
goodCondition.conditionT
ype == 2"
>
元包邮
</span>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"运费说明"
class=
"required-label"
>
<el-form-item
label=
"运费说明"
class=
"required-label"
>
...
@@ -222,7 +232,7 @@
...
@@ -222,7 +232,7 @@
<!-- </el-row>-->
<!-- </el-row>-->
<span
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<span
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<el-button
@
click=
"setAddVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"setAddVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"s
ubmit
"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"s
ave()
"
>
保存
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
...
@@ -296,6 +306,14 @@ export default {
...
@@ -296,6 +306,14 @@ export default {
goodIdList
:
''
goodIdList
:
''
},
},
nameList
:[],
nameList
:[],
resultForm
:{
goodConditionReqList
:[],
intro
:
''
,
introId
:
''
,
storeExpressIntervalReqList
:[],
storeId
:
''
},
rowIndex
:
''
,
addRules
:{
addRules
:{
goodIdList
:
[
goodIdList
:
[
{
required
:
true
,
message
:
"请输入商品ID"
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
"请输入商品ID"
,
trigger
:
'blur'
}
...
@@ -371,7 +389,10 @@ export default {
...
@@ -371,7 +389,10 @@ export default {
rangeMax
:
0
,
rangeMax
:
0
,
});
});
},
},
handleRowClickRole
(
row
){
this
.
rowIndex
=
row
.
index
console
.
log
(
this
.
rowIndex
)
},
// 删除条件
// 删除条件
deleteCondition
(
index
)
{
deleteCondition
(
index
)
{
this
.
formData
.
list
.
splice
(
index
,
1
);
this
.
formData
.
list
.
splice
(
index
,
1
);
...
@@ -387,18 +408,22 @@ export default {
...
@@ -387,18 +408,22 @@ export default {
type
:
"warning"
,
type
:
"warning"
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
save
();
this
.
save
All
();
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
});
});
},
},
// 保存
// 保存
save
()
{
save
All
()
{
this
.
btnDisabled
=
true
;
this
.
btnDisabled
=
true
;
let
formData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
formData
));
let
formData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
formData
));
formData
.
list
=
this
.
dataHandler
(
formData
.
list
,
false
);
formData
.
list
=
this
.
dataHandler
(
formData
.
list
,
false
);
createOrModifyExpressFee
(
formData
)
vm
.
resultForm
.
storeExpressIntervalReqList
=
formData
.
list
;
vm
.
resultForm
.
intro
=
formData
.
intro
;
vm
.
resultForm
.
storeId
=
vm
.
storeId
;
saveFreightConfig
(
vm
.
resultForm
)
// createOrModifyExpressFee(formData)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
this
.
getExpressFeeInfo
();
this
.
getExpressFeeInfo
();
...
@@ -454,39 +479,42 @@ export default {
...
@@ -454,39 +479,42 @@ export default {
})
})
},
},
addGoodsCondition
(){
addGoodsCondition
(){
vm
.
goodCondition
=
{
goodIds
:[],
conditionType
:
''
,
number
:
''
,
intro
:
''
,
goodIdList
:
''
};
this
.
title
=
"添加条件"
;
this
.
title
=
"添加条件"
;
this
.
setAddVisible
=
true
;
this
.
setAddVisible
=
true
;
},
},
editGoodsFreight
(){
getIdArray
(
goodIds
){
let
idArray
=
''
;
for
(
let
i
=
0
;
i
<
goodIds
.
length
;
i
++
){
idArray
=
idArray
+
goodIds
[
i
]
+
"、"
;
}
return
idArray
;
},
editGoodsFreight
(
row
){
let
idArray
=
this
.
getIdArray
(
row
.
goodIds
);
vm
.
goodCondition
=
{
goodIds
:
row
.
goodIds
,
conditionType
:
row
.
conditionType
,
number
:
row
.
number
,
intro
:
row
.
intro
,
goodIdList
:
idArray
};
this
.
title
=
"修改条件"
;
this
.
title
=
"修改条件"
;
this
.
setAddVisible
=
true
;
this
.
setAddVisible
=
true
;
},
},
delGoodsFreight
(){
delGoodsFreight
(
row
,
index
){
this
.
$confirm
(
`是否确认删除?`
,
""
,
{
// vm.rowIndex;
confirmButtonText
:
"删除"
,
vm
.
resultForm
.
goodConditionReqList
.
splice
(
index
,
1
);
cancelButtonText
:
"取消"
,
type
:
"warning"
// customClass: 'range-make-box',
})
.
then
(()
=>
{
// confirm
vm
.
DELETE
(
"rtc/liveAdmin/"
+
row
.
id
,
{}).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
vm
.
$message
({
type
:
"success"
,
message
:
"删除成功"
});
this
.
getLiveList
(
""
,
""
);
}
else
{
vm
.
$message
({
type
:
"warning"
,
message
:
res
.
message
});
}
});
})
.
catch
(()
=>
{});
},
},
// 获取配置信息
// 获取配置信息
...
@@ -499,7 +527,20 @@ export default {
...
@@ -499,7 +527,20 @@ export default {
}
else
{
}
else
{
curData
.
list
=
this
.
formData
.
list
;
curData
.
list
=
this
.
formData
.
list
;
}
}
if
(
res
.
data
.
goodConditionDtoList
){
for
(
let
i
=
0
;
i
<
res
.
data
.
goodConditionDtoList
.
length
;
i
++
){
this
.
tableData
.
push
(
{
goodIds
:
res
.
data
.
goodConditionDtoList
[
i
].
goodIds
,
conditionType
:
res
.
data
.
goodConditionDtoList
[
i
].
goodExpressConditionConfig
.
conditionType
,
number
:
res
.
data
.
goodConditionDtoList
[
i
].
goodExpressConditionConfig
.
number
,
intro
:
res
.
data
.
goodConditionDtoList
[
i
].
goodExpressConditionConfig
.
intro
});
}
}
this
.
tableData
=
res
.
data
.
goodConditionDtoList
;
this
.
tableData
=
res
.
data
.
goodConditionDtoList
;
this
.
formData
=
curData
;
this
.
formData
=
curData
;
})
})
},
},
...
@@ -580,6 +621,7 @@ export default {
...
@@ -580,6 +621,7 @@ export default {
if
(
val
==
vm
.
expertData
[
i
].
goodsId
)
{
if
(
val
==
vm
.
expertData
[
i
].
goodsId
)
{
let
item
=
vm
.
expertData
[
i
];
let
item
=
vm
.
expertData
[
i
];
vm
.
goodCondition
.
goodIdList
=
val
;
vm
.
goodCondition
.
goodIdList
=
val
;
break
;
// vm.model.userName = item.name;
// vm.model.userName = item.name;
// vm.model.mobile = item.mobilePhone;
// vm.model.mobile = item.mobilePhone;
// vm.model.hospitalName = item.hospital;
// vm.model.hospitalName = item.hospital;
...
@@ -598,6 +640,51 @@ export default {
...
@@ -598,6 +640,51 @@ export default {
vm
.
nameList
=
[];
vm
.
nameList
=
[];
}
}
},
},
// 保存商品运费添加条件
save
(){
let
addFlag
=
false
;
this
.
$refs
[
"GoodsPriceForm"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
return
false
;
vm
.
goodCondition
.
goodIds
=
[];
vm
.
goodCondition
.
goodIds
.
push
(
vm
.
goodCondition
.
goodIdList
);
if
(
vm
.
resultForm
.
goodConditionReqList
.
length
>
0
){
// this.formData.tabs[0].contents = vm.resultForm.goodConditionReqList.filter(function (item) {
// return item.goodIds == vm.goodCondition.goodIds;
// });
for
(
let
i
=
0
;
i
<
vm
.
resultForm
.
goodConditionReqList
.
length
;
i
++
){
if
(
vm
.
getIdArray
(
vm
.
resultForm
.
goodConditionReqList
[
i
].
goodIds
)
==
vm
.
goodCondition
.
goodIds
){
vm
.
resultForm
.
goodConditionReqList
[
i
].
conditionType
=
vm
.
goodCondition
.
conditionType
;
vm
.
resultForm
.
goodConditionReqList
[
i
].
number
=
vm
.
goodCondition
.
number
;
vm
.
resultForm
.
goodConditionReqList
[
i
].
intro
=
vm
.
goodCondition
.
intro
;
addFlag
=
false
;
break
;
}
if
(
i
==
vm
.
resultForm
.
goodConditionReqList
.
length
-
1
){
addFlag
=
true
;
}
}
if
(
addFlag
){
vm
.
addGoodConditionReqList
();
}
}
else
{
vm
.
addGoodConditionReqList
();
}
vm
.
setAddVisible
=
false
;
});
},
addGoodConditionReqList
(){
vm
.
resultForm
.
goodConditionReqList
.
push
({
goodIds
:
vm
.
goodCondition
.
goodIds
,
conditionType
:
vm
.
goodCondition
.
conditionType
,
number
:
vm
.
goodCondition
.
number
,
intro
:
vm
.
goodCondition
.
intro
})
}
},
},
};
};
...
...
src/views/shop/shop-list.vue
浏览文件 @
adc9945d
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"药代分佣方式"
>
<el-form-item
label=
"药代分佣方式"
>
<el-select
<el-select
v-model=
"searchForm.
c
ommissionType"
v-model=
"searchForm.
proxyC
ommissionType"
placeholder=
"请选择分佣方式"
placeholder=
"请选择分佣方式"
size=
"small"
size=
"small"
clearable
>
clearable
>
...
@@ -122,13 +122,13 @@
...
@@ -122,13 +122,13 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"commissionType"
label=
"药代分佣方式"
width=
"120"
align=
"center"
>
<el-table-column
prop=
"commissionType"
label=
"药代分佣方式"
width=
"120"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
tradeStore
.
c
ommissionType
|
commissionTypeFormat
}}
</span>
<span>
{{
scope
.
row
.
tradeStore
.
proxyC
ommissionType
|
commissionTypeFormat
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"commissionPrice"
label=
"药代分佣"
width=
"120"
align=
"center"
>
<el-table-column
prop=
"commissionPrice"
label=
"药代分佣"
width=
"120"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.tradeStore.
commissionType == 1"
>
{{
scope
.
row
.
tradeStore
.
c
ommissionPrice
|
priceNum
}}
%
</span>
<span
v-if=
"scope.row.tradeStore.
proxyCommissionType == 1"
>
{{
scope
.
row
.
tradeStore
.
proxyC
ommissionPrice
|
priceNum
}}
%
</span>
<span
v-if=
"scope.row.tradeStore.
commissionType == 2"
>
{{
scope
.
row
.
tradeStore
.
c
ommissionPrice
|
priceNum
}}
元
</span>
<span
v-if=
"scope.row.tradeStore.
proxyCommissionType == 2"
>
{{
scope
.
row
.
tradeStore
.
proxyC
ommissionPrice
|
priceNum
}}
元
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"230"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
min-width=
"230"
align=
"center"
fixed=
"right"
>
...
@@ -171,21 +171,36 @@
...
@@ -171,21 +171,36 @@
size=
"mini"
size=
"mini"
style=
"width: 100%;"
>
style=
"width: 100%;"
>
<el-form-item
label=
"分佣方式"
prop=
"commissionType"
>
<div
v-for=
"(item, index) in setPriceForm.adminCommissionGoodsRespList"
:key=
"index"
>
<el-form-item
v-if=
"item.commissionKind == 1"
label=
"分佣方式"
prop=
"commissionType"
>
<el-col
:span=
"18"
>
<el-col
:span=
"18"
>
<el-radio-group
v-model=
"
setPriceFor
m.commissionType"
size=
"small"
style=
"line-height: 45px;"
>
<el-radio-group
v-model=
"
ite
m.commissionType"
size=
"small"
style=
"line-height: 45px;"
>
<div>
<div>
<el-radio
:label=
"1"
style=
"float: left;margin-top: 5px;line-height: 20px;"
>
按比例分佣(%)
</el-radio>
<el-radio
:label=
"1"
style=
"float: left;margin-top: 5px;line-height: 20px;"
>
按比例分佣(%)
</el-radio>
<span
style=
"float: right;width: 100px;"
><el-input-number
v-model=
"
setPriceFor
m.commissionPrice1"
size=
"small"
:precision=
"2"
:min=
"0"
></el-input-number></span>
<span
style=
"float: right;width: 100px;"
><el-input-number
v-model=
"
ite
m.commissionPrice1"
size=
"small"
:precision=
"2"
:min=
"0"
></el-input-number></span>
</div>
</div>
<div>
<div>
<el-radio
:label=
"2"
style=
"float: left;margin-top: 30px;line-height: 20px;"
>
固定分佣金额(元)
</el-radio>
<el-radio
:label=
"2"
style=
"float: left;margin-top: 30px;line-height: 20px;"
>
固定分佣金额(元)
</el-radio>
<span
style=
"float: right;width: 100px;margin-left: 14px;"
><el-input-number
v-model=
"
setPriceFor
m.commissionPrice2"
size=
"small"
:precision=
"2"
:min=
"0"
:max=
"9999.99"
></el-input-number></span>
<span
style=
"float: right;width: 100px;margin-left: 14px;"
><el-input-number
v-model=
"
ite
m.commissionPrice2"
size=
"small"
:precision=
"2"
:min=
"0"
:max=
"9999.99"
></el-input-number></span>
</div>
</div>
</el-radio-group>
</el-radio-group>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"item.commissionKind == 2"
label=
"药代分佣方式"
>
<el-col
:span=
"18"
>
<el-radio-group
v-model=
"item.commissionType"
size=
"small"
style=
"line-height: 45px;"
>
<div>
<el-radio
:label=
"1"
style=
"float: left;margin-top: 5px;line-height: 20px;"
>
按比例分佣(%)
</el-radio>
<span
style=
"float: right;width: 100px;"
><el-input-number
v-model=
"item.commissionPrice1"
size=
"small"
:precision=
"2"
:min=
"0"
></el-input-number></span>
</div>
<div>
<el-radio
:label=
"2"
style=
"float: left;margin-top: 30px;line-height: 20px;"
>
固定分佣金额(元)
</el-radio>
<span
style=
"float: right;width: 100px;margin-left: 14px;"
><el-input-number
v-model=
"item.commissionPrice2"
size=
"small"
:precision=
"2"
:min=
"0"
:max=
"9999.99"
></el-input-number></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</div>
<!-- <el-form-item label="药代分佣方式">-->
<!-- <el-form-item label="药代分佣方式">-->
<!-- <el-col :span="18">-->
<!-- <el-col :span="18">-->
<!-- <el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">-->
<!-- <el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">-->
...
@@ -235,7 +250,8 @@
...
@@ -235,7 +250,8 @@
pageSize
:
10
,
pageSize
:
10
,
id
:
null
,
id
:
null
,
type
:
null
,
type
:
null
,
commissionType
:
0
commissionType
:
0
,
proxyCommissionType
:
0
},
},
canAdd
:
false
,
canAdd
:
false
,
totalRows
:
0
,
totalRows
:
0
,
...
@@ -279,13 +295,14 @@
...
@@ -279,13 +295,14 @@
}],
}],
setPriceVisible
:
false
,
setPriceVisible
:
false
,
setPriceForm
:{
setPriceForm
:{
commissionType
:
1
,
// commissionType: 1,
commissionPrice
:
''
,
// commissionPrice: '',
commissionPrice1
:
''
,
// commissionPrice1: '',
commissionPrice2
:
''
,
// commissionPrice2: '',
storeId
:
''
,
// storeId: '',
goodsId
:
''
,
// goodsId: '',
maxPrice
:
''
// maxPrice: ''
adminCommissionGoodsRespList
:[]
},
},
setPriceRules
:
{
setPriceRules
:
{
commissionType
:
[
commissionType
:
[
...
@@ -417,34 +434,51 @@
...
@@ -417,34 +434,51 @@
})
})
},
},
confirmSetPrice
()
{
confirmSetPrice
()
{
if
(
this
.
setPriceForm
.
commissionType
==
null
||
this
.
setPriceForm
.
commissionType
==
""
){
this
.
$message
({
message
:
'请选择接诊服务费结算方式(上级医生)'
,
type
:
"warning"
});
return
;
}
if
(
this
.
setPriceForm
.
commissionType
==
1
&&
this
.
setPriceForm
.
commissionPrice1
==
undefined
){
this
.
$message
({
for
(
let
i
=
0
;
i
<
this
.
setPriceForm
.
adminCommissionGoodsRespList
.
length
;
i
++
){
message
:
'请输入按比例分佣'
,
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionKind
==
1
type
:
"warning"
&&
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
null
||
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
""
)){
});
return
;
this
.
$message
({
}
message
:
'请选择分佣方式'
,
else
if
(
this
.
setPriceForm
.
commissionType
==
1
&&
this
.
setPriceForm
.
commissionPrice1
>
100
){
type
:
"warning"
this
.
$message
({
});
message
:
'请输入按比例分佣0-100'
,
return
;
type
:
"warning"
}
});
return
;
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionKind
==
1
}
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
1
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice1
==
undefined
){
if
(
this
.
setPriceForm
.
commissionType
==
2
&&
this
.
setPriceForm
.
commissionPrice2
==
undefined
){
this
.
$message
({
this
.
$message
({
message
:
'请输入按比例分佣'
,
message
:
'请输入固定分佣金额'
,
type
:
"warning"
type
:
"warning"
});
});
return
;
return
;
}
else
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionKind
==
1
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
1
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice1
>
100
){
this
.
$message
({
message
:
'请输入按比例分佣0-100'
,
type
:
"warning"
});
return
;
}
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionKind
==
1
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
2
&&
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice2
==
undefined
){
this
.
$message
({
message
:
'请输入固定分佣金额'
,
type
:
"warning"
});
return
;
}
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
1
){
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice
=
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice1
*
100
;
}
else
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
2
){
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice
=
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice2
*
100
;
}
}
}
let
timeoutId
=
null
let
timeoutId
=
null
...
@@ -455,18 +489,18 @@
...
@@ -455,18 +489,18 @@
},
},
// 防止按钮多次点击
// 防止按钮多次点击
clickHandle
()
{
clickHandle
()
{
this
.
$refs
.
setPriceForm
.
validate
((
valid
)
=>
{
//
this.$refs.setPriceForm.validate((valid) => {
if
(
valid
)
{
//
if(valid) {
vm
.
loading
=
true
;
vm
.
loading
=
true
;
if
(
vm
.
setPriceForm
.
commissionType
==
1
){
//
if(vm.setPriceForm.commissionType == 1){
vm
.
setPriceForm
.
commissionPriceStr
=
vm
.
setPriceForm
.
commissionPrice1
;
//
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice1;
}
//
}
else
if
(
vm
.
setPriceForm
.
commissionType
==
2
){
//
else if(vm.setPriceForm.commissionType == 2){
vm
.
setPriceForm
.
commissionPriceStr
=
vm
.
setPriceForm
.
commissionPrice2
;
//
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice2;
}
//
}
vm
.
setPriceForm
.
commissionPrice
=
vm
.
setPriceForm
.
commissionPriceStr
*
100
;
//
vm.setPriceForm.commissionPrice = vm.setPriceForm.commissionPriceStr * 100;
vm
.
POST
(
'/store/commission/admin/store/save'
,
vm
.
setPriceForm
).
then
(
res
=>
{
vm
.
POST
(
'/store/commission/admin/store/save'
,
vm
.
setPriceForm
.
adminCommissionGoodsRespList
).
then
(
res
=>
{
vm
.
loading
=
false
vm
.
loading
=
false
// closeLoading(this);
// closeLoading(this);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
...
@@ -484,26 +518,72 @@
...
@@ -484,26 +518,72 @@
}
}
});
});
}
//
}
})
//
})
},
},
setPrice
(
row
,
batchUpdatePriceFlag
){
setPrice
(
row
,
batchUpdatePriceFlag
){
if
(
this
.
$refs
.
setPriceForm
)
{
if
(
this
.
$refs
.
setPriceForm
)
{
this
.
$refs
.
setPriceForm
.
resetFields
()
this
.
$refs
.
setPriceForm
.
resetFields
()
}
}
// this.batchUpdatePriceFlag = batchUpdatePriceFlag;
this
.
setPriceForm
.
storeId
=
row
.
tradeStore
.
id
;
if
(
row
.
adminCommissionGoodsRespList
){
this
.
setPriceForm
.
goodsId
=
row
.
tradeStore
.
goodsId
;
this
.
setPriceForm
.
adminCommissionGoodsRespList
=
row
.
adminCommissionGoodsRespList
;
this
.
setPriceForm
.
commissionType
=
""
;
for
(
let
i
=
0
;
i
<
this
.
setPriceForm
.
adminCommissionGoodsRespList
.
length
;
i
++
){
this
.
setPriceForm
.
commissionPrice1
=
undefined
;
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
1
){
this
.
setPriceForm
.
commissionPrice2
=
undefined
;
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice1
=
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice
/
100
;
this
.
setPriceForm
.
commissionType
=
row
.
tradeStore
.
commissionType
;
}
if
(
this
.
setPriceForm
.
commissionType
==
1
){
else
if
(
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionType
==
2
){
this
.
setPriceForm
.
commissionPrice1
=
row
.
tradeStore
.
commissionPrice
/
100
;
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice2
=
this
.
setPriceForm
.
adminCommissionGoodsRespList
[
i
].
commissionPrice
/
100
;
}
}
let
array
=
this
.
setPriceForm
.
adminCommissionGoodsRespList
.
filter
(
function
(
item
)
{
return
item
.
commissionKind
==
2
;
});
if
(
array
==
null
||
array
.
length
==
0
){
this
.
setPriceForm
.
adminCommissionGoodsRespList
.
push
({
commissionKind
:
2
,
commissionPrice
:
""
,
commissionType
:
1
,
goodsId
:
row
.
tradeStore
.
goodsId
,
maxPrice
:
""
,
storeId
:
row
.
tradeStore
.
id
,
});
}
}
}
else
if
(
this
.
setPriceForm
.
commissionType
==
2
){
else
{
this
.
setPriceForm
.
commissionPrice2
=
row
.
tradeStore
.
commissionPrice
/
100
;
this
.
setPriceForm
.
adminCommissionGoodsRespList
=
[{
commissionKind
:
1
,
commissionPrice
:
""
,
commissionType
:
1
,
goodsId
:
row
.
tradeStore
.
goodsId
,
maxPrice
:
""
,
storeId
:
row
.
tradeStore
.
id
,
},
{
commissionKind
:
2
,
commissionPrice
:
""
,
commissionType
:
1
,
goodsId
:
row
.
tradeStore
.
goodsId
,
maxPrice
:
""
,
storeId
:
row
.
tradeStore
.
id
,
}]
}
}
// this.batchUpdatePriceFlag = batchUpdatePriceFlag;
// this.setPriceForm.storeId = row.tradeStore.id;
// this.setPriceForm.goodsId = row.tradeStore.goodsId;
// this.setPriceForm.commissionType = "";
// this.setPriceForm.commissionPrice1 = undefined;
// this.setPriceForm.commissionPrice2 = undefined;
// this.setPriceForm.commissionType = row.tradeStore.commissionType;
// if(this.setPriceForm.commissionType == 1){
// this.setPriceForm.commissionPrice1 = row.tradeStore.commissionPrice/100;
// }
// else if(this.setPriceForm.commissionType == 2){
// this.setPriceForm.commissionPrice2 = row.tradeStore.commissionPrice/100;
// }
this
.
setPriceVisible
=
true
;
this
.
setPriceVisible
=
true
;
// if(this.$refs.setPriceForm) {
// if(this.$refs.setPriceForm) {
// this.$refs.setPriceForm.resetFields()
// this.$refs.setPriceForm.resetFields()
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录