Просмотр исходного кода

接口对完,优惠券字段待核对。

soft5566 2 лет назад
Родитель
Сommit
387026d76b

+ 1 - 1
package.json

@@ -8,7 +8,7 @@
 		"build:report": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build --report",
 		"build:report": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build --report",
 		"build:prod": "vue-cli-service build",
 		"build:prod": "vue-cli-service build",
 		"build:stage": "vue-cli-service build --mode staging",
 		"build:stage": "vue-cli-service build --mode staging",
-		"dev": "vue-cli-service serve --mode staging",
+		"dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
 		"preview": "node build/index.js --preview",
 		"preview": "node build/index.js --preview",
 		"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
 		"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
 		"lint": "eslint --ext .js,.vue src",
 		"lint": "eslint --ext .js,.vue src",

+ 14 - 32
src/api/complaintMgr.js

@@ -3,11 +3,8 @@ import request from '@/utils/request'
 // 获取表格分页数据
 // 获取表格分页数据
 export function getTableData(forData) {
 export function getTableData(forData) {
 	let data = ''
 	let data = ''
-	data += '?page=' + forData.page + '&rows=' + forData.rows 
+	data += '?page=' + forData.page + '&rows=' + forData.rows
 
 
-	if (typeof forData.id !== 'undefined') {
-		data += '&hotelTownship=' + forData.id
-	}
 	if (typeof forData.status !== 'undefined') {
 	if (typeof forData.status !== 'undefined') {
 		data += '&status=' + forData.status
 		data += '&status=' + forData.status
 	}
 	}
@@ -16,9 +13,9 @@ export function getTableData(forData) {
 		data += '&complainEndTime=' + forData.search_datatime[1]
 		data += '&complainEndTime=' + forData.search_datatime[1]
 	}
 	}
 	if (typeof forData.keyword !== 'undefined') {
 	if (typeof forData.keyword !== 'undefined') {
-		data += '&keywords=' + forData.keywords
+		data += '&keywords=' + forData.keyword
 	}
 	}
-	
+
 	return request({
 	return request({
 		url: '/ComplainqueryPage.action' + data,
 		url: '/ComplainqueryPage.action' + data,
 		method: 'get',
 		method: 'get',
@@ -26,20 +23,9 @@ export function getTableData(forData) {
 	})
 	})
 }
 }
 
 
