gjy 3 năm trước cách đây
mục cha
commit
14b4d586b8

+ 8 - 4
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -99,7 +99,7 @@
             </template>
           </el-table-column>
         </el-table> -->
-        <el-table ref="singleTable" :data="switchList" highlight-current-row @current-change="rowChange"
+        <el-table ref="singleTable" :key='timestamp' :data="switchList" highlight-current-row @current-change="rowChange"
               style="width: 100%; overflow-y: scroll !important; height: calc(100vh - 54vh);margin-top:14px">
               <el-table-column property="number" label="业务编号">
                 <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
@@ -205,6 +205,7 @@
         inspectList: [],
         noinspectList:[],
         switchList:[],
+        timestamp:'',
         //分页
         currentPage: 1,
         pageSize: 10,
@@ -591,7 +592,7 @@
         })
       },
       getList() {
-        
+        this.timestamp=new Date().valueOf()
        getinspectList({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
@@ -603,17 +604,19 @@
           .toPromise()
           .then((response) => {
             this.noinspectList = response.records
+            console.log(this.inspectbtn,this.noinspectList.length )
              if(this.inspectbtn == 1 && this.noinspectList.length > 0){
                this.switchList = this.noinspectList
                 this.inspect = this.noinspectList[0]
                 if(!this.inspect.weighingManagement){
                    this.inspect.weighingManagement = {}
                 }
-            }else{
+            }else if(this.inspectbtn == 1){
                this.switchList = []
                 this.inspect = {}
                 this.inspect.weighingManagement = {}
             }
+            console.log(this.switchList )
             this.deptBudgetTotal1 = response.total
             this.nosuccess = response.total
           })
@@ -628,13 +631,14 @@
           .toPromise()
           .then((response) => {
             this.inspectList = response.records
+            console.log(this.inspectbtn,this.inspectList.length )
             if(this.inspectbtn == 2 && this.inspectList.length > 0){
                 this.switchList = this.inspectList
                 this.inspect = this.inspectList[0]
                   if(!this.inspect.weighingManagement){
                    this.inspect.weighingManagement = {}
                 }
-            }else{
+            }else if(this.inspectbtn == 2){
               this.switchList = []
               this.inspect = {}
                 this.inspect.weighingManagement = {}

+ 72 - 4
src/views/outboundManagement/weighingManagementNew.vue

@@ -488,7 +488,8 @@
               } else if (this.types == 4) {
                 this.weighingList.flag = 1
               }
-              tareEdit(this.weighingList)
+			  if(this.tpyeNo==1){
+				tareEdit(this.weighingList)
                 .toPromise()
                 .then((response) => {
                   this.types = ''
@@ -518,6 +519,40 @@
                   }
                   // this.inspect = []
                 })
+			  }else{
+				grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  this.weighingList = {
+                    grossWeight: 0,
+                    tare: 0,
+                    tips: '',
+                    // contractNo:'',
+                    // inOutTaskNo:'',
+                    buckleMiscellaneous: 0,
+                    netWeight: 0,
+                    receivableWeighingFee: '',
+                    warehouseInOutDetail: {
+                      grade: '',
+                      imperfectGrain: '',
+                      impurity: '',
+                      jiaorenli: '',
+                      bulkDensity: '',
+                      mildewGrain: '',
+                    },
+                    qualityInspectionManagement: {
+                      boxNo: '暂无',
+                      boxNoOther: '暂无',
+                      titleNo: '暂无',
+                      titleNoOther: '暂无',
+                    },
+                  }
+                  // this.inspect = []
+                })
+			  
+			  }
+              
             })
           }
         })
@@ -543,12 +578,42 @@
               } else if (this.types == 4) {
                 this.weighingList.flag = 1
               }
-              tareEdit(this.weighingList)
+               if(this.tpyeNo==1){
+				tareEdit(this.weighingList)
                 .toPromise()
                 .then((response) => {
                   this.types = ''
+                  this.weighingList = {
+                    grossWeight: 0,
+                    tare: 0,
+                    tips: '',
+                    // contractNo:'',
+                    // inOutTaskNo:'',
+                    buckleMiscellaneous: 0,
+                    netWeight: 0,
+                    receivableWeighingFee: '',
+                    warehouseInOutDetail: {
+                      grade: '',
+                      imperfectGrain: '',
+                      impurity: '',
+                      jiaorenli: '',
+                      bulkDensity: '',
+                      mildewGrain: '',
+                    },
+                    qualityInspectionManagement: {
+                      boxNo: '暂无',
+                      boxNoOther: '暂无',
+                      titleNo: '暂无',
+                      titleNoOther: '暂无',
+                    },
+                  }
                   // this.inspect = []
-                  this.isShowPrint = false
+                })
+			  }else{
+				grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
                   this.weighingList = {
                     grossWeight: 0,
                     tare: 0,
@@ -573,7 +638,10 @@
                       titleNoOther: '暂无',
                     },
                   }
+                  // this.inspect = []
                 })
+			  
+			  }
             })
             this.dialogTableVisible = true
           }
@@ -869,7 +937,7 @@
                         getweighing({
                           id: this.weighingList.id
                         })
-                        toPromise().then((response) => {
+                        .toPromise().then((response) => {
                           if (this.reader) {
                             this.reader.cancel()
                           }