From aadc91f6723a6eafac893bd5a2dd7d021a5e58d5 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期五, 09 五月 2025 14:44:32 +0800
Subject: [PATCH] zongjian

---
 src/views/system/comp/index.vue |  305 ++++++++++++++++++++++++++------------------------
 1 files changed, 156 insertions(+), 149 deletions(-)

diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue
index cf73da0..94197a1 100644
--- a/src/views/system/comp/index.vue
+++ b/src/views/system/comp/index.vue
@@ -1,45 +1,27 @@
 <template>
   <div class="app-container">
     <el-dialog title="閫夋嫨濂楅" :visible.sync="taocan" width="70%" height="700px" :close-on-click-modal="false">
-  <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto">
-    <el-form-item label="濂楅鍚嶇О" prop="pacName">
-      <el-input 
-        v-model="queryParam.pacName" 
-        placeholder="璇疯緭鍏ュ椁愬悕绉�" 
-        clearable 
-        @keyup.enter.native="handle" 
-        style="width: 200px"
-      />
-    </el-form-item>
-    <el-form-item>
-      <el-button 
-        type="primary" 
-        icon="el-icon-search" 
-        size="mini" 
-        @click="handle"
-      >鎼滅储</el-button>
-    </el-form-item>
-  </el-form>
-  <el-table 
-    v-loading="loading" 
-    element-loading-text="姝e湪鍔犺浇涓�..." 
-    element-loading-spinner="el-icon-loading" 
-    border
-    :data="newpacName1" 
-    @selection-change="handleSelectionChange1" 
-    height="450px" 
-    ref="tb"
-  >
-    <el-table-column type="selection" width="40px" align="center" label="閫夋嫨" />
-    <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" width="120px" />
-    <el-table-column label="濂楅浠锋牸" align="center" prop="price" width="120px" />
-    <el-table-column label="濂楅鏄庣粏" align="center" prop="allProName" :show-overflow-tooltip="true" />
-  </el-table>
-  <span slot="footer" class="dialog-footer">
-    <el-button @click="cancel1">鍙� 娑�</el-button>
-    <el-button type="primary" @click="submit">纭� 瀹�</el-button>
-  </span>
-</el-dialog>
+      <!-- <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto">
+        <el-form-item label="濂楅鍚嶇О" prop="pacName">
+          <el-input v-model="queryParam.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable @keyup.enter.native="handle"
+            style="width: 200px" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">鎼滅储</el-button>
+        </el-form-item>
+      </el-form> -->
+      <el-table v-loading="loading" element-loading-text="姝e湪鍔犺浇涓�..." element-loading-spinner="el-icon-loading" border
+        :data="newpacName1" @selection-change="handleSelectionChange1" height="450px" ref="tb">
+        <el-table-column type="selection" width="40px" align="center" label="閫夋嫨" />
+        <el-table-column label="濂楅鍚嶇О" align="center" prop="pacName" width="120px" />
+        <el-table-column label="濂楅浠锋牸" align="center" prop="price" width="120px" />
+        <el-table-column label="濂楅鏄庣粏" align="center" prop="allProName" :show-overflow-tooltip="true" />
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancel1">鍙� 娑�</el-button>
+        <el-button type="primary" @click="submit">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"
       @submit.native.prevent>
       <el-form-item label="鍗曚綅鍚嶇О" prop="cnName">
@@ -157,7 +139,7 @@
     </div>
 
     <div>
-      <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="false">
+      <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="true">
         <el-row :gutter="20">
           <el-col :span="7" :xs="24">
             <div style="padding: 0 20px">
@@ -228,10 +210,6 @@
                   <el-input v-model="forms.gtAge" style="width: 54px" />
                 </el-col>
               </el-form-item>
-
-
-
-
             </el-form>
 
             <el-row :gutter="10" class="mb8">
@@ -310,6 +288,9 @@
               <el-form-item>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button>
               </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
+              </el-form-item>
             </el-form>
             <!-- <div style="color: red; font-size: 8px">
               娉ㄩ噴锛氶紶鏍囧乏閿弻鍑婚�変腑琛屽彲鍒犻櫎
