zhangdan 4 years ago
parent
commit
cf679be8f8

+ 1 - 1
src/api/customerBundle.js

@@ -16,7 +16,7 @@ export const customerBundleDetail = (params) => {
   return axios.request({
     url: `customerBundle/detail/${params.id}`,
     method: 'get'
-  }).then(res => res)
+  })
 }
 
 // 已购套餐   使用记录

+ 7 - 0
src/views/FinancialManagement/PaySettlementRecords.vue

@@ -118,6 +118,13 @@ export default {
         width: '150px',
         align: 'center'
       },
+	{
+	  title: '销售合作商',
+	  dataIndex: 'salesChannelName',
+	  width: '150px',
+	  align: 'center'
+	},
+			
       {
         title: '结算时间',
         dataIndex: 'settleDate',

+ 95 - 69
src/views/Service/PurchasedServiceDetail.vue

@@ -6,9 +6,9 @@
         <detail-list-item term="订单来源">{{ dataSourceName ? dataSourceName : '--' }}</detail-list-item>
         <detail-list-item term="下单时间">{{ orderBundle.orderDate ? orderBundle.orderDate : '--' }}</detail-list-item>
         <detail-list-item term="订单状态">{{ palyStatus ? palyStatus :'--' }}</detail-list-item>
-        <detail-list-item term="订单来源">{{ palyStatus ? palyStatus :'--' }}</detail-list-item>
+        <!-- <detail-list-item term="订单来源">{{ palyStatus ? palyStatus :'--' }}</detail-list-item> -->
         <detail-list-item term="客户信息">{{ custInfo ? custInfo : '--' }}</detail-list-item>
-        <detail-list-item term="套餐名称">{{ orderBundle.bundleName ? orderBundle.bundleName : '--' }}</detail-list-item>
+        <!-- <detail-list-item term="套餐名称">{{ orderBundle.bundleName ? orderBundle.bundleName : '--' }}</detail-list-item> -->
         <detail-list-item term="应付金额">{{ orderBundle.totalAmount ? orderBundle.totalAmount :'--' }}</detail-list-item>
 
         <detail-list-item term="支付时间" v-if="isPay">{{ payDate ? payDate : '--' }}</detail-list-item>
@@ -37,12 +37,14 @@
         </span>
         <span slot="hexiao" slot-scope="text, record, index">
           <template>
-            <a-button :disabled="record.remainTimes<=0" type="primary" v-hasPermission="'B_customerBundle_hexiao'" @click="hexiao(record)">延期</a-button>
-            <span v-if="!$hasPermissions('B_customerBundle_hexiao')" style="text-align: center;font-size: 20px;">--</span>
+            <!-- <a-button :disabled="!record.expiryDate" type="primary"  @click="hexiao(record)">延期</a-button> -->
+			<a-button  type="primary"  @click="hexiao(record)">延期</a-button>
+            <!-- <span v-if="!$hasPermissions('B_customerBundle_hexiao')" style="text-align: center;font-size: 20px;">--</span> -->
           </template>
         </span>
       </a-table>
     </a-card>
+	<!-- 使用记录 -->
     <a-card class="detail-card" :bordered="false" title="使用记录">
 		<!-- <a-card class="detail-card" :bordered="false" title="使用记录" v-if="isPay"> -->
       <a-table :columns="usedColumns" rowKey="id" :dataSource="verificationList" bordered v-if="verificationList && verificationList.length > 0" :pagination="false">
@@ -67,58 +69,57 @@
         {{ orderBundle.expiryDate }}  点前未支付, 系统将自动取消订单
       </div>
     </a-card> -->
-	<a-card class="detail-card" :bordered="false" style="text-align: center;">
-		<a-button  type="primary" @click="canselBuy">取消购买</a-button>
+	<a-card class="detail-card" :bordered="false" style="text-align: center;" >
+		<a-button :disabled="verificationList && verificationList.length > 0" type="primary" @click="canselBuy">取消购买</a-button>
 	</a-card>
-	<!-- 取消购买弹窗 -->
-	<a-modal title="取消购买" v-model="buyModal" @cancel="canselBuy" :bodyStyle="{textAlign:'center'}" :centered='true' :footer="null">
-		<p>取消购买后,服务的剩余次数变为0,用户无法再使用服务</p>
-		<p>确认取消购买吗?</p>
-		<div class="button-row">
-		  <a-button key="back" @click="canselHx">
-		    取消
-		  </a-button>
-		  <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
-		    确定
-		  </a-button>
-		</div>
-	</a-modal>
 	<!-- 延期弹窗 -->
-    <a-modal title="服务延期" :footer="null" v-model="hexiaoModal" @cancel="canselHx" @ok="handleHexiaoOk">
+    <a-modal title="服务延期" :footer="null" v-model="yanqiModal" @cancel="canselYq" @ok="handleYanqiOk" width="50%" :centered='true'>
       <!-- <StoreSearch ref="storeSearch" @storeChange="storeChange" placeholder="搜索并选择核销门店"></StoreSearch> -->
-	  <a-form :form="form" @submit="handleSubmit">
-	    <a-row :gutter="24">
-	      <a-col :span="12">
+	  <a-form :form="form">
+	      <a-col :span="24">
 	        <!-- 用户名称 -->
 	        <a-form-item label="服务名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
 	          <span>{{}}</span>
 	        </a-form-item>
 	      </a-col>
-	      <a-col :span="12">
+	      <a-col :span="24">
 	        <!-- 手机号码 -->
 	        <a-form-item label="到期时间" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
 	          <span>{{}}</span>
 	        </a-form-item>
 	      </a-col>
-	    </a-row>
-	    <a-row :gutter="24">
-			<a-col :span="12">
+			<a-col :span="24">
 			  <!-- 手机号码 -->
 			  <a-form-item label="过期次数" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
 			    <span>{{}}</span>
 			  </a-form-item>
 			</a-col>
+			<a-col :span="24">
+				<a-form-item label="新到期时间" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+				  <a-date-picker style="width: 60%;"
+				        format="YYYY-MM-DD"
+				        :disabled-date="disabledDate"
+						v-decorator="[
+						  'formData.loginFlag',
+						  {
+						    initialValue: formData.loginFlag,
+						    rules: [{ required: true, message: '请选择新的到期时间!' }] },
+						]"
+				      />
+				</a-form-item>
+			</a-col>
 	      <!-- 状态 -->
-	      <a-col :span="12">
+	      <a-col :span="24">
 	        <a-form-item label="是否返回已过期服务" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
 	          <a-radio-group
 	            id="user-add-loginFlag"
 	            name="radioGroup"
+				@change="changeStatus"
 	            v-decorator="[
 	              'formData.loginFlag',
 	              {
 	                initialValue: formData.loginFlag,
-	                rules: [{ required: true, message: '请选择状态!' }] },
+	                rules: [] },
 	            ]"
 	          >
 	            <a-radio :value="1">是</a-radio>
@@ -127,28 +128,20 @@
 	  
 	        </a-form-item>
 	      </a-col>
-	    </a-row>
-	    <a-row :gutter="24">
-			<a-col :span="24">
-				<a-form-item label="新的到期时间" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
-				  <a-date-picker
-				        format="YYYY-MM-DD"
-				        :disabled-date="disabledDate"
-				      />
-				</a-form-item>
-			</a-col>
 	      <a-col :span="24">
-	        <a-form-item label="返还次数" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
-	          <a-input placeholder="请输入" />
+	        <a-form-item label="返还次数" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" v-if="showBackNum">
+	          <!-- <a-input placeholder="请输入" style="width: 60%;" /> -->
+			  <a-input-number id="inputNumber" :min="0" :max="999999" :precision="0"  placeholder="请输入返还次数(0~999999)" style="width: 60%;" v-decorator="['formData.validityTermValue',{
+			    initialValue: formData.validityTermValue,
+			    rules: []
+			  }]"/>
 	        </a-form-item>
 	      </a-col>
-	    </a-row>
-	    <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
 			<div class="button-row">
-			  <a-button key="back" @click="canselHx">
+			  <a-button key="back" @click="canselYq">
 			    取消
 			  </a-button>
-			  <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
+			  <a-button key="submit" type="primary" :loading="loading" @click="handleYanqiOk">
 			    确定
 			  </a-button>
 			</div>
@@ -161,6 +154,19 @@
 	    </a-form-item>
 	  </a-form>
     </a-modal>
+	<!-- 取消购买弹窗 -->
+	<a-modal title="取消购买" v-model="buyModal" @cancel="canselBuy" :bodyStyle="{textAlign:'center'}" :centered='true' :footer="null">
+		<p>取消购买后,服务的剩余次数变为0,用户无法再使用服务</p>
+		<p>确认取消购买吗?</p>
+		<div class="button-row">
+		  <a-button key="back" @click="canselHx">
+		    取消
+		  </a-button>
+		  <a-button key="submit" type="primary" :loading="loading" @click="handleHexiaoOk">
+		    确定
+		  </a-button>
+		</div>
+	</a-modal>
   </a-card>
 </template>
 
