From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改

---
 src/views/scgl/gd.vue |  914 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 676 insertions(+), 238 deletions(-)

diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 3e80c78..5fb73da 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -4,20 +4,20 @@
 
       <div class="bodyTopButtonGroup" style="justify-content: space-between">
         <div style="display: flex">
-          <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 v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+          <el-button v-waves type="primary" icon="el-icon-connection" @click="send('send')">娲惧彂</el-button>
         </div>
 
-        <el-button icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</el-button>
+        <el-button v-waves icon="el-icon-switch-button" @click="orderClose">鍏抽棴宸ュ崟</el-button>
       </div>
 
       <div class="bodyTopFormGroup">
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
-          style="display: flex;justify-content: space-between"
+          style="display: flex;"
         >
           <div class="elForm">
             <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
@@ -57,28 +57,21 @@
                   :label="item.name"
                   :value="item.code"
                 />
-              </el-select>            </el-form-item>
-            <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
-              <!--              <el-select v-model="form.partcode" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">-->
-              <!--                <el-option-->
-              <!--                  v-for="item in OrgTypeArr"-->
-              <!--                  :key="item.code"-->
-              <!--                  :label="item.name"-->
-              <!--                  :value="item.code"-->
-              <!--                />-->
-              <!--              </el-select>-->
+              </el-select>
+            </el-form-item>
+            <el-form-item v-show="isExpandForm" label="浜у搧缂栫爜" style=" display: flex;">
               <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
               <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
               <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+            <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 label="鍒涘缓鏃堕棿" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
               <!--              <el-date-picker-->
               <!--                v-model="form.createdate"-->
               <!--                type="daterange"-->
@@ -99,39 +92,46 @@
               />
             </el-form-item>
           </div>
-          <div style="min-height: 100px">
-            <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? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
+            <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button v-waves 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="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
-          :height="tableHeight+'px'"
+          :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:tableHeight+'px',}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
           @sort-change="sortChange"
+          @row-click="rowClick"
         >
           <!--          <el-table-column-->
           <!--            type="selection"-->
@@ -146,8 +146,8 @@
                 v-model="radioSelected"
                 :label="row.wo_code"
                 style="color: transparent;padding-left: 10px;"
-                @change.native="getCurrentRow(row.wo_code)"
               />
+              <!--              @change.native="getCurrentRow(row.wo_code)"-->
             </template>
           </el-table-column>
           <el-table-column
@@ -161,6 +161,7 @@
             label="璁㈠崟鐘舵��"
             sortable="custom"
             width="110"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.status==='NEW'">鏂板伐鍗�</div>
@@ -169,11 +170,14 @@
               <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
               <div v-if="row.status==='START'">寮�宸�</div>
               <div v-if="row.status==='CLOSED'">瀹屽伐</div>
+              <div v-if="row.status==='NOSCHED'">寰呮帓绋�</div>
+              <div v-if="row.status==='SCHED'">宸叉帓绋�</div>
             </template>
           </el-table-column>
           <el-table-column
             prop="wo_code"
             label="宸ュ崟缂栧彿"
+            show-tooltip-when-overflow
             sortable="custom"
             min-width="160"
           />
@@ -181,12 +185,19 @@
             prop="m_po"
             label="婧愬崟鍗曞彿"
             sortable="custom"
+            show-tooltip-when-overflow
             min-width="160"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.m_po">{{ row.m_po }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="wotype"
             label="鍗曟嵁绫诲瀷"
             sortable="custom"
+            show-tooltip-when-overflow
             min-width="120"
           >
             <template slot-scope="{row}">
@@ -198,6 +209,7 @@
           <el-table-column
             prop="partcode"
             label="浜у搧缂栫爜"
+            show-tooltip-when-overflow
             sortable="custom"
             min-width="120"
           />
@@ -205,6 +217,7 @@
             prop="partname"
             min-width="150"
             label="浜у搧鍚嶇О"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
@@ -212,6 +225,7 @@
             label="浜у搧瑙勬牸"
             sortable="custom"
             width="110"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.partspec">{{ row.partspec }}</div>
@@ -222,11 +236,13 @@
             prop="plan_qty"
             label="宸ュ崟鏁�"
             sortable="custom"
+            show-tooltip-when-overflow
             width="100"
           />
           <el-table-column
             prop="wkshp_name"
             label="鐢熶骇杞﹂棿"
+            show-tooltip-when-overflow
             sortable="custom"
             width="120"
           >
@@ -240,7 +256,7 @@
             label="宸ヨ壓璺嚎"
             show-tooltip-when-overflow
             sortable="custom"
-            min-width="140"
+            width="180"
           >
             <template slot-scope="{row}">
               <div v-if="row.route_name">{{ row.route_name }}</div>
@@ -260,6 +276,7 @@
           <el-table-column
             prop="plan_startdate"
             label="璁″垝寮�濮嬫椂闂�"
+            show-tooltip-when-overflow
             sortable="custom"
             width="160"
           >
@@ -273,6 +290,7 @@
             label="璁″垝缁撴潫鏃堕棿"
             sortable="custom"
             width="160"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.plan_enddate">{{ row.plan_enddate }}</div>