@@ -331,7 +312,7 @@
             </el-table>
             <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{
               OnenewpacName.length
-            }}</span>鏉�</div>
+                }}</span>鏉�</div>
 
           </el-col>
           <el-col :span="2" :xs="24">
@@ -340,13 +321,11 @@
             </div>
           </el-col>
           <el-col :span="8" :xs="24">
-            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+            <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch"
               label-width="68px" @submit.native.prevent>
-              <el-form-item>
-                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
-              </el-form-item>
+              
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
-                <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
+                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
                   @keyup.enter.native="handleSearchFor" style="width: 140px" />
               </el-form-item>
               <el-form-item>
@@ -356,8 +335,8 @@
             <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle"
               height="478">
               <el-table-column type="selection" width="40px" align="center" />
-              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" />
-              <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" />
+              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230px"/>
+              <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100px"/>
             </el-table>
           </el-col>
         </el-row>
@@ -389,6 +368,9 @@
               <el-form-item>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button>
               </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
+              </el-form-item>
             </el-form>
             <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" height="478">
               <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="410">
@@ -417,10 +399,10 @@
             </el-table>
             <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{
               OnenewpacName.length
-            }}</span>鏉�</div>
+                }}</span>鏉�</div>
 
           </el-col>
-          <el-col :span="2" :xs="24">
+          <!-- <el-col :span="2" :xs="24">
             <div style="margin: 240% 16%" class="btntoleft">
               <el-button type="primary" size="medium"
                 style="writing-mode: vertical-rl; text-align: center; letter-spacing: 5px;" @click="resetright">
@@ -429,16 +411,14 @@
                 <i class="el-icon-back"></i>
               </el-button>
             </div>
-          </el-col>
+          </el-col> -->
           <el-col :span="7" :xs="24">
-            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+            <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch"
               label-width="68px" @submit.native.prevent>
-              <el-form-item>
-                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
-              </el-form-item>
+              
 
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
-                <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
+                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
                   @keyup.enter.native="handleSearchFor" style="width: 140px" />
               </el-form-item>
               <el-form-item>
@@ -448,8 +428,8 @@
             <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle"
               height="478" style="width: 100%">
               <el-table-column type="selection" width="40px" align="center" />
-              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" />
-              <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" />
+              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230px"/>
+              <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100px"/>
             </el-table>
           </el-col>
         </el-row>
@@ -494,6 +474,9 @@
               <el-form-item>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">閲嶇疆</el-button>
               </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
+              </el-form-item>
             </el-form>
             <el-table border v-loading="loading" :data="OnenewpacName" :row-class-name="tableRowClassName" height="478">
               <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="170">
@@ -512,7 +495,7 @@
             </el-table>
             <div style="font-size: 16px;margin-top: 10px;">褰撳墠椤圭洰鏉℃暟锛�<span style="font-weight: 700;">{{
               OnenewpacName.length
-            }}</span>鏉�</div>
+                }}</span>鏉�</div>
 
           </el-col>
           <el-col :span="2" :xs="24">
@@ -523,13 +506,11 @@
             </div>
           </el-col>
           <el-col :span="8" :xs="24">
-            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+            <el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch"
               label-width="68px" @submit.native.prevent>
-              <el-form-item>
-                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
-              </el-form-item>
+             
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
-                <el-input ref="inputName" v-model="queryParams.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
+                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
                   @keyup.enter.native="handleSearchFor" style="width: 140px" />
               </el-form-item>
               <el-form-item>
@@ -539,7 +520,7 @@
             <el-table border v-loading="loading" ref="tre" :data="Treedata" @selection-change="handleChangesingle"
               height="478">
               <el-table-column type="selection" width="40px" align="center" />
-              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="288" />
+              <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" width="230" />
               <el-table-column label="椤圭洰浠锋牸/鍏�" align="center" prop="proPrice" width="100" />
             </el-table>
           </el-col>
@@ -640,7 +621,7 @@
   getDetails,
 
 } from "@/api/system/comp";
