From 0b2c49a83c2901e651af92f3a971cd61b05d518a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 06 三月 2025 14:43:00 +0800
Subject: [PATCH] 优化页面

---
 src/views/business/productOrder/components/add.vue |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue
index ccd6a25..7abed7e 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/add.vue
@@ -28,9 +28,9 @@
           <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1" size="small" type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
           <el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
           <!-- 瀹℃牳 -->
-          <el-button v-show="active==3&&addObj.companyId" :disabled="saveLoad" :loading="saveLoad" size="small"
+          <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small"
                      @click="upInsOrderOfState(2)">涓嶉�氳繃</el-button>
-          <el-button v-show="active==3&&addObj.companyId" :loading="saveLoad" size="small" type="primary"
+          <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary"
                      @click="upInsOrderOfState(1)">閫氳繃</el-button>
           <el-button size="small" @click="goBack">
             <span style="color: #3A7BFA;">杩斿洖</span>
@@ -154,10 +154,10 @@
         </el-form>
       </div>
       <div>
-        <div style="display: flex;justify-content: space-between;">
+        <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
           <div v-if="active==1">
             <el-form :inline="true" :model="addObj1" label-width="90px">
-              <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px">
+              <el-form-item label="鏍峰搧鍨嬪彿:" style="margin-bottom: 6px;margin-top: 6px">
                 <el-select v-model="model" :placeholder="active>1 ? '' : '璇疯緭鍏�'"
                            allow-create clearable default-first-option filterable
                            size="small"
@@ -166,7 +166,7 @@
                   </el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="妫�楠屾爣鍑�:">
+              <el-form-item label="妫�楠屾爣鍑�:" style="margin-bottom: 6px;margin-top: 6px">
                 <el-select v-model="standardMethodListId" :loading="methodLoad"
                            :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"
                            @change="changeStandardMethodListId" @focus="methodFocus">
@@ -176,7 +176,7 @@
               </el-form-item>
             </el-form>
           </div>
-          <div style="display: flex;align-items: center;margin-bottom: 10px">
+          <div style="display: flex;align-items: center;margin-bottom: 6px;margin-top: 6px">
             <span style="width: 150px;font-size: 14px;text-align: right;">鐗规畩鏍囧噯锛�</span>
             <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input>
             <el-button v-show="active==1" size="small" style="margin-left: 10px"
@@ -248,6 +248,7 @@
           </el-table-column>
         </el-table>
         <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName" border class="el-table"
+                  :key="upIndex"
           max-height="400px" style="margin-bottom: 10px;" tooltip-effect="dark"
           @select="selectOne" @selection-change="selectProduct" @select-all="handleAll">
           <el-table-column v-if="active==1" :selectable="selectable0" type="selection" width="65"></el-table-column>
@@ -686,6 +687,7 @@
       sampleViewEn: null,
       expandedKeys: [],
       sampleList: [],
+      upIndex: 0,
       sampleIds: [],
       methodList: [],
       addSampleDia: false,
@@ -798,9 +800,10 @@
     this.getInfo()
   },
   activated() {
-    if (this.active==1) {
-      this.getInfo();
-    }
+    this.active = this.$route.query.active
+    this.tabIndex = this.$route.query.tabIndex
+    this.currentId = this.$route.query.currentId
+    this.getInfo();
   },
   methods: {
     getInfo() {
@@ -846,6 +849,10 @@
       // 缂栬緫瑕佹眰鍊艰〃鏍�
       editSpecial () {
         this.isSpecial = true
+        this.$nextTick(() => {
+          this.$refs.productTable.doLayout();
+          this.upIndex++
+        });
       },
       getQuarterOnOrderList () {
         getQuarterOnOrder().then(res => {
@@ -1708,6 +1715,7 @@
           this.$refs.sampleTable.setCurrentRow(row)
           this.$nextTick(() => {
             this.$refs.productTable.doLayout();
+            this.upIndex++
           });
           setTimeout(() => {
             this.productList.forEach(a => {

--
Gitblit v1.9.3