@@ -282,6 +300,7 @@
           <el-table-column
             prop="piroque"
             label="宸ュ崟绛夌骇"
+            show-tooltip-when-overflow
             sortable="custom"
             width="120"
           >
@@ -294,6 +313,7 @@
           </el-table-column>
           <el-table-column
             prop="lm_user"
+            show-tooltip-when-overflow
             label="鍒涘缓浜哄憳"
             sortable="custom"
             width="120"
@@ -301,6 +321,7 @@
           <el-table-column
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
+            show-tooltip-when-overflow
             width="160"
             sortable="custom"
           />
@@ -311,15 +332,21 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-tooltip class="item" effect="dark" content="宸ュ簭浠诲姟" placement="top">
+                <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ崟" placement="top">
+                  <!--                  <i-->
+                  <!--                    class="el-icon-tickets"-->
+                  <!--                    style="cursor: pointer;color: #42b983;margin-right: 15px"-->
+                  <!--                    @click="check(row)"-->
+                  <!--                  />-->
                   <i
-                    class="el-icon-tickets"
-                    style="cursor: pointer;color: #42b983;margin-right: 15px"
-                    @click="check(row)"
+                    :style="{color:$store.state.settings.theme}"
+                    class="el-icon-printer"
+                    style="cursor: pointer;margin-right: 15px"
+                    @click="handlePrint(row.wo_code)"
                   />
                 </el-tooltip>
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
-                  <i class="el-icon-delete" @click="del(row)" />
+                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
                 </el-tooltip>
               </div>
             </template>
@@ -336,9 +363,100 @@
         popper-class="select_bottom"
         @pagination="getMesOrderSearch"
       />
+
+      <div class="elTableDiv">
+        <el-table
+          :data="tableDataDetail"
+          border
+          height="210px"
+          :row-class-name="tableRowClassName"
+          highlight-current-row
+          :header-cell-style="this.$headerCellStyle"
+          :cell-style="this.$cellStyle"
+        >
+          <!--          <el-table-column-->
+          <!--            width="50"-->
+          <!--            type="index"-->
+          <!--            prop="搴忓彿"-->
+          <!--            fixed-->
+          <!--          />   -->
+          <el-table-column
+            width="50"
+            prop="seq"
+            label="搴忓彿"
+            fixed
+          />
+          <el-table-column
+            prop="wo_code"
+            show-tooltip-when-overflow
+            label="宸ュ崟缂栧彿"
+            width="160"
+          />
+
+          <el-table-column
+            prop="partcode"
+            label="浜у搧缂栫爜"
+            width="150"
+            show-tooltip-when-overflow
+          />
+          <el-table-column
+            prop="partname"
+            label="浜у搧鍚嶇О"
+            width="200"
+            show-tooltip-when-overflow
+          />
+
+          <el-table-column
+            label="宸ュ簭缂栫爜"
+            prop="stepcode"
+            show-tooltip-when-overflow
+            width="150"
+          />
+          <el-table-column
+            label="宸ュ簭鍚嶇О"
+            show-tooltip-when-overflow
+            prop="stepname"
+            width="150"
+          />
+          <el-table-column
+            label="浠诲姟鏁伴噺"
+            show-tooltip-when-overflow
+            prop="plan_qty"
+          />
+          <el-table-column
+            label="鍚堟牸鏁伴噺"
+            show-tooltip-when-overflow
+            prop="good_qty"
+          />
+          <el-table-column
+            label="涓嶈壇鏁伴噺"
+            show-tooltip-when-overflow
+            prop="ng_qty"
+          />
+          <el-table-column
+            label="鎿嶄綔"
+            width="120"
+            fixed="right"
+          >
+            <template slot-scope="{row}">
+              <div class="operationClass">
+                <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ簭" placement="top">
+                  <i
+                    class="el-icon-printer"
+                    :style="{color:$store.state.settings.theme}"
+                    style="cursor: pointer;margin-right: 15px"
+                    @click="supplementSmallClick(row)"
+                  />
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
     <!--鏂板娲惧彂瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       :title="operation==='add'?'鏂板':'娲惧彂'"
       :visible.sync="dialogVisible"
       width="840px"
@@ -406,6 +524,7 @@
               />
             </el-form-item>
             <el-button
+              v-waves
               type="primary"
               style="padding: 0 10px;margin-left: -8px;margin-top: 3px"
               class="el-icon-search"
@@ -474,6 +593,7 @@
               </el-select>
             </el-form-item>
             <el-button
+              v-waves
               type="primary"
               style="padding: 0 10px;margin-left: -8px;margin-top:3px"
               class="el-icon-search"
@@ -500,12 +620,36 @@
             </el-select>
           </el-form-item>
         </div>
+        <el-form-item label="鏄惁鎺掔▼" prop="isAps">
+          <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps">
+            <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-item label="鐗╂枡娓呭崟" :prop="dialogForm.isAps==='Y'?'bomId':''">
+          <el-select
+            v-model="dialogForm.bomId"
+            filterable
+            :disabled="dialogForm.isAps==='N'"
+            :popper-append-to-body="false"
+            style="width: 200px;"
+            placeholder="璇烽�夋嫨"
+          >
+            <el-option
+              v-for="item in bomIdArr"
+              :key="item.id"
+              :label="item.version"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="璁″垝寮�濮嬫椂闂�" prop="planstartdate">
           <el-date-picker
             v-model="dialogForm.planstartdate"
             type="date"
             :clearable="false"
             value-format="yyyy-MM-dd"
+            :picker-options="pickerOptions"
             style="width: 200px"
             placeholder="閫夋嫨鏃ユ湡"
           />
@@ -518,6 +662,7 @@
             value-format="yyyy-MM-dd"
             style="width: 200px"
             placeholder="閫夋嫨鏃ユ湡"
+            :picker-options="pickerOptions"
           />
         </el-form-item>
         <el-form-item label="宸ュ崟绛夌骇" prop="orderlev">
@@ -536,6 +681,7 @@
             />
           </el-select>
         </el-form-item>
+
       </el-form>
 
       <!--        宸ヨ壓璺嚎鏀惧ぇ闀滃璇濇-->
@@ -566,15 +712,18 @@
           />
           <el-table-column
             prop="stepcode"
+            show-tooltip-when-overflow
             label="宸ュ簭缂栫爜"
           />
           <el-table-column
             prop="stepname"
             label="宸ュ簭鍚嶇О"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="flwtype"
             label="宸ュ簭绫诲瀷"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.flwtype==='W'">澶栧崗</div>
@@ -584,6 +733,7 @@
           <el-table-column
             prop="descr"
             label="宸ュ簭鎻忚堪"
+            show-tooltip-when-overflow
             fixed="right"
           />
         </el-table>
@@ -591,15 +741,22 @@
 
       <span slot="footer" class="dialog-footer">
         <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 v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <!--          <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
+          <el-button
+            v-waves
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!-- 宸ュ簭浠诲姟瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       title="宸ュ簭浠诲姟"
       :visible.sync="dialogVisibleTask"
       width="840px"
@@ -609,6 +766,7 @@
       @close="dialogVisibleTaskClose"
     >
       <el-button
+        v-waves
         style="margin-bottom: 15px"
         type="primary"
         @click="supplementClick"
@@ -632,15 +790,18 @@
         />
         <el-table-column
           prop="wo_code"
+          show-tooltip-when-overflow
           label="宸ュ崟缂栧彿"
           width="200"
         />
         <el-table-column
           prop="stepcode"
           label="宸ュ簭缂栫爜"
+          show-tooltip-when-overflow
         />
         <el-table-column
           prop="stepname"
+          show-tooltip-when-overflow
           label="宸ュ簭鍚嶇О"
         />
         <!--        <el-table-column-->
@@ -658,14 +819,17 @@
         <!--        />-->
         <el-table-column
           prop="plan_qty"
+          show-tooltip-when-overflow
           label="浠诲姟鏁伴噺"
         />
         <el-table-column
           prop="good_qty"
+          show-tooltip-when-overflow
           label="鍚堟牸鏁伴噺"
         />
         <el-table-column
           prop="ng_qty"
+          show-tooltip-when-overflow
           label="涓嶈壇鏁伴噺"
         />
         <el-table-column
@@ -673,30 +837,31 @@
           fixed="right"
         >
           <template slot-scope="{row}">
-            <el-button type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
+            <el-button v-waves type="text" style="padding: 0;" @click="supplementSmallClick(row)">琛ユ墦</el-button>
           </template>
         </el-table-column>
       </el-table>
 
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="dialogVisibleBack">杩� 鍥�</el-button>
-          <!--          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+          <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
+          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
         </div>
       </span>
     </el-dialog>
 
     <!-- 婧愬崟鍗曞彿瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       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"
@@ -704,7 +869,43 @@
           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"
+            >
+              <el-date-picker
+                v-model="sourceForm.paystartdate"
+                type="daterange"
+                range-separator="~"
+                class="timeMini"
+                size="mini"
+                style="width: 200px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+                :clearable="false"
+                start-placeholder="寮�濮嬫棩鏈�"
+                end-placeholder="缁撴潫鏃ユ湡"
+              />
+              <!--              :picker-options="expireTimeOption"-->
+
+            </el-form-item>
+            <el-form-item
+              label="棰勮瀹屽伐鏃堕棿"
+              label-width="100px"
+              style=" display: flex;font-size: 14px;margin-top: 3px"
+            >
+              <el-date-picker
+                v-model="sourceForm.payenddate"
+                type="daterange"
+                :clearable="false"
+                class="timeMini"
+                range-separator="~"
+                start-placeholder="寮�濮嬫棩鏈�"
+                style="width: 200px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
+                end-placeholder="缁撴潫鏃ユ湡"
+                size="mini"
+              />
+            </el-form-item>
             <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
               <el-select
                 v-model="sourceForm.erporderstus"
