From c6b785037442a26b5b45e4bc9834e49c47e3fb09 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期五, 14 二月 2025 17:23:18 +0800
Subject: [PATCH] 取消自动关闭读卡器

---
 src/views/doctor/checkAll/index.vue |  934 ++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 613 insertions(+), 321 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index ef54aa3..f22e922 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -144,12 +144,19 @@
           width="130px"
         />
 
-        <el-table-column
+        <!-- <el-table-column
           label="浣撴鏃堕棿"
           align="center"
           prop="tjTime"
           :show-overflow-tooltip="true"
           width="110px"
+        /> -->
+        <el-table-column
+          label="瀹℃牳鏃堕棿"
+          align="center"
+          prop="shsj"
+          :show-overflow-tooltip="true"
+          width="180px"
         />
         <el-table-column
           label="瀹屾垚鏃堕棿"
@@ -163,10 +170,10 @@
           align="center"
           prop="tjStatus"
           :show-overflow-tooltip="true"
-          width="50px"
+          width="120px"
         >
           <template slot-scope="scope">
-            <span>{{ scope.row.tjStatus == "1" ? "宸叉" : "鏈" }}</span>
+            <span>{{ scope.row.tjStatus == "1" ? "宸插鏍�" : "鏈鏍�" }}</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -183,7 +190,12 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="鎿嶄綔" align="center" width="90px" fixed="right">
+        <el-table-column
+          label="鎿嶄綔"
+          align="center"
+          width="120px"
+          fixed="right"
+        >
           <template slot-scope="scope">
             <el-button
               fixed="right"
@@ -326,7 +338,9 @@
           >
         </div>
         <div class="btn1" v-if="msgjianqian == 'y' || msgjianqian == 'Y'">
-          <el-button @click="jianqian()" type="primary"><span class="vertical-text">妫�鍓嶉棶璇�</span></el-button>
+          <el-button @click="jianqian()" type="primary"
+            ><span class="vertical-text">妫�鍓嶉棶璇�</span></el-button
+          >
         </div>
 
         <div class="btn1">
@@ -345,9 +359,9 @@
           class="left"
           style="
             font-size: 14px;
-            height: calc(100% - 11%);
             width: 1100px;
             margin-left: 10px;
+            padding: 0 0 50px;
           "
         >
           <div v-for="(item, index) in changedate" :key="index">
@@ -388,6 +402,12 @@
                     <div v-else>{{ scope.row.proAdvice }}</div>
                   </template>
                 </el-table-column>
+                <el-table-column
+                  align="center"
+                  prop="conclusion"
+                  label="寮傚父"
+                  width="180"
+                ></el-table-column>
                 <el-table-column align="center" prop="" label=" 鍙傝�冭寖鍥�">
                   <template slot-scope="scope">
                     <div v-if="scope.row.project != null">
@@ -624,105 +644,206 @@
                 </div>
                 <template v-if="item.jyjc == '0'">
                   <el-table
-                  :stripe="true"
-                  :row-style="red"
-                  :data="item.sone"
-                  border
-                  style="width: 100%"
-                  :header-cell-style="{ background: '#67C23A' }"
-                  :expand-row-keys="expends"
-                  :row-key="getRowKeys"
-                >
-                  <el-table-column type="expand">
-                    <template slot-scope="props">
-                      <div
-                        v-if="props.row.advices && props.row.advices.length > 0"
-                      >
-                        <div
-                          v-for="(jianyi, index1) in props.row.advices"
-                          :key="index1"
-                          style="padding: 0 10px; margin-bottom: 10px"
-                        >
-                          <div>鏍囬锛歿{ jianyi.bt || "" }}</div>
-                          <div>鍐呭锛歿{ jianyi.nr || "" }}</div>
+                    :stripe="true"
+                    :row-style="red"
+                    :data="item.sone"
+                    border
+                    style="width: 100%"
+                    :header-cell-style="{ background: '#67C23A' }"
+                    :expand-row-keys="expends"
+                    :row-key="getRowKeys"
+                  >
+                    <el-table-column type="expand">
+                      <template slot-scope="props">
+                        <div>
+                          <div
+                            v-if="
+                              props.row.advices && props.row.advices.length > 0
+                            "
+                          >
+                            <div
+                              v-for="(jianyi, index1) in props.row.advices"
+                              :key="index1"
+                              style="padding: 0 10px; margin-bottom: 10px"
+                            >
+                              <div>
+                                鏍囬锛�
+                                <el-input
+                                  v-model="jianyi.bt"
+                                  size="small"
+                                  type="textarea"
+                                  autosize
+                                ></el-input>
+                              </div>
+                              <div>
+                                鍐呭锛�
+                                <el-input
+                                  v-model="jianyi.nr"
+                                  size="small"
+                                  type="textarea"
+                                  autosize
+                                ></el-input>
+                              </div>
+                            </div>
+                          </div>
+
+                          <!-- 濡傛灉 advices 涓虹┖鏃讹紝娓叉煋绌虹殑杈撳叆妗� -->
+                          <div v-else>
+                            <div>
+                              鏍囬锛�
+                              <el-input
+                                v-model="emptyAdvice.bt"
+                                size="small"
+                                type="textarea"
+                                autosize
+                              ></el-input>
+                            </div>
+                            <div>
+                              鍐呭锛�
+                              <el-input
+                                v-model="emptyAdvice.nr"
+                                size="small"
+                                type="textarea"
+                                autosize
+                              ></el-input>
+                            </div>
+                          </div>
                         </div>
