戴艳蓉 3 years ago
parent
commit
b64b9b8780

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-2fc51d53.ca3f0b82.css → dist/static/css/chunk-6dca18eb.ca3f0b82.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3e0559f6.js


BIN
dist/static/js/app.3e0559f6.js.gz


BIN
dist/static/js/app.aec834af.js.gz


File diff suppressed because it is too large
+ 0 - 6
dist/static/js/chunk-2d0c84d3.88aa4c51.js


BIN
dist/static/js/chunk-2d0c84d3.88aa4c51.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-39708d84.56dc59ae.js


BIN
dist/static/js/chunk-39708d84.56dc59ae.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6dca18eb.f42467e2.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-785a8bee.083d28a4.js


BIN
dist/static/js/chunk-785a8bee.083d28a4.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-785a8bee.d23e4d5b.js


BIN
dist/static/js/chunk-785a8bee.d23e4d5b.js.gz


+ 0 - 0
dist/static/js/chunk-libs.41a8b6ca.js → dist/static/js/chunk-libs.55c3c8c7.js


+ 0 - 0
dist/static/js/chunk-libs.41a8b6ca.js.gz → dist/static/js/chunk-libs.55c3c8c7.js.gz


+ 75 - 6
src/views/mobile/order/index.vue

@@ -23,7 +23,7 @@
         <div style="width: 100%">
           <el-row>
             <el-col :span="24">
-              <el-col :span="4" style="width: 115px">
+              <el-col :span="4" style="width: 110px">
                 <el-select
                   :size="searchSize"
                   v-model="parmValue.status"
@@ -51,7 +51,7 @@
                   @timeReturned="timeReturned($event)"
                 />
               </el-col>
-              <el-col :span="4" style="width: 318px; padding: 0 0 0 10px">
+              <el-col :span="4" style="width: 310px; padding: 0 0 0 10px">
                 <el-input
                   :size="searchSize"
                   v-model="input"
@@ -61,7 +61,7 @@
                   <el-select
                     v-model="select"
                     slot="prepend"
-                    style="width: 95px"
+                    style="width: 88px"
                     placeholder="请选择"
                   >
                     <el-option
@@ -80,7 +80,7 @@
                 </el-input>
               </el-col>
 
-              <el-col
+              <!-- <el-col
                 :span="4"
                 style="width: 80px; padding: 0 0 0 10px"
                 v-if="powers.some((item) => item == '008')"
@@ -92,7 +92,8 @@
                 >
                   重置
                 </el-button>
-              </el-col>
+              </el-col> -->
+
               <el-col
                 :span="3"
                 v-if="powers.some((item) => item == '002')"
@@ -107,6 +108,21 @@
                   刷新
                 </el-button>
               </el-col>
+              <el-col
+                :span="3"
+                v-if="powers.some((item) => item == '002')"
+                style="width: 80px; padding: 0 0 0 10px; float: right"
+              >
+                <el-button
+                  :size="searchSize"
+                  :disabled="loading"
+                  type="primary"
+                  style="float: right"
+                  @click="batchExport"
+                >
+                  导出
+                </el-button>
+              </el-col>
             </el-col>
           </el-row>
         </div>
@@ -170,6 +186,7 @@ import asyncRequest from "@/apis/service/mobile/order";
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
 import PeriodDatePicker from "@/components/PeriodDatePicker";
 export default {
   name: "order",
@@ -196,6 +213,7 @@ export default {
   },
   data() {
     return {
+            fileUrl: urlConfig.baseURL,
       selectList: [
         { code: "1", name: "账号" },
         { code: "2", name: "姓名" },
@@ -358,7 +376,7 @@ export default {
         this.tableData.forEach((v1) => {
           v1.order_goods_num =
             v1.order_num + v1.unit + "/" + v1.unit_weight + "kg";
-          v1.order_goods_num_t = (v1.order_num * 1 * (v1.unit_weight * 1))+ "kg";
+          v1.order_goods_num_t = v1.order_num * 1 * (v1.unit_weight * 1) + "kg";
         });
         console.log(this.tableData);
         this.pageInfo.total = Number(res.data.count);
@@ -370,6 +388,57 @@ export default {
       }
       this.loading = false;
     },
+    /**
+     * 导出
+     */
+    async batchExport() {
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `application/vnd.ms-excel`;
+        axios({
+          method: "post",
+          url: this.fileUrl +'admin/orderupload',
+          responseType: "blob",
+          data: {},
+          headers: {
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            if (res && res.status == 200 && res.data) {
+              let blob = new Blob([res.data], {
+                type: httpType,
+              });
+              let url = window.URL.createObjectURL(blob);
+              let aLink = document.createElement("a");
+              aLink.style.display = "none";
+              aLink.href = url;
+              aLink.setAttribute(
+                "download",
+                `未发货订单导出.xls`
+              );
+              document.body.appendChild(aLink);
+              aLink.click();
+              document.body.removeChild(aLink); //下载完成移除元素
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+
+              this.$message.success(`未发货订单导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error("系统错误,请稍后再试!");
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            this.$message.error("系统错误,请稍后再试!");
+            this.loading = false;
+          });
+      }
+    },
   },
 };
 </script>

Some files were not shown because too many files changed in this diff