|
@@ -5,8 +5,8 @@
|
|
<u-dropdown-item v-model="value2" :title="options2[value2].label" @change="paychange" :options="options2"></u-dropdown-item>
|
|
<u-dropdown-item v-model="value2" :title="options2[value2].label" @change="paychange" :options="options2"></u-dropdown-item>
|
|
<u-dropdown-item v-model="value3" :title="options3[value3].label" @change="timechange" :options="options3"></u-dropdown-item>
|
|
<u-dropdown-item v-model="value3" :title="options3[value3].label" @change="timechange" :options="options3"></u-dropdown-item>
|
|
</u-dropdown>
|
|
</u-dropdown>
|
|
- <load-refresh ref="loadRefresh" :isRefresh="true" refreshType="loader" refreshTime="2000" heightReduce="10"
|
|
|
|
- backgroundCover="#fff" :pageNo="pageindex" :totalPageNo="totalPage" @loadMore="loadMore" @refresh="refresh">
|
|
|
|
|
|
+ <load-refresh ref="loadRefresh" :isRefresh="true" :isPaging="false" refreshType="loader" refreshTime="2000"
|
|
|
|
+ heightReduce="10" backgroundCover="#fff" :pageNo="pageindex" :totalPageNo="totalPage" @loadMore="loadMore" @refresh="refresh">
|
|
<view slot="content-list">
|
|
<view slot="content-list">
|
|
<view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder"
|
|
<view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder"
|
|
:data-id="item.id" :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
|
|
:data-id="item.id" :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
|
|
@@ -32,7 +32,8 @@
|
|
<view class="textstyle margin-top-xs flex align-center justify-between">
|
|
<view class="textstyle margin-top-xs flex align-center justify-between">
|
|
<text style="color: #333333;">科室:{{item.docter.office.name||'暂无'}} {{item.docter.qualification.name||'暂无'}}</text>
|
|
<text style="color: #333333;">科室:{{item.docter.office.name||'暂无'}} {{item.docter.qualification.name||'暂无'}}</text>
|
|
<text v-if="item.order_status==4&&item.product_type==2" class="text-blue" @click.stop="gosuggest(item)">意见单</text>
|
|
<text v-if="item.order_status==4&&item.product_type==2" class="text-blue" @click.stop="gosuggest(item)">意见单</text>
|
|
- <text v-else-if="item.order_status==1" class="text-blue">去支付</text>
|
|
|
|
|
|
+ <text v-else-if="item.order_status==1" @click.stop="payorder(item.id,item.payment_amount,item.product_type)"
|
|
|
|
+ class="text-blue">去支付</text>
|
|
<text v-else class="text-blue">查看详情</text>
|
|
<text v-else class="text-blue">查看详情</text>
|
|
</view>
|
|
</view>
|
|
<view class="textstyle margin-top-xs flex align-center justify-between">
|
|
<view class="textstyle margin-top-xs flex align-center justify-between">
|
|
@@ -50,6 +51,7 @@
|
|
<u-button shape="circle" size="mini" @click="cancelOrder(item,index)" :ripple="true">取消订单</u-button>
|
|
<u-button shape="circle" size="mini" @click="cancelOrder(item,index)" :ripple="true">取消订单</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-empty text="暂无数据" mode="order" :show="show" margin-top="250"></u-empty>
|
|
</view>
|
|
</view>
|
|
</load-refresh>
|
|
</load-refresh>
|
|
<!-- <view class="margin-lr-sm bg-white">
|
|
<!-- <view class="margin-lr-sm bg-white">
|
|
@@ -107,9 +109,24 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
- <u-empty text="暂无数据" mode="order" :show="show" margin-top="250"></u-empty>
|
|
|
|
<!-- <view class="cu-tabbar-height"></view>
|
|
<!-- <view class="cu-tabbar-height"></view>
|
|
<view class="cu-tabbar-height"></view> -->
|
|
<view class="cu-tabbar-height"></view> -->
|
|
|
|
+ <u-keyboard default="" ref="uKeyboard" mode="number" :mask="true" :mask-close-able="false" :dot-enabled="false"
|
|
|
|
+ v-model="showpay" :safe-area-inset-bottom="true" :tooltip="false" @change="onChange" @backspace="onBackspace">
|
|
|
|
+ <view>
|
|
|
|
+ <view class="u-text-center u-padding-20 money">
|
|
|
|
+ <text>{{payment_amount/100}}</text>
|
|
|
|
+ <text class="u-font-20 u-padding-left-10">元</text>
|
|
|
|
+ <view class="u-padding-10 close" data-flag="false" @tap="showPop(false)">
|
|
|
|
+ <u-icon name="close" color="#333333" size="28"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="u-flex u-row-center">
|
|
|
|
+ <u-message-input mode="box" :maxlength="6" :dot-fill="true" v-model="password" :disabled-keyboard="true" @finish="finish"></u-message-input>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">请输入密码</view>
|
|
|
|
+ </view>
|
|
|
|
+ </u-keyboard>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -138,9 +155,12 @@
|
|
getApp().globalData.imService.connectIM();
|
|
getApp().globalData.imService.connectIM();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.ordersList = []
|
|
|
|
+ this.pageindex = 1
|
|
|
|
+ this.getordersList()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getordersList()
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -203,7 +223,12 @@
|
|
content: "",
|
|
content: "",
|
|
currentorder: "",
|
|
currentorder: "",
|
|
evaluateindex: "",
|
|
evaluateindex: "",
|
|
- totalPage: ""
|
|
|
|
|
|
+ totalPage: "",
|
|
|
|
+ showpay: false,
|
|
|
|
+ payment_amount: "",
|
|
|
|
+ password: "",
|
|
|
|
+ payid: "",
|
|
|
|
+ paytype: ""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// onReachBottom() {
|
|
// onReachBottom() {
|
|
@@ -216,6 +241,69 @@
|
|
// uni.stopPullDownRefresh()
|
|
// uni.stopPullDownRefresh()
|
|
// },
|
|
// },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ payorder(id, price, type) {
|
|
|
|
+ this.showpay = true
|
|
|
|
+ this.payment_amount = price
|
|
|
|
+ this.payid = id
|
|
|
|
+ this.paytype = type
|
|
|
|
+ },
|
|
|
|
+ showPop(flag = true) {
|
|
|
|
+ this.password = '';
|
|
|
|
+ this.showpay = flag;
|
|
|
|
+ },
|
|
|
|
+ onChange(val) {
|
|
|
|
+ if (this.password.length < 6) {
|
|
|
|
+ this.password += val;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.password.length >= 6) {
|
|
|
|
+ this.paymoney()
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ paymoney: async function() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '支付中'
|
|
|
|
+ })
|
|
|
|
+ let res = await this.$request.post("/api/v1/order/orderPay", {
|
|
|
|
+ order_id: this.payid,
|
|
|
|
+ pay_password: this.password
|
|
|
|
+ })
|
|
|
|
+ if (res.status == 0) {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.showpay = false;
|
|
|
|
+ this.password = ""
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'success',
|
|
|
|
+ title: '支付成功',
|
|
|
|
+ duration: 1000
|
|
|
|
+ })
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../../order/order?type=" + this.paytype
|
|
|
|
+ })
|
|
|
|
+ }, 1000)
|
|
|
|
+ } else {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.password = ""
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: res.message,
|
|
|
|
+ confirmText: "确定",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: (rr) => {
|
|
|
|
+ if (rr.confirm) {
|
|
|
|
+ this.showpay = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onBackspace(e) {
|
|
|
|
+ if (this.password.length > 0) {
|
|
|
|
+ this.password = this.password.substring(0, this.password.length - 1);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
cancelOrder: async function(item, index) {
|
|
cancelOrder: async function(item, index) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: "提示",
|
|
title: "提示",
|
|
@@ -259,7 +347,7 @@
|
|
},
|
|
},
|
|
refresh() {
|
|
refresh() {
|
|
this.pageindex = 1
|
|
this.pageindex = 1
|
|
- // this.ordersList = []
|
|
|
|
|
|
+ this.ordersList = []
|
|
this.getordersList()
|
|
this.getordersList()
|
|
},
|
|
},
|
|
evaluate(item, index) {
|
|
evaluate(item, index) {
|
|
@@ -390,6 +478,24 @@
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .money {
|
|
|
|
+ font-size: 80rpx;
|
|
|
|
+ color: #fa3534;
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ .close {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 20rpx;
|
|
|
|
+ right: 20rpx;
|
|
|
|
+ line-height: 28rpx;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tips {
|
|
|
|
+ color: $u-tips-color;
|
|
|
|
+ }
|
|
|
|
+
|
|
.cancel {
|
|
.cancel {
|
|
width: 240rpx;
|
|
width: 240rpx;
|
|
height: 78rpx;
|
|
height: 78rpx;
|