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 { ...@@ -100,7 +100,7 @@ export default {
pageSize: 1000, pageSize: 1000,
shopId: this.$globalState.session.merchantId, shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
labelTypesStr: '自店标签,企业标签', labelTypesStr: '自店标签,企业标签,系统标签',
edition: this.$globalState.session.merchantModel edition: this.$globalState.session.merchantModel
} }
}) })
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap"> <div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent"> <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 --> <!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1"> <el-radio :label="1">
领取后 领取后
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
// delivery: false, // delivery: false,
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '', effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1, limitTime1: 1,
......
...@@ -329,7 +329,7 @@ export default { ...@@ -329,7 +329,7 @@ export default {
this.editForm.couponList.forEach(item => { this.editForm.couponList.forEach(item => {
this.couponObj[this.numToCoupon[item.discountType]].list.push(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.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList) this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
this.hasCouponBlock(false) this.hasCouponBlock(false)
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
this.couponObj[item].list.forEach(subItem => { this.couponObj[item].list.forEach(subItem => {
// 失效券不加入预估成本 // 失效券不加入预估成本
if (subItem.status != '3') { 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 { ...@@ -387,7 +387,7 @@ export default {
}, },
handleGiftAdd() { handleGiftAdd() {
console.log(this.couponObj,'') // console.log(this.couponObj, '')
this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj)) this.selectedGiftList = JSON.parse(JSON.stringify(this.couponObj))
this.handleGiftClose() this.handleGiftClose()
}, },
...@@ -471,7 +471,7 @@ export default { ...@@ -471,7 +471,7 @@ export default {
.then(() => { .then(() => {
this.insertHttp(params) this.insertHttp(params)
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.insertHttp(params) this.insertHttp(params)
} }
...@@ -512,7 +512,7 @@ export default { ...@@ -512,7 +512,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
toLabelText(row) { toLabelText(row) {
switch (row.effectiveType) { switch (row.effectiveType) {
case 3: case 3:
return '无有效期' return '永久有效'
case 2: case 2:
return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : '' return row.effectiveStartTime ? row.effectiveStartTime.split(' ')[0] + '-' + row.effectiveEndTime.split(' ')[0] : ''
case 1: case 1:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item size="small" label="有效期" prop="effectiveType"> <el-form-item size="small" label="有效期" prop="effectiveType">
<div class="radioGroupWrap"> <div class="radioGroupWrap">
<el-radio-group v-model="ruleForm.effectiveType" :disabled="disabledContent"> <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 --> <!-- effectiveType:1, effectiveDays:5 -->
<el-radio :label="1"> <el-radio :label="1">
领取后 领取后
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
// delivery: false, // delivery: false,
// type: [], // type: [],
// resource: '', // resource: '',
effectiveType: 3, //有效期(默认无有效期) effectiveType: 3, //有效期(默认永久有效)
effectiveDays: '', effectiveDays: '',
customUseLimit: 0, //使用限制(默认不限制使用次数) customUseLimit: 0, //使用限制(默认不限制使用次数)
limitTime1: 1, limitTime1: 1,
......
...@@ -97,9 +97,9 @@ ...@@ -97,9 +97,9 @@
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button> <el-button type="default" @click="handleCancel">取消</el-button>
</div> </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-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> </div>
</template> </template>
......
...@@ -27,9 +27,7 @@ export default { ...@@ -27,9 +27,7 @@ export default {
return { return {
url: url, url: url,
searchForm: { searchForm: {
req: { keyword: ''
crowdType: 2
}
}, },
total: 0, total: 0,
crowdList: [], crowdList: [],
...@@ -104,6 +102,7 @@ export default { ...@@ -104,6 +102,7 @@ export default {
}, },
mounted() { mounted() {
this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425 this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.getList() this.getList()
...@@ -114,6 +113,8 @@ export default { ...@@ -114,6 +113,8 @@ export default {
var params = { var params = {
req: { req: {
...this.searchForm, ...this.searchForm,
crowdType: 3,
merchantId: this.userInfo.merchantId,
pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1, pageNum: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageNum : 1,
pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10 pageSize: this.$refs.crowdRef ? this.$refs.crowdRef.page.pageSize : 10
} }
......
<template> <template>
<div class="select-cutomer"> <div class="select-cutomer">
<el-dialog title="选择客户" :visible="dialogVisible" width="1080px" :before-close="handleClose" :close-on-click-modal="false"> <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"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer"> <span slot="footer">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
...@@ -9,15 +8,6 @@ ...@@ -9,15 +8,6 @@
</glsx-combi-form> </glsx-combi-form>
<div class="flex-default"> <div class="flex-default">
<div class="customer-list"> <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> <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> <GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div> </div>
...@@ -32,7 +22,6 @@ ...@@ -32,7 +22,6 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <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" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button> <el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span> </span>
...@@ -51,6 +40,7 @@ export default { ...@@ -51,6 +40,7 @@ export default {
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
heightBox: 200, heightBox: 200,
maxCustNum: 200,
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
...@@ -169,30 +159,6 @@ export default { ...@@ -169,30 +159,6 @@ export default {
}, },
methods: { 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() { handleSearch() {
this.$refs.customerRef.refreshTable() this.$refs.customerRef.refreshTable()
}, },
...@@ -206,17 +172,10 @@ export default { ...@@ -206,17 +172,10 @@ export default {
recoverySelected() { recoverySelected() {
this.$nextTick(() => { this.$nextTick(() => {
this.selectedCustomerList.forEach(row => { if (this.selectedCustomerList.length >= this.maxCustNum) {
var idx = this.tableList.findIndex(k => k.id == row.id) let selectIds = this.selectedCustomerList.map(item => item.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)
this.tableList.forEach((row, idx) => { this.tableList.forEach((row, idx) => {
if (!tableIds.includes(row.id)) { if (!selectIds.includes(row.id)) {
this.tableParams.checkSelectVal.push(row.id) this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false) this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
} }
...@@ -228,19 +187,20 @@ export default { ...@@ -228,19 +187,20 @@ export default {
}, },
handleSelectionTable(val) { handleSelectionTable(val) {
// 未选客户时,筛选客户条件
// if (!this.selectedCustomerList.length) {
// this.dealCondLimit(val[0])
// }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList)) let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id) let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val)) var selectIds = currentList.map(item => item.id)
var selectIds = this.selectedCustomerList.map(item => item.id) var selectedIds = val.map(item => item.id)
currentList.forEach(item => { val.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) { if (!selectIds.includes(item.id) && tableIds.includes(item.id) && this.selectedCustomerList.length < this.maxCustNum) {
this.selectedCustomerList.push(item) this.selectedCustomerList.push(item)
} }
}) })
currentList.forEach((item, idx) => {
if (!selectedIds.includes(item.id)) {
this.selectedCustomerList.splice(idx, 1)
}
})
this.recoverySelected() this.recoverySelected()
}, },
......
...@@ -434,6 +434,12 @@ export default { ...@@ -434,6 +434,12 @@ export default {
}, },
'editForm.reachesTypeSet'(newValue, oldValue) { 'editForm.reachesTypeSet'(newValue, oldValue) {
this.editForm.reachesTypeSet = limitPrice(newValue, oldValue, 5, 0, 1, 9999, 'zNumReg') 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 { ...@@ -566,6 +572,7 @@ export default {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材) // objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动,10-素材)
this.editForm.object = JSON.parse(JSON.stringify(val)) this.editForm.object = JSON.parse(JSON.stringify(val))
this.editForm.pushChannelType = ''
if (val.showTxtContent) { if (val.showTxtContent) {
this.editForm.eventContent = val.showTxtContent this.editForm.eventContent = val.showTxtContent
} }
...@@ -651,8 +658,8 @@ export default { ...@@ -651,8 +658,8 @@ export default {
pageNum: 1, pageNum: 1,
tagLists: [] tagLists: []
} }
this.parentCustomerObj.list.list && this.parentCustomerObj.list &&
this.parentCustomerObj.list.list.forEach(item => { this.parentCustomerObj.list.forEach(item => {
item.labelList.length && item.labelList.length &&
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
params.tagLists.push({ params.tagLists.push({
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" /> <img slot="reference" class="tips-icon" src="@/assets/icon-tip.png" />
</el-popover> </el-popover>
</div> </div>
<img src="@/assets/sop/completed-event.png" /> <img src="@/assets/sop/completed-fail.png" />
</div> </div>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p> <p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.failEventCount || '-' : '-' }}</p>
</div> </div>
......
...@@ -96,7 +96,10 @@ export default { ...@@ -96,7 +96,10 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName' prop: 'customerName',
formatter: cellValue => {
return cellValue.customerName || '-'
}
}, },
{ {
label: '客户手机号', label: '客户手机号',
...@@ -118,7 +121,7 @@ export default { ...@@ -118,7 +121,7 @@ export default {
} }
}, },
{ {
label: '初次查看事件', label: '初次查看时间',
prop: 'firstViewDate', prop: 'firstViewDate',
formatter: cellValue => { formatter: cellValue => {
return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看' return cellValue.firstViewDate ? dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') : '未查看'
...@@ -128,7 +131,7 @@ export default { ...@@ -128,7 +131,7 @@ export default {
label: '查看次数', label: '查看次数',
prop: 'viewCount', prop: 'viewCount',
formatter: cellValue => { 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!