From 6b32ec29b1cd3ed12845d543e18da18f8456cdda Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 18 十月 2022 18:18:33 +0800
Subject: [PATCH] 1.安灯设置开发完成

---
 src/views/scgl/gd.vue |  490 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 368 insertions(+), 122 deletions(-)

diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index aabe2ac..66409b9 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -15,12 +15,12 @@
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
           style="display: flex;justify-content: space-between"
         >
           <div class="elForm">
-            <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
+            <el-form-item label-width="70px" label="璁㈠崟鐘舵��" style=" display: flex;">
               <el-select
                 v-model="form.mesorderstus"
                 :popper-append-to-body="false"
@@ -59,7 +59,7 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label-width="70px" label="浜у搧缂栫爜" style=" display: flex;">
               <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
             <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
@@ -71,7 +71,7 @@
             <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
               <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label-width="70px" label="鍒涘缓鏃堕棿" style=" display: flex;">
               <!--              <el-date-picker-->
               <!--                v-model="form.createdate"-->
               <!--                type="daterange"-->
@@ -92,44 +92,41 @@
               />
             </el-form-item>
           </div>
-          <div>
-            <div style="display: flex;align-items: start;justify-content:end;margin-top: 5px;z-index: 2">
-              <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
-              <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
-            </div>
-            <!--            <div v-if="!isIpad" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
-            <!--              <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
-            <!--              <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
-            <!--              <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
-            <!--            </div>-->
-            <!--            <div v-if="isIpad" style="display: flex;flex-direction: column;align-items: end">-->
-            <!--              <div style="display: flex;margin: 10px 0">-->
-            <!--                <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
-            <!--                <el-button type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>-->
-            <!--              </div>-->
-            <!--              <el-button type="primary" icon="el-icon-switch-button">璁㈠崟鍏抽棴</el-button>-->
-            <!--            </div>-->
 
+          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+            <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
+
         </el-form>
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
       </div>
 
-      <div
-        class="bodyTopFormExpand"
-        @click="isExpandForm=!isExpandForm"
-      >
-        <i
-          :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
-          :style="{color:'#42B983'}"
-        /></div>
-
-      <div class="elTableDiv" style="margin-top: 0">
+      <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
-          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
+          :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px'}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -208,6 +205,7 @@
             prop="partname"
             min-width="150"
             label="浜у搧鍚嶇О"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
@@ -215,6 +213,7 @@
             label="浜у搧瑙勬牸"
             sortable="custom"
             width="110"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.partspec">{{ row.partspec }}</div>
@@ -349,7 +348,7 @@
         <el-table
           :data="tableDataDetail"
           border
-          height="161px"
+          height="210px"
           :row-class-name="tableRowClassName"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
@@ -370,24 +369,29 @@
           <el-table-column
             prop="wo_code"
             label="宸ュ崟缂栧彿"
+            width="160"
           />
 
           <el-table-column
             prop="partcode"
             label="浜у搧缂栫爜"
+            width="150"
           />
           <el-table-column
             prop="partname"
             label="浜у搧鍚嶇О"
+            width="200"
           />
 
           <el-table-column
             label="宸ュ簭缂栫爜"
-            prop="partcode"
+            prop="stepcode"
+            width="150"
           />
           <el-table-column
             label="宸ュ簭鍚嶇О"
-            prop="partname"
+            prop="stepname"
+            width="150"
           />
           <el-table-column
             label="浠诲姟鏁伴噺"
@@ -404,6 +408,7 @@
           <el-table-column
             label="鎿嶄綔"
             width="120"
+            fixed="right"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -583,6 +588,22 @@
             </el-select>
           </el-form-item>
         </div>
+        <el-form-item label="鐗╂枡娓呭崟" prop="bomId">
+          <el-select
+            v-model="dialogForm.bomId"
+            filterable
+            :popper-append-to-body="false"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in bomIdArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="璁″垝寮�濮嬫椂闂�" prop="planstartdate">
           <el-date-picker
             v-model="dialogForm.planstartdate"
@@ -618,6 +639,12 @@
               :value="item.code"
             />
           </el-select>
+        </el-form-item>
+        <el-form-item label="鏄惁鎺掔▼" prop="isAps">
+          <el-radio-group v-model="dialogForm.isAps">
+            <el-radio key="Y" label="Y" value="Y">鏄�</el-radio>
+            <el-radio key="N" label="N" value="N">鍚�</el-radio>
+          </el-radio-group>
         </el-form-item>
       </el-form>
 
