Commit 23a396f5 by 前端

更新3.3.0代码

1 parent 5d17b1b6
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
jumpEvent(obj) { jumpEvent(obj) {
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit) this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
delete obj.info.eventStartDate
this.$set(this.eventObj, 'info', obj.info) this.$set(this.eventObj, 'info', obj.info)
this.parentCustomerObj = obj.parentCustomerObj this.parentCustomerObj = obj.parentCustomerObj
this.eventIndex = obj.eventIndex this.eventIndex = obj.eventIndex
......
...@@ -57,13 +57,6 @@ export default { ...@@ -57,13 +57,6 @@ export default {
type: 'input', type: 'input',
isClear: true, isClear: true,
maxlength: 11 maxlength: 11
},
{
label: '企微名称',
name: 'customerPhone',
type: 'input',
isClear: true,
maxlength: 50
} }
], ],
// 表格 // 表格
......
...@@ -3,16 +3,11 @@ ...@@ -3,16 +3,11 @@
<div class="edit-event marketing edit-box"> <div class="edit-event marketing edit-box">
<!-- 营销时间 --> <!-- 营销时间 -->
<div class="container m-b-20"> <div class="container m-b-20">
<p class="edit-title">营销时间</p> <glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData" :formRules="editRule"></glsx-combi-form> <p class="edit-title">营销时间</p>
<glsx-combi-form class="edit-form-container m-r-20" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="sopNameFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule"> <glsx-combi-form ref="editFormRefDate" :isEdit="isEdit" :labelWidth="labelWidth" defaultWidth="320px" :formRef="editChildRef" :formObj="editForm" :formData="editFormDataDate" :formRules="editRule">
<div slot="eventStartDate" slot-scope="scope"> <div slot="eventStartDate" slot-scope="scope">
<el-date-picker class="m-r-20" <el-date-picker class="m-r-20" v-model="editForm[scope.scope.name]" :placeholder="scope.scope.placeholder" :value-format="scope.scope.valueFormat" :clearable="scope.scope.isClear" :picker-options="scope.scope.customPickerOptions" @change="scope.scope.change"></el-date-picker>
v-model="editForm[scope.scope.name]"
:placeholder="scope.scope.placeholder"
:value-format="scope.scope.valueFormat"
:clearable="scope.scope.isClear"
:picker-options="scope.scope.customPickerOptions"
@change="scope.scope.change"></el-date-picker>
</div> </div>
<div slot="eventTime" slot-scope="scope"> <div slot="eventTime" slot-scope="scope">
<el-time-picker v-model="editForm[scope.scope.name]" value-format="HH:mm" format="HH:mm" :placeholder="scope.scope.placeholder"></el-time-picker> <el-time-picker v-model="editForm[scope.scope.name]" value-format="HH:mm" format="HH:mm" :placeholder="scope.scope.placeholder"></el-time-picker>
...@@ -110,7 +105,6 @@ ...@@ -110,7 +105,6 @@
<nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model> <nickname-model v-if="isNicknameVisible" :isNicknameVisible.sync="isNicknameVisible" @handleNicknameConfirm="handleNicknameConfirm" @handleNicknameClose="handleNicknameClose"></nickname-model>
</div> </div>
</template> </template>
<script> <script>
import { limitPrice } from '@/common/constant' import { limitPrice } from '@/common/constant'
import ActivityModel from './components/activityModel' import ActivityModel from './components/activityModel'
...@@ -396,7 +390,6 @@ export default { ...@@ -396,7 +390,6 @@ export default {
} }
} }
}, },
props: { props: {
eventObj: { eventObj: {
type: Object, type: Object,
...@@ -424,13 +417,11 @@ export default { ...@@ -424,13 +417,11 @@ export default {
} }
} }
}, },
components: { components: {
ActivityModel, ActivityModel,
materialModel, materialModel,
nicknameModel nicknameModel
}, },
watch: { watch: {
editForm: { editForm: {
handler(val) { handler(val) {
...@@ -448,14 +439,12 @@ export default { ...@@ -448,14 +439,12 @@ export default {
this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val) this.editFormDataChannel[idx].optionList[2].isDisabled = [1, 2, 3].includes(val)
} }
}, },
created() { created() {
this.getDay('weekList', 7) this.getDay('weekList', 7)
this.getDay('monthList', 31) this.getDay('monthList', 31)
this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj)) this.predictCountObj = JSON.parse(JSON.stringify(this.parentCustomerObj.parentPredictObj))
// this.limitQwPhone() // this.limitQwPhone()
}, },
mounted() { mounted() {
Object.assign(this.editForm, this.eventObj.info) Object.assign(this.editForm, this.eventObj.info)
this.getStaffTypeList() this.getStaffTypeList()
...@@ -464,7 +453,6 @@ export default { ...@@ -464,7 +453,6 @@ export default {
}) })
this.eventObj.addOrEdit != 'add' ? this.getInfo() : '' this.eventObj.addOrEdit != 'add' ? this.getInfo() : ''
}, },
methods: { methods: {
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
...@@ -491,18 +479,15 @@ export default { ...@@ -491,18 +479,15 @@ export default {
}) })
} }
}, },
handleResetMaxSet() { handleResetMaxSet() {
this.maxReachesTypeSet = '' this.maxReachesTypeSet = ''
}, },
getStaffTypeList() { getStaffTypeList() {
this.$apis.common.getStaffFollowerListApi({}).then(res => { this.$apis.common.getStaffFollowerListApi({}).then(res => {
this.baseData.staffTypeList = res this.baseData.staffTypeList = res
this.getOptionsList('editFormDataChannel', false, 'followerTypeId') this.getOptionsList('editFormDataChannel', false, 'followerTypeId')
}) })
}, },
getDay(attrName, day) { getDay(attrName, day) {
let weekNameList = ['一', '二', '三', '四', '五', '六', '日'] let weekNameList = ['一', '二', '三', '四', '五', '六', '日']
for (var i = 0; i < day; i++) { for (var i = 0; i < day; i++) {
...@@ -512,7 +497,6 @@ export default { ...@@ -512,7 +497,6 @@ export default {
}) })
} }
}, },
recoveryRepeat() { recoveryRepeat() {
var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode') var idx = this.editFormDataRepeat.findIndex(item => item.name == 'repeatMode')
this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N' this.editFormDataRepeat[idx].isHide = this.editForm.repeatFlag == 'N'
...@@ -527,7 +511,6 @@ export default { ...@@ -527,7 +511,6 @@ export default {
this.editForm.reachesTypeSet = 1 this.editForm.reachesTypeSet = 1
} }
}, },
recoveryEndTime() { recoveryEndTime() {
var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate') var idx = this.editFormDataTime.findIndex(item => item.name == 'eventEndDate')
var startTime = new Date(this.editForm.eventStartDate) var startTime = new Date(this.editForm.eventStartDate)
...@@ -541,20 +524,17 @@ export default { ...@@ -541,20 +524,17 @@ export default {
} }
} }
}, },
getInfo() { getInfo() {
this.editForm.eventStartDate = this.editForm.eventStartDate ? moment(this.editForm.eventStartDate).format('YYYY-MM-DD') : '' this.editForm.eventStartDate = moment(this.editForm.eventStartDate).format('YYYY-MM-DD')
this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : '' this.editForm.eventEndDate = this.editForm.eventEndDate ? moment(this.editForm.eventEndDate).format('YYYY-MM-DD') : ''
this.previewList = this.editForm.object ? [{ attContent: JSON.parse(JSON.stringify(this.editForm.object)), additionalType: this.editForm.object.additionalType }] : [] this.previewList = this.editForm.object ? [{ attContent: JSON.parse(JSON.stringify(this.editForm.object)), additionalType: this.editForm.object.additionalType }] : []
this.recoveryRepeat() this.recoveryRepeat()
this.recoveryEndTime() this.recoveryEndTime()
this.getCustomerNum() this.getCustomerNum()
}, },
handleReachesType(val) { handleReachesType(val) {
this.editForm.reachesTypeSet = val == 1 ? 1 : '' this.editForm.reachesTypeSet = val == 1 ? 1 : ''
}, },
// 素材 // 素材
handleMaterialConfirm(val) { handleMaterialConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...@@ -570,11 +550,9 @@ export default { ...@@ -570,11 +550,9 @@ export default {
] ]
this.handleMaterialClose() this.handleMaterialClose()
}, },
handleMaterialClose() { handleMaterialClose() {
this.isMaterialVisible = !this.isMaterialVisible this.isMaterialVisible = !this.isMaterialVisible
}, },
// 朋友圈模板 // 朋友圈模板
handleNicknameConfirm(val) { handleNicknameConfirm(val) {
// additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板) // additionalType 附加对象类型(1素材,2活动,3优惠券,4朋友券模板)
...@@ -593,11 +571,9 @@ export default { ...@@ -593,11 +571,9 @@ export default {
] ]
this.handleNicknameClose() this.handleNicknameClose()
}, },
handleNicknameClose() { handleNicknameClose() {
this.isNicknameVisible = !this.isNicknameVisible this.isNicknameVisible = !this.isNicknameVisible
}, },
// 营销内容 // 营销内容
handleFun(name) { handleFun(name) {
if (name == 'material') { if (name == 'material') {
...@@ -610,7 +586,6 @@ export default { ...@@ -610,7 +586,6 @@ export default {
this.handleNicknameClose() this.handleNicknameClose()
} }
}, },
close(index) { close(index) {
this.previewList.splice(index, 1) this.previewList.splice(index, 1)
if (this.editForm.object.additionalType == 4) { if (this.editForm.object.additionalType == 4) {
...@@ -619,7 +594,6 @@ export default { ...@@ -619,7 +594,6 @@ export default {
} }
this.editForm.object = {} this.editForm.object = {}
}, },
selectActivity(val) { selectActivity(val) {
this.editForm.object = JSON.parse(JSON.stringify(val)) this.editForm.object = JSON.parse(JSON.stringify(val))
this.editRule.eventContent[0].required = true this.editRule.eventContent[0].required = true
...@@ -632,7 +606,6 @@ export default { ...@@ -632,7 +606,6 @@ export default {
] ]
}, },
// 营销内容 // 营销内容
getCustomerNum() { getCustomerNum() {
switch (this.parentCustomerObj.currentCustomerTypeName) { switch (this.parentCustomerObj.currentCustomerTypeName) {
case '人群': case '人群':
...@@ -645,7 +618,6 @@ export default { ...@@ -645,7 +618,6 @@ export default {
break break
} }
}, },
getCustomerByCrowdList() { getCustomerByCrowdList() {
var params = { var params = {
pageSize: 1, pageSize: 1,
...@@ -658,7 +630,6 @@ export default { ...@@ -658,7 +630,6 @@ export default {
this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count this.predictCountObj[this.editForm.pushChannelType == 2 ? 'phone' : 'qiwei'] = res.count
}) })
}, },
getCustomerByTagList() { getCustomerByTagList() {
var params = { var params = {
combineType: 2, combineType: 2,
...@@ -689,10 +660,8 @@ export default { ...@@ -689,10 +660,8 @@ export default {
whereToGo(id) { whereToGo(id) {
document.getElementById(id).scrollIntoView() document.getElementById(id).scrollIntoView()
}, },
handleConfirm() { handleConfirm() {
console.log(this.editForm.eventStartDate) var countParams = {
let countParams = {
eventStartDate: this.editForm.eventStartDate, eventStartDate: this.editForm.eventStartDate,
eventEndDate: this.editForm.eventEndDate, eventEndDate: this.editForm.eventEndDate,
eventTime: this.editForm.eventTime, eventTime: this.editForm.eventTime,
...@@ -700,7 +669,6 @@ export default { ...@@ -700,7 +669,6 @@ export default {
repeatMode: this.editForm.repeatMode, repeatMode: this.editForm.repeatMode,
repeatTime: this.editForm.repeatTime repeatTime: this.editForm.repeatTime
} }
console.log(countParams)
if (this.submit) { if (this.submit) {
return true return true
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
...@@ -18,7 +17,6 @@ ...@@ -18,7 +17,6 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
...@@ -81,29 +79,6 @@ export default { ...@@ -81,29 +79,6 @@ export default {
}, },
{ {
type: 'el-button', type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 3
},
listeners: {
click: this.handleEnd
}
},
{
type: 'el-button',
name: '复制',
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleEdit('copy', row)
}
},
{
type: 'el-button',
name: '编辑', name: '编辑',
attrs: { attrs: {
type: 'text' type: 'text'
...@@ -138,7 +113,7 @@ export default { ...@@ -138,7 +113,7 @@ export default {
{ {
label: 'SOP名称', label: 'SOP名称',
prop: 'sopName', prop: 'sopName',
width: 240, width: 260,
line: 1 line: 1
}, },
{ {
...@@ -196,11 +171,9 @@ export default { ...@@ -196,11 +171,9 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
methods: { methods: {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
...@@ -208,7 +181,6 @@ export default { ...@@ -208,7 +181,6 @@ export default {
query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : '' query: row ? { id: row.id, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -243,16 +215,13 @@ export default { ...@@ -243,16 +215,13 @@ export default {
query: params query: params
}) })
}, },
// 结束 // 结束
handleEnd(row) { handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id }) this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
}, },
handleDelete(row) { handleDelete(row) {
this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id }) this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -278,22 +247,18 @@ export default { ...@@ -278,22 +247,18 @@ export default {
}) })
} }
}, },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun() this.$refs.sopListRef.data.length ? (this.$refs.sopListRef.tableHeightValues = '') : this.$refs.sopListRef.setTableHeightFun()
}, },
handleBack() { handleBack() {
this.$router.push({ this.$router.push({
path: '/sop/index' path: '/sop/index'
}) })
}, },
handleSearch() { handleSearch() {
this.$refs.sopListRef.refreshTable() this.$refs.sopListRef.refreshTable()
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
sopName: '', sopName: '',
...@@ -304,7 +269,6 @@ export default { ...@@ -304,7 +269,6 @@ export default {
} }
} }
</script> </script>
<style scoped> <style scoped>
.sop-list .sop-back-btn { .sop-list .sop-back-btn {
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!