|
@@ -2,7 +2,7 @@
|
|
<a-card :bordered="false" class="purchasedSetmeal-wrap">
|
|
<a-card :bordered="false" class="purchasedSetmeal-wrap">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="purchasedSetmeal-searchForm">
|
|
<div class="purchasedSetmeal-searchForm">
|
|
- <a-form ref="searchForm">
|
|
|
|
|
|
+ <a-form ref="searchForm" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="48">
|
|
<a-row :gutter="48">
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="下单时间" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<a-form-item label="下单时间" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
@@ -17,27 +17,27 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<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-input v-model.trim="searchForm.number" id="purchasedSetmeal-number" placeholder="请输入" allowClear />
|
|
|
|
|
|
+ <a-input v-model.trim="searchForm.number" id="purchasedSetmeal-number" placeholder="请输入订单号" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<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-input v-model.trim="searchForm.queryWord" id="purchasedSetmeal-queryWord" placeholder="手机号/车牌号" allowClear />
|
|
|
|
|
|
+ <a-input v-model.trim="searchForm.queryWord" id="purchasedSetmeal-queryWord" placeholder="请输入手机号/车牌号" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<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-input v-model.trim="searchForm.bundleName" id="purchasedSetmeal-bundleName" placeholder="请输入" allowClear />
|
|
|
|
|
|
+ <a-input v-model.trim="searchForm.bundleName" id="purchasedSetmeal-bundleName" placeholder="请输入套餐名称" allowClear />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="状态" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<a-form-item label="状态" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
<v-select
|
|
<v-select
|
|
- v-model="searchForm.refundStatus"
|
|
|
|
- ref="refundStatus"
|
|
|
|
|
|
+ v-model="searchForm.refundFlag"
|
|
|
|
+ ref="refundFlag"
|
|
id="purchasedSetmeal-status"
|
|
id="purchasedSetmeal-status"
|
|
code="REFUND_STATUS"
|
|
code="REFUND_STATUS"
|
|
- placeholder="请选择"
|
|
|
|
|
|
+ placeholder="请选择状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -68,8 +68,8 @@
|
|
:data="loadData"
|
|
:data="loadData"
|
|
bordered>
|
|
bordered>
|
|
<!-- 状态 -->
|
|
<!-- 状态 -->
|
|
- <span slot="orderStatus" slot-scope="text">
|
|
|
|
- {{ $refs.orderStatus.getNameByCode(text) }}
|
|
|
|
|
|
+ <span slot="refundFlag" slot-scope="text">
|
|
|
|
+ {{ $refs.refundFlag.getNameByCode(text) }}
|
|
</span>
|
|
</span>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
@@ -77,7 +77,7 @@
|
|
</span>
|
|
</span>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 查看详情弹窗 -->
|
|
<!-- 查看详情弹窗 -->
|
|
- <setmeal-detail-modal :openModal="openDetailModal" :nowId="detailId" @close="openDetailModal=false" />
|
|
|
|
|
|
+ <setmeal-detail-modal :openModal="openDetailModal" :setmealId="detailId" @close="openDetailModal=false" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -93,7 +93,6 @@ export default {
|
|
components: { STable, VSelect, SetmealDetailModal },
|
|
components: { STable, VSelect, SetmealDetailModal },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- storeId: [], // 网点名称
|
|
|
|
// 查询参数
|
|
// 查询参数
|
|
searchForm: {
|
|
searchForm: {
|
|
beginDate: null, // 开始时间
|
|
beginDate: null, // 开始时间
|
|
@@ -101,13 +100,11 @@ export default {
|
|
bundleName: '', // 套餐名称
|
|
bundleName: '', // 套餐名称
|
|
number: '', // 订单号
|
|
number: '', // 订单号
|
|
queryWord: '', // 客户信息
|
|
queryWord: '', // 客户信息
|
|
- refundStatus: '' // 状态
|
|
|
|
|
|
+ refundFlag: '' // 状态
|
|
},
|
|
},
|
|
loading: false, // 导出loading
|
|
loading: false, // 导出loading
|
|
orderTotal: '', // 合计开单数量
|
|
orderTotal: '', // 合计开单数量
|
|
paymentAmountTotal: '', // 合计实收金额
|
|
paymentAmountTotal: '', // 合计实收金额
|
|
- itemOptionData: [], // 服务项目数据
|
|
|
|
- storeOptionData: [], // 网点名称数据
|
|
|
|
openDetailModal: false, // 查看详情弹窗 默认关闭
|
|
openDetailModal: false, // 查看详情弹窗 默认关闭
|
|
detailId: null, // 初始化id
|
|
detailId: null, // 初始化id
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
@@ -118,12 +115,12 @@ export default {
|
|
dateFormat: 'YYYY-MM-DD',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
- { title: '订单号', dataIndex: 'orderNo', width: 100, align: 'center' },
|
|
|
|
- { title: '下单时间', dataIndex: 'orderTime', width: 100, align: 'center' },
|
|
|
|
- { title: '套餐名称', dataIndex: 'storeName', width: 100, align: 'center' },
|
|
|
|
|
|
+ { title: '订单号', dataIndex: 'number', width: 100, align: 'center' },
|
|
|
|
+ { title: '下单时间', dataIndex: 'orderDate', width: 100, align: 'center' },
|
|
|
|
+ { title: '套餐名称', dataIndex: 'bundleName', width: 100, align: 'center' },
|
|
{ title: '客户信息', dataIndex: 'customerMobile', width: 100, align: 'center' },
|
|
{ title: '客户信息', dataIndex: 'customerMobile', width: 100, align: 'center' },
|
|
- { title: '应收金额(¥)', dataIndex: 'payableAmount', width: 100, align: 'center' },
|
|
|
|
- { title: '单据状态', scopedSlots: { customRender: 'orderStatus' }, width: 100, align: 'center' },
|
|
|
|
|
|
+ { title: '应收金额(¥)', dataIndex: 'payedAmount', width: 80, align: 'center' },
|
|
|
|
+ { title: '单据状态', scopedSlots: { customRender: 'refundFlag' }, width: 80, align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -161,32 +158,6 @@ export default {
|
|
this.searchForm.endDate = dateStrings[1]
|
|
this.searchForm.endDate = dateStrings[1]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 获取服务项目数据
|
|
|
|
- getItemListData () {
|
|
|
|
- itemList({
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 1000
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.itemOptionData = res.data.list || []
|
|
|
|
- } else {
|
|
|
|
- this.itemOptionData = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 获取网点名称数据
|
|
|
|
- getStoreListData () {
|
|
|
|
- storeList({
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 1000
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.storeOptionData = res.data.list || []
|
|
|
|
- } else {
|
|
|
|
- this.storeOptionData = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 合计
|
|
// 合计
|
|
getTotal () {
|
|
getTotal () {
|
|
const params = {
|
|
const params = {
|
|
@@ -195,23 +166,23 @@ export default {
|
|
bundleName: this.searchForm.bundleName,
|
|
bundleName: this.searchForm.bundleName,
|
|
number: this.searchForm.number,
|
|
number: this.searchForm.number,
|
|
queryWord: this.searchForm.queryWord,
|
|
queryWord: this.searchForm.queryWord,
|
|
- refundStatus: this.searchForm.refundStatus
|
|
|
|
|
|
+ refundFlag: this.searchForm.refundFlag
|
|
}
|
|
}
|
|
params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
params.beginDate == null ? params.beginDate = getDate.getToday().starttime : null
|
|
params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
params.endDate == null ? params.endDate = getDate.getToday().endtime : null
|
|
- orderTotal(params).then(res => {
|
|
|
|
- console.log(res, '--------')
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.orderTotal = res.data.orderNum || 0
|
|
|
|
- this.paymentAmountTotal = res.data.paymentAmount || 0
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // orderTotal(params).then(res => {
|
|
|
|
+ // console.log(res, '--------')
|
|
|
|
+ // if (res.status == 200) {
|
|
|
|
+ // this.orderTotal = res.data.orderNum || 0
|
|
|
|
+ // this.paymentAmountTotal = res.data.paymentAmount || 0
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
// 查看详情--跳转到对应的详情页
|
|
// 查看详情--跳转到对应的详情页
|
|
seeDetail (record) {
|
|
seeDetail (record) {
|
|
// 将当前行的id传递给详情页
|
|
// 将当前行的id传递给详情页
|
|
|
|
+ this.detailId = String(record.id)
|
|
this.openDetailModal = true
|
|
this.openDetailModal = true
|
|
- this.detailId = record.id
|
|
|
|
},
|
|
},
|
|
// 查询
|
|
// 查询
|
|
handleSearch () {
|
|
handleSearch () {
|
|
@@ -226,13 +197,11 @@ export default {
|
|
moment(getDate.getToday().starttime, this.dateFormat),
|
|
moment(getDate.getToday().starttime, this.dateFormat),
|
|
moment(getDate.getToday().endtime, this.dateFormat)
|
|
moment(getDate.getToday().endtime, this.dateFormat)
|
|
]
|
|
]
|
|
- this.storeId = []
|
|
|
|
- this.searchForm.orderNo = ''
|
|
|
|
- this.searchForm.itemId = undefined
|
|
|
|
- this.searchForm.customerMobile = ''
|
|
|
|
- this.searchForm.orderStatus = ''
|
|
|
|
- // this.$refs.searchForm.resetFields()
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ this.searchForm.bundleName = ''
|
|
|
|
+ this.searchForm.number = ''
|
|
|
|
+ this.searchForm.queryWord = ''
|
|
|
|
+ this.searchForm.refundFlag = null
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
this.getTotal()
|
|
this.getTotal()
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
@@ -241,11 +210,10 @@ export default {
|
|
const params = {
|
|
const params = {
|
|
beginDate: this.searchForm.beginDate == null ? getDate.getToday().starttime : this.searchForm.beginDate,
|
|
beginDate: this.searchForm.beginDate == null ? getDate.getToday().starttime : this.searchForm.beginDate,
|
|
endDate: this.searchForm.endDate == null ? getDate.getToday().endtime : this.searchForm.endDate,
|
|
endDate: this.searchForm.endDate == null ? getDate.getToday().endtime : this.searchForm.endDate,
|
|
- storeIdList: this.storeId,
|
|
|
|
- orderNo: this.searchForm.orderNo,
|
|
|
|
- itemId: this.searchForm.itemId,
|
|
|
|
- customerMobile: this.searchForm.customerMobile,
|
|
|
|
- orderStatus: this.searchForm.orderStatus
|
|
|
|
|
|
+ bundleName: this.searchForm.bundleName,
|
|
|
|
+ number: this.searchForm.number,
|
|
|
|
+ queryWord: this.searchForm.queryWord,
|
|
|
|
+ refundFlag: this.searchForm.refundFlag
|
|
}
|
|
}
|
|
// 判断两个时间段是否相差m个月
|
|
// 判断两个时间段是否相差m个月
|
|
if (!completeDate(params.beginDate, params.endDate, 3)) {
|
|
if (!completeDate(params.beginDate, params.endDate, 3)) {
|
|
@@ -259,29 +227,18 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
download (data) {
|
|
download (data) {
|
|
- if (!data) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ if (!data) { return }
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
const link = document.createElement('a')
|
|
const link = document.createElement('a')
|
|
-
|
|
|
|
link.style.display = 'none'
|
|
link.style.display = 'none'
|
|
link.href = url
|
|
link.href = url
|
|
const a = moment().format('YYYYMMDDhhmmss')
|
|
const a = moment().format('YYYYMMDDhhmmss')
|
|
- const fname = '订单记录-' + a
|
|
|
|
|
|
+ const fname = '已购套餐记录-' + a
|
|
console.log(fname, '111111')
|
|
console.log(fname, '111111')
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
-
|
|
|
|
document.body.appendChild(link)
|
|
document.body.appendChild(link)
|
|
link.click()
|
|
link.click()
|
|
}
|
|
}
|
|
- },
|
|
|
|
- beforeRouteEnter (to, from, next) {
|
|
|
|
- next(vm => {
|
|
|
|
- vm.getItemListData()
|
|
|
|
- vm.handleReset()
|
|
|
|
- vm.getStoreListData()
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -304,6 +261,10 @@ export default {
|
|
color: #fff;
|
|
color: #fff;
|
|
margin-left: 10px;
|
|
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;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.table-operator{
|
|
.table-operator{
|
|
margin: 18px 0 30px;
|
|
margin: 18px 0 30px;
|