导粉记录页面以及接口修改
This commit is contained in:
parent
17df1db9e2
commit
f913774025
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.stdiet.common.utils.StringUtils;
|
||||||
import com.stdiet.custom.domain.SysImportFanWxAccount;
|
import com.stdiet.custom.domain.SysImportFanWxAccount;
|
||||||
import com.stdiet.custom.domain.SysWxSaleAccount;
|
import com.stdiet.custom.domain.SysWxSaleAccount;
|
||||||
import com.stdiet.custom.service.ISysImportFanWxAccountService;
|
import com.stdiet.custom.service.ISysImportFanWxAccountService;
|
||||||
@ -55,6 +56,12 @@ public class SysImportFanRecordController extends BaseController
|
|||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<SysImportFanRecord> list = sysImportFanRecordService.selectSysImportFanRecordList(sysImportFanRecord);
|
List<SysImportFanRecord> list = sysImportFanRecordService.selectSysImportFanRecordList(sysImportFanRecord);
|
||||||
|
SysImportFanWxAccount sysImportFanWxAccount = new SysImportFanWxAccount();
|
||||||
|
if(list != null && list.size() > 0){
|
||||||
|
//总导粉量
|
||||||
|
int totalNum = sysImportFanRecordService.selectTotalSysImportFanNum(sysImportFanRecord);
|
||||||
|
list.get(0).setTotalFanNum(totalNum);
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +96,34 @@ public class SysImportFanRecordController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SysImportFanRecord sysImportFanRecord)
|
public AjaxResult add(@RequestBody SysImportFanRecord sysImportFanRecord)
|
||||||
{
|
{
|
||||||
return toAjax(sysImportFanRecordService.insertSysImportFanRecord(sysImportFanRecord));
|
if(sysImportFanRecord.getImportFanDate() == null){
|
||||||
|
return AjaxResult.error("导入日期不存在");
|
||||||
|
}
|
||||||
|
int row = 0;
|
||||||
|
//批量保存
|
||||||
|
if(StringUtils.isNotEmpty(sysImportFanRecord.getImportFanChannels() )){
|
||||||
|
String[] importFanChannelArray = sysImportFanRecord.getImportFanChannels().split(",");
|
||||||
|
String[] importFanLiveArray = sysImportFanRecord.getImportFanLives().split(",");
|
||||||
|
String[] wxAccountIdArray = sysImportFanRecord.getWxAccountIds().split(",");
|
||||||
|
String[] fanNumArray = sysImportFanRecord.getFanNums().split(",");
|
||||||
|
int index = -1;
|
||||||
|
for (String importFanChannel : importFanChannelArray) {
|
||||||
|
index++;
|
||||||
|
if(StringUtils.isEmpty(importFanChannel)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
sysImportFanRecord.setImportFanChannel(Long.parseLong(importFanChannel));
|
||||||
|
sysImportFanRecord.setImportFanLive(StringUtils.isEmpty(importFanLiveArray[index]) ? 0L : Long.parseLong(importFanLiveArray[index]));
|
||||||
|
sysImportFanRecord.setWxAccountId(Long.parseLong(wxAccountIdArray[index]));
|
||||||
|
sysImportFanRecord.setFanNum(Long.parseLong(fanNumArray[index]));
|
||||||
|
row = sysImportFanRecordService.insertSysImportFanRecord(sysImportFanRecord);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(sysImportFanRecord.getImportFanChannel() != null){
|
||||||
|
row = sysImportFanRecordService.insertSysImportFanRecord(sysImportFanRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toAjax(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,4 +52,17 @@ public class SysImportFanRecord extends BaseEntity
|
|||||||
private String liveNutritionistName;
|
private String liveNutritionistName;
|
||||||
|
|
||||||
private List<Map<String,Object>> wxAccountList;
|
private List<Map<String,Object>> wxAccountList;
|
||||||
|
|
||||||
|
|
||||||
|
private String importFanChannels;
|
||||||
|
|
||||||
|
private String importFanLives;
|
||||||
|
|
||||||
|
private String wxAccountIds;
|
||||||
|
|
||||||
|
private String fanNums;
|
||||||
|
|
||||||
|
|
||||||
|
//总进粉数量
|
||||||
|
private Integer totalFanNum;
|
||||||
}
|
}
|
@ -65,4 +65,7 @@ public interface SysImportFanRecordMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public SysImportFanRecord getFanRecordByChannelLive(SysImportFanRecord sysImportFanRecord);
|
public SysImportFanRecord getFanRecordByChannelLive(SysImportFanRecord sysImportFanRecord);
|
||||||
|
|
||||||
|
//查询总导粉数量
|
||||||
|
int selectTotalSysImportFanNum(SysImportFanRecord sysImportFanRecord);
|
||||||
}
|
}
|
@ -74,4 +74,11 @@ public interface SysImportFanWxAccountMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount);
|
List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据记录ID删除对应所有微信
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteSysImportFanWxAccountByFanRecordIds(Long[] ids);
|
||||||
}
|
}
|
@ -58,4 +58,7 @@ public interface ISysImportFanRecordService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysImportFanRecordById(Long id);
|
public int deleteSysImportFanRecordById(Long id);
|
||||||
|
|
||||||
|
//查询总导粉数量
|
||||||
|
int selectTotalSysImportFanNum(SysImportFanRecord sysImportFanRecord);
|
||||||
}
|
}
|
@ -74,4 +74,11 @@ public interface ISysImportFanWxAccountService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount);
|
List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据记录ID删除对应所有微信
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteSysImportFanWxAccountByFanRecordIds(Long[] ids);
|
||||||
}
|
}
|
@ -107,7 +107,11 @@ public class SysImportFanRecordServiceImpl implements ISysImportFanRecordService
|
|||||||
@Override
|
@Override
|
||||||
public int deleteSysImportFanRecordByIds(Long[] ids)
|
public int deleteSysImportFanRecordByIds(Long[] ids)
|
||||||
{
|
{
|
||||||
return sysImportFanRecordMapper.deleteSysImportFanRecordByIds(ids);
|
int row = sysImportFanRecordMapper.deleteSysImportFanRecordByIds(ids);
|
||||||
|
if(row > 0){
|
||||||
|
sysImportFanWxAccountService.deleteSysImportFanWxAccountByFanRecordIds(ids);
|
||||||
|
}
|
||||||
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,6 +123,16 @@ public class SysImportFanRecordServiceImpl implements ISysImportFanRecordService
|
|||||||
@Override
|
@Override
|
||||||
public int deleteSysImportFanRecordById(Long id)
|
public int deleteSysImportFanRecordById(Long id)
|
||||||
{
|
{
|
||||||
return sysImportFanRecordMapper.deleteSysImportFanRecordById(id);
|
int row = sysImportFanRecordMapper.deleteSysImportFanRecordById(id);
|
||||||
|
if(row > 0){
|
||||||
|
Long[] ids = {id};
|
||||||
|
sysImportFanWxAccountService.deleteSysImportFanWxAccountByFanRecordIds(ids);
|
||||||
|
}
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询总导粉数量
|
||||||
|
public int selectTotalSysImportFanNum(SysImportFanRecord sysImportFanRecord){
|
||||||
|
return sysImportFanRecordMapper.selectTotalSysImportFanNum(sysImportFanRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -114,4 +114,13 @@ public class SysImportFanWxAccountServiceImpl implements ISysImportFanWxAccountS
|
|||||||
public List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount){
|
public List<Map<String,Object>> getTotalImportFanNum(SysImportFanWxAccount sysImportFanWxAccount){
|
||||||
return sysImportFanWxAccountMapper.getTotalImportFanNum(sysImportFanWxAccount);
|
return sysImportFanWxAccountMapper.getTotalImportFanNum(sysImportFanWxAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据记录ID删除对应所有微信
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteSysImportFanWxAccountByFanRecordIds(Long[] ids){
|
||||||
|
return sysImportFanWxAccountMapper.deleteSysImportFanWxAccountByFanRecordIds(ids);
|
||||||
|
}
|
||||||
}
|
}
|
@ -54,7 +54,16 @@
|
|||||||
where fc.del_flag = 0
|
where fc.del_flag = 0
|
||||||
<if test="importFanDate != null "> and fc.import_fan_date = #{importFanDate}</if>
|
<if test="importFanDate != null "> and fc.import_fan_date = #{importFanDate}</if>
|
||||||
<if test="importFanChannel != null "> and fc.import_fan_channel = #{importFanChannel}</if>
|
<if test="importFanChannel != null "> and fc.import_fan_channel = #{importFanChannel}</if>
|
||||||
<if test="importFanLive != null "> and fc.import_fan_live = #{importFanLive}</if>
|
order by fc.import_fan_date desc,fc.import_fan_channel asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTotalSysImportFanNum" parameterType="SysImportFanRecord" resultType="int">
|
||||||
|
select sum(fwa.import_fan_num)
|
||||||
|
from sys_import_fan_record as fc
|
||||||
|
left join sys_import_fan_wx_account fwa on fwa.import_fan_record_id = fc.id and fwa.del_flag = 0
|
||||||
|
where fc.del_flag = 0
|
||||||
|
<if test="importFanDate != null "> and fc.import_fan_date = #{importFanDate}</if>
|
||||||
|
<if test="importFanChannel != null "> and fc.import_fan_channel = #{importFanChannel}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSysImportFanRecordById" parameterType="Long" resultMap="SysImportFanRecordResult">
|
<select id="selectSysImportFanRecordById" parameterType="Long" resultMap="SysImportFanRecordResult">
|
||||||
|
@ -105,4 +105,12 @@
|
|||||||
group by w.import_wx_account_id order by w.import_wx_account_id desc
|
group by w.import_wx_account_id order by w.import_wx_account_id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据导粉ID删除对应所有微信记录 -->
|
||||||
|
<update id="deleteSysImportFanWxAccountByFanRecordIds" parameterType="String">
|
||||||
|
update sys_import_fan_wx_account set del_flag = 1 where import_fan_record_id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- -->
|
||||||
<!-- 添加或修改导粉管理对话框 -->
|
<!-- 添加或修改导粉管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1100px" :close-on-click-modal="false" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1100px" :close-on-click-modal="false" append-to-body @closed="cancel">
|
||||||
<div style="height: 500px; overflow: auto">
|
<div style="height: 500px; overflow: auto">
|
||||||
<el-table v-loading="loading" :data="wxAccountList">
|
<el-table v-loading="loading" :data="wxAccountList">
|
||||||
<!--<el-table-column label="微信昵称" align="center" prop="wxNickName" />-->
|
<!--<el-table-column label="微信昵称" align="center" prop="wxNickName" />-->
|
||||||
@ -15,6 +16,7 @@
|
|||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="autoSelectLive(scope.row)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in fanChanneloptions"
|
v-for="dict in fanChanneloptions"
|
||||||
@ -55,17 +57,26 @@
|
|||||||
type="text"
|
type="text"
|
||||||
@click="addImportFanRecord(scope.row)"
|
@click="addImportFanRecord(scope.row)"
|
||||||
v-hasPermi="['custom:importFanRecord:add']"
|
v-hasPermi="['custom:importFanRecord:add']"
|
||||||
>导粉</el-button>
|
>保存</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="addMuchImport"
|
||||||
|
v-hasPermi="['custom:importFanRecord:add']"
|
||||||
|
>全部保存</el-button>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addImportFanRecord,getWxAccountAndSale } from "@/api/custom/importFanRecord";
|
import { addImportFanRecord,getWxAccountAndSale } from "@/api/custom/importFanRecord";
|
||||||
import { getAllLiveSchedulByDate } from "@/api/custom/liveSchedul";
|
import { getAllLiveSchedulByDate } from "@/api/custom/liveSchedul";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
const nowTime = dayjs().format("YYYY-MM-DD HH:mm");
|
||||||
export default {
|
export default {
|
||||||
name: "ImportFan",
|
name: "ImportFan",
|
||||||
components: {
|
components: {
|
||||||
@ -93,7 +104,9 @@ export default {
|
|||||||
//当日直播间
|
//当日直播间
|
||||||
liveSchedukList:[],
|
liveSchedukList:[],
|
||||||
//总导粉统计
|
//总导粉统计
|
||||||
fanNumList:[]
|
fanNumList:[],
|
||||||
|
//是否进行了导粉操作
|
||||||
|
importFanFlag: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@ -105,6 +118,7 @@ export default {
|
|||||||
if(!data || data == undefined || data == null){
|
if(!data || data == undefined || data == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.importFanFlag = false;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.fanChanneloptions = fanChanneloptions;
|
this.fanChanneloptions = fanChanneloptions;
|
||||||
this.title = "「"+data.importFanDate+"」微信导粉(只显示可接粉微信号)";
|
this.title = "「"+data.importFanDate+"」微信导粉(只显示可接粉微信号)";
|
||||||
@ -126,6 +140,9 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel(){
|
cancel(){
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
if(this.importFanFlag){
|
||||||
|
this.callback && this.callback();
|
||||||
|
}
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
//获取所有可接粉的微信号
|
//获取所有可接粉的微信号
|
||||||
@ -135,6 +152,8 @@ export default {
|
|||||||
response.data.wxSaleAccountList.forEach((item,index) => {
|
response.data.wxSaleAccountList.forEach((item,index) => {
|
||||||
item.fanNum = 1;
|
item.fanNum = 1;
|
||||||
item.importFanNum = this.getTotalFanNum(response.data.fanNumList, item.id);
|
item.importFanNum = this.getTotalFanNum(response.data.fanNumList, item.id);
|
||||||
|
item.importFanChannel = null;
|
||||||
|
item.importFanLive = null;
|
||||||
});
|
});
|
||||||
this.wxAccountList = response.data.wxSaleAccountList;
|
this.wxAccountList = response.data.wxSaleAccountList;
|
||||||
this.fanNumList = response.data.fanNumList;
|
this.fanNumList = response.data.fanNumList;
|
||||||
@ -163,7 +182,7 @@ export default {
|
|||||||
},
|
},
|
||||||
addImportFanRecord(row){
|
addImportFanRecord(row){
|
||||||
//账号渠道、进粉数量不能为空
|
//账号渠道、进粉数量不能为空
|
||||||
if(row.importFanChannel == undefined || row.importFanChannel == null){
|
if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '进粉渠道不能为空',
|
message: '进粉渠道不能为空',
|
||||||
@ -171,7 +190,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(row.fanNum == undefined || row.fanNum == null){
|
if(row.fanNum == undefined || row.fanNum == null || row.fanNum == ""){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '进粉数量不能为空',
|
message: '进粉数量不能为空',
|
||||||
@ -188,14 +207,86 @@ export default {
|
|||||||
}
|
}
|
||||||
addImportFanRecord(param).then((response) => {
|
addImportFanRecord(param).then((response) => {
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
this.msgSuccess("导粉成功");
|
this.msgSuccess("保存成功");
|
||||||
row.importFanChannel = null;
|
row.importFanChannel = null;
|
||||||
row.fanNum = 1;
|
|
||||||
row.importFanLive = null;
|
row.importFanLive = null;
|
||||||
row.importFanNum += row.fanNum;
|
row.importFanNum += row.fanNum;
|
||||||
|
row.fanNum = 1;
|
||||||
|
this.importFanFlag = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
addMuchImport(){
|
||||||
|
if(this.wxAccountList == null || this.wxAccountList.length == 0){
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '微信号不存在',
|
||||||
|
center: true
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let param = {
|
||||||
|
'importFanDate': this.data.importFanDate,
|
||||||
|
'importFanChannels': null,
|
||||||
|
'importFanLives': null,
|
||||||
|
'wxAccountIds': null,
|
||||||
|
'fanNums': null
|
||||||
|
}
|
||||||
|
this.wxAccountList.forEach((item,index) => {
|
||||||
|
if(item.importFanChannel != undefined && item.importFanChannel != null && item.importFanChannel != ""){
|
||||||
|
param.importFanChannels += param.importFanChannels != null ? (","+this.nullToString(item.importFanChannel)) : item.importFanChannel;
|
||||||
|
param.importFanLives += param.importFanLives != null ? (","+this.nullToString(item.importFanLive)) : item.importFanLive;
|
||||||
|
param.wxAccountIds += param.wxAccountIds != null ? (","+this.nullToString(item.id)) : item.id;
|
||||||
|
param.fanNums += param.fanNums != null ? (","+this.nullToString(item.fanNum)) : item.fanNum;
|
||||||
|
}
|
||||||
|
if(index == this.wxAccountList.length -1){
|
||||||
|
if(param.importFanChannels == null){
|
||||||
|
this.$message({
|
||||||
|
type: 'warning',
|
||||||
|
message: '请至少存在一条数据',
|
||||||
|
center: true
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
addImportFanRecord(param).then((response) => {
|
||||||
|
if(response.code == 200){
|
||||||
|
this.msgSuccess("全部保存成功");
|
||||||
|
this.importFanFlag = true;
|
||||||
|
for(let i=0; i < this.wxAccountList.length; i++){
|
||||||
|
this.wxAccountList[i].importFanLive = null;
|
||||||
|
this.wxAccountList[i].importFanChannel = null;
|
||||||
|
this.wxAccountList[i].importFanNum += this.wxAccountList[i].fanNum;
|
||||||
|
this.wxAccountList[i].fanNum = 1;
|
||||||
|
//this.$set('wxAccountList', index, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
nullToString(value){
|
||||||
|
return (value == undefined || value == null || value == "") ? "" : value;
|
||||||
|
},
|
||||||
|
autoSelectLive(row){
|
||||||
|
if(row.importFanLive == undefined || row.importFanLive == null || row.importFanLive == ""){
|
||||||
|
if(row.importFanChannel == undefined || row.importFanChannel == null || row.importFanChannel == ""){
|
||||||
|
row.importFanLive = null;
|
||||||
|
}else{
|
||||||
|
let now = dayjs();//"2021-05-19 16:42"
|
||||||
|
//console.log(now.unix());
|
||||||
|
if(this.liveSchedukList != null){
|
||||||
|
this.liveSchedukList.forEach((item,index) => {
|
||||||
|
if(item.fanChannel == row.importFanChannel && now.unix() >= dayjs(item.liveStartTime).unix() && dayjs(item.liveEndTime).unix() >= now.unix()){
|
||||||
|
row.importFanLive = item.id;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(index == this.liveSchedukList.length - 1){
|
||||||
|
row.importFanLive = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -79,6 +79,9 @@
|
|||||||
v-hasPermi="['custom:importFanRecord:export']"
|
v-hasPermi="['custom:importFanRecord:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -114,15 +117,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<!--<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['custom:importFanRecord:edit']"
|
v-hasPermi="['custom:importFanRecord:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -131,16 +134,37 @@
|
|||||||
v-hasPermi="['custom:importFanRecord:remove']"
|
v-hasPermi="['custom:importFanRecord:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>-->
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<!--<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:layout="'total, slot, sizes, prev, pager, next, jumper'"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
<span style="margin-right: 12px"
|
||||||
|
>总计导粉量:{{totalFanNum}}
|
||||||
|
元</span
|
||||||
|
>
|
||||||
|
</pagination>-->
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:layout="`${'total, slot, sizes, prev, pager, next, jumper'}`"
|
||||||
|
@pagination="getList"
|
||||||
|
>
|
||||||
|
<span style="margin-right: 12px" v-if="!isMobile"
|
||||||
|
>总计导粉量:{{
|
||||||
|
totalFanNum
|
||||||
|
}}
|
||||||
|
</span
|
||||||
|
>
|
||||||
|
</pagination>
|
||||||
|
|
||||||
<!-- 添加或修改导粉管理对话框 -->
|
<!-- 添加或修改导粉管理对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
@ -212,7 +236,9 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
},
|
},
|
||||||
//导粉账号渠道
|
//导粉账号渠道
|
||||||
fanChanneloptions:[]
|
fanChanneloptions:[],
|
||||||
|
//总导粉量
|
||||||
|
totalFanNum:0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -229,6 +255,11 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listImportFanRecord(this.queryParams).then(response => {
|
listImportFanRecord(this.queryParams).then(response => {
|
||||||
|
if(response.rows != null && response.rows.length > 0){
|
||||||
|
this.totalFanNum = response.rows[0].totalFanNum;
|
||||||
|
}else{
|
||||||
|
this.totalFanNum = 0;
|
||||||
|
}
|
||||||
this.importFanRecordList = response.rows;
|
this.importFanRecordList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user