Commit aedd09ff by 张立顺

Merge branch 'v3.2.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v3.2.0

2 parents 6f767331 9d6e702d
...@@ -53,6 +53,18 @@ const getGiftInfoApi = params => { ...@@ -53,6 +53,18 @@ const getGiftInfoApi = params => {
returnAll: true returnAll: true
}) })
} }
// 获取已领取详情
const getReceivedGiftDetail = params => {
params.method = 'scrm.api.coupon.received.directional.gift.detail'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 根据条件获取已领取定向礼包列表 // 根据条件获取已领取定向礼包列表
const getReceivedGiftInfoApi = params => { const getReceivedGiftInfoApi = params => {
params.method = 'scrm.api.coupon.user.saas.directional.gift.list' params.method = 'scrm.api.coupon.user.saas.directional.gift.list'
...@@ -149,4 +161,4 @@ const getGroupGift = params => { ...@@ -149,4 +161,4 @@ const getGroupGift = params => {
sign: true sign: true
}) })
} }
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift, getQrcode, getGroupGift } export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftDetail, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift, getQrcode, getGroupGift }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div> <div slot="remarkName" class="edit-tips m-t-8">可根据备注名称进行查找,仅作内部查看,不展示给客户</div>
<el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button> <el-button slot="selectGiftBtn" :disabled="routeInfo.receivedStock" class="default-blue-btn" @click="handleGiftAdd">选择礼包内容</el-button>
<div style="width: 878px;" slot="selectGroupGiftSlot"> <div style="width: 878px;" slot="selectGroupGiftSlot">
<el-radio v-for="(item,index) in groupList" :key="index" v-model="groupDirectionalGiftId" :label="item.id">{{item.name}}</el-radio> <el-radio :disabled="routeInfo.receivedStock" v-for="(item,index) in groupList" :key="index" v-model="groupDirectionalGiftId" :label="item.id">{{item.name}}</el-radio>
</div> </div>
<div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0"> <div slot="couponListBlock" class="gift-block" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
<div class="gift-title"> <div class="gift-title">
...@@ -526,6 +526,7 @@ export default { ...@@ -526,6 +526,7 @@ export default {
} }
}, },
getGroupGift(){ getGroupGift(){
this.loading = true
this.$apis.giftBag.getGroupGift({}).then(res => { this.$apis.giftBag.getGroupGift({}).then(res => {
let giftArr = [] let giftArr = []
if(res?.length){ if(res?.length){
...@@ -547,6 +548,8 @@ export default { ...@@ -547,6 +548,8 @@ export default {
let target = this.editFormData.find(item => item.addHtml == 'giftTypeSlot') let target = this.editFormData.find(item => item.addHtml == 'giftTypeSlot')
target.isHide = true target.isHide = true
} }
}).finally(end =>{
this.loading = false
}) })
}, },
selectGroupGiftFn(item){ selectGroupGiftFn(item){
......
...@@ -242,8 +242,9 @@ export default { ...@@ -242,8 +242,9 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
this.$apis.giftBag const API = this.routeInfo.type == 'received' ? 'getReceivedGiftDetail' : 'getGiftInfoApi'
.getGiftInfoApi({ id: this.routeInfo.id }) const paramsKey = this.routeInfo.type == 'received' ? 'userDirectionalGiftId' : 'id'
this.$apis.giftBag[API]({ [paramsKey]: this.routeInfo.id })
.then(res => { .then(res => {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss') res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss')
res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss') res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
......
...@@ -375,7 +375,7 @@ export default { ...@@ -375,7 +375,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/giftBag/giftDetail', path: '/giftBag/giftDetail',
query: { query: {
id: row.directionalGiftId, id: row.id,
type: 'received' type: 'received'
} }
}) })
......
...@@ -242,8 +242,7 @@ export default { ...@@ -242,8 +242,7 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
this.$apis.giftBag this.$apis.giftBag.getReceivedGiftDetail({userDirectionalGiftId : this.routeInfo.id})
.getGiftInfoApi({ id: this.routeInfo.id })
.then(res => { .then(res => {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss') res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss')
res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss') res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
......
...@@ -373,7 +373,7 @@ export default { ...@@ -373,7 +373,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/groupGiftBag/receivedGiftDetail', path: '/groupGiftBag/receivedGiftDetail',
query: { query: {
id: row.directionalGiftId, id: row.id,
type: 'received' type: 'received'
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!