695593266@qq.com 11 mēneši atpakaļ
vecāks
revīzija
34d1b117b3

+ 1 - 1
src/views/inspectionPlan/components/new-edit.vue

@@ -2112,7 +2112,7 @@
           const sampleListData =
             this.btnType == 'add'
               ? this.sampleList
-              : this.btnType == 'edit' && this.isSampleList
+              : this.btnType == 'issued' && this.isSampleList
               ? this.newSampleList
               : this.sampleList;
 

+ 18 - 4
src/views/sample/samplemanagement/components/addOrEditSample.vue

@@ -15,7 +15,7 @@
 
     <el-form
       label-width="120px"
-      ref="form"
+      ref="baseInfoRef"
       :model="form"
       :rules="rules"
       class="el-form-box"
@@ -76,7 +76,7 @@
     ></sampleTable>
 
     <div slot="footer" class="footer">
-      <el-button type="primary" @click="save">保存</el-button>
+      <el-button type="primary" @click="save('baseInfoRef')">保存</el-button>
 
       <el-button @click="cancel">返回</el-button>
     </div>
@@ -144,7 +144,18 @@
         // }
       },
       cancel() {},
-      save() {},
+      save(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            if (this.dataList.length > 0) {
+              
+            }
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
       async changesMainNumberModal(id, data) {
         // console.log(data.code);
 
@@ -160,7 +171,10 @@
         newData.batchNo = data.brandNum;
         newData.measureUnit = data.measuringUnit;
         newData.weightUnit = data.weightUnit;
-        
+        newData.weight = data.netWeight;
+
+        this.dataList.push(newData);
+
         // if (data.measureType == 1) {
         //   newData.measureUnit = data.measuringUnit;
         // } else if (data.measureType == 2) {

+ 2 - 2
vue.config.js

@@ -33,10 +33,10 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.107:18086',
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
-        target: 'http://192.168.1.251:18186',
+        // target: 'http://192.168.1.251:18186',
         // target: 'http://124.71.68.31:50001',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {