|
|
@@ -3,10 +3,10 @@ import request from '@/utils/request'
|
|
|
// 获取表格分页数据
|
|
|
export function getTableData(forData) {
|
|
|
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') {
|
|
|
data += '&status=' + forData.status
|
|
|
@@ -18,7 +18,7 @@ export function getTableData(forData) {
|
|
|
data += '&grantStartDate=' + forData.search_datatime[0]
|
|
|
data += '&grantEndDate=' + forData.search_datatime[1]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return request({
|
|
|
url: '/CoupomqueryPage.action' + data,
|
|
|
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({
|
|
|
- url: '/hotelqueryList.action' + query,
|
|
|
- method: 'get'
|
|
|
- });
|
|
|
-};
|
|
|
+ url: '/CoupomsaveBatchLapse.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
-// 下载
|
|
|
-export function downloadExcel(forData) {
|
|
|
+// 新增代金券
|
|
|
+export function coupominsterVoucher(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.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({
|
|
|
- url: '/toLedgerAdmimnExcel.action',
|
|
|
+ url: '/Coupominster.action',
|
|
|
method: 'post',
|
|
|
data
|
|
|
})
|
|
|
+}
|
|
|
+
|
|
|
+// 获取民宿列表
|
|
|
+export function hotelqueryAllHotel() {
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/hotelqueryListhotel.action',
|
|
|
+ method: 'get'
|
|
|
+ })
|
|
|
}
|