@@ -721,92 +922,62 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="璁㈠崟缂栧彿" style=" display: flex;">
+            <el-form-item v-show="isExpandDialog" label="璁㈠崟缂栧彿" style=" display: flex;">
               <el-input v-model="sourceForm.erpordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+            <el-form-item v-show="isExpandDialog" label="浜у搧缂栫爜" style=" display: flex;">
               <el-input v-model="sourceForm.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
 
-            <el-form-item v-show="isExpand" label="浜у搧鍚嶇О" style=" display: flex;">
+            <el-form-item v-show="isExpandDialog" label="浜у搧鍚嶇О" style=" display: flex;">
               <el-input v-model="sourceForm.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item v-show="isExpand" label="浜у搧瑙勬牸" style=" display: flex;">
+            <el-form-item v-show="isExpandDialog" label="浜у搧瑙勬牸" style=" display: flex;">
               <el-input v-model="sourceForm.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item v-show="isExpand" label="鍒涘缓浜哄憳" style=" display: flex;">
+            <el-form-item v-show="isExpandDialog" label="鍒涘缓浜哄憳" style=" display: flex;">
               <el-input v-model="sourceForm.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item
-              v-show="isExpand"
-              label="棰勮寮�宸ユ椂闂�"
-              label-width="100px"
-              style=" display: flex;font-size: 14px;margin-top: 3px"
-            >
-              <el-date-picker
-                v-model="sourceForm.paystartdate"
-                type="daterange"
-                range-separator="~"
-                class="timeMini"
-                size="mini"
-                style="width: 250px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
-                :clearable="false"
-                start-placeholder="寮�濮嬫棩鏈�"
-                end-placeholder="缁撴潫鏃ユ湡"
-              />
-              <!--              :picker-options="expireTimeOption"-->
-
-            </el-form-item>
-            <el-form-item
-              v-show="isExpand"
-              label="棰勮瀹屽伐鏃堕棿"
-              label-width="100px"
-              style=" display: flex;font-size: 14px;margin-top: 3px"
-            >
-              <el-date-picker
-                v-model="sourceForm.payenddate"
-                type="daterange"
-                :clearable="false"
-                class="timeMini"
-                range-separator="~"
-                start-placeholder="寮�濮嬫棩鏈�"
-                style="width: 250px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
-                end-placeholder="缁撴潫鏃ユ湡"
-                size="mini"
-              />
-            </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 v-waves type="primary" icon="el-icon-search" @click="sourceSearch">鏌ヨ</el-button>
+            <el-button v-waves 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="!isExpand?'鐐瑰嚮灞曠ず鏇村':'鏀惰捣'" placement="bottom">-->
-      <div
-        style="display:flex;justify-content: center;
-          align-items:center;background-color:#eee;cursor: pointer"
-        @click="isExpand=!isExpand"
-      >
-        <i
-          :class="!isExpand?'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"
           @sort-change="sourceSortChange"
+          @row-click="getCurrentRowSource"
         >
           <!--          <el-table-column-->
           <!--            type="selection"-->
@@ -821,8 +992,8 @@
                 v-model="radioSelectedId"
                 :label="row.id"
                 style="color: transparent;padding-left: 10px;"
-                @change.native="getCurrentRowSource(row.id)"
               />
+              <!--              @change.native="getCurrentRowSource(row.id)"-->
             </template>
           </el-table-column>
           <el-table-column
@@ -834,6 +1005,7 @@
           <el-table-column
             prop="status"
             label="璁㈠崟鐘舵��"
+            show-tooltip-when-overflow
             sortable="custom"
             width="110"
           >
@@ -847,6 +1019,7 @@
           <el-table-column
             prop="wo"
             label="璁㈠崟缂栧彿"
+            show-tooltip-when-overflow
             sortable="custom"
             min-width="150"
           />
@@ -854,17 +1027,20 @@
             prop="partcode"
             label="浜у搧缂栫爜"
             sortable="custom"
+            show-tooltip-when-overflow
             min-width="150"
           />
           <el-table-column
             prop="partname"
             label="浜у搧鍚嶇О"
             sortable="custom"
+            show-tooltip-when-overflow
             min-width="150"
           />
           <el-table-column
             prop="partspec"
             label="浜у搧瑙勬牸"
+            show-tooltip-when-overflow
             sortable="custom"
             min-width="110"
           >
@@ -877,10 +1053,12 @@
             prop="qty"
             label="璁㈠崟鏁伴噺"
             width="150"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="relse_qty"
+            show-tooltip-when-overflow
             label="宸蹭笅鍗曟暟閲�"
             width="150"
             sortable="custom"
@@ -888,6 +1066,7 @@
           <el-table-column
             prop="wkshp_name"
             label="鐢熶骇杞﹂棿"
+            show-tooltip-when-overflow
             sortable="custom"
             width="150"
           >
@@ -899,6 +1078,7 @@
           <el-table-column
             prop="planstartdate"
             label="棰勮寮�宸ユ椂闂�"
+            show-tooltip-when-overflow
             sortable="custom"
             width="130"
           >
@@ -910,6 +1090,7 @@
           <el-table-column
             prop="planenddate"
             label="棰勮瀹屽伐鏃堕棿"
