|
@@ -85,7 +85,7 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"></el-pagination>
|
|
@current-change="handleCurrentChange"></el-pagination>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-dialog v-model="countShow" width="600" title="开票并结算">
|
|
|
|
|
|
|
+ <el-dialog v-model="countShow" width="600" title="结算">
|
|
|
<el-form ref="CountForm" :model="countForm" :rules="countRules" label-width="120">
|
|
<el-form ref="CountForm" :model="countForm" :rules="countRules" label-width="120">
|
|
|
<el-form-item prop="invoiceParty" label="开票方">
|
|
<el-form-item prop="invoiceParty" label="开票方">
|
|
|
<el-input v-model="countForm.invoiceParty" disabled placeholder="请输入"></el-input>
|
|
<el-input v-model="countForm.invoiceParty" disabled placeholder="请输入"></el-input>
|
|
@@ -94,10 +94,10 @@
|
|
|
<el-input v-model="countForm.receivableSupervisePremium" disabled placeholder="请输入"></el-input>
|
|
<el-input v-model="countForm.receivableSupervisePremium" disabled placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="overinflatedAmount" label="虚增金额">
|
|
<el-form-item prop="overinflatedAmount" label="虚增金额">
|
|
|
- <el-input v-model="countForm.overinflatedAmount" placeholder="请输入"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="countForm.overinflatedAmount" disabled placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="taxPoint" label="税点">
|
|
<el-form-item prop="taxPoint" label="税点">
|
|
|
- <el-input v-model="countForm.taxPoint" placeholder="请输入"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="countForm.taxPoint" disabled placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item prop="receivableSupervisePremium" label="应收金额">
|
|
<el-form-item prop="receivableSupervisePremium" label="应收金额">
|
|
|
<el-input v-model="countForm.receivableSupervisePremium" disabled placeholder="请输入"></el-input>
|
|
<el-input v-model="countForm.receivableSupervisePremium" disabled placeholder="请输入"></el-input>
|
|
@@ -105,6 +105,12 @@
|
|
|
<el-form-item prop="actualReceivedAmount" label="实收金额">
|
|
<el-form-item prop="actualReceivedAmount" label="实收金额">
|
|
|
<el-input v-model="countForm.actualReceivedAmount" placeholder="请输入"></el-input>
|
|
<el-input v-model="countForm.actualReceivedAmount" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="回款差额">
|
|
|
|
|
+ <el-input v-model="countForm.paymentDifference" disabled placeholder="自动计算" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="actualReceivedAmount" label="回款原因">
|
|
|
|
|
+ <el-input v-model="countForm.paymentReason" placeholder="请输入"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="receivePaymentDate" label="收款日期">
|
|
<el-form-item prop="receivePaymentDate" label="收款日期">
|
|
|
<el-date-picker v-model="countForm.receivePaymentDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
|
<el-date-picker v-model="countForm.receivePaymentDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
format="YYYY-MM-DD HH:mm:ss" />
|
|
format="YYYY-MM-DD HH:mm:ss" />
|
|
@@ -188,6 +194,11 @@ let imageUrl = ref([])
|
|
|
let attachmentIds = ref([])
|
|
let attachmentIds = ref([])
|
|
|
let invoicingId = ref('')
|
|
let invoicingId = ref('')
|
|
|
const handleCount = (row) => {
|
|
const handleCount = (row) => {
|
|
|
|
|
+ if (row.settlementStatus === "已结算"){
|
|
|
|
|
+ ElMessage.warning('当前开票记录已结算完成,不能结算!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
countShow.value = true
|
|
countShow.value = true
|
|
|
invoicingId.value = row.id
|
|
invoicingId.value = row.id
|
|
|
countForm.value = {
|
|
countForm.value = {
|
|
@@ -196,8 +207,22 @@ const handleCount = (row) => {
|
|
|
overinflatedAmount: row.overinflatedAmount,
|
|
overinflatedAmount: row.overinflatedAmount,
|
|
|
actualReceivedAmount: row.remainSettlementAmount,
|
|
actualReceivedAmount: row.remainSettlementAmount,
|
|
|
taxPoint: row.taxPoint,
|
|
taxPoint: row.taxPoint,
|
|
|
|
|
+ paymentDifference: row.paymentDifference, // 回款差额(自动计算)
|
|
|
|
|
+ paymentReason: row.paymentReason, // 回款原因
|
|
|
|
|
+ receivePaymentDate: row.receivePaymentDate, // 收款日期
|
|
|
|
|
+ attachmentIds: row.attachmentIds // 凭证
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+// 监听实收金额变化 → 自动计算回款差额
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => countForm.value.actualReceivedAmount,
|
|
|
|
|
+ (newVal) => {
|
|
|
|
|
+ const receivable = Number(countForm.value.receivableSupervisePremium) || 0
|
|
|
|
|
+ const actual = Number(newVal) || 0
|
|
|
|
|
+ // 回款差额 = 实收 - 应收
|
|
|
|
|
+ countForm.value.paymentDifference = (actual - receivable).toFixed(5)
|
|
|
|
|
+ }
|
|
|
|
|
+)
|
|
|
const uploadImage = async (file, fileList) => {
|
|
const uploadImage = async (file, fileList) => {
|
|
|
let files = file.raw
|
|
let files = file.raw
|
|
|
const params = new FormData(); // 声明formData数据类型
|
|
const params = new FormData(); // 声明formData数据类型
|
|
@@ -289,7 +314,9 @@ const handelComfirm = (CountForm) => {
|
|
|
invoicingId: invoicingId.value,
|
|
invoicingId: invoicingId.value,
|
|
|
actualReceivedAmount: countForm.value.actualReceivedAmount,
|
|
actualReceivedAmount: countForm.value.actualReceivedAmount,
|
|
|
receivePaymentDate: countForm.value.receivePaymentDate,
|
|
receivePaymentDate: countForm.value.receivePaymentDate,
|
|
|
- attachmentIds: countForm.value.attachmentIds
|
|
|
|
|
|
|
+ attachmentIds: countForm.value.attachmentIds,
|
|
|
|
|
+ paymentDifference: countForm.value.paymentDifference,
|
|
|
|
|
+ paymentReason: countForm.value.paymentReason
|
|
|
}).then((res: any) => {
|
|
}).then((res: any) => {
|
|
|
countShow.value = false
|
|
countShow.value = false
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -317,7 +344,9 @@ const handelCancel = () => {
|
|
|
taxPoint: '',
|
|
taxPoint: '',
|
|
|
actualReceivedAmount: '',
|
|
actualReceivedAmount: '',
|
|
|
receivePaymentDate: [],
|
|
receivePaymentDate: [],
|
|
|
- attachmentIds: []
|
|
|
|
|
|
|
+ attachmentIds: [],
|
|
|
|
|
+ paymentDifference: '', // 回款差额(自动计算)
|
|
|
|
|
+ paymentReason: '' // 回款原因
|
|
|
}
|
|
}
|
|
|
imageUrl.value = []
|
|
imageUrl.value = []
|
|
|
}
|
|
}
|