This commit is contained in:
linfso 2024-08-17 08:00:12 +08:00
parent 83cac4d757
commit 5f3d416529
4 changed files with 123 additions and 63 deletions

View File

@ -43,6 +43,24 @@ export function confirmNotOpenBillBySite(id) {
}
// 核销
export function chargeByCenter(id) {
return request({
url: '/emis/emisSettleBill/chargeByCenter/' + id,
method: 'post'
})
}
// 反核销
export function unChargeByCenter(id,note) {
return request({
url: '/emis/emisSettleBill/unChargeByCenter/' + id,
method: 'post',
data: {confirmCenterNote: note}
})
}
// 查询结算总账单详细
export function getInfoBySettleBillNo(settleBillNo) {
return request({

View File

@ -247,7 +247,7 @@
</template>
<script>
import { listEmisSettleBill, getEmisSettleBill, delEmisSettleBill, addEmisSettleBill, updateEmisSettleBill } from "@/api/emis/emisSettleBill";
import { listEmisSettleBill,chargeByCenter,unChargeByCenter } from "@/api/emis/emisSettleBill";
import PayRecordInput from '@/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue';
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
@ -544,7 +544,7 @@ export default {
handleCharge(row) {
const ids = row.id || this.ids;
this.$modal.confirm('确认是否核销').then(function() {
// return auditCenterPass(ids);
return chargeByCenter(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
@ -559,7 +559,7 @@ export default {
inputPattern: /^.{5,30}$/,
inputErrorMessage: "反核销原因长度必须介于 5 和 30 之间"
}).then(({ value }) => {
auditCenterNoPass(ids,value).then(response => {
unChargeByCenter(ids,value).then(response => {
this.$modal.msgSuccess("操作成功" );
this.getList();
});

View File

@ -103,17 +103,7 @@
v-hasPermi="['emis:emisSettleBill:edit']"
>收/退款</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-money"
size="mini"
:disabled="single"
@click="handlePayRecord"
v-hasPermi="['emis:emisSettleBill:edit']"
>批量导入收款</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="primary"
@ -136,39 +126,7 @@
v-hasPermi="['emis:emisSettleBill:edit']"
>反核销</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-caiwu"
size="mini"
:disabled="single"
@click="handleOpenBill"
v-hasPermi="['emis:emisSettleBill:edit']"
>开票</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-lianmeng"
size="mini"
:disabled="single"
@click="handleOpenBill"
v-hasPermi="['emis:emisSettleBill:edit']"
>发票作废</el-button>
</el-col>
-->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['emis:emisSettleBill:export']"
>导出</el-button>
</el-col> -->
</el-row>
</div>
@ -249,7 +207,7 @@
</template>
<script>
import { listEmisSettleBill, getEmisSettleBill, delEmisSettleBill, addEmisSettleBill, updateEmisSettleBill } from "@/api/emis/emisSettleBill";
import { listEmisSettleBill,chargeByCenter,unChargeByCenter } from "@/api/emis/emisSettleBill";
import PayRecordInput from '@/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue';
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
@ -547,7 +505,7 @@ export default {
handleCharge(row) {
const ids = row.id || this.ids;
this.$modal.confirm('确认是否核销').then(function() {
// return auditCenterPass(ids);
return chargeByCenter(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
@ -562,7 +520,7 @@ export default {
inputPattern: /^.{5,30}$/,
inputErrorMessage: "反核销原因长度必须介于 5 和 30 之间"
}).then(({ value }) => {
auditCenterNoPass(ids,value).then(response => {
unChargeByCenter(ids,value).then(response => {
this.$modal.msgSuccess("操作成功" );
this.getList();
});
@ -590,16 +548,7 @@ export default {
cancelForm(){
this.openForm = false;
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除').then(function() {
return delEmisSettleBill(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisSettleBill/export', {

View File

@ -38,6 +38,61 @@
<el-input v-model="form.settleBillName" rows="2" type="textarea" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="开票运单" prop="billCode" >
<span slot="label">
<!-- <el-tooltip content="如不填写则代表所有运单" placement="top">
<i class="el-icon-question"></i>
</el-tooltip> -->
开票运单
</span>
<el-table
class="cargoList"
:cell-style="{
'padding': '0px!important',
'padding-left': '0px!important',
'padding-right': '0px!important',
'font-size':'11px'
}"
:header-cell-style="{
'font-size':'11px'
}"
border
:data="form.invoiceRelList"
size="mini"
style="width: 100%"
max-height="300px"
>
<el-table-column :label="$t('序号')" align="center" width="60">
<template slot-scope="scope">
<span > {{scope.$index+1}}</span>
</template>
</el-table-column>
<el-table-column prop="billNo" :label="$t('运单号')" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.billNo }}</span>
</template>
</el-table-column>
<el-table-column prop="openBillMoney" :label="$t('开票金额')" align="center" width="80">
<template slot-scope="scope">
<el-input-number :min="0.00" v-model="scope.row.money" placeholder="" :controls="false" :precision="2">
<span slot="suffix">(CNY)</span>
</el-input-number>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<span class="icon iconfont"
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
@click="()=>deleteFeeItem(scope.row)">&#xe7ae;</span>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="运单号" prop="params.billCodeStr" >
@ -91,7 +146,8 @@
</template>
<script>
import { listEmisSettleInvoiceRecord, getEmisSettleInvoiceRecord, delEmisSettleInvoiceRecord, addEmisSettleInvoiceRecord, updateEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
import {listEmisSettleSubBill} from "@/api/emis/emisSettleSubBill";
import { addEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
import CustomerInvoiceInfoPicker from '@/views/emis/EmisBaseTools/CustomerInvoiceInfoPicker.vue';
import { parseTime,genJsSeqNo } from "@/utils/custom";
@ -169,12 +225,37 @@ export default {
if(this.billList){
this.form.settleBillNo="";
this.form.settleBillName="";
this.billList.forEach(item=>{
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) {
// this.loading = true;
@ -188,6 +269,17 @@ export default {
// this.form.applyDate = parseTime(new Date());
// }
},
deleteFeeItem(row){
this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let newList = this.form.invoiceRelList.filter(item => item.billNo !== row.billNo);
this.form.invoiceRelList=newList;
}).catch(() => {
})
},
onSelectBill(item){
this.form.settleBillName=item.settleBillName;
this.form.openMoneyMax=item.recMoney;
@ -264,7 +356,8 @@ export default {
updateSite: null,
params:{
billCodeStr:null,
}
},
invoiceRelList:[],
};
this.resetForm("form");
},