-                      </div>
-                      <div v-else style="padding: 0 10px">鏆傛棤鍐呭</div>
-                    </template>
-                  </el-table-column>
+                      </template>
+                    </el-table-column>
 
-                  <el-table-column align="center" label="妫�娴嬮」鐩�" width="335">
-                    <template slot-scope="scope">
-                      <div>{{ scope.row.proName }}</div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    align="center"
-                    prop="proResult"
-                    label="妫�娴嬬粨鏋�"
-                    width="85"
-                  >
-                  </el-table-column>
+                    <el-table-column
+                      align="center"
+                      label="妫�娴嬮」鐩�"
+                      :show-overflow-tooltip="true"
+                      width="353"
+                    >
+                      <template slot-scope="scope">
+                        <div>{{ scope.row.proName }}</div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                      align="center"
+                      prop="proResult"
+                      label="妫�娴嬬粨鏋�"
+                      width="85"
+                    >
+                    </el-table-column>
 
-                  <el-table-column
-                    align="center"
-                    prop="stanId"
-                    label=" 鍙傝�冭寖鍥�"
-                    width="117"
-                  >
-                  </el-table-column>
+                    <el-table-column
+                      align="center"
+                      prop="stanId"
+                      label=" 鍙傝�冭寖鍥�"
+                      width="117"
+                    >
+                    </el-table-column>
 
-                  <el-table-column
-                    align="center"
-                    prop="proAdvice"
-                    label="鍗曚綅"
-                    width="78"
-                  >
-                  </el-table-column>
-                </el-table>
+                    <el-table-column
+                      align="center"
+                      prop="proAdvice"
+                      label="鍗曚綅"
+                      width="78"
+                    >
+                    </el-table-column>
+                    <el-table-column
+      fixed="right"
+      label="鎿嶄綔"
+      width="100">
+      <template slot-scope="scope">
+        <el-button @click="handleClick(scope.row)"  type="danger" size="small">鍒犻櫎</el-button>
+      </template>
+    </el-table-column>
+                  </el-table>
                 </template>
                 <template v-if="item.jyjc == '1'">
                   <el-table
-                  :stripe="true"
-                  :row-style="red"
-                  :data="item.sone"
-                  border
-                  style="width: 100%"
-                  :header-cell-style="{ background: '#67C23A' }"
-                  :expand-row-keys="expends"
-                  :row-key="getRowKeys"
-                >
-                  <el-table-column type="expand">
-                    <template slot-scope="props">
-                      <div
-                        v-if="props.row.advices && props.row.advices.length > 0"
-                      >
-                        <div
-                          v-for="(jianyi, index1) in props.row.advices"
-                          :key="index1"
-                          style="padding: 0 10px; margin-bottom: 10px"
-                        >
-                          <div>鏍囬锛歿{ jianyi.bt || "" }}</div>
-                          <div>鍐呭锛歿{ jianyi.nr || "" }}</div>
-                        </div>
-                      </div>
-                      <div v-else style="padding: 0 10px">鏆傛棤鍐呭</div>
-                    </template>
-                  </el-table-column>
-
-                  <el-table-column align="center" label="妫�娴嬮」鐩�" width="250">
-                    <template slot-scope="scope">
-                      <div>{{ scope.row.proName }}</div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    align="center"
-                    prop="proResult"
-                    label="妫�娴嬬粨鏋�"
-                    width="366"
+                    :stripe="true"
+                    :row-style="red"
+                    :data="item.sone"
+                    border
+                    style="width: 100%"
+                    :header-cell-style="{ background: '#67C23A' }"
+                    :expand-row-keys="expends"
+                    :row-key="getRowKeys"
                   >
