|
@@ -11,7 +11,9 @@
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="网点名称" :label-col="{ span:6 }" :wrapper-col="{ span:12}">
|
|
|
- <v-select v-model="searchForm.storeId" mode="multiple" placeholder="请选择" allowClear></v-select>
|
|
|
+ <a-select placeholder="请选择" allowClear v-model="storeId" mode="multiple">
|
|
|
+ <a-select-option v-for="item in storeOptionData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
@@ -28,9 +30,8 @@
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="服务项目" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
|
|
|
<a-select placeholder="请选择" allowClear v-model="searchForm.itemId">
|
|
|
- <a-select-option v-for="item in itemOptionData" :key="item.id" :value="item.id">{{ item.title }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in itemOptionData" :key="item.id" :value="item.id">{{ item.itemName }}</a-select-option>
|
|
|
</a-select>
|
|
|
- <!-- <v-select v-model="searchForm.itemId" placeholder="请选择" allowClear></v-select> -->
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
@@ -74,7 +75,7 @@
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import getDate from '../../libs/getDate.js'
|
|
|
- import { orderCenterList, itemList } from '../../api/order.js'
|
|
|
+ import { orderCenterList, itemList, storeList } from '../../api/order.js'
|
|
|
import moment from 'moment'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -83,21 +84,23 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ storeId: [], // 网点名称
|
|
|
// 查询参数
|
|
|
searchForm: {
|
|
|
beginDate: null, // 创建的开始时间
|
|
|
endDate: null, // 创建的结束时间
|
|
|
- storeId: '', // 网点名称
|
|
|
+ storeIdList: [], // 网点名称
|
|
|
orderNo: '', // 单号
|
|
|
itemId:'', // 服务项目
|
|
|
customerMobile:'', // 手机号码
|
|
|
orderStatus:'' // 状态
|
|
|
},
|
|
|
- pageNo:1,
|
|
|
- pageSize:10,
|
|
|
+ pageNo:1, // 列表当前页
|
|
|
+ pageSize:10, // 列表当前页码
|
|
|
countHJ:'40',
|
|
|
incomeHJ:'2000',
|
|
|
itemOptionData:[], // 服务项目数据
|
|
|
+ storeOptionData:[], // 网点名称数据
|
|
|
time: [
|
|
|
moment(getDate.getToday().starttime, this.dateFormat),
|
|
|
moment(getDate.getToday().endtime, this.dateFormat)
|
|
@@ -177,22 +180,11 @@
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
- /* return orderCenterList({
|
|
|
- pageNo:this.pageNo,
|
|
|
- pageSize:this.pageSize}).then(res=>{
|
|
|
- console.log(res,'--------------')
|
|
|
- if(res.status == 200){
|
|
|
- // for (let i = 0; i < res.data.list.length; i++) {
|
|
|
- // const _item = res.data.list[i]
|
|
|
- // // _item.status = _item.status + '' === '1'
|
|
|
- // }
|
|
|
- return res.data.list
|
|
|
- }
|
|
|
- }) */
|
|
|
-
|
|
|
-
|
|
|
+ console.log(this.searchForm.storeId)
|
|
|
this.searchForm.beginDate == null ? this.searchForm.beginDate = getDate.getToday().starttime : null
|
|
|
this.searchForm.endDate == null ? this.searchForm.endDate = getDate.getToday().endtime : null
|
|
|
+ this.searchForm.storeIdList = this.storeId
|
|
|
+ // console.log(this.searchForm.storeId)
|
|
|
return orderCenterList(Object.assign(parameter, this.searchForm)).then(res => {
|
|
|
console.log(res,'0000000000000000000')
|
|
|
if (res.status == 200) {
|
|
@@ -218,12 +210,29 @@
|
|
|
}
|
|
|
console.log(this.searchForm.beginDate, this.searchForm.endDate)
|
|
|
},
|
|
|
- //
|
|
|
+ // 获取服务项目数据
|
|
|
+ getItemListData(){
|
|
|
+ itemList({pageNo:this.pageNo,pageSize:this.pageSize}).then(res=>{
|
|
|
+ console.log(res,'-----------')
|
|
|
+ if(res.status == 200){
|
|
|
+ this.itemOptionData = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取网点名称数据
|
|
|
+ getStoreListData(){
|
|
|
+ storeList({pageNo:this.pageNo,pageSize:this.pageSize}).then(res=>{
|
|
|
+ console.log(res,'-----------')
|
|
|
+ if(res.status == 200){
|
|
|
+ this.storeOptionData = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 合计
|
|
|
getTotal(){},
|
|
|
// 查看详情--跳转到对应的详情页
|
|
|
- seeDetail(row) {
|
|
|
- this.$router.push({name: 'OrderDetail',query: {id: row.id}
|
|
|
+ seeDetail(record) {
|
|
|
+ this.$router.push({name: 'OrderDetail',query: {id: record.id}
|
|
|
})
|
|
|
},
|
|
|
// 退款
|
|
@@ -248,9 +257,28 @@
|
|
|
},
|
|
|
// 重置
|
|
|
resetForm() {
|
|
|
- this.$refs.searchForm.resetFields()
|
|
|
+ this.searchForm.beginDate = getDate.getToday().starttime
|
|
|
+ this.searchForm.endDate = getDate.getToday().endtime
|
|
|
+ this.time = [
|
|
|
+ moment(getDate.getToday().starttime, this.dateFormat),
|
|
|
+ moment(getDate.getToday().endtime, this.dateFormat)
|
|
|
+ ]
|
|
|
+ this.storeId = []
|
|
|
+ this.searchForm.storeIdList = []
|
|
|
+ this.searchForm.orderNo = ''
|
|
|
+ this.searchForm.itemId = ''
|
|
|
+ this.searchForm.customerMobile = ''
|
|
|
+ this.searchForm.orderStatus = ''
|
|
|
+ // this.$refs.searchForm.resetFields()
|
|
|
this.$refs.table.refresh()
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.getItemListData()
|
|
|
+ vm.resetForm()
|
|
|
+ vm.getStoreListData()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|