Browse Source

预托书-复制

jbb 2 years ago
parent
commit
5f1bb16000
1 changed files with 18 additions and 0 deletions
  1. 18 0
      src/views/pre-book/preBookList.vue

+ 18 - 0
src/views/pre-book/preBookList.vue

@@ -118,6 +118,7 @@
             <a-menu slot="overlay" v-if="record.theDocumentsState == '0'">
               <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
               <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
+              <a-menu-item><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item>
                 <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
                   <a href="javascript:void(0);" style="color:green;">提交</a>
@@ -132,6 +133,7 @@
             <!-- 已提交 -->
             <a-menu slot="overlay" v-if="record.theDocumentsState == '1'">
               <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
+              <a-menu-item><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item>
                 <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancel(record)">
                   <a href="javascript:void(0);" style="color:red;">取消提交</a>
@@ -370,6 +372,22 @@ export default {
       })
     },
 
+    //复制
+    copyForm(record){
+     preBookById({ id: record.id }).then(res => {
+        if (res.success) {
+          res.result.consigneeAll = res.result.consignee+"+"+res.result.consigneeAddress+"+"+res.result.notifyParty+"+"+res.result.notifyPartyAddress;
+          res.result.money = res.result.money.toFixed(2)
+          res.result.syLetterDepositItemList = []
+          this.$refs.addPreBookDrawer.addPreBook = res.result;
+          this.$refs.addPreBookDrawer.defultMethod = 'edit';
+          this.$refs.addPreBookDrawer.visible = true
+        }else{
+          this.$message.error(res.message)
+        }
+      })
+    },
+
     // 操作 提交
     submit(record) {
       this.$nextTick(() => {