Commit 978ca170 authored by 吴春's avatar 吴春

企业代付

parent d3c8219a
...@@ -849,6 +849,8 @@ export const obj = { ...@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: 'Account Limits', zhanghaoxiane: 'Account Limits',
xiugaiyonghuxx: 'Modify user information', xiugaiyonghuxx: 'Modify user information',
danjujiaojie: 'Handover of documents', danjujiaojie: 'Handover of documents',
AlipayBind: 'Bind Alipay account',
AlipayUpdate: 'Delete Alipay account',
qrxingmimats: 'Confirm password: uppercase + lowercase + numbers or? ! & $% #', qrxingmimats: 'Confirm password: uppercase + lowercase + numbers or? ! & $% #',
xiugaidlsj: 'Modify login phone', xiugaidlsj: 'Modify login phone',
zhanghaozmszzcmm: 'Account size is 6-18 alphanumeric characters', zhanghaozmszzcmm: 'Account size is 6-18 alphanumeric characters',
......
...@@ -849,6 +849,8 @@ export const obj = { ...@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: '账号限额', zhanghaoxiane: '账号限额',
xiugaiyonghuxx: '修改用户信息', xiugaiyonghuxx: '修改用户信息',
danjujiaojie: '单据交接', danjujiaojie: '单据交接',
AlipayBind: '绑定支付宝账号',
AlipayUpdate: '删除支付宝账号',
qrxingmimats: '确认密码:大写字母+小写字母+数字或?!&$%#', qrxingmimats: '确认密码:大写字母+小写字母+数字或?!&$%#',
xiugaidlsj: '修改登录手机', xiugaidlsj: '修改登录手机',
zhanghaozmszzcmm: '账号为6-18位字母数字组成', zhanghaozmszzcmm: '账号为6-18位字母数字组成',
......
...@@ -849,6 +849,8 @@ export const obj = { ...@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: '賬號限額', zhanghaoxiane: '賬號限額',
xiugaiyonghuxx: '修改用戶信息', xiugaiyonghuxx: '修改用戶信息',
danjujiaojie: '單據交接', danjujiaojie: '單據交接',
AlipayBind: '綁定支付寶帳號',
AlipayUpdate: '删除支付寶帳號',
qrxingmimats: '確認密碼:大寫字母+小寫字母+數字或?!&$%#', qrxingmimats: '確認密碼:大寫字母+小寫字母+數字或?!&$%#',
xiugaidlsj: '修改登錄手機', xiugaidlsj: '修改登錄手機',
zhanghaozmszzcmm: '賬號爲6-18位字母數字組成', zhanghaozmszzcmm: '賬號爲6-18位字母數字組成',
......
This diff is collapsed.
This diff is collapsed.
...@@ -964,12 +964,22 @@ ...@@ -964,12 +964,22 @@
@click="goFncUrl('DebitNote', subItem.FinanceId)">借支单</span></p> @click="goFncUrl('DebitNote', subItem.FinanceId)">借支单</span></p>
</td> </td>
<td width="80" class="_zhidan"> <td width="80" class="_zhidan">
<template v-if="myLineId==90"> <template v-if="myLineId==90">
<div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney"> <div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney">
<template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS"> <template v-for="leadr in cur.LeaderGetPriceArr" v-if=" leadr.TCNUMS == item.TCNUMS">
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top"> <el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" /> <input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</el-tooltip> </el-tooltip>
<template v-if="item.CompanyAlipay==0&&leadr.CurrencyId===1">
<el-tooltip class="item" effect="dark" placement="top" :content="currencyTypeObj[leadr.CurrencyId]" >
<input style="margin-top:5px;" type="button" value="开启企业代收代付" class="normalBtn" @click="OpenCompanyAlipay(item,0,leadr,cur)" />
</el-tooltip>
</template>
<template v-else-if="item.CompanyAlipay===1">
<span style="color:red;"> 已开启企业代付</span>
</template>
</template> </template>
</div> </div>
</template> </template>
...@@ -982,14 +992,23 @@ ...@@ -982,14 +992,23 @@
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top"> <el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" /> <input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</el-tooltip> </el-tooltip>
<template v-if="item.CompanyAlipay==0&&leadr.CurrencyId===1">
<el-tooltip class="item" effect="dark" placement="top" :content="currencyTypeObj[leadr.CurrencyId]" >
<input style="margin-top:5px;" type="button" value="开启企业代收代付" class="normalBtn" @click="OpenCompanyAlipay(item,0,leadr,cur)" />
</el-tooltip>
</template> </template>
<template v-else-if="item.CompanyAlipay===1&&leadr.CurrencyId===1">
<span style="color:red;text-decoration: underline;" @click="GoCompanyAlipay(item)"> 已开启企业代付</span>
</template>
</template>
<template v-else-if="!item.hideZDBtn && index2==0"> <template v-else-if="!item.hideZDBtn && index2==0">
<span>超过五天时间限制,无法制单</span> <span>超过五天时间限制,无法制单</span>
</template> </template>
</template> </template>
</div> </div>
</template> </template>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -1075,10 +1094,21 @@ ...@@ -1075,10 +1094,21 @@
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
<el-dialog :visible.sync="ShowCompanyAlipay" width="800px" title="费控制度" @close="clearMsg()">
<companyalipay ref="companyalipay" @change="getMsg" :UseTotalPrice="UseTotalPrice" :CompanyAlipayTCID="CompanyAlipayTCID" :TeamStartDateList="TeamStartDateList" >
</companyalipay>
<el-row :gutter="20">
<el-col style="text-align: right;margin-bottom:20px;" :style="msgCompanyAlipay.QuotaCreateList&&msgCompanyAlipay.QuotaCreateList.length>0? 'margin-top:20px;':''">
<input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="clearMsg()" />
<input type="button" class="normalBtn" :value="$t('pub.saveBtn')" @click="SaveQuota()" />
</el-col>
</el-row>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import commonHotelInfo from "../commonPage/commonHotelInfo.vue"; import commonHotelInfo from "../commonPage/commonHotelInfo.vue";
import companyalipay from '../commonPage/companyalipay.vue';
import { import {
constants constants
} from "os"; } from "os";
...@@ -1146,10 +1176,16 @@ ...@@ -1146,10 +1176,16 @@
myLineId: 0, //zk新增 myLineId: 0, //zk新增
comRate: 1, //公用乘以 zk新增 comRate: 1, //公用乘以 zk新增
msgList: [], msgList: [],
ShowCompanyAlipay:false,
CompanyAlipayTCID:0,
msgCompanyAlipay: {},
TeamStartDateList:[],
UseTotalPrice:0,
}; };
}, },
components: { components: {
commonHotelInfo commonHotelInfo,
companyalipay
}, },
methods: { methods: {
//用款计划下载 //用款计划下载
...@@ -1200,6 +1236,16 @@ ...@@ -1200,6 +1236,16 @@
} }
}); });
}, },
GoCompanyAlipay(obj){
let routeData = this.$router.resolve({
name: 'AlipayManagementDetail',
query: {
Id: obj.TCIDS,
searchTitle: '费控制度详情'
}
})
window.open(routeData.href, '_blank')
},
goUrl(_orderSource, _type) { goUrl(_orderSource, _type) {
if (_orderSource == 8) { if (_orderSource == 8) {
this.AddOutDetail() this.AddOutDetail()
...@@ -1572,6 +1618,110 @@ ...@@ -1572,6 +1618,110 @@
this.goZhiDan2(obj, num, leadr, cur); this.goZhiDan2(obj, num, leadr, cur);
} }
}, },
getMsg(msg){
this.msgCompanyAlipay=JSON.parse(JSON.stringify(msg));
},
SaveQuota(){
let leaderGetPrice=0;
//leadr.LeaderGetPriceT
if(this.msgCompanyAlipay.QuotaCreateList&&this.msgCompanyAlipay.QuotaCreateList.length>0){
this.msgCompanyAlipay.QuotaCreateList.forEach((x,index)=>{
leaderGetPrice+=Number(x.QuotaValue);
if (x.effectiveDateList && x.effectiveDateList.length > 0) {
x.EffectiveStartDate = x.effectiveDateList[0];
x.EffectiveEndDate = x.effectiveDateList[1];
}
else {
x.EffectiveStartDate = '';
x.EffectiveEndDate = '';
this.Error("员工"+x.EmployeeName+"未选择额度有效期");
return;
}
})
}
if(leaderGetPrice>Number(this.UseTotalPrice)){
this.Error("总额度不能超过"+this.UseTotalPrice);
return;
}
if(this.msgCompanyAlipay.EmployeeIdList&&this.msgCompanyAlipay.EmployeeIdList.length>0){
this.msgCompanyAlipay.EmployeeIds=this.msgCompanyAlipay.EmployeeIdList.join(",");
}
else{
this.Error("请选择员工");
return;
}
if(this.msgCompanyAlipay.TCID===0){
this.msgCompanyAlipay.TCID=this.CompanyAlipayTCID;
}
this.apipost('alipay_post_InvoiceInstitutionAndQuotaCreate', this.msgCompanyAlipay, res => {
if(res.data.resultCode == 1) {
this.Success('开启企业代付成功!');
this.clearMsg();
this.getNav();
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {})
},
clearMsg(){
this.msgCompanyAlipay.EmployeeIds="";
this.msgCompanyAlipay.TCID=0;
this.ShowCompanyAlipay=false;
this.CompanyAlipayTCID=0;
this.UseTotalPrice=0;
this.msgCompanyAlipay.EmployeeIdList=[];
this.msgCompanyAlipay.QuotaCreateList=[];
this.msgCompanyAlipay.InstitutionName="";
this.msgCompanyAlipay.InstitutionDesc="";
this.$refs['companyalipay'].clearMsg()
},
OpenCompanyAlipay(obj, num, leadr, cur){
console.log("OpenCompanyAlipay-->obj:",obj);
let totailMoney = (Number(leadr.LeaderGetPriceT) + Number(cur.yiLing)).toFixed(2);
let leadrPlanPrice = 0;
if (leadr && leadr.PlanPrice) {
leadrPlanPrice = leadr.PlanPrice.toFixed(2);
}
if (!num) {
if (totailMoney > leadrPlanPrice) {
if (!leadr.LeaderGetPriceT || leadr.LeaderGetPriceT <= 0) {
return this.$message.error("请输入金额!");
}
}
}
if (this.CurrencyListMoney && this.CurrencyListMoney.length > 0) {
var totalUseMoney = 0; //总领款金额
var totalUsePercentMoney = 0; //总计划领款金额
this.CurrencyListMoney.forEach(rootItem => {
if (rootItem.LeaderGetPriceArr && rootItem.LeaderGetPriceArr.length > 0) {
rootItem.LeaderGetPriceArr.forEach(sitem => {
totalUsePercentMoney = sitem.ShowTotalPrice;
totalUseMoney += Number(sitem.LeaderGetPriceT);
});
}
});
if (totalUseMoney > 0 && totalUsePercentMoney > 0 && totalUseMoney > totalUsePercentMoney) {
this.$message.error("总领款金额不能超过【" + totalUsePercentMoney + "】");
return;
}
}
if (this.list.hotelNoSureInfo !== "") {
this.CompanyAlipayTCID=obj.TCIDS;
this.ShowCompanyAlipay=true;
this.TeamStartDateList=[];
this.TeamStartDateList.push(obj.StartDateStr);
var nowStartDate=new Date(obj.StartDateStr);
nowStartDate.setDate(nowStartDate.getDate() + Number(obj.DayNum));
var Y = nowStartDate.getFullYear() + '-';
var M = (nowStartDate.getMonth() + 1 < 10 ? '0' + (nowStartDate.getMonth() + 1) : nowStartDate.getMonth() + 1) + '-';
var D = (nowStartDate.getDate() < 10 ? '0' + (nowStartDate.getDate()) : nowStartDate.getDate());
this.TeamStartDateList.push(Y + M + D);
this.UseTotalPrice=leadr.LeaderGetPriceT;
console.log("CompanyAlipayTCID222",this.CompanyAlipayTCID);
}
},
addOtherList(index, id) { addOtherList(index, id) {
this.list.OtherOrderReportList.OtherList.push({ this.list.OtherOrderReportList.OtherList.push({
OrderType: "1", OrderType: "1",
......
...@@ -2064,6 +2064,8 @@ ...@@ -2064,6 +2064,8 @@
class="hollowFixedBtn" /> class="hollowFixedBtn" />
<input type="button" value="导出" @click="ExportExcle" class="normalBtn" /> <input type="button" value="导出" @click="ExportExcle" class="normalBtn" />
<input type="button" value="打印" @click.prevent="doPrint" class="normalBtn" /> <input type="button" value="打印" @click.prevent="doPrint" class="normalBtn" />
<input type="button" @click="GoCompanyAlipay(item)" class="hollowFixedBtn" v-if="DataList.CompanyAlipay==1" value="已开启企业代付" />
</div> </div>
<el-dialog custom-class='w350' title="单据转团" :visible.sync="zhuanLoading" center :before-close="initZhuanMsg"> <el-dialog custom-class='w350' title="单据转团" :visible.sync="zhuanLoading" center :before-close="initZhuanMsg">
<el-form label-width="110px"> <el-form label-width="110px">
...@@ -2073,7 +2075,7 @@ ...@@ -2073,7 +2075,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="TransferDocuments">{{$t('pub.saveBtn')}}</button> <button class="normalBtn" type="primary" @click="TransferDocuments">{{$t('pub.saveBtn')}}</button>
<button class="hollowFixedBtn" @click="initZhuanMsg">{{$t('pub.cancelBtn')}}</button> <button class="hollowFixedBtn" @click="initZhuanMsg">{{$t('pub.cancelBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -2879,6 +2881,16 @@ ...@@ -2879,6 +2881,16 @@
}); });
}, },
GoCompanyAlipay(obj){
let routeData = this.$router.resolve({
name: 'AlipayManagementDetail',
query: {
Id: this.TCID,
searchTitle: '费控制度详情'
}
})
window.open(routeData.href, '_blank')
},
//收入跳转 //收入跳转
AddIncomeDetail() { AddIncomeDetail() {
var TCArr = [this.TCID]; var TCArr = [this.TCID];
......
...@@ -145,6 +145,20 @@ ...@@ -145,6 +145,20 @@
<el-button type="primary" class="zidingyiFz" icon="iconfont icon-zhuanhuan2" circle <el-button type="primary" class="zidingyiFz" icon="iconfont icon-zhuanhuan2" circle
@click="goUrl('GetWOrkTransferPageLis', item.EmployeeId)"></el-button> @click="goUrl('GetWOrkTransferPageLis', item.EmployeeId)"></el-button>
</el-tooltip> </el-tooltip>
<!-- AlipayBind: '綁定支付寶帳號',
AlipayUpdate: '更新支付寶帳號', -->
<template v-if="item.AlipayId&&item.AlipayId.length>0">
<el-tooltip class="item" effect="dark" :content="$t('objFill.AlipayUpdate')" placement="top">
<el-button type="primary" class="zidingyiFz" icon="iconfont el-icon-remove" circle
@click="DelAlipayBind(item)"></el-button>
</el-tooltip>
</template>
<template v-else>
<el-tooltip class="item" effect="dark" :content="$t('objFill.AlipayBind')" placement="top">
<el-button type="primary" class="zidingyiFz" icon="iconfont el-icon-question" circle
@click="AlipayBindBase(item)"></el-button>
</el-tooltip>
</template>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -183,7 +197,7 @@ ...@@ -183,7 +197,7 @@
</button> </button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog custom-class="w400" :title="$t('adm.adm_changelogintel')" :visible.sync="updateLoginMobile" center <el-dialog custom-class="w400" :title="$t('adm.adm_changelogintel')" :visible.sync="updateLoginMobile" center
append-to-body :before-close="closeChangeMachieulm"> append-to-body :before-close="closeChangeMachieulm">
<el-form :model="ulmMsg" label-width="100px" :rules="rulesulm" ref="ulmMsg"> <el-form :model="ulmMsg" label-width="100px" :rules="rulesulm" ref="ulmMsg">
...@@ -362,6 +376,40 @@ ...@@ -362,6 +376,40 @@
</button> </button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog custom-class="w400" :title="$t('objFill.AlipayBind')" :visible.sync="AlipayBindShow" center
append-to-body :before-close="closeChangeMachieulm">
<template v-if="AlipayBindMsg.ShareCode&&AlipayBindMsg.ShareCode.length>0">
<div style="display:block;text-align:center;">
<p style="color:red;">请用支付宝扫一扫,扫描当前二维码激活企业支付宝员工信息</p>
<el-image style="width: 100px; height: 100px" :src="'data:image/png;base64,'+AlipayBindMsg.ShareCode" fit="cover"></el-image>
</div>
</template>
<template v-else>
<el-form :model="ulmMsg" label-width="120px" :rules="AlipayBindMsg" ref="AlipayBindMsg">
<el-form-item label="支付宝登录账号" prop="Identity">
<el-input class="w217" type="text" v-model="AlipayBindMsg.Identity" :placeholder="$t('pub.pleaseImport')" >
</el-input>
</el-form-item>
<el-form-item :label="$t('pub.mbPhoneNum')" prop="mbPhoneNum">
<el-input class="w217" type="text" v-model="AlipayBindMsg.EmployeeMobile" :placeholder="$t('pub.pleaseImport')" >
</el-input>
</el-form-item>
</el-form>
</template>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click=" AlipayBaseReset()">
{{ $t("pub.cancelBtn") }}
</button>
<template v-if="AlipayBindMsg.ShareCode.length==0">
<button class="normalBtn" @click="SetAlipayBind()">
{{ $t("pub.sureBtn") }}
</button>
</template>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -558,7 +606,14 @@ ...@@ -558,7 +606,14 @@
layerDepartMentList: [], layerDepartMentList: [],
departMentList: [], departMentList: [],
layerPostList: [], layerPostList: [],
PostList: [] PostList: [],
AlipayBindShow:false,
AlipayBindMsg:{
Id:0,
Identity:"",//identity传已注册支付宝且可以登录支付宝的手机号或邮箱 ;
EmployeeMobile:"",//员工手机号
ShareCode:"",
}
}; };
}, },
mounted() { mounted() {
...@@ -601,6 +656,63 @@ ...@@ -601,6 +656,63 @@
}, },
methods: { methods: {
SetAlipayBind(){
if(this.AlipayBindMsg.ShareCode.length==0){
this.$message.error("请输入支付宝登陆账号");
return ;
}
this.apipost(
"alipay_post_AlipayCommerceEcEmployeeAdd", this.AlipayBindMsg,
res => {
if (res.data.resultCode == 1) {
console.log("res.data",res.data);
this.AlipayBindMsg.ShareCode=res.data.data.SignUrl;
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
},
DelAlipayBind(item){
this.$confirm("是否解绑支付宝账户信息?", this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: "warning",
})
.then(() => {
this.apipost(
"alipay_post_AlipayCommerceEcEmployeeDelete", {Id:item.EmployeeId},
res => {
if (res.data.resultCode == 1) {
this.getList();
} else {
this.$message.error(res.data.message);
}
},
err => {}
);
})
.catch(() => {
this.$message.info("取消解绑支付宝账户");
});
},
AlipayBindBase(obj){
this.AlipayBindShow=true;
this.AlipayBindMsg.Id=obj.EmployeeId;
this.AlipayBindMsg.EmployeeMobile=obj.EmLoginMobile;
this.AlipayBindMsg.ShareCode="";
console.log("AlipayBindBase",this.AlipayBindMsg);
},
AlipayBaseReset(obj){
if(this.AlipayBindMsg.ShareCode&&this.AlipayBindMsg.ShareCode.length>0){
this.getList();
}
this.AlipayBindShow=false;
this.AlipayBindMsg.Id=0;
this.AlipayBindMsg.EmployeeMobile="";
this.AlipayBindMsg.ShareCode="";
},
GetSupperOrderEditAuth() { GetSupperOrderEditAuth() {
var actionCodeNew = this.$AuthCode.F_Finance_Create; var actionCodeNew = this.$AuthCode.F_Finance_Create;
......
<style>
table.companyalipay {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border: 1px solid #DCDFE6;
border-collapse: collapse;
}
/* table.companyalipay th:first {
border: 1px solid #ccc;
padding: 8px;
background-color: #dedede ;
} */
table.companyalipay th {
border: 1px solid #ccc;
padding: 8px;
background-color: #dedede ;
}
table.companyalipay td {
border: 1px solid #DCDFE6;
padding: 8px;
background-color: #ffffff;
}
</style>
<template>
<el-form class="_info_box clearfix " :model="msg" :rules="rules" ref="msg" label-width="120px">
<el-row :gutter="20">
<el-col >
<el-form-item label="制度名称" prop="InstitutionName">
<el-input v-model="msg.InstitutionName" maxlength="20"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col >
<el-form-item label="制度描述" prop="InstitutionDesc">
<el-input v-model="msg.InstitutionDesc" maxlength="200"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col >
<el-form-item label="员工" prop="EmployeeIdList">
<el-select
v-model="msg.EmployeeIdList"
filterable
multiple
placeholder="请选择" @change="AddQuotaCreate()" >
<el-option
v-for="item in EmployeeList"
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
</el-col>
<template v-if="msg.QuotaCreateList&&msg.QuotaCreateList.length>0">
<p></p>
<table class="companyalipay">
<tr style="width:100%;">
<th colspan="4" style="color:red !important; ">员工额度分配信息</th>
</tr>
<tr style="width:100%;">
<th style="width:10%;">员工</th>
<th style="width:20%;">额度(单位:元)</th>
<th style="width:20%;">是否可以转赠</th>
<th style="width:50%;">额度有效时间</th>
</tr>
<tr v-for="(item,index) in msg.QuotaCreateList" :key="index">
<td>{{item.EmployeeName}}</td>
<td> <el-input v-model="item.QuotaValue" maxlength="200"
:placeholder="$t('pub.pleaseImport')" type="number" size="small"></el-input></td>
<td>
<el-radio v-model="item.ShareMode" label="0"></el-radio>
<el-radio v-model="item.ShareMode" label="1"></el-radio>
</td>
<td>
<el-date-picker v-model="item.effectiveDateList" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</td>
</tr>
</table>
</template>
</el-row>
</el-form>
</template>
<script>
export default {
props: ["CompanyAlipayTCID","TeamStartDateList","UseTotalPrice"],
data(){
return{
employeeMsg:{ // 员工
GroupId:'',
BranchId:-1,
DepartmentId:0,
PostId:0,
IsLeave:0,
},
EmployeeList:[],
msg: {
EmployeeIds: "",
EmployeeIdList:[],
TCID: this.CompanyAlipayTCID,
QuotaCreateList: [],
InstitutionName: "",//支付名称 20
InstitutionDesc: "", //制度描述 200
//StandardName: "", //规则名称 string(20)
// RuleName: "", //费控条件名称 string(32)
},
rules: {
InstitutionName: [{
required: true,
message: "请输入支付名称",
trigger: "blur"
}],
EmployeeIdList: [{
required: true,
message: "请选择员工",
trigger: 'change',
type: 'array',
}],
},
}
},
watch:{
msg:{
handler(val, oldVal) {
this.$emit('change',this.msg)
},
deep: true
}
},
methods:{
clearMsg(){
this.msg.EmployeeIds="";
this.msg.TCID=0;
this.msg.EmployeeIdList=[];
this.msg.QuotaCreateList=[];
this.msg.InstitutionName="";
this.msg.InstitutionDesc="";
},
AddQuotaCreate() {
if(this.msg.EmployeeIdList&&this.msg.EmployeeIdList.length>0){
if(this.msg.QuotaCreateList&&this.msg.QuotaCreateList.length==0){
this.msg.EmployeeIdList.forEach((x,index)=>{
var nameIndex=this.EmployeeList.findIndex(item => item.EmployeeId === x) ;
let newQuotaCreateModel ={
EmployeeId:x,
QuotaValue:0,
ShareMode:"0",//0:不可转赠 1:可以转增
EffectiveEndDate:"",
EffectiveStartDate:"",
effectiveDateList: this.TeamStartDateList,
EmployeeName:this.EmployeeList[nameIndex].EmName,
};
this.msg.QuotaCreateList.push(JSON.parse(JSON.stringify(newQuotaCreateModel)));
})
}
else{
//差集
let diff = this.msg.QuotaCreateList.filter(obj1 => !this.msg.EmployeeIdList.some(obj2 => obj1.EmployeeId === obj2 ));
diff.forEach((x,index)=>{
var nameIndex=this.msg.QuotaCreateList.findIndex(item => item.EmployeeId === x.EmployeeId) ;
if(nameIndex!=-1)
{
this.msg.QuotaCreateList.splice(nameIndex, 1);
}
});
this.msg.EmployeeIdList.forEach((x,index)=>{
var nameIndex=this.EmployeeList.findIndex(item => item.EmployeeId === x) ;
if(this.msg.QuotaCreateList.findIndex(item => item.EmployeeId === x) === -1){
let newQuotaCreateModel ={
EmployeeId:x,
QuotaValue:0,
ShareMode:"0",//0:不可转赠 1:可以转增
EffectiveEndDate:"",
EffectiveStartDate:"",
effectiveDateList: this.TeamStartDateList,
EmployeeName:this.EmployeeList[nameIndex].EmName,
};
this.msg.QuotaCreateList.push(JSON.parse(JSON.stringify(newQuotaCreateModel)));
}
})
}
}
else{
this.msg.QuotaCreateList=[];
}
},
getEmployee() { //员工
this.apipost('admin_get_EmployeeGetList', this.employeeMsg, res => {
if(res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
}
}, err => {})
},
},
mounted(){
let userInfo = this.getLocalStorage(); // 读取缓存数据
this.employeeMsg.GroupId = userInfo.RB_Group_id;
this.msg.EmployeeIdList=[];
this.EmployeeList=[];
this.getEmployee();
}
}
</script>
\ No newline at end of file
...@@ -582,7 +582,13 @@ ...@@ -582,7 +582,13 @@
</div> </div>
</div> </div>
</td> </td>
<td></td> <td>
<!-- @click="OpenCompanyAlipay(item)" :class="item.CompanyAlipay==1?'colorE95252':''" -->
<div @click="GoCompanyAlipay(item)" v-if="item.CompanyAlipay==1" class="colorE95252" style="text-decoration: underline;padding-top:5px;padding-bottom:4px;font-size:13px;cursor: pointer;">
已开启企业代付
<!-- {{item.CompanyAlipay==1?"已开启企业代付":"开启企业代付"}} -->
</div>
</td>
</tr> </tr>
</template> </template>
</tbody> </tbody>
...@@ -623,6 +629,17 @@ ...@@ -623,6 +629,17 @@
</ul> </ul>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="ShowCompanyAlipay" width="800px" title="费控制度" @close="clearMsg()">
<companyalipay ref="companyalipay" @change="getMsg" :CompanyAlipayTCID="CompanyAlipayTCID" :TeamStartDateList="TeamStartDateList" >
</companyalipay>
<el-row :gutter="20">
<el-col style="text-align: right;margin-bottom:20px;" :style="msgCompanyAlipay.QuotaCreateList&&msgCompanyAlipay.QuotaCreateList.length>0? 'margin-top:20px;':''">
<input type="button" class="hollowFixedBtn" :value="$t('pub.cancelBtn')" @click="clearMsg()" />
<input type="button" class="normalBtn" :value="$t('pub.saveBtn')" @click="SaveQuota()" />
</el-col>
</el-row>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -630,6 +647,7 @@ ...@@ -630,6 +647,7 @@
import commonHotelInfo from "../../commonPage/commonHotelInfo.vue"; import commonHotelInfo from "../../commonPage/commonHotelInfo.vue";
import commonTeamInfo from "../../commonPage/commonTeamInfo.vue"; import commonTeamInfo from "../../commonPage/commonTeamInfo.vue";
import priceDialog from '../../TravelManager/TravelNewQuotation/priceDialog.vue'; import priceDialog from '../../TravelManager/TravelNewQuotation/priceDialog.vue';
import companyalipay from '../../commonPage/companyalipay.vue';
export default { export default {
data() { data() {
return { return {
...@@ -707,6 +725,10 @@ ...@@ -707,6 +725,10 @@
cityId: 0, cityId: 0,
orderId: 0 orderId: 0
}, },
ShowCompanyAlipay:false,
CompanyAlipayTCID:0,
msgCompanyAlipay: {},
TeamStartDateList:[],//出发时间和截止日期
//合团团酒店列表 //合团团酒店列表
TeamHotelList: [], TeamHotelList: [],
LeaderList: [], LeaderList: [],
...@@ -783,10 +805,73 @@ ...@@ -783,10 +805,73 @@
tripDownLoadCommon, tripDownLoadCommon,
commonHotelInfo, commonHotelInfo,
commonTeamInfo, commonTeamInfo,
priceDialog priceDialog,
companyalipay
}, },
methods: { methods: {
getMsg(msg){
this.msgCompanyAlipay=JSON.parse(JSON.stringify(msg));
},
SaveQuota(){
if(this.msgCompanyAlipay.QuotaCreateList&&this.msgCompanyAlipay.QuotaCreateList.length>0){
this.msgCompanyAlipay.QuotaCreateList.forEach((x,index)=>{
if (x.effectiveDateList && x.effectiveDateList.length > 0) {
x.EffectiveStartDate = x.effectiveDateList[0];
x.EffectiveEndDate = x.effectiveDateList[1];
}
else {
x.EffectiveStartDate = '';
x.EffectiveEndDate = '';
this.Error("员工"+x.EmployeeName+"未选择额度有效期");
return;
}
})
}
if(this.msgCompanyAlipay.EmployeeIdList&&this.msgCompanyAlipay.EmployeeIdList.length>0){
this.msgCompanyAlipay.EmployeeIds=this.msgCompanyAlipay.EmployeeIdList.join(",");
}
else{
this.Error("请选择员工");
return;
}
this.apipost('alipay_post_InvoiceInstitutionAndQuotaCreate', this.msgCompanyAlipay, res => {
if(res.data.resultCode == 1) {
}
}, err => {})
},
clearMsg(){
this.msgCompanyAlipay.EmployeeIds="";
this.msgCompanyAlipay.TCID=0;
this.ShowCompanyAlipay=false;
this.CompanyAlipayTCID=0;
this.msgCompanyAlipay.EmployeeIdList=[];
this.msgCompanyAlipay.QuotaCreateList=[];
this.msgCompanyAlipay.InstitutionName="";
this.msgCompanyAlipay.InstitutionDesc="";
this.$refs['companyalipay'].clearMsg()
},
GoCompanyAlipay(obj){
let routeData = this.$router.resolve({
name: 'AlipayManagementDetail',
query: {
Id: obj.TCID,
searchTitle: '费控制度详情'
}
})
window.open(routeData.href, '_blank')
},
OpenCompanyAlipay(obj){
this.CompanyAlipayTCID=obj.TCID;
this.ShowCompanyAlipay=true;
this.TeamStartDateList=[];
this.TeamStartDateList.push(obj.StartDateStr);
var nowStartDate=new Date(obj.StartDateStr);
nowStartDate.setDate(nowStartDate.getDate() + Number(obj.DayNum));
var Y = nowStartDate.getFullYear() + '-';
var M = (nowStartDate.getMonth() + 1 < 10 ? '0' + (nowStartDate.getMonth() + 1) : nowStartDate.getMonth() + 1) + '-';
var D = (nowStartDate.getDate() < 10 ? '0' + (nowStartDate.getDate()) : nowStartDate.getDate());
this.TeamStartDateList.push(Y + M + D);
},
//推送消息 //推送消息
PushMessage(obj, item) { PushMessage(obj, item) {
var pMsg = { var pMsg = {
...@@ -1337,7 +1422,7 @@ ...@@ -1337,7 +1422,7 @@
DownLoadGuestList(item, outItem, index) { DownLoadGuestList(item, outItem, index) {
this.loading = true; this.loading = true;
var nDmcNum = outItem.NewCombinationNum; var nDmcNum = outItem.NewCombinationNum;
if (outItem.PriceCommonList.length > 1) { if (outItem.PriceCommonLis&&outItem.PriceCommonList.length > 1) {
var NIndex = index + 1; var NIndex = index + 1;
nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex; nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex;
} }
...@@ -1361,7 +1446,7 @@ ...@@ -1361,7 +1446,7 @@
DownLoadGuestTelList(item, outItem, index) { DownLoadGuestTelList(item, outItem, index) {
this.loading = true; this.loading = true;
var nDmcNum = outItem.NewCombinationNum; var nDmcNum = outItem.NewCombinationNum;
if (outItem.PriceCommonList.length > 1) { if (outItem.PriceCommonList&&outItem.PriceCommonList.length > 1) {
var NIndex = index + 1; var NIndex = index + 1;
nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex; nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex;
} }
......
...@@ -2055,6 +2055,22 @@ export default { ...@@ -2055,6 +2055,22 @@ export default {
title: '用款计划' title: '用款计划'
}, },
}, },
{
path: '/AlipayManagement', //企业代付查询
name: 'AlipayManagement',
component: resolve => require(['@/components/LeaderManagement/AlipayManagement'], resolve),
meta: {
title: '企业代付'
},
},
{
path: '/AlipayManagementDetail', //企业代付详情
name: 'AlipayManagementDetail',
component: resolve => require(['@/components/LeaderManagement/AlipayManagementDetail'], resolve),
meta: {
title: '企业代付查询'
},
},
{ {
path: '/leaderTaskBoard', //任务看板 path: '/leaderTaskBoard', //任务看板
name: 'leaderTaskBoard', name: 'leaderTaskBoard',
......
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