Commit 9eee52fe authored by Marcus's avatar Marcus

特价组件流程测试

parent 23f660d3
......@@ -92,7 +92,7 @@ export function createOfferSpecial(data) {
// 特价详情
export function getOfferSpecial(offerProdId) {
return request({
url: '/ecw/offer/special/info/' + offerProdId + '?offerProdId=' + offerProdId,
url: '/ecw/offer/special/info/' + offerProdId,
method: 'get'
})
}
......
......@@ -275,7 +275,7 @@ export const constantRoutes = [
meta: {title: '特价申请', icon: '', activeMenu: '/offer/index'}
},
{
path: 'discount',
path: 'discount/:id(\\d+)',
component: (resolve) => import('@/views/ecw/offer/specialDiscount'),
props: true,
name: 'discount',
......
......@@ -49,7 +49,7 @@
prop="address"
label="操作">
<template v-slot="{row}">
<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']" @click="$router.push(`/offer/discount/${row.offerProdId}?offerId=${row.offerId}`)">优惠申请</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>
......
......@@ -38,27 +38,21 @@ import {createOfferSpecial, getOffer, getOfferSpecial} from "@/api/ecw/offer"
export default {
name: "specialDiscount",
props: {
id: Number
},
created() {
// if(this.offerId){
// this.form.offerId = this.offerId
// }
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
}
})
this.form.offerProdId = this.id
// if(this.offerProdId){
// }else if(this.$route.query.offerProdId){
// this.form.offerProdId = this.$route.query.offerProdId - 0
// }
if(this.form.offerId) this.getOffer()
this.getOfferSpecial()
},
data() {
......@@ -80,9 +74,28 @@ export default {
this.$message.success(r.msg || '提交成功')
})
},
getOffer(){
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
}
})
},
getOfferSpecial(){
getOfferSpecial(this.form.offerProdId).then(r => {
this.follow = r.data
if (!this.form.offerId) {
this.form.offerId = r.data.offerId
}
})
}
}
......
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