Browse Source

装箱单-导入重复

jbb 2 years ago
parent
commit
5163826eb3
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/views/packing-list/fabric-list.vue

+ 8 - 2
src/views/packing-list/fabric-list.vue

@@ -192,7 +192,11 @@
     </div>
      <!-- 导入确认框 -->
     <div>
-      <a-modal :visible="visible" title="是否继续导入" @ok="handleOk" @cancel="handleCancel">
+      <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>
@@ -339,7 +343,7 @@ export default {
        message:[],//导入文件信息
       selectedRowKeys: [], // 勾选航
       loading: false, // 表格加载
-
+      handleOkButton:false,//导入按钮状态
       // 查询条件
       queryParam: {
         pageNo: '', // 初始页
@@ -389,12 +393,14 @@ export default {
       })},
       //继续导入
       handleOk(){
+        this.handleOkButton = true
          const formData = new FormData()
          formData.append('file', this.file.file)
          upload(formData).then(res => {
            this.visible = false
            if (res.success) {
              this.$message.success('导入成功')
+              this.handleOkButton = false
              this.getFabricList()
            }else{
             this.$message.error(res.message);