商品订单
This commit is contained in:
parent
37ea3648d9
commit
8fa5ee73fb
@ -17,9 +17,13 @@ export function confirmReceipt(orderNo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function ssgoodsOrder(patientId, orderStatus, goodsOrderId, pageSize, pageNum, goodsName) {
|
export function ssgoodsOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/nurseApplet/nursingOrder/goodsOrder?patientId=${patientId}&orderStatus=${orderStatus}&goodsOrderId=${goodsOrderId}&pageSize=${pageSize}&pageNum=${pageNum}&goodsName=${goodsName}`,
|
url: '/nurseApplet/nursingOrder/goodsOrder',
|
||||||
method: 'GET'
|
method: 'post',
|
||||||
|
data,
|
||||||
|
header: {
|
||||||
|
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<view class="detailslist">
|
<view class="detailslist">
|
||||||
<image :src="baseurl+item.personPictureUrl" mode=""
|
<image :src="baseurl+item.personPictureUrl" mode=""
|
||||||
v-if="item.orderType =='HEALTH_CONSULTATION'&&item.personPictureUrl"></image>
|
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>
|
v-if="item.orderType =='HEALTH_CONSULTATION'&&!item.personPictureUrl"></image>
|
||||||
<image :src="baseurl+item.attributePitureUrl" mode=""
|
<image :src="baseurl+item.attributePitureUrl" mode=""
|
||||||
v-if="item.orderType !='HEALTH_CONSULTATION'"></image>
|
v-if="item.orderType !='HEALTH_CONSULTATION'"></image>
|
||||||
@ -149,6 +149,18 @@
|
|||||||
background: {
|
background: {
|
||||||
backgroundColor: '#26A888',
|
backgroundColor: '#26A888',
|
||||||
},
|
},
|
||||||
|
orderTypeList: {
|
||||||
|
patientId: '',
|
||||||
|
orderTypeList: [
|
||||||
|
'INTEGRAL_EXCHANGE',
|
||||||
|
'DIRECT_BUY',
|
||||||
|
|
||||||
|
],
|
||||||
|
orderStatus: '',
|
||||||
|
pageSize: 15, //
|
||||||
|
pageNum: 1, //
|
||||||
|
goodsName: '',
|
||||||
|
},
|
||||||
orderNoitem: null,
|
orderNoitem: null,
|
||||||
patientId: '',
|
patientId: '',
|
||||||
openid: '',
|
openid: '',
|
||||||
@ -170,7 +182,7 @@
|
|||||||
tabschange(index) {
|
tabschange(index) {
|
||||||
console.log(this.tabslist)
|
console.log(this.tabslist)
|
||||||
this.tabscurrent = index;
|
this.tabscurrent = index;
|
||||||
this.orderStatus = this.tabslist[index].orderStatus
|
this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
|
||||||
this.goodsOrderinfo();
|
this.goodsOrderinfo();
|
||||||
},
|
},
|
||||||
//返回上一页
|
//返回上一页
|
||||||
@ -217,7 +229,7 @@
|
|||||||
//支付
|
//支付
|
||||||
buy(item) {
|
buy(item) {
|
||||||
let obj = {
|
let obj = {
|
||||||
patientId: this.patientId,
|
patientId: this.orderTypeList.patientId,
|
||||||
openid: this.openid,
|
openid: this.openid,
|
||||||
orderNo: item.goOrderNo,
|
orderNo: item.goOrderNo,
|
||||||
orderChannel: "WECHAT_APPLET",
|
orderChannel: "WECHAT_APPLET",
|
||||||
@ -280,8 +292,7 @@
|
|||||||
},
|
},
|
||||||
//商品订单请求
|
//商品订单请求
|
||||||
goodsOrderinfo() {
|
goodsOrderinfo() {
|
||||||
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
|
ssgoodsOrder(this.orderTypeList).then(
|
||||||
.goodsName).then(
|
|
||||||
res => {
|
res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.orderlist = res.rows
|
this.orderlist = res.rows
|
||||||
@ -329,11 +340,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
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');
|
||||||
if (value && value2) {
|
if (value && value2) {
|
||||||
that.patientId = value
|
that.orderTypeList.patientId = value
|
||||||
that.openid = value2
|
that.openid = value2
|
||||||
if (options.orderStatus) {
|
if (options.orderStatus) {
|
||||||
that.tabscurrent = options.toindex
|
that.tabscurrent = options.toindex
|
||||||
@ -352,8 +364,7 @@
|
|||||||
onReachBottom() { //下滑加载
|
onReachBottom() { //下滑加载
|
||||||
if (this.orderlist.length >= this.total) {} else {
|
if (this.orderlist.length >= this.total) {} else {
|
||||||
this.pageNum++;
|
this.pageNum++;
|
||||||
ssgoodsOrder(this.patientId, this.orderStatus, this.goodsOrderId, this.pageSize, this.pageNum, this
|
ssgoodsOrder(this.orderTypeList).then(res => {
|
||||||
.goodsName).then(res => {
|
|
||||||
res.rows.forEach(e => {
|
res.rows.forEach(e => {
|
||||||
// e.timestamp = null
|
// e.timestamp = null
|
||||||
// var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 2)
|
// var time = new Date(e.orderTime).getTime() / 1000 + (60 * 60 * 2)
|
||||||
@ -377,4 +388,4 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "./CommodityOrder.scss";
|
@import "./CommodityOrder.scss";
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user