Commit cfc66484 authored by xiejb's avatar xiejb

订单列表时间查询 没有更新的问题

parent dbd33510
...@@ -8,6 +8,15 @@ export function getMyOrderList(params) { ...@@ -8,6 +8,15 @@ export function getMyOrderList(params) {
loading: true loading: true
}) })
} }
// 获取订单详情
export function getMyOrderDetail(params) {
return fetch({
url: '/OrderLife/queryOrderDetail',
method: 'post',
data: params,
loading: true
})
}
// 配送信息查询 // 配送信息查询
export function getDeliveryOrder(params) { export function getDeliveryOrder(params) {
return fetch({ return fetch({
......
...@@ -31,21 +31,22 @@ ...@@ -31,21 +31,22 @@
</template> </template>
<script> <script>
import { getFormateDate } from '@/utils/common' import { getFormateDate, addDateStr } from '@/utils/common'
export default { export default {
name: 'CgTimeChoose', name: 'CgTimeChoose',
data() { data() {
return { return {
selector: '', selector: '',
start: getFormateDate(new Date(), 'yyyy-MM-dd'), start: addDateStr(new Date(),0),
end: getFormateDate(new Date(), 'yyyy-MM-dd'), end: addDateStr(new Date(),0),
minDate: new Date(), minDate: new Date(),
maxDate: new Date(), maxDate: new Date(),
showTimeDialog: false, showTimeDialog: false,
currentDate: new Date(), currentDate: new Date(),
startDate: new Date(), startDate: new Date(),
endDate: new Date() endDate: new Date(),
maxDateNum: 30
} }
}, },
props: { props: {
...@@ -126,9 +127,9 @@ export default { ...@@ -126,9 +127,9 @@ export default {
// 时间处理 // 时间处理
timeAction(startTime,endTime,data) { timeAction(startTime,endTime,data) {
if (this.selector == 'start'){ if (this.selector == 'start'){
if (this.timeIntervalNum(startTime,endTime) > 99) { if (this.timeIntervalNum(startTime,endTime) > (this.maxDateNum -1)) {
this[this.selector] = getFormateDate(new Date(data), 'yyyy-MM-dd') this[this.selector] = getFormateDate(new Date(data), 'yyyy-MM-dd')
this.end = this.addDateStr(startTime,100) this.end = this.addDateStr(startTime,this.maxDateNum)
return return
} else if (this.timeIntervalNum(startTime,endTime) < 0) { } else if (this.timeIntervalNum(startTime,endTime) < 0) {
this[this.selector] = getFormateDate(new Date(data), 'yyyy-MM-dd') this[this.selector] = getFormateDate(new Date(data), 'yyyy-MM-dd')
...@@ -185,12 +186,12 @@ export default { ...@@ -185,12 +186,12 @@ export default {
this.maxDate = value this.maxDate = value
this.minDate = value this.minDate = value
} else { } else {
if (this.timeIntervalNum(this.start,this.end) > 99) { if (this.timeIntervalNum(this.start,this.end) > (this.maxDateNum - 1)) {
this.maxDate = new Date(this.getDay(value,100)) this.maxDate = new Date(this.getDay(value,this.maxDateNum))
} else if (this.timeIntervalNum(this.start,getFormateDate(new Date(), 'yyyy-MM-dd')) <= 99) { } else if (this.timeIntervalNum(this.start,getFormateDate(new Date(), 'yyyy-MM-dd')) <= (this.maxDateNum - 1)) {
this.maxDate = new Date() this.maxDate = new Date()
} else { } else {
this.maxDate = new Date(this.getDay(this.start,100)) this.maxDate = new Date(this.getDay(this.start,this.maxDateNum))
} }
this.minDate = value this.minDate = value
} }
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</template> </template>
<script> <script>
import TimeChoose from '@/components/TimeChoose' import TimeChoose from '@/components/CgTimeChoose'
import {getFormateDate} from '@/utils/common' import {getFormateDate} from '@/utils/common'
// 供应商 // 供应商
import SearchInSupplier from "@/components/SearchInSupplier"; import SearchInSupplier from "@/components/SearchInSupplier";
...@@ -167,15 +167,15 @@ export default { ...@@ -167,15 +167,15 @@ export default {
{ {
name: '本月', name: '本月',
active: false active: false
},
{
name: '本季',
active: false
},
{
name: '本年',
active: false
} }
// {
// name: '本季',
// active: false
// },
// {
// name: '本年',
// active: false
// }
] ]
} }
}, },
...@@ -280,9 +280,10 @@ export default { ...@@ -280,9 +280,10 @@ export default {
end: getFormateDate(new Date(), 'yyyy-MM-dd') end: getFormateDate(new Date(), 'yyyy-MM-dd')
}, },
} }
this.onQuickDateChoose(0, '')
// 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) {
...@@ -353,6 +354,7 @@ export default { ...@@ -353,6 +354,7 @@ export default {
return model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName return model.comGoodsId + '/(' + model.goodsOpcode + ')' + model.goodsName + '/' + model.goodsDesc + '/' + model.partyName + '/' + model.packageNum + '/' + model.unitName
}, },
onQuickDateChoose(index, tag) { onQuickDateChoose(index, tag) {
console.log(index,tag)
let _this = this let _this = this
_this.dataType = this.dataType.map(item => { _this.dataType = this.dataType.map(item => {
item.active = false item.active = false
......
...@@ -35,7 +35,7 @@ import {AmountNumFormat} from '@/utils/common' ...@@ -35,7 +35,7 @@ import {AmountNumFormat} from '@/utils/common'
import goodsInfoDetail from "../components/goodsInfoDetail" import goodsInfoDetail from "../components/goodsInfoDetail"
import goodsInfoListItem from "./goodsInfoListItem" import goodsInfoListItem from "./goodsInfoListItem"
import GoodsHighSearch from "../components/goodsHighSearch" import GoodsHighSearch from "../components/goodsHighSearch"
import {getMyOrderList} from '@/api/myOrder' import {getMyOrderDetail} from '@/api/myOrder'
export default { export default {
name: "goodsInfo", name: "goodsInfo",
components: { components: {
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
'mdmClientCode': '', 'mdmClientCode': '',
'order': '', 'order': '',
'orderId': this.orderItem.orderId, // 19977352;19965720 'orderId': this.orderItem.orderId, // 19977352;19965720
'orderNo': '', // 225202103170165 'orderNo': this.orderItem.orderNo, // 225202103170165
'orderStatusCode': '', 'orderStatusCode': '',
'orderType': this.orderItem.orderType, 'orderType': this.orderItem.orderType,
'pageNum': 1, 'pageNum': 1,
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
'startDate': '', 'startDate': '',
'supplierId': [] 'supplierId': []
} }
getMyOrderList(params).then(res => { getMyOrderDetail(params).then(res => {
this.detailData = { this.detailData = {
goodsInfos: [], goodsInfos: [],
orderTotalAmount: '0' orderTotalAmount: '0'
......
...@@ -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 :ref="item.name" :orderTypeCode="item.orderTypeCode" :activeTab="activeTab" @orderItemAction="orderItemAction"/> <my-order-list :more-search-info="moreSearchInfo" :ref="item.name" :orderTypeCode="item.orderTypeCode" :activeTab="activeTab" @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"/>
...@@ -170,15 +170,15 @@ export default { ...@@ -170,15 +170,15 @@ export default {
}, },
// 高级搜索查询 // 高级搜索查询
moreSearchConfirm(data) { moreSearchConfirm(data) {
this.moreSearchInfo = JSON.parse(JSON.stringify(data))
console.log(this.moreSearchInfo)
this.tabsTitleData() this.tabsTitleData()
this.$nextTick(() => { this.$nextTick(() => {
this.activeTab = 'all' this.activeTab = 'all'
// console.log(Object.keys(this.$refs)) // console.log(Object.keys(this.$refs))
// this.$refs.all[0].httpAction(this.moreSearchInfo) // this.$refs.all[0].httpAction(this.moreSearchInfo)
this.$EventBus.$emit('myOrderMoreSearch', this.moreSearchInfo)
}) })
this.moreSearchInfo = JSON.parse(JSON.stringify(data))
console.log(this.moreSearchInfo)
this.$EventBus.$emit('myOrderMoreSearch', this.moreSearchInfo)
}, },
// 高级搜索取消 // 高级搜索取消
moreSearchClean(data) { moreSearchClean(data) {
......
...@@ -85,18 +85,10 @@ export default { ...@@ -85,18 +85,10 @@ export default {
scrollPos: 0, scrollPos: 0,
orderList: [], orderList: [],
orderItem: {}, orderItem: {},
sphImage: require('@/assets/img/u48.png'), sphImage: require('@/assets/img/u48.png')
moreSearchInfo: { // moreSearchInfo: {
supplier: '', // 供应商
consignor: [], // 货主 // }
goods: '', // 商品
client: '', // 客户
orderNo: '',
time: {
start: getFormateDate(new Date(), 'yyyy-MM-dd'),
end: getFormateDate(new Date(), 'yyyy-MM-dd')
}
}
} }
}, },
props: { props: {
...@@ -104,6 +96,22 @@ export default { ...@@ -104,6 +96,22 @@ export default {
orderTypeCode: { orderTypeCode: {
type: String, type: String,
default: '' default: ''
},
moreSearchInfo: {
type: Object,
default: () => {
return {
supplier: '', // 供应商
consignor: [], // 货主
goods: '', // 商品
client: '', // 客户
orderNo: '',
time: {
start: getFormateDate(new Date(), 'yyyy-MM-dd'),
end: getFormateDate(new Date(), 'yyyy-MM-dd')
}
}
}
} }
}, },
computed: { computed: {
...@@ -131,7 +139,8 @@ export default { ...@@ -131,7 +139,8 @@ export default {
}) })
}, },
watch: { watch: {
activeTab(val) { moreSearchModel(val) {
thid.moreSearchInfo = val
} }
}, },
methods: { methods: {
......
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