Commit f24ce74e authored by 黄奎's avatar 黄奎

页面修改

parent 7d479422
......@@ -422,7 +422,7 @@
},
$route:{
handler(val, oldVal) {
console.log(val,'-----')
},
deep: true,
immediate:true,
......
......@@ -3141,8 +3141,6 @@
this.czmsgState = true;
}
if(this.czmsg.ClientID&&this.czmsg.ClientID>0){
console.log('1:'+this.czmsg.ClientType);
console.log('2:'+this.czmsg.ClientID);
this.msg.IsPublic=1;
this.msg.ClientType = this.czmsg.ClientType;
this.msg.ClientID = this.czmsg.ClientID;
......
......@@ -1007,7 +1007,6 @@
this.params,
res => {
this.loading = false;
console.log("GetDiDaPriceConfirm",res.data);
if (res.data.resultCode == 1) {
this.dataList = res.data.data.PriceDetails;
this.roomRateDetails = res.data.data.PriceDetails.HotelList[0];
......
......@@ -1674,7 +1674,7 @@
<el-form-item :label="$t('salesModule.CustomFrom')" prop="ClientSource">
<!--票务修改平台 -->
<el-select v-model="addMsg.ClientSource" filterable :placeholder="$t('pub.pleaseSel')"
@change="gettypechange(),getTotalPrice()" :disabled="addMsg.OutBranchId&&addMsg.OutBranchId!=1245" >
@change="getTotalPrice()" :disabled="addMsg.OutBranchId!=1245">
<el-option v-for="item in ddlyList" :label="item.Name" :value="item.Id" :key="item.Id">
</el-option>
</el-select>
......@@ -2543,7 +2543,7 @@
</td>
<td class="RL-BTNlist" rowspan="2">
<el-button-group v-if="isShow === true">
<el-tooltip v-if=" ConfigData.Config.IsCurrentMaxStartData == 0 || IsSupperOrderEdit" class="item"
<el-tooltip class="item"
effect="dark" :content="$t('pub.updateMsg')" placement="top-start">
<el-button type="primary" style="background-color: #00c6ff !important;border-color: #00c6ff;"
icon="iconfont icon-bianji-smal" @click="getDetail(childItem)"></el-button>
......@@ -4780,7 +4780,7 @@
this.apipost(
"sellorder_post_GetOrderEntity", {
ID: obj.OrderId,
IsDealDiscount:1
IsDealDiscount: 1
},
(res) => {
if (res.data.resultCode == 1) {
......@@ -4789,7 +4789,7 @@
this.addObj = res.data.data.modelPrice;
let x = res.data.data.model;
this.addMsg = x;
this.DealDiscountMoney = this.addMsg.DiscountMoney+this.addMsg.RedEnvelopeMoney;
this.DealDiscountMoney = this.addMsg.DiscountMoney + this.addMsg.RedEnvelopeMoney;
this.LessNPrice = this.addMsg.LessMaxPrice; //先初始化 最高少价
this.LessNAvgPrice = this.addMsg.LessMaxAvgPrice;
if (this.addMsg.IsLessPrice == 1) {
......@@ -5518,19 +5518,21 @@
return;
}
}
var oldUnitPrice=this.addMsg.TC_Price;
if (this.addMsg.GroupType != 5) {
//印象票务
if (this.addMsg.OutBranchId&&this.addMsg.OutBranchId == 1245) {
if (this.addMsg.CustomerType == 3 || this.addMsg.CustomerType == 4) {
if (this.addMsg.PlatformPriceList && this
.addMsg.PlatformPriceList.length > 0) {
var platFormObj = this.addMsg.PlatformPriceList.find(qitem => {
return qitem.ItemId == this.addMsg.ClientSource
});
if (platFormObj) {
this.addMsg.TC_Price = platFormObj.ItemPrice;
this.addMsg.Unit_Price = platFormObj.ItemPrice;
let userInfo = this.getLocalStorage();
if (userInfo != null && userInfo.EmployeeId != 1) {
if (this.addMsg.GroupType != 5) {
//印象票务
if (this.addMsg.OutBranchId && this.addMsg.OutBranchId == 1245) {
if (this.addMsg.CustomerType == 3 || this.addMsg.CustomerType == 4) {
if (this.addMsg.PlatformPriceList && this
.addMsg.PlatformPriceList.length > 0) {
var platFormObj = this.addMsg.PlatformPriceList.find(qitem => {
return qitem.ItemId == this.addMsg.ClientSource
});
if (platFormObj) {
this.addMsg.TC_Price = platFormObj.ItemPrice;
this.addMsg.Unit_Price = platFormObj.ItemPrice;
}
}
}
}
......
<template>
<div class="addAutoreleaseCoupon">
<el-dialog @closed="closedDialog" :modal="true" :visible.sync="dialogTableVisible"
:close-on-click-modal="false" class="addContacts"
width="700px">
<div class="add-tit" slot="title">
<p v-if="msg.ID==0"><span></span>{{ $t('objFill.v102.zidongffangyhq') }}</p>
<p v-else><span></span>{{ $t('objFill.v102.zidongffngyhqbj') }}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<el-form :model="msg" style="padding:0 20px;" :rules="rules" ref="msg" label-width="120px" size="small">
<el-row :gutter="30">
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.chufasj')" class="is-required" >
<el-select v-model="msg.TriggerType" :placeholder="$t('objFill.qingxuanzhe')" style="width: 100%">
<el-option
v-for="item in options"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</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')" filterable clearable style="width: 100%" @change="handleChange">
<el-option
v-for="item in options2"
:key="item.id"
:label="item.couponsName+'('+(item.customerType==0?'同行':'直客')+')'"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.kouling')" class="is-required" v-if="msg.TriggerType==5" >
<el-input v-model="msg.KeyWord" class="el-input--small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangcishu')" prop="GrantNum" class="is-required">
<el-tooltip class="item" effect="dark" :content="$t('objFill.v102.meigyhuffcs')" placement="top"
style="position: absolute;left: -100px;top:10px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.GrantNum" class="el-input--small" :disabled="checked" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''" style="width: 50%;"/>
<el-checkbox v-model="checked" @change="checked==true? msg.GrantNum=0:msg.GrantNum=1" style="margin-left: 10px">{{$t('objFill.v102.wuxinzhi')}}</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangzhangshu')" prop="GrantCouponNum" class="is-required">
<el-input v-model="msg.GrantCouponNum" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''" style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('system.table_begTime')" >
<el-date-picker size="small" v-model="msg.RegisterDate" type="date" style="width: 100%"
value-format="yyyy-MM-dd" :placeholder="$t('fnc.qxzrqshijian')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('sm.company')" >
<el-select v-model="msg.BranchId" :placeholder="$t('rule.company')" style="width: 100%">
<el-option
v-for="item in companyList"
:key="item.Id"
:label="item.BName"
: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" 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>
<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>
<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>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="preserve('msg')" :loading="loading2">{{$t('pub.sureBtn')}}</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('msg')">{{$t('pub.cancelBtn')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "addAutoreleaseCoupon",
props:['infoData'],
data(){
return{
msg:{
ID:0,
TriggerType:0,
DiscountCouponId:0,
GrantNum:1,
IsAll:0,
UserList:[],
RegisterDate:'',
KeyWord:'',
BranchId: -1,
SelfMotionType: 1,
GrantCouponNum: 1,
},
rules:{
GrantNum:[
{required: true, message: this.$t('objFill.v102.zuiduoffcsbnwk'), trigger: "blur"}
],
GrantCouponNum:[
{required: true, message: this.$t('objFill.v102.qingsrfafzshu'), trigger: "blur"}
],
},
checked:false,
options:[],
options2:[],
Name:'',
category:false,
tableData: [],
msg_t:{
pageIndex:1,
pageSize:8,
// Name:'',
// SmallShopId:0,
CustomerName: "",
CreateBy: "-1",
DepartmentId: "-1",
Brand: -1,
allDepartment: 0,
CustomerStatus: '',
OperationStatus: '',
jySort: 'desc',
rtsSort: '',
orderBy: 'TradeMoney desc',
ExceptionCount: 0,
fanYong: -1,
STime: '',
ETime: '',
customerInfo:"",
},
count:0,
loading:false,
UserList:[],
Storage:[],
loading2:false,
dialogTableVisible: true,
getCompanyMsg: {
RB_Group_Id: "0",
Status: "0"
},
companyList: [],
SelfMotionList: [
{Name: this.$t('active.cl_tongyong'),Id:0},
{Name: this.$t('salesModule.Trade'),Id:1},
{Name: this.$t('Operation.Op_direct'),Id:2},
]
}
<div class="addAutoreleaseCoupon">
<el-dialog @closed="closedDialog" :modal="true" :visible.sync="dialogTableVisible" :close-on-click-modal="false"
class="addContacts" width="700px">
<div class="add-tit" slot="title">
<p v-if="msg.ID==0"><span></span>{{ $t('objFill.v102.zidongffangyhq') }}</p>
<p v-else><span></span>{{ $t('objFill.v102.zidongffngyhqbj') }}</p>
<span icon="el-icon-close"></span>
</div>
<div class="form-box">
<el-form :model="msg" style="padding:0 20px;" :rules="rules" ref="msg" label-width="120px" size="small">
<el-row :gutter="30">
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.chufasj')" class="is-required">
<el-select v-model="msg.TriggerType" :placeholder="$t('objFill.qingxuanzhe')" style="width: 100%">
<el-option v-for="item in options" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
</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')" filterable clearable
style="width: 100%" @change="handleChange">
<el-option v-for="item in options2" :key="item.id"
:label="item.couponsName+'('+(item.customerType==0?'同行':'直客')+')'" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.kouling')" class="is-required" v-if="msg.TriggerType==5">
<el-input v-model="msg.KeyWord" class="el-input--small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangcishu')" prop="GrantNum" class="is-required">
<el-tooltip class="item" effect="dark" :content="$t('objFill.v102.meigyhuffcs')" placement="top"
style="position: absolute;left: -100px;top:10px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.GrantNum" class="el-input--small" :disabled="checked" step="1" min="0"
onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''"
style="width: 50%;" />
<el-checkbox v-model="checked" @change="checked==true? msg.GrantNum=0:msg.GrantNum=1"
style="margin-left: 10px">{{$t('objFill.v102.wuxinzhi')}}</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('objFill.v102.fafangzhangshu')" prop="GrantCouponNum" class="is-required">
<el-input v-model="msg.GrantCouponNum" step="1" min="0"
onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''"
style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('system.table_begTime')">
<el-date-picker size="small" v-model="msg.RegisterDate" type="date" style="width: 100%"
value-format="yyyy-MM-dd" :placeholder="$t('fnc.qxzrqshijian')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('sm.company')">
<el-select v-model="msg.BranchId" :placeholder="$t('rule.company')" style="width: 100%">
<el-option v-for="item in companyList" :key="item.Id" :label="item.BName" :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" 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>
<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>
<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>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="preserve('msg')" :loading="loading2">{{$t('pub.sureBtn')}}
</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, resetForm('msg')">
{{$t('pub.cancelBtn')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "addAutoreleaseCoupon",
props: ['infoData'],
data() {
return {
msg: {
ID: 0,
TriggerType: 0,
DiscountCouponId: 0,
GrantNum: 1,
IsAll: 0,
UserList: [],
RegisterDate: '',
KeyWord: '',
BranchId: -1,
SelfMotionType: 1,
GrantCouponNum: 1,
},
created(){
if(this.infoData) this.getInfo()
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id
this.getrigger()
this.getrigger2()
this.getCompany()
// this.getList()
setTimeout(()=>{
if(this.$route.query.ID){
this.gettRepositoryList(this.$route.query.ID)
}
},10)
rules: {
GrantNum: [{
required: true,
message: this.$t('objFill.v102.zuiduoffcsbnwk'),
trigger: "blur"
}],
GrantCouponNum: [{
required: true,
message: this.$t('objFill.v102.qingsrfafzshu'),
trigger: "blur"
}],
},
mounted(){
checked: false,
options: [],
options2: [],
Name: '',
category: false,
tableData: [],
msg_t: {
pageIndex: 1,
pageSize: 8,
// Name:'',
// SmallShopId:0,
CustomerName: "",
CreateBy: "-1",
DepartmentId: "-1",
Brand: -1,
allDepartment: 0,
CustomerStatus: '',
OperationStatus: '',
jySort: 'desc',
rtsSort: '',
orderBy: 'TradeMoney desc',
ExceptionCount: 0,
fanYong: -1,
STime: '',
ETime: '',
customerInfo: "",
},
methods:{
handleChange(value) {
this.options2.forEach(x=>{
if(x.id ==value){
this.msg.SelfMotionType =x.customerType
}
})
count: 0,
loading: false,
UserList: [],
Storage: [],
loading2: false,
dialogTableVisible: true,
getCompanyMsg: {
RB_Group_Id: "0",
Status: "0"
},
companyList: [],
SelfMotionList: [{
Name: this.$t('active.cl_tongyong'),
Id: 0
},
getSelect(item) {
if (item.ischecked) {
this.UserList.push(item);
} else {
let index = this.UserList.indexOf(item.customerId);
this.UserList.splice(index, 1);
}
{
Name: this.$t('salesModule.Trade'),
Id: 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);
}
{
Name: this.$t('Operation.Op_direct'),
Id: 2
},
getInfo(){
this.apipost("coupon_post_GettRepositoryList",{
ID: this.infoData.ID
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
this.msg = {
ID: data.ID,
TriggerType:data.TriggerType,
DiscountCouponId:Number(data.DiscountCouponId),
GrantNum:data.GrantNum,
IsAll:data.IsAll,
UserList:[],
RegisterDate:data.RegisterDate,
KeyWord:data.KeyWord,
BranchId: data.BranchId,
SelfMotionType: data.SelfMotionType,
GrantCouponNum: data.GrantCouponNum,
}
if(data.UserList&&data.UserList.length>0){
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);
}
})
},
toggleSelection(rows,ignoreSelectable) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row,undefined,ignoreSelectable);
});
} else {
this.$refs.multipleTable.clearSelection();
}
this.$forceUpdate()
},
handleClose(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
]
}
},
created() {
if (this.infoData) this.getInfo()
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id
this.getrigger()
this.getrigger2()
this.getCompany()
// this.getList()
setTimeout(() => {
if (this.$route.query.ID) {
this.gettRepositoryList(this.$route.query.ID)
}
}, 10)
},
mounted() {
},
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
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
this.msg = {
ID: data.ID,
TriggerType: data.TriggerType,
DiscountCouponId: Number(data.DiscountCouponId),
GrantNum: data.GrantNum,
IsAll: data.IsAll,
UserList: [],
RegisterDate: data.RegisterDate,
KeyWord: data.KeyWord,
BranchId: data.BranchId,
SelfMotionType: data.SelfMotionType,
GrantCouponNum: data.GrantCouponNum,
}
if (data.UserList && data.UserList.length > 0) {
data.UserList.forEach(element => {
this.UserList.push({
contact: element.Contact,
contactNumber: element.ContactNumber,
customerAccountId: element.UserId,
customerId: element.CustomerId,
customerName: element.CustomerName,
ischecked: true,
});
}
},
resetForm(formName) {
// 重置表单
this.msg = {
ID:0,
TriggerType:0,
DiscountCouponId:0,
GrantNum:1,
IsAll:0,
UserList:[],
RegisterDate:'',
KeyWord:'',
};
this.$refs[formName].resetFields();
this.$emit("close");
},
closedDialog() {
this.$emit("close");
},
gettRepositoryList(ID){
return
this.apipost("/api/Coupon/GettRepositoryList",{'ID':ID} , res => {
if (res.data.resultCode == 1) {
this.msg = res.data.data
if(res.data.data.GrantNum==0){
this.checked=true
}
if(res.data.data.UserList){
this.UserList= res.data.data.UserList
for(let i = 0;i<this.UserList.length;i++){
this.UserList[i].CustomerAccountId = this.UserList[i].UserId
}
}
} else {
this.Info(res.data.message);
});
}
} else {
this.Info(res.data.message);
}
})
},
toggleSelection(rows, ignoreSelectable) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row, undefined, ignoreSelectable);
});
} else {
this.$refs.multipleTable.clearSelection();
}
this.$forceUpdate()
},
handleClose(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
}
},
resetForm(formName) {
// 重置表单
this.msg = {
ID: 0,
TriggerType: 0,
DiscountCouponId: 0,
GrantNum: 1,
IsAll: 0,
UserList: [],
RegisterDate: '',
KeyWord: '',
};
this.$refs[formName].resetFields();
this.$emit("close");
},
closedDialog() {
this.$emit("close");
},
gettRepositoryList(ID) {
return
this.apipost("/api/Coupon/GettRepositoryList", {
'ID': ID
}, res => {
if (res.data.resultCode == 1) {
this.msg = res.data.data
if (res.data.data.GrantNum == 0) {
this.checked = true
}
if (res.data.data.UserList) {
this.UserList = res.data.data.UserList
for (let i = 0; i < this.UserList.length; i++) {
this.UserList[i].CustomerAccountId = this.UserList[i].UserId
}
})
}
} else {
this.Info(res.data.message);
}
})
},
getCompany() {
this.apipost(
"admin_get_BranchGetList",
this.getCompanyMsg,
res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
this.companyList.unshift({
BName: this.$t('pub.unlimitedSel'),
Id: -1
})
} else {}
},
getCompany() {
this.apipost(
"admin_get_BranchGetList",
this.getCompanyMsg,
res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
this.companyList.unshift({
BName: this.$t('pub.unlimitedSel'),
Id: -1
})
err => {}
);
},
getrigger() {
this.apipost("coupon_post_GetTriggerTypeEnumList", {}, res => {
if (res.data.resultCode == 1) {
this.options = res.data.data;
if (!this.msg.TriggerType) this.msg.TriggerType = res.data.data[0].Id
} else {
this.Info(res.data.message);
}
})
},
getrigger2() {
this.apipost("coupon_post_GetDropDowmList", {
"CouponsName": "",
"BranchId": -1
}, res => {
if (res.data.resultCode == 1) {
this.options2 = res.data.data;
if (!this.msg.DiscountCouponId) this.msg.DiscountCouponId = res.data.data[0].id
} else {
this.Info(res.data.message);
}
})
},
choice() {
this.category = true;
this.options2.forEach(x => {
if (x.ID == this.msg.DiscountCouponId) {
this.msg_t.SmallShopId = x.SmallShopId
}
})
setTimeout(() => {
// for(let i =0;i<this.Storage.length;i++){
// this.handleClose([this.Storage[i]])
// }
this.toggleSelection(this.Storage, true)
}, 500)
// this.msg_t.pageIndex =1
// this.getList()
},
getList() {
this.loading = true
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;
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;
}
},
err => {}
);
},
getrigger(){
this.apipost("coupon_post_GetTriggerTypeEnumList",{}, res => {
if (res.data.resultCode == 1) {
this.options = res.data.data;
if(!this.msg.TriggerType) this.msg.TriggerType = res.data.data[0].Id
} else {
this.Info(res.data.message);
}
})
},
getrigger2(){
this.apipost("coupon_post_GetDropDowmList",{"CouponsName":"","BranchId":-1}, res => {
if (res.data.resultCode == 1) {
this.options2 = res.data.data;
if(!this.msg.DiscountCouponId) this.msg.DiscountCouponId = res.data.data[0].id
} else {
this.Info(res.data.message);
}
})
},
choice(){
this.category = true;
this.options2.forEach(x=>{
if(x.ID == this.msg.DiscountCouponId){
this.msg_t.SmallShopId = x.SmallShopId
}
})
})
}
this.tableData = tempData;
// this.count = res.data.data.pages.count;
} else {
this.Info(res.data.message);
}
})
},
search() {
this.msg_t.pageIndex = 1
this.getList();
},
preserve(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
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
})
}
this.msg.UserList = UList
}
setTimeout(()=>{
// for(let i =0;i<this.Storage.length;i++){
// this.handleClose([this.Storage[i]])
// }
this.toggleSelection(this.Storage,true)
},500)
// this.msg_t.pageIndex =1
// this.getList()
},
getList(){
this.loading =true
let cmdStr = "app_post_GetCustomerBrandByKeyWord";
if (this.msg.SelfMotionType == 1) {
cmdStr = "Sell_Post_GetDirectCustomerListByKey";
if (this.msg.RegisterDate == null) {
this.msg.RegisterDate = ''
}
//"app_customer_GetCustomerListForCareOf"
this.apipost(cmdStr,this.msg_t, res => {
this.loading =false
if (this.msg.TriggerType == 5 && this.msg.KeyWord == '') {
this.Error(this.$t('objFill.v102.qingtianxiekl'))
return false
}
this.loading2 = true;
this.apipost("coupon_post_AddOrUpdateSelfMotion", this.msg, res => {
this.loading2 = false;
if (res.data.resultCode == 1) {
// 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;
this.Success(res.data.message);
this.$emit('Success');
} else {
this.Info(res.data.message);
}
})
},
search(){
this.msg_t.pageIndex =1
this.getList();
},
preserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
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})
}
this.msg.UserList= UList
}
if(this.msg.RegisterDate==null){
this.msg.RegisterDate=''
}
if(this.msg.TriggerType==5 && this.msg.KeyWord==''){
this.Error(this.$t('objFill.v102.qingtianxiekl'))
return false
}
this.loading2 = true;
this.apipost("coupon_post_AddOrUpdateSelfMotion",this.msg, res => {
this.loading2 = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit('Success');
} else {
this.Info(res.data.message);
}
})
} else {
return false;
}
});
},
cancel(){
this.$router.go(-1)
} else {
return false;
}
}
});
},
cancel() {
this.$router.go(-1)
}
</script>
<style >
.user-item {
}
}
</script>
<style>
.user-item {
/* border: 1px #eeeeee solid; */
/* padding: 20px; */
margin-right: 30px;
margin-bottom: 0px;
position: relative;
}
.user-item .closeName {
position: absolute;
right: -10px;
......@@ -509,21 +517,24 @@
height: 18px;
/* border-radius: 100px; */
}
</style>
<style scoped>
</style>
<style scoped>
/deep/.el-table th.el-table__cell {
background-color: #E6E6E6;
}
.el-form-item{
margin-bottom:5px;
.el-form-item {
margin-bottom: 5px;
}
._TravelPricePopover .ScenicDiv {
._TravelPricePopover .ScenicDiv {
width: 100%;
max-height: 300px;
overflow: auto;
}
._TravelPricePopover table {
._TravelPricePopover table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
......@@ -533,13 +544,13 @@
width: 94%;
}
._TravelPricePopover table ._color_666 {
._TravelPricePopover table ._color_666 {
background-color: #ededed;
color: #666666;
padding: 5px;
}
._TravelPricePopover table td {
._TravelPricePopover table td {
background-color: #ffffff;
padding: 9px 0;
color: #333333;
......@@ -547,8 +558,8 @@
border: 1px solid #d2d2d2;
}
._TravelPricePopover table td._d_name {
._TravelPricePopover table td._d_name {
background-color: #ededed;
}
</style>
\ No newline at end of file
......@@ -397,7 +397,6 @@ export default {
clickSetAdmin(obj){
this.dialogFormVisible = true
this.addType = 2
console.log(obj)
let list = obj.CustomerChildrenIds.split(',')
this.addMsg = {
...JSON.parse(JSON.stringify(obj)),
......
......@@ -102,7 +102,6 @@ export default {
file,
{
progress: function* (p) {
console.log('进度:', Math.round(p * 100) + '%');
const speeds = calculator(p);
that.speed = that.formatSpeed(speeds);
that.handleProgress(p);
......@@ -133,7 +132,6 @@ export default {
})
},
handleProgress(p) {
console.log(p)
const now = Date.now()
const loaded = p.loaded
const total = p.total
......
......@@ -134,7 +134,6 @@
},
methods: {
selectChange(item) {
console.log("this.sChangeRemark", this.sChangeRemark);
item.ChangeRemarks = this.sChangeRemark;
},
getHotel(subItem, HotelId) {
......
......@@ -266,7 +266,6 @@
watch: {
priceObj: {
handler: function (val, oldVal) {
console.log("w_priceObj", this.priceObj);
this.resetPageIndex();
},
deep: true
......
......@@ -1198,9 +1198,6 @@
getJourney(id, TCID, title) {
var that = this;
this.tripTitle = title;
console.log("id",id);
console.log("TCID",TCID);
this.$nextTick(() => {
that.$refs.comTeam.GetTrip(id, TCID,2);
});
......
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