Browse Source

更换批量操作处理风格

chenrui 4 years ago
parent
commit
55034c71cd

+ 5 - 1
src/views/financialManagement/financialCollection/list.vue

@@ -65,7 +65,7 @@
       </div>
     </a-alert>
     <div style="margin-bottom: 15px">
-      <a-button type="primary" id="financialCollectionList-export" :disabled="!hasSelected" :loading="loading" @click="handleCollection">批量收款</a-button>
+      <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
       <span style="margin-left: 8px">
         <template v-if="hasSelected">
           {{ `已选 ${selectedRowKeys.length} 项` }}
@@ -310,6 +310,10 @@ export default {
     },
     // 批量收款
     handleCollection () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       this.loading = true
       settleReceiptMoney({ settleChangeIds: this.selectedRowKeys }).then(res => {
         this.loading = false

+ 5 - 1
src/views/financialManagement/financialPayment/list.vue

@@ -64,7 +64,7 @@
       </div>
     </a-alert>
     <div style="margin-bottom: 15px">
-      <a-button type="primary" id="finacialPay-export" :disabled="!hasSelected" :loading="loading" @click="handlePayment">批量付款</a-button>
+      <a-button type="primary" id="finacialPay-export" :loading="loading" @click="handlePayment">批量付款</a-button>
       <span style="margin-left: 8px">
         <template v-if="hasSelected">
           {{ `已选 ${selectedRowKeys.length} 项` }}
@@ -310,6 +310,10 @@ export default {
     },
     // 批量付款
     handlePayment () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       this.loading = true
       settlePayMoney({ settleChangeIds: this.selectedRowKeys }).then(res => {
         this.loading = false

+ 5 - 1
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -81,7 +81,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button type="primary" id="inventoryWarningList-update" :disabled="!hasSelected" :loading="loading" @click="handleupdate">批量更新</a-button>
+      <a-button type="primary" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
       <span style="margin-left: 8px">
         <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
       </span>
@@ -326,6 +326,10 @@ export default {
     },
     //  批量更新
     handleupdate () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       const _this = this
       this.$confirm({
         title: '提示',

+ 4 - 0
src/views/salesManagement/outboundOrder/list.vue

@@ -256,6 +256,10 @@ export default {
     },
     // 批量出库
     handleOutbounds () {
+      if (this.selectedRowKeys.length < 1) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       this.loading = true
       // ajax request after empty completing
       setTimeout(() => {