Commit 529f07f4 authored by 黄奎's avatar 黄奎
parents 7f7d5b30 3a413087
<style>
@import "../../assets/css/newTravelManager.css";
.page_MyCustomer ._mc_addbox {
height: 52px;
width: 100%;
......@@ -292,7 +293,23 @@
<li style="display: flex;align-items: center;">
<span style="display: flex;align-items: center;">
<em>{{$t("Operation.Op_salesPlat")}}</em>
<span style="display: flex;align-items: center;">
<el-select v-model="msg.ckedplat" multiple
@change="checkDialog"
clearable
collapse-tags>
<el-option
v-for="sales in $tripUtils.TeamStatesList.salsPlat"
:key="sales.Id"
:label="sales.Name"
:value="sales.Id"
:disabled="
(sales.Id == '2' || sales.Id == '5') && SaleB2COrWeChatStatus
? true
: false
">
</el-option>
</el-select>
<!-- <span style="display: flex;align-items: center;">
<el-checkbox v-model="msg.checkDialogAll" @change="checkAllDialog" style="margin-right: 20px">
{{ $t("system.table_chekAll") }}</el-checkbox>
<template v-if="CurrentUserInfo.RB_Group_Id == 2">
......@@ -312,7 +329,7 @@
{{ sales.Name }}</el-checkbox>
</el-checkbox-group>
</template>
</span>
</span> -->
</span>
</li>
<li>
......@@ -329,7 +346,16 @@
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column :label="$t('sm.company')" prop="BranchName"></el-table-column>
<el-table-column :label="$t('sm.company')" prop="BranchName" width="200">
<template slot-scope="scope">
<p>{{ scope.row.BranchName }}</p>
<div class="TC_TravelSalePlat clearfix" style="margin: 0;">
<span class="TC_neibu"
:class="{TCneibu: plat == 3, TCb2b: plat == 1,TCb2c: plat == 2, AppPlat: plat == 4, otherPlat: plat == 5,}"
v-for="plat in scope.row.SalePlatList" :key="plat.subCode">{{ $tripUtils.getPlatName(plat) }}</span>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('hotel.product_name')" prop="Name"></el-table-column>
<el-table-column :label="$t('visa.v_visaType')" prop="">
<template slot-scope="scope">
......
......@@ -132,6 +132,16 @@
<el-option :label="$t('op.smallteam')" :value="10"></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>{{$t('objFill.v102.fafangkeix')}}</em>
<el-select filterable v-model="msg.CustomerType">
<el-option :label="$t('system.ph_buxian')" value="-1"></el-option>
<el-option :label="$t('Operation.Op_fellow')" value="0"></el-option>
<el-option :label="$t('Operation.Op_direct')" value="1"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()">
......@@ -158,7 +168,7 @@
<th>{{$t('active.cl_djshiyong')}}</th>
<th>{{$t('active.cl_sxriqi')}}</th>
<th>{{$t('active.cl_sxzhuangtai')}}</th>
<th>{{$t('active.cl_gqriqi')}}</th>
<!-- <th>{{$t('active.cl_gqriqi')}}</th> -->
<th>{{$t('MarketingActi.usingRange')}}</th>
<th>{{$t('admin.admin_status')}}</th>
<th>{{$t('objFill.v101.activity.shifoujies')}}</th>
......@@ -169,7 +179,7 @@
</tr>
<tbody v-loading="loading">
<tr v-for="(item,index) in DataList" :key="index">
<td>{{item.couponsName}}</td>
<td>{{item.couponsName}}<span style="color:red;">({{item.customerType==0?$t('Operation.Op_fellow'): $t('Operation.Op_direct')}})</span> </td>
<td>{{item.couponCount}}</td>
<td>
<span class="_couponReceiveCount"
......@@ -184,21 +194,15 @@
<td>{{item.useCondition}}</td>
<td>{{item.denomination}}</td>
<td>{{item.overlapUse === 0 ? $t('active.cl_byxu') : $t('active.cl_yuncu')}}</td>
<td>{{item.effectDate}}</td>
<td><p>{{item.effectDate}}</p><p>{{item.expirationDate}}</p></td>
<td>
<span v-if="item.couponEffectStatus === 1" style="color: green">{{$t('active.cl_sxzhong')}}</span>
<span v-if="item.couponEffectStatus === 2" style="color: gray">{{$t('active.cl_wsxiao')}}</span>
<span v-if="item.couponEffectStatus === 3" style="color: red">{{$t('active.cl_ygqi')}}</span>
</td>
<td>{{item.expirationDate}}</td>
<!-- <td>{{item.expirationDate}}</td> -->
<td>
{{item.couponsUseScope.couponsUseScope}}
<!-- <span v-if="item.couponsUseScope == 1">{{$t('MarketingActi.alltongyong')}}</span>
<span v-if="item.couponsUseScope == 2">{{$t('active.cl_team')}}</span>
<span v-if="item.couponsUseScope == 3">{{$t('active.cl_qianzheng')}}</span>
<span v-if="item.couponsUseScope == 4">{{$t('active.cl_jipiao')}}</span>
<span v-if="item.couponsUseScope == 5">{{$t('scen.sc_piao')}}</span>
<span v-if="item.couponsUseScope == 6">{{$t('MarketingActi.car')}}</span> -->
{{item.couponsUseScopeStr}}
</td>
<td>
<span v-if="item.couponStatus == 1" style="color: green">{{$t('pub.normalSel')}}</span>
......@@ -388,16 +392,6 @@
<el-form-item :label="$t('active.cl_syfanwei')">
<el-select filterable v-model="addMsg.couponsUseScope">
<el-option v-for="(item,index) in ScopeOfUseList" :key="index" :label="item.Name" :value="item.Id"></el-option>
<!-- <el-option :label="$t('active.cl_tongyong')" :value="1"></el-option>
<el-option :label="$t('active.cl_team')" :value="2"></el-option>
<el-option :label="$t('active.cl_qianzheng')" :value="3"></el-option>
<el-option :label="$t('active.cl_jipiao')" :value="4"></el-option>
<el-option :label="$t('scen.sc_piao')" :value="5"></el-option>
<el-option :label="$t('MarketingActi.car')" :value="6"></el-option>
<el-option :label="$t('MarketingActi.free')" :value="7"></el-option>
<el-option :label="$t('MarketingActi.local')" :value="8"></el-option>
<el-option :label="$t('hotel.hotel')" :value="9"></el-option>
<el-option :label="$t('op.smallteam')" :value="10"></el-option> -->
</el-select>
</el-form-item>
</el-col>
......@@ -407,10 +401,14 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('hotel.hotel_remark')">
<el-input v-model="addMsg.remark" class="w217" :placeholder="$t('pub.pleaseImport')" />
<el-form-item :label="$t('objFill.v102.fafangkeix')">
<el-radio-group v-model="addMsg.customerType" :disabled="addMsg.id>0" >
<el-radio :label="0">{{$t('Operation.Op_fellow')}}</el-radio>
<el-radio :label="1">{{$t('Operation.Op_direct')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v101.activity.shiyongpint')" prop="openPlatformList">
<el-select filterable class="w217" :multiple="true" v-model="addMsg.openPlatformList"
......@@ -458,6 +456,11 @@
<el-input v-model="addMsg.expansionModel.orderGuestNum" class="w217" type="number" />
</el-form-item>
</el-col>
<el-col :span="22">
<el-form-item :label="$t('hotel.hotel_remark')">
<el-input v-model="addMsg.remark" :placeholder="$t('pub.pleaseImport')" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item :label="$t('active.cl_orderType')" prop="lineId">
<el-select filterable v-model="addMsg.expansionModel.orderType">
......@@ -616,6 +619,7 @@
groupId: '',
branchId: '',
couponsUseScope: "",
CustomerType:"-1",
},
rules: {
branchId: [{
......@@ -692,6 +696,7 @@
lineteamId: 0,
couponsUseScope: 1,
couponStatus: 1,
customerType: 0,
redemptionPrice: '',
remark: "",
autoGrant: "",
......@@ -828,7 +833,11 @@
}
}
this.addMsg = Object.assign({}, item);
console.log("item",item.customerType);
if (item.couponPriceLists || item.lineId || item.lineteamId || item.effectDate || item.expirationDate) {
if(item.lineId>0){
this.getLineTeamList(item.lineId);
}
this.getTravelPrciePageList()
}
},
......@@ -1056,6 +1065,7 @@
this.addMsg.checkInLineList = item.checkInLineList
this.addMsg.lineIdList = item.lineIdList
this.addMsg.lineteamIdList = item.lineteamIdList
this.addMsg.customerType = item.customerType
if (item.expansionModel === null) {
this.addMsg.expansionModel = {
orderType: "",
......@@ -1156,6 +1166,7 @@
activityEndDate: "",
overlapUse: 0,
useCondition: "",
customerType:0,
id: 0,
couponCount: '',
lineteamId: 0,
......
......@@ -32,7 +32,7 @@
</el-table-column>
<el-table-column
prop="GrantNum"
label="发放次数限制">
:label="$t('objFill.v102.fafangcishu')">
<template slot-scope="scope">
<div v-if="scope.row.GrantNum==0">
无限制
......@@ -42,7 +42,23 @@
</div>
</template>
</el-table-column>
<el-table-column
prop="GrantCouponNum"
:label="$t('objFill.v102.fafangzhangshu')">
</el-table-column>
<el-table-column
prop="GrantNum"
:label="$t('objFill.v102.fafangkeix')">
<template slot-scope="scope">
<div v-if="scope.row.SelfMotionType==0">
{{$t('Operation.Op_fellow')}}
</div>
<div v-else-if="scope.row.SelfMotionType==1">
{{$t('Operation.Op_direct')}}
</div>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="操作" width="100"
......
......@@ -25,11 +25,11 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangdyhquan')" class="is-required" >
<el-select v-model="msg.DiscountCouponId" :placeholder="$t('objFill.qingxuanzhe')" style="width: 100%">
<el-select v-model="msg.DiscountCouponId" :placeholder="$t('objFill.qingxuanzhe')" filterable clearable style="width: 100%" @change="handleChange">
<el-option
v-for="item in options2"
:key="item.id"
:label="item.couponsName"
:label="item.couponsName+'('+(item.customerType==0?'同行':'直客')+')'"
:value="item.id">
</el-option>
</el-select>
......@@ -75,32 +75,52 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangkeix')" >
<el-select v-model="msg.SelfMotionType" :placeholder="$t('objFill.v102.qingxuanzfflx')" style="width: 100%">
<el-option
v-for="item in SelfMotionList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('objFill.v101.FinancialModule.linqur')" >
<el-radio-group v-model="msg.IsAll" >
<el-radio-group v-model="msg.IsAll" style="display:flex;align-items: center;height:33px;">
<el-radio :label="0">{{$t('objFill.v102.suoyouyonghu')}}</el-radio>
<el-radio :label="1">{{$t('objFill.v102.zhidingyonghu')}}</el-radio>
<button class="el-button el-button--text" v-if="msg.IsAll ==1" @click="choice">{{$t('objFill.v101.LeaveGroupDownload.xuanzheyh')}}</button>
<el-popover trigger="click" placement="top-start" v-show="msg.IsAll === 1">
<div class="_TravelPricePopover" style="height: 300px;overflow: auto;width: 350px;">
<div class="ScenicDiv">
<el-input class="w180" v-model="msg_t.customerInfo"
@keypress.native.enter="search" :placeholder="$t('objFill.v101.activity.shurugjzhccx')">
</el-input>
<table width="100%" border="0" cellspacing="0" cellpadding="0" v-loading="category">
<tr>
<td class="_color_666">{{$t('objFill.v101.traveltrip.xuanzhe')}}</td>
<td class="_color_666">{{$t('fnc.khmingcheng')}}</td>
<td class="_color_666">{{$t('restaurant.res_ContactNumber')}}</td>
</tr>
<tr v-for="(fitem,fIndex) in tableData" :key="fIndex">
<td>
<el-checkbox @change="getSelect(fitem)" v-model="fitem.ischecked"></el-checkbox>
</td>
<td>
{{fitem.customerName}}- {{fitem.contact}}
</td>
<td>
{{fitem.contactNumber}}
</td>
</tr>
</table>
</div>
</div>
<div slot="reference" style="padding: 0 4px;">
<el-button size="small" type="danger">{{$t('pub.searchBtn')}}</el-button>
</div>
</el-popover>
</el-radio-group>
<div style="display: flex; flex-wrap: wrap;">
<div class="user-item" v-for="(item,index) in UserList"
:label="item.ID" :key="index">
<div class="username">{{item.CustomerName?item.CustomerName:'-'}}</div>
<button type="button" class="el-button closeName el-button--danger is-circle" @click="delUserList(index)"><i class="el-icon-close"></i></button>
</div>
</div>
<template v-if="UserList&&UserList.length>0">
<template v-for="(item,index) in UserList">
<template v-if="item.ischecked">
<el-tag :key="index+10000" closable @close="deleteTag(item)">{{item.customerName}}({{item.contact}})
</el-tag>
</template>
</template>
</template>
</el-form-item>
</el-col>
</el-row>
......@@ -111,70 +131,7 @@
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('msg')">{{$t('pub.cancelBtn')}}</el-button>
</div>
</el-dialog>
<!--选择用户-->
<el-dialog :title="$t('objFill.v101.LeaveGroupDownload.xuanzheyh')" :visible.sync="category" width="612px">
<div class="el-input el-input--small el-input-group el-input-group--append">
<input type="text" autocomplete="off" :placeholder="$t('objFill.v101.qingsrmincss')" class="el-input__inner" v-model="msg_t.CustomerName">
<div class="el-input-group__append">
<button type="button" class="el-button el-button--default" @click="search"><span>{{$t('objFill.v101.header.sousuo')}}</span></button>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
v-loading="loading"
row-key="CustomerAccountId"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="50" reserve-selection>
</el-table-column>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column>
<el-table-column
:label="$t('pub.Customer')">
<template slot-scope="scope">
{{ scope.row.CustomerName }}
</template>
</el-table-column>
<!-- <el-table-column
:label="$t('hotel.suplier_contact')">
<template slot-scope="scope">
{{ scope.row.Contact }}
</template>
</el-table-column> -->
<el-table-column
:label="$t('scen.sc_tel')">
<template slot-scope="scope">
{{ scope.row.ContactNumber }}
</template>
</el-table-column>
<!-- <el-table-column
prop="EmName"
label="销售" width="120"
show-overflow-tooltip>
</el-table-column> -->
</el-table>
<el-pagination style="text-align:center"
background
@current-change="handleCurrentChange"
:page-size="msg_t.pageSize"
:current-page.sync="msg_t.pageIndex"
layout="prev, pager, next"
:total="count">
</el-pagination>
<div slot="footer" class="dialog-footer">
<el-button @click="category = false">{{$t('pub.cancelBtn')}}</el-button>
<el-button type="primary" @click="getProductList">{{$t('pub.sureBtn')}}</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -231,7 +188,8 @@
ExceptionCount: 0,
fanYong: -1,
STime: '',
ETime: ''
ETime: '',
customerInfo:"",
},
count:0,
loading:false,
......@@ -258,7 +216,7 @@
this.getrigger()
this.getrigger2()
this.getCompany()
this.getList()
// this.getList()
setTimeout(()=>{
if(this.$route.query.ID){
this.gettRepositoryList(this.$route.query.ID)
......@@ -269,6 +227,32 @@
},
methods:{
handleChange(value) {
this.options2.forEach(x=>{
if(x.id ==value){
this.msg.SelfMotionType =x.customerType
}
})
},
getSelect(item) {
if (item.ischecked) {
this.UserList.push(item);
} else {
let index = this.UserList.indexOf(item.customerId);
this.UserList.splice(index, 1);
}
},
//删除客户标签
deleteTag(item) {
let result = this.UserList.find(temp => temp.customerId === item.customerId);
if (result) {
result.ischecked = false;
}
let index = this.UserList.indexOf(item);
if (index !== -1) {
this.UserList.splice(index, 1);
}
},
getInfo(){
this.apipost("coupon_post_GettRepositoryList",{
ID: this.infoData.ID
......@@ -288,14 +272,27 @@
SelfMotionType: data.SelfMotionType,
GrantCouponNum: data.GrantCouponNum,
}
this.UserList = data.UserList
this.Storage = data.UserList
if(data.UserList&&data.UserList.length>0){
for(let i = 0;i<data.UserList.length;i++){
this.UserList[i].CustomerAccountId = data.UserList[i].UserId
this.Storage[i].CustomerAccountId = data.UserList[i].UserId
}
data.UserList.forEach(element => {
this.UserList.push( {
contact: element.Contact,
contactNumber: element.ContactNumber,
customerAccountId: element.UserId,
customerId:element.CustomerId,
customerName: element.CustomerName,
ischecked:true,
});
});
}
console.log(" this.UserList", this.UserList);
// this.UserList = data.UserList
// this.Storage = data.UserList
// if(data.UserList&&data.UserList.length>0){
// for(let i = 0;i<data.UserList.length;i++){
// this.UserList[i].CustomerAccountId = data.UserList[i].UserId
// this.Storage[i].CustomerAccountId = data.UserList[i].UserId
// }
// }
} else {
this.Info(res.data.message);
}
......@@ -418,22 +415,36 @@
},
getList(){
this.loading =true
this.apipost("app_customer_GetCustomerListForCareOf",this.msg_t, res => {
let cmdStr = "app_post_GetCustomerBrandByKeyWord";
if (this.msg.SelfMotionType == 1) {
cmdStr = "Sell_Post_GetDirectCustomerListByKey";
}
//"app_customer_GetCustomerListForCareOf"
this.apipost(cmdStr,this.msg_t, res => {
this.loading =false
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pages.pageData;
this.count = res.data.data.pages.count;
// this.tableData = res.data.data;
var tempData = res.data.data;
if (tempData && tempData.length > 0&&this.UserList&&this.UserList.length>0) {
tempData.forEach(item => {
let result = this.UserList.find(temp => temp.customerId === item.customerId);
if (result) {
item.ischecked = true;
} else {
item.ischecked = false;
}
})
}
this.tableData = tempData;
// this.count = res.data.data.pages.count;
} else {
this.Info(res.data.message);
}
})
},
getProductList(){
this.UserList = this.Storage.length>0? JSON.parse(JSON.stringify(this.Storage)):[]
this.category = false;
},
search(){
this.msg_t.pageIndex =1
this.getList();
......@@ -444,7 +455,7 @@
let UList =[];
if(this.UserList&&this.UserList.length>0&&this.IsAll!=0){
for(let i= 0;i<this.UserList.length;i++){
UList.push({'UserId':this.UserList[i].CustomerAccountId})
UList.push({'UserId':this.UserList[i].customerAccountId})
}
this.msg.UserList= UList
}
......@@ -473,17 +484,7 @@
}
});
},
handleSelectionChange(val){
this.Storage = val
},
handleCurrentChange(val) {
this.msg_t.pageIndex = val;
this.getList();
},
delUserList(index){
this.UserList.splice(index,1)
this.handleClose([this.Storage[index]])
},
cancel(){
this.$router.go(-1)
}
......@@ -516,5 +517,38 @@
.el-form-item{
margin-bottom:5px;
}
._TravelPricePopover .ScenicDiv {
width: 100%;
max-height: 300px;
overflow: auto;
}
._TravelPricePopover table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
margin: 0 20px 5px 0;
width: 94%;
}
._TravelPricePopover table ._color_666 {
background-color: #ededed;
color: #666666;
padding: 5px;
}
._TravelPricePopover table td {
background-color: #ffffff;
padding: 9px 0;
color: #333333;
text-align: center;
border: 1px solid #d2d2d2;
}
._TravelPricePopover table td._d_name {
background-color: #ededed;
}
</style>
\ No newline at end of file
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