Your Name 3 anni fa
parent
commit
a6ef0a82ac

+ 2 - 2
build/utils.js

@@ -15,8 +15,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage','inward','queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ['all'];
-let devModules = ['index','SporadicManage','statisticalReport','inward'];
+let devModules = ['all'];
+// let devModules = ['index','appoint','sale','TMS','statisticalReport','RMS'];
 // let devModules = ['index','appoint','TMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 2 - 2
config/index.js

@@ -64,9 +64,9 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    // target: "http://172.16.33.166:8080",
+    target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.102:8019",
-    target: "http://192.168.1.114:8019",
+    // target: "http://192.168.1.114:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 2 - 2
src/views/RMS/components/addConsignee.vue

@@ -11,12 +11,12 @@
         class="demo-form-inline"
         label-width="80px"
         >
-        <el-form-item label="收货单位">
+        <el-form-item label="收货父级单位">
          <el-autocomplete
           class="inline-input"
           v-model="stateConsignee"
           :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
+          placeholder="请输入收货父级单位名称"
           :trigger-on-focus="false"
           @select="handleSelectConsignee"
         >

+ 67 - 12
src/views/RMS/components/editSupplier.vue

@@ -12,6 +12,29 @@
       </div>
     </div>
 
+  <div class="f-box">
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="父级单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateSupplier"
+          :fetch-suggestions="querySearchSupplier"
+          placeholder="请输入父级单位名称(非必填)"
+          :trigger-on-focus="false"
+          @select="handleSelectSupplier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.supplierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+     </el-form>  
+     </div>
+
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
@@ -21,12 +44,18 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
       form1: {},
+       //发货单位名称
+      supplierName: "",
+      //发货单位id
+      supplierId: null,
+      restaurantsSupplier:null,
+      stateSupplier:null,
+      farName: "",
     };
   },
  
