Bläddra i källkod

仓库标签打印由原来的单个打印改为支持多选批量打印

chensibo 1 månad sedan
förälder
incheckning
0d0bc1fba7
2 ändrade filer med 20 tillägg och 6 borttagningar
  1. 2 2
      .env.dev
  2. 18 4
      src/views/wms/base/components/StockLocation.vue

+ 2 - 2
.env.dev

@@ -6,8 +6,8 @@ VUE_APP_TITLE = WMS开发环境
 
 # 芋道管理系统/开发环境
 # VUE_APP_BASE_API = 'http://192.168.1.94:48080'
-VUE_APP_BASE_API = 'http://192.168.1.26:48080'
-# VUE_APP_BASE_API = 'http://113.105.183.190:48028'
+# VUE_APP_BASE_API = 'http://192.168.1.26:48080'
+VUE_APP_BASE_API = 'http://113.105.183.190:48028'
 # VUE_APP_BASE_API = 'http://61.155.26.34:36936'
 # VUE_APP_BASE_API = 'http://127.0.0.1:48080'
 # VUE_APP_BASE_API = 'http://2227el9013.iok.la'

+ 18 - 4
src/views/wms/base/components/StockLocation.vue

@@ -117,8 +117,8 @@
       <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
     </el-row>
 
-    <!-- 列表 -->
-    <el-table
+    <!-- 列表(含单选限制方法) -->
+    <!-- <el-table
       v-loading="loading"
       :data="list"
       border
@@ -126,6 +126,14 @@
       @selection-change="tableSelected"
       @select="select"
       @select-all="selectAll"
+    > -->
+    <!-- 列表(不含单选限制方法) -->
+    <el-table
+      v-loading="loading"
+      :data="list"
+      border
+      size="mini"
+      @selection-change="tableSelected"
     >
       <el-table-column
         type="selection"
@@ -676,6 +684,7 @@ export default {
       const list = this.currentRows.map((item) => item.deliveryOrderNo);
       this.ids = list.join(",");
     },
+    // select和selectAll两个方法在全选时只会选中第一条数据
     select(selection, row) {
       if (selection.length > 1) {
         const del_row = selection.shift();
@@ -696,8 +705,13 @@ export default {
         return;
       }
       console.log(this.currentRows);
-      const { id, locationCode } = this.currentRows[0];
-      const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${id}&code=${locationCode}`;
+      // 只能单个打印
+      // const { id, locationCode } = this.currentRows[0];
+      // const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${id}&code=${locationCode}`;
+      // 可以批量打印
+      const ids = this.currentRows.map((row) => row.id).join(",");
+      const codes = this.currentRows.map((row) => row.locationCode).join(",");
+      const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${ids}&code=${codes}`;
       this.$refs.issuePrint.title = "单据打印";
       this.$refs.issuePrint.dialogVisible = true;
       this.$refs.issuePrint.src = src;