Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopFront
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
newshop
newShopFront
Commits
fbbcdaea
Commit
fbbcdaea
authored
Dec 20, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o2o配送编辑提交
parent
88dce06c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
55 deletions
+148
-55
delivery.js
src/api/delivery.js
+20
-17
router.config.js
src/config/router.config.js
+7
-0
ExpressPrice_editor.vue
src/views/delivery/details/ExpressPrice_editor.vue
+116
-0
expressPrice.vue
src/views/delivery/expressPrice.vue
+5
-38
No files found.
src/api/delivery.js
View file @
fbbcdaea
...
...
@@ -50,15 +50,7 @@ export function addCompanyDetail(parameter) {
data
:
parameter
})
}
// // 获取配送方式列表
// export function getTransportMethod(parameter) {
// console.log(parameter)
// return axios({
// url: 'transport/transport-methods/get-transport-method',
// method: 'get',
// params: parameter
// })
// }
// 获取配送方式列表
export
function
getTransportList
(
parameter
)
{
return
axios
({
...
...
@@ -94,14 +86,7 @@ export function addDistributionDetail(parameter) {
data
:
parameter
})
}
// 添加配送方式
// export function addDistributionManage(parameter) {
// return axios({
// url: 'transport/transport-methods/transport-method-insert',
// method: 'post',
// data: parameter
// })
// }
// 获取O2O配送费列表
export
function
getExpressPrice
(
parameter
)
{
console
.
log
(
parameter
)
...
...
@@ -111,6 +96,24 @@ export function getExpressPrice(parameter) {
params
:
parameter
})
}
// 获取O2O配送费详情
export
function
getO2oDeliveryView
(
parameter
)
{
return
axios
({
url
:
'transport/o2o-deliveries/o2o-delivery-view'
,
method
:
'get'
,
params
:
{
'SCDS_GUID'
:
parameter
}
})
}
//修改O2O配送费详情
export
function
modifyO2oDeliveryDetails
(
parameter
)
{
return
axios
({
url
:
'transport/o2o-deliveries/o2o-delivery-update'
,
method
:
'put'
,
data
:
parameter
})
}
// 获取配送价格列表
export
function
getDeliveryList
(
parameter
)
{
return
axios
({
...
...
src/config/router.config.js
View file @
fbbcdaea
...
...
@@ -234,6 +234,13 @@ export const asyncRouterMap = [
component
:
()
=>
import
(
'@/views/delivery/expressPrice'
),
meta
:
{
title
:
'O2O配送费'
,
keepAlive
:
false
,
permission
:
[
'table'
]
}
},
{
path
:
'/delivery/details/ExpressPrice_editor'
,
name
:
'ExpressPrice_editor'
,
hidden
:
true
,
component
:
()
=>
import
(
'@/views/delivery/details/ExpressPrice_editor'
),
meta
:
{
title
:
'编辑O2O配送费'
,
keepAlive
:
false
,
permission
:
[
'table'
]
}
},
{
path
:
'/delivery/distributionPrice'
,
name
:
'distributionPrice'
,
...
...
src/views/delivery/details/ExpressPrice_editor.vue
0 → 100644
View file @
fbbcdaea
<
template
>
<a-card
:body-style=
"
{ padding: '24px 32px' }" :bordered="false">
<a-form
:form=
"form"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"门店名称"
>
<a-input
v-decorator=
"['BRANCH_NAME',
{ rules: [{ required: true, message: '请输入门店名称' }] }]"
name="BRANCH_NAME"
placeholder="请输入门店名称"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"门店编码"
>
<a-input
v-decorator=
"['BRANCH_CODE']"
name=
"BRANCH_CODE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"收费方式"
>
<a-radio-group
v-decorator=
"['REGION_TYPE',
{ normalize: checkRadio }]">
<a-radio
value=
"1"
>
区域
</a-radio>
<a-radio
value=
"2"
>
距离
</a-radio>
</a-radio-group>
</a-form-item>
<!--
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"区域运费"
>
<a-input
v-decorator=
"['DELIVERY_PRICE']"
name=
"DELIVERY_PRICE"
/>
</a-form-item>
-->
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"区域运费"
>
<a-input
v-decorator=
"['DELIVERY_PRICE']"
name=
"DELIVERY_PRICE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"基础公里数"
>
<a-input
v-decorator=
"['REGION_DISTR_DISTANCE']"
name=
"REGION_DISTR_DISTANCE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"基础运费"
>
<a-input
v-decorator=
"['REGION_DISTR_PRICE']"
name=
"REGION_DISTR_PRICE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"不同配送费每增加X公里"
>
<a-input
v-decorator=
"['INCREASE_DISTANCE']"
name=
"INCREASE_DISTANCE"
/>
</a-form-item>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"不同配送费每增加X公里增加X元"
>
<a-input
v-decorator=
"['INCREASE_PRICE']"
name=
"INCREASE_PRICE"
/>
</a-form-item>
<a-form-item
:wrapperCol=
"
{ span: 24 }" style="text-align: center">
<a-button
@
click=
"updateSubmit"
htmlType=
"submit"
type=
"primary"
>
提交
</a-button>
<a-button
@
click=
"goBack"
style=
"margin-left: 8px"
>
返回
</a-button>
</a-form-item>
</a-form>
</a-card>
</
template
>
<
script
>
import
moment
from
'moment'
import
{
getO2oDeliveryView
,
modifyO2oDeliveryDetails
}
from
'@/api/delivery'
export
default
{
name
:
'delivery'
,
data
()
{
return
{
NAME
:
''
,
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
7
}
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
12
}
},
description
:
'表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。'
,
SCDS_GUID
:
''
,
// form
form
:
this
.
$form
.
createForm
(
this
)
}
},
mounted
()
{
var
id
=
this
.
$route
.
query
.
SCDS_GUID
console
.
log
(
id
)
this
.
SCDS_GUID
=
id
if
(
id
)
{
return
getO2oDeliveryView
(
id
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
form
.
setFieldsValue
(
res
.
data
[
0
])
}).
catch
(
err
=>
{})
}
},
methods
:
{
// checkRadio处理
checkRadio
(
value
)
{
if
(
value
)
{
return
value
.
toString
()
// return Number(value)
}
},
updateSubmit
()
{
let
GUID
=
this
.
SCDS_GUID
const
{
form
:
{
validateFields
}
}
=
this
validateFields
({
force
:
true
},
(
err
,
values
)
=>
{
if
(
!
err
)
{
const
O2oDeliveryModify
=
Object
.
assign
({
...
values
},
{
GUID
:
GUID
})
console
.
log
(
O2oDeliveryModify
)
modifyO2oDeliveryDetails
(
O2oDeliveryModify
)
this
.
$router
.
push
({
path
:
'/delivery/expressPrice'
})
}
})
},
goBack
()
{
this
.
$router
.
push
({
path
:
'/delivery/expressPrice'
})
}
}
}
</
script
>
src/views/delivery/expressPrice.vue
View file @
fbbcdaea
...
...
@@ -13,7 +13,6 @@
class=
"table-page-search-submitButtons"
:style=
"advanced &&
{ float: 'right', overflow: 'hidden' } || {} "
>
<!--
<a-button
type=
"primary"
@
click=
"getData"
>
查询
</a-button>
-->
<a-button
type=
"primary"
@
click=
"$refs.table.refresh(true)"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"() => queryParam =
{}">重置
</a-button>
</span>
...
...
@@ -34,18 +33,13 @@
showPagination=
"auto"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
type=
"primary"
@
click=
"goEdit(record)"
>
编辑
</a>
<a
type=
"primary"
@
click=
"goEdit(record
.SCDS_GUID
)"
>
编辑
</a>
<!--
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"remove(record.GUID)"
>
<a>
删除
</a>
</a-popconfirm>
-->
</span>
</s-table>
<!--
<a-modal
title=
"操作"
:width=
"800"
v-model=
"visible"
:footer=
"null"
>
</a-modal>
-->
</a-card>
</
template
>
...
...
@@ -111,11 +105,11 @@ export default {
dataIndex
:
'REGION_DISTR_PRICE'
},
{
title
:
'不同配送费每增加
X
公里'
,
title
:
'不同配送费每增加
*
公里'
,
dataIndex
:
'INCREASE_DISTANCE'
},
{
title
:
'不同配送费每增加
X公里增加X
元'
,
title
:
'不同配送费每增加
*公里增加*
元'
,
dataIndex
:
'INCREASE_PRICE'
},
...
...
@@ -147,33 +141,9 @@ export default {
},
created
()
{},
methods
:
{
goEdit
(
value
)
{
if
(
value
==
1
){
this
.
$router
.
push
({
path
:
'/userstaff/details/Eminforman_editor'
,
query
:{
goid
:
1
}})
}
else
{
console
.
log
(
value
)
this
.
$router
.
push
({
path
:
'/userstaff/details/Eminforman_editor'
,
query
:{
goid
:
0
,
GUID
:
value
.
GUID
}})
}
goEdit
(
SCDS_GUID
=
""
)
{
this
.
$router
.
push
({
path
:
'/delivery/details/ExpressPrice_editor'
,
query
:{
SCDS_GUID
:
SCDS_GUID
}})
},
// handleEdit(record) {
// this.visible = true
// var that = this
// getEminformanDetails(record.GUID)
// .then(res => {
// // this.radioVal = res.data[0]
// // console.log(res.data[0])
// // this.modalForm.initialValue(res.data[0])
// this.$nextTick(() => {
// this.formCheck.setFieldsValue(res)
// })
// })
// .catch(err => {
// console.log(err)
// })
// // this.queryParam1 = Object.assign({}, record)
// },
remove
(
key
)
{
console
.
log
(
key
)
deleteEminforman
(
key
).
then
(
res
=>
{
...
...
@@ -184,9 +154,6 @@ export default {
})
},
// handleOk() {
// this.$refs.table.refresh()
// },
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
...
...
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