商品订单

This commit is contained in:
闫晓茹 2023-10-27 16:15:23 +08:00
parent 37ea3648d9
commit 8fa5ee73fb
2 changed files with 27 additions and 12 deletions

View File

@ -17,9 +17,13 @@ export function confirmReceipt(orderNo) {
}
export function ssgoodsOrder(patientId, orderStatus, goodsOrderId, pageSize, pageNum, goodsName) {
export function ssgoodsOrder(data) {
return request({
url: `/nurseApplet/nursingOrder/goodsOrder?patientId=${patientId}&orderStatus=${orderStatus}&goodsOrderId=${goodsOrderId}&pageSize=${pageSize}&pageNum=${pageNum}&goodsName=${goodsName}`,
method: 'GET'
url: '/nurseApplet/nursingOrder/goodsOrder',
method: 'post',
data,
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
})
}

View File

@ -35,7 +35,7 @@
<view class="detailslist">
<image :src="baseurl+item.personPictureUrl" mode=""
v-if="item.orderType =='HEALTH_CONSULTATION'&&item.personPictureUrl"></image>
<image src="@/static/docHead.png" mode=""
<image src="@/static/pagesB/yis.png" mode=""
v-if="item.orderType =='HEALTH_CONSULTATION'&&!item.personPictureUrl"></image>
<image :src="baseurl+item.attributePitureUrl" mode=""
v-if="item.orderType !='HEALTH_CONSULTATION'"></image>
@ -149,6 +149,18 @@
background: {
backgroundColor: '#26A888',
},
orderTypeList: {
patientId: '',
orderTypeList: [
'INTEGRAL_EXCHANGE',
'DIRECT_BUY',
],
orderStatus: '',
pageSize: 15, //
pageNum: 1, //
goodsName: '',
},
orderNoitem: null,
patientId: '',
openid: '',
@ -170,7 +182,7 @@
tabschange(index) {
console.log(this.tabslist)
this.tabscurrent = index;
this.orderStatus = this.tabslist[index].orderStatus
this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
this.goodsOrderinfo();
},
//
@ -217,7 +229,7 @@
//
buy(item) {
let obj = {
patientId: this.patientId,
patientId: this.orderTypeList.patientId,
openid: this.openid,
orderNo: item.goOrderNo,
orderChannel: "WECHAT_APPLET",
@ -280,8 +292,7 @@
},
//
goodsOrderinfo() {
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then(
ssgoodsOrder(this.orderTypeList).then(
res => {
if (res.code == 200) {
this.orderlist = res.rows
@ -329,11 +340,12 @@
}
},
onLoad(options) { //
console.log(options, '898')
let that = this
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
that.patientId = value
that.orderTypeList.patientId = value
that.openid = value2
if (options.orderStatus) {
that.tabscurrent = options.toindex
@ -352,8 +364,7 @@
onReachBottom() { //
if (this.orderlist.length >= this.total) {} else {
this.pageNum++;
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
.goodsName).then(res => {
ssgoodsOrder(this.orderTypeList).then(res => {
res.rows.forEach(e => {
// e.timestamp = null
// var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 2)
@ -377,4 +388,4 @@
<style lang="scss">
@import "./CommodityOrder.scss";
</style>
</style>