This commit is contained in:
2023-10-27 16:37:28 +08:00
parent 469a9cc6b0
commit 2a68a6f2b8
5 changed files with 59 additions and 56 deletions

View File

@ -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) {

View File

@ -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,
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();
}
}

View File

@ -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"
@ -154,7 +154,6 @@
orderTypeList: [
'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');

View File

@ -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'
})
}

View File

@ -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,7 +286,8 @@
})
},
goodsOrderinfo() {
goodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum).then(res => {
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)
@ -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
}
}
}