浏览代码

fix: 客户权益bug修改

wuguojie 1 年之前
父节点
当前提交
b6dd9b4017

+ 15 - 1
src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue

@@ -453,12 +453,25 @@ export default {
     this.getDicType("energyType"); //能源种类
   },
   mounted() {
+    this.isEnabled()
     window.addEventListener('resize', this.getDimensions);
   },
   unmounted() {
     window.removeEventListener('resize', this.getDimensions);
   },
   methods: {
+    isEnabled() {
+      this.$api.task.isEnabled().then(res => {
+        if(res.code === 200) {
+          this.isEnabledShow = res.data
+        } else {
+          this.$message({
+            message: res.msg,
+            type: 'warning'
+          })
+        }
+      })
+    },
     //更新订单的签单和缴费时间
     updateDate(row) {
       this.$api.readPdf.updateOrderDate(row.orderno).then((res) => {
@@ -659,6 +672,7 @@ export default {
     },
     //审核通过
     adusitFUn() {
+      let that = this
       this.$confirm('是否确认审核?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -681,7 +695,7 @@ export default {
         }
         this.$api.task.auditFee(subParam).then((res) => {
           if (res.code == 200) {
-            if(this.isEnabledShow) {
+            if(that.isEnabledShow) {
               this.$api.task.confirmEquityOrder(this.orderInfo.id).then(res => {
                 if(res.code === 200) {
 

+ 20 - 4
src/views/Task/daikeComponents/KhgxKtLetter.vue

@@ -4216,8 +4216,13 @@
         <el-col :span="20">
           <el-table
             :data="interestTableData"
+            :span-method="arraySpanMethod"
           >
-            <el-table-column label="积分" prop="integral"></el-table-column>
+            <el-table-column label="积分" prop="integral">
+              <template slot-scope="scope">
+                {{ scope.row.integral?scope.row.integral.toFixed(2):0 }}
+              </template>
+            </el-table-column>
             <el-table-column label="权益名称" prop="rightsName"></el-table-column>
             <el-table-column label="数量" prop="number"></el-table-column>
             <el-table-column label="市场价" prop="marketPrice"></el-table-column>
@@ -6072,6 +6077,15 @@ export default {
     },
   },
   methods: {
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if(columnIndex === 0) {
+        if(rowIndex === 0){
+          return [this.interestTableData.length,1]
+        } else {
+          return [0,0]
+        }
+      }
+    },
     deleteJiaYi(reslistindex, drivingIndex) {
       this.totalCompanyList[reslistindex].programme.drivingList.splice(drivingIndex, 1)
       this.$forceUpdate()
@@ -6295,7 +6309,8 @@ export default {
       } else {
         this.interestIndex = index
         // this.interestData.pointProportion
-        let integral = (this.interestData.amount - this.interestData.pageResult.content[index].threeSettlementPrice)*this.interestData.pointProportion
+        let obj = this.interestData.feeOrderNewVo.exportFee.find(a => a.insuranceType === '合计')
+        let integral = (obj.totalAmount - this.interestData.pageResult.content[index].threeSettlementPrice)*this.interestData.pointProportion
         this.interestTableData = this.interestData.pageResult.content[index].localEquityPackageAssociationList.map(a => {
           return {
             ...a,
@@ -6348,7 +6363,8 @@ export default {
           this.interestData = res.data
           this.interestSelectData = item
           this.interestList = res.data.pageResult.content
-          let integral = (this.interestData.amount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
+          let obj = res.data.feeOrderNewVo.exportFee.find(a => a.insuranceType === '合计')
+          let integral = (obj.totalAmount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
           this.interestTableData = res.data.pageResult.content[this.interestIndex].localEquityPackageAssociationList.map(a => {
             return {
               ...a,
@@ -6384,7 +6400,7 @@ export default {
         receiveType: this.interestPeople,
         receiveName: info.name,
         receivePhone: info.mobile,
-        receiveIdentify: info.identifyNumber,
+        receiveIdentify: info.identifyNumber?info.identifyNumber:1,
         orderMoney: obj.totalAmount,
         point: integral.toFixed(2),
         equityInfo: this.interestList[this.interestIndex]

+ 40 - 2
src/views/Task/daikeComponents/KtLetter.vue

@@ -2354,8 +2354,13 @@
         <el-col :span="20">
           <el-table
             :data="interestTableData"
+            :span-method="arraySpanMethod"
           >
-            <el-table-column label="积分" prop="integral"></el-table-column>
+            <el-table-column label="积分" prop="integral">
+              <template slot-scope="scope">
+                {{ scope.row.integral?scope.row.integral.toFixed(2):0 }}
+              </template>
+            </el-table-column>
             <el-table-column label="权益名称" prop="rightsName"></el-table-column>
             <el-table-column label="数量" prop="number"></el-table-column>
             <el-table-column label="市场价" prop="marketPrice"></el-table-column>
@@ -4181,6 +4186,15 @@ export default {
     },
   },
   methods: {
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if(columnIndex === 0) {
+        if(rowIndex === 0){
+          return [this.interestTableData.length,1]
+        } else {
+          return [0,0]
+        }
+      }
+    },
     vehicleUseChange(value){
       if(value='05'){
         this.carInfo.property='1';
@@ -8749,7 +8763,31 @@ export default {
         })
         return;
       }
-      this.interestShow = false
+      let integral = (this.interestData.amount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
+      let info = this.interestPeople == 0?this.policyHolderInfo:this.interestPeople == 1?this.insuredPersonInfo:this.interestPeople == 2?this.ownerInfo:null
+      this.$api.task.saveEquity({
+        companyId: this.interestSelectData.result.companyId,
+        receiveType: this.interestPeople,
+        receiveName: info.name,
+        receivePhone: info.mobile,
+        receiveIdentify: info.identifyNumber?info.identifyNumber:1,
+        orderMoney: obj.totalAmount,
+        point: integral.toFixed(2),
+        equityInfo: this.interestList[this.interestIndex]
+      }).then(res => {
+        if(res.code === 200) {
+          localStorage.setItem('interestIndex', this.interestIndex)
+          this.$message({
+            message: '权益保存成功!',
+            type: 'success'
+          })
+        } else {
+          this.$message({
+            message: res.msg,
+            type: 'warning'
+          })
+        }
+      })
     },
     imageUpload() {
       this.imageUploaddialogVisible = true;

+ 20 - 4
src/views/Task/daikeComponents/KtLetter1.vue

@@ -4435,8 +4435,13 @@ agreementitem, agreementindex
         <el-col :span="20">
           <el-table
             :data="interestTableData"
+            :span-method="arraySpanMethod"
           >
-            <el-table-column label="积分" prop="integral"></el-table-column>
+            <el-table-column label="积分" prop="integral">
+              <template slot-scope="scope">
+                {{ scope.row.integral?scope.row.integral.toFixed(2):0 }}
+              </template>
+            </el-table-column>
             <el-table-column label="权益名称" prop="rightsName"></el-table-column>
             <el-table-column label="数量" prop="number"></el-table-column>
             <el-table-column label="市场价" prop="marketPrice"></el-table-column>
@@ -6308,6 +6313,15 @@ export default {
     }
   },
   methods: {
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if(columnIndex === 0) {
+        if(rowIndex === 0){
+          return [this.interestTableData.length,1]
+        } else {
+          return [0,0]
+        }
+      }
+    },
      //补录订单
     supplementOrder(id) {
       let params = {
@@ -6578,7 +6592,8 @@ export default {
       } else {
         this.interestIndex = index
         // this.interestData.pointProportion
-        let integral = (this.interestData.amount - this.interestData.pageResult.content[index].threeSettlementPrice)*this.interestData.pointProportion
+        let obj = this.interestData.feeOrderNewVo.exportFee.find(a => a.insuranceType === '合计')
+        let integral = (obj.totalAmount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
         this.interestTableData = this.interestData.pageResult.content[index].localEquityPackageAssociationList.map(a => {
           return {
             ...a,
@@ -6631,7 +6646,8 @@ export default {
           this.interestData = res.data
           this.interestSelectData = item
           this.interestList = res.data.pageResult.content
-          let integral = (this.interestData.amount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
+          let obj = res.data.feeOrderNewVo.exportFee.find(a => a.insuranceType === '合计')
+          let integral = (obj.totalAmount - this.interestData.pageResult.content[this.interestIndex].threeSettlementPrice)*this.interestData.pointProportion
           this.interestTableData = res.data.pageResult.content[this.interestIndex].localEquityPackageAssociationList.map(a => {
             return {
               ...a,
@@ -6667,7 +6683,7 @@ export default {
         receiveType: this.interestPeople,
         receiveName: info.name,
         receivePhone: info.mobile,
-        receiveIdentify: info.identifyNumber,
+        receiveIdentify: info.identifyNumber?info.identifyNumber:1,
         orderMoney: obj.totalAmount,
         point: integral.toFixed(2),
         equityInfo: this.interestList[this.interestIndex]