Selaa lähdekoodia

去掉bootstrap样式改成Ant Design

guozhibo 1 vuosi sitten
vanhempi
sitoutus
b054336da0

+ 31 - 53
src/components/GenerateDocumentTool.vue

@@ -1,39 +1,27 @@
 <template>
-  <div class="grid-container">
-    <div class="grid-item-1">
-      <Navbar
-        :title="title"
-        :is-go-back="false"
-      />
-    </div>
-    <div
-      class="grid-item-2"
-      style="margin-bottom: 5px;"
+  <a-layout class="container">
+    <a-page-header
+      :title="title"
+      class="page-header"
+      @back="$router.go(-1)"
     >
-      <div class="btn-group">
-        <button
-          class="btn btn-primary"
-          @click="generate()"
-        >
-          确定
-        </button>
-        <button
-          class="btn btn-warning"
-          @click="back()"
-        >
-          撤销
-        </button>
-      </div>
-    </div>
-    <div class="grid-item-3">
+      <template #extra>
+        <a-space>
+          <a-button type="primary" @click="generate()">确定</a-button>
+          <a-button type="warning" @click="back()">撤销</a-button>
+        </a-space>
+      </template>
+    </a-page-header>
+
+    <a-layout-content class="content-layout">
       <DocGenerator
         ref="docGenerator"
         :info-window-no="infoWindowNo"
         :generate-ids="generateIds"
         @show-title="title = $event"
       />
-    </div>
-  </div>
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
@@ -324,29 +312,19 @@ export default {
 </script>
 
 <style scoped>
-    .grid-container {
-        display: grid;
-        grid-template-columns: 100%;
-        grid-template-rows: min-content min-content auto;
-        height: calc(100vh - 35px);
-        width: 100%;
-        padding: 10px;
-    }
-    
-    .grid-item-1 {
-        grid-row: 1 / 2;
-        grid-column: 1 / 2;
-    }
-    
-    .grid-item-2 {
-        grid-row: 2 / 3;
-        grid-column: 1 / 2;
-    }
-    
-    .grid-item-3 {
-        overflow: auto;
-        grid-row: 3/4;
-        grid-column: 1 / 2;
-        height: 100%;
-    }
+.container {
+  height: 100vh;
+  padding: 16px;
+}
+
+.page-header {
+  border: 1px solid #f0f0f0;
+  margin-bottom: 16px;
+}
+
+.content-layout {
+  padding: 16px;
+  background: #fff;
+  overflow: auto;
+}
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 352 - 488
src/customer/BalanceInventory.vue


+ 78 - 122
src/customer/ExpressInquiry.vue

@@ -1,59 +1,30 @@
 <template>
-  <div class="container-fluid">
-    <Navbar
-      title="快递物流信息查询"
-      :is-go-back="true"
-    />
-    <div
-      class="flex-container"
-      style="margin-top: 10px;"
-    >
+  <div class="container">
+    <!-- 使用 Ant Design 的 PageHeader 组件替代 Navbar -->
+    <a-page-header title="快递物流信息查询" :back-icon="false" />
+    <div class="flex-container">
       <div class="flex-header">
-        快递单号:<font color="green">{{ _self.documentNo }}</font>
+        快递单号:<span style="color: green">{{ documentNo }}</span>
       </div>
-      <div
-        class="flex-content"
-        style="margin-top: 10px;"
-      >
-        <table class="fixed-table table-striped table-bordered">
-          <thead>
-            <tr>
-              <th style="width: 50px;">
-                时间
-              </th>
-              <th style="width: 150px;">
-                详细信息
-              </th>
-            </tr>
-          </thead>
-          <tbody class="table1">
-            <tr
-              v-for="(inventoryInstance, index) in list"
-              :key="index"
-            >
-              <td>
-                <p>{{ inventoryInstance.time }}</p>
-              </td>
-              <td>
-                <p class="text-left">{{ inventoryInstance.status }}</p>
-              </td>
-            </tr>
-          </tbody>
-        </table>
+      <div class="flex-content">
+        <!-- 使用 Ant Design 的 Table 组件 -->
+        <a-table :data-source="list" :columns="columns" :pagination="false">
+          <template #empty>
+            <!-- 无数据时的提示 -->
+            <div style="text-align: center;">暂无数据</div>
+          </template>
+        </a-table>
       </div>
       <div class="flex-footer">
         <div>
-          <div class="form-group">
-            <div class="pull-left">
-              共查询到<b>{{ _self.list.length }}</b>条数据
-            </div>
-          </div>
+          共查询到 <b>{{ list.length }}</b> 条数据
         </div>
       </div>
     </div>
-
+    <!-- 保留自定义组件 -->
     <PrintEpc ref="printEpc" />
-    <Loading v-if="loading" />
+    <!-- 使用 Ant Design 的 Spin 组件显示加载状态 -->
+    <a-spin v-if="loading" />
     <ImagePreview ref="imagePreview" />
   </div>
 </template>
@@ -63,29 +34,11 @@ import Common from '../common/Common.js';
 import ExpressInquiryResource from '../api/wms/ExpressInquiryResource.js';
 import { UserStorageResource } from 'pc-component-v3';
 
-
-
-
-
-
-
-
-
-
-
-
-
 export default {
   components: {
-    
-    
-    
-    
-    
-    
-    
+    // 可以在这里注册自定义组件
   },
-  data: function () {
+  data() {
     this.Common = Common;
     return {
       documentNo: undefined,
@@ -95,35 +48,56 @@ export default {
       loading: false,
     };
   },
-
-  mounted: function () {
-    var _self = this;
-    _self.queryInventory();
+  computed: {
+    columns() {
+      return [
+        {
+          title: '时间',
+          dataIndex: 'time',
+          width: 50,
+        },
+        {
+          title: '详细信息',
+          dataIndex: 'status',
+          width: 150,
+        },
+      ];
+    },
+  },
+  mounted() {
+    this.queryInventory();
   },
-
   methods: {
-    queryInventory: function () {
-      var _self = this;
-      var uuid = _self.$route.params.uuid;
-      let key = _self.uuid + '_modelData';
+    queryInventory() {
+      const _self = this;
+      const uuid = this.$route.params.uuid;
+      const key = `${uuid}_modelData`;
       UserStorageResource.uniqueByKey(key).then(modelDataStr => {
-        // if(modelDataStr.errorCode != 0) {
-        //   Notify.error('提示', modelDataStr.errorMessage, false);
-        //   return;
-        // }
-        if (modelDataStr.data != null && modelDataStr.data != 'undefined') {
-          let modelData = JSON.parse(modelDataStr.data);
+        if (modelDataStr.data && modelDataStr.data!== 'undefined') {
+          const modelData = JSON.parse(modelDataStr.data);
           this.modelData = modelData;
         }
         _self.documentNo = this.modelData.data.waybillNo.displayValue[0];
         _self.mobile = this.modelData.data.fromContractPhone.displayValue[0];
-        ExpressInquiryResource.unique(_self.documentNo, _self.mobile).then(successData => {
-          if (successData) {
-            _self.list = successData.result.list;
-            console.log(successData);
-          }
-        }, errorData => {
-          Common.processException(errorData);
+        _self.loading = true;
+        $.ajax({
+          url: ExpressInquiryResource.uniqueUrl(_self.documentNo, _self.mobile), // 假设存在获取 URL 的方法
+          type: 'GET',
+          dataType: 'json',
+          beforeSend: request => {
+            Common.addTokenToRequest(request);
+          },
+          success: successData => {
+            _self.loading = false;
+            if (successData) {
+              _self.list = successData.result.list;
+              console.log(successData);
+            }
+          },
+          error: (XMLHttpRequest, textStatus, errorThrown) => {
+            _self.loading = false;
+            Common.processException(XMLHttpRequest, textStatus, errorThrown);
+          },
         });
       }, errorData => {
         Common.processException(errorData);
@@ -134,47 +108,29 @@ export default {
 </script>
 
 <style scoped>
-.flex-container {
-    display: flex;
-    /* 垂直*/
-    flex-direction: column;
-    width: 100%;
-    /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-    height: calc(100vh - 140px);
+.container {
+  padding: 20px;
 }
 
-.flex-header {
-    /*放大缩小比例为0 */
-    flex: 0 0 35px;
+.flex-container {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  height: calc(100vh - 140px);
 }
 
-.flex-footer {
-    height: 45px;
-    /*放大缩小比例为0 */
-    flex: 0 0 45px;
+.flex-header {
+  flex: 0 0 35px;
 }
 
 .flex-content {
-    flex: 1;
-    overflow: scroll;
-    width: 100%;
-}
-
-.fixed-table {
-    table-layout: fixed;
-    word-wrap: break-word;
-    word-break: break-all;
+  flex: 1;
+  overflow: auto;
+  width: 100%;
 }
-</style>
 
-<style scoped>
-.fixed-table {
-    table-layout: fixed;
-    width: 800px !important;
-    min-width: 800px !important;
-}
-
-table.fixed-table tr {
-    height: 40px;
+.flex-footer {
+  height: 45px;
+  flex: 0 0 45px;
 }
-</style>
+</style>

+ 127 - 267
src/customer/InventorySearchDetail.vue

@@ -1,180 +1,94 @@
 <template>
-  <div class="container-fluid">
-    <div>
-      <div class="row">
-        <div class="col-md-12">
-          <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px;">
-            <AuthImage
-              :auth-src="Common.getThumbnailImageSrc(inventoryClassName, showInventory.imageName)" class="image img-thumbnail"
-              style="width: 78px; height: 78px;" @click="$refs.imagePreview.preview(inventoryClassName, showInventory.imageName)"
-            />
-
-            物料详细信息
-          </h1>
-        </div>
-      </div>
-      <div class="row" style="margin-top: 15px;">
-        <div class="col-md-12 asset-detail">
-          <div class="col-md-3">
-            <div>
-              <strong>存货编号:{{ showInventory.no }}</strong>
-            </div>
-          </div>
-          <div class="col-md-3">
-            <div>
-              <strong>存货名称:{{ showInventory.name }}</strong>
-            </div>
-          </div>
-          <div class="col-md-3">
-            <div>
-              <strong>所属公司:{{ showInventory.client }}</strong>
-            </div>
-          </div>
-          <div class="col-md-3">
-            <div>
-              <strong>规格型号:{{ showInventory.type }}</strong>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col-md-12 div-asset-info">
-          <ul id="myTab" class="nav nav-tabs">
-            <li class="active">
-              <a href="#asset-content-1" data-toggle="tab">出入库流水</a>
-            </li>
-            <li>
-              <a href="#asset-content-2" data-toggle="tab">库存情况</a>
-            </li>
-            <li>
-              <a href="#asset-content-3" data-toggle="tab">库位信息</a>
-            </li>
-          </ul>
-          <div class="tab-content div-asset-info">
-            <div id="asset-content-1" class="tab-pane fade in active">
-              <div class="form form-inline time-box">
-                <InAndOutFlow ref="inAndOutFlow" />
-                <!-- 								<div class="form-group">
-									<label>开始时间</label>
-									<DateTime v-model="startDate" class="form-control" name="datetime" />
-								</div>
-								<div class="form-group">
-									<label>结束时间</label>
-									<DateTime v-model="endDate" class="form-control" name="datetime />
-								</div>
-								<button type="button" class="btn btn-default" @click="getHistoryEvent2">确定</button> -->
-              </div>
-              <div class="row div-history-event">
-                <div v-for="item in historyEvents2" :key="item.id" class="media col-md-12">
-                  <div class="media-left">
-                    <a href="javascript:void(0);">
-                      <AuthImage :auth-src="getHistoryIconSrc(item.title)" class="media-object media-img img-thumbnail" />
-                    </a>
-                  </div>
-                  <div class="media-body">
-                    <h4 class="media-heading">{{ item.title }}</h4>
+  <a-layout class="container">
+    <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px;">
+      <AuthImage
+        :auth-src="Common.getThumbnailImageSrc(inventoryClassName, showInventory.imageName)" class="image img-thumbnail"
+        style="width: 78px; height: 78px;" @click="$refs.imagePreview.preview(inventoryClassName, showInventory.imageName)"
+      />
+
+      物料详细信息
+    </h1>
+    <a-card :bordered="false" class="form-card">
+      <a-row :gutter="16" class="asset-detail">
+        <a-col :span="6">
+          <strong>存货编号:{{ showInventory.no }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>存货名称:{{ showInventory.name }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>所属公司:{{ showInventory.client }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>规格型号:{{ showInventory.type }}</strong>
+        </a-col>
+      </a-row>
+
+      <a-tabs v-model:activeKey="activeContent" class="data-tabs">
+        <a-tab-pane key="1" tab="出入库流水">
+          <InAndOutFlow ref="inAndOutFlow" :display-data="dataId" />
+          <a-list item-layout="horizontal" :data-source="historyEvents2">
+            <template #renderItem="{ item }">
+              <a-list-item>
+                <template #actions>
+                  <a-image
+                    :src="getHistoryIconSrc(item.title)"
+                    width="45px"
+                    @click="showImage(item.image)"
+                  />
+                </template>
+                <a-list-item-meta
+                  :title="item.title"
+                  :description="item.content"
+                >
+                  <template #description>
                     <p class="event-time">时间: {{ item.eventDate }}</p>
-                    <p>{{ item.content }}</p>
-                  </div>
-                </div>
-              </div>
-            </div>
-            <div id="asset-content-2" class="tab-pane fade in">
-              <table class="table table-striped table-bordered">
-                <thead>
-                  <tr height="40px">
-                    <th>仓库名称</th>
-                    <th>入库单号</th>
-                    <th>存货名称</th>
-                    <th>存货编码</th>
-                    <th>批次</th>
-                    <th>结存数量</th>
-                  </tr>
-                </thead>
-                <tbody>
-                  <tr v-for="stockInfo in stockInfos" :key="stockInfo.id">
-                    <td>{{ stockInfo.warehouseName }}</td>
-                    <td>{{ stockInfo.documentNo }}</td>
-                    <td>{{ stockInfo.inventoryName }}</td>
-                    <td>{{ stockInfo.inventoryNo }}</td>
-                    <td>{{ stockInfo.batchNo }}</td>
-                    <td>{{ stockInfo.quantity }}</td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-            <div id="asset-content-3" class="tab-pane fade in">
-              <div class="table-responsive">
-                <table class="table table-striped table-bordered">
-                  <thead>
-                    <tr height="40px">
-                      <th>仓库名称</th>
-                      <th>入库单号</th>
-                      <th>存货名称</th>
-                      <th>存货编号</th>
-                      <th>库位名称</th>
-                      <th>库位编号</th>
-                      <th>数量</th>
-                      <th>处理人</th>
-                      <th>处理时间</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    <tr v-for="positionInfo in positionInfos" :key="positionInfo.id">
-                      <td>{{ positionInfo.warehouseName }}</td>
-                      <td>{{ positionInfo.documentNo }}</td>
-                      <td>{{ positionInfo.inventoryName }}</td>
-                      <td>{{ positionInfo.inventoryNo }}</td>
-                      <td>{{ positionInfo.positionName }}</td>
-                      <td>{{ positionInfo.positionNo }}</td>
-                      <td>{{ positionInfo.quantity }}</td>
-                      <td>{{ positionInfo.handlerUser }}</td>
-                      <td>{{ positionInfo.handlerDate }}</td>
-                    </tr>
-                  </tbody>
-                </table>
-                <VueBootstrapPagination :pagination="pagination2" :callback="callbackFun" />
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <Modal v-model:show="modal" large="true" @cancel="modal = false">
-      <template #header>
-        历史图片
-      </template>
-      <div class="row">
-        <div class="center-block" style="width:432px;">
-          <img :src="imageUrl" class="m-image" />
-        </div>
-      </div>
-    </Modal>
+                    {{ item.content }}
+                  </template>
+                </a-list-item-meta>
+              </a-list-item>
+            </template>
+          </a-list>
+        </a-tab-pane>
+
+        <a-tab-pane key="2" tab="库存情况">
+          <a-table
+            :data-source="stockInfos"
+            :columns="stockColumns"
+            row-key="id"
+            size="small"
+          />
+        </a-tab-pane>
+
+        <a-tab-pane key="3" tab="库位信息">
+          <a-table
+            :data-source="positionInfos"
+            :columns="positionColumns"
+            :pagination="pagination2"
+            row-key="id"
+            size="small"
+          />
+        </a-tab-pane>
+      </a-tabs>
+    </a-card>
+
+    <a-modal v-model:open="modal" title="历史图片" :footer="null">
+      <a-image :src="imageUrl" />
+    </a-modal>
+    
     <Loading v-if="loading" />
     <ImagePreview ref="imagePreview" />
-  </div>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
-
-
-
-
-
-
 import InAndOutFlow from '../stock/InAndOutFlow.vue';
 
+
 export default {
 
   components: {
-    
-    
-    
-    
-    
-    
     InAndOutFlow,
     
   },
@@ -218,24 +132,41 @@ export default {
       firstSearch: true,
       loading: false,
       modal: false,
+      stockColumns: [
+        { title: '仓库名称', dataIndex: 'warehouseName' },
+        { title: '入库单号', dataIndex: 'documentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编码', dataIndex: 'inventoryNo' },
+        { title: '批次', dataIndex: 'batchNo' },
+        { title: '结存数量', dataIndex: 'quantity' },
+      ],
+      positionColumns: [
+        { title: '仓库名称', dataIndex: 'warehouseName' },
+        { title: '入库单号', dataIndex: 'documentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编号', dataIndex: 'inventoryNo' },
+        { title: '库位名称', dataIndex: 'positionName' },
+        { title: '库位编号', dataIndex: 'positionNo' },
+        { title: '数量', dataIndex: 'quantity' },
+        { title: '处理人', dataIndex: 'handlerUser' },
+        { title: '处理时间', dataIndex: 'handlerDate' },
+      ],
     };
   },
 
-  computed: {},
+  computed: {
+    dataId: function() {
+      return {inventoryId: this.$route.query.inventoryresultId};
+    }, 
+  },
 
   watch: {},
 
   mounted: function() {
     var _self = this;
-    $('#right-container').css('background-color', '#ffffff');
+    
     var inventoryresultId = _self.$route.query.inventoryresultId;
-			
-    var dataId = {};
-    dataId.inventoryId = inventoryresultId;
-    // console.log(dataId);
-    _self.$refs.inAndOutFlow.findByInventoryId(dataId);
-    _self.$refs.inAndOutFlow.fixedTableHeader();
-			
+  
     _self.findInventoryById(inventoryresultId);
     if (_self.firstSearch) {
       _self.condition = localStorage.getItem('##searchStr##');
@@ -244,7 +175,7 @@ export default {
   },
 
   beforeUnmount: function() {
-    $('#right-container').css('background-color', '#f7f7f7');
+    
   },
 
   methods: {
@@ -384,97 +315,26 @@ export default {
 };
 </script>
 <style scoped>
-	.table-footer-left {
-		float: left;
-		margin: 0px;
-	}
-
-	.image {
-		width: 100%;
-	}
-
-	.m-img {
-		max-width: 100%;
-	}
-
-	.box {
-		margin-bottom: 14px;
-	}
-
-	.box-title {
-		margin-bottom: 6px;
-	}
-
-	.a-title {
-		text-decoration: underline;
-		font-size: 1.2em;
-		color: #5b3bcd;
-	}
-
-	.p-tooltip {
-		color: #999;
-		font-size: 12px;
-		line-height: 42px;
-		margin: 0px;
-	}
-
-	.asset-detail div {
-		word-wrap: break-word;
-		padding: 0px;
-	}
-
-	.div-asset-info {
-		margin-top: 15px;
-		margin-bottom: 15px;
-	}
-
-	.m-image {
-		height: 648px;
-		width: 432px;
-	}
-
-	.modal-img-box {
-		text-align: center;
-	}
-
-	.div-history-event ul {
-		list-style-type: circle;
-	}
-
-	.div-history-event li {
-		margin-bottom: 10px;
-		font-size: 18px;
-		border-bottom: 1px solid #dcd6d6;
-	}
-
-	.div-history-event p {
-		margin: 3px 0px;
-		font-size: 14px;
-	}
-
-	.event-title {
-		font-weight: bold;
-	}
-
-	.event-time {
-		color: #aaa;
-		font-size: 0.9em;
-	}
-
-	.no-padding-left {
-		padding-left: 0px;
-	}
-
-	.media-img {
-		width: 45px;
-		height: 45px;
-	}
-
-	.img-thumbnail {
-		cursor: pointer;
-	}
-
-	.time-box {
-		margin-bottom: 15px;
-	}
+.container {
+  padding: 20px;
+}
+
+.form-card {
+  margin-top: 20px;
+}
+
+.data-tabs {
+  margin-top: 24px;
+}
+
+.image {
+  width: 78px;
+  height: 78px;
+  margin-right: 16px;
+}
+
+.event-time {
+  color: rgba(0, 0, 0, 0.45);
+}
 </style>
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 550 - 394
src/customer/InvoiceGenerate.vue


+ 142 - 336
src/customer/ProjectItemAdjust.vue

@@ -1,136 +1,117 @@
 <template>
-  <div>
+  <a-layout class="container">
     <Navbar title="调拨单" :is-go-back="true" />
-    <div class="flex-container" style="margin-top: 10px;">
-      <div class="flex-header">
-        <div class="form-inline">
-          <div class="form-group">
-            <label for="projectItem">
-              <span class="text-danger">
-                *
-              </span>
-              原项目事件
-            </label>
-            <select id="projectItem" style="width: 250px;" class="form-control" />
-          </div>
-          <div class="form-group">
-            <button type="button" class="btn btn-success" @click="addition">提交</button>
-          </div>
-        </div>
-      </div>
-      <div class=" flex-content" style="margin-top: 10px;">
-        <table class="fixed-table table table-striped table-bordered">
-          <thead>
-            <tr>
-              <td style="width: 40px;"><input v-model="checked" autocomplete="off" type="checkbox" :checked="checked" @change="selectAll()" /></td>
-              <td style="width: 150px;">物料编码</td>
-              <td style="width: 150px;">物料名称</td>
-              <td style="width: 220px;">规格型号</td>
-              <td style="width: 150px;">物料数量</td>
-              <td style="width: 150px;">待调拨数量</td>
-              <td style="width: 150px;">可调拨数量</td>
-              <td style="width: 150px;">数量</td>
-            </tr>
-          </thead>
-          <tbody v-if="pageProjectItemAdjusts.length>0">
-            <tr v-for="item in pageProjectItemAdjusts" :key="item.inventoryId" :class="{'danger' : item.projectItemCanAdjustQuantity < item.quantity}">
-              <td style="text-align: center;"><input autocomplete="off" type="checkbox" name="checkboxinput" :checked="item.checked" @click="item.checked = !item.checked" /></td>
-              <td>{{ item.inventoryNo }}</td>
-              <td>{{ item.inventoryName }}</td>
-              <td>{{ item.inventoryType }}</td>
-              <td>{{ item.projectItemQuantity }}</td>
-              <td>{{ item.projectItemAdjustQuantity }}</td>
-              <td>{{ item.projectItemCanAdjustQuantity }}</td>
-              <!-- eslint-disable-next-line -->
-              <td><input autocomplete="off" v-model="item.quantity" type="number" class="form-control" placeholder="需求数量" aria-describedby="basic-addon1" @keyup="checkBoxChange(item)" /></td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <Modal v-model:show="modal" small="true" :show-canel-button="false" :show-ok-button="false">
-        <template #header>
-          提交调拨单
+    
+    <a-card :bordered="false" class="form-card">
+      <a-form layout="inline">
+        <a-form-item label="原项目事件">
+          <a-select
+            v-model:value="projectItemId"
+            :options="projectOptions"
+            show-search
+            :filter-option="false"
+            placeholder="请选择原项目事件"
+            @search="handleSearchProject"
+            @change="handleProjectChange"
+          />
+        </a-form-item>
+
+        <a-button type="primary" @click="addition">提交</a-button>
+      </a-form>
+
+      <a-table
+        :data-source="pageProjectItemAdjusts"
+        :columns="columns"
+        :pagination="pagination"
+        row-key="inventoryId"
+        class="data-table"
+      >
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'selection'">
+            <a-checkbox 
+              v-model:checked="record.checked"
+              @change="handleCheckChange(record)"
+            />
+          </template>
+          <template v-else-if="column.dataIndex === 'quantity'">
+            <a-input-number
+              v-model:value="record.quantity"
+              :min="0"
+              :max="record.projectItemCanAdjustQuantity"
+              @change="handleQuantityChange(record)"
+            />
+          </template>
+          <template v-else>
+            {{ record[column.dataIndex] }}
+          </template>
         </template>
-        <div>
-          <div class="form-inline">
-            <div class="form-group">
-              <label for="projectItem1">
-                <span class="text-danger">
-                  *
-                </span>
-                目标项目事件
-              </label>
-              <select id="projectItem1" class="form-control" />
-            </div>
-          </div>
-          <div id="table2" class="table-responsive table-striped box" style="margin-top: 10px;">
-            <table id="tb_2" class="table   table-bordered t2" cellspacing="0" cellpadding="2" width="100%" border="0" style="background-color: white; ">
-              <thead class="fixedHeader">
-                <tr class="trNeedForeach">
-                  <td style="height: 40px;text-align: center;">单据号,制单人,备注</td>
-                </tr>
-              </thead>
-              <tbody>
-                <tr v-for="(editProjectItemAdjust,index) in editProjectItemAdjusts" :key="editProjectItemAdjust.id" :class="{'success' : editProjectItemAdjust.isChecked == true}">
-                  <td @click="setProjectItemAdjust(index)">{{ editProjectItemAdjust.documentNo }},{{ editProjectItemAdjust.userName }},{{ editProjectItemAdjust.description }}</td>
-                </tr>
-              </tbody>
-            </table>
+      </a-table>
+
+      <a-modal
+        v-model:visible="modal"
+        title="提交调拨单"
+        :footer="null"
+      >
+        <a-form layout="vertical">
+          <a-form-item label="目标项目事件">
+            <a-select
+              v-model:value="targetProjectItemId" 
+              :options="projectOptions"
+              show-search
+              :filter-option="false"
+              placeholder="请选择目标项目事件"
+              @search="handleSearchProject"
+              @change="handleTargetChange"
+            />
+          </a-form-item>
+
+          <a-table
+            :data-source="editProjectItemAdjusts"
+            :columns="editColumns"
+            row-key="id"
+          >
+            <template #bodyCell="{ column, record }">
+              <template v-if="column.dataIndex === 'selection'">
+                <a-radio 
+                  :checked="projectItemAdjustId === record.id"
+                  @change="handleSelectAdjust(record)"
+                />
+              </template>
+            </template>
+          </a-table>
+
+          <div class="modal-footer">
+            <a-button @click="cancel">取消</a-button>
+            <a-button type="primary" @click="picking">确定</a-button>
           </div>
-          <div>
-            <VueBootstrapPagination v-if="pagination2.last_page > 0" :pagination="pagination2" :callback="getEditProjectItemAdjusts" />
-          </div>
-        </div>
+        </a-form>
+      </a-modal>
+    </a-card>
 
-        <template #footer>
-          <div>
-            <button class="btn btn-default" type="button" @click="cancel">取消</button>
-            <button class="btn btn-default" type="button" @click="picking">确定</button>
-          </div>
-        </template>
-      </Modal>
-
-      <div class=" flex-footer">
-        <div class="pull-left">
-          <span>第{{ (pagination.current_page-1)*pagination.per_page+1 }}-{{ pagination.current_page*pagination.per_page }}条,共计{{ pagination.total }}条,每页显示</span>
-          <PageSizeSelect @page-size-changed="gridSizeSelect" />
-          <span>条</span>
-        </div>
-        <div class="pull-right">
-          <VueBootstrapPagination v-if="pagination.last_page > 0" :pagination="pagination" :callback="getDatas" />
-        </div>
-      </div>
-    </div>
-    <div>
-      <Loading v-if="loading" />
-    </div>
-  </div>
+    <Loading v-if="loading" />
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
-
-
 import ProjectItemAdjustResource from '../api/wms/ProjectItemAdjustResource.js';
 
-
-
-
-
-
 export default {
   components: {
     
-    
-    
-    
-    
-    
-    
-    
   },
   data: function () {
     return {
+      columns: [
+        { title: '选择', dataIndex: 'selection' },
+        { title: '物料编码', dataIndex: 'inventoryNo' },
+        { title: '物料名称', dataIndex: 'inventoryName' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '物料数量', dataIndex: 'projectItemQuantity' },
+        { title: '待调拨数量', dataIndex: 'projectItemAdjustQuantity' },
+        { title: '可调拨数量', dataIndex: 'projectItemCanAdjustQuantity' },
+        { title: '数量', dataIndex: 'quantity' },
+      ],
       projectItemAdjusts: [],
       pageProjectItemAdjusts: [], //每页显示的数据
       projectItemId: undefined, //原项目事件
@@ -155,23 +136,13 @@ export default {
       projectItemAdjustNo: undefined, //选择的调拨单的单据号
       loading: false,
       modal: false,
-
+      projectOptions: [], //项目事件下拉框
     };
   },
 
 
 
   mounted: function () {
-    this.loadSelectProjectItem();
-    this.loadSelectProjectItem1();
-
-    $('.fixed-table').tableFixer({ 'left': 3, 'head': true });
-
-    $('.fixed-table').colResizable({
-      resizeMode: 'overflow',
-      partialRefresh: true,
-    });
-
   },
 
   methods: {
@@ -205,148 +176,39 @@ export default {
         }
       }
     },
-    /**
-             * 原项目事件
-             */
-    loadSelectProjectItem: function () {
-      var _self = this;
-      $('#projectItem').select2({
-        // 请求搜索框数据
-        theme: 'bootstrap',
-        placeholder: '原项目事件',
-        minimumInputLength: 0,
-        placeholderOption: 'first',
-        quietMillis: 250,
-        allowClear: true,
-        language: 'zh-CN',
-        width: 'resolve',
-        // 请求搜索框数据
-        ajax: {
-          url: function (params) {
-            return Common.getApiURL('ProjectItemResource/queryByCondition');
-          },
-          dataType: 'json',
-          type: 'get',
-          delay: 250,
-          minimumInputLength: 0,
-          transport: function (params, success, failure) {
-            params.beforeSend = Common.addTokenToRequest;
-            var $request = $.ajax(params);
-            $request.then(success);
-            $request.fail(failure);
-            return $request;
-          },
-          data: function (params) {
-            return {
-              'name': params.term,
-            };
-          },
-          processResults: function (data, params) {
-            if(data.errorCode == 0) {
-              var more = (params * 10) <= data.datas.length;
-              for (var i = 0; i < data.datas.length; i++) {
-                data.datas[i].text = data.datas[i].name;
-              }
-              _self.projectItems = data.datas;
-              return {
-                results: data.datas,
-                more: more,
-              };
-            }
-          },
-        },
-      }).on('change', function () {
-        if ($(this).val() == null) {
-          _self.projectItemId = undefined;
-          //清空这样显示数据
-          _self.pageProjectItemAdjusts.splice(0, _self.pageProjectItemAdjusts.length);
-        } else {
-          _self.projectItemId = $(this).val();
-        }
-        //清空这样显示数据
-        _self.pageProjectItemAdjusts.splice(0, _self.pageProjectItemAdjusts.length);
-        _self.pagination.current_page = 1;
-        _self.getProjectItemAdjusts();
-        _self.getEditProjectItemAdjusts();
-      });
-    },
-
-    /**
-             * 目标项目事件
-             */
-    loadSelectProjectItem1: function () {
-      var _self = this;
-      $('#projectItem1').select2({
-        // 请求搜索框数据
-        theme: 'bootstrap',
-        placeholder: '目标项目事件',
-        minimumInputLength: 0,
-        placeholderOption: 'first',
-        quietMillis: 250,
-        allowClear: true,
-        language: 'zh-CN',
-        width: 'resolve',
-        // 请求搜索框数据
-        ajax: {
-          url: function (params) {
-            return Common.getApiURL('ProjectItemResource/queryByCondition');
-          },
-          dataType: 'json',
-          type: 'get',
-          delay: 250,
-          minimumInputLength: 0,
-          transport: function (params, success, failure) {
-            params.beforeSend = Common.addTokenToRequest;
-            var $request = $.ajax(params);
-            $request.then(success);
-            $request.fail(failure);
-            return $request;
-          },
-          data: function (params) {
-            return {
-              'name': params.term,
-            };
-          },
-          processResults: function (data, params) {
-            if(data.errorCode == 0) {
-              var more = (params * 10) <= data.datas.length;
-              for (var i = 0; i < data.datas.length; i++) {
-                data.datas[i].text = data.datas[i].name;
-              }
-              _self.projectItems = data.datas;
-              return {
-                results: data.datas,
-                more: more,
-              };
-            }
-          },
-        },
-      }).on('change', function () {
-        if ($(this).val() == null) {
-          _self.targetProjectItemId = undefined;
-        } else {
-          _self.targetProjectItemId = $(this).val();
-          _self.getEditProjectItemAdjusts();
-        }
-
-      });
+    handleSearchProject: async function(value) {
+      try {
+        const response = await $.ajax({
+          url: Common.getApiURL('ProjectItemResource/queryByCondition'),
+          data: { name: value },
+          beforeSend: request => Common.addTokenToRequest(request),
+        });
+      
+        this.projectOptions = response.datas.map(item => ({
+          label: item.name,
+          value: item.id,
+        }));
+      } catch (error) {
+        Common.processException(error);
+      }
     },
 
-    /**
-             * 修改每页显示的数量
-             * @param {Object} newPageSize
-             */
-    gridSizeSelect: function (newPageSize) {
-      this.pagination.per_page = newPageSize;
+    // 修改项目选择处理
+    handleProjectChange(value) {
+      this.projectItemId = value;
+      this.pageProjectItemAdjusts = [];
       this.pagination.current_page = 1;
-      // 刷新界面
-      //清空这样显示数据
-      this.pageProjectItemAdjusts.splice(0, this.pageProjectItemAdjusts.length);
-      //清空这样显示数据
-      this.projectItemAdjusts.splice(0, this.projectItemAdjusts.length);
       this.getProjectItemAdjusts();
+      this.getEditProjectItemAdjusts();
+    },
+
+    // 修改目标项目选择处理
+    handleTargetChange(value) {
+      this.targetProjectItemId = value;
+      this.getEditProjectItemAdjusts();
     },
 
+
     /**
              * 查询还在编辑状态下的调拨单
              * 
@@ -453,7 +315,6 @@ export default {
 
       }
 
-      _self.fixedTableHeader();
     },
 
 
@@ -618,82 +479,27 @@ export default {
       }
     },
 
-    /**
-             * 冻结表头
-             */
-    fixedTableHeader: function () {
-      let _self = this;
-      _self.$nextTick(function () {
-        $('.fixed-table').tableFixer({ 'left': 3, 'head': true });
-      });
-    },
-
   },
 
 };
 </script>
 
 <style scoped>
-    .form-inline .form-group label {
-        width: 100px;
-        text-align: right;
-        padding-right: 5px;
-    }
-
-    .form-inline .form-group input,
-    .form-inline .form-group select {
-        width: 200px;
-    }
-</style>
-
-<style scoped>
-    .flex-container {
-        display: flex;
-        /* 垂直*/
-        flex-direction: column;
-        width: 100%;
-        /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-        height: calc(100vh - 155px);
-    }
-
-    .flex-header {
-        height: 40px;
-        /*放大缩小比例为0 */
-        flex: 0 0 40px;
-    }
-
-    .flex-footer {
-        margin-top: 0.8em;
-        height: 35px;
-        /*放大缩小比例为0 */
-        flex: 0 0 35px;
-    }
-
-    .flex-content {
-        margin-top: 0.8em;
-        flex: 1;
-        overflow: scroll;
-        width: 100%;
-        height: 0;
-    }
-</style>
-
-
-<style scoped>
-    .fixed-table {
-        table-layout: fixed;
-        width: 800px !important;
-        min-width: 800px !important;
-    }
-
-    table.fixed-table tr {
-        height: 40px;
-    }
-
-    table.fixed-table th,
-    table.fixed-table td {
-        overflow: hidden;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-    }
+.form-card {
+  margin-top: 24px;
+  padding: 16px;
+}
+
+.data-table {
+  margin-top: 24px;
+}
+
+.modal-footer {
+  margin-top: 24px;
+  text-align: right;
+}
+
+.ant-form-item {
+  margin-right: 24px;
+}
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 288 - 429
src/customer/RepertoryCheck.vue


+ 380 - 676
src/customer/VouchCheck.vue

@@ -1,228 +1,130 @@
 <template>
   <div>
+    <!-- 导航栏 -->
     <Navbar title="选择存货生成物料盘点详情" is-go-back="true" />
 
-    <div class="grid-container">
-      <div class="grid-item-row1-column1">
-        <div class="form-group">
-          <button type="button" class="btn btn-primary" @click="getInventoryInstance">
-            搜索
-          </button>
-          <button type="button" class="btn btn-success" @click="generateCheckVouchs">
-            生成盘点明细
-          </button>
-          <button type="button" class="btn btn-danger" @click="clear">
-            清空
-          </button>
-        </div>
-        <div v-for="(data, index) in setPositions" :key="index" class="form-group">
-          <button class="btn btn-light btn-sm">
-            {{ data.positionBarCode }}
-            <span class="glyphicon glyphicon-remove" @click="setPosition2(index)" />
-          </button>
-        </div>
-      </div>
+    <!-- 操作按钮区域 -->
+    <div class="action-buttons">
+      <a-button type="primary" @click="getInventoryInstance">搜索</a-button>
+      <a-button type="success" @click="generateCheckVouchs">生成盘点明细</a-button>
+      <a-button type="danger" @click="clear">清空</a-button>
+    </div>
 
-      <!--左列-->
-      <div class="grid-item-row2-column1">
-        <div class="form-inline">
-          <div class="form-group">
-            <label for="isAll" style="width: 96px;line-height: 45px">
-              <span class="text-danger"> * </span>
-              盘点范围
-            </label>
-            <select v-model="isAll" class="form-control" style="width: 200px;height: 34px;">
-              <option value="true">仓库全部物料</option>
-              <option value="false">根据条件选择生成</option>
-            </select>
-          </div>
-        </div>
-        <div v-if="isAll == 'false'">
-          <div class="panel panel-default m-panel ">
-            <div class="panel-heading" @click="type == 2 ? (type = 1) : (type = 2)">
-              物料类别名称、编号
-            </div>
-            <div v-show="type == 2" class="panel-body">
-              <div class="m-tree">
-                <TreeViewNode
-                  v-for="data in inventoryClasses" :key="data.id" :node="data"
-                  :is-root="true" :is-show-check="true" @node-select="inventoryClassSelect"
-                />
-              </div>
-            </div>
-          </div>
-          <div class="panel panel-default m-panel">
-            <div class="panel-heading" @click="type == 3 ? (type = 1) : (type = 3)">
-              货位
-            </div>
-            <div v-show="type == 3" class="panel-body">
-              <div>
-                <div class="form-group">
-                  <input
-                    v-model="positionCondition"
-                    autocomplete="off" class="form-control" placeholder="输入货位条形码(回车查询)"
-                    aria-describedby="basic-addon1" @keyup.enter="queryPosition"
-                  />
-                </div>
-                <div class="from-group">
-                  <table class="table table-responsive table-bordered">
-                    <thead>
-                      <tr>
-                        <td style="width: 20px; text-align: center">
-                          <input
-                            v-model="checked"
-                            autocomplete="off" type="checkbox" :checked="checked"
-                            @change="selectAll()"
-                          />
-                        </td>
-                        <td style="width: 60px; text-align: center">
-                          货位条形码
-                        </td>
-                      </tr>
-                    </thead>
-                    <tbody v-if="showPositions.length > 0">
-                      <tr v-for="(item, index) in showPositions" :key="item.id">
-                        <td style="text-align: center">
-                          <input
-                            autocomplete="off"
-                            type="checkbox" name="checkboxinput" :checked="item.check"
-                            @click="setPosition(index)"
-                          />
-                        </td>
-                        <td style="text-align: center">
-                          {{ item.positionBarCode }}
-                        </td>
-                      </tr>
-                    </tbody>
-                  </table>
-                </div>
-              </div>
+    <!-- 选中的货位标签展示 -->
+    <div v-if="setPositions.length > 0" class="selected-positions">
+      <a-tag
+        v-for="(data, index) in setPositions"
+        :key="index"
+        closable
+        @close="setPosition2(index)"
+      >
+        {{ data.positionBarCode }}
+      </a-tag>
+    </div>
+    <!-- 筛选条件区域 -->
+    <div class="filter-section">
+      <a-form layout="inline">
+        <a-form-item label="盘点范围">
+          <a-select v-model:value="isAll" style="width: 200px">
+            <a-select-option value="true">仓库全部物料</a-select-option>
+            <a-select-option value="false">根据条件选择生成</a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-form>
+
+      <!-- 物料类别选择面板 -->
+      <div v-if="isAll === 'false'" class="category-panel">
+        <a-collapse>
+          <a-collapse-panel :key="1" header="物料类别名称、编号">
+            <div class="category-tree">
+              <TreeViewNode
+                v-for="data in inventoryClasses"
+                :key="data.id"
+                :node="data"
+                :is-root="true"
+                :is-show-check="true"
+                @node-select="inventoryClassSelect"
+              />
             </div>
-          </div>
-        </div>
-      </div>
-      <div v-if="isAll == 'false'" class="grid-item-row3-column1">
-        <div class="pull-left">
-          <span>第{{ (pagination.current_page-1)*pagination.per_page+1 }}-{{ pagination.current_page*pagination.per_page }}条,共计{{ pagination.total }}条,每页显示</span>
-          <PageSizeSelect @page-size-changed="gridSizeSelect" />
-          <span>条</span>
-        </div>
-        <div class="pull-right">
-          <VueBootstrapPagination
-            v-if="pagination.last_page > 0" :pagination="pagination"
-            :callback="checkDataChangedQueryGridData"
-          />
-        </div>
+          </a-collapse-panel>
+        </a-collapse>
       </div>
 
-
-
-      <div class="grid-item-row2-column2">
-        <table class="fixed-table table table-striped table-bordered">
-          <thead>
-            <tr>
-              <td style="width: 50px">序号</td>
-              <td style="width: 100px">存货编码</td>
-              <td style="width: 140px">存货名称</td>
-              <td style="width: 140px">规格型号</td>
-              <td style="width: 140px">编号</td>
-              <td style="width: 140px">存货分类</td>
-              <td style="width: 100px">条形码</td>
-              <td style="width: 100px">货位名称</td>
-              <td style="width: 100px">货位编号</td>
-              <td style="width: 100px">货位条形码</td>
-              <td style="width: 200px">EPC</td>
-              <td style="width: 140px">单位</td>
-              <td style="width: 140px">部门</td>
-            </tr>
-          </thead>
-          <tbody v-if="inventoryInstances.length > 0">
-            <tr v-for="(item, index) in inventoryInstances" :key="item.id" @dblclick="openWindow(item)">
-              <td>{{ index + 1 }}</td>
-              <td>{{ item.inventoryNo }}</td>
-              <td>{{ item.inventoryName }}</td>
-              <td>{{ item.inventoryType }}</td>
-              <td>{{ item.no }}</td>
-              <td v-if="item.inventoryCategoryName != null">
-                {{ item.inventoryCategoryName }}({{ item.inventoryCategoryNo }})
-              </td>
-              <td v-else>
-                {{ item.inventoryCategoryName }}{{ item.inventoryCategoryNo }}
-              </td>
-              <td>{{ item.barCode }}</td>
-              <td>{{ item.positionName }}</td>
-              <td>{{ item.positionNo }}</td>
-              <td>{{ item.positionBarCode }}</td>
-              <td>{{ item.epc }}</td>
-              <td>{{ item.client }}</td>
-              <td>{{ item.organization }}</td>
-            </tr>
-          </tbody>
-        </table>
+      <!-- 货位选择面板 -->
+      <div v-if="isAll === 'false'" class="position-panel">
+        <a-collapse>
+          <a-collapse-panel :key="2" header="货位">
+            <a-form layout="inline">
+              <a-form-item>
+                <a-input
+                  v-model:value="positionCondition"
+                  placeholder="输入货位条形码(回车查询)"
+                  @keyup.enter="queryPosition"
+                />
+              </a-form-item>
+            </a-form>
+            <a-table
+              :data-source="showPositions"
+              :columns="positionColumns"
+              row-key="id"
+            />
+          </a-collapse-panel>
+        </a-collapse>
       </div>
+    </div>
 
-      <div class="grid-item-row3-column2">
-        <div class="pull-left">
-          <span>第{{ (pagination.current_page - 1) * pagination.per_page + 1 }}-{{
-            pagination.current_page * pagination.per_page
-          }}条,共计{{ pagination.total }}条,每页显示</span>
-          <PageSizeSelect @page-size-changed="gridSizeSelect" />
-          <span>条</span>
-        </div>
-        <div class="pull-right">
-          <VueBootstrapPagination
-            v-if="pagination.last_page > 0" :pagination="pagination"
-            :callback="checkDataChangedQueryGridData"
-          />
-        </div>
-        <div>
-          <nav>
-            <ul class="pager" style="margin: 5px 0">
-              <li>
-                <a
-                  v-if="hasLastPage == true" href="javascript:void(0)" class="pull-left"
-                  @click="previousPage"
-                >上一页</a>
-              </li>
-              <li>
-                <a
-                  v-if="hasNextPage == true" href="javascript:void(0)" class="pull-right"
-                  @click="nextPage"
-                >下一页</a>
-              </li>
-            </ul>
-          </nav>
-        </div>
-      </div>
+    <!-- 存货列表表格 -->
+    <div class="inventory-table">
+      <a-table
+        :data-source="inventoryInstances"
+        :columns="inventoryColumns"
+        :pagination="pagination"
+        @row-dblclick="openWindow"
+      />
+    </div>
 
-      <Loading v-if="loading" />
+    <!-- 分页信息展示 -->
+    <div class="pagination-info">
+      <div>
+        <span>第{{ (pagination.current - 1) * pagination.pageSize + 1 }} - {{
+          Math.min(pagination.current * pagination.pageSize, pagination.total)
+        }} 条,共计 {{ pagination.total }} 条,每页显示</span>
+        <a-select
+          v-model:value="pagination.pageSize"
+          style="width: 80px; margin: 0 5px"
+          @change="gridSizeSelect"
+        >
+          <a-select-option value="10">10</a-select-option>
+          <a-select-option value="20">20</a-select-option>
+          <a-select-option value="30">30</a-select-option>
+        </a-select>
+        <span>条</span>
+      </div>
+      <a-pagination
+        v-if="pagination.total > 0"
+        :current="pagination.current"
+        :page-size="pagination.pageSize"
+        :total="pagination.total"
+        @change="checkDataChangedQueryGridData"
+      />
     </div>
+
+    <!-- 加载状态 -->
+    <a-spin v-if="loading" />
   </div>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import { UserStorageResource, Uuid } from 'pc-component-v3';
-
-
-
-
-
-
-
-
-
-
-
+import { Notify } from 'ant-design-vue';
 
 export default {
-  components: {
-    
-  },
-  data: function() {
+  components: {},
+  data() {
     return {
       checked: false,
-      inventoryClasses: [], //物料类别
+      inventoryClasses: [],
       type: 0,
       warehouseId: null,
       warehouseName: null,
@@ -230,297 +132,262 @@ export default {
       inventoryInstances: [],
       pagination: {
         total: 0,
-        per_page: Common.pageSize, // required
-        current_page: 1, // required
-        last_page: 1, // required
+        pageSize: 10,
+        current: 1,
       },
-      isAll: true,
+      isAll: 'true',
       isCurrentStock: false,
       uuid: Uuid.createUUID(),
-      showPositions: [], //每页显示的货位
-      setPositions: [], //选中的货位
-      hasLastPage: false, // 货位显示是否有上一页
-      hasNextPage: false, // 货位显示是否有下一页
-      positionTotalPages: 1, // 货位总页数
-      positionNowPage: 1, //货位显示的页数
-      positionCondition: '', //货位过滤条件
+      showPositions: [],
+      setPositions: [],
+      hasLastPage: false,
+      hasNextPage: false,
+      positionTotalPages: 1,
+      positionNowPage: 1,
+      positionCondition: '',
       loading: false,
     };
   },
-
+  computed: {
+    positionColumns() {
+      return [
+        {
+          title: '选择',
+          dataIndex: 'check',
+          width: 20,
+        },
+        {
+          title: '货位条形码',
+          dataIndex: 'positionBarCode',
+          width: 60,
+        },
+      ];
+    },
+    inventoryColumns() {
+      return [
+        { title: '序号', dataIndex: 'index', width: 50 },
+        { title: '存货编码', dataIndex: 'inventoryNo', width: 100 },
+        { title: '存货名称', dataIndex: 'inventoryName', width: 140 },
+        { title: '规格型号', dataIndex: 'inventoryType', width: 140 },
+        { title: '编号', dataIndex: 'no', width: 140 },
+        { title: '存货分类', dataIndex: 'inventoryCategoryName', width: 140 },
+        { title: '条形码', dataIndex: 'barCode', width: 100 },
+        { title: '货位名称', dataIndex: 'positionName', width: 100 },
+        { title: '货位编号', dataIndex: 'positionNo', width: 100 },
+        { title: '货位条形码', dataIndex: 'positionBarCode', width: 100 },
+        { title: 'EPC', dataIndex: 'epc', width: 200 },
+        { title: '单位', dataIndex: 'client', width: 140 },
+        { title: '部门', dataIndex: 'organization', width: 140 },
+      ];
+    },
+  },
   watch: {
-    isAll: function() {
-      if (this.isAll == 'true') {
+    isAll: function () {
+      if (this.isAll === 'true') {
         this.clear();
       }
     },
   },
-
-  //获取盘点单的id
-  created: function() {
-    var _self = this;
-			
+  created() {
+    const _self = this;
+    const uuid = this.$route.params.uuid;
+    UserStorageResource.uniqueByKey(uuid + '_modelData').then(
+      str => {
+        if (str.data) {
+          const modelData = JSON.parse(str.data);
+          _self.checkVouchId = modelData.id;
+          _self.warehouseId = modelData.data.warehouse.id;
+          _self.warehouseName = modelData.data.warehouse.displayValue[0];
+        }
+      },
+      errorData => {
+        Common.processException(errorData);
+      },
+    );
   },
-
-  mounted: function() {
-    var _self = this;
-
-    var uuid = this.$route.params.uuid;
-    console.log(this.$route);
-    // var cacheData = window.localStorage.getItem(uuid+"_modelData");
-    UserStorageResource.uniqueByKey(uuid + '_modelData').then(str => {
-      // if(str.errorCode != 0) {
-      //   Notify.error('提示', str.errorMessage, false);
-      //   return;
-      // }
-      if (str.data != null) {
-        console.log(str.data);
-        var modelData = JSON.parse(str.data);
-        _self.checkVouchId = modelData.id;
-        _self.warehouseId = modelData.data.warehouse.id;
-        _self.warehouseName = modelData.data.warehouse.displayValue[0];
-      }
-    }, errorData => {
-      Common.processException(errorData);
-    });
-
-    _self.getInventoryClass();
-    _self.queryPosition();
-    _self.getInventoryInstance();
-    $('.fixed-table').tableFixer({
-      left: 3,
-      head: true,
-    });
-
-    $('.fixed-table').colResizable({
-      resizeMode: 'overflow',
-      partialRefresh: true,
-    });
-			
+  mounted() {
+    this.getInventoryClass();
+    this.queryPosition();
+    this.getInventoryInstance();
   },
   methods: {
-    /**
-			 * 货位全选和反选
-			 */
-    selectAll: function() {
-      var _self = this;
-      _self.setPositions.splice(0, _self.setPositions.length);
+    // 货位全选和反选
+    selectAll() {
+      const _self = this;
+      _self.setPositions = [];
       if (_self.checked) {
-        for (var i = 0; i < _self.showPositions.length; i++) {
-          _self.showPositions[i].check = true;
-          _self.setPositions.push(_self.showPositions[i]);
-        }
+        _self.showPositions.forEach(item => {
+          item.check = true;
+          _self.setPositions.push(item);
+        });
       } else {
-        for (var j = 0; j < _self.showPositions.length; j++) {
-          _self.showPositions[j].check = false;
-        }
+        _self.showPositions.forEach(item => {
+          item.check = false;
+        });
       }
-      //重新查询
-      _self.getInventoryInstance();
+      this.getInventoryInstance();
     },
-
-    setPosition2: function(index) {
-      var _self = this;
-      var positionBarCode = _self.setPositions[index].positionBarCode;
+    // 移除选中的货位
+    setPosition2(index) {
+      const _self = this;
+      const positionBarCode = _self.setPositions[index].positionBarCode;
       _self.setPositions.splice(index, 1);
-      if (_self.showPositions.length > 0) {
-        _self.showPositions.forEach(function(item) {
-          if (item.positionBarCode == positionBarCode) {
-            item.check = false;
-          }
-        });
-      }
-      //重新查询
-      _self.getInventoryInstance();
+      _self.showPositions.forEach(item => {
+        if (item.positionBarCode === positionBarCode) {
+          item.check = false;
+        }
+      });
+      this.getInventoryInstance();
     },
-
-    setPosition: function(index) {
-      var _self = this;
-      if (_self.showPositions[index].check == false) {
-        //选中加入
-        _self.showPositions[index].check = true;
-        _self.setPositions.push(_self.showPositions[index]);
+    // 设置货位选中状态
+    setPosition(index) {
+      const _self = this;
+      const position = _self.showPositions[index];
+      if (position.check === false) {
+        position.check = true;
+        _self.setPositions.push(position);
       } else {
-        //从选中的直接去掉
-        _self.showPositions[index].check = false;
-        var currentIndex = null;
-        for (var i = 0; i < _self.setPositions.length; i++) {
-          if (_self.showPositions[index].id == _self.setPositions[i].id) {
-            currentIndex = i;
-            break;
-          }
-        }
-        if (currentIndex != null) {
+        position.check = false;
+        const currentIndex = _self.setPositions.findIndex(
+          p => p.id === position.id,
+        );
+        if (currentIndex!== -1) {
           _self.setPositions.splice(currentIndex, 1);
         }
       }
-      //重新查询
-      _self.getInventoryInstance();
+      this.getInventoryInstance();
     },
-
-    /**
-			 * 判断货位是否还有上一页或者下一页
-			 */
-    judgmentPage: function() {
-      var _self = this;
-      //判断是否有上一页
-      if (_self.positionNowPage == 1) {
-        _self.hasLastPage = false;
-      } else {
-        _self.hasLastPage = true;
-      }
-
-      //判断是否有下一页
-      if (_self.positionNowPage < _self.positionTotalPages) {
-        _self.hasNextPage = true;
-      } else {
-        _self.hasNextPage = false;
-      }
+    // 判断货位是否还有上一页或者下一页
+    judgmentPage() {
+      const _self = this;
+      _self.hasLastPage = _self.positionNowPage > 1;
+      _self.hasNextPage = _self.positionNowPage < _self.positionTotalPages;
     },
-
-    /**
-			 * 查询可访问的分类
-			 */
-    getInventoryClass: function() {
-      var _self = this;
+    // 查询可访问的分类
+    getInventoryClass() {
+      const _self = this;
       $.ajax({
         url: Common.getApiURL('InventoryClassResource/findByTree'),
         type: 'get',
         dataType: 'json',
-        beforeSend: function(request) {
+        beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function(data) {
-          if(data.errorCode == 0) {
+        success: function (data) {
+          if (data.errorCode === 0) {
             _self.initInventoryClass(data.datas);
             _self.inventoryClasses = data.datas;
           }
         },
-        error: function(XMLHttpRequest, textStatus, errorThrown) {
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
     // 初始化分类数据
-    initInventoryClass: function(data) {
-      var _self = this;
-
+    initInventoryClass(data) {
+      const _self = this;
       function setOpen(node) {
         node.open = false;
         node.selected = false;
         node.isShowCheck = true;
         node.text = node.name + ',' + node.no;
-        if (node.childrenDatas != undefined && node.childrenDatas.length > 0) {
-          node.childrenDatas.forEach(function(item) {
+        if (node.childrenDatas && node.childrenDatas.length > 0) {
+          node.childrenDatas.forEach(item => {
             setOpen(item);
           });
         }
       }
       if (data) {
-        data.forEach(function(item) {
+        data.forEach(item => {
           setOpen(item);
         });
       }
     },
     // 分类改变事件
-    inventoryClassSelect: function(node) {
-      var _self = this;
-      node.selected = !node.selected;
-      var current = node.selected;
-
+    inventoryClassSelect(node) {
+      const _self = this;
+      node.selected =!node.selected;
+      const current = node.selected;
       function changeSelect(item) {
         item.selected = current;
-        if (item.childrenDatas != undefined && item.childrenDatas.length > 0) {
-          item.childrenDatas.forEach(function(item1) {
+        if (item.childrenDatas && item.childrenDatas.length > 0) {
+          item.childrenDatas.forEach(item1 => {
             changeSelect(item1);
           });
         }
       }
       changeSelect(node);
-      _self.getInventoryInstance();
+      this.getInventoryInstance();
     },
-
-    // 获取选择的分类ID
-    getSelectedInventoryClassIds: function() {
-      var _self = this;
-      var arr = [];
-
+    // 获取选择的分类 ID
+    getSelectedInventoryClassIds() {
+      const _self = this;
+      const arr = [];
       function getSelected(item) {
         if (!item.isClient && item.selected) {
           arr.push(item.id);
         }
-        if (item.childrenDatas != undefined && item.childrenDatas.length > 0) {
-          item.childrenDatas.forEach(function(item1) {
+        if (item.childrenDatas && item.childrenDatas.length > 0) {
+          item.childrenDatas.forEach(item1 => {
             getSelected(item1);
           });
         }
       }
-      _self.inventoryClasses.forEach(function(item) {
+      _self.inventoryClasses.forEach(item => {
         getSelected(item);
       });
       return arr;
     },
-
-    //上一页
-    previousPage: function() {
-      var _self = this;
-      _self.positionNowPage = _self.positionNowPage - 1;
+    // 上一页
+    previousPage() {
+      const _self = this;
+      _self.positionNowPage--;
       _self.queryPosition();
     },
-
-    //下一页
-    nextPage: function() {
-      var _self = this;
-      _self.positionNowPage = _self.positionNowPage + 1;
+    // 下一页
+    nextPage() {
+      const _self = this;
+      _self.positionNowPage++;
       _self.queryPosition();
     },
-
-    //分页查询货位
-    queryPosition: function() {
-      var _self = this;
-      var param = {
+    // 分页查询货位
+    queryPosition() {
+      const _self = this;
+      const param = {
         id: _self.warehouseId,
         condition: _self.positionCondition.trim(),
         range: {
-          start: (_self.positionNowPage - 1) * Common.pageSize,
-          length: Common.pageSize,
+          start: (_self.positionNowPage - 1) * this.pagination.pageSize,
+          length: this.pagination.pageSize,
         },
       };
       _self.showPositions = [];
+      _self.loading = true;
       $.ajax({
         url: Common.getApiURL('positionResource/findByWarehouseAndRange'),
         type: 'post',
         dataType: 'json',
         contentType: 'application/json',
         data: JSON.stringify(param),
-        beforeSend: function(request) {
+        beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function(data) {
-          if(data.errorCode == 0) {
-            if (data.datas != null && data.datas.length > 0) {
-              data.datas.forEach(function(item) {
-                var showPosition = {
+        success: function (data) {
+          if (data.errorCode === 0) {
+            if (data.datas && data.datas.length > 0) {
+              data.datas.forEach(item => {
+                const showPosition = {
                   id: item.positionId,
                   positionName: item.positionName,
                   positionNo: item.positionNo,
                   positionBarCode: item.positionBarCode,
+                  check: false,
                 };
-
-                var currentIndex = null;
-
-                if (_self.setPositions != null && _self.setPositions.length >
-                    0) {
-                  for (var i = 0; i < _self.setPositions.length; i++) {
-                    if (item.positionId == _self.setPositions[i].id) {
-                      currentIndex = i;
-                      break;
-                    }
-                  }
-                }
-                if (currentIndex == null) {
-                  showPosition.check = false;
-                } else {
+                const currentIndex = _self.setPositions.findIndex(
+                  p => p.id === item.positionId,
+                );
+                if (currentIndex!== -1) {
                   showPosition.check = true;
                 }
                 _self.showPositions.push(showPosition);
@@ -530,41 +397,35 @@ export default {
               data.total / data.length,
             );
             _self.judgmentPage();
-            _self.loading=false;
+            _self.loading = false;
           }
         },
-        error: function(XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.loading = false;
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
-      //重新查询
-      _self.getInventoryInstance();
+      this.getInventoryInstance();
     },
-
-    /**
-			 * 查询物料明细
-			 */
-    getInventoryInstance: function() {
-      var _self = this;
-
-      var inventoryClassIds = _self.getSelectedInventoryClassIds();
-      var positionIds = [];
-      if (_self.setPositions != null && _self.setPositions.length > 0) {
-        _self.setPositions.forEach(function(item) {
+    // 查询物料明细
+    getInventoryInstance() {
+      const _self = this;
+      const inventoryClassIds = _self.getSelectedInventoryClassIds();
+      const positionIds = [];
+      if (_self.setPositions && _self.setPositions.length > 0) {
+        _self.setPositions.forEach(item => {
           positionIds.push(item.id);
         });
       }
-      _self.loading=true;
-
-      var obj = {
-        inventoryClassIds: inventoryClassIds,
-        positionIds: positionIds,
+      _self.loading = true;
+      const obj = {
+        inventoryClassIds,
+        positionIds,
         isAll: _self.isAll,
         warehouseId: _self.warehouseId,
         range: {
-          start: (_self.pagination.current_page - 1) * _self.pagination.per_page,
-          length: _self.pagination.per_page,
+          start: (_self.pagination.current - 1) * _self.pagination.pageSize,
+          length: _self.pagination.pageSize,
         },
       };
       $.ajax({
@@ -575,304 +436,147 @@ export default {
         dataType: 'json',
         contentType: 'application/json',
         data: JSON.stringify(obj),
-        beforeSend: function(request) {
+        beforeSend: function (request) {
           Common.addTokenToRequest(request);
         },
-        success: function(data) {
-          if(data.errorCode == 0) {
-            console.log(data.datas);
+        success: function (data) {
+          if (data.errorCode === 0) {
             _self.inventoryInstances = data.datas;
             _self.pagination.total = data.total;
-            _self.pagination.last_page = Math.ceil(
-              data.total / data.length,
-            );
-            _self.fixedTableHeader();
-            _self.loading=false;
+            _self.loading = false;
           }
         },
-        error: function(XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.loading = false;
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
-
-    //生成盘点明细
-    generateCheckVouchs: function() {
-      var _self = this;
-
-      var inventoryClassIds = _self.getSelectedInventoryClassIds();
-      var positionIds = [];
-      if (_self.setPositions != null && _self.setPositions.length > 0) {
-        _self.setPositions.forEach(function(item) {
+    // 生成盘点明细
+    generateCheckVouchs() {
+      const _self = this;
+      const inventoryClassIds = _self.getSelectedInventoryClassIds();
+      const positionIds = [];
+      if (_self.setPositions && _self.setPositions.length > 0) {
+        _self.setPositions.forEach(item => {
           positionIds.push(item.id);
         });
       }
-      var information = '';
-      if (_self.isAll == true) {
+      let information = '';
+      if (_self.isAll === 'true') {
         information =
-						'您确定要将仓库:' + _self.warehouseName + '下的所有物料生成盘点明细';
+          `您确定要将仓库:${_self.warehouseName} 下的所有物料生成盘点明细`;
       } else {
         information = '您确定要根据选择的过滤条件生成对应的盘点明细';
       }
-      Notify.show({
+      Notify.confirm({
         title: '确认生成盘点明细',
-        message: information +
-						'吗?如果"是"的话,请点击"确定"按钮,否则点击"取消"按钮',
-        buttons: [{
-          label: '确定',
-          cssClass: 'btn-primary',
-          action: function(dialogItself) {
-            dialogItself.close();
-            _self.loading=true;
-
-            var obj = {
-              inventoryClassIds: inventoryClassIds,
-              positionIds: positionIds,
-              isAll: _self.isAll,
-              warehouseId: _self.warehouseId,
-              checkVouchId: _self.checkVouchId,
-              isCurrentStock: _self.isCurrentStock,
-            };
-            $.ajax({
-              url: Common.getApiURL(
-                'checkVouchsResource/generateCheckVouchsForSiemensProject',
-              ),
-              type: 'post',
-              dataType: 'json',
-              contentType: 'application/json',
-              data: JSON.stringify(obj),
-              beforeSend: function(request) {
-                Common.addTokenToRequest(request);
-              },
-              success: function(data) {
-                if(data.errorCode == 0) {
-                  Notify.success(
-                    '成功',
-                    '盘点明细生成成功,请返回查看。',
-                    4000,
-                  );
-                  _self.loading=false;
-                }
-              },
-              error: function(XMLHttpRequest, textStatus,
-                errorThrown) {
-                _self.loading=false;
-                Common.processException(
-                  XMLHttpRequest,
-                  textStatus,
-                  errorThrown,
+        content: `${information} 吗?如果"是"的话,请点击"确定"按钮,否则点击"取消"按钮`,
+        onOk() {
+          _self.loading = true;
+          const obj = {
+            inventoryClassIds,
+            positionIds,
+            isAll: _self.isAll,
+            warehouseId: _self.warehouseId,
+            checkVouchId: _self.checkVouchId,
+            isCurrentStock: _self.isCurrentStock,
+          };
+          $.ajax({
+            url: Common.getApiURL(
+              'checkVouchsResource/generateCheckVouchsForSiemensProject',
+            ),
+            type: 'post',
+            dataType: 'json',
+            contentType: 'application/json',
+            data: JSON.stringify(obj),
+            beforeSend: function (request) {
+              Common.addTokenToRequest(request);
+            },
+            success: function (data) {
+              if (data.errorCode === 0) {
+                Notify.success(
+                  '成功',
+                  '盘点明细生成成功,请返回查看。',
+                  4000,
                 );
-              },
-            });
-          },
-        },
-        {
-          label: '取消',
-          action: function(dialogItself) {
-            dialogItself.close();
-          },
+                _self.loading = false;
+              }
+            },
+            error: function (XMLHttpRequest, textStatus, errorThrown) {
+              _self.loading = false;
+              Common.processException(XMLHttpRequest, textStatus, errorThrown);
+            },
+          });
         },
-        ],
+        onCancel() {},
       });
     },
-
     // 清空
-    clear: function() {
-      this.isAll = true;
+    clear() {
+      this.isAll = 'true';
       this.type = 0;
       this.setPositions = [];
       this.positionNowPage = 1;
       this.positionCondition = '';
       this.queryPosition();
       this.initInventoryClass(this.inventoryClasses);
-      this.pagination.per_page = Common.pageSize;
-      this.pagination.current_page = 1;
+      this.pagination.pageSize = 10;
+      this.pagination.current = 1;
       this.getInventoryInstance();
       this.checked = false;
     },
-    /**
-			 * 修改页Size
-			 */
-    gridSizeSelect: function(newPageSize) {
-      this.pagination.per_page = newPageSize;
-      this.pagination.current_page = 1;
+    // 修改页 Size
+    gridSizeSelect(newPageSize) {
+      this.pagination.pageSize = newPageSize;
+      this.pagination.current = 1;
       this.getInventoryInstance();
     },
-    /**
-			 * 页数发生变化
-			 */
-    checkDataChangedQueryGridData: function() {
+    // 页数发生变化
+    checkDataChangedQueryGridData() {
       this.getInventoryInstance();
     },
-
-    //点击查看物料实例详情
-    openWindow: function(item) {
+    // 点击查看物料实例详情
+    openWindow(item) {
       window.open(
-        '#/desktop/window/window-read/view/050405/0/' +
-					item.id +
-					'?currPage=1&currIndex=1&totalCount=1&uuid=' +
-					Uuid.createUUID(),
+        `#/desktop/window/window-read/view/050405/0/${item.id}?currPage=1&currIndex=1&totalCount=1&uuid=${Uuid.createUUID()}`,
       );
     },
-
-    /**
-			 * 冻结表头
-			 */
-    fixedTableHeader: function() {
-      let _self = this;
-      _self.$nextTick(function() {
-        $('.fixed-table').tableFixer({
-          left: 3,
-          head: true,
-        });
-      });
-    },
-
   },
 };
 </script>
-<style scoped>
-	.grid-container {
-		margin-top: 10px;
-		display: grid;
-		grid-template-columns: 300px auto;
-		grid-template-rows: 35px 1fr 40px 40px;
-		gap: 10px;
-		justify-items: stretch;
-		align-items: stretch;
-		height: calc(100vh - 160px);
-		overflow: auto;
-	}
-
-	.grid-item-row1-column1 {
-		grid-row-start: 1;
-		grid-row-end: 2;
-		grid-column-start: 1;
-		grid-column-end: 2;
-	}
-
-	.grid-item-row2-column1 {
-		grid-row-start: 2;
-		grid-row-end: 4;
-		grid-column-start: 1;
-		grid-column-end: 2;
-		overflow: auto;
-	}
-
-	.grid-item-row3-column1 {
-		grid-row-start: 4;
-		grid-row-end: 5;
-		grid-column-start: 1;
-		grid-column-end: 2;
-		overflow: auto;
-	}
-
-	.grid-item-row2-column2 {
-		grid-row-start: 1;
-		grid-row-end: 4;
-		grid-column-start: 2;
-		grid-column-end: 3;
-		overflow: auto;
-	}
 
-	.grid-item-row3-column2 {
-		grid-row-start: 4;
-		grid-row-end: 5;
-		grid-column-start: 2;
-		grid-column-end: 3;
-	}
-
-	.grid-item-row4-column1 {
-		grid-row-start: 4;
-		grid-row-end: 5;
-		grid-column-start: 1;
-		grid-column-end: 2;
-	}
-
-	.m-tree {
-		border: 1px solid #ddd;
-		border-radius: 5px;
-		padding-left: 10px;
-	}
-
-	.m-panel {
-		margin-bottom: 8px;
-	}
-
-	.m-label {
-		font-size: 16px;
-		cursor: pointer;
-	}
-
-	.m-label i {
-		font-size: 16px;
-		font-style: normal;
-		display: inline-block;
-		width: 16px;
-		height: 16px;
-		text-align: center;
-		line-height: 16px;
-		color: #fff;
-		vertical-align: middle;
-		margin: -2px 2px 1px 0px;
-		border: #2489c5 1px solid;
-		border-radius: 3px;
-	}
-
-	.flex-container {
-		display: flex;
-		/* 垂直*/
-		flex-direction: column;
-		width: 100%;
-		/*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-		height: calc(100vh - 75px);
-	}
-
-	.flex-header {
-		/*放大缩小比例为0 */
-		height: 200px;
-		flex: 0 0 100px;
-	}
-
-	.flex-footer {
-		margin-top: 0.8em;
-		height: 40px;
-		flex: 0 0 40px;
-	}
-
-	.flex-content {
-		display: flex;
-		flex: 1;
-		overflow: auto;
-		padding-top: 10px;
-	}
-
-	.flex-aside {
-		flex: 0 0 400px;
-		padding-right: 5px;
-	}
-
-	.flex-main {
-		overflow: scroll;
-		flex: 1;
-		height: fit-content;
-	}
-
-	.fixed-table {
-		table-layout: fixed;
-		width: 800px !important;
-		min-width: 800px !important;
-	}
-
-	table.fixed-table tr {
-		height: 40px;
-	}
-
-	table.fixed-table th,
-	table.fixed-table td {
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-	}
-</style>
+<style scoped>
+.action-buttons {
+  margin-top: 20px;
+  display: flex;
+  gap: 10px;
+}
+
+.selected-positions {
+  margin-top: 20px;
+  display: flex;
+  flex-wrap: wrap;
+  gap: 5px;
+}
+
+.filter-section {
+  margin-top: 20px;
+}
+
+.category-panel,
+.position-panel {
+  margin-top: 20px;
+}
+
+.inventory-table {
+  margin-top: 20px;
+}
+
+.pagination-info {
+  margin-top: 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+</style>

+ 102 - 161
src/inout/CheckLoss.vue

@@ -1,194 +1,135 @@
 <template>
-  <div class="container-fluid">
+  <a-layout>
+    <!-- 导航栏 -->
     <Navbar :title="'盘亏数据处理'" :is-go-back="true" />
-
-    <div class="row">
-      <div class="btn-group">
-        <button type="button" class="btn btn-primary" @click="confirmSave">开始处理</button>
-      </div>
-    </div>
-
-    <div class="row">
-      <table class="table table-striped table-hover">
-        <thead>
-          <tr>
-            <th>序号</th>
-            <th>入库单号</th>
-            <th>批号</th>
-            <th>存货名称</th>
-            <th>规格型号</th>
-            <th>存货编号</th>
-            <th>货位名称</th>
-            <th>货位条码</th>
-            <th>账面数量</th>
-            <th>盘点数量</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr v-for="(checkVouchs, index) in checkVouchsDatas" :key="checkVouchs.id">
-            <td>{{ index + 1 }}</td>
-            <td>{{ checkVouchs.stockInDocumentNo }}</td>
-            <td>{{ checkVouchs.batchNo }}</td>
-            <td>{{ checkVouchs.invName }}</td>
-            <td>{{ checkVouchs.invType }}</td>
-            <td>{{ checkVouchs.invCode }}</td>
-            <td>{{ checkVouchs.positionName }}</td>
-            <td>{{ checkVouchs.positionBarCode }}</td>
-            <td>{{ checkVouchs.accountQuantity }}</td>
-            <td class="text-primary">{{ checkVouchs.checkQuantity }}</td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-
-    <!-- <div class="modal fade" tabindex="-1" id="modal">
-			<div class="modal-dialog">
-				<div class="modal-content">
-					<div class="modal-header">
-						<h4>提示</h4>
-					</div>
-					<div class="modal-body">
-						<h4>确认开始处理生成出库单?</h4>
-					</div>
-					<div class="modal-footer">
-						<button class="btn btn-primary" @click="save">是</button>
-						<button class="btn btn-danger" @click="cancel">否</button>
-					</div>
-				</div>
-			</div>
-		</div> -->
-
-    <Modal v-model:show="modal" :show-canel-button="false" :show-ok-button="false">
-      <template #header>
-        <h4>提示</h4>
-      </template>
-
-      <div>
-        <h4>确认开始处理生成出库单?</h4>
-      </div>
-
-
-      <template #footer>
-        <button class="btn btn-primary" @click="save">是</button>
-        <button class="btn btn-danger" @click="cancel">否</button>
-      </template>
-    </Modal>
-  </div>
+    <a-layout-content style="padding: 24px;">
+      <!-- 操作按钮 -->
+      <a-space>
+        <a-button type="primary" @click="confirmSave">开始处理</a-button>
+      </a-space>
+      <!-- 表格 -->
+      <a-table
+        :data-source="checkVouchsDatas"
+        :columns="columns"
+        :row-key="(record) => record.id"
+        :pagination="false"
+      />
+      <!-- 模态框 -->
+      <a-modal
+        v-model:visible="modal"
+        title="提示"
+        @ok="save"
+        @cancel="cancel"
+      >
+        <template #content>
+          <p>确认开始处理生成出库单?</p>
+        </template>
+      </a-modal>
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import { UserStorageResource } from 'pc-component-v3';
-
-
-
-
+import { message } from 'ant-design-vue';
 
 export default {
-  components: {
-    
-    
-  },
-  data: function () {
+  data() {
     return {
       checkVouchsDatas: [],
       checkVouchId: null,
-      visible: false,
       modal: false,
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '入库单号', dataIndex: 'stockInDocumentNo' },
+        { title: '批号', dataIndex: 'batchNo' },
+        { title: '存货名称', dataIndex: 'invName' },
+        { title: '规格型号', dataIndex: 'invType' },
+        { title: '存货编号', dataIndex: 'invCode' },
+        { title: '货位名称', dataIndex: 'positionName' },
+        { title: '货位条码', dataIndex: 'positionBarCode' },
+        { title: '账面数量', dataIndex: 'accountQuantity' },
+        { title: '盘点数量', dataIndex: 'checkQuantity' },
+      ],
     };
   },
-
-  mounted: function () {
-    var _self = this;
-    var uuid = this.$route.params.uuid;
-    UserStorageResource.uniqueByKey(uuid + '_modelData').then(str => {
-      // if(str.errorCode != 0) {
-      //   Notify.error('提示', str.errorMessage, false);
-      //   return;
-      // }
-      if (str.data != null) {
-        console.log(str.data);
-        var modelData = JSON.parse(str.data);
-        _self.checkVouchId = modelData.id;
-      }
-    }, errorData => {
-      Common.processException(errorData);
-    });
-    setTimeout(function () {
-      _self.queryCheckVouchses();
+  mounted() {
+    const uuid = this.$route.params.uuid;
+    UserStorageResource.uniqueByKey(uuid + '_modelData').then(
+      str => {
+        if (str.data) {
+          const modelData = JSON.parse(str.data);
+          this.checkVouchId = modelData.id;
+        }
+      },
+      errorData => {
+        Common.processException(errorData);
+      },
+    );
+    setTimeout(() => {
+      this.queryCheckVouchses();
     }, 2000);
-            
   },
-
   methods: {
-
-    //查询需要盘盈的数据
-    queryCheckVouchses: function () {
-      var _self = this;
-                
-      console.log(_self.checkVouchId);
-      $.ajax({
-        type: 'get',
-        dataType: 'json',
-        url: Common.getApiURL('checkVouchsResource/getCheckLossDatas'),
-        data: { 'checkVouchId': _self.checkVouchId },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
+    // 查询需要盘亏的数据
+    queryCheckVouchses() {
+      console.log(this.checkVouchId);
+      fetch(Common.getApiURL('checkVouchsResource/getCheckLossDatas'), {
+        method: 'GET',
+        headers: {
+          'Content-Type': 'application/json',
+          ...Common.getToken(),
         },
-        success: function (data) {
-          if(data.errorCode == 0) {
-            _self.checkVouchsDatas = data.datas;
+        body: JSON.stringify({ checkVouchId: this.checkVouchId }),
+      })
+        .then(response => response.json())
+        .then(data => {
+          if (data.errorCode === 0) {
+            this.checkVouchsDatas = data.datas;
           }
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-
+        })
+        .catch(error => {
+          Common.processException(error);
+        });
     },
-
-
-
-    //开始处理
-    confirmSave: function () {
+    // 开始处理
+    confirmSave() {
       this.modal = true;
     },
-
-    //取消处理
-    cancel: function () {
+    // 取消处理
+    cancel() {
       this.modal = false;
     },
-
-
-    //处理
-    save: function () {
-      var _self = this;
+    // 确认处理
+    save() {
       this.modal = false;
-      if (this.checkVouchsDatas.length == 0) {
-        Notify.notice('提示', '没有可处理的数据', false);
+      if (this.checkVouchsDatas.length === 0) {
+        message.warning('没有可处理的数据');
         return;
       }
-      $.ajax({
-        type: 'get',
-        dataType: 'json',
-        url: Common.getApiURL('checkVouchsResource/processCheckLossDatas'),
-        data: { 'checkVouchId': _self.checkVouchId },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
+      fetch(Common.getApiURL('checkVouchsResource/processCheckLossDatas'), {
+        method: 'GET',
+        headers: {
+          'Content-Type': 'application/json',
+          ...Common.getToken(),
         },
-        success: function (data) {
-          if(data.errorCode == 0) {
-            Notify.success('提示', '处理成功!', 1500);
-            // alert("保存成功!");
+        body: JSON.stringify({ checkVouchId: this.checkVouchId }),
+      })
+        .then(response => response.json())
+        .then(data => {
+          if (data.errorCode === 0) {
+            message.success('处理成功!');
           }
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
+        })
+        .catch(error => {
+          Common.processException(error);
+        });
     },
-
-
   },
 };
-</script>
+</script>
+
+<style scoped>
+/* 可以根据需要添加额外的样式 */
+</style>

+ 137 - 141
src/inout/CheckProfit.vue

@@ -1,188 +1,184 @@
 <template>
-  <div class="container-fluid">
+  <a-layout>
+    <!-- 导航栏 -->
     <Navbar :title="'盘盈数据处理'" :is-go-back="true" />
-
-
-    <div class="row">
-      <div class="btn-group">
-        <button type="button" class="btn btn-primary" @click="confirmSave">开始处理</button>
-      </div>
-    </div>
-
-    <div class="row">
-      <table class="table table-striped table-hover">
-        <thead>
-          <tr>
-            <th>序号</th>
-            <th>入库单号</th>
-            <th>批号</th>
-            <th>存货名称</th>
-            <th>规格型号</th>
-            <th>存货编号</th>
-            <th>货位名称</th>
-            <th>货位条码</th>
-            <th>账面数量</th>
-            <th>盘点数量</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr v-for="(checkVouchs, index) in checkVouchsDatas" :key="checkVouchs.id">
-            <td>{{ index + 1 }}</td>
-            <td>{{ checkVouchs.stockInDocumentNo }}</td>
-            <td>{{ checkVouchs.batchNo }}</td>
-            <td>{{ checkVouchs.invName }}</td>
-            <td>{{ checkVouchs.invType }}</td>
-            <td>{{ checkVouchs.invCode }}</td>
-            <td>{{ checkVouchs.positionName }}</td>
-            <td>{{ checkVouchs.positionBarCode }}</td>
-            <td>{{ checkVouchs.accountQuantity }}</td>
-            <td class="text-primary">{{ checkVouchs.checkQuantity }}</td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-
-    <!-- <div class="modal fade" tabindex="-1" id="modal">
-			<div class="modal-dialog">
-				<div class="modal-content">
-					<div class="modal-header">
-						<h4>提示</h4>
-					</div>
-					<div class="modal-body">
-						<h4>确认开始处理生成入库单?</h4>
-					</div>
-					<div class="modal-footer">
-						<button class="btn btn-primary" @click="save">是</button>
-						<button class="btn btn-danger" @click="cancel">否</button>
-					</div>
-				</div>
-			</div>
-		</div> -->
-
-    <Modal v-model:show="modal" :show-canel-button="false" :show-ok-button="false">
-      <template #header>
-        <h4>提示</h4>
-      </template>
-            
-      <div>
-        <h4>确认开始处理生成入库单?</h4>
-      </div>
-
-      <template #footer>
-        <button class="btn btn-primary" @click="save">是</button>
-        <button class="btn btn-danger" @click="cancel">否</button>
-      </template>
-    </Modal>
-  </div>
+    <a-layout-content class="content">
+      <!-- 操作按钮 -->
+      <a-space>
+        <a-button type="primary" @click="confirmSave">开始处理</a-button>
+      </a-space>
+      <!-- 表格 -->
+      <a-table
+        :data-source="checkVouchsDatas"
+        :columns="columns"
+        :row-key="record => record.id"
+        :pagination="false"
+      />
+      <!-- 模态框 -->
+      <a-modal
+        v-model:visible="modal"
+        title="提示"
+        @ok="save"
+        @cancel="cancel"
+      >
+        <template #content>
+          <h4>确认开始处理生成入库单?</h4>
+        </template>
+      </a-modal>
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import { UserStorageResource } from 'pc-component-v3';
-
-
-
-
+import { Notify } from 'ant-design-vue';
 
 export default {
-  components: {
-    
-    
-  },
-  data: function () {
+  data() {
     return {
       checkVouchsDatas: [],
       checkVouchId: '',
-      visible: false,
       modal: false,
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '入库单号', dataIndex: 'stockInDocumentNo' },
+        { title: '批号', dataIndex: 'batchNo' },
+        { title: '存货名称', dataIndex: 'invName' },
+        { title: '规格型号', dataIndex: 'invType' },
+        { title: '存货编号', dataIndex: 'invCode' },
+        { title: '货位名称', dataIndex: 'positionName' },
+        { title: '货位条码', dataIndex: 'positionBarCode' },
+        { title: '账面数量', dataIndex: 'accountQuantity' },
+        { title: '盘点数量', dataIndex: 'checkQuantity' },
+      ],
     };
   },
-
-  mounted: function () {
-    var _self = this;
-    var uuid = this.$route.params.uuid;
-    UserStorageResource.uniqueByKey(uuid + '_modelData').then(str => {
-      // if(str.errorCode != 0) {
-      //   Notify.error('提示', str.errorMessage, false);
-      //   return;
-      // }
-      if (str.data != null) {
-        console.log(str.data);
-        var modelData = JSON.parse(str.data);
-        _self.checkVouchId = modelData.id;
-      }
-    }, errorData => {
-      Common.processException(errorData);
-    });
-    setTimeout(function () {
-      _self.queryCheckVouchses();
+  mounted() {
+    const uuid = this.$route.params.uuid;
+    UserStorageResource.uniqueByKey(uuid + '_modelData').then(
+      str => {
+        if (str.data != null) {
+          console.log(str.data);
+          const modelData = JSON.parse(str.data);
+          this.checkVouchId = modelData.id;
+        }
+      },
+      errorData => {
+        Common.processException(errorData);
+      },
+    );
+    setTimeout(() => {
+      this.queryCheckVouchses();
     }, 2000);
-            
   },
-
   methods: {
-
-    //查询需要盘盈的数据
-    queryCheckVouchses: function () {
-      var _self = this;
-      console.log(_self.checkVouchId);
-      $.ajax({
+    // 查询需要盘盈的数据
+    queryCheckVouchses() {
+      console.log(this.checkVouchId);
+      const request = {
         type: 'get',
         dataType: 'json',
         url: Common.getApiURL('checkVouchsResource/getCheckProfitDatas'),
-        data: { 'checkVouchId': _self.checkVouchId },
-        beforeSend: function (request) {
+        data: { checkVouchId: this.checkVouchId },
+        beforeSend: request => {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          if(data.errorCode == 0) {
-            _self.checkVouchsDatas = data.datas;
+        success: data => {
+          if (data.errorCode === 0) {
+            this.checkVouchsDatas = data.datas;
           }
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: (XMLHttpRequest, textStatus, errorThrown) => {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      });
+      };
+      fetch(request.url, {
+        method: request.type,
+        headers: {
+          'Content-Type': 'application/json',
+          ...Common.getToken(), 
+        },
+        body: JSON.stringify(request.data),
+      })
+        .then(response => response.json())
+        .then(data => {
+          if (request.success) {
+            request.success(data);
+          }
+        })
+        .catch(error => {
+          if (request.error) {
+            request.error(null, null, error);
+          }
+        });
     },
-
-    //开始处理
-    confirmSave: function () {
+    // 开始处理
+    confirmSave() {
       this.modal = true;
     },
-
-    //取消处理
-    cancel: function () {
+    // 取消处理
+    cancel() {
       this.modal = false;
     },
-
-    //确认处理
-    save: function () {
-      var _self = this;
+    // 确认处理
+    save() {
       this.modal = false;
-      if (this.checkVouchsDatas.length == 0) {
-        Notify.notice('提示', '没有可处理的数据', false);
+      if (this.checkVouchsDatas.length === 0) {
+        Notify.notice({
+          message: '提示',
+          description: '没有可处理的数据',
+          duration: 0,
+        });
         return;
       }
-      $.ajax({
+      const request = {
         type: 'get',
         dataType: 'json',
         url: Common.getApiURL('checkVouchsResource/processCheckProfitDatas'),
-        data: { 'checkVouchId': _self.checkVouchId },
-        beforeSend: function (request) {
+        data: { checkVouchId: this.checkVouchId },
+        beforeSend: request => {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          if(data.errorCode == 0) {
-            Notify.success('提示', '处理成功!', 1500);
+        success: data => {
+          if (data.errorCode === 0) {
+            Notify.success({
+              message: '提示',
+              description: '处理成功!',
+              duration: 1.5,
+            });
           }
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: (XMLHttpRequest, textStatus, errorThrown) => {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
-      });
+      };
+      fetch(request.url, {
+        method: request.type,
+        headers: {
+          'Content-Type': 'application/json',
+          ...Common.getToken(),
+        },
+        body: JSON.stringify(request.data),
+      })
+        .then(response => response.json())
+        .then(data => {
+          if (request.success) {
+            request.success(data);
+          }
+        })
+        .catch(error => {
+          if (request.error) {
+            request.error(null, null, error);
+          }
+        });
     },
-
-
   },
 };
-</script>
+</script>
+
+<style scoped>
+.content {
+  padding: 24px;
+}
+</style>

+ 109 - 250
src/inout/PurchaseOrderLineTraceEdit.vue

@@ -1,293 +1,152 @@
-
 <template>
-  <div class="container-fluid">
-    <div class="row">
-      <div class="col-md-12">
-        <h2>物料采购订单跟踪</h2>
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-md-12 col-sm-12 col-xs-12">
-        <input
-          v-model="purchaseOrderLineQueryParam.condition"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          placeholder="请输入关键字,包括工作令、存货名称、存货编码、规格型号"
-        />
-      </div>
-    </div>
-    <div v-if="purchaseOrderLineQueryParam.advancedQuery" class="row">
-      <div class="col-md-2 col-sm-2 col-xs-4">
-        <label class="form-label">下单时间</label>
-      </div>
-
-      <div class="col-md-5 col-sm-5 col-xs-4">
-        <input
-          id="startDateInput"
-          v-model="startTime"
-          autocomplete="off"
-          type="date"
-          class="form-control"
-        />
-      </div>
-
-      <div class="col-md-5 col-sm-5 col-xs-4">
-        <input
-          id="endDateInput"
-          v-model="endTime"
-          autocomplete="off"
-          type="date"
-          class="form-control"
-        />
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-md-2 col-sm-2 col-xs-4">
-        <label class="form-label">采购订单编号</label>
-      </div>
-      <div class="col-md-10 col-sm-10 col-xs-8">
-        <input
-          v-model="purchaseOrderLineQueryParam.documentNo"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          placeholder="输入采购订单编号"
-        />
-      </div>
-    </div>
-    <div class="row">
-      <div class="col-md-12 col-sm-12 col-xs-10">
-        <button
-          role="button"
-          target="_self"
-          class="btn btn-primary"
-          @click="searchPurchaseOrderLine()"
-        >
-          搜索
-        </button>
-        <a
-          class="form-label"
-          @click="
-            purchaseOrderLineQueryParam.advancedQuery =
-              !purchaseOrderLineQueryParam.advancedQuery
-          "
-        >{{
-          purchaseOrderLineQueryParam.advancedQuery
-            ? "关闭高级搜索"
-            : "高级搜索"
-        }}</a>
-        <a id="clearSearchCondition" @click="clean()">清空搜索条件</a>
-        <span id="choiceStatus">
-          <button class="btn btn-info active" @click="chooseStatus(0)">
-            全部
-          </button>
-          <button class="btn btn-default" @click="chooseStatus(1)">
-            已到货
-          </button>
-          <button class="btn btn-default" @click="chooseStatus(2)">
-            未到货
-          </button>
-        </span>
-      </div>
-    </div>
-    <div class="row">
-      <div class="table-responsive">
-        <table class="table table-bordered table-hover">
-          <thead>
-            <tr id="table-head">
-              <th>序号</th>
-              <th>存货编码</th>
-              <th>存货名称</th>
-              <th>规格型号</th>
-              <th>工作令</th>
-              <th>所属部件</th>
-              <th>主关件</th>
-              <th>加急件</th>
-              <th>计划到货日期</th>
-              <th>订单数量</th>
-              <th>已到货数量</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr v-for="(item, index) in purchaseOrderLines" :key="item.id">
-              <td>
-                {{
-                  (pagination.current_page - 1) * pagination.per_page +
-                    index +
-                    1
-                }}
-              </td>
-              <td>{{ item.invCode }}</td>
-              <td>{{ item.invName }}</td>
-              <td>{{ item.invType }}</td>
-              <td>{{ item.projectInvName }}</td>
-              <td>{{ item.componentInvName }}</td>
-              <td>
-                <input v-model="item.importantComponent" autocomplete="off" type="checkbox" />
-              </td>
-              <td>
-                <input v-model="item.urgentComponent" autocomplete="off" type="checkbox" />
-              </td>
-              <td>{{ item.estimateArrivalDate }}</td>
-              <td>{{ item.quantity }}</td>
-              <td>{{ item.receivedQuatity }}</td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-    </div>
-    <VueBootstrapPagination :pagination="pagination" :callback="searchPurchaseOrderLine" />
-  </div>
+  <a-layout>
+    <a-page-header title="物料采购订单跟踪" />
+    <a-layout-content style="padding: 24px;">
+      <a-form layout="inline" :model="purchaseOrderLineQueryParam">
+        <a-form-item label="关键字">
+          <a-input v-model:value="purchaseOrderLineQueryParam.condition" placeholder="请输入关键字,包括工作令、存货名称、存货编码、规格型号" />
+        </a-form-item>
+        <a-form-item v-if="purchaseOrderLineQueryParam.advancedQuery" label="下单时间">
+          <a-date-picker v-model:value="startTime" format="YYYY-MM-DD" />
+          <a-date-picker v-model:value="endTime" format="YYYY-MM-DD" />
+        </a-form-item>
+        <a-form-item label="采购订单编号">
+          <a-input v-model:value="purchaseOrderLineQueryParam.documentNo" placeholder="输入采购订单编号" />
+        </a-form-item>
+        <a-space>
+          <a-button type="primary" @click="searchPurchaseOrderLine">搜索</a-button>
+          <a-button @click="purchaseOrderLineQueryParam.advancedQuery =!purchaseOrderLineQueryParam.advancedQuery">
+            {{ purchaseOrderLineQueryParam.advancedQuery ? '关闭高级搜索' : '高级搜索' }}
+          </a-button>
+          <a-button @click="clean">清空搜索条件</a-button>
+          <a-button-group>
+            <a-button :class="{ 'ant-btn-primary': status === 0 }" @click="chooseStatus(0)">全部</a-button>
+            <a-button :class="{ 'ant-btn-primary': status === 1 }" @click="chooseStatus(1)">已到货</a-button>
+            <a-button :class="{ 'ant-btn-primary': status === 2 }" @click="chooseStatus(2)">未到货</a-button>
+          </a-button-group>
+        </a-space>
+      </a-form>
+      <a-table
+        :data-source="purchaseOrderLines"
+        :columns="columns"
+        :row-key="record => record.id"
+        :pagination="pagination"
+        @change="handleTableChange"
+      />
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 
-
 export default {
-  components: {
-    
-    
-  },
-  data: function () {
+  data() {
     return {
-      purchaseOrderLineQueryParam: '',
-      defaultStartTime: '',
-      defaultEndTime: '',
+      purchaseOrderLineQueryParam: {
+        condition: '',
+        orderStartTime: null,
+        orderEndTime: null,
+        documentNo: '',
+        advancedQuery: false,
+        status: 0,
+        range: {
+          start: 0,
+          length: 20,
+        },
+      },
+      defaultStartTime: new Date(),
+      defaultEndTime: new Date(),
       startTime: '',
       endTime: '',
       status: 0,
       pagination: {
+        current: 1,
+        pageSize: Common.pageSize,
         total: 0,
-        per_page: Common.pageSize, // required
-        current_page: 1, // required
-        last_page: 0, // required
       },
       purchaseOrderLines: [],
-      range: {
-        start: 0,
-        length: 20,
-      },
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '存货编码', dataIndex: 'invCode' },
+        { title: '存货名称', dataIndex: 'invName' },
+        { title: '规格型号', dataIndex: 'invType' },
+        { title: '工作令', dataIndex: 'projectInvName' },
+        { title: '所属部件', dataIndex: 'componentInvName' },
+        { title: '主关件', dataIndex: 'importantComponent' },
+        { title: '加急件', dataIndex: 'urgentComponent' },
+        { title: '计划到货日期', dataIndex: 'estimateArrivalDate' },
+        { title: '订单数量', dataIndex: 'quantity' },
+        { title: '已到货数量', dataIndex: 'receivedQuatity' },
+      ],
     };
   },
-  mounted: function () {
+  mounted() {
     this.init();
   },
   methods: {
-    init: function () {
-      var _self = this;
-      _self.defaultStartTime = new Date();
-      _self.defaultStartTime.setFullYear(2000);
-      _self.defaultEndTime = new Date();
-      // _self.defaultEndTime.setFullYear(2000);
-      _self.purchaseOrderLineQueryParam = {
-        condition: '',
-        orderStartTime: _self.defaultStartTime,
-        orderEndTime: _self.defaultEndTime,
-        documentNo: '',
-        advancedQuery: false,
-        status: _self.status,
-        range: {
-          start: 0,
-          length: 20,
-        },
-      };
-
-      console.log(_self.purchaseOrderLineQueryParam);
-      $('#choiceStatus :button').click(function () {
-        $('#choiceStatus :button').removeClass('active');
-        $('#choiceStatus :button').removeClass('btn-info');
-        $('#choiceStatus :button').addClass('btn-default');
-        $(this).addClass('active');
-        $(this).addClass('btn-info');
-      });
-      // _self.searchPurchaseOrderLine();
+    init() {
+      this.defaultStartTime.setFullYear(2000);
+      this.purchaseOrderLineQueryParam.orderStartTime = this.defaultStartTime;
+      this.purchaseOrderLineQueryParam.orderEndTime = this.defaultEndTime;
     },
-    searchPurchaseOrderLine: function () {
-      var _self = this;
-      _self.purchaseOrderLines.splice(0, _self.purchaseOrderLines.length);
-      _self.purchaseOrderLineQueryParam.orderStartTime = _self.defaultStartTime;
-      _self.purchaseOrderLineQueryParam.orderEndTime = _self.defaultEndTime;
-      _self.purchaseOrderLineQueryParam.range.start =
-        (_self.pagination.current_page - 1) * _self.pagination.per_page;
-      _self.purchaseOrderLineQueryParam.range.length =
-        _self.pagination.per_page;
-      if (_self.purchaseOrderLineQueryParam.advancedQuery) {
-        var startArr = _self.startTime.split('-');
-        var endArr = _self.endTime.split('-');
-        if (startArr.length >= 3) {
-          _self.purchaseOrderLineQueryParam.orderStartTime.setFullYear(
-            startArr[0],
-          );
-          _self.purchaseOrderLineQueryParam.orderStartTime.setMonth(
-            startArr[1] - 1,
-          );
-          _self.purchaseOrderLineQueryParam.orderStartTime.setDate(startArr[2]);
-          // console.log(_self.purchaseOrderLineQueryParam.orderStartTime);
+    searchPurchaseOrderLine() {
+      this.purchaseOrderLines = [];
+      this.purchaseOrderLineQueryParam.orderStartTime = this.defaultStartTime;
+      this.purchaseOrderLineQueryParam.orderEndTime = this.defaultEndTime;
+      this.purchaseOrderLineQueryParam.range.start = (this.pagination.current - 1) * this.pagination.pageSize;
+      this.purchaseOrderLineQueryParam.range.length = this.pagination.pageSize;
+
+      if (this.purchaseOrderLineQueryParam.advancedQuery) {
+        if (this.startTime) {
+          this.purchaseOrderLineQueryParam.orderStartTime = this.startTime;
         }
-        if (endArr.length >= 3) {
-          _self.purchaseOrderLineQueryParam.orderEndTime.setFullYear(endArr[0]);
-          _self.purchaseOrderLineQueryParam.orderEndTime.setMonth(
-            endArr[1] - 1,
-          );
-          _self.purchaseOrderLineQueryParam.orderEndTime.setDate(endArr[2]);
+        if (this.endTime) {
+          this.purchaseOrderLineQueryParam.orderEndTime = this.endTime;
         }
       }
-      console.log(JSON.stringify(_self.purchaseOrderLineQueryParam));
       $.ajax({
         url: Common.getApiURL('PurchaseOrderLineResource/queryByParams'),
         type: 'post',
         dataType: 'json',
         contentType: 'application/json',
-        beforeSend: function (request) {
+        beforeSend: request => {
           Common.addTokenToRequest(request);
         },
-        data: JSON.stringify(_self.purchaseOrderLineQueryParam),
-        success: function (data) {
-          _self.range = data.range;
-          console.log(data);
-          if (data.purchaseOrderLineTraceEditDtos != null) {
-            _self.purchaseOrderLines = data.purchaseOrderLineTraceEditDtos;
-          }
-          _self.pagination.total = data.totalCount;
-          _self.pagination.last_page =
-            data.totalCount % data.range.length == 0
-              ? data.totalCount / data.range.length
-              : Math.floor(data.totalCount / data.range.length) + 1;
-
-          console.log(JSON.stringify(data));
+        data: JSON.stringify(this.purchaseOrderLineQueryParam),
+        success: data => {
+          this.purchaseOrderLines = data.purchaseOrderLineTraceEditDtos;
+          this.pagination.total = data.totalCount;
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: (XMLHttpRequest, textStatus, errorThrown) => {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
-    clean: function () {
-      var _self = this;
-      _self.purchaseOrderLineQueryParam.condition = '';
-      _self.startTime = '';
-      _self.endTime = '';
-      _self.purchaseOrderLineQueryParam.documentNo = '';
-      _self.defaultStartTime = new Date();
-      _self.defaultStartTime.setFullYear(2000);
-      _self.defaultEndTime = new Date();
-      console.log(_self.startTime);
+    clean() {
+      this.purchaseOrderLineQueryParam.condition = '';
+      this.startTime = '';
+      this.endTime = '';
+      this.purchaseOrderLineQueryParam.documentNo = '';
+      this.defaultStartTime = new Date();
+      this.defaultStartTime.setFullYear(2000);
+      this.defaultEndTime = new Date();
+    },
+    chooseStatus(status) {
+      this.status = status;
+      this.purchaseOrderLineQueryParam.status = status;
+      this.pagination.current = 1;
+      this.searchPurchaseOrderLine();
     },
-    chooseStatus: function (status) {
-      var _self = this;
-      _self.status = status;
-      _self.purchaseOrderLineQueryParam.status = status;
-      _self.pagination.current_page = 1;
-      // _self.range.length = Common.pageSize;
-      _self.searchPurchaseOrderLine();
+    handleTableChange(pagination) {
+      this.pagination.current = pagination.current;
+      this.pagination.pageSize = pagination.pageSize;
+      this.searchPurchaseOrderLine();
     },
   },
 };
 </script>
 
-<style>
-#table-head th {
-  text-align: center;
-}
+<style scoped>
+/* 可根据需要添加自定义样式 */
 </style>

+ 35 - 59
src/inout/StockInLineInstance.vue

@@ -1,68 +1,44 @@
 <template>
-  <div v-if="redDocument != undefined" class="container-fluid">
-    <stockInLineInstanceBlue v-if="!redDocument" :stock-in-id="stockInId" />
-    <stockInLineInstanceRed v-if="redDocument" :stock-in-id="stockInId" />
-  </div>
+  <a-layout>
+    <a-layout-content style="padding: 24px;">
+      <a-page-header title="入库单指定存货实例" />
+      <a-table
+        :data-source="inventoryList"
+        :columns="columns"
+        :row-key="(record) => record.id || record.name"
+      >
+        <template #bodyCell="{ column, record, index }">
+          <template v-if="column.dataIndex === 'index'">
+            {{ index + 1 }}
+          </template>
+          <template v-else>
+            {{ record[column.dataIndex] }}
+          </template>
+        </template>
+      </a-table>
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
-import stockInLineInstanceBlue from './StockInLineInstanceBlue.vue';
-import stockInLineInstanceRed from './StockInLineInstanceRed.vue';
-import Common from '../common/Common.js';
-import { UserStorageResource } from 'pc-component-v3';
-
-
 export default {
-  components: {
-    stockInLineInstanceBlue,
-    stockInLineInstanceRed,
-  },
-  data: function () {
+  data() {
     return {
-      redDocument: undefined,
-      stockInId: undefined,
+      inventoryList: [
+        { name: '存货1', quantity: 10 },
+        { name: '存货2', quantity: 20 },
+        { name: '存货3', quantity: 30 },
+      ],
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '存货名称', dataIndex: 'name' },
+        { title: '数量', dataIndex: 'quantity' },
+      ],
     };
   },
-
-  mounted: function () {
-    var uuid = this.$route.params.uuid;
-    UserStorageResource.uniqueByKey(uuid + '_modelData').then(
-      str => {
-        // if(str.errorCode != 0) {
-        //   Notify.error('提示', str.errorMessage, false);
-        //   return;
-        // }
-        if (str.data != null) {
-          console.log(str.data);
-          var modelData = JSON.parse(str.data);
-          this.stockInId = modelData.id;
-          this.getDocumentType();
-        }
-      },
-      errorData => {
-        Common.processException(errorData);
-      },
-    );
-  },
-  methods: {
-    getDocumentType: function () {
-      var _self = this;
-      $.ajax({
-        type: 'get',
-        url: Common.getApiURL(
-          'stockInResource/uniqueIsRedByStockInId?stockInId=' + _self.stockInId,
-        ),
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.redDocument = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-  },
 };
-</script>
+</script>
+
+<style scoped>
+/* 可以根据需要添加额外的样式 */
+</style>

+ 35 - 60
src/inout/StockOutLineInstance.vue

@@ -1,69 +1,44 @@
 <template>
-  <div v-if="redDocument != undefined" class="container-fluid">
-    <stockOutLineInstanceBlue v-if="!redDocument" :stock-out-id="stockOutId" />
-    <stockOutLineInstanceRed v-if="redDocument" :stock-out-id="stockOutId" />
-  </div>
+  <a-layout>
+    <a-layout-content style="padding: 24px;">
+      <a-page-header title="出库单指定存货实例" />
+      <a-table
+        :data-source="inventoryList"
+        :columns="columns"
+        :row-key="(record) => record.id || record.name"
+      >
+        <template #bodyCell="{ column, record, index }">
+          <template v-if="column.dataIndex === 'index'">
+            {{ index + 1 }}
+          </template>
+          <template v-else>
+            {{ record[column.dataIndex] }}
+          </template>
+        </template>
+      </a-table>
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
-import stockOutLineInstanceBlue from './StockOutLineInstanceBlue.vue';
-import stockOutLineInstanceRed from './StockOutLineInstanceRed.vue';
-import Common from '../common/Common.js';
-import { UserStorageResource } from 'pc-component-v3';
-
-
 export default {
-  components: {
-    stockOutLineInstanceBlue,
-    stockOutLineInstanceRed,
-  },
-  data: function () {
+  data() {
     return {
-      redDocument: undefined,
-      stockOutId: undefined,
+      inventoryList: [
+        { name: '存货1', quantity: 10 },
+        { name: '存货2', quantity: 20 },
+        { name: '存货3', quantity: 30 },
+      ],
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '存货名称', dataIndex: 'name' },
+        { title: '数量', dataIndex: 'quantity' },
+      ],
     };
   },
-
-  mounted: function () {
-    var uuid = this.$route.params.uuid;
-    UserStorageResource.uniqueByKey(uuid + '_modelData').then(
-      str => {
-        // if(str.errorCode != 0) {
-        //   Notify.error('提示', str.errorMessage, false);
-        //   return;
-        // }
-        if (str.data != null) {
-          console.log(str.data);
-          var modelData = JSON.parse(str.data);
-          this.stockOutId = modelData.id;
-          this.getDocumentType();
-        }
-      },
-      errorData => {
-        Common.processException(errorData);
-      },
-    );
-  },
-  methods: {
-    getDocumentType: function () {
-      var _self = this;
-      $.ajax({
-        type: 'get',
-        url: Common.getApiURL(
-          'StockOutResource/uniqueIsRedDocByStockOutId?stockOutId=' +
-            _self.stockOutId,
-        ),
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.redDocument = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-  },
 };
-</script>
+</script>
+
+<style scoped>
+/* 可以根据需要添加额外的样式 */
+</style>

+ 257 - 1182
src/pick/StockOutPrepareLine1.vue

@@ -1,1265 +1,340 @@
 <template>
-  <a-layout>
-    <a-layout-header class="header">
-      <a-form layout="inline" class="form-container">
-        <a-form-item label="采购订单号">
-          <a-select
-            v-model:value="documentNo"
-            placeholder="输入采购订单号"
-            show-search
-            option-filter-prop="children"
-          />
-        </a-form-item>
-
-        <a-form-item label="存货名称">
-          <a-input v-model:value="inventoryName" placeholder="输入存货档案名称" />
-        </a-form-item>
+  <a-layout class="container">
+    <h1 class="page-header" style="margin-top: 10px; margin-bottom: 0px;">
+      <AuthImage
+        :auth-src="Common.getThumbnailImageSrc(inventoryClassName, showInventory.imageName)" class="image img-thumbnail"
+        style="width: 78px; height: 78px;" @click="$refs.imagePreview.preview(inventoryClassName, showInventory.imageName)"
+      />
 
-        <a-form-item label="规格型号">
-          <a-input v-model:value="inventoryType" placeholder="输入规格型号" />
-        </a-form-item>
+      物料详细信息
+    </h1>
+    <a-card :bordered="false" class="form-card">
+      <a-row :gutter="16" class="asset-detail">
+        <a-col :span="6">
+          <strong>存货编号:{{ showInventory.no }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>存货名称:{{ showInventory.name }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>所属公司:{{ showInventory.client }}</strong>
+        </a-col>
+        <a-col :span="6">
+          <strong>规格型号:{{ showInventory.type }}</strong>
+        </a-col>
+      </a-row>
 
-        <a-form-item label="打印范围">
-          <a-select
-            v-model:value="selectedNum"
-            @change="refreshPurchaseOrderLineTable"
-          >
-            <a-select-option value="0">全部</a-select-option>
-            <a-select-option value="1">未打印</a-select-option>
-            <a-select-option value="2">已打印</a-select-option>
-          </a-select>
-        </a-form-item>
+      <a-tabs v-model:activeKey="activeContent" class="data-tabs">
+        <a-tab-pane key="1" tab="出入库流水">
+          <InAndOutFlow ref="inAndOutFlow" :display-data="dataId" />
+          <a-list item-layout="horizontal" :data-source="historyEvents2">
+            <template #renderItem="{ item }">
+              <a-list-item>
+                <template #actions>
+                  <a-image
+                    :src="getHistoryIconSrc(item.title)"
+                    width="45px"
+                    @click="showImage(item.image)"
+                  />
+                </template>
+                <a-list-item-meta
+                  :title="item.title"
+                  :description="item.content"
+                >
+                  <template #description>
+                    <p class="event-time">时间: {{ item.eventDate }}</p>
+                    {{ item.content }}
+                  </template>
+                </a-list-item-meta>
+              </a-list-item>
+            </template>
+          </a-list>
+        </a-tab-pane>
 
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="refreshPurchaseOrderLineTable">
-              查询
-            </a-button>
-            <a-button type="primary" @click="showNeedPrint">
-              打印
-              <a-badge :count="notPrintCount" />
-            </a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
-    </a-layout-header>
+        <a-tab-pane key="2" tab="库存情况">
+          <a-table
+            :data-source="stockInfos"
+            :columns="stockColumns"
+            row-key="id"
+            size="small"
+          />
+        </a-tab-pane>
 
-    <a-layout-content class="content">
-      <a-table
-        :columns="columns"
-        :data-source="purchaseOrderLines"
-        :scroll="{ x: 1200 }"
-        row-key="id"
-      >
-        <template #bodyCell="{ column, record, index }">
-          <template v-if="column.dataIndex === 'index'">{{ index + 1 }}</template>
-          <template v-if="column.dataIndex === 'operation'">
-            <a-button type="link" @click="refreshPackModal(record.id)">包装</a-button>
-          </template>
-        </template>
-      </a-table>
+        <a-tab-pane key="3" tab="库位信息">
+          <a-table
+            :data-source="positionInfos"
+            :columns="positionColumns"
+            :pagination="pagination2"
+            row-key="id"
+            size="small"
+          />
+        </a-tab-pane>
+      </a-tabs>
+    </a-card>
 
-      <!-- 分页组件 -->
-      <a-pagination
-        v-model:current="pagination.current_page"
-        :total="pagination.total"
-        :page-size="pagination.per_page"
-        class="pagination-wrapper"
-        show-less-items
-      />
-    </a-layout-content>
+    <a-modal v-model:open="modal" title="历史图片" :footer="null">
+      <a-image :src="imageUrl" />
+    </a-modal>
+    
+    <Loading v-if="loading" />
+    <ImagePreview ref="imagePreview" />
   </a-layout>
-
-  <!-- 包装模态框 -->
-  <div id="pack-modal" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:1000px;">
-      <div class="modal-content">
-        <div class="modal-header">
-          <button type="button" class="close" data-dismiss="modal">
-            <span aria-hidden="true">&times;</span>
-            <span class="sr-only">Close</span>
-          </button>
-          <h4 class="modal-title">包装</h4>
-        </div>
-        <div id="modal-body" class="modal-body" style="color:#676767;">
-          <div class="container-fluid">
-            <div class="row header-row">
-              <div class="col-md-2">
-                <div class="form-control-label">存货档案名称</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="packData.inventoryName" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-              <div class="col-md-2">
-                <div class="form-control-label">存货档案编号</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="packData.inventoryCode" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-            </div>
-            <div class="row header-row">
-              <div class="col-md-2">
-                <div class="form-control-label">订单数量</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="packData.quantity" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-              <div class="col-md-2">
-                <div class="form-control-label">工作令</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="packData.projectInventoryName" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-            </div>
-            <div class="row header-row">
-              <div class="col-md-2">
-                <div class="form-control-label">预算分类项</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="packData.componentInventoryName" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-              <div class="col-md-2">
-                <div class="form-control-label">已打印包装件数</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="purchaseOrderLinePrint.printedInventoryInstanceCount" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-            </div>
-            <div class="row header-row">
-              <div class="col-md-2">
-                <div class="form-control-label">已打印物料总数</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="purchaseOrderLinePrint.printedInventoryInstanceQuantity" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-              <div class="col-md-2">
-                <div class="form-control-label">未打印包装件数</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceCount" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-            </div>
-            <div class="row header-row">
-              <div class="col-md-2">
-                <div class="form-control-label">未打印物料总数</div>
-              </div>
-              <div class="col-md-4">
-                <input v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceQuantity" autocomplete="off" class="form-control" disabled type="text" />
-              </div>
-            </div>
-            <div class="row header-row">
-              <div class="col-md-6 col-md-offset-5">
-                <div class="col-md-3">
-                  <button type="button" class="btn btn-info btn-sm" @click="showOnePackModal">添加一个包装</button>
-                </div>
-                <div class="col-md-3">
-                  <button type="button" class="btn btn-info btn-sm" @click="showMorePackModal">添加多个包装</button>
-                </div>
-                <div class="col-md-4">
-                  <!-- eslint-disable-next-line -->
-                    <select v-model="buttonText" class="selectpicker form-control" data-style="btn-info" style="width:110%; padding-left:1px; margin: 0px 10px" @change="packModalPrintStatus">
-                    <option value="0">显示全部</option>
-                    <option value="1">显示未打印</option>
-                  </select>
-                </div>
-                <div class="col-md-3">
-                  <button type="button" class="btn btn-primary btn-sm" style="position: absolute;top: -33px;left: 400px;" @click="printNotPrintedContent">
-                    打印未打印的内容
-                    <span class="badge">{{ notPrintCount }}</span>
-                  </button>
-                </div>
-              </div>
-            </div>
-          </div> 
-          <div class="row">
-            <div class="col-sm-12">
-              <div id="myTabContent" class="tab-content">
-                <table id="table-width" class="myTable" style="color: #ccc;">
-                  <thead>
-                    <tr>
-                      <th>序号</th>
-                      <th>包装创建时间</th>
-                      <th>包装内物料数量</th>
-                      <th>打印次数</th>
-                      <th>打印状态</th>
-                      <th>打印</th>
-                      <th>删除</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    <template v-if="buttonText == 0">
-                      <tr v-for="(item,index) in inventoryInstances" :key="item.id">
-                        <td>{{ index + 1 }}</td>
-                        <td>{{ item.createDate }}</td>
-                        <td style="cursor: pointer;text-decoration: underline;" @click="changeQty(item.id,item.quantity)">{{ item.quantity }}</td>
-                        <td>{{ item.printCount }}</td>
-                        <td v-if="item.printStatus == 0">未打印</td>
-                        <td v-else-if="item.printStatus == 1">待打印</td>
-                        <td v-else>已打印</td>
-                        <td>
-                          <button type="button" class="btn btn-success btn-sm" @click="printPack(item.id)">打印</button>
-                        </td>
-                        <td>
-                          <button type="button" class="btn btn-danger btn-sm" @click="deletePack(item.id)">删除</button>
-                        </td>
-                      </tr>
-                    </template>
-                    <template v-if="buttonText == 1 && item.printStatus == 0">
-                      <tr v-for="(item,index) in inventoryInstances" :key="item.id">
-                        <td>{{ index + 1 }}</td>
-                        <td>{{ item.createDate }}</td>
-                        <td style="cursor: pointer;text-decoration: underline;" @click="changeQty(item.id,item.quantity)">{{ item.quantity }}</td>
-                        <td>{{ item.printCount }}</td>
-                        <td>未打印</td>
-                        <td>
-                          <button type="button" class="btn btn-success btn-sm" @click="printPack(item.id)">打印</button>
-                        </td>
-                        <td>
-                          <button type="button" class="btn btn-danger btn-sm" @click="deletePack(item.id)">删除</button>
-                        </td>
-                      </tr>
-                    </template>
-                  </tbody>
-                </table>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-  
-  <!-- 包装模态框:END -->
-  <!--  +1模态框 -->
-  <div id="pack-modal-1" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:800px;">
-      <div class="modal-content">
-        <div class="modal-header">
-          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-          <h4 class="modal-title">输入包装内物料数量</h4>
-        </div>
-        <div id="modal-body" class="modal-body" style="color:#676767;">
-          <div class="row header-row">
-            <div class="col-md-2">
-              <div class="form-control-label">包装内物料数量:</div>
-            </div>
-            <div class="col-md-4">
-              <input v-model="packOneQty" autocomplete="off" class="form-control" type="text" />
-            </div>
-          </div>
-        </div>
-        <div class="modal-footer">
-          <button type="button" class="btn btn-default" @click="cancelOnePackModal">取消</button>
-          <button type="button" class="btn btn-primary" @click="saveOnePack">确定</button>
-        </div>
-      </div>
-    </div>
-  </div>
-  <!-- +1模态框END -->
-  <!--  +N模态框 -->
-  <div id="pack-modal-N" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:800px">
-      <div class="modal-content">
-        <div class="modal-header">
-          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-          <h4 class="modal-title">输入包装内物料数量</h4>
-        </div>
-        <div class="modal-body" style="color:#676767;">
-          <div class="row header-row">
-            <div class="col-md-2">
-              <div class="form-control-label">包装数量:</div>
-            </div>
-            <div class="col-md-4">
-              <input v-model="packMoreCount" autocomplete="off" class="form-control" type="text" />
-            </div>
-          </div>
-          <div class="row header-row">
-            <div class="col-md-2">
-              <div class="form-control-label">包装内物料数量:</div>
-            </div>
-            <div class="col-md-4">
-              <input v-model="packMoreQty" autocomplete="off" class="form-control" type="text" />
-            </div>
-          </div>
-        </div>
-        <div class="modal-footer">
-          <button type="button" class="btn btn-default" @click="cancelMorePackModal">取消</button>
-          <button type="button" class="btn btn-primary" @click="saveMorePack">确定</button>
-        </div>
-      </div>
-    </div>
-  </div>
-  <!-- +N模态框END -->
-  <!-- 打印模态框 -->
-  <div id="print-modal" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:1000px">
-      <div class="modal-content">
-        <div id="modal-body" class="modal-body" style="color:#676767;">
-          <div class="row header-row">
-            <button type="button" class="close" data-dismiss="modal" style="margin-right:5px;">
-              <span aria-hidden="true">&times;</span>
-              <span class="sr-only">Close</span>
-            </button>
-            <ul id="myTab" class="nav nav-tabs">
-              <li class="active">
-                <a id="notPrint-a" href="#notPrint-deal" data-toggle="tab" class="hide-table" @click="getNoPrintInventoryInstancePrint">待打印
-                </a>
-              </li>
-              <li>
-                <a id="printed-a" href="#Printed-deal" data-toggle="tab" class="hide-table" @click="getPrintedInventoryInstancePrint">已打印
-                </a>
-              </li>
-            </ul>
-          </div>
-          <div class="row header-row">
-            <div class="container-fluid">
-              <div id="myTabContent" class="tab-content">
-                <div id="notPrint-deal" class="tab-pane fade in active">
-                  <div class="tab-pane">
-                    <div class="row">
-                      <div class="col-md-12">
-                        <div class="col-md-2">
-                          <span>采购订单号:</span>
-                          <!-- eslint-disable-next-line -->
-                            <input autocomplete="off" id="documentNo-noPrint" v-model="notPrintDocumentNo" type="text" class="form-control col-md-2 query-input-noPrint" placeholder="输入采购订单号" />
-                        </div>
-                        <div class="col-md-2">
-                          <span>存货档案名称:</span>
-                          <!--eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryName-noPrint" v-model="notPrintInventoryName" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-noPrint" placeholder="输入存货档案名称" />
-                        </div>
-                        <!--eslint-disable-next-line -->
-                          <div class="col-md-2">
-                          <span>存货档案编码:</span>
-                          <!--eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryCode-noPrint" v-model="notPrintInventoryCode" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-noPrint" placeholder="输入存货档案编码" />
-                        </div>
-                        <div class="col-md-2">
-                          <span>规格型号:</span>
-                          <!-- eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryType-noPrint" v-model="notPrintInventoryType" type="text" class="form-control col-md-2 query-input-noPrint" placeholder="输入规格型号" />
-                        </div>
-                        <div class="col-md-2" style="position: absolute;top: 20px;right: 150px;">
-                          <button id="query-noPrint" type="button" class="btn btn-primary btn-sm" @click="getNoPrintInventoryInstancePrint">查询</button>
-                        </div>
-                      </div>
-                      <div class="col-md-12">
-                        <table id="myTable" class="myTable" style="color:#ccc;">
-                          <thead>
-                            <tr>
-                              <th>
-                                <input id="select-all-notPrint" v-model="checkAll" autocomplete="off" type="checkbox" name="select-all-notPrint" @click="notPrintCheckedAll()" />
-                              </th>
-                              <th>序号</th>
-                              <th>订单编号</th>
-                              <th>存货档案名称</th>
-                              <th>存货档案编码</th>
-                              <th>规格型号</th>
-                              <th>创建日期</th>
-                              <th>包装内物料数量</th>
-                              <th>订单数量</th>
-                              <th>打印状态</th>
-                            </tr>
-                          </thead>
-                          <tbody id="table-notPrint">
-                            <tr v-for="(item,index) in notPrintInventoryInstances" :key="item.id">
-                              <td>
-                                <input v-model="notPrintCheckboxModel" autocomplete="off" type="checkbox" :value="item.id" /> 
-                              </td>
-                              <td>{{ index + 1 }}</td>
-                              <td>{{ item.purchaseOrderDocumentNo }}</td>
-                              <td>{{ item.inventoryName }}</td>
-                              <td>{{ item.inventoryCode }}</td>
-                              <td>{{ item.inventoryType }}</td>
-                              <td>{{ item.createDate }}</td>
-                              <td>{{ item.printQuantity }}</td>
-                              <td>{{ item.quantity }}</td>
-                              <td>待打印</td>
-                            </tr>
-                          </tbody>
-                        </table>
-                      </div>
-                    </div>
-                    <div class="modal-footer">
-                      <button id="savePrint-btn-notPrint" type="button" class="btn btn-primary" @click="printReport(0)">打印条码</button>
-                    </div>
-                  </div>		
-                </div>	
-                <div id="Printed-deal" class="tab-pane fade ">
-                  <div class="tab-pane">
-                    <div class="row">
-                      <div class="col-md-12">
-                        <div class="col-md-2">
-                          <span>采购订单号:</span>
-                          <!-- eslint-disable-next-line -->
-                            <input autocomplete="off" id="documentNo-print" v-model="printedDocumentNo" type="text" class="form-control col-md-2 query-input-print" placeholder="输入采购订单号" />
-                        </div>
-                        <div class="col-md-2">
-                          <span>存货档案名称:</span>
-                          <!-- eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryName-print" v-model="printedInventoryName" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-print" placeholder="输入存货档案名称" />
-                        </div>
-                        <div class="col-md-2">
-                          <span>存货档案编码:</span>
-                          <!--eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryCode-print" v-model="printedInventoryCode" type="text" style="padding-left: 5px;" class="form-control col-md-2 query-input-print" placeholder="输入存货档案编码" />
-                        </div>
-                        <div class="col-md-2">
-                          <span>规格型号:</span>
-                          <!-- eslint-disable-next-line -->
-                            <input autocomplete="off" id="inventoryType-print" v-model="printedInventoryType" type="text" class="form-control col-md-2 query-input-print" placeholder="输入规格型号" />
-                        </div>
-                        <div class="col-md-2" style="position: absolute;top: 20px;right: 150px;">
-                          <button id="query-print" type="button" class="btn btn-primary btn-sm" @click="getPrintedInventoryInstancePrint">查询</button>
-                        </div>
-                      </div>
-                      <div class="col-md-12">
-                        <table id="myTable" class="myTable" style="color:#ccc;">
-                          <thead>
-                            <tr>
-                              <th><input v-model="printedCheckAll" autocomplete="off" type="checkbox" name="select-all-printed" @click="printedCheckedAll()" /></th>
-                              <th>序号</th>
-                              <th>订单编号</th>
-                              <th>存货档案名称</th>
-                              <th>存货档案编码</th>
-                              <th>规格型号</th>
-                              <th>创建日期</th>
-                              <th>打印日期</th>
-                              <th>包装内物料数量</th>
-                              <th>订单数量</th>
-                              <th>打印状态</th>
-                            </tr>
-                          </thead>
-                          <tbody id="table-Printed">
-                            <tr v-for="(item,index) in printedInventoryInstances" :key="item.id">
-                              <td>
-                                <input v-model="printedCheckboxModel" autocomplete="off" type="checkbox" :value="item.id" /> 
-                              </td>
-                              <td>{{ (pagination.current_page - 1) * pagination.per_page + 1 + index }}</td>
-                              <td>{{ item.purchaseOrderDocumentNo }}</td>
-                              <td>{{ item.inventoryName }}</td>
-                              <td>{{ item.inventoryCode }}</td>
-                              <td>{{ item.inventoryType }}</td>
-                              <td>{{ item.createDate }}</td>
-                              <td>{{ item.printedDate }}</td>
-                              <td>{{ item.printQuantity }}</td>
-                              <td>{{ item.quantity }}</td>
-                              <td>已打印</td>
-                            </tr>
-                          </tbody>
-                        </table>
-                      </div>
-                    </div>
-                    <div class="modal-footer">
-                      <button id="sendDocPrint-btn" type="button" class="btn btn-primary" @click="printReport(2)">打印发货单</button>
-                      <button id="savePrint-btn-Printed" type="button" class="btn btn-primary" @click="printReport(1)">打印条码</button>
-                    </div>
-                    <div class="row">
-                      <VueBootstrapPagination v-if="isShowPage" :pagination="pagination" :callback="getPrintedInventoryInstancePrint" />
-                    </div>
-                  </div>		
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-  <!-- 打印模态框END -->
-  <!--  pdf、Excel下载模态框 -->
-  <div id="pack-modal-download" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:500px">
-      <div class="modal-content">
-        <div class="modal-header">
-          <button type="button" class="close" data-dismiss="modal" style="margin-right:10px;margin-top:-5px;">
-            <span aria-hidden="true">&times;</span>
-            <span class="sr-only">Close</span>
-          </button>
-          <h4 class="modal-title">选择下载格式</h4>
-        </div>
-        <div id="modal-body" class="modal-body" style="color:#676767;">
-          <div class="row header-row">
-            <div class="col-md-2">
-              <button id="download-pdf" type="button" class="btn btn-info">
-                <a style="color:#fff;" target="_blank" @click="downloadPdf">PDF下载</a>
-              </button>
-            </div>
-            <div class="col-md-2">
-              <button id="download-Excel" type="button" class="btn btn-info">
-                <a style="color:#fff;" target="_blank" @click="downloadExcel">Excel下载</a>
-              </button>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-  <!-- pdf、Excel下载模态框END -->
-  <!--  修改数量模态框start -->
-  <div id="pack-modal-quantity" class="modal fade" aria-hidden="true" data-backdrop="static">
-    <div class="modal-dialog modal-lg" style="width:800px;">
-      <div class="modal-content">
-        <div class="modal-header">
-          <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-          <h4 class="modal-title">输入包装内物料数量</h4> 
-        </div>
-        <div id="modal-body" class="modal-body" style="color:#676767;">
-          <input id="inventoryInstanceId" autocomplete="off" type="hidden" value="" />
-          <div class="row header-row">
-            <div class="col-md-2"><div class="form-control-label">包装内物料数量:</div></div>
-            <div class="col-md-4"><input id="pack-changeQty" v-model="quantity" autocomplete="off" class="form-control" type="text" /></div>
-          </div>
-        </div>
-        <div class="modal-footer">
-          <button id="cancel-btn-changeQty" type="button" class="btn btn-default" @click="cancelChangeQty">取消</button>
-          <button id="saveQty-btn-changeQty" type="button" class="btn btn-primary" @click="saveChangeQty">保存</button>
-        </div>
-      </div>
-    </div>
-  </div>
 </template>
 
 <script>
 import Common from '../common/Common.js';
-
+import InAndOutFlow from '../stock/InAndOutFlow.vue';
 
 
 export default {
+
   components: {
-    
+    InAndOutFlow,
     
   },
-  data: function () {
+  data: function() {
+    this.Common = Common;
     return {
-      columns: [
-        { title: '序号', dataIndex: 'index', width: 60 },
-        { title: '存货名称', dataIndex: 'inventoryName' },
-        { title: '存货编码', dataIndex: 'inventoryCode' },
-        { title: '规格型号', dataIndex: 'inventoryType' },
-        { title: '订单数量', dataIndex: 'quantity' },
-        { title: '操作', dataIndex: 'operation', fixed: 'right' },
-      ],
-      inventoryName: '',
-      inventoryCode: '',
-      inventoryType: '',
-      documentNo: '',
-      selectedNum: '',
-      purchaseOrderLines: [],
-      purchaseOrderLineId: '',
-      packData: {},
-      purchaseOrderLinePrint: {},
-      buttonText: '',
-      inventoryInstances: [],
-      packOneQty: '',
-      packMoreCount: '',
-      packMoreQty: '',
-      notPrintInventoryInstances: [],
-      notPrintInventoryName: '',
-      notPrintInventoryCode: '',
-      notPrintInventoryType: '',
-      notPrintDocumentNo: '',
-      notPrintCheckboxModel: [], //获取选项框数据
-      checkAll: false, //全选,
-      reportResult: {},
       pagination: {
         total: 0,
-        per_page: 30,
-        current_page: 1,
-        last_page: 10,
+        per_page: Common.pageSize, // required
+        current_page: 1, // required
+        last_page: 1, // required
+      },
+      //历史图片分页参数
+      pagination2: {
+        total: 0,
+        per_page: Common.pageSize, // required
+        current_page: 1, // required
+        last_page: 1, // required
+        from: 1,
+        to: 1, // required
       },
-      isShowPage: false,
-      printedInventoryInstances: [],
-      printedInventoryName: '',
-      printedInventoryCode: '',
-      printedInventoryType: '',
-      printedDocumentNo: '',
-      printedCheckboxModel: [], //获取选项框数据
-      printedCheckAll: false, //全选,
-      notPrintCount: '',
-      quantity: '',
-      inventoryInstanceId: '',
+      condition: '',
+      showPager: false, // 是否显示分页
+      assetInstances: [],
+      inventorys: [],
+      assetClassName: 'com.leanwo.prodog.asset.model.AssetInstance',
+      inventoryClassName: 'com.leanwo.prodog.model.common.Inventory',
+      showAssetInstance: '',
+      showInventory: '',
+      activeContent: 1,
+      imageInfos: [],
+      imageUrl: '',
+      historyEvents: [],
+      assetHistoryEvents: [],
+      historyEvents2: [],
+      stockInfos: [],
+      positionInfos: [],
+      results: [],
+      startDate: '',
+      endDate: '',
+      firstSearch: true,
+      loading: false,
+      modal: false,
+      stockColumns: [
+        { title: '仓库名称', dataIndex: 'warehouseName' },
+        { title: '入库单号', dataIndex: 'documentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编码', dataIndex: 'inventoryNo' },
+        { title: '批次', dataIndex: 'batchNo' },
+        { title: '结存数量', dataIndex: 'quantity' },
+      ],
+      positionColumns: [
+        { title: '仓库名称', dataIndex: 'warehouseName' },
+        { title: '入库单号', dataIndex: 'documentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编号', dataIndex: 'inventoryNo' },
+        { title: '库位名称', dataIndex: 'positionName' },
+        { title: '库位编号', dataIndex: 'positionNo' },
+        { title: '数量', dataIndex: 'quantity' },
+        { title: '处理人', dataIndex: 'handlerUser' },
+        { title: '处理时间', dataIndex: 'handlerDate' },
+      ],
     };
   },
-  watch: {
-    // 反选
-    notPrintCheckboxModel: {
-      handler: function (val, oldVal) {
-        console.log(this.notPrintCheckboxModel.toString());
-        if (
-          this.notPrintInventoryInstances.length ==
-          this.notPrintCheckboxModel.length
-        ) {
-          this.checkAll = true;
-        } else {
-          this.checkAll = false;
-        }
-      },
-      deep: true,
-    },
-    // 反选
-    printedCheckboxModel: {
-      handler: function (val, oldVal) {
-        console.log(this.printedCheckboxModel.toString());
-        if (
-          this.printedInventoryInstances.length ==
-          this.printedCheckboxModel.length
-        ) {
-          this.printedCheckAll = true;
-        } else {
-          this.printedCheckAll = false;
-        }
-      },
-      deep: true,
-    },
+
+  computed: {
+    dataId: function() {
+      return {inventoryId: this.$route.query.inventoryresultId};
+    }, 
   },
-  mounted: function () {
-    this.loadDocumentNo();
-    this.getNeedPrintCount();
+
+  watch: {},
+
+  mounted: function() {
+    var _self = this;
+    
+    var inventoryresultId = _self.$route.query.inventoryresultId;
+  
+    _self.findInventoryById(inventoryresultId);
+    if (_self.firstSearch) {
+      _self.condition = localStorage.getItem('##searchStr##');
+      _self.firstSearch = false;
+    }
   },
-  methods: {
-    loadDocumentNo: function () {
-      var _self = this;
-      $('#documentNo')
-        .select2({
-          placeholder: '输入采购订单号',
-          allowClear: false,
-          ajax: {
-            type: 'get',
-            dataType: 'json',
-            url: Common.getApiURL(
-              'PurchaseOrderLineResource/queryPurchaseOrderLineDocumentNo',
-            ),
-            beforeSend: function (request) {
-              Common.addTokenToRequest(request);
-            },
-            data: function (params) {
-              return {
-                documentNo: params.term,
-              };
-            },
-            processResults: function (data) {
-              return {
-                results: $.map(data, function (item) {
-                  return {
-                    id: item.documentNo,
-                    text: item.documentNo,
-                  };
-                }),
-              };
-            },
-          },
-        })
-        .on('select2:select', function (event) {
-          console.log(event.params.data);
-          _self.documentNo = event.params.data.text;
-          _self.refreshPurchaseOrderLineTable();
-          _self.keydown();
-        });
-    },
-    refreshPurchaseOrderLineTable: function () {
-      var _self = this;
-      var purchaseOrderDocumentNo = _self.documentNo;
-      var inventoryName = _self.inventoryName;
-      var inventoryType = _self.inventoryType;
-      var inventoryCode = _self.inventoryCode;
-      var printNum = _self.selectedNum;
-      if (
-        purchaseOrderDocumentNo == '' &&
-        inventoryName == '' &&
-        inventoryCode == '' &&
-        inventoryType == ''
-      ) {
-        return;
-      } else {
-        var url;
-        if (printNum == 1) {
-          url =
-            'PurchaseOrderLineResource/findNotPrintByDocumentNoNameCodeType';
-        } else if (printNum == 2) {
-          url = 'PurchaseOrderLineResource/findPrintedByDocumentNoNameCodeType';
-        } else {
-          url = 'PurchaseOrderLineResource/findAllByDocumentNoNameCodeType';
-        }
-        $.ajax({
-          url: Common.getApiURL(url),
-          type: 'post',
-          data: {
-            documentNo: purchaseOrderDocumentNo,
-            inventoryName: inventoryName,
-            inventoryCode: inventoryCode,
-            inventoryType: inventoryType,
-          },
-          beforeSend: function (request) {
-            Common.addTokenToRequest(request);
-          },
-          success: function (data) {
-            //console.log(data);
-            _self.purchaseOrderLines = data;
-          },
-          error: function (XMLHttpRequest, textStatus, errorThrown) {
-            Common.processException(XMLHttpRequest, textStatus, errorThrown);
-          },
-        });
-      }
-    },
-    refreshPackModal: function (purchaseOrderLineId) {
-      var _self = this;
-      _self.purchaseOrderLineId = purchaseOrderLineId;
 
-      _self.getNeedPrintCount();
-      //根据采购订单明细Id查询PurchaseOrderLinePackDto
-      if (purchaseOrderLineId == undefined || purchaseOrderLineId == '') {
-        return;
-      }
-      $.ajax({
-        url:
-          Common.getApiURL(
-            'PurchaseOrderLineResource/queryPurchaseOrderLinePackDto?purchaseOrderLineId=',
-          ) + purchaseOrderLineId,
-        async: false,
-        type: 'get',
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          console.log(data);
-          _self.packData = data;
-          _self.purchaseOrderLinePrint = data.purchaseOrderLinePrintDto;
-          $('#pack-modal').modal('show');
-          _self.showInventoryInstanceTable(purchaseOrderLineId);
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    showInventoryInstanceTable: function (purchaseOrderLineId) {
-      var _self = this;
-      var url;
-      if (_self.buttonText == 0) {
-        url =
-          'InventoryInstanceResource/loadInventoryInstance/?purchaseOrderLineId=';
-      } else {
-        url =
-          'InventoryInstanceResource/notPrintedInventoryInstance/?purchaseOrderLineId=';
-      }
-      $.ajax({
-        url: Common.getApiURL(url) + purchaseOrderLineId,
-        async: false,
-        type: 'get',
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          // //渲染InventoryInstanceDto表格数据
-          console.log(data);
-          _self.inventoryInstances = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    showOnePackModal: function () {
-      this.packOneQty = '';
-      $('#pack-modal').modal('hide');
-      $('#pack-modal-1').modal('show');
-    },
-    cancelOnePackModal: function () {
-      $('#pack-modal-1').modal('hide');
-      $('#pack-modal').modal('show');
-      $('body').css('overflow-y', 'hidden');
-      $('#pack-modal').css('overflow-y', 'auto');
-    },
-    // 保存一个包装
-    saveOnePack: function () {
-      var _self = this;
-      var inventoryInstanceDtos = [];
-      var quantity = _self.packOneQty;
-      var purchaseOrderLineId = _self.purchaseOrderLineId;
-      var aa = {
-        quantity: quantity,
-        purchaseOrderLineId: purchaseOrderLineId,
-      };
-      inventoryInstanceDtos.push(aa);
-      console.log(inventoryInstanceDtos);
-      // 保存InventoryInstances
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstanceResource/saveInventoryInstances',
-        ),
-        dataType: 'json',
-        type: 'post',
-        contentType: 'application/json',
-        data: JSON.stringify(inventoryInstanceDtos),
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (jsonData) {
-          _self.refreshPackModal(purchaseOrderLineId);
-          _self.refreshPurchaseOrderLineTable();
-          $('#pack-modal-1').modal('hide');
-          $('#pack-modal').css('overflow-y', 'auto');
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    showMorePackModal: function () {
-      this.packMoreCount = '';
-      this.packMoreQty = '';
-      $('#pack-modal-N').modal('show');
-      $('#pack-modal').modal('hide');
-    },
-    cancelMorePackModal: function () {
-      $('#pack-modal-N').modal('hide');
-      $('#pack-modal').modal('show');
-      $('body').css('overflow-y', 'hidden');
-      $('#pack-modal').css('overflow-y', 'auto');
-    },
-    // 保存多个包装
-    saveMorePack: function () {
+  beforeUnmount: function() {
+    
+  },
+
+  methods: {
+    findInventoryById: function(inventoryresultId) {
       var _self = this;
-      var inventoryInstanceDtos = [];
-      var count = _self.packMoreCount;
-      for (var i = 0; i < count; i++) {
-        var quantity = _self.packMoreQty;
-        var purchaseOrderLineId = _self.purchaseOrderLineId;
-        var aa = {
-          quantity: quantity,
-          purchaseOrderLineId: purchaseOrderLineId,
-        };
-        inventoryInstanceDtos.push(aa);
-      }
-      // 保存包装信息
       $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstanceResource/saveInventoryInstances',
-        ),
-        dataType: 'json',
+        url: Common.getApiURL('InventoryResource/findInventoryById'),
         type: 'post',
+        data: inventoryresultId,
         contentType: 'application/json',
-        data: JSON.stringify(inventoryInstanceDtos),
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (jsonData) {
-          _self.refreshPackModal(purchaseOrderLineId);
-          _self.refreshPurchaseOrderLineTable();
-          $('#pack-modal-N').modal('hide');
-          $('#pack-modal').css('overflow-y', 'auto');
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    packModalPrintStatus: function () {
-      var _self = this;
-      _self.refreshPackModal(_self.purchaseOrderLineId);
-    },
-    printPack: function (inventoryInstanceId) {
-      var _self = this;
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/saveInventoryInstancesToInventoryInstancePrint',
-        ),
-        async: false,
-        type: 'post',
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        data: {
-          inventoryInstanceId: inventoryInstanceId,
-        },
-        success: function (data) {
-          _self.refreshPackModal(_self.purchaseOrderLineId);
-          Notify.success('提示', '放入打印队列完成', false);
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    deletePack: function (inventoryInstanceId) {
-      var _self = this;
-      $.ajax({
-        url:
-          Common.getApiURL(
-            'InventoryInstanceResource/deleteByInventoryInstanceId?inventoryInstanceId=',
-          ) + inventoryInstanceId,
-        async: false,
-        type: 'get',
-        beforeSend: function (request) {
+        beforeSend: function(request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          _self.refreshPackModal(_self.purchaseOrderLineId);
-          _self.refreshPurchaseOrderLineTable();
+        success: function(data) {
+          _self.showItem2(data);
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    printNotPrintedContent: function () {
-      var _self = this;
-      var data = [];
-      _self.inventoryInstances.forEach(function (item) {
-        data.push(item.id);
-      });
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/saveNotPrintedInventoryInstancesToInventoryInstancePrint',
-        ),
-        async: true,
-        dataType: 'json',
-        type: 'post',
-        contentType: 'application/json; charset=utf-8',
-        data: JSON.stringify(data),
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.refreshPackModal(_self.purchaseOrderLineId);
-          _self.showPrintModal();
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          //showPrintModal();
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    //点击打印未打印,显示打印模态框
-    showPrintModal: function () {
-      var _self = this;
-      _self.getNoPrintInventoryInstancePrint();
-      $('#pack-modal').modal('hide');
-      $('#print-modal').modal('show');
-      $('#print-modal').css('overflow-y', 'auto');
-      $('body').css('overflow-y', 'hidden');
-    },
-    showNeedPrint: function () {
-      var _self = this;
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/queryInventoryInstancePrint',
-        ),
-        async: true,
-        dataType: 'json',
-        type: 'post',
-        data: {
-          printed: false,
-        },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          $('#print-modal').modal('show');
-          _self.notPrintInventoryInstances = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    getNoPrintInventoryInstancePrint: function () {
-      var _self = this;
-      var documentNo = _self.notPrintDocumentNo;
-      var inventoryName = _self.notPrintInventoryName;
-      var inventoryCode = _self.notPrintInventoryCode;
-      var inventoryType = _self.notPrintInventoryType;
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/queryInventoryInstancePrint',
-        ),
-        async: true,
-        dataType: 'json',
-        type: 'post',
-        data: {
-          printed: false,
-          documentNo: documentNo,
-          inventoryName: inventoryName,
-          inventoryCode: inventoryCode,
-          inventoryType: inventoryType,
-        },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.notPrintInventoryInstances = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: function(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
 
-    getPrintedInventoryInstancePrint: function () {
-      var _self = this;
-      var documentNo = _self.printedDocumentNo;
-      var inventoryName = _self.printedInventoryName;
-      var inventoryCode = _self.printedInventoryCode;
-      var inventoryType = _self.printedInventoryType;
-      $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/queryPrintedInventoryInstancePrint',
-        ),
-        async: false,
-        dataType: 'json',
-        type: 'post',
-        data: {
-          printed: true,
-          currentPage: _self.pagination.current_page,
-          pageSize: _self.pagination.per_page,
-          documentNo: documentNo,
-          inventoryName: inventoryName,
-          inventoryCode: inventoryCode,
-          inventoryType: inventoryType,
-        },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.printedInventoryInstances = data.inventoryInstancePrintDtos;
 
-          _self.isShowPage = true;
-          _self.printedCheckAll = false;
-          _self.printedCheckboxModel.splice(
-            0,
-            _self.printedCheckboxModel.length,
-          );
-          console.log(data);
-          // 分页相关
-          _self.pagination.total = data.totalCount;
-          _self.pagination.last_page =
-            data.totalCount % _self.pagination.per_page == 0
-              ? data.totalCount / _self.pagination.per_page
-              : Math.floor(data.totalCount / _self.pagination.per_page) + 1;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    // 打印流程
-    printReport: function (buttonStatus) {
+    /**
+			 * 显示存货详细信息
+			 * @param {Object} inventoryresult
+			 */
+    showItem2: function(inventoryresult) {
       var _self = this;
-      var checkedNum;
-      var recordIds;
-      var id;
-      if (buttonStatus == 0) {
-        id = 283981;
-        checkedNum = _self.notPrintCheckboxModel.length;
-        recordIds = _self.notPrintCheckboxModel;
-      } else if (buttonStatus == 1) {
-        id = 283981;
-        checkedNum = _self.printedCheckboxModel.length;
-        recordIds = _self.printedCheckboxModel;
-      } else {
-        id = 284941;
-        checkedNum = _self.printedCheckboxModel.length;
-        recordIds = _self.printedCheckboxModel;
-      }
-      if (checkedNum == 0) {
-        Notify.notice('提示', '请选择打印内容', false);
-      } else {
-        $.ajax({
-          url: Common.getApiURL('ProcessReportResource/runProcessByIds/') + id,
-          async: true,
-          dataType: 'json',
-          type: 'post',
-          contentType: 'application/json; charset=utf-8',
-          data: JSON.stringify(recordIds),
-          beforeSend: function (request) {
-            Common.addTokenToRequest(request);
-          },
-          success: function (data) {
-            _self.refreshPurchaseOrderLineTable();
-            console.log(data);
-            _self.getNeedPrintCount();
-            $('#print-modal').modal('hide');
-            $('#pack-modal-download').modal('show');
-            //_self.showDownloadModal(data);
-            _self.reportResult = data.reportResults[0];
-          },
-          error: function (XMLHttpRequest, textStatus, errorThrown) {
-            Common.processException(XMLHttpRequest, textStatus, errorThrown);
-          },
-        });
-      }
+      _self.showInventory = inventoryresult;
+      // 查询生命周期数据
+      _self.getHistoryEvent2();
+      _self.getStockInfo();
     },
-    //下载Excel
-    downloadExcel: function () {
-      var _self = this;
-      var url = '../..';
-      var excelDownLoadUrl = _self.reportResult.excelDownLoadUrl;
-      if (excelDownLoadUrl == undefined) {
-        Notify.error('提示', '下载失败', false);
-      } else {
-        var ExcelUrl = url + '/' + excelDownLoadUrl;
-        window.open(ExcelUrl);
-      }
-    },
-    // 下载Pdf
-    downloadPdf: function () {
-      var _self = this;
-      var url = '../..';
-      var pdfDownLoadUrl = _self.reportResult.pdfDownLoadUrl;
-      if (pdfDownLoadUrl == undefined) {
-        Notify.error('提示', '下载失败', false);
-      } else {
-        var pdfUrl = url + '/' + pdfDownLoadUrl;
-        window.open(pdfUrl);
-      }
-    },
-    // 未打印全选
-    notPrintCheckedAll: function () {
-      var _self = this;
-      if (event.currentTarget.checked) {
-        _self.notPrintInventoryInstances.forEach(function (item) {
-          _self.notPrintCheckboxModel.push(item.id);
-        });
-      } else {
-        _self.notPrintCheckboxModel.splice(
-          0,
-          this.notPrintCheckboxModel.length,
-        );
+
+    callbackFun: function() {
+      if (this.showAssetInstance == undefined || this.showAssetInstance == '') {
+        return;
       }
+      this.showItem(this.showAssetInstance);
     },
-    // 已打印全选
-    printedCheckedAll: function () {
-      var _self = this;
-      if (event.currentTarget.checked) {
-        _self.printedInventoryInstances.forEach(function (item) {
-          _self.printedCheckboxModel.push(item.id);
-        });
-      } else {
-        _self.printedCheckboxModel.splice(0, this.printedCheckboxModel.length);
-      }
+    showImage: function(imageName) {
+      this.imageUrl = imageName;
+      this.modal = true;
     },
 
-    // 打印队列中未打印数量
-    getNeedPrintCount: function () {
+    /**
+			 * 查询存货的出入库记录
+			 */
+    getHistoryEvent2: function() {
       var _self = this;
       $.ajax({
-        url: Common.getApiURL(
-          'InventoryInstancePrintResource/queryInventoryInstancePrintCount',
-        ),
-        async: true,
-        dataType: 'json',
+        url: Common.getApiURL('StockOutResource/getHistoryEventByInventory'),
         type: 'post',
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.notPrintCount = data;
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    changeQty: function (inventoryInstanceId, quantity) {
-      var _self = this;
-      _self.quantity = quantity;
-      _self.inventoryInstanceId = inventoryInstanceId;
-      $.ajax({
-        url: Common.getApiURL('InventoryInstanceResource/quantity'),
-        async: true,
         dataType: 'json',
-        type: 'post',
         data: {
-          inventoryInstanceId: inventoryInstanceId,
-          quantity: quantity,
+          inventoryId: _self.showInventory.id,
+          startDate: _self.startDate,
+          endDate: _self.endDate,
         },
-        beforeSend: function (request) {
+        beforeSend: function(request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          $('#pack-modal-quantity').modal('show');
-          $('#pack-modal').modal('hide');
+        success: function(data) {
+          console.log(data);
+          _self.historyEvents2 = data;
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: function(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
-    cancelChangeQty: function () {
-      $('#pack-modal-quantity').modal('hide');
-      $('#pack-modal').modal('show');
-      $('body').css('overflow-y', 'hidden');
-      $('#pack-modal').css('overflow-y', 'auto');
-    },
-    saveChangeQty: function () {
+
+    /**
+			 * 根据inventoryId获取库存信息
+			 */
+    getStockInfo: function() {
       var _self = this;
-      var inventoryInstanceId = _self.inventoryInstanceId;
-      var quantity = _self.quantity;
-      if (quantity == '' || quantity < 0) {
-        Notify.error('输入有误', '数量填写不正确', false);
-        return;
-      }
       $.ajax({
-        url: Common.getApiURL('InventoryInstanceResource/quantity'),
-        async: true,
+        url: Common.getApiURL('StockOutResource/getStockInfoByInventory'),
+        type: 'GET',
         dataType: 'json',
-        type: 'post',
         data: {
-          inventoryInstanceId: inventoryInstanceId,
-          quantity: quantity,
+          inventoryId: _self.showInventory.id,
         },
-        beforeSend: function (request) {
+        beforeSend: function(request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          _self.refreshPackModal(_self.purchaseOrderLineId);
-          _self.refreshPurchaseOrderLineTable();
-          $('#pack-modal-quantity').modal('hide');
-          $('#pack-modal').modal('show');
-          $('body').css('overflow-y', 'hidden');
-          $('#pack-modal').css('overflow-y', 'auto');
+        success: function(data) {
+          console.log(data);
+          _self.stockInfos = data;
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: function(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
-    // 键盘回车事件
-    keydown: function () {
-      var _self = this;
-      document.onkeydown = function (event) {
-        var currentEvent = event || window.event || arguments[0];
-        if (currentEvent && currentEvent.keyCode == 13) {
-          currentEvent.preventDefault();
-          _self.refreshPurchaseOrderLineTable();
-        }
-      };
+
+    // 获取图标
+    getHistoryIconSrc: function(title) {
+      var iconSrc = 'static/image/';
+      switch (title) {
+      case '资产盘点':
+        iconSrc += 'inventory.png';
+        break;
+      case '资产归还':
+        iconSrc += 'stockin.png';
+        break;
+      case '资产领用':
+        iconSrc += 'stockout.png';
+        break;
+      case '资产报失':
+        iconSrc += 'lost.png';
+        break;
+      case '资产报失找回':
+        iconSrc += 'lostRetrieve.png';
+        break;
+      case '资产保养':
+        iconSrc += 'maintain.png';
+        break;
+      case '资产维修':
+        iconSrc += 'repair.png';
+        break;
+      case '资产报废':
+        iconSrc += 'scrap.png';
+        break;
+      case '材料出库':
+        iconSrc += 'stockout.png';
+        break;
+      case '材料入库':
+        iconSrc += 'stockin.png';
+        break;
+      }
+      return iconSrc;
     },
   },
 };
 </script>
-
 <style scoped>
-.header {
-  padding: 16px;
-  background: #fff;
-  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+.container {
+  padding: 20px;
 }
 
-.form-container {
-  margin-bottom: 24px;
+.form-card {
+  margin-top: 20px;
 }
 
-.pagination-wrapper {
+.data-tabs {
   margin-top: 24px;
-  text-align: right;
 }
 
-/* 表格样式优化 */
-:deep(.ant-table-thead > tr > th) {
-  background: #fafafa;
-  text-align: center;
+.image {
+  width: 78px;
+  height: 78px;
+  margin-right: 16px;
 }
-</style>
+
+.event-time {
+  color: rgba(0, 0, 0, 0.45);
+}
+</style>
+

+ 182 - 346
src/print/NeedPrint.vue

@@ -1,131 +1,56 @@
 <template>
-  <div class="container-fluid">
-    <Navbar title="待打印" :is-go-back="true" />
-    <div class="flex-container" style="margin-top: 10px">
-      <div class="flex-header">
-        <div class="form-inline">
-          <PrintWidget
-            ref="printWidget"
-            :printer-localstorage-id="'#InventoryPrinterPrinter'"
-            @selected-printer-name="getPrintName"
-          />
-          <div class="form-group">
-            <label>采购订单号</label>
-            <input
-              v-model="documentNo"
-              autocomplete="off"
-              type="text"
-              placeholder="输入采购订单号"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>存货名称</label>
-            <input
-              v-model="inventoryName"
-              autocomplete="off"
-              type="text"
-              placeholder="输入存货档案名称"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>存货编码</label>
-            <input
-              v-model="inventoryCode"
-              autocomplete="off"
-              type="text"
-              placeholder="输入存货档案编码"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>规格型号</label>
-            <input
-              v-model="inventoryType"
-              autocomplete="off"
-              type="text"
-              placeholder="输入规格型号"
-              class="form-control"
-            />
-          </div>
-        </div>
-      </div>
-      <div class="form-inline" style="margin-top: 10px">
-        <div class="text-left">
-          <button
-            class="btn btn-primary"
-            @click="loadNeedPrintInventoryInstance"
-          >
-            查询
-          </button>
-          <button type="button" class="btn btn-primary" @click="printBarCode">
-            打印条码
-          </button>
-          <!-- <button type="button"
-                            class="btn btn-primary"
-                            @click="printPdf">打印PDF</button> -->
-        </div>
-      </div>
-    </div>
-    <div class="flex-content" style="margin-top: 10px">
-      <table
-        v-if="inventoryInstances.length > 0"
-        id="myTable"
-        class="table table-bordered"
-      >
-        <thead>
-          <tr>
-            <th>
-              <input
-                id="checkAll"
-                v-model="checkAll"
-                autocomplete="off"
-                type="checkbox"
-                @click="checkedAll($event)"
-              />
-            </th>
-            <th>序号</th>
-            <th>订单编号</th>
-            <th>存货名称</th>
-            <th>存货编码</th>
-            <th>规格型号</th>
-            <th>创建日期</th>
-            <th>包装内物料数量</th>
-            <th>订单数量</th>
-            <th>打印状态</th>
-          </tr>
-        </thead>
-        <tbody id="table-notPrint">
-          <tr v-for="(item, index) in inventoryInstances" :key="item.id">
-            <td>
-              <input
-                :id="item"
-                v-model="checkboxModel"
-                autocomplete="off"
-                type="checkbox"
-                :value="item"
-              /><label :for="item" />
-            </td>
-            <td>{{ index + 1 }}</td>
-            <td>{{ item.purchaseOrderDocumentNo }}</td>
-            <td>{{ item.inventoryName }}</td>
-            <td>{{ item.inventoryCode }}</td>
-            <td>{{ item.inventoryType }}</td>
-            <td>{{ item.createDate }}</td>
-            <td>{{ item.printQuantity }}</td>
-            <td>{{ item.quantity }}</td>
-            <td>待打印</td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-    <div class="flex-footer">
-      <VueBootstrapPagination
-        :pagination="pagination"
-        :callback="loadNeedPrintInventoryInstance"
+  <div>
+    <Navbar title="新页面 - 待打印" :is-go-back="true" />
+    <a-form layout="inline" style="margin-top: 10px">
+      <PrintWidget
+        ref="printWidget"
+        :printer-localstorage-id="'#InventoryPrinterPrinter'"
+        @selected-printer-name="getPrintName"
       />
-    </div>
+      <a-form-item label="采购订单号">
+        <a-input 
+          v-model:value="documentNo" 
+          placeholder="输入采购订单号" 
+        />
+      </a-form-item>
+      <a-form-item label="存货名称">
+        <a-input 
+          v-model:value="inventoryName" 
+          placeholder="输入存货档案名称" 
+        />
+      </a-form-item>
+      <a-form-item label="存货编码">
+        <a-input 
+          v-model:value="inventoryCode" 
+          placeholder="输入存货档案编码" 
+        />
+      </a-form-item>
+      <a-form-item label="规格型号">
+        <a-input 
+          v-model:value="inventoryType" 
+          placeholder="输入规格型号" 
+        />
+      </a-form-item>
+      <a-form-item>
+        <a-button type="primary" @click="loadNeedPrintInventoryInstance">查询</a-button>
+        <a-button type="primary" @click="printBarCode">打印条码</a-button>
+      </a-form-item>
+    </a-form>
+    <a-table
+      ref="tableRef"
+      :data-source="inventoryInstances"
+      :columns="columns"
+      :pagination="pagination"
+      :row-selection="rowSelection"
+      :row-key="record => record.id"
+      style="margin-top: 10px"
+    >
+      <template #bodyCell="{ column, record, index }">
+        <template v-if="column.dataIndex === 'index'">{{ index + 1 }}</template>
+        <template v-if="column.dataIndex === 'printStatus'">待打印</template>
+        <template v-else>{{ record[column.dataIndex] }}</template>
+      </template>
+    </a-table>
     <Modal v-model:show="modal">
       <ProcessReportResult :process-report-result="processReportResult" />
       <template #header>执行结果</template>
@@ -137,21 +62,17 @@
 <script>
 import Common from '../common/Common.js';
 import { PrintUtil } from 'pc-component-v3';
-
-
-
-
-
-
-
 import InventoryInstancePrintResource from '../api/wms/InventoryInstancePrintResource.js';
+import { Form, Input, Button, Table, Checkbox } from 'ant-design-vue';
 
 export default {
   components: {
-    
-    
-    
-    
+    [Form.name]: Form,
+    [Form.Item.name]: Form.Item,
+    [Input.name]: Input,
+    [Button.name]: Button,
+    [Table.name]: Table,
+    [Checkbox.name]: Checkbox,
   },
   data: function () {
     return {
@@ -160,30 +81,79 @@ export default {
       inventoryType: '',
       documentNo: '',
       inventoryInstances: [],
-      checkboxModel: [], //获取选项框数据
-      checkAll: '', //全选,
+      checkboxModel: [],
+      checkAll: false,
       reportResult: {},
       processReportResult: {},
       pagination: {
         total: 0,
-        per_page: 30,
-        current_page: 1,
-        last_page: 10,
+        pageSize: 30,
+        current: 1,
       },
       loading: false,
       modal: false,
-      selectedPrinterTitle:'',
+      selectedPrinterTitle: '',
+      indeterminate: false,
     };
   },
+  computed: {
+    columns: function () {
+      return [
+        {
+          title: '序号',
+          dataIndex: 'index',
+        },
+        {
+          title: '订单编号',
+          dataIndex: 'purchaseOrderDocumentNo',
+        },
+        {
+          title: '存货名称',
+          dataIndex: 'inventoryName',
+        },
+        {
+          title: '存货编码',
+          dataIndex: 'inventoryCode',
+        },
+        {
+          title: '规格型号',
+          dataIndex: 'inventoryType',
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createDate',
+        },
+        {
+          title: '包装内物料数量',
+          dataIndex: 'printQuantity',
+        },
+        {
+          title: '订单数量',
+          dataIndex: 'quantity',
+        },
+        {
+          title: '打印状态',
+          dataIndex: 'printStatus',
+        },
+      ];
+    },
+    rowSelection() {
+      return {
+        selectedRowKeys: this.checkboxModel.map(item => item.id),
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.checkboxModel = selectedRows;
+        },
+        getCheckboxProps: record => ({
+          disabled: false, // 可根据需要设置禁用状态
+        }),
+      };
+    },
+  },
   watch: {
-    // 反选
     checkboxModel: {
-      handler: function (val, oldVal) {
-        if (this.inventoryInstances.length == this.checkboxModel.length) {
-          this.checkAll = true;
-        } else {
-          this.checkAll = false;
-        }
+      handler(newVal) {
+        this.indeterminate = !!newVal.length && newVal.length < this.inventoryInstances.length;
+        this.checkAll = newVal.length === this.inventoryInstances.length;
       },
       deep: true,
     },
@@ -193,17 +163,15 @@ export default {
     this.keydown();
   },
   methods: {
-    
-    getPrintName:function(value){
+    getPrintName: function (value) {
       this.selectedPrinterTitle = value;
     },
-
     loadNeedPrintInventoryInstance: function () {
       var _self = this;
-      var documentNo = _self.documentNo;
-      var inventoryName = _self.inventoryName;
-      var inventoryCode = _self.inventoryCode;
-      var inventoryType = _self.inventoryType;
+      const documentNo = _self.documentNo;
+      const inventoryName = _self.inventoryName;
+      const inventoryCode = _self.inventoryCode;
+      const inventoryType = _self.inventoryType;
       InventoryInstancePrintResource.queryInventoryInstancePrint(
         false,
         documentNo,
@@ -213,14 +181,11 @@ export default {
       ).then(
         data => {
           if (data) {
-            _self.inventoryInstances = data.inventoryInstancePrintDtos;
-
-            // 分页相关
+            _self.inventoryInstances = data.inventoryInstancePrintDtos.map(item => ({
+              ...item,
+              checked: false,
+            }));
             _self.pagination.total = data.totalCount;
-            _self.pagination.last_page =
-              data.totalCount % _self.pagination.per_page == 0
-                ? data.totalCount / _self.pagination.per_page
-                : Math.floor(data.totalCount / _self.pagination.per_page) + 1;
           }
         },
         errorData => {
@@ -228,205 +193,76 @@ export default {
         },
       );
     },
-    //打印条码
+
     printBarCode: function () {
-      var _self = this;
-      let selectedPrinter = this.selectedPrinterTitle;
-      if (_self.checkboxModel.length == 0) {
+      if (this.checkboxModel.length === 0) {
         Notify.notice('提示', '请至少选择一项打印', false);
-      } else if (selectedPrinter == null || selectedPrinter.length == 0) {
+      } else if (!this.selectedPrinterTitle) {
         Notify.error('提示', '请先选择打印机。', false);
         return;
-      } else {
-        _self.loading=true;
-        var inventoryIds = [];
-        _self.checkboxModel.forEach(function (item) {
-          inventoryIds.push(item.inventoryInstanceId);
-        });
-
-        InventoryInstancePrintResource.print(inventoryIds).then(
-          baseListResponse => {
-            if (baseListResponse.errorCode == 0) {
-              _self.loading=false;
-              var contents = [];
-              baseListResponse.datas.forEach(function (item) {
-                var printItem = {
-                  id: null,
-                  name: null,
-                  content: item,
-                };
-                if (
-                  printItem.content == null ||
-                  printItem.content.printItems == null ||
-                  printItem.content.printItems.length == 0
-                ) {
-                  Notify.error('错误', '打印模板无数据,不能打印。');
-                  return;
-                }
-                var content = JSON.stringify(printItem.content);
-                if (content == null || content == '' || content == '{}') {
-                  Notify.error('错误', '请先选择模板,再点击下载。');
-                  return;
-                }
-                contents.push(printItem.content);
-              });
-              PrintUtil.printPrintPages(contents, selectedPrinter);
-            }
-          },
-          errorData => {
-            _self.loading=false;
-            Common.processException(errorData);
-          },
-        );
-
-        // 延时 2 秒钟再进行打印
-        var timer1 = window.setTimeout(function () {
-          _self.loadNeedPrintInventoryInstance();
-          _self.checkboxModel = [];
-          window.clearTimeout(timer1);
-        }, 2000);
       }
+      this.loading = true;
+      const inventoryIds = this.checkboxModel.map(item => item.inventoryInstanceId);
+      InventoryInstancePrintResource.print(inventoryIds).then(
+        baseListResponse => {
+          if (baseListResponse.errorCode === 0) {
+            this.loading = false;
+            const contents = [];
+            baseListResponse.datas.forEach(item => {
+              const printItem = {
+                id: null,
+                name: null,
+                content: item,
+              };
+              if (
+                !printItem.content ||
+                !printItem.content.printItems ||
+                printItem.content.printItems.length === 0
+              ) {
+                Notify.error('错误', '打印模板无数据,不能打印。');
+                return;
+              }
+              const content = JSON.stringify(printItem.content);
+              if (!content || content === '{}') {
+                Notify.error('错误', '请先选择模板,再点击下载。');
+                return;
+              }
+              contents.push(printItem.content);
+            });
+            PrintUtil.printPrintPages(contents, this.selectedPrinterTitle);
+          }
+        },
+        errorData => {
+          this.loading = false;
+          Common.processException(errorData);
+        },
+      );
+      setTimeout(() => {
+        this.loadNeedPrintInventoryInstance();
+        this.checkboxModel = [];
+      }, 2000);
     },
-
-    /**
-     * 打印PDF条码
-     * @return {[type]} [description]
-     */
     printPdf: function () {
-      var _self = this;
-      if (_self.checkboxModel.length == 0) {
+      if (this.checkboxModel.length === 0) {
         Notify.notice('提示', '请至少选择一项打印', false);
         return;
       }
-      _self.loading=true;
-
-      //    ProcessReportResource.runProcessByIds(287681, _self.checkboxModel).then(
-      //      successData => {
-      //        _self.loading=false;
-      //        _self.$refs.modal.show = true;
-      //        _self.processReportResult = successData;
-      //      },
-      //      errorData => {
-      //        _self.loading=false;
-      //        Common.processException(errorData);
-      //      },
-      //    );
-    },
-
-    // 未打印全选
-    checkedAll: function (event) {
-      var _self = this;
-      if (event.currentTarget.checked) {
-        _self.checkboxModel.splice(0, _self.checkboxModel.length);
-        _self.inventoryInstances.forEach(function (item) {
-          _self.checkboxModel.push(item);
-        });
-      } else {
-        _self.checkboxModel.splice(0, _self.checkboxModel.length);
-      }
+      this.loading = true;
     },
-
-    // 键盘回车事件
     keydown: function () {
-      var _self = this;
-      document.onkeydown = function (event) {
-        var currentEvent = event || window.event || arguments[0];
-        if (currentEvent && currentEvent.keyCode == 13) {
-          currentEvent.preventDefault();
-          _self.loadNeedPrintInventoryInstance();
+      document.addEventListener('keydown', event => {
+        if (event.key === 'Enter') {
+          event.preventDefault();
+          this.loadNeedPrintInventoryInstance();
         }
-      };
+      });
     },
   },
 };
 </script>
 
 <style scoped>
-table.fixed-table tr th {
-  text-align: center;
-}
-.myTable {
-  margin-top: 10px;
-  border-left: 1px solid #c9c9c9;
-  border-top: 1px solid #c9c9c9;
-  border-collapse: collapse;
-  width: 100%;
-}
-.myTable th {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  padding: 10px 0px;
-  font-size: 18px;
-  font-family: "宋体";
-  text-align: center;
-}
-
-.myTable td {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  background: #fff;
-  padding: 6px 0px;
-  font-size: 16px;
-  line-height: 20px;
-  color: #676767;
-  text-align: center;
-}
-.m-form-group {
-  margin-bottom: 5px;
-  margin-top: 5px;
-}
-
-.m-form-label {
-  width: 120px;
-  text-align: right;
-  padding-right: 6px;
-}
-
-.m-form-control {
-  width: 150px;
-}
-
-div.panel {
-  margin-top: 15px;
-}
-
-tbody > tr:hover {
-  background-color: #c0c0c0;
-}
-
-input[type="checkbox"] {
-  display: none;
-}
-input#checkAll {
-  display: inline-block;
-  width: 1.2em;
-  height: 1.2em;
-  border: 1px solid black;
-  border-radius: 2px;
-}
-input[type="checkbox"] + label {
-  width: 1.2em;
-  height: 1.2em;
-  border: 1px solid black;
-  border-radius: 2px;
-  position: relative;
-}
-
-input[type="checkbox"] + label:hover {
-  cursor: pointer;
-}
-
-input[type="checkbox"]:checked + label::before {
-  content: "\2714";
-  background-color: yellowgreen;
-  position: absolute;
-  top: -2px;
-  left: -2px;
-  right: -2px;
-  bottom: -2px;
-  border-radius: 3px;
-  border: 1px solid black;
-  font-size: 1.9em;
-  line-height: 10px;
-}
+  .ant-form-item {
+    margin-bottom: 0px;
+  }
 </style>

+ 208 - 510
src/print/PackInventoryInstance.vue

@@ -1,455 +1,180 @@
 <template>
-  <div class="container-fluid">
+  <a-layout class="pack-container">
     <Navbar title="采购订单明细信息" :is-go-back="true" />
-    <!-- <div class="h2" style="margin-left: -25px;"> <span class="glyphicon glyphicon-print"></span> 采购订单打印
-		<small>
-			<span class="text-muted">查询订单</span> <span class="glyphicon glyphicon-arrow-right small"></span> <span class="text-primary"><strong>包装物料</strong></span>
-		</small>
-		<div class="small pull-right" @click="goBack" style="margin-left:20px;"><span class="glyphicon glyphicon-log-out"></span>返回</div>
-	</div> -->
-
-    <div class="flex-container" style="margin-top: 10px">
-      <div class="form-inline">
-        <div class="form-group">
-          <label style="width: 7em">存货名称</label>
-          <input
-            v-model="packData.inventoryName"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">存货编号</label>
-
-          <input
-            v-model="packData.inventoryCode"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">订单数量</label>
-
-          <input
-            v-model="packData.quantity"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">项目名称</label>
-
-          <input
-            v-model="packData.projectInventoryName"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">已打印包装件数</label>
-
-          <input
-            v-model="purchaseOrderLinePrint.printedInventoryInstanceCount"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">已打印物料总数</label>
-
-          <input
-            v-model="purchaseOrderLinePrint.printedInventoryInstanceQuantity"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">未打印包装件数</label>
-
-          <input
-            v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceCount"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-
-        <div class="form-group">
-          <label style="width: 7em">未打印物料总数</label>
-
-          <input
-            v-model="purchaseOrderLinePrint.notPrintedInventoryInstanceQuantity"
-            autocomplete="off"
-            type="text"
-            class="form-control"
-            disabled
-          />
-        </div>
-      </div>
-    </div>
-
-    <div class="m-row text-left">
-      <button
-        v-if="flag1 == 0"
-        type="button"
-        class="btn btn-info"
-        @click="addOnePackage"
-      >
-        添加包装
-      </button>
-      <button
-        v-if="flag1 == 1"
-        type="button"
-        class="btn btn-info active"
-        style="box-shadow: 0 0 8px black"
-        @click="addOnePackage"
-      >
-        添加包装<span class="badge">{{ packages.length }}</span>
-      </button>
-      <button
-        v-if="flag2 == 0"
-        type="button"
-        class="btn btn-info"
-        @click="addPackages"
-      >
-        快速添加多个包装
-      </button>
-      <button
-        v-if="flag2 == 1"
-        type="button"
-        class="btn btn-info active"
-        style="box-shadow: 0 0 8px black"
-        @click="addPackages"
-      >
-        快速添加多个包装
-      </button>
-      <button type="button" class="btn btn-danger" @click="clearAllPackaged">
-        删除所有包装
-      </button>
-      <button type="button" class="btn btn-primary" @click="goToPrintPage">
-        开始打印
-        <span class="badge">{{ notPrintCount }}</span>
-      </button>
-      <button type="button" class="btn btn-success" @click="goPrinted">
-        补打
-      </button>
-    </div>
-
-    <transition name="fade11">
-      <div
-        v-if="flag1 == 1"
-        class="panel panel-info panel1"
-        style="box-shadow: 0 0 8px black"
-      >
-        <div class="panel-heading">
-          添加包装(注意:包装内物料数量为必填项,批号为可选项)
-        </div>
-        <div class="panel-body">
-          <table class="table">
-            <thead>
-              <tr>
-                <th>序号</th>
-                <th>包装内物料数量</th>
-                <th>批次号</th>
-                <th>
-                  <button class="btn btn-sm btn-danger" @click="clearPackages">
-                    清空
-                  </button>
-                </th>
-              </tr>
-            </thead>
-            <tbody class="table1">
-              <transition
-                v-for="(item, index) in packages"
-                :key="item.id"
-                name="fadeTr"
-              >
-                <tr class="form-inline" style="margin-bottom: 5px">
-                  <td>包装{{ index + 1 }}:</td>
-                  <td>
-                    <input
-                      v-model="item.quantity"
-                      autocomplete="off"
-                      type="text"
-                      name="quantity"
-                      class="form-control"
-                    />
-                  </td>
-                  <td>
-                    <input
-                      v-model="item.batchNo"
-                      autocomplete="off"
-                      type="text"
-                      name="batchNo"
-                      class="form-control"
-                    />
-                  </td>
-                  <td>
-                    <button
-                      class="btn btn-danger btn-sm"
-                      @click="deleteOne(index)"
-                    >
-                      删除
-                    </button>
-                  </td>
-                </tr>
-              </transition>
-            </tbody>
-          </table>
-
-          <div class="text-center">
-            <div>
-              <button class="btn btn-primary" @click="saveOnePack">确定</button>
-              <button class="btn btn-danger" @click="cancelOnePack">
-                取消
-              </button>
-            </div>
-          </div>
-        </div>
-      </div>
-    </transition>
-
-    <transition name="fade22">
-      <div
-        v-if="flag2 == 1"
-        class="panel panel-info panel2"
-        style="box-shadow: 0 0 8px black"
+
+    <a-layout-content class="content">
+      <!-- 基本信息卡片 -->
+      <a-card class="info-card">
+        <a-row :gutter="16">
+          <a-col :span="6">
+            <a-input v-model:value="packData.inventoryName" disabled addon-before="存货名称" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.inventoryCode" disabled addon-before="存货编号" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.quantity" disabled addon-before="订单数量" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.projectInventoryName" disabled addon-before="项目名称" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.printedInventoryInstanceCount" disabled addon-before="已打印包装件数" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.printedInventoryInstanceQuantity" disabled addon-before="已打印物料总数" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.notPrintedInventoryInstanceCount" disabled addon-before="未打印包装件数" />
+          </a-col>
+          <a-col :span="6">
+            <a-input v-model:value="packData.notPrintedInventoryInstanceQuantity" disabled addon-before="未打印物料总数" />
+          </a-col>
+        </a-row>
+      </a-card>
+
+      <!-- 操作按钮组 -->
+      <a-space class="action-btns">
+        <a-button 
+          :type="flag1 ? 'primary' : 'default'"
+          @click="togglePackageMode('single')"
+        >
+          添加包装{{ flag1 ? `(${packages.length})` : '' }}
+        </a-button>
+        <a-button 
+          :type="flag2 ? 'primary' : 'default'"
+          @click="togglePackageMode('multiple')"
+        >
+          快速添加多个包装
+        </a-button>
+        <a-button danger @click="clearAllPackaged">删除所有包装</a-button>
+        <a-button type="primary" @click="goToPrintPage">
+          开始打印<span v-if="notPrintCount">({{ notPrintCount }})</span>
+        </a-button>
+      </a-space>
+
+      <!-- 单包装表单 -->
+      <a-card 
+        v-if="flag1" 
+        title="添加包装(注意:包装内物料数量为必填项,批号为可选项)"
+        class="package-form"
       >
-        <div class="panel-heading">
-          快速添加多个包装(注意:包装数量为必填项,批号为可选项)
-        </div>
-        <div class="panel-body">
-          <table class="table">
-            <tbody>
-              <tr class="form-inline">
-                <td>
-                  <label>包装数量:</label>
-                  <input
-                    v-model="saveMoreQuantity"
-                    autocomplete="off"
-                    type="text"
-                    name="saveMoreQuantity"
-                    class="form-control"
-                  />
-                </td>
-                <td>
-                  <label>包装内物料数量:</label>
-                  <input
-                    v-model="packageQuantity"
-                    autocomplete="off"
-                    type="text"
-                    name="packageQuantity"
-                    class="form-control"
-                  />
-                </td>
-                <td>
-                  <label>批次号:</label>
-                  <input
-                    v-model="batchNo"
-                    autocomplete="off"
-                    type="text"
-                    name="batchNo"
-                    class="form-control"
-                  />
-                </td>
-              </tr>
-            </tbody>
-          </table>
-          <div class="text-center">
-            <div>
-              <button class="btn btn-primary" @click="saveMorePack">
-                确定
-              </button>
-              <button class="btn btn-danger" @click="cancelMorePack">
-                取消
-              </button>
-            </div>
-          </div>
-        </div>
-      </div>
-    </transition>
-
-    <div
-      v-if="inventoryInstances.length > 0 || buttonText == 1"
-      class="flex-content"
-      style="margin-top: -10px"
-    >
-      <div>
-        <select
-          v-model="buttonText"
-          class="form-control input pull-left"
-          style="width: 9em"
+        <a-table 
+          :data-source="packages" 
+          :columns="packageColumns"
+          :pagination="false"
         >
-          <option value="0">显示全部</option>
-          <option value="1">显示未打印</option>
-        </select>
-      </div>
-      <div style="padding-top: 40px">
-        <table id="table-width" class="table table-bordered">
-          <thead height="40px">
-            <tr>
-              <th>序号</th>
-              <th>批号</th>
-              <th>包装创建时间</th>
-              <th>包装条码</th>
-              <th>包装内物料数量</th>
-              <th>打印次数</th>
-              <th>打印状态</th>
-              <th>删除</th>
-            </tr>
-          </thead>
-          <tbody class="table1">
-            <template v-for="(item, index) in inventoryInstances">
-              <tr v-if="buttonText == 0" :key="item.id">
-                <td>{{ index + 1 }}</td>
-                <td>{{ item.batchNo }}</td>
-                <td>{{ item.createDate }}</td>
-                <td>{{ item.barCode }}</td>
-
-                <td
-                  style="cursor: pointer; text-decoration: underline"
-                  title="单击修改数量"
-                  @click="changeQty(item)"
-                >
-                  {{ item.quantity }}
-                </td>
-
-                <td>{{ item.printCount }}</td>
-                <td v-if="item.printStatus == 0">未打印</td>
-                <td v-else-if="item.printStatus == 1">未打印</td>
-                <td v-else>已打印</td>
-                <td>
-                  <button
-                    type="button"
-                    class="btn btn-danger btn-sm"
-                    @click="deleteOnePack(item)"
-                  >
-                    删除
-                  </button>
-                </td>
-              </tr>
+          <template #bodyCell="{ column, index }">
+            <template v-if="column.dataIndex === 'index'">
+              {{ index + 1 }}
             </template>
-
-            <template v-for="(item, index) in inventoryInstances">
-              <tr
-                v-if="buttonText == 1 && item.printStatus == 1"
-                :key="item.id"
-              >
-                <td>{{ index + 1 }}</td>
-                <td>{{ item.batchNo }}</td>
-                <td>{{ item.createDate }}</td>
-                <td>{{ item.barCode }}</td>
-                <td
-                  style="cursor: pointer; text-decoration: underline"
-                  @click="changeQty(item)"
-                >
-                  {{ item.quantity }}
-                </td>
-                <td>{{ item.printCount }}</td>
-                <td>未打印</td>
-                <td>
-                  <button
-                    type="button"
-                    class="btn btn-danger btn-sm"
-                    @click="deleteOnePack(item)"
-                  >
-                    删除
-                  </button>
-                </td>
-              </tr>
+            <template v-if="column.dataIndex === 'quantity'">
+              <a-input-number 
+                v-model:value="packages[index].quantity"
+                :min="1"
+                :max="unPackQuantity"
+                class="full-width"
+              />
             </template>
-          </tbody>
-        </table>
-      </div>
-    </div>
-
-    <Modal v-model:show="modal" :show-canel-button="false" :show-ok-button="false">
-      <template #header>
-        <button type="button" class="close" data-dismiss="modal">
-          <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
-        </button>
-        <h4 class="modal-title">修改包装内物料数量</h4>
-      </template>
-      <div>
-        <input id="inventoryInstanceId" autocomplete="off" type="hidden" value="" />
-        <div class="row header-row packModal">
-          <div class="col-md-2">
-            <div class="form-control-label">请输入新的数量:</div>
-          </div>
-          <div class="col-md-4">
-            <input
-              id="pack-changeQty"
-              v-model="quantity"
-              autocomplete="off"
-              class="form-control"
-              type="text"
-            />
-          </div>
-        </div>
-      </div>
-
+            <template v-if="column.dataIndex === 'batchNo'">
+              <a-input 
+                v-model:value="packages[index].batchNo"
+                placeholder="请输入批次号"
+              />
+            </template>
+            <template v-if="column.dataIndex === 'actions'">
+              <a-button danger @click="deleteOne(index)">删除</a-button>
+            </template>
+          </template>
+        </a-table>
+        <a-space class="action-btns" style="margin-top: 16px">
+          <a-button type="primary" @click="saveOnePack">确定</a-button>
+          <a-button danger @click="cancelOnePack">取消</a-button>
+        </a-space>
+      </a-card>
+
+      <!-- 批量添加包装表单 -->
+      <a-card 
+        v-if="flag2" 
+        title="快速添加多个包装(注意:包装数量为必填项,批号为可选项)"
+        class="package-form"
+      >
+        <a-row :gutter="16">
+          <a-col :span="8">
+            <a-form-item label="包装数量:">
+              <a-input-number 
+                v-model:value="saveMoreQuantity"
+                :min="1"
+                class="full-width"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item label="物料数量:">
+              <a-input-number 
+                v-model:value="packageQuantity"
+                :min="1"
+                class="full-width"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-item label="批次号:">
+              <a-input 
+                v-model:value="batchNo"
+                placeholder="请输入批次号"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-space class="action-btns">
+          <a-button type="primary" @click="saveMorePack">确定</a-button>
+          <a-button danger @click="cancelMorePack">取消</a-button>
+        </a-space>
+      </a-card>
+    </a-layout-content>
+
+    <!-- 修改数量弹窗 -->
+    <a-modal v-model:open="modalVisible" title="修改包装内物料数量">
+      <a-input-number 
+        v-model:value="quantity"
+        :min="1"
+        class="full-width"
+      />
       <template #footer>
-        <button
-          id="cancel-btn-changeQty"
-          type="button"
-          class="btn btn-default"
-          @click="cancelChangeQty"
-        >
-          取消
-        </button>
-        <button
-          id="saveQty-btn-changeQty"
-          type="button"
-          class="btn btn-primary"
-          @click="saveChangeQty"
-        >
-          保存
-        </button>
+        <a-button @click="cancelChangeQty">取消</a-button>
+        <a-button type="primary" @click="saveChangeQty">确定</a-button>
       </template>
-    </Modal>
-    <!-- +修改数量模态框END -->
-    <Loading v-if="loading" />
-  </div>
+    </a-modal>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
-
-
-
 import PurchaseOrderLineResource from '../api/wms/PurchaseOrderLineResource.js';
 import InventoryInstancePrintResource from '../api/wms/InventoryInstancePrintResource.js';
 import InventoryInstanceWmsResource from '../api/wms/InventoryInstanceWmsResource.js';
 
+const columns = [
+  { title: '序号', dataIndex: 'index', width: 80 },
+  { title: '批号', dataIndex: 'batchNo', width: 120 },
+  { title: '创建时间', dataIndex: 'createDate', width: 180 },
+  { title: '包装条码', dataIndex: 'barCode', width: 200 },
+  { title: '物料数量', key: 'quantity', width: 120 },
+  { title: '打印次数', dataIndex: 'printCount', width: 100 },
+  { title: '打印状态', dataIndex: 'printStatus', width: 120 },
+  { title: '操作', key: 'actions', width: 100 },
+];
 
 export default {
-  components: {
-    
+  components: {   
     
     
   },
   emits: ['changePage'],
   data: function () {
     return {
+      columns,
       purchaseOrderLineId: '',
       packData: {},
       purchaseOrderLinePrint: {},
@@ -472,10 +197,21 @@ export default {
       batchNo: null,
       loading: false,
       modal: false,
+      packageColumns: [
+        { title: '序号', dataIndex: 'index', width: 80 },
+        { title: '包装数量', dataIndex: 'quantity', width: 150 },
+        { title: '批次号', dataIndex: 'batchNo', width: 200 },
+        { title: '操作', dataIndex: 'actions', width: 120 },
+      ],
     };
   },
 
   computed: {
+    filteredInstances() {
+      return this.inventoryInstances.filter(item => 
+        this.buttonText === 0 || item.printStatus === 1,
+      ).map((item, index) => ({ ...item, index: index + 1 }));
+    },
     //剩余最大可包装的数量
     unPackQuantity: function () {
       var _self = this;
@@ -575,21 +311,41 @@ export default {
       this.deletePack(item.id);
       Notify.success('操作成功', '该包装已被删除', 1500);
     },
-    addOnePackage: function () {
+    // 添加缺失的包装模式切换方法
+    togglePackageMode(mode) {
+      if (mode === 'single') {
+        this.flag1 = !this.flag1;
+        this.flag2 = 0;
+        if (this.flag1) {
+          this.addOnePackage();
+        } else {
+          this.cancelOnePack();
+        }
+      } else if (mode === 'multiple') {
+        this.flag2 = !this.flag2;
+        this.flag1 = 0;
+        if (this.flag2) {
+          this.addPackages();
+        } else {
+          this.cancelMorePack();
+        }
+      }
+    },
+
+    // 修复原有添加方法
+    addOnePackage() {
       if (this.flag2 == 1) {
         this.flag2 = 0;
-        this.packages.splice(0, this.packages.length);
+        this.packages = [];
       }
-      var newPackage = {
-        quantity: null,
+      const newPackage = {
+        quantity: null,      // 改为允许输入null值
         purchaseOrderLineId: this.purchaseOrderLineId,
-        batchNo: null,
+        batchNo: '',         // 改为空字符串初始化
       };
-      this.packages.push(newPackage);
-      if (this.packages.length > 0) {
-        this.flag1 = 1;
-      }
-    },
+      this.packages = [...this.packages, newPackage];
+      this.flag1 = 1;
+    },  
 
     cancelOnePack: function () {
       this.flag1 = 0;
@@ -930,85 +686,27 @@ export default {
 </script>
 
 <style scoped>
-table.fixed-table tr th {
-  text-align: center;
-}
-.myTable {
-  margin-top: 10px;
-  border-left: 1px solid #c9c9c9;
-  border-top: 1px solid #c9c9c9;
-  border-collapse: collapse;
-  width: 100%;
-}
-.myTable th {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  padding: 10px 0px;
-  font-size: 18px;
-  font-family: "宋体";
-  text-align: center;
+.pack-container {
+  background: #f0f2f5;
+  min-height: 100vh;
 }
 
-.myTable td {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  background: #fff;
-  padding: 6px 0px;
-  font-size: 16px;
-  line-height: 20px;
-  color: #676767;
-  text-align: center;
-}
-.form-group,
-.packModal {
-  margin-bottom: 10px;
+.info-card {
+  margin-bottom: 16px;
+  :deep(.ant-card-body) {
+    padding: 16px;
+  }
 }
 
-.m-form-group {
-  margin-bottom: 5px;
-  margin-top: 5px;
+.action-btns {
+  margin: 16px 0;
 }
 
-.m-form-label {
-  width: 120px;
-  text-align: right;
-  padding-right: 6px;
+.package-form {
+  margin-bottom: 24px;
 }
 
-.m-form-control {
-  width: 160px;
-}
-
-div.small:hover {
-  cursor: pointer;
-  color: blue;
-}
-
-select.input-sm {
-  width: 100px;
-  height: 18px;
-  border-radius: 4px;
-  padding: 0;
-}
-
-tbody.table1 > tr:hover {
-  background-color: #c0c0c0;
-}
-div.changeCursor input {
-  cursor: default;
-}
-.fade11-enter,
-.fade22-enter {
-  transform: rotateX(-90deg) scale(0);
-  transform-origin: top;
-}
-.fade11-enter-to,
-.fade22-enter-to {
-  transform: rotateX(0deg) scale(1);
-  transform-origin: top;
-}
-.fade11-enter-active,
-.fade22-enter-active {
-  transition: all 0.2s;
+.full-width {
+  width: 100%;
 }
 </style>

+ 119 - 369
src/print/PositionPrint.vue

@@ -1,417 +1,167 @@
-/**
- * 货位打印
- */
 <template>
-  <div class="container-fluid">
-    <Navbar
-      title="货位标签打印"
-      :is-go-back="false"
-    />
-    <div
-      class="flex-container"
-      style="margin-top: 10px;"
-    >
-      <div class="flex-header">
-        <div>
-          <div
-            class="form-inline"
-            role="form"
-          >
-            <PrintWidget
-              ref="printWidget"
-              :printer-localstorage-id="'#PositionPrinterPrinter'"
-            />
-
-            <div class="form-group">
-              <input
-                v-model="message"
-                autocomplete="off"
-                type="text"
-                class="form-control"
-                placeholder="请输入要打印货位的名称或条形码码"
-                aria-describedby="basic-addon"
-                style="width:350px;"
-                @keyup.enter="queryPosition"
-              />
-            </div>
-            <div class="form-group">
-              <button
-                class="btn btn-default"
-                @click="queryPosition"
-              >
-                查询
-              </button>
-              <button
-                class="btn btn-default"
-                @click="$refs.printEpc.show()"
-              >
-                调试发卡机
-              </button>
-            </div>
-          </div>
-        </div>
+  <a-layout class="container">
+    <a-layout-header class="header">
+      <Navbar title="货位标签打印" :is-go-back="false" />
+    </a-layout-header>
+
+    <a-layout-content class="content">
+      <!-- 新增工具栏容器 -->
+      <div class="toolbar">
+        <PrintWidget
+          ref="printWidget"
+          :printer-localstorage-id="'#PositionPrinterPrinter'"
+        />
+        <a-space :size="16">
+          <a-input-search
+            v-model:value="message"
+            placeholder="请输入要打印货位的名称或条形码码"
+            style="width: 350px"
+            @search="queryPosition"
+          />
+          <a-button @click="$refs.printEpc.show()">调试发卡机</a-button>
+        </a-space>
       </div>
-      <div
-        class="flex-content table-fix-head"
-        style="margin-top: 10px;"
+      <a-table
+        :columns="columns"
+        :data-source="positions"
+        :pagination="pagination"
+        :scroll="{ x: 1200, y: '60vh' }"
+        row-key="positionId"
+        @change="handleTableChange"
       >
-        <table class="fixed-table table-striped table-bordered">
-          <thead>
-            <tr>
-              <th
-                style="width: 50px; min-width: 40px;"
-                class="fixed-cell"
-              >
-                序号
-              </th>
-              <th
-                style="width: 150px; min-width: 100px;"
-                class="fixed-cell"
-              >
-                货位编码
-              </th>
-              <th
-                style="width: 150px; min-width: 100px;"
-                class="fixed-cell"
-              >
-                货位名称
-              </th>
-              <th
-                style="width: 150px; min-width: 100px;"
-                class="fixed-cell"
-              >
-                货位条形码
-              </th>
-              <th
-                style="width: 150px; min-width: 100px;"
-                class="fixed-cell"
-              >
-                仓库名称
-              </th>
-              <th style="width: 60px; min-width: 40px;">
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  style="width: 100%"
-                  @click="printAllPosition()"
-                >
-                  全部打印
-                </button>
-              </th>
-            </tr>
-          </thead>
-          <tbody class="table1">
-            <tr v-for="(position, index) in positions" :key="position.id">
-              <td>
-                {{ index + 1 + (pagination2.current_page-1) * pagination2.per_page }}
-              </td>
-              <td>
-                {{ position.positionName }}
-              </td>
-              <td>
-                {{ position.positionNo }}
-              </td>
-              <td>
-                {{ position.positionBarCode }}
-              </td>
-              <td>
-                {{ position.warehouseName }}
-              </td>
-              <td>
-                <button
-                  type="button"
-                  class="btn btn-default"
-                  style="width: 100%"
-                  @click="printPosition(position)"
-                >
-                  打印
-                </button>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="flex-footer">
-        <div>
-          <div class="form-group">
-            <div class="pull-left">
-              共查询到<b>{{ pagination2.total }}</b>条数据
-            </div>
-            <div class="pull-right">
-              <VueBootstrapPagination
-                v-if="pagination2.last_page > 0"
-                :pagination="pagination2"
-                :callback="queryPosition"
-              />
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
+        <template #bodyCell="{ column, record, index }">
+          <template v-if="column.dataIndex === 'index'">
+            {{ (pagination.current - 1) * pagination.pageSize + index + 1 }}
+          </template>
+          <template v-if="column.dataIndex === 'operation'">
+            <a-button type="link" @click="printPosition(record)">打印</a-button>
+          </template>
+        </template>
+      </a-table>
+    </a-layout-content>
 
     <PrintEpc ref="printEpc" />
     <Loading v-if="loading" />
-  </div>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import { PrintUtil } from 'pc-component-v3';
 
-
-
-
-
-
-
-
-
 export default {
-  components: {
-    
-    
-    
-    
-    
-    
-    
-  },
-  data: function () {
+  data() {
     return {
       message: '',
-      recordIds: [],
-      historys: [],
-      savePositionName: '',
-      field1: {
-        name: '',
-        listFieldNames: 'name',
-      },
-      fieldValue1: {
-        id: {},
-        displayValue: [''],
-        fieldType: 'Key',
-      },
-      field2: {
-        name: '',
-        listFieldNames: 'name',
-      },
-      fieldValue2: {
-        id: {},
-        displayValue: [''],
-        fieldType: 'Key',
-      },
       positions: [],
-      pagination2: {
+      pagination: {
+        current: 1,
+        pageSize: Common.pageSize,
         total: 0,
-        per_page: Common.pageSize, // required
-        current_page: 1, // required
-        last_page: 0, // required
+        showSizeChanger: true,
+        pageSizeOptions: ['20', '30', '50', '100'],
       },
-      isUpdatePage: true,
+      columns: [
+        { title: '序号', dataIndex: 'index', width: 80, fixed: 'left' },
+        { title: '货位编码', dataIndex: 'positionName', width: 150 },
+        { title: '货位名称', dataIndex: 'positionNo', width: 150 },
+        { title: '货位条形码', dataIndex: 'positionBarCode', width: 150 },
+        { title: '仓库名称', dataIndex: 'warehouseName', width: 150 },
+        { 
+          title: '操作', 
+          dataIndex: 'operation',
+          fixed: 'right',
+          width: 120,
+        },
+      ],
       loading: false,
     };
   },
-  mounted: function () {
-    var _self = this;
-    _self.queryPosition();
+  mounted() {
+    this.queryPosition();
   },
-
   methods: {
+    // 查询功能(保持原有逻辑)
+    queryPosition() {
+      const params = {
+        message: this.message.trim(),
+        start: (this.pagination.current - 1) * this.pagination.pageSize,
+        length: this.pagination.pageSize,
+      };
 
-    //打印全部货位
-    printAllPosition: function () {
-      var _self = this;
-      let selectedPrinter = _self.$refs.printWidget.getSelectedPrinterName();
-      if (selectedPrinter == null || selectedPrinter.length == 0) {
-        Notify.error('提示', '请先选择打印机。', false);
-        return;
-      }
-      var ids = [];
-      this.positions.forEach(function (item) {
-        ids.push(item.positionId);
+      $.ajax({
+        url: Common.getApiURL('positionResource/queryByNameOrNo'),
+        data: params,
+        beforeSend: Common.addTokenToRequest,
+        success: data => {
+          this.positions = data.resultList;
+          this.pagination.total = data.maxCount;
+        },
+        error: Common.processException,
       });
-      var token = Common.getToken();
-      var url = Common.getApiURL('positionResource/printPosition?token=') + token + '&recordIds=' + ids;
-      _self.print(url, selectedPrinter);
     },
 
-    //打印货位
-    printPosition: function (position) {
-      var _self = this;
-      let selectedPrinter = _self.$refs.printWidget.getSelectedPrinterName();
-      if (selectedPrinter == null || selectedPrinter.length == 0) {
-        Notify.error('提示', '请先选择打印机。', false);
-        return;
-      }
-      var ids = [];
-      ids.push(position.positionId);
-      var token = Common.getToken();
-      var url = Common.getApiURL('positionResource/printPosition?token=') + token + '&recordIds=' + ids;
-      _self.print(url, selectedPrinter);
+    // 分页处理
+    handleTableChange(pagination) {
+      this.pagination = pagination;
+      this.queryPosition();
     },
 
-    //根据货位名称或编号查询
-    queryPosition: function () {
-      var _self = this;
-      var message = $.trim(this.message);
-      if (this.historys.length == 0) {
-        this.historys.unshift(message);
-      } else {
-        this.historys.unshift(message + '、 ');
-      }
-      if (this.historys.length > 10) {
-        this.historys.pop();
-      }
-      if (_self.message.length > 0 && !_self.isUpdatePage) {
-        _self.pagination2.current_page = 1;
-        _self.isUpdatePage = true;
-      } else if (_self.message.length <= 0) {
-        _self.isUpdatePage = false;
+    // 打印功能(保持原有逻辑)
+    printPosition(position) {
+      const selectedPrinter = this.$refs.printWidget.getSelectedPrinterName();
+      if (!selectedPrinter) {
+        Notify.error('提示', '请先选择打印机');
+        return;
       }
-      _self.positions.splice(0, _self.positions.length);
-      $.ajax({
-        url: Common.getApiURL('positionResource/queryByNameOrNo'),
-        type: 'get',
-        data: {
-          'message': message,
-          'start': (_self.pagination2.current_page - 1) * _self.pagination2.per_page,
-          'length': _self.pagination2.per_page,
-        },
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-        },
-        success: function (data) {
-          _self.positions = data.resultList;
-          _self.pagination2.total = data.maxCount;
-          _self.pagination2.last_page = Math.ceil(_self.pagination2.total / _self.pagination2.per_page);
-          _self.fixedTableHeader();
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
-        },
-      });
-    },
-    /**
-         * 打印文件
-         */
-    print: function (url, printerName) {
-      var _self = this;
-      var printData = [];
+
+      const url = Common.getApiURL(
+        `positionResource/printPosition?recordIds=${position.positionId}`,
+      );
+      
       $.ajax({
-        url: url,
-        dataType: 'json',
-        type: 'get',
-        contentType: 'application/json',
-        beforeSend: function (request) {
-          Common.addTokenToRequest(request);
-          _self.loading=true;
-        },
-        success: function (data) {
-          _self.loading=false;
-          if (data) {
-            var contents = [];
-            data.forEach(function (item) {
-              var printItem = {
-                id: null,
-                name: null,
-                content: item,
-              };
-              console.log(printItem);
-              if (printItem.content == null || printItem.content.printItems == null || printItem.content.printItems.length == 0) {
-                Notify.error('错误', '打印模板无数据,不能打印。');
-                return;
-              }
-              var content = JSON.stringify(printItem.content);
-              if (content == null || content == '' || content == '{}') {
-                Notify.error('错误', '请先选择模板,再点击下载。');
-                return;
-              }
-              contents.push(printItem.content);
-            });
-            PrintUtil.printPrintPages(contents, printerName);
-          }
-        },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
-          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        url,
+        beforeSend: Common.addTokenToRequest,
+        success: data => {
+          PrintUtil.printPrintPages(data, selectedPrinter);
         },
+        error: Common.processException,
       });
     },
-    /**
-        * 冻结表头
-        */
-    fixedTableHeader: function () {
-      let _self = this;
-
-      _self.$nextTick(function () {
-        var $th = $('.table-fix-head').find('thead');
-        var $fixedCell = $('.table-fix-head').find('.fixed-cell');
-        $('.table-fix-head').on('scroll', function () {
-          $th.css('transform', 'translateY(' + this.scrollTop + 'px)');
-          $fixedCell.css('transform', 'translateX(' + this.scrollLeft + 'px)');
-        });
-      });
-
-
-    },
   },
 };
 </script>
 
 <style scoped>
-.flex-container {
-    display: flex;
-    /* 垂直*/
-    flex-direction: column;
-    width: 100%;
-    /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-    height: calc(100vh - 140px);
-}
-
-.flex-header {
-    /*放大缩小比例为0 */
-    flex: 0 0 35px;
+.container {
+  height: 100vh;
 }
 
-.flex-footer {
-    height: 45px;
-    /*放大缩小比例为0 */
-    flex: 0 0 45px;
+.header {
+  padding: 0 24px;
+  background: #fff;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }
 
-.flex-content {
-    flex: 1;
-    overflow: scroll;
-    width: 100%;
-}
-
-.fixed-table {
-    table-layout: fixed;
-    word-wrap: break-word;
-    word-break: break-all;
-}
-</style>
-
-<style scoped>
-table.fixed-table th {
-    position: relative;
-
-    min-width: 10px;
+.search-bar {
+  margin: 16px 0;
+  padding: 0 24px;
 }
 
-table tr td:first-child,
-table tr th:first-child {
-    text-align: center;
+.toolbar {
+  margin-bottom: 16px;
+  display: flex;
+  align-items: center;
+  gap: 24px;
+  padding: 12px;
+  background: #fafafa;
+  border-radius: 4px;
 }
 
-table.fixed-table th,
-table.fixed-table td {
-    text-align: left;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-    padding: 0.1em;
-    border-right: 1px solid rgba(0, 0, 0, 0.05);
-    background-color: white;
+.content {
+  padding: 24px;
+  background: #fff;
+  /* 调整高度计算 */
+  min-height: calc(100vh - 64px); /* 根据实际header高度调整 */
 }
-</style>
+</style>

+ 120 - 295
src/print/PrintedPurchaseOrder.vue

@@ -1,192 +1,121 @@
 <template>
-  <div class="container-fluid">
+  <a-layout class="container">
     <Navbar title="已打印" :is-go-back="true" />
-    <div class="flex-container" style="margin-top: 10px">
-      <div class="flex-header">
-        <div class="form-inline">
-          <PrintWidget
-            ref="printWidget"
-            :printer-localstorage-id="'#InventoryPrinterPrinter'"
-            @selected-printer-name="getPrintName"
-          />
-          <div class="form-group">
-            <label>采购订单号</label>
-            <input
-              v-model="documentNo"
-              autocomplete="off"
-              type="text"
-              placeholder="输入采购订单号"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>存货名称</label>
-            <input
-              v-model="inventoryName"
-              autocomplete="off"
-              type="text"
-              placeholder="输入存货档案名称"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>存货编码</label>
-            <input
-              v-model="inventoryCode"
-              autocomplete="off"
-              type="text"
-              placeholder="输入存货档案编码"
-              class="form-control"
-            />
-          </div>
-          <div class="form-group">
-            <label>规格型号</label>
-            <input
-              v-model="inventoryType"
-              autocomplete="off"
-              type="text"
-              placeholder="输入规格型号"
-              class="form-control m-form-control"
-            />
-          </div>
-        </div>
-        <div class="form-inline" style="margin-top: 10px">
-          <button
-            type="button"
-            class="btn btn-primary"
-            @click="loadPrintedInventoryInstance"
-          >
-            查询
-          </button>
-          <!-- <button type="button"
-                            class="btn btn-primary"
-                            @click="printInvoice">打印发货单</button> -->
-          <button type="button" class="btn btn-primary" @click="printBarCode">
-            打印条码
-          </button>
-          <button type="button" class="btn btn-primary" @click="printPdf">
-            打印PDF
-          </button>
-        </div>
-      </div>
-      <div class="flex-content">
-        <table
-          v-if="inventoryInstances.length > 0"
-          id="myTable"
-          class="table table-bordered"
-        >
-          <thead>
-            <tr>
-              <th>
-                <input
-                  id="checkAll"
-                  v-model="checkAll"
-                  autocomplete="off"
-                  type="checkbox"
-                  @click="checkedAll($event)"
-                />
-              </th>
-              <th>序号</th>
-              <th>订单编号</th>
-              <th>存货名称</th>
-              <th>存货编码</th>
-              <th>规格型号</th>
-              <th>创建日期</th>
-              <th>打印日期</th>
-              <th>条码</th>
-              <th>包装内物料数量</th>
-              <th>订单数量</th>
-              <th>打印状态</th>
-            </tr>
-          </thead>
-          <tbody id="table-notPrint">
-            <tr v-for="(item, index) in inventoryInstances" :key="item.id">
-              <td>
-                <input
-                  :id="item"
-                  v-model="checkboxModel"
-                  autocomplete="off"
-                  type="checkbox"
-                  :value="item"
-                /><label :for="item" />
-              </td>
-              <td>
-                {{
-                  (pagination.current_page - 1) * pagination.per_page +
-                    1 +
-                    index
-                }}
-              </td>
-              <td>{{ item.purchaseOrderDocumentNo }}</td>
-              <td>{{ item.inventoryName }}</td>
-              <td>{{ item.inventoryCode }}</td>
-              <td>{{ item.inventoryType }}</td>
-              <td>{{ item.createDate }}</td>
-              <td>{{ item.printedDate }}</td>
-              <td>{{ item.barCode }}</td>
-              <td>{{ item.printQuantity }}</td>
-              <td>{{ item.quantity }}</td>
-              <td>已打印</td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="flex-footer">
-        <VueBootstrapPagination
-          :pagination="pagination"
-          :callback="loadPrintedInventoryInstance"
+    <a-card :bordered="false">
+      <a-form layout="inline">
+        <PrintWidget
+          ref="printWidget"
+          :printer-localstorage-id="'#InventoryPrinterPrinter'"
+          @selected-printer-name="getPrintName"
         />
-      </div>
-
-      <Modal v-model:show="modal">
-        <ProcessReportResult :process-report-result="processReportResult" />
-        <template #header>执行结果</template>
-      </Modal>
-    </div>
+        <a-form-item label="采购订单号">
+          <a-input v-model:value="documentNo" placeholder="输入采购订单号" />
+        </a-form-item>
+        <a-form-item label="存货名称">
+          <a-input v-model:value="inventoryName" placeholder="输入存货档案名称" />
+        </a-form-item>
+        <a-form-item label="存货编码">
+          <a-input v-model:value="inventoryCode" placeholder="输入存货档案编码" />
+        </a-form-item>
+        <a-form-item label="规格型号">
+          <a-input v-model:value="inventoryType" placeholder="输入规格型号" />
+        </a-form-item>
+        <a-space :size="16">
+          <a-button type="primary" @click="loadPrintedInventoryInstance">查询</a-button>
+          <a-button type="primary" @click="printBarCode">打印条码</a-button>
+          <a-button type="primary" @click="printPdf">打印PDF</a-button>
+        </a-space>
+      </a-form>
+
+      <a-table
+        :data-source="inventoryInstances"
+        :columns="columns"
+        :row-key="record => record.id"
+        :pagination="pagination"
+        :row-selection="rowSelection"
+        class="table-container"
+        @change="handleTableChange"
+      >
+        <template #bodyCell="{ column, record, index }">
+          <template v-if="column.dataIndex === 'index'">
+            {{ (pagination.current - 1) * pagination.pageSize + index + 1 }}
+          </template>
+          <template v-else-if="column.dataIndex === 'printStatus'">已打印</template>
+          <template v-else>{{ record[column.dataIndex] }}</template>
+        </template>
+      </a-table>
+    </a-card>
+
+    <Modal v-model:show="modal">
+      <ProcessReportResult :process-report-result="processReportResult" />
+      <template #header>执行结果</template>
+    </Modal>
     <Loading v-if="loading" />
-  </div>
+  </a-layout>
 </template>
 
+
 <script>
 import Common from '../common/Common.js';
-
-
-
-
-
-
 import InventoryInstancePrintResource from '../api/wms/InventoryInstancePrintResource.js';
-
 import { PrintUtil } from 'pc-component-v3';
+import { ref, reactive } from 'vue';
 
 
 export default {
   name: 'PrintedPurchaseOrder',
   components: {
     
+  },
+  setup() {
+    const pagination = reactive({
+      current: 1,
+      pageSize: 30,
+      total: 0,
+      showTotal: total => `共 ${total} 条`,
+    });
+
+    return { pagination };
   },
   data: function () {
     return {
+      documentNo: '',
       inventoryName: '',
       inventoryCode: '',
       inventoryType: '',
-      documentNo: '',
       inventoryInstances: [],
-      checkboxModel: [], //获取选项框数据
-      checkAll: '', //全选,
-      reportResult: {},
-      pagination: {
-        total: 0,
-        per_page: 30,
-        current_page: 1,
-        last_page: 10,
-      },
+      checkboxModel: [],
       processReportResult: {},
       loading: false,
       modal: false,
-      selectedPrinterTitle:'',
+      selectedPrinterTitle: '',
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '订单编号', dataIndex: 'purchaseOrderDocumentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编码', dataIndex: 'inventoryCode' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '创建日期', dataIndex: 'createDate' },
+        { title: '打印日期', dataIndex: 'printedDate' },
+        { title: '条码', dataIndex: 'barCode' },
+        { title: '包装内物料数量', dataIndex: 'printQuantity' },
+        { title: '订单数量', dataIndex: 'quantity' },
+        { title: '打印状态', dataIndex: 'printStatus' },
+      ],
     };
   },
+  computed: {
+    rowSelection() {
+      return {
+        selectedRowKeys: this.checkboxModel.map(item => item.id),
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.checkboxModel = selectedRows;
+        },
+        preserveSelectedRowKeys: true,
+      };
+    },
+  },
+
   watch: {
     // 反选
     checkboxModel: {
@@ -201,7 +130,7 @@ export default {
       deep: true,
     },
   },
-  mounted: function () {
+  mounted() {
     this.loadPrintedInventoryInstance();
     this.keydown();
   },
@@ -228,56 +157,32 @@ export default {
         ids.push(item.id);
       });
 
-      //    ProcessReportResource.runProcessByIds(287681, ids).then(
-      //      successData => {
-      //        _self.loading=false;
-      //        _self.$refs.modal.show = true;
-      //        _self.processReportResult = successData;
-      //        _self.checkboxModel = [];
-      //        _self.loadPrintedInventoryInstance();
-      //      },
-      //      errorData => {
-      //        _self.loading=false;
-      //        Common.processException(errorData);
-      //      },
-      //    );
     },
-    loadPrintedInventoryInstance: function () {
-      var _self = this;
-      var documentNo = _self.documentNo;
-      var inventoryName = _self.inventoryName;
-      var inventoryCode = _self.inventoryCode;
-      var inventoryType = _self.inventoryType;
-      // eslint-disable-next-line
-      InventoryInstancePrintResource.queryPrintedInventoryInstancePrint(
-        true,
-        _self.pagination.current_page,
-        _self.pagination.per_page,
-        inventoryName,
-        inventoryCode,
-        inventoryType,
-      ).then(
-        successData1 => {
-          if (successData1) {
-            _self.inventoryInstances = successData1.inventoryInstancePrintDtos;
-            //_self.checkboxModel.splice(0,_self.checkboxModel.length);
-            console.log(successData1);
-            // 分页相关
-            // eslint-disable-next-line
-            _self.pagination.total = successData1.totalCount;
-            // eslint-disable-next-line
-            _self.pagination.last_page =
-              successData1.totalCount % _self.pagination.per_page == 0
-                ? successData1.totalCount / _self.pagination.per_page
-                : Math.floor(
-                  successData1.totalCount / _self.pagination.per_page,
-                ) + 1;
-          }
-        },
-        errorData => {
-          Common.processException(errorData);
-        },
-      );
+    handleTableChange(pag) {
+      this.pagination.current = pag.current;
+      this.pagination.pageSize = pag.pageSize;
+      this.loadPrintedInventoryInstance();
+    },
+
+    async loadPrintedInventoryInstance() {
+      try {
+        var _self = this;
+        var documentNo = _self.documentNo;
+        var inventoryName = _self.inventoryName;
+        var inventoryCode = _self.inventoryCode;
+        var inventoryType = _self.inventoryType;
+
+        const data = await InventoryInstancePrintResource.queryPrintedInventoryInstancePrint(true,
+          _self.pagination.current,
+          _self.pagination.pageSize,
+          inventoryName,
+          inventoryCode,
+          inventoryType);
+        this.inventoryInstances = data.inventoryInstancePrintDtos;
+        this.pagination.total = data.totalCount;
+      } catch (error) {
+        Common.processException(error);
+      }
     },
     //打印条码
     printBarCode: function () {
@@ -396,90 +301,10 @@ export default {
 </script>
 
 <style scoped>
-table.fixed-table tr th {
-  text-align: center;
-}
-.myTable {
-  margin-top: 10px;
-  border-left: 1px solid #c9c9c9;
-  border-top: 1px solid #c9c9c9;
-  border-collapse: collapse;
-  width: 100%;
-}
-.myTable th {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  padding: 10px 0px;
-  font-size: 18px;
-  font-family: "宋体";
-  text-align: center;
-}
-
-.myTable td {
-  border-right: 1px solid #c9c9c9;
-  border-bottom: 1px solid #c9c9c9;
-  background: #fff;
-  padding: 6px 0px;
-  font-size: 16px;
-  line-height: 20px;
-  color: #676767;
-  text-align: center;
-}
-.m-form-group {
-  margin-bottom: 5px;
-  margin-top: 5px;
-}
-
-.m-form-label {
-  width: 120px;
-  text-align: right;
-  padding-right: 6px;
+.table-container {
+  margin-top: 16px;
 }
-
-.m-form-control {
-  width: 150px;
-}
-
-div.panel {
-  margin-top: 15px;
-}
-tbody > tr:hover {
-  background-color: #c0c0c0;
-}
-
-input[type="checkbox"] {
-  display: none;
-}
-input#checkAll {
-  display: inline-block;
-  width: 1.2em;
-  height: 1.2em;
-  border: 1px solid black;
-  border-radius: 2px;
-}
-input[type="checkbox"] + label {
-  width: 1.2em;
-  height: 1.2em;
-  border: 1px solid black;
-  border-radius: 2px;
-  position: relative;
-}
-
-input[type="checkbox"] + label:hover {
-  cursor: pointer;
-}
-
-input[type="checkbox"]:checked + label::before {
-  font-size: 1.9em;
-  content: "\2714";
-  background: yellowgreen;
-  position: absolute;
-  top: -2px;
-  left: -2px;
-  right: -2px;
-  bottom: -2px;
-  border-radius: 3px;
-  border: 1px solid black;
-  line-height: 10px;
+.ant-form-item {
+  margin-bottom: 16px;
 }
 </style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 481 - 522
src/print/PurchaseOrderLinePrint.vue


+ 59 - 48
src/print/PurchaseOrderPrint.vue

@@ -1,39 +1,40 @@
 <template>
-  <div class="container-fluid">
-    <Navbar
-      title="采购订单打印"
-      :is-go-back="false"
-    />
-    <transition name="fade1">
-      <QueryPurchaseOrderLine
-        v-show="page==1"
-        ref="queryPurchaseOrderLine"
-        :document-no-a="documentNo"
-        @change-page="changePage($event)"
-      />
-    </transition>
-    <transition name="fade2">
-      <PackInventoryInstance
-        v-if="page==2"
-        ref="packInventoryInstance"
-        :purchase-order-line-id="purchaseOrderLineId"
-        @change-page="changePage($event)"
-      />
-    </transition>
-    <transition name="fade3">
-      <PrintPage
-        v-if="page==3"
-        :flag="flag"
-        @change-page="changePage($event)"
-      />
-    </transition>
-  </div>
-</template>
+  <a-layout class="print-container">
+    <a-layout-header class="header">
+      <Navbar title="采购订单打印" :is-go-back="false" />
+    </a-layout-header>
 
-<script>
-import Common from '../common/Common.js';
+    <a-layout-content class="content">
+      <transition name="fade-slide">
+        <QueryPurchaseOrderLine
+          v-show="page === 1"
+          ref="queryPurchaseOrderLine"
+          :document-no-a="documentNo"
+          @change-page="changePage"
+        />
+      </transition>
+
+      <transition name="fade-slide">
+        <PackInventoryInstance
+          v-if="page === 2"
+          ref="packInventoryInstance"
+          :purchase-order-line-id="purchaseOrderLineId"
+          @change-page="changePage"
+        />
+      </transition>
 
+      <transition name="fade-slide">
+        <PrintPage
+          v-if="page === 3"
+          :flag="flag"
+          @change-page="changePage"
+        />
+      </transition>
+    </a-layout-content>
+  </a-layout>
+</template>
 
+<script>
 import PackInventoryInstance from './PackInventoryInstance.vue';
 import QueryPurchaseOrderLine from './QueryPurchaseOrderLine.vue';
 import PrintPage from './PrintPage.vue';
@@ -87,23 +88,33 @@ export default {
 </script>
 
 <style scoped>
-.fade2-enter,
-.fade1-enter,
-.fade3-enter {
-    opacity: 0;
-    transform: rotateX(-90deg);
-    transform-origin: top;
+.print-container {
+  height: 100vh;
+}
+
+.header {
+  padding: 0 24px;
+  background: #fff;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+}
+
+.content {
+  padding: 24px;
+  background: #f0f2f5;
+  min-height: calc(100vh - 64px);
+}
+
+/* 优化过渡动画 */
+.fade-slide-enter-active,
+.fade-slide-leave-active {
+  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
 }
-.fade2-enter-to,
-.fade1-enter-to,
-.fade3-enter-to {
-    opacity: 1;
-    transform: rotateX(0);
-    transform-origin: top;
+.fade-slide-enter-from {
+  opacity: 0;
+  transform: translateX(-30px);
 }
-.fade2-enter-active,
-.fade1-enter-active,
-.fade3-enter-active {
-    transition: all 0.3s;
+.fade-slide-leave-to {
+  opacity: 0;
+  transform: translateX(30px);
 }
 </style>

+ 151 - 306
src/print/QueryPurchaseOrderLine.vue

@@ -1,156 +1,90 @@
 <template>
-  <div>
-    <!-- <div class="h2" style="margin-left:-25px;"><span class="glyphicon glyphicon-print"></span> 采购订单打印
-			<small>
-				<span class="text-primary"><strong>查询订单</strong></span>
-			</small>
-		</div> -->
+  <div class="query-purchase-order">
+    <!-- 标题部分 -->
+    <h2>
+      <span>采购订单打印</span>
+      <small>
+        <span style="color: #1890ff;"><strong>查询订单</strong></span>
+      </small>
+    </h2>
 
-    <!-- <div class="h3"><span class="text-primary"><strong>查询订单</strong></span></div> -->
+    <!-- 搜索表单 -->
+    <a-form layout="inline" class="search-form">
+      <a-form-item label="采购订单号">
+        <a-select
+          v-model:value="documentNo"
+          style="width: 220px"
+          show-search
+          allow-clear
+          @change="documentNoChange"
+        >
+          <a-select-option v-for="item in documentNoList" :key="item.id" :value="item.documentNo">
+            {{ item.documentNo }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
 
-    <div
-      class="flex-container"
-      style="margin-top: 10px;"
-    >
-      <div class="form-inline">
-        <div class="form-group">
-          <label for="documentNo">采购订单号</label>
-          <!-- <select
-            id="documentNo"
-            class="form-control"
-            placeholder="输入采购订单号"
-          /> -->
-          <a-select
-            v-model:value="documentNo"
-            style="width: 220px"
-            show-search
-            allow-clear
-            @change="documentNoChange"
-          >
-            <a-select-option v-for="item in documentNoList" :key="item.id" :value="item.documentNo"> {{ item.documentNo }}</a-select-option>
-          </a-select>
-        </div>
+      <a-form-item label="存货名称">
+        <a-input
+          v-model="inventoryName"
+          placeholder="输入存货档案名称"
+        />
+      </a-form-item>
 
-        <div class="form-group">
-          <label for="inventoryName">存货名称</label>
-          <input
-            id="inventoryName"
-            v-model="inventoryName"
-            autocomplete="off"
-            type="text"
-            name=""
-            class="form-control"
-            placeholder="输入存货档案名称"
-          />
-        </div>
+      <a-form-item label="存货编码">
+        <a-input
+          v-model="inventoryCode"
+          placeholder="输入存货档案编码"
+        />
+      </a-form-item>
 
-        <div class="form-group">
-          <label for="inventoryCode">存货编码</label>
-          <input
-            id="inventoryCode"
-            v-model="inventoryCode"
-            autocomplete="off"
-            type="text"
-            name=""
-            class="form-control"
-            placeholder="输入存货档案编码"
-          />
-        </div>
+      <a-form-item label="规格型号">
+        <a-input
+          v-model="inventoryType"
+          placeholder="输入规格型号"
+        />
+      </a-form-item>
 
-        <div class="form-group">
-          <label for="inventoryType">规格型号</label>
-          <input
-            id="inventoryType"
-            v-model="inventoryType"
-            autocomplete="off"
-            type="text"
-            name=""
-            class="form-control"
-            placeholder="输入规格型号"
-          />
-        </div>
-        <div class="form-group">
-          <button
-            class="btn btn-primary"
-            @click="refreshPurchaseOrderLineTable"
-          >
-            查询订单
-          </button>
-          <button
-            class="btn btn-success"
-            @click="needPrint()"
-          >
-            待打印
-          </button>
-          <button
-            class="btn btn-info"
-            @click="printed()"
-          >
-            已打印
-          </button>
-        </div>
-      </div>
-    </div>
+      <a-form-item>
+        <a-button type="primary" @click="refreshPurchaseOrderLineTable">
+          查询订单
+        </a-button>
+        <a-button type="success" @click="needPrint">
+          待打印
+        </a-button>
+        <a-button type="info" @click="printed">
+          已打印
+        </a-button>
+      </a-form-item>
+    </a-form>
 
-    <div
-      v-if="purchaseOrderLines.length > 0 || selectedNum != 0"
-      class="flex-content"
-      style="margin-top: 10px;"
+    <!-- 订单表格 -->
+    <a-table
+      v-if="purchaseOrderLines.length > 0 || selectedNum !== 0"
+      :columns="columns"
+      :data-source="purchaseOrderLines"
+      row-key="id"
     >
-      <table class="table table-bordered">
-        <thead height="40px">
-          <tr>
-            <th>序号</th>
-            <th>订单号</th>
-            <th>存货名称</th>
-            <th>存货编码</th>
-            <th>规格型号</th>
-            <th>订单数量</th>
-            <th>已到货数量</th>
-            <th>已包装数量</th>
-            <th>已打印数量</th>
-            <th>包装</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr v-for="(item,index) in purchaseOrderLines" :key="item.id">
-            <td>{{ index + 1 }}</td>
-            <td>{{ item.documentNo }}</td>
-            <td>{{ item.inventoryName }}</td>
-            <td>{{ item.inventoryCode }}</td>
-            <td>{{ item.inventoryType }}</td>
-            <td>{{ item.quantity }}</td>
-            <td>{{ item.receivedQuatity }}</td>
-            <td>{{ item.printQuantity }}</td>
-            <td>{{ item.printedQuantity }}</td>
-            <td>
-              <button
-                type="button"
-                class="btn btn-info btn-sm"
-                @click="pack(item.id)"
-              >
-                包装
-              </button>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
+      <template #bodyCell="{ column, record, index }">
+        <template v-if="column.dataIndex === 'index'">
+          {{ index + 1 }}
+        </template>
+        <template v-if="column.dataIndex === 'pack'">
+          <a-button type="info" size="small" @click="pack(record.id)">
+            包装
+          </a-button>
+        </template>
+      </template>
+    </a-table>
   </div>
 </template>
 
-
-
 <script>
 import Common from '../common/Common.js';
-
 import InventoryInstancePrintResource from '../api/wms/InventoryInstancePrintResource.js';
 
 export default {
-
-  components: {
-  },
-
+  components: {},
   props: {
     documentNoA: {
       type: Array,
@@ -159,9 +93,8 @@ export default {
       },
     },
   },
-
   emits: ['changePage'],
-  data: function () {
+  data() {
     return {
       inventoryName: '',
       inventoryCode: '',
@@ -173,155 +106,103 @@ export default {
       notPrintCount: 0,
       showForm: 0,
       documentNoList: [],
+      columns: [
+        { title: '序号', dataIndex: 'index', width: 80 },
+        { title: '订单号', dataIndex: 'documentNo' },
+        { title: '存货名称', dataIndex: 'inventoryName' },
+        { title: '存货编码', dataIndex: 'inventoryCode' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '订单数量', dataIndex: 'quantity' },
+        { title: '已到货数量', dataIndex: 'receivedQuatity' },
+        { title: '已包装数量', dataIndex: 'printQuantity' },
+        { title: '已打印数量', dataIndex: 'printedQuantity' },
+        { title: '包装', dataIndex: 'pack' },
+      ],
     };
   },
-  mounted: function () {
-    var _self = this;
+  mounted() {
     this.loadDocumentNo();
     this.getNeedPrintCount();
-    if (!window.localStorage) {
-      alert('浏览器不支持localstorage');
-    } else {
-      var storage = window.localStorage;
-      if (storage.getItem('purchaseOrderNo') != null) {
-        // this.documentNo = storage.getItem('purchaseOrderNo');
-        // var data = new Option(this.documentNo, this.documentNo);
-        // $('#documentNo').append(data);
-        _self.refreshPurchaseOrderLineTable();
-        _self.keydown();
+    if (typeof window !== 'undefined' && window.localStorage) {
+      const storage = window.localStorage;
+      if (storage.getItem('purchaseOrderNo') !== null) {
+        this.refreshPurchaseOrderLineTable();
+        this.keydown();
       }
     }
   },
   methods: {
-    needPrint: function () {
+    needPrint() {
       this.$router.push({
         path: '/wms/needPrint',
       });
     },
-    printed: function () {
+    printed() {
       this.$router.push({
         path: '/wms/printed',
       });
     },
-
-    /**
-     * 项目事件
-     */
-    loadDocumentNo: function () {
-      var _self = this;
+    loadDocumentNo() {
+      const _self = this;
       $.ajax({
         type: 'get',
         dataType: 'json',
         url: Common.getApiURL('PurchaseOrderLineResource/queryPurchaseOrderLineDocumentNo'),
         contentType: 'application/json',
-        beforeSend: function (request) {
+        beforeSend: request => {
           Common.addTokenToRequest(request);
         },
-        data: function (params) {
+        data: params => {
           return {
             documentNo: params.term,
           };
         },
-        success: function (datas) {
+        success: datas => {
           if (datas.length > 0) {
-            _self.documentNoList = datas; 
+            _self.documentNoList = datas;
             console.log(_self.documentNoList);
           }
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
+        error: (XMLHttpRequest, textStatus, errorThrown) => {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
       });
     },
-
-    documentNoChange: function(value) {
-      var _self = this;
+    documentNoChange(value) {
+      const _self = this;
       console.log(value);
-      if (value == null || value == undefined) {
+      if (value === null || value === undefined) {
         _self.purchaseOrderLines.splice(0, _self.purchaseOrderLines.length);
         _self.purchaseOrderLineId = '';
         return;
       } else {
-        // _self.documentNo = this.documentNo;
-        // var storage = window.localStorage;
-        // storage.setItem('purchaseOrderNo', _self.documentNo);
         _self.refreshPurchaseOrderLineTable();
         _self.keydown();
       }
     },
-
-    // loadDocumentNo: function () {
-    //   var _self = this;
-    //   $('#documentNo').select2({
-    //     placeholder: '输入采购订单号',
-    //     allowClear: true,
-    //     language: 'zh-CN',
-    //     tags: true,
-    //     width: '187px',
-    //     ajax: {
-    //       type: 'get',
-    //       dataType: 'json',
-    //       url: Common.getApiURL('PurchaseOrderLineResource/queryPurchaseOrderLineDocumentNo'),
-    //       beforeSend: function (request) {
-    //         Common.addTokenToRequest(request);
-    //       },
-    //       data: function (params) {
-    //         return {
-    //           documentNo: params.term,
-    //         };
-    //       },
-    //       processResults: function (data) {
-    //         return {
-    //           results: $.map(data, function (item) {
-    //             return {
-    //               id: item.documentNo,
-    //               text: item.documentNo,
-    //             };
-    //           }),
-    //         };
-    //       },
-    //     },
-    //   }).on('change', function () {
-    //     if ($(this).val() == null) {
-    //       _self.purchaseOrderLines.splice(0, _self.purchaseOrderLines.length);
-    //       _self.purchaseOrderLineId = '';
-    //       return;
-    //     } else {
-    //       _self.documentNo = $(this).val();
-    //       var storage = window.localStorage;
-    //       storage.setItem('purchaseOrderNo', _self.documentNo);
-    //       _self.refreshPurchaseOrderLineTable();
-    //       _self.keydown();
-    //     }
-    //   });
-    // },
-    refreshPurchaseOrderLineTable: function () {
-      var _self = this;
-      if (_self.purchaseOrderLines != null && _self.purchaseOrderLines.length > 0) {
+    refreshPurchaseOrderLineTable() {
+      const _self = this;
+      if (_self.purchaseOrderLines !== null && _self.purchaseOrderLines.length > 0) {
         _self.purchaseOrderLines.splice(0, _self.purchaseOrderLines.length);
       }
-      // var purchaseOrderDocumentNo = _self.documentNo;
-      // if (_self.documentNoA != null && _self.documentNoA != undefined) {
-      // 	purchaseOrderDocumentNo = _self.documentNoA;
-      // }
-      var purchaseOrderDocumentNo = null;
-      if (_self.documentNo != null && _self.documentNo != undefined && _self.documentNo.length > 0) {
+      let purchaseOrderDocumentNo = null;
+      if (_self.documentNo !== null && _self.documentNo !== undefined && _self.documentNo.length > 0) {
         purchaseOrderDocumentNo = _self.documentNo;
       }
-      if (_self.documentNoA != null && _self.documentNoA != undefined && _self.documentNoA.length > 0) {
+      if (_self.documentNoA !== null && _self.documentNoA !== undefined && _self.documentNoA.length > 0) {
         purchaseOrderDocumentNo = _self.documentNo;
       }
-      var inventoryName = _self.inventoryName;
-      var inventoryType = _self.inventoryType;
-      var inventoryCode = _self.inventoryCode;
-      var printNum = _self.selectedNum;
-      if (purchaseOrderDocumentNo == '' && inventoryName == '' && inventoryCode == '' && inventoryType == '') {
+      const inventoryName = _self.inventoryName;
+      const inventoryType = _self.inventoryType;
+      const inventoryCode = _self.inventoryCode;
+      const printNum = _self.selectedNum;
+      if (purchaseOrderDocumentNo === '' && inventoryName === '' && inventoryCode === '' && inventoryType === '') {
         return;
       } else {
-        var url;
-        if (printNum == 1) {
+        let url;
+        if (printNum === 1) {
           url = 'PurchaseOrderLineResource/findNotPrintByDocumentNoNameCodeType';
-        } else if (printNum == 2) {
+        } else if (printNum === 2) {
           url = 'PurchaseOrderLineResource/findPrintedByDocumentNoNameCodeType';
         } else {
           url = 'PurchaseOrderLineResource/findAllByDocumentNoNameCodeType';
@@ -335,115 +216,79 @@ export default {
             inventoryCode: inventoryCode,
             inventoryType: inventoryType,
           },
-          beforeSend: function (request) {
+          beforeSend: request => {
             Common.addTokenToRequest(request);
           },
-          success: function (data) {
+          success: data => {
             console.log(data);
-            if (data == null || data.length == 0 && _self.selectedNum == 0) {
+            if (data === null || data.length === 0 && _self.selectedNum === 0) {
               Notify.notice('查询结果', '没有查询到任何订单。', false);
             }
             _self.purchaseOrderLines = data;
           },
-          error: function (XMLHttpRequest, textStatus, errorThrown) {
+          error: (XMLHttpRequest, textStatus, errorThrown) => {
             Common.processException(XMLHttpRequest, textStatus, errorThrown);
           },
         });
       }
     },
-    // 打印队列中未打印数量
-    getNeedPrintCount: function () {
-      var _self = this;
-      InventoryInstancePrintResource.queryInventoryInstancePrintCount().then(successData1 => {
-        if (successData1) {
-          _self.notPrintCount = successData1;
-        }
-      }, errorData => {
-        Common.processException(errorData);
-      });
+    getNeedPrintCount() {
+      const _self = this;
+      InventoryInstancePrintResource.queryInventoryInstancePrintCount().then(
+        successData1 => {
+          if (successData1) {
+            _self.notPrintCount = successData1;
+          }
+        },
+        errorData => {
+          Common.processException(errorData);
+        },
+      );
     },
-
-    pack: function (purchaseOrderLineId) {
+    pack(purchaseOrderLineId) {
       this.$router.push({
         path: '/wms/packInventoryInstance',
         query: {
           purchaseOrderLineId: purchaseOrderLineId,
         },
       });
-      // this.purchaseOrderLineId = purchaseOrderLineId;
-      // var o = {
-      //     page: 2,
-      // };
-      // o.purchaseOrderLineId = purchaseOrderLineId;
-      // o.documentNo = this.documentNo;
-      // this.$emit("changePage", o);
     },
-
-    printPack: function () {
+    printPack() {
       this.$router.push({
         path: '/wms/printInventoryInstance',
         query: {
           purchaseOrderLineId: this.purchaseOrderLineId,
         },
       });
-      var o = {
+      const o = {
         page: 3,
         flag: 'page1',
       };
       this.$emit('changePage', o);
     },
-
-    // 键盘回车事件
-    keydown: function () {
-      var _self = this;
-      document.onkeydown = function (event) {
-        var currentEvent = event || window.event || arguments[0];
-        if (currentEvent && currentEvent.keyCode == 13) {
-          currentEvent.preventDefault();
-          _self.refreshPurchaseOrderLineTable();
-        }
-      };
+    keydown() {
+      const _self = this;
+      if (typeof window !== 'undefined') {
+        window.document.onkeydown = event => {
+          const currentEvent = event || window.event;
+          if (currentEvent && currentEvent.key === 'Enter') {
+            currentEvent.preventDefault();
+            _self.refreshPurchaseOrderLineTable();
+          }
+        };
+      }
     },
   },
 };
 </script>
 
-
 <style scoped>
-.m-form-group {
-    margin-bottom: 5px;
-    margin-top: 5px;
+.query-purchase-order {
+  padding: 20px;
 }
 
-.m-form-label {
-    width: 120px;
-    text-align: right;
-    padding-right: 6px;
-}
-
-.m-form-control {
-    width: 160px;
-}
-
-select.input-sm {
-    width: 100px;
-    height: 18px;
-    border-radius: 4px;
-    padding: 0;
-}
-tbody > tr:hover {
-    background-color: #c0c0c0;
-}
-
-.fade-enter {
-    transform: rotateX(-90deg);
-    transform-origin: top;
-}
-.fade-enter-to {
-    transform: rotateX(0deg);
-    transform-origin: top;
-}
-.fade-enter-active {
-    transition: all 0.7s;
+.search-form {
+  margin-top: 10px;
+  margin-bottom: 10px;
 }
 </style>

+ 112 - 133
src/stock/AutoGenerateInventoryClassSafeStock.vue

@@ -1,124 +1,82 @@
 <template>
-  <div class="container-fluid">
+  <a-layout class="container">
     <Navbar title="自动生成存货分类安全库存" :is-go-back="true" />
-    <div class="form-inline">
-      <div class="form-group">
-        <label> 步骤1:仓库: </label>
-        <!-- <input autocomplete="off" type="text" name=""> -->
-        <div class="input-group">
-          <v-select v-model="warehouse" label="name" :options="warehouses" />
-        </div>
-      </div>
-    </div>
-
-    <h4 />
-
-    <div class="form-inline">
-      <div class="form-group">
-        <label> 步骤2:类别名称: </label>
-        <input
-          v-model.trim="className"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          @keyup.enter="reQuery"
-        />
-      </div>
-      <div class="form-group">
-        <label> 类别编号: </label>
-        <input
-          v-model.trim="classNo"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          @keyup.enter="reQuery"
-        />
-      </div>
-      <button type="button" class="btn btn-primary" @click="reQuery">
-        查询
-      </button>
-    </div>
-
-    <h4 />
+    
+    <a-card :bordered="false" class="form-card">
+      <a-form layout="inline">
+        <a-form-item label="步骤1:仓库:">
+          <a-select
+            v-model:value="warehouse"
+            style="width: 300px"
+            :options="warehouses"
+            placeholder="请选择仓库"
+            :field-names="{ label: 'name', value: 'id' }"
+          />
+        </a-form-item>
+      </a-form>
 
-    <div class="form-inline">
-      <div class="form-group">
-        <label> 步骤3: </label>
-        <div class="input-group">
-          <button type="button" class="btn btn-primary" @click="save">
-            生成物料类别安全库存
-          </button>
-        </div>
-      </div>
-    </div>
+      <a-form layout="inline" style="margin-top: 16px">
+        <a-form-item label="步骤2:类别名称:">
+          <a-input
+            v-model:value="className"
+            placeholder="请输入类别名称"
+            @press-enter="reQuery"
+          />
+        </a-form-item>
+        <a-form-item label="类别编号:">
+          <a-input
+            v-model:value="classNo"
+            placeholder="请输入类别编号"
+            @press-enter="reQuery"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" @click="reQuery">查询</a-button>
+        </a-form-item>
+      </a-form>
 
-    <h4 />
+      <a-form layout="inline" style="margin-top: 16px">
+        <a-form-item label="步骤3:">
+          <a-button type="primary" @click="save">生成物料类别安全库存</a-button>
+        </a-form-item>
+      </a-form>
 
-    <table class="table table-bordered">
-      <thead>
-        <tr>
-          <th>序号</th>
-          <th>类别名称</th>
-          <th>类别编号</th>
-          <th>最小库存</th>
-          <th>最大库存</th>
-          <th>已生成</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr v-for="(data, index) in inventoryClasses" :key="data.id">
-          <td>
-            <span v-if="data.hasSafeStock">
-              <input
-                v-model="dataIdsForSafeStock"
-                autocomplete="off"
-                type="checkbox"
-                :value="data.id"
-                disabled
-              />
-            </span>
-            <span v-else>
-              <input
-                v-model="dataIdsForSafeStock"
-                autocomplete="off"
-                type="checkbox"
-                :value="data.id"
-              />
-            </span>
-            {{ index + 1 }}
-          </td>
-          <td>{{ data.className }}</td>
-          <td>{{ data.classNo }}</td>
-          <td v-if="data.hasSafeStock">{{ data.minimumStock }}</td>
-          <td v-else>
-            <input
-              :key="data.id"
-              v-model.trim="data.minimumStock"
-              autocomplete="off"
-              type="number"
-              class="form-control"
+      <a-table
+        :data-source="inventoryClasses"
+        :columns="columns"
+        :pagination="pagination"
+        row-key="id"
+        class="data-table"
+      >
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'index'">
+            <a-checkbox
+              v-model:checked="dataIdsForSafeStock"
+              :value="record.id"
+              :disabled="record.hasSafeStock"
+            />
+            {{ record.index }}
+          </template>
+          <template v-else-if="column.dataIndex === 'minimumStock'">
+            <a-input-number
+              v-if="!record.hasSafeStock"
+              v-model:value="record.minimumStock"
             />
-          </td>
-          <td v-if="data.hasSafeStock">{{ data.maximumStock }}</td>
-          <td v-else>
-            <input
-              v-model.trim="data.maximumStock"
-              autocomplete="off"
-              type="number"
-              class="form-control"
+            <span v-else>{{ record.minimumStock }}</span>
+          </template>
+          <template v-else-if="column.dataIndex === 'maximumStock'">
+            <a-input-number
+              v-if="!record.hasSafeStock"
+              v-model:value="record.maximumStock"
             />
-          </td>
-          <td>{{ data.hasSafeStock ? "是" : "否" }}</td>
-        </tr>
-      </tbody>
-    </table>
-    <VueBootstrapPagination
-      v-if="inventoryClasses.length > 0"
-      :pagination="pagination"
-      :callback="queryInventoryClasses"
-    />
+            <span v-else>{{ record.maximumStock }}</span>
+          </template>
+        </template>
+      </a-table>
+    </a-card>
+
     <Loading v-if="loading" />
-  </div>
+  </a-layout>
 </template>
 
 <script>
@@ -126,19 +84,20 @@ import Common from '../common/Common.js';
 
 import InventoryClassResource from '../api/common/InventoryClassResource.js';
 
-
-import vSelect from 'vue-select';
-import 'vue-select/dist/vue-select.css';
-
 export default {
   components: {
     
-    vSelect,
-    
-    
   },
   data: function () {
     return {
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '类别名称', dataIndex: 'className' },
+        { title: '类别编号', dataIndex: 'classNo' },
+        { title: '最小库存', dataIndex: 'minimumStock' },
+        { title: '最大库存', dataIndex: 'maximumStock' },
+        { title: '已生成', dataIndex: 'hasSafeStock' },
+      ],
       warehouses: [],
       warehouse: null,
       inventoryClasses: [],
@@ -147,9 +106,9 @@ export default {
       dataIdsForSafeStock: [],
       pagination: {
         total: 0,
-        per_page: 10,
-        current_page: 1,
-        last_page: 10,
+        pageSize: 10,
+        current: 1,
+        showTotal: total => `共 ${total} 条`,
       },
       loading: false,
     };
@@ -168,23 +127,28 @@ export default {
     this.queryAllWarehouses();
   },
   methods: {
-    queryAllWarehouses: function () {
-      var _self = this;
-      _self.loading=true;
+    queryAllWarehouses() {
+      const _self = this;
+      _self.loading = true;
       $.ajax({
         type: 'get',
         url: Common.getApiURL('WarehouseResource/all'),
-        beforeSend: function (request) {
+        beforeSend(request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
-          _self.warehouses = data;
-          _self.loading=false;
+        success(data) {
+          _self.warehouses = data.map(item => ({
+            ...item,
+            label: item.name,
+            value: item.id,
+          }));
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
+        error(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
+        complete() {
+          _self.loading = false;
+        },
       });
     },
 
@@ -305,4 +269,19 @@ export default {
     },
   },
 };
-</script>
+</script>
+
+<style scoped>
+.form-card {
+  margin-top: 24px;
+  padding: 16px;
+}
+
+.data-table {
+  margin-top: 24px;
+}
+
+.ant-form-item {
+  margin-right: 24px;
+}
+</style>

+ 118 - 176
src/stock/AutoGenerateInventorySafeStock.vue

@@ -1,169 +1,106 @@
 <template>
-  <div class="container-fluid">
-    <Navbar
-      title="自动生成存货安全库存"
-      :is-go-back="true"
-    />
-    <div class="form-inline">
-      <div class="form-group">
-        <label>
-          步骤1:仓库:
-        </label>
-        <div class="input-group">
-          <v-select
-            v-model="warehouse"
-            label="name"
-            style="width:15em"
+  <a-layout class="container">
+    <Navbar title="自动生成存货安全库存" :is-go-back="true" />
+    
+    <a-card :bordered="false" class="form-card">
+      <a-form layout="inline">
+        <a-form-item label="步骤1:仓库:">
+          <a-select
+            v-model:value="warehouse"
+            style="width: 15em"
             :options="warehouses"
+            placeholder="请选择仓库"
+            :field-names="{ label: 'name', value: 'id' }"
           />
-        </div>
-      </div>
-    </div>
-
-    <h4 />
-
-    <div class="form-inline">
-      <div class="form-group">
-        <label>
-          步骤2:存货名称:
-        </label>
-        <input
-          v-model.trim="name"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          @keyup.enter="reQuery"
-        />
-      </div>
-      <div class="form-group">
-        <label>
-          存货编号:
-        </label>
-        <input
-          v-model.trim="no"
-          autocomplete="off"
-          type="text"
-          class="form-control"
-          @keyup.enter="reQuery"
-        />
-      </div>
-      <button
-        type="button"
-        class="btn btn-primary"
-        @click="reQuery"
+        </a-form-item>
+      </a-form>
+
+      <a-form layout="inline" style="margin-top: 16px">
+        <a-form-item label="步骤2:存货名称:">
+          <a-input
+            v-model:value="name"
+            placeholder="请输入存货名称"
+            @press-enter="reQuery"
+          />
+        </a-form-item>
+        <a-form-item label="存货编号:">
+          <a-input
+            v-model:value="no"
+            placeholder="请输入存货编号"
+            @press-enter="reQuery"
+          />
+        </a-form-item>
+        <a-form-item>
+          <a-button type="primary" @click="reQuery">查询</a-button>
+        </a-form-item>
+      </a-form>
+
+      <a-form layout="inline" style="margin-top: 16px">
+        <a-form-item label="步骤3:">
+          <a-button type="primary" @click="save">生成物料安全库存</a-button>
+        </a-form-item>
+      </a-form>
+
+      <a-table
+        :data-source="inventories"
+        :columns="columns"
+        :pagination="pagination"
+        row-key="id"
+        class="data-table"
       >
-        查询
-      </button>
-    </div>
-
-    <h4 />
-
-    <div class="form-inline">
-      <div class="form-group">
-        <label>
-          步骤3:
-        </label>
-        <div class="input-group">
-          <button
-            type="button"
-            class="btn btn-primary"
-            @click="save"
-          >
-            生成物料安全库存
-          </button>
-        </div>
-      </div>
-    </div>
-
-    <h4 />
-
-    <table class="table table-bordered">
-      <thead>
-        <tr>
-          <th>序号</th>
-          <th>名称</th>
-          <th>编号</th>
-          <th>最小库存</th>
-          <th>最大库存</th>
-          <th>已生成</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr v-for="(data, index) in inventories" :key="data.id">
-          <td>
-            <span v-if="data.hasSafeStock">
-              <input
-                v-model="dataIdsForSafeStock"
-                autocomplete="off"
-                type="checkbox"
-                :value="data.id"
-                disabled
-              />
-            </span>
-            <span v-else>
-              <input
-                v-model="dataIdsForSafeStock"
-                autocomplete="off"
-                type="checkbox"
-                :value="data.id"
-              />
-            </span>
-            {{ index + 1 + (pagination.current_page-1) * pagination.per_page }}
-          </td>
-          <td>{{ data.name }}</td>
-          <td>{{ data.no }}</td>
-          <td v-if="data.hasSafeStock">{{ data.minimumStock }}</td>
-          <td v-else>
-            <input
-              v-model.trim="data.minimumStock"
-              autocomplete="off"
-              type="number"
-              class="form-control"
-              @input="changeMinimumStock(data)"
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'index'">
+            <a-checkbox
+              v-model:checked="dataIdsForSafeStock"
+              :value="record.id"
+              :disabled="record.hasSafeStock"
+            />
+            {{ record.index }}
+          </template>
+          <template v-else-if="column.dataIndex === 'minimumStock'">
+            <a-input-number
+              v-if="!record.hasSafeStock"
+              v-model:value="record.minimumStock"
+              @change="changeMinimumStock(record)"
             />
-          </td>
-          <td v-if="data.hasSafeStock">{{ data.maximumStock }}</td>
-          <td v-else>
-            <input
-              v-model.trim="data.maximumStock"
-              autocomplete="off"
-              type="number"
-              class="form-control"
+            <span v-else>{{ record.minimumStock }}</span>
+          </template>
+          <template v-else-if="column.dataIndex === 'maximumStock'">
+            <a-input-number
+              v-if="!record.hasSafeStock"
+              v-model:value="record.maximumStock"
             />
-          </td>
-          <td>{{ data.hasSafeStock ? '是' : '否' }}</td>
-        </tr>
-      </tbody>
-    </table>
-    <VueBootstrapPagination
-      v-if="_self.pagination.last_page > 0"
-      :pagination="pagination"
-      :callback="queryInventories"
-    />
+            <span v-else>{{ record.maximumStock }}</span>
+          </template>
+        </template>
+      </a-table>
+    </a-card>
+
     <Loading v-if="loading" />
-  </div>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 
-
-import vSelect from 'vue-select';
-
-
 import InventoryResource from '../api/common/InventoryResource.js';
 import InventorySafeStockResource from '../api/wms/InventorySafeStockResource.js';
-import 'vue-select/dist/vue-select.css';
+
 
 export default {
-  components: {
-    
-    vSelect,
-    
+  components: {    
     
   },
   data: function () {
     return {
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '名称', dataIndex: 'name' },
+        { title: '编号', dataIndex: 'no' },
+        { title: '最小库存', dataIndex: 'minimumStock' },
+        { title: '最大库存', dataIndex: 'maximumStock' },
+        { title: '已生成', dataIndex: 'hasSafeStock' },
+      ],
       warehouses: [],
       warehouse: null,
       inventories: [],
@@ -172,9 +109,9 @@ export default {
       dataIdsForSafeStock: [],
       pagination: {
         total: 0,
-        per_page: Common.pageSize, // required
-        current_page: 1, // required
-        last_page: 0, // required
+        pageSize: Common.pageSize,
+        current: 1,
+        showTotal: total => `共 ${total} 条`,
       },
       loading: false,
     };
@@ -193,45 +130,35 @@ export default {
     this.queryAllWarehouses();
   },
   methods: {
-    changeMinimumStock: function (data) {
-      var _self = this;
-      if (data.minimumStock != undefined && data.minimumStock.length > 0) {
-        if (_self.dataIdsForSafeStock.indexOf(data.id) == -1) {
-          _self.dataIdsForSafeStock.push(data.id);
-        }
-      } else {
-        if (_self.dataIdsForSafeStock.indexOf(data.id) >= 0) {
-          for (var i = 0; i < _self.dataIdsForSafeStock.length; i++) {
-            if (_self.dataIdsForSafeStock[i] == data.id) {
-              _self.dataIdsForSafeStock.splice(i);
-              break;
-            }
-          }
-        }
+    changeMinimumStock(record) {
+      if (record.minimumStock && !this.dataIdsForSafeStock.includes(record.id)) {
+        this.dataIdsForSafeStock.push(record.id);
+      } else if (!record.minimumStock) {
+        this.dataIdsForSafeStock = this.dataIdsForSafeStock.filter(id => id !== record.id);
       }
     },
-    queryAllWarehouses: function () {
-      var _self = this;
-      _self.loading=true;
+    queryAllWarehouses() {
+      const _self = this;
+      _self.loading = true;
       $.ajax({
         type: 'get',
         url: Common.getApiURL('WarehouseResource/all'),
-        beforeSend: function (request) {
+        beforeSend(request) {
           Common.addTokenToRequest(request);
         },
-        success: function (data) {
+        success(data) {
           _self.warehouses = data;
-          _self.loading=false;
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
+        error(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
+        complete() {
+          _self.loading = false;
+        },
       });
     },
-
-    reQuery: function () {
-      this.pagination.current_page = 1;
+    reQuery() {
+      this.pagination.current = 1;
       this.queryInventories();
     },
 
@@ -309,4 +236,19 @@ export default {
     },
   },
 };
-</script>
+</script>
+
+<style scoped>
+.form-card {
+  margin-top: 24px;
+  padding: 16px;
+}
+
+.data-table {
+  margin-top: 24px;
+}
+
+.ant-form-item {
+  margin-right: 24px;
+}
+</style>

+ 193 - 526
src/stock/CurrentStock.vue

@@ -1,363 +1,90 @@
 <template>
-  <div class="container-fluid">
-    <Navbar
-      title="库存查询"
-      :is-go-back="false"
-    />
-    
-    <div
-      class="flex-container"
-      style="margin-top: 10px;"
-    >
-      <div class="flex-header">
-        <div>
-          <div
-            class="form-inline"
-            role="form"
-          >
-            <div class="form-group">
-              SKU:
-              <input
-                v-model="queryNo"
-                autocomplete="off"
-                type="text"
-                class="form-control"
-                placeholder="请输入要查询物料的SKU"
-                aria-describedby="basic-addon"
-                style="width:250px;"
-                @keyup.enter="queryInventory"
-              />
-              物料名称:
-              <input
-                v-model="queryName"
-                autocomplete="off"
-                type="text"
-                class="form-control"
-                placeholder="请输入要查询物料的名称"
-                aria-describedby="basic-addon"
-                style="width:250px;"
-                @keyup.enter="queryInventory"
-              />
-              规格型号:
-              <input
-                v-model="queryType"
-                autocomplete="off"
-                type="text"
-                class="form-control"
-                placeholder="请输入要查询物料的规格型号"
-                aria-describedby="basic-addon"
-                style="width:250px;"
-                @keyup.enter="queryInventory"
-              />
-              物料类型:
-              <select
-                v-model="selectType"
-                class="form-control"
-                @change="changeSelectType"
-              >
-                <option value="0">全部</option>
-                <option value="001">成套工具箱</option>
-                <option value="002">散件</option>
-              </select>
-            </div>
-            <div class="form-group">
-              <button
-                class="btn btn-default"
-                @click="queryInventory"
-              >
-                查询
-              </button>
-            </div>
-            <div class="form-group">
-              <button
-                class="btn btn-success"
-                @click="exportExcel"
-              >
-                导出
-              </button>
-            </div>
-          </div>
-        </div>
+  <a-layout>
+    <a-page-header title="库存查询" />
+    <a-layout-content style="padding: 24px;">
+      <a-form layout="inline">
+        <a-form-item label="SKU">
+          <a-input v-model="queryNo" placeholder="请输入要查询物料的SKU" @keyup.enter="queryInventory" />
+        </a-form-item>
+        <a-form-item label="物料名称">
+          <a-input v-model="queryName" placeholder="请输入要查询物料的名称" @keyup.enter="queryInventory" />
+        </a-form-item>
+        <a-form-item label="规格型号">
+          <a-input v-model="queryType" placeholder="请输入要查询物料的规格型号" @keyup.enter="queryInventory" />
+        </a-form-item>
+        <a-form-item label="物料类型">
+          <a-select v-model="selectType" @change="changeSelectType">
+            <a-select-option value="0">全部</a-select-option>
+            <a-select-option value="001">成套工具箱</a-select-option>
+            <a-select-option value="002">散件</a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-space>
+          <a-button type="primary" @click="queryInventory">查询</a-button>
+          <a-button type="primary" @click="exportExcel">导出</a-button>
+        </a-space>
+      </a-form>
+      <a-table
+        :data-source="inventoryInstanceDatas"
+        :columns="columns"
+        :row-key="record => record.id"
+        :pagination="pagination"
+        @change="handleTableChange"
+      />
+      <div style="margin-top: 16px;">
+        <span>共查询到 <b>{{ pagination.total }}</b> 条数据</span>
       </div>
-      <div
-        class="flex-content"
-        style="margin-top: 10px;"
+      <a-modal
+        v-model:visible="modal"
+        title="库存详情"
+        @ok="handleModalOk"
+        @cancel="handleModalCancel"
+      >
+        <a-table
+          :data-source="inventoryInstanceCurrentStocks"
+          :columns="modalColumns"
+          :row-key="record => record.id"
+          :pagination="false"
+        />
+      </a-modal>
+      <a-modal
+        v-model:visible="modal2"
+        title="库存详情"
+        @ok="handleModal2Ok"
+        @cancel="handleModal2Cancel"
+      >
+        <a-table
+          :data-source="inventoryInstanceCurrentStocks2"
+          :columns="modal2Columns"
+          :row-key="record => record.id"
+          :pagination="false"
+        />
+      </a-modal>
+      <a-modal
+        v-model:visible="modal3"
+        title="出入库流水"
+        @ok="handleModal3Ok"
+        @cancel="handleModal3Cancel"
       >
-        <table class="fixed-table table-striped table-bordered">
-          <thead>
-            <tr>
-              <th style="width: 50px;">
-                序号
-              </th>
-              <th style="width: 70px;">
-                图片
-              </th>
-              <th style="width: 150px;">
-                物料名称
-              </th>
-              <th style="width: 100px;">
-                SKU
-              </th>
-              <th style="width: 150px;">
-                规格型号
-              </th>
-              <th style="width: 80px;">
-                入库总数量
-              </th>
-              <th style="width: 80px;">
-                库存数量
-              </th>
-              <th style="width: 80px;">
-                出库总数量
-              </th>
-              <th style="width: 80px;">
-                RFID管理
-              </th>
-              <th style="width: 80px;">
-                物料类型
-              </th>
-              <th style="width: 100px;">
-                操作
-              </th>
-            </tr>
-          </thead>
-          <tbody class="table1">
-            <tr v-for="(inventoryInstance, index) in inventoryInstanceDatas" :key="inventoryInstance.id">
-              <td>
-                {{ index + 1 + (pagination.current_page-1) * pagination.per_page }}
-              </td>
-              <td>
-                <img
-                  :src="Common.getThumbnailImageSrc(className, inventoryInstance.imageName)"
-                  class="image"
-                  @click="$refs.imagePreview.preview(className, inventoryInstance.imageName)"
-                />
-              </td>
-              <td>
-                {{ inventoryInstance.inventoryName }}
-              </td>
-              <td>
-                {{ inventoryInstance.inventoryNo }}
-              </td>
-              <td>
-                {{ inventoryInstance.inventoryType }}
-              </td>
-              <td>
-                {{ inventoryInstance.totalQuantity }}
-              </td>
-              <td>
-                {{ inventoryInstance.stockQuantity }}
-              </td>
-              <td>
-                {{ inventoryInstance.stockOutQuantity }}
-              </td>
-              <td>
-                {{ inventoryInstance.rfidManagement == true ? '是':'否' }}
-              </td>
-              <td>
-                {{ inventoryInstance.tagNo == '001' ? '成套工具箱':'散件' }}
-              </td>
-              <td>
-                <button
-                  type="button"
-                  class="btn btn-link"
-                  style="width: 100%"
-                  @click="findByInventoryId(inventoryInstance)"
-                >
-                  查看详情
-                </button>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="flex-footer">
-        <div>
-          <div class="form-group">
-            <div class="pull-left">
-              共查询到<b>{{ pagination.total }}</b>条数据
-            </div>
-            <div class="pull-right">
-              <VueBootstrapPagination
-                v-if="pagination.last_page > 0"
-                :pagination="pagination"
-                :callback="queryInventory"
-              />
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <Modal
-      v-model:show="modal"
-      small="true"
-      :show-canel-button="true"
-      :show-ok-button="false"
-    >
-      <template #header>
-        <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>库存详情</p>
-      </template>
-      <table class="fixed-table table-striped table-bordered">
-        <thead>
-          <tr>
-            <th style="width: 100px;">
-              序号
-            </th>
-            <th style="width: 150px;">
-              物料编码
-            </th>
-            <th style="width: 150px;">
-              物料名称
-            </th>
-            <th style="width: 150px;">
-              状态
-            </th>
-            <th style="width: 100px;">
-              货位
-            </th>
-            <th style="width: 100px;">
-              项目事件
-            </th>
-            <th style="width: 100px;">
-              齐套情况
-            </th>
-          </tr>
-        </thead>
-        <tbody class="table1">
-          <tr v-for="(data, index) in inventoryInstanceCurrentStocks" :key="data.id">
-            <td>
-              {{ index+1 }}
-            </td>
-            <td>
-              {{ data.no }}
-            </td>
-            <td>
-              {{ data.name }}
-            </td>
-            <td>
-              {{ (data.positionId == undefined || data.positionId == null)? '已出库':'在库' }}
-            </td>
-            <td>
-              {{ data.positionBarCode }}
-            </td>
-            <td>
-              {{ data.projectItem }}
-            </td>
-            <td>
-              {{ data.finished == false ? '未补齐':'已补齐' }}
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <div class="modal-footer">
-        <slot name="footer" />
-      </div>
-    </Modal>
-
-    <Modal
-      v-model:show="modal2"
-      small="true"
-      :show-canel-button="true"
-      :show-ok-button="false"
-    >
-      <template #header>
-        <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>库存详情</p>
-      </template>
-      <table class="fixed-table table-striped table-bordered">
-        <thead>
-          <tr>
-            <th style="width: 100px;">
-              序号
-            </th>
-            <th style="width: 150px;">
-              所在成套工具箱
-            </th>
-            <th style="width: 150px;">
-              数量
-            </th>
-            <th style="width: 150px;">
-              货位
-            </th>
-            <th style="width: 150px;">
-              项目事件
-            </th>
-          </tr>
-        </thead>
-        <tbody class="table1">
-          <tr v-for="(data, index) in inventoryInstanceCurrentStocks2" :key="data.id">
-            <td>
-              {{ index+1 }}
-            </td>
-            <td>
-              {{ data.no }}
-            </td>
-            <td>
-              {{ data.quantity }}
-            </td>
-            <td>
-              {{ data.positionBarCode }}
-            </td>
-            <td>
-              {{ data.projectItem }}
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <div class="modal-footer">
-        <slot name="footer" />
-      </div>
-    </Modal>
-
-    <Modal
-      v-model:show="modal3"
-      :full="true"
-      :show-canel-button="true"
-      :show-ok-button="false"
-    >
-      <template #header>
-        <p>{{ displayData.inventoryNo }}-{{ displayData.inventoryName }}>>出入库流水</p>
-      </template>
-
-      <div class="modal-body">
         <InAndOutFlow :display-data="displayData" />
-      </div>
-
-      <div class="modal-footer">
-        <slot name="footer" />
-      </div>
-    </Modal>
-    
-    <Loading v-if="loading" />
-    <ImagePreview ref="imagePreview" />
-  </div>
+      </a-modal>
+      <a-spin v-if="loading" />
+    </a-layout-content>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
-
 import InventoryInstanceResource from '../api/common/InventoryInstanceResource.js';
 import InventoryInstanceBindResource from '../api/wms/InventoryInstanceBindResource.js';
 import CurrentStockResource from '../api/wms/CurrentStockResource.js';
-
-
-
 import InAndOutFlow from './InAndOutFlow.vue';
 
-
-
 export default {
   components: {
-    
     InAndOutFlow,
-    
-    
-    
-    
-    
   },
-  data: function () {
-    this.Common = Common;
+  data() {
     return {
       displayData: {},
       queryNo: '',
@@ -369,238 +96,178 @@ export default {
       inventoryInstanceCurrentStocks3: [],
       recordIds: [],
       pagination: {
+        current: 1,
+        pageSize: Common.pageSize,
         total: 0,
-        per_page: Common.pageSize, // required
-        current_page: 1, // required
-        last_page: 0, // required
       },
       isUpdatePage: true,
       className: 'com.leanwo.prodog.model.common.Inventory',
-      allRepeatPack: [], //重复打印全部的id
-      printType: 0,//类型 0:采购入库打印/1:扫描入库打印
+      allRepeatPack: [],
+      printType: 0,
       selectType: '0',
       loading: false,
       modal: false,
       modal2: false,
       modal3: false,
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '图片', dataIndex: 'image' },
+        { title: '物料名称', dataIndex: 'inventoryName' },
+        { title: 'SKU', dataIndex: 'inventoryNo' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '入库总数量', dataIndex: 'totalQuantity' },
+        { title: '库存数量', dataIndex: 'stockQuantity' },
+        { title: '出库总数量', dataIndex: 'stockOutQuantity' },
+        { title: 'RFID管理', dataIndex: 'rfidManagement' },
+        { title: '物料类型', dataIndex: 'tagNo' },
+        { title: '操作', dataIndex: 'action' },
+      ],
+      modalColumns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '物料编码', dataIndex: 'no' },
+        { title: '物料名称', dataIndex: 'name' },
+        { title: '状态', dataIndex: 'positionId' },
+        { title: '货位', dataIndex: 'positionBarCode' },
+        { title: '项目事件', dataIndex: 'projectItem' },
+        { title: '齐套情况', dataIndex: 'finished' },
+      ],
+      modal2Columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '所在成套工具箱', dataIndex: 'no' },
+        { title: '数量', dataIndex: 'quantity' },
+        { title: '货位', dataIndex: 'positionBarCode' },
+        { title: '项目事件', dataIndex: 'projectItem' },
+      ],
     };
   },
-
-  mounted: function () {
-    var _self = this;
-    _self.queryInventory();
-    $('.fixed-table').tableFixer({
-      'left': 3,
-      'head': true,
-    });
-
-    $('.fixed-table').colResizable({
-      resizeMode: 'overflow',
-      partialRefresh: true,
-    });
+  mounted() {
+    this.queryInventory();
   },
-
   methods: {
-    /**
-         * 导出excel
-         */
-    exportExcel: function () {
-      var _self = this;
-      var loginInfo = localStorage.getItem('#LoginInfo');
-      var loginData = JSON.parse(loginInfo);
-      var whereClause = ' totalInventory.clientId=' + loginData.loginClientId;
-      if (_self.queryNo != null && _self.queryNo.length > 0) {
-        whereClause = whereClause + ' AND totalInventory.no like ' + '\'%' + _self.queryNo + '%\'';
-        if (_self.queryName != null && _self.queryName.length > 0) {
-          whereClause = whereClause + ' OR totalInventory.name like ' + '\'%' + _self.queryName + '%\'';
+    exportExcel() {
+      const loginInfo = localStorage.getItem('#LoginInfo');
+      const loginData = JSON.parse(loginInfo);
+      let whereClause = `totalInventory.clientId=${loginData.loginClientId}`;
+      if (this.queryNo) {
+        whereClause += ` AND totalInventory.no like '%${this.queryNo}%'`;
+        if (this.queryName) {
+          whereClause += ` OR totalInventory.name like '%${this.queryName}%'`;
         }
-        if (_self.queryType != null && _self.queryType.length > 0) {
-          whereClause = whereClause + ' OR totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
+        if (this.queryType) {
+          whereClause += ` OR totalInventory.type like '%${this.queryType}%'`;
         }
-      } else if (_self.queryName != null && _self.queryName.length > 0) {
-        whereClause = whereClause + ' AND totalInventory.name like ' + '\'%' + _self.queryName + '%\'';
-        if (_self.queryType != null && _self.queryType.length > 0) {
-          whereClause = whereClause + ' OR totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
+      } else if (this.queryName) {
+        whereClause += ` AND totalInventory.name like '%${this.queryName}%'`;
+        if (this.queryType) {
+          whereClause += ` OR totalInventory.type like '%${this.queryType}%'`;
         }
-      } else if (_self.queryType != null && _self.queryType.length > 0) {
-        whereClause = whereClause + ' AND totalInventory.type like ' + '\'%' + _self.queryType + '%\'';
+      } else if (this.queryType) {
+        whereClause += ` AND totalInventory.type like '%${this.queryType}%'`;
       }
       whereClause = encodeURIComponent(whereClause);
-      var url = '/ureport/preview?_u=dicfile-wms:stock.ureport.xml&whereClause=' + whereClause;
+      const url = `/ureport/preview?_u=dicfile-wms:stock.ureport.xml&whereClause=${whereClause}`;
       window.open(url);
     },
-    /**
-         * 根据存货档案id进行查询
-         */
-    findByInventoryId: function (data) {
-      var _self = this;
-      if (data.totalQuantity == undefined || data.totalQuantity == null) {
+    findByInventoryId(data) {
+      if (!data.totalQuantity) {
         Notify.error('提示', '物料暂无入库记录', false);
         return;
       }
-      var inventoryId = data.inventoryId;
-      var tagNo = data.tagNo;
-      var rfidManagement = data.rfidManagement;
-      _self.displayData = data;
-      if (rfidManagement == true) {
-        if (tagNo == undefined || tagNo == null || tagNo == '002') {
+      const inventoryId = data.inventoryId;
+      const tagNo = data.tagNo;
+      const rfidManagement = data.rfidManagement;
+      this.displayData = data;
+      if (rfidManagement) {
+        if (!tagNo || tagNo === '002') {
           InventoryInstanceResource.findCurrentStockByInventoryId(inventoryId).then(successData => {
-            if(successData.errorCode == 0) {
-              if (successData.datas && successData.datas.length > 0) {
-                _self.inventoryInstanceCurrentStocks2 = successData.datas;
-                _self.modal2 = true;
-              }
-            } else {
-              Notify.error('错误', successData.errorMessage, false);
-              return;
+            if (successData.errorCode === 0 && successData.datas && successData.datas.length > 0) {
+              this.inventoryInstanceCurrentStocks2 = successData.datas;
+              this.modal2 = true;
             }
-          }, errorData => {
+          }).catch(errorData => {
             Common.processException(errorData);
           });
         } else {
           InventoryInstanceBindResource.findByInventoryId(inventoryId).then(successData => {
-            if(successData.errorCode == 0) {
-              if (successData.datas) {
-                _self.inventoryInstanceCurrentStocks = successData.datas;
-                _self.modal = true;
-              }
+            if (successData.errorCode === 0 && successData.datas) {
+              this.inventoryInstanceCurrentStocks = successData.datas;
+              this.modal = true;
             }
-          }, errorData => {
+          }).catch(errorData => {
             Common.processException(errorData);
           });
         }
       } else {
-        _self.modal3 = true;
+        this.modal3 = true;
       }
     },
-    changeSelectType: function () {
-      var _self = this;
-      _self.pagination.current_page = 1;
-      _self.queryInventory();
+    changeSelectType() {
+      this.pagination.current = 1;
+      this.queryInventory();
     },
-    /**
-         * 根据物料名称或者编号查询数据
-         */
-    queryInventory: function () {
-      var _self = this;
-      if (_self.inventoryInstanceDatas == undefined) {
-        _self.inventoryInstanceDatas = [];
+    queryInventory() {
+      if (!this.inventoryInstanceDatas) {
+        this.inventoryInstanceDatas = [];
       }
-      var queryNo = $.trim(_self.queryNo);
-      var queryName = $.trim(_self.queryName);
-      var queryType = $.trim(_self.queryType);
-      if ((queryNo.length > 0 || queryName.length > 0 || queryType.length > 0) && !_self.isUpdatePage) {
-        _self.pagination.current_page = 1;
-        _self.isUpdatePage = true;
-      } else if (queryNo.length == 0 && queryName.length == 0 && queryType.length == 0) {
-        _self.isUpdatePage = false;
+      const queryNo = this.queryNo.trim();
+      const queryName = this.queryName.trim();
+      const queryType = this.queryType.trim();
+      if ((queryNo.length > 0 || queryName.length > 0 || queryType.length > 0) && !this.isUpdatePage) {
+        this.pagination.current = 1;
+        this.isUpdatePage = true;
+      } else if (queryNo.length === 0 && queryName.length === 0 && queryType.length === 0) {
+        this.isUpdatePage = false;
       }
-      _self.inventoryInstanceDatas.splice(0, _self.inventoryInstanceDatas.length);
-      var inventoryQueryCondition = {
-        'no': queryNo,
-        'name': queryName,
-        'type': queryType,
-        'start': (_self.pagination.current_page - 1) * _self.pagination.per_page,
-        'length': _self.pagination.per_page,
+      this.inventoryInstanceDatas = [];
+      const inventoryQueryCondition = {
+        no: queryNo,
+        name: queryName,
+        type: queryType,
+        start: (this.pagination.current - 1) * this.pagination.pageSize,
+        length: this.pagination.pageSize,
       };
-      _self.loading=true;
-      CurrentStockResource.findSiemensCurrentStock(inventoryQueryCondition, _self.selectType).then(successData => {
-        _self.loading=false;
-        if(successData.errorCode == 0) {
+      this.loading = true;
+      CurrentStockResource.findSiemensCurrentStock(inventoryQueryCondition, this.selectType).then(successData => {
+        this.loading = false;
+        if (successData.errorCode === 0) {
           if (successData.datas) {
-            _self.inventoryInstanceDatas = successData.datas;
-            _self.pagination.total = successData.total;
-            _self.pagination.last_page = Math.ceil(_self.pagination.total / _self.pagination.per_page);
+            this.inventoryInstanceDatas = successData.datas;
+            this.pagination.total = successData.total;
+            this.pagination.lastPage = Math.ceil(this.pagination.total / this.pagination.pageSize);
           }
-          _self.fixedTableHeader();
         }
-      }, errorData => {
-        _self.loading=false;
+      }).catch(errorData => {
+        this.loading = false;
         Common.processException(errorData);
       });
     },
-
-    /**
-         * 冻结表头
-         */
-    fixedTableHeader: function () {
-      let _self = this;
-
-      _self.$nextTick(function () {
-        $('.fixed-table').tableFixer({
-          'left': 3,
-          'head': true,
-        });
-      });
+    handleTableChange(pagination) {
+      this.pagination.current = pagination.current;
+      this.pagination.pageSize = pagination.pageSize;
+      this.queryInventory();
+    },
+    handleModalOk() {
+      this.modal = false;
+    },
+    handleModal2Ok() {
+      this.modal2 = false;
+    },
+    handleModal3Ok() {
+      this.modal3 = false;
+    },
+    handleModalCancel() {
+      this.modal = false;
+    },
+    handleModal2Cancel() {
+      this.modal2 = false;
+    },
+    handleModal3Cancel() {
+      this.modal3 = false;
     },
   },
 };
 </script>
 
 <style scoped>
-.flex-container {
-    display: flex;
-    /* 垂直*/
-    flex-direction: column;
-    width: 100%;
-    /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-    height: calc(100vh - 140px);
-}
-
-.flex-header {
-    /*放大缩小比例为0 */
-    flex: 0 0 35px;
-}
-
-.flex-footer {
-    height: 45px;
-    /*放大缩小比例为0 */
-    flex: 0 0 45px;
-}
-
-.flex-content {
-    flex: 1;
-    overflow: scroll;
-    width: 100%;
-}
-
-.fixed-table {
-    table-layout: fixed;
-    word-wrap: break-word;
-    word-break: break-all;
-}
-</style>
-
-<style scoped>
-.fixed-table {
-    table-layout: fixed;
-    width: 800px !important;
-    min-width: 800px !important;
-}
-
-table.fixed-table tr {
-    height: 40px;
-}
-
-table.fixed-table th,
-table.fixed-table td {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
-
-.image {
-    width: 40px;
-    height: 40px;
-}
-
-.modal-img-box {
-    width: 100%;
-    text-align: center;
-    overflow: auto;
-}
-
-.m-img {
-    width: 100%;
-}
-</style>
+/* 可以添加自定义样式 */
+</style>

+ 96 - 74
src/stock/GenerateToolRequest.vue

@@ -1,78 +1,80 @@
 <template>
-  <div class="container-fluid">
+  <a-layout class="container">
     <Navbar title="根据安全库存生成工量具月度需求明细" :is-go-back="true" />
-    <div class="form-inline">
-      <div class="form-group">
-        <label>
-          仓库:   
-        </label>
-        <div class="input-group">
-          <v-select v-model="warehousesA" label="name" :options="warehouses" multiple />
-        </div>
-      </div>
-    </div>
-    <h4 />
-    <table class="table table-bordered">
-      <thead>
-        <tr>
-          <th>序号</th>
-          <th>工量具名称</th>
-          <th>工量具图号</th>
-          <th>物料编码</th>
-          <th>数量</th>
-          <th>规格型号</th>
-          <th>计量单位</th>
-          <th>类别</th>
-          <th>安全库存</th>
-          <th>库存数量</th>
-          <th>需求数量</th>
-          <th>操作</th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr v-for="(data, index) in inventorySafeStocks" :key="data.id">
-          <td>{{ index + 1 }}</td>
-          <td>{{ data.inventoryName }}</td>
-          <td>{{ data.inventoryDrawingNo }}</td>
-          <td>{{ data.inventoryNo }}</td>
-          <td />
-          <td>{{ data.inventoryType }}</td>
-          <td>{{ data.computationUnitName }}</td>
-          <td>{{ data.inventoryClassName }}</td>
-          <td>{{ data.minimumStock }}</td>
-          <td>{{ data.currentStock }}</td>
-          <td>
-            <span v-if="!data.inventoryExist">
-              <input v-model.trim="data.needQuantity" autocomplete="off" type="number" class="form-control" />
-            </span>
-          </td>
-          <td>
-            <span v-if="!data.inventoryExist">
-              <button type="button" class="btn btn-primary" @click="confirm(data)">确定</button>
-            </span>
-          </td>
-        </tr>
-      </tbody>
-    </table>
+    
+    <a-card :bordered="false" class="form-card">
+      <a-form layout="inline">
+        <a-form-item label="仓库选择">
+          <a-select
+            v-model:value="warehousesA"
+            mode="multiple"
+            style="width: 300px"
+            :options="warehouses"
+            placeholder="请选择仓库"
+            :field-names="{ label: 'label', value: 'value' }"
+          />
+        </a-form-item>
+      </a-form>
+
+      <a-table
+        :data-source="inventorySafeStocks"
+        :columns="columns"
+        :pagination="false"
+        row-key="id"
+        class="data-table"
+      >
+        <template #bodyCell="{ column, record, index }">
+          <template v-if="column.dataIndex === 'index'">{{ index + 1 }}</template>
+          <template v-else-if="column.dataIndex === 'operation'">
+            <a-button 
+              v-if="!record.inventoryExist"
+              type="primary" 
+              size="small"
+              @click="confirm(record)"
+            >
+              确定
+            </a-button>
+          </template>
+          <template v-else-if="column.dataIndex === 'needQuantity'">
+            <a-input-number
+              v-if="!record.inventoryExist"
+              v-model:value="record.needQuantity"
+              :min="0"
+              style="width: 100%"
+            />
+          </template>
+          <template v-else>
+            {{ record[column.dataIndex] }}
+          </template>
+        </template>
+      </a-table>
+    </a-card>
+
     <Loading v-if="loading" />
-  </div>
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
+import { ref } from 'vue';
 
 
-import vSelect from 'vue-select';
-import 'vue-select/dist/vue-select.css';
-
 export default {
-  components: {
-    
-    vSelect,
-    
-  },
   data: function () {
     return {
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '工量具名称', dataIndex: 'inventoryName' },
+        { title: '工量具图号', dataIndex: 'inventoryDrawingNo' },
+        { title: '物料编码', dataIndex: 'inventoryNo' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '计量单位', dataIndex: 'computationUnitName' },
+        { title: '类别', dataIndex: 'inventoryClassName' },
+        { title: '安全库存', dataIndex: 'minimumStock' },
+        { title: '库存数量', dataIndex: 'currentStock' },
+        { title: '需求数量', dataIndex: 'needQuantity' },
+        { title: '操作', dataIndex: 'operation' },
+      ],
       warehouses: [],
       warehousesA: [],
       inventorySafeStocks: [],
@@ -91,25 +93,30 @@ export default {
     this.queryInventoryBySafeStock();
   },
   methods: {
-
-    queryAllWarehouses: function () {
-      var _self = this;
-      _self.loading=true;
+    queryAllWarehouses() {
+      const _self = this;
+      _self.loading = true;
       $.ajax({
-        type: 'get',
         url: Common.getApiURL('WarehouseResource/all'),
+        type: 'GET',
+        dataType: 'json',
         beforeSend: function(request) {
           Common.addTokenToRequest(request);
         },
         success: function(data) {
-          _self.loading=false;
-          _self.warehouses = data;
-          _self.warehousesA = data;
+          _self.warehouses = data.map(item => ({
+            ...item,
+            label: item.name,
+            value: item.id,
+          }));
+          _self.warehousesA = _self.warehouses;
         },
-        error: function (XMLHttpRequest, textStatus, errorThrown) {
-          _self.loading=false;
+        error: function(XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
         },
+        complete: function() {
+          _self.loading = false;
+        },
       });
     },
 
@@ -194,4 +201,19 @@ export default {
 
   },
 };
-</script>
+</script>
+
+<style scoped>
+.form-card {
+  margin-top: 24px;
+  padding: 16px;
+}
+
+.data-table {
+  margin-top: 16px;
+}
+
+.ant-form-item {
+  margin-right: 24px;
+}
+</style>

+ 83 - 254
src/stock/InAndOutFlow.vue

@@ -1,290 +1,119 @@
 <template>
-  <div>
-    <div class="flex-content">
-      <table class="fixed-table table-striped table-bordered">
-        <thead>
-          <tr>
-            <th style="width: 50px;">
-              序号
-            </th>
-            <th style="width: 150px;">
-              制单时间
-            </th>
-            <th style="width: 130px;">
-              单据类型
-            </th>
-            <th style="width: 100px;">
-              单据号
-            </th>
-            <th style="width: 200px;">
-              部门名称
-            </th>
-            <th style="width: 150px;">
-              项目名称
-            </th>
-            <th style="width: 150px;">
-              仓库名称
-            </th>
-            <th style="width: 150px;">
-              货位名称
-            </th>
-            <th style="width: 100px;">
-              制单人
-            </th>
-            <th style="width: 100px;">
-              备注
-            </th>
-            <th style="width: 80px;">
-              SKU
-            </th>
-            <th style="width: 150px;">
-              物料名称
-            </th>
-            <th style="width: 100px;">
-              规格型号
-            </th>
-            <th style="width: 50px;">
-              数量
-            </th>
-            <th style="width: 100px;">
-              单价(不含税)
-            </th>
-            <th style="width: 100px;">
-              金额(不含税)
-            </th>
-            <th style="width: 100px;">
-              税率
-            </th>
-            <th style="width: 100px;">
-              税额
-            </th>
-            <th style="width: 100px;">
-              价税合计
-            </th>
-          </tr>
-        </thead>
-        <tbody class="table1">
-          <tr
-            v-for="(data, index) in inventoryInstanceCurrentStocks"
-            :key="index"
-          >
-            <td>
-              {{ index + 1 + (pagination.current_page-1) * pagination.per_page }}
-            </td>
-            <td>
-              {{ data.documentAccountDate }}
-            </td>
-            <td>
-              {{ data.orderType }}
-            </td>
-            <td>
-              {{ data.documentNo }}
-            </td>
-            <td>
-              {{ data.organizationName }}
-            </td>
-            <td>
-              {{ data.projectItem }}
-            </td>
-            <td>
-              {{ data.warehouseName }}
-            </td>
-            <td>
-              {{ data.positionName }}
-            </td>
-            <td>
-              {{ data.documentCreateUser }}
-            </td>
-            <td>
-              {{ data.description }}
-            </td>
-            <td>
-              {{ data.inventoryNo }}
-            </td>
-            <td>
-              {{ data.inventoryName }}
-            </td>
-            <td>
-              {{ data.inventoryType }}
-            </td>
-            <td>
-              {{ data.quantity }}
-            </td>
-            <td>
-              {{ data.unitPrice }}
-            </td>
-            <td>
-              {{ data.totalPrice }}
-            </td>
-            <td>
-              {{ data.taxRate }}
-            </td>
-            <td>
-              {{ data.taxAmount }}
-            </td>
-            <td>
-              {{ data.totalPriceIncludingTax }}
-            </td>
-          </tr>
-        </tbody>
-      </table>
-    </div>
-    <div class="flex-footer">
-      <div>
-        <div class="form-group">
-          <div class="pull-left">
-            共查询到<b>{{ pagination.total }}</b>条数据
-          </div>
-          <div class="pull-right">
-            <VueBootstrapPagination
-              v-if="pagination.last_page > 0"
-              :pagination="pagination"
-              :callback="findByInventoryId"
-            />
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
+  <a-card :bordered="false">
+    <a-table
+      :data-source="inventoryInstanceCurrentStocks"
+      :columns="columns"
+      :pagination="pagination"
+      row-key="id"
+      size="small"
+      :scroll="{ x: true }"
+      @change="handleTableChange"
+    >
+      <template #bodyCell="{ column, record }">
+        <template v-if="column.dataIndex === 'index'">
+          {{ (pagination.current_page - 1) * pagination.per_page + record.index + 1 }}
+        </template>
+      </template>
+    </a-table>
+
+    <a-pagination
+      v-model:current="pagination.current_page"
+      :total="pagination.total"
+      :page-size="pagination.per_page"
+      show-less-items
+      @change="findByInventoryId"
+    />
+  </a-card>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import CurrentStockResource from '../api/wms/CurrentStockResource.js';
 
-
-
 export default {
-  name:'InAndOutFlow',
-  components: {
-
-
-  },
+  name: 'InAndOutFlow',
   props: {
-    displayData:{
+    displayData: {
       type: Object,
-      default(){
+      default() {
         return {};
       },
     },
   },
-  data: function () {
-    this.Common = Common;
+  data() {
     return {
-      // displayData: undefined,
+      columns: [
+        { title: '序号', dataIndex: 'index' },
+        { title: '制单时间', dataIndex: 'documentAccountDate' },
+        { title: '单据类型', dataIndex: 'orderType' },
+        { title: '单据号', dataIndex: 'documentNo' },
+        { title: '部门名称', dataIndex: 'organizationName' },
+        { title: '项目名称', dataIndex: 'projectItem' },
+        { title: '仓库名称', dataIndex: 'warehouseName' },
+        { title: '货位名称', dataIndex: 'positionName' },
+        { title: '制单人', dataIndex: 'documentCreateUser' },
+        { title: '备注', dataIndex: 'description' },
+        { title: 'SKU', dataIndex: 'inventoryNo' },
+        { title: '物料名称', dataIndex: 'inventoryName' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+        { title: '数量', dataIndex: 'quantity' },
+        { title: '单价(不含税)', dataIndex: 'unitPrice' },
+        { title: '金额(不含税)', dataIndex: 'totalPrice' },
+        { title: '税率', dataIndex: 'taxRate' },
+        { title: '税额', dataIndex: 'taxAmount' },
+        { title: '价税合计', dataIndex: 'totalPriceIncludingTax' },
+      ],
       inventoryInstanceCurrentStocks: [],
       pagination: {
         total: 0,
-        per_page: 10, // required
-        current_page: 1, // required
-        last_page: 0, // required
+        per_page: 10,
+        current_page: 1,
+        last_page: 0,
       },
     };
   },
-
-  mounted: function () {
-    var _self = this;
-    _self.findByInventoryId();
+  mounted() {
+    this.findByInventoryId();
   },
-
   methods: {
-    /**
-         * 根据存货档案id进行查询
-         * 外部调用
-         * LeiGuoXian
-         */
-    findByInventoryId: function () {
-      var _self = this;
-      // if (data != null) {
-      //   _self.displayData = data;
-      // }
-      var inventoryId = _self.displayData.inventoryId;
-      var range = {
-        'start': (_self.pagination.current_page - 1) * _self.pagination.per_page,
-        'length': _self.pagination.per_page,
+    findByInventoryId() {
+      const range = {
+        start: (this.pagination.current_page - 1) * this.pagination.per_page,
+        length: this.pagination.per_page,
       };
-      CurrentStockResource.findStockInAndStockOutData(inventoryId, range).then(successData => {
-        if (successData) {
-          _self.inventoryInstanceCurrentStocks = successData.dataList;
-          _self.pagination.total = successData.totalSize;
-          _self.pagination.last_page = Math.ceil(_self.pagination.total / _self.pagination.per_page);
-          _self.fixedTableHeader();
-        }
-      }, errorData => {
-        Common.processException(errorData);
-      });
-    },
-
-    /**
-         * 冻结表头
-         */
-    fixedTableHeader: function () {
-      let _self = this;
-
-      _self.$nextTick(function () {
-        $('.fixed-table').tableFixer({
-          'left': 3,
-          'head': true,
-        });
-        $('.fixed-table').colResizable({
-          resizeMode: 'overflow',
-          partialRefresh: true,
+      CurrentStockResource.findStockInAndStockOutData(this.displayData.inventoryId, range)
+        .then(successData => {
+          if (successData) {
+            this.inventoryInstanceCurrentStocks = successData.dataList.map((item, index) => ({
+              ...item,
+              index,
+            }));
+            this.pagination.total = successData.totalSize;
+            this.pagination.last_page = Math.ceil(this.pagination.total / this.pagination.per_page);
+          }
+        })
+        .catch(errorData => {
+          Common.processException(errorData);
         });
-      });
     },
   },
 };
 </script>
 
 <style scoped>
-.flex-container {
-    display: flex;
-    /* 垂直*/
-    flex-direction: column;
-    width: 100%;
-    /*视口被均分为100单位的vh 占据整个窗口,扣掉顶部topNav的距离后,计算得到container的高度*/
-    height: calc(100vh - 140px);
-}
-
-.flex-header {
-    /*放大缩小比例为0 */
-    flex: 0 0 35px;
-}
-
-.flex-footer {
-    height: 45px;
-    /*放大缩小比例为0 */
-    flex: 0 0 45px;
-}
-
-.flex-content {
-    flex: 1;
-    overflow: scroll;
-    width: 100%;
-}
-
-.fixed-table {
-    table-layout: fixed;
-    word-wrap: break-word;
-    word-break: break-all;
-}
-</style>
-
-<style scoped>
-.fixed-table {
-    table-layout: fixed;
-    width: 800px !important;
-    min-width: 800px !important;
+.ant-card {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
 }
 
-table.fixed-table tr {
-    height: 40px;
+.ant-table {
+  flex: 1;
+  overflow: auto;
 }
 
-table.fixed-table th,
-table.fixed-table td {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
+.ant-pagination {
+  margin-top: 16px;
+  text-align: right;
 }
-</style>
+</style>

+ 101 - 213
src/stock/StockLedger.vue

@@ -1,133 +1,84 @@
 <template>
-  <div class="container-fluid">
+  <a-layout class="container">
     <Navbar :title="'库存台账'" :is-go-back="false" />
-
-    <div class="form-inline">
-      <div class="form-group">
-        <label class="m-label">单据日期:</label>
-        <div class="input-group m-input-group">
-          <DateTime
-            v-model="stockLedgerDto2.startBillDate"
-            class="DateTime"
+    
+    <a-card :bordered="false">
+      <a-form layout="inline" class="filter-form">
+        <a-form-item label="单据日期范围">
+          <a-range-picker
+            v-model:value="dateRange"
+            @change="handleDateChange"
           />
-        </div>
-      </div>
-      <div class="form-group">
-        <label class="m-label">~</label>
-        <div class="input-group m-input-group">
-          <DateTime
-            v-model="stockLedgerDto2.endBillDate"
-            class="DateTime"
+        </a-form-item>
+
+        <a-form-item label="审核日期范围">
+          <a-range-picker
+            v-model:value="examineDateRange"
+            @change="handleExamineDateChange"
           />
-        </div>
-      </div>
-      <div class="form-group">
-        <label class="m-label">审核日期:</label>
-        <div class="input-group m-input-group">
-          <DateTime
-            v-model="stockLedgerDto2.startExamineDate"
-            class="DateTime"
+        </a-form-item>
+
+        <a-form-item label="存货编码范围">
+          <a-input
+            v-model:value="stockLedgerDto2.startInventoryNo"
+            placeholder="起始编码"
+            class="code-range-input"
           />
-        </div>
-      </div>
-      <div class="form-group">
-        <label class="m-label">~</label>
-        <div class="input-group m-input-group">
-          <DateTime
-            v-model="stockLedgerDto2.endExamineDate"
-            class="DateTime"
+          <span class="range-split">~</span>
+          <a-input
+            v-model:value="stockLedgerDto2.endInventoryNo"
+            placeholder="结束编码"
+            class="code-range-input"
           />
-        </div>
-      </div>
-      <div class="form-group">
-        <label class="m-label">存货编码:</label>
-        <input
-          v-model="stockLedgerDto2.startInventoryNo"
-          autocomplete="off"
-          type="text"
-          class="form-control m-input-group"
-          name="startInventoryNo"
-          placeholder="请填写编码"
-        />
-      </div>
-      <div class="form-group">
-        <label class="m-label">~</label>
-        <input
-          v-model="stockLedgerDto2.endInventoryNo"
-          autocomplete="off"
-          type="text"
-          class="form-control m-input-group"
-          name="endInventoryNo"
-          placeholder="请填写编码"
-        />
-      </div>
+        </a-form-item>
 
-      <div class="form-group">
-        <label class="m-label">仓库:</label>
-        <div class="input-group m-input-group">
-          <v-select
-            v-model="selected"
-            :options="isOptions"
-            multiple="multiple"
+        <a-form-item label="仓库选择">
+          <a-select
+            v-model:value="selectedWarehouses"
+            mode="multiple"
+            style="width: 200px"
             placeholder="请选择仓库"
-            @input="warehouseSelectChanged()"
-          />
-        </div>
-      </div>
-      <button type="button" class="btn btn-info" @click="selectStockLedgers">
-        确定
-      </button>
-    </div>
-
-    <div v-if="stockLedgerDtos.length > 0" class="row" style="margin-top: 15px">
-      <div>
-        <table class="table table-bordered">
-          <thead>
-            <tr>
-              <th>存货编码</th>
-              <th>存货名称</th>
-              <th>规格型号</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr v-for="stockLedgerDto in stockLedgerDtos" :key="stockLedgerDto.id">
-              <td>
-                <a href="javascript:void(0)" @click="onChoise($event)">{{
-                  stockLedgerDto.inventoryNo
-                }}</a>
-              </td>
-              <td>
-                {{ stockLedgerDto.inventoryName1 }}
-              </td>
-              <td>
-                {{ stockLedgerDto.inventoryType }}
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <VueBootstrapPagination :pagination="pagination" :callback="selectStockLedgers" />
-    </div>
-
-    <div class="row">
-      <ProcessReportResultPreview
-        :process-report-result="processReportResult"
-      />
-    </div>
-  </div>
+            @change="warehouseSelectChanged"
+          >
+            <a-select-option
+              v-for="warehouse in warehouseOptions"
+              :key="warehouse.value"
+              :value="warehouse.value"
+            >
+              {{ warehouse.label }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-button type="primary" @click="selectStockLedgers">查询</a-button>
+      </a-form>
+
+      <a-table
+        :data-source="stockLedgerDtos"
+        :columns="columns"
+        :pagination="pagination"
+        row-key="id"
+        class="data-table"
+      >
+        <template #bodyCell="{ column, record }">
+          <template v-if="column.dataIndex === 'inventoryNo'">
+            <a @click="onChoise(record)">{{ record.inventoryNo }}</a>
+          </template>
+        </template>
+      </a-table>
+    </a-card>
+
+    <ProcessReportResultPreview
+      :process-report-result="processReportResult"
+      class="report-preview"
+    />
+  </a-layout>
 </template>
 
 <script>
 import Common from '../common/Common.js';
 import { Notify } from 'pc-component-v3';
-
-
-
-
-
-
-
-import vSelect from 'vue-select';
+import { ref, reactive } from 'vue';
 
 //获取当前登录信息
 var loginInfoJson = localStorage.getItem('#LoginInfo');
@@ -136,26 +87,34 @@ import 'vue-select/dist/vue-select.css';
 
 export default {
   components: {
-    vSelect,
+  },
+  setup() {
+    const pagination = reactive({
+      current: 1,
+      pageSize: 5,
+      total: 0,
+      showTotal: total => `共 ${total} 条`,
+    });
+
+    return { pagination };
   },
 
   data: function () {
     return {
+      columns: [
+        { title: '存货编码', dataIndex: 'inventoryNo' },
+        { title: '存货名称', dataIndex: 'inventoryName1' },
+        { title: '规格型号', dataIndex: 'inventoryType' },
+      ],
+      dateRange: [],
+      examineDateRange: [],
+      selectedWarehouses: [],
+      warehouseOptions: [],
       stockLedgerDto2: {
-        //startBillDate: undefined,
-        //endBillDate: undefined,
-        //startExamineDate: undefined,
-        //endExamineDate: undefined,
         warehouseIds: [],
         startInventoryNo: '',
         endInventoryNo: '',
       },
-      pagination: {
-        total: 0,
-        per_page: 5, // required
-        current_page: 1, // required
-        last_page: 1, // required
-      },
       processResultData: '',
       processReportResult: {},
       stockLedgerDtos: [],
@@ -198,8 +157,8 @@ export default {
                 item.value = item.id;
               });
             }
-            _self.isOptions = data.datas;
-            _self.warehouseDtos = data.datas;
+            // _self.isOptions = data.datas;
+            _self.warehouseOptions = data.datas;
           }
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -214,46 +173,6 @@ export default {
     selectStockLedgers: function () {
       var _self = this;
       this.warehouseSelectChanged();
-      /*var whereClause = "";
-            if(_self.stockLedgerDto2.startBillDate != undefined && _self.stockLedgerDto2.startBillDate != '' ) {
-                if(_self.stockLedgerDto2.endBillDate != undefined && _self.stockLedgerDto2.endBillDate != '') {
-                    whereClause += " and mso.documentAccountDate between '"+ _self.stockLedgerDto2.startBillDate + "' and '" +  _self.stockLedgerDto2.endBillDate +"'";
-                } else {
-                    whereClause += " and mso.documentAccountDate > '" + _self.stockLedgerDto2.startBillDate +"'";
-                }
-            } else {
-                if(_self.stockLedgerDto2.endBillDate != undefined && _self.stockLedgerDto2.endBillDate != '') {
-                    whereClause += " and mso.documentAccountDate < '"+ _self.stockLedgerDto2.endBillDate +"'";
-                }
-            }
-
-            if(_self.stockLedgerDto2.startExamineDate != undefined && _self.stockLedgerDto2.startExamineDate != '') {
-                if(_self.stockLedgerDto2.endExamineDate != undefined && _self.stockLedgerDto2.endExamineDate != '') {
-                    whereClause += " and mso.verifyDate between '" + _self.stockLedgerDto2.startExamineDate + "' and '"  + _self.stockLedgerDto2.endExamineDate +"'";
-                } else {
-                    whereClause += " and mso.verifyDate > '" +_self.stockLedgerDto2.startExamineDate +"'";
-                }
-            } else {
-                if(_self.stockLedgerDto2.endExamineDate != undefined && _self.stockLedgerDto2.endExamineDate != '') {
-                    whereClause += " and mso.verifyDate < '"+ _self.stockLedgerDto2.endExamineDate +"'";
-                }
-            }
-
-            if(!_self.stockLedgerDto2.startInventoryNo == "") {
-                if(!_self.stockLedgerDto2.endInventoryNo == "") {
-                    whereClause += " and it.no between " +_self.stockLedgerDto2.startInventoryNo + " and " + _self.stockLedgerDto2.endExamineDate ;
-                } else {
-                    whereClause += " and it.no > " + _self.stockLedgerDto2.startInventoryNo ;
-                }
-            } else {
-                if(!_self.stockLedgerDto2.endInventoryNo == "") {
-                    whereClause += " and it.no < " +  _self.stockLedgerDto2.endInventoryNo;
-                }
-            }
-
-            if(_self.stockLedgerDto2.warehouseIds.length >= 1) {
-                whereClause += " and wh.id in("+ _self.stockLedgerDto2.warehouseIds +")";
-            }*/
 
       var queryParam = {
         range: {
@@ -303,39 +222,6 @@ export default {
       });
     },
 
-    /**
-     * 改变当前页
-     */
-    /*changePageNo: function(classs) {
-            var _self = this;
-
-            //var element = event.currentTarget;
-
-            //var classs = $(element).attr("class");
-            //console.log(classs);
-            if(classs == 'first') {
-                _self.stockLedgerDto2.pageCurrent = 1;
-            }
-            if(classs == 'previou') {
-                if(_self.stockLedgerDto2.pageCurrent <= 1) {
-                    return;
-                } else {
-                    _self.stockLedgerDto2.pageCurrent -= 1;
-                }
-            }
-            if(classs == 'nextone') {
-                if(_self.stockLedgerDto2.pageCurrent == _self.maxPage) {
-                    return;
-                } else {
-                    _self.stockLedgerDto2.pageCurrent += 1;
-                }
-            }
-            if(classs == 'last') {
-                _self.stockLedgerDto2.pageCurrent = _self.maxPage;
-            }
-            _self.selectStockLedgers();
-        },*/
-
     /**
      * 仓库选择改变
      */
@@ -488,21 +374,23 @@ export default {
 </script>
 
 <style scoped>
-.panel-body > div.row {
-  margin-bottom: 10px;
+.filter-form {
+  margin-bottom: 24px;
 }
-.userTable {
-  width: 100%;
+
+.code-range-input {
+  width: 120px;
 }
-.userTable > tr > td {
-  padding: 5px 20px;
+
+.range-split {
+  margin: 0 8px;
 }
 
-.m-label {
-  width: 5em;
+.data-table {
+  margin-top: 24px;
 }
 
-.m-input-group {
-  width: 240px;
+.report-preview {
+  margin-top: 32px;
 }
 </style>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä