瀏覽代碼

托书-重复保存

jbb 2 年之前
父節點
當前提交
212bf66d50
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/views/book/addBookDrawer.vue

+ 4 - 1
src/views/book/addBookDrawer.vue

@@ -408,7 +408,7 @@
         <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
           <a-button :style="{ marginRight: '8px' }">取消</a-button>
         </a-popconfirm>
-        <a-button type="primary" @click="submitAdd">
+        <a-button type="primary" @click="submitAdd" :disabled="confirmLoading">
          保存
         </a-button>
       </div>
@@ -952,8 +952,10 @@ export default {
                 
                   // }
             }
+            this.confirmLoading = true
           if(this.defaultMethod === 'add'){
            addPackingList(newObj).then(res => {
+            this.confirmLoading = false
             if (res.success) {
               this.$message.success('添加成功')
               this.$emit('back')
@@ -970,6 +972,7 @@ export default {
                 item.unitPrice = item.price
           })
           editPackingList(newObj).then(res => {
+            this.confirmLoading = false
             if (res.success) {
               this.$message.success('编辑成功')
               this.$emit('back')