jingbb 1 سال پیش
والد
کامیت
334363bdf8
1فایلهای تغییر یافته به همراه12 افزوده شده و 6 حذف شده
  1. 12 6
      src/views/production/safetyStock/safetyStockList.vue

+ 12 - 6
src/views/production/safetyStock/safetyStockList.vue

@@ -122,7 +122,9 @@
           <div class="table-operator">
             <a-button  type="danger" size="small" @click='addList'>新增</a-button>
             <a-button  size="small" @click='editList'>修改</a-button>
-            <a-button size="small" @click='delectList'>删除</a-button>
+            <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="delectList()">
+              <a-button size="small">删除</a-button>
+            </a-popconfirm>
             <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl">
                <a-button  size="small">导入</a-button>
             </a-upload>
@@ -154,7 +156,7 @@
     </template>
       
       <script>
-      
+        import alertModal from '../../../plugins/modal'
         import { JeecgListMixin } from '@/mixins/JeecgListMixin'
         import moment from 'dayjs'
         import { httpAction ,getAction,postAction,putAction,deleteAction,downFile} from '@/api/manage'
@@ -345,7 +347,9 @@
            },
           methods: {
             getTableList(){
+                alertModal.loading("执行中,请稍后!")
                 getAction('/production/safetyStock/list',this.queryParam).then(res=>{
+                    alertModal.closeLoading();
                     if(res.success){
                        this.dataSource =res.result.records
                        this.ipagination = {
@@ -357,16 +361,14 @@
                       this.$message.error(res.message);
                     }
                 })
-            },
-            //单据日期
-            changeStartDate(){
-    
             },
             onSearch(){
             //   this.$refs.materialProcurementSearch.visible = true
             },
             exportList(fileName){
+              alertModal.loading("执行中,请稍后!")
               downFile('/production/safetyStock/exportXls', this.queryParam).then(data => {
+                alertModal.closeLoading();
                 if (!data) {
                   this.$message.warning('文件下载失败')
                   return
@@ -415,7 +417,9 @@
               }else if(this.selectedRowKeys.length>1){
                 var ids =  this.selectedRowKeys.toString()
                 var that = this
+                alertModal.loading("执行中,请稍后!")
                 deleteAction('/production/safetyStock/deleteBatch', {ids: ids}).then((res) => {
+                  alertModal.closeLoading();
                   if (res.success) {
                     this.$message.success('删除成功!');
                     this.getTableList()
@@ -424,7 +428,9 @@
                   }
                 });
               }else{
+                alertModal.loading("执行中,请稍后!")
                 deleteAction('/production/safetyStock/delete', {id: this.selectedRowKeys[0]}).then((res) => {
+                  alertModal.closeLoading();
                   if (res.success) {
                     this.$message.success('删除成功!');
                     this.getTableList()