leoone8322 3 mesiacov pred
rodič
commit
06749ff3be

+ 190 - 144
src/components/saleDetail.vue

@@ -12,7 +12,7 @@
         <el-form :inline="true" size="small" v-model="listQuery1">
           <el-form-item label="城市">
             <el-select v-model="listQuery1.city" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList2" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList2" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="业务线">
@@ -26,18 +26,21 @@
           </el-form-item>
           <el-form-item label="订单来源">
             <el-select v-model="listQuery1.channel" placeholder="请选择订单来源" clearable>
-              <el-option v-for="(item,index) in channelList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
 
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery1.createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery1.createTime" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch1(false)">查询</el-button>
-            <el-button type="primary" icon="el-icon-download" @click="querySearch1(true)" v-per="'downloadSale1'">导出</el-button>
+            <el-button type="primary" icon="el-icon-download" @click="querySearch1(true)"
+              v-per="'downloadSale1'">导出</el-button>
           </el-form-item>
-          
+
         </el-form>
 
         <!-- 列表数据 -->
@@ -47,10 +50,10 @@
           <el-table-column prop="city" label="城市"></el-table-column>
           <el-table-column prop="channel" label="渠道"></el-table-column>
           <el-table-column prop="samllType" label="商品类型"></el-table-column>
-          <el-table-column prop="goodsName" label="商品名称"></el-table-column>  
-          <el-table-column prop="levelOne" label="一级分类"></el-table-column>  
-          <el-table-column prop="levelTwo" label="二级分类"></el-table-column>  
-          <el-table-column prop="keyWord" label="关键字"></el-table-column>  
+          <el-table-column prop="goodsName" label="商品名称"></el-table-column>
+          <el-table-column prop="levelOne" label="一级分类"></el-table-column>
+          <el-table-column prop="levelTwo" label="二级分类"></el-table-column>
+          <el-table-column prop="keyWord" label="关键字"></el-table-column>
           <el-table-column prop="goodsPrice" label="商品价格"></el-table-column>
           <el-table-column prop="payDate" label="支付日期"></el-table-column>
           <el-table-column prop="payAmount" label="支付金额"></el-table-column>
@@ -63,14 +66,16 @@
         </el-table>
 
         <!-- 分页 -->
-        <pagination :total="total1" :page.sync="currentPage1" :limit.sync="pageSize1" @pagination="querySearch1(false)" />
+        <pagination :total="total1" :page.sync="currentPage1" :limit.sync="pageSize1"
+          @pagination="querySearch1(false)" />
       </el-tab-pane>
       <el-tab-pane label="各渠道销售明细">
         <!-- 搜索 -->
         <el-form :inline="true" size="small" v-model="listQuery2">
           <el-form-item label="城市">
             <el-select v-model="listQuery2.city" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item.dataName" :value="item.dataName"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item.dataName"
+                :value="item.dataName"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="业务线">
@@ -84,16 +89,19 @@
           </el-form-item>
           <el-form-item label="订单来源">
             <el-select v-model="listQuery2.channel" placeholder="请选择订单来源" clearable>
-              <el-option v-for="(item,index) in channelList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
 
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery2.createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery2.createTime" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch2">查询</el-button>
-            <el-button type="primary" icon="el-icon-download" @click="downloadSale2" v-per="'downloadSale2'">导出</el-button>
+            <el-button type="primary" icon="el-icon-download" @click="downloadSale2"
+              v-per="'downloadSale2'">导出</el-button>
           </el-form-item>
         </el-form>
 
@@ -102,7 +110,7 @@
           <el-table-column prop="index" label="序号" type="index" width="50px" fixed="left"></el-table-column>
           <el-table-column prop="channel" label="渠道"></el-table-column>
           <el-table-column prop="channelNo" label="渠道编号"></el-table-column>
-          <el-table-column prop="payOrderNo" label="付款单号" ></el-table-column>
+          <el-table-column prop="payOrderNo" label="付款单号"></el-table-column>
           <el-table-column prop="city" label="城市"></el-table-column>
           <el-table-column prop="shopName" label="门店"></el-table-column>
           <el-table-column prop="levelOne" label="一级分类"></el-table-column>
@@ -124,12 +132,18 @@
       </el-tab-pane>
       <el-tab-pane label="盒马销售明细">
         <!-- 搜索 -->
-        <el-form :inline="true" size="small" v-model="listQuery10"> 
-          <el-form-item label="付款手机"> 
+        <el-form :inline="true" size="small" v-model="listQuery10">
+          <el-form-item label="付款手机">
             <el-input v-model="listQuery10.buyerPhone" clearable placeholder="请输入付款手机"></el-input>
-          </el-form-item> 
+          </el-form-item>
+          <el-form-item label="服务日期">
+            <el-date-picker v-model="timeArray10" type="datetimerange" start-placeholder="支付开始日期"
+              end-placeholder="支付结束日期" style="width:360px" value-format="yyyy-MM-dd HH:mm:ss"
+              :picker-options="{}"></el-date-picker>
+          </el-form-item>
           <el-form-item>
-            <el-button icon="el-icon-search" type="primary" plan @click="querySearch10">查询</el-button> 
+            <el-button icon="el-icon-search" type="primary" plan @click="querySearch10(false)">查询</el-button>
+            <el-button type="primary" icon="el-icon-download" @click="querySearch10(true)">导出</el-button>
           </el-form-item>
         </el-form>
 
@@ -139,7 +153,7 @@
           <el-table-column prop="buyerPhone" label="付款手机"></el-table-column>
           <el-table-column prop="payId" label="订单编号"></el-table-column>
           <el-table-column prop="payDate" label="支付时间"></el-table-column>
-          <el-table-column prop="payFee" label="支付金额" ></el-table-column>
+          <el-table-column prop="payFee" label="支付金额"></el-table-column>
           <el-table-column prop="city" label="城市"></el-table-column>
           <el-table-column prop="shopName" label="门店"></el-table-column>
           <el-table-column prop="goodsName" label="商品名称"></el-table-column>
