Bläddra i källkod

Merge branch 'master' of http://git.dongkesoft.com:9001/DK-MES-3.0/mes-web

zhoux 1 år sedan
förälder
incheckning
932e08158a
3 ändrade filer med 52 tillägg och 16 borttagningar
  1. 21 0
      src/api/pages/core/purview.js
  2. 18 13
      src/view/mst/dictionary/index.vue
  3. 13 3
      src/view/mst/model-product/form.vue

+ 21 - 0
src/api/pages/core/purview.js

@@ -0,0 +1,21 @@
+/**
+ * @desc   : 范围权限
+ * @author : 洪旭东
+ * @date   : 2024-05-08 08:45
+ */
+export default {
+  userPurviewService:{
+    prefix:'/mdm-server/core/user_purview/',
+    savePurview: 'save_purview',
+  }
+}
+
+/**
+ * @desc   : 路由
+ * @author : 洪旭东
+ * @date   : 2024-05-08 08:45
+ */
+export const routeUrl = {
+  userPurview:{
+  }
+}

+ 18 - 13
src/view/mst/dictionary/index.vue

@@ -239,21 +239,26 @@ export default {
      * @date   : 2023/2/3 10:38
      */
     getData() {
-      // 查询数据
-      let params = {
-        ftyId: this.$store.state.user.ftyId,
-      }
-      this.excute(this.$service.commonService, this.$service.commonService.getDictionaryItemData, params).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          this.searchInfo = res.data
-          if (this.searchInfo.size() > 0) {
-            this.dictCodeType = this.searchInfo[0].dictCode
-            // 导出额外的条件
-            this.exportCondition = {dictCode: this.dictCodeType}
+      if (!this.dictCodeType) {
+        // 查询数据
+        let params = {
+          ftyId: this.$store.state.user.ftyId,
+        }
+        this.excute(this.$service.commonService, this.$service.commonService.getDictionaryItemData, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.searchInfo = res.data
+            if (this.searchInfo.size() > 0) {
+              this.dictCodeType = this.searchInfo[0].dictCode
+              // 导出额外的条件
+              this.exportCondition = {dictCode: this.dictCodeType}
+            }
+
           }
+        })
+      } else {
+        this.getDetail()
+      }
 
-        }
-      })
     },
     // endregion
 

+ 13 - 3
src/view/mst/model-product/form.vue

@@ -746,6 +746,7 @@ export default {
      * @date   : 2023-05-12 10:22
      */
     mergeLogoColour() {
+      let flag = false
       let list = this.descartes(this.defLogoList.filter(f => this.erpLogo.indexOf(f.logoId) > -1),
         this.defColourList.filter(f => this.erpColour.indexOf(f.colourId) > -1))
       if (this.formData.erpList[this.formData.erpList.length - 1] &&
@@ -753,15 +754,24 @@ export default {
         !this.formData.erpList[this.formData.erpList.length - 1].colourId &&
         !this.formData.erpList[this.formData.erpList.length - 1].erpSkuId
       ) {
-        this.formData.erpList.splice(this.formData.erpList.length - 1, 1)
+        flag = true
+        // this.formData.erpList.splice(this.formData.erpList.length - 1, 1)
       }
       for (let it of list) {
         it = Object.assign(it[0], it[1])
         if (!this.formData.erpList.some(s => (s.logoId + '-' + s.colourId) == (it.logoId + '-' + it.colourId))) {
-          this.formData.erpList.push({
+          let obj = {
             logoId: it.logoId,
             colourId: it.colourId
-          })
+          }
+          if (flag) {
+            this.$set(this.formData.erpList, this.formData.erpList.length - 1, Object.assign(obj, this.formData.erpList[this.formData.erpList.length - 1]))
+            // this.formData.erpList[this.formData.erpList.length - 1] = Object.assign(obj, this.formData.erpList[this.formData.erpList.length - 1])
+            flag = false
+          } else {
+            this.formData.erpList.push(obj)
+          }
+          console.log(this.formData.erpList)
         }
       }
     },