Commit 052d2af6 by 张权

第一轮修改

1 parent d2ab2d4b
......@@ -194,15 +194,10 @@ export default {
getDetail () {
let { id,pageIdx, childId,perfectFlag } = this.getQuery()
let API = pageIdx==1? giftApi.getUserGiftDetail : pageIdx==2 ? giftApi.getApproveGiftDetail : giftApi.getGiftDetail
let pramas
if(pageIdx==2 || pageIdx==0){
pramas = {id,childId}
}else{
pramas = {id}
}
let pramas = {id,childId}
API(pramas).then(res => {
this.hideLoading()
if(perfectFlag==2 || res.receiveRule==2){
if(res.receiveRule==2 || (res.receiveRule==3 && res.stock>1)){
this.disabledList=['name','remark','add']
}
res = this.setCouponData(res)
......@@ -331,7 +326,7 @@ export default {
.then((resp) => {
console.log(resp,'已发起审批')
setTimeout(()=>{
this.$router.replace({ name: 'gift.detail', query: {id:res.directionalGiftId,approveStatus:999}})
this.$router.replace({ name: 'gift.detail', query: {id:res.directionalGiftId,approveStatus:999,childId:this.obj.childId || ''}})
},500)
})
}else{
......
......@@ -221,12 +221,7 @@ export default {
getDetail () {
let { id,pageIdx, childId } = this.getQuery()
let API = pageIdx==1? giftApi.getUserGiftDetail : pageIdx==2 ? giftApi.getApproveGiftDetail : giftApi.getGiftDetail
let pramas
if(pageIdx==2 || pageIdx==0){
pramas = {id,childId}
}else{
pramas = {id}
}
let pramas = {id,childId}
API(pramas).then(res => {
this.hideLoading()
res = this.setCouponData(res)
......@@ -295,11 +290,11 @@ export default {
})
},
changeGift () {
let { id,perfectFlag,pageIdx,childId } = this.getQuery()
let { id,perfectFlag,pageIdx } = this.getQuery()
if(perfectFlag==1){
this.pushApproval()
}else{
let query = {id,pageIdx,childId}
let query = {id,pageIdx,childId : this.obj.childId || ''}
if(perfectFlag==2) query.perfectFlag = perfectFlag
this.$router.replace({ name: 'gift.create', query })
}
......
......@@ -48,7 +48,7 @@
</div>
</div>
<div class="remainNum" style="display:flex;">
<span>剩余礼包:<span style="color: #3975C6;">{{i.stock - i.receivedStock}}</span></span>
<span>剩余礼包:<span style="color: #3975C6;">{{i.surplusStock}}</span></span>
<span>已领礼包:{{i.receivedStock}}</span>
</div>
<!-- <template #right>
......@@ -289,9 +289,7 @@ export default {
params.perfectFlag = item.perfectFlag
params.pageIdx = 3
}
if(this.tabIndex==2 || (this.tabIndex==0 && this.activeTab==1)){
params.childId = item.childId
}
params.childId = item.childId || ''
this.$router.push({ name: 'gift.detail', query: params })
},
getMiniParams (e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!