-import { deptTreeSelect, projectGetList, getconfigKey,} from "@/api/system/tijian";
+import { deptTreeSelect, projectGetList, getconfigKey, } from "@/api/system/tijian";
 import { getInfo } from "@/api/login";
 export default {
   name: "Comp",
@@ -662,7 +643,7 @@
       }
     };
     return {
-      
+
       newpacName1: [],
       taocan: false,
       queryParam: {
@@ -720,6 +701,10 @@
         price: null,
         xianprice: null,
         limits: null
+      },
+      queryParams1: {
+        proName: null,
+        pym: null,
       },
       id: "",
       // 琛ㄥ崟鍙傛暟
@@ -803,60 +788,76 @@
     this.getList();
   },
   methods: {
+    handle() {
+      this.loading = true;
+      deptTreeSelect(this.forms.sex, this.queryParam).then((res) => {
+        if (res.rows) {
+          this.newpacName1 = res.rows; // 鏇存柊濂楅鍒楄〃
+        } else {
+          this.newpacName1 = [];
+        }
+        this.loading = false;
+      }).catch(() => {
+        this.loading = false;
+        this.$modal.msgError("鎼滅储澶辫触锛岃绋嶅悗閲嶈瘯");
+      });
+    },
+
+
     handleSelectionChange1(selection) {
-  // 瀹炵幇鍗曢�夐�昏緫
-  if (selection.length > 1) {
-    const lastSelected = selection[selection.length - 1];
-    this.$refs.tb.clearSelection();
-    this.$refs.tb.toggleRowSelection(lastSelected, true);
-    this.selectedPackage = lastSelected;
-  } else if (selection.length === 1) {
-    this.selectedPackage = selection[0];
-  } else {
-    this.selectedPackage = null;
-  }
-},
+      // 瀹炵幇鍗曢�夐�昏緫
+      if (selection.length > 1) {
+        const lastSelected = selection[selection.length - 1];
+        this.$refs.tb.clearSelection();
+        this.$refs.tb.toggleRowSelection(lastSelected, true);
+        this.selectedPackage = lastSelected;
+      } else if (selection.length === 1) {
+        this.selectedPackage = selection[0];
+      } else {
+        this.selectedPackage = null;
+      }
+    },
 
-submit() {
-  if (!this.selectedPackage) {
-    this.$modal.msgError("璇峰厛閫夋嫨涓�涓椁�");
-    return;
-  }
+    submit() {
+      if (!this.selectedPackage) {
+        this.$modal.msgError("璇峰厛閫夋嫨涓�涓椁�");
+        return;
+      }
 
-  // 娓呯┖宸︿晶琛ㄦ牸
-  this.OnenewpacName = [];
+      // 娓呯┖宸︿晶琛ㄦ牸
+      this.OnenewpacName = [];
 
-  // 鑾峰彇閫変腑鐨勫椁愰」鐩垪琛�
-  const newProjects = this.selectedPackage.tjProjectList || [];
+      // 鑾峰彇閫変腑鐨勫椁愰」鐩垪琛�
+      const newProjects = this.selectedPackage.tjProjectList || [];
 
-  // 灏嗛�変腑鐨勫椁愰」鐩坊鍔犲埌宸︿晶琛ㄦ牸
-  this.loading = true;
-  newProjects.forEach(project => {
-    // 涓烘瘡涓」鐩缃粯璁ゆ姌鎵e拰鐜颁环
-    this.$set(project, 'limits', 10); // 榛樿鎶樻墸 10锛堝嵆鍘熶环锛�
-    this.$set(project, 'ysPrice', project.proPrice); // 鐜颁环鍒濆鍖栦负鍘熶环
-    this.OnenewpacName.push(project);
-  });
+      // 灏嗛�変腑鐨勫椁愰」鐩坊鍔犲埌宸︿晶琛ㄦ牸
+      this.loading = true;
+      newProjects.forEach(project => {
+        // 涓烘瘡涓」鐩缃粯璁ゆ姌鎵e拰鐜颁环
+        this.$set(project, 'limits', 10); // 榛樿鎶樻墸 10锛堝嵆鍘熶环锛�
+        this.$set(project, 'ysPrice', project.proPrice); // 鐜颁环鍒濆鍖栦负鍘熶环
+        this.OnenewpacName.push(project);
+      });
 
-  // 鏇存柊鎬讳环鍜岀幇浠�
-  this.queryParams.price = this.OnenewpacName.reduce((sum, item) => {
-    return sum + (item.proPrice || 0);
-  }, 0);
+      // 鏇存柊鎬讳环鍜岀幇浠�
+      this.queryParams.price = this.OnenewpacName.reduce((sum, item) => {
+        return sum + (item.proPrice || 0);
+      }, 0);
 
-  this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
-    return sum + (item.ysPrice || 0);
-  }, 0);
+      this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
+        return sum + (item.ysPrice || 0);
+      }, 0);
 