@@ -35,8 +64,32 @@ export default {
     this.information();
   },
   methods: {
+     //发货单位弹出层
+    handleSelectSupplier(item){
+      console.log("enter")
+      this.supplierId = item.supplierId
+      item.supplierName = this.supplierName
+    },
+    //以下是发货单位边输边查搜索
+    querySearchSupplier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
+        if(res.data.code == "200"){    
+          var restaurantsSupplier = res.data.data
+          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
+          // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+      })  
+      },
+    createFilterSupplier(queryString) {
+        return (restaurantsSupplier) => {
+          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      //以上是发货单位边输边查搜索
+
     information() {
-      console.log("supplierId",this.$router.params);
+      console.log("supplierIds",this.$router.params);
       //编辑
       this.axios
         .post(
@@ -44,13 +97,10 @@ export default {
             this.$route.params.supplierId
         )
         .then((res) => {
-            console.log(res)
-          res.data.data.forEach((e) => {
-            this.form1 = e;
-            console.log(e);
-            console.log(this.form1);
-            console.log(this.$route.params.supplierId);
-          });
+            this.form1 = res.data.data[0];
+            this.stateSupplier = res.data.data[0].farName;
+            this.supplierId = res.data.data[0].shipperId;
+          
         });
     },
     // 返回
@@ -61,13 +111,15 @@ export default {
     onClickConfirm() {
       console.log(this.form1)
        let RmsSupplier={
-        supplierId: this.form1.supplierId,
+        supplierOfId: this.form1.supplierId,
         supplierName: this.form1.supplierName,
         supplierAddress: this.form1.supplierAddress,
-        supplierRegisterDate: sjTime(this.form1.supplierRegisterDate),
+        supplierRegisterDate: this.form1.supplierRegisterDate,
         supplierContactsName: this.form1.supplierContactsName,
-        supplierContactNumber: this.form1.supplierContactNumber
+        supplierContactNumber: this.form1.supplierContactNumber,
+        supplierIds: this.supplierId
       };
+      console.log("RmsSupplier",RmsSupplier)
        if(
         RmsSupplier.supplierName==null 
       )this.$message.error("存在空值!");
@@ -95,4 +147,7 @@ export default {
       margin-right: 10px;
     }
   }
+  .f-box{
+    margin-left: 36%;
+  }
 </style>

+ 40 - 16
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -15,7 +15,7 @@
     <!-- 车序号表格 -->
     <div class="switch" v-if="selectionList.length > 0">
       <el-tooltip placement="top">
-        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
         <el-switch
           v-model="value"
           active-text="件数"
@@ -58,7 +58,7 @@
           <template slot="scope" v-if="item.label !== '车序号'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '收货地址'">
+          <template slot="scope" v-if="item.label !== '运输单价'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '截止日期'">
@@ -90,11 +90,11 @@
                   @change="updateArragneCxh(scope.row.cxh)"
                 ></el-input>
               </template>
-              <!-- 收货地址id -->
-              <template v-if="item.prop == 'saleShipperAddressName'" >
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
                 <el-input
                   style="width: 200px"
-                  v-model="scope.row.saleShipperAddressName"
+                  v-model="scope.row.priceValue"
                   disabled
                 >
                 </el-input>
@@ -129,7 +129,7 @@
                   v-model.number="scope.row.saleOrderConsigneeTel"
                 ></el-input>
               </template>
-              <!-- 排车数(不可见) -->
+              <!-- 排车数 -->
             <template v-if="item.prop == 'arragneCount'">
                 <el-input
                   class="textinput6"
@@ -170,12 +170,12 @@
         </el-table-column>
       </el-table>
     </div>
-    <!-- 收货地址的模态框 -->
+    <!-- 运输单价的模态框 -->
     <el-drawer 
       :visible.sync="addressDrawer" 
       :destroy-on-close="false"
       direction="rtl"
-      size="40%"
+      size="70%"
       :wrapperClosable="false"
       modal
       close-on-press-escape
@@ -205,9 +205,9 @@
         <i class="el-icon-check"></i>确定
       </el-button>
       <div class="tablecls">
-        <!-- 查询所有的收货地址 -->
+        <!-- 查询所有的运输单价 -->
         <dilTable
-          v-bind.sync="Address"
+          v-bind.sync="Price"
           @radio-change="currentRadioChange2"
         ></dilTable>
       </div>
@@ -247,6 +247,11 @@ export default {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
         selectionType: "radio",
       },
+      //运输单价的表格
+      Price: {
+        requestUrl: "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0",
+        selectionType: "radio",
+      },
       table: false,
       selectionList: [],
       selectionList1: [],
@@ -300,11 +305,17 @@ export default {
           slot: true,
         },
         {
-          prop: "saleShipperAddressName",
-          label: "收货地址",
+          prop: "priceValue",
+          label: "运输单价",
           width: "300",
           slot: true,
         },
+        // {
+        //   prop: "saleShipperAddressName",
+        //   label: "收货地址",
+        //   width: "300",
+        //   slot: true,
+        // },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
@@ -325,6 +336,8 @@ export default {
         },
       ],
       row: {},
+      //缓存当前选中的运输单价
+      priceMap:{},
     };
   },
   // mounted() {
@@ -379,6 +392,8 @@ export default {
             saleMaterialId:row.saleMaterialId,
             saleOrderConsignee:row.saleOrderConsignee,
             saleOrderConsigneeTel:row.saleOrderConsigneeTel,
+            priceValue:row.priceValue,
+            priceId:row.priceId,
             saleShipperAddressId:row.saleShipperAddressId,
             saleShipperAddressName:row.saleShipperAddressName,
           })
@@ -430,8 +445,9 @@ export default {
     },
     //收货地址模态窗口的点击事件
     addAddressClick(){
-      this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
-      this.selectionList[this.addressIndex].saleShippingAddressId = this.addressMap.addressId
+      //priceMap
+      this.selectionList[this.addressIndex].priceValue = this.priceMap.priceValue
+      this.selectionList[this.addressIndex].priceId = this.priceMap.priceId
       this.addressDrawer = false;
       let arr = this.selectionList;
       this.selectionList = [];
@@ -447,6 +463,8 @@ export default {
             saleMaterialId:e.saleMaterialId,
             saleOrderConsignee:e.saleOrderConsignee,
             saleOrderConsigneeTel:e.saleOrderConsigneeTel,
+            priceValue:e.priceValue,
+            priceId:e.priceId,
             saleShipperAddressId:e.saleShipperAddressId,
             saleShipperAddressName:e.saleShipperAddressName,
         })
@@ -459,8 +477,8 @@ export default {
     },
     //收货地址模态框单选选中的事件
     currentRadioChange2(val){
-      this.addressMap = {};
-      this.addressMap = val;
+      this.priceMap = {};
+      this.priceMap = val;
     },
     // 框计算
     onclick() {
@@ -499,6 +517,8 @@ export default {
           saleOrderConsignee: null,
           saleOrderConsigneeTel: null,
           saleMaterialId: e.saleMaterialId,
+          priceValue:e.priceValue,
+          priceId:e.priceId,
           // materialTheoreticalWeight: e.materialTheoreticalWeight,
           arragneCount : this.arragneCount,
         };
@@ -537,6 +557,8 @@ export default {
                 saleMaterialId : 0,
                 //物资数量
                 materialNumber : 0,
+                //运输单价ID
+                priceId: 0,
             };
         mapItem.saleOrderId=this.$route.params.saleOrderId;
         mapItem.truckNo=item.cxh;
@@ -546,8 +568,10 @@ export default {
         mapItem.orderConsigneeTel=item.saleOrderConsigneeTel;
         mapItem.saleMaterialId=item.saleMaterialId;
         mapItem.materialNumber=item.orderPlanWeight;
+        mapItem.priceId=item.priceId;
         mapList.push(mapItem);
       });
+      console.log("mapList",mapList)
         this.axios.post("/api/v1/ams/addTruckNo", mapList).then((res) => {
           if (res.data.code == "200") {
             this.$router.go(-1);

+ 1 - 1
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -48,7 +48,7 @@
           <template slot="scope" v-if="item.label !== '重量'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '收货地址'">
+          <template slot="scope" v-if="item.label !== '运输单价'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '截止日期'">

+ 236 - 211
src/views/index/components/luckDraw.vue

@@ -1,132 +1,130 @@
 <template>
   <div class="luckDraw">
     <div class="luckDraw_title">
-        <span class="text">中奖名单</span>
+      <span class="text">中奖名单</span>
     </div>
     <div class="luckDraw_select">
-        <el-date-picker
-            v-model="form.rflDate"
-            type="date"
-            placeholder="请选择中奖时间">
-            </el-date-picker>
-        <el-button type="primary" @click="selectClick" :loading="selectLoading">
-            <i class="el-icon-search"></i> 查询
-        </el-button>
-        <el-button type="primary" @click="menuExport" :loading="downloadLoading">
-            <i class="el-icon-document"></i> 导出(Excel)
-        </el-button>
+      <el-date-picker
+        v-model="form.rflDate"
+        type="date"
+        placeholder="请选择中奖日期"
+      >
+      </el-date-picker>
+      <el-button type="primary" @click="selectClick" :loading="selectLoading">
+        <i class="el-icon-search"></i> 查询
+      </el-button>
+      <el-button type="primary" @click="menuExport" :loading="downloadLoading">
+        <i class="el-icon-document"></i> 导出(Excel)
+      </el-button>
     </div>
     <div class="luckDraw_table">
-        <el-table
-            ref="tab"
-            :data="tableData"
-            style="width: 100%;"
-            border
-            :height="height"
-            :stripe="true"
-            :highlight-current-row="false"
-            :row-style="tableRowStyle"
-            :header-cell-style="tableHeaderColor"
-            :loading="tableLoading"
-            element-tableLoading-text="玩命加载中"
-            element-tableLoading-spinner="el-icon-tableLoading"
-            size="mini"
+      <el-table
+        ref="tab"
+        :data="tableData"
+        style="width: 100%"
+        border
+        :height="height"
+        :stripe="true"
+        :highlight-current-row="false"
+        :row-style="tableRowStyle"
+        :header-cell-style="tableHeaderColor"
+        :loading="tableLoading"
+        element-tableLoading-text="玩命加载中"
+        element-tableLoading-spinner="el-icon-tableLoading"
+        size="mini"
+      >
+        <el-table-column type="index" label="序号" fixed="left" width="50">
+        </el-table-column>
+        <el-table-column
+          sortable
+          v-for="(item, i) in tablehead"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :min-width="item.width || width"
         >
-            <el-table-column
-                type="index"
-                label="序号"
-                fixed="left"
-                width="50"
-            >
-            </el-table-column>
-            <el-table-column
-                sortable
-                v-for="(item,i) in tablehead"
-                :key="i"
-                :prop="item.prop"
-                :label="item.label"
-                :min-width="item.width || width">
-            </el-table-column>
-        </el-table>
-         <div class="fy">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page="currentPage"
-                :page-sizes="pageSizes"
-                :page-size="pageSize"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="total"
-                :hide-on-single-page="true">
-            </el-pagination>
-         </div>
+        </el-table-column>
+      </el-table>
+      <div class="fy">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="pageSizes"
+          :page-size="pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          :hide-on-single-page="true"
+        >
+        </el-pagination>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-import luckDrawTableHead from './luckDrawTableHead'
-import { renderTime,sjTime } from '@/utils/sharedJsFile'
+import luckDrawTableHead from "./luckDrawTableHead";
+import { renderTime, sjTime } from "@/utils/sharedJsFile";
 export default {
-    data(){
-        return{
-            //查询按钮的状态
-            selectLoading:false,
-            //导出按钮的状态
-            downloadLoading:false,
-            //导出excel文件的名字
-            tableTitle:'中奖名单',
-            //表格的高度
-            height:null,
-            //表格的每一列的宽度,若没有再表头设置则采用
-            width:150,
-            //总条目数
-            total:null,
-            //每页显示条目个数
-            pageSize: 100,
-            //每一页面的显示的条目个数数组
-            pageSizes: [5, 100, 200, 300],
-            //当前页数
-            currentPage: 1,
-            //表格的加载状态
-            tableLoading: false,
-            //查询条件
-            form:{
-                rflDate:new Date()
-            },
-            //表格渲染的数据
-            tableData:[],
-            //表格的表头数据
-            tablehead:[],
-        }
-    },
-    created(){
-        this.tablehead = luckDrawTableHead.luckDrawTableHead;
-        //动态监听页面的高度,如果改变则改变
-        window.addEventListener("resize", this.getHeight);
-        this.getHeight();
-        this.initialization();
-    },
-    methods:{
-        menuExport() {
+  data() {
+    return {
+      //查询按钮的状态
+      selectLoading: false,
+      //导出按钮的状态
+      downloadLoading: false,
+      //导出excel文件的名字
+      tableTitle: "中奖名单",
+      //表格的高度
+      height: null,
+      //表格的每一列的宽度,若没有再表头设置则采用
+      width: 150,
+      //总条目数
+      total: null,
+      //每页显示条目个数
+      pageSize: 100,
+      //每一页面的显示的条目个数数组
+      pageSizes: [5, 100, 200, 300],
+      //当前页数
+      currentPage: 1,
+      //表格的加载状态
+      tableLoading: false,
+      //查询条件
+      form: {
+        rflDate: new Date(),
+      },
+      //表格渲染的数据
+      tableData: [],
+      //表格的表头数据
+      tablehead: [],
+    };
+  },
+  created() {
+    this.tablehead = luckDrawTableHead.luckDrawTableHead;
+    //动态监听页面的高度,如果改变则改变
+    window.addEventListener("resize", this.getHeight);
+    this.getHeight();
+    this.initialization();
+  },
+  methods: {
+    menuExport() {
       if (this.tableData.length < 1) {
         this.$message.error("当前无数据可供导出!");
         return false;
       }
       let data = [];
       let i = 0;
-      this.tableData.forEach((e)=>{
-          i++;
-            data.push({
-                '序号':i,
-                '单位':e.empDept,
-                '工号':e.empNo,
-                '姓名':e.empName,
-                '电话号码':e.cellPhoneNo,
-                '中奖等级':e.prizeDesc,
-                '中奖时间':e.rflDate,
-            })
-        })
+      this.tableData.forEach((e) => {
+        i++;
+        data.push({
+          序号: i,
+          单位: e.empDept,
+          工号: e.empNo,
+          姓名: e.empName,
+          电话号码: e.cellPhoneNo,
+          中奖等级: e.prizeDesc,
+          中奖时间: e.rflDate,
+        });
+      });
       // 表格标题
       var dataTitle = this.tableTitle;
       // 配置文件类型
@@ -157,7 +155,7 @@ export default {
           // 居中
           horizontal: "center",
           vertical: "center",
-          indent: 0
+          indent: 0,
         },
       };
       var tmpdata = json[0];
@@ -292,110 +290,137 @@ export default {
       }, 100);
     },
 
-        getHeight(){
-            this.height = window.innerHeight - 200
-        },
-        initialization(){
-            this.axios.get('/icore.icp.web/game/v1/rflemplotterys/?rflDate=&pageNum='+this.currentPage+'&pageSize='+this.pageSize+'&lotteryResult=1').then((res)=>{
-                this.tableData = res.data.data.list
-                this.total = res.data.data.total;
-            })
-        },
-        //查询事件
-        selectClick(){
-            this.selectLoading = true;
-            let Date = renderTime(sjTime(this.form.rflDate)).slice(0,10)
-            this.axios.get('/icore.icp.web/game/v1/rflemplotterys/?rflDate='+Date+'&pageNum='+this.currentPage+'&pageSize='+this.pageSize+'&lotteryResult=1').then((res)=>{
-                this.tableData = res.data.data.list
-                this.total = res.data.data.total;
-            })
-            this.selectLoading = false;
-        },
-        //行间样式
-        tableRowStyle(){
-           return 'background-color:#CCF1FF;color:#000;text-align:center;height:10px'
-        },
-        //表头样式
-        tableHeaderColor(){
-            return 'background-color:#0C2278;color:#fff;text-align:center;height:20px'
-        },
-        changeList(){
-            this.initialization();
-            this.tableLoading = false;
-        },
-        handleSizeChange(val) {
-            this.tableLoading = true;
-            this.pageSize = val
-            this.changeList();
-        },
-        handleCurrentChange(val) {
-            this.tableLoading = true;
-            this.currentPage = val
-            this.changeList();
-        },
-        exportData(){
-            if(this.tableData.length){
-                let tHeader = [];
-                let filterVal = [];
-                this.tablehead.filter( (item,i) =>{
-                tHeader.push(item.label);
-                    filterVal.push(item.prop);
-                } )
-                this.export2Excel(tHeader,filterVal,this.tableData);
-            }else{
-                this.$alert('没有查询到数据,不能使用导出功能', '提示', {
-                    confirmButtonText: '确定',
-                    callback: action => {
-                    }
-                });
-            }
-        },
-        export2Excel(tHeader,filterVal,dataTabel) {
-        var that = this;
-        this.downloadLoading = true
-        require.ensure([], () => {
-            const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-            let list = dataTabel;
-            let data = that.formatJson(filterVal, list);
-            export_json_to_excel(tHeader, data, that.tableTitle); // 导出的表格名称
+    getHeight() {
+      this.height = window.innerHeight - 200;
+    },
+    initialization() {
+      this.axios
+        .get(
+          "/icore.icp.web/game/v1/rflemplotterys/?rflDate=&pageNum=" +
+            this.currentPage +
+            "&pageSize=" +
+            this.pageSize +
+            "&lotteryResult=1"
+        )
+        .then((res) => {
+          this.tableData = res.data.data.list;
+          this.total = res.data.data.total;
         });
-        this.downloadLoading = false;
-        },
-        //3.格式转换
-        formatJson(filterVal, jsonData) {
-        return jsonData.map((v) => filterVal.map((j) => v[j]));
-        },
-    }
-}
+    },
+    //查询事件
+    selectClick() {
+      this.selectLoading = true;
+      let Time = renderTime(sjTime(this.form.rflDate)).slice(0, 10);
+      this.axios
+        .get(
+          "/icore.icp.web/game/v1/rflemplotterys/?rflDate=" +
+            Time +
+            "&pageNum=" +
+            this.currentPage +
+            "&pageSize=" +
+            this.pageSize +
+            "&lotteryResult=1"
+        )
+        .then((res) => {
+          this.tableData = res.data.data.list;
+          this.total = res.data.data.total;
+        });
+      this.selectLoading = false;
+    },
+    //行间样式
+    tableRowStyle() {
+      return "background-color:#CCF1FF;color:#000;text-align:center;height:10px";
+    },
+    //表头样式
+    tableHeaderColor() {
+      return "background-color:#0C2278;color:#fff;text-align:center;height:20px";
+    },
+    changeList() {
+      this.initialization();
+      this.tableLoading = false;
+    },
+    handleSizeChange(val) {
+      this.tableLoading = true;
+      this.pageSize = val;
+      this.changeList();
+    },
+    handleCurrentChange(val) {
+      this.tableLoading = true;
+      this.currentPage = val;
+      this.changeList();
+    },
+    exportData() {
+      if (this.tableData.length) {
+        let tHeader = [];
+        let filterVal = [];
+        this.tablehead.filter((item, i) => {
+          tHeader.push(item.label);
+          filterVal.push(item.prop);
+        });
+        this.export2Excel(tHeader, filterVal, this.tableData);
+      } else {
+        this.$alert("没有查询到数据,不能使用导出功能", "提示", {
+          confirmButtonText: "确定",
+          callback: (action) => {},
+        });
+      }
+    },
+    export2Excel(tHeader, filterVal, dataTabel) {
+      var that = this;
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel,
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let list = dataTabel;
+        let data = that.formatJson(filterVal, list);
+        export_json_to_excel(tHeader, data, that.tableTitle); // 导出的表格名称
+      });
+      this.downloadLoading = false;
+    },
+    //3.格式转换
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => filterVal.map((j) => v[j]));
+    },
+    a() {
+      this.height = null;
+    },
+  },
+  beforeDestroy() {
+    document.removeEventListener("resize", this.a);
+    this.a();
+  },
+};
 </script>
 
 <style lang="scss">
-    .luckDraw{
-        .luckDraw_title{
-            width: 100%;height: 100px;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            font-size: 46px;
-            font-weight: 900;
-            color: red;
-                
-        }
-        .luckDraw_select{
-            display: flex;
-            align-items: center;
-            width: 100%;height: 60px;
-            padding-left: 50px;
-            .el-input{
-                width: 200px;
-                margin-right: 20px;
-            }
-        }
-        .fy{
-            display: flex;
-            align-items: center;
-            height: 40px;
-            width: 100%;
-        }
+.luckDraw {
+  .luckDraw_title {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 46px;
+    font-weight: 900;
+    color: red;
+  }
+  .luckDraw_select {
+    display: flex;
+    align-items: center;
+    width: 100%;
+    height: 60px;
+    padding-left: 50px;
+    .el-input {
+      width: 200px;
+      margin-right: 20px;
     }
+  }
+  .fy {
+    display: flex;
+    align-items: center;
+    height: 40px;
+    width: 100%;
+  }
+}
 </style>