+            show-tooltip-when-overflow
             sortable="custom"
             width="130"
           >
@@ -921,6 +1102,7 @@
           <el-table-column
             prop="createuser"
             label="鍒涘缓浜哄憳"
+            show-tooltip-when-overflow
             sortable="custom"
             width="150"
           >
@@ -932,6 +1114,7 @@
           <el-table-column
             prop="createdate"
             label="鍒涘缓鏃堕棿"
+            show-tooltip-when-overflow
             width="130"
             sortable="custom"
           >
@@ -948,7 +1131,7 @@
           <!--            <template slot-scope="{row}">-->
           <!--              <div class="operationClass">-->
           <!--                <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">-->
-          <!--                  &lt;!&ndash;                <el-button type="text" @click="edit('edit',row)">涓嬭揪</el-button>&ndash;&gt;-->
+          <!--                  &lt;!&ndash;                <el-button v-waves type="text" @click="edit('edit',row)">涓嬭揪</el-button>&ndash;&gt;-->
           <!--                  <i-->
           <!--                    class="el-icon-bottom"-->
           <!--                    style="color:#42b983;cursor: pointer;margin-left: 5px"-->
@@ -972,14 +1155,15 @@
       />
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
-          <el-button type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
+          <el-button v-waves @click="dialogVisibleSourceBack">杩� 鍥�</el-button>
+          <el-button v-waves type="primary" @click="dialogVisibleSourceConfirm">纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!--鎵撳嵃棰勮瀵硅瘽妗�  澶ф爣绛�-->
     <el-dialog
+      v-el-drag-dialog
       title=""
       :visible.sync="dialogVisibleApprove"
       width="812px"
@@ -997,36 +1181,36 @@
             <el-form
               ref="formApprove"
               :model="formApprove"
-              label-width="100px"
+              label-width="80px"
               inline
               style="display: flex;justify-content: space-between"
             >
               <div class="elForm">
-                <el-form-item label="宸ュ崟缂栧彿锛�" class="formContent">
+                <el-form-item label="宸ュ崟缂栧彿:" class="formContent">
                   {{ formApprove.mesordercode }}
                 </el-form-item>
-                <el-form-item label="婧愬崟鍗曞彿锛�" class="formContent">
+                <el-form-item label="婧愬崟鍗曞彿:" class="formContent">
                   {{ formApprove.m_po }}
                 </el-form-item>
-                <el-form-item label="浜у搧缂栫爜锛�" class="formContent">
+                <el-form-item label="浜у搧缂栫爜:" class="formContent">
                   {{ formApprove.partcode }}
                 </el-form-item>
-                <el-form-item label="浜у搧鍚嶇О锛�" class="formContent">
+                <el-form-item label="浜у搧鍚嶇О:" class="formContent">
                   {{ formApprove.partname }}
                 </el-form-item>
-                <el-form-item label="浜у搧瑙勬牸锛�" class="formContent">
+                <el-form-item label="浜у搧瑙勬牸:" class="formContent">
                   {{ formApprove.partspec }}
                 </el-form-item>
-                <el-form-item label="宸ュ崟鏁伴噺锛�" class="formContent">
+                <el-form-item label="宸ュ崟鏁伴噺:" class="formContent">
                   {{ formApprove.plan_qty }}
                 </el-form-item>
-                <el-form-item label="宸ヨ壓璺嚎锛�" class="formContent">
+                <el-form-item label="宸ヨ壓璺嚎:" class="formContent">
                   {{ formApprove.routename }}
                 </el-form-item>
-                <el-form-item label="鎵撳嵃浜哄憳锛�" class="formContent">
+                <el-form-item label="鎵撳嵃浜哄憳:" class="formContent">
                   {{ username }}
                 </el-form-item>
-                <el-form-item label="鎵撳嵃鏃堕棿锛�" class="formContent">
+                <el-form-item label="鎵撳嵃鏃堕棿:" class="formContent">
                   {{ formApprove.lm_date }}
                 </el-form-item>
               </div>
@@ -1115,16 +1299,17 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
-          <!--            <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
-          <!--            <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
-          <el-button v-print="printObj" type="primary">鎵� 鍗�</el-button>
+          <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
+          <!--            <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+          <!--            <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
+          <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!--鎵撳嵃棰勮椤甸潰  灏忔爣绛�-->
     <el-dialog
+      v-el-drag-dialog
       title="棰勮"
       :visible.sync="dialogVisible2"
       width="1140"
@@ -1132,75 +1317,225 @@
       :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-waves @click="dialogVisible2 = false">鍙� 娑�</el-button>
+          <el-button v-waves v-print="printObj2" type="primary">鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
 
     <!--    宸ヨ壓璺嚎瀵硅瘽妗�-->
     <el-dialog
+      v-el-drag-dialog
       :close-on-click-modal="false"
       title="鍏宠仈宸ヨ壓璺嚎"
       :visible.sync="dialogVisibleRoute"
@@ -1284,10 +1619,12 @@
           <el-table-column
             prop="stepcode"
             label="宸ュ簭缂栫爜"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="stepname"
             label="宸ュ簭鍚嶇О"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="enable"
