huang_an 2 anni fa
parent
commit
f2ad86129e

+ 6 - 6
src/components/upload/WithView.vue

@@ -44,19 +44,19 @@
         default: 'main'
       }
     },
-    data () {
+    data() {
       return {};
     },
     computed: {
-      dialogImageUrl () {
+      dialogImageUrl() {
         return this.value?.storePath && getImageUrl(this.value.storePath);
       }
     },
     methods: {
       // 清空已上传的文件列表
-      clearUploadFiles () {},
+      clearUploadFiles() {},
       //图片添加
-      async handlSuccess (params) {
+      async handlSuccess(params) {
         let res = await uploadFile({
           multiPartFile: params.file,
           module: this.module
@@ -65,13 +65,13 @@
           this.$emit('input', res.data);
         }
       },
-      async clearImg () {
+      async clearImg() {
         await removeFile({ fileId: this.value.id });
         this.$emit('input', {});
         this.$refs.uploadRef.clearFiles();
       },
       // 限制上传的数量
-      handleExceed (files, fileList) {
+      handleExceed(files, fileList) {
         this.$message.warning(`最多允许上传一张图片!`);
       }
     }

+ 30 - 1
src/views/ledgerAssets/equipment/components/baseInfo.vue

@@ -376,7 +376,7 @@
     methods: {
       // 获取设备详情
       getInfo() {
-        getAssetInfo(this.id).then((data) => {
+        getAssetInfo(this.id).then(async (data) => {
           this.info = data;
           this.basicInfo = data.category.category;
           if (data.attUrl && data.attUrl.length > 0) {
@@ -405,6 +405,35 @@
           } else {
             this.imageUrl = null;
           }
+          console.log(data.category);
+          this.isLink = false;
+          this.categoryWms = {
+            ...data.category.categoryWms,
+            warrantyWarnRefer: await sysDict(
+              '质保预警参考',
+              data.category.categoryWms.warrantyWarnRefer
+            ),
+            warrantyPeriodUnit: await sysDict(
+              '保质期单位',
+              data.category.categoryWms.warrantyPeriodUnit
+            )
+          };
+          this.categoryMes = {
+            ...data.category.categoryMes,
+            apsType: await sysDict(
+              '排程类型',
+              data.category.categoryMes.apsType
+            )
+          };
+          this.categoryObj = {
+            ...data.category.category,
+            fileName: data.category.category.remarkAttach
+              ? data.category.category.remarkAttach
+                  .map((item) => item.name)
+                  .join(', ')
+              : ''
+          };
+          this.isLink = true;
         });
       },
       // 设置标准产能

+ 33 - 6
src/views/ledgerAssets/equipment/edit.vue

@@ -911,8 +911,6 @@
         this.$refs.DialogGoods.open();
       },
       async cbDialogGoods(data) {
-        await this.searchDeptNodeClick(data.deptLeaderId, data);
-        await this.seachDetail(data.id);
         console.log(data);
         this.basicInfo = data;
         this.assetInfo = data;
@@ -1140,9 +1138,38 @@
           this.positionInfo.lineName = pathName[2];
 
           this.$nextTick(() => {
-            this.$refs.WorkshopSelectRef.getList();
-            this.$refs.FactoryLineSelectRef.getList();
+            // this.$refs.WorkshopSelectRef.getList();
+            // this.$refs.FactoryLineSelectRef.getList();
           });
+          console.log('data', data);
+          this.isLink = false;
+          this.categoryWms = {
+            ...data.category.categoryWms,
+            warrantyWarnRefer: await sysDict(
+              '质保预警参考',
+              data.category.categoryWms.warrantyWarnRefer
+            ),
+            warrantyPeriodUnit: await sysDict(
+              '保质期单位',
+              data.category.categoryWms.warrantyPeriodUnit
+            )
+          };
+          this.categoryMes = {
+            ...data.category.categoryMes,
+            apsType: await sysDict(
+              '排程类型',
+              data.category.categoryMes.apsType
+            )
+          };
+          this.categoryObj = {
+            ...data.category.category,
+            fileName: data.category.category.remarkAttach
+              ? data.category.category.remarkAttach
+                  .map((item) => item.name)
+                  .join(', ')
+              : ''
+          };
+          this.isLink = true;
         }
         // 资产信息
         for (const key of Object.keys(this.zcInfo)) {
@@ -1181,7 +1208,7 @@
         this.options.lineCode = [];
         // 获取车间
         this.$nextTick(() => {
-          this.$refs.WorkshopSelectRef.getList();
+          // this.$refs.WorkshopSelectRef.getList();
         });
       },
       hanldWorkshopCode(val, item) {
@@ -1191,7 +1218,7 @@
         this.options.lineCode = [];
         // 获取产线
         this.$nextTick(() => {
-          this.$refs.FactoryLineSelectRef.getList();
+          // this.$refs.FactoryLineSelectRef.getList();
         });
       },
       hanldlineCodeCode(val, item) {