-
-// 获取乡镇列表
-export function getTowns() {
-	let query = '?code=10'
-
-	return request({
-		url: '/hotelqueryList.action' + query,
-		method: 'get'
-	});
-};
-
 // 获取投诉详情
 // 获取投诉详情
 export function getXiang(row) {
 export function getXiang(row) {
-	let query = '?id='+row.id
+	let query = '?id=' + row.id
 
 
 	return request({
 	return request({
 		url: '/ComplaingetById.action' + query,
 		url: '/ComplaingetById.action' + query,
@@ -49,27 +35,23 @@ export function getXiang(row) {
 
 
 // 下载
 // 下载
 export function downloadExcel(forData) {
 export function downloadExcel(forData) {
-	let data = new FormData()
-	if (typeof forData.id !== 'undefined') {
-		data.append('hotelTownship', forData.id)
-	}
-	if (typeof forData.amount1 !== 'undefined') {
-		data.append('minTotalPrice', forData.amount1)
-	}
-	if (typeof forData.amount2 !== 'undefined') {
-		data.append('maxTotalPrice', forData.amount2)
+	let data = ''
+	data += '?page=' + forData.page + '&rows=' + forData.rows
+
+	if (typeof forData.status !== 'undefined') {
+		data += '&status=' + forData.status
 	}
 	}
 	if (forData.search_datatime !== undefined && forData.search_datatime !== null) {
 	if (forData.search_datatime !== undefined && forData.search_datatime !== null) {
-		data.append('payStartTime', forData.search_datatime[0])
-		data.append('payEndTime', forData.search_datatime[1])
+		data += '&complainStartTime=' + forData.search_datatime[0]
+		data += '&complainEndTime=' + forData.search_datatime[1]
 	}
 	}
 	if (typeof forData.keyword !== 'undefined') {
 	if (typeof forData.keyword !== 'undefined') {
-		data.append('ledgerParam', forData.keyword)
+		data += '&keywords=' + forData.keyword
 	}
 	}
-	
+
 	return request({
 	return request({
 		url: '/ComplaintoComplainExcel.action',
 		url: '/ComplaintoComplainExcel.action',
 		method: 'get',
 		method: 'get',
-		// data
+		data
 	})
 	})
 }
 }

+ 85 - 26
src/api/discountCouponMgr.js

@@ -3,10 +3,10 @@ import request from '@/utils/request'
 // 获取表格分页数据
 // 获取表格分页数据
 export function getTableData(forData) {
 export function getTableData(forData) {
 	let data = ''
 	let data = ''
-	data += '?page=' + forData.page + '&rows=' + forData.rows 
+	data += '?page=' + forData.page + '&rows=' + forData.rows
 
 
-	if (typeof forData.id !== 'undefined') {
-		data += '&hotelTownship=' + forData.id
+	if (typeof forData.type !== 'undefined') {
+		data += '&type=' + forData.type
 	}
 	}
 	if (typeof forData.status !== 'undefined') {
 	if (typeof forData.status !== 'undefined') {
 		data += '&status=' + forData.status
 		data += '&status=' + forData.status
@@ -18,7 +18,7 @@ export function getTableData(forData) {
 		data += '&grantStartDate=' + forData.search_datatime[0]
 		data += '&grantStartDate=' + forData.search_datatime[0]
 		data += '&grantEndDate=' + forData.search_datatime[1]
 		data += '&grantEndDate=' + forData.search_datatime[1]
 	}
 	}
-	 
+
 	return request({
 	return request({
 		url: '/CoupomqueryPage.action' + data,
 		url: '/CoupomqueryPage.action' + data,
 		method: 'get',
 		method: 'get',
@@ -27,39 +27,98 @@ export function getTableData(forData) {
 }
 }
 
 
 
 
-// 获取乡镇配置列表
-export function getTowns() {
-	let query = '?code=10'
+// 批量失效
+export function coupomsaveBatchLapse(forData) {
+	let data = new FormData()
+	if (typeof forData.ids !== 'undefined') {
+		data.append('ids', forData.ids)
+	}
 
 
 	return request({
 	return request({
-		url: '/hotelqueryList.action' + query,
-		method: 'get'
-	});
-};
+		url: '/CoupomsaveBatchLapse.action',
+		method: 'post',
+		data
+	})
+}
 
 
-// 下载
-export function downloadExcel(forData) {
+// 新增代金券
+export function coupominsterVoucher(forData) {
 	let data = new FormData()
 	let data = new FormData()
-	if (typeof forData.id !== 'undefined') {
-		data.append('hotelTownship', forData.id)
-	}
-	if (typeof forData.amount1 !== 'undefined') {
-		data.append('minTotalPrice', forData.amount1)
+	if (typeof forData.name !== 'undefined') {
+		data.append('name', forData.name)
 	}
 	}
-	if (typeof forData.amount2 !== 'undefined') {
-		data.append('maxTotalPrice', forData.amount2)
+	data.append('deductionPrice', forData.deductionPrice)
+	data.append('grantNumber', forData.grantNumber)
+	data.append('limitNumber', forData.limitNumber)
+
+	data.append('grantStartDate', forData.grantTimes[0])
+	data.append('grantEndDate', forData.grantTimes[1])
+	
+	data.append('meetPrice', forData.meetPrice)
+
+	if (forData.radio == 1) {
+		data.append('effectiveStartDate', forData.effectiveDateTime[0])
+		data.append('effectiveEndDate', forData.effectiveDateTime[1])
+	} else if (forData.radio == 2) {
+		data.append('effectiveDay', forData.effectiveDay)
+		data.append('effectiveLoseDay', forData.effectiveLoseDay)
 	}
 	}
-	if (forData.search_datatime !== undefined && forData.search_datatime !== null) {
-		data.append('payStartTime', forData.search_datatime[0])
-		data.append('payEndTime', forData.search_datatime[1])
+	
+	data.append('hotelIds', forData.hotelIds)
+	data.append('createId', forData.createId)
+	data.append('effectiveType', forData.effectiveType)
+	data.append('type', forData.type)
+	data.append('status', forData.status)
+
+	return request({
+		url: '/Coupominster.action',
+		method: 'post',
+		data
+	})
+}
+
+// 新增折扣券
+export function coupominsterCoupon(forData) {
+	let data = new FormData()
+	if (typeof forData.name !== 'undefined') {
+		data.append('name', forData.name)
 	}
 	}
-	if (typeof forData.keyword !== 'undefined') {
-		data.append('ledgerParam', forData.keyword)
+	data.append('rebatePrice', forData.rebatePrice)
+	data.append('maxDeduction', forData.maxDeduction)
+	data.append('grantNumber', forData.grantNumber)
+	data.append('limitNumber', forData.limitNumber)
+	
+	data.append('grantStartDate', forData.grantTimes[0])
+	data.append('grantEndDate', forData.grantTimes[1])
+	
+	data.append('meetPrice', forData.meetPrice)	
+	
+	if (forData.radio == 1) {
+		data.append('effectiveStartDate', forData.effectiveDateTime[0])
+		data.append('effectiveEndDate', forData.effectiveDateTime[1])
+	} else if (forData.radio == 2) {
+		data.append('effectiveDay', forData.effectiveDay)
+		data.append('effectiveLoseDay', forData.effectiveLoseDay)
 	}
 	}
+
+	data.append('hotelIds', forData.hotelIds)
+	data.append('createId', forData.createId)
+	data.append('effectiveType', forData.effectiveType)
+	data.append('type', forData.type)
+	data.append('status', forData.status)
 	
 	
 	return request({
 	return request({
-		url: '/toLedgerAdmimnExcel.action',
+		url: '/Coupominster.action',
 		method: 'post',
 		method: 'post',
 		data
 		data
 	})
 	})
+}
+
+// 获取民宿列表
+export function hotelqueryAllHotel() {
+
+	return request({
+		url: '/hotelqueryListhotel.action',
+		method: 'get'
+	})
 }
 }

+ 1 - 1
src/api/stdbookMgr.js

@@ -62,7 +62,7 @@ export function downloadExcel(forData) {
 	}
 	}
 	
 	
 	return request({
 	return request({
-		url: '/toLedgerAdmimnExcel.action',
+		url: '/booktoLedgerAdmimnExcel.action',
 		method: 'post',
 		method: 'post',
 		data
 		data
 	})
 	})

+ 17 - 0
src/js/common.js

@@ -50,4 +50,21 @@ export function getDateComponents(date, ...components) {
 	}
 	}
 
 
 	return result;
 	return result;
+}
+
+// 检测是否为空
+export function isEmpty(value) {
+	if (value === null || value === undefined) {
+		return true;
+	}
+
+	if (typeof value === 'string' && value.trim() === '') {
+		return true;
+	}
+
+	if (typeof value === 'object' && Object.keys(value).length === 0) {
+		return true;
+	}
+
+	return false;
 }
 }

+ 1 - 0
src/store/getters.js

@@ -5,6 +5,7 @@ const getters = {
 	avatar: state => state.user.avatar,
 	avatar: state => state.user.avatar,
 	name: state => state.user.name,
 	name: state => state.user.name,
 	level: state => state.user.level,
 	level: state => state.user.level,
+	user_id: state => state.user.user_id,
 	user_name: state => state.user.user_name,
 	user_name: state => state.user.user_name,
 	phone: state => state.user.phone
 	phone: state => state.user.phone
 }
 }

+ 6 - 0
src/store/modules/user.js

@@ -43,6 +43,9 @@ const mutations = {
 	SET_USER_NAME: (state, user_name) => {
 	SET_USER_NAME: (state, user_name) => {
 		state.user_name = user_name
 		state.user_name = user_name
 	},
 	},
+	SET_USER_ID: (state, user_id) => {
+		state.user_id = user_id
+	},
 	SET_PWD: (state, pwd) => {
 	SET_PWD: (state, pwd) => {
 		state.pwd = pwd
 		state.pwd = pwd
 	},
 	},
@@ -78,6 +81,7 @@ const actions = {
 					// 添加:
 					// 添加:
 					commit('SET_LEVEL', response.data.level)
 					commit('SET_LEVEL', response.data.level)
 					commit('SET_NAME', response.data.adminName)
 					commit('SET_NAME', response.data.adminName)
+					commit('SET_USER_ID', response.data.id)
 					commit('SET_PWD', password)
 					commit('SET_PWD', password)
 					commit('SET_PHONE', response.data.phone)
 					commit('SET_PHONE', response.data.phone)
 					commit('SET_USER_NAME', response.data.userName)
 					commit('SET_USER_NAME', response.data.userName)
@@ -85,6 +89,7 @@ const actions = {
 					commit('SET_TOKEN', '')
 					commit('SET_TOKEN', '')
 					commit('SET_LEVEL', '')
 					commit('SET_LEVEL', '')
 					commit('SET_NAME', '')
 					commit('SET_NAME', '')
+					commit('SET_USER_ID', '')
 					commit('SET_PWD', '')
 					commit('SET_PWD', '')
 					commit('SET_PHONE', '')
 					commit('SET_PHONE', '')
 					commit('SET_USER_NAME', '')
 					commit('SET_USER_NAME', '')
@@ -138,6 +143,7 @@ const actions = {
 			resetRouter()
 			resetRouter()
 			commit('RESET_STATE')
 			commit('RESET_STATE')
 			commit('SET_NAME', '')
 			commit('SET_NAME', '')
+			commit('SET_USER_ID', '')
 			commit('SET_PWD', '')
 			commit('SET_PWD', '')
 			commit('SET_LEVEL', '')
 			commit('SET_LEVEL', '')
 			commit('SET_TOKEN', '')
 			commit('SET_TOKEN', '')

+ 82 - 88
src/utils/index.js

@@ -9,46 +9,48 @@
  * @returns {string | null}
  * @returns {string | null}
  */
  */
 export function parseTime(time, cFormat) {
 export function parseTime(time, cFormat) {
-  if (arguments.length === 0 || !time) {
-    return null
-  }
-  const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
-  let date
-  if (typeof time === 'object') {
-    date = time
-  } else {
-    if ((typeof time === 'string')) {
-      if ((/^[0-9]+$/.test(time))) {
-        // support "1548221490638"
-        time = parseInt(time)
-      } else {
-        // support safari
-        // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
-        time = time.replace(new RegExp(/-/gm), '/')
-      }
-    }
+	if (arguments.length === 0 || !time) {
+		return null
+	}
+	const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
+	let date
+	if (typeof time === 'object') {
+		date = time
+	} else {
+		if ((typeof time === 'string')) {
+			if ((/^[0-9]+$/.test(time))) {
+				// support "1548221490638"
+				time = parseInt(time)
+			} else {
+				// support safari
+				// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
+				time = time.replace(new RegExp(/-/gm), '/')
+			}
+		}
 
 
-    if ((typeof time === 'number') && (time.toString().length === 10)) {
-      time = time * 1000
-    }
-    date = new Date(time)
-  }
-  const formatObj = {
-    y: date.getFullYear(),
-    m: date.getMonth() + 1,
-    d: date.getDate(),
-    h: date.getHours(),
-    i: date.getMinutes(),
-    s: date.getSeconds(),
-    a: date.getDay()
-  }
-  const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
-    const value = formatObj[key]
-    // Note: getDay() returns 0 on Sunday
-    if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
-    return value.toString().padStart(2, '0')
-  })
-  return time_str
+		if ((typeof time === 'number') && (time.toString().length === 10)) {
+			time = time * 1000
+		}
+		date = new Date(time)
+	}
+	const formatObj = {
+		y: date.getFullYear(),
+		m: date.getMonth() + 1,
+		d: date.getDate(),
+		h: date.getHours(),
+		i: date.getMinutes(),
+		s: date.getSeconds(),
+		a: date.getDay()
+	}
+	const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
+		const value = formatObj[key]
+		// Note: getDay() returns 0 on Sunday
+		if (key === 'a') {
+			return ['日', '一', '二', '三', '四', '五', '六'][value]
+		}
+		return value.toString().padStart(2, '0')
+	})
+	return time_str
 }
 }
 
 
 /**
 /**
@@ -57,41 +59,33 @@ export function parseTime(time, cFormat) {
  * @returns {string}
  * @returns {string}
  */
  */
 export function formatTime(time, option) {
 export function formatTime(time, option) {
-  if (('' + time).length === 10) {
-    time = parseInt(time) * 1000
-  } else {
-    time = +time
-  }
-  const d = new Date(time)
-  const now = Date.now()
+	if (('' + time).length === 10) {
+		time = parseInt(time) * 1000
+	} else {
+		time = +time
+	}
+	const d = new Date(time)
+	const now = Date.now()
 
 
-  const diff = (now - d) / 1000
+	const diff = (now - d) / 1000
 
 
-  if (diff < 30) {
-    return '刚刚'
-  } else if (diff < 3600) {
-    // less 1 hour
-    return Math.ceil(diff / 60) + '分钟前'
-  } else if (diff < 3600 * 24) {
-    return Math.ceil(diff / 3600) + '小时前'
-  } else if (diff < 3600 * 24 * 2) {
-    return '1天前'
-  }
-  if (option) {
-    return parseTime(time, option)
-  } else {
-    return (
-      d.getMonth() +
-      1 +
-      '月' +
-      d.getDate() +
-      '日' +
-      d.getHours() +
-      '时' +
-      d.getMinutes() +
-      '分'
-    )
-  }
+	if (diff < 30) {
+		return '刚刚'
+	} else if (diff < 3600) {
+		// less 1 hour
+		return Math.ceil(diff / 60) + '分钟前'
+	} else if (diff < 3600 * 24) {
+		return Math.ceil(diff / 3600) + '小时前'
+	} else if (diff < 3600 * 24 * 2) {
+		return '1天前'
+	}
+	if (option) {
+		return parseTime(time, option)
+	} else {
+		return (
+			d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
+		)
+	}
 }
 }
 
 
 /**
 /**
@@ -99,19 +93,19 @@ export function formatTime(time, option) {
  * @returns {Object}
  * @returns {Object}
  */
  */
 export function param2Obj(url) {
 export function param2Obj(url) {
-  const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
-  if (!search) {
-    return {}
-  }
-  const obj = {}
-  const searchArr = search.split('&')
-  searchArr.forEach(v => {
-    const index = v.indexOf('=')
-    if (index !== -1) {
-      const name = v.substring(0, index)
-      const val = v.substring(index + 1, v.length)
-      obj[name] = val
-    }
-  })
-  return obj
-}
+	const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
+	if (!search) {
+		return {}
+	}
+	const obj = {}
+	const searchArr = search.split('&')
+	searchArr.forEach(v => {
+		const index = v.indexOf('=')
+		if (index !== -1) {
+			const name = v.substring(0, index)
+			const val = v.substring(index + 1, v.length)
+			obj[name] = val
+		}
+	})
+	return obj
+}

+ 24 - 40
src/views/complaintMgr/index.vue

@@ -12,8 +12,8 @@
 						<div class="controls">
 						<div class="controls">
 							<el-form :inline="true" :model="formInline" class="demo-form-inline">
 							<el-form :inline="true" :model="formInline" class="demo-form-inline">
 								<el-form-item label="状态">
 								<el-form-item label="状态">
-									<el-select v-model="formInline.id" clearable placeholder="请选择">
-										<el-option v-for="item in formInline.options" :key="item.id" :label="item.hotelTownship" :value="item.id">
+									<el-select v-model="formInline.status" clearable placeholder="请选择">
+										<el-option v-for="item in formInline.options" :key="item.id" :label="item.label" :value="item.id">
 										</el-option>
 										</el-option>
 									</el-select>
 									</el-select>
 								</el-form-item>
 								</el-form-item>
@@ -36,13 +36,14 @@
 							:header-cell-style="header_cell_style">
 							:header-cell-style="header_cell_style">
 							<el-table-column label="状态" align="center">
 							<el-table-column label="状态" align="center">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<span v-if="scope.row.status == 0" style="color: #F9273F;">处理中</span>
-									<span v-else style="color: #56AA2E;">处理完成</span>
+									<span v-if="scope.row.status == 0" style="color: #ccc;">已删除</span>
+									<span v-else-if="scope.row.status == 1" style="color: #F9273F;">处理中</span>
+									<span v-else-if="scope.row.status == 2" style="color: #56AA2E;">已处理</span>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
 							<el-table-column label="投诉单号" align="center">
 							<el-table-column label="投诉单号" align="center">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<span>{{ scope.row.bookingId }}</span>
+									<span>{{ scope.row.id }}</span>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
 							<el-table-column label="民宿" align="center">
 							<el-table-column label="民宿" align="center">
@@ -63,7 +64,7 @@
 							</el-table-column>
 							</el-table-column>
 							<el-table-column label="订单号" align="center">
 							<el-table-column label="订单号" align="center">
 								<template slot-scope="scope">
 								<template slot-scope="scope">
-									<span>{{ scope.row.id }}</span>
+									<span>{{ scope.row.bookingId }}</span>
 								</template>
 								</template>
 							</el-table-column>
 							</el-table-column>
 							<el-table-column label="标题" align="center">
 							<el-table-column label="标题" align="center">
@@ -129,7 +130,6 @@
 <script>
 <script>
 	import {
 	import {
 		getTableData,
 		getTableData,
-		getTowns,
 		getXiang,
 		getXiang,
 		downloadExcel
 		downloadExcel
 	} from '@/api/complaintMgr'
 	} from '@/api/complaintMgr'
@@ -155,8 +155,17 @@
 				},
 				},
 				// 查询数据
 				// 查询数据
 				formInline: {
 				formInline: {
-					options: [],
-					id: '',
+					options: [{
+						id: 0,
+						label: '已删除'
+					},{
+						id: 1,
+						label: '处理中'
+					},{
+						id: 2,
+						label: '已处理'
+					}],
+					status: '',
 					search_datatime: '',
 					search_datatime: '',
 					keyword: ''
 					keyword: ''
 				},
 				},
@@ -202,8 +211,6 @@
 			}
 			}
 			// 获取消费记录,表格数据
 			// 获取消费记录,表格数据
 			this.get_table_data('list')
 			this.get_table_data('list')
-			// 获取乡镇
-			this.get_towns()
 		},
 		},
 		mounted() {
 		mounted() {
 			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
 			document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
@@ -235,31 +242,6 @@
 			complaint_close() {
 			complaint_close() {
 				this.dialogComplaintVisible = false
 				this.dialogComplaintVisible = false
 			},
 			},
-			// 获取乡镇列表
-			get_towns() {
-				getTowns().then((res) => {
-					if (res.code === 200) {
-						this.formInline.options = []
-						for (var i = 0; i < res.data.length; i++) {
-							let town = {
-								id: res.data[i].id,
-								hotelTownship: res.data[i].name
-							}
-							this.formInline.options.push(town)
-						}
-					} else {
-						if (res.data.length === 0) {
-							this.formInline.options = []
-							this.$message.warning('没有符合条件的数据!')
-						} else {
-							this.$message.warning(res.message)
-						}
-					}
-				}).catch((err) => {
-					// console.log(err);
-					this.$message.error(err.message)
-				});
-			},
 			/**
 			/**
 			 * 获取消费记录,表格数据
 			 * 获取消费记录,表格数据
 			 */
 			 */
@@ -276,7 +258,7 @@
 				var that = this
 				var that = this
 				// console.log(data);
 				// console.log(data);
 				getTableData(data).then((res) => {
 				getTableData(data).then((res) => {
-					console.log(res.data);
+					// console.log(res.data);
 					if (res.code === 200) {
 					if (res.code === 200) {
 						var d = res.data
 						var d = res.data
 						that.pagination.total = d.total
 						that.pagination.total = d.total
@@ -303,8 +285,8 @@
 					rows: this.pagination.pageSize
 					rows: this.pagination.pageSize
 				}
 				}
 
 
-				if (this.formInline.id !== '') {
-					data.id = this.formInline.id
+				if (this.formInline.status !== '') {
+					data.status = this.formInline.status
 				}
 				}
 
 
 				if (this.formInline.search_datatime !== '') {
 				if (this.formInline.search_datatime !== '') {
@@ -323,9 +305,11 @@
 			exportExcel() {
 			exportExcel() {
 				var that = this
 				var that = this
 				downloadExcel(this.cond_data).then((res) => {
 				downloadExcel(this.cond_data).then((res) => {
-					console.log(res);
+					// console.log(res);
 					if (res.code === 200) {
 					if (res.code === 200) {
 						that.$message.success(res.message)
 						that.$message.success(res.message)
+						let xls = res.downurl
+						window.open(xls)
 					} else {
 					} else {
 						that.tableData = []
 						that.tableData = []
 						that.$message.warning(res.message)
 						that.$message.warning(res.message)

Разница между файлами не показана из-за своего большого размера
+ 557 - 253
src/views/discountCouponMgr/index.vue


+ 3 - 1
src/views/stdbookMgr/index.vue

@@ -288,9 +288,11 @@
 			exportExcel() {
 			exportExcel() {
 				var that = this
 				var that = this
 				downloadExcel(this.cond_data).then((res) => {
 				downloadExcel(this.cond_data).then((res) => {
-					console.log(res);
+					// console.log(res);
 					if (res.code === 200) {
 					if (res.code === 200) {
 						that.$message.success(res.message)
 						that.$message.success(res.message)
+						let xls = res.downurl
+						window.open(xls)
 					} else {
 					} else {
 						that.tableData = []
 						that.tableData = []
 						that.$message.warning(res.message)
 						that.$message.warning(res.message)