|  | @@ -4,143 +4,124 @@
 | 
	
		
			
				|  |  |        <div class="squrt"></div>订单管理
 | 
	
		
			
				|  |  |      </h2>
 | 
	
		
			
				|  |  |      <div class="m-core">
 | 
	
		
			
				|  |  | -      <div class="newBand" @click="onOrderExport" v-permission="{child: 'export/orderList', parent: '/income'}">报表导出</div>
 | 
	
		
			
				|  |  | +      <div
 | 
	
		
			
				|  |  | +        class="newBand"
 | 
	
		
			
				|  |  | +        @click="onOrderExport"
 | 
	
		
			
				|  |  | +        v-permission="{child: 'export/orderList', parent: '/income'}"
 | 
	
		
			
				|  |  | +      >报表导出</div>
 | 
	
		
			
				|  |  |        <!-- 搜索类型 -->
 | 
	
		
			
				|  |  | -      <el-form :inline="true"
 | 
	
		
			
				|  |  | -               class="searchForm"
 | 
	
		
			
				|  |  | -               v-model.trim="searchForm">
 | 
	
		
			
				|  |  | -        <el-form-item prop='organId'>
 | 
	
		
			
				|  |  | -          <el-select class='multiple'
 | 
	
		
			
				|  |  | -                     v-model.trim="searchForm.organId"
 | 
	
		
			
				|  |  | -                     filterable
 | 
	
		
			
				|  |  | -                     clearable
 | 
	
		
			
				|  |  | -                     @clear="onClear('organId')"
 | 
	
		
			
				|  |  | -                     placeholder="请选择分部">
 | 
	
		
			
				|  |  | -            <el-option v-for="(item,index) in organList"
 | 
	
		
			
				|  |  | -                       :key="index"
 | 
	
		
			
				|  |  | -                       :label="item.name"
 | 
	
		
			
				|  |  | -                       :value="item.id"></el-option>
 | 
	
		
			
				|  |  | +      <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
 | 
	
		
			
				|  |  | +        <el-form-item prop="organId">
 | 
	
		
			
				|  |  | +          <el-select
 | 
	
		
			
				|  |  | +            class="multiple"
 | 
	
		
			
				|  |  | +            v-model.trim="searchForm.organId"
 | 
	
		
			
				|  |  | +            filterable
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            @clear="onClear('organId')"
 | 
	
		
			
				|  |  | +            placeholder="请选择分部"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <el-option
 | 
	
		
			
				|  |  | +              v-for="(item,index) in organList"
 | 
	
		
			
				|  |  | +              :key="index"
 | 
	
		
			
				|  |  | +              :label="item.name"
 | 
	
		
			
				|  |  | +              :value="item.id"
 | 
	
		
			
				|  |  | +            ></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  | -          <el-date-picker v-model.trim="orderDate"
 | 
	
		
			
				|  |  | -                          style="width:410px;"
 | 
	
		
			
				|  |  | -                          type="daterange"
 | 
	
		
			
				|  |  | -                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | -                          @change="searchOrderDate"
 | 
	
		
			
				|  |  | -                          range-separator="至"
 | 
	
		
			
				|  |  | -                          start-placeholder="开始日期"
 | 
	
		
			
				|  |  | -                          end-placeholder="结束日期">
 | 
	
		
			
				|  |  | -          </el-date-picker>
 | 
	
		
			
				|  |  | +          <el-date-picker
 | 
	
		
			
				|  |  | +            v-model.trim="orderDate"
 | 
	
		
			
				|  |  | +            style="width:410px;"
 | 
	
		
			
				|  |  | +            type="daterange"
 | 
	
		
			
				|  |  | +            value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +            @change="searchOrderDate"
 | 
	
		
			
				|  |  | +            range-separator="至"
 | 
	
		
			
				|  |  | +            start-placeholder="开始日期"
 | 
	
		
			
				|  |  | +            end-placeholder="结束日期"
 | 
	
		
			
				|  |  | +          ></el-date-picker>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  | -          <el-select v-model.trim="searchForm.paymentType"
 | 
	
		
			
				|  |  | -                     clearable
 | 
	
		
			
				|  |  | -                     filterable
 | 
	
		
			
				|  |  | -                     @clear="onClear('paymentType')"
 | 
	
		
			
				|  |  | -                     placeholder="交易类型">
 | 
	
		
			
				|  |  | -            <el-option v-for="(item, index) in orderStatus"
 | 
	
		
			
				|  |  | -                       :key="index"
 | 
	
		
			
				|  |  | -                       :label="item.label"
 | 
	
		
			
				|  |  | -                       :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +          <el-select
 | 
	
		
			
				|  |  | +            v-model.trim="searchForm.paymentType"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            filterable
 | 
	
		
			
				|  |  | +            @clear="onClear('paymentType')"
 | 
	
		
			
				|  |  | +            placeholder="交易类型"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <el-option
 | 
	
		
			
				|  |  | +              v-for="(item, index) in orderStatus"
 | 
	
		
			
				|  |  | +              :key="index"
 | 
	
		
			
				|  |  | +              :label="item.label"
 | 
	
		
			
				|  |  | +              :value="item.value"
 | 
	
		
			
				|  |  | +            ></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  | -          <el-select v-model.trim="searchForm.paymentStatus"
 | 
	
		
			
				|  |  | -                     clearable
 | 
	
		
			
				|  |  | -                     filterable
 | 
	
		
			
				|  |  | -                     @clear="onClear('paymentStatus')"
 | 
	
		
			
				|  |  | -                     placeholder="交易状态">
 | 
	
		
			
				|  |  | -            <el-option v-for="(item, index) in dealStatus"
 | 
	
		
			
				|  |  | -                       :key="index"
 | 
	
		
			
				|  |  | -                       :label="item.label"
 | 
	
		
			
				|  |  | -                       :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +          <el-select
 | 
	
		
			
				|  |  | +            v-model.trim="searchForm.paymentStatus"
 | 
	
		
			
				|  |  | +            clearable
 | 
	
		
			
				|  |  | +            filterable
 | 
	
		
			
				|  |  | +            @clear="onClear('paymentStatus')"
 | 
	
		
			
				|  |  | +            placeholder="交易状态"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <el-option
 | 
	
		
			
				|  |  | +              v-for="(item, index) in dealStatus"
 | 
	
		
			
				|  |  | +              :key="index"
 | 
	
		
			
				|  |  | +              :label="item.label"
 | 
	
		
			
				|  |  | +              :value="item.value"
 | 
	
		
			
				|  |  | +            ></el-option>
 | 
	
		
			
				|  |  |            </el-select>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |          <el-form-item>
 | 
	
		
			
				|  |  | -          <el-button @click="search"
 | 
	
		
			
				|  |  | -                     type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | -          <el-button @click="onReSet"
 | 
	
		
			
				|  |  | -                     type="primary">重置</el-button>
 | 
	
		
			
				|  |  | +          <el-button @click="search" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | +          <el-button @click="onReSet" type="primary">重置</el-button>
 | 
	
		
			
				|  |  |          </el-form-item>
 | 
	
		
			
				|  |  |        </el-form>
 | 
	
		
			
				|  |  |        <!-- 列表 -->
 | 
	
		
			
				|  |  |        <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
 | 
	
		
			
				|  |  | -          应收总金额:{{ totalExpectAmount }}元     
 | 
	
		
			
				|  |  | -          实收总金额:{{ totalActualAmount }}元</div>
 | 
	
		
			
				|  |  | +        应收总金额:{{ totalExpectAmount }}元     
 | 
	
		
			
				|  |  | +        实收总金额:{{ totalActualAmount }}元
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |        <div class="tableWrap">
 | 
	
		
			
				|  |  | -        <el-table :data='tableList'
 | 
	
		
			
				|  |  | -                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | -          <el-table-column align='center' width="180px"
 | 
	
		
			
				|  |  | -                           prop="transNo"
 | 
	
		
			
				|  |  | -                           label="交易流水号">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           width="210px"
 | 
	
		
			
				|  |  | -                           prop="orderNo"
 | 
	
		
			
				|  |  | -                           label="订单号">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center' 
 | 
	
		
			
				|  |  | -                           prop="createTime"
 | 
	
		
			
				|  |  | -                           label="订单日期">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -       width="100px"
 | 
	
		
			
				|  |  | -                           label="交易类型">
 | 
	
		
			
				|  |  | -                           
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.type | orderType }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="expectAmount"
 | 
	
		
			
				|  |  | -                           label="应付金额">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="balancePaymentAmount"
 | 
	
		
			
				|  |  | -                           label="余额支付">
 | 
	
		
			
				|  |  | +        <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | +          <el-table-column align="center" width="180px" prop="transNo" label="交易流水号"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" width="210px" prop="orderNo" label="订单号"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="createTime" label="订单日期"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" width="100px" label="交易类型">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.type | orderType }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="actualAmount"
 | 
	
		
			
				|  |  | -                           label="实付金额">
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="学员姓名">
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="expectAmount" label="应付金额"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="balancePaymentAmount" label="余额支付"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="actualAmount" label="实付金额"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="学员姓名">
 | 
	
		
			
				|  |  |              <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.user.username }}<span v-if="scope.row.user.username && scope.row.user.phone">/</span>{{ scope.row.user.phone }}
 | 
	
		
			
				|  |  | +              {{ scope.row.user.username }}
 | 
	
		
			
				|  |  | +              <span
 | 
	
		
			
				|  |  | +                v-if="scope.row.user.username && scope.row.user.phone"
 | 
	
		
			
				|  |  | +              >/</span>
 | 
	
		
			
				|  |  | +              {{ scope.row.user.phone }}
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="paymentChannel"
 | 
	
		
			
				|  |  | -                           label="交易方式">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.paymentChannel | paymentChannelStatus }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="paymentChannel" label="交易方式">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.paymentChannel | paymentChannelStatus }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="收款账户">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.merNos }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="收款账户">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.merNos }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="交易状态">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.status | dealStatus }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="交易状态">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.status | dealStatus }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="备注">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.memo ? scope.row.memo : '-' }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="备注">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.memo ? scope.row.memo : '-' }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  |          </el-table>
 | 
	
		
			
				|  |  | -        <pagination :total="pageInfo.total"
 | 
	
		
			
				|  |  | -                    :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | -                    :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | -                    :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | -                    @pagination="getList" />
 | 
	
		
			
				|  |  | +        <pagination
 | 
	
		
			
				|  |  | +          :total="pageInfo.total"
 | 
	
		
			
				|  |  | +          :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | +          :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | +          :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | +          @pagination="getList"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
	
		
			
				|  | @@ -157,8 +138,8 @@ import { getToken } from '@/utils/auth'
 | 
	
		
			
				|  |  |  import load from '@/utils/loading'
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: { pagination },
 | 
	
		
			
				|  |  | -  name: 'income',
 | 
	
		
			
				|  |  | -  data () {
 | 
	
		
			
				|  |  | +  name: "income",
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        orderStatus: orderStatus,
 | 
	
		
			
				|  |  |        dealStatus: dealStatus,
 | 
	
	
		
			
				|  | @@ -166,7 +147,7 @@ export default {
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  |          orderStartDate: null,
 | 
	
		
			
				|  |  |          orderEndDate: null,
 | 
	
		
			
				|  |  | -        paymentStatus: 'SUCCESS',
 | 
	
		
			
				|  |  | +        paymentStatus: "SUCCESS",
 | 
	
		
			
				|  |  |          paymentType: null,
 | 
	
		
			
				|  |  |          organId: null
 | 
	
		
			
				|  |  |        },
 | 
	
	
		
			
				|  | @@ -180,71 +161,86 @@ export default {
 | 
	
		
			
				|  |  |          page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        totalExpectAmount: 0, //应收总金额
 | 
	
		
			
				|  |  | -      totalActualAmount: 0, //实收总金额
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +      totalActualAmount: 0 //实收总金额
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  mounted () {
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  |      getEmployeeOrgan().then(res => {
 | 
	
		
			
				|  |  |        if (res.code == 200) {
 | 
	
		
			
				|  |  |          this.organList = res.data;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    var now = new Date();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    var startDate =
 | 
	
		
			
				|  |  | +      new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
 | 
	
		
			
				|  |  | +        .toISOString()
 | 
	
		
			
				|  |  | +        .slice(0, 10);
 | 
	
		
			
				|  |  | +        //  + " 00:00:00"  + " 23:59:59"
 | 
	
		
			
				|  |  | +    var endDate =
 | 
	
		
			
				|  |  | +      new Date(Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()))
 | 
	
		
			
				|  |  | +        .toISOString()
 | 
	
		
			
				|  |  | +        .slice(0, 10);
 | 
	
		
			
				|  |  | +    this.orderDate = [];
 | 
	
		
			
				|  |  | +    this.orderDate.push(startDate);
 | 
	
		
			
				|  |  | +    this.orderDate.push(endDate);
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      onClear(type) {
 | 
	
		
			
				|  |  | -      if(type == 'paymentType') {
 | 
	
		
			
				|  |  | -        this.searchForm.paymentType = null
 | 
	
		
			
				|  |  | -      } else if(type  == 'paymentStatus') {
 | 
	
		
			
				|  |  | -        this.searchForm.paymentStatus = null
 | 
	
		
			
				|  |  | -      } else if(type == 'organId') {
 | 
	
		
			
				|  |  | -        this.searchForm.organId = null
 | 
	
		
			
				|  |  | +      if (type == "paymentType") {
 | 
	
		
			
				|  |  | +        this.searchForm.paymentType = null;
 | 
	
		
			
				|  |  | +      } else if (type == "paymentStatus") {
 | 
	
		
			
				|  |  | +        this.searchForm.paymentStatus = null;
 | 
	
		
			
				|  |  | +      } else if (type == "organId") {
 | 
	
		
			
				|  |  | +        this.searchForm.organId = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onOrderExport() { // 报表导出
 | 
	
		
			
				|  |  | -        let url = '/api-web/export/orderList'
 | 
	
		
			
				|  |  | -        let data = {
 | 
	
		
			
				|  |  | -          orderType: 0
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        let searchForm = this.searchForm
 | 
	
		
			
				|  |  | -        if(searchForm.paymentStatus) {
 | 
	
		
			
				|  |  | -          data.paymentStatus = searchForm.paymentStatus
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +    onOrderExport() {
 | 
	
		
			
				|  |  | +      // 报表导出
 | 
	
		
			
				|  |  | +      let url = "/api-web/export/orderList";
 | 
	
		
			
				|  |  | +      let data = {
 | 
	
		
			
				|  |  | +        orderType: 0
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      let searchForm = this.searchForm;
 | 
	
		
			
				|  |  | +      if (searchForm.paymentStatus) {
 | 
	
		
			
				|  |  | +        data.paymentStatus = searchForm.paymentStatus;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        if(searchForm.paymentType) {
 | 
	
		
			
				|  |  | -          data.paymentType = searchForm.paymentType
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +      if (searchForm.paymentType) {
 | 
	
		
			
				|  |  | +        data.paymentType = searchForm.paymentType;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        if(searchForm.organId) {
 | 
	
		
			
				|  |  | -          data.organId = searchForm.organId
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +      if (searchForm.organId) {
 | 
	
		
			
				|  |  | +        data.organId = searchForm.organId;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        if(searchForm.orderStartDate && searchForm.orderEndDate) {
 | 
	
		
			
				|  |  | -          data.orderStartDate = searchForm.orderStartDate
 | 
	
		
			
				|  |  | -          data.orderEndDate = searchForm.orderEndDate
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        const options = {
 | 
	
		
			
				|  |  | -          method: 'POST',
 | 
	
		
			
				|  |  | -          headers: {
 | 
	
		
			
				|  |  | -            'Authorization': getToken()
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          data: qs.stringify(data),
 | 
	
		
			
				|  |  | -          url,
 | 
	
		
			
				|  |  | -          responseType: 'blob'
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        this.$confirm('您确定导出报表', '提示', {
 | 
	
		
			
				|  |  | -          confirmButtonText: '确定',
 | 
	
		
			
				|  |  | -          cancelButtonText: '取消',
 | 
	
		
			
				|  |  | -          type: 'warning'
 | 
	
		
			
				|  |  | -        }).then(() => {
 | 
	
		
			
				|  |  | -          load.startLoading()
 | 
	
		
			
				|  |  | +      if (searchForm.orderStartDate && searchForm.orderEndDate) {
 | 
	
		
			
				|  |  | +        data.orderStartDate = searchForm.orderStartDate;
 | 
	
		
			
				|  |  | +        data.orderEndDate = searchForm.orderEndDate;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      const options = {
 | 
	
		
			
				|  |  | +        method: "POST",
 | 
	
		
			
				|  |  | +        headers: {
 | 
	
		
			
				|  |  | +          Authorization: getToken()
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        data: qs.stringify(data),
 | 
	
		
			
				|  |  | +        url,
 | 
	
		
			
				|  |  | +        responseType: "blob"
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.$confirm("您确定导出报表", "提示", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          // load.startloa();
 | 
	
		
			
				|  |  |            axios(options).then(res => {
 | 
	
		
			
				|  |  |              let blob = new Blob([res.data], {
 | 
	
		
			
				|  |  |                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
 | 
	
		
			
				|  |  | -              type: 'application/vnd.ms-excel;charset=utf-8'
 | 
	
		
			
				|  |  | +              type: "application/vnd.ms-excel;charset=utf-8"
 | 
	
		
			
				|  |  |                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |              let text = (new Response(blob)).text()
 | 
	
		
			
				|  |  |              text.then(res => {
 | 
	
		
			
				|  |  |                // 判断是否报错
 | 
	
	
		
			
				|  | @@ -252,62 +248,84 @@ export default {
 | 
	
		
			
				|  |  |                  let json = JSON.parse(res)
 | 
	
		
			
				|  |  |                  this.$message.error(json.msg)
 | 
	
		
			
				|  |  |                } else {
 | 
	
		
			
				|  |  | -                let objectUrl = URL.createObjectURL(blob)
 | 
	
		
			
				|  |  | -                let link = document.createElement("a")
 | 
	
		
			
				|  |  | -                let nowTime = new Date()
 | 
	
		
			
				|  |  | -                let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
 | 
	
		
			
				|  |  | -                let fname = '报表导出' + new Date().getTime() //下载文件的名字
 | 
	
		
			
				|  |  | -                link.href = objectUrl
 | 
	
		
			
				|  |  | -                link.setAttribute("download", fname)
 | 
	
		
			
				|  |  | -                document.body.appendChild(link)
 | 
	
		
			
				|  |  | -                link.click()
 | 
	
		
			
				|  |  | +                let objectUrl = URL.createObjectURL(blob);
 | 
	
		
			
				|  |  | +                let link = document.createElement("a");
 | 
	
		
			
				|  |  | +                let nowTime = new Date();
 | 
	
		
			
				|  |  | +                let ymd =
 | 
	
		
			
				|  |  | +                  nowTime.getFullYear() +
 | 
	
		
			
				|  |  | +                  "" +
 | 
	
		
			
				|  |  | +                  (nowTime.getMonth() + 1) +
 | 
	
		
			
				|  |  | +                  "" +
 | 
	
		
			
				|  |  | +                  nowTime.getDate() +
 | 
	
		
			
				|  |  | +                  "" +
 | 
	
		
			
				|  |  | +                  nowTime.getHours() +
 | 
	
		
			
				|  |  | +                  "" +
 | 
	
		
			
				|  |  | +                  nowTime.getMinutes();
 | 
	
		
			
				|  |  | +                let fname = "报表导出" + new Date().getTime(); //下载文件的名字
 | 
	
		
			
				|  |  | +                link.href = objectUrl;
 | 
	
		
			
				|  |  | +                link.setAttribute("download", fname);
 | 
	
		
			
				|  |  | +                document.body.appendChild(link);
 | 
	
		
			
				|  |  | +                link.click();
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              load.endLoading();
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -        }).catch(() => {})
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -    search () {
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch(() => {});
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    search() {
 | 
	
		
			
				|  |  |        this.pageInfo.page = 1;
 | 
	
		
			
				|  |  |        this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getList () {
 | 
	
		
			
				|  |  | -      let params = this.searchForm
 | 
	
		
			
				|  |  | -      params.rows = this.pageInfo.limit
 | 
	
		
			
				|  |  | -      params.page = this.pageInfo.page
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      let params = this.searchForm;
 | 
	
		
			
				|  |  | +      params.rows = this.pageInfo.limit;
 | 
	
		
			
				|  |  | +      params.page = this.pageInfo.page;
 | 
	
		
			
				|  |  | +      if (this.orderDate && this.orderDate.length > 0) {
 | 
	
		
			
				|  |  | +        params.orderStartDate = this.orderDate[0];
 | 
	
		
			
				|  |  | +        params.orderEndDate = this.orderDate[1];
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        params.orderStartDate = null;
 | 
	
		
			
				|  |  | +        params.orderEndDate = null;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        orderQueryPage(params).then(res => {
 | 
	
		
			
				|  |  | -        let result = res.data
 | 
	
		
			
				|  |  | +        let result = res.data;
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  | -          this.tableList = result.rows
 | 
	
		
			
				|  |  | -          this.pageInfo.total = result.total
 | 
	
		
			
				|  |  | -          this.totalExpectAmount = result.totalExpectAmount ? result.totalExpectAmount : 0
 | 
	
		
			
				|  |  | -          this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
 | 
	
		
			
				|  |  | +          this.tableList = result.rows;
 | 
	
		
			
				|  |  | +          this.pageInfo.total = result.total;
 | 
	
		
			
				|  |  | +          this.totalExpectAmount = result.totalExpectAmount
 | 
	
		
			
				|  |  | +            ? result.totalExpectAmount
 | 
	
		
			
				|  |  | +            : 0;
 | 
	
		
			
				|  |  | +          this.totalActualAmount = result.totalActualAmount
 | 
	
		
			
				|  |  | +            ? result.totalActualAmount
 | 
	
		
			
				|  |  | +            : 0;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    searchOrderDate (value) {
 | 
	
		
			
				|  |  | +    searchOrderDate(value) {
 | 
	
		
			
				|  |  |        if (value) {
 | 
	
		
			
				|  |  | -        this.searchForm.orderStartDate = value[0]
 | 
	
		
			
				|  |  | -        this.searchForm.orderEndDate = value[1]
 | 
	
		
			
				|  |  | +        this.searchForm.orderStartDate = value[0];
 | 
	
		
			
				|  |  | +        this.searchForm.orderEndDate = value[1];
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        this.searchForm.orderStartDate = null
 | 
	
		
			
				|  |  | -        this.searchForm.orderEndDate = null
 | 
	
		
			
				|  |  | +        this.searchForm.orderStartDate = null;
 | 
	
		
			
				|  |  | +        this.searchForm.orderEndDate = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onReSet () { // 重置搜索
 | 
	
		
			
				|  |  | -      this.orderDate = null
 | 
	
		
			
				|  |  | +    onReSet() {
 | 
	
		
			
				|  |  | +      // 重置搜索
 | 
	
		
			
				|  |  | +      this.orderDate = null;
 | 
	
		
			
				|  |  |        this.searchForm = {
 | 
	
		
			
				|  |  |          orderStartDate: null,
 | 
	
		
			
				|  |  |          orderEndDate: null,
 | 
	
		
			
				|  |  |          paymentStatus: null,
 | 
	
		
			
				|  |  |          paymentType: null,
 | 
	
		
			
				|  |  |          organId: null
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      this.getList()
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss">
 | 
	
		
			
				|  |  |  </style>
 |