Commit dc14958e authored by youjie's avatar youjie

签证平台 编辑

parent ab499962
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</span> </span>
<el-dropdown-menu class="changelanguage" slot="dropdown"> <el-dropdown-menu class="changelanguage" slot="dropdown">
<el-dropdown-item v-for="(item,index) in ScopeOfUseList" :key="index" <el-dropdown-item v-for="(item,index) in ScopeOfUseList" :key="index"
@click.native="dropdownText = $t('pub.unlimitedSel'), msg.CouponsUseScope = item.Id, getList(), resetPageIndex()">{{ item.Name }} @click.native="dropdownText = item.Id>0?item.Name:$t('pub.unlimitedSel'), msg.CouponsUseScope = item.Id, getList(), resetPageIndex()">{{ item.Name }}
</el-dropdown-item> </el-dropdown-item>
<!-- <el-dropdown-item <!-- <el-dropdown-item
@click.native="dropdownText = $t('active.cl_tongyong'), msg.couponsUseScope = 1, getList(), resetPageIndex()">{{$t('active.cl_tongyong')}} @click.native="dropdownText = $t('active.cl_tongyong'), msg.couponsUseScope = 1, getList(), resetPageIndex()">{{$t('active.cl_tongyong')}}
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
lineId: 0, //线路 lineId: 0, //线路
lineteamId: 0, //系列ID lineteamId: 0, //系列ID
CustomerType: 0, //0-同行,1-直客 CustomerType: 0, //0-同行,1-直客
CouponStatus: 0, //1未使用 2已使用 3已过期 CouponStatus: 1, //1未使用 2已使用 3已过期
CouponsUseScope: -1, //优惠券使用范围 有枚举 CouponsUseScope: -1, //优惠券使用范围 有枚举
FromPlatform: 0, //来源平台 1app 2小程序 FromPlatform: 0, //来源平台 1app 2小程序
CouponsType: 0, //优惠券类型 1:抵用券,2:折扣卷 CouponsType: 0, //优惠券类型 1:抵用券,2:折扣卷
......
...@@ -483,7 +483,18 @@ ...@@ -483,7 +483,18 @@
<el-form-item :label="$t('objFill.v101.Rest.qianzhengyxrq')"> <el-form-item :label="$t('objFill.v101.Rest.qianzhengyxrq')">
<el-input v-model="addMsg.VisaValidity" :placeholder="$t('pub.pleaseImport')"></el-input> <el-input v-model="addMsg.VisaValidity" :placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('Operation.Op_salesPlat')">
<span style="display: flex;align-items: center;white-space: nowrap;">
<el-checkbox v-model="addMsg.checkDialogAll" @change="checkAllDialog" style="margin-right: 20px">
{{ $t("system.table_chekAll") }}</el-checkbox>
<el-checkbox-group v-model="addMsg.ckedplat" @change="checkDialog">
<el-checkbox v-for="sales in $tripUtils.TeamStatesList.salsPlat" :label="sales.Id" :key="sales.Name"
>
{{ sales.Name }}</el-checkbox>
</el-checkbox-group>
</span>
</el-form-item>
<span class="Travel_Line"></span> <span class="Travel_Line"></span>
<div> <div>
<el-form-item :label="$t('objFill.v101.Rest.qianzhnegglgj')" prop="VisaCountryId"> <el-form-item :label="$t('objFill.v101.Rest.qianzhnegglgj')" prop="VisaCountryId">
...@@ -870,6 +881,9 @@ export default { ...@@ -870,6 +881,9 @@ export default {
CoverImageList: [], CoverImageList: [],
VisaCountryId:"", VisaCountryId:"",
RB_Branch_Id:-1, RB_Branch_Id:-1,
checkDialogAll: false,
ckedplat: [],
SalePlat: '',
}, },
rules: { rules: {
...@@ -949,6 +963,20 @@ export default { ...@@ -949,6 +963,20 @@ export default {
}, },
methods: { methods: {
//全选弹出框
checkAllDialog(val) {
this.addMsg.ckedplat = [];
if (val) {
this.$tripUtils.TeamStatesList.salsPlat.forEach((x) => {
this.addMsg.ckedplat.push(x.Id);
});
}
},
checkDialog(value) {
let checkedCount = value.length;
this.addMsg.checkDialogAll =
checkedCount === this.$tripUtils.TeamStatesList.salsPlat.length;
},
onEditorChange({editor, html, text}, typeStr) { onEditorChange({editor, html, text}, typeStr) {
//富文本编辑器 文本改变时 设置字段值 //富文本编辑器 文本改变时 设置字段值
switch (typeStr) { switch (typeStr) {
...@@ -1020,7 +1048,15 @@ getCompanyList() { ...@@ -1020,7 +1048,15 @@ getCompanyList() {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data=res.data.data; let data=res.data.data;
data.RB_Branch_Id = String(data.RB_Branch_Id) data.RB_Branch_Id = String(data.RB_Branch_Id)
this.addMsg=res.data.data; this.addMsg = {
...res.data.data,
ckedplat: res.data.data.SalePlatList,
SalePlat: res.data.data.SalePlatList.join(","),
checkDialogAll: false,
};
if(this.addMsg.ckedplat&&this.addMsg.ckedplat.length>0&&this.addMsg.ckedplat.length==this.$tripUtils.TeamStatesList.salsPlat.length){
this.addMsg.checkDialogAll = true;
}
if(this.$route.query.copy){ if(this.$route.query.copy){
this.addMsg.Name = '【复制】'+this.addMsg.Name this.addMsg.Name = '【复制】'+this.addMsg.Name
} }
...@@ -1120,6 +1156,7 @@ getCompanyList() { ...@@ -1120,6 +1156,7 @@ getCompanyList() {
if(this.$route.query.copy){ if(this.$route.query.copy){
this.addMsg.Id = 0 this.addMsg.Id = 0
} }
this.addMsg.SalePlat = this.addMsg.ckedplat.length>0?this.addMsg.ckedplat.join(','):'';
this.apipost( this.apipost(
"dmc_post_visa_SetVisaProduct_V1", "dmc_post_visa_SetVisaProduct_V1",
this.addMsg, this.addMsg,
......
...@@ -289,6 +289,32 @@ ...@@ -289,6 +289,32 @@
></el-date-picker> ></el-date-picker>
</span> </span>
</li> </li>
<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-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">
<el-checkbox-group v-model="msg.ckedplat" @change="checkDialog">
<el-checkbox v-for="sales in $tripUtils.TeamStatesList.salsPlat" :label="sales.Id" :key="sales.Name"
:disabled="
(sales.Id == '2' || sales.Id == '5') && SaleB2COrWeChatStatus
? true
: false
">
{{ sales.Name }}</el-checkbox>
</el-checkbox-group>
</template>
<template v-else>
<el-checkbox-group v-model="msg.ckedplat" @change="checkDialog">
<el-checkbox v-for="sales in $tripUtils.TeamStatesList.salsPlat" :label="sales.Id" :key="sales.Name">
{{ sales.Name }}</el-checkbox>
</el-checkbox-group>
</template>
</span>
</span>
</li>
<li> <li>
<button class="hollowFixedBtn" @click="getList()">{{$t('pub.searchBtn')}}</button> <button class="hollowFixedBtn" @click="getList()">{{$t('pub.searchBtn')}}</button>
<!-- <button class="normalBtn" v-show="!buttonshow" @click="cancelEdit(),addShow=true" v-if="msg.isFinacial==1">{{$t('fnc.tianjia')}}</button> --> <!-- <button class="normalBtn" v-show="!buttonshow" @click="cancelEdit(),addShow=true" v-if="msg.isFinacial==1">{{$t('fnc.tianjia')}}</button> -->
...@@ -530,7 +556,41 @@ ...@@ -530,7 +556,41 @@
@click="EditVisaProduct(scope.row,'copy')" @click="EditVisaProduct(scope.row,'copy')"
></el-button> ></el-button>
</el-tooltip> </el-tooltip>
<el-popover v-if="scope.row.SendVisaStatus==1&&msg.isFinacial==1" style="padding: 0" width="300" trigger="click">
<div style="display: flex;flex-direction: column;">
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<em>{{$t("Operation.Op_salesPlat")}}</em>
<el-checkbox v-model="scope.row.checkDialogAll" @change="(val)=>{getcheckAllDialog(val,scope.$index)}" style="margin-right: 20px">
{{ $t("system.table_chekAll") }}</el-checkbox>
</div>
<div style="display: flex;align-items: center;">
<el-checkbox-group v-model="scope.row.ckedplat" @change="(value)=>{getcheckDialog(value,scope.$index)}">
<el-checkbox v-for="sales in $tripUtils.TeamStatesList.salsPlat" :label="sales.Id" :key="sales.Name">
{{ sales.Name }}</el-checkbox>
</el-checkbox-group>
</div>
<el-button
:disabled="!scope.row.ckedplat.length"
:loading="PlatformLoading"
type="primary" size="small" style="margin-top: 10px"
@click="setPlatform(scope.row,'copy')"
>{{ $t('pub.saveBtn') }}</el-button>
</div>
<el-tooltip slot="reference"
effect="dark"
:content="$t('fnc.pingtai')"
placement="top-start"
>
<el-button
type="primary"
style="background:#F0A748; border-color:#F0A748"
icon="el-icon-data-board"
></el-button>
</el-tooltip>
</el-popover>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -648,6 +708,10 @@ export default { ...@@ -648,6 +708,10 @@ export default {
VisaStatus: "-1", VisaStatus: "-1",
isFinacial: 1, isFinacial: 1,
BranchId: "-1", BranchId: "-1",
SalePlat: '',
ckedplat: [],
//弹出框全选
checkDialogAll: false,
}, },
addMsg: { addMsg: {
Id: 0, Id: 0,
...@@ -711,7 +775,9 @@ export default { ...@@ -711,7 +775,9 @@ export default {
VisaManagementList: [], VisaManagementList: [],
// buttonshow:false, // buttonshow:false,
Type:0, Type:0,
CurrentUserInfo:{},
SaleB2COrWeChatStatus: true, //上架B2C或者微信小程序
PlatformLoading: false,
}; };
}, },
created(){ created(){
...@@ -719,9 +785,68 @@ export default { ...@@ -719,9 +785,68 @@ export default {
// if (locationName.indexOf('viitto') !== -1 || locationName.indexOf('www') !== -1){ // if (locationName.indexOf('viitto') !== -1 || locationName.indexOf('www') !== -1){
// this.buttonshow=true; // this.buttonshow=true;
// } // }
let userInfo = this.getLocalStorage();
// 团提成权限
let ActionMenuCode = userInfo.ActionMenuCode;
if (ActionMenuCode.indexOf("SaleB2COrWeChat") != -1) {
this.SaleB2COrWeChatStatus = false;
}
this.CurrentUserInfo = userInfo;
}, },
methods: { methods: {
setPlatform(item){
let msg = {
Pid: item.Id,
SalePlat: item.ckedplat.join(","),
};
this.PlatformLoading = true
this.apipost(
"dmc_post_visa_SetVisaProductSalePlat",
msg,
res => {
this.PlatformLoading = false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
},
err => {
this.PlatformLoading = false
this.Error(err.message);
}
);
},
//全选弹出框
getcheckAllDialog(val,index) {
this.dataList[index].ckedplat = [];
if (val) {
this.$tripUtils.TeamStatesList.salsPlat.forEach((x) => {
this.dataList[index].ckedplat.push(x.Id);
});
}
},
getcheckDialog(value) {
let checkedCount = value.length;
this.dataList[index].checkDialogAll =
checkedCount === this.$tripUtils.TeamStatesList.salsPlat.length;
},
//全选弹出框
checkAllDialog(val) {
this.msg.ckedplat = [];
if (val) {
this.$tripUtils.TeamStatesList.salsPlat.forEach((x) => {
this.msg.ckedplat.push(x.Id);
});
}
},
checkDialog(value) {
let checkedCount = value.length;
this.msg.checkDialogAll =
checkedCount === this.$tripUtils.TeamStatesList.salsPlat.length;
},
// 只能查看,不能修改 // 只能查看,不能修改
ChaKan(item){ ChaKan(item){
this.$router.push({ this.$router.push({
...@@ -909,6 +1034,7 @@ export default { ...@@ -909,6 +1034,7 @@ export default {
}); });
}, },
getList() { getList() {
this.msg.SalePlat = this.msg.ckedplat.length>0?this.msg.ckedplat.join(','):'';
// 获取列表数据 // 获取列表数据
this.apipost( this.apipost(
"dmc_get_visa_GetVisaProductList", "dmc_get_visa_GetVisaProductList",
...@@ -918,7 +1044,24 @@ export default { ...@@ -918,7 +1044,24 @@ export default {
this.loading = false; this.loading = false;
this.dataList = []; this.dataList = [];
} else { } else {
let arrList = function(arr) {
arr.forEach(x=>{
x.ckedplat = []
x.checkDialogAll = false
x.SalePlat = ''
})
}
arrList(res.data.data.pageData)
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.dataList.forEach(x=>{
if(x.SalePlatList.length>0){
x.ckedplat = x.SalePlatList
if(x.SalePlatList.length==this.$tripUtils.TeamStatesList.salsPlat.length){
x.checkDialogAll = true
}
x.SalePlat = x.SalePlatList.split(',')
}
})
this.total = res.data.data.count; this.total = res.data.data.count;
this.loading = false; this.loading = false;
} }
......
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