Commit 7bbfe36f by 胡悦

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

2 parents e3996bb2 62a7019e
...@@ -53,5 +53,48 @@ const getGiftInfoApi = params => { ...@@ -53,5 +53,48 @@ const getGiftInfoApi = params => {
returnAll: true returnAll: true
}) })
} }
// 根据条件获取已领取定向礼包列表
const getReceivedGiftInfoApi = params => {
params.method = 'scrm.api.coupon.user.saas.directional.gift.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
// returnAll: true
})
}
// 导出已领取礼包
const exportGiftInfoApi = params => {
params.method = 'scrm.api.coupon.user.saas.directional.gift.list.export'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
})
}
// 编辑-选择定向礼包列表
const getDirectionalGiftListApi = params => {
params.method = 'scrm.api.coupon.directional.gift.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const insertGiftApi = params => {
params.method = 'scrm.api.coupon.directional.gift.create'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi } export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi }
...@@ -12,7 +12,6 @@ let cfg = require('./conf.js') ...@@ -12,7 +12,6 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
// console.log(1111111)
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
......
...@@ -610,7 +610,7 @@ export default { ...@@ -610,7 +610,7 @@ export default {
//是否定制礼包专用 //是否定制礼包专用
obj.directionalFlag = form.directionalFlag obj.directionalFlag = form.directionalFlag
//预估成本 //预估成本
obj.anticipatedCost = form.anticipatedCost * 100 // obj.anticipatedCost = form.anticipatedCost * 100
//面值 //面值
obj.denomination = form.denomination obj.denomination = form.denomination
//库存 //库存
...@@ -634,6 +634,8 @@ export default { ...@@ -634,6 +634,8 @@ export default {
} }
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj return obj
}, },
......
...@@ -299,8 +299,6 @@ export default { ...@@ -299,8 +299,6 @@ export default {
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务 //优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj.discountType = '2' obj.discountType = '2'
obj.directionalFlag = '1' obj.directionalFlag = '1'
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj.effectiveType = form.effectiveType obj.effectiveType = form.effectiveType
...@@ -325,6 +323,8 @@ export default { ...@@ -325,6 +323,8 @@ export default {
} }
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj return obj
}, },
......
...@@ -277,8 +277,6 @@ export default { ...@@ -277,8 +277,6 @@ export default {
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务 //优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj.discountType = '4' obj.discountType = '4'
obj.directionalFlag = '1' obj.directionalFlag = '1'
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
//有效期 //有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期 //有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj.effectiveType = form.effectiveType obj.effectiveType = form.effectiveType
...@@ -303,6 +301,8 @@ export default { ...@@ -303,6 +301,8 @@ export default {
} }
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj return obj
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
<div slot="receiveDetails">{{ editForm.receiveWay == '0' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div> <div slot="receiveDetails">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper-detail"> <div :key="key" class="el-input-tag input-tag-wrapper-detail">
<el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)">
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button> <el-button type="default" @click="handleCancel">返回</el-button>
<el-button type="primary" @click="handleEdit">编辑</el-button> <el-button v-show="editForm.receivedFlag == 1" type="primary" @click="handleEdit">编辑</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -61,8 +61,9 @@ export default { ...@@ -61,8 +61,9 @@ export default {
editForm: { editForm: {
name: '', name: '',
remarkName: '', remarkName: '',
receiveWay: '0', receiveWay: '1',
receiveDetails: '', receiveDetails: '',
receivedFlag: 2,
staffList: [], staffList: [],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务 // 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效 // 优惠券状态(status):1:未生效,2:生效中,3:已失效
...@@ -155,14 +156,16 @@ export default { ...@@ -155,14 +156,16 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
this.$apis.giftBag.getGiftInfoApi({ id: this.routeInfo.id }).then(res => { this.$apis.giftBag
this.editForm = res.data .getGiftInfoApi({ id: this.routeInfo.id })
this.recoveryCoupon() .then(res => {
this.recoveryTotalPrice() this.editForm = res.data
this.$nextTick(() => { this.recoveryCoupon()
this.recoveryTotalPrice()
})
.finally(() => {
this.loading = false this.loading = false
}) })
})
}, },
recoveryCoupon() { recoveryCoupon() {
...@@ -176,8 +179,8 @@ export default { ...@@ -176,8 +179,8 @@ export default {
receiveWayChange(val) { receiveWayChange(val) {
var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails') var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails')
this.editFormData[receiveDetailsIdx].placeholder = val == '0' ? '请输入领取手机号' : '请输入领取车架号后6位' this.editFormData[receiveDetailsIdx].placeholder = val == '1' ? '请输入领取手机号' : '请输入领取车架号后6位'
this.editFormData[receiveDetailsIdx].maxlength = val == '0' ? 11 : 6 this.editFormData[receiveDetailsIdx].maxlength = val == '1' ? 11 : 6
}, },
// 计算预估成本 // 计算预估成本
...@@ -197,7 +200,7 @@ export default { ...@@ -197,7 +200,7 @@ export default {
handleEdit() { handleEdit() {
var params = { var params = {
addOrEdit: 'edit', addOrEdit: 'edit',
$title: encodeURI('编辑信息') $title: encodeURI('编辑礼包')
} }
params.id = this.routeInfo.id params.id = this.routeInfo.id
this.$router.push({ this.$router.push({
......
...@@ -29,15 +29,20 @@ ...@@ -29,15 +29,20 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="giftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="giftInfo" slot-scope="scope"> <div slot="giftInfo" slot-scope="scope">
<div>礼包明细</div> <div class="p-b-12">礼包明细</div>
<div>{{ scope.scope }}</div> <div class="gift-detail flex-default">
<div class="gift-item" v-for="(item, index) in scope.scope.couponList" :key="index">
<p :class="['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']">{{ item.couponName }} × {{ item.couponAmount }}</p>
<p v-show="item.status == '3'" class="gift-tips">已失效</p>
</div>
</div>
</div> </div>
<div slot="name" slot-scope="scope"> <div slot="name" slot-scope="scope">
<el-button :size="size" type="text" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</el-button> <el-button :size="size" type="text" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</el-button>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <!-- <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<!-- <GLButton type="text" fn="删除" @click="handleDelete(scope.scope)">删除</GLButton> --> <GLButton type="text" fn="删除" @click="handleDelete(scope.scope)">删除</GLButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -56,8 +61,8 @@ export default { ...@@ -56,8 +61,8 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
orderCode: '', name: '',
commentStatus: '', staffName: '',
createDate: [] createDate: []
}, },
tableSearchForm: {}, tableSearchForm: {},
...@@ -131,7 +136,10 @@ export default { ...@@ -131,7 +136,10 @@ export default {
}, },
{ {
label: '赠送原因', label: '赠送原因',
prop: 'giveReason' prop: 'giveReason',
formatter: cellValue => {
return cellValue.giveReason || '-'
}
}, },
{ {
label: '创建时间', label: '创建时间',
...@@ -228,7 +236,7 @@ export default { ...@@ -228,7 +236,7 @@ export default {
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id) // addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 'add' ? '新增信息' : '编辑信息') $title: encodeURI(addOrEdit == 'add' ? '新增礼包' : '编辑礼包')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
this.$router.push({ this.$router.push({
...@@ -278,8 +286,8 @@ export default { ...@@ -278,8 +286,8 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
orderCode: '', name: '',
commentStatus: '', staffName: '',
createDate: [] createDate: []
} }
this.handleSearch() this.handleSearch()
...@@ -288,4 +296,27 @@ export default { ...@@ -288,4 +296,27 @@ export default {
} }
</script> </script>
<style scoped></style> <style lang="scss">
.p-b-12 {
margin-bottom: 14px;
}
.gift-detail .gift-item {
margin-right: 80px;
.gift-coupon-name {
display: inline-block;
margin-right: 7px;
}
.gift-tips {
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
color: #999999;
background-color: #eeeded;
margin-right: 7px;
}
}
.gift-detail .gift-item:last-child {
margin-right: 0;
}
</style>
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="gift-bag"> <div class="gift-bag">
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="定向礼包" name="giftList"> <el-tab-pane label="定向礼包" name="giftList">
<gift-list></gift-list> <gift-list v-if="activeName == 'giftList'"></gift-list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已领取" name="receivedGiftList"> <el-tab-pane label="已领取" name="receivedGiftList">
<receivedGiftList></receivedGiftList> <receivedGiftList v-if="activeName == 'receivedGiftList'"></receivedGiftList>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
recoverySelected() { recoverySelected() {
if (this.selectedStaffList && this.selectedStaffList.length) { if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => { this.selectedStaffList.forEach(row => {
row.userOneId = row.staffId row.userOneId = row.staffUUID
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row) this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row)
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!