Commit f4de6b35 authored by 黄奎's avatar 黄奎

用款计划合团领款验证调整

parent ce7a3ff0
...@@ -1924,7 +1924,6 @@ ...@@ -1924,7 +1924,6 @@
Type: fileTypeNumber, Type: fileTypeNumber,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath, Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
}) })
console.log("this.importData[this.importDataIndex]",this.importData[this.importDataIndex]);
this.$message.success(this.$t('tips.scchenggong')) this.$message.success(this.$t('tips.scchenggong'))
}, 1); }, 1);
}, },
......
...@@ -2706,7 +2706,6 @@ ...@@ -2706,7 +2706,6 @@
if(data.Type==2&&data.HelpBranchId>-1){ if(data.Type==2&&data.HelpBranchId>-1){
this.ClientBankAccountTop=1; this.ClientBankAccountTop=1;
} }
console.log("this.ClientBankAccountTop",this.ClientBankAccountTop);
this.clientBankAccountData={ this.clientBankAccountData={
AccountHolder:data.AccountHolder, AccountHolder:data.AccountHolder,
AccountNumber:data.AccountNumber, AccountNumber:data.AccountNumber,
......
...@@ -242,7 +242,6 @@ ...@@ -242,7 +242,6 @@
let OriginalMoneyClosed = 0 let OriginalMoneyClosed = 0
let HandlingChargeMoneyClosed = 0 let HandlingChargeMoneyClosed = 0
this.frIds= this.dataList.map(row => row.FrID).join(',') this.frIds= this.dataList.map(row => row.FrID).join(',')
console.log(" this.frIds",this.frIds);
this.dataList.forEach(x=>{ this.dataList.forEach(x=>{
if(x.Type==2){ if(x.Type==2){
......
...@@ -1209,7 +1209,6 @@ ...@@ -1209,7 +1209,6 @@
this.HelpBranchMsg.HelpBranchId = item.HelpBranchId; this.HelpBranchMsg.HelpBranchId = item.HelpBranchId;
this.HelpBranchMsg.Type=item.Type; this.HelpBranchMsg.Type=item.Type;
this.HelpBranchMsg.RB_Branch_Id=item.RB_Branch_Id; this.HelpBranchMsg.RB_Branch_Id=item.RB_Branch_Id;
console.log("item",item);
if(item.Type==1){ if(item.Type==1){
this.dialogTitle="修改代收公司"; this.dialogTitle="修改代收公司";
this.dialogTitle1="代收公司"; this.dialogTitle1="代收公司";
......
...@@ -1872,7 +1872,6 @@ ...@@ -1872,7 +1872,6 @@
let feeObj = this.msg.detailList.find(x=>{ let feeObj = this.msg.detailList.find(x=>{
return x.CostTypeId==114 && x.CurrencyId==3 && (x.UnitPrice==550 || x.UnitPrice==275 ||x.UnitPrice==183 ||x.UnitPrice==184 ||x.UnitPrice==137.5) return x.CostTypeId==114 && x.CurrencyId==3 && (x.UnitPrice==550 || x.UnitPrice==275 ||x.UnitPrice==183 ||x.UnitPrice==184 ||x.UnitPrice==137.5)
}) })
console.log(this.msg.detailList);
if(feeObj){ if(feeObj){
confirmMsg.push("从2024.1.1起制单,对于转账手续费将从原单剥离,系统自动生成独立手续费关联单据!"); confirmMsg.push("从2024.1.1起制单,对于转账手续费将从原单剥离,系统自动生成独立手续费关联单据!");
} }
......
...@@ -1649,8 +1649,6 @@ ...@@ -1649,8 +1649,6 @@
}, },
Financial_post_Set(){ Financial_post_Set(){
console.log(this.msg,'=====------msg')
// return
this.loading = true; this.loading = true;
this.apipost('Financial_post_Set', this.msg, res => { this.apipost('Financial_post_Set', this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
......
<template> <template>
<div class="mb30" v-loading='loading'> <div class="mb30" v-loading='loading'>
<input type="button" @click="downloadMoneyPlan()" class="normalBtn" value="下载" /> <input type="button" @click="downloadMoneyPlan()" class="normalBtn" value="下载" />
<div style="display: flex;justify-content: end;margin-top: 10px;margin-bottom: 10px;"> <div style="display: flex;justify-content: end;margin-top: 10px;margin-bottom: 10px;">
<p><span class="groupTourOrderByTuan_ico"><i <p><span class="groupTourOrderByTuan_ico"><i
style="background-color:#3FC4FF"></i><span>{{$t('fnc.yidadan')}}</span></span> style="background-color:#3FC4FF"></i><span>{{$t('fnc.yidadan')}}</span></span>
...@@ -701,6 +701,7 @@ ...@@ -701,6 +701,7 @@
<th width="100">备注</th> <th width="100">备注</th>
<th width="110">成本单据</th> <th width="110">成本单据</th>
</tr> </tr>
<template v-for='(item,index) in list.ScenicList'> <template v-for='(item,index) in list.ScenicList'>
<template v-for="(subItem,subIndex) in item.ScenicStatisticsList"> <template v-for="(subItem,subIndex) in item.ScenicStatisticsList">
<tr v-for="(childItem,childIndex) in subItem.TicketPriceList"> <tr v-for="(childItem,childIndex) in subItem.TicketPriceList">
...@@ -892,7 +893,7 @@ ...@@ -892,7 +893,7 @@
<th>操作</th> <th>操作</th>
</tr> </tr>
<tr v-for='(item, index) in nav'> <tr v-for='(item, index) in nav'>
<td>{{item.TCNUMS}}</td> <td>{{item.TCNUMS}} </td>
<td :rowspan="nav.length * CurrencyListMoney.length" width="180" v-if="index===0">总金额: <td :rowspan="nav.length * CurrencyListMoney.length" width="180" v-if="index===0">总金额:
<span v-for="(cur,index) in CurrencyListMoney" :key="index+5000">{{moneyFormat(cur.money)}} <span v-for="(cur,index) in CurrencyListMoney" :key="index+5000">{{moneyFormat(cur.money)}}
<span v-if="cur.CurrencyId>0"> ( <span v-if="cur.CurrencyId>0"> (
...@@ -903,7 +904,12 @@ ...@@ -903,7 +904,12 @@
{{currencyTypeObj[cur.CurrencyId]}} {{currencyTypeObj[cur.CurrencyId]}}
</template> </template>
) </span> ) </span>
<br /></span> <br />
<template
v-if="cur.LeaderGetPriceArr&&cur.LeaderGetPriceArr.length>0 && cur.LeaderGetPriceArr[0].ShowTotalPrice">
<span> 合计领款不能超过 <font style="color:red;font-weight:bold">{{cur.LeaderGetPriceArr[0].ShowTotalPrice}}</font></span>
</template>
</span>
</td> </td>
<td style="padding: 5px 20px;"> <td style="padding: 5px 20px;">
<div style="margin:10px 0" v-for="cur in CurrencyListMoney"> <div style="margin:10px 0" v-for="cur in CurrencyListMoney">
...@@ -922,13 +928,10 @@ ...@@ -922,13 +928,10 @@
) </span> ) </span>
</span> </span>
</p> </p>
<!-- <el-input class="w300" v-if="leadr.LeaderGetPrice < leadr.PlanPrice" type="number"
v-model="leadr.LeaderGetPriceT" @input="changePrice"></el-input> -->
<el-input class="w300" type="number" v-model="leadr.LeaderGetPriceT" @input="changePrice"></el-input> <el-input class="w300" type="number" v-model="leadr.LeaderGetPriceT" @input="changePrice"></el-input>
</template> </template>
</div> </div>
<span style="color:red;font-weight:bold;"> <span>
注意:<span>1、合团的请分别领款!</span> <span style="margin-left: 20px;">2、如需日本PIC付款,请选择PIC相关付款流程,请注意日本转账手续费</span> 注意:<span>1、合团的请分别领款!</span> <span style="margin-left: 20px;">2、如需日本PIC付款,请选择PIC相关付款流程,请注意日本转账手续费</span>
</span> </span>
</td> </td>
...@@ -949,7 +952,7 @@ ...@@ -949,7 +952,7 @@
<div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney"> <div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney">
<template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS"> <template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS">
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top"> <el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" value="制单" class="normalBtn" @click="goZhiDan(item,0,leadr,cur)" /> <input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</el-tooltip> </el-tooltip>
</template> </template>
</div> </div>
...@@ -958,10 +961,10 @@ ...@@ -958,10 +961,10 @@
<div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney"> <div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney">
<template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS"> <template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS">
<input type="button" v-if="item.TeamType == 1 && index2==0" value="日当费" class="normalBtn" <input type="button" v-if="item.TeamType == 1 && index2==0" value="日当费" class="normalBtn"
@click="goZhiDan(item, 2)" /> @click="goDiJieZhiDan(item, 2)" />
<template v-if="item.hideZDBtn && ContractUrlCount == 0"> <template v-if="item.hideZDBtn && ContractUrlCount == 0">
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top"> <el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" value="制单" class="normalBtn" @click="goZhiDan(item,0,leadr,cur)" /> <input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</el-tooltip> </el-tooltip>
</template> </template>
<template v-else-if="ContractUrlCount !== 0 && index2==0"> <template v-else-if="ContractUrlCount !== 0 && index2==0">
...@@ -1141,7 +1144,11 @@ ...@@ -1141,7 +1144,11 @@
fileName += ".xls" fileName += ".xls"
this.loading = true; this.loading = true;
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.GetLocalFile("dmcstatistics_post_NewDownLoadGroupLeaderUserMoneyPlan",{TCIDs: this.$route.query.id,uid:userInfo.EmployeeId,NewCombinationNum:this.NewCombinationNum}, fileName, res => { this.GetLocalFile("dmcstatistics_post_NewDownLoadGroupLeaderUserMoneyPlan", {
TCIDs: this.$route.query.id,
uid: userInfo.EmployeeId,
NewCombinationNum: this.NewCombinationNum
}, fileName, res => {
this.loading = false; this.loading = false;
}); });
}, },
...@@ -1490,11 +1497,6 @@ ...@@ -1490,11 +1497,6 @@
id = [98, 99]; id = [98, 99];
} else { } else {
id = [43, 48, 56, 53, 245, 246]; id = [43, 48, 56, 53, 245, 246];
// if (obj.OutBranchId === 0) {
// id = [43, 48, 245, 246];
// } else {
// id = [56, 53, 245, 246];
// }
} }
this.$router.push({ this.$router.push({
name: "ChoiceAddFinancialDocuments", name: "ChoiceAddFinancialDocuments",
...@@ -1508,17 +1510,34 @@ ...@@ -1508,17 +1510,34 @@
} }
}); });
}, },
goZhiDan: function (obj, num, leadr, cur) { goDiJieZhiDan: function (obj, num, leadr, cur) {
let totailMoney = (Number(leadr.LeaderGetPriceT) + Number(cur.yiLing)).toFixed(2); let totailMoney = (Number(leadr.LeaderGetPriceT) + Number(cur.yiLing)).toFixed(2);
let leadrPlanPrice = 0; let leadrPlanPrice = 0;
if (leadr && leadr.PlanPrice) { if (leadr && leadr.PlanPrice) {
leadrPlanPrice = leadr.PlanPrice.toFixed(2); leadrPlanPrice = leadr.PlanPrice.toFixed(2);
} }
if (!num) { if (!num) {
if (totailMoney > leadrPlanPrice) if (totailMoney > leadrPlanPrice) {
// return this.$message.error("最大领款为预付合计金额的95%!"); if (!leadr.LeaderGetPriceT || leadr.LeaderGetPriceT <= 0) {
if (!leadr.LeaderGetPriceT || leadr.LeaderGetPriceT <= 0)
return this.$message.error("请输入金额!"); return this.$message.error("请输入金额!");
}
}
}
if (this.CurrencyListMoney && this.CurrencyListMoney.length > 0) {
var totalUseMoney = 0; //总领款金额
var totalUsePercentMoney = 0; //总计划领款金额
this.CurrencyListMoney.forEach(rootItem => {
if (rootItem.LeaderGetPriceArr && rootItem.LeaderGetPriceArr.length > 0) {
rootItem.LeaderGetPriceArr.forEach(sitem => {
totalUsePercentMoney = sitem.ShowTotalPrice;
totalUseMoney += Number(sitem.LeaderGetPriceT);
});
}
});
if (totalUseMoney > 0 && totalUsePercentMoney > 0 && totalUseMoney > totalUsePercentMoney) {
this.$message.error("总领款金额不能超过【" + totalUsePercentMoney + "】");
return;
}
} }
if (this.list.hotelNoSureInfo !== "") { if (this.list.hotelNoSureInfo !== "") {
this.$confirm( this.$confirm(
...@@ -1769,6 +1788,7 @@ ...@@ -1769,6 +1788,7 @@
CurrencyId: cur.CurrencyId, CurrencyId: cur.CurrencyId,
LeaderGetPrice: 0, LeaderGetPrice: 0,
LeaderGetPriceT: 0, LeaderGetPriceT: 0,
ShowTotalPrice: 0,
TCNUMS: x.TCNUMS, TCNUMS: x.TCNUMS,
TCIDS: x.TCIDS TCIDS: x.TCIDS
}; };
...@@ -1799,6 +1819,7 @@ ...@@ -1799,6 +1819,7 @@
lead.LeaderGetPriceT = Math.round(tempMoney * 100) / 100; lead.LeaderGetPriceT = Math.round(tempMoney * 100) / 100;
} }
} }
lead.ShowTotalPrice = lead.LeaderGetPriceT;
lead.PlanPrice = cur.money * this.comRate; lead.PlanPrice = cur.money * this.comRate;
}); });
}); });
......
...@@ -7,27 +7,17 @@ ...@@ -7,27 +7,17 @@
<em>{{$t('visaT.sale')}}</em> <em>{{$t('visaT.sale')}}</em>
</span> </span>
<!-- <el-select filterable v-model="msg.CreateBy"> --> <!-- <el-select filterable v-model="msg.CreateBy"> -->
<el-select <el-select v-model="msg.CreateBy" class="w150" filterable remote reserve-keyword placeholder="请输入关键词"
v-model="msg.CreateBy" class="w150" :remote-method="GetClientAccountListByKeyWord">
filterable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="GetClientAccountListByKeyWord"
>
<el-option :label="$t('pub.unlimitedSel')" value="-1"></el-option> <el-option :label="$t('pub.unlimitedSel')" value="-1"></el-option>
<el-option <el-option v-for="item in employeeList" :label="item.name" :value="item.empId" :key="item.empId">
v-for="item in employeeList" <div>
:label="item.name" <span>{{`${item.name}`}}</span>
:value="item.empId" <span style="margin-left: 15px;">
:key="item.empId" <el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
> <div> </span>
<span>{{`${item.name}`}}</span> </div>
<span style="margin-left: 15px;"> </el-option>
<el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
</span>
</div>
</el-option>
</el-select> </el-select>
</li> </li>
...@@ -42,100 +32,74 @@ ...@@ -42,100 +32,74 @@
<span> <span>
<em>{{$t('salesModule.Belongbrand')}}</em> <em>{{$t('salesModule.Belongbrand')}}</em>
</span> </span>
<el-select filterable class='multiple_input' v-model='msg.Brand' :placeholder="$t('pub.pleaseSel')"> <el-select filterable class='multiple_input' v-model='msg.Brand' :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="-1"></el-option>
<el-option v-for='item in CustomerBrandList' <el-option v-for='item in CustomerBrandList' :label='item.name' :value='item.id' :key='item.id'>
:label='item.name' </el-option>
:value='item.id' </el-select>
:key='item.id'>
</el-option>
</el-select>
</li> </li>
<li> <li>
<span> <span>
<em>关联状态</em> <em>关联状态</em>
</span> </span>
<el-select filterable class='multiple_input' v-model='msg.OperationStatus ' :placeholder="$t('pub.pleaseSel')"> <el-select filterable class='multiple_input' v-model='msg.OperationStatus '
<el-option :label="$t('pub.unlimitedSel')" value=""></el-option> :placeholder="$t('pub.pleaseSel')">
<el-option label="正常" :value="1"></el-option> <el-option :label="$t('pub.unlimitedSel')" value=""></el-option>
<el-option label="释放" :value="2"></el-option> <el-option label="正常" :value="1"></el-option>
</el-select> <el-option label="释放" :value="2"></el-option>
</el-select>
</li> </li>
<li> <li>
<span> <span>
<em>客户状态</em> <em>客户状态</em>
</span> </span>
<el-select filterable class='multiple_input' v-model='msg.CustomerStatus' :placeholder="$t('pub.pleaseSel')"> <el-select filterable class='multiple_input' v-model='msg.CustomerStatus' :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" value=""></el-option> <el-option :label="$t('pub.unlimitedSel')" value=""></el-option>
<el-option label="未审核" :value="1"></el-option> <el-option label="未审核" :value="1"></el-option>
<el-option label="已审核" :value="2"></el-option> <el-option label="已审核" :value="2"></el-option>
<el-option label="已拒绝" :value="3"></el-option> <el-option label="已拒绝" :value="3"></el-option>
<el-option label="黑名单" :value="4"></el-option> <el-option label="黑名单" :value="4"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<span> <span>
<em>是否异常</em> <em>是否异常</em>
</span> </span>
<el-select filterable class='multiple_input' v-model='msg.ExceptionCount ' :placeholder="$t('pub.pleaseSel')"> <el-select filterable class='multiple_input' v-model='msg.ExceptionCount '
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> :placeholder="$t('pub.pleaseSel')">
<el-option label="是" :value="1"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option label="否" :value="2"></el-option> <el-option label="是" :value="1"></el-option>
</el-select> <el-option label="否" :value="2"></el-option>
</el-select>
</li> </li>
<li> <li>
<span class="fl mt10"> <span class="fl mt10">
<em>{{$t('admin.admin_Department')}}</em> <em>{{$t('admin.admin_Department')}}</em>
</span> </span>
<treeselect <treeselect class="w200 fl" :options="departmentList" @select="getEmployeeList" v-model="DepartmentId"
class="w200 fl" :placeholder="$t('pub.unlimitedSel')" :normalizer="normalizer" />
:options="departmentList"
@select="getEmployeeList"
v-model="DepartmentId"
:placeholder="$t('pub.unlimitedSel')"
:normalizer="normalizer"
/>
</li> </li>
<li style="float:right;padding-top:10px;color:#111111">{{$t('salesModule.JYETJ')}}{{datainfo.sumMoney}}</li> <li style="float:right;padding-top:10px;color:#111111">{{$t('salesModule.JYETJ')}}{{datainfo.sumMoney}}</li>
<li> <li>
<input <input type="button" class="hollowFixedBtn" :value="$t('ground.kehuditu')" @click="getMap()">
type="button" <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()">
class="hollowFixedBtn" <el-popover width="280" v-model="layerShow" popper-class="pd20" trigger="click" @show="employeeMsg.KeyWord=''"
:value="$t('ground.kehuditu')" @hide="employeeMsg.KeyWord=''">
@click="getMap()"
>
<input
type="button"
class="hollowFixedBtn"
:value="$t('pub.searchBtn')"
@click="resetPageIndex(),getList()"
>
<el-popover width="280" v-model="layerShow" popper-class="pd20" trigger="click"
@show="employeeMsg.KeyWord=''" @hide="employeeMsg.KeyWord=''">
<div> <div>
<p class="fz12 fbold mt10 color333">{{$t('fnc.zhuanjiao')}}</p> <p class="fz12 fbold mt10 color333">{{$t('fnc.zhuanjiao')}}</p>
<p class="fz12 mt30 color666"> <p class="fz12 mt30 color666">
<span>{{$t('salesModule.Recipient')}}</span>&nbsp; <span>{{$t('salesModule.Recipient')}}</span>&nbsp;
<el-select <el-select v-model="RecipientMsg.NewEmployeeId" class="w180" filterable remote reserve-keyword
v-model="RecipientMsg.NewEmployeeId" class="w180" placeholder="请输入关键词" :remote-method="GetClientAccountListByKeyWord1">
filterable <el-option v-for="item in employeeList1" :label="item.name" :value="item.empId" :key="item.empId">
remote <div>
reserve-keyword <span>{{`${item.name}`}}</span>
placeholder="请输入关键词" <span style="margin-left: 15px;">
:remote-method="GetClientAccountListByKeyWord1" <el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
> </span>
<el-option </div>
v-for="item in employeeList1" </el-option>
:label="item.name"
:value="item.empId"
:key="item.empId"
><div>
<span>{{`${item.name}`}}</span>
<span style="margin-left: 15px;">
<el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
</span>
</div></el-option>
</el-select> </el-select>
</p> </p>
<p class="fz12 mt30 color666"> <p class="fz12 mt30 color666">
...@@ -146,26 +110,16 @@ ...@@ -146,26 +110,16 @@
<input type="button" @click="save()" class="normalBtn mt30" :value="$t('salesModule.MassTransfer')"> <input type="button" @click="save()" class="normalBtn mt30" :value="$t('salesModule.MassTransfer')">
</p> </p>
</div> </div>
<input <input slot="reference" type="button" class="normalBtn" :value="$t('salesModule.MassTransfer')"
slot="reference" @click="RecipientMsg.NewEmployeeId='',RecipientMsg.Remarks=''">
type="button"
class="normalBtn"
:value="$t('salesModule.MassTransfer')"
@click="RecipientMsg.NewEmployeeId='',RecipientMsg.Remarks=''"
>
</el-popover> </el-popover>
</li> </li>
</ul> </ul>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="_customerTransferTable" :class="addShow==true?'_edHeight':''"> <div class="_customerTransferTable" :class="addShow==true?'_edHeight':''">
<table <table class="customerTransferTable customerTransferTable2 mt20" border="0" cellspacing="0" cellpadding="0"
class="customerTransferTable customerTransferTable2 mt20" v-loading="loading">
border="0"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr> <tr>
<th width="14%">{{$t('salesModule.storeName')}} <th width="14%">{{$t('salesModule.storeName')}}
<!--<label><input type="checkbox" v-model="isCkedAll" @click='checkedAll()' style="vertical-align: middle;"/>门店名称</label>--> <!--<label><input type="checkbox" v-model="isCkedAll" @click='checkedAll()' style="vertical-align: middle;"/>门店名称</label>-->
...@@ -176,25 +130,27 @@ ...@@ -176,25 +130,27 @@
<th width="7%">{{$t('salesModule.belongUnion')}}</th> <th width="7%">{{$t('salesModule.belongUnion')}}</th>
<th width="8%">{{$t('salesModule.SuoSales')}}</th> <th width="8%">{{$t('salesModule.SuoSales')}}</th>
<th width="8%">{{$t('salesModule.CustomerStatus')}}</th> <th width="8%">{{$t('salesModule.CustomerStatus')}}</th>
<th width="5%" class="cursorpointer" @click="changeSort(1, 'TradeMoney')"> <th width="5%" class="cursorpointer" @click="changeSort(1, 'TradeMoney')">
<div class="sort-th"> <div class="sort-th">
<div> <div>
{{$t('fnc.jiaoyie')}} {{$t('fnc.jiaoyie')}}
</div> </div>
<div class="width15 "> <div class="width15 ">
<p class=" _bold el-icon-caret-top sort-icon-top" :class="{sortActive: msg.jySort === 'asc'}" ></p> <p class=" _bold el-icon-caret-top sort-icon-top" :class="{sortActive: msg.jySort === 'asc'}"></p>
<p class=" _bold el-icon-caret-bottom sort-icon-bottom" :class="{sortActive: msg.jySort === 'desc'}" ></p> <p class=" _bold el-icon-caret-bottom sort-icon-bottom" :class="{sortActive: msg.jySort === 'desc'}">
</p>
</div> </div>
</div> </div>
</th> </th>
<th width="5%" class="cursorpointer" @click="changeSort(2, 'TotalGuestNum')"> <th width="5%" class="cursorpointer" @click="changeSort(2, 'TotalGuestNum')">
<div class="sort-th"> <div class="sort-th">
<div> <div>
{{$t('fnc.retoushu')}} {{$t('fnc.retoushu')}}
</div> </div>
<div class="width15 cursorpointer"> <div class="width15 cursorpointer">
<p class=" _bold el-icon-caret-top sort-icon-top" :class="{sortActive: msg.rtsSort === 'asc'}"></p> <p class=" _bold el-icon-caret-top sort-icon-top" :class="{sortActive: msg.rtsSort === 'asc'}"></p>
<p class=" _bold el-icon-caret-bottom sort-icon-bottom" :class="{sortActive: msg.rtsSort === 'desc'}"></p> <p class=" _bold el-icon-caret-bottom sort-icon-bottom" :class="{sortActive: msg.rtsSort === 'desc'}">
</p>
</div> </div>
</div> </div>
</th> </th>
...@@ -209,15 +165,10 @@ ...@@ -209,15 +165,10 @@
<tr v-for="(item,index) in list"> <tr v-for="(item,index) in list">
<td> <td>
<label> <label>
<input <input :disabled="item.disabled" type="checkbox" :value="item.CustomerId" v-model="customerList"
:disabled="item.disabled" @change="ckeckedOne" style="vertical-align: middle;">
type="checkbox" {{item.CustomerName}}<i class="iconfont icon-shimingrenzheng"
:value="item.CustomerId" :class="{'_class_b': item.RealNameAuthentication===1}"></i>
v-model="customerList"
@change="ckeckedOne"
style="vertical-align: middle;"
>
{{item.CustomerName}}<i class="iconfont icon-shimingrenzheng" :class="{'_class_b': item.RealNameAuthentication===1}"></i>
</label> </label>
<el-popover width="280" popper-class="pd20" trigger="click"> <el-popover width="280" popper-class="pd20" trigger="click">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
...@@ -248,7 +199,8 @@ ...@@ -248,7 +199,8 @@
<td>{{item.TotalGuestNum}}</td> <td>{{item.TotalGuestNum}}</td>
<td>{{item.CL_Balance}}</td> <td>{{item.CL_Balance}}</td>
<td> <td>
<span style="cursor: pointer;text-decoration: underline;" @click.stop="goUrC('CouponsList',item.CustomerAccountId)"> <span style="cursor: pointer;text-decoration: underline;"
@click.stop="goUrC('CouponsList',item.CustomerAccountId)">
{{item.CouponNum}} {{item.CouponNum}}
</span> </span>
</td> </td>
...@@ -258,8 +210,8 @@ ...@@ -258,8 +210,8 @@
<td> <td>
<el-button-group> <el-button-group>
<el-tooltip effect="dark" :content="$t('fnc.zhuanjiao')" placement="top-start"> <el-tooltip effect="dark" :content="$t('fnc.zhuanjiao')" placement="top-start">
<el-popover width="280" popper-class="pd20" trigger="click" <el-popover width="280" popper-class="pd20" trigger="click" @show="employeeMsg.KeyWord=''"
@show="employeeMsg.KeyWord=''" @hide="employeeMsg.KeyWord=''"> @hide="employeeMsg.KeyWord=''">
<div> <div>
<p class="fz12 fbold mt10 color333">{{$t('fnc.zhuanjiao')}}</p> <p class="fz12 fbold mt10 color333">{{$t('fnc.zhuanjiao')}}</p>
<p class="fz12 mt30 color666"> <p class="fz12 mt30 color666">
...@@ -270,25 +222,17 @@ ...@@ -270,25 +222,17 @@
v-model="RecipientMsg.NewEmployeeId" v-model="RecipientMsg.NewEmployeeId"
:placeholder="$t('pub.pleaseSel')" :placeholder="$t('pub.pleaseSel')"
> --> > -->
<el-select <el-select v-model="RecipientMsg.NewEmployeeId" class="w150" filterable remote reserve-keyword
v-model="RecipientMsg.NewEmployeeId" class="w150" placeholder="请输入关键词" :remote-method="GetClientAccountListByKeyWord1">
filterable <el-option v-for="item in employeeList1" :label="item.name" :value="item.empId"
remote :key="item.empId">
reserve-keyword <div>
placeholder="请输入关键词" <span>{{`${item.name}`}}</span>
:remote-method="GetClientAccountListByKeyWord1" <span style="margin-left: 15px;">
> <el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
<el-option </span>
v-for="item in employeeList1" </div>
:label="item.name" </el-option>
:value="item.empId"
:key="item.empId"
><div>
<span>{{`${item.name}`}}</span>
<span style="margin-left: 15px;">
<el-tag size="mini" v-if="item.isLeave==1">离职</el-tag>
</span>
</div></el-option>
</el-select> </el-select>
</p> </p>
<p class="fz12 mt30 color666"> <p class="fz12 mt30 color666">
...@@ -299,143 +243,67 @@ ...@@ -299,143 +243,67 @@
<input type="button" class="normalBtn mt30" @click="save" :value="$t('fnc.zhuanjiao')"> <input type="button" class="normalBtn mt30" @click="save" :value="$t('fnc.zhuanjiao')">
</p> </p>
</div> </div>
<el-button slot="reference" @click="singeleCked(item)" type="success" class="iconfont icon-zhuanjiao1 fist-bottom"></el-button> <el-button slot="reference" @click="singeleCked(item)" type="success"
class="iconfont icon-zhuanjiao1 fist-bottom"></el-button>
</el-popover> </el-popover>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
class="item" <el-button v-if="bossID===1 || bossID===5" type="primary" class icon="el-icon-edit" circle
effect="dark" @click="updateData(item)"></el-button>
:content="$t('system.table_edit')" </el-tooltip>
placement="top-start" <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
> <el-button v-if="bossID===1 || bossID===5" type="danger" class icon="el-icon-delete" circle
<el-button @click="deletelist(item)"></el-button>
v-if="bossID===1 || bossID===5" </el-tooltip>
type="primary"
class
icon="el-icon-edit"
circle
@click="updateData(item)"
></el-button>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="$t('system.table_delete')"
placement="top-start"
>
<el-button
v-if="bossID===1 || bossID===5"
type="danger"
class
icon="el-icon-delete"
circle
@click="deletelist(item)"
></el-button>
</el-tooltip>
<el-tooltip <el-tooltip class="item" effect="dark" :content="$t('salesModule.BlackList')" placement="top-start">
class="item" <el-button v-if="item.CustomerStatus == 2" type="warning" class icon="iconfont icon-jiaruheimingdan"
effect="dark" circle @click="getBlacklist(item)">
:content="$t('salesModule.BlackList')" </el-button>
placement="top-start" </el-tooltip>
>
<el-button
v-if="item.CustomerStatus == 2"
type="warning"
class
icon="iconfont icon-jiaruheimingdan"
circle
@click="getBlacklist(item)"
>
</el-button>
</el-tooltip>
<el-tooltip <el-tooltip class="item" effect="dark" :content="$t('salesModule.RemoveBlackList')" placement="top-start">
class="item" <el-button v-if="item.CustomerStatus == 4" type="info" class icon="iconfont icon-yichuheimingdan" circle
effect="dark" @click="getBlacklist(item)">
:content="$t('salesModule.RemoveBlackList')" </el-button>
placement="top-start" </el-tooltip>
> <el-tooltip class="item" effect="dark" :content="$t('fnc.xiangqing')" placement="top-start">
<el-button <el-button @click="getUrl(item)" style="padding: 5px;" type="success" icon="iconfont icon-nav-xiaoshou">
v-if="item.CustomerStatus == 4" </el-button>
type="info" </el-tooltip>
class </el-button-group>
icon="iconfont icon-yichuheimingdan"
circle
@click="getBlacklist(item)"
>
</el-button>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="$t('fnc.xiangqing')"
placement="top-start"
>
<el-button @click="getUrl(item)" style="padding: 5px;" type="success" icon="iconfont icon-nav-xiaoshou" ></el-button>
</el-tooltip>
</el-button-group>
</td> </td>
</tr> </tr>
</table> </table>
<el-pagination <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
background layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination>
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
></el-pagination>
</div> </div>
<div class="_mc_edit _scrollbar" :class="addShow==true?'edHeightOne':''"> <div class="_mc_edit _scrollbar" :class="addShow==true?'edHeightOne':''">
<p class="_tit"> <p class="_tit">
{{$t('salesModule.addCustomer')}} {{$t('salesModule.addCustomer')}}
<span class="fr"> <span class="fr">
<button class="hollowFixedBtn" type="button" @click="cancelEdit()">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" type="button" @click="cancelEdit()">{{$t('pub.cancelBtn')}}</button>
<button <button type="button" class="normalBtn" v-if="allowAdd" @click="saveVisa()">{{$t('pub.saveBtn')}}</button>
type="button"
class="normalBtn"
v-if="allowAdd"
@click="saveVisa()"
>{{$t('pub.saveBtn')}}</button>
</span> </span>
</p> </p>
<el-form <el-form class="_info_box clearfix" :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
class="_info_box clearfix"
:model="addMsg"
:rules="rules"
ref="addMsg"
label-width="120px"
>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('restaurant.res_ContactNumber')" prop="ContactNumber"> <el-form-item :label="$t('restaurant.res_ContactNumber')" prop="ContactNumber">
<el-input <el-input :disabled="isOldPerson" v-model="addMsg.ContactNumber"
:disabled="isOldPerson" @input="searchHistory(addMsg.ContactNumber)" :placeholder="$t('pub.pleaseImport')"></el-input>
v-model="addMsg.ContactNumber"
@input="searchHistory(addMsg.ContactNumber)"
:placeholder="$t('pub.pleaseImport')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.storeName')" prop="CustomerName"> <el-form-item :label="$t('salesModule.storeName')" prop="CustomerName">
<el-input <el-input :disabled="isOldPerson" v-model="addMsg.CustomerName" :placeholder="$t('pub.pleaseImport')"
:disabled="isOldPerson" maxlength="20"></el-input>
v-model="addMsg.CustomerName"
:placeholder="$t('pub.pleaseImport')"
maxlength="20"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('hotel.suplier_contact')" prop="Contact"> <el-form-item :label="$t('hotel.suplier_contact')" prop="Contact">
<el-input <el-input :disabled="isOldPerson" v-model="addMsg.Contact" :placeholder="$t('pub.pleaseImport')"
:disabled="isOldPerson" maxlength="20"></el-input>
v-model="addMsg.Contact"
:placeholder="$t('pub.pleaseImport')"
maxlength="20"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"></el-col> <el-col :span="6"></el-col>
...@@ -444,28 +312,13 @@ ...@@ -444,28 +312,13 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('pub.area')"> <el-form-item :label="$t('pub.area')">
<el-select filterable v-model="addMsg.Province" @change="getCity"> <el-select filterable v-model="addMsg.Province" @change="getCity">
<el-option <el-option v-for="item in provinceList" :label="item.Name" :value="item.ID" :key="item.ID"></el-option>
v-for="item in provinceList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
></el-option>
</el-select> </el-select>
<el-select filterable v-model="addMsg.City" @change="getRegion"> <el-select filterable v-model="addMsg.City" @change="getRegion">
<el-option <el-option v-for="item in cityList" :label="item.Name" :value="item.ID" :key="item.ID"></el-option>
v-for="item in cityList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
></el-option>
</el-select> </el-select>
<el-select filterable v-model="addMsg.District"> <el-select filterable v-model="addMsg.District">
<el-option <el-option v-for="item in regionList" :label="item.Name" :value="item.ID" :key="item.ID"></el-option>
v-for="item in regionList"
:label="item.Name"
:value="item.ID"
:key="item.ID"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -503,11 +356,7 @@ ...@@ -503,11 +356,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.CustomerSource')" prop="CustomerSourceType"> <el-form-item :label="$t('salesModule.CustomerSource')" prop="CustomerSourceType">
<el-select <el-select filterable v-model="addMsg.CustomerSourceType" :placeholder="$t('pub.pleaseSel')">
filterable
v-model="addMsg.CustomerSourceType"
:placeholder="$t('pub.pleaseSel')"
>
<el-option v-for="item in khly" :label="item.Name" :value="item.ID" :key="item.ID"></el-option> <el-option v-for="item in khly" :label="item.Name" :value="item.ID" :key="item.ID"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -528,13 +377,8 @@ ...@@ -528,13 +377,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.BusinessPhoto')"> <el-form-item :label="$t('salesModule.BusinessPhoto')">
<el-upload <el-upload class="avatar-uploader" action :http-request="uploadImg"
class="avatar-uploader" accept="image/jpeg, image/gif, image/png, image/bmp" :show-file-list="false">
action
:http-request="uploadImg"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false"
>
<img v-if="BusinessCardPhotos" :src="BusinessCardPhotos" class="avatar"> <img v-if="BusinessCardPhotos" :src="BusinessCardPhotos" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -542,13 +386,8 @@ ...@@ -542,13 +386,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.doorPhoto')"> <el-form-item :label="$t('salesModule.doorPhoto')">
<el-upload <el-upload class="avatar-uploader" action :http-request="uploadImg1"
class="avatar-uploader" accept="image/jpeg, image/gif, image/png, image/bmp" :show-file-list="false">
action
:http-request="uploadImg1"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false"
>
<img v-if="HousePhotos" :src="HousePhotos" class="avatar"> <img v-if="HousePhotos" :src="HousePhotos" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -556,13 +395,8 @@ ...@@ -556,13 +395,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('salesModule.businessPhoto')"> <el-form-item :label="$t('salesModule.businessPhoto')">
<el-upload <el-upload class="avatar-uploader" action :http-request="uploadImg2"
class="avatar-uploader" accept="image/jpeg, image/gif, image/png, image/bmp" :show-file-list="false">
action
:http-request="uploadImg2"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false"
>
<img v-if="Images" :src="Images" class="avatar"> <img v-if="Images" :src="Images" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -576,978 +410,1067 @@ ...@@ -576,978 +410,1067 @@
</template> </template>
<script> <script>
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
components: { Treeselect }, components: {
data() { Treeselect
return { },
normalizer(node) { data() {
return { return {
id: node.DepartmentId, normalizer(node) {
label: node.DepartmentName, return {
children: node.ChildList id: node.DepartmentId,
}; label: node.DepartmentName,
}, children: node.ChildList
CustomerException: [], };
datainfo:{}, },
CustomerBrandList:[], CustomerException: [],
DepartmentId: null, datainfo: {},
isSelLayer: false, CustomerBrandList: [],
layerShow: false, DepartmentId: null,
msg: { isSelLayer: false,
pageIndex: 1, layerShow: false,
pageSize: 15, msg: {
CustomerName: "", pageIndex: 1,
CreateBy: "-1", pageSize: 15,
DepartmentId: "-1", CustomerName: "",
Brand:-1, CreateBy: "-1",
allDepartment:0, DepartmentId: "-1",
CustomerStatus:'', Brand: -1,
OperationStatus:'', allDepartment: 0,
jySort: 'desc', CustomerStatus: '',
rtsSort: '', OperationStatus: '',
orderBy: 'TradeMoney desc', jySort: 'desc',
ExceptionCount: 0, rtsSort: '',
}, orderBy: 'TradeMoney desc',
RecipientMsg: { ExceptionCount: 0,
CustomerIdArr: [], },
NewEmployeeId: "", RecipientMsg: {
Remarks: "" CustomerIdArr: [],
}, NewEmployeeId: "",
departmentMsg: { Remarks: ""
RB_Group_Id: "0", },
RB_Branch_Id: "0", departmentMsg: {
Status: "0", RB_Group_Id: "0",
ParentId: "-1", RB_Branch_Id: "0",
Tier: "0" Status: "0",
}, ParentId: "-1",
employeeMsg: { Tier: "0"
RB_Group_id: "0", },
RB_Branch_id: "-1", employeeMsg: {
departmentId: "0", RB_Group_id: "0",
IsLeave: "0", RB_Branch_id: "-1",
KeyWord:'', departmentId: "0",
}, IsLeave: "0",
isCkedAll: false, KeyWord: '',
addShow: false, },
customerListAll: [], isCkedAll: false,
customerList: [], addShow: false,
allLength: 0, customerListAll: [],
loading: false, customerList: [],
currentPage: 1, allLength: 0,
total: 0, loading: false,
list: [], currentPage: 1,
CreateByInfoList: [], total: 0,
RecipientInfoList: [], list: [],
departmentList: [], CreateByInfoList: [],
allowAdd: true, RecipientInfoList: [],
employeeList: [], departmentList: [],
addMsg: { allowAdd: true,
CustomerId: 0, employeeList: [],
CustomerName: "", addMsg: {
Contact: "", CustomerId: 0,
ContactNumber: "", CustomerName: "",
Address: "", Contact: "",
brandIds: [], ContactNumber: "",
remark: "", Address: "",
Duty: "", brandIds: [],
Premises: "",
CustomerId: "0",
BusinessCardPhotos: [],
HousePhotos: [],
Images: [],
CustomerSourceType: "",
CustomerSource: "",
Country: "2",
Province: "",
City: "",
District: ""
},
defaultImg:
'this.src="' + require("../../assets/img/litheader.png") + '"',
BusinessCardPhotos: "",
HousePhotos: "",
Images: "",
isOldPerson: false,
provinceList: [],
cityList: [],
regionList: [],
jycs: [], //经营场所
zw: [], //职务
khly: [],
addMsgS: {
isPreFilled: true,
customerInfo: {},
customerVisit: {
remark: "", remark: "",
expectVisitDateTime: "", Duty: "",
expectHour: 0 Premises: "",
CustomerId: "0",
BusinessCardPhotos: [],
HousePhotos: [],
Images: [],
CustomerSourceType: "",
CustomerSource: "",
Country: "2",
Province: "",
City: "",
District: ""
},
defaultImg: 'this.src="' + require("../../assets/img/litheader.png") + '"',
BusinessCardPhotos: "",
HousePhotos: "",
Images: "",
isOldPerson: false,
provinceList: [],
cityList: [],
regionList: [],
jycs: [], //经营场所
zw: [], //职务
khly: [],
addMsgS: {
isPreFilled: true,
customerInfo: {},
customerVisit: {
remark: "",
expectVisitDateTime: "",
expectHour: 0
}
},
bossID: "",
rules: {
Contact: [{
required: true,
message: "请输入联系人",
trigger: "blur"
}],
CustomerName: [{
required: true,
message: "请输入客户名",
trigger: "blur"
}],
ContactNumber: [{
required: true,
message: "请输入联系电话",
trigger: "blur"
},
{
pattern: this.$commonUtils.Regex.el_ISphone,
message: "请输入正确的电话"
}
],
brandIds: [{
required: true,
message: "请选择所属品牌",
trigger: "change"
}],
Duty: [{
required: true,
message: "请选择职务",
trigger: "change"
}],
remark: [{
required: false,
message: "请选择职务",
trigger: "change"
}],
Premises: [{
required: true,
message: "请选择经营场所",
trigger: "change"
}],
CustomerSourceType: [{
required: true,
message: "请选择经客户来源",
trigger: "change"
}],
CustomerName: [{
required: true,
message: "请输入客户名",
trigger: "blur"
}],
Address: [{
required: true,
message: "请输入地址",
trigger: "blur"
}]
},
employeeList1: [],
employeeList2: [],
HightUnitPrice: '2',
departState: false,
};
},
methods: {
changeSort(type, name) {
if (type == 1) {
this.msg.jySort = this.msg.jySort === '' ? 'desc' : this.msg.jySort === 'desc' ? 'asc' : ''
this.msg.rtsSort = ''
this.msg.orderBy = this.msg.jySort == '' ? '' : name + ' ' + this.msg.jySort
} else {
this.msg.jySort = ''
this.msg.rtsSort = this.msg.rtsSort = this.msg.rtsSort === '' ? 'desc' : this.msg.rtsSort === 'desc' ? 'asc' :
''
this.msg.orderBy = this.msg.rtsSort == '' ? '' : name + ' ' + this.msg.rtsSort
} }
this.getList();
}, },
bossID: "", getCustomerBrandList() { // 获取品牌
rules: { this.apipost('app_get_customer_brand', {}, res => {
Contact: [{ required: true, message: "请输入联系人", trigger: "blur" }], if (res.data.resultCode == 1) {
CustomerName: [ this.CustomerBrandList = res.data.data;
{ required: true, message: "请输入客户名", trigger: "blur" } } else {
], this.$message.error(res.data.message)
ContactNumber: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_ISphone,
message: "请输入正确的电话"
} }
], }, err => {})
brandIds: [
{ required: true, message: "请选择所属品牌", trigger: "change" }
],
Duty: [{ required: true, message: "请选择职务", trigger: "change" }],
remark: [{ required: false, message: "请选择职务", trigger: "change" }],
Premises: [
{ required: true, message: "请选择经营场所", trigger: "change" }
],
CustomerSourceType: [
{ required: true, message: "请选择经客户来源", trigger: "change" }
],
CustomerName: [
{ required: true, message: "请输入客户名", trigger: "blur" }
],
Address: [{ required: true, message: "请输入地址", trigger: "blur" }]
},
employeeList1: [],
employeeList2: [],
HightUnitPrice:'2',
departState:false,
};
},
methods: {
changeSort(type, name){
if (type == 1) {
this.msg.jySort = this.msg.jySort === '' ? 'desc' : this.msg.jySort === 'desc' ? 'asc' : ''
this.msg.rtsSort = ''
this.msg.orderBy = this.msg.jySort == '' ? '' : name + ' '+ this.msg.jySort
} else {
this.msg.jySort = ''
this.msg.rtsSort = this.msg.rtsSort = this.msg.rtsSort === '' ? 'desc' : this.msg.rtsSort === 'desc' ? 'asc' : ''
this.msg.orderBy = this.msg.rtsSort == '' ? '' : name + ' '+ this.msg.rtsSort
}
this.getList();
},
getCustomerBrandList(){ // 获取品牌
this.apipost('app_get_customer_brand',{},res=>{
if(res.data.resultCode==1){
this.CustomerBrandList = res.data.data;
}else{
this.$message.error(res.data.message)
}
},err=>{})
}, },
goUrC(path, customerId) { goUrC(path, customerId) {
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
"customerId": customerId, "customerId": customerId,
blank: 'y' blank: 'y'
}
})
},
getUrl(item) {
this.$router.push({
name: "CustomerAnalysis",
query: {
"customerId": item.CustomerIdS,
blank: 'y'
}
})
},
getMap() {
this.$router.push({
name: "customerMap",
query: {
departState: this.departState,
blank: 'y'
} }
})
},
updateData: function (obj) {
this.apipost(
"app_customer_GetLeaderCustomerInfo", {
customerId: obj.CustomerIdS
},
res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
let Address = data.Address.split(",");
this.addMsg = data;
this.addMsg.Address = Address[1];
this.$message.success(res.data.message);
this.addShow = true;
this.getCity1();
this.getRegion1();
} else {
this.$message.success(res.data.message);
}
},
null
);
},
deletelist: function (obj) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}) })
}, .then(() => {
getUrl(item){ this.apipost(
this.$router.push({ name:"CustomerAnalysis",query:{"customerId":item.CustomerIdS,blank: 'y'} }) "app_customer_LeaderRemove", {
}, ID: obj.CustomerIdS,
getMap(){ saleID: obj.EmployeeId
this.$router.push({ name:"customerMap",query:{departState: this.departState, blank: 'y'} }) },
}, res => {
updateData: function(obj) { if (res.data.resultCode == 1) {
this.apipost( this.$message.success("删除成功!");
"app_customer_GetLeaderCustomerInfo", this.getList();
{ customerId: obj.CustomerIdS }, }
res => { },
err => {}
);
})
.catch(() => {
this.$message.info("已取消删除!");
});
},
yichangde(obj) {
this.apipost("app_get_GetCustomerException", {
customerId: obj.CustomerIdS
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; this.CustomerException = res.data.data
let Address = data.Address.split(",");
this.addMsg = data;
this.addMsg.Address = Address[1];
this.$message.success(res.data.message);
this.addShow = true;
this.getCity1();
this.getRegion1();
} else {
this.$message.success(res.data.message);
} }
},
null
);
},
deletelist: function(obj) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"app_customer_LeaderRemove",
{ ID: obj.CustomerIdS, saleID: obj.EmployeeId },
res => {
if (res.data.resultCode == 1) {
this.$message.success("删除成功!");
this.getList();
}
},
err => {}
);
}) })
.catch(() => { },
this.$message.info("已取消删除!"); saveVisa() {
}); // 保存
}, if (this.addMsg.District == "") {
yichangde(obj){ this.addMsg.District = 0;
this.apipost("app_get_GetCustomerException", {customerId: obj.CustomerIdS},res => {
if (res.data.resultCode == 1) {
this.CustomerException = res.data.data
} }
}) this.addMsgS.customerInfo = this.addMsg;
}, if (this.BusinessCardPhotos) {
saveVisa() { this.addMsg.BusinessCardPhotos = [];
// 保存 this.addMsg.BusinessCardPhotos.push(this.BusinessCardPhotos);
if (this.addMsg.District == "") {
this.addMsg.District = 0;
}
this.addMsgS.customerInfo = this.addMsg;
if (this.BusinessCardPhotos) {
this.addMsg.BusinessCardPhotos = [];
this.addMsg.BusinessCardPhotos.push(this.BusinessCardPhotos);
}
if (this.HousePhotos) {
this.addMsg.HousePhotos = [];
this.addMsg.HousePhotos.push(this.HousePhotos);
}
if (this.Images) {
this.addMsg.Images = [];
this.addMsg.Images.push(this.Images);
}
let sheng = "";
let shi = "";
let qu = "";
if (this.addMsg.District == "") {
this.addMsg.District = 0;
}
if (this.addMsg.City == "") {
this.addMsg.City = 0;
}
this.provinceList.forEach(item => {
if (this.addMsg.Province == item.ID) {
sheng = item.Name;
} }
}); if (this.HousePhotos) {
this.cityList.forEach(item => { this.addMsg.HousePhotos = [];
if (this.addMsg.City == item.ID) { this.addMsg.HousePhotos.push(this.HousePhotos);
shi = item.Name;
} }
}); if (this.Images) {
this.regionList.forEach(item => { this.addMsg.Images = [];
if (this.addMsg.District == item.ID) { this.addMsg.Images.push(this.Images);
qu = item.Name;
} }
}); let sheng = "";
let AreaName = sheng + shi + qu; let shi = "";
this.addMsg.address = AreaName + "," + this.addMsg.Address; let qu = "";
this.apipost( if (this.addMsg.District == "") {
"app_customer_LeaderUpdateCustomer", this.addMsg.District = 0;
this.addMsgS, }
res => { if (this.addMsg.City == "") {
if (res.data.resultCode == 1) { this.addMsg.City = 0;
this.addMsg = { }
CustomerName: "", this.provinceList.forEach(item => {
Contact: "", if (this.addMsg.Province == item.ID) {
ContactNumber: "", sheng = item.Name;
Address: "",
brandIds: [],
remark: "",
Duty: "",
Premises: "",
CustomerId: "0",
BusinessCardPhotos: [],
HousePhotos: [],
Images: [],
CustomerSourceType: "",
CustomerSource: "",
Country: "2",
Province: "",
City: "",
District: ""
};
this.addMsgS.customerVisit.expectVisitDateTime = "";
this.$message.success(res.data.message);
this.addShow = false;
this.getList();
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
uploadImg(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.BusinessCardPhotos = this.domainManager().ViittoFileUrl + x.data.FilePath;
});
},
uploadImg1(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.HousePhotos = this.domainManager().ViittoFileUrl + x.data.FilePath;
});
},
uploadImg2(file) {
//上传
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.Images =this.domainManager().ViittoFileUrl + x.data.FilePath;
});
},
getJycs() {
this.apipost(
"app_today_visit_GetCustomerPremisesEnum",
{},
res => {
if (res.data.resultCode == 1) {
this.jycs = res.data.data;
}
},
err => {}
);
},
getZw() {
this.apipost(
"app_today_visit_GetCustomerDutyEnum",
{},
res => {
if (res.data.resultCode == 1) {
this.zw = res.data.data;
}
},
err => {}
);
},
getKhly() {
this.apipost(
"app_customer_GetCustomerSourceEnum",
{},
res => {
if (res.data.resultCode == 1) {
this.khly = res.data.data;
}
},
err => {}
);
},
getProvince() {
this.apipost(
"app_customer_GetAreaChildList",
{ Id: 2, level: 1 },
res => {
if (res.data.resultCode == 1) {
this.provinceList = res.data.data;
}
},
err => {}
);
},
getCity() {
this.apipost(
"app_customer_GetAreaChildList",
{ Id: this.addMsg.Province, level: 2 },
res => {
if (res.data.resultCode == 1) {
this.cityList = res.data.data;
this.regionList = [];
this.addMsg.City = "";
this.addMsg.District = "";
}
},
err => {}
);
},
getRegion() {
this.apipost(
"app_customer_GetAreaChildList",
{ Id: this.addMsg.City, level: 3 },
res => {
if (res.data.resultCode == 1) {
this.regionList = res.data.data;
this.addMsg.District = "";
} }
}, });
err => {} this.cityList.forEach(item => {
); if (this.addMsg.City == item.ID) {
}, shi = item.Name;
getCity1() {
this.apipost(
"app_customer_GetAreaChildList",
{ Id: this.addMsg.Province, level: 2 },
res => {
if (res.data.resultCode == 1) {
this.cityList = res.data.data;
} }
}, });
err => {} this.regionList.forEach(item => {
); if (this.addMsg.District == item.ID) {
}, qu = item.Name;
getRegion1() {
this.apipost(
"app_customer_GetAreaChildList",
{ Id: this.addMsg.City, level: 3 },
res => {
if (res.data.resultCode == 1) {
this.regionList = res.data.data;
} }
}, });
err => {} let AreaName = sheng + shi + qu;
); this.addMsg.address = AreaName + "," + this.addMsg.Address;
},
searchHistory(val) {
if (val.length == 11) {
this.apipost( this.apipost(
"app_customer_GetCustomerByContactNumber", "app_customer_LeaderUpdateCustomer",
{ ContactNumber: val }, this.addMsgS,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (res.data.data.customerInfo.customerId > 0) { this.addMsg = {
this.isOldPerson = true; CustomerName: "",
let x = res.data.data.customerInfo; Contact: "",
this.addMsg = x; ContactNumber: "",
this.addMsg.Province = x.province; Address: "",
this.addMsg.customerId = x.customerId; brandIds: [],
this.getCity1(); remark: "",
this.addMsg.City = x.city; Duty: "",
this.getRegion1(); Premises: "",
this.addMsg.District = x.district; CustomerId: "0",
this.addMsg.Duty = x.duty; BusinessCardPhotos: [],
this.addMsg.Premises = x.premises; HousePhotos: [],
this.addMsg.CustomerSourceType = x.customerSourceType; Images: [],
let dictid = []; CustomerSourceType: "",
res.data.data.brandList.forEach(x => { CustomerSource: "",
dictid.push(x.dictId); Country: "2",
}); Province: "",
this.addMsg.brandIds = dictid; City: "",
District: ""
if (x.businessCardPhotos && x.businessCardPhotos.length > 0) { };
this.BusinessCardPhotos = x.businessCardPhotos[0]; this.addMsgS.customerVisit.expectVisitDateTime = "";
} this.$message.success(res.data.message);
if (x.images && x.images.length > 0) { this.addShow = false;
this.Images = x.images[0]; this.getList();
}
if (x.housePhotos && x.housePhotos.length > 0) {
this.HousePhotos = x.housePhotos[0];
}
}
this.allowAdd = true;
} else { } else {
if (res.data.message.indexOf("已注册客户信息") != -1) {
this.allowAdd = false;
}
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, },
err => {} err => {}
); );
} else { },
} uploadImg(file) {
}, //上传
valueToWord(val) { let newArr = [];
if (val == 0) return "未拜访"; newArr.push(file.file);
if (val == 1) return "已沟通"; let path = "/Upload/Temporary/";
if (val == 2) return "审核通过"; this.UploadSelfFileT(path, newArr, x => {
if (val == 3) return "审核拒绝"; this.BusinessCardPhotos = this.domainManager().ViittoFileUrl + x.data.FilePath;
},
checkedAll() {
//全选
if (this.isCkedAll == true) {
this.customerList = [];
} else {
this.customerListAll.forEach(item => {
this.customerList.push(item);
}); });
} },
}, uploadImg1(file) {
ckeckedOne() { //上传
//单选 let newArr = [];
this.employeeMsg.KeyWord = '' newArr.push(file.file);
if (this.customerList.length > 0) { let path = "/Upload/Temporary/";
let dpId = this.customerList[0].split("|")[2]; this.UploadSelfFileT(path, newArr, x => {
this.employeeMsg.departmentId = dpId; this.HousePhotos = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.isSelLayer = true;
this.getEmployee();
this.list.forEach(item => {
if (item.RB_Department_Id != dpId) {
item.disabled = true;
}
}); });
} else { },
this.isSelLayer = false; uploadImg2(file) {
this.employeeList1 = []; //上传
this.employeeList2 = []; let newArr = [];
this.list.forEach(item => { newArr.push(file.file);
item.disabled = false; let path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.Images = this.domainManager().ViittoFileUrl + x.data.FilePath;
}); });
} },
}, getJycs() {
singeleCked(obj) { this.apipost(
this.isSelLayer = true; "app_today_visit_GetCustomerPremisesEnum", {},
this.customerList = []; res => {
this.customerList.push(obj.CustomerId); if (res.data.resultCode == 1) {
this.employeeMsg.departmentId = obj.RB_Department_Id; this.jycs = res.data.data;
this.getEmployee(); }
this.ckeckedOne(); },
this.RecipientMsg.NewEmployeeId = ""; err => {}
this.RecipientMsg.Remarks = ""; );
}, },
save() { getZw() {
this.RecipientMsg.CustomerIdArr = []; this.apipost(
this.customerList.forEach(item => { "app_today_visit_GetCustomerDutyEnum", {},
this.RecipientMsg.CustomerIdArr.push(item); res => {
}); if (res.data.resultCode == 1) {
if (this.RecipientMsg.NewEmployeeId == "") { this.zw = res.data.data;
this.$message.error("请选择转交人"); }
return; },
} err => {}
this.apipost( );
"app_customer_SetCustomerCareOfBatch", },
this.RecipientMsg, getKhly() {
res => { this.apipost(
if (res.data.resultCode == 1) { "app_customer_GetCustomerSourceEnum", {},
this.$message.success(res.data.message); res => {
this.getList(); if (res.data.resultCode == 1) {
this.RecipientMsg.NewEmployeeId = ""; this.khly = res.data.data;
this.RecipientMsg.Remarks = ""; }
this.layerShow = false; },
this.customerList = []; err => {}
} else { );
this.$message.error(res.data.message); },
} getProvince() {
}, this.apipost(
err => {} "app_customer_GetAreaChildList", {
); Id: 2,
}, level: 1
getList() { },
this.loading = true; res => {
if(this.departState){ if (res.data.resultCode == 1) {
this.msg.allDepartment=1 this.provinceList = res.data.data;
} }
this.apipost( },
"app_customer_GetCustomerListForCareOf", err => {}
this.msg, );
res => { },
if (res.data.resultCode == 1) { getCity() {
this.loading = false; this.apipost(
this.allLength = res.data.data.pages.pageData.length; "app_customer_GetAreaChildList", {
this.customerListAll = []; Id: this.addMsg.Province,
res.data.data.pages.pageData.forEach(item => { level: 2
this.customerListAll.push(item.CustomerId); },
item.CustomerIdS = item.CustomerId; res => {
item.CustomerId = if (res.data.resultCode == 1) {
item.CustomerId + this.cityList = res.data.data;
"|" + this.regionList = [];
item.EmployeeId + this.addMsg.City = "";
"|" + this.addMsg.District = "";
item.RB_Department_Id; }
item["disabled"] = false; },
item.Address = item.Address.split(",").join(""); err => {}
}); );
this.datainfo=res.data.data; },
this.list = res.data.data.pages.pageData; getRegion() {
this.total = res.data.data.pages.count; this.apipost(
} else { "app_customer_GetAreaChildList", {
this.$message.error(res.data.message); Id: this.addMsg.City,
this.loading = false; level: 3
} },
}, res => {
err => {} if (res.data.resultCode == 1) {
); this.regionList = res.data.data;
}, this.addMsg.District = "";
getDepartment() { }
let msg={}; },
if(this.departState){ err => {}
msg={allDepartment:1}; );
this.msg.allDepartment=1 },
} getCity1() {
this.apipost( this.apipost(
"Advertising_get_GetNowDepartmentAndSubordinate",msg, "app_customer_GetAreaChildList", {
res => { Id: this.addMsg.Province,
if (res.data.resultCode == 1) { level: 2
this.departmentList = res.data.data; },
} else { res => {
this.$message.error(res.data.message); if (res.data.resultCode == 1) {
} this.cityList = res.data.data;
}, }
err => {} },
); err => {}
}, );
getEmployeeList(node, id) { },
this.isSelLayer = false; getRegion1() {
this.msg.CreateBy = "-1"; this.apipost(
this.msg.DepartmentId = this.employeeMsg.departmentId = node.DepartmentId; "app_customer_GetAreaChildList", {
this.getEmployee(); Id: this.addMsg.City,
}, level: 3
getEmployee() { },
this.employeeMsg.departmentId = 0; res => {
this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id; if (res.data.resultCode == 1) {
this.employeeMsg.RB_Branch_id = -1; this.regionList = res.data.data;
this.employeeList2 = []; }
this.employeeMsg.IsLeave=-1; },
if(this.employeeMsg.KeyWord==''){ err => {}
return );
} },
this.apipost( searchHistory(val) {
"app_get_company_employee", if (val.length == 11) {
this.employeeMsg, this.apipost(
res => { "app_customer_GetCustomerByContactNumber", {
if (res.data.resultCode == 1) { ContactNumber: val
if (!this.isSelLayer) { },
this.employeeList = res.data.data; res => {
this.employeeList.forEach(item => { if (res.data.resultCode == 1) {
if(item.isLeave==0){ if (res.data.data.customerInfo.customerId > 0) {
this.employeeList2.push(item); this.isOldPerson = true;
let x = res.data.data.customerInfo;
this.addMsg = x;
this.addMsg.Province = x.province;
this.addMsg.customerId = x.customerId;
this.getCity1();
this.addMsg.City = x.city;
this.getRegion1();
this.addMsg.District = x.district;
this.addMsg.Duty = x.duty;
this.addMsg.Premises = x.premises;
this.addMsg.CustomerSourceType = x.customerSourceType;
let dictid = [];
res.data.data.brandList.forEach(x => {
dictid.push(x.dictId);
});
this.addMsg.brandIds = dictid;
if (x.businessCardPhotos && x.businessCardPhotos.length > 0) {
this.BusinessCardPhotos = x.businessCardPhotos[0];
}
if (x.images && x.images.length > 0) {
this.Images = x.images[0];
}
if (x.housePhotos && x.housePhotos.length > 0) {
this.HousePhotos = x.housePhotos[0];
}
} }
}); this.allowAdd = true;
} else { } else {
this.employeeList1 = res.data.data; if (res.data.message.indexOf("已注册客户信息") != -1) {
this.employeeList1.forEach(item => { this.allowAdd = false;
if(item.isLeave==0){
this.employeeList2.push(item);
} }
this.$message.error(res.data.message);
}
},
err => {}
);
} else {}
},
valueToWord(val) {
if (val == 0) return "未拜访";
if (val == 1) return "已沟通";
if (val == 2) return "审核通过";
if (val == 3) return "审核拒绝";
},
checkedAll() {
//全选
if (this.isCkedAll == true) {
this.customerList = [];
} else {
this.customerListAll.forEach(item => {
this.customerList.push(item);
});
}
},
ckeckedOne() {
//单选
this.employeeMsg.KeyWord = ''
if (this.customerList.length > 0) {
let dpId = this.customerList[0].split("|")[2];
this.employeeMsg.departmentId = dpId;
this.isSelLayer = true;
this.getEmployee();
this.list.forEach(item => {
if (item.RB_Department_Id != dpId) {
item.disabled = true;
}
});
} else {
this.isSelLayer = false;
this.employeeList1 = [];
this.employeeList2 = [];
this.list.forEach(item => {
item.disabled = false;
});
}
},
singeleCked(obj) {
this.isSelLayer = true;
this.customerList = [];
this.customerList.push(obj.CustomerId);
this.employeeMsg.departmentId = obj.RB_Department_Id;
this.getEmployee();
this.ckeckedOne();
this.RecipientMsg.NewEmployeeId = "";
this.RecipientMsg.Remarks = "";
},
save() {
this.RecipientMsg.CustomerIdArr = [];
this.customerList.forEach(item => {
this.RecipientMsg.CustomerIdArr.push(item);
});
if (this.RecipientMsg.NewEmployeeId == "") {
this.$message.error("请选择转交人");
return;
}
this.apipost(
"app_customer_SetCustomerCareOfBatch",
this.RecipientMsg,
res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.getList();
this.RecipientMsg.NewEmployeeId = "";
this.RecipientMsg.Remarks = "";
this.layerShow = false;
this.customerList = [];
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getList() {
this.loading = true;
if (this.departState) {
this.msg.allDepartment = 1
}
this.apipost(
"app_customer_GetCustomerListForCareOf",
this.msg,
res => {
if (res.data.resultCode == 1) {
this.loading = false;
this.allLength = res.data.data.pages.pageData.length;
this.customerListAll = [];
res.data.data.pages.pageData.forEach(item => {
this.customerListAll.push(item.CustomerId);
item.CustomerIdS = item.CustomerId;
item.CustomerId =
item.CustomerId +
"|" +
item.EmployeeId +
"|" +
item.RB_Department_Id;
item["disabled"] = false;
item.Address = item.Address.split(",").join("");
}); });
this.datainfo = res.data.data;
this.list = res.data.data.pages.pageData;
this.total = res.data.data.pages.count;
} else {
this.$message.error(res.data.message);
this.loading = false;
} }
} },
}, err => {}
err => {} );
); },
}, getDepartment() {
let msg = {};
GetClientAccountListByKeyWord(query) { if (this.departState) {
console.log("query",query) msg = {
allDepartment: 1
};
this.msg.allDepartment = 1
}
this.apipost(
"Advertising_get_GetNowDepartmentAndSubordinate", msg,
res => {
if (res.data.resultCode == 1) {
this.departmentList = res.data.data;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
getEmployeeList(node, id) {
this.isSelLayer = false;
this.msg.CreateBy = "-1";
this.msg.DepartmentId = this.employeeMsg.departmentId = node.DepartmentId;
this.getEmployee();
},
getEmployee() {
this.employeeMsg.departmentId = 0;
this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id;
this.employeeMsg.RB_Branch_id = -1;
this.employeeList2 = [];
this.employeeMsg.IsLeave = -1;
if (this.employeeMsg.KeyWord == '') {
return
}
this.apipost(
"app_get_company_employee",
this.employeeMsg,
res => {
if (res.data.resultCode == 1) {
if (!this.isSelLayer) {
this.employeeList = res.data.data;
this.employeeList.forEach(item => {
if (item.isLeave == 0) {
this.employeeList2.push(item);
}
});
} else {
this.employeeList1 = res.data.data;
this.employeeList1.forEach(item => {
if (item.isLeave == 0) {
this.employeeList2.push(item);
}
});
}
}
},
err => {}
);
},
GetClientAccountListByKeyWord(query) {
if (query !== '') { if (query !== '') {
this.employeeMsg.departmentId = 0; this.employeeMsg.departmentId = 0;
this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id; this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id;
this.employeeMsg.RB_Branch_id = -1; this.employeeMsg.RB_Branch_id = -1;
this.employeeList2 = []; this.employeeList2 = [];
this.employeeMsg.IsLeave=-1; this.employeeMsg.IsLeave = -1;
this.employeeMsg.KeyWord=query; this.employeeMsg.KeyWord = query;
this.apipost( this.apipost(
"app_get_company_employee", "app_get_company_employee",
this.employeeMsg, this.employeeMsg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.employeeList = res.data.data; this.employeeList = res.data.data;
} }
}, },
err => {} err => {}
); );
} }
}, },
GetClientAccountListByKeyWord1(query) { GetClientAccountListByKeyWord1(query) {
console.log("query",query)
if (query !== '') { if (query !== '') {
this.employeeMsg.departmentId = 0; this.employeeMsg.departmentId = 0;
this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id; this.employeeMsg.RB_Group_id = this.getLocalStorage().RB_Group_id;
this.employeeMsg.RB_Branch_id = -1; this.employeeMsg.RB_Branch_id = -1;
this.employeeMsg.IsLeave=0; this.employeeMsg.IsLeave = 0;
this.employeeMsg.KeyWord=query; this.employeeMsg.KeyWord = query;
this.apipost( this.apipost(
"app_get_company_employee", "app_get_company_employee",
this.employeeMsg, this.employeeMsg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.employeeList1 = res.data.data; this.employeeList1 = res.data.data;
} }
}, },
err => {} err => {}
); );
} }
}, },
getCreateByInfoList() { getCreateByInfoList() {
this.apipost( this.apipost(
"app_customer_GetDepartmentEmployee", "app_customer_GetDepartmentEmployee",
this.msg, this.msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CreateByInfoList = res.data.data.leaveList; this.CreateByInfoList = res.data.data.leaveList;
this.RecipientInfoList = res.data.data.noLeaveList; this.RecipientInfoList = res.data.data.noLeaveList;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}, },
err => {} err => {}
); );
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1; this.currentPage = 1;
}, },
cancelEdit() { cancelEdit() {
// 取消新增 // 取消新增
this.addShow = false; this.addShow = false;
this.addMsg = { this.addMsg = {
CustomerName: "", CustomerName: "",
Contact: "", Contact: "",
ContactNumber: "", ContactNumber: "",
Address: "", Address: "",
remark: "", remark: "",
Brand: [] Brand: []
}; };
(this.BusinessCardPhotos = ""), (this.BusinessCardPhotos = ""),
(this.HousePhotos = ""), (this.HousePhotos = ""),
(this.Images = ""), (this.Images = ""),
(this.addMsgS.customerVisit.expectVisitDateTime = ""); (this.addMsgS.customerVisit.expectVisitDateTime = "");
this.resetForm("addMsg"); this.resetForm("addMsg");
}, },
resetForm(formName) { resetForm(formName) {
// 重置表单 // 重置表单
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
},
getBlacklist(item) {
let DisabledType
let CustomerId = item.CustomerId.split('|')[0]
if (item.CustomerStatus == 2) {
DisabledType = 1
this.$confirm("是否加入黑名单?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"app_customer_DisabledCustomer", {
CustomerId: CustomerId,
DisabledType: DisabledType
},
res => {
if (res.data.resultCode == 1) {
this.$message.success("加入黑名单成功!");
this.getList();
}
},
err => {}
);
})
.catch(() => {
this.$message.info("已取消加入!");
});
} else if (item.CustomerStatus == 4) {
DisabledType = 2
this.$confirm("是否移除黑名单?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"app_customer_DisabledCustomer", {
CustomerId: CustomerId,
DisabledType: DisabledType
},
res => {
if (res.data.resultCode == 1) {
this.$message.success("移除黑名单成功!");
this.getList();
}
},
err => {}
);
})
.catch(() => {
this.$message.info("已取消移除!");
});
}
}
}, },
getBlacklist(item){
let DisabledType mounted() {
let CustomerId = item.CustomerId.split('|')[0] let userInfo = this.getLocalStorage();
if(item.CustomerStatus == 2){ let ActionMenuCode = userInfo.ActionMenuCode;
DisabledType =1 if (ActionMenuCode.indexOf('Select_AllCustomer') != -1) {
this.$confirm("是否加入黑名单?", "提示", { this.departState = true;
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"app_customer_DisabledCustomer",
{CustomerId:CustomerId,DisabledType:DisabledType},
res => {
if (res.data.resultCode == 1) {
this.$message.success("加入黑名单成功!");
this.getList();
}
},
err => {}
);
})
.catch(() => {
this.$message.info("已取消加入!");
});
}else if(item.CustomerStatus == 4){
DisabledType =2
this.$confirm("是否移除黑名单?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost(
"app_customer_DisabledCustomer",
{CustomerId:CustomerId,DisabledType:DisabledType},
res => {
if (res.data.resultCode == 1) {
this.$message.success("移除黑名单成功!");
this.getList();
}
},
err => {}
);
})
.catch(() => {
this.$message.info("已取消移除!");
});
} }
this.bossID = userInfo.EmployeeId;
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.getDepartment();
// this.getEmployee();
this.getList();
this.getCreateByInfoList();
this.getProvince();
this.getJycs();
this.getZw();
this.getKhly();
this.getCustomerBrandList();
} }
}, };
mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode=userInfo.ActionMenuCode;
if(ActionMenuCode.indexOf('Select_AllCustomer')!=-1){
this.departState=true;
}
this.bossID = userInfo.EmployeeId;
this.departmentMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.getDepartment();
// this.getEmployee();
this.getList();
this.getCreateByInfoList();
this.getProvince();
this.getJycs();
this.getZw();
this.getKhly();
this.getCustomerBrandList();
}
};
</script> </script>
<style> <style>
.customerTransferTable { .customerTransferTable {
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
box-sizing: border-box; box-sizing: border-box;
border-bottom: none; border-bottom: none;
border-right: none; border-right: none;
} }
.customerTransferTable ._class_b{
color: #257BF1 !important .customerTransferTable ._class_b {
} color: #257BF1 !important
.customerTransferTable.customerTransferTable2 tr th { }
background: #dcdcdc;
height: 30px; .customerTransferTable.customerTransferTable2 tr th {
font-size: 12px; background: #dcdcdc;
text-align: left; height: 30px;
text-indent: 0 !important; font-size: 12px;
} text-align: left;
.customerTransferTable tr { text-indent: 0 !important;
text-align: left; }
}
.customerTransferTable tr:nth-child(2n) { .customerTransferTable tr {
background: #f2f2f2; text-align: left;
} }
.customerTransferTable tr:nth-child(2n + 1) {
background: #ffffff; .customerTransferTable tr:nth-child(2n) {
} background: #f2f2f2;
.customerTransferTable tr:hover { }
background: #d0d2d9;
} .customerTransferTable tr:nth-child(2n + 1) {
.customerTransferTable tr td { background: #ffffff;
height: 40px; }
padding-left: 25px;
border-bottom: 1px solid #dcdcdc; .customerTransferTable tr:hover {
font-size: 14px; background: #d0d2d9;
color: #333; }
border-right: 1px solid #dcdcdc;
} .customerTransferTable tr td {
.pd20 { height: 40px;
padding: 12px 20px !important; padding-left: 25px;
} border-bottom: 1px solid #dcdcdc;
.el-popper[x-placement^="bottom"] { font-size: 14px;
margin-top: 0px !important; color: #333;
} border-right: 1px solid #dcdcdc;
.el-popper[x-placement^="top"] { }
margin-bottom: 0px !important;
} .pd20 {
.customerTransferTable .el-button { padding: 12px 20px !important;
position: relative; }
top: -5px;
} .el-popper[x-placement^="bottom"] {
.customerTransferTable .el-button + .el-button { margin-top: 0px !important;
} }
.customerTransfer ._mc_edit {
overflow: auto; .el-popper[x-placement^="top"] {
display: none; margin-bottom: 0px !important;
position: absolute; }
z-index: 50;
bottom: 0; .customerTransferTable .el-button {
left: 0; position: relative;
border-top: 3px solid #38425d; top: -5px;
background-color: #f9f9f9; }
padding: 10px;
width: 100%; .customerTransferTable .el-button+.el-button {}
min-width: 1146px;
} .customerTransfer ._mc_edit {
.customerTransfer ._mc_edit ._tit { overflow: auto;
padding-left: 10px; display: none;
border-left: 3px solid #e95252; position: absolute;
font-size: 16px; z-index: 50;
font-family: "PingFangSc-Fine"; bottom: 0;
color: #000000; left: 0;
} border-top: 3px solid #38425d;
.customerTransfer ._mc_edit ._info_box ul._form li { background-color: #f9f9f9;
float: left; padding: 10px;
} width: 100%;
.customerTransfer .edHeightOne { min-width: 1146px;
display: block !important; }
height: 450px;
} .customerTransfer ._mc_edit ._tit {
.customerTransfer ._edHeight { padding-left: 10px;
height: 340px; border-left: 3px solid #e95252;
} font-size: 16px;
.customerTransfer ._remark textarea { font-family: "PingFangSc-Fine";
resize: none; color: #000000;
width: 646px; }
height: 100px;
} .customerTransfer ._mc_edit ._info_box ul._form li {
.customerTransfer .avatar-uploader .el-upload { float: left;
border: 1px dashed #d9d9d9; }
border-radius: 6px;
cursor: pointer; .customerTransfer .edHeightOne {
position: relative; display: block !important;
overflow: hidden; height: 450px;
} }
.customerTransfer .avatar-uploader .el-upload:hover {
border-color: #409eff; .customerTransfer ._edHeight {
} height: 340px;
.customerTransfer .avatar-uploader-icon { }
font-size: 28px;
color: #8c939d; .customerTransfer ._remark textarea {
width: 148px; resize: none;
height: 148px; width: 646px;
line-height: 148px; height: 100px;
text-align: center; }
}
.customerTransfer .avatar { .customerTransfer .avatar-uploader .el-upload {
width: 148px; border: 1px dashed #d9d9d9;
height: 148px; border-radius: 6px;
display: block; cursor: pointer;
} position: relative;
.width15{ overflow: hidden;
width: 15px; }
}
.sort-th{ .customerTransfer .avatar-uploader .el-upload:hover {
display: flex; border-color: #409eff;
align-items: center; }
}
.sortActive{ .customerTransfer .avatar-uploader-icon {
color: #E95252; font-size: 28px;
} color: #8c939d;
.sort-icon-top{ width: 148px;
position: relative; height: 148px;
top: 4px; line-height: 148px;
/* left: -45px; */ text-align: center;
} }
.sort-icon-bottom{
position: relative; .customerTransfer .avatar {
bottom: 4px; width: 148px;
/* left: -20px; */ height: 148px;
} display: block;
.customerTransfer .fist-bottom{ }
color: rgb(255, 255, 255);
font-size: 14px; .width15 {
padding: 5px; width: 15px;
cursor: pointer; }
border-top-right-radius: 0;
border-bottom-right-radius: 0; .sort-th {
border-top-left-radius: 4px; display: flex;
border-bottom-left-radius: 4px; align-items: center;
} }
.customerTransfer .el-button-group{
padding-top: 10px; .sortActive {
} color: #E95252;
.yichangde{ }
display: inline-block;
border-radius: 50%; .sort-icon-top {
color: red; position: relative;
border: 1px solid red; top: 4px;
font-size: 12px; /* left: -45px; */
width: 18px; }
height: 18px;
text-align: center; .sort-icon-bottom {
cursor:pointer; position: relative;
} bottom: 4px;
/* left: -20px; */
}
.customerTransfer .fist-bottom {
color: rgb(255, 255, 255);
font-size: 14px;
padding: 5px;
cursor: pointer;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.customerTransfer .el-button-group {
padding-top: 10px;
}
.yichangde {
display: inline-block;
border-radius: 50%;
color: red;
border: 1px solid red;
font-size: 12px;
width: 18px;
height: 18px;
text-align: center;
cursor: pointer;
}
</style> </style>
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