-                  </el-table-column>
-                </el-table>
+                    <el-table-column type="expand">
+                      <template slot-scope="props">
+                        <div>
+                          <!-- 濡傛灉 advices 闈炵┖锛屾覆鏌撳叾鍐呭 -->
+                          <div
+                            v-if="
+                              props.row.advices && props.row.advices.length > 0
+                            "
+                          >
+                            <div
+                              v-for="(jianyi, index1) in props.row.advices"
+                              :key="index1"
+                              style="padding: 0 10px; margin-bottom: 10px"
+                            >
+                              <div>
+                                鏍囬锛�
+                                <el-input
+                                  v-model="jianyi.bt"
+                                  size="small"
+                                  type="textarea"
+                                  autosize
+                                ></el-input>
+                              </div>
+                              <div>
+                                鍐呭锛�
+                                <el-input
+                                  v-model="jianyi.nr"
+                                  size="small"
+                                  type="textarea"
+                                  autosize
+                                ></el-input>
+                              </div>
+                            </div>
+                          </div>
+
+                          <!-- 濡傛灉 advices 涓虹┖鏃讹紝娓叉煋绌虹殑杈撳叆妗� -->
+                          <div v-else>
+                            <div>
+                              鏍囬锛�
+                              <el-input
+                                v-model="emptyAdvice.bt"
+                                size="small"
+                                type="textarea"
+                                autosize
+                              ></el-input>
+                            </div>
+                            <div>
+                              鍐呭锛�
+                              <el-input
+                                v-model="emptyAdvice.nr"
+                                size="small"
+                                type="textarea"
+                                autosize
+                              ></el-input>
+                            </div>
+                          </div>
+                        </div>
+                      </template>
+                    </el-table-column>
+
+                    <el-table-column
+                      align="center"
+                      label="妫�娴嬮」鐩�"
+                      width="232"
+                      :show-overflow-tooltip="true"
+                    >
+                      <template slot-scope="scope">
+                        <div>{{ scope.row.proName }}</div>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                      align="center"
+                      prop="proResult"
+                      label="妫�娴嬬粨鏋�"
+                      width="403"
+                    >
+                    </el-table-column>
+                  </el-table>
                 </template>
               </div>
             </template>
@@ -742,12 +863,11 @@
                   :data="statusList"
                   style="width: 100%"
                   :header-cell-style="{ background: '#e6a23c' }"
-                  :stripe="true"
                 >
                   <el-table-column
                     align="center"
                     label="閮ㄩ棬"
-                    width="185"
+                    width="144"
                     prop="deptName"
                   >
                   </el-table-column>
@@ -764,11 +884,11 @@
                     align="center"
                     prop="type"
                     :show-overflow-tooltip="true"
-                    width="60"
+                    width="120"
                   >
                     <template slot-scope="scope">
-                      <span v-if="scope.row.type == '0'">鏈</span>
-                      <span v-if="scope.row.type == '1'">宸叉</span>
+                      <span v-if="scope.row.type == '0'">鏈鏍�</span>
+                      <span v-if="scope.row.type == '1'">宸插鏍�</span>
                       <span v-if="scope.row.type == '2'">寮冩</span>
                       <span v-if="scope.row.type == '3'">寤舵湡</span>
                     </template>
@@ -1260,6 +1380,7 @@
   gettoPdf,
   getModified,
   isPdfOrJimu,
+  addOrder,
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -1274,6 +1395,7 @@
 import { getNewDateList } from "@/api/hosp/order";
 import { getconfigKey } from "@/api/login";
 import moment from "moment";
