Commit 6a5d9156 authored by 华国豪's avatar 华国豪 🙄

新增联盟客户列表

parent 180c1fff
......@@ -569,6 +569,9 @@ export default {
case "/VoucherInquiryAdd": //新增调查
path = "/VoucherInquiry";
break;
case "/LianMengManagementList": //客户联盟客户列表
path = "/LianMengManagement";
break;
}
//找到Root
......@@ -789,6 +792,9 @@ export default {
case "/VoucherInquiryAdd": //新增调查
path = "/VoucherInquiry";
break;
case "/LianMengManagementList": //客户联盟客户列表
path = "/LianMengManagement";
break;
}
//找到Root
......
<style>
.heightauto .el-input{
height: auto !important;
}
.LianMengManagement ._icon_btn i{width: 30px;height: 30px;display: inline-block;color: white !important;border-radius: 50%;text-align: center;line-height: 30px;margin-right: 10px;cursor: pointer;outline: none;}
.LianMengManagement ._icon_btn i.el-icon-edit{background-color: #47BF8C;}
.LianMengManagement ._icon_btn i.el-icon-check{background-color: #E95252;}
</style>
<template>
<div class="LianMengManagement">
......@@ -8,11 +13,12 @@
<li>
<span>
<em>名称</em>
<el-input v-model="msg.name" maxlength="50" class="w150"></el-input>
<el-input v-model="msg.AllianceName" maxlength="50" class="w150"></el-input>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()" />
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="dialogFormVisible = true,addType = 1, iniTAddMsg" />
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()"/>
</li>
</ul>
</div>
......@@ -20,25 +26,94 @@
<tr>
<th>名称</th>
<th>门店数</th>
<th>年份</th>
<th>总金额</th>
<th>收客数</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.OrderID}}</td>
<td>{{item.GuestName}}</td>
<td>{{item.ScoreNum}}</td>
<td>
<el-tooltip class="item" effect="dark" content="查看问券" placement="top">
<el-button
type="primary"
icon="iconfont icon-sousuo"
circle
@click="dialogTitle = '游客问券', showID = item.ID, DiaoChaShow = true"
></el-button>
<td>{{item.AllianceName}}</td>
<td>{{item.CustomerCount}}</td>
<td>{{item.StartYear}}-{{item.EndYear}}</td>
<td>{{moneyFormat(item.TradeMoney)}}</td>
<td><span class="cursorpointer text-decoration" @click="goCustomerList(item.ID)">{{item.TotalGuestNum}}</span></td>
<td class="_icon_btn">
<el-tooltip class="item" effect="dark" content="新增客户" placement="top">
<i class="edit el-icon-edit"@click="addCustorm(item)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="结算" placement="top">
<i class="edit el-icon-check"@click="addCustorm(item)" v-if="item.IsClearing == 1"></i>
</el-tooltip>
</td>
</tr>
</table>
<el-dialog :title="addType == 1 ? '新增联盟' : '新增客户'" width="600px" :visible.sync="dialogFormVisible" center :before-close="closeChangeMachie" >
<el-form label-width="110px" :model="addMsg" :rules="rules" ref="addMsg" class="demo-ruleForm">
<div v-if="addType == 1">
<el-form-item label="联盟名称" prop="AllianceName" >
<el-input type="text" v-model="addMsg.AllianceName" class=""></el-input>
</el-form-item>
<el-form-item label="开始时间" prop="StartYear">
<el-date-picker class="h34 "
v-model="addMsg.StartYear"
@change="EndYearChange"
type="year"
value-format="yyyy"
:range-separator="$t('restaurant.res_To')">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="EndYear">
<el-date-picker class="h34"
@change="EndYearChange"
v-model="addMsg.EndYear"
type="year"
value-format="yyyy"
:range-separator="$t('restaurant.res_To')">
</el-date-picker>
</el-form-item>
<el-form-item label="销售" prop="Contact">
<el-select filterable v-model='addMsg.Contact' class="">
<el-option v-for='item in EmployeeList'
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
</div>
<el-form-item label="客户" prop="CustomerIDs">
<el-select v-model="addMsg.CustomerIDs"
multiple
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="getAllListBy"
class="heightauto ">
<el-option
v-for="item in AllListBy"
:key="item.CustomerId"
:label="item.CustomerName"
:value="item.CustomerId">
<span style="float: left">{{ item.CustomerName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.Contact + item.ContactNumber }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="hollowFixedBtn" @click="dialogFormVisible=false, iniTAddMsg">{{$t('pub.cancelBtn')}}</el-button>
<el-button class="normalBtn" type="primary" @click="UpdateDate('addMsg')">{{$t('pub.sureBtn')}}</el-button>
</div>
</el-dialog>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size='msg.pageSize'
:total='total'>
</el-pagination>
<div class="noDataNotice" v-if="dataList.length<1">
<i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p>
......@@ -54,21 +129,163 @@ export default {
DiaoChaShow: false,
YouJiShow: false,
showID: 0,
addType: 1,
dialogTitle: '',
dialogFormVisible: false,
optionloading: false,
msg: {
pageIndex: 1,
pageSize: 10,
AllianceName: '',
Contact: '',
},
addMsg: {
StartYear: '',
EndYear: '',
AllianceName: '',
Contact: '',
CustomerIDs: [],
ID: 0,
},
currentPage:1,
total:0,
AllListBy: [],
employeeMsg: {
GroupId:'',
BranchId:-1,
DepartmentId:0,
PostId:0,
IsLeave:0,
},
EmployeeList: [],
rules: {
AllianceName: [
{ required: true, message: '请输入联盟名称', trigger: 'blur' },
],
StartYear: [
{ required: true, message: '请选择开始年份', trigger: 'change' },
],
EndYear: [
{ required: true, message: '请选择结束年份', trigger: 'change' },
],
Contact: [
{ required: true, message: '请选择销售', trigger: 'change' },
],
CustomerIDs: [
{ type: 'array', required: true, message: '请至少选择一个客户', trigger: 'change' },
],
}
}
},mounted() {
// this.getList();
this.getList();
let userInfo=this.getLocalStorage();
this.employeeMsg.GroupId = userInfo.RB_Group_id; //集团ID
this.getEmployee()
},methods: {
goCustomerList: function (ID) {
this.$router.push({
name: 'LianMengManagementList',
query: {
id: ID,
blank: "y",
tab: '客户列表'
}
});
},
EndYearChange: function () {
let Eyear = this.addMsg.EndYear ? parseInt(this.addMsg.EndYear) : 0
let Syear = this.addMsg.StartYear ? parseInt(this.addMsg.StartYear) : 0
if (Eyear < Syear) {
this.addMsg.EndYear = ''
this.$message.error('结束时间必须大于开始时间!');
}
},
getList: function () {
this.apipost('', {TCID: TCID, OrderID: OrderID}, res=>{
this.loading = true
this.apipost('app_customer_GetAlliancePageList', this.msg, res=>{
if (res.data.resultCode === 1) {
this.loading = false;
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
}
}, null)
},
addCustorm: function (obj) {
this.addMsg.StartYear = obj.StartYear;
this.addMsg.EndYear = obj.EndYear;
this.addMsg.AllianceName = obj.AllianceName;
this.addMsg.Contact = obj.Contact;
this.addMsg.ID = obj.ID;
this.addType = 2;
this.dialogFormVisible = true;
},
// 保存
UpdateDate: function(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('app_customer_SetAlliance', this.addMsg, res=>{
if (res.data.resultCode === 1) {
this.dialogFormVisible = false;
this.iniTAddMsg();
this.getList();
this.$message.success(res.data.message);
} else{
this.$message.error(res.data.message);
}
}, null)
} else {
console.log('error submit!!');
return false;
}
});
},
getAllListBy: function (query) {
if(query == ''){
this.AllListBy = [];
return
}
this.optionloading = true
this.apipost('app_customer_GetAllListByGroupId', {CustomerName: query}, res=>{
if (res.data.resultCode === 1) {
this.dataList = res.data.data;
this.optionloading = false
this.AllListBy = res.data.data
}
}, null)
},
iniTAddMsg: function () {
this.addMsg = {
StartYear: '',
EndYear: '',
AllianceName: '',
Contact: '',
CustomerIDs: [],
ID: 0,
};
this.CustomerIDs = [];
this.resetForm('addMsg');
},
handleCurrentChange(val) { //翻页
this.msg.pageIndex = val;
this.getPageList();
},
resetPageIndex(){ // 重置页码
this.msg.pageIndex=1;
this.currentPage = 1;
},
closeChangeMachie(done) { // 转交窗口关闭
done();
this.iniTAddMsg()
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
getEmployee() { //员工
this.apipost('admin_get_EmployeeGetList', this.employeeMsg, res => {
if(res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
}
}, err => {})
},
}
}
</script>
<style>
</style>
<template>
<div class="LianMengManagement">
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>客户名称</th>
<th>联系人</th>
<th>电话</th>
<th>是否是会员</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.CustomerName}}</td>
<td>{{item.Contact}}</td>
<td>{{item.ContactNumber}}</td>
<td>{{item.IsMember == 1 ? '是' : '否'}}</td>
</tr>
</table>
<div class="noDataNotice" v-if="dataList.length<1">
<i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p>
</div>
</div>
</template>
<script>
export default {
data(){
return{
loading: false,
dataList: [],
msg: {
pageIndex: 1,
pageSize: 10,
AllianceName: '',
Contact: '',
},
}
},mounted() {
let id = this.$route.query.id;
this.getList(id);
},methods: {
getList: function (id) {
this.loading = true
this.apipost('app_customer_GetAlianceCustomerList', {Id: id}, res=>{
if (res.data.resultCode === 1) {
this.loading = false;
this.dataList = res.data.data;
}
}, null)
},
}
}
</script>
......@@ -28,7 +28,7 @@
<el-option v-for='item in appAuditStatusList' :label='item.label' :value='item.value' :key='item.value'></el-option>
</el-select></span>
</li>
<li style="top:-155px!important"><input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList()"/></li>
<li><input type="button" class="hollowFixedBtn" value="查询" @click="resetPageIndex(),getList()"/></li>
</ul>
</div>
......
......@@ -980,8 +980,8 @@ export default {
return
}
// type 1 零件地 自动生成 2 领队人头费 跳转
let BType = 3,
AccountId = 1,
let BType = 4,
AccountId = 19,
IsRelevanceTravel = 1,
TemplateId = 71,
RB_Branch_Id = userinfo.RB_Branch_id,
......
......@@ -550,6 +550,14 @@ export default {
title: '联盟管理'
},
},
{
path: '/LianMengManagementList', //联盟客户列表管理
name: 'LianMengManagementList',
component: resolve => require(['@/components/administrative/LianMengManagementList'], resolve),
meta: {
title: '联盟管理'
},
},
{
path: '/happyMoney', //幸福存折
name: 'happyMoney',
......
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