Sfoglia il codice sorgente

批次号选择功能修改

lucw 8 mesi fa
parent
commit
555f6b81dd
2 ha cambiato i file con 15 aggiunte e 3 eliminazioni
  1. 13 1
      src/views/batchRecord/index.vue
  2. 2 2
      vue.config.js

+ 13 - 1
src/views/batchRecord/index.vue

@@ -118,7 +118,13 @@
           <div class="left-item">
           <div class="left-item">
             <div class="title">批次号</div>
             <div class="title">批次号</div>
             <div v-if="batchNos.length > 0" class="list-box">
             <div v-if="batchNos.length > 0" class="list-box">
-              <div class="list-item" v-for="i in batchNos" :key="i">
+              <div
+                class="list-item"
+                v-for="i in batchNos"
+                :key="i"
+                :class="{ active: i == tableQuery.batchNo }"
+                @click="changeBatchNo(i)"
+              >
                 <div> {{ i ? i : '暂无批次号' }}</div>
                 <div> {{ i ? i : '暂无批次号' }}</div>
               </div>
               </div>
             </div>
             </div>
@@ -280,9 +286,15 @@
         this.tableQuery.productCode = i.productCode;
         this.tableQuery.productCode = i.productCode;
         // 设置批次号
         // 设置批次号
         this.batchNos = i.batchNos;
         this.batchNos = i.batchNos;
+        this.tableQuery.batchNo = '';
         // 刷新表格
         // 刷新表格
         this.reload();
         this.reload();
       },
       },
+      // 选择批次号
+      changeBatchNo(i) {
+        this.tableQuery.batchNo = i;
+        this.reload();
+      },
       // 选择批记录类型
       // 选择批记录类型
       changeActiveType(i) {
       changeActiveType(i) {
         this.activeType = i.name;
         this.activeType = i.name;

+ 2 - 2
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
       '/api': {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.116:18086',
-        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.116:18086',
@@ -44,7 +44,7 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
         // target: 'http://192.168.1.251:18087',
-        target: 'http://192.168.1.116:18086',
+        // target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
         pathRewrite: {
           '^/api': ''
           '^/api': ''