Commit 5ce0097d authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents 1e6a36c0 7986b1e4
...@@ -79,3 +79,12 @@ export function getProductFee(calculationFeeParamVO){ ...@@ -79,3 +79,12 @@ export function getProductFee(calculationFeeParamVO){
data: calculationFeeParamVO data: calculationFeeParamVO
}) })
} }
// 特价申请
export function createOfferSpecial(data) {
return request({
url: '/ecw/offer/special/apply',
method: 'put',
data: data
})
}
...@@ -271,15 +271,15 @@ export const constantRoutes = [ ...@@ -271,15 +271,15 @@ export const constantRoutes = [
path: 'special/:offerId(\\d+)', path: 'special/:offerId(\\d+)',
component: (resolve) => import('@/views/ecw/offer/special'), component: (resolve) => import('@/views/ecw/offer/special'),
props: true, props: true,
name: 'offer', name: 'special',
meta: {title: '特价申请', icon: '', activeMenu: '/offer/special'} meta: {title: '特价申请', icon: '', activeMenu: '/offer/index'}
}, },
{ {
path: 'discount/:id(\\d+)', path: 'discount',
component: (resolve) => import('@/views/ecw/offer/specialDiscount'), component: (resolve) => import('@/views/ecw/offer/specialDiscount'),
props: true, props: true,
name: 'offer', name: 'discount',
meta: {title: '优惠申请', icon: '', activeMenu: '/offer/discount'} meta: {title: '优惠申请', icon: '', activeMenu: '/offer/index'}
}, },
] ]
} }
......
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
prop="address" prop="address"
label="操作"> label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']" @click="$router.push('/offer/discount/' + row.lineId)">优惠申请</el-button> <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']" @click="$router.push(`'/offer/discount?offerId=${row.offerId}&offerProdId=${row.offerProdId}`)">优惠申请</el-button>
<el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">佣金规则</el-button> <!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">佣金规则</el-button>-->
<el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">管理折扣</el-button> <!-- <el-button size="mini" type="text" v-hasPermi="['ecw:offer:update']">管理折扣</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
......
<template> <template>
<div class="app-container">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>优惠申请</span>
</div>
offerId: {{ form.offerId }}<br>
offerProdId: {{ form.offerProdId }}<br>
clearanceFreight: {{ form.clearanceFreight }}<br>
seaFreight: {{ form.seaFreight }}
<div> <div>
<h3>优惠申请</h3> <el-button type="primary" @click="handleSubmit">提交</el-button>
{{ id }} </div>
</el-card>
</el-col>
</el-row>
</div> </div>
</template> </template>
<script> <script>
import {createOfferSpecial, getOffer} from "@/api/ecw/offer"
export default { export default {
name: "specialDiscount", name: "specialDiscount",
props: { props: {
id: String },
created() {
if(this.$route.query.offerId){
this.form.offerId = this.$route.query.offerId - 0
}
if(this.$route.query.offerProdId){
this.form.offerProdId = this.$route.query.offerProdId - 0
}
getOffer(this.form.offerId).then(r => {
const line = r.data.offerProdRespVOList.find(e => e.offerProdId = this.form.offerProdId)
console.log(line)
const {
clearanceFreight,
seaFreight
} = line
this.form = {
...this.form,
clearanceFreight,
seaFreight
}
})
},
data() {
return {
form: {
// "applyResult": "",
// "applyStatus": 0,
"clearanceFreight": 0,
"offerId": 0,
"offerProdId": 0,
"seaFreight": 0
}
}
},
methods: {
handleSubmit(){
createOfferSpecial(this.form).then(r => {
this.$message.success(r.msg || '提交成功')
})
}
} }
} }
</script> </script>
......
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