From e21c05d2c0d67629c81e5cc54238e6678a055055 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期三, 17 七月 2024 09:00:22 +0800
Subject: [PATCH] 修改模型提交功能

---
 web/src/views/modules/basicInfo/XhProductModel.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue
index 640b5b5..9d1c645 100644
--- a/web/src/views/modules/basicInfo/XhProductModel.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel.vue
@@ -37,7 +37,7 @@
               <el-table-column prop="sort" label="鎺掑簭" width="100px"/>
               <zt-table-column-handle :table="table" width="180px">
                 <template v-slot="{ row }">
-                  <zt-table-button v-if="productType==='5'" size="small" type="primary"
+                  <zt-table-button v-if="productType==='1'" size="small" type="primary"
                                    @click="importData(row)">瀵煎叆
                   </zt-table-button>
                 </template>
@@ -84,16 +84,18 @@
     },
     methods: {
       add() {
+        console.log(this.dataForm.type,'this.dataForm.type')
         this.dataForm.type = this.productType
-        if (this.dataForm.type !== '5') {
+        if (this.dataForm.type !== '1') {
           if (this.dataForm.type !== '3') {
-            this.dataForm.type = this.dataForm.type - 1
+            this.dataForm.type = this.dataForm.type + 1
           } else if (this.dataForm.type === '3') {
-            this.dataForm.type = this.dataForm.type - 2
+            this.dataForm.type = this.dataForm.type + 2
           } else if (this.dataForm.type === '0') {
             this.$alert("褰撳墠鑺傜偣涓嶅彲鏂板瀛愯妭鐐癸紝璇烽噸鏂拌缃�")
             return
           }
+          console.log(this.dataForm.type,'this.dataForm.type')
           this.$refs.SelectTyModel.$refs.dialog.init(null, {type: this.dataForm.type, id: this.dataForm.pid})
         } else {
           this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid})
@@ -112,16 +114,18 @@
         this.$refs.ProductModelTree.getProductList()
       },
       onProductSelected(data) {
-        console.log(data)
+        console.log(data,'onProductSelected')
         this.dataForm.pid = data.id
         this.dataForm.type = data.productType
         this.productType = data.productType
         if (data.productType !== '10') {
           this.$refs.tableObj.query()
         }
+        console.log(data.productType,' data.productType')
+        console.log(this.productType,' data.productType')
       },
       importData(row) {
-        this.$refs.ProductImport.$refs.dialog.init(row.id)
+        this.$refs.ProductImport.$refs.dialog.init(row)
       }
     }
   }

--
Gitblit v1.9.1