瀏覽代碼

bug修复

qymljy 2 年之前
父節點
當前提交
e68fc691b1
共有 1 個文件被更改,包括 34 次插入14 次删除
  1. 34 14
      src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

+ 34 - 14
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -173,21 +173,41 @@ export default {
       this.queryDetail(res.data[0].itemid)
     },
     async queryDetail(itemid){
-      const res = await this.$api.requested({
-        "id":"20220926142403",
-        "content":{
-          "sa_itemgroupid":this.$route.query.id,
-          "where":{
-            "itemid":itemid
+      if (this.$route.query.sys_enterpriseid){
+        const res = await this.$api.requested({
+          "id":"20220926142403",
+          "content":{
+            "sa_itemgroupid":this.$route.query.id,
+            "sys_enterpriseid":this.$route.query.sys_enterpriseid,
+            "where":{
+              "itemid":itemid
+            }
           }
-        }
-      })
-      this.detail = res.data
-      this.selectProduct = this.detail ? this.detail[0] : ''
-      this.actImage = this.detail ? this.detail[0].attinfos ? this.detail[0].attinfos[0]:{} : {}
-      this.tradefield  = this.detail ? this.detail[0].tradefield : []
-      this.actTradefield = this.detail?this.detail[0].tradefield?this.detail[0].tradefield[0].tradefield:'':''
-      this.count = this.detail[0].orderminqty
+        })
+        this.detail = res.data
+        this.selectProduct = this.detail ? this.detail[0] : ''
+        this.actImage = this.detail ? this.detail[0].attinfos ? this.detail[0].attinfos[0]:{} : {}
+        this.tradefield  = this.detail ? this.detail[0].tradefield : []
+        this.actTradefield = this.detail?this.detail[0].tradefield?this.detail[0].tradefield[0].tradefield:'':''
+        this.count = this.detail[0].orderminqty
+      }else {
+        const res = await this.$api.requested({
+          "id":"20220926142403",
+          "content":{
+            "sa_itemgroupid":this.$route.query.id,
+            "where":{
+              "itemid":itemid
+            }
+          }
+        })
+        this.detail = res.data
+        this.selectProduct = this.detail ? this.detail[0] : ''
+        this.actImage = this.detail ? this.detail[0].attinfos ? this.detail[0].attinfos[0]:{} : {}
+        this.tradefield  = this.detail ? this.detail[0].tradefield : []
+        this.actTradefield = this.detail?this.detail[0].tradefield?this.detail[0].tradefield[0].tradefield:'':''
+        this.count = this.detail[0].orderminqty
+      }
+
     },
     countChange (num) {
       this.count = num