-  // 鏇存柊浼樻儬鍊�
-  this.youhui = this.queryParams.price > 0 
-    ? (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10 
-    : 0;
+      // 鏇存柊浼樻儬鍊�
+      this.youhui = this.queryParams.price > 0
+        ? (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
+        : 0;
 
-  // 鍏抽棴瀵硅瘽妗�
-  this.taocan = false;
-  this.loading = false;
-  this.$modal.msgSuccess("娣诲姞鎴愬姛");
-},
+      // 鍏抽棴瀵硅瘽妗�
+      this.taocan = false;
+      this.loading = false;
+      this.$modal.msgSuccess("娣诲姞鎴愬姛");
+    },
     cancel1() {
       this.taocan = false;
     },
@@ -884,8 +885,8 @@
     updateProPrice(row) {
       const proPrice = new Big(row.proPrice);
       const limits = new Big(row.limits);
-      const result = proPrice.times(limits.div(10));  // ordPrice * (discount / 10)
-      row.ysPrice = result.toNumber();
+      const result = proPrice.times(limits.div(10)).toNumber();  // ordPrice * (discount / 10)
+      row.ysPrice = result.toFixed(2);
       this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
         return sum.plus(new Big(item.ysPrice || '0'));
       }, new Big(0)).toNumber();
@@ -894,8 +895,8 @@
     updateProPrice1(row) {
       const proPrice = new Big(row.proPrice);
       const limits = new Big(row.limits);
-      const result = proPrice.times(limits.div(10));
-      row.ysPrice = result.toNumber();
+      const result = proPrice.times(limits.div(10)).toNumber();  // ordPrice * (discount / 10)
+      row.ysPrice = result.toFixed(2);
       const totalYsPrice = this.OnenewpacName.reduce((sum, item) => {
         return sum.plus(new Big(item.ysPrice || '0'));
       }, new Big(0));
@@ -925,12 +926,9 @@
     },
     changeXianjia() {
       // 鍘熷鎶樻墸鐜囪绠�
-
-
       if (this.queryParams.price !== 0) {
         this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10;
       }
-
     },
 
     getList() {
@@ -940,7 +938,6 @@
         (this.loading = true);
       listComp(this.queryParams).then((response) => {
         this.compList = response.rows;
-
         response.rows.forEach((item, index) => {
           item.newID =
             (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
@@ -1105,7 +1102,7 @@
             item.ysPrice = result.toNumber();
             this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
               return sum.plus(new Big(item.ysPrice || '0'));
-            }, new Big(0));
+            }, new Big(0)).toNumber();
           })
           // ----------------------------------------------------------
 
