抖火综法

This commit is contained in:
唐明明
2023-05-23 17:20:12 +08:00
parent f7824e3e86
commit 9b00b0fe4a
22 changed files with 2092 additions and 102 deletions

View File

@@ -13,8 +13,8 @@
</view>
</u-sticky>
<!-- 列表 -->
<block v-if="orderArr.length > 0">
<view class="list" v-for="(item, index) in orderArr" :key="index">
<view class="list" v-if="orderArr.length > 0">
<block v-for="(item, index) in orderArr" :key="index">
<!-- 年费单 -->
<services-block
v-if="$Route.query.type === 'service'"
@@ -23,12 +23,16 @@
:user="item.user"
:time="item.created_at"
:service="item.service"
:price="item.price"
:price="item.total"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@info="onInfo"
@pay="onPay"
@sing="onSing"
@diff="onDiff"
@callPhone="onCallPhone"
/>
<!-- 咨询单 -->
<synthesis-block
@@ -51,13 +55,17 @@
:user="item.user"
:time="item.created_at"
:status="item.status"
:price="item.price"
:price="item.total"
:diff="item.need_pay_diff_prices"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@info="onInfo"
@pay="onPay"
@sing="onSing"
@diff="onDiff"
@callPhone="onCallPhone"
/>
<!-- 拓展单 -->
<expand-block
@@ -66,34 +74,37 @@
:user="item.user"
:time="item.created_at"
:expand="item.expand"
:price="item.price"
:price="item.total"
:status="item.status"
:diff="item.need_pay_diff_prices"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@info="onInfo"
@pay="onPay"
@diff="onDiff"
@callPhone="onCallPhone"
/>
</view>
</block>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</block>
<block v-else>
<view class="null-pages">
<u-empty
mode="order"
icon="http://cdn.uviewui.com/uview/empty/order.png"
text="暂无相关订单"
>
</u-empty>
</view>
</block>
</view>
<view class="null-pages" v-else>
<u-empty
mode="order"
icon="http://cdn.uviewui.com/uview/empty/order.png"
text="暂无相关订单"
>
</u-empty>
</view>
</view>
</template>
<script>
import { certified } from '@/apis/interfaces/user.js'
import { servicesOrder, synthesisOrder, entrustOrder, expandOrder, orderRead } from '@/apis/interfaces/synthesisOrder.js'
import { esignUrl } from '@/apis/interfaces/synthesis.js'
import entrustBlock from '@/components/entrustOrder.vue'
import expandBlock from '@/components/expandOrder.vue'
import servicesBlock from '@/components/servicesOrder.vue'
@@ -111,6 +122,7 @@
tabScroll : false,
orderArr : [],
funName : '',
isRefresh : false, // 更新页面数据
// 分页
page : {
current : 1
@@ -175,6 +187,12 @@
})
this.getList()
},
onShow() {
if(this.isRefresh){
this.page = { current: 1 }
this.getList()
}
},
methods: {
// 切换tab
onTab(e) {
@@ -185,15 +203,140 @@
this.getList()
}
},
// 签约
onSing(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
uni.showLoading({
title: '加载中...',
mask : true
})
certified().then(res => {
let { e_sign } = res
if(!e_sign){
uni.hideLoading()
uni.showModal({
title : '提示',
content : '暂未实名认证,请实名后在完成签约',
cancelText : '稍后认证',
confirmText : '去认证',
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({name: 'UserCertification'})
}
}
})
return
}
esignUrl({
order_type : orderObj.order_type,
order_id : orderObj.order_id,
app_scheme : "doufire://",
redirect_url: getApp().globalData.signUrl,
channel : "app"
}).then(signRes => {
this.$Router.push({
name: 'ESign',
params: {
url: signRes.sign_url
}
})
uni.hideLoading()
}).catch(signErr => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
// console.log(is_)
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 支付
onPay(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
let { can, price, order_id, order_type } = orderObj
console.log(orderObj)
switch(can.pay_status){
case 1:
this.expressSheet(order_id, order_type, can, price)
break;
case 2:
uni.showToast({
title: '打款凭证审核中,请耐心等待',
icon : 'none'
})
break;
case 3:
uni.showModal({
title : '审核被驳回',
content : '驳回原因:' + orderObj.offline_pays.remark,
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({
name : 'BankPay',
params : {
payId : orderObj.offline_pays.offline_pay_id,
type : 'edit',
orderId : orderObj.order_id,
orderType : orderObj.order_type.replace(/\\/g, '-'),
price : orderObj.price
}
})
}
}
})
break;
}
},
// 选择支付方式
expressSheet(id, type, can, price) {
this.price = price
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
title : '选择支付方式',
itemList: ['线下打款', '线上支付'],
success : res => {
console.log(res.tapIndex)
console.log(no)
}
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.push({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.push({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
},
// 打开详情
@@ -226,6 +369,18 @@
}
})
},
// 补差价
onDiff(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
this.$Router.push({
name : 'Difference',
params : {
orderId : orderObj.order_id,
ordertype : orderObj.order_type.replace(/\\/g, '-')
}
})
},
// 联系电话
async onCallPhone(number){
let result = await permision.requestAndroidPermission('android.permission.CALL_PHONE')
@@ -279,6 +434,9 @@
this.getList()
return
}
},
onHide() {
this.isRefresh = true
}
}
</script>
@@ -288,7 +446,7 @@
// 滑块
.header-sticky{ padding-bottom: 12rpx; }
// 列表
.list{ overflow: hidden; }
.list{ overflow: hidden; padding-top: 30rpx; }
// 内容为空
.null-pages{ height: 70vh; display: flex; align-items: center; justify-content: center; }
</style>