Commit c8e4c1f4 by 李伟康

Merge branch 'v2.7.0_0802' of http://192.168.3.233:8090/glsx/dj-scrm-wx-work-att…

…achment-activity into v2.7.0_0802
2 parents e720b2ac 17ef08b6
......@@ -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)
......@@ -329,9 +324,10 @@ export default {
if(res.approveFlag ===2){
wxConfig.thirdPartyOpenPage(setApproveParam(res))
.then((resp) => {
console.log(resp,'已发起审批')
setTimeout(()=>{
this.$router.replace({ name: 'gift.detail', query: {id:res.directionalGiftId,approveStatus:999}})
let { pageIdx} = this.getQuery()
let childId = pageIdx ==3 ? res.directionalGiftChildId : this.obj.childId ? this.obj.childId: ''
this.$router.replace({ name: 'gift.detail', query: {id:res.directionalGiftId,approveStatus:999,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) {
......@@ -338,7 +336,8 @@ export default {
}else if(this.activeTab==2 && e.perfectFlag==2){
let params = {
id: e.id,
perfectFlag:e.perfectFlag
perfectFlag:e.perfectFlag,
pageIdx: this.tabIndex==0 && this.activeTab==2 ? 3 : this.tabIndex
}
this.$router.push({ name: 'gift.create', query: params })
}else{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!