Compare commits
15 Commits
up-line
...
7afdf38b93
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7afdf38b93 | ||
|
|
9f1ff579ce | ||
|
|
06e95df676 | ||
| 5b738fc9b4 | |||
|
|
46d29ae6b6 | ||
|
|
43320b6870 | ||
|
|
5920afb9c7 | ||
|
|
76bb2b2a43 | ||
| 405f36425d | |||
|
|
663a5a9762 | ||
|
|
bd1805d853 | ||
|
|
947c12d57a | ||
|
|
a6dc0901d9 | ||
|
|
5eedc7a019 | ||
|
|
7bacaf7cc4 |
@@ -13,8 +13,16 @@
|
|||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"bundleId" : "io.douhuofalv.com",
|
||||||
|
"certificateFile" : "/Users/tmoct5/Documents/App证书/抖火/抖火法律苹果证书/DevDouhuoApp.p12",
|
||||||
|
"certificateProfileFile" : "/Users/tmoct5/Documents/App证书/抖火/抖火法律苹果证书/DevDouhuoApp.mobileprovision",
|
||||||
|
"playground" : "custom",
|
||||||
|
"runSignStatus" : 0,
|
||||||
|
"type" : "uni-app:app-ios"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
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({
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
48
apis/interfaces/custom.js
Normal file
48
apis/interfaces/custom.js
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Web -zdx
|
||||||
|
* moduleName: 线下业务订单类型
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 获取业务类型
|
||||||
|
const customTypes = () =>{
|
||||||
|
return request({
|
||||||
|
url: "custom_type/index",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交办理线下订单
|
||||||
|
const customTypeStore = (customType,data) => {
|
||||||
|
return request({
|
||||||
|
url : `custom_type/${customType}/store`,
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 取消线下订单
|
||||||
|
const customTypeCancel = (orderId, data) => {
|
||||||
|
return request({
|
||||||
|
url : `custom_type/order/${orderId}/cancel`,
|
||||||
|
method : 'DELETE',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 线下订单列表
|
||||||
|
const customTypelists = data => {
|
||||||
|
return request({
|
||||||
|
url : 'custom_type/order/lists',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
customTypes,
|
||||||
|
customTypeStore,
|
||||||
|
customTypeCancel,
|
||||||
|
customTypelists
|
||||||
|
}
|
||||||
73
apis/interfaces/empower.js
Normal file
73
apis/interfaces/empower.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Web唐明明
|
||||||
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
|
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||||
|
* moduleName: 增收赋能
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 增收赋能列表
|
||||||
|
const lists = () =>{
|
||||||
|
return request({
|
||||||
|
url : "empower/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 增收赋能详情
|
||||||
|
const info = id => {
|
||||||
|
return request({
|
||||||
|
url : "empower/" + id + "/show"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下单前置
|
||||||
|
const buyInit = id => {
|
||||||
|
return request({
|
||||||
|
url : "empower/" + id + "/buy/init",
|
||||||
|
method : "POST"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下单购买
|
||||||
|
const buy = data => {
|
||||||
|
return request({
|
||||||
|
url : "empower/buy/order",
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单列表初始化
|
||||||
|
const orderInit = () => {
|
||||||
|
return request({
|
||||||
|
url : "empower/order/init",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单列表
|
||||||
|
const orderList = data => {
|
||||||
|
return request({
|
||||||
|
url : "empower/manager/order",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消订单
|
||||||
|
const orderCancel = order => {
|
||||||
|
return request({
|
||||||
|
url : "empower/order/" + order + "/cancel",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
lists,
|
||||||
|
info,
|
||||||
|
buyInit,
|
||||||
|
buy,
|
||||||
|
orderInit,
|
||||||
|
orderList,
|
||||||
|
orderCancel
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
98
apis/interfaces/offline.js
Normal file
98
apis/interfaces/offline.js
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Web唐明明
|
||||||
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
|
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||||
|
* moduleName: 线下业务
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 主业务类型
|
||||||
|
const business = () =>{
|
||||||
|
return request({
|
||||||
|
url: "offline/index",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取主业务机构
|
||||||
|
const institution = id =>{
|
||||||
|
return request({
|
||||||
|
url: "offline/" + id + "/institution",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
// 获取机构表单数据
|
||||||
|
const institutionType = id => {
|
||||||
|
return request({
|
||||||
|
url: "offline/institution/" + id + "/type",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交用户办理信息
|
||||||
|
const submitStore = data => {
|
||||||
|
console.log(data)
|
||||||
|
return request({
|
||||||
|
url : "offline/store",
|
||||||
|
method : "POST",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配置服务包
|
||||||
|
const service = orderId => {
|
||||||
|
return request({
|
||||||
|
url : 'offline/' + orderId + '/service',
|
||||||
|
method : 'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加服务包
|
||||||
|
const serviceAdd = (orderId, items) => {
|
||||||
|
return request({
|
||||||
|
url : 'offline/' + orderId + '/service/calculate',
|
||||||
|
method : 'POST',
|
||||||
|
data : {
|
||||||
|
items
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除服务包
|
||||||
|
const serviceRemove = (id, data) => {
|
||||||
|
return request({
|
||||||
|
url : 'offline/' + id + '/service/remove',
|
||||||
|
method : 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 完成分配
|
||||||
|
const serviceOver = orderId => {
|
||||||
|
return request({
|
||||||
|
url : 'offline/' + orderId + '/service/over',
|
||||||
|
method : 'POST',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单列表
|
||||||
|
const lists = data => {
|
||||||
|
return request({
|
||||||
|
url : 'offline/orders/lists',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
business,
|
||||||
|
institution,
|
||||||
|
institutionType,
|
||||||
|
submitStore,
|
||||||
|
service,
|
||||||
|
serviceAdd,
|
||||||
|
serviceRemove,
|
||||||
|
serviceOver,
|
||||||
|
lists
|
||||||
|
}
|
||||||
@@ -216,6 +216,16 @@ const orderLog = (id, page) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通用订单详情
|
||||||
|
const unifyInfo = data => {
|
||||||
|
return request({
|
||||||
|
url : 'unify/order/info',
|
||||||
|
method : 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 支付订单
|
// 支付订单
|
||||||
export {
|
export {
|
||||||
lists,
|
lists,
|
||||||
@@ -243,5 +253,6 @@ export {
|
|||||||
getConfirmSchemeInfo,
|
getConfirmSchemeInfo,
|
||||||
sbuConfirmScheme,
|
sbuConfirmScheme,
|
||||||
orderCancel,
|
orderCancel,
|
||||||
orderLog
|
orderLog,
|
||||||
|
unifyInfo
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,23 @@ const debtUrl = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 账户注销
|
||||||
|
const offSmsCode = data => {
|
||||||
|
return request({
|
||||||
|
url : 'app/user/log_off_code',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账户注销确认
|
||||||
|
const offUser = data => {
|
||||||
|
return request({
|
||||||
|
url: 'app/user/log_off',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
relations,
|
relations,
|
||||||
code,
|
code,
|
||||||
@@ -209,5 +226,7 @@ export {
|
|||||||
getSignLogs,
|
getSignLogs,
|
||||||
getFlows,
|
getFlows,
|
||||||
createCity,
|
createCity,
|
||||||
debtUrl
|
debtUrl,
|
||||||
|
offSmsCode,
|
||||||
|
offUser
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ const synthesisAttorney = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 增收赋能单数据统计
|
||||||
|
const empowerStatistics = () =>{
|
||||||
|
return request({
|
||||||
|
url : 'empower/manager/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
index,
|
index,
|
||||||
@@ -66,5 +72,6 @@ export {
|
|||||||
sign,
|
sign,
|
||||||
synthesisCount,
|
synthesisCount,
|
||||||
synthesisServices,
|
synthesisServices,
|
||||||
synthesisAttorney
|
synthesisAttorney,
|
||||||
|
empowerStatistics
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
<label>服务金额</label>
|
<label>订单类型</label>
|
||||||
<view class="nowrap">{{ synthesis.title || '-' }}</view>
|
<view class="nowrap">{{ synthesis.title || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content-type">
|
<view class="order-content-type">
|
||||||
|
|||||||
26
main.js
26
main.js
@@ -1,26 +1,10 @@
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
|
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import uView from "uview-ui";
|
|
||||||
|
|
||||||
import store from './store'
|
Vue.config.productionTip = false
|
||||||
import { router, RouterMount } from 'router'
|
|
||||||
import Mylink from './node_modules/uni-simple-router/dist/link.vue'
|
|
||||||
|
|
||||||
import { INIT } from './im/INIT'
|
App.mpType = 'app'
|
||||||
|
const app = new Vue({
|
||||||
// (async () => {
|
|
||||||
Vue.component('my-link', Mylink)
|
|
||||||
Vue.use(uView)
|
|
||||||
Vue.use(router)
|
|
||||||
|
|
||||||
// await INIT();
|
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
|
||||||
App.mpType = 'app'
|
|
||||||
const app = new Vue({
|
|
||||||
store,
|
|
||||||
...App
|
...App
|
||||||
})
|
})
|
||||||
app.$mount()
|
app.$mount()
|
||||||
// })()
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "抖火数字化咨询服务平台",
|
"name" : "抖火法律",
|
||||||
"appid" : "__UNI__C305C03",
|
"appid" : "__UNI__C305C03",
|
||||||
"description" : "纵有疾风起,人生不言弃",
|
"description" : "纵有疾风起,人生不言弃",
|
||||||
"versionName" : "1.4.8",
|
"versionName" : "1.6.5",
|
||||||
"versionCode" : 104,
|
"versionCode" : 1065,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@@ -37,10 +37,8 @@
|
|||||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
|
||||||
],
|
],
|
||||||
"schemes" : "doufire",
|
"schemes" : "doufire",
|
||||||
@@ -48,15 +46,31 @@
|
|||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"dSYMs" : false
|
"dSYMs" : false,
|
||||||
|
"privacyDescription" : {
|
||||||
|
"NSPhotoLibraryUsageDescription" : "从您的相册中选择图片作为用户头像与身份认证照片",
|
||||||
|
"NSPhotoLibraryAddUsageDescription" : "保存您的分享海报与二维码图片",
|
||||||
|
"NSCameraUsageDescription" : "身份认证图片,用户身份活体认证与用户头头像",
|
||||||
|
"NSContactsUsageDescription" : "快捷拨打业务联系电话",
|
||||||
|
"NSLocalNetworkUsageDescription" : "获取网络数据",
|
||||||
|
"NSUserTrackingUsageDescription" : "开启权限不会获取您在其他站点的隐私信息,该权限仅用于标识设备并保障服务安全"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"ad" : {},
|
"ad" : {
|
||||||
|
"gdt" : {},
|
||||||
|
"csj" : {},
|
||||||
|
"ks" : {},
|
||||||
|
"ks-content" : {},
|
||||||
|
"sigmob" : {},
|
||||||
|
"hw" : {},
|
||||||
|
"bd" : {}
|
||||||
|
},
|
||||||
"share" : {
|
"share" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "wx1bcdeda0dec3f1bd",
|
"appid" : "wx1bcdeda0dec3f1bd",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : "https://app.com.douhuofalv/ulink/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"payment" : {}
|
"payment" : {}
|
||||||
@@ -133,5 +147,6 @@
|
|||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : false
|
"enable" : false
|
||||||
},
|
},
|
||||||
"vueVersion" : "2"
|
"vueVersion" : "2",
|
||||||
|
"fallbackLocale" : "zh-Hans"
|
||||||
}
|
}
|
||||||
|
|||||||
174
pages.json
174
pages.json
@@ -585,7 +585,7 @@
|
|||||||
"name": "Entrust",
|
"name": "Entrust",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "案件委托",
|
"navigationBarTitleText": "案件委托咨询",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
"name": "ConsultWork",
|
"name": "ConsultWork",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "协商调解单",
|
"navigationBarTitleText": "协商调解咨询单",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
@@ -640,7 +640,7 @@
|
|||||||
"name": "ActionWork",
|
"name": "ActionWork",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "诉讼委托单",
|
"navigationBarTitleText": "诉讼委托咨询单",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
@@ -727,7 +727,7 @@
|
|||||||
"name": "EntrustCivil",
|
"name": "EntrustCivil",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "案件委托-民事诉讼",
|
"navigationBarTitleText": "案件委托-民事诉讼-咨询",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"backgroundColor": "#FFF"
|
"backgroundColor": "#FFF"
|
||||||
}
|
}
|
||||||
@@ -737,7 +737,7 @@
|
|||||||
"name": "EntrustWrite",
|
"name": "EntrustWrite",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "案件委托-",
|
"navigationBarTitleText": "案件委托-咨询",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"backgroundColor": "#FFF"
|
"backgroundColor": "#FFF"
|
||||||
}
|
}
|
||||||
@@ -755,7 +755,7 @@
|
|||||||
"name": "ExpandWrite",
|
"name": "ExpandWrite",
|
||||||
"auth": true,
|
"auth": true,
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "拓展服务-",
|
"navigationBarTitleText": "拓展服务-咨询",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"backgroundColor": "#FFF"
|
"backgroundColor": "#FFF"
|
||||||
}
|
}
|
||||||
@@ -777,6 +777,168 @@
|
|||||||
"navigationBarBackgroundColor": "#FFF"
|
"navigationBarBackgroundColor": "#FFF"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "pages/empower/info",
|
||||||
|
"name": "EmpowerInfo",
|
||||||
|
"auth": true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "增收赋能",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/empower/buy",
|
||||||
|
"name": "EmpowerBuy",
|
||||||
|
"auth": true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "报名",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/empower/order",
|
||||||
|
"name": "EmpowerOrder",
|
||||||
|
"auth": true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "订单",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/off/off",
|
||||||
|
"name" : "UserOff",
|
||||||
|
"style" :{
|
||||||
|
"navigationBarTitleText": "申请注销账号",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/off/agreement",
|
||||||
|
"name" : "UserOffAgreement",
|
||||||
|
"style":{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/off/verify",
|
||||||
|
"name" : "UserOffVerify",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/offline/create",
|
||||||
|
"name" : "OfflineCreate",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/offline/generate",
|
||||||
|
"name" : "OfflineGenerate",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/offline/service",
|
||||||
|
"name" : "OfflineService",
|
||||||
|
"auth": true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "分配服务包",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"buttons": [{
|
||||||
|
"text": "添加",
|
||||||
|
"color": "#446EFE",
|
||||||
|
"fontSize": "32rpx",
|
||||||
|
"width": "120rpx"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/offline/orders",
|
||||||
|
"name" : "OfflineOrders",
|
||||||
|
"auth": true,
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "订单管理",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/offline/orderInfo",
|
||||||
|
"auth": true,
|
||||||
|
"name": "OfflineInfo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "详情",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#446EFE",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/management/account",
|
||||||
|
"name" : "MagAccount",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "账户咨询办理",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/management/account2",
|
||||||
|
"name" : "MagAccount2",
|
||||||
|
"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/account2",
|
||||||
|
"name" : "AccountWork2",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : " 线下订单",
|
||||||
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path" : "pages/work/delegation",
|
||||||
|
"name" : "DelegationWork",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "委托管理类",
|
||||||
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/orderInfo/orderInfo",
|
||||||
|
"name" : "OrderInfo",
|
||||||
|
"style" : {
|
||||||
|
"navigationBarTitleText" : "",
|
||||||
|
"enablePullDownRefresh" : false,
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#353ef4"
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<input type="safe-password" password v-model="password" placeholder="请输入密码">
|
<input type="safe-password" password v-model="password" placeholder="请输入密码">
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<button :disabled="phone.length < 11 || password == '' || agreement.length == 0" @click="onAuth()">登录</button>
|
<button :disabled="phone.length < 11 || password == ''" @click="onAuth()">登录</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
<u-checkbox-group
|
<u-checkbox-group
|
||||||
@@ -49,6 +49,13 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onAuth(){
|
onAuth(){
|
||||||
|
if(this.agreement.length <= 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请阅读并同意服务协议与隐私政策',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '登录中...'
|
title: '登录中...'
|
||||||
})
|
})
|
||||||
|
|||||||
227
pages/empower/buy.vue
Normal file
227
pages/empower/buy.vue
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- 课程信息 -->
|
||||||
|
<view class="info">
|
||||||
|
<image class="info-cover" :src="empower.cover" mode="aspectFill"></image>
|
||||||
|
<view class="info-text">
|
||||||
|
<view class="info-title">{{empower.title}}</view>
|
||||||
|
<view class="info-subtitle">{{empower.sub_title}}</view>
|
||||||
|
<view class="info-price"><text>¥</text>{{empower.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 报名信息 -->
|
||||||
|
<view class="user-title">报名人</view>
|
||||||
|
<view class="user-block" v-for="(item, index) in formData" :key="index">
|
||||||
|
<view class="user-block-flex">报名信息{{index + 1}}<view class="user-block-remove" v-if="formData.length > 1" @click="onRemoveUser(index)">删除</view></view>
|
||||||
|
<view class="user-block-input">
|
||||||
|
<label>真实姓名</label>
|
||||||
|
<input placeholder="输入姓名" v-model="item.name" maxlength="10" />
|
||||||
|
</view>
|
||||||
|
<view class="user-block-input">
|
||||||
|
<label>手机号码</label>
|
||||||
|
<input placeholder="输入手机号码" v-model="item.mobile" maxlength="11" type="number" />
|
||||||
|
</view>
|
||||||
|
<view class="user-block-input" v-if="semesters.length > 0">
|
||||||
|
<label>选择学期</label>
|
||||||
|
<picker mode="selector" :value="item.index" :range="semesters" range-key="title" @change="onChange($event, index, item)">
|
||||||
|
<view class="user-block-picker">{{semesters[item.index].title}}<uni-icons class="user-block-icon" type="bottom" size="20" color="#999"></uni-icons></view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="user-add" @click="onAddUser"><uni-icons type="plus" size="24" color="#446EFE"></uni-icons> 添加报名人</view>
|
||||||
|
<view class="footer">
|
||||||
|
<view class="footer-text">
|
||||||
|
<view class="footer-text-price"><text>¥</text>{{allPrice}}</view>
|
||||||
|
<view class="footer-text-subtitle">共计{{formData.length}}人报名</view>
|
||||||
|
</view>
|
||||||
|
<button class="footer-btn" @click="onSubmit">提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// ($event) => item.index = $event.detail.value
|
||||||
|
import { buyInit, buy } from '@/apis/interfaces/empower.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
semesters: [],
|
||||||
|
formData : [{
|
||||||
|
name : '',
|
||||||
|
mobile : '',
|
||||||
|
index : 0
|
||||||
|
}],
|
||||||
|
empower : {},
|
||||||
|
allPrice : '0.00'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
buyInit(this.$Route.query.id).then(res => {
|
||||||
|
let { empower, semesters } = res;
|
||||||
|
this.empower = empower
|
||||||
|
this.semesters = semesters
|
||||||
|
this.getTotalPrice()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 计算价格
|
||||||
|
getTotalPrice(){
|
||||||
|
let totalPrice = 0
|
||||||
|
this.formData.map(val => {
|
||||||
|
totalPrice += Number(this.semesters[val.index].price)
|
||||||
|
})
|
||||||
|
this.allPrice = totalPrice.toFixed(2)
|
||||||
|
},
|
||||||
|
// 选择学期
|
||||||
|
onChange(e, index, item){
|
||||||
|
item.index = e.detail.value
|
||||||
|
this.$set(this.formData, index, item)
|
||||||
|
this.getTotalPrice()
|
||||||
|
},
|
||||||
|
// 删除用户数据
|
||||||
|
onRemoveUser(index){
|
||||||
|
this.formData.splice(index,1)
|
||||||
|
this.getTotalPrice()
|
||||||
|
},
|
||||||
|
// 添加新用户
|
||||||
|
onAddUser(){
|
||||||
|
this.formData.push({
|
||||||
|
name : '',
|
||||||
|
mobile : '',
|
||||||
|
index : 0
|
||||||
|
})
|
||||||
|
this.getTotalPrice()
|
||||||
|
},
|
||||||
|
// 提交报名
|
||||||
|
onSubmit(){
|
||||||
|
let submitData = this.formData.map(val => {
|
||||||
|
return {
|
||||||
|
name : val.name,
|
||||||
|
mobile : val.mobile,
|
||||||
|
semester_id : this.semesters[val.index].id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
buy({
|
||||||
|
empower_id: this.$Route.query.id,
|
||||||
|
data: submitData
|
||||||
|
}).then(res => {
|
||||||
|
let { order_type, order_id } = 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">
|
||||||
|
.content{ background: $window-color; padding: 30rpx 30rpx 210rpx; }
|
||||||
|
// 报名人信息
|
||||||
|
.user-title{ padding-top: 30rpx; font-size: 30rpx; line-height: 40rpx; color: gray; }
|
||||||
|
.user-block{
|
||||||
|
background: white;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
&-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 90rpx;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
@extend .border-solid;
|
||||||
|
}
|
||||||
|
&-remove{ color: $main-color; line-height: 90rpx; }
|
||||||
|
&-input{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 90rpx;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
label{ font-size: 32rpx; width: 200rpx; }
|
||||||
|
picker,
|
||||||
|
input{ width: calc(100% - 200rpx); font-size: 32rpx; }
|
||||||
|
.user-block-picker{
|
||||||
|
padding-right: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
@extend .nowrap;
|
||||||
|
.user-block-icon{ position: absolute; right: 0; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.user-add{ text-align: center; background: white; border-radius: 20rpx; margin-top: 30rpx; display: flex; align-items: center; height: 120rpx; justify-content: center; color: $main-color; font-size: 32rpx; }
|
||||||
|
// 报名课程信息
|
||||||
|
.info{
|
||||||
|
display: flex;
|
||||||
|
background: white;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
&-cover{ width: 180rpx; height: 180rpx; border-radius: 10rpx; }
|
||||||
|
&-text{ width: calc(100% - 210rpx); }
|
||||||
|
&-title{ font-size: 38rpx; font-weight: bold; line-height: 50rpx; height: 50rpx; }
|
||||||
|
&-subtitle{ line-height: 40rpx; height: 80rpx; font-size: 30rpx; }
|
||||||
|
&-price{
|
||||||
|
font-weight: bold;
|
||||||
|
color: $text-price;
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
line-height: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
text{
|
||||||
|
font-size: 80%;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 底部
|
||||||
|
.footer{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 30rpx 30rpx 50rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 99;
|
||||||
|
box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .04);
|
||||||
|
background: white;
|
||||||
|
.footer-text{
|
||||||
|
width: 200rpx;
|
||||||
|
&-price{ font-weight: bold; color: $text-price; font-size: 40rpx; text{ font-size: 80%; margin-right: 5rpx; } }
|
||||||
|
&-subtitle{ font-size: 28rpx; color: gray; }
|
||||||
|
}
|
||||||
|
.footer-btn{
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
line-height: 100rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
margin-left: 50rpx;
|
||||||
|
&::after{ display: none; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
145
pages/empower/info.vue
Normal file
145
pages/empower/info.vue
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- 封面 -->
|
||||||
|
<view class="cover">
|
||||||
|
<image class="cover-src" :src="cover" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<!-- 课程信息 -->
|
||||||
|
<view class="info">
|
||||||
|
<view class="info-title">{{ title }}</view>
|
||||||
|
<view class="info-subtitle">{{ subtitle }}</view>
|
||||||
|
<view class="info-info">
|
||||||
|
<view class="info-info-item">
|
||||||
|
<label>总学期</label>
|
||||||
|
<view class="info-value">{{count.all || '-'}}期</view>
|
||||||
|
</view>
|
||||||
|
<view class="info-info-item">
|
||||||
|
<label>已结束</label>
|
||||||
|
<view class="info-value">{{count.over || 0}}期</view>
|
||||||
|
</view>
|
||||||
|
<view class="info-info-item" v-if="semester != null">
|
||||||
|
<label>当期时间</label>
|
||||||
|
<view class="info-value">{{semester.time.start || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="info-info-item" v-if="semester != null">
|
||||||
|
<label>报名价格</label>
|
||||||
|
<view class="info-value price">{{semester.price || '0.00'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 课程介绍 -->
|
||||||
|
<rich-text :nodes="content"></rich-text>
|
||||||
|
<!-- 报名信息 -->
|
||||||
|
<view class="footer">
|
||||||
|
<view :class="['footer-btn', count.ing <= 0 ? 'in' : '']" @click="onBuy">立即购买</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { info } from '@/apis/interfaces/empower.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id : '',
|
||||||
|
cover : '',
|
||||||
|
title : '',
|
||||||
|
subtitle : '',
|
||||||
|
price : '0.00',
|
||||||
|
semester : null,
|
||||||
|
count : {},
|
||||||
|
content : []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
info(this.$Route.query.id).then(res => {
|
||||||
|
let { cover, title, subtitle, price, semester_current, count, content, id } = res;
|
||||||
|
this.id = id
|
||||||
|
this.cover = cover
|
||||||
|
this.title = title
|
||||||
|
this.subtitle = subtitle
|
||||||
|
this.price = price
|
||||||
|
this.semester = semester_current
|
||||||
|
this.count = count
|
||||||
|
this.content = content.replace(/\<img/gi, '<img style="width:100%;height:auto"');
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: title
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onBuy(){
|
||||||
|
if(this.count.ing <= 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '暂无可报名学期',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'EmpowerBuy',
|
||||||
|
params : { id: this.id }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.content{ padding-bottom: 180rpx; }
|
||||||
|
// 封面图
|
||||||
|
.cover{
|
||||||
|
position: relative;
|
||||||
|
padding-top: 70%;
|
||||||
|
background: #f7f8f9;
|
||||||
|
&-src{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||||
|
}
|
||||||
|
// 信息
|
||||||
|
.info{
|
||||||
|
padding: 40rpx;
|
||||||
|
&-title{ font-weight: bold; font-size: 50rpx; margin-bottom: 20rpx; line-height: 65rpx; color: #333; text-align: justify; }
|
||||||
|
&-subtitle{ font-size: 30rpx; line-height: 50rpx; margin-bottom: 40rpx; color: #333; text-align: justify; }
|
||||||
|
&-info{
|
||||||
|
background: $window-color;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
&-item{
|
||||||
|
padding: 30rpx 0;
|
||||||
|
line-height: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
@extend .border-solid;
|
||||||
|
label{ font-weight: bold; width: 170rpx; }
|
||||||
|
&:last-child::after{ display: none; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-value{
|
||||||
|
width: calc(100% - 170rpx);
|
||||||
|
text-align: right;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
&.price{ font-weight: bold; color: $text-price; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 底部
|
||||||
|
.footer{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 30rpx 30rpx 50rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 99;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .04);
|
||||||
|
.footer-btn{ background: $main-color; color: white; line-height: 100rpx; border-radius: 50rpx; flex: 1; text-align: center; font-weight: bold; font-size: 36rpx; }
|
||||||
|
.footer-btn.in{ opacity: .6; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
431
pages/empower/order.vue
Normal file
431
pages/empower/order.vue
Normal file
@@ -0,0 +1,431 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- tabs -->
|
||||||
|
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||||
|
<view class="screen-flex">
|
||||||
|
<view class="screen-picker">
|
||||||
|
<picker :range="statusArr" range-key="title" :value="statusIndex" @change="onPickerChange($event, 'statusIndex')">
|
||||||
|
<view class="screen-text nowrap">
|
||||||
|
{{ statusArr[statusIndex].title }}
|
||||||
|
<uni-icons class="screen-icon" type="bottom" size="32rpx" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="screen-picker">
|
||||||
|
<picker :range="empowerArr" range-key="title" :value="empowerIndex" @change="onPickerChange($event, 'empowerIndex')">
|
||||||
|
<view class="screen-text nowrap">
|
||||||
|
{{ empowerArr[empowerIndex].title }}
|
||||||
|
<uni-icons class="screen-icon" type="bottom" size="32rpx" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</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)">
|
||||||
|
<text class="orders-tag" v-if="!item.is_my">客户</text>
|
||||||
|
<text class="orders-tag order-tag-my" v-else>个人</text>
|
||||||
|
{{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 orders-content-type">{{item.empower.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item orders-content-bottom" @click="item.is_show_type = !item.is_show_type">
|
||||||
|
<label>课程数量</label>
|
||||||
|
<view class="nowrap orders-content-type">
|
||||||
|
×{{item.items.count}}
|
||||||
|
</view>
|
||||||
|
<uni-icons class="orders-content-icon" :type="item.is_show_type ? 'top': 'bottom'" size="14" color="gray"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-block" v-show="item.is_show_type">
|
||||||
|
<view class="item-flex" v-for="(citem, cindex) in item.items.lists" :key="cindex">
|
||||||
|
<view class="item-flex-title">{{citem.semester.subtitle}}({{citem.name}})</view>
|
||||||
|
<view class="item-flex-value">¥{{citem.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>支付金额</label>
|
||||||
|
<view class="nowrap">¥{{item.price}}</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="btns">
|
||||||
|
<view class="btns-item btns-border" v-if="item.status == 0" @click="onCancel(item.order_id)">取消</view>
|
||||||
|
<view class="btns-item btns-border" v-if="item.status == 0" @click="onPay(item)">支付</view>
|
||||||
|
<view class="btns-item" @click="onShowUsers(item.items)">报名信息</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>
|
||||||
|
<!-- 弹出报名人信息 -->
|
||||||
|
<u-popup :show="usersShow" closeable round="30rpx" @close="usersShow = false">
|
||||||
|
<view class="users-content">
|
||||||
|
<view class="users-title">报名信息</view>
|
||||||
|
<view class="users-lists">
|
||||||
|
<view class="users-lists-item" v-for="(item, index) in users" :key="index">
|
||||||
|
<view class="users-item nowrap"><label>报名姓名</label>{{item.name}}</view>
|
||||||
|
<view class="users-item nowrap"><label>报名手机</label>{{item.mobile}}</view>
|
||||||
|
<view class="users-item nowrap"><label>课程名称</label>{{item.semester.subtitle}}</view>
|
||||||
|
<view class="users-item nowrap"><label>签到状态</label><text class="bold">{{item.status_text}}</text></view>
|
||||||
|
<view class="users-item"><label>课程地址</label>{{item.semester.address}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { orderInit, orderList, orderCancel } from '@/apis/interfaces/empower.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
statusArr : [{ title: '全部订单', id: '' }],
|
||||||
|
empowerArr : [{ title: '全部课程', id: '' }],
|
||||||
|
statusIndex : 0,
|
||||||
|
empowerIndex: 0,
|
||||||
|
// 报名信息
|
||||||
|
users : [],
|
||||||
|
usersTotal : 0,
|
||||||
|
usersShow : false,
|
||||||
|
// 订单列表
|
||||||
|
orders : [],
|
||||||
|
// 分页
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
pagesShow : false,
|
||||||
|
status : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
orderInit().then(res => {
|
||||||
|
let { status, empower } = res;
|
||||||
|
this.statusArr = status
|
||||||
|
this.empowerArr = [...this.empowerArr, ...empower]
|
||||||
|
this.statusIndex = status.findIndex(val => val.id == this.$Route.query.status)
|
||||||
|
// 获取列表
|
||||||
|
this.getList()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
// 是否处理当前列表状态
|
||||||
|
let isOrderId = this.$store.getters.getOrderId
|
||||||
|
if(isOrderId != null){
|
||||||
|
if(this.getSignState){
|
||||||
|
this.onGetSign(isOrderId)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 报名信息
|
||||||
|
onShowUsers(obj){
|
||||||
|
let { count, lists } = obj
|
||||||
|
this.users = lists
|
||||||
|
this.usersTotal = count
|
||||||
|
this.usersShow = true
|
||||||
|
},
|
||||||
|
// 筛选类型
|
||||||
|
onPickerChange(e, key){
|
||||||
|
let { value } = e.detail
|
||||||
|
this[key] = value
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.orders = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
getList(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
if(this.$store.getters.getOrderId != null){
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.$store.commit('setOrderId', null)
|
||||||
|
}
|
||||||
|
orderList({
|
||||||
|
status : this.statusArr[this.statusIndex].id,
|
||||||
|
empower : this.empowerArr[this.empowerIndex].id,
|
||||||
|
page : this.page.current ,
|
||||||
|
}).then(res => {
|
||||||
|
let { data, page } = res;
|
||||||
|
data.map(val => {
|
||||||
|
val.is_show_type = false
|
||||||
|
})
|
||||||
|
let atList = page.current == 1 ? [] : this.orders
|
||||||
|
this.orders = atList.concat(data)
|
||||||
|
this.page = page
|
||||||
|
this.pagesShow = false
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
copyNo(no){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data : no,
|
||||||
|
success : res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单号已复制',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消订单
|
||||||
|
onCancel(id){
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '取消订单后无法找回,确认取消吗?',
|
||||||
|
success : modalRes => {
|
||||||
|
if(modalRes.confirm){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
orderCancel(id).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单已取消',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
this.removeListVal(id)
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 变更当前列表状态
|
||||||
|
removeListVal(id){
|
||||||
|
let ListArr = this.orders
|
||||||
|
let ListIndex = ListArr.findIndex(val => val.business_order_id == id)
|
||||||
|
if(ListIndex >= 0){
|
||||||
|
this.orders.splice(ListIndex, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 订单支付
|
||||||
|
onPay(obj){
|
||||||
|
let { order_id, order_type } = obj
|
||||||
|
this.$store.commit('setOrderId', order_id)
|
||||||
|
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.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.status = 'nomore';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content{ background: #f7f8f9; min-height: 100vh; }
|
||||||
|
// 订单弹出层
|
||||||
|
.users-content{
|
||||||
|
.users-title{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 44rpx;
|
||||||
|
color: #333;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
.users-lists{
|
||||||
|
padding: 0 30rpx 50rpx;
|
||||||
|
max-height: 70vh;
|
||||||
|
overflow-y: scroll;
|
||||||
|
.users-lists-item{
|
||||||
|
background: #f7f8f9;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.users-item{
|
||||||
|
position: relative;
|
||||||
|
line-height: 45rpx;
|
||||||
|
min-height: 45rpx;
|
||||||
|
padding-left: 160rpx;
|
||||||
|
margin: 5rpx 0;
|
||||||
|
text-align: right;
|
||||||
|
label{ position: absolute; left: 0; top: 0; color: gray; }
|
||||||
|
.bold{ font-weight: bold; color: $text-price; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单筛选
|
||||||
|
.screen-flex{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.screen-picker{ width: 50%; text-align: center; }
|
||||||
|
.screen-text{ line-height: 90rpx; height: 90rpx; display: inline-block; font-size: 30rpx; }
|
||||||
|
.screen-icon{ margin-left: 10rpx; }
|
||||||
|
}
|
||||||
|
// 订单为空
|
||||||
|
.order-null{
|
||||||
|
height: 80vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
// 订单列表
|
||||||
|
.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-bottom{
|
||||||
|
padding-right: 40rpx;
|
||||||
|
position: relative;
|
||||||
|
.orders-content-icon{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-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;
|
||||||
|
}
|
||||||
|
.orders-tag{
|
||||||
|
display: inline-block;
|
||||||
|
background: $main-color;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: white;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
&.order-tag-my{
|
||||||
|
background: $text-price;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btns{
|
||||||
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
|
.btns-item{
|
||||||
|
display: inline-block;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
&.btns-border{
|
||||||
|
line-height: 68rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border:solid 1rpx $main-color;
|
||||||
|
background: white;
|
||||||
|
color: $main-color;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -38,9 +38,9 @@
|
|||||||
<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>
|
||||||
<scroll-view class="the-tabs" scroll-x="true" >
|
<scroll-view class="the-tabs" scroll-x="true" >
|
||||||
<block v-for="(item, index) in theTabs" :key="index">
|
<block v-for="(item, index) in theTabs" :key="index">
|
||||||
@@ -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">
|
||||||
@@ -92,7 +136,7 @@
|
|||||||
<!-- 诉讼委托类 -->
|
<!-- 诉讼委托类 -->
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="block-title">
|
<view class="block-title">
|
||||||
<view class="title">诉讼委托类</view>
|
<view class="title">诉讼委托咨询类</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lawsuit">
|
<view class="lawsuit">
|
||||||
<block v-for="(item, index) in appMenus.cases" :key="index">
|
<block v-for="(item, index) in appMenus.cases" :key="index">
|
||||||
@@ -109,7 +153,7 @@
|
|||||||
<!-- 增收赋能类 -->
|
<!-- 增收赋能类 -->
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="block-title">
|
<view class="block-title">
|
||||||
<view class="title">增收赋能类</view>
|
<view class="title">增收赋能咨询类</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view
|
<scroll-view
|
||||||
class="the-flex"
|
class="the-flex"
|
||||||
@@ -117,37 +161,11 @@
|
|||||||
scroll-x="true"
|
scroll-x="true"
|
||||||
scroll-with-animation="true"
|
scroll-with-animation="true"
|
||||||
:scroll-into-view='defaultViewId'
|
:scroll-into-view='defaultViewId'
|
||||||
@click="onToast()"
|
|
||||||
>
|
>
|
||||||
<view class="the-flex-item">
|
<view class="the-flex-item" v-for="(item, index) in empowerArr" :key="index" @click="onEmpower(item.id)">
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_07.png') + ');'"></view>
|
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
|
||||||
<view class="title nowrap">巅峰销售思维</view>
|
<view class="title nowrap">{{item.title}}</view>
|
||||||
<view class="price nowrap"><text>¥</text>2980</view>
|
<view class="price nowrap"><text>¥</text>{{item.price}}</view>
|
||||||
</view>
|
|
||||||
<view class="the-flex-item">
|
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_08.png') + ');'"></view>
|
|
||||||
<view class="title nowrap">团队系统思维</view>
|
|
||||||
<view class="price nowrap"><text>¥</text>3980</view>
|
|
||||||
</view>
|
|
||||||
<view class="the-flex-item">
|
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_09.png') + ');'"></view>
|
|
||||||
<view class="title nowrap">领袖演说思维</view>
|
|
||||||
<view class="price nowrap"><text>¥</text>4980</view>
|
|
||||||
</view>
|
|
||||||
<view class="the-flex-item">
|
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_10.png') + ');'"></view>
|
|
||||||
<view class="title nowrap">卓越领袖能量思维</view>
|
|
||||||
<view class="price nowrap"><text>¥</text>5980</view>
|
|
||||||
</view>
|
|
||||||
<view class="the-flex-item">
|
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_11.png') + ');'"></view>
|
|
||||||
<view class="title nowrap">激发内在无限潜能</view>
|
|
||||||
<view class="price nowrap"><text>¥</text>9980</view>
|
|
||||||
</view>
|
|
||||||
<view class="the-flex-item">
|
|
||||||
<view class="cover" :style="'background-image: url(' + require('@/static/synthesize/img_12.png') + ');'"></view>
|
|
||||||
<view class="title nowrap">其他赋能培训会议</view>
|
|
||||||
<view class="price nowrap">价格另议</view>
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -166,7 +184,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-count-down>
|
</u-count-down>
|
||||||
</view>
|
</view>
|
||||||
<image class="ad-img" :src="layAdImg" mode="widthFix"></image>
|
<image class="ad-img" :src="layAdImg" mode="heightFix"></image>
|
||||||
<view class="ad-btn">
|
<view class="ad-btn">
|
||||||
<u-icon
|
<u-icon
|
||||||
class="ad-btn-icon"
|
class="ad-btn-icon"
|
||||||
@@ -183,7 +201,8 @@
|
|||||||
|
|
||||||
<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'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -208,20 +227,58 @@
|
|||||||
appMenus : {
|
appMenus : {
|
||||||
cases : [],
|
cases : [],
|
||||||
service : []
|
service : []
|
||||||
}
|
},
|
||||||
|
// 增收赋能列表
|
||||||
|
empowerArr : [],
|
||||||
|
// 账户管理类
|
||||||
|
accountData : [],
|
||||||
|
// 委托管理类
|
||||||
|
delegation : []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getCategory()
|
this.getCategory()
|
||||||
this.getJf()
|
this.getJf()
|
||||||
this.getIndex()
|
this.getIndex()
|
||||||
|
// 增收赋能
|
||||||
|
this.getEmpower()
|
||||||
|
// 管理类业务
|
||||||
|
this.getManagement()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onToast(){
|
// 获取管理类业务
|
||||||
|
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){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'EmpowerInfo',
|
||||||
|
params : { id }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 增收赋能接口
|
||||||
|
getEmpower(){
|
||||||
|
lists().then(res => {
|
||||||
|
this.empowerArr = res;
|
||||||
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '即将开放,敬请期待',
|
title: err.message,
|
||||||
icon : 'none'
|
icon : 'none'
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取金法列表
|
// 获取金法列表
|
||||||
getJf(){
|
getJf(){
|
||||||
@@ -327,8 +384,8 @@
|
|||||||
}
|
}
|
||||||
// ad弹窗广告
|
// ad弹窗广告
|
||||||
.ad-lay{
|
.ad-lay{
|
||||||
width: 70vw;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
.ad-down{
|
.ad-down{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
@@ -346,7 +403,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ad-img{
|
.ad-img{
|
||||||
width: 70vw;
|
height: 75vh;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
.ad-btn{
|
.ad-btn{
|
||||||
@@ -507,8 +564,6 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: calc(100% - 60rpx);
|
width: calc(100% - 60rpx);
|
||||||
&-item{
|
&-item{
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
width: 25%;
|
width: 25%;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -516,18 +571,22 @@
|
|||||||
color: #454545;
|
color: #454545;
|
||||||
transition: all .4s;
|
transition: all .4s;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
background-color: transparent;
|
||||||
&.active{
|
&.active{
|
||||||
color: white;
|
color: white;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-acitve-block{
|
&-acitve-block{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: linear-gradient( to right, #d51959, #ec7247);
|
background-image: linear-gradient( to right, #d51959, #ec7247);
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
top: 0;
|
||||||
transition: all .4s;
|
transition: all .4s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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>
|
||||||
151
pages/management/account2.vue
Normal file
151
pages/management/account2.vue
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<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">{{pickerArr[pickerIndex].subtitle}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="from-block-item">
|
||||||
|
<label>服务费</label>
|
||||||
|
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户服务费(元)" v-model="price" />
|
||||||
|
</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 { customTypes,customTypeStore } from '@/apis/interfaces/custom.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerArr : [],
|
||||||
|
pickerIndex : 0,
|
||||||
|
name : '',
|
||||||
|
phone : '',
|
||||||
|
price : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
customTypes().then(res => {
|
||||||
|
console.log(res)
|
||||||
|
uni.hideLoading()
|
||||||
|
this.pickerArr = res;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 提交表单
|
||||||
|
onSubmit(){
|
||||||
|
let { name, phone, pickerArr, pickerIndex,price} = this
|
||||||
|
|
||||||
|
if(price === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入服务费金额',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(name === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户姓名',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(phone === ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户手机号码',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: "提交中...",
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
name : name,
|
||||||
|
mobile : phone,
|
||||||
|
price : price
|
||||||
|
}
|
||||||
|
customTypeStore(pickerArr[pickerIndex].id,params).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',
|
||||||
|
mask:true,
|
||||||
|
duration:3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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>
|
||||||
22
pages/off/agreement.vue
Normal file
22
pages/off/agreement.vue
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
65
pages/off/off.vue
Normal file
65
pages/off/off.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="title">为保证你的账号安全,在你提交的注销申请生效前,需同时满足以下条件:</view>
|
||||||
|
<view class="title">1. 账号处干安全状态</view>
|
||||||
|
<view class="text">账号为你本人拥有,处于正常使用状态,无被盗、违规、封禁风险。</view>
|
||||||
|
<view class="title">2. 账号财产已结清,交易已完成</view>
|
||||||
|
<view class="text">账号下所有关联业务的资产(业务奖金,火力值)和权益(包括会员身份)均已结清、清空或自愿放弃,所有交易已完成或已自愿放弃。</view>
|
||||||
|
<view class="title">3. 账号无任何纠纷,包括但不限于投诉或举报,服务均已完成或已自愿放弃</view>
|
||||||
|
<view class="agreement">
|
||||||
|
<u-checkbox-group
|
||||||
|
v-model="agreement"
|
||||||
|
placement="row"
|
||||||
|
>
|
||||||
|
<u-checkbox shape="circle" name="agreement" activeColor="#446EFE"></u-checkbox>
|
||||||
|
我已阅读并同意
|
||||||
|
<my-link class="agreement-nav":to="{name: 'RichText', params: { id: 5 }}">《抖火注销须知》</my-link>
|
||||||
|
</u-checkbox-group>
|
||||||
|
</view>
|
||||||
|
<view class="tool">
|
||||||
|
<button class="btn" :disabled="agreement.length <= 0" @click="onNext()">下一步</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
agreement: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onNext(){
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'UserOffVerify'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content{
|
||||||
|
padding: 20rpx 50rpx 50rpx;
|
||||||
|
background: white;
|
||||||
|
.title{ font-weight: bold; font-size: 36rpx;line-height: 50rpx; margin-top: 30rpx; text-align: justify; }
|
||||||
|
.text{ font-size: 32rpx; color: #555; margin-bottom: 30rpx; line-height: 50rpx; text-align: justify; }
|
||||||
|
.agreement{ font-size: 30rpx; margin-top: 100rpx; color: gray; }
|
||||||
|
.agreement-nav{ color: $main-color; }
|
||||||
|
.tool{
|
||||||
|
padding-top: 50rpx;
|
||||||
|
button{
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
eight: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
color: white;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
&[disabled]{ opacity: .5; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
292
pages/off/verify.vue
Normal file
292
pages/off/verify.vue
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
<template>
|
||||||
|
<view class="registered-content">
|
||||||
|
<view class="title">注销账号</view>
|
||||||
|
<view class="submit-title">请填写您的账号信息</view>
|
||||||
|
<view class="from">
|
||||||
|
<view class="from-inpus from-input-phoen">
|
||||||
|
<label>+86</label>
|
||||||
|
<input type="number" v-model="username" maxlength="11" placeholder="输入手机号码">
|
||||||
|
</view>
|
||||||
|
<view class="from-inpus from-password">
|
||||||
|
<label>登录密码</label>
|
||||||
|
<input type="safe-password" password v-model="password" placeholder="请输入登录密码">
|
||||||
|
</view>
|
||||||
|
<view class="from-inpus from-input-code">
|
||||||
|
<label>验证码</label>
|
||||||
|
<input type="number" v-model="code" maxlength="4" placeholder="短信验证码">
|
||||||
|
<button :disabled="username.length < 11 || getSms" @click="getCode">{{sendCode}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button">
|
||||||
|
<button @click="onRegistered()">注销账号</button>
|
||||||
|
</view>
|
||||||
|
<!-- 显示图形验证码 -->
|
||||||
|
<u-popup :show="captchaShow" mode="center" :round="10" closeable @close="captchaShow = false, captcha = ''">
|
||||||
|
<view class="captcha-lay">
|
||||||
|
<view class="captcha-title">图形验证</view>
|
||||||
|
<view class="captcha-img">
|
||||||
|
<image :src="captchaImg" mode="widthFix" @click="getCode()"></image>
|
||||||
|
</view>
|
||||||
|
<view class="captcha-input">
|
||||||
|
<input type="text" placeholder="请输入验证码" v-model="captcha" maxlength="10">
|
||||||
|
</view>
|
||||||
|
<button class="captcha-btn" @click="getPhoneCode">验证</button>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var outTime;
|
||||||
|
import { offSmsCode, offUser } from '@/apis/interfaces/user.js'
|
||||||
|
import { captcha } from '@/apis/interfaces/auth.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
password : '',
|
||||||
|
username : '',
|
||||||
|
code : '',
|
||||||
|
getSms : false,
|
||||||
|
sendCode : '获取验证码',
|
||||||
|
captcha : '',
|
||||||
|
captchaImg : '',
|
||||||
|
captchaKey : '',
|
||||||
|
captchaShow : false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 提交修改信息
|
||||||
|
onRegistered(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '提交中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
offUser({
|
||||||
|
username: this.username,
|
||||||
|
password: this.password,
|
||||||
|
code : this.code,
|
||||||
|
}).then(res => {
|
||||||
|
// 重置验证码与计时器
|
||||||
|
this.getSms = false;
|
||||||
|
this.sendCode = '获取验证码';
|
||||||
|
clearInterval(outTime);
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showModal({
|
||||||
|
title : "提示",
|
||||||
|
content : "账号注销申请已提交",
|
||||||
|
showCancel : false,
|
||||||
|
confirmColor: "#446EFE",
|
||||||
|
success : modalRes => {
|
||||||
|
this.$store.commit('setToken', '');
|
||||||
|
this.$Router.replaceAll({
|
||||||
|
name: 'Auth'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 弹出图形验证码
|
||||||
|
getCode(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
captcha().then(res => {
|
||||||
|
let { img, key } = res
|
||||||
|
this.captchaImg = img
|
||||||
|
this.captchaKey = key
|
||||||
|
this.captchaShow = true
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取验证码
|
||||||
|
getPhoneCode() {
|
||||||
|
uni.showLoading({
|
||||||
|
title : '加载中...',
|
||||||
|
mask :true
|
||||||
|
})
|
||||||
|
let smsTime = 60;
|
||||||
|
offSmsCode({
|
||||||
|
mobileNo : this.username,
|
||||||
|
captcha : this.captcha,
|
||||||
|
captcha_key : this.captchaKey
|
||||||
|
}).then(res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
this.captchaShow = false;
|
||||||
|
this.captcha = '';
|
||||||
|
this.getSms = true;
|
||||||
|
this.sendCode = smsTime + 's后重新获取';
|
||||||
|
outTime = setInterval(() => {
|
||||||
|
if (smsTime <= 1) {
|
||||||
|
this.getSms = false;
|
||||||
|
this.sendCode = '重新获取';
|
||||||
|
clearInterval(outTime);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.sendCode = smsTime + 's后重新获取';
|
||||||
|
smsTime -= 1;
|
||||||
|
}, 1000);
|
||||||
|
}).catch((err) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 图形验证码
|
||||||
|
.captcha-lay{
|
||||||
|
padding: 30rpx;
|
||||||
|
width: 70vw;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.captcha-title{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 35rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 90rpx;
|
||||||
|
}
|
||||||
|
.captcha-img{
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
image{
|
||||||
|
width: 300rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.captcha-input{
|
||||||
|
input{
|
||||||
|
height: 100rpx;
|
||||||
|
border:solid 1rpx #ddd;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 98rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.captcha-btn{
|
||||||
|
margin-top: 30rpx;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 34rpx;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 注册
|
||||||
|
.registered-content{
|
||||||
|
padding: 50rpx;
|
||||||
|
.title{
|
||||||
|
padding-top: 3vh;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 44rpx;
|
||||||
|
}
|
||||||
|
.submit-title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
// 注册单
|
||||||
|
.from{
|
||||||
|
margin-top: 80rpx;
|
||||||
|
}
|
||||||
|
.from-inpus{
|
||||||
|
@extend .border-solid;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
label{
|
||||||
|
width: 170rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.from-password{
|
||||||
|
input{
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.from-input-phoen{
|
||||||
|
label{
|
||||||
|
line-height: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-right: solid 1rpx $border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.from-input-code{
|
||||||
|
button{
|
||||||
|
font-size: 32rpx;
|
||||||
|
width: 230rpx;
|
||||||
|
padding: 0;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
border-radius: 0;
|
||||||
|
margin: 0;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: $main-color;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
width: calc(100% - 460rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 按钮
|
||||||
|
.button{
|
||||||
|
padding-top: 50rpx;
|
||||||
|
button{
|
||||||
|
background: $main-color;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: white;
|
||||||
|
font-size: 38rpx;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
190
pages/offline/create.vue
Normal file
190
pages/offline/create.vue
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<template>
|
||||||
|
<view class="create-page">
|
||||||
|
<view class="create-title">创建新的订单</view>
|
||||||
|
<view class="create-submit">完善创建订单用户与订单类型</view>
|
||||||
|
<view class="create-from">
|
||||||
|
<view class="create-type">
|
||||||
|
<view class="create-type-title">选择业务类型</view>
|
||||||
|
<block v-for="(item, index) in businessArr" :key="index">
|
||||||
|
<view class="create-type-item" :class="{'active': (item.business_id == businessId || item.synthesis_id == businessId) && item.self_type == selfType}" @click="onBusiness(item.business_id || item.synthesis_id, item.self_type)">
|
||||||
|
<image class="create-type-icon" :src="item.cover_url || item.cover" mode="aspectFill"></image>
|
||||||
|
<view class="create-type-text">
|
||||||
|
<view class="title nowrap">{{item.title || '-'}}</view>
|
||||||
|
<view class="submit nowrap">{{item.self_type == 'synthesis' ? '相关个人法律咨询服务' : item.subtitle || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="create-btn">
|
||||||
|
<button size="default" @click="onNext()">下一步</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { business } from '@/apis/interfaces/offline.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
businessArr: [],
|
||||||
|
businessId : '',
|
||||||
|
selfType : '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
business().then(res => {
|
||||||
|
this.businessArr = res
|
||||||
|
this.businessId = res[0].business_id
|
||||||
|
this.selfType = res[0].self_type
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 选择业务类型
|
||||||
|
onBusiness(id, type){
|
||||||
|
this.selfType = type
|
||||||
|
this.businessId = id
|
||||||
|
},
|
||||||
|
// 创建业务单
|
||||||
|
onNext(){
|
||||||
|
let busines = this.businessArr.find(val => val.business_id === this.businessId)
|
||||||
|
this.$Router.replace({
|
||||||
|
name : 'OfflineGenerate',
|
||||||
|
params : {
|
||||||
|
businessTitle : busines.title,
|
||||||
|
businessId : busines.business_id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.create-page{
|
||||||
|
padding: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
.create-title{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 44rpx;
|
||||||
|
}
|
||||||
|
.create-submit{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
}
|
||||||
|
.create-from{
|
||||||
|
padding-top: 50rpx;
|
||||||
|
}
|
||||||
|
// 目标用户
|
||||||
|
.create-user{
|
||||||
|
background: #f8f8f8;
|
||||||
|
border-radius: $radius;
|
||||||
|
padding: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.cover{
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
background: white;
|
||||||
|
border-radius: $radius;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
border: dashed 1rpx #ddd;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
.cover-src{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.nickname{
|
||||||
|
width: calc(100% - 188rpx);
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
&.hide{
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
width: 80rpx;
|
||||||
|
text-align: right;
|
||||||
|
.icon-u{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 选择业务类型
|
||||||
|
.create-type{
|
||||||
|
padding-top: 50rpx;
|
||||||
|
.create-type-title{
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50rpx;
|
||||||
|
color: gray;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.create-type-item{
|
||||||
|
background: #f8f8f8;
|
||||||
|
border-radius: $radius;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
border:solid 1rpx #f8f8f8;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.create-type-icon{
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
margin-right: $margin;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: $radius;
|
||||||
|
}
|
||||||
|
.create-type-text{
|
||||||
|
line-height: 40rpx;
|
||||||
|
.title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.submit{
|
||||||
|
color: gray;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.active{
|
||||||
|
border:solid 1rpx $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 按钮
|
||||||
|
.create-btn{
|
||||||
|
margin-top: 90rpx;
|
||||||
|
button[size="default"]{
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
background: $main-color;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
554
pages/offline/generate.vue
Normal file
554
pages/offline/generate.vue
Normal file
@@ -0,0 +1,554 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="block">
|
||||||
|
<view class="block-title">客户信息</view>
|
||||||
|
<view class="block-item">
|
||||||
|
<label class="block-item-label"><text>*</text>客户姓名</label>
|
||||||
|
<view class="inputs-flex">
|
||||||
|
<input
|
||||||
|
class="text-input"
|
||||||
|
v-model="user"
|
||||||
|
placeholder="请输入客户姓名"
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="block-item">
|
||||||
|
<label class="block-item-label"><text>*</text>手机号码</label>
|
||||||
|
<view class="inputs-flex">
|
||||||
|
<input
|
||||||
|
class="text-input"
|
||||||
|
v-model="phone"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入客户手机号码"
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<block v-if="serviceArr.length > 0">
|
||||||
|
<view class="block" v-for="(item, index) in serviceArr" :key="index">
|
||||||
|
<view class="block-title">
|
||||||
|
{{item.title}}
|
||||||
|
<view class="block-remove" @click="onRemove(index)" v-if="serviceArr.length > 1">
|
||||||
|
<u-icon class="block-remove-icon" size="15" color="#446EFE" name="minus-circle"></u-icon>移出
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 机构 -->
|
||||||
|
<view class="block-item">
|
||||||
|
<label class="block-item-label"><text>*</text>机构</label>
|
||||||
|
<view class="institution-picker" @click="onShowInstitution(item.institution, item, index)">
|
||||||
|
<view class="institution-picker-text nowrap">{{item.institution[item.institutionIndex].title}}</view>
|
||||||
|
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 业务咨询类型 -->
|
||||||
|
<view class="block-item">
|
||||||
|
<label class="block-item-label"><text>*</text>业务咨询类型</label>
|
||||||
|
<picker :range="item.fromType" range-key="title" :value="item.fromIndex" @change="businessChange($event, item, index)">
|
||||||
|
<view class="institution-picker">
|
||||||
|
<view class="institution-picker-text nowrap">{{item.fromType[item.fromIndex].title}}</view>
|
||||||
|
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<!-- 表单信 -->
|
||||||
|
<view
|
||||||
|
class="block-item"
|
||||||
|
v-for="(formItem, formIndex) in item.froms"
|
||||||
|
:key="formIndex"
|
||||||
|
v-if="item.subVal[formItem.pre_key] == formItem.pre_value"
|
||||||
|
>
|
||||||
|
<block v-if="formItem.type == 'price' || formItem.type == 'number' || formItem.type == 'day'">
|
||||||
|
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</label>
|
||||||
|
<view class="inputs-flex">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
v-model="item.subVal[formItem.key]"
|
||||||
|
:type="formItem.type == 'price' ? 'digit': 'number'"
|
||||||
|
:placeholder="'请输入' + formItem.title"
|
||||||
|
>
|
||||||
|
<text class="unit" v-if="formItem.type == 'price'">元</text>
|
||||||
|
<text class="unit" v-if="formItem.type == 'number' || formItem.type == 'day'">天</text>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-if="formItem.type == 'radio'">
|
||||||
|
<view class="radio-flex">
|
||||||
|
<view class="radio-title"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</view>
|
||||||
|
<radio-group @change="item.subVal[formItem.key] = $event.detail.value">
|
||||||
|
<label class="radio-label" v-for="(radioItem, radioIndex) in formItem.options" :key="radioIndex">
|
||||||
|
<radio class="radio-input" color="#446EFE" :checked="radioIndex === item.subVal[formItem.key]" :value="radioIndex"/>{{radioItem}}
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-if="formItem.type == 'checkbox'">
|
||||||
|
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}(可多选)</label>
|
||||||
|
<checkbox-group @change="item.subVal[formItem.key] = $event.detail.value">
|
||||||
|
<label class="checkbox-item" v-for="(checkboxItem, checkboxIndex) in formItem.options">
|
||||||
|
<checkbox class="checkbox-input" :value="checkboxIndex" color="#446EFE"></checkbox>{{checkboxItem}}
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
|
</block>
|
||||||
|
<block v-if="formItem.type == 'select'">
|
||||||
|
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</label>
|
||||||
|
<picker :range="formItem.options" :value="item.subVal[formItem.key]" @change="item.subVal[formItem.key] = $event.detail.value">
|
||||||
|
<view class="institution-picker">
|
||||||
|
<view class="institution-picker-text nowrap" :class="{'institution-picker-gray': item.subVal[formItem.key] == 0}">{{formItem.options[item.subVal[formItem.key]]}}</view>
|
||||||
|
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</block>
|
||||||
|
<block v-if="formItem.type == 'textarea'">
|
||||||
|
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</label>
|
||||||
|
<textarea
|
||||||
|
class="textarea"
|
||||||
|
:placeholder="'请输入' + formItem.title"
|
||||||
|
v-model="item.subVal[formItem.key]"
|
||||||
|
></textarea>
|
||||||
|
</block>
|
||||||
|
<block v-if="formItem.type == 'text'">
|
||||||
|
<label class="block-item-label"><text v-if="formItem.is_required == 1">*</text>{{formItem.title}}</label>
|
||||||
|
<view class="inputs-flex">
|
||||||
|
<input
|
||||||
|
class="text-input"
|
||||||
|
v-model="item.subVal[formItem.key]"
|
||||||
|
:placeholder="'请输入' + formItem.title"
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="footer">
|
||||||
|
<view class="footer-text">温馨提示:为了匹配最准确方案,请如实填写信息</view>
|
||||||
|
<view class="footer-flex">
|
||||||
|
<button @click="onAdd">添加新信息</button>
|
||||||
|
<button @click="onSubmit">下一步</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 机构弹出层 -->
|
||||||
|
<oct-mechanism-picker
|
||||||
|
ref="institutionPicker"
|
||||||
|
title="选择办理机构"
|
||||||
|
:columns="columns"
|
||||||
|
@choose="institutionChange"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { institution, business, institutionType, submitStore } from '@/apis/interfaces/offline.js';
|
||||||
|
import { octpicker } from '@/components/oct-picker.vue'
|
||||||
|
export default {
|
||||||
|
components: { octpicker },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
user : '',
|
||||||
|
phone : '',
|
||||||
|
columns : [],
|
||||||
|
businessArr: [],
|
||||||
|
serviceArr : [],
|
||||||
|
old : {},
|
||||||
|
cIndex : 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let { businessId, businessTitle } = this.$Route.query
|
||||||
|
this.getInstitution(businessId, businessTitle)
|
||||||
|
this.getBusiness()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 显示选择机构
|
||||||
|
onShowInstitution(e, item, index){
|
||||||
|
this.columns = e
|
||||||
|
this.old = item
|
||||||
|
this.cIndex = index
|
||||||
|
this.$refs.institutionPicker.open()
|
||||||
|
},
|
||||||
|
// 移出选项
|
||||||
|
onRemove(index){
|
||||||
|
this.serviceArr.splice(index, 1)
|
||||||
|
},
|
||||||
|
// 获取主业务
|
||||||
|
getBusiness(){
|
||||||
|
business().then(res => {
|
||||||
|
this.businessArr = res
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取主业务机构
|
||||||
|
getInstitution(businessId, businessTitle){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...'
|
||||||
|
})
|
||||||
|
institution(businessId).then(institutionArr => {
|
||||||
|
let forms = this.getForms(institutionArr[0].institution_id)
|
||||||
|
forms.then(val => {
|
||||||
|
this.servicePush( val, institutionArr, businessTitle, businessId )
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取业务类型
|
||||||
|
async getForms(businessId){
|
||||||
|
return await institutionType(businessId)
|
||||||
|
},
|
||||||
|
// 组织业务表单数据
|
||||||
|
servicePush( vals, institutionArr, businessTitle, businessId ){
|
||||||
|
let fromType = [],
|
||||||
|
fromsVal = {},
|
||||||
|
froms = vals[0].params
|
||||||
|
|
||||||
|
fromType = vals.map((val) => {
|
||||||
|
return {
|
||||||
|
type_id: val.type_id,
|
||||||
|
title : val.title
|
||||||
|
}
|
||||||
|
})
|
||||||
|
froms.map(val => {
|
||||||
|
if(val.type === 'checkbox'){
|
||||||
|
fromsVal[val.key] = []
|
||||||
|
}else if(val.type === 'select'){
|
||||||
|
fromsVal[val.key] = 0
|
||||||
|
}else {
|
||||||
|
fromsVal[val.key] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 新增卡片
|
||||||
|
this.serviceArr.push({
|
||||||
|
title : businessTitle,
|
||||||
|
institution : institutionArr,
|
||||||
|
allInstitution : vals,
|
||||||
|
institutionIndex: 0,
|
||||||
|
fromType : fromType,
|
||||||
|
fromIndex : 0,
|
||||||
|
froms : froms,
|
||||||
|
subVal : {
|
||||||
|
business_id : Number(businessId),
|
||||||
|
institution_id : institutionArr[0].institution_id,
|
||||||
|
type_id : fromType[0].type_id,
|
||||||
|
...fromsVal
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 机构变更更新业务
|
||||||
|
institutionChange(e){
|
||||||
|
let index = this.cIndex
|
||||||
|
let old = this.old
|
||||||
|
let value = old.institution.findIndex(val => val.institution_id === e.val.institution_id);
|
||||||
|
let businessId = old.subVal.business_id
|
||||||
|
|
||||||
|
// 获取机构的子业务类型
|
||||||
|
let forms = this.getForms(old.institution[value].institution_id)
|
||||||
|
forms.then(institutionVal => {
|
||||||
|
let newObj = old
|
||||||
|
let fromType = []
|
||||||
|
let params = institutionVal[0].params
|
||||||
|
let paramsVal = []
|
||||||
|
|
||||||
|
// 业务类型
|
||||||
|
fromType = institutionVal.map(val => {
|
||||||
|
return {
|
||||||
|
type_id: val.type_id,
|
||||||
|
title : val.title
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 提交字段
|
||||||
|
params.map(val => {
|
||||||
|
if(val.type === 'checkbox'){
|
||||||
|
paramsVal[val.key] = []
|
||||||
|
}else if(val.type === 'select'){
|
||||||
|
paramsVal[val.key] = 0
|
||||||
|
}else {
|
||||||
|
paramsVal[val.key] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 更新数据
|
||||||
|
newObj.allInstitution = institutionVal;
|
||||||
|
newObj.institutionIndex = value;
|
||||||
|
newObj.fromType = fromType;
|
||||||
|
newObj.fromIndex = 0;
|
||||||
|
newObj.froms = params;
|
||||||
|
newObj.subVal = {
|
||||||
|
business_id : old.subVal.business_id,
|
||||||
|
institution_id : old.institution[value].institution_id,
|
||||||
|
type_id : fromType[0].type_id,
|
||||||
|
...paramsVal
|
||||||
|
}
|
||||||
|
this.$set(this.serviceArr, index, newObj)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 业务变更
|
||||||
|
businessChange(e, old, index){
|
||||||
|
let { value } = e.detail;
|
||||||
|
let businessId = old.subVal.business_id;
|
||||||
|
let allInstitution = old.allInstitution
|
||||||
|
let newObj = old
|
||||||
|
let params = allInstitution[value].params
|
||||||
|
let paramsVal = {}
|
||||||
|
params.map(val => {
|
||||||
|
if(val.type === 'checkbox'){
|
||||||
|
paramsVal[val.key] = []
|
||||||
|
}else if(val.type === 'select'){
|
||||||
|
paramsVal[val.key] = 0
|
||||||
|
}else {
|
||||||
|
paramsVal[val.key] = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
newObj.fromIndex = value;
|
||||||
|
newObj.froms = params;
|
||||||
|
newObj.subVal = {
|
||||||
|
business_id : old.subVal.business_id,
|
||||||
|
institution_id : old.subVal.institution_id,
|
||||||
|
type_id : allInstitution[value].type_id,
|
||||||
|
...paramsVal
|
||||||
|
}
|
||||||
|
this.$set(this.serviceArr, index, newObj)
|
||||||
|
},
|
||||||
|
// 添加主业务
|
||||||
|
onAdd(){
|
||||||
|
let businessTitle = this.businessArr.map(val => {
|
||||||
|
return val.title
|
||||||
|
})
|
||||||
|
uni.showActionSheet({
|
||||||
|
itemList: businessTitle,
|
||||||
|
success : res=> {
|
||||||
|
let { tapIndex } = res;
|
||||||
|
this.getInstitution(this.businessArr[tapIndex].business_id, businessTitle[tapIndex])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交订单数据
|
||||||
|
onSubmit(){
|
||||||
|
let dataVal = this.serviceArr.map(val => {
|
||||||
|
return val.subVal
|
||||||
|
})
|
||||||
|
if(this.name == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户姓名',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(this.phone == ''){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入客户手机号码',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '提交中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
submitStore({
|
||||||
|
username: this.user,
|
||||||
|
mobileNo: this.phone,
|
||||||
|
data : dataVal,
|
||||||
|
channel : 'app'
|
||||||
|
}).then(res => {
|
||||||
|
let { offline_order_id } = res;
|
||||||
|
uni.hideLoading()
|
||||||
|
this.$Router.replace({name: 'OfflineService', params: { orderId: offline_order_id }})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.content{
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-bottom: 260rpx;
|
||||||
|
}
|
||||||
|
// 表单模块
|
||||||
|
.block{
|
||||||
|
background: white;
|
||||||
|
border-radius: $radius;
|
||||||
|
margin: 0 30rpx 20rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
.block-title{
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.block-remove{
|
||||||
|
background: rgba(68, 110, 254, .1);
|
||||||
|
color: #446EFE;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
padding: 0 25rpx 0 20rpx;
|
||||||
|
&-icon{
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.block-item{
|
||||||
|
padding: 15rpx 0;
|
||||||
|
&-label{
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
display: block;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111111;
|
||||||
|
text{
|
||||||
|
color: #FF0000;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// picker
|
||||||
|
.institution-picker{
|
||||||
|
background: #F6F6F6;
|
||||||
|
height: 84rpx;
|
||||||
|
line-height: 84rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 30rpx 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
&-text{
|
||||||
|
width: calc( 100% - 60rpx );
|
||||||
|
}
|
||||||
|
&-gray{
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// input
|
||||||
|
.inputs-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.input{
|
||||||
|
background: #F6F6F6;
|
||||||
|
height: 84rpx;
|
||||||
|
line-height: 84rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 30rpx 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: calc( 100% - 64rpx );
|
||||||
|
}
|
||||||
|
.unit{
|
||||||
|
width: 64rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.text-input{
|
||||||
|
background: #F6F6F6;
|
||||||
|
height: 84rpx;
|
||||||
|
line-height: 84rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 30rpx 0 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// radio
|
||||||
|
.radio-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
.radio-title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #111111;
|
||||||
|
text{
|
||||||
|
color: #FF0000;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.radio-label{
|
||||||
|
margin-left: 20rpx;
|
||||||
|
color: #999999;
|
||||||
|
.radio-input{
|
||||||
|
transform:scale(0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// checkbox
|
||||||
|
.checkbox-item{
|
||||||
|
display: block;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 70rpx;
|
||||||
|
.checkbox-input{
|
||||||
|
transform:scale(0.7);
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-top: -5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// textarea
|
||||||
|
.textarea{
|
||||||
|
background: #F6F6F6;
|
||||||
|
width: 100%;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// footer
|
||||||
|
.footer{
|
||||||
|
box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, .05);
|
||||||
|
background-color: white;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 99;
|
||||||
|
padding: 30rpx 30rpx 70rpx;
|
||||||
|
.footer-text{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #FEA044;
|
||||||
|
line-height: 40rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
.footer-flex{
|
||||||
|
display: flex;
|
||||||
|
margin: 0 -10rpx;
|
||||||
|
button{
|
||||||
|
width: calc(50% - 20rpx);
|
||||||
|
margin: 0 10rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border:solid 1rpx $main-color;
|
||||||
|
background-color: white;
|
||||||
|
color: $main-color;
|
||||||
|
&::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
background-color: $main-color;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
337
pages/offline/orderInfo.vue
Normal file
337
pages/offline/orderInfo.vue
Normal file
@@ -0,0 +1,337 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content" v-if="order_no != ''">
|
||||||
|
<view class="order-header"></view>
|
||||||
|
<!-- 订单主要信息 -->
|
||||||
|
<view class="order-back order-flex order-info">
|
||||||
|
<view class="order-state">{{statusText.text}}</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>服务类型</label>
|
||||||
|
<view class="order-value nowrap">
|
||||||
|
<text class="order-type" v-for="(item, index) in item_type" :key="index" v-if="item.number > 0">{{item.title}}×{{item.number}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-items">
|
||||||
|
<view class="order-items-flex" v-for="(item, index) in items" :key="index" @click="$Router.push({ name: 'OrderSchemes', params: { id: item.business_order_item_id }})">
|
||||||
|
<label class="nowrap">{{item.institution.title}}({{item.business_type.title}})</label>
|
||||||
|
<view class="order-items-type nowrap">¥{{item.price}}<uni-icons type="right" color="gray" size="14px"></uni-icons></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>欠款总金额</label>
|
||||||
|
<view class="order-value order-value-price nowrap">¥{{serviceTotal}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 订单服务包信息 -->
|
||||||
|
<view class="order-back order-flex" v-if="services.length > 0">
|
||||||
|
<view class="order-title">服务包</view>
|
||||||
|
<view class="order-serve">
|
||||||
|
<block v-for="(item, index) in services" :key="index">
|
||||||
|
<view class="serve-header">
|
||||||
|
{{item.title}}<text>¥{{item.price}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="serve-item" v-for="(citem, cindex) in item.items" :key="cindex">
|
||||||
|
<view class="services-flex">
|
||||||
|
<label class="services-flex-label nowrap">服务类型</label>
|
||||||
|
<view class="services-flex-val nowrap">{{citem.business}}({{citem.type}})</view>
|
||||||
|
</view>
|
||||||
|
<view class="services-flex">
|
||||||
|
<label class="services-flex-title nowrap">{{citem.title}}</label>
|
||||||
|
<view class="services-flex-price nowrap"><text>¥</text>{{citem.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 客户信息 -->
|
||||||
|
<view class="order-back order-flex">
|
||||||
|
<view class="order-title">客户信息</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<view class="order-value nowrap">{{user.nickname || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>客户性别</label>
|
||||||
|
<view class="order-value nowrap">{{user.sex || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>客户电话</label>
|
||||||
|
<view class="order-value nowrap">{{user.username || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-btn" @click="onCallPhone(user.username)">联系客户</view>
|
||||||
|
</view>
|
||||||
|
<!-- 老师与助理 -->
|
||||||
|
<view class="order-back order-flex" v-if="statusText.value > 5">
|
||||||
|
<view class="order-title">法务老师与助理</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>法务老师</label>
|
||||||
|
<view class="order-value nowrap">{{teachers || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>法务助理</label>
|
||||||
|
<view class="order-value nowrap">{{tutor || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 订单其他信息 -->
|
||||||
|
<view class="order-back order-flex">
|
||||||
|
<view class="order-title">订单信息</view>
|
||||||
|
<view class="order-item" @click="copyNo(order_no)">
|
||||||
|
<label>订单编号</label>
|
||||||
|
<view class="order-value nowrap">{{order_no || '-'}}<u-icon class="order-value-icon" name="file-text" color="gray" size="18"></u-icon></view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>创建时间</label>
|
||||||
|
<view class="order-value nowrap">{{created_at || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-item">
|
||||||
|
<label>订单金额</label>
|
||||||
|
<view class="order-value nowrap">{{total || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { info } from '@/apis/interfaces/order.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
orderId : '',
|
||||||
|
total : '0.00',
|
||||||
|
order_no : '',
|
||||||
|
statusText : '',
|
||||||
|
created_at : '',
|
||||||
|
user : {
|
||||||
|
nickname : '',
|
||||||
|
sex : '',
|
||||||
|
username : ''
|
||||||
|
},
|
||||||
|
item_type : [],
|
||||||
|
items : [],
|
||||||
|
services : [],
|
||||||
|
serviceTotal: '',
|
||||||
|
tutor : '',
|
||||||
|
teachers : ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.orderId = this.$Route.query.orderId
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 订单详情
|
||||||
|
getInfo(){
|
||||||
|
info(this.orderId).then(res => {
|
||||||
|
let { status, created_at, total, order_no, user, item_type, items, services, service_prices, tutor, teachers } = res
|
||||||
|
this.statusText = status
|
||||||
|
this.created_at = created_at
|
||||||
|
this.total = total
|
||||||
|
this.order_no = order_no
|
||||||
|
this.user = user
|
||||||
|
this.item_type = item_type
|
||||||
|
this.items = items
|
||||||
|
this.services = services
|
||||||
|
this.serviceTotal = service_prices
|
||||||
|
this.tutor = tutor
|
||||||
|
this.teachers = teachers
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 刷新列表订单
|
||||||
|
onRefreshOrder(){
|
||||||
|
this.$store.commit('setOrderId', this.$Route.query.orderId)
|
||||||
|
},
|
||||||
|
// 拨打电话
|
||||||
|
onCallPhone(phone){
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber: phone,
|
||||||
|
fail: err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '拨打电话失败,请检查您的应用权限[电话]保持允许状态',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
copyNo(no){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data : no,
|
||||||
|
success : res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单号已复制',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// header
|
||||||
|
.order-header{
|
||||||
|
background: #446EFE;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
// 订单块
|
||||||
|
.order-back{
|
||||||
|
background: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: 0 30rpx 30rpx;
|
||||||
|
}
|
||||||
|
// 订单信息
|
||||||
|
.order-info{
|
||||||
|
margin: -100rpx 30rpx 30rpx;
|
||||||
|
.order-state{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 0 -30rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-bottom: solid 1rpx #f6f6f6;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 48rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单列表
|
||||||
|
.order-flex{
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
.order-title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
// 订单信息
|
||||||
|
.order-item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
label{
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
.order-value{
|
||||||
|
color: gray;
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
text-align: right;
|
||||||
|
.order-type{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order-value-icon{
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
&.order-value-price{
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 服务包信息
|
||||||
|
.order-serve{
|
||||||
|
background-color: rgba(68, 110, 254, .03);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 15rpx 0;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
.serve-header{
|
||||||
|
display: flex;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: solid 1rpx #f6f6f6;
|
||||||
|
text{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.serve-item{
|
||||||
|
border-bottom: solid 1rpx #f6f6f6;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
&:last-child{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.services-flex{
|
||||||
|
display: flex;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 55rpx;
|
||||||
|
.services-flex-label{
|
||||||
|
width: 150rpx;
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
.services-flex-val{
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
text-align: right;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
.services-flex-title{
|
||||||
|
width: 50%;
|
||||||
|
color: #111111;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.services-flex-price{
|
||||||
|
font-size: 30rpx;
|
||||||
|
width: 50%;
|
||||||
|
text-align: right;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单服务项目
|
||||||
|
.order-items{
|
||||||
|
background-color: rgba(68, 110, 254, .03);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
.order-items-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
line-height: 60rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
label{
|
||||||
|
width: 340rpx;
|
||||||
|
}
|
||||||
|
.order-items-type{
|
||||||
|
width: calc(100% - 340rpx);
|
||||||
|
text-align: right;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单按钮
|
||||||
|
.order-btn{
|
||||||
|
margin: 0 -30rpx;
|
||||||
|
padding: 20rpx 30rpx 0;
|
||||||
|
border-top: solid 1rpx #f6f6f6;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 60rpx;
|
||||||
|
color: $main-color;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
351
pages/offline/orders.vue
Normal file
351
pages/offline/orders.vue
Normal file
@@ -0,0 +1,351 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- tabs -->
|
||||||
|
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||||
|
<u-tabs
|
||||||
|
:current="tabsCurrent"
|
||||||
|
:list="tabs"
|
||||||
|
keyName="title"
|
||||||
|
lineColor="#446EFE"
|
||||||
|
: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 orders-content-bottom" @click="item.is_show_type = !item.is_show_type">
|
||||||
|
<label>业务数量</label>
|
||||||
|
<view class="nowrap orders-content-type">
|
||||||
|
<!-- <text v-for="(itemType, indexType) in item.item_type" :key="indexType" v-if="itemType.number > 0">{{itemType.title}}x{{itemType.number}}</text> -->
|
||||||
|
x{{item.items.length}}
|
||||||
|
</view>
|
||||||
|
<uni-icons class="orders-content-icon" :type="item.is_show_type ? 'top': 'bottom'" size="14" color="gray"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-block" v-show="item.is_show_type">
|
||||||
|
<view class="item-flex" v-for="(citem, cindex) in item.items" :key="cindex">
|
||||||
|
<view class="item-flex-title">{{citem.institution.title}}({{citem.business_type.title}})</view>
|
||||||
|
<view class="item-flex-value">¥{{citem.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>客户姓名</label>
|
||||||
|
<view class="nowrap">{{item.user.username}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>客户手机号</label>
|
||||||
|
<view class="nowrap">{{item.user.mobile}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item" v-if="item.total > 0">
|
||||||
|
<label>咨询服务费</label>
|
||||||
|
<view class="nowrap">¥{{item.total}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item" v-if="item.diff_prices_pays > 0">
|
||||||
|
<label>补差价金额</label>
|
||||||
|
<view class="nowrap">¥{{item.diff_prices_pays}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-content-item">
|
||||||
|
<label>下单时间</label>
|
||||||
|
<view class="nowrap">{{item.created_at}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orders-flex">
|
||||||
|
<view class="btns">
|
||||||
|
<view class="btns-item btns-border" v-if="item.can.service" @click="onOrdersService(item.business_order_id)">匹配服务包</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 { lists } from '@/apis/interfaces/offline.js'
|
||||||
|
import modal from 'uview-ui/libs/config/props/modal';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tabsCurrent : 0,
|
||||||
|
tabType : 0,
|
||||||
|
tabs : [
|
||||||
|
{ key: 'all', title: '全部' }
|
||||||
|
],
|
||||||
|
orders : [],
|
||||||
|
// 分页
|
||||||
|
page : {
|
||||||
|
current : 1,
|
||||||
|
has_more: false,
|
||||||
|
},
|
||||||
|
pagesShow : false,
|
||||||
|
status : ''
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.tabType = 'all';
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// 是否处理当前列表状态
|
||||||
|
let isOrderId = this.$store.getters.getOrderId
|
||||||
|
if(isOrderId != null){
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 切换列表
|
||||||
|
onTabs(e){
|
||||||
|
this.tabsCurrent = e.index
|
||||||
|
this.tabType = this.tabs[e.index].key
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.orders = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 变更当前列表状态
|
||||||
|
removeListVal(id){
|
||||||
|
let ListArr = this.orders
|
||||||
|
let ListIndex = ListArr.findIndex(val => val.business_order_id == id)
|
||||||
|
if(ListIndex >= 0){
|
||||||
|
this.orders.splice(ListIndex, 1)
|
||||||
|
}
|
||||||
|
this.$store.commit('setOrderId', null)
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
getList(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
if(this.$store.getters.getOrderId != null){
|
||||||
|
this.page = { current: 1, has_more: false }
|
||||||
|
this.$store.commit('setOrderId', null)
|
||||||
|
}
|
||||||
|
lists({
|
||||||
|
status: this.tabType,
|
||||||
|
page : this.page.current
|
||||||
|
}).then(res => {
|
||||||
|
let { status, lists } = res;
|
||||||
|
lists.data.map(val => {
|
||||||
|
val.is_show_type = false
|
||||||
|
})
|
||||||
|
if(this.tabs.length <= 1){
|
||||||
|
this.tabs = status
|
||||||
|
}
|
||||||
|
let atList = lists.page.current == 1 ? [] : this.orders
|
||||||
|
this.orders = atList.concat(lists.data)
|
||||||
|
this.page = lists.page
|
||||||
|
this.pagesShow = false
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 匹配服务包
|
||||||
|
onOrdersService(id){
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'OfflineService',
|
||||||
|
params: {
|
||||||
|
orderId: id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.getNextTab = true;
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
copyNo(no){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data : no,
|
||||||
|
success : res => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '订单号已复制',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.pagesShow = true;
|
||||||
|
if(this.page.has_more){
|
||||||
|
this.status = 'loading';
|
||||||
|
this.page.current++
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.status = 'nomore';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// 订单为空
|
||||||
|
.order-null{
|
||||||
|
height: 80vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
// 订单列表
|
||||||
|
.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: flex-end;
|
||||||
|
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% - 200rpx);
|
||||||
|
}
|
||||||
|
.state{
|
||||||
|
color: $main-color;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.user{
|
||||||
|
padding-left: 90rpx;
|
||||||
|
position: relative;
|
||||||
|
min-height: 70rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: calc(100% - 400rpx);
|
||||||
|
.user-cover{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
.user-name{
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
&.btns-border{
|
||||||
|
line-height: 68rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border:solid 1rpx $main-color;
|
||||||
|
background: white;
|
||||||
|
color: $main-color;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
468
pages/offline/service.vue
Normal file
468
pages/offline/service.vue
Normal file
@@ -0,0 +1,468 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<!-- 服务包列表 -->
|
||||||
|
<view class="services">
|
||||||
|
<view class="services-null" v-if="services.length <= 0">
|
||||||
|
<u-empty
|
||||||
|
mode="data"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/data.png"
|
||||||
|
text="暂无添加服务包"
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
<view class="services-list" v-else>
|
||||||
|
<view class="services-item" v-for="(item, index) in services" :key="index">
|
||||||
|
<view class="services-header">
|
||||||
|
<view class="title">{{item.title}}<text>{{item.tag}}</text></view>
|
||||||
|
<view class="remove" @click="onRemove(item, index)">移出</view>
|
||||||
|
</view>
|
||||||
|
<view class="services-content">
|
||||||
|
<block v-for="(citem, cindex) in item.items" :key="cindex">
|
||||||
|
<view class="services-content-item">
|
||||||
|
<view class="services-flex">
|
||||||
|
<label class="services-flex-label nowrap">服务类型</label>
|
||||||
|
<view class="services-flex-val nowrap">{{citem.business}}({{citem.type}})</view>
|
||||||
|
</view>
|
||||||
|
<view class="services-flex">
|
||||||
|
<label class="services-flex-title nowrap">{{citem.title}}</label>
|
||||||
|
<view class="services-flex-price nowrap"><text>¥</text>{{citem.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
<view class="services-price">服务包价格<text>¥{{item.price}}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 选择业务 -->
|
||||||
|
<u-popup :show="institutionsShow" round="20rpx" closeable @close="institutionsShow = false, itemsVal = []">
|
||||||
|
<view class="institutions">
|
||||||
|
<view class="institutions-title">选择业务</view>
|
||||||
|
<scroll-view scroll-y class="institutions-scroll">
|
||||||
|
<view class="institutions-lists" v-if="institutions.length > 0">
|
||||||
|
<view class="institutions-block" :class="{ 'active': item.isChoose }" v-for="(item, index) in institutions" :key="index" @click="onInstitution(item, index)">
|
||||||
|
<view class="institutions-block-item">
|
||||||
|
<label>业务类型</label>
|
||||||
|
<view class="val nowrap">{{item.business}}({{item.type}})</view>
|
||||||
|
</view>
|
||||||
|
<view class="institutions-block-item">
|
||||||
|
<label>业务机构</label>
|
||||||
|
<view class="val nowrap">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="institutions-block-item">
|
||||||
|
<label>金额</label>
|
||||||
|
<view class="val price nowrap">¥{{item.price}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="institutions-null">
|
||||||
|
<u-empty
|
||||||
|
mode="list"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/list.png"
|
||||||
|
text="暂无可分配的业务"
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="institutions-footer">
|
||||||
|
<button class="btn" @click="onAddService" :disabled="itemsVal.length <= 0">选好了({{itemsVal.length}})</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- footer -->
|
||||||
|
<view class="footer">
|
||||||
|
<view class="footer-total">共{{services.length}}个服务包,总价格<text>{{total}}</text>元</view>
|
||||||
|
<button class="footer-btn" :disabled="services.length <= 0" @click="onServiceOver">保存配置服务包</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { service, serviceAdd, serviceRemove, serviceOver } from '@/apis/interfaces/offline.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
total : '0.00',
|
||||||
|
orderId : '',
|
||||||
|
institutions : [],
|
||||||
|
services : [],
|
||||||
|
itemsVal : [],
|
||||||
|
institutionsShow: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.orderId = this.$Route.query.orderId
|
||||||
|
// 开始配置服务包
|
||||||
|
this.getService()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取业务
|
||||||
|
getService(){
|
||||||
|
service(this.orderId).then(res => {
|
||||||
|
let { institutions, services, total } = res;
|
||||||
|
this.institutions = institutions.map(val => {
|
||||||
|
val.isChoose = false
|
||||||
|
return val;
|
||||||
|
})
|
||||||
|
this.total = total;
|
||||||
|
this.services = services;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 选择业务
|
||||||
|
onInstitution(val, index){
|
||||||
|
let idIndex = this.itemsVal.findIndex(e => e === val.item_id)
|
||||||
|
if(idIndex >= 0){
|
||||||
|
val.isChoose = !val.isChoose;
|
||||||
|
this.itemsVal.splice(idIndex, 1)
|
||||||
|
this.$set(this.institutions, index, val)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(idIndex < 0 && this.itemsVal.length <= 2){
|
||||||
|
val.isChoose = !val.isChoose;
|
||||||
|
this.itemsVal.push(val.item_id)
|
||||||
|
this.$set(this.institutions, index, val)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: '单一服务包业务数量不可以超过3项',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 新增服务包
|
||||||
|
onAddService(){
|
||||||
|
serviceAdd(this.orderId, this.itemsVal).then(res => {
|
||||||
|
let { institutions, services, total } = res;
|
||||||
|
this.institutions = institutions.map(val => {
|
||||||
|
val.isChoose = false
|
||||||
|
return val;
|
||||||
|
});
|
||||||
|
this.total = total;
|
||||||
|
this.services = services
|
||||||
|
this.itemsVal = []
|
||||||
|
this.institutionsShow = false
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除服务包
|
||||||
|
onRemove(val, index){
|
||||||
|
serviceRemove(this.orderId, {
|
||||||
|
group_no: val.group_no
|
||||||
|
} ).then(res => {
|
||||||
|
let { institutions, services, total } = res;
|
||||||
|
this.institutions = institutions.map(val => {
|
||||||
|
val.isChoose = false
|
||||||
|
return val;
|
||||||
|
});
|
||||||
|
this.total = total;
|
||||||
|
this.services = services;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 保存配置服务包
|
||||||
|
onServiceOver(){
|
||||||
|
if(this.institutions.length > 0){
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '当前还有' + this.institutions.length + '项业务未匹配服务包,是否放弃未匹配的业务继续保存服务包?',
|
||||||
|
cancelText : '继续配置',
|
||||||
|
cancelColor : '#FFAB3F',
|
||||||
|
confirmText : '立即保存',
|
||||||
|
confirmColor: '#446EFE',
|
||||||
|
success : res => {
|
||||||
|
if(res.confirm){
|
||||||
|
this.onSubmitService()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.onSubmitService()
|
||||||
|
},
|
||||||
|
// 提交保存服务
|
||||||
|
onSubmitService(){
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '是否确认提交服务包配置给客户,提交后不可修改',
|
||||||
|
cancelText : '稍后',
|
||||||
|
confirmText : '提交',
|
||||||
|
success : ModalRes => {
|
||||||
|
if(ModalRes.confirm){
|
||||||
|
wx.showLoading({
|
||||||
|
title: '保存中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
serviceOver(this.orderId).then(res => {
|
||||||
|
uni.showModal({
|
||||||
|
content : res.message,
|
||||||
|
showCancel : false,
|
||||||
|
confirmColor: '#446EFE',
|
||||||
|
success : res => {
|
||||||
|
if(res.confirm){
|
||||||
|
this.$store.commit('setOrderId', this.orderId)
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onNavigationBarButtonTap() {
|
||||||
|
this.institutionsShow = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 服务包列表
|
||||||
|
.services{
|
||||||
|
padding-bottom: 250rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.services-null{
|
||||||
|
height: 70vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
// 服务包列表
|
||||||
|
.services-list{
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
.services-item{
|
||||||
|
background: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin: 30rpx 0;
|
||||||
|
.services-header{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
.title{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #111;
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
text{
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.remove{
|
||||||
|
background: rgba(68, 110, 254, .1);
|
||||||
|
color: #446EFE;
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.services-content{
|
||||||
|
background-color: rgba(68, 110, 254, .03);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin: 15rpx 0;
|
||||||
|
padding: 0 25rpx;
|
||||||
|
.services-content-item{
|
||||||
|
border-bottom: solid 1rpx #f6f6f6;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
&:last-child{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.services-flex{
|
||||||
|
display: flex;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 55rpx;
|
||||||
|
.services-flex-label{
|
||||||
|
width: 150rpx;
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
.services-flex-val{
|
||||||
|
width: calc(100% - 150rpx);
|
||||||
|
text-align: right;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
.services-flex-title{
|
||||||
|
width: 50%;
|
||||||
|
color: #111111;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.services-flex-price{
|
||||||
|
font-size: 30rpx;
|
||||||
|
width: 50%;
|
||||||
|
text-align: right;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.services-price{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
line-height: 60rpx;
|
||||||
|
text{
|
||||||
|
color: $text-price;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 34rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 添加服务包
|
||||||
|
.institutions{
|
||||||
|
padding: 0 0 180rpx;
|
||||||
|
position: relative;
|
||||||
|
// 标题
|
||||||
|
.institutions-title{
|
||||||
|
padding: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
// 列表
|
||||||
|
.institutions-scroll{
|
||||||
|
height: 65vh;
|
||||||
|
.institutions-null{
|
||||||
|
height: 50vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.institutions-lists{
|
||||||
|
padding: 15rpx 0;
|
||||||
|
.institutions-block{
|
||||||
|
margin: 15rpx 30rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
border:solid 1rpx #f8f8f8;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.institutions-block-item{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 50rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
label{
|
||||||
|
color: gray;
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
.val{
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
text-align: right;
|
||||||
|
&.price{
|
||||||
|
color: $text-price;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.active{
|
||||||
|
background-color: #E4E8F7;
|
||||||
|
border-color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// footer
|
||||||
|
.institutions-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 30rpx 30rpx 50rpx;
|
||||||
|
.btn{
|
||||||
|
background: $main-color;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: white;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
background-color: $main-color;
|
||||||
|
color: white;
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// footer
|
||||||
|
.footer{
|
||||||
|
padding: 30rpx 30rpx 50rpx;
|
||||||
|
background: white;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 9;
|
||||||
|
box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .02);
|
||||||
|
.footer-total{
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
line-height: 40rpx;
|
||||||
|
text{
|
||||||
|
font-weight: bold;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.footer-btn{
|
||||||
|
background: $main-color;
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: white;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-radius: $radius-lg;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
background-color: $main-color;
|
||||||
|
color: white;
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
122
pages/orderInfo/orderInfo.vue
Normal file
122
pages/orderInfo/orderInfo.vue
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="info-content">
|
||||||
|
<view class="block">
|
||||||
|
<view class="block-item">
|
||||||
|
<view class="block-item-flex" v-for="(item, index) in objArr" :key="index">
|
||||||
|
<label>{{item.name}}</label>
|
||||||
|
<view class="val">{{item.value}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { unifyInfo } from '@/apis/interfaces/order.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
objArr: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
unifyInfo({
|
||||||
|
order_type : this.$Route.query.orderType.replace(/\-/g, '\\'),
|
||||||
|
order_id : this.$Route.query.id
|
||||||
|
}).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.objArr = res;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.info-content{
|
||||||
|
position: relative;
|
||||||
|
background: #eeefff;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
&::before{
|
||||||
|
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
|
||||||
|
height: 50vh;
|
||||||
|
content: " ";
|
||||||
|
width: 100vw;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
// 模块
|
||||||
|
.block{
|
||||||
|
background: white;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
margin: 0 40rpx 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
.block-header{
|
||||||
|
padding: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.title{
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 40rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
@extend .nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.price{
|
||||||
|
text-align: right;
|
||||||
|
width: 200rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #353ef4;
|
||||||
|
line-height: 50rpx;
|
||||||
|
@extend .nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.block-item{
|
||||||
|
padding: 32rpx;
|
||||||
|
.block-item-flex{
|
||||||
|
padding: 20rpx 0;
|
||||||
|
font-size: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
color: #555;
|
||||||
|
justify-content: space-between;
|
||||||
|
label{ width: 240rpx; }
|
||||||
|
.val{
|
||||||
|
text-align: right;
|
||||||
|
width: calc(100% - 240rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -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({
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="total-flex">
|
<view class="total-flex">
|
||||||
<view class="total-item">
|
<view class="total-item">
|
||||||
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
|
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
|
||||||
<view class="title">诉讼委托单</view>
|
<view class="title">诉讼委托咨询单</view>
|
||||||
<view class="number">{{orderAll.all}}<text>单</text></view>
|
<view class="number">{{orderAll.all}}<text>单</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="total-item">
|
<view class="total-item">
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="block-title">委托订单管理</view>
|
<view class="block-title">委托咨询单管理</view>
|
||||||
<view class="tool-flex">
|
<view class="tool-flex">
|
||||||
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 0, type: 'entrust' })">
|
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 0, type: 'entrust' })">
|
||||||
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
|
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="block-title">协商调解订单管理</view>
|
<view class="block-title">协商调解咨询订单管理</view>
|
||||||
<view class="tool-flex">
|
<view class="tool-flex">
|
||||||
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 0 })">
|
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 0 })">
|
||||||
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
|
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
|
||||||
@@ -125,6 +125,10 @@
|
|||||||
<view class="number" v-if="orderCount.refund > 0">{{orderCount.refund}}</view>
|
<view class="number" v-if="orderCount.refund > 0">{{orderCount.refund}}</view>
|
||||||
<view class="text">退款订单</view>
|
<view class="text">退款订单</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="tool-flex-item" @click="onNav('OfflineOrders')">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_28.png"></image>
|
||||||
|
<view class="text">线下订单</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,33 +1,373 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="null-pages">
|
<view class="block">
|
||||||
<u-empty
|
<view class="block-title">统计数据</view>
|
||||||
mode="order"
|
<view class="total-flex">
|
||||||
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
<view class="total-item" @click="onNav('EmpowerOrder', { status: 0 })">
|
||||||
text="暂无相关订单"
|
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
|
||||||
>
|
<view class="title">待支付</view>
|
||||||
</u-empty>
|
<view class="number">{{orderAll.init}}<text>单</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="total-item" @click="onNav('EmpowerOrder', { status: 1 })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
|
||||||
|
<view class="title">已支付</view>
|
||||||
|
<view class="number">{{orderAll.paid}}<text>单</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="total-item"@click="onNav('EmpowerOrder', { status: 2 })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_02.png"></image>
|
||||||
|
<view class="title">已完成</view>
|
||||||
|
<view class="number">{{orderAll.over}}<text>单</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="total-item">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_05.png"></image>
|
||||||
|
<view class="title">结算金额</view>
|
||||||
|
<view class="number">{{orderAll.amount}}<text>万</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="block">
|
||||||
|
<view class="block-title">订单管理</view>
|
||||||
|
<view class="tool-flex">
|
||||||
|
<view class="tool-flex-item" @click="onNav('EmpowerOrder', { status: '' })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
|
||||||
|
<view class="number" v-if="orderEntrust.all > 0">{{orderEntrust.all}}</view>
|
||||||
|
<view class="text">全部订单</view>
|
||||||
|
</view>
|
||||||
|
<view class="tool-flex-item" @click="onNav('EmpowerOrder', { status: 0 })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_17.png"></image>
|
||||||
|
<view class="number" v-if="orderEntrust.init > 0">{{orderEntrust.init}}</view>
|
||||||
|
<view class="text">待支付</view>
|
||||||
|
</view>
|
||||||
|
<view class="tool-flex-item" @click="onNav('EmpowerOrder', { status: 1 })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
|
||||||
|
<view class="number" v-if="orderEntrust.paid > 0">{{orderEntrust.paid}}</view>
|
||||||
|
<view class="text">已支付</view>
|
||||||
|
</view>
|
||||||
|
<view class="tool-flex-item" @click="onNav('EmpowerOrder', { status: 2 })">
|
||||||
|
<image class="icon" src="@/static/icons/work_icon_15.png"></image>
|
||||||
|
<view class="number" v-if="orderEntrust.over > 0">{{orderEntrust.over}}</view>
|
||||||
|
<view class="text">已完成</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { empowerStatistics } from '@/apis/interfaces/work.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 综法订单管理
|
||||||
|
orderAll : '',
|
||||||
|
orderEntrust : '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.getIndex()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 工作台信息
|
||||||
|
getIndex(){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
// 增收赋能订单统计
|
||||||
|
empowerStatistics().then(res => {
|
||||||
|
let { order, data } = res;
|
||||||
|
this.orderAll = data
|
||||||
|
this.orderEntrust = order
|
||||||
|
uni.hideLoading()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 导航
|
||||||
|
onNav(name, obj){
|
||||||
|
let params = obj || {}
|
||||||
|
this.$Router.push({name, params})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 内容为空
|
.content{
|
||||||
.null-pages{ height: 70vh; display: flex; align-items: center; justify-content: center; }
|
padding: 30rpx 0;
|
||||||
|
}
|
||||||
|
// 登录提示
|
||||||
|
.auth-null{
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
background: white;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.auth-null-btn{
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
padding: 0;
|
||||||
|
width: 70vw;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
font-size: 32rpx;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 弹出特权
|
||||||
|
.privilege-lay{
|
||||||
|
width: 70vw;
|
||||||
|
.privilege-lay-img{
|
||||||
|
width: 70vw;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.privilege-lay-content{
|
||||||
|
background: white;
|
||||||
|
border-radius: 0 0 20rpx 20rpx;
|
||||||
|
width: 70vw;
|
||||||
|
padding: 80rpx 30rpx 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: -50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
color: #111111;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.privilege-lay-remove{
|
||||||
|
padding-top: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
.privilege-lay-icon{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// header
|
||||||
|
.work-bar{
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
&-user{
|
||||||
|
position: relative;
|
||||||
|
line-height: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
width: calc(100% - 200rpx);
|
||||||
|
padding-left: 90rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.cover{
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.nickname{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 34rpx;
|
||||||
|
.card{
|
||||||
|
color: $main-color;
|
||||||
|
font-size: 24rpx;
|
||||||
|
display: inline-block;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 0 15rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
border:solid 1rpx $main-color;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-add{
|
||||||
|
width: 200rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: right;
|
||||||
|
line-height: 70rpx;
|
||||||
|
.icon{
|
||||||
|
margin-right: 5rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单管理
|
||||||
|
.tool-flex{
|
||||||
|
padding: 0 10rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.tool-flex-item{
|
||||||
|
width: 25%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
.icon{
|
||||||
|
width: 78rpx;
|
||||||
|
height: 78rpx;
|
||||||
|
background: #ddd;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
.number{
|
||||||
|
position: absolute;
|
||||||
|
right: 20%;
|
||||||
|
background: #fe4444;
|
||||||
|
top: -10rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
min-width: 40rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #111;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 数据统计单
|
||||||
|
.total-flex{
|
||||||
|
padding: 0 20rpx 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.total-item{
|
||||||
|
margin: 0 10rpx 20rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
width: calc(50% - 20rpx);
|
||||||
|
padding: 20rpx 20rpx 20rpx 120rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: $radius;
|
||||||
|
position: relative;
|
||||||
|
min-height: 140rpx;
|
||||||
|
.icon{
|
||||||
|
position: absolute;
|
||||||
|
left: 20rpx;
|
||||||
|
top: 50%;
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin-top: -35rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #111;
|
||||||
|
line-height: 40rpx;
|
||||||
|
@extend .nowrap;
|
||||||
|
}
|
||||||
|
.number{
|
||||||
|
padding-top: 5rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #111;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
line-height: 40rpx;
|
||||||
|
@extend .nowrap;
|
||||||
|
text{
|
||||||
|
font-size: 80%;
|
||||||
|
font-weight: normal;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 通用板块
|
||||||
|
.block{
|
||||||
|
background: white;
|
||||||
|
margin: 0 30rpx 20rpx;
|
||||||
|
border-radius: $radius;
|
||||||
|
.block-title{
|
||||||
|
padding: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: bold;
|
||||||
|
color: '#111';
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 开通业务员
|
||||||
|
.open-interest{
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.title{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 80rpx;
|
||||||
|
}
|
||||||
|
.open-interest-flex{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
.open-interest-item{
|
||||||
|
text-align: center;
|
||||||
|
.open-interest-icon{
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
vertical-align: top;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
.open-interest-text{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #111111;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 开通步骤
|
||||||
|
.open-interest-block{
|
||||||
|
padding: 30rpx 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.open-interest-icon{
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
.open-interest-text{
|
||||||
|
width: calc( 100% - 258rpx);
|
||||||
|
padding:0 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.open-interest-title{
|
||||||
|
font-weight: bold;
|
||||||
|
color: #111111;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.open-interest-submit{
|
||||||
|
color: #666666;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.open-interest-btn[size="mini"]{
|
||||||
|
width: 170rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
background: $main-color;
|
||||||
|
color: white;
|
||||||
|
font-size: 30rpx;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&[disabled]{
|
||||||
|
background: #EEEEEE;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
case 'entrust':
|
case 'entrust':
|
||||||
isScroll = true
|
isScroll = true
|
||||||
funName = entrustOrder
|
funName = entrustOrder
|
||||||
tabName = '委托订单'
|
tabName = '委托咨询订单'
|
||||||
tabsArr = [
|
tabsArr = [
|
||||||
{ name: '待支付', type: 0 },
|
{ name: '待支付', type: 0 },
|
||||||
{ name: '待审核', type: 1 },
|
{ name: '待审核', type: 1 },
|
||||||
|
|||||||
@@ -325,6 +325,22 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 识别产品
|
||||||
|
onPhone(e){
|
||||||
|
uni.chooseImage({
|
||||||
|
crop : {
|
||||||
|
quality : 100,
|
||||||
|
width : 300,
|
||||||
|
height : 300,
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
|
},
|
||||||
|
fail : err => {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 生成海报地址
|
// 生成海报地址
|
||||||
qrcodePath(path){
|
qrcodePath(path){
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|||||||
@@ -38,6 +38,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="set-nav-block">
|
||||||
|
<view class="set-nav" @click="onNav('UserOff')">
|
||||||
|
<label>账户注销</label>
|
||||||
|
<view class="value nowrap">
|
||||||
|
<uni-icons type="right" color="gray"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="set-nav-block">
|
<view class="set-nav-block">
|
||||||
<view class="set-nav" @click="onLogout">
|
<view class="set-nav" @click="onLogout">
|
||||||
<label>退出登录</label>
|
<label>退出登录</label>
|
||||||
@@ -91,7 +99,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.content{
|
.content{
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
330
pages/work/account.vue
Normal file
330
pages/work/account.vue
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
<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 class="btns-item" v-if="item.can.look" @click="onInfo(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'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 订单详情
|
||||||
|
onInfo(obj){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'OrderInfo',
|
||||||
|
params : {
|
||||||
|
id : obj.order_id,
|
||||||
|
orderType : obj.order_type.replace(/\\/g, '-')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
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>
|
||||||
331
pages/work/account2.vue
Normal file
331
pages/work/account2.vue
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
<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.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 class="btns-item" v-if="item.can.look" @click="onInfo(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 { customTypelists, customTypeCancel } from '@/apis/interfaces/custom.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
|
||||||
|
customTypelists({
|
||||||
|
manager: 1,
|
||||||
|
status : tabsId,
|
||||||
|
page : page.current
|
||||||
|
}).then(res => {
|
||||||
|
console.log(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
|
||||||
|
})
|
||||||
|
customTypeCancel(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'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 订单详情
|
||||||
|
onInfo(obj){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'OrderInfo',
|
||||||
|
params : {
|
||||||
|
id : obj.order_id,
|
||||||
|
orderType : obj.order_type.replace(/\\/g, '-')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
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>
|
||||||
@@ -65,8 +65,7 @@
|
|||||||
Promise.all([business(), synthList()]).then(res => {
|
Promise.all([business(), synthList()]).then(res => {
|
||||||
let businessData = res[0]
|
let businessData = res[0]
|
||||||
let synthListData = res[1]
|
let synthListData = res[1]
|
||||||
|
this.businessArr = this.createType === 'other' || this.createType === 'offline' ? businessData : businessData.concat(synthListData)
|
||||||
this.businessArr = this.createType === 'other' ? businessData : businessData.concat(synthListData)
|
|
||||||
this.businessId = this.businessArr[0].business_id
|
this.businessId = this.businessArr[0].business_id
|
||||||
this.selfType = this.businessArr[0].self_type
|
this.selfType = this.businessArr[0].self_type
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -128,8 +127,8 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 金法业务
|
|
||||||
let busines = this.businessArr.find(val => val.business_id === this.businessId)
|
let busines = this.businessArr.find(val => val.business_id === this.businessId)
|
||||||
|
// 金法业务
|
||||||
this.$Router.replace({
|
this.$Router.replace({
|
||||||
name : 'WorkGenerate',
|
name : 'WorkGenerate',
|
||||||
params : {
|
params : {
|
||||||
|
|||||||
323
pages/work/delegation.vue
Normal file
323
pages/work/delegation.vue
Normal file
@@ -0,0 +1,323 @@
|
|||||||
|
<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 class="btns-item" v-if="item.can.look" @click="onInfo(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'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 订单详情
|
||||||
|
onInfo(obj){
|
||||||
|
this.$Router.push({
|
||||||
|
name : 'OrderInfo',
|
||||||
|
params : {
|
||||||
|
id : obj.order_id,
|
||||||
|
orderType : obj.order_type.replace(/\\/g, '-')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 复制订单号码
|
||||||
|
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>
|
||||||
@@ -16,9 +16,9 @@
|
|||||||
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
|
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 业务类型 -->
|
<!-- 业务咨询类型 -->
|
||||||
<view class="block-item">
|
<view class="block-item">
|
||||||
<label class="block-item-label"><text>*</text>业务类型</label>
|
<label class="block-item-label"><text>*</text>业务咨询类型</label>
|
||||||
<picker :range="item.fromType" range-key="title" :value="item.fromIndex" @change="businessChange($event, item, index)">
|
<picker :range="item.fromType" range-key="title" :value="item.fromIndex" @change="businessChange($event, item, index)">
|
||||||
<view class="institution-picker">
|
<view class="institution-picker">
|
||||||
<view class="institution-picker-text nowrap">{{item.fromType[item.fromIndex].title}}</view>
|
<view class="institution-picker-text nowrap">{{item.fromType[item.fromIndex].title}}</view>
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title : '提示',
|
title : '提示',
|
||||||
content : '订单已创建,请尽快提醒用户完善用户资料',
|
content : '咨询订单已创建,请尽快提醒用户完善用户资料',
|
||||||
showCancel : false,
|
showCancel : false,
|
||||||
success : () => {
|
success : () => {
|
||||||
this.$Router.back()
|
this.$Router.back()
|
||||||
|
|||||||
@@ -223,15 +223,13 @@
|
|||||||
<view v-else class="auth-null">
|
<view v-else class="auth-null">
|
||||||
<u-empty
|
<u-empty
|
||||||
mode="permission"
|
mode="permission"
|
||||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
icon="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/09/04/3482a50a7b37798129c8754200c10466.png"
|
||||||
text="暂未登录"
|
text="暂未登录"
|
||||||
>
|
/>
|
||||||
</u-empty>
|
|
||||||
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
|
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
|
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
|
||||||
export default {
|
export default {
|
||||||
@@ -381,7 +379,7 @@
|
|||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 70vw;
|
width: 80vw;
|
||||||
background: $main-color;
|
background: $main-color;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|||||||
@@ -64,16 +64,32 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
</block>
|
</block>
|
||||||
<!-- 管理中台 -->
|
<!-- 管理中台 -->
|
||||||
<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>
|
||||||
<view class="flex-title">
|
<view class="flex-title">
|
||||||
<view class="flex-name">协商调解类</view>
|
<view class="flex-name">协商调解咨询类</view>
|
||||||
<view class="flex-tips">信用卡、贷款业务</view>
|
<view class="flex-tips">信用卡、贷款业务</view>
|
||||||
</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">
|
||||||
@@ -85,31 +101,36 @@
|
|||||||
<view class="flex-item" @click="onNav('ActionWork')">
|
<view class="flex-item" @click="onNav('ActionWork')">
|
||||||
<image class="flex-icon" src="/static/icons/icon_02.png" mode="aspectFill"></image>
|
<image class="flex-icon" src="/static/icons/icon_02.png" mode="aspectFill"></image>
|
||||||
<view class="flex-title">
|
<view class="flex-title">
|
||||||
<view class="flex-name">诉讼委托类</view>
|
<view class="flex-name">诉讼委托咨询类</view>
|
||||||
<view class="flex-tips">案件委托、拓展服务</view>
|
<view class="flex-tips">案件委托、拓展服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-btn">去查看</view>
|
<view class="flex-btn">去查看</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-item" @click="onToastTips()">
|
<view class="flex-item" @click="onNav('EnableWork')">
|
||||||
<!-- @click="onNav('EnableWork')" -->
|
|
||||||
<image class="flex-icon" src="/static/icons/icon_03.png" mode="aspectFill"></image>
|
<image class="flex-icon" src="/static/icons/icon_03.png" mode="aspectFill"></image>
|
||||||
<view class="flex-title">
|
<view class="flex-title">
|
||||||
<view class="flex-name">增收赋能类</view>
|
<view class="flex-name">增收赋能咨询类</view>
|
||||||
<view class="flex-tips">销售、领袖、演说等</view>
|
<view class="flex-tips">销售、领袖、演说等</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-btn">去查看</view>
|
<view class="flex-btn">去查看</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="flex-item" @click="onNav('AccountWork2')">
|
||||||
|
<image class="flex-icon" src="/static/icons/icon_04.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>
|
</view>
|
||||||
</block>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 未登录 -->
|
<!-- 未登录 -->
|
||||||
<view v-else class="auth-null">
|
<view v-else class="auth-null">
|
||||||
<u-empty
|
<u-empty
|
||||||
mode="permission"
|
mode="permission"
|
||||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
icon="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/06/06/c95ebcf8641fcbd413f990d661f638cb.gif"
|
||||||
text="暂未登录"
|
text="暂未登录"
|
||||||
>
|
/>
|
||||||
</u-empty>
|
|
||||||
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
|
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -235,21 +256,24 @@
|
|||||||
// 创建订单
|
// 创建订单
|
||||||
onCreateOrder(){
|
onCreateOrder(){
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ['个人订单', '客户订单'],
|
itemList: ['线下订单','个人订单', '客户订单'],
|
||||||
success : res => {
|
success : res => {
|
||||||
this.onNav('OrderCreate', {
|
switch (res.tapIndex){
|
||||||
type: res.tapIndex === 0 ? 'self' : 'other'
|
case 0:
|
||||||
})
|
this.onNav('MagAccount2')
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
this.onNav('OrderCreate', { type: 'self' })
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
this.onNav('OrderCreate', { type: 'other' })
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
onToastTips(){
|
|
||||||
uni.showToast({
|
|
||||||
title: '即将开放,敬请期待',
|
|
||||||
icon : 'none'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -541,7 +565,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;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { lists, orderSign, getOrderSignStatus, orderCancel } from '@/apis/interfaces/order.js'
|
import { lists, orderSign, getOrderSignStatus, orderCancel } from '@/apis/interfaces/order.js'
|
||||||
import { levels, transfer } from '@/apis/interfaces/transfers.js'
|
import { levels, transfer } from '@/apis/interfaces/transfers.js'
|
||||||
import modal from 'uview-ui/libs/config/props/modal';
|
import modal from 'uview-ui/libs/config/props/modal';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
BIN
static/icons/icon_04.png
Normal file
BIN
static/icons/icon_04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
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_28.png
Normal file
BIN
static/icons/work_icon_28.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 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