Commit 558b6fba authored by 华国豪's avatar 华国豪 🙄

'付款单出纳 可选多个'

parent 1cda2ec8
...@@ -506,19 +506,60 @@ ...@@ -506,19 +506,60 @@
<th width="100px">总金额</th> <th width="100px">总金额</th>
<!-- <th>操作</th> --> <!-- <th>操作</th> -->
</tr> </tr>
<tr v-for="(i,index) in payMsgList"> <template v-for="(i,index) in payMsgList">
<tr v-if="!i.show" @click="payMsgListShow(i, index)">
<td>{{i.AccName}}</td> <td>{{i.AccName}}</td>
<td>{{i.Name}}</td> <td>{{i.Name}}</td>
<td>{{i.Account}}</td> <td>{{i.Account}}</td>
<!-- <td>{{i.balance}}</td> --> <!-- <td>{{item.balance}}</td> -->
<td>{{i.OriginalMoney}}</td> <td>{{moneyFormat(i.OriginalMoney)}}</td>
<td>{{i.CurrenName}}</td> <td>{{i.CurrenName}}</td>
<td>{{i.Rate}}</td> <td>{{i.Rate}}</td>
<!-- <td>{{i.Fee}}</td> --> <!-- <td>{{item.Fee}}</td> -->
<th>{{i.allMoney}}</th> <td>{{moneyFormat(i.allMoney)}}</td>
<!-- <td></td> --> <!-- <td></td> -->
</tr> </tr>
<tr> <tr v-else @keyup.enter="addList(2,index)">
<td>
<el-select filterable v-model='i.AccName' @change="clearAccBank(1,index)" class=" _border_b_1">
<el-option v-for='a in AccList'
:label='a.Name'
:value='a.Name'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-select filterable v-model='i.Type' @change="getAccountList(i.Type,1,index)" class=" _border_b_1">
<el-option v-for='a in GetAccountType'
:label='a.Name'
:value='a.ID'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-select filterable v-model='i.AccountId' placeholder="请选择账户" @change="setAccountName(i.AccountId,1,index)" class=" _border_b_1">
<el-option v-for='a in accountList'
:label='a.allName'
:value='a.ID'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-input v-model="i.OriginalMoney" @change="Calculation(1,index)" @blur="addList(2,index)" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input>
</td>
<td>
<p>{{i.CurrenName}}</p>
</td>
<td>
<el-input v-model="i.Rate" @change="Calculation(1,index)" @blur="addList(2,index)" type="number" class=" _border_b_1"></el-input>
</td>
<td>{{i.allMoney.toFixed(2)}}</td>
</tr>
</template>
<tr @keyup.enter="addList()">
<td> <td>
<el-select filterable v-model='payMsg.AccName' @change="clearAccBank()" class=" _border_b_1"> <el-select filterable v-model='payMsg.AccName' @change="clearAccBank()" class=" _border_b_1">
<el-option v-for='i in AccList' <el-option v-for='i in AccList'
...@@ -548,18 +589,18 @@ ...@@ -548,18 +589,18 @@
</td> </td>
<!-- <td>{{payMsg.balance}}</td> --> <!-- <td>{{payMsg.balance}}</td> -->
<td> <td>
<el-input v-model="payMsg.OriginalMoney" @change="Calculation()" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.OriginalMoney" @change="Calculation()" @blur="addList()" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input>
</td> </td>
<td> <td>
<p>{{payMsg.CurrenName}}</p> <p>{{payMsg.CurrenName}}</p>
</td> </td>
<td> <td>
<el-input v-model="payMsg.Rate" @change="Calculation()" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.Rate" @change="Calculation()" @blur="addList()" type="number" class=" _border_b_1"></el-input>
</td> </td>
<!-- <td> <!-- <td>
<el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input>
</td> --> </td> -->
<td>{{payMsg.allMoney}}</td> <td>{{moneyFormat(payMsg.allMoney)}}</td>
<!-- <td width="120px"> <!-- <td width="120px">
<span class="_now_pay" @click="payFun()">立即付款</span> <span class="_now_pay" @click="payFun()">立即付款</span>
</td> --> </td> -->
...@@ -662,19 +703,60 @@ ...@@ -662,19 +703,60 @@
<th width="100px">总金额</th> <th width="100px">总金额</th>
<!-- <th>操作</th> --> <!-- <th>操作</th> -->
</tr> </tr>
<tr v-for="(i,index) in payMsgList"> <template v-for="(i,index) in payMsgList">
<tr v-if="!i.show" @click="payMsgListShow(i, index)">
<td>{{i.AccName}}</td> <td>{{i.AccName}}</td>
<td>{{i.Name}}</td> <td>{{i.Name}}</td>
<td>{{i.Account}}</td> <td>{{i.Account}}</td>
<!-- <td>{{item.balance}}</td> --> <!-- <td>{{item.balance}}</td> -->
<td>{{i.OriginalMoney}}</td> <td>{{moneyFormat(i.OriginalMoney)}}</td>
<td>{{i.CurrenName}}</td> <td>{{i.CurrenName}}</td>
<td>{{i.Rate}}</td> <td>{{i.Rate}}</td>
<!-- <td>{{item.Fee}}</td> --> <!-- <td>{{item.Fee}}</td> -->
<th>{{i.allMoney}}</th> <th>{{moneyFormat(i.allMoney)}}</th>
<!-- <td></td> --> <!-- <td></td> -->
</tr> </tr>
<tr> <tr v-else @keyup.enter="addList(2,index)">
<td>
<el-select filterable v-model='i.AccName' @change="clearAccBank(1,index)" class=" _border_b_1">
<el-option v-for='a in AccList'
:label='a.Name'
:value='a.Name'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-select filterable v-model='i.Type' @change="getAccountList(i.Type,1,index)" class=" _border_b_1">
<el-option v-for='a in GetAccountType'
:label='a.Name'
:value='a.ID'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-select filterable v-model='i.AccountId' placeholder="请选择账户" @change="setAccountName(i.AccountId,1,index)" class=" _border_b_1">
<el-option v-for='a in accountList'
:label='a.allName'
:value='a.ID'
:key='a.ID'>
</el-option>
</el-select>
</td>
<td>
<el-input v-model="i.OriginalMoney" @change="Calculation(1,index)" @blur="addList(2,index)" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input>
</td>
<td>
<p>{{i.CurrenName}}</p>
</td>
<td>
<el-input v-model="i.Rate" @change="Calculation(1,index)" @blur="addList(2,index)" type="number" class=" _border_b_1"></el-input>
</td>
<td>{{i.allMoney.toFixed(2)}}</td>
</tr>
</template>
<tr @keyup.enter="addList()">
<td> <td>
<el-select filterable v-model='payMsg.AccName' @change="clearAccBank()" class=" _border_b_1"> <el-select filterable v-model='payMsg.AccName' @change="clearAccBank()" class=" _border_b_1">
<el-option v-for='i in AccList' <el-option v-for='i in AccList'
...@@ -704,18 +786,18 @@ ...@@ -704,18 +786,18 @@
</td> </td>
<!-- <td>{{payMsg.balance}}</td> --> <!-- <td>{{payMsg.balance}}</td> -->
<td> <td>
<el-input v-model="payMsg.OriginalMoney" @change="Calculation()" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.OriginalMoney" @change="Calculation()" @blur="addList()" placeholder="请输入金额" type="number" class=" _border_b_1"></el-input>
</td> </td>
<td> <td>
<p>{{payMsg.CurrenName}}</p> <p>{{payMsg.CurrenName}}</p>
</td> </td>
<td> <td>
<el-input v-model="payMsg.Rate" @change="Calculation()" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.Rate" @change="Calculation()" @blur="addList()" type="number" class=" _border_b_1"></el-input>
</td> </td>
<!-- <td> <!-- <td>
<el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input> <el-input v-model="payMsg.Fee" @change="Calculation()" type="number" class=" _border_b_1"></el-input>
</td> --> </td> -->
<td>{{payMsg.allMoney.toFixed(2)}}</td> <td>{{moneyFormat(payMsg.allMoney)}}</td>
<!-- <td width="120px"> <!-- <td width="120px">
<span class="_now_pay" @click="payFun()">立即付款</span> <span class="_now_pay" @click="payFun()">立即付款</span>
</td> --> </td> -->
...@@ -725,7 +807,7 @@ ...@@ -725,7 +807,7 @@
<td height="50px"></td> <td height="50px"></td>
<td height="50px"></td> <td height="50px"></td>
<td height="50px"></td> <td height="50px"></td>
<td height="50px"></td>Content <td height="50px"></td>
<td height="50px"></td> <td height="50px"></td>
<td height="50px"></td> <td height="50px"></td>
<!-- <td height="50px"></td> --> <!-- <td height="50px"></td> -->
...@@ -974,6 +1056,7 @@ export default { ...@@ -974,6 +1056,7 @@ export default {
Account:'', Account:'',
balance:'', balance:'',
allMoney:0, allMoney:0,
show: false,
}, },
CurrencyId:'', CurrencyId:'',
importFileUrl:this.domainManager().UploadFileUrl+'?cmd=User_post_FileUpload&fileType=1&fileLimit=10', importFileUrl:this.domainManager().UploadFileUrl+'?cmd=User_post_FileUpload&fileType=1&fileLimit=10',
...@@ -1024,6 +1107,61 @@ export default { ...@@ -1024,6 +1107,61 @@ export default {
'TicketFinace':TicketFinace, 'TicketFinace':TicketFinace,
'my-HB-Bill':myhrBill, 'my-HB-Bill':myhrBill,
},methods:{ },methods:{
payMsgListShow: function (type, index) {
this.payMsgList.forEach(x=>{
x.show = false
})
if(type.Type==1){
this.bankaccount_post_GetList()
}
if(type.Type==2){
this.BankAccount_post_GetPlatformList()
}
if(type.Type==3){
this.BankAccount_post_GetCashAccountList()
}
if(type.Type==4){
this.BankAccount_post_GetCashPoolList()
}
this.payMsgList[index].show = true
},
addList: function (type, index) {
if (type) {
if (this.payMsgList[index].AccountId==='') return
if (this.payMsgList[index].Type==='') return
if (this.payMsgList[index].AccName==='') return
if (this.payMsgList[index].Name==='') return
this.payMsgList[index].show = false
} else {
if (this.payMsg.AccountId==='') return
if (this.payMsg.Type==='') return
if (this.payMsg.AccName==='') return
if (this.payMsg.Name==='') return
this.payMsgList.push(this.payMsg);
this.payMsg = {
ID:0,
FinanceId:'',
Type:'',
AccName: '',
AccountId:'',
OriginalMoney:0,
CurrencyId:'',
Rate:0,
Fee:0,
Name:'',
CurrenName:'',
Account:'',
balance:'',
allMoney:0,
show: false,
}
}
let allMoney = 0
this.payMsgList.forEach(x=>{
allMoney+=x.allMoney
})
this.allMoney = allMoney
},
Financial_post_GetFinancLogList(){ // 获取单据日志 Financial_post_GetFinancLogList(){ // 获取单据日志
if(this.checkboxShow) return if(this.checkboxShow) return
this.LogLoading = true; this.LogLoading = true;
...@@ -1047,11 +1185,7 @@ export default { ...@@ -1047,11 +1185,7 @@ export default {
if(this.GetDetail.CashierDetail==1){ if(this.GetDetail.CashierDetail==1){
this.AuditOrRefundMsg.SpecialNode=0; this.AuditOrRefundMsg.SpecialNode=0;
} }
this.AuditOrRefundMsg.tradeWays[0].CurrencyId = this.payMsg.CurrencyId?this.payMsg.CurrencyId:0; this.AuditOrRefundMsg.tradeWays = this.payMsgList
this.AuditOrRefundMsg.tradeWays[0].OriginalMoney = this.payMsg.OriginalMoney?this.payMsg.OriginalMoney:'';
this.AuditOrRefundMsg.tradeWays[0].Rate = this.payMsg.Rate?this.payMsg.Rate:'';
this.AuditOrRefundMsg.tradeWays[0].Type = this.payMsg.Type?this.payMsg.Type:0;
this.AuditOrRefundMsg.tradeWays[0].AccountId= this.payMsg.AccountId?this.payMsg.AccountId:0;
this.AuditOrRefundMsg.WorkFlowId=parseInt(this.ID) this.AuditOrRefundMsg.WorkFlowId=parseInt(this.ID)
this.AuditOrRefundMsg.TemplateType=this.GetDetail.TemplateType this.AuditOrRefundMsg.TemplateType=this.GetDetail.TemplateType
this.AuditOrRefundMsg.Image=JSON.stringify(imgArr); this.AuditOrRefundMsg.Image=JSON.stringify(imgArr);
...@@ -1194,11 +1328,25 @@ export default { ...@@ -1194,11 +1328,25 @@ export default {
} }
} }
}, },
clearAccBank(){ // 选择账户类型清空数据 clearAccBank(type,index){ // 选择账户类型清空数据
if (type) {
this.payMsgList[index].Type = ''
this.payMsgList[index].AccountId = '';
} else {
this.payMsg.Type = ''; this.payMsg.Type = '';
this.payMsg.AccountId = ''; this.payMsg.AccountId = '';
}
}, },
Calculation(){ // 计算价格 Calculation(type, index){ // 计算价格
if (type) {
this.payMsgList[index].Fee = isNaN(parseFloat(this.payMsgList[index].Fee))?0:parseFloat(this.payMsgList[index].Fee);
this.payMsgList[index].Rate = isNaN(parseFloat(this.payMsgList[index].Rate))?0:parseFloat(this.payMsgList[index].Rate);
this.payMsgList[index].OriginalMoney = isNaN(parseFloat(this.payMsgList[index].OriginalMoney))?0:parseFloat(this.payMsgList[index].OriginalMoney);
let fee = this.payMsgList[index].Fee,
Rate = this.payMsgList[index].Rate==0?1:this.payMsgList[index].Rate,
Money = this.payMsgList[index].OriginalMoney;
this.payMsgList[index].allMoney = (Money*Rate)+fee;
} else {
this.payMsg.Fee = isNaN(parseFloat(this.payMsg.Fee))?0:parseFloat(this.payMsg.Fee); this.payMsg.Fee = isNaN(parseFloat(this.payMsg.Fee))?0:parseFloat(this.payMsg.Fee);
this.payMsg.Rate = isNaN(parseFloat(this.payMsg.Rate))?0:parseFloat(this.payMsg.Rate); this.payMsg.Rate = isNaN(parseFloat(this.payMsg.Rate))?0:parseFloat(this.payMsg.Rate);
this.payMsg.OriginalMoney = isNaN(parseFloat(this.payMsg.OriginalMoney))?0:parseFloat(this.payMsg.OriginalMoney); this.payMsg.OriginalMoney = isNaN(parseFloat(this.payMsg.OriginalMoney))?0:parseFloat(this.payMsg.OriginalMoney);
...@@ -1206,18 +1354,29 @@ export default { ...@@ -1206,18 +1354,29 @@ export default {
Rate = this.payMsg.Rate==0?1:this.payMsg.Rate, Rate = this.payMsg.Rate==0?1:this.payMsg.Rate,
Money = this.payMsg.OriginalMoney; Money = this.payMsg.OriginalMoney;
this.payMsg.allMoney = (Money*Rate)+fee; this.payMsg.allMoney = (Money*Rate)+fee;
this.allMoney = this.payMsg.allMoney ; }
// console.log(Rate+"+"+fee+"+"+Money) // console.log(Rate+"+"+fee+"+"+Money)
}, },
setAccountName(i){ setAccountName(i, type, index){
this.accountList.forEach(x=>{ this.accountList.forEach(x=>{
if(x.ID==i){ if(x.ID==i){
if (type) {
this.payMsgList[index].Account = x.allName;
console.log(x)
this.payMsgList[index].CurrenName =x.CurrencyName;
this.payMsgList[index].Rate = x.CurrencyRate?x.CurrencyRate:x.CurrentRate;
this.payMsgList[index].CurrencyId = x.CurrencyId;
this.payMsgList[index].balance = x.Initialbalance;
this.Calculation(1, index);
} else {
this.payMsg.Account = x.allName; this.payMsg.Account = x.allName;
console.log(x) console.log(x)
this.payMsg.CurrenName =x.CurrencyName; this.payMsg.CurrenName =x.CurrencyName;
this.payMsg.Rate = x.CurrencyRate?x.CurrencyRate:x.CurrentRate; this.payMsg.Rate = x.CurrencyRate?x.CurrencyRate:x.CurrentRate;
this.payMsg.CurrencyId = x.CurrencyId; this.payMsg.CurrencyId = x.CurrencyId;
this.payMsg.balance = x.Initialbalance; this.payMsg.balance = x.Initialbalance;
this.Calculation();
}
} }
}) })
}, },
...@@ -1237,13 +1396,22 @@ export default { ...@@ -1237,13 +1396,22 @@ export default {
} }
}, err => {}) }, err => {})
}, },
getAccountList(i){ getAccountList(i,type,index){
if (type) {
this.payMsgList[index].AccountId = '';
this.GetAccountType.forEach(x=>{
if(x.ID==i){
this.payMsgList[index].Name = x.Name;
}
})
} else {
this.payMsg.AccountId = ''; this.payMsg.AccountId = '';
this.GetAccountType.forEach(x=>{ this.GetAccountType.forEach(x=>{
if(x.ID==i){ if(x.ID==i){
this.payMsg.Name = x.Name; this.payMsg.Name = x.Name;
} }
}) })
}
if(i==1){ if(i==1){
this.bankaccount_post_GetList() this.bankaccount_post_GetList()
} }
......
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