Commit 16c250e0 by 前端

Merge branch 'xuyl_dev_v3.4.0' into 'v3.4.0'

更新v3.4.0代码

See merge request !49
2 parents 6c333a83 79a7020b
......@@ -56,10 +56,21 @@ const compressionUpload = params => {
sign: false
})
}
const sendStop = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmoment.send.stop'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
export default {
merchantList,
conditionPage,
batchmomentRecord,
batchmomentSave,
compressionUpload
compressionUpload,
sendStop
}
......@@ -71,7 +71,16 @@ const recordSend = params => {
sign: true
})
}
const sendStop = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.send.stop'
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
export default {
......@@ -81,5 +90,6 @@ export default {
batchmessagingCustomercount,
atchmessagingCreate,
getStoreList,
recordSend
recordSend,
sendStop
}
......@@ -229,6 +229,7 @@ export default {
basicRules: {
taskMerchantId: [{required: true, message: '请选择门店', trigger: 'change'}],
taskName: [{required: true, message: '请输入群发名称', trigger: 'blur'}],
selectType: [{required: true, message: '请选择客户类型', trigger: 'change'}],
sendType: [
{required: true, message: '请选择发送时间', trigger: 'change'},
{validator: validatorSendType, trigger: 'change'}
......@@ -346,8 +347,10 @@ export default {
const {taskName, taskMerchantId, sendType} = this.basicForm
const taskMerchantName = this.optionsMe.find(item => item.msgMerchantId == taskMerchantId).msgMerchantName
let peopleParams = this.getBaseInfo()
this.getTheNumberOfPeople(peopleParams)
if (this.groupNumber == 0) {
if (this.basicForm.selectType != 0){
this.getTheNumberOfPeople(peopleParams)
}
if (this.basicForm.selectType != 0 && this.groupNumber == 0) {
this.$message({
type: 'error',
message: '群发人数为0!'
......@@ -366,6 +369,8 @@ export default {
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
console.log(params)
this.addLoading = true
this.$apis.friendGroup.batchmomentSave(params).then(res => {
this.addLoading = false
......
......@@ -3,18 +3,23 @@
<div class="marketing pro-group">
<div class="m-b-20 friend-title">
<div>
<!-- <GLButton :size="size" class="el-icon-plus" type="primary" fn="新建朋友圈群发" @click="handleEdit(1)">新建朋友圈群发</GLButton>-->
<el-button :size="size" type="primary" class="el-icon-plus" fn="新建朋友圈群发" @click="handleEdit(1)">新建朋友圈群发</el-button>
<!-- <GLButton :size="size" class="el-icon-plus" type="primary" fn="新建朋友圈群发" @click="handleEdit(1)">新建朋友圈群发</GLButton>-->
<el-button :size="size" type="primary" class="el-icon-plus" fn="新建朋友圈群发" @click="handleEdit(1)">
新建朋友圈群发
</el-button>
</div>
</div>
<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 v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout"
:tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams"
:pageConf="pageConf">
<div class="loginStatus" slot="sendStatus" slot-scope="scope">
<span class="cycle" :style="{ background: scope.scope.sendState == '1' ? '#2CCA74' : scope.scope.sendState == '2' ? '#EB4E4E' : scope.scope.sendState == '0' ? '#FDB757' : scope.scope.sendState == '3' ? '#E5E5E5':'' }"></span>
{{ scope.scope.sendState == '1' ? '已完成' : scope.scope.sendState == '2' ? '发送失败' : scope.scope.sendState == '0' ? '发送中' : scope.scope.sendState == '3' ? '待发送':'' }}
<span class="cycle" :style="{ background: scope.scope.sendStatus == '2' ? '#2CCA74' : scope.scope.sendStatus == '-1' ? '#EB4E4E' : scope.scope.sendStatus == '1' ? '#FDB757' : scope.scope.sendStatus == '0'? '#E5E5E5' : '' }"></span>
{{ scope.scope.sendStatus == '2' ? '已完成' : scope.scope.sendStatus == '-1' ? '发送失败' : scope.scope.sendStatus == '1' ? '发送中' : scope.scope.sendStatus == '0'? '待发送' : '' }}
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
......@@ -22,15 +27,8 @@
</GLTable>
<!-- 表格区域 end -->
</div>
<GLDialog :title="'终止发送'" mode="small" :visible.sync="popVisible">
<div class="qrIMGbox">
是否确认终止发送
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="popVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="getCode">确定</el-button>
</span>
</GLDialog>
<GLDialog title="提示" @onOk="handleSure" @onCancel="popVisible = false" type="error" content="是否确认终止发送?"
:visible.sync="popVisible" mode="small"></GLDialog>
<draw-record ref="drawForm"></draw-record>
</div>
</template>
......@@ -39,8 +37,9 @@
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import drawRecord from './components/drawRecord'
import { utils } from 'glsx-common'
import {utils} from 'glsx-common'
import department from '@/mixins/department'
export default {
mixins: [department],
name: 'friendGroup',
......@@ -49,7 +48,8 @@ export default {
},
data() {
return {
popVisible:false,
selectItem: {},
popVisible: false,
size: 'small',
loading: false,
url: url,
......@@ -61,7 +61,7 @@ export default {
goodsStatus: 0
},
downRules: {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
offReason: [{required: true, message: '请输入下架备注', trigger: 'change'}]
},
updatedTime: '',
// 分享
......@@ -119,7 +119,7 @@ export default {
type: 'text'
},
condition: row => {
return row.sendStatus == 3
return row.sendStatus == 0
},
listeners: {
click: this.terminatePopup
......@@ -153,6 +153,12 @@ export default {
minwidth: 180
},
{
label: '发送时间',
prop: 'sendTime',
width: 180,
line: 1
},
{
label: '发送状态',
name: 'sendStatus',
addHtml: 'sendStatus',
......@@ -172,7 +178,7 @@ export default {
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'}
}
},
......@@ -181,11 +187,27 @@ export default {
const merchantList = await this.merchantList()
const index = this.searchFormData.findIndex(item => item.name == 'merchantName')
this.searchFormData[index].optionList = merchantList ? merchantList.data : []
this.searchFormData[index].optionList.unshift({ msgMerchantId: null, msgMerchantName: '全部' })
this.searchFormData[index].optionList.unshift({msgMerchantId: null, msgMerchantName: '全部'})
},
methods: {
terminatePopup(){
async handleSure() {
const {id} = this.selectItem
await this.$apis.friendGroup
.sendStop({
id
}).then(res => {
this.$message({
message: res.code == '0' ? '终止成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
this.popVisible = false
this.handleReset()
},
terminatePopup(scope) {
this.selectItem = scope
console.log(scope)
this.popVisible = true
},
handleRecord(row) {
......@@ -210,7 +232,8 @@ export default {
}
})
},
getParams() {},
getParams() {
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
......@@ -278,17 +301,17 @@ export default {
return
}
this.$apis.friendGroup
.momentCancel({
id: row.id
})
.then(res => {
this.getListData()
this.$message({
type: 'success',
message: '取消成功'
.momentCancel({
id: row.id
})
.then(res => {
this.getListData()
this.$message({
type: 'success',
message: '取消成功'
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
// this.$set(this.employeelist[index], 'remindStatus', true)
})
},
dwonVisibleChange() {
this.$refs.downRef && this.$refs.downRef.clearValidate()
......@@ -326,18 +349,22 @@ export default {
.el-table th > .cell {
padding: 0 16px;
}
.el-date-editor {
width: 210px !important;
}
}
.container {
background: #fff;
padding: 20px;
margin-top: 16px;
}
.loginStatus {
display: flex;
align-items: center;
.cycle {
margin-right: 8px;
width: 6px;
......@@ -346,37 +373,44 @@ export default {
border-radius: 50%;
}
}
.friend-title {
display: flex;
justify-content: space-between;
align-items: center;
color: #666666;
.title {
.info-refresh {
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
}
span {
font-size: 14px;
margin-left: 10px;
font-weight: 100;
}
}
.attachmentList-box {
display: flex;
align-items: center;
.attachmentList-image {
width: 36px;
height: 36px;
......@@ -387,21 +421,25 @@ export default {
align-items: center;
color: #fff;
font-size: 24px;
.image-num {
font-size: 14px;
z-index: 10;
}
.image-panel {
position: absolute;
width: 36px;
height: 36px;
top: 0px;
left: 0px;
img {
width: 36px;
height: 36px;
}
}
.el-icon-reading {
position: absolute;
font-size: 24px;
......@@ -409,9 +447,11 @@ export default {
left: 5px;
color: #fff;
}
&.attachmentList-video {
background: rgba($color: #000000, $alpha: 0.7);
position: relative;
img {
position: absolute;
top: 6px;
......@@ -420,6 +460,7 @@ export default {
height: 24px;
}
}
> img {
position: absolute;
top: 0px;
......@@ -428,6 +469,7 @@ export default {
height: 36px;
}
}
.attachmentList-text {
font-size: 14px;
text-align: left;
......
......@@ -371,6 +371,7 @@ export default {
})
params.contentList = contentList
this.addLoading = true
console.log(params)
await this.$apis.wechatGroup.atchmessagingCreate(params).then(res => {
if (res.code == 0) {
this.$message({
......
......@@ -10,11 +10,11 @@
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchFormTable" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="optionBtns" slot-scope="scope">
<div v-if="scope.scope.sendState == '3'">
<div v-if="scope.scope.sendState == 1">
<span class="sendRecord" @click="traceRecord(scope.scope)">发送记录</span>
</div>
<div v-if="scope.scope.sendState == '1'">
<span class="sendRecord" @click="terminatePopup">终止</span>
<div v-if="scope.scope.sendState == 3">
<span class="sendRecord" @click="terminatePopup(scope.scope)">终止</span>
</div>
</div>
<div slot="sendState" slot-scope="scope">
......@@ -25,15 +25,7 @@
</div>
</GLTable>
</div>
<GLDialog :title="'终止发送'" mode="small" :visible.sync="popVisible">
<div class="qrIMGbox">
是否确认终止发送
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="popVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="getCode">确定</el-button>
</span>
</GLDialog>
<GLDialog title="提示" @onOk="handleSure" @onCancel="popVisible = false" type="error" content="是否确认终止发送?" :visible.sync="popVisible" mode="small"></GLDialog>
<el-drawer size="50%" title="发送记录" :visible.sync="sendRecordDrawer.isVisible" :direction="sendRecordDrawer.direction">
<div class="horizon"></div>
<div class="sendRecordDrawerbox">
......@@ -65,6 +57,7 @@ export default {
data() {
return {
url,
selectItem:{},
popVisible:false,
sendRecordDrawer: {
isVisible: false,
......@@ -153,7 +146,7 @@ export default {
{
label: '客户数',
prop: 'customerCount',
width: 80
// width: 80
},
{
label: '标签/人群',
......@@ -164,21 +157,30 @@ export default {
{
label: '创建时间',
prop: 'createTime',
width: 280,
width: 250,
line: 1
},
{
label: '发送时间',
prop: 'sendTime',
width: 180,
line: 1
},
{
label: '发送状态',
prop: 'sendState',
addHtml: 'sendState',
width: 150,
},
{
label: '发送成功',
prop: 'successCompletion'
prop: 'successCompletion',
width: 150,
},
{
label: '发送失败',
prop: 'failCompletion'
prop: 'failCompletion',
width: 150,
},
{
label: '操作',
......@@ -194,10 +196,20 @@ export default {
}
},
methods: {
terminatePopup(){
console.log('??????')
async handleSure(){
const {msgId} = this.selectItem
await this.$apis.wechatGroup.sendStop({msgId}).then(res =>{
this.$message({
message: res.code == '0' ? '终止成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
this.popVisible = false
this.handleReset()
},
terminatePopup(scope){
this.selectItem = scope
this.popVisible = true
console.log(this.popVisible )
},
handleSearch() {
this.$refs.activeTable.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!