@@ -149,8 +163,8 @@
           <el-table-column prop="lastSerTime" label="最近一次服务"></el-table-column>
           <el-table-column prop="lastTradeNo" label="最近一次服务工单号"></el-table-column>
           <el-table-column prop="status" label="状态"></el-table-column>
-          <el-table-column prop="refundDate" label="退款日期"></el-table-column> 
-          <el-table-column prop="guideName" label="导购员"></el-table-column> 
+          <el-table-column prop="refundDate" label="退款日期"></el-table-column>
+          <el-table-column prop="guideName" label="导购员"></el-table-column>
         </el-table>
 
         <!-- 分页 -->
@@ -161,7 +175,7 @@
         <el-form :inline="true" size="small" v-model="listQuery3">
           <el-form-item label="城市">
             <el-select v-model="listQuery3.city" style="width:180px" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList2" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList2" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="业务线">
@@ -175,12 +189,14 @@
           </el-form-item>
           <el-form-item label="订单来源">
             <el-select v-model="listQuery3.channel" placeholder="请选择订单来源" style="width:160px" clearable>
-              <el-option v-for="(item,index) in channelList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
 
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery3.createTime" type="daterange"  style="width:250px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery3.createTime" type="daterange" style="width:250px" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch3">查询</el-button>
@@ -193,8 +209,8 @@
           <el-table-column prop="index" label="序号" type="index" width="50px" fixed="left"></el-table-column>
           <el-table-column prop="dates" label="日期"></el-table-column>
           <el-table-column prop="channel" label="渠道"></el-table-column>
-          <el-table-column prop="city" label="城市"></el-table-column> 
-          <el-table-column prop="salesType" label="销售类型"></el-table-column> 
+          <el-table-column prop="city" label="城市"></el-table-column>
+          <el-table-column prop="salesType" label="销售类型"></el-table-column>
           <el-table-column prop="levelOne" label="一级分类"></el-table-column>
           <el-table-column prop="levelTwo" label="二级分类"></el-table-column>
           <el-table-column prop="keyWord" label="关键字"></el-table-column>
@@ -218,11 +234,11 @@
         <el-form :inline="true" size="small" v-model="listQuery4">
           <el-form-item label="城市">
             <el-select v-model="listQuery4.city" style="width:180px" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList2" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList2" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="服务单状态">
-            <el-select v-model="listQuery4.status" style="width:180px"  placeholder="请选择服务单状态" clearable multiple>
+            <el-select v-model="listQuery4.status" style="width:180px" placeholder="请选择服务单状态" clearable multiple>
               <el-option label="待上门" value="待上门"></el-option>
               <el-option label="待履约" value="待履约"></el-option>
               <el-option label="服务中" value="服务中"></el-option>
@@ -242,18 +258,22 @@
           </el-form-item>
           <el-form-item label="订单来源">
             <el-select v-model="listQuery4.channel" placeholder="请选择订单来源" style="width:160px" clearable>
-              <el-option v-for="(item,index) in channelList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
 
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery4.createTime" style="width:250px" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery4.createTime" style="width:250px" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch4">查询</el-button>
           </el-form-item>
-          <el-button type="primary" icon="el-icon-download" @click="downloadService" v-per="'downloadService'">导出</el-button>
-          <div style="color:red;font-size:12px">注:从2024年1月开始,服务GMV包括服务已完成、已提供、到期待履约的数据;对应字段服务状态(已确认=服务已完成,待确认=待履约、服务以提供、我已上门)</div>
+          <el-button type="primary" icon="el-icon-download" @click="downloadService"
+            v-per="'downloadService'">导出</el-button>
+          <div style="color:red;font-size:12px">
+            注:从2024年1月开始,服务GMV包括服务已完成、已提供、到期待履约的数据;对应字段服务状态(已确认=服务已完成,待确认=待履约、服务以提供、我已上门)</div>
         </el-form>
 
         <!-- 列表数据 -->
@@ -287,7 +307,8 @@
         <el-form :inline="true" size="small" v-model="listQuery5">
           <el-form-item label="城市">
             <el-select v-model="listQuery5.city" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item.dataName" :value="item.dataName"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item.dataName"
+                :value="item.dataName"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="业务线">
@@ -301,11 +322,14 @@
           </el-form-item>
 
           <el-form-item label="日期">
-            <el-date-picker v-model="listQuery5.createTime" type="date" placeholder="请选择日期" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery5.createTime" type="date" placeholder="请选择日期" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch5">查询</el-button>
-            <el-button type="primary" icon="el-icon-download" @click="downloadSale5" v-per="'downloadSale5'">导出</el-button>
+            <el-button type="primary" icon="el-icon-download" @click="downloadSale5"
+              v-per="'downloadSale5'">导出</el-button>
           </el-form-item>
         </el-form>
 
@@ -338,7 +362,9 @@
       <el-tab-pane label="非盒马渠道当月实销额扇形图">
         <el-form :inline="true" size="small" v-model="listQuery6">
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery6.createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery6.createTime" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch6">查询</el-button>
@@ -352,11 +378,13 @@
         <!-- 搜索 -->
         <el-form :inline="true" size="small" v-model="listQuery7">
           <el-form-item label="日期">
-            <el-date-picker v-model="listQuery7.createTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
+            <el-date-picker v-model="listQuery7.createTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
+              format="yyyy-MM-dd"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch7">查询</el-button>
-            <el-button type="primary" icon="el-icon-download" @click="downloadSale7" v-per="'downloadSale7'">导出</el-button>
+            <el-button type="primary" icon="el-icon-download" @click="downloadSale7"
+              v-per="'downloadSale7'">导出</el-button>
           </el-form-item>
         </el-form>
 
@@ -378,31 +406,30 @@
         <el-form :inline="true" size="small" v-model="listQuery8">
           <el-form-item label="城市">
             <el-select v-model="listQuery8.city" clearable placeholder="请选择城市" multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item.dataName" :value="item.dataName"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item.dataName"