@@ -233,9 +239,12 @@ export default {
   },
   data () {
     return {
+	form: this.$form.createForm(this),
       loading: false,
+	  showBackNum:true,
       customerCoupon: {},
       palyStatusList: [],
+	  yanqiModal:false,
       hexiaoModal: false,
 	  buyModal:false,
       hxStoreId: '',
@@ -243,7 +252,7 @@ export default {
 	  dataSourceName: '',
       customer: null,
 	  formData:{
-		  loginFlag:'',
+		  loginFlag:1,
 	  },
       orderBundle: {
         // bundleId: 10000,
@@ -345,37 +354,40 @@ export default {
         },
         {
           title: '到期时间',
-          dataIndex: 'itemName',
+          dataIndex: 'expiryDate',
 		  width: 100,
-		  align:'center'
+		  align:'center',
+		  customRender: function (text) {
+		    return (text || '永久有效')
+		  }
         },
 		{
 		  title: '购买数量',
-		  dataIndex: '',
+		  dataIndex: 'times',
 		  width: 100,
 		  align:'center'
 		},
 		{
 		  title: '剩余次数',
-		  dataIndex: '',
+		  dataIndex: 'remainTimes',
 		  width: 100,
 		  align:'center'
 		},
         {
           title: '已用次数',
-          dataIndex: '',
+          dataIndex: 'usedTimes',
 		  width: 100,
 		  align:'center'
         },
 		{
 		  title: '过期次数',
-		  dataIndex: '',
+		  dataIndex: 'expiryTimes',
 		  width: 100,
 		  align:'center'
 		},
 		{
 		  title: '退款次数',
-		  dataIndex: '',
+		  dataIndex: 'refundTimes',
 		  width: 100,
 		  align:'center'
 		},
@@ -427,11 +439,12 @@ export default {
 
     }
   },
-  // created () {
-  //   this.initPage()
-  // },
+  created () {
+    this.initPage()
+  },
   beforeRouteEnter (to, from, next) {
     next(vm => {
+		console.log(vm.$route.params.id)
       // vm.clear()
       if (to.query.id) {
         vm.initPage()
@@ -441,10 +454,9 @@ export default {
   methods: {
 	  moment,
 	  // 不可选日期
-	  disabledDate(current) {
-	        // Can not select days before today and today
-	        return current && current < moment().endOf('day');
-	      },
+	 disabledDate(current){
+	 	return current && current < moment().subtract(1, "days");
+	 },
     initPage () {
       const _this = this
       getLookUpDataBy({
@@ -461,7 +473,7 @@ export default {
           const _data = res.data
           console.log(_data)
           _this.customer = _data.customer
-		      _this.dataSourceName = _data.dataSourceName
+		  _this.dataSourceName = _data.dataSourceName
           _this.orderBundle = _data.orderBundle
           if (_data.paymentDetailList && _data.paymentDetailList.length) {
             _this.paymentDetailList = _data.paymentDetailList[0]
@@ -475,24 +487,32 @@ export default {
         }
       })
     },
-    // 核销
+    // 延期
     hexiao (row) {
-      this.hexiaoModal = true
+      this.yanqiModal = true
       this.hxCustomerBundleItemId = row.id
     },
+	// 关闭延期弹窗
+	canselYq(){
+		this.yanqiModal = false
+		this.formData={
+		  loginFlag:1,
+	  }
+	},
     // 关闭
     canselHx () {
-      this.$refs.storeSearch.setVal(undefined)
+      // this.$refs.storeSearch.setVal(undefined)
       this.hexiaoModal = false
       this.loading = false
       this.hxStoreId = ''
       this.hxCustomerBundleItemId = ''
     },
-    handleHexiaoOk () {
-      if (this.hxStoreId == '') {
-        this.$message.warning('请选择门店')
-        return
-      }
+	// 确定
+    handleYanqiOk () {
+      // if (this.hxStoreId == '') {
+      //   this.$message.warning('请选择门店')
+      //   return
+      // }
       this.loading = true
       verificationHexiao({
         usedStoreId: this.hxStoreId,
@@ -506,6 +526,12 @@ export default {
         this.canselHx()
       })
     },
+	// 是否返还已过期服务 状态
+	changeStatus(e){
+		console.log(e.target.value)
+		this.showBackNum=e.target.value ==1
+	},
+	handleHexiaoOk(){},
     storeChange (data) {
       this.hxStoreId = data ? data.id : ''
     },

+ 179 - 68
src/views/Service/PurchasedServiceList.vue

@@ -9,21 +9,30 @@
             </a-form-item>
           </a-col>
           <a-col :lg="6" :sm="12">
-            <a-form-item label="下单时间" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+            <!-- <a-form-item label="下单时间" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-range-picker style="width:100%" :disabledDate="disabledDate" v-model="queryOrderDate" format="YYYY-MM-DD"
                               :placeholder="['开始时间', '结束时间']" id="SettlementRecordsList-queryOrderDate" />
-            </a-form-item>
+            </a-form-item> -->
+			<a-form-item label="下单时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
+			  <a-range-picker
+			    style="width:100%"
+			    id="releaseRecordList-queryOrderDate"
+			    :disabledDate="disabledDate"
+			    v-model="queryOrderDate"
+			    :format="dateFormat"
+			    :placeholder="['开始时间', '结束时间']" />
+			</a-form-item>
           </a-col>
           <a-col :lg="6" :sm="12">
             <a-form-item label="结算状态:" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <v-select ref="payStatus" code="PAY_STATUS" v-model="queryParam.orderFlag" allowClear></v-select>
+              <v-select ref="payStatus" code="SETTLE_STATUS_ALL" v-model="queryParam.orderFlag" allowClear></v-select>
             </a-form-item>
           </a-col>
           <a-col :lg="6" :sm="12">
             <a-form-item label="销售合作商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <!-- <salesSearch ref="salesSearch" @salesChange="salesChange" placeholder="订单来源"></salesSearch> -->
-              <a-select placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children"
-                        :filter-option="filterOption" @focus="handleFocus" @blur="handleBlur" @change="handleChange">
+              <a-select placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" mode="multiple" :showSearch="true" option-filter-prop="children"
+                        :filter-option="filterOption"  @change="handleChange">
                 <a-select-option v-for="item in optionData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
               </a-select>
             </a-form-item>
@@ -50,7 +59,7 @@
           <a-col :lg="6" :sm="12">
             <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-			<a-button style="margin-left: 8px" @click="handleExport">导出</a-button>
+			<a-button style="margin-left: 8px" class="export-btn" @click="handleExport">导出</a-button>
           </a-col>
         </a-row>
       </a-form>
@@ -75,6 +84,8 @@
 </template>
 <script>
 import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import { completeDate } from '@/libs/tools.js'
 import {
   STable,
   VSelect
@@ -82,7 +93,9 @@ import {
 import {
   listCustomerBundle,
   queryBankPayStatus,
-  salesChannelList
+  salesChannelList,
+	countListBundle,
+	exportBundle
 } from '@/api/customerBundle'
 // import salesSearch from '@/components/salesQuery/salesSearch'
 export default {
@@ -94,7 +107,7 @@ export default {
   data () {
     return {
       loadData: parameter => {
-        const searchData = Object.assign(parameter, this.queryParam)
+        const searchData = Object.assign(parameter, this.queryParam,{freeChoiceFlag:1})
         console.log(this.queryOrderDate, 'this.queryOrderDate')
         if (this.queryOrderDate && this.queryOrderDate.length) {
           searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
@@ -115,11 +128,16 @@ export default {
       form: this.$form.createForm(this, {
         name: 'CustomerBundleList'
       }),
-      queryOrderDate: undefined,
+      // 将默认时间日期回显在时间选择框中
+      queryOrderDate: [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD',
       queryParam: {
         number: '',
-        beginDate: '',
-        endDate: '',
+        beginDate: null,
+        endDate: null,
         orderFlag: '',
         custMobile: '',
         bundleName: '',
@@ -227,36 +245,72 @@ export default {
     disabledDate (current) {
       return current && current > moment().endOf('day')
     },
+	// 创建时间change
+	onChange (dates, dateStrings) {
+	  if ((dates, dateStrings)) {
+	    this.queryParam.beginDate = dateStrings[0]
+	    this.queryParam.endDate = dateStrings[1]
+	  }
+	},
     handleChange (value) {
       console.log(`selected ${value}`)
     },
-    handleBlur () {
-      console.log('blur')
-    },
-    handleFocus () {
-      console.log('focus')
-    },
+    // handleBlur () {
+    //   console.log('blur')
+    // },
+    // handleFocus () {
+    //   console.log('focus')
+    // },
     filterOption (input, option) {
 	  return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
 	  )
     },
+		// 合计
+		getTotal () {
+		  const params = {
+		    beginDate: this.searchForm.beginDate,
+		    endDate: this.searchForm.endDate,
+		    bundleName: this.searchForm.bundleName,
+		    number: this.searchForm.number,
+		    custMobile: this.searchForm.custMobile,
+		    orderFlag: this.searchForm.orderFlag,
+		    salesChannelSettleStatus: this.searchForm.salesChannelSettleStatus,
+		    partner: this.searchForm.partner
+		  }
+		  params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
+		  params.endDate == null ? params.endDate = getDate.getToday().endtime : null
+		  countListBundle(params).then(res => {
+		    if (res.status == 200) {
+		      if (res.data) {
+		        this.orderTotal = res.data.cnt || 0
+		        this.totalAmounts = res.data.totalAmounts || 0
+		      } else {
+		        this.orderTotal = 0
+		        this.totalAmounts = 0
+		      }
+		    } else {
+		      this.orderTotal = 0
+		      this.totalAmounts = 0
+		    }
+		  })
+		},
 	// 查看详情、
 	handleDetail(row){
 		this.$router.push({
 		  path: `/Service/PurchasedService/detail/${row.id}`
 		})
 	},
-    getSalesListData () {
-	  salesChannelList().then(res => {
-        if (res.status == 200) {
-			 this.optionData = res.data || []
-			 const obj = { salesChannelName: '自有', salesChannelNo: 0 }
-			  const a = this.optionData.unshift(obj)
-			  console.log(this.optionData, '---------------添加自有')
-        }
-	  })
-    },
+   //  getSalesListData () {
+	  // salesChannelList().then(res => {
+   //      if (res.status == 200) {
+			//  this.optionData = res.data || []
+			//  const obj = { salesChannelName: '自有', salesChannelNo: 0 }
+			//   const a = this.optionData.unshift(obj)
+			//   console.log(this.optionData, '---------------添加自有')
+   //      }
+	  // })
+   //  },
     reloadRow (row) {
       queryBankPayStatus({
         tradeNo: row.tradeNo
@@ -267,8 +321,13 @@ export default {
         }
       })
     },
+		// 重置
     resetSearchForm () {
       this.queryOrderDate = undefined
+	  this.queryOrderDate = [
+	    moment(getDate.getRecentday().starttime, this.dateFormat),
+	    moment(getDate.getRecentday().endtime, this.dateFormat)
+	  ]
       this.queryParam = {
         number: '',
         beginDate: '',
@@ -288,66 +347,118 @@ export default {
     },
 	// 导出
 	handleExport () {
-	  this.form.validateFields((err, values) => {
-	    if (!err) {
-	      this.queryParam = values.queryParam
-	      this.queryOrderDate = values.queryOrderDate
-	      this.queryParam.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
-	      this.queryParam.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
-	      // 获取距开始日期3个月后的时间戳
-	      const tVal = getThreeMonthsAfter(this.queryParam.beginDate)
-	      // 获取结束时间时间戳
-	      const endVal = new Date(this.queryParam.endDate.replace(/-/g, '/'))
-	      if (endVal.valueOf() > tVal - 86400000) {
-	        return this.$message.warning('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
-	      }
-	      const params = _.cloneDeep(this.queryParam)
-	      let requestObj = null
-	      // 按核销服务量进行结算
-	      if (this.settleType == 'ITEM_VERIFY') {
-	        params.bundName = params.bundleName
-	        params.bizNum = params.orderBundleNo
-	        delete params.bundleName
-	        delete params.orderBundleNo
-	        requestObj = exportByItem
-	      } else {
-	        requestObj = exportByBundle
-	      }
-	      this.exportLoading = true
-	      requestObj(params).then(res => {
-	        console.log(res, 'rrrrrrrrrrr')
-	        this.exportLoading = false
-	        this.download(res)
-	      })
-	    }
+	  const params = {
+	    beginDate: this.queryParam.beginDate == null ? getDate.getToday().starttime : this.queryParam.beginDate,
+	    endDate: this.queryParam.endDate == null ? getDate.getToday().endtime : this.queryParam.endDate,
+	    bundleName: this.queryParam.bundleName,
+	    number: this.queryParam.number,
+	    custMobile: this.queryParam.custMobile,
+	    orderFlag: this.queryParam.orderFlag,
+	    vehicleNumber: this.queryParam.vehicleNumber,
+	    dataSourceNo: this.queryParam.dataSourceNo
+	  }
+	  if (!params.beginDate && !params.endDate) {
+	    this.$message.error('请先选择需要导出的下单时间区间再进行导出!')
+	    return
+	  }
+	  // 判断两个时间段是否相差m个月
+	  if (!completeDate(params.beginDate, params.endDate, 3)) {
+	    this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+	    return
+	  }
+	  this.loading = true
+	  exportBundle(params).then(res => {
+	    this.loading = false
+	    this.download(res)
 	  })
 	},
 	download (data) {
-	  if (!data) {
-	    return
-	  }
+	  if (!data) { return }
 	  const url = window.URL.createObjectURL(new Blob([data]))
 	  const link = document.createElement('a')
-	
 	  link.style.display = 'none'
 	  link.href = url
 	  const a = moment().format('YYYYMMDDhhmmss')
-	  const fname = '应收结算-' + a
-	  console.log(fname, '111111')
+	  const fname = '已购服务记录-' + a
 	  link.setAttribute('download', fname + '.xlsx')
 	  document.body.appendChild(link)
 	  link.click()
-	},
+	}
+	
+	// 导出
+	// handleExport () {
+	//   this.form.validateFields((err, values) => {
+	//     if (!err) {
+	//       this.queryParam = values.queryParam
+	//       this.queryOrderDate = values.queryOrderDate
+	//       this.queryParam.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+	//       this.queryParam.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+	//       // 获取距开始日期3个月后的时间戳
+	//       const tVal = getThreeMonthsAfter(this.queryParam.beginDate)
+	//       // 获取结束时间时间戳
+	//       const endVal = new Date(this.queryParam.endDate.replace(/-/g, '/'))
+	//       if (endVal.valueOf() > tVal - 86400000) {
+	//         return this.$message.warning('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+	//       }
+	//       const params = _.cloneDeep(this.queryParam)
+	//       let requestObj = null
+	//       // 按核销服务量进行结算
+	//       if (this.settleType == 'ITEM_VERIFY') {
+	//         params.bundName = params.bundleName
+	//         params.bizNum = params.orderBundleNo
+	//         delete params.bundleName
+	//         delete params.orderBundleNo
+	//         requestObj = exportByItem
+	//       } else {
+	//         requestObj = exportByBundle
+	//       }
+	//       this.exportLoading = true
+	//       exportBundle(params).then(res => {
+	//         console.log(res, 'rrrrrrrrrrr')
+	//         this.exportLoading = false
+	//         this.download(res)
+	//       })
+	//     }
+	//   })
+	// },
+	// download (data) {
+	//   if (!data) {
+	//     return
+	//   }
+	//   const url = window.URL.createObjectURL(new Blob([data]))
+	//   const link = document.createElement('a')
+	
+	//   link.style.display = 'none'
+	//   link.href = url
+	//   const a = moment().format('YYYYMMDDhhmmss')
+	//   const fname = '应收结算-' + a
+	//   console.log(fname, '111111')
+	//   link.setAttribute('download', fname + '.xlsx')
+	//   document.body.appendChild(link)
+	//   link.click()
+	// },
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.resetSearchForm()
-      vm.getSalesListData()
+      // vm.getSalesListData()
     })
   }
 }
 </script>
 
 <style lang="less">
-
+	.table-page-search-wrapper{
+		.export-btn{
+		  background-color: #ff9900;
+		  border-color: #ff9900;
+		  color: #fff;
+		  margin-left: 10px;
+		}
+		.export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+		  color: #fff;
+		  border-color: #ff9900;
+		}
+	}
+	
 </style>

+ 8 - 2
src/views/SetmealSales/VerificationRecords.vue

@@ -134,11 +134,17 @@ export default {
         align: 'center'
       },
       {
-        title: '核销服务名称',
-        dataIndex: 'bundItemName',
+        title: '销售合作商',
+        dataIndex: 'salesChannelName',
         width: 150,
         align: 'center'
       },
+		{
+		  title: '核销服务名称',
+		  dataIndex: 'bundItemName',
+		  width: 150,
+		  align: 'center'
+		},
       {
         title: '客户信息',
         scopedSlots: { customRender: 'userInfo' },