Commit 052d2af6 by 张权

第一轮修改

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