+                :value="item.dataName"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="渠道">
+            <el-select v-model="listQuery8.channel" placeholder="请选择渠道" clearable multiple>
+              <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
-           <el-form-item label="渠道">
-          <el-select
-            v-model="listQuery8.channel"
-            placeholder="请选择渠道"
-            clearable
-            multiple
-          >
-          <el-option v-for="(item,index) in channelList" :key="index" :label="item" :value="item" ></el-option>
-          </el-select>
-        </el-form-item>
           <el-form-item label="业务线">
             <el-select v-model="listQuery8.levelOne" clearable placeholder="请选择业务线" @change="levelChange">
-              <el-option v-for="(item,index) in levelList" :key="index" :label="item.buz" :value="item.buz"></el-option>
+              <el-option v-for="(item, index) in levelList" :key="index" :label="item.buz"
+                :value="item.buz"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="关键字">
             <el-select v-model="listQuery8.keyWord" clearable placeholder="请选择关键字" multiple>
-              <el-option v-for="(item,index) in keywordList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in keywordList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery8.createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery8.createTime" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch8">查询</el-button>
@@ -414,20 +441,23 @@
           <template v-for="(item,index) in tableHead">
             <el-table-column :prop="item" :label="item" :key="index"></el-table-column>
           </template>
-        </el-table>-->
+</el-table>-->
         <div id="mainChart2"></div>
       </el-tab-pane>
-         <el-tab-pane label="补差订单" name="9">
+      <el-tab-pane label="补差订单" name="9">
         <!-- 搜索 -->
         <el-form :inline="true" size="small" v-model="listQuery9">
-         
+
           <el-form-item label="时间段">
-            <el-date-picker v-model="listQuery9.createTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" :picker-options="pickerOptions"></el-date-picker>
+            <el-date-picker v-model="listQuery9.createTime" type="daterange" range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
+              :picker-options="pickerOptions"></el-date-picker>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch9">查询</el-button>
           </el-form-item>
-          <el-button type="primary" icon="el-icon-download" @click="downloadDiffOrder" v-per="'diffOrderDownload'">导出</el-button>
+          <el-button type="primary" icon="el-icon-download" @click="downloadDiffOrder"
+            v-per="'diffOrderDownload'">导出</el-button>
         </el-form>
 
         <!-- 列表数据 -->
@@ -440,8 +470,8 @@
           <el-table-column prop="difName" label="补差名称"></el-table-column>
           <el-table-column prop="payAmount" label="支付金额"></el-table-column>
           <el-table-column prop="payId" label="支付id"></el-table-column>
-          <el-table-column prop="payTime" label="支付时间" :formatter="dateFormatA" ></el-table-column>
-          <el-table-column prop="createTime" label="创建时间" :formatter="dateFormatA" ></el-table-column>
+          <el-table-column prop="payTime" label="支付时间" :formatter="dateFormatA"></el-table-column>
+          <el-table-column prop="createTime" label="创建时间" :formatter="dateFormatA"></el-table-column>
 
         </el-table>
 
@@ -464,8 +494,8 @@ export default {
   components: { Pagination },
   data() {
     return {
-      channelList:[],
-       exportSaleUrl2:
+      channelList: [],
+      exportSaleUrl2:
         url.exportUrl +
         "/reportservice/salesdata/selectChannelSales?token=" +
         window.localStorage.getItem("token"),
@@ -477,21 +507,21 @@ export default {
         url.exportUrl +
         "/reportservice/salesdata/serviceGMVCountExport?token=" +
         window.localStorage.getItem("token"),
-        exportSaleUrl5:
+      exportSaleUrl5:
         url.exportUrl +
         "/reportservice/salesdata/monthSalesPlan?token=" +
         window.localStorage.getItem("token"),
-          exportSaleUrl7:
+      exportSaleUrl7:
         url.exportUrl +
         "/reportservice/salesdata/cityProgress?token=" +
         window.localStorage.getItem("token"),
-          exportDiffOrderUrl:
+      exportDiffOrderUrl:
         url.exportUrl +
         "/reportservice/salesdata/diffOrderReport?token=" +
         window.localStorage.getItem("token"),
       activeTab: "0",
       cityList: [],
-      cityList2:[],
+      cityList2: [],
       channelList: [],
       listData1: [],
       total1: 0,
@@ -513,8 +543,8 @@ export default {
         category: "",
         type: "",
         city: [],
-        channel:'',
-        levelOne:'',
+        channel: '',
+        levelOne: '',
         createTime: [],
       },
       listData3: [],
@@ -563,11 +593,11 @@ export default {
       listQuery8: {
         city: [],
         levelOne: "",
-        channel:[],
+        channel: [],
         keyWord: [],
         createTime: [],
       },
-       listData9: [],
+      listData9: [],
       total9: 0,
       pageSize9: 50,
       currentPage9: 1, //当前页
@@ -581,6 +611,7 @@ export default {
       listQuery10: {
         buyerPhone: '',
       },
+      timeArray10: [],
       tableHead: [],
 
       pickerOptions: {
@@ -651,12 +682,12 @@ export default {
   },
   methods: {
     getUserAuthData() {
-      userAuthDataApi.$ajaxGetUserAuthData().then(res => { 
+      userAuthDataApi.$ajaxGetUserAuthData().then(res => {
         if (res.data.errno == 0) {
-          this.cityList2=[];
-           res.data.data.city.forEach(item=>{
-            this.cityList2.push(item.cityName.replace("市",""));
-           }); 
+          this.cityList2 = [];
+          res.data.data.city.forEach(item => {
+            this.cityList2.push(item.cityName.replace("市", ""));
+          });
         }
       });
     },
@@ -687,9 +718,9 @@ export default {
         // console.log(res);
         if (res.data.errno == "0") {
           this.levelList = res.data.data;
-          this.listQuery8.levelOne=res.data.data[1].buz;
+          this.listQuery8.levelOne = res.data.data[1].buz;
           this.levelChange(this.listQuery8.levelOne);
-           this.getChannel();
+          this.getChannel();
           this.querySearch8();
 
         } else {
@@ -715,13 +746,13 @@ export default {
           //   res.data.data.userCityDataList[0].dataName.split(",");
           // this.listQuery8.city =
           //   res.data.data.userCityDataList[0].dataName.split(",");
-         
+
           // this.querySearch1();
           // this.querySearch2();
           // this.querySearch3();
           // this.querySearch4();
           // this.querySearch5();
-          
+
           // this.allStationList = res.data.data.storeStation;
         } else {
           this.$message.warning(res.data.errmsg);
@@ -750,23 +781,44 @@ export default {
       }
     },
     querySearch10(isExport) {
-      
+
+      if (this.timeArray10 == null || this.timeArray10.length == 0) {
+        this.$message.warning("请选择支付日期");
+        return;
+      }
+
+      if (isExport) {
+        let days = moment(this.timeArray10[1]).diff(moment(this.timeArray10[0]), "days");
+        if (days > 7) {
+          this.$message.warning("请调整支付日期范围,不能超过7天");
+          return;
+        } 
+      }
+
       let temp = {
+        isExport: isExport,
         pageNo: this.currentPage10,
-        pageSize: this.pageSize10, 
-        buyerPhone: this.listQuery10.buyerPhone, 
-        isExport:false
+        pageSize: this.pageSize10,
+        buyerPhone: this.listQuery10.buyerPhone,
+        isExport: false,
+        startTime: this.timeArray10.length > 0 ? this.timeArray10[0] : '',
+        endTime: this.timeArray10.length > 0 ? this.timeArray10[1] : ''
       };
-      
-      Service.$axiosGetHmSalesOrder(temp)
-        .then((res) => {
-          // console.log(res);
-          this.listData10 = res.data.data.list;
-          this.total10 = res.data.data.total;
-        })
-        .catch((err) => {
-          console.log(err);
-        }); 
+
+      if (isExport) {
+        Service.$axiosGetHmSalesOrderExport(temp);
+      }
+      else {
+        Service.$axiosGetHmSalesOrder(temp)
+          .then((res) => {
+            // console.log(res);
+            this.listData10 = res.data.data.list;
+            this.total10 = res.data.data.total;
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      }
     },
     querySearch1(isExport) {
       if (this.isEmptyObjVue(this.listQuery1.createTime)) {
@@ -781,21 +833,21 @@ export default {
         levelOne: this.listQuery1.levelOne,
         startDate: this.listQuery1.createTime[0],
         endDate: this.listQuery1.createTime[1],
-        isExport:isExport
+        isExport: isExport
       };
-      if(isExport){
+      if (isExport) {
         Service.$axiosSelectLittleAppOrderExport(temp);
       }
       else {
-      Service.$axiosSelectLittleAppOrder(temp)
-        .then((res) => {
-          // console.log(res);
-          this.listData1 = res.data.data.dataList;
-          this.total1 = res.data.data.total;
-        })
-        .catch((err) => {
-          console.log(err);
-        });
+        Service.$axiosSelectLittleAppOrder(temp)
+          .then((res) => {
+            // console.log(res);
+            this.listData1 = res.data.data.dataList;
+            this.total1 = res.data.data.total;
+          })
+          .catch((err) => {
+            console.log(err);
+          });
       }
     },
     querySearch2() {
@@ -828,7 +880,7 @@ export default {
         this.$message.warning("请选择日期");
         return false;
       }
-      if(this.listQuery3.city==null||this.listQuery3.city==""||this.listQuery4.length==0){
+      if (this.listQuery3.city == null || this.listQuery3.city == "" || this.listQuery4.length == 0) {
         this.$message.warning("请选择城市");
         return false;
       }
@@ -858,7 +910,7 @@ export default {
         this.$message.warning("请选择日期");
         return false;
       }
-      if(this.listQuery4.city==null||this.listQuery4.city==""||this.listQuery4.length==0){
+      if (this.listQuery4.city == null || this.listQuery4.city == "" || this.listQuery4.length == 0) {
         this.$message.warning("请选择城市");
         return false;
       }
@@ -869,7 +921,7 @@ export default {
         levelOne: this.listQuery4.levelOne,
         startDate: this.listQuery4.createTime[0],
         endDate: this.listQuery4.createTime[1],
-        status:this.listQuery4.status?this.listQuery4.status.join(","):null,
+        status: this.listQuery4.status ? this.listQuery4.status.join(",") : null,
         channel: this.listQuery4.channel
       };
 
@@ -1030,18 +1082,16 @@ export default {
         .catch((err) => {
           console.log(err);
         });
-    }, 
-     downloadSale2() {
-      
+    },
+    downloadSale2() {
+
       if (this.isEmptyObjVue(this.listQuery2.createTime)) {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&city=${this.listQuery2.city.join(",")}&channel=${
-        this.listQuery2.channel
-      }&levelOne=${this.listQuery2.levelOne}&startDate=${
-        this.listQuery2.createTime[0]
-      }&endDate=${this.listQuery2.createTime[1]}&isExport=${true}`;
+      let params = `&city=${this.listQuery2.city.join(",")}&channel=${this.listQuery2.channel
+        }&levelOne=${this.listQuery2.levelOne}&startDate=${this.listQuery2.createTime[0]
+        }&endDate=${this.listQuery2.createTime[1]}&isExport=${true}`;
       window.open(this.exportSaleUrl2 + params);
     },
     downloadSale3() {
@@ -1053,11 +1103,9 @@ export default {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&city=${this.listQuery3.city.join(",")}&channel=${
-        this.listQuery3.channel
-      }&levelOne=${this.listQuery3.levelOne}&startDate=${
-        this.listQuery3.createTime[0]
-      }&endDate=${this.listQuery3.createTime[1]}`;
+      let params = `&city=${this.listQuery3.city.join(",")}&channel=${this.listQuery3.channel
+        }&levelOne=${this.listQuery3.levelOne}&startDate=${this.listQuery3.createTime[0]
+        }&endDate=${this.listQuery3.createTime[1]}`;
       window.open(this.exportSaleUrl3 + params);
     },
     downloadService() {
@@ -1069,31 +1117,27 @@ export default {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&channel=${this.listQuery4.channel}&status=${this.listQuery4.status}&city=${this.listQuery4.city.join(",")}&levelOne=${
-        this.listQuery4.levelOne
-      }&startDate=${this.listQuery4.createTime[0]}&endDate=${
-        this.listQuery4.createTime[1]
-      }`;
+      let params = `&channel=${this.listQuery4.channel}&status=${this.listQuery4.status}&city=${this.listQuery4.city.join(",")}&levelOne=${this.listQuery4.levelOne
+        }&startDate=${this.listQuery4.createTime[0]}&endDate=${this.listQuery4.createTime[1]
+        }`;
       window.open(this.exportServiceUrl + params);
     },
     downloadSale5() {
-      
+
       if (this.isEmptyObjVue(this.listQuery5.createTime)) {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&city=${this.listQuery5.city.join(",")}&levelOne=${this.listQuery5.levelOne}&startDate=${
-        this.listQuery5.createTime}&isExport=${true}`;
+      let params = `&city=${this.listQuery5.city.join(",")}&levelOne=${this.listQuery5.levelOne}&startDate=${this.listQuery5.createTime}&isExport=${true}`;
       window.open(this.exportSaleUrl5 + params);
     },
     downloadSale7() {
-      
+
       if (this.isEmptyObjVue(this.listQuery7.createTime)) {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&date=${
-        this.listQuery7.createTime}&isExport=${true}`;
+      let params = `&date=${this.listQuery7.createTime}&isExport=${true}`;
       window.open(this.exportSaleUrl7 + params);
     },
     levelChange(value) {
@@ -1168,19 +1212,19 @@ export default {
         myChart.resize();
       });
     },
-   tabChange(){
-     if(this.activeTab==9){
-       if(this.listData9.length==0){
+    tabChange() {
+      if (this.activeTab == 9) {
+        if (this.listData9.length == 0) {
           this.querySearch9();
-       }
-     }
-   },
-     querySearch9() {
+        }
+      }
+    },
+    querySearch9() {
       if (this.isEmptyObjVue(this.listQuery9.createTime)) {
         this.$message.warning("请选择日期");
         return false;
       }
-     
+
       let temp = {
         pageNo: this.currentPage9,
         pageSize: this.pageSize9,
@@ -1198,15 +1242,14 @@ export default {
           console.log(err);
         });
     },
-      downloadDiffOrder() {
-     
+    downloadDiffOrder() {
+
       if (this.isEmptyObjVue(this.listQuery9.createTime)) {
         this.$message.warning("日期不能为空,请选择日期");
         return false;
       }
-      let params = `&startDate=${this.listQuery9.createTime[0]}&endDate=${
-        this.listQuery9.createTime[1]
-      }&isExport=${true}`;
+      let params = `&startDate=${this.listQuery9.createTime[0]}&endDate=${this.listQuery9.createTime[1]
+        }&isExport=${true}`;
       window.open(this.exportDiffOrderUrl + params);
     },
 
@@ -1219,17 +1262,20 @@ export default {
 .crumbs {
   margin: 0 0 10px 0;
 }
+
 #mainChart1 {
   height: 800px;
   width: 900px;
   margin: 0 auto;
   padding: 40px;
 }
+
 #mainChart2 {
   height: 1000px;
   width: 1200px;
   margin: 0 auto;
   padding: 10px;
 }
+
 /* $axiosDiffOrderReport  getUrlParam*/
 </style>

+ 128 - 88
src/components/serviceRebuy.vue

@@ -10,11 +10,12 @@
       <el-tab-pane label="服务单次卡后T+30复购汇总">
         <el-form :inline="true" size="small" v-model="listQuery1">
           <el-form-item label="服务日期">
-            <el-date-picker v-model="timeArray1" type="daterange"  value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+            <el-date-picker v-model="timeArray1" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
+              style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
           </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery1.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item>
@@ -23,7 +24,7 @@
           </el-form-item>
 
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;"> 服务单次保洁后T+30天(0-30),客服复购周期卡(2、4、24、48)情况</div>
@@ -37,28 +38,31 @@
           <el-table-column prop="total" label="服务工单数"></el-table-column>
           <el-table-column prop="t7" label="T+7复购周期订单数"></el-table-column>
         </el-table>
-        <pagination :total="listQuery1.total" :page.sync="listQuery1.pageIndex" :limit.sync="listQuery1.pageSize" @pagination="querySearch1(false)" />
+        <pagination :total="listQuery1.total" :page.sync="listQuery1.pageIndex" :limit.sync="listQuery1.pageSize"
+          @pagination="querySearch1(false)" />
       </el-tab-pane>
 
       <el-tab-pane label="服务单次卡后T+30复购明细">
         <el-form :inline="true" size="small" v-model="listQuery2">
           <el-form-item label="服务日期">
-              <el-date-picker v-model="timeArray2" type="daterange"  value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+            <el-date-picker v-model="timeArray2" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
+              style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
           </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery2.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="客户手机号">
-              <el-input v-model="listQuery2.mobile" type="number" style="width:150px"  placeholder="请输入下单手机号"  maxlength="11"></el-input>
+            <el-input v-model="listQuery2.mobile" type="number" style="width:150px" placeholder="请输入下单手机号"
+              maxlength="11"></el-input>
           </el-form-item>
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch2(false)">查询</el-button>
             <el-button type="primary" icon="el-icon-download" @click="querySearch2(true)">导出</el-button>
           </el-form-item>
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;"> 服务单次保洁后T+30天(0-30),客服复购周期卡(2、4、24、48)情况</div>
@@ -78,29 +82,32 @@
           <el-table-column prop="goodsName" label="复购商品"></el-table-column>
           <el-table-column prop="payFee" label="实付金额"></el-table-column>
         </el-table>
-        <pagination :total="listQuery2.total" :page.sync="listQuery2.pageIndex" :limit.sync="listQuery2.pageSize" @pagination="querySearch2(false)" />
+        <pagination :total="listQuery2.total" :page.sync="listQuery2.pageIndex" :limit.sync="listQuery2.pageSize"
+          @pagination="querySearch2(false)" />
       </el-tab-pane>
 
       <el-tab-pane label="服务品类后T+30复购明细">
         <el-form :inline="true" size="small" v-model="listQuery3">
           <el-form-item label="服务日期">
-               <el-date-picker v-model="timeArray3" type="daterange"  value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+            <el-date-picker v-model="timeArray3" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
+              style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
           </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery3.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
-            <el-form-item label="客户手机号">
-              <el-input v-model="listQuery3.mobile" type="number" style="width:150px"  placeholder="请输入下单手机号"  maxlength="11"></el-input>
+          <el-form-item label="客户手机号">
+            <el-input v-model="listQuery3.mobile" type="number" style="width:150px" placeholder="请输入下单手机号"
+              maxlength="11"></el-input>
           </el-form-item>
-         
+
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch3(false)">查询</el-button>
             <el-button type="primary" icon="el-icon-download" @click="querySearch3(true)">导出</el-button>
           </el-form-item>
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;"> 服务品类后T+30天(0-30),客服复购全品类的情况</div>
@@ -117,28 +124,31 @@
           <el-table-column prop="payTime" label="复购时间"></el-table-column>
           <el-table-column prop="goodsName" label="复购商品"></el-table-column>
         </el-table>
-        <pagination :total="listQuery3.total" :page.sync="listQuery3.pageIndex" :limit.sync="listQuery3.pageSize" @pagination="querySearch3(false)" />
+        <pagination :total="listQuery3.total" :page.sync="listQuery3.pageIndex" :limit.sync="listQuery3.pageSize"
+          @pagination="querySearch3(false)" />
       </el-tab-pane>
       <el-tab-pane label="周期老客T+30续约明细">
         <el-form :inline="true" size="small" v-model="listQuery4">
           <el-form-item label="服务日期">
-               <el-date-picker v-model="timeArray4" type="daterange"  value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
-         </el-form-item>
+            <el-date-picker v-model="timeArray4" type="daterange" start-placeholder="服务开始日期" end-placeholder="服务结束日期"
+              style="width:240px" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+          </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery4.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
-            <el-form-item label="客户手机号">
-              <el-input v-model="listQuery4.mobile" type="number" style="width:150px"  placeholder="请输入下单手机号"  maxlength="11"></el-input>
+          <el-form-item label="客户手机号">
+            <el-input v-model="listQuery4.mobile" type="number" style="width:150px" placeholder="请输入下单手机号"
+              maxlength="11"></el-input>
           </el-form-item>
-         
+
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch4(false)">查询</el-button>
             <el-button type="primary" icon="el-icon-download" @click="querySearch4(true)">导出</el-button>
           </el-form-item>
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;">老客续约率:周期卡内最后一次服务完成后30天内(0-30),有未使用的、未预约的、履约中的周期订单</div>
@@ -160,27 +170,30 @@
           <el-table-column prop="beforeRebuyPayFee" label="T+0之前的复购商品实付"></el-table-column>
           <el-table-column prop="isRefund" label="是否已退款"></el-table-column>
         </el-table>
-        <pagination :total="listQuery4.total" :page.sync="listQuery4.pageIndex" :limit.sync="listQuery4.pageSize" @pagination="querySearch4(false)" />
+        <pagination :total="listQuery4.total" :page.sync="listQuery4.pageIndex" :limit.sync="listQuery4.pageSize"
+          @pagination="querySearch4(false)" />
       </el-tab-pane>
       <el-tab-pane label="散单服务工单明细">
         <el-form :inline="true" size="small" v-model="listQuery5">
           <el-form-item label="服务时间">
-            <el-date-picker v-model="listQuery5.startTime" type="date" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+            <el-date-picker v-model="listQuery5.startTime" type="date" value-format="yyyy-MM-dd"
+              :picker-options="{}"></el-date-picker>
           </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery5.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
-            <el-form-item label="客户手机号">
-              <el-input v-model="listQuery5.mobile" type="number" style="width:150px"  placeholder="请输入下单手机号"  maxlength="11"></el-input>
+          <el-form-item label="客户手机号">
+            <el-input v-model="listQuery5.mobile" type="number" style="width:150px" placeholder="请输入下单手机号"
+              maxlength="11"></el-input>
           </el-form-item>
-         
+
 
           <el-form-item label="分类">
             <el-select v-model="listQuery5.type" clearable placeholder="请选择分类">
-              <el-option  label="保洁"  value="保洁"></el-option>
-              <el-option  label="品类"  value="品类"></el-option>
+              <el-option label="保洁" value="保洁"></el-option>
+              <el-option label="品类" value="品类"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item>
@@ -188,7 +201,7 @@
             <el-button type="primary" icon="el-icon-download" @click="querySearch5(true)">导出</el-button>
           </el-form-item>
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;">散单服务工单明细,老客+首次服务=客户买了多个订单,但是第一次要求服务</div>
@@ -207,29 +220,32 @@
           <el-table-column prop="isRight" label="是否权益单"></el-table-column>
           <el-table-column prop="userRemark" label="权益单备注"></el-table-column>
         </el-table>
-        <pagination :total="listQuery5.total" :page.sync="listQuery5.pageIndex" :limit.sync="listQuery5.pageSize" @pagination="querySearch5(false)" />
+        <pagination :total="listQuery5.total" :page.sync="listQuery5.pageIndex" :limit.sync="listQuery5.pageSize"
+          @pagination="querySearch5(false)" />
       </el-tab-pane>
-      
+
       <el-tab-pane label="周期单服务明细">
         <el-form :inline="true" size="small" v-model="listQuery6">
           <el-form-item label="服务时间">
-            <el-date-picker v-model="listQuery6.startTime" type="date" value-format="yyyy-MM-dd" :picker-options="{}"></el-date-picker>
+            <el-date-picker v-model="listQuery6.startTime" type="date" value-format="yyyy-MM-dd"
+              :picker-options="{}"></el-date-picker>
           </el-form-item>
           <el-form-item label="城市">
             <el-select v-model="listQuery6.city" clearable placeholder="请选择城市" filterable multiple>
-              <el-option v-for="(item,index) in cityList" :key="index" :label="item" :value="item"></el-option>
+              <el-option v-for="(item, index) in cityList" :key="index" :label="item" :value="item"></el-option>
             </el-select>
           </el-form-item>
-         <el-form-item label="客户手机号">
-              <el-input v-model="listQuery6.mobile" type="number" style="width:150px"  placeholder="请输入下单手机号"  maxlength="11"></el-input>
+          <el-form-item label="客户手机号">
+            <el-input v-model="listQuery6.mobile" type="number" style="width:150px" placeholder="请输入下单手机号"
+              maxlength="11"></el-input>
           </el-form-item>
-         
+
           <el-form-item>
             <el-button icon="el-icon-search" type="primary" plan @click="querySearch6(false)">查询</el-button>
             <el-button type="primary" icon="el-icon-download" @click="querySearch6(true)">导出</el-button>
           </el-form-item>
           <el-form-item>
-            <span style="color:#09afff">数据更新时间:{{etlTime}}</span>
+            <span style="color:#09afff">数据更新时间:{{ etlTime }}</span>
           </el-form-item>
         </el-form>
         <div style="font-size: 9px;">当日服务的周期单及剩余情况</div>
@@ -245,11 +261,12 @@
           <el-table-column prop="servicedCount" label="已服务次数"></el-table-column>
           <el-table-column prop="times" label="此单第几次服务"></el-table-column>
           <el-table-column prop="cusType" label="客户类型"></el-table-column>
-          <el-table-column prop="total" label="客户总剩余服务次数"></el-table-column> 
+          <el-table-column prop="total" label="客户总剩余服务次数"></el-table-column>
           <el-table-column prop="bookTime" label="服务时间"></el-table-column>
-          <el-table-column prop="bookTradeNo" label="服务单号"></el-table-column> 
+          <el-table-column prop="bookTradeNo" label="服务单号"></el-table-column>
         </el-table>
-        <pagination :total="listQuery6.total" :page.sync="listQuery6.pageIndex" :limit.sync="listQuery6.pageSize" @pagination="querySearch6(false)" />
+        <pagination :total="listQuery6.total" :page.sync="listQuery6.pageIndex" :limit.sync="listQuery6.pageSize"
+          @pagination="querySearch6(false)" />
       </el-tab-pane>
     </el-tabs>
 
@@ -268,47 +285,47 @@ export default {
   components: { Pagination },
   data() {
     return {
-      etlTime:'',
+      etlTime: '',
       cityList: [],
-      timeArray1:[],
+      timeArray1: [],
       listData1: [],
       listQuery1: {
         total: 0,
         currentPage: 1,
         pageSize: 50,
-        month: moment().format("YYYY-MM"),
+        //month: moment().format("YYYY-MM"),
         isExport: false,
       },
-      listData2: [],      
-      timeArray2:[],
+      listData2: [],
+      timeArray2: [],
       listQuery2: {
         total: 0,
         currentPage: 1,
         pageSize: 50,
-        month: moment().format("YYYY-MM"),
+        //month: moment().format("YYYY-MM"),
         isExport: false,
       },
-      listData3: [],      
-      timeArray3:[],
+      listData3: [],
+      timeArray3: [],
       listQuery3: {
         total: 0,
         currentPage: 1,
         pageSize: 50,
-        month: moment().format("YYYY-MM"),
+        //month: moment().format("YYYY-MM"),
         isExport: false,
       },
-      listData4: [],      
-      timeArray4:[],
+      listData4: [],
+      timeArray4: [],
       listQuery4: {
         total: 0,
         currentPage: 1,
         pageSize: 50,
-        month: moment().format("YYYY-MM"),
+        //month: moment().format("YYYY-MM"),
         isExport: false,
       },
       listData5: [],
       listQuery5: {
-        type:'保洁',
+        type: '保洁',
         total: 0,
         currentPage: 1,
         pageSize: 50,
@@ -316,7 +333,7 @@ export default {
         isExport: false,
       },
       listData6: [],
-      listQuery6: { 
+      listQuery6: {
         total: 0,
         currentPage: 1,
         pageSize: 50,
@@ -330,21 +347,27 @@ export default {
     this.getEtlTime();
   },
   methods: {
-    getEtlTime(){
-      Service.$axiosGetServicerReportEtlTime().then(res=>{
-        this.etlTime=res.data.data;
+    getEtlTime() {
+      Service.$axiosGetServicerReportEtlTime().then(res => {
+        this.etlTime = res.data.data;
       })
     },
     querySearch1(value) {
-      if (this.timeArray1 == null || this.timeArray1.length==0) {
+      if (this.timeArray1 == null || this.timeArray1.length == 0) {
         this.$message.warning("请选择服务日期");
         return;
       }
-      this.listQuery1.startTime=this.timeArray1[0];
-      this.listQuery1.endTime=this.timeArray1[1];
+      let days = moment(this.timeArray1[1]).diff(moment(this.timeArray1[0]), "days");
+      if (days > 31) {
+        this.$message.warning("请调整服务日期范围,不能超过31天");
+        return;
+      }
+
+      this.listQuery1.startTime = this.timeArray1[0];
+      this.listQuery1.endTime = this.timeArray1[1];
       this.listQuery1.isExport = value;
-      let params=JSON.parse(JSON.stringify(this.listQuery1));
-      params.city=params.city.join(",");
+      let params = JSON.parse(JSON.stringify(this.listQuery1));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetServicerRebuyExport(params);
@@ -361,16 +384,22 @@ export default {
       }
     },
     querySearch2(value) {
-      if (this.timeArray2 == null || this.timeArray2.length==0) {
+      if (this.timeArray2 == null || this.timeArray2.length == 0) {
         this.$message.warning("请选择服务日期");
         return;
       }
-      this.listQuery2.startTime=this.timeArray2[0];
-      this.listQuery2.endTime=this.timeArray2[1];
+      let days = moment(this.timeArray2[1]).diff(moment(this.timeArray2[0]), "days");
+      if (days > 31) {
+        this.$message.warning("请调整服务日期范围,不能超过31天");
+        return;
+      }
+
+      this.listQuery2.startTime = this.timeArray2[0];
+      this.listQuery2.endTime = this.timeArray2[1];
       this.listQuery2.isExport = value;
-      
-      let params=JSON.parse(JSON.stringify(this.listQuery2));
-      params.city=params.city.join(",");
+
+      let params = JSON.parse(JSON.stringify(this.listQuery2));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetServicerRebuyDetailExport(params);
@@ -387,16 +416,21 @@ export default {
       }
     },
     querySearch3(value) {
-      if (this.timeArray3 == null || this.timeArray3.length==0) {
+      if (this.timeArray3 == null || this.timeArray3.length == 0) {
         this.$message.warning("请选择服务日期");
         return;
       }
-      this.listQuery3.startTime=this.timeArray3[0];
-      this.listQuery3.endTime=this.timeArray3[1];
-     
+      let days = moment(this.timeArray3[1]).diff(moment(this.timeArray3[0]), "days");
+      if (days > 31) {
+        this.$message.warning("请调整服务日期范围,不能超过31天");
+        return;
+      }
+      this.listQuery3.startTime = this.timeArray3[0];
+      this.listQuery3.endTime = this.timeArray3[1];
+
       this.listQuery3.isExport = value;
-      let params=JSON.parse(JSON.stringify(this.listQuery3));
-      params.city=params.city.join(",");
+      let params = JSON.parse(JSON.stringify(this.listQuery3));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetServicerRebuyPLDetailExport(params);
@@ -413,17 +447,23 @@ export default {
       }
     },
     querySearch4(value) {
-       if (this.timeArray4 == null || this.timeArray4.length==0) {
+      if (this.timeArray4 == null || this.timeArray4.length == 0) {
         this.$message.warning("请选择服务日期");
         return;
       }
-      this.listQuery4.startTime=this.timeArray4[0];
-      this.listQuery4.endTime=this.timeArray4[1];
-     
+      let days = moment(this.timeArray4[1]).diff(moment(this.timeArray4[0]), "days");
+      if (days > 31) {
+        this.$message.warning("请调整服务日期范围,不能超过31天");
+        return;
+      }
+
+      this.listQuery4.startTime = this.timeArray4[0];
+      this.listQuery4.endTime = this.timeArray4[1];
+
 
       this.listQuery4.isExport = value;
-      let params=JSON.parse(JSON.stringify(this.listQuery4));
-      params.city=params.city.join(",");
+      let params = JSON.parse(JSON.stringify(this.listQuery4));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetOldCustomerRebuyDetailListExport(params);
@@ -456,8 +496,8 @@ export default {
         return;
       }
       this.listQuery5.isExport = value;
-      let params=JSON.parse(JSON.stringify(this.listQuery5));
-      params.city=params.city.join(",");
+      let params = JSON.parse(JSON.stringify(this.listQuery5));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetNewCustomerTradeDetailListExport(params);
@@ -481,10 +521,10 @@ export default {
         this.$message.warning("请选择服务日期");
         return;
       }
- 
+
       this.listQuery6.isExport = value;
-      let params=JSON.parse(JSON.stringify(this.listQuery6));
-      params.city=params.city.join(",");
+      let params = JSON.parse(JSON.stringify(this.listQuery6));
+      params.city = params.city.join(",");
 
       if (value) {
         Service.$axiosGetCycleTradeDetailListExport(params);

+ 9 - 4
src/script/api/service.js

@@ -725,13 +725,13 @@ const $axiosGetServiceGmvTotal = params => axios.get(url + '/reportservice/servi
 const $axiosGetServiceGmvLineData = params => axios.get(url + '/reportservice/serviceGmv/lineBookData', { params })//获取服务gmv日服务订单走势图 
 
 //私域-核销预约表-核销预约明细报表
-const $axiosBookVerifyList = params => axios.post(url + '/reportservice/reservation/getBookVerifyDetailList',  params )
+const $axiosBookVerifyList = params => axios.post(url + '/reportservice/reservation/getBookVerifyDetailList', params)
 const $axiosBookVerifyExport = params => axios.post(url + '/reportservice/reservation/getBookVerifyDetailList', params, {
   responseType: 'blob'
 }).then(res => $handleToExcel(res));
 
 //私域-核销预约表-预约汇总by fra
-const $axiosBookTotalListByFra = params => axios.post(url + '/reportservice/reservation/getBookTotalListByFra',  params )
+const $axiosBookTotalListByFra = params => axios.post(url + '/reportservice/reservation/getBookTotalListByFra', params)
 const $axiosBookTotalListByFraExport = params => axios.post(url + '/reportservice/reservation/getBookTotalListByFra', params, {
   responseType: 'blob'
 }).then(res => $handleToExcel(res));
@@ -739,6 +739,10 @@ const $axiosBookTotalListByFraExport = params => axios.post(url + '/reportservic
 
 //销售明细--盒马销售明细表 
 const $axiosGetHmSalesOrder = params => axios.get(url + '/reportservice/salesdata/hmSalesOrder', { params })
+const $axiosGetHmSalesOrderExport = params => axios.get(url + '/reportservice/salesdata/hmSalesOrder', { params }, {
+  responseType: 'blob'
+}).then(res => $handleToExcel(res));
+
 
 
 export default {
@@ -996,11 +1000,12 @@ export default {
   $axiosGetAppPageLog,
   $axiosGetAppPageLogExport,
 
-  $axiosGetServiceGmvTotal, 
+  $axiosGetServiceGmvTotal,
   $axiosGetServiceGmvLineData,
   $axiosBookVerifyList,
   $axiosBookVerifyExport,
   $axiosBookTotalListByFra,
   $axiosBookTotalListByFraExport,
-  $axiosGetHmSalesOrder
+  $axiosGetHmSalesOrder,
+  $axiosGetHmSalesOrderExport
 }