@@ -1189,7 +1186,7 @@
         });
       } else {
         deptTreeSelect().then((response) => {
-          console.log('222', response.rows);
+        
           this.newpacName = response.rows;
           this.loading = false;
           response.rows.forEach((item, index) => {
@@ -1243,21 +1240,27 @@
       }
     },
     handleSearchFor() {
-      getProjectList(this.queryParams.proName).then((response) => {
-
-        response.data.forEach((item, index) => {
-          item.newID =
-            (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
-            index +
-            1;
+      // 鍒ゆ柇鏄惁涓烘眽瀛�
+      const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
+      if (isChineseChar(this.queryParams1.proName)) {
+        this.queryParams1.pym = null
+        getProjectList(this.queryParams1).then((response) => {
+          this.Treedata = response.data;
         });
-        this.Treedata = response.data;
-      });
+      } else {
+        this.queryParams1.pym = this.queryParams1.proName
+        this.queryParams1.proName = null
+        getProjectList(this.queryParams1).then((response) => {
+          this.Treedata = response.data;
+        });
+      }
     },
     // 鍗曢」鏁版嵁鑾峰彇
     handleChangesingle(selection) {
+      console.log(selection,22222222)
       if (selection) {
         this.dataList = selection;
+        this.resetright()
       }
     },
     resetright() {
@@ -1271,7 +1274,7 @@
         const newItemsToAdd = []; // 鐢ㄤ簬瀛樺偍鏂伴渶瑕佹坊鍔犵殑椤圭洰
 
         this.dataList.forEach((item) => {
-          this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵��
+         
           // 浣跨敤 $set 纭繚鍝嶅簲鎬�
           this.$set(item, 'limits', 10); // 璁剧疆闄愬埗鏁伴噺
           this.$set(item, 'ysPrice', item.proPrice); // 璁剧疆鐜颁环涓哄師浠�
@@ -1282,11 +1285,12 @@
             newItemsToAdd.push(item); // 濡傛灉涓嶅瓨鍦ㄧ浉鍚岄」鐩紝鍒欐坊鍔犲埌鏂版暟缁�
             this.updateProPrice(item);
           }
+          this.$refs.tre.toggleRowSelection(item, false); // 鍙栨秷閫変腑鐘舵��
         });
 
         // 娣诲姞鏂伴」鐩埌 OnenewpacName
         this.OnenewpacName.push(...newItemsToAdd);
-
+        console.log(  this.OnenewpacName,2121)
         // 鍒犻櫎閲嶅椤圭洰锛岃繖閲屾垜浠彧闇�澶勭悊鏂版坊鍔犵殑椤圭洰鍜屽師鏈夐」鐩箣闂寸殑閲嶅
         for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) {
           for (let j = i + 1; j < this.OnenewpacName.length; j++) {
@@ -1301,11 +1305,12 @@
         // 閲嶆柊璁$畻鎬讳环鍜岀幇浠�
         this.OnenewpacName.forEach((item) => {
           this.queryParams.price += item.proPrice; // 绱姞鍘熶环
-          this.queryParams.xianprice += item.ysPrice || 0; // 绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0
+          //this.queryParams.xianprice += item.ysPrice || 0;  绱姞鐜颁环锛屽鏋測sPrice涓簎ndefined鍒欑疮鍔�0
         });
-
-        // 璁$畻浼樻儬锛岃繖閲屽亣璁句紭鎯犳槸鐜颁环涓庡師浠风殑宸鐧惧垎姣�
-        this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10;
+        this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
+        return sum.plus(new Big(item.ysPrice || '0'));
+      }, new Big(0)).toNumber();
+      this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
       }
     },
     handledbelete(row) {
@@ -1476,13 +1481,16 @@
         let id = this.groupList[0].id || '';
         getDetails(id).then((res) => {
           this.OnenewpacName = res.data.groupingProList;
-          this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
-            return sum.plus(new Big(item.ysPrice || '0'));
-          }, new Big(0));
-          this.OnenewpacName.forEach((item, index) => {
-            this.queryParams.price += item.proPrice;
-          });
-          this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
+          // this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
+          //   return sum.plus(new Big(item.ysPrice || '0'));
+          // }, new Big(0)).toNumber();
+          // this.OnenewpacName.forEach((item, index) => {
+          //   this.queryParams.price += item.proPrice;
+          // });
+          // this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10      
+          this.queryParams.xianprice = res.data.ysPrice
+          this.queryParams.price= res.data.price
+          this.youhui= res.data.limits
         });
       }
       // console.log(this.groupList[0].id, 9966);
@@ -1524,7 +1532,6 @@
       }
       getProjectList().then((response) => {
         this.Treedata = response.data;
-        // console.log(this.Treedata,999888);
       });
     },
 

--
Gitblit v1.8.0