@@ -1295,16 +1632,22 @@
             fixed="right"
           >
             <template slot-scope="{row}">
-              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
-              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
+              <div v-if="row.enable==='Y'">
+                <svg-icon icon-class="circleYes" style="margin-right: 2px" />
+                鏄�
+              </div>
+              <div v-if="row.enable==='N'">
+                <svg-icon icon-class="circleNo" style="margin-right: 2px" />
+                鍚�
+              </div>
             </template>
           </el-table-column>
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <el-button @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button v-waves @click="routeDialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button v-waves type="primary" @click="routeDialogVisibleConfirm">纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -1317,37 +1660,31 @@
 import {
   AddUpdateMesOrder,
   ClosedMesOrder,
-  DeleteMesOrder, ErpOrderSearch,
+  DeleteMesOrder, ErpOrderSearch, JobCreationSonAddVison,
   MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
   SelectRouteStep
 } from '@/api/scgl'
 import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx'
-import { handleDatetime, handleDatetime2 } from '@/utils/global'
+import { handleDatetime, handleDatetime2, validateCode } from '@/utils/global'
 import { getCookie } from '@/utils/auth'
 import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils'
 import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
 import QRCode from 'qrcodejs2'
 import $ from 'jquery'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
 
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
   name: 'GD',
   components: {
     Pagination
   },
+  directives: { elDragDialog, waves },
   data() {
-    const validateName = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
-      } else {
-        if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
-        } else {
-          callback()
-        }
-      }
-    }
     return {
+      mouseHoverType: 'mouseout',
+      mouseHoverTypeDialog: 'mouseout',
+      isExpandForm: false,
       isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
@@ -1373,7 +1710,9 @@
         // { code: 'CREATED', name: '宸插叧闂�' }
         { code: 'ALLO', name: '宸叉淳鍙�' },
         { code: 'START', name: '寮�宸�' },
-        { code: 'CLOSED', name: '瀹屽伐' }
+        { code: 'CLOSED', name: '瀹屽伐' },
+        { code: 'NOSCHED', name: '寰呮帓绋�' },
+        { code: 'SCHED', name: '宸叉帓绋�' }
       ],
       total: 10,
       radioSelected: '',
@@ -1398,9 +1737,11 @@
         planstartdate: '', // 璁″垝寮�濮嬫椂闂�
         planenddate: '', // 璁″垝瀹屾垚鏃堕棿
         orderlev: '', // 宸ュ崟绛夌骇
-
+        isAps: 'N', // 鏄惁鎺掔▼
+        bomId: '', // 鐗╂枡娓呭崟id
         OperType: '' // 鎿嶄綔绫诲瀷
       },
+      bomIdArr: [], // 鐗╂枡娓呭崟涓嬫媺
       ordertypeArr: [// 宸ュ崟绫诲瀷
         { code: 'PO', name: '鏍囧噯宸ュ崟' },
         { code: 'FO', name: '鎶ュ簾琛ュ崟' }
@@ -1422,7 +1763,7 @@
           { required: true, message: '璇烽�夋嫨浜у搧淇℃伅', trigger: ['blur', 'change'] }
         ],
         mesordercode: [
-          { required: true, validator: validateName, trigger: ['blur', 'change'] }
+          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
         ],
         mesqty: [
           { required: true, message: '璇疯緭鍏ュ伐鍗曟暟閲�', trigger: ['blur', 'change'] }
@@ -1441,6 +1782,12 @@
         ],
         orderlev: [
           { required: true, message: '璇烽�夋嫨宸ュ崟绛夌骇', trigger: ['blur', 'change'] }
+        ],
+        isAps: [
+          { required: true, message: '璇烽�夋嫨鏄惁鎺掔▼', trigger: ['blur', 'change'] }
+        ],
+        bomId: [
+          { required: true, message: '璇烽�夋嫨鐗╂枡娓呭崟', trigger: ['blur', 'change'] }
         ]
 
       },
@@ -1492,7 +1839,7 @@
         closeCallback(vue) { // 鍏抽棴鎵撳嵃鐨勫洖璋冧簨浠讹紙鏃犳硶纭畾鐐瑰嚮鐨勬槸纭杩樻槸鍙栨秷锛�
           console.log('11212', vue)
           // vue.dialogVisible = false
-          vue.dialogVisible2 = false
+          // vue.dialogVisible2 = false
           // vue.dialogVisible = false
         },
         beforeOpenCallback(vue) {
@@ -1535,7 +1882,7 @@
       },
       sourceFormTotal: 10,
       radioSelectedId: '',
-      isExpand: false, // 鏄惁寮犲紑锛岄粯璁や笉灞曞紑
+      isExpandDialog: false, // 瀵硅瘽妗嗚〃鍗曟槸鍚﹀睍寮�锛岄粯璁や笉灞曞紑
       dialogVisibleRoute: false,
       dialogFormRoute: {
         projectName: '', // 浜у搧鍚嶇О
@@ -1544,7 +1891,22 @@
       },
       defaultroute_code: '', // 榛樿宸ヨ壓璺嚎閫変腑鍊�
       defaultroute_codeArr: '', // 榛樿宸ヨ壓璺嚎鏁扮粍
-      projectTableData: []// 璁惧鍒楄〃
+      projectTableData: [], // 璁惧鍒楄〃
+      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' }
+      ],
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 8.64e7
+        }
+      }
     }
   },
   created() {
@@ -1661,10 +2023,8 @@
       this.dialogForm.planenddate = handleDatetime(new Date())
       this.dialogForm.orderlev = 3
     },
-
     // 浜у搧淇℃伅鍊兼敼鍙�
     async partcodeChange(val) {
-      console.log(val, 22)
       const { data: res } = await PartSelectRoute({ partcode: val })
       this.routeArr = res
 
@@ -1692,6 +2052,18 @@
       const { data: res2 } = await RouteSelectWkshop(data)
       this.wkshopArr = res2
       this.dialogForm.wkshopcode = ''
+    },
+    // 鏄惁鎺掔▼鍊兼敼鍙樻椂
+    changeIsAps(val) {
+      if (val === 'N') {
+        this.dialogForm.bomId = ''
+      }
+      if (val === 'Y') {
+        JobCreationSonAddVison({ partnumber: this.dialogForm.partcode }).then(res => {
+          this.bomIdArr = res.data
+          this.dialogForm.bomId = this.bomIdArr[0].id
+        })
+      }
     },
     // 宸ュ簭浠诲姟
     async check(row) {
@@ -1740,7 +2112,7 @@
     },
     // 鍒犻櫎鎸夐挳
     async del(row) {
-      if (row.status === 'START' || row.status === 'CLOSED') {
+      if (row.status === 'START' || row.status === 'CLOSED' || row.status === 'SCHED') {
         return this.$message.info('姝ゅ伐鍗曚笉鍙垹闄わ紒')
       }
       this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
@@ -1750,7 +2122,7 @@
       }).then(() => {
         console.log(row, 1)
         const data = {
-          souceid: row.sourceid,
+          souceid: row.sourceid ? row.sourceid : '',
           wocode: row.wo_code,
           m_po: row.m_po,
           orderqty: row.plan_qty
@@ -1813,6 +2185,8 @@
       // const { data: res } = await PartSelectRpute({ partcode: val })
       // this.routeArr = res
       // this.dialogForm.routecode = ''
+      this.dialogForm.isAps = 'N'
+      this.dialogForm.bomId = ''
       this.partcodeChange(val)
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
@@ -1835,7 +2209,10 @@
       this.dialogForm.planstartdate = '' // 璁″垝寮�濮嬫椂闂�
       this.dialogForm.planenddate = '' // 璁″垝瀹屾垚鏃堕棿
       this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
+      this.dialogForm.isAps = 'N' // 鏄惁鎺掔▼
+      this.dialogForm.bomId = ''
 
+      this.bomIdArr = []
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -1849,6 +2226,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, // 浜у搧瑙勬牸
@@ -1866,9 +2244,11 @@
             planstartdate: this.dialogForm.planstartdate, // 璁″垝寮�濮嬫椂闂�
             planenddate: this.dialogForm.planenddate, // 璁″垝瀹屾垚鏃堕棿
             orderlev: this.dialogForm.orderlev, // 宸ュ崟绛夌骇
+            is_aps: this.dialogForm.isAps, // 鏄惁鎺掔▼
+            bom_id: this.dialogForm.bomId, // 鐗╂枡娓呭崟id
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-
+          this.$store.state.app.buttonIsDisabled = true
           AddUpdateMesOrder(data).then(res => {
             if (res.code === '200') {
               this.dialogVisible = false
@@ -1878,6 +2258,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' ? '娣诲姞澶辫触锛�' : '娲惧彂澶辫触锛�')
             }
@@ -1910,11 +2291,13 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 260
+        // this.tableHeight = this.mainHeight - 250
+        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()
       })
     },
     // 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
@@ -1930,14 +2313,14 @@
       this.dialogVisibleSearch = false
     },
     // 澶勭悊鎵撳嵃
-    handlePrint() {
+    handlePrint(wo_code) {
       // const number = Math.random() * Math.random()
       // this.number = number === 0 ? (10 + Math.random()) : number
       // console.log(number)
 
       const data2 = {
         username: getCookie('admin'),
-        mesordercode: this.dialogForm.mesordercode
+        mesordercode: wo_code || this.dialogForm.mesordercode
       }
       MesOrderPrintSearch1(data2).then(res2 => {
         if (res2.code === '200') {
@@ -1964,9 +2347,9 @@
             // div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
             div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
           })
+          this.dialogVisibleApprove = true
         }
       })
-      this.dialogVisibleApprove = true
     },
     dialogVisibleTaskClose() {
       this.dialogForm.mesordercode = ''
@@ -1994,7 +2377,7 @@
     //     }
     //   })
     // },
-    // 鐢熸垚浜岀淮鐮�
+    // 鐢熸垚浜岀淮鐮�    宸ュ崟鎶ヨ〃浜岀淮鐮�
     bindQRCode(seq, text, size) {
       if (size === 'big') {
         console.log(text, 1)
@@ -2043,17 +2426,21 @@
     // 琛ユ墦灏忔爣绛�
     supplementSmallClick(row) {
       // let obj = {}
-
-      this.taskTableData.forEach((item, index) => {
+      console.log(row, 21)
+      // this.taskTableData.forEach((item, index) => {
+      this.tableDataDetail.forEach((item, index) => {
         if (item.seq === row.seq) {
           console.log(item)
           this.qrForm = {
-            qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
-            startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
+            // qrvalue: item.seq === this.taskTableData.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.taskTableData[item.seq].stepcode,
+            qrvalue: item.seq === this.tableDataDetail.length ? item.wo_code + ';' + item.stepcode : item.wo_code + ';' + this.tableDataDetail[item.seq].stepcode,
+            // startqty: item.seq === this.taskTableData.length ? item.plan_qty : this.taskTableData[item.seq].plan_qty,
+            startqty: item.seq === this.tableDataDetail.length ? item.plan_qty : this.tableDataDetail[item.seq].plan_qty,
             wo_code: item.wo_code,
             partcode: item.partcode,
             partname: item.partname,
-            nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
+            // nextstepname: item.seq === this.taskTableData.length ? item.stepname : this.taskTableData[item.seq].stepname,
+            nextstepname: item.seq === this.tableDataDetail.length ? item.stepname : this.tableDataDetail[item.seq].stepname,
             operator: getCookie('username'),
             operatorTime: handleDatetime2(new Date())
           }
@@ -2079,7 +2466,7 @@
       this.qrForm.operatorTime = ''
       // this.$refs.qrCodeDiv2 = ''
     },
-    // 鐢熸垚浜岀淮鐮�
+    // 鐢熸垚浜岀淮鐮�    宸ュ簭鏍囩浜岀淮鐮�
     bindQRCode2(text) {
       new QRCode(this.$refs.qrCodeDiv2, {
         text: text,
@@ -2100,7 +2487,7 @@
 
       this.dialogVisibleSource = true
     },
-    async   getErpOrderSearch() {
+    async getErpOrderSearch() {
       let tempDate2 = this.sourceForm.paystartdate
       if (tempDate2.length > 0) {
         tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
@@ -2133,8 +2520,12 @@
       this.sourceFormTotal = res.count
     },
     // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
-    getCurrentRowSource(id) {
-      this.radioSelectedId = id
+    // getCurrentRowSource2(id) {
+    //   this.radioSelectedId = id
+    // },
+    // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
+    getCurrentRowSource(row, event, column) {
+      this.radioSelectedId = row.id
     },
     sourceSearch() {
       this.getErpOrderSearch()
@@ -2164,7 +2555,7 @@
       this.sourceForm.creatuser = ''
       this.sourceForm.createdate = ''
 
-      this.isExpand = false
+      this.isExpandDialog = false
       this.sourceTableData = []
     },
     dialogVisibleSourceBack() {
@@ -2273,6 +2664,30 @@
         this.defaultroute_code = ''
       }
       this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2)
+    },
+    //  琛岀偣鍑讳簨浠�
+    async rowClick(row, event, column) {
+      this.radioSelected = row.wo_code
+      const { data: res } = await SearchWorkStep({ wo_code: row.wo_code })
+      this.tableDataDetail = res
+    },
+    // 鎵撳嵃宸ュ崟
+    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' }
+      }
     }
   }
 }
@@ -2339,17 +2754,20 @@
     }
   }
 }
+
 .dialogVisibleRoute {
   ::v-deep .el-dialog__body {
     padding: 20px 20px !important;
   }
 }
-.defaultroute_code ::v-deep .el-input__suffix-inner{
+
+.defaultroute_code ::v-deep .el-input__suffix-inner {
   display: flex;
   align-items: center;
   justify-content: center;
   margin-top: -3px;
 }
+
 .el-date-editor {
   font-size: 14px;
 }
@@ -2395,11 +2813,12 @@
   margin-bottom: 0;
 }
 
-//.elTableDiv {
+.elTableDiv {
   ::v-deep .el-radio__label {
     display: none;
   }
-//}
+
+}
 
 .el-table::before {
   height: 0;
@@ -2439,19 +2858,23 @@
 <style lang="scss" scoped>
 $main_color: #42b983;
 
-::v-deep  .el-range-input{
+::v-deep .el-range-input {
   font-size: 14px !important;
 }
-::v-deep .el-range__icon{
+
+::v-deep .el-range__icon {
   line-height: 28px !important;
 }
-::v-deep .el-range-separator{
+
+::v-deep .el-range-separator {
   line-height: 28px !important;
 }
-::v-deep .el-range-input{
-  font-size: 14px ;
+
+::v-deep .el-range-input {
+  font-size: 14px;
 }
-::v-deep .el-range-separator{
+
+::v-deep .el-range-separator {
   display: flex;
   justify-content: center;
   align-items: center;
@@ -2564,6 +2987,21 @@
   //}
 }
 
+::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