Commit 176262b0 authored by youjie's avatar youjie

no message

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