@@ -676,7 +703,12 @@
         <div class="footerButton">
           <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
           <!--          <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
-          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -774,12 +806,12 @@
       title="婧愬崟鍗曞彿"
       :visible.sync="dialogVisibleSource"
       width="1200px"
-      top="5vh"
+      top="10vh"
       class="dialogVisibleSearch"
       :close-on-click-modal="false"
       @close="dialogVisibleSourceClose"
     >
-      <div class="bodyTopFormGroup" style="animation: move 1s linear">
+      <div class="bodyTopFormGroup">
         <el-form
           ref="sourceForm"
           :model="sourceForm"
@@ -787,10 +819,8 @@
           inline
           style="display: flex;justify-content: space-between"
         >
-          <div class="elForm">
-
+          <div class="elForm" style="justify-content: flex-start">
             <el-form-item
-
               label="棰勮寮�宸ユ椂闂�"
               label-width="100px"
               style=" display: flex;font-size: 14px;margin-top: 3px"
@@ -860,32 +890,39 @@
             </el-form-item>
 
           </div>
-          <div>
-            <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2;justify-content: end">
-              <el-button type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
-              <el-button type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
-            </div>
+
+          <div style="display: flex;align-items: start;margin-top: 3px;z-index: 2;justify-content: end">
+            <el-button type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+            <el-button type="info" icon="el-icon-refresh" @click="sourceReset">閲嶇疆</el-button>
           </div>
+
         </el-form>
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverTypeDialog==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandDialog?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverTypeDialog=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverTypeDialog==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandDialog?'doubleDown':'doubleUp'"
+            @click="isExpandDialog=!isExpandDialog"
+            @mouseout="mouseHoverTypeDialog=$event.type"
+          />
+        </div>
       </div>
-      <!--      <el-tooltip  :content="!isExpandDialog?'鐐瑰嚮灞曠ず鏇村':'鏀惰捣'" placement="bottom">-->
-      <div
-        style="display:flex;justify-content: center;
-          align-items:center;background-color:#eee;cursor: pointer"
-        @click="isExpandDialog=!isExpandDialog"
-      >
-        <i
-          :class="!isExpandDialog?'el-icon-arrow-down':'el-icon-arrow-up'"
-          :style="{color:'#42B983'}"
-        /></div>
-      <!--      </el-tooltip>-->
+
       <div class="elTableDiv">
         <el-table
           :data="sourceTableData"
-          :height="(tableHeight-100)+'px'"
+          :height="isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:(tableHeight-100)+'px',}"
+          :style="{width: 100+'%',height:isExpandDialog?(tableHeight+60)+'px':(tableHeight+140)+'px',}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -1215,69 +1252,206 @@
       :close-on-click-modal="false"
       @close="dialogVisible2Close"
     >
-      <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
-      <div id="printMe2" style="padding: 30px;">
-        <div
-          style="display: flex;width: 280px;height: 150px;border: 1px solid #000;text-align: center;font-size: 10px;"
-        >
+      <div style="height: 300px">
+        <!--      涓嬫媺妗嗛�夋嫨鎵撳嵃灏哄-->
+        <div style="display: flex;align-items: center;margin: 0 0 20px 0">
+          <div>閫夋嫨鎵撳嵃灏哄锛�</div>
+          <el-select
+            v-model="printSize"
+            :popper-append-to-body="false"
+            style="width: 200px"
+            placeholder="璇烽�夋嫨"
+            @change="printSizeChange"
+          >
 
-          <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000">
-            <div
-              style="display: flex;height: 90px;border-bottom:1px solid #000;
+            <el-option
+              v-for="item in printSizeSelectArr"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
+            />
+          </el-select>
+        </div>
+        <!-- 瑕佹墦鍗扮殑鍖哄煙 -->
+        <!--      <div id="printMe2" :style="{paddingLeft:'10px',paddingTop: '5px'}">-->
+        <div id="printMe2" :style="printMe2StylePadding(printSize)">
+          <div
+            v-if="printSize===0"
+            style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;"
+          >
+
+            <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000">
+              <div
+                style="display: flex;height: 96px;border-bottom:1px solid #000;
               justify-content: center;align-items: center;position: relative"
-            >
-              <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
+              >
+                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
+              </div>
+              <div
+                style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+              >
+                <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+                {{ qrForm.startqty }}
+              </div>
+              <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+                <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+                {{ qrForm.operator }}
+              </div>
             </div>
