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

企业代付

parent d3c8219a
......@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: 'Account Limits',
xiugaiyonghuxx: 'Modify user information',
danjujiaojie: 'Handover of documents',
AlipayBind: 'Bind Alipay account',
AlipayUpdate: 'Delete Alipay account',
qrxingmimats: 'Confirm password: uppercase + lowercase + numbers or? ! & $% #',
xiugaidlsj: 'Modify login phone',
zhanghaozmszzcmm: 'Account size is 6-18 alphanumeric characters',
......
......@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: '账号限额',
xiugaiyonghuxx: '修改用户信息',
danjujiaojie: '单据交接',
AlipayBind: '绑定支付宝账号',
AlipayUpdate: '删除支付宝账号',
qrxingmimats: '确认密码:大写字母+小写字母+数字或?!&$%#',
xiugaidlsj: '修改登录手机',
zhanghaozmszzcmm: '账号为6-18位字母数字组成',
......
......@@ -849,6 +849,8 @@ export const obj = {
zhanghaoxiane: '賬號限額',
xiugaiyonghuxx: '修改用戶信息',
danjujiaojie: '單據交接',
AlipayBind: '綁定支付寶帳號',
AlipayUpdate: '删除支付寶帳號',
qrxingmimats: '確認密碼:大寫字母+小寫字母+數字或?!&$%#',
xiugaidlsj: '修改登錄手機',
zhanghaozmszzcmm: '賬號爲6-18位字母數字組成',
......
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.appmenumanage .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
}
.avatar {
width: 50px;
height: 50px;
display: block;
}
</style>
<template>
<div class="flexOne appmenumanage">
<!-- 导游,团号,交易日期,流水,金额,摘要 -->
<div class="query-box">
<ul>
<li>
<span>
<em>{{$t('visa.v_tuanhao')}}</em>
<el-input v-model='msg.TCNUM'></el-input>
</span>
</li>
<li>
<span>
<em>费控制度名称</em>
<el-input v-model='msg.InstitutionName'></el-input>
</span>
</li>
<li><span><em>{{$t('fnc.jiaoyiriqi')}}</em>
<el-date-picker v-model='msg.PayStartTime' class='w135' value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateBefore"></el-date-picker>
-
<el-date-picker v-model='msg.PayEndTime' class='w135' value-format="yyyy-MM-dd" type="date"
:picker-options="pickerBeginDateAfter"></el-date-picker>
</span>
</li>
<li><span><em>金额</em>
<el-input v-model='msg.PayStartPrice' class='w135' type="number"></el-input>
-
<el-input v-model='msg.PayEndPrice' class='w135' type="number" ></el-input>
</span>
</li>
<li>
<span>
<em>{{$t('ground.ldleixing')}}</em>
<el-select v-model="msg.LeaderType" class="multiple_input" :placeholder="$t('pub.pleaseSel')"
@change="GetLeaderList()">
<el-option :label="$t('pub.pleaseSel')" :value='0' :key='0'>
</el-option>
<el-option :label="$t('leader.leader_Leader')" :value='1' :key='1'>
</el-option>
<el-option :label="$t('ground.ljiandao')" :value='2' :key='2'>
</el-option>
<el-option :label="$t('leader.leader_Guide')" :value='3' :key='3'>
</el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>{{$t('leader.leader_leaderGuid')}}</em>
<el-select v-model="msg.QLeaderId" filterable class="multiple_input" :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value="0">
</el-option>
<el-option v-for="item in LeaderList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getList();resetPageIndex()" />
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<th >团号</th>
<th >制度名称</th>
<th>制度有效期</th>
<th>员工</th>
<th>制度状态</th> <!--停用: 0 启用: 1 -->
<th>创建人</th>
<th>创建时间</th>
<th width="130">{{$t('hotel.table_operat')}}</th>
</tr>
<tr v-for="(item,index) in DataList">
<td>{{item.TCNUM}}{{item.TCID}}</td>
<td>{{item.InstitutionName}}</td>
<td>{{item.EffectiveStartDate }}-{{item.EffectiveEndDate }}</td>
<td>{{item.EmployeeIdName}}</td>
<td>{{item.Effective==1?'开启':'停用'}}</td>
<td>{{item.CreateByName}}</td>
<td>{{item.CreateTimeStr}}</td>
<td>
<el-row>
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start">
<el-button @click="AddMsgBaseInfo(item)" type="primary"
icon="el-icon-edit" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start" >
<el-button type="danger" icon="el-icon-delete" @click="delInstitution(item)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('leader.leader_Set')" placement="top-start">
<el-button type="info" icon="el-icon-setting" @click="goUrl(item)" circle>
</el-button>
</el-tooltip>
</el-row>
</td>
</tr>
</table>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total='total'>
</el-pagination>
<el-dialog custom-class='w500' :title="dialogTitle" :visible.sync="outerVisible" center
:before-close="clearAddMsg">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="制度名称" prop="InstitutionName">
<el-input maxlength='20' class='w200' type="text" v-model="addMsg.InstitutionName"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="费控描述" prop="MenuUrl">
<el-input maxlength='200' class='w200' type="text" v-model="addMsg.InstitutionDesc"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="制度有效期" prop="Sort">
<el-date-picker v-model="addMsg.effectiveDateList" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="制度状态">
<el-switch v-model="addMsg.Effective" active-value="0" active-color="#ff4949" inactive-color="#13ce66" active-text="停用" inactive-value="1" inactive-text="启用"></el-switch>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="clearAddMsg()">
{{$t('pub.cancelBtn')}}
</button> &nbsp;
<button class="normalBtn" type="primary" @click="UpdateInvoiceInstitutionModify()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
DataList: '',
total: 0,
pageSize: '',
currentPage: 1,
LeaderList:[],//领队/导游list
msg: {
pageIndex: 1,
pageSize: 10,
TCNUM: '',
TCID:0,
InstitutionName: "",
LeaderType: 0, //领队导游类型
QLeaderId: 0, //领队导游编号
PayStartTime: '',
PayEndTime: '',
PayStartPrice:"",
PayEndPrice:"",
},
addMsg:{
InstitutionName:"",//制度名称
Id:0,
Effective:0,//是否启用 停用: 0 启用: 1
InstitutionDesc:"",//费控描述
EffectiveEndDate:"",
EffectiveStartDate:"",
effectiveDateList:[],
},
outerVisible:false,
dialogTitle:"编辑费控制度",
rules: {
InstitutionName: [{
required: true,
message: "请输入支付名称",
trigger: "blur"
}],
effectiveDateList: [{
required: true,
message: "请选择费控时间有效期",
trigger: 'blur',
}],
},
currentUpdateIndex: -1,
pickerBeginDateBefore: {
disabledDate: time => {
if (this.msg.PayEndTime == null) {
return false;
} else {
let endTime = new Date(this.msg.PayEndTime)
return endTime.getTime() < time.getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.msg.PayStartTime)
return startTime.getTime() >= time.getTime()
}
},
}
},
mounted() {
this.getList();
},
methods: {
delInstitution(obj){
this.$confirm("确认删除费控制度", this.$t("tips.tips"), {
confirmButtonText: this.$t("pub.sureBtn"),
cancelButtonText: this.$t("pub.cancelBtn"),
type: "warning"
}
)
.then(() => {
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionDelete', {Id:obj.ID}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
})
.catch(() => {
return false;
});
},
UpdateInvoiceInstitutionModify() { //制度编辑
if(this.addMsg.effectiveDateList&&this.addMsg.effectiveDateList.length>0){
this.addMsg.EffectiveStartDate=this.addMsg.effectiveDateList[0];
this.addMsg.EffectiveEndDate=this.addMsg.effectiveDateList[1];
}
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionModify', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.clearAddMsg();
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
AddMsgBaseInfo(obj){//给编辑数据赋值
console.log("obj",obj);
this.addMsg.InstitutionName=obj.InstitutionName;//制度名称
this.addMsg.Id=obj.ID;
this.outerVisible=true,
this.addMsg.Effective=obj.Effective;//是否启用 停用: 0 启用: 1
this.addMsg.InstitutionDesc=obj.InstitutionDesc;//费控描述
this.addMsg.EffectiveEndDate=obj.EffectiveEndDate;
this.addMsg.EffectiveStartDate=obj.EffectiveStartDate;
this.addMsg.effectiveDateList=[];
this.addMsg.effectiveDateList.push(obj.EffectiveStartDate);
this.addMsg.effectiveDateList.push(obj.EffectiveEndDate);
},
clearAddMsg(){//清空编辑数据
this.InstitutionName="";//制度名称
this.Id=0;
this.outerVisible=false,
this.Effective=0;//是否启用 停用: 0 启用: 1
this. InstitutionDesc="";//费控描述
this. EffectiveEndDate="";
this.EffectiveStartDate="";
this. effectiveDateList=[];
},
getList() { //列表查询
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionPageinfoQuery', this.msg, res => {
if (res.data.resultCode == 1) {
this.DataList = res.data.data.pageData;
this.total = res.data.data.count;
}
}, err => {
})
},
goUrl(obj){
let routeData = this.$router.resolve({
name: 'AlipayManagementDetail',
query: {
Id: obj.TCID,
Type: 1,
searchTitle: '费控制度详情'
}
})
window.open(routeData.href, '_blank')
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
resetPageIndex() {
this.msg.pageIndex = 1
this.currentPage = 1
},
GetLeaderList(){ //获取领队和导游
this.LeaderList = [];
this.msg.QLeaderId = 0;
let msg = { Type: this.msg.LeaderType, }
this.apipost(
'leader_post_GetList', msg,
res => {
if (res.data.resultCode == 1) {
this.LeaderList = res.data.data;
}
},
err => {} )
},
}
}
</script>
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.appmenumanage .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
}
.avatar {
width: 50px;
height: 50px;
display: block;
}
table.companyalipay {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border: 1px solid #DCDFE6;
border-collapse: collapse;
}
table.companyalipay th {
border: 1px solid #ccc;
padding: 8px;
background-color: #dedede ;
}
table.companyalipay td {
border: 1px solid #DCDFE6;
padding: 8px;
background-color: #ffffff;
text-align:center;
}
</style>
<template>
<div class="flexOne appmenumanage">
<div class="query-box" >
<div style="width:90%;">
<el-form class="_info_box clearfix " label-width="120px" size="mini">
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="制度名称" >
{{DataList.InstitutionName}}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="制度描述" >
{{DataList.InstitutionDesc}}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="制度状态" >
{{DataList.Effective==1?"启用":"停用"}}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="制度有效期" >
{{DataList.EffectiveStartDate}}-{{DataList.EffectiveEndDate}}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="10">
<el-form-item label="员工" >
{{DataList.EmployeeName}}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" style="margin-bottom:10px;" v-if="IsEdit==1">
<el-col :span="10">
<input type="button" class="normalBtn" value="修改制度" @click="AddMsgBaseInfo(DataList)" />
<input type="button" class="normalBtn" value="修改员工" @click="EditEmployee()" />
</el-col>
</el-row>
<el-row :gutter="10">
<template v-if="DataList.QuotaList&&DataList.QuotaList.length>0">
<table class="companyalipay">
<tr style="width:100%;">
<th :colspan="IsEdit==1?'8':'7'" style="color:red !important; ">员工额度分配信息</th>
</tr>
<tr style="width:100%;">
<th style="width:10%;">员工</th>
<th style="width:10%;">额度(单位:元)</th>
<th style="width:10%;">可用金额(单位:元)</th>
<th style="width:10%;">已用金额(单位:元)</th>
<th style="width:10%;">锁定金额(单位:元)</th>
<th style="width:5%;">是否可以转赠</th>
<th style="width:20%;">额度有效时间</th>
<th style="width:10%;" v-if="IsEdit==1">操作</th>
</tr>
<tr v-for="(item,index) in DataList.QuotaList" :key="index">
<td>{{item.EmployeeName}}</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.QuotaValue}}</template>
</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.QuotaAvailable}}</template>
</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.QuotaUsed}}</template>
</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.QuotaLocked}}</template>
</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.ShareMode==0?'否':''}}</template>
</td>
<td>
<template v-if="item.Id&&item.Id>0"> {{item.EffectiveStartDate}}-{{item.EffectiveEndDate}}</template>
</td>
<!-- <td>
<template v-if="item.QuotaTotal&&item.QuotaTotal>0">
<div>可用金额:{{item.QuotaAvailable}}</div>
<div>锁定金额:{{item.QuotaLocked}}</div>
<div>已用金额:{{item.QuotaUsed}}</div>
</template>
<span>刷新</span>
</td> -->
<td v-if="IsEdit==1">
<template v-if="item.Id&&item.Id>0">
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start">
<el-button @click="AddQuota(item)" type="primary" icon="el-icon-edit" circle></el-button>
</el-tooltip>
</template>
<template v-else>
<el-tooltip class="item" effect="dark" :content="$t('pub.addBtn')" placement="top-start">
<el-button @click="AddNewMsgQuota(item)" type="primary" icon="el-icon-edit" circle></el-button>
</el-tooltip>
</template>
</td>
</tr>
</table>
</template>
</el-row>
</el-form>
</div>
<el-dialog custom-class='w500' title="修改员工可用额度" :visible.sync="AddMsgQuotaShow" center
:before-close="clearMsgQuota">
<el-form :model="AddMsgQuota" :rules="rules" ref="AddMsgQuota" label-width="120px">
<span style="color:red;">使用过的额度不支持删除</span>
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="现有额度" >
{{AddMsgQuota.TotalPrice}}
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="类型" prop="action">
<el-radio v-model="AddMsgQuota.action" label="1">增加额度</el-radio>
<el-radio v-model="AddMsgQuota.action" label="2">减少额度</el-radio>
<el-radio v-model="AddMsgQuota.action" label="3">删除额度</el-radio>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="是否可以转赠" prop="ShareMode">
<el-radio v-model="AddMsgQuota.ShareMode" label="0"></el-radio>
<el-radio v-model="AddMsgQuota.ShareMode" label="1"></el-radio>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="额度(单位:元)" prop="Amount">
<el-input type="number" v-model="AddMsgQuota.Amount"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="clearMsgQuota()">
{{$t('pub.cancelBtn')}}
</button> &nbsp;
<button class="normalBtn" type="primary" @click="AddQuotaModify()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
<el-dialog custom-class='w500' title="新增员工可用额度" :visible.sync="NewMsgQuotaShow" center
:before-close="clearNewMsgQuota">
<el-form :model="NewMsgQuota" :rules="NewMsgRules" ref="NewMsgQuota" label-width="120px">
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="员工" >
{{NewMsgQuota.EmployeeName}}
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="是否可以转赠" prop="ShareMode">
<el-radio v-model="NewMsgQuota.ShareMode" label="0"></el-radio>
<el-radio v-model="NewMsgQuota.ShareMode" label="1"></el-radio>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="额度(单位:元)" prop="QuotaValue">
<el-input type="number" v-model="NewMsgQuota.QuotaValue"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="额度有效期" prop="EffectiveDateList">
<el-date-picker v-model="NewMsgQuota.EffectiveDateList" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="clearNewMsgQuota()">
{{$t('pub.cancelBtn')}}
</button> &nbsp;
<button class="normalBtn" type="primary" @click="AddNewMsgQuotaModify()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
<el-dialog custom-class='w500' :title="dialogTitle" :visible.sync="outerVisible" center
:before-close="clearAddMsg">
<el-form :model="addMsg" :rules="rulesMsg" ref="addMsg" label-width="120px">
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="费控制度名称" prop="InstitutionName">
<el-input maxlength='20' class='w200' type="text" v-model="addMsg.InstitutionName"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="费控描述" prop="MenuUrl">
<el-input maxlength='200' class='w200' type="text" v-model="addMsg.InstitutionDesc"
:placeholder="$t('pub.pleaseImport')"></el-input>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="制度生效时间" prop="Sort">
<el-date-picker v-model="addMsg.effectiveDateList" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="是否启用">
<el-switch v-model="addMsg.Effective" active-value="0" active-color="#ff4949" inactive-color="#13ce66" active-text="停用" inactive-value="1" inactive-text="启用"></el-switch>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="clearAddMsg()">
{{$t('pub.cancelBtn')}}
</button> &nbsp;
<button class="normalBtn" type="primary" @click="UpdateInvoiceInstitutionModify()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
<el-dialog custom-class='w500' title="修改员工" :visible.sync="EditEmployeeShow" center
:before-close="clearEditEmployeeMsg">
<el-form :model="EditEmployeeMsg" :rules="EditEmployeerules" ref="EditEmployeeMsg" label-width="120px">
<table class="layerNoIcon">
<tr>
<td>
<el-form-item label="员工" prop="EmployeeIdList">
<el-select
v-model="EditEmployeeMsg.EmployeeIdList"
filterable
multiple
placeholder="请选择" >
<el-option
v-for="item in EmployeeList"
:label='item.EmName'
:value='item.EmployeeId'
:key='item.EmployeeId'>
</el-option>
</el-select>
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="clearEditEmployeeMsg()">
{{$t('pub.cancelBtn')}}
</button> &nbsp;
<button class="normalBtn" type="primary" @click="EditEmployeeModify()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
export default {
data() {
return {
EmployeeList:[],
employeeMsg:{ // 员工
GroupId:'',
BranchId:-1,
DepartmentId:0,
PostId:0,
IsLeave:0,
},
DataList: '',
msg: {
Id:0,
},
AddMsgQuota:{
Id:0,
Action:"1",//1-增加,2-减少,3-删除
ShareMode:0,//
Amount:'',//新增/减少额度
TotalPrice:0,//现有额度
},
AddMsgQuotaShow:false,
rules: {
Amount: [{
required: true,
message: "请输入额度",
trigger: "blur"
}],
action: [ { required: true, message: '请选择类型', trigger: 'change' }],
},
NewMsgQuota:{
Id:0,
EmployeeId:0,
EmployeeName:"",
QuotaValue:0,
ShareMode:"0",//0:不可转赠 1:可以转增
EffectiveEndDate:"",
EffectiveStartDate:"",
EffectiveDateList: [],
},
NewMsgQuotaShow:false,
NewMsgRules: {
QuotaValue: [{
required: true,
message: "请输入额度",
trigger: "blur"
}],
EffectiveDateList: [ { required: true, message: '请选择有效期', trigger: 'change' }],
},
IsEdit:0,//=1的时候可以编辑费控信息
outerVisible:false,
dialogTitle:"编辑费控制度",
addMsg:{
InstitutionName:"",//制度名称
Id:0,
Effective:0,//是否启用 停用: 0 启用: 1
InstitutionDesc:"",//费控描述
EffectiveEndDate:"",
EffectiveStartDate:"",
effectiveDateList:[],
},
rulesMsg: {
InstitutionName: [{
required: true,
message: "请输入支付名称",
trigger: "blur"
}],
effectiveDateList: [{
required: true,
message: "请选择费控时间有效期",
trigger: 'blur',
}],
},
EditEmployeerules: {
EmployeeIdList: [{
required: true,
message: "请选择员工",
trigger: 'change',
type: 'array',
}],
},
EditEmployeeMsg:{
Id:0,
EmployeeIds:"",
EmployeeIdList:[],
},
EditEmployeeShow:false,
pickerBeginDateBefore: {
disabledDate: time => {
if (this.msg.PayEndTime == null) {
return false;
} else {
let endTime = new Date(this.msg.PayEndTime)
return endTime.getTime() < time.getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.msg.PayStartTime)
return startTime.getTime() >= time.getTime()
}
},
}
},
mounted() {
this.msg.Id = this.$route.query.Id;
let userInfo = this.getLocalStorage(); // 读取缓存数据
this.employeeMsg.GroupId = userInfo.RB_Group_id;
if(this.$route.query.Type){
this.IsEdit=this.$route.query.Type;
console.log("this.Type",this.IsEdit);
}
this.getList();
},
methods: {
getEmployee() { //员工
this.apipost('admin_get_EmployeeGetList', this.employeeMsg, res => {
if(res.data.resultCode == 1) {
this.EmployeeList = res.data.data;
}
}, err => {})
},
AddQuota(obj){
this.AddMsgQuota.ShareMode=obj.ShareMode;
this.AddMsgQuota.Id=obj.Id;
this.AddMsgQuota.TotalPrice=obj.QuotaValue;
this.AddMsgQuota.Action="1";
this.AddMsgQuota.Amount="";
this.AddMsgQuotaShow=true;
},
clearMsgQuota(){
this.AddMsgQuotaShow=false;
this.AddMsgQuota.ShareMode=0;
this.AddMsgQuota.TotalPrice=0;
this.AddMsgQuota.Id=0;
this.AddMsgQuota.Amount="";
this.AddMsgQuota.Action="1";
},
AddNewMsgQuota(obj){
this.NewMsgQuota.EmployeeName=obj.EmployeeName;
this.NewMsgQuota.Id=this.DataList.Id;
this.NewMsgQuota.EmployeeId=obj.EmployeeId;
this.NewMsgQuota.ShareMode="0";
this.NewMsgQuotaShow=true;
this.NewMsgQuota.EffectiveDateList=[];
this.NewMsgQuota.EffectiveDateList=obj.EffectiveDateList;
},
clearNewMsgQuota(){
this.NewMsgQuotaShow=false;
this.NewMsgQuota.ShareMode="0";
this.NewMsgQuota.EmployeeId=0;
this.NewMsgQuota.Id=0;
this.NewMsgQuota.QuotaValue="";
this.NewMsgQuota.EmployeeName="";
this.NewMsgQuota.EffectiveEndDate="";
this.NewMsgQuota.EffectiveStartDate="";
this.NewMsgQuota.EffectiveDateList=[];
this.NewMsgQuota.ShareMode="0";
},
EditEmployee(){
this.getEmployee();
this.EditEmployeeMsg.Id=this.DataList.Id;
this.EditEmployeeMsg.EmployeeIdList=this.DataList.EmployeeIdList;
this.EditEmployeeShow=true;
},
clearEditEmployeeMsg(){
this.EditEmployeeMsg.Id=0;
this.EditEmployeeMsg.EmployeeIds="";
this.EditEmployeeMsg.EmployeeIdList=[];
this.EditEmployeeShow=false;
},
EditEmployeeModify(){
if (this.EditEmployeeMsg.EmployeeIdList && this.EditEmployeeMsg.EmployeeIdList.length > 0) {
this.EditEmployeeMsg.EmployeeIds = this.EditEmployeeMsg.EmployeeIdList.join(",");
}
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionScopeModify', this.EditEmployeeMsg, res => {
if (res.data.resultCode == 1) {
this.clearNewMsgQuota();
this.Success(res.data.message);
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
AddQuotaModify(obj){
this.apipost('alipay_post_AlipayEbppInvoiceExpensecontrolQuotaModify', this.AddMsgQuota, res => {
if (res.data.resultCode == 1) {
this.clearMsgQuota();
this.Success(res.data.message);
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
AddNewMsgQuotaModify(){
if (this.NewMsgQuota.EffectiveDateList && this.NewMsgQuota.EffectiveDateList.length > 0) {
this.NewMsgQuota.EffectiveStartDate = this.NewMsgQuota.EffectiveDateList[0];
this.NewMsgQuota.EffectiveEndDate = this.NewMsgQuota.EffectiveDateList[1];
}
this.apipost('alipay_post_AlipayEbppInvoiceExpensecontrolQuotaCreate', this.NewMsgQuota, res => {
if (res.data.resultCode == 1) {
this.clearNewMsgQuota();
this.Success(res.data.message);
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
AlipayEbppInvoiceExpensecontrolQuotaQuery() { //获取用户使用额度情况
this.apipost('alipay_post_AlipayEbppInvoiceExpensecontrolQuotaQuery', {InstitutionId:this.msg.Id}, res => {
if (res.data.resultCode == 1) {
let RoyaltyList = []
RoyaltyList = res.data.data
this.DataList.QuotaList.forEach(x => {
RoyaltyList.forEach(y => {
if (x.EmployeeId == y.EmployeeId) {
x.QuotaTotal = Number(y.QuotaTotal)/100;//总金额
x.QuotaAvailable = Number(y.QuotaAvailable)/100;//可用金额(单位分)
x.QuotaLocked = Number( y.QuotaLocked )/100;//锁定金额(单位分)
x.QuotaUsed = Number( y.QuotaUsed )/100;//已用金额(单位分)
x.Freeze = y.Freeze;//额度是否冻结,冻结后因公付不可用
}
})
})
this.$forceUpdate()
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
UpdateInvoiceInstitutionModify() { //制度编辑
if(this.addMsg.effectiveDateList&&this.addMsg.effectiveDateList.length>0){
this.addMsg.EffectiveStartDate=this.addMsg.effectiveDateList[0];
this.addMsg.EffectiveEndDate=this.addMsg.effectiveDateList[1];
}
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionModify', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.clearAddMsg();
this.getList();
}
else{
this.Error(res.data.message);
}
}, err => {
})
},
AddMsgBaseInfo(obj){//给编辑数据赋值
this.addMsg.InstitutionName=obj.InstitutionName;//制度名称
this.addMsg.Id=obj.Id;
this.outerVisible=true,
this.addMsg.Effective=obj.Effective;//是否启用 停用: 0 启用: 1
this.addMsg.InstitutionDesc=obj.InstitutionDesc;//费控描述
this.addMsg.EffectiveEndDate=obj.EffectiveEndDate;
this.addMsg.EffectiveStartDate=obj.EffectiveStartDate;
this.addMsg.effectiveDateList=[];
this.addMsg.effectiveDateList=obj.EffectiveDateList;
},
clearAddMsg(){//清空编辑数据
this.InstitutionName="";//制度名称
this.Id=0;
this.outerVisible=false,
this.Effective=0;//是否启用 停用: 0 启用: 1
this. InstitutionDesc="";//费控描述
this. EffectiveEndDate="";
this.EffectiveStartDate="";
this. effectiveDateList=[];
},
getList() { //列表查询
this.apipost('alipay_post_AlipayEbppInvoiceInstitutionDetailinfoQuery', this.msg, res => {
if (res.data.resultCode == 1) {
this.DataList = res.data.data;
this.AlipayEbppInvoiceExpensecontrolQuotaQuery();
}
}, err => {
})
},
} }
</script>
......@@ -964,12 +964,22 @@
@click="goFncUrl('DebitNote', subItem.FinanceId)">借支单</span></p>
</td>
<td width="80" class="_zhidan">
<template v-if="myLineId==90">
<div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney">
<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">
<input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</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>
</div>
</template>
......@@ -982,14 +992,23 @@
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" value="制单" class="normalBtn" @click="goDiJieZhiDan(item,0,leadr,cur)" />
</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&&leadr.CurrencyId===1">
<span style="color:red;text-decoration: underline;" @click="GoCompanyAlipay(item)"> 已开启企业代付</span>
</template>
</template>
<template v-else-if="!item.hideZDBtn && index2==0">
<span>超过五天时间限制,无法制单</span>
</template>
</template>
</div>
</template>
</td>
</tr>
</table>
......@@ -1075,10 +1094,21 @@
</el-carousel-item>
</el-carousel>
</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>
</template>
<script>
import commonHotelInfo from "../commonPage/commonHotelInfo.vue";
import companyalipay from '../commonPage/companyalipay.vue';
import {
constants
} from "os";
......@@ -1146,10 +1176,16 @@
myLineId: 0, //zk新增
comRate: 1, //公用乘以 zk新增
msgList: [],
ShowCompanyAlipay:false,
CompanyAlipayTCID:0,
msgCompanyAlipay: {},
TeamStartDateList:[],
UseTotalPrice:0,
};
},
components: {
commonHotelInfo
commonHotelInfo,
companyalipay
},
methods: {
//用款计划下载
......@@ -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) {
if (_orderSource == 8) {
this.AddOutDetail()
......@@ -1572,6 +1618,110 @@
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) {
this.list.OtherOrderReportList.OtherList.push({
OrderType: "1",
......
......@@ -2064,6 +2064,8 @@
class="hollowFixedBtn" />
<input type="button" value="导出" @click="ExportExcle" 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>
<el-dialog custom-class='w350' title="单据转团" :visible.sync="zhuanLoading" center :before-close="initZhuanMsg">
<el-form label-width="110px">
......@@ -2073,7 +2075,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<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>
</el-dialog>
......@@ -2879,6 +2881,16 @@
});
},
GoCompanyAlipay(obj){
let routeData = this.$router.resolve({
name: 'AlipayManagementDetail',
query: {
Id: this.TCID,
searchTitle: '费控制度详情'
}
})
window.open(routeData.href, '_blank')
},
//收入跳转
AddIncomeDetail() {
var TCArr = [this.TCID];
......
......@@ -145,6 +145,20 @@
<el-button type="primary" class="zidingyiFz" icon="iconfont icon-zhuanhuan2" circle
@click="goUrl('GetWOrkTransferPageLis', item.EmployeeId)"></el-button>
</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>
</tr>
</table>
......@@ -183,7 +197,7 @@
</button>
</div>
</el-dialog>
<el-dialog custom-class="w400" :title="$t('adm.adm_changelogintel')" :visible.sync="updateLoginMobile" center
append-to-body :before-close="closeChangeMachieulm">
<el-form :model="ulmMsg" label-width="100px" :rules="rulesulm" ref="ulmMsg">
......@@ -362,6 +376,40 @@
</button>
</div>
</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>
</template>
<script>
......@@ -558,7 +606,14 @@
layerDepartMentList: [],
departMentList: [],
layerPostList: [],
PostList: []
PostList: [],
AlipayBindShow:false,
AlipayBindMsg:{
Id:0,
Identity:"",//identity传已注册支付宝且可以登录支付宝的手机号或邮箱 ;
EmployeeMobile:"",//员工手机号
ShareCode:"",
}
};
},
mounted() {
......@@ -601,6 +656,63 @@
},
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() {
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 @@
</div>
</div>
</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>
</template>
</tbody>
......@@ -623,6 +629,17 @@
</ul>
</div>
</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>
</template>
<script>
......@@ -630,6 +647,7 @@
import commonHotelInfo from "../../commonPage/commonHotelInfo.vue";
import commonTeamInfo from "../../commonPage/commonTeamInfo.vue";
import priceDialog from '../../TravelManager/TravelNewQuotation/priceDialog.vue';
import companyalipay from '../../commonPage/companyalipay.vue';
export default {
data() {
return {
......@@ -707,6 +725,10 @@
cityId: 0,
orderId: 0
},
ShowCompanyAlipay:false,
CompanyAlipayTCID:0,
msgCompanyAlipay: {},
TeamStartDateList:[],//出发时间和截止日期
//合团团酒店列表
TeamHotelList: [],
LeaderList: [],
......@@ -783,10 +805,73 @@
tripDownLoadCommon,
commonHotelInfo,
commonTeamInfo,
priceDialog
priceDialog,
companyalipay
},
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) {
var pMsg = {
......@@ -1337,7 +1422,7 @@
DownLoadGuestList(item, outItem, index) {
this.loading = true;
var nDmcNum = outItem.NewCombinationNum;
if (outItem.PriceCommonList.length > 1) {
if (outItem.PriceCommonLis&&outItem.PriceCommonList.length > 1) {
var NIndex = index + 1;
nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex;
}
......@@ -1361,7 +1446,7 @@
DownLoadGuestTelList(item, outItem, index) {
this.loading = true;
var nDmcNum = outItem.NewCombinationNum;
if (outItem.PriceCommonList.length > 1) {
if (outItem.PriceCommonList&&outItem.PriceCommonList.length > 1) {
var NIndex = index + 1;
nDmcNum = nDmcNum.replace(/^\s*|\s*$/g, "") + NIndex;
}
......
......@@ -2055,6 +2055,22 @@ export default {
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', //任务看板
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