Commit 375f9ad8 authored by youjie's avatar youjie

标记结款单据

parent 8c66e8fc
......@@ -108,7 +108,7 @@
</el-col> -->
<el-col :span="4" :gutter="35">
<el-form-item :label="$t('fnc.a_djztai')">
<el-select filterable v-model='msg.Status' >
<el-select filterable v-model='msg.Status'>
<el-option :label="$t('pub.unlimitedSel')" :value='-1'></el-option>
<el-option :label='$t("fnc.a_shezhong")' :value='1'></el-option>
<el-option :label='$t("visa.v_tongguo")' :value='2'></el-option>
......@@ -198,6 +198,8 @@
</el-form>
<ul>
<li>
<input type="button" class="hollowFixedBtn" value="标记申请结款" @click="ApplySettlement"
:loading="loadingApply"/>
<input type="button" class="hollowFixedBtn" :value="$t('fnc.a_hbdanju')" @click="addChuNaFun"/>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="getList()"/>
<input type="button" class="normalBtn" :value="$t('visa.v_daochu')" @click="Export"/>
......@@ -238,7 +240,8 @@
</tr>
<tr v-for=" ( item , index ) in DataList ">
<td>
<input v-if="item.CallBackReFrId<=0 && item.CostTypeName !='资金调拨'" type="checkbox" :disabled="item.disabled" v-model="item.check" @change="addCheckbox(item,index)">
<input v-if="item.CallBackReFrId<=0 && item.CostTypeName !='资金调拨'" type="checkbox" :disabled="item.disabled"
v-model="item.check" @change="addCheckbox(item,index)">
</td>
<td>{{ item.BName }}</td>
<td>{{ item.OrderID }}</td>
......@@ -300,8 +303,8 @@
</td>
</tr>
</table>
</div>
<el-dialog custom-class='w750' title="合并单据" :visible.sync="addChuNa" center :before-close="initAddChuNa" v-loading="allLoading">
......@@ -505,6 +508,7 @@ import moment from 'moment'
export default {
data(){
return{
loadingApply: false,
AccountLoading: false,
ClientAccountMsg:{
ID:0,
......@@ -597,7 +601,8 @@ export default {
//是否全选
isCheckAll:false,
}
},created(){
},
created(){
this.userInfo = this.getLocalStorage();
if(this.$route.query.DayReport && this.$route.query.DayReport=='1'){
this.msg.IsFromDayReport =1;
......@@ -635,7 +640,27 @@ export default {
this.getList();
}
},methods:{
},
methods:{
ApplySettlement(){
if(!this.checkList||this.checkList.length==0){
return this.$message.error('请选择单据')
}
this.loadingApply = true
let ids = this.checkList.map(x=>{return x.FinanceId})
let msg = {
FrIDs: ids.join(',')
}
this.apipost('Financial_post_SetPlatfromApplyforRecord',msg,res=>{
if(res.data.resultCode==1){
this.getList()
this.loadingApply = false
}else{
this.loadingApply = false
this.$message.error(res.data.message)
}
},err=>{this.loadingApply = false})
},
Export(){
let msg=this.msg;
msg.EmployeeId = this.userInfo.EmployeeId;
......@@ -774,6 +799,12 @@ export default {
if(res.data.resultCode==1){
let data = res.data.data;
if(data.length){
let arrlist = function(list){
list.forEach(x=>{
x.check = false
})
}
arrlist(data)
this.StartMoney = data[0].StartMoney?data[0].StartMoney:0;
let Money = data[0].StartMoney?data[0].StartMoney:0,
InMoney = 0,
......@@ -1069,41 +1100,63 @@ export default {
if(this.msg.IsPlatformMergeBank==1){
x.disabled=false
}else{
x.disabled=true
x.disabled=true
}
}
});
if(obj.check){
this.checkList[index] = {
FinanceId:obj.FinanceId,
Type:obj.Type,
ClientID:obj.ClientID,
ClientType:obj.ClientType,
OriginalMoney:obj.OriginalMoney,
Money:obj.Money,
if(obj.check&&obj.DutyNo){
this.DataList.forEach(x=>{
if(x.DutyNo){
let newObj = {
FinanceId:x.FinanceId,
Type:x.Type,
ClientID:x.ClientID,
ClientType:x.ClientType,
OriginalMoney:x.OriginalMoney,
Money:x.Money,
}
x.check = true
let exists = this.checkList.findIndex(z=> z.FinanceId==x.FinanceId)
if(exists==-1) this.checkList.push(newObj)
x.disabled=false
}
})
}else{
let newObj = {
FinanceId:obj.FinanceId,
Type:obj.Type,
ClientID:obj.ClientID,
ClientType:obj.ClientType,
OriginalMoney:obj.OriginalMoney,
Money:obj.Money,
}
this.checkList.push(newObj)
}
this.BillType = obj.Type;
}else{
this.checkList[index] = {
FinanceId:null,
Type:null,
ClientID:null,
ClientType:null,
OriginalMoney:0,
Money:0,
}
}
let count = false;
this.checkList.forEach(x=>{
if(x.FinanceId){
return count = true;
}
});
if(!count){
this.DataList.forEach((x,i)=>{
x.disabled=false
})
this.checkList = this.checkList.filter(z=> z.FinanceId!=obj.FinanceId)
// this.checkList[index] = {
// FinanceId:null,
// Type:null,
// ClientID:null,
// ClientType:null,
// OriginalMoney:0,
// Money:0,
// }
}
// let count = false;
// this.checkList.forEach(x=>{
// if(x.FinanceId){
// return count = true;
// }
// });
// if(!count){
// this.DataList.forEach((x,i)=>{
// x.disabled=false
// })
// }
},
addChuNaFun(){ // 添加出纳按钮点击事件
let count = 0;
......
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