md
This commit is contained in:
parent
6f73054981
commit
e637af0ea6
@ -39,15 +39,23 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="开票运单" prop="billCode" >
|
<el-form-item label="开票范围" prop="openBillScope" >
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<!-- <el-tooltip content="如不填写则代表所有运单" placement="top">
|
<span style="color: red">开票范围</span>
|
||||||
<i class="el-icon-question"></i>
|
|
||||||
</el-tooltip> -->
|
|
||||||
开票运单
|
|
||||||
</span>
|
</span>
|
||||||
|
<el-radio-group v-model="form.openBillScope" @change="calcOpenMaxLimit">
|
||||||
<el-table
|
<el-radio :key="'1'" label="1">全部运单开票</el-radio>
|
||||||
|
<el-radio :key="'0'" label="0">部分运单开票</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="运单列表" prop="billCode" >
|
||||||
|
<div style="display:inline-flex; width: 50%;" v-if="form.openBillScope==0">
|
||||||
|
<el-input v-model="form.params.billCodeStr" rows="2" type="textarea" placeholder="部分开票请填写单号,多单请使用逗号隔开" />
|
||||||
|
<el-button type="primary" @click="addBillToApply">加入单号</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
class="cargoList"
|
class="cargoList"
|
||||||
:cell-style="{
|
:cell-style="{
|
||||||
'padding': '0px!important',
|
'padding': '0px!important',
|
||||||
@ -75,16 +83,23 @@
|
|||||||
<span>{{ scope.row.billNo }}</span>
|
<span>{{ scope.row.billNo }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="openBillMoney" :label="$t('开票金额')" align="center" width="80">
|
<el-table-column prop="billFee" :label="$t('可开票金额')" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number :min="0.00" v-model="scope.row.money" placeholder="" :controls="false" :precision="2">
|
{{scope.row.billFee}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="openBillMoney" :label="$t('申请开票金额')" align="center" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number v-if="form.openBillScope==0" :min="0.00" v-model="scope.row.money" placeholder="" :controls="false" :precision="2" >
|
||||||
<span slot="suffix">(CNY)</span>
|
<span slot="suffix">(CNY)</span>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
|
<span v-else> {{scope.row.billFee}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('操作')" align="center">
|
<el-table-column :label="$t('操作')" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="icon iconfont"
|
<span class="icon iconfont"
|
||||||
|
v-if="form.openBillScope==0"
|
||||||
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
||||||
@click="()=>deleteFeeItem(scope.row)"></span>
|
@click="()=>deleteFeeItem(scope.row)"></span>
|
||||||
</template>
|
</template>
|
||||||
@ -220,43 +235,10 @@ export default {
|
|||||||
initData() {
|
initData() {
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.form.openBillScope='1';
|
||||||
|
|
||||||
let maxFee=0;
|
this.calcOpenMaxLimit();
|
||||||
if(this.billList){
|
|
||||||
this.form.settleBillNo="";
|
|
||||||
this.form.settleBillName="";
|
|
||||||
this.form.invoiceRelList=[];
|
|
||||||
// this.form.billList=[...this.billList];
|
|
||||||
this.billList.forEach(async item=>{
|
|
||||||
this.form.settleBillNo=this.form.settleBillNo+item.settleBillNo+",";
|
|
||||||
this.form.settleBillName= this.form.settleBillName+item.settleBillName+",";
|
|
||||||
this.form.openMoneyMax=this.form.openMoneyMax+item.recMoney;
|
|
||||||
this.form.applyMoney=this.form.applyMoney+item.recMoney;
|
|
||||||
|
|
||||||
// 查询子账单
|
|
||||||
let qParam={
|
|
||||||
settleBillNo:item.settleBillNo,
|
|
||||||
pageNum:1,
|
|
||||||
pageSize:2000
|
|
||||||
}
|
|
||||||
let res=await listEmisSettleSubBill(qParam);
|
|
||||||
console.log("===>=res==>",res)
|
|
||||||
if(res.code==200){
|
|
||||||
res.rows.forEach(itemSubBill=>{
|
|
||||||
let relItem={
|
|
||||||
billNo:itemSubBill.billNo,
|
|
||||||
money:itemSubBill.billFee
|
|
||||||
}
|
|
||||||
this.form.invoiceRelList.push(relItem);
|
|
||||||
|
|
||||||
console.log("===>===>",this.form.invoiceRelList)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
// if(this.id !=null) {
|
// if(this.id !=null) {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
// getEmisSettleInvoiceRecord(this.id).then(response => {
|
// getEmisSettleInvoiceRecord(this.id).then(response => {
|
||||||
@ -269,6 +251,86 @@ export default {
|
|||||||
// this.form.applyDate = parseTime(new Date());
|
// this.form.applyDate = parseTime(new Date());
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
calcOpenMaxLimit(){
|
||||||
|
let maxFee=0;
|
||||||
|
// 总可开金额
|
||||||
|
let totalBillFee=0.0;
|
||||||
|
if(this.form.openBillScope==1){
|
||||||
|
if(this.billList){
|
||||||
|
this.form.settleBillNo="";
|
||||||
|
this.form.settleBillName="";
|
||||||
|
this.form.invoiceRelList=[];
|
||||||
|
|
||||||
|
this.billList.forEach(async item=>{
|
||||||
|
this.form.settleBillNo=this.form.settleBillNo+item.settleBillNo+",";
|
||||||
|
this.form.settleBillName= this.form.settleBillName+item.settleBillName+",";
|
||||||
|
totalBillFee=totalBillFee+this.form.openMoneyMax+item.recMoney;
|
||||||
|
|
||||||
|
let qParam={
|
||||||
|
settleBillNo:item.settleBillNo,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:2000
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询子账单
|
||||||
|
let res=await listEmisSettleSubBill(qParam);
|
||||||
|
console.log("===>=res==>",res)
|
||||||
|
if(res.code==200){
|
||||||
|
res.rows.forEach(itemSubBill=>{
|
||||||
|
let relItem={
|
||||||
|
billNo:itemSubBill.billNo,
|
||||||
|
billFee:itemSubBill.billFee,
|
||||||
|
money:itemSubBill.billFee
|
||||||
|
}
|
||||||
|
this.form.invoiceRelList.push(relItem);
|
||||||
|
|
||||||
|
console.log("===>===>",this.form.invoiceRelList)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
this.form.openMoneyMax=totalBillFee;
|
||||||
|
this.form.applyMoney=totalBillFee;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.form.invoiceRelList=[];
|
||||||
|
this.form.openMoneyMax=totalBillFee;
|
||||||
|
this.form.applyMoney=totalBillFee;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async addBillToApply(){
|
||||||
|
this.form.invoiceRelList=[];
|
||||||
|
|
||||||
|
// 总可开金额
|
||||||
|
let totalBillFee=0.0;
|
||||||
|
let qParam={
|
||||||
|
settleBillNo:this.form.settleBillNo,
|
||||||
|
billCode:this.form.params.billCodeStr,
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:2000
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询子账单
|
||||||
|
let res=await listEmisSettleSubBill(qParam);
|
||||||
|
console.log("===>=res==>",res)
|
||||||
|
if(res.code==200){
|
||||||
|
res.rows.forEach(itemSubBill=>{
|
||||||
|
let relItem={
|
||||||
|
billNo:itemSubBill.billNo,
|
||||||
|
billFee:itemSubBill.billFee,
|
||||||
|
money:itemSubBill.billFee
|
||||||
|
}
|
||||||
|
this.form.invoiceRelList.push(relItem);
|
||||||
|
totalBillFee=totalBillFee+itemSubBill.billFee;
|
||||||
|
|
||||||
|
console.log("===>===>",this.form.invoiceRelList)
|
||||||
|
});
|
||||||
|
this.form.openMoneyMax=totalBillFee;
|
||||||
|
this.form.applyMoney=totalBillFee;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
deleteFeeItem(row){
|
deleteFeeItem(row){
|
||||||
this.$confirm('确定删除?', '提示', {
|
this.$confirm('确定删除?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@ -354,6 +416,8 @@ export default {
|
|||||||
updateTime: null,
|
updateTime: null,
|
||||||
createSite: null,
|
createSite: null,
|
||||||
updateSite: null,
|
updateSite: null,
|
||||||
|
|
||||||
|
openBillScope:null,
|
||||||
params:{
|
params:{
|
||||||
billCodeStr:null,
|
billCodeStr:null,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user