Jelajahi Sumber

物流异常订单导出

yuhongqi 2 minggu lalu
induk
melakukan
8f39144987

+ 9 - 0
src/api/hisStore/storeDeliveryAbnormalOrder.js

@@ -25,3 +25,12 @@ export function handleDeliveryException(data) {
     data: data
   })
 }
+
+// 导出物流异常订单
+export function exportDeliveryAbnormalOrder(data) {
+  return request({
+    url: '/store/store/storeDeliveryAbnormalOrder/export',
+    method: 'post',
+    data: data
+  })
+}

+ 22 - 1
src/views/hisStore/storeDeliveryAbnormalOrder/index.vue

@@ -121,6 +121,15 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['store:storeDeliveryAbnormalOrder:export']"
+        >导出</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -183,7 +192,7 @@
 </template>
 
 <script>
-import { listDeliveryAbnormalOrder } from '@/api/hisStore/storeDeliveryAbnormalOrder'
+import { listDeliveryAbnormalOrder, exportDeliveryAbnormalOrder } from '@/api/hisStore/storeDeliveryAbnormalOrder'
 import productOrder from '../components/productOrder'
 import { getCompanyList } from '@/api/company/company'
 import { treeselect } from '@/api/company/companyDept'
@@ -293,6 +302,18 @@ export default {
       this.queryParams.deliveryExceptionStatus = null
       this.handleQuery()
     },
+    handleExport() {
+      const queryParams = this.addDateRange({ ...this.queryParams }, this.dateRange)
+      this.$confirm('是否确认导出物流异常订单数据?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return exportDeliveryAbnormalOrder(queryParams)
+      }).then(response => {
+        this.download(response.msg)
+      }).catch(() => {})
+    },
     getTreeselect() {
       treeselect({ companyId: this.companyId }).then(response => {
         this.deptOptions = response.data