新增账户管理和委托管理模块
This commit is contained in:
1
App.vue
1
App.vue
@@ -2,6 +2,7 @@
|
|||||||
import { getVersions } from './apis/interfaces/versions'
|
import { getVersions } from './apis/interfaces/versions'
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
|
return
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
// 获取系统版本号
|
// 获取系统版本号
|
||||||
getVersions({
|
getVersions({
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import router from '../router'
|
|||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
||||||
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
apiUrl : 'https://douhuo.demos.uzchain.tech/api/', //测试环境
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,72 @@ const fwbDetail = (service) =>{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 账户管理类
|
||||||
|
const accountManagement = () => {
|
||||||
|
return request({
|
||||||
|
url: "account_management/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账户管理类 - 办理
|
||||||
|
const accountFrom = (data, id) => {
|
||||||
|
return request({
|
||||||
|
url : "account_management/" + id + "/store",
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账户管理类 - 订单
|
||||||
|
const accountOrder = data => {
|
||||||
|
console.log(data)
|
||||||
|
return request({
|
||||||
|
url : "account_management/order/lists",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账户管理类 - 取消订单
|
||||||
|
const accountCancel = id => {
|
||||||
|
return request({
|
||||||
|
url : "account_management/order/" + id + "/cancel",
|
||||||
|
method : "DELETE"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 委托管理类
|
||||||
|
const delegation = () => {
|
||||||
|
return request({
|
||||||
|
url: "delegation/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 委托管理类 - 办理
|
||||||
|
const delegationFrom = (data, id) => {
|
||||||
|
return request({
|
||||||
|
url : "delegation/" + id + "/store",
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 委托管理类 - 订单
|
||||||
|
const delegationOrder = data => {
|
||||||
|
return request({
|
||||||
|
url : "delegation/order/lists",
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 委托管理类 - 取消订单
|
||||||
|
const delegationCancel = id => {
|
||||||
|
return request({
|
||||||
|
url : "delegation/order/" + id + "/cancel",
|
||||||
|
method : "DELETE"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
categories,
|
categories,
|
||||||
jf,
|
jf,
|
||||||
@@ -62,5 +128,13 @@ export {
|
|||||||
index,
|
index,
|
||||||
recharge,
|
recharge,
|
||||||
zyPay,
|
zyPay,
|
||||||
|
accountManagement,
|
||||||
|
accountFrom,
|
||||||
|
accountOrder,
|
||||||
|
accountCancel,
|
||||||
|
delegation,
|
||||||
|
delegationFrom,
|
||||||
|
delegationOrder,
|
||||||
|
delegationCancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,15 @@ const coinSynthesize = data => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 现在打款支付
|
||||||
|
const cashierOffline = data => {
|
||||||
|
return request({
|
||||||
|
url : 'pay/cashier_desk/offline',
|
||||||
|
data,
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
coinPay,
|
coinPay,
|
||||||
diffCoinPay,
|
diffCoinPay,
|
||||||
@@ -127,5 +136,6 @@ export {
|
|||||||
dgFree,
|
dgFree,
|
||||||
umsSynthesize,
|
umsSynthesize,
|
||||||
dgSynthesize,
|
dgSynthesize,
|
||||||
coinSynthesize
|
coinSynthesize,
|
||||||
|
cashierOffline
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,9 @@
|
|||||||
import { uploading as upd } from '../index'
|
import { uploading as upd } from '../index'
|
||||||
|
|
||||||
const uploads = (paths, fromData) => {
|
const uploads = (paths, fromData) => {
|
||||||
|
|
||||||
|
console.log(paths)
|
||||||
|
|
||||||
return upd(paths, fromData)
|
return upd(paths, fromData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "抖火法律",
|
"name" : "抖火法律",
|
||||||
"appid" : "__UNI__C305C03",
|
"appid" : "__UNI__C305C03",
|
||||||
"description" : "纵有疾风起,人生不言弃",
|
"description" : "纵有疾风起,人生不言弃",
|
||||||
"versionName" : "1.6.2",
|
"versionName" : "1.6.4",
|
||||||
"versionCode" : 1062,
|
"versionCode" : 1064,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
33
pages.json
33
pages.json
@@ -881,6 +881,39 @@
|
|||||||
"navigationBarBackgroundColor": "#446EFE",
|
"navigationBarBackgroundColor": "#446EFE",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/management/account",
|
||||||
|
"name" : "MagAccount",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "账户咨询办理",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/management/delegation",
|
||||||
|
"name" : "MagDelegation",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "委托管理办理",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/work/account",
|
||||||
|
"name" : "AccountWork",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "账户管理咨询类",
|
||||||
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/work/delegation",
|
||||||
|
"name" : "DelegationWork",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "委托管理类",
|
||||||
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
|
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 协商调解类 -->
|
<!-- 协商调解类 -->
|
||||||
<view class="block">
|
<view class="block" v-if="false">
|
||||||
<view class="block-title">
|
<view class="block-title">
|
||||||
<view class="title">协商调解咨询类</view>
|
<view class="title">协商调解咨询类</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -66,6 +66,50 @@
|
|||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 账户管理咨询类 -->
|
||||||
|
<view class="block" v-if="accountData.length > 0">
|
||||||
|
<view class="block-title">
|
||||||
|
<view class="title">账户管理咨询类</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
class="the-flex"
|
||||||
|
style="padding-top: 0;"
|
||||||
|
scroll-x="true"
|
||||||
|
scroll-with-animation="true"
|
||||||
|
>
|
||||||
|
<block v-for="(item, index) in accountData" :key="index">
|
||||||
|
<view class="the-flex-item"
|
||||||
|
@click="onMagInfo('Account', item.id)"
|
||||||
|
>
|
||||||
|
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
|
||||||
|
<view class="title nowrap">{{item.title}}</view>
|
||||||
|
<view class="price nowrap"><text>¥</text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<!-- 委托管理类 -->
|
||||||
|
<view class="block" v-if="delegation.length > 0">
|
||||||
|
<view class="block-title">
|
||||||
|
<view class="title">委托管理类</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view
|
||||||
|
class="the-flex"
|
||||||
|
style="padding-top: 0;"
|
||||||
|
scroll-x="true"
|
||||||
|
scroll-with-animation="true"
|
||||||
|
>
|
||||||
|
<block v-for="(item, index) in delegation" :key="index">
|
||||||
|
<view class="the-flex-item"
|
||||||
|
@click="onMagInfo('Delegation', item.id)"
|
||||||
|
>
|
||||||
|
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
|
||||||
|
<view class="title nowrap">{{item.title}}</view>
|
||||||
|
<view class="price nowrap"><text>¥</text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
<!-- 法律咨询类 -->
|
<!-- 法律咨询类 -->
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="block-title">
|
<view class="block-title">
|
||||||
@@ -157,7 +201,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { region } from '@/apis/interfaces/address.js'
|
import { region } from '@/apis/interfaces/address.js'
|
||||||
import { categories, jf, index } from '@/apis/interfaces/index.js'
|
import { categories, jf, index, accountManagement, delegation } from '@/apis/interfaces/index.js'
|
||||||
import { lists } from '@/apis/interfaces/empower.js'
|
import { lists } from '@/apis/interfaces/empower.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -185,7 +229,11 @@
|
|||||||
service : []
|
service : []
|
||||||
},
|
},
|
||||||
// 增收赋能列表
|
// 增收赋能列表
|
||||||
empowerArr : []
|
empowerArr : [],
|
||||||
|
// 账户管理类
|
||||||
|
accountData : [],
|
||||||
|
// 委托管理类
|
||||||
|
delegation : []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -194,8 +242,26 @@
|
|||||||
this.getIndex()
|
this.getIndex()
|
||||||
// 增收赋能
|
// 增收赋能
|
||||||
this.getEmpower()
|
this.getEmpower()
|
||||||
|
// 管理类业务
|
||||||
|
this.getManagement()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取管理类业务
|
||||||
|
getManagement(){
|
||||||
|
Promise.all([accountManagement(), delegation()]).then(res => {
|
||||||
|
let accountData = res[0]
|
||||||
|
let delegationData = res[1]
|
||||||
|
this.accountData = accountData
|
||||||
|
this.delegation = delegationData
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查看管理类业务
|
||||||
|
onMagInfo(type, id){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'Mag' + type,
|
||||||
|
params : { id }
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查看增收赋能详情
|
// 查看增收赋能详情
|
||||||
onEmpower(id){
|
onEmpower(id){
|
||||||
this.$Router.push({
|
this.$Router.push({
|
||||||
|
|||||||
141
pages/management/account.vue
Normal file
141
pages/management/account.vue
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<view class="from-content">
|
||||||
|
<view class="from-block" v-if="pickerArr.length > 0" >
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>办理业务</label>
|
||||||
|
<picker class="from-block-val" :range="pickerArr" :value="pickerIndex" range-key="title" @change="pickerIndex = $event.detail.value">
|
||||||
|
<view class="from-block-picker nowrap">{{pickerArr[pickerIndex].title}}
|
||||||
|
<u-icon class="from-block-picker-icon" name="arrow-down" color="#555" size="15"></u-icon>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>业务价格</label>
|
||||||
|
<view class="from-block-val price">¥{{pickerArr[pickerIndex].price}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>业务描述</label>
|
||||||
|
<view class="from-block-val">{{pickerArr[pickerIndex].subtitle}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="from-block">
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<input class="from-block-val from-block-input" placeholder="请输入客户姓名" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>手机号码</label>
|
||||||
|
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户手机号码" v-model="phone" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="from-btn" @click="onSubmit">提交办理</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { accountManagement, accountFrom } from '@/apis/interfaces/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerArr : [],
|
||||||
|
pickerIndex : 0,
|
||||||
|
name : '',
|
||||||
|
phone : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
accountManagement().then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.pickerArr = res;
|
||||||
|
this.pickerIndex = res.findIndex(val => val.id == this.$Route.query.id)
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 提交表单
|
||||||
|
onSubmit(){
|
||||||
|
let { name, phone, pickerArr, pickerIndex } = this
|
||||||
|
|
||||||
|
console.log(pickerArr[pickerIndex])
|
||||||
|
|
||||||
|
if(name === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户姓名',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(phone === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户手机号码',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: "提交中...",
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
accountFrom({
|
||||||
|
name : name,
|
||||||
|
mobile : phone
|
||||||
|
}, pickerArr[pickerIndex].id).then(res => {
|
||||||
|
let { order_type, order_id, order_no } = res;
|
||||||
|
this.$Router.replace({
|
||||||
|
name : 'Pay',
|
||||||
|
params : {
|
||||||
|
paytype : 'synthesize',
|
||||||
|
orderId : order_id,
|
||||||
|
orderType : order_type.replace(/\\/g, '-')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.from-content{
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 30rpx;
|
||||||
|
background: #f7f8f9;
|
||||||
|
}
|
||||||
|
.from-block{
|
||||||
|
background: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.from-block-item{
|
||||||
|
min-height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-bottom: solid 1rpx #f3f3f3;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
&:last-child{ border: none; }
|
||||||
|
label{ width: 200rpx; line-height: 70rpx; }
|
||||||
|
.from-block-val{ width: calc(100% - 200rpx); text-align: right; line-height: 70rpx;
|
||||||
|
&.price{ color: $main-color; font-weight: bold; }
|
||||||
|
}
|
||||||
|
.from-block-input{ height: 70rpx; font-size: 32rpx; }
|
||||||
|
.from-block-picker{ padding-right: 50rpx; position: relative; }
|
||||||
|
.from-block-picker-icon{ position: absolute; right: 0; top: 50%; margin-top: -15rpx; }
|
||||||
|
}
|
||||||
|
.from-btn{ width: 100%; background-color: $main-color; color: white; line-height: 95rpx; height: 95rpx; border-radius: 45rpx; font-size: 32rpx; font-weight: bold;
|
||||||
|
&::after{ display: none; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
141
pages/management/delegation.vue
Normal file
141
pages/management/delegation.vue
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<view class="from-content">
|
||||||
|
<view class="from-block" v-if="pickerArr.length > 0" >
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>办理业务</label>
|
||||||
|
<picker class="from-block-val" :range="pickerArr" :value="pickerIndex" range-key="title" @change="pickerIndex = $event.detail.value">
|
||||||
|
<view class="from-block-picker nowrap">{{pickerArr[pickerIndex].title}}
|
||||||
|
<u-icon class="from-block-picker-icon" name="arrow-down" color="#555" size="15"></u-icon>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>业务价格</label>
|
||||||
|
<view class="from-block-val price">¥{{pickerArr[pickerIndex].price}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>业务描述</label>
|
||||||
|
<view class="from-block-val">{{pickerArr[pickerIndex].subtitle}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="from-block">
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<input class="from-block-val from-block-input" placeholder="请输入客户姓名" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>手机号码</label>
|
||||||
|
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户手机号码" v-model="phone" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="from-btn" @click="onSubmit">提交办理</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { delegation, delegationFrom } from '@/apis/interfaces/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerArr : [],
|
||||||
|
pickerIndex : 0,
|
||||||
|
name : '',
|
||||||
|
phone : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
delegation().then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.pickerArr = res;
|
||||||
|
this.pickerIndex = res.findIndex(val => val.id == this.$Route.query.id)
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 提交表单
|
||||||
|
onSubmit(){
|
||||||
|
let { name, phone, pickerArr, pickerIndex } = this
|
||||||
|
if(name === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户姓名',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(phone === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户手机号码',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: "提交中...",
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
delegationFrom({
|
||||||
|
name : name,
|
||||||
|
mobile : phone
|
||||||
|
}, pickerArr[pickerIndex].id).then(res => {
|
||||||
|
let { order_type, order_id, order_no } = res;
|
||||||
|
this.$Router.replace({
|
||||||
|
name : 'Pay',
|
||||||
|
params : {
|
||||||
|
paytype : 'synthesize',
|
||||||
|
orderId : order_id,
|
||||||
|
orderType : order_type.replace(/\\/g, '-')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
console.log(err)
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.from-content{
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 30rpx;
|
||||||
|
background: #f7f8f9;
|
||||||
|
}
|
||||||
|
.from-block{
|
||||||
|
background: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
.from-block-item{
|
||||||
|
min-height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-bottom: solid 1rpx #f3f3f3;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
&:last-child{ border: none; }
|
||||||
|
label{ width: 200rpx; line-height: 70rpx; }
|
||||||
|
.from-block-val{ width: calc(100% - 200rpx); text-align: right; line-height: 70rpx;
|
||||||
|
&.price{ color: $main-color; font-weight: bold; }
|
||||||
|
}
|
||||||
|
.from-block-input{ height: 70rpx; font-size: 32rpx; }
|
||||||
|
.from-block-picker{ padding-right: 50rpx; position: relative; }
|
||||||
|
.from-block-picker-icon{ position: absolute; right: 0; top: 50%; margin-top: -15rpx; }
|
||||||
|
}
|
||||||
|
.from-btn{ width: 100%; background-color: $main-color; color: white; line-height: 95rpx; height: 95rpx; border-radius: 45rpx; font-size: 32rpx; font-weight: bold;
|
||||||
|
&::after{ display: none; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -65,7 +65,6 @@
|
|||||||
<view class="orders-flex">
|
<view class="orders-flex">
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="btns-item btns-border" v-if="item.can.service" @click="onOrdersService(item.business_order_id)">匹配服务包</view>
|
<view class="btns-item btns-border" v-if="item.can.service" @click="onOrdersService(item.business_order_id)">匹配服务包</view>
|
||||||
<view class="btns-item" @click="$Router.push({name: 'OfflineInfo', params: {orderId: item.business_order_id}})">查看订单</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="header-title">实付金额</view>
|
<view class="header-title">实付金额</view>
|
||||||
<view class="header-price"><text>¥</text>{{total}}</view>
|
<view class="header-price"><text>¥</text>{{total}}</view>
|
||||||
<block v-if="rate != 1">
|
<block v-if="totalFire > 0">
|
||||||
<view class="header-fire">火力值:{{totalFire}}</view>
|
<view class="header-fire">最大可抵扣:{{totalFire}}</view>
|
||||||
<view class="header-no">当前火力值比例1:{{rate}}</view>
|
<!-- <view class="header-no">当前火力值比例1:{{rate}}</view> -->
|
||||||
</block>
|
</block>
|
||||||
<view class="header-no">订单号:{{orderNo}}</view>
|
<view class="header-no">订单号:{{orderNo}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,9 +56,16 @@
|
|||||||
</view>
|
</view>
|
||||||
<radio class="choose-radio" value="code" :checked="payMethod == 'code'"></radio>
|
<radio class="choose-radio" value="code" :checked="payMethod == 'code'"></radio>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="choose-item nowrap" v-if="payCan.offline">
|
||||||
|
<view class="choose-text">
|
||||||
|
<image src="@/static/icons/pay_bank.png" mode="aspectFill"></image>
|
||||||
|
线下打款
|
||||||
|
</view>
|
||||||
|
<radio class="choose-radio" value="offline" :checked="payMethod == 'offline'"></radio>
|
||||||
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
<view class="deduction" v-if="(payMethod == 'wx' || payMethod == 'ali' || payMethod == 'dgwx' || payMethod == 'dgali') && payType != 'free'">
|
<view class="deduction" v-if="payCan.deduction == 1 && payType != 'free'">
|
||||||
<view class="deduction-item">
|
<view class="deduction-item">
|
||||||
<view class="deduction-label">
|
<view class="deduction-label">
|
||||||
<view class="title">使用火力值抵扣</view>
|
<view class="title">使用火力值抵扣</view>
|
||||||
@@ -101,9 +108,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<!-- 确认支付 -->
|
<!-- 确认支付 -->
|
||||||
<view class="payBtn">
|
<view class="payBtn" v-if="payMethod != 'offline'">
|
||||||
<button size="default" @click="onPay">支付</button>
|
<button size="default" @click="onPay">支付</button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 上传打款凭证 -->
|
||||||
|
<view class="payBtn" v-else>
|
||||||
|
<button size="default" @click="onOffline">上传打款凭证</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -124,8 +135,10 @@
|
|||||||
umsSynthesize,
|
umsSynthesize,
|
||||||
dgSynthesize,
|
dgSynthesize,
|
||||||
coinSynthesize,
|
coinSynthesize,
|
||||||
|
cashierOffline
|
||||||
} from '@/apis/interfaces/pay.js'
|
} from '@/apis/interfaces/pay.js'
|
||||||
import mixin from 'uview-ui/libs/mixin/mixin';
|
import mixin from 'uview-ui/libs/mixin/mixin';
|
||||||
|
import { uploads } from '@/apis/interfaces/uploading.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -186,6 +199,8 @@
|
|||||||
let order_type = this.$Route.query.orderType.replace(/\-/g, '\\')
|
let order_type = this.$Route.query.orderType.replace(/\-/g, '\\')
|
||||||
oderinfo( this.$Route.query.orderId, order_type).then(res => {
|
oderinfo( this.$Route.query.orderId, order_type).then(res => {
|
||||||
let { order_no, price, score, order_id, rate, total_fire, can_use_channel } = res
|
let { order_no, price, score, order_id, rate, total_fire, can_use_channel } = res
|
||||||
|
|
||||||
|
|
||||||
this.rate = rate
|
this.rate = rate
|
||||||
this.totalFire = total_fire
|
this.totalFire = total_fire
|
||||||
this.orderType = order_type
|
this.orderType = order_type
|
||||||
@@ -259,7 +274,7 @@
|
|||||||
clearInterval(outTime)
|
clearInterval(outTime)
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title : '提示',
|
title : '提示',
|
||||||
content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台综法订单管理查询您的订单' : '支付成功',
|
content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台查询您的订单' : '支付成功',
|
||||||
showCancel : false,
|
showCancel : false,
|
||||||
confirmColor: '#446EFE',
|
confirmColor: '#446EFE',
|
||||||
success : () => {
|
success : () => {
|
||||||
@@ -355,8 +370,46 @@
|
|||||||
if(this.payType == 'free') this.onDgFreePay('app_alipay', false)
|
if(this.payType == 'free') this.onDgFreePay('app_alipay', false)
|
||||||
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app_alipay', false)
|
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app_alipay', false)
|
||||||
break
|
break
|
||||||
|
case 'offline':
|
||||||
|
console.log('线下打款')
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 上传打款凭证
|
||||||
|
onOffline(){
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
success: path => {
|
||||||
|
let { tempFiles } = path;
|
||||||
|
uploads([{
|
||||||
|
name: 'file' + tempFiles[0].size,
|
||||||
|
uri : tempFiles[0].path
|
||||||
|
}], {}).then(updRes => {
|
||||||
|
let { path } = updRes
|
||||||
|
cashierOffline({
|
||||||
|
image : path[0],
|
||||||
|
order_type : this.orderType,
|
||||||
|
order_id : this.orderId,
|
||||||
|
}).then(res => {
|
||||||
|
uni.showModal({
|
||||||
|
title : '上传成功',
|
||||||
|
content : '请耐心等待打款审核',
|
||||||
|
showCancel : false,
|
||||||
|
success : () => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 火力值 - 综法
|
// 火力值 - 综法
|
||||||
onCoinSynthesizePay(){
|
onCoinSynthesizePay(){
|
||||||
coinSynthesize({
|
coinSynthesize({
|
||||||
|
|||||||
319
pages/work/account.vue
Normal file
319
pages/work/account.vue
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- tabs -->
|
||||||
|
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||||
|
<u-tabs
|
||||||
|
:current="tabsCurrent"
|
||||||
|
:list="tabs"
|
||||||
|
keyName="value"
|
||||||
|
lineColor="#446EFE"
|
||||||
|
:scrollable="tabs.length > 5"
|
||||||
|
:activeStyle="{
|
||||||
|
color: '#111',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: '32rpx'
|
||||||
|
}"
|
||||||
|
:inactiveStyle="{
|
||||||
|
color: '#606266',
|
||||||
|
fontSize: '30rpx'
|
||||||
|
}"
|
||||||
|
@click="onTabs"
|
||||||
|
></u-tabs>
|
||||||
|
</u-sticky>
|
||||||
|
<!-- 订单列表 -->
|
||||||
|
<view class="orders" v-if="orders.length > 0">
|
||||||
|
<view class="orders-item" v-for="(item, index) in orders" :key="index">
|
||||||
|
<view class="orders-flex">
|
||||||
|
<view class="no nowrap" @click="copyNo(item.order_no)">
|
||||||
|
{{item.order_no}}
|
||||||
|
</view>
|
||||||
|
<view class="state">{{item.status.text}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content">
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>业务名称</label>
|
||||||
|
<view class="nowrap">{{item.item.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<view class="nowrap">{{item.name}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>手机号码</label>
|
||||||
|
<view class="nowrap">{{item.mobile}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>创建时间</label>
|
||||||
|
<view class="nowrap">{{item.created_at}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item" v-if="item.paid_at != ''">
|
||||||
|
<label>支付时间</label>
|
||||||
|
<view class="nowrap">{{item.paid_at}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-flex">
|
||||||
|
<view class="price">¥{{item.item.price}}</view>
|
||||||
|
<view class="btns">
|
||||||
|
<view class="btns-item border" v-if="item.can.cancel" @click="onCancel(item)">取消订单</view>
|
||||||
|
<view class="btns-item" v-if="item.can.pay" @click="onPay(item)">立即支付</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<u-loadmore v-if="pagesShow" :status="status" />
|
||||||
|
</view>
|
||||||
|
<!-- 订单是空的 -->
|
||||||
|
<view class="order-null" v-else>
|
||||||
|
<u-empty
|
||||||
|
mode="order"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||||
|
text="暂无相关订单"
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { accountOrder, accountCancel } from '@/apis/interfaces/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabs : [{ id: '', value: '全部' }],
|
||||||
|
tabsCurrent : 0,
|
||||||
|
tabsId : '',
|
||||||
|
orders : [],
|
||||||
|
pagesShow : false,
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
status : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getOrder()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 筛选分类
|
||||||
|
onTabs(e){
|
||||||
|
let { id, index } = e;
|
||||||
|
this.tabsCurrent = index
|
||||||
|
this.tabsId = id
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.getOrder()
|
||||||
|
},
|
||||||
|
// 获取订单列表
|
||||||
|
getOrder(){
|
||||||
|
let { tabsId, tabs, orders, page } = this
|
||||||
|
accountOrder({
|
||||||
|
manager: 1,
|
||||||
|
status : tabsId,
|
||||||
|
page : page.current
|
||||||
|
}).then(res => {
|
||||||
|
let { status, lists } = res;
|
||||||
|
this.tabs = [{ id: '', value: '全部' }].concat(status)
|
||||||
|
this.orders = lists.page.current == 1 ? lists.data : this.orders.concat(lists.data)
|
||||||
|
this.page = lists.page
|
||||||
|
this.pagesShow = false
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(e){
|
||||||
|
let { order_id } = e;
|
||||||
|
uni.showModal({
|
||||||
|
title : "提示",
|
||||||
|
content : "确认取消当前订单嘛?",
|
||||||
|
cancelText : "取消",
|
||||||
|
confirmColor: "#446EFE",
|
||||||
|
success : modalRes => {
|
||||||
|
if(modalRes.confirm){
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
accountCancel(order_id).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单已取消',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.getOrder()
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
copyNo(no){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data : no,
|
||||||
|
success : res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单号已复制',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 去支付
|
||||||
|
onPay(obj){
|
||||||
|
let { order_id, order_type, paid_at } = obj
|
||||||
|
if(paid_at == ''){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'Pay',
|
||||||
|
params : {
|
||||||
|
paytype : 'synthesize',
|
||||||
|
orderId : order_id,
|
||||||
|
orderType : order_type.replace(/\\/g, '-')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.pagesShow = true;
|
||||||
|
if(this.page.has_more){
|
||||||
|
this.status = 'loading';
|
||||||
|
this.page.current++
|
||||||
|
this.getOrder()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.status = 'nomore';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 订单列表
|
||||||
|
.orders{
|
||||||
|
padding: 30rpx 0 10rpx;
|
||||||
|
.orders-item{
|
||||||
|
margin: 0 30rpx 20rpx;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: $radius;
|
||||||
|
}
|
||||||
|
.orders-content{
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
&-item{
|
||||||
|
line-height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111111;
|
||||||
|
label{
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.orders-content-btn{
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
&.orders-content-bottom{
|
||||||
|
padding-right: 40rpx;
|
||||||
|
position: relative;
|
||||||
|
.orders-content-icon{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-type{
|
||||||
|
text{
|
||||||
|
margin-right: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
&::after{
|
||||||
|
position: absolute;
|
||||||
|
content: "/";
|
||||||
|
width: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
top: 0;
|
||||||
|
right: -30rpx;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
margin-right: 0;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-block{
|
||||||
|
background: rgba(68, 110, 254, .03);
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 10rpx 0;
|
||||||
|
.item-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.orders-flex{
|
||||||
|
border-bottom: solid 1rpx #F6F6F6;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx $padding;
|
||||||
|
&:last-child{
|
||||||
|
border-top: solid 1rpx #F6F6F6;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.no{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
}
|
||||||
|
.state{
|
||||||
|
color: $main-color;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: 150rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
font-weight: bold;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
.btns{
|
||||||
|
width: 400rpx;
|
||||||
|
text-align: right;
|
||||||
|
.btns-item{
|
||||||
|
display: inline-block;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
&.border{
|
||||||
|
border: solid 1rpx $main-color;
|
||||||
|
color: $main-color;
|
||||||
|
background: white;
|
||||||
|
height: 68rpx;
|
||||||
|
line-height: 68rpx;
|
||||||
|
&::after{ display: none;}
|
||||||
|
}
|
||||||
|
&:last-child{ margin-left: 30rpx; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
312
pages/work/delegation.vue
Normal file
312
pages/work/delegation.vue
Normal file
@@ -0,0 +1,312 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- tabs -->
|
||||||
|
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||||
|
<u-tabs
|
||||||
|
:current="tabsCurrent"
|
||||||
|
:list="tabs"
|
||||||
|
keyName="value"
|
||||||
|
lineColor="#446EFE"
|
||||||
|
:scrollable="tabs.length > 5"
|
||||||
|
:activeStyle="{
|
||||||
|
color: '#111',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: '32rpx'
|
||||||
|
}"
|
||||||
|
:inactiveStyle="{
|
||||||
|
color: '#606266',
|
||||||
|
fontSize: '30rpx'
|
||||||
|
}"
|
||||||
|
@click="onTabs"
|
||||||
|
></u-tabs>
|
||||||
|
</u-sticky>
|
||||||
|
<!-- 订单列表 -->
|
||||||
|
<view class="orders" v-if="orders.length > 0">
|
||||||
|
<view class="orders-item" v-for="(item, index) in orders" :key="index">
|
||||||
|
<view class="orders-flex">
|
||||||
|
<view class="no nowrap" @click="copyNo(item.order_no)">
|
||||||
|
{{item.order_no}}
|
||||||
|
</view>
|
||||||
|
<view class="state">{{item.status.text}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content">
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>业务名称</label>
|
||||||
|
<view class="nowrap">{{item.item.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<view class="nowrap">{{item.name}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>手机号码</label>
|
||||||
|
<view class="nowrap">{{item.mobile}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>创建时间</label>
|
||||||
|
<view class="nowrap">{{item.created_at}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item" v-if="item.paid_at != ''">
|
||||||
|
<label>支付时间</label>
|
||||||
|
<view class="nowrap">{{item.paid_at}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-flex">
|
||||||
|
<view class="price">¥{{item.item.price}}</view>
|
||||||
|
<view class="btns">
|
||||||
|
<view class="btns-item border" v-if="item.can.cancel" @click="onCancel(item)">取消订单</view>
|
||||||
|
<view class="btns-item" v-if="item.can.pay" @click="onPay(item)">立即支付</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<u-loadmore v-if="pagesShow" :status="status" />
|
||||||
|
</view>
|
||||||
|
<!-- 订单是空的 -->
|
||||||
|
<view class="order-null" v-else>
|
||||||
|
<u-empty
|
||||||
|
mode="order"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||||
|
text="暂无相关订单"
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { delegationOrder, delegationCancel } from '@/apis/interfaces/index.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabs : [{ id: '', value: '全部' }],
|
||||||
|
tabsCurrent : 0,
|
||||||
|
tabsId : '',
|
||||||
|
orders : [],
|
||||||
|
pagesShow : false,
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
status : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getOrder()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 筛选分类
|
||||||
|
onTabs(e){
|
||||||
|
let { id, index } = e;
|
||||||
|
this.tabsCurrent = index
|
||||||
|
this.tabsId = id
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.getOrder()
|
||||||
|
},
|
||||||
|
// 获取订单列表
|
||||||
|
getOrder(){
|
||||||
|
let { tabsId, tabs, orders, page } = this
|
||||||
|
delegationOrder({
|
||||||
|
manager: 1,
|
||||||
|
status : tabsId,
|
||||||
|
page : page.current
|
||||||
|
}).then(res => {
|
||||||
|
let { status, lists } = res;
|
||||||
|
this.tabs = [{ id: '', value: '全部' }].concat(status)
|
||||||
|
this.orders = lists.page.current == 1 ? lists.data : this.orders.concat(lists.data)
|
||||||
|
this.page = lists.page
|
||||||
|
this.pagesShow = false
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(e){
|
||||||
|
let { order_id } = e;
|
||||||
|
uni.showModal({
|
||||||
|
title : "提示",
|
||||||
|
content : "确认取消当前订单嘛?",
|
||||||
|
cancelText : "取消",
|
||||||
|
confirmColor: "#446EFE",
|
||||||
|
success : modalRes => {
|
||||||
|
if(modalRes.confirm){
|
||||||
|
uni.showLoading({
|
||||||
|
title: "加载中...",
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
delegationCancel(order_id).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单已取消',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.getOrder()
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
copyNo(no){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data : no,
|
||||||
|
success : res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单号已复制',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 去支付
|
||||||
|
onPay(obj){
|
||||||
|
let { order_id, order_type, paid_at } = obj
|
||||||
|
if(paid_at == ''){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'Pay',
|
||||||
|
params : {
|
||||||
|
paytype : 'synthesize',
|
||||||
|
orderId : order_id,
|
||||||
|
orderType : order_type.replace(/\\/g, '-')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.pagesShow = true;
|
||||||
|
if(this.page.has_more){
|
||||||
|
this.status = 'loading';
|
||||||
|
this.page.current++
|
||||||
|
this.getOrder()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.status = 'nomore';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 订单列表
|
||||||
|
.orders{
|
||||||
|
padding: 30rpx 0 10rpx;
|
||||||
|
.orders-item{
|
||||||
|
margin: 0 30rpx 20rpx;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: $radius;
|
||||||
|
}
|
||||||
|
.orders-content{
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
&-item{
|
||||||
|
line-height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111111;
|
||||||
|
label{
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.orders-content-btn{
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
&.orders-content-bottom{
|
||||||
|
padding-right: 40rpx;
|
||||||
|
position: relative;
|
||||||
|
.orders-content-icon{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-type{
|
||||||
|
text{
|
||||||
|
margin-right: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
&::after{
|
||||||
|
position: absolute;
|
||||||
|
content: "/";
|
||||||
|
width: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
top: 0;
|
||||||
|
right: -30rpx;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
margin-right: 0;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-block{
|
||||||
|
background: rgba(68, 110, 254, .03);
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 10rpx 0;
|
||||||
|
.item-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.orders-flex{
|
||||||
|
border-bottom: solid 1rpx #F6F6F6;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20rpx $padding;
|
||||||
|
&:last-child{
|
||||||
|
border-top: solid 1rpx #F6F6F6;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.no{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
}
|
||||||
|
.state{
|
||||||
|
color: $main-color;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: 150rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
font-weight: bold;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
.btns{
|
||||||
|
width: 400rpx;
|
||||||
|
text-align: right;
|
||||||
|
.btns-item{
|
||||||
|
display: inline-block;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
&.border{ border: solid 1rpx $main-color; color: $main-color; background: white; height: 68rpx; &::after{ display: none; } }
|
||||||
|
&:last-child{ margin-left: 30rpx; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
</block>
|
</block>
|
||||||
<!-- 管理中台 -->
|
<!-- 管理中台 -->
|
||||||
<block v-else>
|
<!-- <block v-else> -->
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<view class="flex-item" @click="onNav('ConsultWork')">
|
<view class="flex-item" @click="onNav('ConsultWork')">
|
||||||
<image class="flex-icon" src="/static/icons/icon_00.png" mode="aspectFill"></image>
|
<image class="flex-icon" src="/static/icons/icon_00.png" mode="aspectFill"></image>
|
||||||
@@ -74,6 +74,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex-btn">去查看</view>
|
<view class="flex-btn">去查看</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="flex-item" @click="onNav('AccountWork')">
|
||||||
|
<image class="flex-icon" src="/static/icons/work_icon_30.png" mode="aspectFill"></image>
|
||||||
|
<view class="flex-title">
|
||||||
|
<view class="flex-name">账户管理咨询类</view>
|
||||||
|
<view class="flex-tips">客户账户管理咨询类订单</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-btn">去查看</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-item" @click="onNav('DelegationWork')">
|
||||||
|
<image class="flex-icon" src="/static/icons/work_icon_29.png" mode="aspectFill"></image>
|
||||||
|
<view class="flex-title">
|
||||||
|
<view class="flex-name">委托管理类</view>
|
||||||
|
<view class="flex-tips">客户委托管理类订单</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-btn">去查看</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="flex-item" @click="onNav('ServiceWork')">
|
<view class="flex-item" @click="onNav('ServiceWork')">
|
||||||
<image class="flex-icon" src="/static/icons/icon_01.png" mode="aspectFill"></image>
|
<image class="flex-icon" src="/static/icons/icon_01.png" mode="aspectFill"></image>
|
||||||
<view class="flex-title">
|
<view class="flex-title">
|
||||||
@@ -99,7 +117,7 @@
|
|||||||
<view class="flex-btn">去查看</view>
|
<view class="flex-btn">去查看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
<!-- </block> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 未登录 -->
|
<!-- 未登录 -->
|
||||||
<view v-else class="auth-null">
|
<view v-else class="auth-null">
|
||||||
@@ -542,7 +560,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
.flex-icon{ width: 48px; height: 48px; background: #dce1fb; border-radius: 30rpx; }
|
.flex-icon{ width: 48px; height: 48px; border-radius: 30rpx; }
|
||||||
.flex-title{
|
.flex-title{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
|
|||||||
BIN
static/icons/pay_bank.png
Normal file
BIN
static/icons/pay_bank.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
BIN
static/icons/work_icon_29.png
Normal file
BIN
static/icons/work_icon_29.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
static/icons/work_icon_30.png
Normal file
BIN
static/icons/work_icon_30.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Reference in New Issue
Block a user