-            <div
-              style="display: flex;height: 30px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
-            >
-              <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
-              {{ qrForm.startqty }}
-            </div>
-            <div style="display: flex;height: 30px;justify-content: flex-start;align-items: center">
-              <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
-              {{ qrForm.operator }}
-            </div>
-          </div>
 
-          <div style="width:190px;display: flex;flex-direction: column">
-            <div
-              style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
-            >
-              <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>
-              <div>{{ qrForm.wo_code }}</div>
-            </div>
-            <div
-              style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
-            >
-              <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>
-              <div>{{ qrForm.partcode }}</div>
-            </div>
-            <div
-              style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
-            >
-              <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>
-              <div>{{ qrForm.partname }}</div>
-            </div>
-            <div
-              style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
-            >
-              <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
-              <div>{{ qrForm.nextstepname }}</div>
-            </div>
-            <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
-              <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
-              <div>{{ qrForm.operatorTime }}</div>
+            <div style="width:190px;display: flex;flex-direction: column">
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>
+                <div>{{ qrForm.wo_code }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
+              >
+                <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>
+                <div>{{ qrForm.partcode }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>
+                <div>{{ qrForm.partname }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
+                <div>{{ qrForm.nextstepname }}</div>
+              </div>
+              <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+                <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
+                <div>{{ qrForm.operatorTime }}</div>
+              </div>
+
             </div>
 
           </div>
+          <div
+            v-if="printSize===1"
+            style="display: flex;width: 280px;height: 160px;border: 1px solid #000;text-align: center;font-size: 10px;"
+          >
 
+            <div style="width: 90px;display: flex;flex-direction: column;border-right: 1px solid #000">
+              <div
+                style="display: flex;height: 96px;border-bottom:1px solid #000;
+              justify-content: center;align-items: center;position: relative"
+              >
+                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
+              </div>
+              <div
+                style="display: flex;height: 32px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+              >
+                <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+                {{ qrForm.startqty }}
+              </div>
+              <div style="display: flex;height: 32px;justify-content: flex-start;align-items: center">
+                <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+                {{ qrForm.operator }}
+              </div>
+            </div>
+
+            <div style="width:190px;display: flex;flex-direction: column">
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>
+                <div>{{ qrForm.wo_code }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: flex-start;align-items: center ;text-align: left"
+              >
+                <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>
+                <div>{{ qrForm.partcode }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>
+                <div>{{ qrForm.partname }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: flex-start;align-items: center;text-align: left"
+              >
+                <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>
+                <div>{{ qrForm.nextstepname }}</div>
+              </div>
+              <div style="display: flex;height: 20%;justify-content: flex-start;align-items: center;text-align: left">
+                <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>
+                <div>{{ qrForm.operatorTime }}</div>
+              </div>
+
+            </div>
+
+          </div>
+          <div
+            v-if="printSize===5"
+            style="display: flex;width: 140px;height: 80px;border: 1px solid #000;text-align: center;font-size: 10px;"
+          >
+
+            <div v-if="false" style="width: 45px;display: flex;flex-direction: column;border-right: 1px solid #000">
+              <div
+                style="display: flex;height: 60px;border-bottom:1px solid #000;
+              justify-content: center;align-items: center;position: relative"
+              >
+                <div id="qrCode2" ref="qrCodeDiv2" style="overflow-y: hidden;height:60px;position: absolute;left: 14px;" />
+              </div>
+              <div
+                style="display: flex;height: 20px;justify-content: flex-start;border-bottom:1px solid #000;align-items: center"
+              >
+                <div style="margin-left: 5px;width: 28px">鏁伴噺:</div>
+                {{ qrForm.startqty }}
+              </div>
+              <div style="display: flex;height: 20px;justify-content: flex-start;align-items: center">
+                <div style="margin-left: 5px;width: 42px">澶勭悊浜�:</div>
+                {{ qrForm.operator }}
+              </div>
+            </div>
+
+            <div style="width:100%;display: flex;flex-direction: column;">
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;align-items: center;text-align: left"
+              >
+                <!--              <div style="width: 60px;margin-left: 5px;">宸ュ崟缂栧彿:</div>-->
+                <div>{{ qrForm.wo_code }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000;justify-content: center;align-items: center ;text-align: left"
+              >
+                <!--              <div style="width: 60px;margin-left: 5px;">浜у搧缂栫爜:</div>-->
+                <div>{{ qrForm.partcode }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: center;align-items: center;text-align: left"
+              >
+                <!--              <div style="width:60px;margin-left: 5px;">浜у搧鍚嶇О:</div>-->
+                <div>{{ qrForm.partname }}</div>
+              </div>
+              <div
+                style="display: flex;height: 20%;border-bottom:1px solid #000 ;justify-content: center;align-items: center;text-align: left"
+              >
+                <!--              <div style="width:60px;margin-left: 5px;">涓嬮亾宸ュ簭:</div>-->
+                <div>{{ qrForm.nextstepname }}</div>
+              </div>
+              <div style="display: flex;height: 20%;justify-content: center;align-items: center;text-align: left">
+                <!--              <div style="width: 60px;margin-left: 5px;">澶勭悊鏃堕棿:</div>-->
+                <div>{{ qrForm.operatorTime }}</div>
+              </div>
+
+            </div>
+
+          </div>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisible2 = false">鍙� 娑�</el-button>
-          <el-button v-print="printObj2" type="primary">纭� 瀹�</el-button>
+          <el-button v-print="printObj2" type="primary">鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -1425,6 +1599,9 @@
   },
   data() {
     return {
+      mouseHoverType: 'mouseout',
+      mouseHoverTypeDialog: 'mouseout',
+      isExpandForm: false,
       isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
@@ -1475,9 +1652,16 @@
         planstartdate: '', // 璁″垝寮�濮嬫椂闂�
         planenddate: '', // 璁″垝瀹屾垚鏃堕棿
         orderlev: '', // 宸ュ崟绛夌骇
-
+        isAps: 'N', // 鏄惁鎺掔▼
+        bomId: '', // 鐗╂枡娓呭崟id
         OperType: '' // 鎿嶄綔绫诲瀷
       },
+      bomIdArr: [// 鐗╂枡娓呭崟涓嬫媺  鍥犱负鎺ュ彛杩樻病鍐欙紝鏆傛椂鐢ㄥ啓姝荤殑鍊�
+        { code: 15, name: 'V5' },
+        { code: 14, name: 'V1' },
+        { code: 17, name: 'V7' },
+        { code: 16, name: 'V6' }
+      ],
       ordertypeArr: [// 宸ュ崟绫诲瀷
         { code: 'PO', name: '鏍囧噯宸ュ崟' },
         { code: 'FO', name: '鎶ュ簾琛ュ崟' }
@@ -1518,6 +1702,12 @@
         ],
         orderlev: [
           { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+        ],
+        isAps: [
+          { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+        ],
+        bomId: [
+          { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
         ]
 
       },
@@ -1569,7 +1759,7 @@
         closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
           console.log('11212', vue)
           // vue.dialogVisible = false
-          vue.dialogVisible2 = false
+          // vue.dialogVisible2 = false
           // vue.dialogVisible = false
         },
         beforeOpenCallback(vue) {
@@ -1622,8 +1812,16 @@
       defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
       defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
       projectTableData: [], // 璁惧鍒楄〃
-      isExpandForm: false, // 琛ㄥ崟鏄惁灞曞紑锛岄粯璁や笉灞曞紑
-      tableDataDetail: []// 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
+      tableDataDetail: [], // 鐐瑰嚮宸ュ崟琛ㄧ殑琛� 鏄剧ず璇︾粏淇℃伅
+      printSize: 1,
+      printSizeSelectArr: [// 瀹�*楂�
+        { code: 0, name: '80*50' },
+        { code: 1, name: '78*60' }
+        // { code: 2, name: '50*60' },
+        // { code: 3, name: '50*40' },
+        // { code: 4, name: '50*80' },
+        // { code: 5, name: '40*30' }
+      ]
     }
   },
   created() {
@@ -1739,8 +1937,21 @@
       this.dialogForm.planstartdate = handleDatetime(new Date())
       this.dialogForm.planenddate = handleDatetime(new Date())
       this.dialogForm.orderlev = 3
-    },
 
+      this.dialogForm.bomId = this.getMaxBomId()
+    },
+    // 鏌ユ壘鐗╂枡娓呭崟閲岄潰鐗堟湰鏈�澶х殑鍊�
+    getMaxBomId() {
+      let max = 0// 鏈�澶у��
+      let code = ''// 鏈�澶у�煎搴旂殑code
+      this.bomIdArr.forEach(item => {
+        if (parseFloat(item.name.substring(1)) > max) {
+          max = parseFloat(item.name.substring(1))
+          code = item.code
+        }
+      })
+      return code
+    },
     // 浜у搧淇℃伅鍊兼敼鍙�
     async partcodeChange(val) {
       console.log(val, 22)
@@ -1815,6 +2026,8 @@
         this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
         this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
         this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // 绛夌骇
+
+        this.dialogForm.bomId = this.getMaxBomId() // 鏆傛椂鍐欐
       })
     },
     // 鍒犻櫎鎸夐挳
@@ -1914,7 +2127,8 @@
       this.dialogForm.planstartdate = '' // 璁″垝寮�濮嬫椂闂�
       this.dialogForm.planenddate = '' // 璁″垝瀹屾垚鏃堕棿
       this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
-
+      this.dialogForm.isAps = 'N' // 鏄惁鎺掔▼
+      this.dialogForm.bomId = this.getMaxBomId()
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -1928,6 +2142,7 @@
           if (this.dialogForm.ordertype === 'FO' && this.dialogForm.sourceorder.toString().trim().length <= 0) {
             return this.$message.info('婧愬崟鍗曞彿涓嶈兘涓虹┖锛�')
           }
+
           const data = {
             // partname: this.dialogForm.partname, // 浜у搧鍚嶇О
             // partspec: this.dialogForm.partspec, // 浜у搧瑙勬牸
@@ -1945,9 +2160,11 @@
             planstartdate: this.dialogForm.planstartdate, // 璁″垝寮�濮嬫椂闂�
             planenddate: this.dialogForm.planenddate, // 璁″垝瀹屾垚鏃堕棿
             orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
+            is_aps: this.dialogForm.isAps, // 鏄惁鎺掔▼
+            bom_id: this.dialogForm.bomId, // 鏄惁鎺掔▼
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-
+          this.$store.state.app.buttonIsDisabled = true
           AddUpdateMesOrder(data).then(res => {
             if (res.code === '200') {
               this.dialogVisible = false
@@ -1957,6 +2174,7 @@
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '娲惧彂鎴愬姛锛�')
               // this.dialogVisible = false
               this.getMesOrderSearch()
+              this.$store.state.app.buttonIsDisabled = false
             } else {
               this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
             }
@@ -1990,11 +2208,12 @@
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
         // this.tableHeight = this.mainHeight - 250
-        this.tableHeight = this.mainHeight - 420
+        this.tableHeight = this.mainHeight - 515
         if (window.innerHeight < 769) {
           this.tableHeight = this.tableHeight - 20
         }
         this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+        this.$refs.tableDataRef.doLayout()
       })
     },
     // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
@@ -2074,7 +2293,7 @@
     //     }
     //   })
     // },
-    // 鐢熸垚浜岀淮鐮�
+    // 鐢熸垚浜岀淮鐮�    宸ュ崟鎶ヨ〃浜岀淮鐮�
     bindQRCode(seq, text, size) {
       if (size === 'big') {
         console.log(text, 1)
@@ -2163,7 +2382,7 @@
       this.qrForm.operatorTime = ''
       // this.$refs.qrCodeDiv2 = ''
     },
-    // 鐢熸垚浜岀淮鐮�
+    // 鐢熸垚浜岀淮鐮�    宸ュ簭鏍囩浜岀淮鐮�
     bindQRCode2(text) {
       new QRCode(this.$refs.qrCodeDiv2, {
         text: text,
@@ -2368,6 +2587,20 @@
     // 鎵撳嵃宸ュ崟
     printOrder() {
 
+    },
+    //  閫夋嫨鎵撳嵃灏哄鐨勫ぇ灏忓�兼敼鍙�
+    printSizeChange(val) {
+      this.$nextTick(() => {
+        this.bindQRCode2(this.qrForm.qrvalue)
+      })
+    },
+    printMe2StylePadding(val) {
+      if (val === 0) {
+        return { paddingLeft: '10px', paddingTop: '5px' }
+      }
+      if (val === 5) {
+        return { paddingLeft: '15px', paddingTop: '7px' }
+      }
     }
   }
 }
@@ -2493,12 +2726,12 @@
   margin-bottom: 0;
 }
 
-//.elTableDiv {
+.elTableDiv {
 ::v-deep .el-radio__label {
   display: none;
 }
 
-//}
+}
 
 .el-table::before {
   height: 0;
@@ -2667,6 +2900,19 @@
   //}
 }
 
+::v-deep .el-select__caret{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 

--
Gitblit v1.9.3