Commit 375f9ad8 authored by youjie's avatar youjie

标记结款单据

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