From 663dbe4ddca1fa409e6acbc1f77d924c161b0c39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 09 六月 2025 17:04:50 +0800
Subject: [PATCH] 提交一把订单

---
 company/src/components/enterprise/additionSubtractionApplication.vue |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/company/src/components/enterprise/additionSubtractionApplication.vue b/company/src/components/enterprise/additionSubtractionApplication.vue
index 3a1659a..af434aa 100644
--- a/company/src/components/enterprise/additionSubtractionApplication.vue
+++ b/company/src/components/enterprise/additionSubtractionApplication.vue
@@ -125,6 +125,7 @@
             </div>
         </div>
         <el-table
+            v-if="item"
             :data="activeName === '0' ? form.addDetailList : form.delDetailList"
             border
             show-summary
@@ -373,7 +374,20 @@
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = '鎬讳环'
-        } else if (index === 7) {
+        } else if (this.item.hasDispatchUnit === 1 && index === 6) {
+          let total = 0
+          if (this.activeName === '0') {
+            this.form.addDetailList.forEach(item => {
+              total += item.fee || 0
+            })
+            sums[index] = (total || 0).toFixed(2)
+          } else {
+            this.form.delDetailList.forEach(item => {
+              total += item.reducePrice
+            })
+            sums[index] = (total || 0).toFixed(2)
+          }
+        } else if (this.item.hasDispatchUnit !== 1 && index === 7) {
           let total = 0
           if (this.activeName === '0') {
             this.form.addDetailList.forEach(item => {
@@ -440,7 +454,8 @@
         this.visible = false
         this.$tip.apiSuccess('鎿嶄綔鎴愬姛')
         // this.$refs.OperaApplyChangeDetailWindow.open('鍔犲噺淇濊鎯�', { applyId: this.form.id, id: res })
-        this.$emit('success', { applyId: this.form.id, id: res })
+        //   { applyId: this.form.id, id: res }
+        this.$emit('success')
       }).catch(e => {
         this.$tip.apiFailed(e)
       }).finally(() => {
@@ -567,9 +582,9 @@
       }
 
       if (this.activeName === '0') {
-        this.$refs.importEmployees.open('鍔犱繚鍛樺伐鍚嶅崟', { arr: this.form.addDetailList, type: 1, price: this.price, solutionId: this.item.newVersionSolutionId })
+        this.$refs.importEmployees.open('鍔犱繚鍛樺伐鍚嶅崟', { arr: this.form.addDetailList, type: 1, price: this.price, hasDispatchUnit: this.item.hasDispatchUnit, solutionId: this.item.newVersionSolutionId })
       } else {
-        this.$refs.importEmployees.open('鍑忎繚鍛樺伐鍚嶅崟', { arr: this.form.delDetailList, type: 0, price: this.reducePrice, solutionId: this.item.newVersionSolutionId, insuranceApplyId: this.form.id })
+        this.$refs.importEmployees.open('鍑忎繚鍛樺伐鍚嶅崟', { arr: this.form.delDetailList, type: 0, price: this.reducePrice, hasDispatchUnit: this.item.hasDispatchUnit, solutionId: this.item.newVersionSolutionId, insuranceApplyId: this.form.id })
       }
     },
     // 鍒囨崲鏂规
@@ -593,7 +608,6 @@
       }
     },
     getUser (obj) {
-      console.log(this.seleData)
       this.seleData.forEach(item => {
         if (this.activeName === '0') {
           this.form.addDetailList.forEach(row => {

--
Gitblit v1.9.3