Commit cfc66484 authored by xiejb's avatar xiejb

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

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