3.15

parent c430e318
...@@ -708,6 +708,7 @@ ...@@ -708,6 +708,7 @@
this.getUserLook(); this.getUserLook();
}, },
searchList(value){ searchList(value){
console.log(value)
if (value) { if (value) {
this.classUserLimit = value; this.classUserLimit = value;
this.classUserNowPage = 1 this.classUserNowPage = 1
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
label="操作" width="180"> label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="onDetail(scope.row)">查看详情</el-button> <el-button type="primary" size="mini" @click="onDetail(scope.row)">查看详情</el-button>
<el-button type="warning" size="mini" @click="onEdit(scope.row)">编辑</el-button> <el-button type="warning" size="mini" v-if="!$store.state.readonly" @click="onEdit(scope.row)">编辑</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -3,26 +3,42 @@ ...@@ -3,26 +3,42 @@
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="编辑内容"> <el-tab-pane label="编辑内容">
<div class="box"> <div class="box">
<!-- <div class="radio">
<div class="radio_title">性别</div>
<el-radio-group @change="sexchange" v-model="sex" >
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>>
</el-radio-group>
</div> -->
<div class="radio"> <div class="radio">
<div class="radio_title">选择发送范围</div> <div class="radio_title">选择发送范围 :</div>
<el-radio-group @change="radio1change" v-model="radio1" > <el-radio-group v-model="radio1" >
<el-radio :label="1">全部粉丝</el-radio> <el-radio :label="1">全部粉丝</el-radio>
<el-radio :label="2">按条件筛选</el-radio> <el-radio :label="2">按条件筛选</el-radio>
<el-radio :label="3">手动选择粉丝</el-radio> <el-radio :label="3">手动选择粉丝</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="secUinput" v-if="radio1==3"> <div class="secUinput" v-if="radio1==3">
已选用户ID:<el-input v-model="handSecUser"></el-input> <div><el-button type="primary" @click="radio1change" plain>编辑用户</el-button></div>
已选用户ID:
<el-table
:data="handSecUserShow"
border
style="width: 70%">
<el-table-column
prop="nickname"
label="用户名称"
>
</el-table-column>
<el-table-column
prop="user_id"
label="用户Id"
>
</el-table-column>
</el-table>
</div> </div>
<div v-if="radio1==2">
<div class="radio_title">选择用户性别 :</div>
<el-checkbox-group @change="sexChange" v-model="checksex">
<el-checkbox v-for="item in sex" :label="item.code" :key="item.code">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
<div class="radio" v-if="radio1==2"> <div class="radio" v-if="radio1==2">
<div class="radio_title">选择用户类型</div> <div class="radio_title">选择用户类型 :</div>
<el-radio-group @change="radio2change" v-model="radio2"> <el-radio-group @change="radio2change" v-model="radio2">
<el-radio :label="1">无手机号用户</el-radio> <el-radio :label="1">无手机号用户</el-radio>
<el-radio :label="2">有手机号但无课用户</el-radio> <el-radio :label="2">有手机号但无课用户</el-radio>
...@@ -30,18 +46,52 @@ ...@@ -30,18 +46,52 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div class="radio" v-if="radio2==3&&radio1==2"> <div class="radio" v-if="radio2==3&&radio1==2">
<div class="radio_title">选择课程类型</div> <div class="radio_title">选择课程类型 :</div>
<el-radio-group @change="radio3change" v-model="radio3"> <el-radio-group v-model="radio3">
<el-radio :label="1">所有有课用户</el-radio> <el-radio :label="1">所有有课用户</el-radio>
<!-- <el-radio :label="2">根据商品选择用户</el-radio> <el-radio :label="2">根据商品选择用户</el-radio>
<el-radio :label="3">根据期数选择用户</el-radio> --> <el-radio :label="3">根据期数选择用户</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="secUinput" v-if="radio2==3&&radio1==2&&radio3==2"> <div class="secUinput" v-if="radio2==3&&radio1==2&&radio3==2">
已选商品编号:<el-input v-model="secGoods_ids"></el-input> <div><el-button type="primary" @click="radio3change" plain>编辑商品</el-button></div>
已选商品:
<el-table
:data="secGoodsShow"
border
style="width: 30%">
<el-table-column
prop="name"
label="商品名称"
>
</el-table-column>
</el-table>
</div> </div>
<div class="secUinput" v-if="radio2==3&&radio1==2&&radio3==3">
<div><el-button type="primary" @click="radio3change" plain>编辑期数</el-button></div>
已选期数:
<el-table
:data="secPeriodsShow"
border
style="width: 30%">
<el-table-column
prop="title"
label="期数标题"
>
</el-table-column>
</el-table>
</div> </div>
</div>
<div class="update">
<el-button @click="updateFans" style="margin-bottom:20px;" type="success">
同步粉丝信息
</el-button>
</div>
<!-- <div class="userInfoBox">
<div class="line" ></div >
<div class="text" >将发送给<span>111</span></div>
<div class="line" ></div>
</div> -->
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="文本" name="text"> <el-tab-pane label="文本" name="text">
<div class="inner-edit_area"> <div class="inner-edit_area">
...@@ -83,7 +133,9 @@ ...@@ -83,7 +133,9 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div> </div>
<div class="display-b" style="margin-left: 10px">
<div class="choose_item" style="color: #888;" @click="getMediaList()"><i class="el-icon-plus" style="color: #8c939d"></i>从素材库中选择</div>
</div>
</div> </div>
<div v-if="showImage && mediaImageList.length > 0"> <div v-if="showImage && mediaImageList.length > 0">
<el-table <el-table
...@@ -284,6 +336,9 @@ ...@@ -284,6 +336,9 @@
<el-table-column <el-table-column
label="消息类型" prop="condition"> label="消息类型" prop="condition">
</el-table-column> </el-table-column>
<el-table-column
label="状态" prop="status">
</el-table-column>
<el-table-column <el-table-column
prop="send_num" prop="send_num"
label="预计发送"> label="预计发送">
...@@ -295,6 +350,15 @@ ...@@ -295,6 +350,15 @@
<el-table-column <el-table-column
prop="failed_num" prop="failed_num"
label="发送失败"> label="发送失败">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<p>用户设置拒收的过滤,用户接收已超4条的过滤</p>
<!-- <p>住址: </p> -->
<div slot="reference" class="name-wrapper">
<el-tag size="medium">{{ scope.row.failed_num }}</el-tag>
</div>
</el-popover>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="created_at" prop="created_at"
...@@ -303,7 +367,130 @@ ...@@ -303,7 +367,130 @@
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/></el-tab-pane> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/></el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog :visible.sync="goodsDialog.show" append-to-body> <el-dialog :visible.sync="periodsDialog.show" width="90%" append-to-body>
<div class="secTitle" >选择期数</div>
<div class="form-block">
<el-form label-width="85px" inline size="small">
<el-form-item label="期数标题">
<el-input v-model="periodTitle" placeholder="请输入内容" style="width: 150px" clearable></el-input>
</el-form-item>
<el-form-item label="商品名称">
<el-select v-model="goodsId" placeholder="请选择" style="width: 150px" @change="onPeriodsSearch" clearable>
<el-option
v-for="(data,index) in goodList"
:key="index"
:label="data | filterGoods"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="课程名称">
<el-select v-model="lessonId" placeholder="请选择" style="width: 150px" @change="onPeriodsSearch" clearable>
<el-option
v-for="(data,index) in lessonList"
:key="index"
:label="data.title"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker
v-model="periodStartTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00','23:59:59']"
@change="onPeriodsSearch">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="onPeriodsSearch" type="primary">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="tableBox" >
<div class="item" >
<p>筛选列表</p>
<el-tabs v-model="course_type" type="card" style="background: white;padding-top: 10px" @tab-click="onPeriodsSearch">
<el-tab-pane label="日课" name="1"/>
<el-tab-pane label="月课" name="0"/>
<el-tab-pane label="全部" name="-1"/>
</el-tabs>
<el-table
size="mini"
:data="periodList"
@select="periodsSelectionChange"
style="width: 100%" fixed>
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
label="期数标题">
<template slot-scope="scope">
<router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" >
{{scope.row.title}}
</router-link>
</template>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名称">
</el-table-column>
<el-table-column
prop="start_at"
label="起止时间" sortable>
<template slot-scope="scope">
{{scope.row.start_at}}
<br>
{{scope.row.over_at ? scope.row.over_at : ''}}
</template>
</el-table-column>
<el-table-column
prop="created_at"
label="创建时间" sortable>
</el-table-column>
</el-table>
</div>
<div class="item" >
<p>选中列表</p>
<el-table
size="mini"
:data="secPeriods"
style="width: 100%" fixed>
<el-table-column
label="期数标题">
<template slot-scope="scope">
<router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" >
{{scope.row.title}}
</router-link>
</template>
</el-table-column>
<el-table-column
label="操作"
width="148" v-if="!$store.state.readonly" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" plain @click="perioddel(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPeriodsPageChange" @sizeChange="onPeriodsSizeChange"/>
<span slot="footer" class="dialog-footer">
<el-button @click="periodsDialog.show = false">取 消</el-button>
<el-button type="primary" @click="onPeriodsConfirm">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="goodsDialog.show" width="90%" append-to-body>
<div class="secTitle" >选择商品</div>
<div class="tableBox" >
<div class="item" >
<p>筛选列表</p>
<el-tabs v-model="goodSearchFrom.status" type="card" style="background: white;padding-top: 10px" @tab-click="getGoods()"> <el-tabs v-model="goodSearchFrom.status" type="card" style="background: white;padding-top: 10px" @tab-click="getGoods()">
<el-tab-pane label="上架" name="1"></el-tab-pane> <el-tab-pane label="上架" name="1"></el-tab-pane>
<!-- <el-tab-pane label="编辑中" name="0"></el-tab-pane> --> <!-- <el-tab-pane label="编辑中" name="0"></el-tab-pane> -->
...@@ -313,16 +500,12 @@ ...@@ -313,16 +500,12 @@
<el-table <el-table
size="small" size="small"
:data="goodList" :data="goodList"
@selection-change="goodsSelectionChange" @select="goodsSelectionChange"
style="width: 100%" fixed> style="width: 100%" fixed>
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column
prop="id"
label="商品编号" width="80">
</el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="名称"> label="名称">
...@@ -338,18 +521,6 @@ ...@@ -338,18 +521,6 @@
{{scope.row.goods_type | goodsType}} {{scope.row.goods_type | goodsType}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="商品原价/直购价">
<template slot-scope="scope">
{{scope.row.original_price/100}}
</template>
</el-table-column>
<el-table-column
label="商品现价/团购价">
<template slot-scope="scope">
{{scope.row.current_price/100}}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="course_title" prop="course_title"
label="课程名称"> label="课程名称">
...@@ -361,35 +532,49 @@ ...@@ -361,35 +532,49 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="是否有实物"> label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.is_real | isOrNot}} {{scope.row.status | goodsStatus}}
</template> </template>
</el-table-column> </el-table-column>
</el-table>
</div>
<div class="item" >
<p>选中列表</p>
<el-table
size="small"
:data="secGoods"
style="width: 100%" fixed>
<el-table-column <el-table-column
prop="buy_nums" prop="name"
label="商品购买数量"> label="名称">
</el-table-column>
<el-table-column
label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.status | goodsStatus}} <router-link :to="{name:'periods', query: { goods_id: scope.row.id}}" >
{{scope.row.name}}
</router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="备注"> label="操作"
width="148" v-if="!$store.state.readonly" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.desc | goodsDesc}} <el-button size="mini" type="danger" plain @click="goodsdel(scope.row)">
删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</div>
<!-- <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> --> <!-- <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> -->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="goodsDialog.show = false">取 消</el-button> <el-button @click="goodsDialog.show = false">取 消</el-button>
<el-button type="primary" @click="onGoodsConfirm">确 定</el-button> <el-button type="primary" @click="onGoodsConfirm">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="userDialog.show" append-to-body> <el-dialog :visible.sync="userDialog.show" width="70%" append-to-body>
<div class="secTitle" >手动选择用户</div>
<el-form label-width="90px"> <el-form label-width="90px">
<el-row> <el-row>
<el-col :span="3" > <el-col :span="3" >
...@@ -414,10 +599,18 @@ ...@@ -414,10 +599,18 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="userDialog.show = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
<!-- @selection-change="handleSelectionChange" -->
<div class="tableBox" >
<div class="item" >
<p>筛选列表</p>
<el-table <el-table
:data="userList" :data="userList"
ref="multipleTable" ref="multipleTable"
@selection-change="handleSelectionChange" @select="handleSelectionChange"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
type="selection" type="selection"
...@@ -435,19 +628,38 @@ ...@@ -435,19 +628,38 @@
label="手机号"> label="手机号">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
<div class="item" >
<p>已选中列表</p>
<el-table
:data="handSecUser"
ref="multipleTable"
style="width: 100%">
<el-table-column
className="f-c"
label="用户">
<template slot-scope="scope">
<img style="margin-right:5px;width: 50px;height: 50px;border-radius: 50px" :src="scope.row.avatar">{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
prop="mobile"
label="手机号">
</el-table-column>
<el-table-column
label="操作"
width="148" v-if="!$store.state.readonly" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" plain @click="userdel(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<page :total="userDialog.total" :limit="userDialog.limit" @pageChange="onUserPageChange" @sizeChange="onUserSizeChange"/> <page :total="userDialog.total" :limit="userDialog.limit" @pageChange="onUserPageChange" @sizeChange="onUserSizeChange"/>
<span slot="footer" class="dialog-footer">
<el-button @click="userDialog.show = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="sendReviewDialog" append-to-body>
<div>预览用户ID</div>
<el-input v-model="sendReviewId" label="预览用户ID" ></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="sendReviewDialog = false">取 消</el-button>
<el-button type="primary" @click="sendReview">发送预览</el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -459,7 +671,11 @@ import { ...@@ -459,7 +671,11 @@ import {
sendMsgApi, sendMsgApi,
getUserListApi, getUserListApi,
getMediaListApi, getMediaListApi,
getGoodsListApi getGoodsListApi,
getLessonApi,
getPeriodsApi,
getMsgCountApi,
updateFansApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import page2 from "../framework/page"; import page2 from "../framework/page";
...@@ -479,16 +695,34 @@ export default { ...@@ -479,16 +695,34 @@ export default {
}, },
data() { data() {
return { return {
checksex:['-1'],
sex:[{name:"不限",code:"-1"},{name:"保密",code:"0"},{name:"男",code:"1"},{name:"女",code:"2"}],
sendReviewDialog:false, sendReviewDialog:false,
sendReviewId:"", sendReviewId:"",
goodList:[], goodList:[],
periodsDialog:{
show:false,
},
goodsDialog:{ goodsDialog:{
show:false, show:false,
}, },
handSecUser:'', handSecUserIds:"",
handSecUser:[],
handSecUserShow:[],
secGoods_ids:'', secGoods_ids:'',
secGoods:[],
secGoodsShow:[],
secPeriods_ids:'', secPeriods_ids:'',
secPeriods:[],
secPeriodsShow:[],
userList:[], userList:[],
periodList:[],
goodsId:null,
lessonId:null,
lessonList:[],
periodStartTime:null,
periodTitle:null,
course_type:'1',
radio1:1, radio1:1,
radio2:1, radio2:1,
radio3:1, radio3:1,
...@@ -521,7 +755,7 @@ export default { ...@@ -521,7 +755,7 @@ export default {
fileUid: null, fileUid: null,
userDialog: { userDialog: {
total: 0, total: 0,
limit: 10, limit: 5,
nowPage: 1, nowPage: 1,
show: false show: false
}, },
...@@ -550,6 +784,9 @@ export default { ...@@ -550,6 +784,9 @@ export default {
}; };
}, },
filters: { filters: {
filterGoods(val){
return '['+val.id+'][' + GOODSTYPE[val.goods_type] + ']' + '【' +val.current_price / 100 + '元】' + val.name
},
isOrNot(value){ isOrNot(value){
return ISORNOT[value] return ISORNOT[value]
}, },
...@@ -562,10 +799,6 @@ export default { ...@@ -562,10 +799,6 @@ export default {
goodsStatus(value){ goodsStatus(value){
return GOODSSTATUS[value] return GOODSSTATUS[value]
}, },
goodsDesc(value){
let _desc = JSON.parse(value)
return _desc.desc
},
typeFilter(val) { typeFilter(val) {
if (!val) return; if (!val) return;
if (val === "text") return "文本"; if (val === "text") return "文本";
...@@ -582,6 +815,93 @@ export default { ...@@ -582,6 +815,93 @@ export default {
} }
}, },
methods: { methods: {
updateFans(){
updateFansApi({}).then(res=>{
this.$message({
type: "success",
message: "同步成功!"
});
})
},
getMsgCount(params){
return new Promise((resolve,reject) =>{
let countParams={}
countParams.type = params.type
if(params.fans_type){
countParams.fans_type = params.fans_type
}
if(params.course_type){
countParams.course_type = params.course_type
}
if(params.ids){
countParams.ids = params.ids
}
getMsgCountApi(countParams).then(res=>{
console.log(res)
resolve(res)
})
})
},
sexChange(){
console.log(this.checksex)
},
getLessonOption(){
let json = {
page: 1,
limit: 100
};
getLessonApi(json).then(res=>{
this.lessonList = res.list;
})
},
onPeriodsPageChange(val){
this.nowPage = val
this.onPeriodsSearch()
},
onPeriodsSizeChange(val){
this.limit = val
this.nowPage = 1;
this.onPeriodsSearch()
},
onPeriodsSearch(){
let json={
limit: this.limit,
page: this.nowPage
};
if (this.course_type !== '-1'){
json.course_type = this.course_type
}
if(this.periodTitle){
json.title = this.periodTitle;
}
if(this.goodsId){
json.goods_id = this.goodsId;
}
if(this.lessonId){
json.course_id = this.lessonId;
}
if(this.periodStartTime && this.periodStartTime.length > 0){
json.start_start_at = CommonJs.dateFmt(this.periodStartTime[0],"yyyy-MM-dd")
json.start_end_at = CommonJs.dateFmt(this.periodStartTime[1],"yyyy-MM-dd")
}
if(this.startAt){
json.start_at = this.startAt;
}
getPeriodsApi(json).then(res=>{
res.list.forEach(data=>{
data.arrive_course_rate = 0;
data.watch_course_rate = 0;
data.over_course_rate = 0;
data.work_rate = 0;
data.over_work_rate = 0;
data.clock_rate = 0;
data.over_clock_rate = 0;
data.transform_rate = 0
});
this.periodList = res.list;
this.total = res.total
});
},
getGoods(){ getGoods(){
let json = { let json = {
limit: "100", limit: "100",
...@@ -621,8 +941,8 @@ export default { ...@@ -621,8 +941,8 @@ export default {
// this.total = res.total // this.total = res.total
}) })
}, },
radio1change(val){ radio1change(){
if(val == 3){ if(this.radio1 == 3){
this.onSelectUser() this.onSelectUser()
} }
// console.log(this.radio1) // console.log(this.radio1)
...@@ -630,10 +950,14 @@ export default { ...@@ -630,10 +950,14 @@ export default {
radio2change(val){ radio2change(val){
// console.log(this.radio2) // console.log(this.radio2)
}, },
radio3change(val){ radio3change(){
if(val==2){ if(this.radio3==2){
this.getGoods() this.getGoods()
this.goodsDialog.show = true; this.goodsDialog.show = true;
}else if(this.radio3==3){
this.getLessonOption()
this.onPeriodsSearch()
this.periodsDialog.show = true;
} }
console.log(this.radio3) console.log(this.radio3)
}, },
...@@ -785,14 +1109,15 @@ export default { ...@@ -785,14 +1109,15 @@ export default {
json.type = this.radio1; json.type = this.radio1;
let msgTips = "" let msgTips = ""
if(json.type==3){ if(json.type==3){
if(this.handSecUser){ if(this.handSecUserIds){
json.ids = this.handSecUser json.ids = this.handSecUserIds
msgTips = "已选发送用户" + json.ids // msgTips = "确认发送用户"
}else{ }else{
this.$message({ this.$message({
type: "error", type: "error",
message: "请选择用户!" message: "请选择用户!"
}); });
return
} }
} }
if(json.type==2){ if(json.type==2){
...@@ -800,8 +1125,28 @@ export default { ...@@ -800,8 +1125,28 @@ export default {
if(json.fans_type==3){ if(json.fans_type==3){
json.course_type = this.radio3 json.course_type = this.radio3
if(json.course_type==2){ if(json.course_type==2){
if(this.secGoods_ids){
// msgTips = "确认发送商品"
json.ids = this.secGoods_ids
}else{
this.$message({
type: "error",
message: "请选择商品!"
});
return
}
}else if(json.course_type==3){ }else if(json.course_type==3){
if(this.secPeriods_ids){
// msgTips = "确认发送期数"
json.ids = this.secPeriods_ids
}else{
this.$message({
type: "error",
message: "请选择期数!"
});
return
}
} }
} }
...@@ -850,24 +1195,28 @@ export default { ...@@ -850,24 +1195,28 @@ export default {
}); });
} }
} }
if(this.checksex){
json.sex = this.checksex.join(',')
}
json.content = JSON.stringify(_content); json.content = JSON.stringify(_content);
json.is_test = this.searchFrom.is_test ? 2 : 1; json.is_test = this.searchFrom.is_test ? 2 : 1;
console.log("json", json); console.log("json", json);
this.$confirm(msgTips, "提示", { this.getMsgCount(json).then((res)=>{
this.$confirm('你将发送给'+res+"位用户", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
sendMsgApi(json).then(res => { // sendMsgApi(json).then(res => {
this.$message({ // this.$message({
message: res, // message: res,
type: "success" // type: "success"
}); // });
this.show = false; // this.show = false;
this.clearData(); // this.clearData();
this.getMsgList(); // this.getMsgList();
}); // });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
...@@ -875,6 +1224,7 @@ export default { ...@@ -875,6 +1224,7 @@ export default {
message: "已取消发送" message: "已取消发送"
}); });
}); });
})
}, },
clearData() { clearData() {
this.content = ""; this.content = "";
...@@ -961,15 +1311,30 @@ export default { ...@@ -961,15 +1311,30 @@ export default {
this.userDialog.limit = val; this.userDialog.limit = val;
this.getUser(); this.getUser();
}, },
goodsSelectionChange(val) { periodsSelectionChange(val,el){
this.multipleSelection = val; this.multipleSelection = val;
for(let i=0;i<this.secPeriods.length;i++){
if(el.id==this.secPeriods[i].id){
return
}
}
this.secPeriods.push(el)
}, },
onGoodsConfirm() { perioddel(el){
let _list = this.multipleSelection; for(let i=0;i<this.secPeriods.length;i++){
if(el.id==this.secPeriods[i].id){
this.secPeriods.splice(i,1)
}
}
console.log(this.secPeriods)
// perioddel
},
onPeriodsConfirm() {
let _list = this.secPeriods;
if (_list.length === 0) { if (_list.length === 0) {
this.$message({ this.$message({
type: "error", type: "error",
message: "商品!" message: "请选择期数!"
}); });
} else { } else {
let _userIds = []; let _userIds = [];
...@@ -983,13 +1348,68 @@ export default { ...@@ -983,13 +1348,68 @@ export default {
// ); // );
// } // }
let _result = this.dedupe(_tmp); let _result = this.dedupe(_tmp);
this.secPeriods_ids = _result.join(",");
console.log(this.secPeriods_ids)
this.periodsDialog.show = false;
this.secPeriodsShow = this.secPeriods
}
},
goodsSelectionChange(val,el) {
this.multipleSelection = val;
for(let i=0;i<this.secGoods.length;i++){
if(el.id==this.secGoods[i].id){
return
}
}
this.secGoods.push(el)
console.log(el)
},
goodsdel(el){
for(let i=0;i<this.secGoods.length;i++){
if(el.id==this.secGoods[i].id){
this.secGoods.splice(i,1)
}
}
// goodsdel
// console.log(this.handSecUser)
},
onGoodsConfirm() {
let _list = this.secGoods;
if (_list.length === 0) {
this.$message({
type: "error",
message: "请选择商品!"
});
} else {
let _userIds = [];
_list.forEach(item => {
_userIds.push(item.id);
});
let _tmp = _userIds;
let _result = this.dedupe(_tmp);
this.secGoods_ids = _result.join(","); this.secGoods_ids = _result.join(",");
console.log(this.secGoods_ids) console.log(this.secGoods_ids)
this.secGoodsShow = this.secGoods
this.goodsDialog.show = false; this.goodsDialog.show = false;
} }
}, },
handleSelectionChange(val) { handleSelectionChange(val,el) {
this.multipleSelection = val; this.multipleSelection = val;
for(let i=0;i<this.handSecUser.length;i++){
if(el.user_id==this.handSecUser[i].user_id){
return
}
}
this.handSecUser.push(el)
},
userdel(el){
for(let i=0;i<this.handSecUser.length;i++){
if(el.user_id==this.handSecUser[i].user_id){
this.handSecUser.splice(i,1)
}
}
// goodsdel
// console.log(this.handSecUser)
}, },
onSelectUser() { onSelectUser() {
this.userDialog.show = true; this.userDialog.show = true;
...@@ -1002,7 +1422,7 @@ export default { ...@@ -1002,7 +1422,7 @@ export default {
this.getUser(); this.getUser();
}, },
onConfirm() { onConfirm() {
let _list = this.multipleSelection; let _list = this.handSecUser;
if (_list.length === 0) { if (_list.length === 0) {
this.$message({ this.$message({
type: "error", type: "error",
...@@ -1020,7 +1440,8 @@ export default { ...@@ -1020,7 +1440,8 @@ export default {
); );
} }
let _result = this.dedupe(_tmp); let _result = this.dedupe(_tmp);
this.handSecUser = _result.join(","); this.handSecUserIds = _result.join(",");
this.handSecUserShow = handSecUser;
console.log(_result) console.log(_result)
this.userDialog.show = false; this.userDialog.show = false;
} }
...@@ -1245,9 +1666,17 @@ export default { ...@@ -1245,9 +1666,17 @@ export default {
</script> </script>
<style scoped> <style scoped>
.box{height: 500px;} .el-dialog__wrapper .el-dialog{width: 80%;}
.userInfoBox{display: flex;}
.userInfoBox .line{border-bottom: 1px solid #dcdfe6;flex: 1;height: 10px; }
.userInfoBox .text{width: 200px;text-align: center;margin-bottom: 20px;}
.tableBox{display: flex;}
.tableBox .item{flex: 1;}
.box{min-height: 500px;}
.secTitle{line-height: 50px;text-align: center;font-size: 18px;}
/* .el-radio-group{display: block;} */ /* .el-radio-group{display: block;} */
.secUinput{width: 600px;} .secUinput{width: 600px;margin-top: 10px;}
.el-dialog__body{padding-top: 0;}
.avatar{width: 32px;height: 32px;} .avatar{width: 32px;height: 32px;}
.radio_title{line-height: 45px;} .radio_title{line-height: 45px;}
.el-radio-group .el-radio{ .el-radio-group .el-radio{
...@@ -1272,7 +1701,7 @@ export default { ...@@ -1272,7 +1701,7 @@ export default {
margin: 0 auto; margin: 0 auto;
} }
.upload-video { .upload-video {
width: 50%; display: block;
margin-left: 2%; margin-left: 2%;
} }
.b-title { .b-title {
......
...@@ -6,26 +6,59 @@ ...@@ -6,26 +6,59 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: bold">任务1:好友添加</span> <span style="font-size: 18px;font-weight: bold">任务1:好友添加</span>
</div> </div>
<el-table border :data="task1List" align="center" :header-cell-style="{background:'#e4eff7'}"> <el-table
border
:data="task1List"
align="center"
:header-cell-style="{background:'#e4eff7'}"
>
<el-table-column prop="cur_date" label="时间" align="center"/> <el-table-column prop="cur_date" label="时间" align="center"/>
<el-table-column prop="total_add_teacher_num" label="当天进班人数" align="center"/> <el-table-column prop="total_add_teacher_num" label="当天进班人数" align="center"/>
<el-table-column prop="done_num" label="未通过人数" align="center"> <el-table-column prop="done_num" label="未通过人数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" @click="showTask1Detail(scope.row,1)">{{scope.row.done_num}}</el-button> <el-button
type="text"
size="mini"
@click="showTask1Detail(scope.row,1)"
>{{scope.row.done_num}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column class-name="hightLight" prop="need_add_teacher_num" label="需加好友人数" align="center"> <el-table-column
<template slot-scope="scope" > class-name="hightLight"
<el-button type="text" size="mini" style="font-size: 20px" @click="showTask1Detail(scope.row)">{{scope.row.need_add_teacher_num}}</el-button> prop="need_add_teacher_num"
label="需加好友人数"
align="center"
>
<template slot-scope="scope">
<el-button
type="text"
size="mini"
style="font-size: 20px"
@click="showTask1Detail(scope.row)"
>{{scope.row.need_add_teacher_num}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="add_rate" label="完成情况" align="center" width="250"> <el-table-column prop="add_rate" label="完成情况" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<div><label style="width: 90px;display: inline-block;text-align: right">好友通过率:</label> <div>
<el-progress style="display: inline-block;width: 120px" :text-inside="true" :stroke-width="18" :color="Number(scope.row.add_rate)<70?'#f00':'#67C23A'" :percentage="Number(scope.row.add_rate)"></el-progress> <label style="width: 90px;display: inline-block;text-align: right">好友通过率:</label>
<el-progress
style="display: inline-block;width: 120px"
:text-inside="true"
:stroke-width="18"
:color="Number(scope.row.add_rate)<70?'#f00':'#67C23A'"
:percentage="Number(scope.row.add_rate)"
></el-progress>
</div> </div>
<div><label style="width: 90px;display: inline-block;text-align: right">任务处理率:</label> <div>
<el-progress style="display: inline-block;width: 120px" :text-inside="true" :stroke-width="18" :color="Number(scope.row.done_rate) === 100?'#67C23A':'#f00'" :percentage="Number(scope.row.done_rate)"></el-progress> <label style="width: 90px;display: inline-block;text-align: right">任务处理率:</label>
<el-progress
style="display: inline-block;width: 120px"
:text-inside="true"
:stroke-width="18"
:color="Number(scope.row.done_rate) === 100?'#67C23A':'#f00'"
:percentage="Number(scope.row.done_rate)"
></el-progress>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -37,50 +70,63 @@ ...@@ -37,50 +70,63 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 18px;font-weight: bold">附加任务:外部订单激活</span> <span style="font-size: 18px;font-weight: bold">附加任务:外部订单激活</span>
</div> </div>
<el-table border :data="task6Obj && task6Obj.list ? [task6Obj] : []" align="center" :header-cell-style="{background:'#e4eff7'}"> <el-table
border
:data="task6Obj && task6Obj.list ? [task6Obj] : []"
align="center"
:header-cell-style="{background:'#e4eff7'}"
>
<el-table-column class-name="hightLight" prop="total" label="当日需激活人数" align="center"> <el-table-column class-name="hightLight" prop="total" label="当日需激活人数" align="center">
<template slot-scope="scope" > <template slot-scope="scope">
<el-button type="text" size="mini" style="font-size: 20px" @click="showTask6Detail()">{{scope.row.total}}</el-button> <el-button
type="text"
size="mini"
style="font-size: 20px"
@click="showTask6Detail()"
>{{scope.row.total}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="into_periods_num" label="当日已激活人数" align="center"> <el-table-column prop="into_periods_num" label="当日已激活人数" align="center">
<template slot-scope="scope" > <template slot-scope="scope">
<el-button type="text" size="mini" style="font-size: 20px" @click="showTask6Detail2()">{{scope.row.into_periods_num}}</el-button> <el-button
type="text"
size="mini"
style="font-size: 20px"
@click="showTask6Detail2()"
>{{scope.row.into_periods_num}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="total" label="激活率" align="center"> <el-table-column prop="total" label="激活率" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress style="display: inline-block;width: 120px" :text-inside="true" :stroke-width="18" :color="Number(scope.row.exec_rate)<70?'#f00':'#67C23A'" :percentage="Number(scope.row.exec_rate)"></el-progress> <el-progress
style="display: inline-block;width: 120px"
:text-inside="true"
:stroke-width="18"
:color="Number(scope.row.exec_rate)<70?'#f00':'#67C23A'"
:percentage="Number(scope.row.exec_rate)"
></el-progress>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog append-to-body :visible.sync="task6Show" title="外部订单待激活列表" width="1000px"> <el-dialog append-to-body :visible.sync="task6Show" title="外部订单待激活列表" width="85%">
<el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button>
<el-table border size="mini" :data="task6Obj && task6Obj.list ? task6Obj.list : []" <el-table
@selection-change="handleSelectionChange123"> border
<el-table-column size="mini"
type="selection" :data="task6Obj && task6Obj.list ? task6Obj.list : []"
width="55"> @selection-change="handleSelectionChange123"
</el-table-column> >
<el-table-column prop="order_id" label="订单号"> <el-table-column type="selection" width="55"></el-table-column>
</el-table-column> <el-table-column prop="receiver_mobile" label="手机号" align="center"></el-table-column>
<el-table-column prop="receiver_mobile" label="手机号" align="center">
</el-table-column>
<el-table-column prop="all_num" label="支付金额"> <el-table-column prop="all_num" label="支付金额">
<template slot-scope="scope"> <template slot-scope="scope">{{scope.row.money / 100}}</template>
{{scope.row.money / 100}}
</template>
</el-table-column>
<el-table-column prop="goods_id" label="商品编号">
</el-table-column>
<el-table-column prop="periods_id" label="期数">
</el-table-column>
<el-table-column prop="invite_type" label="来源">
</el-table-column> </el-table-column>
<el-table-column prop="goods_id" label="商品编号"></el-table-column>
<el-table-column prop="invite_type" label="来源"></el-table-column>
<el-table-column prop="created_at" label="导入时间"></el-table-column>
<el-table-column prop="all_num" label="收货信息" width="150px"> <el-table-column prop="all_num" label="收货信息" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
姓名:{{scope.row.receiver_name}} 姓名:{{scope.row.receiver_name}}
...@@ -88,12 +134,36 @@ ...@@ -88,12 +134,36 @@
地址:{{scope.row.receiver_province}}{{scope.row.receiver_city}}{{scope.row.receiver_area}}{{scope.row.receiver_address}} 地址:{{scope.row.receiver_province}}{{scope.row.receiver_city}}{{scope.row.receiver_area}}{{scope.row.receiver_address}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="desc" label="备注" align="center"> <el-table-column prop="user_status" width="260px" label="沟通状态">
<template slot-scope="scope">
<el-select
v-model="scope.row.user_status"
size="medium"
@change="updateContact(scope.row)"
>
<el-option label="手机号不是微信号" :value="1"></el-option>
<el-option label="待通过" :value="2"></el-option>
<el-option label="已加微信未激活" :value="3"></el-option>
<el-option label="第一次电话无人接/挂断/关机" :value="4"></el-option>
<el-option label="第二次电话无人接/挂断/关机" :value="5"></el-option>
<el-option label="第三次电话无人接/挂断/关机" :value="6"></el-option>
<el-option label="用户已拒绝" :value="7"></el-option>
<el-option label="手机号是空号" :value="8"></el-option>
<el-option label="已激活" :value="9"></el-option>
<el-option label="待处理" :value="0"></el-option>
</el-select>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="desc" label="备注" align="center"></el-table-column>
<el-table-column width="100" prop="desc" label="操作" align="center"> <el-table-column width="100" prop="desc" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="editNote(scope.row.id, scope.row.desc)" size="mini" plain type="primary">编辑备注</el-button> <el-button
@click="editNote(scope.row.id, scope.row.desc)"
size="mini"
plain
type="primary"
>编辑备注</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -101,37 +171,36 @@ ...@@ -101,37 +171,36 @@
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="task6Show2" title="外部订单已激活列表" width="1200px"> <el-dialog append-to-body :visible.sync="task6Show2" title="外部订单已激活列表" width="85%">
<el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button> <el-button @click="allDesc6()" size="mini" type="success">批量添加备注</el-button>
<el-table border size="mini" :data="task6Obj && task6Obj.into_periods_list ? task6Obj.into_periods_list : []" <el-table
@selection-change="handleSelectionChange123"> border
<el-table-column size="mini"
type="selection" :data="task6Obj && task6Obj.into_periods_list ? task6Obj.into_periods_list : []"
width="55"> @selection-change="handleSelectionChange123"
</el-table-column> >
<el-table-column label="用户" className="f-c" min-width="180" prop="user_id"> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="用户" class="f-c" min-width="180" prop="user_id">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.avatar" style="width: 40px;min-width:40px;height: 40px;border-radius: 50px"> {{scope.row.nickname}}(ID:{{scope.row.user_id}}) <img
:src="scope.row.avatar"
style="width: 40px;min-width:40px;height: 40px;border-radius: 50px"
>
{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="order_id" label="订单号">
</el-table-column>
<el-table-column prop="receiver_mobile" label="手机号" align="center"> <el-table-column prop="receiver_mobile" label="手机号" align="center"></el-table-column>
</el-table-column>
<el-table-column prop="all_num" label="支付金额"> <el-table-column prop="all_num" label="支付金额">
<template slot-scope="scope"> <template slot-scope="scope">{{scope.row.money / 100}}</template>
{{scope.row.money / 100}} </el-table-column>
</template> <el-table-column prop="goods_id" label="商品编号"></el-table-column>
</el-table-column> <el-table-column prop="periods_id" label="期数"></el-table-column>
<el-table-column prop="goods_id" label="商品编号"> <el-table-column prop="invite_type" label="来源"></el-table-column>
</el-table-column> <el-table-column prop="periods_title" label="期数名称"></el-table-column>
<el-table-column prop="periods_id" label="期数"> <el-table-column prop="created_at" label="导入时间"></el-table-column>
</el-table-column> <el-table-column prop="active_at" label="激活时间"></el-table-column>
<el-table-column prop="invite_type" label="来源">
</el-table-column>
<el-table-column prop="periods_title" label="期数名称">
</el-table-column>
<el-table-column prop="all_num" label="收货信息" width="150px"> <el-table-column prop="all_num" label="收货信息" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
姓名:{{scope.row.receiver_name}} 姓名:{{scope.row.receiver_name}}
...@@ -139,48 +208,62 @@ ...@@ -139,48 +208,62 @@
地址:{{scope.row.receiver_province}}{{scope.row.receiver_city}}{{scope.row.receiver_area}}{{scope.row.receiver_address}} 地址:{{scope.row.receiver_province}}{{scope.row.receiver_city}}{{scope.row.receiver_area}}{{scope.row.receiver_address}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="desc" label="备注" align="center"> <el-table-column prop="desc" label="备注" align="center"></el-table-column>
</el-table-column>
<el-table-column width="100" prop="desc" label="操作" align="center"> <el-table-column width="100" prop="desc" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="editNote(scope.row.id, scope.row.desc)" size="mini" plain type="primary">编辑备注</el-button> <el-button
@click="editNote(scope.row.id, scope.row.desc)"
size="mini"
plain
type="primary"
>编辑备注</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="into_periods_num" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page
:total="into_periods_num"
:limit="limit"
@pageChange="onPageChange"
@sizeChange="onSizeChange"
/>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="task1Detail.show" :title="task1Detail.title" width="80%" > <el-dialog
append-to-body
:visible.sync="task1Detail.show"
:title="task1Detail.title"
width="80%"
>
<el-table :data="task1Detail.list" size="mini" fixed> <el-table :data="task1Detail.list" size="mini" fixed>
<el-table-column label="用户" className="f-c" min-width="180" prop="user_id"> <el-table-column label="用户" class="f-c" min-width="180" prop="user_id">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.avatar" style="width: 40px;min-width:40px;height: 40px;border-radius: 50px"> {{scope.row.nickname}}(ID:{{scope.row.user_id}}) <img
<br> Tel:{{scope.row.mobile}} :src="scope.row.avatar"
style="width: 40px;min-width:40px;height: 40px;border-radius: 50px"
>
{{scope.row.nickname}}(ID:{{scope.row.user_id}})
<br>
Tel:{{scope.row.mobile}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="期数" align="center"> <el-table-column label="期数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">{{scope.row.periods_id}}{{scope.row.periods_title}}</template>
{{scope.row.periods_id}}{{scope.row.periods_title}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="是否添加老师" min-width="160" prop="is_add_teacher">
label="是否添加老师" min-width="160" prop="is_add_teacher">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.is_add_teacher" size="mini" @change="changeAddTeacher(scope.row)"> <el-select
<el-option label="老师主动添加" :value="1"> v-model="scope.row.is_add_teacher"
</el-option> size="mini"
<el-option label="用户主动添加" :value="2"> @change="changeAddTeacher(scope.row)"
</el-option> >
<el-option label="待通过" :value="3"> <el-option label="老师主动添加" :value="1"></el-option>
</el-option> <el-option label="用户主动添加" :value="2"></el-option>
<el-option label="手机号不是微信号" :value="4"> <el-option label="待通过" :value="3"></el-option>
</el-option> <el-option label="手机号不是微信号" :value="4"></el-option>
<el-option label="用户已拒绝" :value="5"> <el-option label="用户已拒绝" :value="5"></el-option>
</el-option> <el-option label="暂未处理" :value="0"></el-option>
<el-option label="暂未处理" :value="0">
</el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
...@@ -193,43 +276,63 @@ ...@@ -193,43 +276,63 @@
</el-table> </el-table>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import teacherDesc from '../framework/teacherDesc' import teacherDesc from "../framework/teacherDesc";
import {task1Api,task6Api,changeAddTeacherApi,multiApi,orderDescApi} from "../../service/api"; import {
import page from '../framework/page' task1Api,
task6Api,
export default { changeAddTeacherApi,
multiApi,
orderDescApi,
updateContactApi
} from "../../service/api";
import page from "../framework/page";
import { USERSTATUS } from "../../util/wordbook";
export default {
name: "task1", name: "task1",
components: {teacherDesc,page}, components: { teacherDesc, page },
props:['teacherId'], props: ["teacherId"],
data(){ data() {
return { return {
task1List:[], task1List: [],
task1Detail:{ task1Detail: {
show:false, show: false,
list:[], list: [],
title:'', title: "",
cur_date:'' cur_date: ""
},
task6Show: false,
task6Show2: false,
limit: 10,
total: 0,
into_periods_num: 0,
nowPage: 1,
task6Obj: null,
selectedTask6: []
};
}, },
task6Show:false, filters: {
task6Show2:false, USERSTATUSType(value) {
limit:10, return USERSTATUS[value];
total:0,
into_periods_num:0,
nowPage:1,
task6Obj:null,
selectedTask6:[]
} }
}, },
mounted(){ mounted() {
this.initPage() this.initPage();
}, },
methods:{ methods: {
handleSelectionChange123(x){ updateContact(row) {
this.selectedTask6 = x updateContactApi({ids:row.id,user_status:row.user_status}).then(() => {
this.$message({
type: "success",
message: "数据更改成功"
});
this.refDesc1();
});
},
handleSelectionChange123(x) {
this.selectedTask6 = x;
}, },
editNote(id, desc) { editNote(id, desc) {
this.$prompt("", "编辑备注", { this.$prompt("", "编辑备注", {
...@@ -249,125 +352,128 @@ ...@@ -249,125 +352,128 @@
message: "编辑备注成功" message: "编辑备注成功"
}); });
this.selectedTask6 = []; this.selectedTask6 = [];
this.getTask6() this.getTask6();
}); });
}); });
}); });
}, },
allDesc6(){ allDesc6() {
if(this.selectedTask6.length < 1){ if (this.selectedTask6.length < 1) {
this.$message({ this.$message({
type:'error', type: "error",
message:'请先选择用户' message: "请先选择用户"
}) });
}else{ } else {
this.$prompt('请输入沟通内容', '备注', { this.$prompt("请输入沟通内容", "备注", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
inputType:'textarea', inputType: "textarea"
}).then(({ value }) => { }).then(({ value }) => {
let ids = []; let ids = [];
this.selectedTask6.forEach(i=>{ this.selectedTask6.forEach(i => {
ids.push(i.id) ids.push(i.id);
}); });
let json = { let json = {
ids:ids.join(), ids: ids.join(),
desc:value, desc: value
}; };
multiApi(json).then(res=>{ multiApi(json).then(res => {
this.$message({ this.$message({
type:'success', type: "success",
message:'批量添加备注成功' message: "批量添加备注成功"
}); });
this.selectedTask6 = []; this.selectedTask6 = [];
this.getTask6() this.getTask6();
}) });
}) });
} }
}, },
onPageChange(val){ onPageChange(val) {
this.nowPage = val; this.nowPage = val;
this.getTask6(); this.getTask6();
}, },
onSizeChange(val){ onSizeChange(val) {
this.limit = val; this.limit = val;
this.nowPage = 1; this.nowPage = 1;
this.getTask6(); this.getTask6();
}, },
getTask6(){ getTask6() {
let json = { let json = {
limit: this.limit, limit: this.limit,
page: this.nowPage page: this.nowPage
}; };
task6Api(this.teacherId,json).then(res=>{ task6Api(this.teacherId, json).then(res => {
console.log(res) console.log(res);
this.task6Obj = res; this.task6Obj = res;
this.total = res.total this.total = res.total;
this.into_periods_num = res.into_periods_num this.into_periods_num = res.into_periods_num;
}); });
}, },
initPage(){ initPage() {
this.nowPage = 1; this.nowPage = 1;
task1Api(this.teacherId).then(res=>{ task1Api(this.teacherId).then(res => {
this.task1List = res this.task1List = res;
}); });
this.getTask6() this.getTask6();
}, },
objectSpanMethod( data ){ objectSpanMethod(data) {
if(data.columnIndex === 5){ if (data.columnIndex === 5) {
return { return {
rowspan: this.task1List.length, rowspan: this.task1List.length,
colspan: 1 colspan: 1
}; };
}else{ } else {
return { return {
rowspan: 1, rowspan: 1,
colspan: 1 colspan: 1
}; };
} }
}, },
showTask6Detail(){ showTask6Detail() {
this.nowPage = 1; this.nowPage = 1;
this.task6Show = true this.task6Show = true;
}, },
showTask6Detail2(){ showTask6Detail2() {
this.nowPage = 1; this.nowPage = 1;
this.task6Show2 = true this.task6Show2 = true;
}, },
refDesc1(){ refDesc1() {
task1Api(this.teacherId).then(res=>{ task1Api(this.teacherId).then(res => {
this.task1List = res; this.task1List = res;
res.forEach(i=>{ res.forEach(i => {
if(i.cur_date === this.task1Detail.cur_date){ if (i.cur_date === this.task1Detail.cur_date) {
console.log(this.task1Detail) console.log(this.task1Detail);
this.task1Detail.list =this.task1Detail.indexOf('未通过用户列表') < -1 ? i.done_detail:i.need_add_detail this.task1Detail.list =
this.task1Detail.indexOf("未通过用户列表") < -1
? i.done_detail
: i.need_add_detail;
} }
}) });
}); });
}, },
changeAddTeacher(data){ changeAddTeacher(data) {
changeAddTeacherApi(data.id,data.is_add_teacher).then(()=>{ changeAddTeacherApi(data.id, data.is_add_teacher).then(() => {
this.$message({ this.$message({
type:'success', type: "success",
message:'数据更改成功' message: "数据更改成功"
}); });
this.refDesc1(); this.refDesc1();
}) });
},
showTask1Detail(data,type){
this.task1Detail={
show:true,
list:type ? data.done_detail :data.need_add_detail,
title:type ? data.cur_date + ' 未通过用户列表':data.cur_date + ' 待加好友用户列表',
cur_date:data.cur_date
}
this.dialogType = 1
}, },
showTask1Detail(data, type) {
this.task1Detail = {
show: true,
list: type ? data.done_detail : data.need_add_detail,
title: type
? data.cur_date + " 未通过用户列表"
: data.cur_date + " 待加好友用户列表",
cur_date: data.cur_date
};
this.dialogType = 1;
} }
} }
};
</script> </script>
<style scoped> <style scoped>
</style> </style>
...@@ -475,7 +475,8 @@ export default { ...@@ -475,7 +475,8 @@ export default {
page2, page2,
pageImage, pageImage,
pageVideo, pageVideo,
emotion emotion,
getMsgCountApi
}, },
data() { data() {
return { return {
...@@ -779,6 +780,9 @@ export default { ...@@ -779,6 +780,9 @@ export default {
this.clearData(); this.clearData();
this.getMsgList(); this.getMsgList();
}); });
},
getMsgCountApi(){
}, },
send() { send() {
let json = {}; let json = {};
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<el-button type="primary" plain>导入</el-button> <el-button type="primary" plain>导入</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item v-if="!$store.state.readonly">
<el-button type="primary" plain @click="downLoad()">excel模板下载</el-button> <el-button type="primary" plain @click="downLoad()">excel模板下载</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<el-tab-pane label="月课" name="0"/> <el-tab-pane label="月课" name="0"/>
<el-tab-pane label="日课" name="1"/> <el-tab-pane label="日课" name="1"/>
</el-tabs> </el-tabs>
<div style="position: absolute;top: 10px;right: 10px;font-size: 14px"> <div style="position: absolute;top: 10px;right: 10px;font-size: 14px" v-if="!$store.state.readonly">
老师: 老师:
<el-select size="small" v-model="teacherId" placeholder="请选择" clearable style="width: 150px" filterable> <el-select size="small" v-model="teacherId" placeholder="请选择" clearable style="width: 150px" filterable>
<el-option label="暂不分配" value="0"> <el-option label="暂不分配" value="0">
......
...@@ -992,4 +992,16 @@ const getMsgListUrl = `/api/admin/muti/msg/list`; ...@@ -992,4 +992,16 @@ const getMsgListUrl = `/api/admin/muti/msg/list`;
export const getMsgListApi = function (json) { export const getMsgListApi = function (json) {
return Vue.prototype.$fetch(getMsgListUrl,json) return Vue.prototype.$fetch(getMsgListUrl,json)
}; };
///api/admin/muti/msg/list const getMsgCountUrl = `/api/admin/multi/msg/user`;
\ No newline at end of file export const getMsgCountApi = function (json) {
return Vue.prototype.$fetch(`${getMsgCountUrl}`,json)
};
const updateFansUrl = `/api/admin/init/fans/info`;
export const updateFansApi = function (json) {
return Vue.prototype.$put(`${updateFansUrl}`,json)
};
const updateContactUrl = `/api/admin/other/order/user/status`;
export const updateContactApi = function (json) {
return Vue.prototype.$put(`${updateContactUrl}`,json)
};
//api/admin/other/order/user/status
\ No newline at end of file
...@@ -172,3 +172,15 @@ export const CLASSSOURCE = { ...@@ -172,3 +172,15 @@ export const CLASSSOURCE = {
3:'渠道1订单随机', 3:'渠道1订单随机',
4:'渠道2订单随机' 4:'渠道2订单随机'
}; };
export const USERSTATUS = {
0:'待处理',
1:'手机号不是微信号',
2:'待通过',
3:'已加微信未激活',
4:'第一次电话无人接/挂断/关机',
5:'第二次电话无人接/挂断/关机',
6:'第三次电话无人接/挂断/关机',
7:'用户已拒绝',
8:'手机号是空号',
9:'已激活',
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment