huang_an пре 1 година
родитељ
комит
f828552b0d

+ 8 - 0
src/api/barCodeManagement/index.js

@@ -101,5 +101,13 @@ export default {
       return res.data.message;
     }
     return Promise.reject(new Error(res.data.message));
+  },
+  // 批量打印
+  batchBarPrint: async function (params) {
+    const res = await request.post('/main/print/batchBarPrint', params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
   }
 };

+ 15 - 0
src/views/rulesManagement/barCodeManagement/index.vue

@@ -99,6 +99,13 @@
                     <!-- <el-button @click="goEdit(scope.row)" type="text" size="mini"
                   >编辑</el-button
                 > -->
+                    <el-button
+                      v-if="scope.row.dictBarName == '包装条码'"
+                      @click="print(scope.row)"
+                      type="text"
+                      size="mini"
+                      >打印</el-button
+                    >
                     <el-button
                       @click="goDetails(scope.row)"
                       type="text"
@@ -233,6 +240,14 @@
 
       //跳转编辑页
       goEdit() {},
+      print(info) {
+        this.$router.push({
+          path: '/rulesManagement/barCodeManagement/print',
+          query: {
+            id: info.id
+          }
+        });
+      },
       //跳转详情
       goDetails(info) {
         this.$router.push({