Commit 49b6d5af by 前端

Merge branch 'v3.6.0' into 'master'

V3.6.0

See merge request !3
2 parents fbb1b568 57c45447
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:56
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-23 15:10:00
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-09 18:19:51
* @FilePath: \scrm-micro-link\src\api\modules\activity.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 16:38:54
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-13 17:29:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-14 14:08:40
* @FilePath: \scrm-micro-link\src\api\modules\giftBag.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,4 +17,23 @@ const getghDirectionalGiftListApi = params => {
sign: true
})
}
export default { getghDirectionalGiftListApi }
const getEquityListApi = params => {
params.method = 'scrm.api.coupon.equity.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
const brandList = params => {
params.method = 'scrm.api.equity.goods.brand.list.all'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getghDirectionalGiftListApi, getEquityListApi, brandList }
......@@ -59,6 +59,11 @@ html {
.message-Z-zinde {
z-index: 9999 !important;
}
.ellipsis-1 {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.flex {
display: flex;
}
......
......@@ -252,6 +252,10 @@ const subscribe = [
optionLabel: '定保招揽'
},
{
optionId: 4,
optionLabel: '家庭会员卡'
},
{
optionId: 3,
optionLabel: '其他'
}
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-13 17:59:21
* @LastEditTime: 2023-03-02 17:28:20
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-05 11:27:53
* @LastEditTime: 2023-03-10 18:08:50
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......@@ -20,7 +20,7 @@ Vue.prototype.size = 'small'
Vue.prototype.defaultLabelWidth = '154px'
try {
const loginpath = JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION'))?.loginpath
if (loginpath == '/oss') Vue.prototype.loginpath = true
if (loginpath === '/oss') Vue.prototype.loginpath = true
} catch (e) {
console.log(e)
}
......
......@@ -23,7 +23,7 @@
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']" @change="e => handleTimeChange(e, scope.scope)"></el-date-picker>
</div>
</template>
<el-button slot="selectGiftBtn" type="default" class="el-icon-plus" @click="handleGiftAdd">选择优惠券</el-button>
<el-button slot="selectGiftBtn" type="default" class="el-icon-plus" @click="handleGiftAdd">选择服务</el-button>
<div slot="couponListBlock" style="width: 700px" :style="{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList && editForm.couponList.length != 0">
<div class="gift-block">
<div class="gift-title">
......@@ -47,6 +47,30 @@
</div>
</div>
</div>
<template slot="selectGoodsBtn">
<el-button type="default" class="el-icon-plus" @click="handleGoodsAdd">选择福利券</el-button>
</template>
<div slot="goodsListBlock" style="width: 792px" :style="{ 'margin-left': defaultLabelWidth }" v-if="selectedGoodsList && selectedGoodsList.length">
<div class="goods-panel">
<el-table :data="selectedGoodsList" border style="width: 100%">
<el-table-column type="index" label="序号" width="70"></el-table-column>
<el-table-column prop="brandName" label="品牌" width="120"></el-table-column>
<el-table-column prop="goodsName" label="商户名称" width="160"></el-table-column>
<el-table-column prop="couponAmount" label="数量" width="80"></el-table-column>
<el-table-column prop="denomination" label="劵面额" width="140">
<template slot-scope="scope">{{ (scope.row.denomination / 100).toFixed(2) }}元</template>
</el-table-column>
<el-table-column prop="effectiveDays" label="有效期" width="120">
<template slot-scope="scope">{{ scope.row.effectiveDays }}天</template>
</el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click="handleDeleteGoods(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- <div slot="specificationsHtml" v-if="specificationDetailList.length" class="flex" style="min-width: 600px" id="specificationDetailList">
<div style="width: calc(100%)">
<table class="table-spesc" style="width: calc(100%)">
......@@ -307,6 +331,7 @@
<crowdEditWechat ref="crowdEditWechat" :editForm="editForm" :countDownObj="countDownObj"></crowdEditWechat>
</GLDialog>
<select-gift-dialog :merchantId="editForm.merchantId" v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<select-goods-dialog v-if="isSelectGoodsVisible" :isSelectGoodsVisible="isSelectGoodsVisible" :selectedGoodsLists="selectedGoodsList" @handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></select-goods-dialog>
<select-single-pro-dialog v-if="isSingleSelectVisible" :merchantId="editForm.merchantId" :isSingleSelectVisible="isSingleSelectVisible" :propSearch="{ deliveryType: 1 }" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose(true)"></select-single-pro-dialog>
<!-- :storeSelected="selectedList" -->
<select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
......@@ -346,6 +371,7 @@ import { utils } from 'glsx-common'
import crowdEditWechat from './crowdEditWechat.vue'
import selectStore from './components/selectStore'
import selectGiftDialog from './components/selectGiftDialog.vue'
import selectGoodsDialog from './components/selectGoodsDialog.vue'
const couponObj = {
// 折扣券
discount: {
......@@ -376,19 +402,38 @@ const couponObj = {
logo: require('@/assets/coupon/icon-service.png')
}
}
const goodsObj = {
// 卡券
card: {
label: '卡券',
appearance: 1,
list: []
},
// 直充
recharge: {
label: '直充',
appearance: 2,
list: []
}
}
const numToCoupon = {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
}
const numToGoods = {
1: 'card',
2: 'recharge'
}
const orderShow = ['service', 'cash', 'discount', 'exchange']
export default {
name: 'editActivity',
components: {
crowdEditWechat,
selectStore,
selectGiftDialog
selectGiftDialog,
selectGoodsDialog
},
data() {
var validatorPhone = function(rule, value, callback) {
......@@ -402,6 +447,10 @@ export default {
size: 'small',
editChildRef: 'editChildRef',
loading: false,
rulesOptions: [
{ label: '用一发一', value: 1 },
{ label: '一次性发放', value: 2 }
],
userInfo: {},
// pickerOptions: {
// disabledDate(v) {
......@@ -415,9 +464,13 @@ export default {
orderShow,
choseItemList: [],
selectedMealList: [],
selectedGoodsList: [],
couponObj: JSON.parse(JSON.stringify(couponObj)),
goodsObj: JSON.parse(JSON.stringify(goodsObj)),
numToCoupon,
numToGoods,
isSelectGiftVisible: false,
isSelectGoodsVisible: false,
routeInfo: {
// 1-新增;2-编辑;3-查看
// add-新增;edit-编辑;detail-详情;copy-复制
......@@ -729,7 +782,7 @@ export default {
isHide: false
},
{
label: '门店优惠券',
label: '门店服务',
name: 'couponList',
addHtml: 'selectGiftBtn'
},
......@@ -740,6 +793,17 @@ export default {
addHtml: 'couponListBlock'
},
{
label: '平台福利',
name: 'goodsList',
addHtml: 'selectGoodsBtn'
},
{
label: '',
name: 'goodsListBlock',
addHtml: 'goodsListBlock',
isHide: true
},
{
label: '销售价格',
name: 'activityPrice',
type: 'input'
......@@ -1298,21 +1362,42 @@ export default {
// }
},
methods: {
//选择优惠券
//选择门店优惠券
handleGiftAdd() {
if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
this.selectedMealList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose()
},
//选择商品优惠券
handleGoodsAdd() {
this.handleGoodsClose()
},
handleGiftClose() {
this.isSelectGiftVisible = !this.isSelectGiftVisible
},
handleGoodsClose() {
this.isSelectGoodsVisible = !this.isSelectGoodsVisible
},
handleGiftConfirm(selectedData) {
this.handleGiftClose()
this.couponObj = selectedData
this.recoveryTotalPrice()
this.recoveryGiftList()
},
setNameHide(name) {
var idx = this.editFormData.findIndex(item => item.name == name)
this.editFormData[idx].isHide = !this.selectedGoodsList.length
},
handleGoodsConfirm(selectedData) {
this.selectedGoodsList = selectedData || []
this.setNameHide('goodsListBlock')
this.handleGoodsClose()
},
handleDeleteGoods(row) {
const index = this.selectedGoodsList.findIndex(k => k.id == row.id)
this.selectedGoodsList.splice(index, 1)
this.setNameHide('goodsListBlock')
},
hasCouponBlock(isValidate = true) {
var idx = this.editFormData.findIndex(item => item.name == 'couponListBlock')
this.editFormData[idx].isHide = !this.editForm.couponList.length
......@@ -1338,7 +1423,10 @@ export default {
this.couponObj[item].list = []
})
this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
console.log(this.numToCoupon[item.discountType])
if (this.numToCoupon[item.discountType]) {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
}
})
// console.log(this.couponObj, 'this.couponObj')
// this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
......@@ -1775,9 +1863,13 @@ export default {
this.editForm.couponList.forEach(item => {
item.id = item.couponId
item.anticipatedCost = item.couponAnticipatedCost
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = this.editForm.couponList.filter(i => i.discountType == 8)
this.editForm.couponList = this.editForm.couponList.filter(i => i.discountType != 8)
this.recoveryCoupon()
this.recoveryTotalPrice()
this.selectedGoodsList.length && this.setNameHide('goodsListBlock')
// 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
......@@ -1920,15 +2012,22 @@ export default {
})
const couponList = this.$common.utils.deepClone(param.couponList) || []
param.couponCreateRequests = couponList.map(item => {
const couponLists = couponList.map(item => {
return {
couponId: item.couponId ? item.couponId : item.id,
couponAmount: item.couponAmount,
couponAnticipatedCost: item.couponAnticipatedCost
}
})
const selectedGoodsList = this.selectedGoodsList.map(item => {
return {
couponId: item.id,
couponAmount: item.couponAmount,
couponAnticipatedCost: item.denomination
}
})
param.couponCreateRequests = couponLists.concat(selectedGoodsList)
delete param.couponList
// 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) {
param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0)
......@@ -2602,4 +2701,10 @@ export default {
margin-left: 312px;
}
}
.provideWay-box {
width: 160px !important;
.el-input {
width: 100% !important;
}
}
</style>
......@@ -12,7 +12,7 @@
<GLTable ref="classifyRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="sub-tabel" slot="giftInfo" slot-scope="scope">
<div class="gift-detail flex-wrap">
<div class="gift-item" v-for="(item, index) in scope.scope.couponList" :key="index">
<div class="gift-item" v-for="(item, index) in filterCouponList(scope.scope.couponList)" :key="index">
<img :src="require(`@/assets/coupon/icon-${attrToIcon[item.discountType]}.png`)" />
<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>
......@@ -23,11 +23,12 @@
<span :class="['table-circle', scope.scope.activityStatus == 2 ? 'back-green' : 'back-grey']"></span>
<span>{{ orderStatus.find(item => item.confId == scope.scope.activityStatus)?.confName }}</span>
</div>
<!-- <div slot="coverUrl" slot-scope="scope">
<div class="image-popover" @click="handleLook(scope.scope)">
<img :src="scope.scope.coverUrl" />
<div slot="activityName" slot-scope="scope">
<div class="equity-ed">
<img src="@/assets/equity.png" v-if="filterCouponList(scope.scope.couponList, true).length" />
{{ scope.scope.activityName }}
</div>
</div> -->
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -134,7 +135,9 @@ export default {
},
{
label: '活动名称',
prop: 'activityName'
prop: 'activityName',
addHtml: 'activityName',
width: 250
},
{
label: '商户名称',
......@@ -372,6 +375,9 @@ export default {
}
})
},
filterCouponList(list, isEquity = false) {
return list.filter(item => (isEquity ? item.discountType == 8 : item.discountType != 8))
},
handleBoard(row) {
this.$router.push({
path: '/activityLink/dataBoard',
......@@ -611,4 +617,13 @@ export default {
.gift-detail .gift-item:last-child {
margin-right: 0;
}
.equity-ed {
display: flex;
align-items: center;
img {
width: 44px;
height: 22px;
margin-right: 6px;
}
}
</style>
......@@ -198,11 +198,16 @@ export default {
}
}
},
//过滤优惠券列表
VerficationDTOList(row) {
return row.filter(i => i.discountType != 8)
},
getInfo() {
this.$apis.orderManage.orderDetail({ orderCode: this.routeInfo.orderCode }).then(res => {
if (!res) return
this.detailForm = res
this.tableData = res.expandedGoldUserCouponDTOS || []
const tableData = res.expandedGoldUserCouponDTOS || []
this.tableData = tableData.filter(i => i.discountType != 8)
this.orderRefund = res.orderRefund || null
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
if (this.orderRefund) {
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-18 12:37:45
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-01 18:10:25
* @FilePath: \scrm-micro-link\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!