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