Commit 7c2a50e6 authored by youjie's avatar youjie

no message

parent 8203cca3
<template>
<div class="domesticCommissionRule">
<div class="query-box">
<ul>
<li>
<input type="button" class="normalBtn" value="新增" @click="addNew">
</li>
</ul>
</div>
<div class="commonContent">
<div>
<div style="display: flex;justify-content: space-between;align-items: center;">
<p class="sfd_tit clearfix"><span>手配费单据配置</span></p>
<div style="text-align: right;">
<input type="button" class="normalBtn" value="新增手配费单据配置" @click="addNew(1)">
</div>
</div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
......@@ -31,7 +31,7 @@
{{subItem.BranchName}}
</td>
<td v-if="childIndex==0" :rowspan="subItem.DetailList.length">
{{subItem.ClientName}}
{{subItem.ClientName}}
<el-popover v-if="subItem.HistoryClientList.length>0" style="width: 500px;overflow: hidden;" trigger="click" popper-class="pro_tripDetails">
<div v-if="Details.length>0" style="display: flex;flex-wrap: wrap;">
<el-tag v-for="(ds, din) in Details" :key="din" size="small">{{ds.ClientName}}</el-tag>
......@@ -56,11 +56,11 @@
<el-button-group size='mini'>
<el-tooltip class="item" effect="dark" content="编辑手配费" placement="top-start">
<el-button type="primary" icon="el-icon-edit"
@click="isShowDIv = true,divTitle='编辑手配费',getEdit(subItem)">
@click="isShowDIv = true,divTitle='编辑手配费',getEdit(subItem,1)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="DeleteRules(subItem.Id)">
<el-button type="danger" icon="el-icon-delete" @click="DeleteRules(subItem.Id,1)">
</el-button>
</el-tooltip>
</el-button-group>
......@@ -70,12 +70,83 @@
<tr v-if="DataList.length==0">
<td colspan="11" align="center">暂无数据</td>
</tr>
</table>
</div>
<div style="margin-top: 20px;">
<div style="display: flex;justify-content: space-between;align-items: center;">
<p class="sfd_tit clearfix"><span>单项签证单据配置</span></p>
<div style="text-align: right;">
<input type="button" class="normalBtn" value="新增单项签证单据配置" @click="addNew()">
</div>
</div>
<table v-loading="loadingVisa" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>类型</th>
<th>费用科目</th>
<th>是否启用月结</th>
<th>总公司流程</th>
<th>分公司流程</th>
<th>月结总公司流程</th>
<th>月结分公司流程</th>
<th>操作人</th>
<th>操作</th>
</tr>
</thead>
<template v-for="(subItem,subIndex) in visaDataList">
<tr>
<td>{{subItem.SetUpTypeStr}}</td>
<td >
{{subItem.ExpenseAccountStr}}
</td>
<td>
<span style="color: red;" v-if="subItem.IsMonthly">启用</span>
</td>
<td>
{{subItem.CompanyCourseStr}}
</td>
<td>
{{subItem.BranchCourseStr}}
</td>
<td>
{{subItem.MonthlyCourseStr}}
</td>
<td>
{{subItem.BranchMonthlyCourseStr}}
</td>
<td>
<p>{{subItem.CreateByStr}}</p>
<p>{{subItem.CreateDate}}</p>
</td>
<td v-if="S_CheckAllOrder">
<el-button-group size='mini'>
<el-tooltip class="item" effect="dark" content="编辑单项签证单据配置" placement="top-start">
<el-button type="primary" icon="el-icon-edit"
@click="isShowDIv = true,divTitle='编辑单项签证单据配置',getEdit(subItem)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="DeleteRules(subItem.Id)">
</el-button>
</el-tooltip>
</el-button-group>
</td>
</tr>
</template>
<tr v-if="visaDataList.length==0">
<td colspan="11" align="center">暂无数据</td>
</tr>
</table>
</div>
</div>
<el-dialog title="手配费" :visible.sync="showVisible" width="970px">
<el-dialog :title="divTitle" :visible.sync="showVisible" width="970px" @close="close">
<el-form ref="addMsg" :model="addMsg" :rules="rules" label-width="90px">
<template v-if="divTitle.indexOf('手配费')!=-1">
<el-row>
<el-col :span="8">
<el-form-item label="名称" prop="Name">
......@@ -85,7 +156,7 @@
<el-col :span="8">
<el-form-item label="付款对象" prop="ClientID">
<el-select filterable v-model="addMsg.ClientID" placeholder="选择付款对象" style="width: 100%;">
<el-option v-for="item in ClientAccountList"
<el-option v-for="item in ClientAccountList"
:label="item.AccountAlias" :value="item.ID" :key='item.ID'>
</el-option>
</el-select>
......@@ -134,7 +205,7 @@
@keyup.native="checkPrice(x,'Unit_Price',true)">
</el-input>
</el-form-item>
<el-form-item :prop="'DetailList.'+ y +'.CostTypeId'"
<el-form-item :prop="'DetailList.'+ y +'.CostTypeId'"
:rules="productGroup.CostTypeId" label="费用类型">
<el-select filterable v-model="x.CostTypeId" style="width: 100px;" @change="gettdName(x.Id,y,2)"
clearable>
......@@ -142,7 +213,7 @@
:value="item.ID"></el-option>
</el-select>
</el-form-item>
<el-form-item :prop="'DetailList.'+ y +'.FlowZId'"
<el-form-item :prop="'DetailList.'+ y +'.FlowZId'"
:rules="productGroup.FlowZId" label="总部流程">
<el-select filterable v-model="x.FlowZId" style="width: 100px;" @change="gettdName(x.Id,y,3)"
clearable>
......@@ -150,7 +221,7 @@
:value="item.Id"></el-option>
</el-select>
</el-form-item>
<el-form-item :prop="'DetailList.'+ y +'.FlowFId'"
<el-form-item :prop="'DetailList.'+ y +'.FlowFId'"
:rules="productGroup.FlowFId" label="分部流程">
<el-select filterable v-model="x.FlowFId" style="width: 100px;" @change="gettdName(x.Id,y,4)"
clearable>
......@@ -163,23 +234,93 @@
v-if="addMsg.DetailList.length>1" @click="addMsg.DetailList.splice(y,1)">
</el-button> -->
</div>
</div>
</div>
<!-- <el-button size="mini" type="primary"
class="el-icon-circle-plus-outline" circle @click="addDetailList"></el-button> -->
</el-form-item>
</template>
<template v-if="divTitle.indexOf('配置')!=-1">
<el-row style="height: 100px;">
<el-col :span="8">
<el-form-item label="类型" prop="SetUpType">
<el-select filterable v-model="addMsg.SetUpType" placeholder="选择类型" style="width: 100%;"
clearable>
<el-option v-for="item in SetUpTypeList" :key="item.ID" :label="item.Name"
:value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="费用科目" prop="ExpenseAccount">
<el-select filterable v-model="addMsg.ExpenseAccount" placeholder="选择费用科目" style="width: 100%;"
>
<el-option v-for="(item,index) in CostTypeList" :key="index" :label="item.Name" :value='item.ID'></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总司流程" prop="CompanyCourse">
<el-select filterable v-model="addMsg.CompanyCourse" placeholder="选择总公司流程" style="width: 100%;">
<el-option v-for="item in StencilFlowList" :key="item.Id" :label="item.Name"
:value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="分司流程" prop="BranchCourse">
<el-select filterable v-model="addMsg.BranchCourse" placeholder="选择分公司流程" style="width: 100%;">
<el-option v-for="item in StencilFlowList" :key="item.Id" :label="item.Name"
:value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<template v-if="addMsg.IsMonthly==1">
<el-col :span="8">
<el-form-item label="月总流程" prop="MonthlyCourse">
<el-select filterable v-model="addMsg.MonthlyCourse" placeholder="选择月结总公司流程" style="width: 100%;">
<el-option v-for="item in StencilFlowList" :key="item.Id" :label="item.Name"
:value="item.Id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="月分流程" prop="BranchMonthlyCourse">
<el-select filterable v-model="addMsg.BranchMonthlyCourse" placeholder="选择月结分公司流程" style="width: 100%;">
<el-option v-for="item in StencilFlowList" :label='item.Name' :value='item.Id' :key='item.Id'>
</el-option>
</el-select>
</el-form-item>
</el-col>
</template>
<el-col v-if="addMsg.IsMonthly==1" :span="16">
<el-form-item label="" prop="">
&nbsp;
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="启用月结" prop="">
<el-switch
v-model="addMsg.IsMonthly"
active-value="1"
inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</el-row>
</template>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="showVisible = false">取 消</el-button>
<el-button size="small" type="danger" @click="submit('addMsg')">确 定</el-button>
<el-button size="small" type="danger" @click="submit('addMsg')" :loading="submitLoading">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -197,11 +338,23 @@
FlowZId: null,
FlowFId: null
}],
// 单项签证单据配置
SetUpType: null,
ExpenseAccount: null,
CompanyCourse: null,
BranchCourse: null,
IsMonthly: null,
MonthlyCourse: null,
BranchMonthlyCourse: null,
}
export default {
data() {
return {
submitLoading: false,
loadingVisa: false,
divTitle: '',
visaDataList:[],
costType: [],
TemplateGetList:[],
Details:[],
......@@ -220,6 +373,7 @@
loading: false, //加载层
DataList: [],
total: 0,
SetUpTypeList:[],
TypeListArr: [
{Name:'房',Id:1,disabled:false},
{Name:'餐',Id:2,disabled:false},
......@@ -255,11 +409,41 @@
message: '请选择历史付款对象',
trigger: 'change'
}],
SetUpType: [{
required: true,
message: '请选择类型',
trigger: 'change'
}],
ExpenseAccount: [{
required: true,
message: '请选择费用科目',
trigger: 'change'
}],
CompanyCourse: [{
required: true,
message: '请选择总公司流程',
trigger: 'change'
}],
BranchCourse: [{
required: true,
message: '请选择分公司流程',
trigger: 'change'
}],
MonthlyCourse: [{
required: true,
message: '请选择月结总公司流程',
trigger: 'change'
}],
BranchMonthlyCourse: [{
required: true,
message: '请选择月结分公司流程',
trigger: 'change'
}],
},
productGroupRules2:{
Id: [{
required: true,
message: '请选择人员',
// message: '请选择人员',
trigger: 'change'
}],
},
......@@ -289,13 +473,15 @@
message: '请选择分公司流程',
trigger: 'change'
}],
}
},
StencilFlowList:[],//签证制单流程
CostTypeList:[],//签证费用类型
};
},
created() {
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团
this.GetVisaSetUpList()
this.getList()
this.getFKList()
this.getCompany()
......@@ -304,31 +490,64 @@
this.getTemplateCostTypeList()
},
methods: {
close() {
// 小技巧,直接给表单数据对象赋值为空
this.addMsg = {}
// 清空表单校验
this.$refs.addMsg.clearValidate();
// 移除校验结果并重置字段值
this.$refs["addMsg"].resetFields();
},
// 获取所有费用类型
getTemplateCostTypeList(){
this.apipost('financeinfo_post_GetCostTypeList',{Type:2},res=>{
if(res.data.resultCode==1){
this.costType=res.data.data;
}else{
}
},err=>{})
// 单项签证制单费用科目
this.apipost('Financial_post_GetTemplateCostTypeList',{},res=>{
if(res.data.resultCode==1){
this.CostTypeList=res.data.data;
}else{}
},err=>{})
// 手配费费用类型
this.apipost('financeinfo_post_GetCostTypeList',{Type:null},res=>{
if(res.data.resultCode==1){
this.costType=res.data.data;
}else{
}
},err=>{})
// 单项签证制单类型
this.apipost('Financial_post_GetSetUpTypeEnumList',{},res=>{
if(res.data.resultCode==1){
this.SetUpTypeList=res.data.data;
}else{}
},err=>{})
},
// 所有审核流程
FinancialFlowTemplate_post_GetList() {
this.apipost(
"FinancialFlowTemplate_post_GetSingleList",//Financial_post_GetList
{},
res => {
if (res.data.resultCode == 1) {
this.TemplateGetList = res.data.data;
} else {
}
},
err => {}
);
},
//获取历史详情
// 手配费流程
this.apipost(
"FinancialFlowTemplate_post_GetSingleList",
{},
res => {
if (res.data.resultCode == 1) {
this.TemplateGetList = res.data.data;
} else {
}
},
err => {}
);
// 单项签证制单流程
this.apipost(
"FinancialFlowTemplate_post_GetList",//Financial_post_GetList
{Status:1,Type:2,TemplateSorce:1},
res => {
if (res.data.resultCode == 1) {
this.StencilFlowList = res.data.data;
} else {
}
},
err => {}
);
},
//获取历史详情
getDetails(index,type) {
this.Details = type==1?this.DataList[index].HistoryClientList:this.DataList[index].DetailList;
},
......@@ -380,6 +599,22 @@
},
err => {}
);
},
GetVisaSetUpList(){
this.loadingVisa = true
this.apipost(
"Financial_post_GetVisaSetUpList",
{},
res => {
this.loadingVisa = false;
if (res.data.resultCode == 1) {
this.visaDataList = res.data.data;
}
},
err => {}
);
},
gettdName(id, index,type) { //获取团队类型名称
if(type==1){
......@@ -390,7 +625,7 @@
}
})
}
},
//获取付款列表
getFKList() {
......@@ -409,29 +644,50 @@
}
);
},
getEdit(row) { //修改
getEdit(row,type) { //修改
let data = JSON.parse(JSON.stringify(row))
this.addMsg = data
if(type==1){
this.addMsg.DetailList.forEach(item=>{
item.Unit_Price = Number(item.Unit_Price)
item.Unit_Price = Number(item.Unit_Price)
})
this.addMsg.ClientIdList = data.ClientIds.split(',').map(Number)
this.addMsg = Object.assign({}, this.addMsg),
this.addMsg.ClientIdList = data.ClientIds.split(',').map(Number)
}
this.addMsg = Object.assign({}, this.addMsg)
if(!type){
this.addMsg.SetUpType = String(row.SetUpType)
this.addMsg.IsMonthly = String(row.IsMonthly)
this.addMsg.MonthlyCourse = row.MonthlyCourse?row.MonthlyCourse:null
this.addMsg.BranchMonthlyCourse = row.BranchMonthlyCourse?row.BranchMonthlyCourse:null
}
this.showVisible = true;
},
DeleteRules(ID) { //删除
this.$confirm("是否删除? ", "提示", {
DeleteRules(ID,type) { //删除
let text
let cmd
if(type==1){
text = '是否删除手配费单据配置'
cmd = 'handfee_post_DelHandFee'
}else{
text = '是否删除单项签证单据配置'
cmd = 'Financial_post_DelVisaSetUp'
}
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.apipost('handfee_post_DelHandFee', {
this.apipost(cmd, {
Id: ID
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message)
this.getList()
if(type==1){
this.getList()
}else{
this.GetVisaSetUpList()
}
} else {
this.Error(res.data.message)
}
......@@ -439,7 +695,7 @@
})
.catch(() => {});
},
addNew() { //新增
addNew(type) { //新增
this.addMsg = {
Id: 0,
Name: '',
......@@ -453,7 +709,17 @@
FlowZId: null,
FlowFId: null
}],
// 单项签证单据配置
SetUpType: null,
ExpenseAccount: null,
CompanyCourse: null,
BranchCourse: null,
IsMonthly: null,
MonthlyCourse: null,
BranchMonthlyCourse: null,
}
this.divTitle = type==1?'新增手配费':'新增单项签证单据配置'
this.showVisible = true;
this.addDetailList()
},
......@@ -472,27 +738,69 @@
}
},
submit(formName) {
this.addMsg.ClientIds = this.addMsg.ClientIdList.join(',')
if(this.divTitle.indexOf('手配费')!=-1){
this.addMsg.ClientIds = this.addMsg.ClientIdList.join(',')
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost(
'handfee_post_SetHandFeeInfo', this.addMsg,
if(this.divTitle.indexOf('手配费')!=-1){
let addMsg = {
Id: this.addMsg.Id,
Name: this.addMsg.Name,
ClientID: this.addMsg.ClientID,
ClientIdList:this.addMsg.ClientIdList,
ClientIds:this.addMsg.ClientIds,
DetailList:this.addMsg.DetailList,
}
this.submitLoading = true
this.apipost(
'handfee_post_SetHandFeeInfo', addMsg,
res => {
this.submitLoading = false
if (res.data.resultCode == 1) {
this.getList();
this.showVisible = false;
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
},
err => {}
)
this.Error(res.data.message)
}
},
err => {}
)
}else{
let addMsg = {
Id: this.addMsg.Id,
SetUpType: this.addMsg.SetUpType,
ExpenseAccount: this.addMsg.ExpenseAccount,
CompanyCourse: this.addMsg.CompanyCourse,
BranchCourse: this.addMsg.BranchCourse,
IsMonthly: this.addMsg.IsMonthly,
MonthlyCourse: this.addMsg.MonthlyCourse,
BranchMonthlyCourse: this.addMsg.BranchMonthlyCourse,
}
this.submitLoading = true
this.apipost(
'Financial_post_SetVisaSetUp', addMsg,
res => {
this.submitLoading = false
if (res.data.resultCode == 1) {
this.GetVisaSetUpList();
this.showVisible = false;
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
},
err => {}
)
}
}
});
},
},
mounted() {
let userInfo = this.getLocalStorage();
......@@ -505,7 +813,7 @@
}
}
};
</script>
<style scoped>
@import "../../../assets/css/cssReset.css";
......@@ -522,6 +830,12 @@
margin: 0 2px 2px;
padding: 0 3px;
}
.sfd_tit {
border-left: 3px solid #E95252;
text-indent: 10px;
font-size: 16px;
line-height: 30px;
margin: 20px 0 10px 0;
}
</style>
\ No newline at end of file
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