Commit 9973ea45 authored by zhengke's avatar zhengke

修改

parent 1b32c706
......@@ -8,7 +8,7 @@
<div class="query-box">
<ul>
<li>
<button class="normalBtn" @click="addShow=true,text=$t('pub.addBtn')" >{{$t('pub.addBtn')}}</button>
<button class="normalBtn" @click="addShow=true,text=$t('pub.addBtn')">{{$t('pub.addBtn')}}</button>
<el-tooltip class="item" effect="dark" :content="$t('fnc.qhpaiban')" placement="top-end">
<i v-if="transitionShow" class="iconfont icon-biaoge" @click="switchMethod(1)"></i>
<i v-if="transitionShow2" class="iconfont icon-icon-ssan" @click="switchMethod(2)"></i>
......@@ -19,7 +19,8 @@
<div>
<p class="_cashierWorl_tit">{{$t('tips.accWorkTips')}}</p>
<div class="cm_content _scrollbar" :class="addShow==true?'_edHeight':''">
<table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading="loading" v-if="transitionShow2">
<table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0"
v-loading="loading" v-if="transitionShow2">
<tr>
<th>{{$t('fnc.w_ckmingcheng')}}</th>
<th>{{$t('fnc.w_ywrenyuan')}}</th>
......@@ -35,10 +36,7 @@
</td>
<td>
{{$t('fnc.fkuanzhanghu')}}
<el-popover
placement="bottom"
popper-class="CashierWork_tripDetails"
trigger="click">
<el-popover placement="bottom" popper-class="CashierWork_tripDetails" trigger="click">
<div class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="popTable">
<tr class="_color_666">
......@@ -57,34 +55,33 @@
</tr>
</table>
</div>
<span slot="reference" @click="Window_post_GetList(item.ID,1)" class="_underline _color_red">{{item.InCount}}</span>
<span slot="reference" @click="Window_post_GetList(item.ID,1)"
class="_underline _color_red">{{item.InCount}}</span>
</el-popover>
<span>{{$t('fnc.fkzhanghu')}}
<el-popover
placement="bottom"
popper-class="CashierWork_tripDetails"
trigger="click">
<div class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="popTable">
<tr class="_color_666">
<th>{{$t('fnc.w_zhbieming')}}</th>
<th>{{$t('fnc.shoukuan')}}</th>
<th>{{$t('fnc.zhikuan')}}</th>
</tr>
<tr v-for="(son,sIndex) in shouList" v-loading="shouListLoading">
<td>
<span class="_fangkuang" v-if="son.Is_Public===1">{{$t('fnc.w_gsdgong')}}</span>
<span class="_fangkuang _fangkuang_si" v-if="son.Is_Public===0">{{$t('fnc.w_gsdsi')}}</span>
<span>{{son.Alias}}</span>
</td>
<td><input v-model="son.Is_Income" disabled type="checkbox"></td>
<td><input v-model="son.Is_Outcome" disabled type="checkbox"></td>
</tr>
</table>
</div>
<span slot="reference" @click="Window_post_GetList(item.ID,2)" class="_underline _color_blue">{{item.OutCount}}</span>
</el-popover>
</span>
<el-popover placement="bottom" popper-class="CashierWork_tripDetails" trigger="click">
<div class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="popTable">
<tr class="_color_666">
<th>{{$t('fnc.w_zhbieming')}}</th>
<th>{{$t('fnc.shoukuan')}}</th>
<th>{{$t('fnc.zhikuan')}}</th>
</tr>
<tr v-for="(son,sIndex) in shouList" v-loading="shouListLoading">
<td>
<span class="_fangkuang" v-if="son.Is_Public===1">{{$t('fnc.w_gsdgong')}}</span>
<span class="_fangkuang _fangkuang_si" v-if="son.Is_Public===0">{{$t('fnc.w_gsdsi')}}</span>
<span>{{son.Alias}}</span>
</td>
<td><input v-model="son.Is_Income" disabled type="checkbox"></td>
<td><input v-model="son.Is_Outcome" disabled type="checkbox"></td>
</tr>
</table>
</div>
<span slot="reference" @click="Window_post_GetList(item.ID,2)"
class="_underline _color_blue">{{item.OutCount}}</span>
</el-popover>
</span>
</td>
<td>
<span class="_underline" @click="goUrl('FinancialDocuments',2)">{{item.DealCount}}</span>
......@@ -95,13 +92,16 @@
<td>
<el-row>
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start">
<el-button type="primary" class="iconfont icon-bianji-smal" circle @click="editCurency(item.ID),text=$t('pub.updateMsg')"></el-button>
<el-button type="primary" class="iconfont icon-bianji-smal" circle
@click="editCurency(item.ID),text=$t('pub.updateMsg')"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('fnc.w_djxinxi')" placement="top-start">
<el-button type="danger" class="iconfont icon-img-rili" circle @click="goUrlDetail('CashierWorkDetail',1,item.Name,item.ID)"></el-button>
<el-button type="danger" class="iconfont icon-img-rili" circle
@click="goUrlDetail('CashierWorkDetail',1,item.Name,item.ID)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" class="iconfont icon-img_delete_small" circle @click="financeinfoRemove(item.ID,item.ID)"></el-button>
<el-button type="danger" class="iconfont icon-img_delete_small" circle
@click="financeinfoRemove(item.ID,item.ID)"></el-button>
</el-tooltip>
</el-row>
</td>
......@@ -112,27 +112,25 @@
<div class="po_content_list_item_top">
<span class="_item_top_name">{{item.Name}}</span>
<span class="_item_top_icon">
<i class="iconfont icon-rizhi1" @click="goUrlDetail('CashierWorkDetail',1,item.Name,item.ID)"></i>
<i class="iconfont icon-bianji-smal" @click="editCurency(item.ID),text=$t('system.table_edit')"></i>
<i class="iconfont icon-img_delete_small" @click="financeinfoRemove(item.ID,item.ID)"></i>
</span>
<i class="iconfont icon-rizhi1" @click="goUrlDetail('CashierWorkDetail',1,item.Name,item.ID)"></i>
<i class="iconfont icon-bianji-smal" @click="editCurency(item.ID),text=$t('system.table_edit')"></i>
<i class="iconfont icon-img_delete_small" @click="financeinfoRemove(item.ID,item.ID)"></i>
</span>
</div>
<div class="po_content_list_item_bottom">
<p>
<span>{{$t('fnc.w_ywrenyuan')}}</span>
<template v-if="item.emList.length>0">
<span v-if="item.emList.length==1">
{{item.emList[0].emName}}
</span>
<span v-if="item.emList.length==1">
{{item.emList[0].emName}}
</span>
<div v-else>
<el-popover
placement="bottom"
popper-class="CashierWork_tripDetails"
trigger="click">
<el-popover placement="bottom" popper-class="CashierWork_tripDetails" trigger="click">
<div class="">
<span class="_all_name" v-for="(i,io) in item.emList">{{i.emName}}</span>
</div>
<span slot="reference" @click="" class="_underline">{{item.emList[0].emName}} {{$t('fnc.w_gong')}}{{item.emList.length}}{{$t('hotel.hotel_people')}}</span>
<span slot="reference" @click="" class="_underline">{{item.emList[0].emName}}
{{$t('fnc.w_gong')}}{{item.emList.length}}{{$t('hotel.hotel_people')}}</span>
</el-popover>
</div>
</template>
......@@ -143,10 +141,7 @@
</p>
<p>
<span>{{$t('fnc.fkuanzhanghu')}}</span>
<el-popover
placement="bottom"
popper-class="CashierWork_tripDetails"
trigger="click">
<el-popover placement="bottom" popper-class="CashierWork_tripDetails" trigger="click">
<div class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="popTable">
<tr class="_color_666">
......@@ -165,15 +160,13 @@
</tr>
</table>
</div>
<span slot="reference" @click="Window_post_GetList(item.ID,1)" class="_underline">{{item.InCount}}</span>
<span slot="reference" @click="Window_post_GetList(item.ID,1)"
class="_underline">{{item.InCount}}</span>
</el-popover>
</p>
<p>
<span>{{$t('fnc.fkzhanghu')}}</span>
<el-popover
placement="bottom"
popper-class="CashierWork_tripDetails"
trigger="click">
<el-popover placement="bottom" popper-class="CashierWork_tripDetails" trigger="click">
<div class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="popTable">
<tr class="_color_666">
......@@ -192,7 +185,8 @@
</tr>
</table>
</div>
<span slot="reference" @click="Window_post_GetList(item.ID,2)" class="_underline">{{item.OutCount}}</span>
<span slot="reference" @click="Window_post_GetList(item.ID,2)"
class="_underline">{{item.OutCount}}</span>
</el-popover>
</p>
<p>
......@@ -210,13 +204,8 @@
{{$t('system.content_noData')}}
</div>
<div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total=total>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
</el-pagination>
</div>
</div>
......@@ -227,7 +216,8 @@
</el-col>
<el-col :span="4" class="_add_saveBtn">
<button type="button" class="normalBtn" @click="submitForm('addMsg',1)">{{$t('pub.saveBtn')}}</button>
<button class="hollowFixedBtn" type="button" @click="cancelEdit(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
<button class="hollowFixedBtn" type="button"
@click="cancelEdit(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
</el-col>
</el-row>
<el-form class=" clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="100px">
......@@ -239,23 +229,10 @@
</el-col>
<el-col :span="10">
<el-form-item :label="$t('fnc.w_ywrenyuan')+':'" prop="listArr">
<el-select
v-model="addMsg.listArr"
filterable
remote
multiple
reserve-keyword
placeholder="请输入"
:placeholder="$t('pub.pleaseImport')"
:remote-method="remoteMethod"
@change="$forceUpdate()"
@remove-tag="removeTag"
:loading="loading2">
<el-option
v-for="item in searchList"
:key="item.Id"
:label="item.EmployeeName"
:value="item.Id">
<el-select v-model="addMsg.listArr" filterable remote multiple reserve-keyword placeholder="请输入"
:placeholder="$t('pub.pleaseImport')" :remote-method="remoteMethod" @change="$forceUpdate()"
@remove-tag="removeTag" :loading="loading2">
<el-option v-for="item in searchList" :key="item.Id" :label="item.EmployeeName" :value="item.Id">
<span style="float: left">{{ item.EmployeeName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span>
</el-option>
......@@ -276,50 +253,49 @@
<el-col :span="14">
<table class="singeRowTable" cellspacing="0" cellpadding="0" v-loading="loading">
<thead>
<tr>
<th>{{$t('fnc.acc')}}</th>
<th width="150px">{{$t('fnc.shoukuan')}} <input type="checkbox" v-model="shouChe" @change="isCheckAll(1)"><span class="_check_all">全选</span></th>
<th width="150px">{{$t('fnc.zhikuan')}} <input type="checkbox" v-model="zhiChe" @change="isCheckAll(2)"><span class="_check_all">全选</span></th>
<th width="90px">{{$t('system.table_operation')}}</th>
</tr>
<tr>
<th>{{$t('fnc.acc')}}</th>
<th width="150px">{{$t('fnc.shoukuan')}} <input type="checkbox" v-model="shouChe"
@change="isCheckAll(1)"><span class="_check_all">全选</span></th>
<th width="150px">{{$t('fnc.zhikuan')}} <input type="checkbox" v-model="zhiChe"
@change="isCheckAll(2)"><span class="_check_all">全选</span></th>
<th width="90px">{{$t('system.table_operation')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in addMsg.list">
<td>
<span class="_fangkuang" v-if="item.IsPublic===1">{{$t('fnc.w_gsdgong')}}</span>
<span class="_fangkuang _fangkuang_si" v-if="item.IsPublic===0">{{$t('fnc.w_gsdsi')}}</span>
<span class="_accname">{{item.Name}}</span>
</td>
<td width="150px">
<input v-model="item.isInCheckbox" type="checkbox">
</td>
<td width="150px">
<input v-model="item.isOutCheckbox" type="checkbox">
</td>
<td width="90px">
<el-button type="danger" @click="deleteItem(index)" class="iconfont icon-img_delete_small" circle></el-button>
</td>
</tr>
<tr>
<td>
<el-cascader
v-model="selectVal"
:options="AccList"
:show-all-levels="false"
:props="AccListProps"
@change="handleItemChange">
</el-cascader>
</td>
<td width="150px">
<tr v-for="(item,index) in addMsg.list">
<td>
<span class="_fangkuang" v-if="item.IsPublic===1">{{$t('fnc.w_gsdgong')}}</span>
<span class="_fangkuang _fangkuang_si" v-if="item.IsPublic===0">{{$t('fnc.w_gsdsi')}}</span>
<span class="_accname">{{item.Name}}</span>
</td>
<td width="150px">
<input v-model="item.isInCheckbox" type="checkbox">
</td>
<td width="150px">
<input v-model="item.isOutCheckbox" type="checkbox">
</td>
<td width="90px">
<el-button type="danger" @click="deleteItem(index)" class="iconfont icon-img_delete_small" circle>
</el-button>
</td>
</tr>
<tr>
<td>
<el-cascader v-model="selectVal" :options="AccList" :show-all-levels="false" :props="AccListProps"
@change="handleItemChange">
</el-cascader>
</td>
<td width="150px">
</td>
<td width="150px">
</td>
<td width="150px">
</td>
<td width="90px">
</td>
<td width="90px">
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</el-col>
......@@ -335,178 +311,200 @@
} from '../../api/users/user'
export default {
data(){
return{
msg:{
pageIndex:1,
pageSize:15
data() {
return {
msg: {
pageIndex: 1,
pageSize: 15
},
addMsg:{
ID:0,
Name:'',
list:[],
emList:[],
listArr:[],
BranchId:-1,
addMsg: {
ID: 0,
Name: '',
list: [],
emList: [],
listArr: [],
BranchId: -1,
},
getAccListMsg:{
IsPublic:-1,
BankType:0,
getAccListMsg: {
IsPublic: -1,
BankType: 0,
},
type:-1,
addShow:false,
loading:false,
loading2:false,
noData:false,
zhiChe:false,
shouChe:false,
total:0,
type: -1,
addShow: false,
loading: false,
loading2: false,
noData: false,
zhiChe: false,
shouChe: false,
total: 0,
currentPage: 1,
text:'',
dataList:[],
searchList:[],
AccList:[],
rules: {//表单必填验证
Name: [
{ required: true, message: '请填写窗口名称', trigger: 'blur' }
],
listArr: [
{type: 'array', required: true, message: '请选择业务员', trigger: 'blur' }
]
text: '',
dataList: [],
searchList: [],
AccList: [],
rules: { //表单必填验证
Name: [{
required: true,
message: '请填写窗口名称',
trigger: 'blur'
}],
listArr: [{
type: 'array',
required: true,
message: '请选择业务员',
trigger: 'blur'
}]
},
AccListProps: {
value:'Num',
label:'Name',
value: 'Num',
label: 'Name',
children: 'children'
},
selectVal:[],
transitionShow:false,
transitionShow2:true,
contenWidth:0,
contenHeight:0,
tableSize:0,
blockSize:0,
shouList:[],
shouListLoading:false,
selectVal: [],
transitionShow: false,
transitionShow2: true,
contenWidth: 0,
contenHeight: 0,
tableSize: 0,
blockSize: 0,
shouList: [],
shouListLoading: false,
}
},created(){
let allH,allW,cH,cW;
},
created() {
let allH, allW, cH, cW;
allH = document.documentElement.clientHeight;
allW = document.documentElement.clientWidth;
cW = allW-90;
cH = allH-187; //255 = 50 40 21 36 40
cW = allW - 90;
cH = allH - 187; //255 = 50 40 21 36 40
this.contenWidth = cW;
this.contenHeight = cH;
this.msg.pageSize = parseInt(cH/40)-1;
this.tableSize = this.msg.pageSize = parseInt(cH/45);
},methods:{
switchMethod(t){
this.msg.pageSize = parseInt(cH / 40) - 1;
this.tableSize = this.msg.pageSize = parseInt(cH / 45);
},
methods: {
switchMethod(t) {
this.msg.pageIndex = 1;
if(t===1){
if (t === 1) {
this.transitionShow = false;
this.transitionShow2 = true;
this.msg.pageSize = this.tableSize;
this.getList();
}else if(t===2){
} else if (t === 2) {
this.transitionShow = true;
this.transitionShow2 = false;
// 宽 235 高 206
let cont = parseInt(this.contenWidth/235) * parseInt(this.contenHeight/236);
let cont = parseInt(this.contenWidth / 235) * parseInt(this.contenHeight / 236);
this.msg.pageSize = cont;
this.getList();
}
},
Window_post_GetList(id,type){
Window_post_GetList(id, type) {
this.shouList = [];
this.shouListLoading = true;
let msg = {
ID:id,
Direct:type,
ID: id,
Direct: type,
}
this.apipost('Window_post_GetList',msg,r=>{
this.apipost('Window_post_GetList', msg, r => {
this.shouListLoading = false;
if(r.data.resultCode==1){
if (r.data.resultCode == 1) {
this.shouList = r.data.data;
}else{
} else {
}
},null)
}, null)
},
goUrl(path,g){
this.$router.push({name:path,query:{Conditon:g,blank:'y'}})
goUrl(path, g) {
this.$router.push({
path:'/financial/financalDocument/'+ path,
query: {
Conditon: g,
blank: 'y'
}
})
},
goUrlDetail(path,type,name,id){
this.$router.push({path:path,query:{WindowType:type,name:name,id:id,blank:'y',tab:'出纳窗口单据信息'}})
goUrlDetail(path, type, name, id) {
this.$router.push({
path: path,
query: {
WindowType: type,
name: name,
id: id,
blank: 'y',
tab: '出纳窗口单据信息'
}
})
},
removeTag(id){
this.addMsg.emList.forEach((x,index)=>{
if(x.EmId === id){
this.addMsg.emList.splice(index,1)
removeTag(id) {
this.addMsg.emList.forEach((x, index) => {
if (x.EmId === id) {
this.addMsg.emList.splice(index, 1)
}
})
},
mergeArray(list3, list1){
for (var i = 0 ; i < list3.length ; i ++ ){
for(var j = 0 ; j < list1.length ; j ++ ){
if (list3[i].EmId === list1[j].EmId){
list3.splice(i,1);
mergeArray(list3, list1) {
for (var i = 0; i < list3.length; i++) {
for (var j = 0; j < list1.length; j++) {
if (list3[i].EmId === list1[j].EmId) {
list3.splice(i, 1);
}
}
}
for(var i = 0; i <list1.length; i++){
for (var i = 0; i < list1.length; i++) {
list3.push(list1[i]);
}
return list3;
},
addCashierWork(){ // 提交保存
if(this.addMsg.list.length==0) return this.$message.error('请选择至少一个账户!')
addCashierWork() { // 提交保存
if (this.addMsg.list.length == 0) return this.$message.error('请选择至少一个账户!')
let sub = true;
for(let i = 0;i<this.addMsg.list.length;i++){
for (let i = 0; i < this.addMsg.list.length; i++) {
let x = this.addMsg.list[i];
if(!x.isInCheckbox&&!x.isOutCheckbox){
if (!x.isInCheckbox && !x.isOutCheckbox) {
sub = false;
break;
}else{
if(x.isInCheckbox&&x.isOutCheckbox){
} else {
if (x.isInCheckbox && x.isOutCheckbox) {
x.Direct = 3;
}else if(x.isInCheckbox){
} else if (x.isInCheckbox) {
x.Direct = 1;
}else if(x.isOutCheckbox){
} else if (x.isOutCheckbox) {
x.Direct = 2;
}
}
}
if(!sub) return this.$message.error('请选择出纳类型!')
if (!sub) return this.$message.error('请选择出纳类型!')
let emList = this.addMsg.listArr;
let arr = [];
emList.forEach(x=>{
this.searchList.forEach(y=>{
if(x==y.Id){
emList.forEach(x => {
this.searchList.forEach(y => {
if (x == y.Id) {
let obj = {
'EmId':y.Id,
'ID':0,
'WindowId':0,
'EmIdName':y.EmployeeName
'EmId': y.Id,
'ID': 0,
'WindowId': 0,
'EmIdName': y.EmployeeName
}
arr.push(obj);
}
})
});
let list4 = this.mergeArray(arr,this.addMsg.emList);
let list4 = this.mergeArray(arr, this.addMsg.emList);
this.addMsg.emList = list4;
this.apipost('Window_post_Set',this.addMsg,r=>{
if(r.data.resultCode==1){
this.apipost('Window_post_Set', this.addMsg, r => {
if (r.data.resultCode == 1) {
this.$message.success(r.data.message);
this.getList();
this.addShow = false;
this.cancelEdit();
}else{
} else {
this.$message.error(r.data.message);
}
},null)
}, null)
},
submitForm(addMsg) {//提交创建、修改表单
submitForm(addMsg) { //提交创建、修改表单
this.$refs[addMsg].validate((valid) => {
if (valid) {
this.addCashierWork();
......@@ -515,119 +513,121 @@
}
});
},
isCheckAll(t){ //1 shou 2 zhi 全选
if(t===1){
if(this.shouChe){
this.addMsg.list.forEach(x=>{
isCheckAll(t) { //1 shou 2 zhi 全选
if (t === 1) {
if (this.shouChe) {
this.addMsg.list.forEach(x => {
x.isInCheckbox = true
})
}else{
this.addMsg.list.forEach(x=>{
} else {
this.addMsg.list.forEach(x => {
x.isInCheckbox = false
})
}
}else{
if(this.zhiChe){
this.addMsg.list.forEach(x=>{
} else {
if (this.zhiChe) {
this.addMsg.list.forEach(x => {
x.isOutCheckbox = true
})
}else{
this.addMsg.list.forEach(x=>{
} else {
this.addMsg.list.forEach(x => {
x.isOutCheckbox = false
})
}
}
},
deleteItem(i){
this.addMsg.list.splice(i,1);
deleteItem(i) {
this.addMsg.list.splice(i, 1);
},
handleItemChange(obj){
handleItemChange(obj) {
let obj1 = this.AccList[obj[0]],
obj2 = this.AccList[obj[0]].children[obj[1]],
obj3 = this.AccList[obj[0]].children[obj[1]].children[obj[2]];
let addMsgList = {
ID:0,
AccountId:obj3.ID,
Type:obj2.ID,
AccountType:obj1.ID,
Direct:0,
Name:obj3.Name + (obj3.BankNo?obj3.BankNo:''),
IsPublic:obj1.IsPublic,
isInCheckbox:obj3.Is_Income?true:false,
isOutCheckbox:obj3.Is_Outcome?true:false,
allName:obj3.Name + (obj3.BankNo?obj3.BankNo:''),
ID: 0,
AccountId: obj3.ID,
Type: obj2.ID,
AccountType: obj1.ID,
Direct: 0,
Name: obj3.Name + (obj3.BankNo ? obj3.BankNo : ''),
IsPublic: obj1.IsPublic,
isInCheckbox: obj3.Is_Income ? true : false,
isOutCheckbox: obj3.Is_Outcome ? true : false,
allName: obj3.Name + (obj3.BankNo ? obj3.BankNo : ''),
}
this.addMsg.list.push(addMsgList);
this.selectVal = [];
},
getAccList(){
this.apipost('BankAccount_post_GetTreeAccountList',this.getAccListMsg,r=>{
if(r.data.resultCode==1){
function addNum (obj) {
getAccList() {
this.apipost('BankAccount_post_GetTreeAccountList', this.getAccListMsg, r => {
if (r.data.resultCode == 1) {
function addNum(obj) {
for (let i = 0; i < obj.length; i++) {
obj[i]['Num'] = i;
if (obj[i].hasOwnProperty('children')){
if (obj[i].hasOwnProperty('children')) {
obj[i].children = addNum(obj[i].children)
}
}
return obj
}
this.AccList = addNum(r.data.data)
}else{
} else {
}
},null)
}, null)
},
accType(t){
accType(t) {
this.selectVal = [];
if(this.type===t){
if (this.type === t) {
this.type = -1;
this.getAccListMsg = {
IsPublic:-1,
BankType:0,
IsPublic: -1,
BankType: 0,
};
this.getAccList();
}else{
} else {
this.type = t;
let msg = {
IsPublic:-1,
BankType:0,
IsPublic: -1,
BankType: 0,
}
if(t===1){ // 1公 2私
if (t === 1) { // 1公 2私
msg.IsPublic = 1;
this.getAccListMsg = msg;
this.getAccList();
}else if(t===2){
} else if (t === 2) {
msg.IsPublic = 0;
this.getAccListMsg = msg;
this.getAccList();
}else if(t===3){
} else if (t === 3) {
msg.BankType = 2;
this.getAccListMsg = msg;
this.getAccList();
}else if(t===4){
} else if (t === 4) {
msg.BankType = 4;
this.getAccListMsg = msg;
this.getAccList();
}else if(t===5){
} else if (t === 5) {
msg.BankType = 1;
this.getAccListMsg = msg;
this.getAccList();
}else if(t===6){
} else if (t === 6) {
msg.BankType = 3;
this.getAccListMsg = msg;
this.getAccList();
}
}
},
financeinfoRemove(id,text){ // 删除货币
this.$confirm('确定删除'+text+'出纳窗口?', '提示', {
financeinfoRemove(id, text) { // 删除货币
this.$confirm('确定删除' + text + '出纳窗口?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('Window_post_Remove',{ID:id}, res => {
if(res.data.resultCode == 1) {
this.apipost('Window_post_Remove', {
ID: id
}, res => {
if (res.data.resultCode == 1) {
this.getList()
this.$message.success(res.data.message);
} else {
......@@ -641,7 +641,7 @@
});
});
},
handleSelect(item){
handleSelect(item) {
this.addMsg.EmId = item.empId;
},
remoteMethod(query) {
......@@ -649,46 +649,50 @@
EmployeeName: query
}
queryEmployee(qMsg).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.searchList = res.Data;
}
}).catch(() => {
})
},
getList(){
getList() {
this.loading = true;
this.apipost('Window_post_GetPageList',this.msg, res => {
if(res.data.resultCode == 1) {
this.apipost('Window_post_GetPageList', this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
if(this.total>0){
this.noData =false;
}else{
this.noData =true;
if (this.total > 0) {
this.noData = false;
} else {
this.noData = true;
}
} else {
this.$message.error(res.data.message);
}
this.loading = false;
}, err => {this.loading = false;})
}, err => {
this.loading = false;
})
},
editCurency(id){ // 修改 根据id 获取信息
this.apipost('Window_post_Get',{ID:id}, res => {
if(res.data.resultCode == 1) {
editCurency(id) { // 修改 根据id 获取信息
this.apipost('Window_post_Get', {
ID: id
}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
let arr = [];
arr.push(data.AccountType);
arr.push(data.Type);
arr.push(data.AccountId);
data.list.forEach(x=>{
if(x.Direct==3){
data.list.forEach(x => {
if (x.Direct == 3) {
x.isInCheckbox = true;
x.isOutCheckbox = true;
}else if(x.Direct==1){
} else if (x.Direct == 1) {
x.isInCheckbox = true;
x.isOutCheckbox = false;
}else if(x.Direct==2){
} else if (x.Direct == 2) {
x.isInCheckbox = false;
x.isOutCheckbox = true;
}
......@@ -697,8 +701,8 @@
});
this.addMsg = data;
this.addMsg.listArr = [];
if(data.emList&&data.emList.length>0){
data.emList.forEach(x=>{
if (data.emList && data.emList.length > 0) {
data.emList.forEach(x => {
this.remoteMethod('');
this.addMsg.listArr.push(x.EmId)
})
......@@ -706,7 +710,7 @@
this.selectVal = arr;
this.addShow = true;
} else {
this.tips(res.data.message,'error');
this.tips(res.data.message, 'error');
}
}, err => {})
},
......@@ -714,33 +718,34 @@
this.msg.pageIndex = val;
this.getList();
},
cancelEdit(){ // 取消修改、新增
cancelEdit() { // 取消修改、新增
this.addMsg = {
ID:0,
Name:'',
list:[],
emList:[],
listArr:[],
BranchId:-1,
ID: 0,
Name: '',
list: [],
emList: [],
listArr: [],
BranchId: -1,
}
},
resetForm(formName) {//弹出框取消 初始化谈框内表单
resetForm(formName) { //弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
},
getEmployee(){
getEmployee() {
queryEmployee({}).then(res => {
if(res.Code==1){
if (res.Code == 1) {
this.searchList = res.Data;
console.log(res,'数据');
}
}).catch(() => {
})
}
},mounted(){
},
mounted() {
this.getList();
this.getAccList();
this.getEmployee();
}
}
</script>
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