Commit ba7a9fb6 authored by youjie's avatar youjie

no message

parent d20b1f7b
<style scoped>
.suject-title-box {
/* border-bottom: 1px solid #dedede; */
}
.suject-title-box span {
padding: 0 5px 10px 5px;
display: inline-block;
......
......@@ -5,6 +5,7 @@
}
.suject-title-box {
border-bottom: 1px solid #dedede;
padding: 10px 0;
}
.suject-title-box span {
......@@ -15,8 +16,8 @@
}
.suject-title-box span.active {
color: #2961fe;
border-bottom: 2px solid #2961fe;
color: #E95252;
border-bottom: 2px solid #E95252;
}
._vMG_edit {
......@@ -62,6 +63,14 @@
</style>
<template>
<div class="dianshangannualRatio" ref="barparent">
<div class="el-card__header">
<div class="suject-title-box">
<span v-for="(item,index) in titleList" :key="index" :class="{'active':item.Id==titleType}"
@click="clickTitle(item)">
{{item.Name}}
</span>
</div>
</div>
<div class="query-box" style="border: 0;">
<ul class="clearfix">
<li class="hight_query">
......@@ -70,18 +79,20 @@
</ul>
</div>
<div class="cm_content _scrollbar"
style="position: absolute;top:20px;bottom: 20px;left: 15px;right:15px;overflow-y: scroll;">
style="position: absolute;top:54px;bottom: 20px;left: 15px;right:15px;overflow-y: scroll;">
<table class="po_content singeRowTable"
style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0" v-loading="loading">
<tr>
<th width="260px">公司名称</th>
<th width="260px">{{titleType==1?'公司名称':'员工名称'}}</th>
<th>项目名称</th>
<th>代码</th>
<th width="150px">操作</th>
</tr>
<tr v-for="(item,index) in dataList" :key="index">
<td width="260px">{{item.BranchName}}</td>
<td width="260px">{{item.TargetName}}</td>
<td>{{item.ItemName}}</td>
<td>{{item.ItemCode}}</td>
<td width="150px">
<div style="padding: 3px 0;">
<el-tooltip class="item" effect="dark" content="编辑" placement="top-start">
......@@ -121,21 +132,25 @@
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="公司" prop="BranchId">
<el-select filterable v-model='addMsg.BranchId' @change="getType">
<el-col :span="4">
<el-form-item label="公司" prop="TargetId">
<el-select filterable v-model='addMsg.TargetId' @change="getType">
<el-option v-for="item in CompanyList" :key="item.Id" :value="item.Id" :label="item.BName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="4">
<el-form-item label="代码" prop="ItemCode">
<el-input v-model="addMsg.ItemCode" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="别名" prop="ItemName">
<el-input v-model="addMsg.ItemName" clearable></el-input>
</el-form-item>
<div style="color: #71755d;font-size: 12px;margin-left: 100px;margin-top: 15px;">
<!-- <div style="color: #71755d;font-size: 12px;margin-left: 100px;margin-top: 15px;">
例如:公司---2051---城中总部公司-阳光新业23楼公司
</div>
</div> -->
</el-col>
</el-row>
</el-form>
......@@ -154,11 +169,16 @@
addLoading: true,
text: '',
rules: { //表单必填验证
BranchId: [{
TargetId: [{
required: true,
message: '请选择公司名称',
trigger: 'change'
}],
ItemCode: [{
required: true,
message: '请输入金蝶项目代码',
trigger: 'blur'
}],
ItemName: [{
required: true,
message: '请输入金蝶项目名称',
......@@ -167,27 +187,25 @@
},
addMsg: {
Id: 0,
BranchId: '',
BranchName: '',
Type:1,
TargetId: '',
TargetName: '',
ItemCode:'',
ItemName: '',
},
addShow: false,
titleType: 2,
titleType: 1,
titleList: [{
Name: '银行对照表',
Id: 2
},
{
Name: '现金对照表',
Id: 3
},
{
Name: '费用对照表',
Name: '部门',
Id: 1
},
{
Name: '职员',
Id: 2
}
],
msg: {
Type: 1
},
dataList: [],
loading: false,
......@@ -208,6 +226,11 @@
},
methods: {
clickTitle(item) {
this.titleType = item.Id
this.msg.Type = this.titleType
this.getList()
},
DeleteClick(item){
let that = this
let msg = {
......@@ -243,7 +266,7 @@
getType(ID){
this.CompanyList.forEach(item=>{
if(item.Id==ID){
this.addMsg.BranchName = item.BName
this.addMsg.TargetName = item.BName
}
})
},
......@@ -258,8 +281,9 @@
});
},
addFlightmodule() { //添加
this.addMsg.Type = this.titleType
this.addLoading = false
this.apipost('Financial_post_SetKingdeeItem', this.addMsg, res => {
this.apipost('Financial_post_SetKingdeeItemForHP', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.addLoading = true
this.addShow = false;
......@@ -278,8 +302,10 @@
cancelEdit(t) { // 取消修改、新增
this.addMsg = {
Id: 0,
BranchId: '',
BranchName: '',
Type:this.titleType,
TargetId: '',
TargetName: '',
ItemCode:'',
ItemName: '',
}
if (!t) {
......@@ -290,8 +316,10 @@
resetInfo() {
var msg = {
Id: 0,
BranchId: '',
BranchName: '',
Type:this.titleType,
TargetId: '',
TargetName: '',
ItemCode:'',
ItemName: '',
}
this.addMsg = msg;
......@@ -299,17 +327,26 @@
clickEdit(item) {
this.addShow = false
if(item){
this.text = '编辑金蝶项目'
console.log(item)
if (this.titleType == 1) {
this.text = '编辑金蝶部门项目'
}
if (this.titleType == 2) {
this.text = '编辑金蝶职员项目'
}
this.addMsg = JSON.parse(JSON.stringify(item))
}else{
this.text = '新增金蝶项目'
if (this.titleType == 1) {
this.text = '新增金蝶部门项目'
}
if (this.titleType == 2) {
this.text = '新增金蝶职员项目'
}
}
this.addShow = true
},
getList() {
this.loading = true;
this.apipost('Financial_post_GetKingdeeItemList', this.msg, res => {
this.apipost('Financial_post_GetKingdeeItemListForHP', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
......
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