修改
This commit is contained in:
parent
469a9cc6b0
commit
2a68a6f2b8
@ -1,15 +1,5 @@
|
||||
import request from "../../request.js"
|
||||
|
||||
export function goodsOrder(patientId, orderStatus, goodsOrderId, pageSize, pageNum) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingOrder/goodsOrder?patientId=${patientId}&orderStatus=${orderStatus}&goodsOrderId=${goodsOrderId}&pageSize=${pageSize}&pageNum=${pageNum}`,
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//收货
|
||||
export function confirmReceipt(orderNo) {
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
goodsOrder
|
||||
ssgoodsOrder
|
||||
} from '@/api/pagesB/CommodityOrder/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
@ -49,28 +49,38 @@
|
||||
return {
|
||||
baseurl: '',
|
||||
Aftersalesorder: null,
|
||||
patientId: '', //用户id
|
||||
goodsOrderId: '', //订单id
|
||||
orderStatus: '', //状态 不传
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
orderTypeList: {
|
||||
goodsOrderId: null,
|
||||
patientId: '',
|
||||
openid: null,
|
||||
orderTypeList: [
|
||||
'INTEGRAL_EXCHANGE',
|
||||
'DIRECT_BUY',
|
||||
],
|
||||
orderStatus: '',
|
||||
pageSize: 15,
|
||||
pageNum: 1,
|
||||
goodsName: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goodsOrderinfo() {
|
||||
goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(
|
||||
ssgoodsOrder(this.orderTypeList).then(
|
||||
res => {
|
||||
this.Aftersalesorder = res.rows[0]
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.goodsOrderId = options.goodsOrderId
|
||||
this.orderTypeList.goodsOrderId = options.goodsOrderId
|
||||
this.baseurl = baseurl
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {
|
||||
that.patientId = value
|
||||
const openid = uni.getStorageSync('openid');
|
||||
if (value && openid) {
|
||||
that.orderTypeList.patientId = value
|
||||
that.orderTypeList.openid = openid
|
||||
that.goodsOrderinfo();
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="anniu">
|
||||
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;"
|
||||
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;color:#fff"
|
||||
@tap='goorderdetails(item)'>退款中
|
||||
</view>
|
||||
<view class="logistics"
|
||||
@ -152,9 +152,8 @@
|
||||
orderTypeList: {
|
||||
patientId: '',
|
||||
orderTypeList: [
|
||||
'INTEGRAL_EXCHANGE',
|
||||
'DIRECT_BUY',
|
||||
|
||||
'INTEGRAL_EXCHANGE',
|
||||
'DIRECT_BUY',
|
||||
],
|
||||
orderStatus: '',
|
||||
pageSize: 15, //
|
||||
@ -162,7 +161,6 @@
|
||||
goodsName: '',
|
||||
},
|
||||
orderNoitem: null,
|
||||
patientId: '',
|
||||
openid: '',
|
||||
baseurl: '', //url
|
||||
orderlist: [], //商品订单list
|
||||
@ -180,7 +178,6 @@
|
||||
methods: {
|
||||
//点击tabs
|
||||
tabschange(index) {
|
||||
console.log(this.tabslist)
|
||||
this.tabscurrent = index;
|
||||
this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
|
||||
this.goodsOrderinfo();
|
||||
@ -340,7 +337,6 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) { //开局调用
|
||||
console.log(options, '898')
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value2 = uni.getStorageSync('openid');
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
<span>确认完成</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -36,9 +35,9 @@
|
||||
},
|
||||
methods: {
|
||||
// 待咨询
|
||||
consulted(){
|
||||
consulted() {
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/consulted/consulted'
|
||||
url: '/pagesB/consulted/consulted'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@
|
||||
} from '@/api/pagesB/confirmOrder/index.js'
|
||||
import {
|
||||
confirmReceipt,
|
||||
goodsOrder
|
||||
ssgoodsOrder
|
||||
} from '@/api/pagesB/CommodityOrder/index.js'
|
||||
import {
|
||||
handCloseOrder
|
||||
@ -153,16 +153,23 @@
|
||||
return {
|
||||
baseurl: '',
|
||||
order: null,
|
||||
patientId: '',
|
||||
openid: null,
|
||||
show: false, //收货
|
||||
orderStatus: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
timestamp: 0,
|
||||
goodsOrderId: null,
|
||||
timecount: undefined,
|
||||
Timers: null,
|
||||
orderTypeList: {
|
||||
goodsOrderId: null,
|
||||
patientId: '',
|
||||
openid: null,
|
||||
orderTypeList: [
|
||||
'INTEGRAL_EXCHANGE',
|
||||
'DIRECT_BUY',
|
||||
],
|
||||
orderStatus: '',
|
||||
pageSize: 15,
|
||||
pageNum: 1,
|
||||
goodsName: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
@ -232,7 +239,7 @@
|
||||
pay() {
|
||||
var that = this
|
||||
let paydata = this.order
|
||||
paydata.openid = this.openid
|
||||
paydata.openid = this.orderTypeList.openid
|
||||
paydata.payType = "WECHAT_PAY"
|
||||
paydata.paymentPrice = this.order.totalPrice
|
||||
paydata.orderChannel = 'WECHAT_APPLET'
|
||||
@ -279,19 +286,20 @@
|
||||
})
|
||||
},
|
||||
goodsOrderinfo() {
|
||||
goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(res => {
|
||||
this.order = res.rows[0]
|
||||
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
|
||||
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
|
||||
var times = new Date().getTime() / 1000
|
||||
this.timestamp = time - times
|
||||
if (this.timestamp >= 0) {
|
||||
this.timecount = this.timestamp
|
||||
this.Timers = setInterval(() => {
|
||||
this.timecount--;
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
ssgoodsOrder(this.orderTypeList).then(
|
||||
res => {
|
||||
this.order = res.rows[0]
|
||||
var ordertimes = this.order.orderTime.replaceAll(/\-/gi, "/")
|
||||
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
|
||||
var times = new Date().getTime() / 1000
|
||||
this.timestamp = time - times
|
||||
if (this.timestamp >= 0) {
|
||||
this.timecount = this.timestamp
|
||||
this.Timers = setInterval(() => {
|
||||
this.timecount--;
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
//跳转售后详情
|
||||
goAftersalesdetails(item) {
|
||||
@ -305,13 +313,13 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.baseurl = baseurl
|
||||
this.goodsOrderId = options.goodsOrderId
|
||||
this.orderTypeList.goodsOrderId = options.goodsOrderId
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
const value2 = uni.getStorageSync('openid');
|
||||
if (value && value2) {
|
||||
that.patientId = value
|
||||
that.openid = value2
|
||||
that.orderTypeList.patientId = value
|
||||
that.orderTypeList.openid = value2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user