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

View File

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

View File

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

View File

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

View File

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