Parcourir la source

预装箱单增加按钮等待状态

jbb il y a 2 ans
Parent
commit
2577a65661
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      src/views/advance-packingList/addAdpackingDrawer.vue

+ 8 - 1
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -159,7 +159,7 @@
         <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
           <a-button :style="{ marginRight: '8px' }">取消</a-button>
         </a-popconfirm>
-        <a-button type="primary" @click="myHandSave">
+        <a-button type="primary" @click="myHandSave" :loading="btnLoading">
           保存
         </a-button>
         <a-button type="primary" @click="myHandSubmit" style="margin-left: 8px">
@@ -203,6 +203,7 @@ export default {
           // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
           btn: []
         },
+      btnLoading:false,//按钮等待状态
       // 表头
       columns: [
         {
@@ -393,6 +394,8 @@ export default {
           key: 'totalPrice',          
           width: 120,
           type: JVXETypes.normal,
+        //    validateRules: [{ required: true, message: '${title}不能为空' },
+        //     {pattern: /^\d+(\.\d{1,2})?$/, message: '小数点位数不能超过2位' }],
         },
         {
           title: '操作',
@@ -506,11 +509,13 @@ export default {
     },
     myHandSave(){
       this.addAdpacking.status=0;
+      this.btnLoading = true
       this.saveAdd();
 
     },
     myHandSubmit(){
       this.addAdpacking.status=1;
+      this.btnLoading = true
       this.saveAdd();
     },
     //  保存
@@ -596,6 +601,7 @@ export default {
           if (res.success) {
              this.$message.success('编辑成功')
              this.close()
+             this.btnLoading = false
               //清空信息
              newObj = {syPreAssembledPackingListItemList:[]};
              this.fatherList() // 调用父组件 查询方法
@@ -609,6 +615,7 @@ export default {
         if (res.success) {
           this.$message.success('新增成功')
           this.close()
+          this.btnLoading = false
           //清空信息
           newObj = {syPreAssembledPackingListItemList:[]};
           this.fatherList() // 调用父组件 查询方法