Commit a008a5fe by 前端

Merge branch 'chenwq_dev_v2.3.0' into 'v2.3.0'

Chenwq dev v2.3.0

See merge request !163
2 parents 840d9ccf 3c4bb648
......@@ -100,7 +100,7 @@ export default {
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签',
labelTypesStr: '自店标签,企业标签,系统标签',
edition: this.$globalState.session.merchantModel
}
})
......
......@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent">
<el-radio :label="3" class="itemBlock">无有效期</el-radio>
<el-radio :label="3" class="itemBlock">永久有效</el-radio>
<!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1">
领取后
......@@ -233,7 +233,7 @@ export default {
// delivery: false,
// type: [],
// resource: '',
effectiveType: 3, //有效期(默认无有效期)
effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1,
......
......@@ -329,7 +329,7 @@ export default {
this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(item)
})
console.log(this.couponObj,'this.couponObj')
// console.log(this.couponObj, 'this.couponObj')
this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false)
......@@ -362,7 +362,7 @@ export default {
this.couponObj[item].list.forEach(subItem => {
// 失效券不加入预估成本
if (subItem.status != '3') {
this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost) * parseInt(subItem.couponAmount)
this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost || 0) * parseInt(subItem.couponAmount)
}
})
})
......@@ -387,7 +387,7 @@ export default {
},
handleGiftAdd() {
console.log(this.couponObj,'')
// console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose()
},
......@@ -471,7 +471,7 @@ export default {
.then(() => {
this.insertHttp(params)
})
.catch(() => {})
.catch(() => { })
} else {
this.insertHttp(params)
}
......@@ -512,7 +512,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......
......@@ -250,7 +250,7 @@ export default {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
......
......@@ -277,7 +277,7 @@ export default {
toLabelText(row) {
switch (row.effectiveType) {
case 3:
return '无有效期'
return '永久有效'
case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1:
......
......@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent">
<el-radio :label="3" class="itemBlock">无有效期</el-radio>
<el-radio :label="3" class="itemBlock">永久有效</el-radio>
<!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1">
领取后
......@@ -239,7 +239,7 @@ export default {
// delivery: false,
// type: [],
// resource: '',
effectiveType: 3, //有效期(默认无有效期)
effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1,
......
......@@ -97,9 +97,9 @@
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="customerDataList[0].list" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-Crowd v-if="isCrowdCustVisible" :dialogVisible="isCrowdCustVisible" :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" @handleCrowdCustClose="handleCrowdCustClose" @handleCrowdCustConfirm="handleDialogConfirm"></select-Crowd>
<select-tag ref="selectTagForm" @tagSelected="handleDialogConfirm" :dialogVisible="isTagVisible"></select-tag>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :selectedCustomerList="customerDataList[2].list" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer>
<select-customer v-if="isAppointCustVisible" :dialogVisible="isAppointCustVisible" :selectedCustomerList="JSON.parse(JSON.stringify(customerDataList[2].list))" @handleAppointCustClose="handleAppointCustClose" @handleAppointCustConfirm="handleDialogConfirm"></select-customer>
</div>
</template>
......
......@@ -27,9 +27,7 @@ export default {
return {
url: url,
searchForm: {
req: {
crowdType: 2
}
keyword: ''
},
total: 0,
crowdList: [],
......@@ -104,6 +102,7 @@ export default {
},
mounted() {
this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList()
......@@ -114,6 +113,8 @@ export default {
var params = {
req: {
...this.searchForm,
crowdType: 3,
merchantId: this.userInfo.merchantId,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
}
......
<template>
<div class="select-cutomer">
<el-dialog title="选择客户" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false">
<!-- <div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div> -->
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
......@@ -9,15 +8,6 @@
</glsx-combi-form>
<div class="flex-default">
<div class="customer-list">
<!-- <div class="customer-tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper" @click="handleClickTag">
<span v-if="!selectedLabelList.length" style="color: #BFBFBF;">请选择标签筛选客户</span>
<span v-for="(tag, idx) in selectedLabelList" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" :disable-transitions="false">{{ tagItem.name }}</el-tag>
</span>
</div>
</div> -->
<p class="list-title p-16">客户列表(最多仅可选200个客户)</p>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
......@@ -32,7 +22,6 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<!-- <a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a> -->
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span>
......@@ -51,6 +40,7 @@ export default {
searchForm: {},
customerList: [],
heightBox: 200,
maxCustNum: 200,
// 搜索
searchFormData: [
{
......@@ -169,30 +159,6 @@ export default {
},
methods: {
// beforeSearchFn() {
// return new Promise(resolve => {
// this.searchForm = {
// combineType: 2,
// tagLists: []
// }
// this.selectedLabelList.length &&
// this.selectedLabelList.forEach(item => {
// item.labelList.length &&
// item.labelList.forEach(subItem => {
// this.searchForm.tagLists.push({
// groupId: item.labelGroup.id,
// groupName: item.labelGroup.name,
// groupType: item.labelType,
// labelId: subItem.id,
// labelName: subItem.name
// })
// })
// })
// this.getListApi = this.selectedLabelList.length ? this.$apis.sop.getCustomerByTagListApi : this.$apis.sop.getCustomerListApi
// resolve()
// })
// },
handleSearch() {
this.$refs.customerRef.refreshTable()
},
......@@ -206,17 +172,10 @@ export default {
recoverySelected() {
this.$nextTick(() => {
this.selectedCustomerList.forEach(row => {
var idx = this.tableList.findIndex(k => k.id == row.id)
if (idx != -1) {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
}
})
if (this.selectedCustomerList.length >= 5) {
let tableIds = this.selectedCustomerList.map(item => item.id)
console.log(tableIds)
if (this.selectedCustomerList.length >= this.maxCustNum) {
let selectIds = this.selectedCustomerList.map(item => item.id)
this.tableList.forEach((row, idx) => {
if (!tableIds.includes(row.id)) {
if (!selectIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
}
......@@ -228,19 +187,20 @@ export default {
},
handleSelectionTable(val) {
// 未选客户时,筛选客户条件
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val))
var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
var selectIds = currentList.map(item => item.id)
var selectedIds = val.map(item => item.id)
val.forEach(item => {
if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
this.selectedCustomerList.push(item)
}
})
currentList.forEach((item, idx) => {
if (!selectedIds.includes(item.id)) {
this.selectedCustomerList.splice(idx, 1)
}
})
this.recoverySelected()
},
......
......@@ -434,6 +434,12 @@ export default {
},
'editForm.reachesTypeSet'(newValue, oldValue) {
this.editForm.reachesTypeSet = limitPrice(newValue, oldValue, 5, 0, 1, 9999, 'zNumReg')
},
'editForm.object.additionalType'(val) {
var idx = this.editFormDataChannel.findIndex(item => item.name == 'pushChannelType')
this.editFormDataChannel[idx].optionList[0].isDisabled = val == '4'
this.editFormDataChannel[idx].optionList[1].isDisabled = val == '4'
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
}
},
......@@ -566,6 +572,7 @@ export default {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val))
this.editForm.pushChannelType = ''
if (val.showTxtContent) {
this.editForm.eventContent = val.showTxtContent
}
......@@ -651,8 +658,8 @@ export default {
pageNum: 1,
tagLists: []
}
this.parentCustomerObj.list.list &&
this.parentCustomerObj.list.list.forEach(item => {
this.parentCustomerObj.list &&
this.parentCustomerObj.list.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => {
params.tagLists.push({
......
......@@ -30,7 +30,7 @@
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover>
</div>
<img src="@/assets/sop/completed-event.png" />
<img src="@/assets/sop/completed-fail.png" />
</div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div>
......
......@@ -96,7 +96,10 @@ export default {
tableColumns: [
{
label: '客户名称',
prop: 'customerName'
prop: 'customerName',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '客户手机号',
......@@ -118,7 +121,7 @@ export default {
}
},
{
label: '初次查看事件',
label: '初次查看时间',
prop: 'firstViewDate',
formatter: cellValue => {
return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
......@@ -128,7 +131,7 @@ export default {
label: '查看次数',
prop: 'viewCount',
formatter: cellValue => {
return cellValue.viewCount || '-'
return cellValue.viewCount || '0'
}
}
// {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!