Commit 7986b1e4 authored by Marcus's avatar Marcus

优惠申请 提交

parent e37f5b1e
...@@ -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
})
}
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
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?id=' + 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>
......
<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: {
}, },
created() { created() {
if(this.$route.query.id){ if(this.$route.query.offerId){
this.id = this.$route.query.id 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() { data() {
return { return {
id: '' form: {
// "applyResult": "",
// "applyStatus": 0,
"clearanceFreight": 0,
"offerId": 0,
"offerProdId": 0,
"seaFreight": 0
}
}
},
methods: {
handleSubmit(){
createOfferSpecial(this.form).then(r => {
this.$message.success(r.msg || '提交成功')
})
} }
} }
} }
......
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