潘超林 5 months ago
parent
commit
d8be2f7832
3 changed files with 20 additions and 11 deletions
  1. 1 1
      .env.production
  2. 0 1
      src/views/equipment.vue
  3. 19 9
      src/views/index.vue

+ 1 - 1
.env.production

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 农商网管理系统
 ENV = 'production'
 
 # 农商云管理系统/生产环境
-VUE_APP_BASE_API = '/api'
+VUE_APP_BASE_API = 'https://app.sxdirectpurchase.com/api'
 
 #本地测试打印机绑定
 VUE_APP_PRINT_SWITCH = false

+ 0 - 1
src/views/equipment.vue

@@ -259,7 +259,6 @@ export default {
         size: 10,
         page: 1,
       },
-      loading: false,
       title: "",
       rules: {
         name: [{ required: true, message: "打印机名称不能为空", trigger: "blur" }],

+ 19 - 9
src/views/index.vue

@@ -64,7 +64,13 @@
             >
           </el-form-item>
         </el-form>
-        <el-button type="primary" size="mini" @click="handlePrint">订单打印</el-button>
+        <el-button
+          type="primary"
+          size="mini"
+          @click="handlePrint"
+          :disabled="!SelectList.length > 0"
+          >订单打印</el-button
+        >
         <el-table
           v-loading="loading"
           :data="tableList"
@@ -396,8 +402,8 @@
           </div>
         </el-col>
       </el-row>
-      <h3 style="font-weight: bold">物流信息</h3>
-      <el-row>
+      <h3 style="font-weight: bold" v-if="form.driverInfo">物流信息</h3>
+      <el-row v-if="form.driverInfo">
         <el-col :span="8">
           <div class="item">
             <div class="label">运单号</div>
@@ -749,6 +755,7 @@ export default {
         times: 1,
       },
       printList: [],
+      SelectList: [],
     };
   },
   mounted() {
@@ -758,11 +765,16 @@ export default {
   methods: {
     // 表格多选
     handleSelectionChange(val) {
-      console.log(val);
-      this.print.id = val.toString();
+      let list = [];
+      val.forEach((e) => {
+        list.push(e.id);
+      });
+      this.SelectList = list;
+      this.print.id = list.toString();
     },
     handlePrint() {
-      this.printSubmit(); //多选唤醒订单打印
+      this.dyOpen = true;
+      // this.printSubmit(); //多选唤醒订单打印
     },
 
     printSelect() {
@@ -802,14 +814,13 @@ export default {
             if (res1.code == 200) {
               this.form.driverInfo = res1.data;
             } else {
-              this.$message.error(res1.msg);
+              // this.$message.error(res1.msg);
             }
           });
         } else {
           this.$message.error(res.msg);
         }
       });
-
       this.title = "订单详情";
       this.open = true;
     },
@@ -830,7 +841,6 @@ export default {
           this.tableList = res.data.content;
           this.pagination.total = res.data.total;
           this.pagination.page = res.data.page;
-
           this.loading = false;
         } else {
           this.$message.error(res.msg);