Commit 3e6c24b5 authored by xiejb's avatar xiejb

我的订单 高级搜索刷新列表

parent 84620257
...@@ -220,7 +220,6 @@ export default { ...@@ -220,7 +220,6 @@ export default {
}, },
onSearchClick() { onSearchClick() {
this.moreSearchShow = false this.moreSearchShow = false
console.log(this.moreSearchInfo)
this.$emit('onsearch', this.moreSearchInfo) this.$emit('onsearch', this.moreSearchInfo)
}, },
onCleanClick() { onCleanClick() {
...@@ -236,8 +235,8 @@ export default { ...@@ -236,8 +235,8 @@ export default {
}, },
} }
console.log(this.moreSearchInfo) console.log(this.moreSearchInfo)
// this.moreSearchShow = false this.moreSearchShow = false
// this.$emit('onsearch', this.moreSearchInfo) this.$emit('onsearch', this.moreSearchInfo)
}, },
showPost(type) { showPost(type) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
v-for="(item, index) in tabsTitle" v-for="(item, index) in tabsTitle"
:key="index" :key="index"
:title="item.title"> :title="item.title">
<my-order-list @orderItemAction="orderItemAction"/> <my-order-list :ref="item.name" :activeTab="activeTab" :more-search-info="moreSearchInfo" @orderItemAction="orderItemAction"/>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<high-search v-model="moreSearchShow" @onsearch="moreSearchConfirm" @onclean="moreSearchClean"/> <high-search v-model="moreSearchShow" @onsearch="moreSearchConfirm" @onclean="moreSearchClean"/>
...@@ -34,11 +34,11 @@ import myOrderList from './myOrderList.vue' ...@@ -34,11 +34,11 @@ import myOrderList from './myOrderList.vue'
import HighSearch from './components/HighSearch.vue' import HighSearch from './components/HighSearch.vue'
import {getFormateDate} from '@/utils/common' import {getFormateDate} from '@/utils/common'
const allTabsTitle = [ const allTabsTitle = [
{title: '全部', name: 'home'}, {title: '全部', name: 'all'},
{title: '已开单', name: 'monitor'}, {title: '已开单', name: 'billing'},
{title: '已发货', name: 'purchase'}, {title: '已发货', name: 'ship'},
{title: '已完成', name: 'sales'}, {title: '已完成', name: 'carryOut'},
{title: '已取消', name: 'stock'} {title: '已取消', name: 'cancel'}
] ]
export default { export default {
components: { components: {
...@@ -51,15 +51,15 @@ export default { ...@@ -51,15 +51,15 @@ export default {
moreSearchShow: false, moreSearchShow: false,
activeTab: 'home', activeTab: 'home',
moreSearchInfo: { moreSearchInfo: {
//接收搜索更多回传的数据 supplier: '', // 供应商
supplier: { comPartyId: "" }, //供应商ID consignor: [], // 货主
goods: { comGoodsId: "" }, //商品ID goods: '', // 商品
orderNo: "", //订单编号 client: '', // 客户
orderNo: '',
time: { time: {
//起始时间 start: getFormateDate(new Date(), 'yyyy-MM-dd'),
start: getFormateDate(new Date(), "yyyy-MM-dd"), end: getFormateDate(new Date(), 'yyyy-MM-dd')
end: getFormateDate(new Date(), "yyyy-MM-dd"), }
},
} }
} }
}, },
...@@ -156,28 +156,27 @@ export default { ...@@ -156,28 +156,27 @@ export default {
}, },
// 高级搜索查询 // 高级搜索查询
moreSearchConfirm(data) { moreSearchConfirm(data) {
console.log('000000000') this.tabsTitleData()
this.$nextTick(() => {
this.activeTab = 'all'
console.log(Object.keys(this.$refs))
this.$refs.all[0].httpAction(this.moreSearchInfo)
})
this.moreSearchInfo = JSON.parse(JSON.stringify(data))
}, },
// 高级搜索取消 // 高级搜索取消
moreSearchClean(data) { moreSearchClean(data) {
this.moreSearchInfo = data; this.moreSearchInfo = JSON.parse(JSON.stringify(data))
},
addNextTab(pos) {
// 加载下一个页面
this.tabsTitle = allTabsTitle.slice(0, pos)
let nextTab = allTabsTitle[pos]
this.tabsTitle.push(nextTab)
this.$nextTick(() => {
this.activeName = nextTab.name
})
}, },
/// 处理tabsTitle /// 处理tabsTitle
tabsTitleData() { tabsTitleData() {
this.tabsTitle = [] this.tabsTitle = [{title: '全部', name: 'all'}]
for (let i = 0; i < allTabsTitle.length; i++) { for (let i = 0; i < allTabsTitle.length; i++) {
let dic = allTabsTitle[i] let dic = allTabsTitle[i]
if (dic.name !== 'all') {
this.tabsTitle.push(dic) this.tabsTitle.push(dic)
} }
}
}, },
closeAppPage() { closeAppPage() {
console.log('关闭页面') console.log('关闭页面')
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
// 引入接口 // 引入接口
import { getMyOrderList } from '@/api/myOrder' import { getMyOrderList } from '@/api/myOrder'
import orderListItem from './orderListItem.vue' import orderListItem from './orderListItem.vue'
import { valid } from 'semver'
export default { export default {
name: 'MyOrderList', name: 'MyOrderList',
components: { components: {
...@@ -85,6 +86,16 @@ export default { ...@@ -85,6 +86,16 @@ export default {
sphImage: require('@/assets/img/u48.png'), sphImage: require('@/assets/img/u48.png'),
} }
}, },
props: {
moreSearchInfo: {
type: Object,
default: () => {
return {
}
}
},
activeTab: ''
},
computed: { computed: {
linkInfo () { linkInfo () {
return this.$store.state.linkInfo return this.$store.state.linkInfo
...@@ -100,7 +111,17 @@ export default { ...@@ -100,7 +111,17 @@ export default {
mounted() { mounted() {
// this.onLoad() // this.onLoad()
}, },
watch: {
activeTab(val) {
}
},
methods: { methods: {
// 接口
httpAction(moreSearchModel) {
this.moreSearchInfo = moreSearchModel
console.log(this.moreSearchInfo)
// this.onRefresh()
},
// 单个发票点击事件 // 单个发票点击事件
orderItemAction(model) { orderItemAction(model) {
this.$emit('orderItemAction', model) this.$emit('orderItemAction', model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment