From 5749770d6d8fc6f98e68868f98e00eeb87b633d2 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <287285524@qq.com>
Date: Tue, 05 Sep 2023 17:36:09 +0800
Subject: [PATCH] 后台管理代码

---
 src/views/qyp-project-order/admin.vue |   52 ++++++++++++++++++++++++----------------------------
 1 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/src/views/qyp-project-order/admin.vue b/src/views/qyp-project-order/admin.vue
index 7320164..7151975 100644
--- a/src/views/qyp-project-order/admin.vue
+++ b/src/views/qyp-project-order/admin.vue
@@ -100,7 +100,7 @@
       </div>
       <div class="table_box">
         <div  style="margin-left: 10px;text-align: right;">
-          <el-button type="primary" size="small" @click="addProduct">导出excel</el-button>
+          <el-button type="primary" size="small" @click="addProduct" v-if='filterBtnById("430201")' >导出excel</el-button>
         </div>
         <Etable
           hasIndex
@@ -113,7 +113,7 @@
           @handleSelectionChange="handleSelectionChange"
           :exportUrl="{
             url: '/qyp/order/orderExport',
-            powerId: '',
+            powerId: '430206',
             name: '订单列表',
           }"
         ></Etable>
@@ -143,14 +143,15 @@
   import history from './history.vue';
   import plan from './plan.vue';
   import draw from './draw.vue';
-  import {orderInit,orderDtl} from "@/api/credit";
+  import {orderInit,orderDtl,orderExport} from "@/api/order";
   import uploadImg from "@/components/upload.vue";
+  import downloadUrl from "@/utils/excelDownLoadConfig";
   export default {
     name: "order",
     components: { Etable,uploadImg,history,plan,draw },
     data() {
       return {
-          formInline: {status:"all"},
+          formInline: {promId:"all",orderStatus:"all",agencyName:'all'},
           searchData: {},
           columns: [
             {
@@ -223,9 +224,9 @@
                         type:'text'
                       },
                       style: {
-                        // display: this.filterBtnById(150101)
-                        //   ? "inline-block"
-                        //   : "none",
+                        display: this.filterBtnById(430202)
+                          ? "inline-block"
+                          : "none",
                       },
                       on: {
                         click: () => {
@@ -244,18 +245,14 @@
                         type:'text'
                       },
                       style: {
-                        // display: this.filterBtnById(150101)
-                        //   ? "inline-block"
-                        //   : "none",
+                        display: this.filterBtnById(430203)
+                          ? "inline-block"
+                          : "none",
                       },
                       on: {
                         click: () => {
-
                           this.isWhith = 1;
                           this.productShow  = true;
-                          // this.title = '订单详情'; 
-                          // let {orderId} = scope.row;
-                          // this.getProductDetail(orderId);
                         },
                       },
                     },
@@ -268,17 +265,14 @@
                         type:'text'
                       },
                       style: {
-                        // display: this.filterBtnById(150101)
-                        //   ? "inline-block"
-                        //   : "none",
+                        display: this.filterBtnById(430204)
+                          ? "inline-block"
+                          : "none",
                       },
                       on: {
                         click: () => {
                           this.isWhith = 2;
                           this.productShow  = true;
-                          // this.title = '订单详情'; 
-                          // let {orderId} = scope.row;
-                          // this.getProductDetail(orderId);
                         },
                       },
                     },
@@ -291,17 +285,14 @@
                         type:'text'
                       },
                       style: {
-                        // display: this.filterBtnById(150101)
-                        //   ? "inline-block"
-                        //   : "none",
+                        display: this.filterBtnById(430205)
+                          ? "inline-block"
+                          : "none",
                       },
                       on: {
                         click: () => {
                           this.isWhith = 3;
                           this.productShow  = true;
-                          // this.title = '订单详情'; 
-                          // let {orderId} = scope.row;
-                          // this.getProductDetail(orderId);
                         },
                       },
                     },
@@ -356,8 +347,11 @@
     methods: {
       addProduct(){
         if(!this.exportExcelList.length){
-            return this.$message.error("请选择订单后导出");
+          return this.$message.error("请选择订单后导出");
         }
+        orderExport({orderIdList:this.exportExcelList.join(',')}).then((res) => {
+          downloadUrl.configDate2(res, '管理员订单列表');
+        });
       },
       keyupEvent(e) {
         //只能输入整数
@@ -387,7 +381,9 @@
       getDataList(e) {
       },
       handleSelectionChange(list){
-        this.exportExcelList = list;
+        this.exportExcelList = list.map(d=>{
+          return d.orderId
+        });
       },
       getProductDetail(orderId){
         orderDtl({orderId:orderId}).then(({body})=>{

--
Gitblit v1.8.0