فهرست منبع

缺失功能:
私有协议应收-手续费应收-开票记录,开票记录里应该显示的是已开票的,该结算的。不是开票和结算一起的
增加回款差额和差额原因,将税点、虚增金额都改成不可选的

jiakai 4 ماه پیش
والد
کامیت
04faa283cd
1فایلهای تغییر یافته به همراه34 افزوده شده و 5 حذف شده
  1. 34 5
      src/views/receivable/handingFee/invoiceRecord.vue

+ 34 - 5
src/views/receivable/handingFee/invoiceRecord.vue

@@ -85,7 +85,7 @@
         layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
         @current-change="handleCurrentChange"></el-pagination>
     </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-item prop="invoiceParty" label="开票方">
           <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-form-item>
         <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 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 prop="receivableSupervisePremium" label="应收金额">
           <el-input v-model="countForm.receivableSupervisePremium" disabled placeholder="请输入"></el-input>
@@ -105,6 +105,12 @@
         <el-form-item prop="actualReceivedAmount" label="实收金额">
           <el-input v-model="countForm.actualReceivedAmount" placeholder="请输入"></el-input>
         </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-date-picker v-model="countForm.receivePaymentDate" type="datetime" value-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 invoicingId = ref('')
 const handleCount = (row) => {
+  if (row.settlementStatus === "已结算"){
+    ElMessage.warning('当前开票记录已结算完成,不能结算!')
+    return
+  }
+
   countShow.value = true
   invoicingId.value = row.id
   countForm.value = {
@@ -196,8 +207,22 @@ const handleCount = (row) => {
     overinflatedAmount: row.overinflatedAmount,
     actualReceivedAmount: row.remainSettlementAmount,
     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) => {
   let files = file.raw
   const params = new FormData(); // 声明formData数据类型
@@ -289,7 +314,9 @@ const handelComfirm = (CountForm) => {
         invoicingId: invoicingId.value,
         actualReceivedAmount: countForm.value.actualReceivedAmount,
         receivePaymentDate: countForm.value.receivePaymentDate,
-        attachmentIds: countForm.value.attachmentIds
+        attachmentIds: countForm.value.attachmentIds,
+        paymentDifference: countForm.value.paymentDifference,
+        paymentReason: countForm.value.paymentReason
       }).then((res: any) => {
         countShow.value = false
         if (res.code == 200) {
@@ -317,7 +344,9 @@ const handelCancel = () => {
     taxPoint: '',
     actualReceivedAmount: '',
     receivePaymentDate: [],
-    attachmentIds: []
+    attachmentIds: [],
+    paymentDifference: '', // 回款差额(自动计算)
+    paymentReason: '' // 回款原因
   }
   imageUrl.value = []
 }