Commit 176262b0 authored by youjie's avatar youjie

no message

parent f8c27370
......@@ -128,6 +128,12 @@
<template>
<div class="flexOne currentManage page-body">
<div class="query-box">
校区:
<el-select filterable v-model='msg.BranchId' @change="getList">
<el-option label="不限" value="0"></el-option>
<el-option v-for="(item,index) in TheAliasList" :label="item.Name" :value='item.Id' :key="index">
</el-option>
</el-select>
<ul>
<li>
......@@ -145,6 +151,7 @@
<th>科目代码</th>
<th>科目类别</th>
<th>余额方向</th>
<th>公司</th>
</tr>
<tr v-for="(item,index) in DataList" :key="index">
<td>{{item.Name}}</td>
......@@ -158,6 +165,9 @@
<span v-if="item.Direction==1"></span>
<span v-if="item.Direction==2"></span>
</td>
<td>
{{item.BranchName}}
</td>
</tr>
</table>
<div class="noData" v-if="DataList&&DataList.length==0">
......@@ -175,6 +185,18 @@
</div> -->
</div>
<el-dialog custom-class='w700' title="导入" :visible.sync="outerVisible" center>
<el-form class="clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="100px">
<el-row>
<el-col :span="5">
<el-form-item label="公司" prop="BranchId">
<el-select filterable v-model='addMsg.BranchId'>
<!-- <el-option label="不限" value=0></el-option> -->
<el-option v-for="(item,index) in TheAliasList" :label="item.Name" :value='item.Id' :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="addMsg.BranchId">
<el-upload style="text-align: center;" drag class="upload-demo"
:action="importFileUrl2"
:on-success="handleAvatarSuccess"
......@@ -183,6 +205,10 @@
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<!-- <div slot="tip" class="el-upload__tip">只能上传Excel文件</div> -->
</el-upload>
</el-col>
</el-row>
</el-form>
</el-dialog>
......@@ -192,13 +218,22 @@
export default {
data() {
return {
addMsg:{},
rules: { //表单必填验证
BranchId: [{
required: true,
message: '请选择公司',
trigger: 'change'
}]
},
addMsg:{
BranchId:''
},
noData: false,
text:'',
imageUrl:'',
outerVisible:false,
msg:{
BranchId: 0,
BranchId:'0',
},
DataList:[],
loading:false,
......@@ -206,23 +241,49 @@
total:0,
importFileUrl2: "",
downList:"",
TheAliasList:[],
}
},
created(){
let userInfo = this.getLocalStorage();
this.importFileUrl2=this.domainManager().UploadFileUrl +
"?cmd=dmc_post_LocalFileUpload&KingdeeBId=0&Type=10&fileType=1&fileLimit=1&EmployeeId="+userInfo.Id
+'&RB_Group_id='+userInfo.Group_Id
+'&RB_Group_id='+userInfo.Group_Id +'&BranchId=' + this.addMsg.BranchId
;
this.downList =this.domainManager().LocalTemplateFileDownLoadUrl +"/Upload/Template/未认款导入模板.xls";
this.getList();
this.Financial_post_GetEduBranchEnumList()
},
mounted(){
},
methods: {
Financial_post_GetEduBranchEnumList() {
this.apipost('Financial_post_GetEduBranchEnumList', {}, res => {
if (res.data.resultCode == 1) {
this.TheAliasList = res.data.data;
} else {
this.Error(res.data.message);
}
}, err => {})
},
submitForm(addMsg) {
let that = this;
that.$refs[addMsg].validate((valid) => {
if (valid) {
} else {
return false;
}
});
},
beforeAvatarUpload(file) {
return;
let that = this;
// that.submitForm('addMsg');
if (!that.addMsg.BranchId) {
this.Error(this.$t('请选择公司'));
}
return that.addMsg.BranchId
},
//上传
handleAvatarSuccess(res, file) {
......
......@@ -121,6 +121,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="公司" prop="BranchId">
<el-select filterable v-model='addMsg.BranchId' @change="GetKingdeeSubjectList">
<el-option v-for="(item,index) in TheAliasList" :label="item.Name" :value='item.Id' :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="科目" prop="SubjectId">
<el-select filterable v-model='addMsg.SubjectId'>
......@@ -147,6 +155,7 @@
},
data() {
return {
TheAliasList:[],
title: '',
addLoading: true,
DataList: [],
......@@ -170,6 +179,11 @@
message: '请选择类型',
trigger: 'change'
}],
BranchId: [{
required: true,
message: '请选择公司',
trigger: 'change'
}],
TargetId: [{
required: true,
message: '请选择费用',
......@@ -177,11 +191,12 @@
}],
SubjectId: [{
required: true,
message: '请选择科目',
message: '请选择公司再选科目',
trigger: 'change'
}]
},
addMsg: {
BranchId: '',
Type: 2,
TargetId: '',
SubjectId: ''
......@@ -215,13 +230,24 @@
},
created() {
this.getList();
this.GetKingdeeSubjectList()
// this.GetKingdeeSubjectList()
this.Financial_post_GetEduBranchEnumList()
},
mounted() {
},
methods: {
Financial_post_GetEduBranchEnumList() {
this.apipost('Financial_post_GetEduBranchEnumList', {}, res => {
if (res.data.resultCode == 1) {
this.TheAliasList = res.data.data;
} else {
this.Error(res.data.message);
}
}, err => {})
},
GetKingdeeSubjectList() {
this.msg.BranchId = this.addMsg.BranchId
this.apipost('Financial_post_GetKingdeeSubjectList', this.msg, res => {
if (res.data.resultCode == 1) {
this.DataList = res.data.data;
......@@ -247,7 +273,11 @@
return this.$message.error('请选择科目')
}
this.addLoading = false
this.apipost('Financial_post_SetCostTypeKingdeeRelation', this.addMsg, res => {
this.apipost('Financial_post_SetCostTypeKingdeeRelation', {
Type: this.addMsg.Type,
TargetId: this.addMsg.TargetId,
SubjectId: this.addMsg.SubjectId
}, res => {
if (res.data.resultCode == 1) {
this.addLoading = true
this.addShow = false;
......@@ -264,6 +294,7 @@
},
cancelEdit(t) { // 取消修改、新增
this.addMsg = {
BranchId: '',
Type: 2,
TargetId: '',
SubjectId: ''
......@@ -275,6 +306,7 @@
//重置表单
resetInfo() {
var msg = {
BranchId: '',
Type: 2,
TargetId: '',
SubjectId: ''
......
<style scoped>
@import "../css/cssReset.css";
.suject-title-box {
border-bottom: 1px solid #dedede;
}
......
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