+import { get } from "sortablejs";
 
 export default {
   components: {
@@ -1300,6 +1422,10 @@
   data() {
     return {
       // 鏇存柊鎬绘寤鸿
+      emptyAdvice: {
+        bt: "",
+        nr: "",
+      },
       initialTotalCheckAdvice: "",
       initialState: "",
       preObj: {},
@@ -1319,7 +1445,6 @@
       cusobj: {},
       xiaojie: "",
       isdisabled: false,
-      dialogVisible: false,
       src: "",
       url: "",
       userId: "",
@@ -1490,21 +1615,41 @@
         tjNum: this.tjNumber,
       }).then((res) => {
         this.yichangList = res.data;
+
+        console.log(this.yichangList, 3232);
         this.getExpends();
-        if(!this.yichangList){
-          this.$message({
-          type: "warning ",
-          message: "鏆傛棤寮傚父鎶ュ憡",
+
+        this.yichangList.forEach((item) => {
+          item.sone.forEach((soneItem) => {
+            if (
+              !Array.isArray(soneItem.advices) ||
+              soneItem.advices.length === 0
+            ) {
+              // 濡傛灉 advices 鏄┖锛岃缃粯璁ゅ��
+              soneItem.advices = [
+                {
+                  bt: "",
+                  nr: "",
+                },
+              ];
+            }
+          });
         });
+
+        if (!this.yichangList) {
+          _this.$message({
+            type: "warning ",
+            message: "鏆傛棤寮傚父鎶ュ憡",
+          });
         }
       });
     },
     getdate() {
       getNewDateList().then((res) => {
-        this.startTime = [
+        /* this.startTime = [
           moment(res.data).format("YYYY-MM-DD 00:00:00"),
           moment(res.data).format("YYYY-MM-DD 23:59:00"),
-        ];
+        ]; */
         this.getList();
       });
     },
@@ -1779,6 +1924,7 @@
       if (this.tjproject == "0") {
         getupdateCheckType(this.tjNumber).then((response) => {
           this.changedate = response.data;
+
           this.changedate.forEach((item) => {
             this.textarea1 = item.checkAdvice;
           });
@@ -1917,10 +2063,11 @@
       };
     },
     redxiangmu({ row }) {
-      if (row.type == 0) {
+      if (row.type != 1) {
         // 鍙橀鑹茬殑鏉′欢
         return {
-          color: "red", // 杩欎釜return鐨勫氨鏄牱寮� 鍙互鏄痗olor 涔熷彲浠ユ槸backgroundColor
+          backgroundColor: "#AAD8DF !important", // 杩欎釜return鐨勫氨鏄牱寮� 鍙互鏄痗olor 涔熷彲浠ユ槸backgroundColor
+          // color: "#AAD8DF ",
         };
       }
     },
@@ -1957,37 +2104,158 @@
         this.status = res.data;
         if (this.status) {
           if (this.status.status === "1") {
+            this.yichangjieguo();
+            getInfo().then((response) => {
+              this.userId = response.user.userId;
+              if (this.userId) {
+                let data = {
+                  userId: this.userId,
+                  tjNumber: this.tjNumber,
+                  state: 0,
+                };
+                getModifiedState(data).then((res) => {
+                  this.MsgId = res.msg;
+                  this.drawer = true;
+                  getupdateCheckType(this.tjNumber).then((response) => {
+                    this.changedate = response.data;
+                    if (this.changedate) {
+                      this.changedate.forEach((item) => {
+                        this.textarea1 = item.checkAdvice || "";
+                      });
+
+                      // 杩欓噷璁剧疆鍒濆鍊�
+                      this.initialTotalCheckAdvice = this.textarea1; // 淇濆瓨鎬绘寤鸿
+
+                      // 淇濆瓨鍒濆鐘舵��
+                      this.initialState = JSON.parse(
+                        JSON.stringify(this.changedate)
+                      );
+
+                      for (let i = 0; i < this.changedate.length; i++) {
+                        this.remark = this.changedate[i].remark;
+                      }
+                      this.changedate.forEach((item) => {
+                        // this.remark = item.remark;
+                        // item.sons.forEach((item3) => {
+                        //   if (item3.standard.tjStandardGtValue === null) {
+                        //     item3.standard.tjStandardGtValue = "";
+                        //   }
+                        //   if (item3.standard.tjStandardLtValue === null) {
+                        //     item3.standard.tjStandardLtValue = "";
+                        //   }
+                        // });
+                      });
+                    } else {
+                      this.$message({
+                        type: "warning ",
+                        message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                      });
+                    }
+                  });
+                });
+              }
+            });
+          } else {
+            this.$confirm(
+              "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?",
+              "鎻愮ず",
+              {
+                confirmButtonText: "鏄�",
+                cancelButtonText: "鍚�",
+                type: "warning",
+              }
+            )
+              .then(() => {
+                this.yichangjieguo();
+                getInfo().then((response) => {
+                  this.userId = response.user.userId;
+
+                  if (this.userId) {
+                    let data = {
+                      userId: this.userId,
+                      tjNumber: this.tjNumber,
+                      state: 0,
+                    };
+                    getforceIn(data).then((res) => {
+                      this.MsgId = res.msg;
+                      this.drawer = true;
+                      getupdateCheckType(this.tjNumber).then((response) => {
+                        this.changedate = response.data;
+                        if (this.changedate) {
+                          for (let i = 0; i < this.changedate.length; i++) {
+                            this.remark = this.changedate[i].remark;
+                          }
+                          this.initialState = JSON.parse(
+                            JSON.stringify(this.changedate)
+                          );
+
+                          this.changedate.forEach((item) => {
+                            this.textarea1 = item.checkAdvice || "";
+
+                            // this.remark = item.remark;
+                            // item.sons.forEach((item3) => {
+                            //   if (item3.standard.tjStandardGtValue === null) {
+                            //     item3.standard.tjStandardGtValue = "";
+                            //   }
+                            //   if (item3.standard.tjStandardLtValue === null) {
+                            //     item3.standard.tjStandardLtValue = "";
+                            //   }
+                            // });
+                            // item.remark = "";
+                          });
+
+                          // 淇濆瓨鎬绘寤鸿
+                          this.totalCheckAdvice = this.changedate.map(
+                            (item) => item.totalCheckAdvice
+                          );
+                        } else {
+                          this.$message({
+                            type: "warning ",
+                            message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
+                          });
+                        }
+                      });
+                    });
+                  }
+                });
+              })
+              .catch(() => {
+                this.$message({
+                  type: "info",
+                  message: "宸插彇娑堣繘鍏�",
+                });
+              });
+
+            this.drawer = false;
+          }
+        } else {
+          this.drawer = true;
           this.yichangjieguo();
           getInfo().then((response) => {
             this.userId = response.user.userId;
+
             if (this.userId) {
               let data = {
                 userId: this.userId,
                 tjNumber: this.tjNumber,
                 state: 0,
               };
-              getModifiedState(data).then((res) => {
+              getforceIn(data).then((res) => {
                 this.MsgId = res.msg;
                 this.drawer = true;
                 getupdateCheckType(this.tjNumber).then((response) => {
                   this.changedate = response.data;
                   if (this.changedate) {
-                    this.changedate.forEach((item) => {
-                      this.textarea1 = item.checkAdvice || "";
-                    });
-
-                    // 杩欓噷璁剧疆鍒濆鍊�
-                    this.initialTotalCheckAdvice = this.textarea1; // 淇濆瓨鎬绘寤鸿
-
-                    // 淇濆瓨鍒濆鐘舵��
+                    for (let i = 0; i < this.changedate.length; i++) {
+                      this.remark = this.changedate[i].remark;
+                    }
                     this.initialState = JSON.parse(
                       JSON.stringify(this.changedate)
                     );
 
-                    for (let i = 0; i < this.changedate.length; i++) {
-                      this.remark = this.changedate[i].remark;
-                    }
                     this.changedate.forEach((item) => {
+                      this.textarea1 = item.checkAdvice || "";
+
                       // this.remark = item.remark;
                       // item.sons.forEach((item3) => {
                       //   if (item3.standard.tjStandardGtValue === null) {
@@ -1997,7 +2265,13 @@
                       //     item3.standard.tjStandardLtValue = "";
                       //   }
                       // });
+                      // item.remark = "";
                     });
+
+                    // 淇濆瓨鎬绘寤鸿
+                    this.totalCheckAdvice = this.changedate.map(
+                      (item) => item.totalCheckAdvice
+                    );
                   } else {
                     this.$message({
                       type: "warning ",
@@ -2008,86 +2282,7 @@
               });
             }
           });
-        } else {
-          this.$confirm(
-            "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?",
-            "鎻愮ず",
-            {
-              confirmButtonText: "鏄�",
-              cancelButtonText: "鍚�",
-              type: "warning",
-            }
-          )
-            .then(() => {
-              this.yichangjieguo();
-              getInfo().then((response) => {
-                this.userId = response.user.userId;
-
-                if (this.userId) {
-                  let data = {
-                    userId: this.userId,
-                    tjNumber: this.tjNumber,
-                    state: 0,
-                  };
-                  getforceIn(data).then((res) => {
-                    this.MsgId = res.msg;
-                    this.drawer = true;
-                    getupdateCheckType(this.tjNumber).then((response) => {
-                      this.changedate = response.data;
-                      if (this.changedate) {
-                        for (let i = 0; i < this.changedate.length; i++) {
-                          this.remark = this.changedate[i].remark;
-                        }
-                        this.initialState = JSON.parse(
-                          JSON.stringify(this.changedate)
-                        );
-
-                        this.changedate.forEach((item) => {
-                          this.textarea1 = item.checkAdvice || "";
-
-                          // this.remark = item.remark;
-                          // item.sons.forEach((item3) => {
-                          //   if (item3.standard.tjStandardGtValue === null) {
-                          //     item3.standard.tjStandardGtValue = "";
-                          //   }
-                          //   if (item3.standard.tjStandardLtValue === null) {
-                          //     item3.standard.tjStandardLtValue = "";
-                          //   }
-                          // });
-                          // item.remark = "";
-                        });
-
-                        // 淇濆瓨鎬绘寤鸿
-                        this.totalCheckAdvice = this.changedate.map(
-                          (item) => item.totalCheckAdvice
-                        );
-                      } else {
-                        this.$message({
-                          type: "warning ",
-                          message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
-                        });
-                      }
-                    });
-                  });
-                }
-              });
-            })
-            .catch(() => {
-              this.$message({
-                type: "info",
-                message: "宸插彇娑堣繘鍏�",
-              });
-            });
-
-          this.drawer = false;
         }
-        } else {
-          this.$message({
-                type: "warning",
-                message: "璇风◢鍚庨噸璇�",
-              });
-        }
-       
       });
 
       // 鑾峰彇灏忕粨
@@ -2183,63 +2378,121 @@
     //   }
     // },
     change(vale) {},
-    /*  determine() {
-      let tjNumber = this.tableAll.tjNumber;
-      let advice = this.textarea1;
-      let data = {
-        tjNumber,
-        advice,
-        checkStatus: 1,
-      };
-      this.loading = true;
-      getTjdetailList(data).then((response) => {
-        if (response.code === 200) {
-          this.$modal.msgSuccess("鎻愪氦鎴愬姛");
-          let tjNumber = this.tjNumber;
-          let data = {
-            userId: this.userId,
-            tjNumber: tjNumber,
-            state: 1,
-            id: this.MsgId,
-          };
-          gettoPdf(tjNumber)
-            .then((res) => {
-              this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�");
-            })
-            .catch((error) => {
-              this.$modal.msgError(
-                "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�"
-              );
-            })
-          getfiedState(data).then((res) => {
-            this.drawer = false;
-          });
-          this.queryParams.page = 1;
-          this.queryParams.pageSize = 10;
-          this.submitForm();
-          this.$forceUpdate();
-      });
 
-      for (let i = 0; i < this.changedate.length; i++) {
-        this.proIds = this.changedate[i].parentId;
-        let remarks = this.changedate[i].remark;
-        let updateOrderRemarkVos = [
-          {
-            tjNumber,
-            proId: this.proIds.toString(),
-            remarks,
-          },
-        ];
-        getModified(updateOrderRemarkVos).then((response) => {});
-      }
+    // determine() {
+    //   let tjNumber = this.tableAll.tjNumber;
+    //   let tjh = this.tableAll.tjNumber;
+    //   // let jyjc = this.yichangList.map(item => item.jyjc || null);
+    //   let advice = this.textarea1;
+    //   let data = {
+    //     tjNumber,
+    //     advice,
+    //     checkStatus: 1,
+    //   };
 
-      // this.changedate.forEach((item) => {
-      //   this.proIds = item.parentId;
-      //   // this.remark = item.remark;
-      // });
-    }, */
+    //   console.log(this.yichangList, 66);
+
+    //   let dataList = this.yichangList
+    //     .map((item) => {
+    //       return item.sone.map((soneItem) => ({
+    //         tjh,
+    //         parentName: item.proName,
+    //         jcxm: soneItem.proName,
+    //         map: soneItem.advices,
+    //         jyjc: item.jyjc, // assuming jyjc belongs to the outer item, not soneItem
+    //         jcjg: soneItem.proResult,
+    //         ckfw: soneItem.stanId,
+    //         dw: soneItem.proAdvice,
+    //       }));
+    //     })
+    //     .flat(); // 浣跨敤 flat() 鏂规硶灏嗗祵濂楁暟缁勫睍骞�
+    //   console.log(dataList, 777);
+
+    //   /*  addOrder(dataList).then((res) => {
+    //     console.log(res, 999);
+    //   }); */
+    //   getTjdetailList(data)
+    //     .then((response) => {
+    //       if (response.code === 200) {
+    //         this.$modal.msgSuccess("鎻愪氦鎴愬姛");
+
+    //         // 鍑嗗鐢熸垚鎶ュ憡鐨勮姹傛暟鎹�
+    //         let reportData = {
+    //           userId: this.userId,
+    //           tjNumber: tjNumber,
+    //           state: 1,
+    //           id: this.MsgId,
+    //         };
+
+    //         // 鐢熸垚鎶ュ憡骞朵繚鎸� loading 鎵撳紑
+    //         const reportPromise = gettoPdf(tjNumber)
+    //           .then((res) => {
+    //             this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�");
+    //           })
+    //           .catch((error) => {
+    //             this.$modal.msgError(
+    //               "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�"
+    //             );
+    //           });
+
+    //         // 鏇存柊鐘舵�佸苟鎻愪氦淇敼璇锋眰
+    //         const statePromise = getfiedState(reportData).then((res) => {
+    //           this.drawer = false;
+    //         });
+
+    //         // const addOrderPromise = addOrder(dataList).then((res) => {
+    //         //   console.log(res, 999);
+    //         // });
+
+    //         // 澶勭悊鍏朵粬淇敼鎿嶄綔
+    //         const updatePromises = this.changedate.map((item) => {
+    //           this.proIds = item.parentId;
+    //           let remarks = item.remark;
+    //           let updateOrderRemarkVos = [
+    //             {
+    //               tjNumber,
+    //               proId: this.proIds.toString(),
+    //               remarks,
+    //             },
+    //           ];
+    //           return getModified(updateOrderRemarkVos); // 杩斿洖 Promise
+    //         });
+
+    //         // 绛夊緟鎵�鏈夎姹傚畬鎴�
+    //         Promise.all([
+    //           reportPromise,
+    //           statePromise,
+    //           // addOrderPromise,
+    //           ...updatePromises,
+    //         ])
+    //           .then(() => {
+    //             // 鎵�鏈夎姹傚畬鎴愶紝鍏抽棴 loading
+    //             this.loading = false;
+    //             // 鏇存柊鍒嗛〉淇℃伅
+    //             this.queryParams.page = 1;
+    //             this.queryParams.pageSize = 10;
+    //             this.submitForm();
+    //             this.$forceUpdate();
+    //           })
+    //           .catch((error) => {
+    //             // 澶勭悊閿欒鎯呭喌
+    //             this.loading = false;
+    //             console.error("鍙戠敓閿欒:", error);
+    //           });
+    //       } else {
+    //         // 鎻愪氦澶辫触锛屽叧闂� loading
+    //         this.loading = false;
+    //       }
+    //     })
+    //     .catch((error) => {
+    //       // 鎻愪氦璇锋眰澶辫触锛屽叧闂� loading
+    //       this.loading = false;
+    //       console.error("鎻愪氦璇锋眰澶辫触:", error);
+    //     });
+    // },
     determine() {
       let tjNumber = this.tableAll.tjNumber;
+      let tjh = this.tableAll.tjNumber;
       let advice = this.textarea1;
       let data = {
         tjNumber,
@@ -2247,10 +2500,23 @@
         checkStatus: 1,
       };
 
-      // 寮�濮嬪姞杞�
-      this.loading = true;
+      console.log(this.yichangList, 6644);
 
-      // 鎻愪氦鏁版嵁
+      let dataList = this.yichangList
+        .map((item) => {
+          return item.sone.map((soneItem) => ({
+            tjh,
+            parentName: item.proName,
+            jcxm: soneItem.proName,
+            map: soneItem.advices,
+            jyjc: item.jyjc,
+            jcjg: soneItem.proResult,
+            ckfw: soneItem.stanId,
+            dw: soneItem.proAdvice,
+          }));
+        })
+        .flat(); // 浣跨敤 flat() 鏂规硶灏嗗祵濂楁暟缁勫睍骞�
+
       getTjdetailList(data)
         .then((response) => {
           if (response.code === 200) {
@@ -2264,51 +2530,62 @@
               id: this.MsgId,
             };
 
-            // 鐢熸垚鎶ュ憡骞朵繚鎸� loading 鎵撳紑
-            const reportPromise = gettoPdf(tjNumber)
+            // 璋冪敤 addOrderPromise
+            console.log(dataList, 5555);
+
+            addOrder(dataList)
               .then((res) => {
-                this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�");
+                console.log(res, 999);
+                if (res.code == 200) {
+                  gettoPdf(tjNumber)
+                    .then((res) => {
+                      this.$modal.msgSuccess(
+                        "宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"
+                      );
+                    })
+                    .catch(() => {
+                      this.$modal.msgError(
+                        "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�"
+                      );
+                    });
+                  const statePromise = getfiedState(reportData).then(() => {
+                    this.drawer = false;
+                  });
+                  const updatePromises = this.changedate.map((item) => {
+                    this.proIds = item.parentId;
+                    let remarks = item.remark;
+                    let updateOrderRemarkVos = [
+                      {
+                        tjNumber,
+                        proId: this.proIds.toString(),
+                        remarks,
+                      },
+                    ];
+                    return getModified(updateOrderRemarkVos); // 杩斿洖 Promise
+                  });
+
+                  // 绛夊緟鎵�鏈夎姹傚畬鎴�
+                  Promise.all([statePromise, ...updatePromises])
+                    .then(() => {
+                      // 鎵�鏈夎姹傚畬鎴愶紝鍏抽棴 loading
+                      this.loading = false;
+                      // 鏇存柊鍒嗛〉淇℃伅
+                      this.queryParams.page = 1;
+                      this.queryParams.pageSize = 10;
+                      this.submitForm();
+                      this.$forceUpdate();
+                    })
+                    .catch((error) => {
+                      // 澶勭悊閿欒鎯呭喌
+                      this.loading = false;
+                      console.error("鍙戠敓閿欒:", error);
+                    });
+                }
               })
               .catch((error) => {
-                this.$modal.msgError(
-                  "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�"
-                );
-              });
-
-            // 鏇存柊鐘舵�佸苟鎻愪氦淇敼璇锋眰
-            const statePromise = getfiedState(reportData).then((res) => {
-              this.drawer = false;
-            });
-
-            // 澶勭悊鍏朵粬淇敼鎿嶄綔
-            const updatePromises = this.changedate.map((item) => {
-              this.proIds = item.parentId;
-              let remarks = item.remark;
-              let updateOrderRemarkVos = [
-                {
-                  tjNumber,
-                  proId: this.proIds.toString(),
-                  remarks,
-                },
-              ];
-              return getModified(updateOrderRemarkVos); // 杩斿洖 Promise
-            });
-
-            // 绛夊緟鎵�鏈夎姹傚畬鎴�
-            Promise.all([reportPromise, statePromise, ...updatePromises])
-              .then(() => {
-                // 鎵�鏈夎姹傚畬鎴愶紝鍏抽棴 loading
+                // 濡傛灉 addOrderPromise 澶辫触锛屽鐞嗛敊璇�
                 this.loading = false;
-                // 鏇存柊鍒嗛〉淇℃伅
-                this.queryParams.page = 1;
-                this.queryParams.pageSize = 10;
-                this.submitForm();
-                this.$forceUpdate();
-              })
-              .catch((error) => {
-                // 澶勭悊閿欒鎯呭喌
-                this.loading = false;
-                console.error("鍙戠敓閿欒:", error);
+                console.error("addOrderPromise 澶辫触:", error);
               });
           } else {
             // 鎻愪氦澶辫触锛屽叧闂� loading
@@ -2328,9 +2605,6 @@
 .mainbox {
   position: relative;
 }
-.tanchu {
-  background-color: red;
-}
 .btn {
   margin: 20px 0px;
 }
@@ -2348,12 +2622,11 @@
 .btn1 {
   animation: fadeInUp 0.5s ease-out forwards; /* 鎸夐挳鍔犺浇鏃剁殑娣″叆鍔ㄧ敾 */
   cursor: pointer;
-  text-align: center; 
+  text-align: center;
 }
 .vertical-text {
   writing-mode: vertical-rl;
   text-orientation: upright;
-
 }
 
 /* 璁剧疆鍔ㄧ敾鏁堟灉 */
@@ -2400,7 +2673,7 @@
 }
 
 .main {
-  height: 700px;
+  height: 800px;
   overflow: hidden;
 }
 
@@ -2424,11 +2697,21 @@
   border-radius: 2em;
 }
 ::v-deep .el-dialog {
-  width: 1200px;
-  height: 800px;
+  width: 1700px;
+  height: 900px;
 }
-::v-deep .el-button--medium  {
- padding: 10px;
+::v-deep .el-dialog__header {
+  padding: 8px;
+}
+::v-deep .el-dialog__body {
+  padding: 0;
+}
+::v-deep .el-button--medium {
+  padding: 10px;
+}
+::v-deep .el-dialog__headerbtn {
+  // position: relative;
+  top: 13px;
 }
 /* .el-dialog {
   width: 1264px;
@@ -2463,7 +2746,6 @@
   display: flex;
   justify-content: center;
   align-items: center;
-  padding: 0px 20px;
   z-index: 1000; /* 纭繚鎸夐挳灞傜骇鍦ㄥ叾浠栧唴瀹逛笂鏂� */
   width: 300px;
   background-color: white; /* 鍙牴鎹渶瑕佽皟鏁磋儗鏅鑹� */
@@ -2481,24 +2763,28 @@
 }
 .box {
   display: flex;
-  position: sticky;
-  top: 0px;
-  height: 85vh;
-  overflow: auto; // 纭繚鐖跺鍣ㄥ彲浠ユ粴鍔�
+
+  // height: 100vh;
 }
 
 .rightbox {
-  margin-left: 60px;
-  overflow-y: scroll;
-  position: sticky;
-  top: 0px;
+  // margin-left: 60px;
+  // position: fixed;
+  // top: 107px;
+  // right: 56px;
   width: 684px;
+  position: fixed; /* 鍥哄畾瀹氫綅 */
+  right: 60px;
   .right {
-    position: sticky;
-    top: 0px;
     background-color: #fff;
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    // box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     z-index: 10;
+    max-height: 900px;
+    height: calc(100vh - 100px);
+    /* 鍋囪浣犳兂涓洪《閮ㄥ拰搴曢儴鐣欏嚭涓�浜涚┖闂� */
+    overflow-y: auto !important; /* 鍏佽鍨傜洿婊氬姩 */
+    padding: 0 0 50px; /* 鍙�夛細娣诲姞涓�浜涘唴杈硅窛浠ラ伩鍏嶅唴瀹圭揣璐磋竟缂� */
+    padding-bottom: 200px;
   }
 }
 
@@ -2524,6 +2810,12 @@
 ::v-deep .el-table--medium .el-table__cell {
   padding: 5px 0;
 }
+::-webkit-scrollbar {
+  display: none;
+}
+::v-deep .el-drawer {
+  padding: 0 0 50px;
+}
 </style>
 
   

--
Gitblit v1.8.0