From 26e6be1dfd468b1cf74708bd2f8f6eba5e9ac050 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期二, 22 七月 2025 16:58:38 +0800
Subject: [PATCH] Qx

---
 src/views/hosp/order/index.vue |   72 ++++++++++++++++++++++++-----------
 1 files changed, 49 insertions(+), 23 deletions(-)

diff --git a/src/views/hosp/order/index.vue b/src/views/hosp/order/index.vue
index 1e200a9..add60fd 100644
--- a/src/views/hosp/order/index.vue
+++ b/src/views/hosp/order/index.vue
@@ -75,7 +75,7 @@
             v-hasPermi="['hosp:order:export']">瀵煎嚭</el-button>
         </el-col>
 
-       
+
         <el-col :span="1.5">
           <el-button type="primary" size="mini" @click="handleProject1" :disabled="single"
             v-hasPermi="['hosp:order:export']">琛ュ綍椤圭洰</el-button>
@@ -97,16 +97,17 @@
           <el-button type="primary" size="mini" @click="budadzd" :disabled="single"
             v-hasPermi="['hosp:order:export']">鎵撳嵃琛ュ綍鍗�</el-button>
         </el-col>
-         <el-col :span="1.5">
-          <el-button style="background-color:#E6A23C;color:#fff"
-           size="mini" @click="handleRevoke" :disabled="single">鎾ら攢绛惧埌</el-button>
+        <el-col :span="1.5">
+          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="handleRevoke"
+            :disabled="single">鎾ら攢绛惧埌</el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ForceChexiao" :disabled="single"
             v-hasPermi="['qzcx']">寮哄埗鎾ら攢</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ResumeAppointment" :disabled="multiple">鎭㈠棰勭害</el-button>
+          <el-button style="background-color:#E6A23C;color:#fff" size="mini" @click="ResumeAppointment"
+            :disabled="multiple">鎭㈠棰勭害</el-button>
         </el-col>
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
@@ -473,6 +474,7 @@
               </el-table-column>
               <el-table-column prop="proPrice" label="鍘熶环" width="56px">
               </el-table-column>
+              
 
               <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="50px">
                 <template slot-scope="scope">
@@ -534,7 +536,7 @@
       </el-dialog>
 
       <!-- 娣诲姞琛ュ綍椤圭洰 -->
-      <el-dialog :title="title" :visible.sync="Projectopen1" width="1100px" style="height: 860px" append-to-body
+      <el-dialog :title="title" :visible.sync="Projectopen1" width="1200px" style="height: 860px" append-to-body
         :close-on-click-modal="false">
         <div class="box">
           <div class="box1">
@@ -586,9 +588,9 @@
             </div>
             <el-table :data="DataList3" border style="width: 100%; table-layout: fixed" height="560"
               :span-method="objectspanmethod">
-              <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" width="200px" :show-overflow-tooltip="true">
+              <el-table-column prop="propinName" label="妫�鏌ラ」鐩�" width="160px" :show-overflow-tooltip="true">
               </el-table-column>
-              <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="200px" :show-overflow-tooltip="true">
+              <el-table-column prop="proName" label="鏄庣粏椤圭洰" width="160px" :show-overflow-tooltip="true">
               </el-table-column>
               <el-table-column prop="sl" label="鏁伴噺" width="56px">
               </el-table-column>
@@ -786,10 +788,10 @@
               <el-table-column align="center" prop="price" label="璐圭敤鍚堣">
               </el-table-column>
               <el-table-column align="center" prop="sfzt" label="璐圭敤鐘舵��">
-                 <template v-slot="scope">
-                    <span v-if="scope.row.sfzt">{{ '宸茬粨璐�' }}</span>
-                    <span v-else>{{ '鏈粨璐�' }}</span>
-                 </template>
+                <template v-slot="scope">
+                  <span v-if="scope.row.sfzt">{{ '宸茬粨璐�' }}</span>
+                  <span v-else>{{ '鏈粨璐�' }}</span>
+                </template>
               </el-table-column>
             </el-table>
             <h3>浠樻璇︽儏</h3>
@@ -1348,8 +1350,6 @@
       // 鍏堣皟鐢� getInfo 鑾峰彇 userId
       getInfo()
         .then((res) => {
-          console.log(res, 1111);
-
           const dqdlr = res.user.userId; // 鑾峰彇 userId
           console.log("User ID:", dqdlr);
           const params = { viewNum, tjNumber, dqdlr }; // 灏� userId 鍔犲叆 params
@@ -1370,7 +1370,6 @@
 
     // 寮哄埗鎾ら攢鎸夐挳
     ForceChexiao() {
-
       const tjNum = this.tjnumbers;
       this.isLoading = true
       this.$confirm(
@@ -1383,17 +1382,13 @@
           customClass: "custom-message-box",
         }
       )
-
         .then(() => {
-
           getForceChexiao(tjNum).then((res) => {
-
             if (res.code == 200) {
               this.$modal.msgSuccess("鎾ら攢鎴愬姛");
               this.isLoading = false
               this.getList();
             }
-
           }).catch(() => {
             console.log("鍔犺浇澶辫触")
             this.isLoading = false;
@@ -1459,6 +1454,37 @@
           // 涓嶈鎿嶄綔鎴愬姛杩樻槸澶辫触锛岄兘浼氭墽琛�
 
         });
+    },
+
+
+     updateProPrice(row) {
+      const ordPrice = new Big(row.ordPrice);
+      const discount = new Big(row.discount);
+      const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10)
+      row.nowPrice = result.toNumber();
+      this.TotalPrice = this.tableData1.reduce((sum, item) => {
+        return sum.plus(new Big(item.nowPrice || "0"));
+      }, new Big(0));
+
+      this.discount =
+        (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
+    },
+
+
+     handleManualChange(row) {
+      this.updateProPrice(row);
+    },
+
+     updateProPrice(row) {
+      const ordPrice = new Big(row.ordPrice);
+      const discount = new Big(row.discount);
+      const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10)
+      row.nowPrice = result.toNumber();
+      this.TotalPrice = this.DataList3.reduce((sum, item) => {
+        return sum.plus(new Big(item.nowPrice || "0"));
+      }, new Big(0));
+      this.discount =
+        (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
     },
 
     handleRevoke() {
@@ -2021,8 +2047,8 @@
       this.Datalists = [];
       this.TotalPrice1 = 0;
       this.filterText = "",
-      this.filterage = "",
-      this.orderId = row.orderId;
+        this.filterage = "",
+        this.orderId = row.orderId;
       this.cusId = row.tjCusIdCard;
       this.userId = row.userId;
       this.customer = {
@@ -2103,8 +2129,8 @@
       this.DataList3 = [];
       this.Datalists = [];
       this.filterText = "",
-      this.filterage = "",
-      this.TotalPrice1 = 0;
+        this.filterage = "",
+        this.TotalPrice1 = 0;
       this.orderId = this.ids;
       this.cusId = this.cusIds;
       this.userId = this.userIds;

--
Gitblit v1.8.0