From dd2d4190118b7fbe59c19a3a0ecc6d50cb63da61 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 01 十二月 2023 15:30:01 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 src/views/quality/Packaging_ledger/pack-from.vue    |   31 ++++++++-------
 src/views/quality/Packaging_ledger/index.vue        |   55 ++++++++++++++++-----------
 src/views/quality/Packaging_ledger/pack-fromadd.vue |   16 ++++----
 3 files changed, 56 insertions(+), 46 deletions(-)

diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue
index e740452..f9af4e3 100644
--- a/src/views/quality/Packaging_ledger/index.vue
+++ b/src/views/quality/Packaging_ledger/index.vue
@@ -9,7 +9,7 @@
             :prelang="prelang"
             :ajaxFun="ajaxFun"
             :options="options" 
-            @handleSelectionChange="handleCurrentChange"
+            @currentChange="handleCurrentChange"
             ref="processconfiguration"
             >
         <template #toolbar></template>
@@ -53,7 +53,7 @@
               :data="testStandardParams"
               id="testStandardParamTable"
               ref="testStandardParam"
-              :default-sort="{ prop: 'index' }"
+            
               highlight-current-row
               height="700"
               style="width: 100%"
@@ -62,7 +62,7 @@
               stripe
             >
               <el-table-column
-                prop="index"
+                type ="index"
                 label="搴忓彿"
                 align="center"
                 width="50"
@@ -92,12 +92,12 @@
               </el-table-column>
               <el-table-column
                 label="鏁伴噺"
-                prop="parameterFormat"
+                prop="number"
                 align="center"
                 width="80"
               >
                 <template slot-scope="scope">
-                  <el-input v-model="scope.row.parameterFormat"></el-input>
+                  <el-input v-model="scope.row.number"></el-input>
                 </template>
               </el-table-column>
               <el-table-column label="鍗曚綅" prop="unit" align="center" />
@@ -138,6 +138,7 @@
 export default {
     data(){
         return {
+          dataway:{},
           goid:'',
           testStandardParams: [],
           packageBoxId:{},
@@ -237,17 +238,17 @@
                 ],
                 operator: [
                     {
-                      text: '鍒犻櫎',
-                      icon: 'el-icon-delete',
-                      type: 'text',
-                      size: 'small',
-                      fun: this.deleteHandle
-                    },{
                       text: '妫�楠�',
                       icon: 'el-icon-delete',
                       type: 'text',
                       size: 'small',
                       fun: this.check
+                    },{
+                      text: '鍒犻櫎',
+                      icon: 'el-icon-delete',
+                      type: 'text',
+                      size: 'small',
+                      fun: this.deleteHandle
                     }
                   ],
                   operatorConfig: {
@@ -272,6 +273,9 @@
       getData() {
         this.$refs.processconfiguration.refreshData()
       },
+      wayRenovate(){
+        this.getData()
+      },
       //add
       addOrUpdateHandle(){
         this.addOrUpdateVisible = true
@@ -280,28 +284,33 @@
       deleteHandle(row){
         dropById({id:row.id}).then((res) =>{
           this.getData()
-          this.$message.error('鍒犻櫎鎴愬姛')
+          this.$message.success('鍒犻櫎鎴愬姛')
         })
       },
       handleCurrentChange(row){
-        console.log(row,"id");
+        console.log(row,"涓�琛�");
+        this.dataway = row
         this.packageBoxId = {
-          packageBoxId:row[0].id
+          packageBoxId:row.id
         }
-        this.goid = row[0].id
-        list({packageBoxId:row[0].id}).then((res) =>{
+        this.goid = row.id
+        this.rightquery()
+      },
+      rightquery(){
+        list({packageBoxId:this.goid}).then((res) =>{
           console.log(res,"nihaoa");
           this.testStandardParams = res.data.data
         })
       },
       //璇︽儏娣诲姞
       relateOperationParam(){
-
-        this.increase = true
-        
+        if (this.dataway.state == "鏈姤妫�") {
+            this.increase = true
+        }else{
+          this.$message.error('璇峰厛閫夋嫨鍖呰椤圭洰')
+        }
       },
       preserve(datalist){
-        console.log(datalist);
         this.testStandardParams = datalist
 
       },
@@ -311,10 +320,10 @@
          this.testStandardParams.forEach(el => {
               el.packageBoxId =this.goid
          });
-        console.log(this.testStandardParams,"niaho");
         saveList(this.testStandardParams).then((res) =>{
+          console.log(res,"淇濆瓨鎴愬姛");
           this.$message.success('淇濆瓨鎴愬姛')
-          this.testStandardParams
+          this.rightquery()
         })
       },
       //鍒犻櫎
@@ -322,7 +331,7 @@
           console.log(row,"");
           deledata({id:row.id}).then((res)=>{
           this.$message.success('鍒犻櫎鎴愬姛')
-          this.testStandardParams
+          this.rightquery()
           })
       },
       //瀹℃牳
diff --git a/src/views/quality/Packaging_ledger/pack-from.vue b/src/views/quality/Packaging_ledger/pack-from.vue
index 67598f3..9a40c7e 100644
--- a/src/views/quality/Packaging_ledger/pack-from.vue
+++ b/src/views/quality/Packaging_ledger/pack-from.vue
@@ -1,7 +1,7 @@
 <template>
     <el-dialog
       width="60%"
-      title="鍙傛暟"
+      title="鏂板"
       top="5vh"
       :visible.sync="innerVisible"
       :show="currshowlist"
@@ -11,7 +11,7 @@
     >
       <ttable
         :table="table"
-        @handleSelectionChange="handleSelectionChange"
+        @currentChange="Getdata"
         :prelang="prelang"
         :options="options"
         :ajaxFun="ajaxFun"
@@ -38,7 +38,7 @@
     },
     data() {
       return {
-        datalistid:"",
+        datalistid:{},
         ajaxFun: customerpage,
         currentRow: false,
         typeOptions: [],
@@ -145,19 +145,20 @@
     },
     methods: {
          // 鑾峰彇鏁版嵁鍒楄〃
-        getData() {
-        this.$refs.paramTable.getDataList()
-        },
-        handleSelectionChange(val){
-            let data = val
-            data.forEach(el => {
-                this.datalistid = el
-            });
-            console.log(this.datalistid);
+        // getData() {
+        // this.$refs.paramTable.getDataList()
+        // },
+        Getdata(val){
+            console.log(val);
+            this.datalistid = val
         },
       saveSelectRow() {
-        pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
-            console.log(res);
+        let packageBox = {
+            customerId:this.datalistid.id,
+            contractNo:this.datalistid.contractNo
+        }   
+        pagedataadd (packageBox).then((res =>{
+            this.$emit('way',res )
             if (res.status === 200) {
                 this.$message.success('鏂板鎴愬姛')
                 this.$emit('refreshDataList')
@@ -166,7 +167,7 @@
             }
         }))
         this.innerVisible = false
-          this.$emit('handleSelectionChange',this.innerVisible )
+          this.$emit('wayapi',this.innerVisible )
       },
     }
   }
diff --git a/src/views/quality/Packaging_ledger/pack-fromadd.vue b/src/views/quality/Packaging_ledger/pack-fromadd.vue
index e27e45a..71b7eb5 100644
--- a/src/views/quality/Packaging_ledger/pack-fromadd.vue
+++ b/src/views/quality/Packaging_ledger/pack-fromadd.vue
@@ -146,14 +146,14 @@
         },
       saveSelectRow() {
         console.log(this.packageBoxIddata,"123");
-        saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
-            console.log(res);
-            if (res.status === 200) {
-                this.$message.success('鏂板鎴愬姛')
-            }else{
-                this.$message.error('鍒涘缓澶辫触')
-            }
-        }))
+        // saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
+        //     console.log(res);
+        //     if (res.status === 200) {
+        //         this.$message.success('鏂板鎴愬姛')
+        //     }else{
+        //         this.$message.error('鍒涘缓澶辫触')
+        //     }
+        // }))
         this.innerVisible = false
         //   this.$emit('handleSelectionChange',this.innerVisible )
       },

--
Gitblit v1.9.3