From 6156331374cefbe908c5aeaebda911646c1d5f10 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 14 十一月 2024 10:35:48 +0800
Subject: [PATCH] 1.递交

---
 src/views/statistic/storageRecord.vue | 1087 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 611 insertions(+), 476 deletions(-)

diff --git a/src/views/statistic/storageRecord.vue b/src/views/statistic/storageRecord.vue
index 8a9b0f0..fbe72bc 100644
--- a/src/views/statistic/storageRecord.vue
+++ b/src/views/statistic/storageRecord.vue
@@ -1,12 +1,13 @@
 <template>
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
-      <div class="bodyTopButtonGroup" style="justify-content: space-between">
-        <el-button v-waves :disabled="multipleSelection.length===0" type="danger" icon="el-icon-delete" @click="del">鍒犻櫎</el-button>
-        <el-button v-waves type="primary" icon="el-icon-download" @click="download">瀵煎嚭</el-button>
-      </div>
 
-      <div class="bodyTopFormGroup">
+      <!--      <div class="bodyTopButtonGroup">-->
+      <!--          <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
+      <!--          <el-button v-waves type="success" icon="el-icon-connection" @click="">娲惧彂</el-button>-->
+      <!--      </div>-->
+
+      <div class="bodyTopFormGroup" style="margin-top: 10px">
         <el-form
           ref="form"
           :model="form"
@@ -15,43 +16,14 @@
           style="display: flex;"
         >
           <div class="elForm">
+
             <el-form-item label="鍏ュ簱鍗曞彿" style="display: flex;">
               <el-input v-model="form.hbillno" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="閿�鍞崟鍙�" style=" display: flex;">
-              <el-input v-model="form.sono" placeholder="璇疯緭鍏�" style="width: 200px" />
-            </el-form-item>
-            <el-form-item label="璁㈠崟鍙�" style=" display: flex;">
-              <el-input v-model="form.mono" placeholder="璇疯緭鍏�" style="width: 200px" />
-            </el-form-item>
-            <el-form-item label="宸ュ崟鍙�" style=" display: flex;">
-              <el-input v-model="form.wocode" placeholder="璇疯緭鍏�" style="width: 200px" />
-            </el-form-item>
-            <el-form-item v-show="isExpandForm" label="鐗╂枡缂栫爜" style=" display: flex;">
-              <el-input v-model="form.partcode" placeholder="璇疯緭鍏�" style="width: 200px" />
-            </el-form-item>
-            <el-form-item v-show="isExpandForm" label="鐗╂枡鍚嶇О" style=" display: flex;">
-              <el-input v-model="form.partname" placeholder="璇疯緭鍏�" style="width: 200px" />
-            </el-form-item>
-            <el-form-item v-show="isExpandForm" label="浠撳簱缂栫爜" style=" display: flex;">
-              <el-select
-                v-model="form.stockcode"
-                :popper-append-to-body="false"
-                filterable
-                style="width: 200px"
-                placeholder="璇烽�夋嫨"
-              >
-                <el-option
-                  v-for="item in stockcodeArr"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
-                />
-              </el-select>
-            </el-form-item>
-            <el-form-item v-show="isExpandForm" label="鍗曟嵁鏃ユ湡" style="display: flex;align-items: center">
+
+            <el-form-item label="鍗曟嵁鏃ユ湡" style="display: flex;align-items: center">
               <el-date-picker
-                v-model="form.responddate"
+                v-model="form.hbdate"
                 type="daterange"
                 range-separator="~"
                 class="timeMini"
@@ -62,31 +34,52 @@
                 end-placeholder="缁撴潫鏃ユ湡"
               />
             </el-form-item>
+
+            <el-form-item label="鎿嶄綔浜哄憳" style="display: flex;">
+              <el-input v-model="form.username" style="width: 200px" placeholder="璇疯緭鍏�" />
+            </el-form-item>
+
+            <el-form-item label="鎿嶄綔鏃堕棿" style="display: flex;align-items: center">
+              <el-date-picker
+                v-model="form.userdate"
+                type="daterange"
+                range-separator="~"
+                class="timeMini"
+                size="mini"
+                style="width: 200px;display: flex;line-height: 34px;height: 34px;"
+                :clearable="false"
+                start-placeholder="寮�濮嬫棩鏈�"
+                end-placeholder="缁撴潫鏃ユ湡"
+              />
+            </el-form-item>
+
           </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="primary" icon="el-icon-search" @click="getStorageRecordMainSearch()">鏌ヨ</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"
-          />
+          <!--          <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>
 
@@ -95,165 +88,63 @@
           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"
           @sort-change="sortChange"
-          @selection-change="handleSelectionChange"
+          @row-click="rowClick"
         >
-          <el-table-column
-            type="selection"
-            width="50"
-            fixed
-          />
           <el-table-column
             prop="rowNum"
             width="50"
-            fixed
             label="搴忓彿"
+            fixed
           />
+
           <el-table-column
             prop="hbillno"
             label="鍏ュ簱鍗曞彿"
-            width="160"
+            show-tooltip-when-overflow
+            sortable="custom"
+          />
+          <el-table-column
+            prop="hbilltype"
+            label="鍗曟嵁绫诲瀷"
             show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="hbdate"
-            label="鍏ュ簱鏃ユ湡"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="salecode"
-            label="閿�鍞崟鍙�"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="mo_no"
-            label="璁㈠崟鍙�"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="wocode"
-            label="宸ュ崟鍙�"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="partcode"
-            label="鐗╂枡缂栫爜"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="partname"
-            label="鐗╂枡鍚嶇О"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="partname"
-            label="鐗╂枡鍚嶇О"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="partspec"
-            label="瑙勬牸鍨嬪彿"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-
-          <el-table-column
-            prop="wkshp_name"
-            label="浜у搧鍚嶇О"
-            width="160"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="partspec"
-            label="浜у搧瑙勬牸"
-            width="120"
-            show-tooltip-when-overflow
-            sortable="custom"
-          >
-            <template slot-scope="{row}">
-              <div v-if="row.partspec">{{ row.partspec }}</div>
-              <div v-else>/</div>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="wkshp_name"
-            label="閮ㄩ棬鍚嶇О"
-            width="130"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="stockname"
-            label="浠撳簱鍚嶇О"
-            width="130"
-            show-tooltip-when-overflow
-            sortable="custom"
-          />
-          <el-table-column
-            prop="qty"
-            label="鍏ュ簱鏁伴噺"
-            width="130"
+            label="鍗曟嵁鏃ユ湡"
             show-tooltip-when-overflow
             sortable="custom"
           />
 
           <el-table-column
             prop="create_user"
-            label="鍒涘缓浜�"
-            width="160"
+            show-tooltip-when-overflow
+            label="鍒涘缓浜哄憳"
             sortable="custom"
           />
           <el-table-column
             prop="create_date"
-            label="鍒涘缓鏃ユ湡"
-            width="160"
+            label="鍒涘缓鏃堕棿"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             label="鎿嶄綔"
-            width="120"
+            width="160"
             fixed="right"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <!--                <el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">-->
-                <!--                  <i-->
-                <!--                    v-if="row.leve!==0"-->
-                <!--                    class="el-icon-edit-outline"-->
-                <!--                    :style="{color:$store.state.settings.theme}"-->
-                <!--                    @click="edit('edit',row)"-->
-                <!--                  />-->
-                <!--                </el-tooltip>-->
                 <el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
-                  <i
-                    class="el-icon-delete"
-                    :style="{color:$store.state.settings.theme}"
-                    @click="del(row)"
-                  />
+                  <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
                 </el-tooltip>
               </div>
             </template>
@@ -266,191 +157,332 @@
         :page.sync="form.page"
         :limit.sync="form.rows"
         align="right"
-        layout="total,prev, pager, next,sizes"
+        layout="total,prev, pager, next,sizes,jumper"
         popper-class="select_bottom"
-        @pagination="getStorageRecordSearch"
+        @pagination="getStorageRecordMainSearch"
       />
-    </div>
 
-    <el-dialog
-      v-el-drag-dialog
-      :title="operation==='add'?'鏂板':'浜哄憳鏄庣粏'"
-      :visible.sync="dialogVisible"
-      width="800px"
-      :close-on-click-modal="false"
-      top="15vh"
-      @closed="handleClose"
-      @close="handleClose"
-    >
-      <div style="height: 300px;width: 100%;background-color: aliceblue;padding:20px">
-        <el-tag
-          v-for="tag in tagArr"
-          :key="tag.name"
-          type="success"
-          style="margin-right: 15px;min-width: 80px;text-align: center"
+      <div class="elTableDiv">
+        <el-table
+          ref="tableDataRef2"
+          :data="tableDataDetail"
+          border
+          height="210px"
+          :row-class-name="tableRowClassName"
+          highlight-current-row
+          :header-cell-style="this.$headerCellStyle"
+          :cell-style="this.$cellStyle"
         >
-          {{ tag }}
-        </el-tag>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <div class="footerButton">
-          <el-button v-waves @click="dialogVisible=false">杩� 鍥�</el-button>
-          <!--          <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>-->
-          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
-        </div>
-      </span>
-    </el-dialog>
+          <el-table-column
+            width="50"
+            prop="rownumber"
+            label="搴忓彿"
+            fixed
+          />
+          <el-table-column
+            prop="stockname"
+            label="鍏ュ簱浠撳簱"
+            width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.stockname">{{ row.stockname }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
 
-    <!--瀵煎叆缁勪欢-->
-    <import-picker
-      ref="importPickerFunc"
-      class="importPickerClass"
-      :shows.sync="shows"
-      :title="title_value"
-      :colos="colos"
-      :code="code"
-    />
+          <el-table-column
+            prop="salecode"
+            label="閿�鍞崟鍙�"
+            min-width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.salecode">{{ row.salecode }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="mo_no"
+            label="璁㈠崟缂栧彿"
+            min-width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.mo_no">{{ row.mo_no }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="wocode"
+            label="宸ュ崟缂栧彿"
+            min-width="160"
+            show-tooltip-when-overflow
+          />
+
+          <el-table-column
+            prop="partcode"
+            label="浜у搧缂栫爜"
+            width="160"
+            show-tooltip-when-overflow
+          />
+          <el-table-column
+            prop="partname"
+            label="浜у搧鍚嶇О"
+            width="160"
+            show-tooltip-when-overflow
+          />
+          <el-table-column
+            prop="partspec"
+            label="浜у搧瑙勬牸"
+            width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.partspec">{{ row.partspec }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="unitname"
+            label="鍗曚綅鍚嶇О"
+            width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.unitname">{{ row.unitname }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+
+          <!--          <el-table-column-->
+          <!--            prop="wkshp_name"-->
+          <!--            label="閮ㄩ棬鍚嶇О"-->
+          <!--            width="160"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>-->
+          <!--              <div v-else>/</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+
+          <el-table-column
+            prop="stepname"
+            label="宸ュ簭鍚嶇О"
+            min-width="160"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.stepname">{{ row.stepname }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="qty"
+            label="鍏ュ簱鏁伴噺"
+            min-width="95"
+            show-tooltip-when-overflow
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.qty">{{ row.qty }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
+          <!--          <el-table-column-->
+          <!--            prop="plan_qty"-->
+          <!--            label="宸ュ崟鏁伴噺"-->
+          <!--            min-width="95"-->
+          <!--            fixed="right"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="good_qty"-->
+          <!--            label="瀹屽伐鏁伴噺"-->
+          <!--            min-width="95"-->
+          <!--            fixed="right"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="inhouseqty"-->
+          <!--            label="宸插叆搴撴暟閲�"-->
+          <!--            min-width="95"-->
+          <!--            fixed="right"-->
+          <!--            show-tooltip-when-overflow-->
+          <!--          />-->
+          <!--          <el-table-column-->
+          <!--            prop="stinhouseqty"-->
+          <!--            label="寰呭叆搴撴暟閲�"-->
+          <!--            min-width="130"-->
+          <!--            fixed="right"-->
+          <!--          >-->
+          <!--            &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
+          <!--            &lt;!&ndash;                      <el-input-number v-model="row.stinhouseqty" :min="0" :max="row.good_qty" size="small" />&ndash;&gt;-->
+          <!--            &lt;!&ndash;                    </template>&ndash;&gt;-->
+          <!--          </el-table-column>-->
+          <!--          <el-table-column-->
+          <!--            label="鎿嶄綔"-->
+          <!--            width="120"-->
+          <!--            fixed="right"-->
+          <!--          >-->
+          <!--            <template slot-scope="{row}">-->
+          <!--              <div class="operationClass">-->
+          <!--                <el-tooltip v-del-tab-index class="item" effect="dark" content="SOP棰勮" placement="top">-->
+          <!--                  <i-->
+          <!--                    class="el-icon-files"-->
+          <!--                    style="cursor: pointer;color:#42b983;margin-right: 15px"-->
+          <!--                  />-->
+          <!--                </el-tooltip>-->
+          <!--              </div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+        </el-table>
+      </div>
+    </div>
 
   </div>
 </template>
 
 <script>
 import Pagination from '@/components/Pagination'
-import { getCookie } from '@/utils/auth'
-import ImportPicker from '@/components/ImportPicker'
-import { handleDatetime, validateCode } from '@/utils/global'
-import {
-  DeleteStorageRecord,
-  GroupSalaryReportSearchUser, StorageRecordExcelSearch, StorageRecordSearch
-} from '@/api/ReportManager'
-import elDragDialog from '@/directive/el-drag-dialog'
 import waves from '@/directive/waves'
-import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData'
-import { TSecLocaTree } from '@/api/basicSettings'
+import {
+  StorageRecordDelete,
+  StorageRecordMainSearch,
+  StorageRecordSubSearch
+} from '@/api/ReportManager'
+import { handleDatetime, handleDatetime2 } from '@/utils/global'
 
 export default {
-  name: 'StorageRecord',
+  name: 'WorkOrderList',
   components: {
-    Pagination, ImportPicker
+    Pagination
   },
-  directives: { elDragDialog, waves },
+  directives: { waves },
   data() {
     return {
       mouseHoverType: 'mouseout',
+      mouseHoverTypeDialog: 'mouseout',
       isExpandForm: false,
+      isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
+      username: '',
       form: {
         hbillno: '', // 鍏ュ簱鍗曞彿
-        sono: '', // 閿�鍞崟鍙�
-        mono: '', // 璁㈠崟鍙�
-        wocode: '', // 宸ュ崟鍙�
-        partcode: '', // 浜у搧缂栫爜
-        partname: '', // 浜у搧鍚嶇О
-        stockcode: '', // 浠撳簱缂栫爜
-        responddate: '', // 鎿嶄綔鏃堕棿
-
-        prop: 'create_date', // 鎺掑簭瀛楁
+        hbdate: '', // 鍗曟嵁鏃ユ湡
+        username: '', // 鎿嶄綔浜哄憳
+        userdate: '', // 鎿嶄綔鏃堕棿
+        prop: 'hbillno', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
-      stockcodeArr: [],
-
-      total: 10,
       tableData: [],
-      dialogVisible: false,
-      tagArr: [], //
-      dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
-      },
-      operation: '',
-      dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
-          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
-        ],
-        OrgName: [
-          { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
-        ]
-
-      },
-
-      title_value: '鏁版嵁瀵煎叆 / 鐐规閮ㄤ綅',
-      code: '4',
-      shows: false,
-
-      multipleSelection: []
-
+      total: 10,
+      tableDataDetail: []
     }
   },
-  // watch: {
-  //   shows() {
-  //     if (!this.shows) {
-  //       this.getStorageRecordSearch()
-  //     }
-  //   }
-  // },
+
   activated() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   created() {
-    this.handleRequest()
+    this.getStorageRecordMainSearch()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
-    handleRequest() {
-      this.getStorageRecordSearch().then(res => {
-        if (res.code === '200') {
-          this.getTSecLocaTree()
-        }
-      })
-    },
-    // 鑾峰彇浠撳簱淇℃伅
-    async getTSecLocaTree() {
-      const { data: res } = await TSecLocaTree()
-      this.stockcodeArr = res.filter(i => i.depth === 0)// 灞傜骇涓�0鐨�  鏄粨搴�
-    },
-    async getStorageRecordSearch() {
-      let tempDate = this.form.responddate
+    async getStorageRecordMainSearch() {
+      let tempDate = this.form.hbdate
       if (tempDate.length > 0) {
         tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
       }
-      const data = {
-        hbillno: this.form.hbillno,
-        sono: this.form.sono,
-        mono: this.form.mono,
-        wocode: this.form.wocode,
-        partcode: this.form.partcode,
-        partname: this.form.partname,
-        stockcode: this.form.stockcode,
-        responddate: tempDate,
-        prop: this.form.prop,
-        order: this.form.order,
-        page: this.form.page,
-        rows: this.form.rows
+      let tempDate2 = this.form.userdate
+      if (tempDate2.length > 0) {
+        tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
       }
 
-      const res = await StorageRecordSearch(data)
-      this.tableData = res.data
-      this.total = res.count
+      const data = {
+        hbillno: '', // 鍏ュ簱鍗曞彿
+        hbdate: tempDate, // 鍗曟嵁鏃ユ湡
+        username: '', // 鎿嶄綔浜哄憳
+        userdate: tempDate2, // 鎿嶄綔鏃堕棿
+        prop: this.form.prop, // 鎺掑簭瀛楁
+        order: this.form.order, // 鎺掑簭瀛楁
+        page: this.form.page, // 绗嚑椤�
+        rows: this.form.rows // 姣忛〉澶氬皯鏉�
+      }
+      const res = await StorageRecordMainSearch(data)
+      if (res.code === '200') {
+        this.tableData = res.data
+        this.total = res.count
 
-      return { code: res.code }
+        if (res.data.length > 0) {
+          await this.getStorageRecordSubSearch(res.data[0].hbillno)
+        } else {
+          this.tableDataDetail = []
+        }
+      }
+    },
+    async getStorageRecordSubSearch(hbillno) {
+      const { data: res } = await StorageRecordSubSearch({ hbillno })
+      this.tableDataDetail = res
+      console.log(123, this.tableDataDetail)
+    },
+    rowClick(row, event, column) {
+      this.getStorageRecordSubSearch(row.hbillno)
+    },
+    reset() {
+      this.form.hbillno = ''
+      this.form.hbdate = ''
+      this.form.username = ''
+      this.form.userdate = ''
+      this.getStorageRecordMainSearch()
+    },
+    async   del(row) {
+      await this.getStorageRecordSubSearch(row.hbillno)
+      console.log(1111)
+      this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        const data = []
+        this.tableDataDetail.forEach(i => {
+          data.push({
+            'hbillno': i.hbillno, // 鍏ュ簱鍗曞彿
+            'inbarcode': i.inbarcode, // 鍏ュ簱鏉$爜
+            'wocode': i.wocode, // 宸ュ崟鍙�
+            'stepcode': i.step_code, // 宸ュ簭缂栫爜
+            'style': i.style, // 鎶ュ伐绫诲瀷(B/S)
+            'qty': i.qty.toString(), // 鍏ュ簱鏁伴噺
+            'create_user': localStorage.getItem('username'), // 鎿嶄綔浜哄憳
+            'create_date': handleDatetime2(new Date())// --鎿嶄綔鏃堕棿
+          })
+        })
+        // console.log(JSON.stringify(data))
+        StorageRecordDelete(data).then(res => {
+          if (res.code === '200') {
+            this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.form.page > 1 && this.tableData.length === 1) {
+              this.form.page--
+            }
+            this.getStorageRecordMainSearch()
+          }
+        })
+      }).catch(() => {
+        this.$message.info('宸插彇娑堝垹闄�')
+      })
     },
 
-    // async getMesOrderStepReportSelectUserGroup() {
-    //   const { data: res } = await MesOrderStepReportSelectUserGroup()
-    //   this.groupArr = res
-    // },
     // 鎺掑簭鏀瑰彉鏃�
     sortChange({ column, prop, order }) {
       if (order === 'descending') {
@@ -464,169 +496,13 @@
       this.form.prop = prop
       this.getStorageRecordSearch()
     },
-    async download() {
-      let tempDate = this.form.responddate
-      if (tempDate.length > 0) {
-        tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
-      }
-
-      const data = {
-        hbillno: this.form.hbillno,
-        sono: this.form.sono,
-        mono: this.form.mono,
-        wocode: this.form.wocode,
-        partcode: this.form.partcode,
-        partname: this.form.partname,
-        stockcode: this.form.stockcode,
-        responddate: tempDate
-      }
-
-      const { data: res } = await StorageRecordExcelSearch(data)
-      window.location.href = res
-    },
-    // 鏌ヨ
-    search() {
-      this.getStorageRecordSearch()
-    },
-    // 瀵煎叆鎸夐挳
-    upload() {
-      this.shows = true
-      this.$refs.importPickerFunc.newDataFunc()
-    },
-    colos() {
-      this.shows = false
-    },
-    // 閲嶇疆
-    reset() {
-      this.form.hbillno = ''
-      this.form.sono = ''
-      this.form.mono = ''
-      this.form.wocode = ''
-      this.form.partcode = ''
-      this.form.partname = ''
-      this.form.stockcode = ''
-      this.form.responddate = ''
-      this.getStorageRecordSearch()
-    },
-
-    // 鏂板鎸夐挳
-    add(operation) {
-      this.operation = operation
-      this.dialogVisible = true
-    },
-    // 淇敼鎸夐挳
-    async edit(operation, row) {
-      this.operation = operation
-      this.dialogVisible = true
-
-      const res = await GroupSalaryReportSearchUser({ id: row.id })
-      this.tagArr = res.data.map(r => r.repairname)
-      // this.tagArr = ['妤兼潕淇�', '寮犱笁', '鏉庡洓']
-      // this.$nextTick(() => {
-      //   this.dialogForm.OrgCode = row.org_code
-      //   this.dialogForm.OrgName = row.org_name
-      //   this.dialogForm.SupUnit = row.parent_id
-      // })
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val
-    },
-    // 鍒犻櫎鎸夐挳
-    del(row) {
-      this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        let data = []
-        if (row.create_date) { // 璇存槑鐐瑰嚮鐨勬椂 鍗曡鍒犻櫎
-          data = [
-            {
-              'repoid': row.repoid,
-              'hbillno': row.hbillno,
-              'salecode': row.salecode,
-              'mo_no': row.mo_no,
-              'wocode': row.wocode,
-              'partcode': row.partcode,
-              'qty': row.qty,
-              'wkshop_code': row.wkshp_code,
-              'stockcode': row.stockcode,
-              'inbarcode': row.inbarcode,
-              'step_code': row.step_code,
-              'style': row.style
-            }
-          ]
-        } else { // 璇存槑鏄壒閲忓垹闄�
-          this.multipleSelection.forEach(row => {
-            data.push({
-              'repoid': row.repoid,
-              'hbillno': row.hbillno,
-              'salecode': row.salecode,
-              'mo_no': row.mo_no,
-              'wocode': row.wocode,
-              'partcode': row.partcode,
-              'qty': row.qty,
-              'wkshop_code': row.wkshp_code,
-              'stockcode': row.stockcode,
-              'inbarcode': row.inbarcode,
-              'step_code': row.step_code,
-              'style': row.style
-            })
-          })
-        }
-        DeleteStorageRecord(data).then(res => {
-          if (res.code === '200') {
-            this.$message.success('鍒犻櫎鎴愬姛!')
-            if (this.form.page > 1 && this.tableData.length === 1) {
-              this.form.page--
-            }
-            this.getStorageRecordSearch()
-          }
-        })
-      }).catch(() => {
-        this.$message.info('宸插彇娑堝垹闄�')
-      })
-    },
-    // 瀵硅瘽妗嗗叧闂簨浠�
-    handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
-      this.$refs.dialogForm.clearValidate()
-    },
-    // 瀵硅瘽妗嗗彇娑�
-    dialogVisibleCancel() {
-      this.dialogVisible = false
-    },
-    // 瀵硅瘽妗嗙‘璁�
-    dialogVisibleConfirm() {
-      this.$refs.dialogForm.validate(valid => {
-        if (valid) {
-          const data = {
-            OrganCode: this.dialogForm.OrgCode,
-            OrganName: this.dialogForm.OrgName,
-            OperType: this.operation === 'add' ? 'Add' : 'Update',
-            Operator: getCookie('admin')
-          }
-          // AddUpdateOrganization(data).then(res => {
-          //   if (res.code === '200') {
-          //     this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
-          //     this.dialogVisible = false
-          //     this.getStorageRecordSearch()
-          //   } else {
-          //     this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
-          //   }
-          // })
-        }
-      })
-    },
-    // 鑾峰彇椤甸潰楂樺害
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 255
+        this.tableHeight = this.mainHeight - 450
+
         this.$refs.tableDataRef.doLayout()
+        this.$refs.tableDataRef2.doLayout()
       })
     },
     tableRowClassName({ row, rowIndex }) {
@@ -636,15 +512,165 @@
 }
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
+$main_color: #42b983;
 
-::v-deep .el-icon-delete{
-  margin-right: 0 !important;
+.stepSelectedValueClass {
+  ::v-deep input {
+    //min-height: 34px !important;
+    height: 68px !important;
+  }
 }
-::v-deep .el-select__caret {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+
+.dialogVisibleRoute {
+  .myCheckboxGroup {
+    display: flex;
+    flex-wrap: wrap;
+
+    .myCheckbox {
+      //border: 1px solid $main_color;
+      border: 1px solid #eee;
+      display: flex;
+      min-width: 100px;
+      padding: 10px;
+      margin: 10px 30px 0 0;
+      border-radius: 5px;
+      cursor: default;
+
+      .myCheckboxInput {
+        margin: 1px 5px 0 0;
+        cursor: pointer;
+      }
+
+    }
+
+    //.myCheckbox{
+    //  border: 1px solid $main_color;
+    //}
+
+    input[type=checkbox] {
+      cursor: pointer;
+      position: relative;
+      width: 14px;
+      height: 14px;
+      font-size: 14px;
+    }
+
+    input[type=checkbox]::after {
+      position: absolute;
+      top: 0;
+      //color: rgb(130, 35, 35);
+      color: $main_color;
+      width: 14px;
+      height: 14px;
+      display: inline-block;
+      visibility: visible;
+      padding-left: 0px;
+      text-align: center;
+      content: ' ';
+      border-radius: 3px
+    }
+
+    input[type=checkbox]:checked::after {
+      //content: "鉁�";
+      content: "鈭�";
+      color: #fff;
+      font-size: 12px;
+      font-weight: bold;
+      background-color: $main_color;
+    }
+  }
+}
+
+.dialogVisibleRoute {
+  ::v-deep .el-dialog__body {
+    padding: 20px 20px !important;
+  }
+}
+
+.el-date-editor {
+  font-size: 14px;
+}
+
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
+
+.sop {
+  ::v-deep .el-dialog__body {
+    padding: 50px 80px !important;
+  }
+}
+
+.dialogVisibleSearch ::v-deep .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+.dialogVisibleConfirmClass ::v-deep .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .el-table .caret-wrapper {
+  transform: scale(0.8);
+}
+
+::v-deep .el-button--text {
+  color: $main_color;
+  font-size: 14px;
+  cursor: pointer;
+}
+
+::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
+  margin: 10px 30px 0px 0;
+}
+
+.body ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+.elForm ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+.elTableDiv {
+  ::v-deep .el-radio__label {
+    display: none;
+  }
+
+}
+
+.el-table::before {
+  height: 0;
+}
+
+//.dialogVisibleConfirmClass >>>.el-table--border, .el-table--fit {
+//  border-bottom: 2px solid #000 ;
+//  //outline: #000 solid 2px !important;
+//}
+
+.tableDataPrint ::v-deep div.cell {
+  display: flex !important;
+  align-items: center !important;
+  justify-content: center !important;
+}
+
+.formContent {
+  width: 240px;
+}
+
+</style>
+
+<style>
+.formContent .el-form-item__label {
+  color: #000 !important;
+}
+</style>
+<!--鍏叡椤甸潰鏍峰紡-->
+<style lang="scss" scoped>
+$main_color: #42b983;
+
+::v-deep .el-range-input {
+  font-size: 14px !important;
 }
 
 ::v-deep .el-range__icon {
@@ -665,12 +691,121 @@
   align-items: center;
 }
 
-::v-deep .el-progress-bar__innerText{
-  display: none !important;
+//::v-deep .el-button--primary, .el-button--default, .el-button--info {
+//  height: 34px;
+//  display: flex;
+//  align-items: center;
+//  padding: 0 15px;
+//}
+
+::v-deep .el-button--primary {
+  //background-color: $main_color !important;
+}
+
+::v-deep .el-button--default {
+  background-color: #f8f8fa;
+  border: none;
+}
+
+::v-deep .el-input__inner {
+  height: 34px;
+  line-height: 34px;
+  //color: #a7a7a7;
+}
+
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
+
+::v-deep .dialogVisibleRoles .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .importPickerClass .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .el-dialog__footer {
+  display: flex;
+  justify-content: flex-end;
+}
+
+::v-deep .el-table .caret-wrapper {
+  transform: scale(0.8);
+}
+
+::v-deep .cell {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+::v-deep .el-table::before {
+  height: 0;
+}
+
+::v-deep .el-table__body-wrapper {
+  background-color: #f8f8fa;
+}
+
+::v-deep .el-table__body .el-table__row.hover-row td {
+  background-color: #eaecef;
+}
+
+::v-deep .el-form--inline .el-form-item__label {
+  color: #a7a7a7;
+}
+
+.body ::v-deep .el-divider {
+  border: 1px solid #eee;
+  width: 99%;
+  margin: 10px auto;
+}
+
+.body ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+.userDialogVisible ::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+
+.dateMini {
+  ::v-deep .el-input__inner {
+    line-height: 34px;
+    height: 34px;
+    width: 200px;
+    display: flex;
+    font-size: 14px !important;
+    align-items: center !important;
+  }
+
+  ::v-deep .el-input__prefix {
+    margin-top: -3px;
+  }
+
+  //::v-deep .el-range__icon{
+  //  line-height: 28px;
+  //}
+}
+
+::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>
-
 .el-table .custom-row {
   background: #f8f8fa;
 }

--
Gitblit v1.9.3