Commit fe189331 authored by youjie's avatar youjie

no message

parent 36a6ff87
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
Id: item.Id Id: item.Id
} }
this.$q.dialog({ this.$q.dialog({
title: '将删除此币种', title: '将删除此金蝶币种',
message: '是否继续?', message: '是否继续?',
cancel: true, cancel: true,
persistent: true, persistent: true,
...@@ -296,6 +296,7 @@ ...@@ -296,6 +296,7 @@
}, },
resetForm(formName) { //弹出框取消 初始化谈框内表单 resetForm(formName) { //弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.cancelEdit()
}, },
cancelEdit(t) { // 取消修改、新增 cancelEdit(t) { // 取消修改、新增
this.addMsg = { this.addMsg = {
...@@ -325,11 +326,11 @@ ...@@ -325,11 +326,11 @@
clickEdit(item) { clickEdit(item) {
this.addShow = false this.addShow = false
if(item){ if(item){
this.text = '编辑币种' this.text = '编辑金蝶币种'
console.log(item) console.log(item)
this.addMsg = JSON.parse(JSON.stringify(item)) this.addMsg = JSON.parse(JSON.stringify(item))
}else{ }else{
this.text = '新增币种' this.text = '新增金蝶币种'
} }
this.addShow = true this.addShow = true
}, },
......
<style scoped> <style scoped>
.suject-title-box { .suject-title-box {
/* border-bottom: 1px solid #dedede; */ border-bottom: 1px solid #dedede;
} }
.suject-title-box span { .suject-title-box span {
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.suject-title-box span.active { .suject-title-box span.active {
color: #2961fe; color: #2961fe;
/* border-bottom: 2px solid #2961fe; */ border-bottom: 2px solid #2961fe;
} }
._vMG_edit { ._vMG_edit {
...@@ -60,49 +60,34 @@ ...@@ -60,49 +60,34 @@
<div class="flexOne currentManage page-body" style="position: relative;"> <div class="flexOne currentManage page-body" style="position: relative;">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li>
<li>
<q-btn color="primary" size="11px" label="新增"  @click="resetForm('addMsg'),clickEdit()" />
</li> </li>
</ul> </ul>
<div class="suject-title-box"> <!-- <div class="suject-title-box">
<span> <span>
</span> </span>
</div> </div> -->
</div> </div>
<div class="cm_content _scrollbar" <div class="cm_content _scrollbar"
style="position: absolute;top:117px;bottom: 0;left: 15px;right:15px;overflow-y: scroll;"> style="position: absolute;top:83px;bottom: 20px;left: 15px;right:15px;overflow-y: scroll;">
<table class="po_content singeRowTable" <table class="po_content singeRowTable"
style="border:1px solid #E6E6E6;" cellspacing="0" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0" v-loading="loading"> cellpadding="0" v-loading="loading">
<tr> <tr>
<th>币种名称</th> <th width="260px">校区/公司名称</th>
<th>汇率类型</th> <th>项目名称</th>
<th>金蝶币别名</th>
<th>金蝶币别代码</th>
<th width="150px">操作</th> <th width="150px">操作</th>
</tr> </tr>
<tr v-for="(item,index) in dataList" :key="index"> <tr v-for="(item,index) in dataList" :key="index">
<td>{{item.CurrencyName}}</td> <td width="260px">{{item.BranchName}}</td>
<td>{{item.RateType}}</td> <td>{{item.ItemName}}</td>
<td>{{item.Name}}</td>
<td style="white-space: warp;">
{{item.Code}}
<el-tag size="mini" class="tagF" v-for="(i,indexs) in item.KingdeeList" :key="indexs"
closable @close="Delete(item,i)">
{{i.KingdeeName}}
</el-tag>
</td>
<td width="150px"> <td width="150px">
<span class="a" style="cursor: pointer;color:blue;text-decoration:underline;margin-right: 5px" <span class="a" style="cursor: pointer;color:blue;text-decoration:underline;margin-right: 5px"
@click="AddR(item)">新增</span> @click="clickEdit(item)">编辑</span>
<!-- <el-select v-if="item.KingdeeList.length>0" style="width:100px" size="mini" <span style="cursor: pointer;color:red;text-decoration:underline;" @click="Delete(item)">删除</span>
v-model="item.SubjectId" @change="Delete($event,item)" placeholder="选择删除">
<el-option v-for="(i,indexs) in item.KingdeeList" :key="indexs"
:label="i.KingdeeName" :value='i.SubjectId'></el-option>
</el-select> -->
<!-- <span style="cursor: pointer;color:red;text-decoration:underline;" @click="Delete(item)">删除</span> -->
</td> </td>
</tr> </tr>
</table> </table>
...@@ -110,14 +95,6 @@ ...@@ -110,14 +95,6 @@
{{$t('system.content_noData')}} {{$t('system.content_noData')}}
</div> </div>
</div> </div>
<el-dialog custom-class='w700' :title="title+'导入'" :visible.sync="outerVisible" center>
<el-upload style="text-align: center;" drag class="upload-demo" :action="importFileUrl2"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<!-- <div slot="tip" class="el-upload__tip">只能上传Excel文件</div> -->
</el-upload>
</el-dialog>
<div class="_vMG_edit" :class="addShow==true?'edHeight':''"> <div class="_vMG_edit" :class="addShow==true?'edHeight':''">
<el-row style="height:48px"> <el-row style="height:48px">
<el-col :span="20"> <el-col :span="20">
...@@ -130,22 +107,30 @@ ...@@ -130,22 +107,30 @@
</el-row> </el-row>
<el-form class="clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="100px"> <el-form class="clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="5">
<el-form-item label="类型" prop="Type" disabled> <!-- <el-col :span="5">
<el-select filterable v-model='addMsg.Type'> <el-form-item label="金蝶项目类型" prop="BranchId">
<el-option v-for="(item,index) in typeList" :label="item.Name" :value='item.Id' :key="index"> <el-select filterable v-model='addMsg.BranchId' @change="getType">
</el-option> <el-option v-for="item in currencyTypeList" :key="item.ID" :value="item.ID" :label="item.Name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="5"> <el-col :span="8">
<el-form-item label="科目" prop="SubjectId"> <el-form-item label="校区" prop="BranchId">
<el-select filterable v-model='addMsg.SubjectId'> <el-select filterable v-model='addMsg.BranchId' @change="getType">
<el-option v-for="(item,index) in DataList" :label="item.Name" :value='item.Id' :key="index"> <el-option v-for="item in CompanyList" :key="item.SId" :value="item.SId" :label="item.SName"></el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13">
<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;">
例如:校区---2051---城中总部一校区-阳光新业23楼校区
</div>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
...@@ -153,6 +138,10 @@ ...@@ -153,6 +138,10 @@
</div> </div>
</template> </template>
<script> <script>
import {
getSchoolDropdown,
getTeacherDropDownList
} from '../../../api/school/index'
import bankForm from './suject/bank' import bankForm from './suject/bank'
import cashForm from './suject/cash' import cashForm from './suject/cash'
import costForm from './suject/cost' import costForm from './suject/cost'
...@@ -166,42 +155,24 @@ ...@@ -166,42 +155,24 @@
return { return {
title: '', title: '',
addLoading: true, addLoading: true,
DataList: [],
typeList: [{
Name: '银行',
Id: 2
},
{
Name: '现金',
Id: 3
},
{
Name: '费用',
Id: 1
},
],
text: '新增银行对照表', text: '新增银行对照表',
rules: { //表单必填验证 rules: { //表单必填验证
Type: [{ BranchId: [{
required: true,
message: '请选择类型',
trigger: 'change'
}],
TargetId: [{
required: true, required: true,
message: '请选择费用', message: '请选择校区/公司名称',
trigger: 'change' trigger: 'change'
}], }],
SubjectId: [{ ItemName: [{
required: true, required: true,
message: '请选择科目', message: '请输入金蝶项目名称',
trigger: 'change' trigger: 'blur'
}] }]
}, },
addMsg: { addMsg: {
Type: 2, Id: 0,
TargetId: '', BranchId: '',
SubjectId: '' BranchName: '',
ItemName: '',
}, },
addShow: false, addShow: false,
titleType: 2, titleType: 2,
...@@ -223,28 +194,69 @@ ...@@ -223,28 +194,69 @@
}, },
dataList: [], dataList: [],
loading: false, loading: false,
outerVisible: false, CompanyList:[]
importFileUrl2: "",
downList: "",
} }
}, },
created() { created() {
this.getList(); this.getList();
// this.GetKingdeeSubjectList() this.getBranchList()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
GetKingdeeSubjectList() { Delete(item){
this.apipost('Financial_post_GetKingdeeSubjectList', this.msg, res => { let _this = this
if (res.data.resultCode == 1) { let msg = {
this.DataList = res.data.data; Id: item.Id
// this.total=res.data.data.count; }
this.$q.dialog({
title: '将删除此金蝶项目',
message: '是否继续?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.apipost('Financial_post_DelKingdeeCurrency',msg, res => {
if(res.data.resultCode == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
});
this.getList();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, err => {}) }, err => {
})
}).onCancel(() => {
});
},
getBranchList() {//获取校区
getSchoolDropdown({}).then(res => {
this.CompanyList = res.Data;
// var obj = {
// SName: '全部',
// SId: '-1'
// }
// this.CompanyList.unshift(obj);
}).catch(() => {
})
},
// 获取金蝶项目名称
getType(ID){
this.CompanyList.forEach(item=>{
if(item.SId==ID){
this.addMsg.BranchName = item.SName
}
})
}, },
submitForm(addMsg) { //提交创建、修改表单 submitForm(addMsg) { //提交创建、修改表单
let that = this; let that = this;
...@@ -257,12 +269,8 @@ ...@@ -257,12 +269,8 @@
}); });
}, },
addFlightmodule() { //添加 addFlightmodule() { //添加
this.addMsg.Type = this.titleType
if (!this.addMsg.SubjectId) {
return this.$message.error('请选择科目')
}
this.addLoading = false this.addLoading = false
this.apipost('Financial_post_SetCostTypeKingdeeRelation', this.addMsg, res => { this.apipost('Financial_post_SetKingdeeItem', this.addMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addLoading = true this.addLoading = true
this.addShow = false; this.addShow = false;
...@@ -276,12 +284,14 @@ ...@@ -276,12 +284,14 @@
}, },
resetForm(formName) { //弹出框取消 初始化谈框内表单 resetForm(formName) { //弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.cancelEdit()
}, },
cancelEdit(t) { // 取消修改、新增 cancelEdit(t) { // 取消修改、新增
this.addMsg = { this.addMsg = {
Type: 2, Id: 0,
TargetId: '', BranchId: '',
SubjectId: '' BranchName: '',
ItemName: '',
} }
if (!t) { if (!t) {
this.addShow = false this.addShow = false
...@@ -290,57 +300,27 @@ ...@@ -290,57 +300,27 @@
//重置表单 //重置表单
resetInfo() { resetInfo() {
var msg = { var msg = {
Type: 2, Id: 0,
TargetId: '', BranchId: '',
SubjectId: '' BranchName: '',
ItemName: '',
} }
this.addMsg = msg; this.addMsg = msg;
}, },
clickEdit(item) { clickEdit(item) {
this.addMsg.TargetId = item.ID
this.addMsg.SubjectId = item.SubjectId
this.addShow = true
},
clickTitle(item) {
this.addShow = false this.addShow = false
this.titleType = item.Id if(item){
this.addMsg.Type = item.Id this.text = '编辑金蝶项目'
if (item.Id == 2) { console.log(item)
this.text = '新增银行对照表' this.addMsg = JSON.parse(JSON.stringify(item))
} }else{
if (item.Id == 3) { this.text = '新增金蝶项目'
this.text = '新增现金对照表'
}
if (item.Id == 1) {
this.text = '新增费用对照表'
}
},
// type 1关联 2支出 3收入
clickDaoRu(type) {
let userInfo = this.getLocalStorage();
// this.importFileUrl2 = this.domainManager().UploadFileUrl +
// "?cmd=dmc_post_LocalFileUpload&KingdeeBId=0&Type=11&fileType=1&fileLimit=10&EmployeeId=" + userInfo.Id +
// '&RB_Group_id=' + userInfo.Group_Id;
this.importFileUrl2 = this.domainManager().UploadFileUrl +
`?cmd=dmc_post_LocalFileUpload&KingdeeBId=0&Type=${type}&fileType=1&fileLimit=10&EmployeeId=${userInfo.Id}&RB_Group_id=${userInfo.Group_Id}`;
this.downList = this.domainManager().LocalTemplateFileDownLoadUrl + "/Upload/Template/未认款导入模板.xls";
},
beforeAvatarUpload(file) {
return;
},
//上传
handleAvatarSuccess(res, file) {
if (res.resultCode == 1) {
this.Success(res.message);
this.outerVisible = false;
this.getList();
} else {
this.Error(res.message);
} }
this.addShow = true
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.apipost('Financial_post_GetKingdeeCurrency', this.msg, res => { this.apipost('Financial_post_GetKingdeeItemList', this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; 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