Commit fbbcdaea authored by Your Name's avatar Your Name

o2o配送编辑提交

parent 88dce06c
...@@ -50,15 +50,7 @@ export function addCompanyDetail(parameter) { ...@@ -50,15 +50,7 @@ export function addCompanyDetail(parameter) {
data: 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) { export function getTransportList(parameter) {
return axios({ return axios({
...@@ -94,14 +86,7 @@ export function addDistributionDetail(parameter) { ...@@ -94,14 +86,7 @@ export function addDistributionDetail(parameter) {
data: parameter data: parameter
}) })
} }
// 添加配送方式
// export function addDistributionManage(parameter) {
// return axios({
// url: 'transport/transport-methods/transport-method-insert',
// method: 'post',
// data: parameter
// })
// }
// 获取O2O配送费列表 // 获取O2O配送费列表
export function getExpressPrice(parameter) { export function getExpressPrice(parameter) {
console.log(parameter) console.log(parameter)
...@@ -111,6 +96,24 @@ export function getExpressPrice(parameter) { ...@@ -111,6 +96,24 @@ export function getExpressPrice(parameter) {
params: 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) { export function getDeliveryList(parameter) {
return axios({ return axios({
......
...@@ -234,6 +234,13 @@ export const asyncRouterMap = [ ...@@ -234,6 +234,13 @@ export const asyncRouterMap = [
component: () => import('@/views/delivery/expressPrice'), component: () => import('@/views/delivery/expressPrice'),
meta: { title: 'O2O配送费', keepAlive: false, permission: ['table'] } 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', path: '/delivery/distributionPrice',
name: 'distributionPrice', name: 'distributionPrice',
......
<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>
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
class="table-page-search-submitButtons" class="table-page-search-submitButtons"
:style="advanced && { float: 'right', overflow: 'hidden' } || {} " :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 type="primary" @click="$refs.table.refresh(true)">查询</a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button> <a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
</span> </span>
...@@ -34,18 +33,13 @@ ...@@ -34,18 +33,13 @@
showPagination="auto" showPagination="auto"
> >
<span slot="action" slot-scope="text, record"> <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-divider type="vertical" />
<a-popconfirm title="是否要删除此行?" @confirm="remove(record.GUID)"> <a-popconfirm title="是否要删除此行?" @confirm="remove(record.GUID)">
<a>删除</a> <a>删除</a>
</a-popconfirm> --> </a-popconfirm> -->
</span> </span>
</s-table> </s-table>
<!-- <a-modal title="操作" :width="800" v-model="visible" :footer="null">
</a-modal> -->
</a-card> </a-card>
</template> </template>
...@@ -111,11 +105,11 @@ export default { ...@@ -111,11 +105,11 @@ export default {
dataIndex: 'REGION_DISTR_PRICE' dataIndex: 'REGION_DISTR_PRICE'
}, },
{ {
title: '不同配送费每增加X公里', title: '不同配送费每增加*公里',
dataIndex: 'INCREASE_DISTANCE' dataIndex: 'INCREASE_DISTANCE'
}, },
{ {
title: '不同配送费每增加X公里增加X元', title: '不同配送费每增加*公里增加*元',
dataIndex: 'INCREASE_PRICE' dataIndex: 'INCREASE_PRICE'
}, },
...@@ -147,33 +141,9 @@ export default { ...@@ -147,33 +141,9 @@ export default {
}, },
created() {}, created() {},
methods: { methods: {
goEdit (value) { goEdit (SCDS_GUID="") {
this.$router.push({path:'/delivery/details/ExpressPrice_editor',query:{SCDS_GUID:SCDS_GUID}})
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}})
}
}, },
// 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 ) { remove ( key ) {
console.log(key) console.log(key)
deleteEminforman(key).then(res => { deleteEminforman(key).then(res => {
...@@ -184,9 +154,6 @@ export default { ...@@ -184,9 +154,6 @@ export default {
}) })
}, },
// handleOk() {
// this.$refs.table.refresh()
// },
onSelectChange(selectedRowKeys, selectedRows) { onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows this.selectedRows = selectedRows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment