Browse Source

装箱单-成衣-导入重复点击

jbb 2 years ago
parent
commit
a8991d3dd5
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/views/packing-list/clothes-list.vue

+ 7 - 0
src/views/packing-list/clothes-list.vue

@@ -263,6 +263,10 @@
     <!-- 导入确认框 -->
     <div>
       <a-modal :visible="visible" title="是否继续导入" @ok="handleOk" @cancel="handleCancel">
+         <template #footer>
+          <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
+          <a-button  type="primary"  @click="handleOk" :disabled="handleOkButton">确定</a-button>
+        </template>
         <ul>
           <li v-for="(item,index) in message" :key="index">{{item}}</li>
         </ul>
@@ -543,6 +547,7 @@ export default {
         pageNo: '' // 初始页
       },
       preDeliveryDate:[],
+      handleOkButton:false,
       pagination: {
         pageSizeOptions: ["50", "100", "150"],
         showSizeChanger: true,
@@ -635,6 +640,7 @@ export default {
       })},
       //继续导入
       handleOk(){
+        this.handleOkButton = true
          const formData = new FormData()
          formData.append('file', this.file.file)
          upload(formData).then(res => {
@@ -642,6 +648,7 @@ export default {
            if (res.success) {
              this.getSpltList()
              this.$message.success('导入成功')
+             this.handleOkButton = false
            }else{
             this.$message.error(res.message);
         }