Browse Source

装箱单-成衣-重复保存

jbb 2 years ago
parent
commit
b886000206

+ 4 - 2
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -340,7 +340,7 @@
         <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
           <a-button :style="{ marginRight: '8px' }">取消</a-button>
         </a-popconfirm>
-        <a-button type="primary" @click="submitAdd"  v-preventReClick="2000">
+        <a-button type="primary" @click="submitAdd"  :disabled="confirmLoading">
           保存
         </a-button>
       </div>
@@ -853,10 +853,11 @@ export default {
           newObj.customerAbbreviation=this.clothesAdd.customerAbbreviation,
           newObj.depositaryReceiptNo = this.clothesAdd.depositaryReceiptNo
           await this.JudgeVluabled()
+          this.confirmLoading = true
           if(this.judge == 0){
-            
              if(this.editDecide === 'edit'){
                editSpltList(newObj).then(res => {
+                this.confirmLoading = false
                 if (res.success) {
                  this.$message.success('编辑成功')
                  this.close()
@@ -869,6 +870,7 @@ export default {
               })
               }else {
                addSpltList(newObj).then(res => {
+                 this.confirmLoading = false
                   if (res.success) {
                     this.$message.success('新增成功')
                     this.close()

+ 3 - 1
src/views/packing-list/packinglist-clothes/referencePrePacklist.vue

@@ -10,7 +10,7 @@
   >
    <template slot="footer">
       <a-button @click="handleCancel">关闭</a-button>
-      <a-button @click="onSubmit" v-preventReClick="2000" type="primary">确定</a-button>
+      <a-button @click="onSubmit"  type="primary" :disabled="confirmLoading">确定</a-button>
     </template>
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
@@ -394,7 +394,9 @@ export default {
         this.$message.error('请选择数据');
       } else{
         var id = this.selectedRowKeys.toString()
+        this.confirmLoading = true
          queryOrderData({ids:id}).then(res => {
+          this.confirmLoading = false
          if (res.success) {
          this.loading = false
           this.$emit('callback', this.selectedRowKeys);