Commit 42d9e9c2 authored by 黄媛媛's avatar 黄媛媛

update

parent 21389848
......@@ -6,6 +6,23 @@
<div class="page_accountingWork">
<div class="query-box">
<ul>
<li>
<span>
<em>流程</em>
<el-select class="w200"
filterable
v-model="msg.TemplateId"
>
<el-option :label="$t('system.ph_buxian')" value="-1"></el-option>
<el-option
v-for="(item,index) in SingleList"
:label="item.Name"
:value="item.Id"
:key="index+50000"
></el-option>
</el-select>
</span>
</li>
<li>
<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">
......@@ -23,6 +40,7 @@
<th>{{$t('fnc.w_ckmingcheng')}}</th>
<th>{{$t('system.query_company')}}</th>
<th>{{$t('fnc.w_ywrenyuan')}}</th>
<th>流程</th>
<th>{{$t('fnc.w_fzfangxiang')}}</th>
<th>{{$t('system.table_operation')}}</th>
</tr>
......@@ -32,6 +50,9 @@
<td>
<span v-for="(i,ix) in item.emList">{{i.emName}} <span v-if="ix!=item.emList.length-1">,</span> </span>
</td>
<td>
<span v-for="(i,ix) in item.TemplateList" :key="ix+5000">{{i.Name}} <span v-if="ix!=item.TemplateList.length-1">,</span> </span>
</td>
<td>
<span v-if="item.Direct==1">{{$t('fnc.shoukuan')}}</span>
<span v-else-if="item.Direct==2">{{$t('fnc.zhikuan')}}</span>
......@@ -123,7 +144,6 @@
<el-col :span="4">
<el-form-item :label="$t('fnc.ssuogongsi')+':'" prop="BranchId">
<el-select filterable v-model='addMsg.BranchId'>
</el-option>
<el-option v-for='item in CompanyList'
:label='item.BName'
:value='item.Id'
......@@ -133,7 +153,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="5">
<el-form-item :label="$t('fnc.w_ywrenyuan')+':'" prop="listArr">
<el-select
v-model="addMsg.listArr"
......@@ -147,8 +167,8 @@
@remove-tag="removeTag"
:loading="loading2">
<el-option
v-for="item in searchList"
:key="item.empId"
v-for="(item,index) in searchList"
:key="index+60000"
:label="item.name"
:value="item.empId">
<span style="float: left">{{ item.name }}</span>
......@@ -157,6 +177,26 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="流程">
<el-select
v-model="addMsg.TemplateListArr"
filterable
multiple
collapse-tags
@change="$forceUpdate()"
:placeholder="$t('pub.pleaseImport')">
<el-option
v-for="(item,index) in SingleList"
:key="index+200"
:label="item.Name"
:value="item.Id">
<!-- <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.postName }}</span> -->
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('fnc.w_fzfangxiang')" prop="Direct">
<el-radio v-model="addMsg.Direct" :label="1">{{$t('fnc.w_shou')}}</el-radio>
......@@ -192,13 +232,15 @@ export default {
return{
msg:{
pageIndex:1,
pageSize:15
pageSize:15,
TemplateId:'',
},
addMsg:{
ID:0,
Name:'',
accountant_list:[],
emList:[],
TemplateList:[],
listArr:[],
BranchId:'',
Direct:'',
......@@ -255,6 +297,7 @@ export default {
RB_Group_Id:'0',
Status:'0',
},
SingleList:[],
}
},created(){
let userInfo = this.getLocalStorage();
......@@ -268,7 +311,16 @@ export default {
this.msg.pageSize = parseInt(cH/40)-1;
this.tableSize = this.msg.pageSize = parseInt(cH/45);
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
this.getSingleList();
},methods:{
getSingleList(){ // 获取费用类型
this.apipost('FinancialFlowTemplate_post_GetSingleList',{},res=>{
console.log("1231",res);
if(res.data.resultCode==1){
this.SingleList=res.data.data;
}else{}
},err=>{})
},
switchMethod(t){
this.msg.pageIndex = 1;
if(t===1){
......@@ -327,7 +379,22 @@ export default {
arr.push(obj);
})
let list4 = this.mergeArray(arr,this.addMsg.emList);
let TemplateListArr=this.addMsg.TemplateListArr;
let newArr=[];
TemplateListArr.forEach(item=>{
this.SingleList.forEach(val=>{
let obj={};
if(item==val.Id){
obj.Id=val.Id;
obj.Name=val.Name;
newArr.push(obj);
}
})
})
this.addMsg.emList = list4;
this.addMsg.TemplateList = newArr;
this.apipost('Window_post_SetAccountant',this.addMsg,r=>{
if(r.data.resultCode==1){
this.$message.success(r.data.message);
......@@ -410,12 +477,18 @@ export default {
// })
this.addMsg = data;
this.addMsg.listArr = [];
this.addMsg.TemplateListArr = [];
if(data.emList&&data.emList.length>0){
data.emList.forEach(x=>{
this.remoteMethod(x.emName);
this.addMsg.listArr.push(x.EmId)
})
}
if(data.TemplateList&&data.TemplateList.length>0){
data.TemplateList.forEach(x=>{
this.addMsg.TemplateListArr.push(x.Id)
})
}
this.addMsg.accountant_list = [];
this.addShow = true;
} else {
......@@ -434,6 +507,8 @@ export default {
accountant_list:[],
emList:[],
listArr:[],
TemplateListArr:[],
TemplateList:[],
BranchId:'',
Direct:''
}
......
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