Commit f24ce74e authored by 黄奎's avatar 黄奎

页面修改

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