Przeglądaj źródła

Merge branch 'master' of http://47.108.172.52:3000/dayou/productivity-platform-web

GouGengquan 7 miesięcy temu
rodzic
commit
a15fa6109c

+ 1 - 0
src/api/houseGuaranty.js

@@ -35,6 +35,7 @@ const houseGuaranty = {
     genConditionDoc(params){
         return request.get(`/house/guaranty/condition/${params}`)
     },
+
     genResultDoc(params){
         return request.get(`/house/guaranty/result/${params}`)
     },

+ 4 - 1
src/api/houseTargetEntity.js

@@ -11,7 +11,10 @@ const houseTargetEntity = {
     },
     delete(params){
         return request.delete(`/houseTargetEntity/${params}`)
-    }
+    },
+    copyEntityInfo(params){
+        return request.get(`/houseTargetEntity/copy/${params}`)
+    },
   
 
 }

+ 17 - 2
src/views/house/workbench/guarantyResult.vue

@@ -488,7 +488,7 @@
                             content="将此实物信息复制到其他标的物。减少填写麻烦,个别字段若需修改可手动调整。"
                         >
                         <template #reference>
-                            <el-button type="success">复制到其他标的</el-button>
+                            <el-button type="success" @click="copyEntityInfo()">复制到其他标的</el-button>
                         </template>
                     </el-popover>
                     <el-button @click="entityInfoDialog = false">取消</el-button>
@@ -626,7 +626,9 @@ export default {
             this.tNo = no;
             houseTargetEntity.get(this.docId,id,no).then(res=>{
                 if (res.code === 200 && res.data!=null){
-                        this.entityInfo = res.data
+                    this.entityInfo = res.data
+                }else{
+                    this.entityInfo = {};
                 }
             })
             this.entityInfoDialog = true;
@@ -642,6 +644,7 @@ export default {
                         type: 'success',
                         plain: true
                     })
+                    this.entityInfo.id = res.data;
                 }
             })
         },
@@ -678,6 +681,18 @@ export default {
           
         },
 
+        copyEntityInfo(){
+            houseTargetEntity.copyEntityInfo(this.entityInfo.id).then(res=>{
+                if (res.code === 200 ){
+                    ElMessage({
+                        message: '复制成功',
+                        type: 'success',
+                        plain: true
+                    })
+                }
+            })
+        },
+
         genResultDoc(){
             houseGuaranty.genResultDoc(this.docId).then(res=>{
                 if (res.code === 200){