Compare commits

...

59 Commits

Author SHA1 Message Date
唐明明
bf8fcdbf4c 抖火调整自由服务包 2024-04-09 17:48:29 +08:00
唐明明
994ba4eb72 自由服务包调整,团队调整,新增业务联系人 2024-03-29 15:03:54 +08:00
唐明明
17cc2aaeab .. 2024-03-29 14:13:44 +08:00
唐明明
c6d2cbfd8d 工作台调整,业务办理调整 2024-03-29 14:13:11 +08:00
唐明明
ec92096f2b 调整提交数据 2024-03-13 17:01:47 +08:00
唐明明
604ace7e7a 调整业务办理 2024-03-13 15:42:52 +08:00
f145ca8497 [新增5大业务模块] 2024-03-04 15:08:52 +08:00
d71b91162b [新增5大业务模块] 2024-03-01 09:41:35 +08:00
唐明明
788c1e7af4 main 2024-01-03 11:19:34 +08:00
唐明明
7afdf38b93 can 2024-01-03 11:10:25 +08:00
唐明明
9f1ff579ce 删除 'static/.DS_Store' 2024-01-02 13:51:39 +08:00
唐明明
06e95df676 同步 2024-01-02 11:40:00 +08:00
5b738fc9b4 自定义订单 2023-12-29 13:44:22 +08:00
唐明明
46d29ae6b6 新增账户管理和委托管理模块 2023-12-15 10:14:00 +08:00
唐明明
43320b6870 新增线下订单模块 2023-11-14 18:05:15 +08:00
唐明明
5920afb9c7 merge 2023-10-25 17:03:28 +08:00
唐明明
76bb2b2a43 优化ios版本,新增注销账号功能 2023-10-25 17:03:00 +08:00
405f36425d 处理文字显示 2023-09-04 14:55:05 +08:00
唐明明
663a5a9762 调整报名 2023-07-17 11:36:40 +08:00
唐明明
bd1805d853 调整订单字段 2023-07-11 13:20:19 +08:00
唐明明
947c12d57a 调整增收赋能数据 2023-07-11 10:05:25 +08:00
唐明明
a6dc0901d9 增收赋能订单 2023-07-10 16:18:50 +08:00
唐明明
5eedc7a019 增收赋能 2023-07-07 18:57:50 +08:00
唐明明
7bacaf7cc4 更新工作台 2023-07-06 10:33:44 +08:00
19432eaae8 [工作台改版] 2023-06-28 14:31:31 +08:00
fd155cb735 [工作台改版] 2023-06-28 14:24:36 +08:00
c79903ac51 [工作台改版] 2023-06-28 13:56:36 +08:00
唐明明
7c56feee3f 同步代码 2023-06-27 17:30:14 +08:00
唐明明
47878384e8 移出潘宅计算器 2023-06-21 09:30:46 +08:00
唐明明
e112acefec 增收赋能栏目 2023-06-14 16:57:54 +08:00
唐明明
42e847fccd 抖火法律首页调整 2023-06-14 14:25:30 +08:00
唐明明
ca8c6dff01 综法订单新增取消功能,新增匹配律师状态 2023-06-08 13:35:07 +08:00
唐明明
23aaf13ffa 调整支付信息接口 2023-06-07 10:35:03 +08:00
唐明明
3616646dd0 调整补差价驳回信息 2023-06-02 16:21:39 +08:00
唐明明
c2eb3cc531 修复表单金额限制,修复订单刷新状态,修复驳回信息显示异常问题,综法订单详情新增律师信息,支付新增支付选项接口 2023-06-01 13:57:48 +08:00
唐明明
74fec37f0f 同步 2023-05-31 14:59:05 +08:00
b33b570374 支付方式调整 2023-05-25 13:55:40 +08:00
3eaaa25299 案件委托可以表单页面可滚动 2023-05-24 16:57:48 +08:00
唐明明
9b00b0fe4a 抖火综法 2023-05-23 17:20:12 +08:00
唐明明
f7824e3e86 个人单,企业年费调整 2023-05-22 17:31:51 +08:00
唐明明
0fe6fd4aaf 宗法 2023-05-22 11:13:29 +08:00
唐明明
c77b741c61 同步代码 2023-05-10 09:17:52 +08:00
唐明明
95452cea60 修复订单状态刷新错误,修复订单数据展示错误 2023-05-09 17:02:18 +08:00
唐明明
88055e6052 新增扫码付款 2023-05-09 14:56:00 +08:00
唐明明
51a76ff3d0 调整合同预览PDF插件 2023-05-08 11:42:11 +08:00
唐明明
f9ef8af75a merge 2023-04-26 17:03:31 +08:00
唐明明
25896ec86f 新增汇付天下支付 2023-04-26 17:02:15 +08:00
唐明明
54434e1ada Merge branch 'master' into dev 2023-04-25 16:04:59 +08:00
唐明明
28751d0662 合并分支冲突 2023-04-25 16:04:43 +08:00
唐明明
5a0c4e3671 解决分支冲突 2023-04-25 15:54:49 +08:00
唐明明
048b9987a7 调整字段名称错误 2023-04-25 15:32:58 +08:00
唐明明
c33712665a 合同记录增加分页 2023-04-25 15:32:13 +08:00
唐明明
8f5489a8df 同步 2023-03-31 22:23:31 +08:00
唐明明
d5b06534db 调整基础信息字段类型 2023-03-27 17:57:58 +08:00
唐明明
b5b3df24f5 同步 2023-03-27 17:03:14 +08:00
唐明明
6acfdb256d 同步 2023-03-27 15:59:20 +08:00
唐明明
d605b0b0ff 移出使用账户历史消息 2023-03-24 10:11:48 +08:00
唐明明
d45ace96c6 切换正式环境 2023-03-24 10:09:30 +08:00
唐明明
b484e9b4ca Merge pull request 'master upd' (#2) from dev into master
Reviewed-on: https://git.yuzhankeji.cn/TmOct5/dou_fire/pulls/2
2023-03-23 13:51:58 +08:00
135 changed files with 19211 additions and 858 deletions

View File

@@ -13,8 +13,16 @@
"type" : "uniCloud"
},
{
"playground" : "custom",
"playground" : "standard",
"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"
}
]
}

10
App.vue
View File

@@ -2,11 +2,13 @@
import { getVersions } from './apis/interfaces/versions'
export default {
onLaunch: function() {
return
//#ifdef APP-PLUS
// 获取系统版本号
getVersions({
platform: plus.os.name,
version : plus.runtime.version
version : plus.runtime.version,
channel : 'app'
}).then(res => {
if (res.update) {
uni.showModal({
@@ -59,9 +61,9 @@
},
globalData:{
signUrl: "https://web.douhuofalv.com/app/e-sign?sign_type=order",
// https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=order 测试环境
certificationUrl: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
// 'https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=personal' 测试环境
// signUrl: "https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=order", //测试环境
certificationUrl: 'http://web.douhuofalv.com/app/e-sign?sign_type=personal',
// certificationUrl: 'https://web.douhuotest.douhuofalv.com/app/e-sign?sign_type=personal', //测试环境
}
}
</script>

View File

@@ -1,3 +1,3 @@
# dou-Fire
抖火App
抖火App ( 现在线上版本 2023-12-15)

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置
const config = {
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
apiUrl : 'https://douhuo.douhuofalv.com/api/',
// apiUrl : 'https://douhuo.demos.uzchain.tech/api/', //测试环境
timeout : 60000
}

48
apis/interfaces/custom.js Normal file
View 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
}

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

View File

@@ -25,7 +25,7 @@ const jf = (data) =>{
data
})
}
// 法服务包
// 法服务包
const zf = (data) =>{
return request({
url: "app/services/zf",
@@ -54,6 +54,140 @@ 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"
})
}
// **
// 最新五大板块
// **
// 业务列表
const bigfive = data => {
return request({
url : "bigfive/index",
data
})
}
// 业务详情
const bigfiveInfo = (bigFive) => {
return request({
url : "bigfive/" + bigFive + "/info"
})
}
// 办理初始接口
const bigfiveInit = (bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/init"
})
}
// 标的额比例计算
const settleAmount = (data, bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/settle_amount",
method : "POST",
data
})
}
// 三级分类服务费类型
const amountType = (bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/amount_type",
method : "POST"
})
}
// 办理业务
const bigfiveStore = data => {
return request({
url : "bigfive/order/store",
method : "POST",
data
})
}
// 订单列表
const orderLists = data => {
return request({
url : "bigfive/order/lists",
data
})
}
// 订单取消
const orderCancel = (order) => {
return request({
url : "bigfive/order/" + order + "/cancel",
method : "DELETE"
})
}
export {
categories,
jf,
@@ -62,5 +196,22 @@ export {
index,
recharge,
zyPay,
accountManagement,
accountFrom,
accountOrder,
accountCancel,
delegation,
delegationFrom,
delegationOrder,
delegationCancel,
bigfive,
bigfiveInfo,
bigfiveInit,
settleAmount,
amountType,
bigfiveStore,
orderLists,
orderCancel
}

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

View File

@@ -216,6 +216,16 @@ const orderLog = (id, page) => {
})
}
// 通用订单详情
const unifyInfo = data => {
return request({
url : 'unify/order/info',
method : 'POST',
data
})
}
// 支付订单
export {
lists,
@@ -243,5 +253,6 @@ export {
getConfirmSchemeInfo,
sbuConfirmScheme,
orderCancel,
orderLog
orderLog,
unifyInfo
}

View File

@@ -32,7 +32,6 @@ const umsPay = (orderId, data) => {
// 银联支付补差价
const diffUmsPay = (orderId, data) => {
console.log(data)
return request({
url: 'pay/diff/' + orderId + '/ums',
data
@@ -59,7 +58,68 @@ const umsFree = (orderNo, type) => {
return request({
url : 'app/services/recharge/' + orderNo + '/ums',
data : { type },
method: 'POST'
method: 'POST'
})
}
// 斗拱支付
const dgPay = (orderId, data) => {
return request({
url : 'pay/order/' + orderId + '/dg',
data
})
}
// 斗拱支付补差价
const diffDgPay = (orderId, data) => {
return request({
url: 'pay/diff/' + orderId + '/dg',
data
})
}
// 斗拱支付自由服务包
const dgFree = (orderNo, type) => {
return request({
url : 'app/services/recharge/' + orderNo + '/dg',
data : { ...type },
method: 'POST'
})
}
// 银联综法支付
const umsSynthesize = data => {
return request({
url : 'pay/cashier_desk/ums',
data,
method: 'POST'
})
}
// 抖拱综法支付
const dgSynthesize = data => {
return request({
url : 'pay/cashier_desk/dg',
data,
method: 'POST'
})
}
// 火力值综法支付
const coinSynthesize = data => {
return request({
url : 'pay/cashier_desk/score',
data,
method: 'POST'
})
}
// 现在打款支付
const cashierOffline = data => {
return request({
url : 'pay/cashier_desk/offline',
data,
method: 'POST'
})
}
@@ -70,5 +130,12 @@ export {
diffUmsPay,
umsState,
umsFree,
umsFreeInfo
umsFreeInfo,
dgPay,
diffDgPay,
dgFree,
umsSynthesize,
dgSynthesize,
coinSynthesize,
cashierOffline
}

View File

@@ -0,0 +1,276 @@
/**
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
import { request } from '../index'
// 获取综法订单数据数量
const synthesisCount = (data) =>{
return request({
url: "synthesis/data/orders_count",
data: data
})
}
// 综法咨询-一次免费列表
const synthList = () =>{
return request({
url: "synthesis/index"
})
}
// 综法咨询-一次免费详情
const synthDet = (synthesis_id) =>{
return request({
url: "synthesis/index/" + synthesis_id
})
}
// 综法咨询-一次免费创建单
const synthPost = (synthesis_id, data) =>{
return request({
url: "synthesis/index/" + synthesis_id + "/order",
method: 'POST',
data: data
})
}
// 综法咨询-年费服务包列表
const yearSynthList = data =>{
return request({
url: "synthesis/services",
data: data
})
}
// 综法咨询-年费服务包详情
const yearSynthInfo = (service_id) =>{
return request({
url: "synthesis/services/" + service_id
})
}
// 综法咨询-年费服务包创建单
const yearSynthPost = (service_id, data) =>{
return request({
url : "synthesis/services/" + service_id + "/buy",
method : 'POST',
data : data
})
}
// 综法咨询-案件委托列表
const entrustList = () =>{
return request({
url: "synthesis/entrusts"
})
}
// 综法咨询-案件委托子分类
const entrustSon = data =>{
return request({
url: "synthesis/entrust/all",
data: data
})
}
// 综法咨询-案件委托详情
const entrustInfo = (entrust_id) =>{
return request({
url: "synthesis/entrust/" + entrust_id
})
}
// 综法咨询-案件委托创建单
const entrustPost = (entrust_id, data) =>{
return request({
url: "synthesis/entrust/" + entrust_id + "/order",
method: 'POST',
data: data
})
}
// 综法咨询-拓展服务列表
const expandsList = () =>{
return request({
url: "synthesis/expands",
})
}
// 综法咨询-拓展服务详情
const expandsInfo = (expand_id) =>{
return request({
url: "synthesis/expand/" + expand_id
})
}
// 综法咨询-拓展服务创建单
const expandsPost = (expand_id, data) =>{
return request({
url: "synthesis/expand/" + expand_id + "/order",
method: 'POST',
data: data
})
}
// 综法咨询-年费服务包微信支付
const yearSynthPay = (service_order_id, data) =>{
return request({
url: "pay/service_order/" + service_order_id + "/wechat",
data: data
})
}
// 年费订单-列表
const yearOrder = data =>{
return request({
url: "synthesis/services/orders",
data: data
})
}
// 年费订单-详情
const yearOrderSee = (order_id) =>{
return request({
url: "synthesis/services/order/" + order_id
})
}
// 咨询单-列表
const seekOrder = data =>{
return request({
url: "synthesis/orders",
data: data
})
}
// 咨询订单-详情
const seekOrderSee = (synthesis_order_id) =>{
return request({
url: "synthesis/order/" + synthesis_order_id
})
}
// 委托单-列表
const entrustOrder = data =>{
return request({
url: "synthesis/entrust/orders",
data: data
})
}
// 拓展单-列表
const expandOrder = data =>{
return request({
url: "synthesis/expand/orders",
data: data
})
}
// 年费费--线下打款
const offlineOpen = (data) =>{
return request({
url: "pay/offline/pay",
method: 'POST',
data: data
})
}
// 查看打款凭证-查看提交信息
const bankSee = (pay_id, data) =>{
return request({
url: "pay/offline/" + pay_id + "/show",
data: data
})
}
// 编辑打款凭证
const bankEdit = (pay_id, data) =>{
return request({
url: "pay/offline/" + pay_id + "/edit",
method: 'POST',
data: data
})
}
// 获取线下打款银行
const bankInfo = (data) =>{
return request({
url: "pay/offline/bank"
})
}
// 咨询单-补差价列表
const diffPrices = data =>{
return request({
url: "synthesis/diff_prices",
data: data
})
}
// 咨询单-创建补差价
const entrustPay = data =>{
return request({
url: "synthesis/diff_prices/create",
method: 'POST',
data: data
})
}
// 咨询单-取消补差价
const cancelPrices = (diff_price_id) =>{
return request({
url: "synthesis/diff_prices/" + diff_price_id,
method: 'DELETE'
})
}
// 获取签约地址
const esignUrl = (data) =>{
return request({
url: "synthesis/esign/sign_url",
data: data
})
}
export {
synthesisCount,
synthList,
synthDet,
synthPost,
yearSynthList,
yearSynthInfo,
yearSynthPost,
entrustList,
entrustSon,
entrustInfo,
entrustPost,
expandsList,
expandsInfo,
expandsPost,
yearSynthPay,
yearOrder,
yearOrderSee,
seekOrder,
seekOrderSee,
entrustOrder,
expandOrder,
offlineOpen,
bankSee,
bankEdit,
bankInfo,
diffPrices,
entrustPay,
cancelPrices,
esignUrl
}

View File

@@ -0,0 +1,157 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 综法订单
*/
import { request } from '../index'
// 年费订单
const servicesOrder = (data) =>{
return request({
url : "app/synthesis/services/orders",
data
})
}
// 咨询订单
const synthesisOrder = (data) =>{
return request({
url : "app/synthesis/orders",
data
})
}
// 委托订单
const entrustOrder = (data) =>{
return request({
url : "app/synthesis/entrusts/orders",
data
})
}
// 拓展订单
const expandOrder = (data) =>{
return request({
url : "app/synthesis/expands/orders",
data
})
}
// 年费订单 - 详情
const servicesInfo = service_id => {
return request({
url : 'app/synthesis/service/order/' + service_id
})
}
// 咨询订单 - 详情
const synthesisInfo = service_id => {
return request({
url : 'app/synthesis/order/' + service_id
})
}
// 委托订单 - 详情
const entrustInfo = service_id => {
return request({
url : 'app/synthesis/entrust/order/' + service_id
})
}
// 拓展订单 - 详情
const expandInfo = service_id => {
return request({
url : 'app/synthesis/expand/order/' + service_id
})
}
// 订单详情
const oderinfo = (order_id, order_type) => {
return request({
url : 'pay/cashier_desk/info',
data : {
order_id,
order_type
},
method : 'POST'
})
}
// 创建补差价订单
const orderDiff = (order_type, order_id, price) => {
return request({
url : 'synthesis/diff_prices/create',
data : {
order_type,
order_id,
price
},
method : 'POST'
})
}
// 补差价列表
const orderDiffList = (order_id, order_type) => {
return request({
url : 'synthesis/diff_prices',
data : {
order_type,
order_id,
}
})
}
// 取消补差价
const orderDiffCancel = (diff_price_id) => {
return request({
url : 'synthesis/diff_prices/' + diff_price_id,
method : 'DELETE'
})
}
// 补差价详情
const orderDiffInfo = (diff_price_id) => {
return request({
url : 'synthesis/diff_prices/' + diff_price_id,
})
}
// 取消订单
const cancelOrder = (type, id) => {
let url
switch (type){
case 'service':
url = "synthesis/services/order/"
break;
case 'entrust':
url = "synthesis/entrust/order/"
break;
case 'expand':
url = "synthesis/expand/order/"
break;
}
return request({
url : url + id,
method : 'DELETE'
})
}
export {
servicesOrder,
synthesisOrder,
entrustOrder,
expandOrder,
servicesInfo,
synthesisInfo,
entrustInfo,
expandInfo,
oderinfo,
orderDiff,
orderDiffList,
orderDiffCancel,
orderDiffInfo,
cancelOrder
}

View File

@@ -9,6 +9,9 @@
import { uploading as upd } from '../index'
const uploads = (paths, fromData) => {
console.log(paths)
return upd(paths, fromData)
}

View File

@@ -8,6 +8,13 @@
import { request } from '../index'
// 团队分类
const relationsTab = () => {
return request({
url : 'user/team/init',
})
}
// 我的下级用户
const relations = data => {
return request({
@@ -172,7 +179,40 @@ const getFlows = id => {
})
}
// 获取所有省市数据
const createCity = (data) =>{
return request({
url: "region/pro_city",
data: data
})
}
// 盘债计算器
const debtUrl = () => {
return request({
url: "debt/url"
})
}
// 账户注销
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 {
relationsTab,
relations,
code,
info,
@@ -192,5 +232,9 @@ export {
getTeam,
getTeamLogs,
getSignLogs,
getFlows
getFlows,
createCity,
debtUrl,
offSmsCode,
offUser
}

View File

@@ -29,8 +29,49 @@ const sign = () => {
})
}
// 获取综法订单统计
const synthesisCount = () => {
return request({
url : 'synthesis/data/orders_count',
data : {
channel : 'manage'
}
})
}
// 获取综法法律咨询单统计
const synthesisServices = () => {
return request({
url : 'synthesis/data/services',
data : {
channel : 'manage'
}
})
}
// 获取综法诉讼委托单统计
const synthesisAttorney = () => {
return request({
url : 'synthesis/data/attorney',
data : {
channel : 'manage'
}
})
}
// 增收赋能单数据统计
const empowerStatistics = () =>{
return request({
url : 'empower/manager/index'
})
}
export {
index,
rights,
sign
sign,
synthesisCount,
synthesisServices,
synthesisAttorney,
empowerStatistics
}

196
components/entrustOrder.vue Normal file
View File

@@ -0,0 +1,196 @@
<template>
<view class="order-block">
<view class="order-block-header">
<view class="order-no">订单号{{no || '-'}}</view>
<view class="order-state">{{status.text || '-'}}</view>
</view>
<view class="order-block-content">
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
<view class="order-content">
<view class="order-content-type">
<label>委托类型</label>
<view class="nowrap">{{ entrust.title || '-' }}</view>
</view>
<view class="order-content-type" v-if="diff > 0">
<label>需补差价</label>
<view class="nowrap">{{ diff || '-' }}</view>
</view>
<view class="order-content-type" v-if="can.lawyer_status != 0">
<label>服务律师</label>
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
</view>
<view class="order-content-type">
<label>服务费用</label>
<view class="nowrap">{{ price || '-' }}</view>
</view>
<view class="order-content-type">
<label>创建时间</label>
<view class="nowrap">{{ time || '-' }}</view>
</view>
</view>
<view class="order-btns">
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
<text v-if="can.pay_status == 1">支付</text>
<text v-if="can.pay_status == 2">审核中</text>
<text v-if="can.pay_status == 3">被驳回</text>
</button>
<!-- 线上支付被驳回 -->
<button class="btn-cancel" v-if="status.value == 5" @click="onPayTurn(no)">原因</button>
<button class="btn-cancel" v-if="can.diff_price" @click="onDiff(no)">补差价</button>
<button class="btn-sign" @click="onInfo(no)">查看</button>
</view>
</view>
</view>
</template>
<script>
export default {
name:"entrustOrders",
data() {
return {
};
},
props: {
isSelf: {
type : Boolean,
default : false
},
no : {
type : String,
default : ''
},
user: {
type : Object,
default : () => {
return { }
}
},
status: {
type : Object,
default : () => {
return { }
}
},
entrust: {
type : Object,
default : () => {
return { }
}
},
time : {
type : String,
default : ''
},
price: {
type : String,
default : ''
},
diff: {
type : Number,
default : 0
},
lawyer: {
type : Object,
default : () => {
return { name: '' }
}
},
can: {
typeof: Object,
default : () => {
return {}
}
}
},
methods: {
// 订单签约
onSing(id){
this.$emit('sing', id)
},
// 订单详情
onInfo(id){
this.$emit('info', id)
},
// 联系客户
onPhone(mobile){
this.$emit('callPhone', mobile)
},
// 补差价支付
onDiff(id){
this.$emit('diff', id)
},
// 支付
onOPay(id){
this.$emit('pay', id)
},
// 取消订单
onCancel(id){
this.$emit('cancel', id)
},
// 线上支付被驳回
onPayTurn(id){
this.$emit('payTurn', id)
}
}
}
</script>
<style lang="scss">
// 列表模块
.order-block{
background: white;
margin: 0 30rpx 30rpx 30rpx;
border-radius: 10rpx;
&-header{
border-bottom: solid 1rpx #eee;
display: flex;
justify-content:
space-between;
padding: 20rpx 30rpx;
align-items: center;
line-height: 70rpx;
.order-no{ font-size: 28rpx; color: #111; }
.order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; }
}
&-content{
padding: 30rpx;
.order-user{
font-size: 40rpx;
font-weight: bold;
padding-bottom: 30rpx;
text{ font-size: 28rpx; margin-left: 10rpx; font-weight: normal; color: #666; }
}
.order-content{
background: #F7FAFF;
border-radius: 10rpx;
padding: 20rpx 30rpx;
color: #666666;
font-size: 30rpx;
.order-content-type{
display: flex;
justify-content: space-between;
color: #111;
line-height: 70rpx;
label{ color: gray; }
}
.order-content-title{ color: #111; line-height: 70rpx; }
.order-content-text{ line-height: 40rpx; text-align: justify; }
}
.order-btns{
padding-top: 30rpx;
display: flex;
justify-content: flex-end;
button{ margin: 0; padding: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; }
button::after{ display: none; }
button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; }
button.btn-cancel.in{ opacity: .8; }
button.btn-sign{ background: #446EFE; color: white; }
}
}
}
</style>

185
components/expandOrder.vue Normal file
View File

@@ -0,0 +1,185 @@
<template>
<view class="order-block">
<view class="order-block-header">
<view class="order-no">订单号{{no || '-'}}</view>
<view class="order-state">{{status.text || '-'}}</view>
</view>
<view class="order-block-content">
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
<view class="order-content">
<view class="order-content-type">
<label>订单类型</label>
<view class="nowrap">{{ expand.title || '-' }}</view>
</view>
<view class="order-content-type" v-if="diff > 0">
<label>需补差价</label>
<view class="nowrap">{{ diff || '-' }}</view>
</view>
<view class="order-content-type" v-if="can.lawyer_status != 0">
<label>服务律师</label>
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
</view>
<view class="order-content-type">
<label>服务金额</label>
<view class="nowrap">{{ price || '-' }}</view>
</view>
<view class="order-content-type">
<label>创建时间</label>
<view class="nowrap">{{ time || '-' }}</view>
</view>
</view>
<view class="order-btns">
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
<text v-if="can.pay_status == 1">支付</text>
<text v-if="can.pay_status == 2">审核中</text>
<text v-if="can.pay_status == 3">被驳回</text>
</button>
<button class="btn-cancel" v-if="can.diff_price" @click="onDiff(no)">补差价</button>
<button class="btn-sign" @click="onInfo(no)">查看</button>
</view>
</view>
</view>
</template>
<script>
export default {
name:"entrustOrders",
data() {
return {
};
},
props: {
no : {
type : String,
default : ''
},
user: {
type : Object,
default : () => {
return { }
}
},
status: {
type : Object,
default : () => {
return { }
}
},
expand: {
type : Object,
default : () => {
return { }
}
},
time : {
type : String,
default : ''
},
price: {
type : String,
default : ''
},
diff: {
type : Number,
default : 0
},
can: {
type : Object,
default : () => {
return { }
}
},
lawyer: {
type : Object,
default : () => {
return { name: '' }
}
},
isSelf: {
type : Boolean,
default : false
}
},
methods: {
// 订单详情
onInfo(id){
this.$emit('info', id)
},
// 联系客户
onPhone(mobile){
this.$emit('callPhone', mobile)
},
// 补差价支付
onDiff(id){
this.$emit('diff', id)
},
// 支付
onOPay(id){
this.$emit('pay', id)
},
// 取消订单
onCancel(id){
this.$emit('cancel', id)
}
}
}
</script>
<style lang="scss">
// 列表模块
.order-block{
background: white;
margin: 0 30rpx 30rpx 30rpx;
border-radius: 10rpx;
&-header{
border-bottom: solid 1rpx #eee;
display: flex;
justify-content:
space-between;
padding: 20rpx 30rpx;
align-items: center;
line-height: 70rpx;
.order-no{ font-size: 28rpx; color: #111; }
.order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; }
}
&-content{
padding: 30rpx;
.order-user{
font-size: 40rpx;
font-weight: bold;
padding-bottom: 30rpx;
text{ font-size: 28rpx; margin-left: 10rpx; font-weight: normal; color: #666; }
}
.order-content{
background: #F7FAFF;
border-radius: 10rpx;
padding: 20rpx 30rpx;
color: #666666;
font-size: 30rpx;
.order-content-type{
display: flex;
justify-content: space-between;
color: #111;
line-height: 70rpx;
label{ color: gray; }
}
.order-content-title{ color: #111; line-height: 70rpx; }
.order-content-text{ line-height: 40rpx; text-align: justify; }
}
.order-btns{
padding-top: 30rpx;
display: flex;
justify-content: flex-end;
button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; padding: 0; }
button::after{ display: none; }
button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; }
button.btn-cancel.in{ opacity: .8; }
button.btn-sign{ background: #446EFE; color: white; }
}
}
}
</style>

View File

@@ -0,0 +1,67 @@
<template>
<view>
<block v-if="inputType == 'price'">
<input type="digit" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
<text></text>
</block>
<block v-else-if="inputType == 'number'">
<input type="number" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
</block>
<block v-else-if="inputType == 'day'">
<input type="number" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
<text></text>
</block>
<block v-else-if="inputType == 'password'">
<input type="text" password :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
</block>
<block v-else-if="inputType == 'mobile'">
<input type="number" maxlength="11" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
</block>
<block v-else>
<input v-if="inputKey == 'card_no'" type="number" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
<input v-else type="text" :placeholder="'请输入' + inputTitle" placeholder-class="placeholderClass" :value="blurValue" @blur="blurInput"/>
</block>
</view>
</template>
<script>
export default{
name: 'mouldInput',
data(){
return {
workIndex: 0
}
},
props: {
inputKey: {
type : String,
default : ''
},
inputType: {
type : String,
default : ''
},
blurValue: {
type : String,
default : ''
},
inputTitle: {
type : String,
default : ''
}
},
onLoad() {},
methods: {
blurInput(e){
this.$emit('onValue', e.detail.value)
}
}
}
</script>
<style>
input {
width: 100%;
height: 100%;
}
</style>

View File

@@ -0,0 +1,185 @@
<template>
<view class="order-block">
<view class="order-block-header">
<view class="order-no">订单号{{no || '-'}}</view>
<view class="order-state">{{status.text || '-'}}</view>
</view>
<view class="order-block-content">
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
<view class="order-content">
<view class="order-content-type">
<label>年费类型</label>
<view class="nowrap">{{ service.audiences || '-' }}</view>
</view>
<view class="order-content-type">
<label>订单类型</label>
<view class="nowrap">{{ service.title || '-' }}</view>
</view>
<view class="order-content-type" v-if="can.lawyer_status != 0">
<label>服务律师</label>
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
</view>
<view class="order-content-type">
<label>服务金额</label>
<view class="nowrap">{{ price || '-' }}</view>
</view>
<view class="order-content-type">
<label>创建时间</label>
<view class="nowrap">{{ time || '-' }}</view>
</view>
</view>
<view class="order-btns">
<button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button>
<button class="btn-cancel" @click="onPhone(user.username)">联系TA</button>
<button class="btn-cancel" @click="onSing(no)" v-if="can.sign && isSelf">签约</button>
<button class="btn-cancel" :class="{'in': can.pay_status == 3}" v-if="can.pay_status == 1 || can.pay_status == 2 || can.pay_status == 3" @click="onOPay(no)">
<text v-if="can.pay_status == 1">支付</text>
<text v-if="can.pay_status == 2">审核中</text>
<text v-if="can.pay_status == 3">被驳回</text>
</button>
<button class="btn-cancel" v-if="can.diff_price" @click="onDiff(no)">补差价</button>
<button class="btn-sign" @click="onInfo(no)">查看</button>
</view>
</view>
</view>
</template>
<script>
export default {
name:"entrustOrders",
data() {
return {
};
},
props: {
isSelf: {
type : Boolean,
default : false,
},
no : {
type : String,
default : ''
},
user: {
type : Object,
default : () => {
return { }
}
},
status: {
type : Object,
default : () => {
return { }
}
},
service: {
type : Object,
default : () => {
return { }
}
},
time : {
type : String,
default : ''
},
price: {
type : String,
default : ''
},
lawyer: {
type : Object,
default : () => {
return { name: '' }
}
},
can: {
type : Object,
default : () => {
return { }
}
}
},
methods: {
// 订单签约
onSing(id){
this.$emit('sing', id)
},
// 订单详情
onInfo(id){
this.$emit('info', id)
},
// 联系客户
onPhone(mobile){
this.$emit('callPhone', mobile)
},
// 补差价支付
onDiff(id){
this.$emit('diff', id)
},
// 支付
onOPay(id){
this.$emit('pay', id)
},
// 取消订单
onCancel(id){
this.$emit('cancel', id)
}
}
}
</script>
<style lang="scss">
// 列表模块
.order-block{
background: white;
margin: 0 30rpx 30rpx 30rpx;
border-radius: 10rpx;
&-header{
border-bottom: solid 1rpx #eee;
display: flex;
justify-content:
space-between;
padding: 20rpx 30rpx;
align-items: center;
line-height: 70rpx;
.order-no{ font-size: 28rpx; color: #111; }
.order-state{ color: #446EFE; font-weight: bold; font-size: 30rpx; }
}
&-content{
padding: 30rpx;
.order-user{
font-size: 40rpx;
font-weight: bold;
padding-bottom: 30rpx;
text{ font-size: 28rpx; margin-left: 10rpx; font-weight: normal; color: #666; }
}
.order-content{
background: #F7FAFF;
border-radius: 10rpx;
padding: 20rpx 30rpx;
color: #666666;
font-size: 30rpx;
.order-content-type{
display: flex;
justify-content: space-between;
color: #111;
line-height: 70rpx;
label{ color: gray; }
}
.order-content-title{ color: #111; line-height: 70rpx; }
.order-content-text{ line-height: 40rpx; text-align: justify; }
}
.order-btns{
padding-top: 30rpx;
display: flex;
justify-content: flex-end;
button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; font-size: 30rpx; }
button::after{ display: none; }
button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; }
button.btn-sign{ background: #446EFE; color: white; }
}
}
}
</style>

View File

@@ -0,0 +1,148 @@
<template>
<view class="order-block">
<view class="order-block-header">
<view class="order-no">订单号{{no || '-'}}</view>
</view>
<view class="order-block-content">
<view class="order-user">{{user.nickname}}<text>{{user.username}}</text></view>
<view class="order-content">
<view class="order-content-type" v-if="can.lawyer_status && can.lawyer_status != 0 ">
<label>服务律师</label> -->
<view class="nowrap" v-if="can.lawyer_status === 2">{{ lawyer.name || '-' }}</view>
<view class="nowrap" style="color: #FFAB3F;" v-else>待匹配律师</view>
</view>
<view class="order-content-type">
<label>订单类型</label>
<view class="nowrap">{{ synthesis.title || '-' }}</view>
</view>
<view class="order-content-type">
<label>创建时间</label>
<view class="nowrap">{{ time || '-' }}</view>
</view>
</view>
<view class="order-btns">
<!-- <button class="btn-cancel" v-if="can.cancel && isSelf" @click="onCancel(no)">取消</button> -->
<button class="btn-cancel" @click="onPhone(user)">联系TA</button>
<button class="btn-sign" @click="onInfo(no)">查看</button>
</view>
</view>
</view>
</template>
<script>
export default {
name:"entrustOrders",
data() {
return {
};
},
props: {
no : {
type : String,
default : ''
},
user: {
type : Object,
default : () => {
return { }
}
},
synthesis: {
type : Object,
default : () => {
return { }
}
},
time : {
type : String,
default : ''
},
price: {
type : String,
default : ''
},
lawyer: {
type : Object,
default : () => {
return { name: '' }
}
},
isSelf: {
type : Boolean,
default : false
},
can : {
type : Object,
default : () => {
return { }
}
}
},
methods: {
onInfo(id){
this.$emit('info', id)
},
onPhone(mobile){
this.$emit('callPhone', mobile)
},
onSing(id){
this.$emit('info', id)
},
// 取消订单
onCancel(id){
this.$emit('cancel', id)
}
}
}
</script>
<style lang="scss">
// 列表模块
.order-block{
background: white;
margin: 0 30rpx 30rpx 30rpx;
border-radius: 10rpx;
&-header{
border-bottom: solid 1rpx #eee;
padding: 20rpx 30rpx;
align-items: center;
line-height: 70rpx;
.order-no{ font-size: 28rpx; color: #111; }
}
&-content{
padding: 30rpx;
.order-user{
font-size: 40rpx;
font-weight: bold;
padding-bottom: 30rpx;
text{ font-size: 28rpx; margin-left: 10rpx; font-weight: normal; color: #666; }
}
.order-content{
background: #F7FAFF;
border-radius: 10rpx;
padding: 20rpx 30rpx;
color: #666666;
font-size: 30rpx;
.order-content-type{
display: flex;
justify-content: space-between;
color: #111;
line-height: 70rpx;
label{ color: gray; }
}
.order-content-title{ color: #111; line-height: 70rpx; }
.order-content-text{ line-height: 40rpx; text-align: justify; }
}
.order-btns{
padding-top: 30rpx;
display: flex;
justify-content: flex-end;
button{ margin: 0; height: 70rpx; line-height: 70rpx; border-radius: 35rpx; min-width: 135rpx; padding: 0; font-size: 30rpx; }
button::after{ display: none; }
button.btn-cancel{ margin-right: 20rpx; color: #446EFE; border:solid 1rpx #446EFE; background: white; line-height: 68rpx; box-sizing: border-box; }
button.btn-sign{ background: #446EFE; color: white; }
}
}
}
</style>

57
dhdg-pay/dgali-pay.html Normal file
View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>抖火收银台</title>
</head>
<body>
<style>
body{ padding: 0; margin: 0; }
.pages{ width: 100vw; height: 90vh; display: flex; align-items: center; flex-direction: column; justify-content: center; }
img{ width: 62px; height: 62px; border-radius: 10px; }
h4{ font-size: 16px; margin-bottom: 100px; }
p{ font-size: 14px; color: red; }
button{ margin-bottom: 20px; width: 60vw; height: 50px; line-height: 50px; border: none; padding: 0; font-size: 16px; font-weight: bold; border-radius: 5px; background: #e80050; color: white; }
button.closeBtn{ border:solid 1px #e80050; color: #e80050; background-color: white; line-height: 48px; }
.footer{ font-size: 14px; color: gray; position: absolute; bottom: 10vh; }
</style>
<div class="pages">
<img src="logo.png" alt="抖火法律">
<h4>抖火支付宝收银台</h4>
<p id="toast" style="display: none;">!!!参数错误</p>
<button id="pay" onclick="onPay()">打开支付宝</button>
<button class="closeBtn" id="btn" onclick="onClose()">支付完成</button>
<div class="footer">河北抖火法律咨询服务有限公司</div>
</div>
<script>
// var wxCodeVal = window.location.search.indexOf('miniurlcode=')
// var wxMiniUrl = ''
// if(wxCodeVal > 0){
// var wxCodeUrl = window.location.search.substring((wxCodeVal + 'miniurlcode='.length), window.location.search.length)
// wxMiniUrl = decodeURIComponent(wxCodeUrl);
// window.location.href = decodeURIComponent(wxCodeUrl);
// }else{
// document.getElementById("btn").style.display = 'none'
// document.getElementById("toast").style.display = 'block'
// }
// 支付
// decodeURIComponent(wxCodeUrl)
document.getElementById("pay").onPay = function() {
// if(wxMiniUrl != ''){
window.location.href = "alipays://platformepi/statapprapd-2021003121605466&thirdPrtScheme-dofire:/&pape-pes/cashier/cashierp30-202305101532430092568067%26s%3app";
// }
}
// 关闭支付
document.getElementById("btn").onClose = function(){
document.addEventListener("WeixinJSBridgeReady", function() {
WeixinJSBridge.call("closeWindow");
},false);
WeixinJSBridge.call("closeWindow");
}
</script>
</body>
</html>

56
dhdg-pay/index.html Normal file
View File

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>抖火收银台</title>
</head>
<body>
<style>
body{ padding: 0; margin: 0; }
.pages{ width: 100vw; height: 90vh; display: flex; align-items: center; flex-direction: column; justify-content: center; }
img{ width: 62px; height: 62px; border-radius: 10px; }
h4{ font-size: 16px; margin-bottom: 100px; }
p{ font-size: 14px; color: red; }
button{ margin-bottom: 20px; width: 60vw; height: 50px; line-height: 50px; border: none; padding: 0; font-size: 16px; font-weight: bold; border-radius: 5px; background: #e80050; color: white; }
button.closeBtn{ border:solid 1px #e80050; color: #e80050; background-color: white; line-height: 48px; }
.footer{ font-size: 14px; color: gray; position: absolute; bottom: 10vh; }
</style>
<div class="pages">
<img src="logo.png" alt="抖火法律">
<h4>抖火收银台</h4>
<p id="toast" style="display: none;">!!!参数错误</p>
<button id="pay" onclick="onPay()">立即支付</button>
<button class="closeBtn" id="btn" onclick="onClose()">支付完成</button>
<div class="footer">河北抖火法律咨询服务有限公司</div>
</div>
<script>
var wxCodeVal = window.location.search.indexOf('miniurlcode=')
var wxMiniUrl = ''
if(wxCodeVal > 0){
var wxCodeUrl = window.location.search.substring((wxCodeVal + 'miniurlcode='.length), window.location.search.length)
wxMiniUrl = decodeURIComponent(wxCodeUrl);
window.location.href = decodeURIComponent(wxCodeUrl);
}else{
document.getElementById("btn").style.display = 'none'
document.getElementById("toast").style.display = 'block'
}
// 支付
document.getElementById("pay").onPay = function() {
if(wxMiniUrl != ''){
window.location.href = decodeURIComponent(wxCodeUrl);
}
}
// 关闭支付
document.getElementById("btn").onClose = function(){
document.addEventListener("WeixinJSBridgeReady", function() {
WeixinJSBridge.call("closeWindow");
},false);
WeixinJSBridge.call("closeWindow");
}
</script>
</body>
</html>

BIN
dhdg-pay/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,272 @@
/**
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
*/
var isIos
// #ifdef APP-PLUS
isIos = (plus.os.name == "iOS")
// #endif
// 判断推送权限是否开启
function judgeIosPermissionPush() {
var result = false;
var UIApplication = plus.ios.import("UIApplication");
var app = UIApplication.sharedApplication();
var enabledTypes = 0;
if (app.currentUserNotificationSettings) {
var settings = app.currentUserNotificationSettings();
enabledTypes = settings.plusGetAttribute("types");
console.log("enabledTypes1:" + enabledTypes);
if (enabledTypes == 0) {
console.log("推送权限没有开启");
} else {
result = true;
console.log("已经开启推送功能!")
}
plus.ios.deleteObject(settings);
} else {
enabledTypes = app.enabledRemoteNotificationTypes();
if (enabledTypes == 0) {
console.log("推送权限没有开启!");
} else {
result = true;
console.log("已经开启推送功能!")
}
console.log("enabledTypes2:" + enabledTypes);
}
plus.ios.deleteObject(app);
plus.ios.deleteObject(UIApplication);
return result;
}
// 判断定位权限是否开启
function judgeIosPermissionLocation() {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
var status = cllocationManger.authorizationStatus();
result = (status != 2)
console.log("定位权限开启:" + result);
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
/* var enable = cllocationManger.locationServicesEnabled();
var status = cllocationManger.authorizationStatus();
console.log("enable:" + enable);
console.log("status:" + status);
if (enable && status != 2) {
result = true;
console.log("手机定位服务已开启且已授予定位权限");
} else {
console.log("手机系统的定位没有打开或未给予定位权限");
} */
plus.ios.deleteObject(cllocationManger);
return result;
}
// 判断麦克风权限是否开启
function judgeIosPermissionRecord() {
var result = false;
var avaudiosession = plus.ios.import("AVAudioSession");
var avaudio = avaudiosession.sharedInstance();
var permissionStatus = avaudio.recordPermission();
console.log("permissionStatus:" + permissionStatus);
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
console.log("麦克风权限没有开启");
} else {
result = true;
console.log("麦克风权限已经开启");
}
plus.ios.deleteObject(avaudiosession);
return result;
}
// 判断相机权限是否开启
function judgeIosPermissionCamera() {
var result = false;
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
console.log("authStatus:" + authStatus);
if (authStatus == 3) {
result = true;
console.log("相机权限已经开启");
} else {
console.log("相机权限没有开启");
}
plus.ios.deleteObject(AVCaptureDevice);
return result;
}
// 判断相册权限是否开启
function judgeIosPermissionPhotoLibrary() {
var result = false;
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
var authStatus = PHPhotoLibrary.authorizationStatus();
console.log("authStatus:" + authStatus);
if (authStatus == 3) {
result = true;
console.log("相册权限已经开启");
} else {
console.log("相册权限没有开启");
}
plus.ios.deleteObject(PHPhotoLibrary);
return result;
}
// 判断通讯录权限是否开启
function judgeIosPermissionContact() {
var result = false;
var CNContactStore = plus.ios.import("CNContactStore");
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
if (cnAuthStatus == 3) {
result = true;
console.log("通讯录权限已经开启");
} else {
console.log("通讯录权限没有开启");
}
plus.ios.deleteObject(CNContactStore);
return result;
}
// 判断日历权限是否开启
function judgeIosPermissionCalendar() {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
if (ekAuthStatus == 3) {
result = true;
console.log("日历权限已经开启");
} else {
console.log("日历权限没有开启");
}
plus.ios.deleteObject(EKEventStore);
return result;
}
// 判断备忘录权限是否开启
function judgeIosPermissionMemo() {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
if (ekAuthStatus == 3) {
result = true;
console.log("备忘录权限已经开启");
} else {
console.log("备忘录权限没有开启");
}
plus.ios.deleteObject(EKEventStore);
return result;
}
// Android权限查询
function requestAndroidPermission(permissionID) {
return new Promise((resolve, reject) => {
plus.android.requestPermissions(
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function(resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
resolve(result);
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
// if (result != 1) {
// gotoAppPermissionSetting()
// }
},
function(error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
resolve({
code: error.code,
message: error.message
});
}
);
});
}
// 使用一个方法,根据参数判断权限
function judgeIosPermission(permissionID) {
if (permissionID == "location") {
return judgeIosPermissionLocation()
} else if (permissionID == "camera") {
return judgeIosPermissionCamera()
} else if (permissionID == "photoLibrary") {
return judgeIosPermissionPhotoLibrary()
} else if (permissionID == "record") {
return judgeIosPermissionRecord()
} else if (permissionID == "push") {
return judgeIosPermissionPush()
} else if (permissionID == "contact") {
return judgeIosPermissionContact()
} else if (permissionID == "calendar") {
return judgeIosPermissionCalendar()
} else if (permissionID == "memo") {
return judgeIosPermissionMemo()
}
return false;
}
// 跳转到**应用**的权限页面
function gotoAppPermissionSetting() {
if (isIos) {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
var setting2 = NSURL2.URLWithString("app-settings:");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
} else {
// console.log(plus.device.vendor);
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var Uri = plus.android.importClass("android.net.Uri");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
intent.setData(uri);
mainActivity.startActivity(intent);
}
}
// 检查系统的设备服务是否开启
// var checkSystemEnableLocation = async function () {
function checkSystemEnableLocation() {
if (isIos) {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
var result = cllocationManger.locationServicesEnabled();
console.log("系统定位开启:" + result);
plus.ios.deleteObject(cllocationManger);
return result;
} else {
var context = plus.android.importClass("android.content.Context");
var locationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
console.log("系统定位开启:" + result);
return result
}
}
module.exports = {
judgeIosPermission: judgeIosPermission,
requestAndroidPermission: requestAndroidPermission,
checkSystemEnableLocation: checkSystemEnableLocation,
gotoAppPermissionSetting: gotoAppPermissionSetting
}

View File

@@ -1,5 +1,6 @@
import App from './App'
import Vue from 'vue'
import uView from "uview-ui";
@@ -23,4 +24,4 @@ import { INIT } from './im/INIT'
...App
})
app.$mount()
// })()
// })()

View File

@@ -1,9 +1,9 @@
{
"name" : "抖火",
"name" : "抖火法律",
"appid" : "__UNI__C305C03",
"description" : "纵有疾风起,人生不言弃",
"versionName" : "1.4.2",
"versionCode" : 104,
"versionName" : "1.5.5",
"versionCode" : 1054,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@@ -37,10 +37,8 @@
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<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.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
],
"schemes" : "doufire",
@@ -48,15 +46,31 @@
},
/* ios */
"ios" : {
"dSYMs" : false
"dSYMs" : false,
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "从您的相册中选择图片作为用户头像与身份认证照片",
"NSPhotoLibraryAddUsageDescription" : "保存您的分享海报与二维码图片",
"NSCameraUsageDescription" : "身份认证图片,用户身份活体认证与用户头头像",
"NSContactsUsageDescription" : "快捷拨打业务联系电话",
"NSLocalNetworkUsageDescription" : "获取网络数据",
"NSUserTrackingUsageDescription" : "开启权限不会获取您在其他站点的隐私信息,该权限仅用于标识设备并保障服务安全"
}
},
/* SDK */
"sdkConfigs" : {
"ad" : {},
"ad" : {
"gdt" : {},
"csj" : {},
"ks" : {},
"ks-content" : {},
"sigmob" : {},
"hw" : {},
"bd" : {}
},
"share" : {
"weixin" : {
"appid" : "wx1bcdeda0dec3f1bd",
"UniversalLinks" : ""
"UniversalLinks" : "https://app.com.douhuofalv/ulink/"
}
},
"payment" : {}
@@ -95,17 +109,17 @@
}
},
"nativePlugins" : {
"Pdf-Plugin" : {
"Html5App-openFile" : {
"__plugin_info__" : {
"name" : "Pdf-Plugin",
"description" : "此插件为uni小程序Android原生插件,用于加载网络pdf,支持水印和缩放",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11384",
"name" : "Android 和 IOS 办公Office文档 doc docx ppt pdf 浏览支持离线浏览",
"description" : "支持格式doc,docx,ppt,pptx,xls,xlsx,txt,pdf,epub,支持64位手机",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=477",
"android_package_name" : "io.douhuofalv.com",
"ios_bundle_id" : "io.douhuofalv.com",
"isCloud" : true,
"bought" : 1,
"pid" : "11384",
"pid" : "477",
"parameters" : {}
}
}
@@ -133,5 +147,6 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
"vueVersion" : "2",
"fallbackLocale" : "zh-Hans"
}

View File

@@ -197,7 +197,7 @@
"auth": true,
"name": "UserTeam",
"style": {
"navigationBarTitleText": "我的客户",
"navigationBarTitleText": "我的团队",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
@@ -547,6 +547,7 @@
}, {
"path": "pages/im/msg",
"name": "ImMsg",
"auth": true,
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": false,
@@ -555,19 +556,452 @@
}, {
"path": "pages/user/signLog",
"name": "SignLog",
"auth": true,
"style": {
"navigationBarTitleText": "合同记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/user/contract",
"path": "pages/user/contract",
"name": "SignContract",
"auth": true,
"style": {
"navigationBarTitleText": "合同",
"enablePullDownRefresh": false,
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/individual",
"name": "Individual",
"auth": true,
"style": {
"navigationBarTitleText": "个人全年法律",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/entrust",
"name": "Entrust",
"auth": true,
"style": {
"navigationBarTitleText": "案件委托咨询",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/enterprise",
"name": "Enterprise",
"auth": true,
"style": {
"navigationBarTitleText": "企业全年法律",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/service",
"name": "Service",
"auth": true,
"style": {
"navigationBarTitleText": "拓展服务",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/order",
"name": "SynthesizeOrder",
"auth": true,
"style": {
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/consultWork",
"name": "ConsultWork",
"auth": true,
"style": {
"navigationBarTitleText": "协商调解咨询单",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/serviceWork",
"name": "ServiceWork",
"auth": true,
"style": {
"navigationBarTitleText": "法律咨询单",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/actionWork",
"name": "ActionWork",
"auth": true,
"style": {
"navigationBarTitleText": "诉讼委托咨询单",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/enableWork",
"name": "EnableWork",
"auth": true,
"style": {
"navigationBarTitleText": "增收赋能单",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/synthesize/servicesInfo",
"name": "OrderServicesInfo",
"auth": true,
"style": {
"navigationBarTitleText": "年费订单详情",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"app-plus": {
"titleNView": {
"type": "transparent"
}
}
}
}, {
"path": "pages/synthesize/synthesisInfo",
"name": "OrderSynthesisInfo",
"auth": true,
"style": {
"navigationBarTitleText": "咨询订单详情",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"type": "transparent"
}
}
}
}, {
"path": "pages/synthesize/expandInfo",
"name": "OrderExpandInfo",
"auth": true,
"style": {
"navigationBarTitleText": "委托订单详情",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"type": "transparent"
}
}
}
}, {
"path": "pages/synthesize/entrustInfo",
"name": "OrderEntrustInfo",
"auth": true,
"style": {
"navigationBarTitleText": "委托订单详情",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {
"type": "transparent"
}
}
}
}, {
"path": "pages/synthesize/PersonWrite",
"name": "PersonWrite",
"auth": true,
"style": {
"navigationBarTitleText": "个人法律咨询365服务包",
"enablePullDownRefresh": false
}
}, {
"path": "pages/pay/bankPay",
"name": "BankPay",
"auth": true,
"style": {
"navigationBarTitleText": "银行打款支付",
"enablePullDownRefresh": false
}
}, {
"path": "pages/synthesize/entrustCivil",
"name": "EntrustCivil",
"auth": true,
"style": {
"navigationBarTitleText": "案件委托-民事诉讼-咨询",
"enablePullDownRefresh": false,
"backgroundColor": "#FFF"
}
}, {
"path": "pages/synthesize/entrustWrite",
"name": "EntrustWrite",
"auth": true,
"style": {
"navigationBarTitleText": "案件委托-咨询",
"enablePullDownRefresh": false,
"backgroundColor": "#FFF"
}
}, {
"path": "pages/synthesize/standWrite",
"name": "StandWrite",
"auth": true,
"style": {
"navigationBarTitleText": "企业全年法律-购买",
"enablePullDownRefresh": false,
"backgroundColor": "#FFF"
}
}, {
"path": "pages/synthesize/expandWrite",
"name": "ExpandWrite",
"auth": true,
"style": {
"navigationBarTitleText": "拓展服务-咨询",
"enablePullDownRefresh": false,
"backgroundColor": "#FFF"
}
}, {
"path": "pages/synthesize/difference",
"name": "Difference",
"auth": true,
"style": {
"navigationBarTitleText": "订单补差价",
"enablePullDownRefresh": false
}
}, {
"path": "pages/synthesize/feeWrite",
"name": "FeeWrite",
"auth": true,
"style": {
"navigationBarTitleText": "个人法律咨询",
"enablePullDownRefresh": false,
"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"
}
},
{
"path" : "pages/business/list",
"name" : "businessList",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/info",
"name" : "businessInfo",
"style" : {
"navigationBarTitleText" : "详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/bigFive",
"name" : "businessBigFive",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/handle",
"name" : "businessHandle",
"style" : {
"navigationBarTitleText" : "业务办理",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/other",
"name" : "businessOther",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/order",
"name" : "businessOrder",
"style" : {
"navigationBarTitleText" : "订单列表",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/orderInfo",
"name" : "businessOrderInfo",
"style" : {
"navigationBarTitleText" : "订单详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}],
"globalStyle": {
"navigationBarTextStyle": "black",
@@ -584,12 +1018,7 @@
"iconPath": "static/icons/tabs_icon_00.png",
"selectedIconPath": "static/icons/tabs_show_00.png",
"pagePath": "pages/index/index",
"text": "服务包"
}, {
"iconPath": "static/icons/tabs_icon_01.png",
"selectedIconPath": "static/icons/tabs_show_01.png",
"pagePath": "pages/college/test",
"text": "业务考试"
"text": "首页"
}, {
"iconPath": "static/icons/tabs_icon_02.png",
"selectedIconPath": "static/icons/tabs_show_02.png",
@@ -606,4 +1035,4 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"uniIdRouter": {}
}
}

View File

@@ -64,20 +64,6 @@
</view>
<u-loadmore v-if="pagesShow" :status="status" />
</view>
<!-- 筛选时间 -->
<!-- <button @click="">打开弹窗</button> -->
<!-- <u-calendar
v-if="maxDate != ''"
:show="dayShow"
mode="range"
color="#446EFE"
:minDate="minDate"
:maxDate="maxDate"
monthNum="36"
title="选择筛选区间"
@close="dayShow = false"
@confirm="onDay"
></u-calendar> -->
</view>
</template>
@@ -162,9 +148,6 @@
this.page = lists.page
this.pagesShow = false
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'

View File

@@ -48,7 +48,6 @@
<view class="withdraws-hint">后台提现管理时间 上午11:00-12:00 下午17:00-18:00</view>
</view>
</template>
<script>
import { withdrawsCreate, withdraws } from '@/apis/interfaces/account.js'
export default {
@@ -179,7 +178,6 @@
}
}
</script>
<style lang="scss">
.content{
padding: 30rpx;
@@ -315,4 +313,4 @@
}
}
}
</style>
</style>

View File

@@ -278,7 +278,6 @@
// 获取提现记录
getTeams() {
getTeamLogs({identity_id:this.id}).then(res => {
console.log(res)
this.list = res
this.pagesShow = false
uni.hideLoading()

View File

@@ -16,7 +16,7 @@
<input type="safe-password" password v-model="password" placeholder="请输入密码">
</view>
<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 class="agreement">
<u-checkbox-group
@@ -49,6 +49,13 @@
},
methods: {
onAuth(){
if(this.agreement.length <= 0){
uni.showToast({
title: '请阅读并同意服务协议与隐私政策',
icon : 'none'
})
return
}
uni.showLoading({
title: '登录中...'
})

View File

@@ -24,7 +24,7 @@
<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>
<button :disabled="username.length < 11 || getSms" @click="getCode()">{{sendCode}}</button>
</view>
</view>
<view class="button">

153
pages/business/bigFive.vue Normal file
View File

@@ -0,0 +1,153 @@
<template>
<view class="create-page">
<block v-if="childrenArr.length > 0">
<view class="create-title">创建新的订单</view>
<view class="create-submit">选择业务类型</view>
<view class="create-from">
<view class="create-type">
<block v-for="(item, index) in childrenArr" :key="index">
<view class="create-type-item" :class="{'active': (item.id == businessId)}" @click="onBusiness(item.id)">
<image class="create-type-icon" :src="item.cover" mode="aspectFill"></image>
<view class="create-type-text">
<view class="title nowrap">{{item.title || '-'}}</view>
<view class="submit nowrap">{{item.subtitle}}</view>
</view>
</view>
</block>
</view>
<view class="create-btn">
<button size="default" @click="onNext()">下一步</button>
</view>
</view>
</block>
<!-- 订单是空的 -->
<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 { bigfiveInit } from '@/apis/interfaces/index.js'
export default {
data() {
return {
childrenArr: [],
businessId : '',
}
},
onLoad() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children))
this.childrenArr = parentData
this.businessId = this.childrenArr[0].id
},
methods: {
// 选择业务类型
onBusiness(id){
this.businessId = id
},
// 创建业务单
onNext(){
const synthesisObj = this.childrenArr.find(val => val.id === this.businessId)
// 办理初始接口
bigfiveInit(synthesisObj.id).then(res=>{
this.onNav('businessHandle', { record: encodeURIComponent(JSON.stringify(res)), bigFiveId: synthesisObj.id })
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
}
}
</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-type{
padding-top: 30rpx;
.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: 74rpx;
height: 74rpx;
margin-right: $margin;
}
.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>

232
pages/business/handle.vue Normal file
View File

@@ -0,0 +1,232 @@
<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="pickerChange">
<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>
<view class="from-block">
<view class="from-block-item" v-if="pickertype == 'select'">
<label>资费类型</label>
<picker class="from-block-val" :range="selectP" :value="selectPIndex" range-key="name" @change="pickerSelectChange">
<view class="from-block-picker nowrap">{{selectP[selectPIndex].name}}
<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>
<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" maxlength="11" />
</view>
<view class="from-block-item" v-if="needAmount > 0">
<label>{{priceTitle}}</label>
<input class="from-block-val from-block-input" type="number" v-model="amount" placeholder="请输入标的额"/>
</view>
<view class="from-block-item from-block-get" v-if="pickertype != 'free'">
<label>服务费</label>
<input class="from-block-val from-block-input" type="number" v-model="price" disabled />
<view class="from-block-get-btn" @click="settleInfo">计算费用</view>
</view>
<view class="from-block-item" v-else>
<label>服务费</label>
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户服务费(元)" v-model="priceValue" />
</view>
<view class="from-block-item" v-if="needDiff != 0">
<label>已缴服务费</label>
<input class="from-block-val from-block-input" type="number" placeholder="请输入已缴纳金额" v-model="diffPrice" />
</view>
</view>
<button class="from-btn" @click="onSubmit">提交办理</button>
</view>
</template>
<script>
import { customTypes,customTypeStore } from '@/apis/interfaces/custom.js'
import { settleAmount, amountType, bigfiveStore } from '@/apis/interfaces/index.js'
export default {
data() {
return {
id : '',
pickerArr : [],
pickerIndex : 0,
pickertype : '',
name : '',
phone : '',
price : 0,
diffPrice : '',
priceValue : '',
amount : '',
needAmount : 0,
needDiff : 0,
selectP : [],
selectPIndex: 0,
priceTitle : '标的额'
};
},
onShow() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.record))
console.log(parentData)
this.id = parentData.id
this.needDiff = parentData.need_diff
this.needAmount = parentData.need_amount
this.pickerArr = parentData.child.data
this.pickertype = parentData.type
this.selectP = parentData.select_p || []
this.priceTitle = parentData.price_title
if(parentData.child.has){
this.amountTypeInfo()
}
},
methods: {
// 标的额比例计算
settleInfo() {
let { pickerArr, pickerIndex } = this
let id = pickerArr.length > 0 ? pickerArr[pickerIndex].id : this.id
settleAmount({
amount : this.pickertype == 'select' ? this.selectP[this.selectPIndex].key : this.amount,
username: this.phone
}, id).then(res => {
this.price = res.price
}).catch(err => {
this.price = 0
uni.showToast({
title: err.message,
icon : 'none',
mask:true,
duration:3000
})
})
},
// 选择办理业务
pickerChange(e) {
this.pickerIndex = e.detail.value
// 获取三级分类服务费类型
this.amountTypeInfo();
// 清空表单数据
this.onClerFrom()
},
// 选择资费信息
pickerSelectChange(e){
let { value } = e.detail
this.selectPIndex = value
// 清空表单数据
this.onClerFrom()
},
// 清空数据信息
onClerFrom(){
this.amount = ""
this.price = 0
this.priceValue = ""
this.name = ""
this.phone = ""
this.diffPrice = ""
},
// 三级分类服务费类型
amountTypeInfo() {
let { pickerArr, pickerIndex } = this
let id = pickerArr[pickerIndex].id
amountType(id).then(res => {
let { type, need_amount, select_p, need_diff, price_title } = res;
this.needDiff = need_diff
this.pickertype = type
this.needAmount = need_amount
this.selectP = select_p || []
this.priceTitle = price_title
// if(type == 'select'){
// this.settleInfo()
// }
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none',
mask:true,
duration:3000
})
})
},
// 提交表单
onSubmit(){
let { name, phone, pickerIndex, price, priceValue, amount, pickerArr, pickertype, selectP, selectPIndex, diffPrice } = this
uni.showLoading({
title: "提交中...",
mask : true
})
let params = {
big_id : pickerArr.length > 0 ? pickerArr[pickerIndex].id : this.$Route.query.bigFiveId,
name : name,
amount : amount || 0,
mobile : phone,
price : pickertype == 'free' ? priceValue : price,
select_key : selectP.length > 0 ? selectP[selectPIndex].key : '',
diff_price : diffPrice
}
bigfiveStore(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-get{ padding-right: 200rpx; position: relative; }
.from-block-get-btn{ font-size: 32rpx; line-height: 100rpx; border-left:solid 1rpx #f3f3f3; color: $main-color; width: 170rpx; text-align: center; position: absolute; right: 0; top: 0; }
.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>

80
pages/business/info.vue Normal file
View File

@@ -0,0 +1,80 @@
<template>
<view class="content">
<image class="infoBack" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/10a4a33eb939fe721f934ec82fabb340.png" mode="widthFix"></image>
<view class="infoCont">
<view class="infoWrite">
<image class="infoCont-mark" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/ca5ec8654ee1f2de5bfc1858a1415aef.png" mode="heightFix"></image>
<image class="infoCont-hot" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/053632a2a4c63fd50a0f2cde9835a152.png" mode="widthFix"></image>
<image class="infoCont-seal" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/2df98978be66b60985c88eea95f091e5.png" mode="widthFix"></image>
<view class="infoCont-title">{{bigFiveInfo.title}}</view>
<view class="infoCont-text" v-if="bigFiveInfo.subtitle != ''">
<view class="infoCont-text-star"></view>
<view class="infoCont-text-subtitle">{{bigFiveInfo.subtitle}}</view>
</view>
<view class="infoCont-text">
<!-- <view class="infoCont-text-star"></view> -->
<!-- <view class="infoCont-text-tips">{{bigFiveInfo.remark}}</view> -->
<block v-for="(item,index) in bigFiveInfo.pictures" :key="index">
<image style="max-width: 100%; vertical-align: top;" :src="item" @click="onOpenImg(index)" mode="widthFix"></image>
</block>
</view>
</view>
</view>
<image class="infoBottom" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/b99c7e15d011e53e8eed7dc16a84d6cf.png" mode="widthFix"></image>
</view>
</template>
<script>
import { bigfiveInfo } from '@/apis/interfaces/index.js'
export default {
data() {
return {
bigFiveInfo: ''
}
},
onShow() {
this.bigfiveIndex()
},
methods: {
// 最新五大板块
bigfiveIndex(){
bigfiveInfo(this.$Route.query.bigFive).then(res=>{
console.log(res)
this.bigFiveInfo = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 查看图片
onOpenImg(index){
wx.previewImage({
urls : this.bigFiveInfo.pictures,
current : this.bigFiveInfo.pictures[index]
})
}
}
}
</script>
<style lang="scss" scoped>
.content{background: #070b30; overflow-y: scroll;}
.infoBack {width: 100%;}
.infoCont {padding: 0 $padding; box-sizing: border-box; margin-top: -100rpx; position: relative; z-index: 99;}
.infoWrite {background-color: #ffffff; padding: $padding + 10 $padding 90rpx; box-sizing: border-box; position: relative;}
.infoCont-mark {position: absolute; top: 10%; left: 20%;}
.infoCont-hot {width: 130rpx;position: absolute; top: 0; right: 0;}
.infoCont-seal {width: 160rpx;position: absolute; bottom: -80rpx; right: $padding;}
.infoCont-title {color: #003a95; font-size: $title-size + 12; font-weight: bold; margin-bottom: $margin;}
.infoCont-text {color: #111111; line-height: 52rpx; font-size: $title-size; display: flex;}
.infoCont-text-subtitle {font-weight: 600; margin-bottom: 20rpx;}
.infoCont-text-star {padding-right: 10rpx;}
.infoBottom {width: 100%; position: relative; bottom: 0; left: 0;}
</style>

51
pages/business/list.vue Normal file
View File

@@ -0,0 +1,51 @@
<template>
<view class="content">
<view class="list">
<view class="item" v-for="(item, index) in childrenArr" :key="index">
<view class="item-number"><text>0{{index + 1}}</text></view>
<view class="nowrap item-name">{{item.title}}</view>
<view class="nowrap item-text">{{item.subtitle}}</view>
<view class="item-more">
<view class="item-more-name" @click="onNav(item.id)">点击查看详情</view>
<view class="footer-tool-label-icon"><u-icon name="arrow-right" size="16" /></view>
</view>
</view>
</view>
</view>
</template>
<script>
import { bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
childrenArr: []
}
},
onLoad() {
},
onShow() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children))
this.childrenArr = parentData
},
methods: {
// 跳转
onNav(id){
this.$Router.push({name: 'businessInfo', params:{bigFive:id}})
},
}
}
</script>
<style lang="scss" scoped>
.list {padding: $padding; box-sizing: border-box;}
.item {background-color: #ffffff; border-radius: $radius; position: relative;padding: $padding; box-sizing: border-box; overflow: hidden; margin-bottom: $margin;}
.item-name {font-weight: bold; font-size: $title-size + 8; color: #c92453;}
.item-text {font-size: $title-size; color: #111111; line-height: 54rpx; padding: $padding 0;}
.item-more {color: #666666; border-top: 2rpx solid #eeeeee;display: flex; line-height: 44rpx; font-size: $title-size; padding-top: $padding;}
.item-more-name {flex: 1;}
.footer-tool-label-icon {line-height: 44rpx; padding-top: 4rpx; font-weight: 600;}
.item-number {background-color: #fea6cd; position: absolute; right: 0; top: 0; color: #c92553; font-weight: bold; font-size: $title-size + 2; border-radius: 0 $radius 0 $radius + 20; overflow: hidden; padding: 0 $padding - 20rpx 0 $padding - 10;}
.item-number::after {position: absolute; content: ''; bottom: -48%; left: -78%; background-color: #ffc8e7; width: 200%; height: 100%; z-index: 9; border-radius: 100%;transform: rotate(45deg);}
.item-number text {transform: rotate(45deg); display: inline-block; margin: 5rpx 0 10rpx;}
</style>

339
pages/business/order.vue Normal file
View File

@@ -0,0 +1,339 @@
<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.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" v-if="item.amount != ''">
<label>标的额</label>
<view class="nowrap">{{item.amount}}</view>
</view>
<view class="orders-content-item" v-if="item.price != ''">
<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="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 { orderLists, orderCancel } 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
orderLists({
big_id : this.$Route.query.bigId,
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
})
orderCancel(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 : 'businessOrderInfo',
params : {
orderId : 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;
width: 200rpx;
}
.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>

View File

@@ -0,0 +1,124 @@
<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.orderId
}).then(res => {
console.log(res)
uni.hideLoading()
this.objArr = res;
}).catch(err => {
console.log(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>

127
pages/business/other.vue Normal file
View File

@@ -0,0 +1,127 @@
<template>
<view class="content">
<view class="flex">
<view class="flex-item" @click="onNav('ConsultWork')">
<image class="flex-icon" src="/static/icons/icon_00.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('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')">
<image class="flex-icon" src="/static/icons/icon_01.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('ActionWork')">
<image class="flex-icon" src="/static/icons/icon_02.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('EnableWork')">
<image class="flex-icon" src="/static/icons/icon_03.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('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>
</template>
<script>
export default {
data() {
return {};
},
onShow() {},
methods: {
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
}
}
</script>
<style lang="scss" scoped>
.content{
padding: 30rpx 0;
}
.flex{
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
&-item{
background: white;
padding: 30rpx;
border-radius: 30rpx;
margin-bottom: 30rpx;
display: flex;
box-sizing: border-box;
position: relative;
.flex-icon{ width: 48px; height: 48px; border-radius: 30rpx; }
.flex-title{
box-sizing: border-box;
padding-left: 30rpx;
.flex-name {
color: #293f66;
font-size: 34rpx;
font-weight: bold;
padding: 4rpx 0;
}
.flex-tips {
color: #929db3;
font-size: 28rpx;
}
}
.flex-btn {
position: absolute;
right: 30rpx;
top: 48rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 80rpx;
color: #468bff;
background-color: #f8fbff;
border: 2rpx solid #d8e6ff;
font-size: 28rpx;
padding: 0 25rpx;
}
}
}
</style>

227
pages/empower/buy.vue Normal file
View 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
View 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
View 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>

View File

@@ -0,0 +1,669 @@
<template>
<view class="content">
<view class="header">
<view class="banner">
<u-swiper
class="banner-swiper"
:list="bannerArr"
:indicator="true"
keyName="cover"
previousMargin="20"
nextMargin="20"
circular
radius="10"
bgColor="#ffffff"
height="100%"
@click='swiperClick'
/>
</view>
<view class="notice">
<view class="notice-title">
<image class="notice-icon" src="@/static/index/index_notice.png" mode="widthFix" /> 公告
</view>
<u-notice-bar
icon=""
:text="notice"
url=''
linkType='navigateTo'
fontSize="14"
direction="column"
bgColor="#fff"
color="#111111"
/>
<view class="notice-more">更多<u-icon class="more-icon" size="20rpx" color="#999" name="arrow-right" /></view>
</view>
</view>
<!-- 自由服务包 -->
<view class="free" @click="onView('FreeService')">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
</view>
<!-- 协商调解类 -->
<view class="block" v-if="false">
<view class="block-title">
<view class="title">协商调解咨询类</view>
</view>
<scroll-view class="the-tabs" scroll-x="true" >
<block v-for="(item, index) in theTabs" :key="index">
<view class="the-tabs-item" :class="{'active': item.category_id == theTabId}" @click="onTheTab(item)">{{item.title}}</view>
</block>
<view class="the-tabs-acitve-block" :style="theTabStyle"></view>
</scroll-view>
<scroll-view
class="the-flex"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item"
v-for="item in jfList"
:key="item.service_id"
:id='"_tabs"+item.service_id'
@click="sevicesClick(item.service_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 class="ding" v-if="item.type">定金</text></view>
</view>
</scroll-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-title">
<view class="title">法律咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<block v-for="(item, index) in appMenus.service" :key="index">
<view class="the-flex-item"
@click="onView(item.page)"
>
<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-title">
<view class="title">诉讼委托咨询类</view>
</view>
<view class="lawsuit">
<block v-for="(item, index) in appMenus.cases" :key="index">
<view class="lawsuit-item" @click="onView(item.page)">
<view class="lawsuit-cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="lawsuit-text">
<view class="lawsuit-title nowrap">{{item.title}}</view>
<view class="lawsuit-price">{{item.price}}<text v-if="item.limit != null">{{item.limit}}</text></view>
</view>
</view>
</block>
</view>
</view>
<!-- 增收赋能类 -->
<view class="block">
<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"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item" v-for="(item, index) in empowerArr" :key="index" @click="onEmpower(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}}</view>
</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<u-popup :show="showAdImg" mode="center" bgColor="transparent">
<view class="ad-lay">
<view class="ad-down">
<u-count-down
ref="adCountDown"
:time="showAdTime"
:autoStart="false"
@change="timeData = $event"
@finish="showAdImg = false">
<view>
自动关闭<text>{{ timeData.seconds }}</text>S
</view>
</u-count-down>
</view>
<image class="ad-img" :src="layAdImg" mode="heightFix"></image>
<view class="ad-btn">
<u-icon
class="ad-btn-icon"
name="close-circle"
color="white"
size="36px"
@click="onRemoveAd"
></u-icon>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { region } from '@/apis/interfaces/address.js'
import { categories, jf, index, accountManagement, delegation } from '@/apis/interfaces/index.js'
import { lists } from '@/apis/interfaces/empower.js'
export default {
data() {
return {
theTabs : [
{ category_id: '', title: '全部' }
],
theTabId : '',
theTabStyle : {
left: '0%'
},
bannerArr : [],
notice : [],
jfList:[],
defaultViewId:'',
zfList:[],
// 首次进入弹窗
timeData : {},
first : 1,
showAdTime : 0,
showAdImg : true,
layAdImg : '',
appMenus : {
cases : [],
service : []
},
// 增收赋能列表
empowerArr : [],
// 账户管理类
accountData : [],
// 委托管理类
delegation : []
}
},
onLoad() {
this.getCategory()
this.getJf()
this.getIndex()
// 增收赋能
this.getEmpower()
// 管理类业务
this.getManagement()
},
methods: {
// 获取管理类业务
getManagement(){
Promise.all([accountManagement(), delegation()]).then(res => {
let accountData = res[0]
let delegationData = res[1]
this.accountData = accountData
this.delegation = delegationData
})
},
// 查看管理类业务
onMagInfo(type, id){
this.$Router.push({
name : 'Mag' + type,
params : { id }
})
},
// 查看增收赋能详情
onEmpower(id){
this.$Router.push({
name : 'EmpowerInfo',
params : { id }
})
},
// 增收赋能接口
getEmpower(){
lists().then(res => {
this.empowerArr = res;
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 获取金法列表
getJf(){
let params = {
category_id:this.theTabId
}
jf(params).then(res=>{
if(res.length>0){
setTimeout(()=>{
this.defaultViewId = '_tabs'+res[0].service_id
},300)
}
this.jfList = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 点击金法产品跳转金法详情
sevicesClick(id){
uni.navigateTo({
url:'/pages/index/introduces?id='+id
})
},
// 首页轮播图及公告
getIndex(){
index().then(res=>{
this.bannerArr = res.bannners
this.appMenus = res.app_menus
let list = []
res.notices.map(item=>{
let params = item.user.name + ' ' + item.user.text
list.push(params)
})
this.notice = list
let { is_lay_ad, lay_ad_img, times } = res.layad
if(is_lay_ad) this.layAdImg = lay_ad_img
if(this.first === 1 && is_lay_ad){
this.showAdImg = true
this.showAdTime = times * 1000
this.$nextTick(() => {
this.$refs.adCountDown.start()
})
}
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 获取金法分类列表
getCategory(){
categories().then(res=>{
this.theTabs = this.theTabs.concat(res)
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 金法产品筛选
onTheTab(e){
if(e.category_id != this.theTabId){
let index = this.theTabs.findIndex(val => val.category_id === e.category_id)
this.theTabStyle = {
left: index * 25 + '%'
}
this.theTabId = e.category_id
this.getJf()
}
},
// 点击轮播图
swiperClick(e){
// console.log(this.bannerArr[e])
},
// 点击轮播图跳转自由服务包
onView(name){
this.$Router.push({ name })
},
// 关闭弹窗广告
onRemoveAd(){
this.first = 0;
this.showAdImg = false;
}
}
}
</script>
<style lang="scss" scoped>
.header{
background-color: white;
padding-top: 20rpx;
}
// ad弹窗广告
.ad-lay{
position: relative;
text-align: center;
.ad-down{
position: absolute;
top: 20rpx;
right: 20rpx;
z-index: 1;
background: rgba(0, 0, 0, .5);
font-size: 20rpx;
padding: 10rpx 20rpx;
line-height: 30rpx;
border-radius: 24rpx;
color: white;
.ad-down-u{
display: inline-block;
line-height: 30rpx;
}
}
.ad-img{
height: 75vh;
border-radius: 20rpx;
}
.ad-btn{
text-align: center;
margin-top: 30rpx;
.ad-btn-icon{
display: inline-block;
}
}
}
// 轮播图
.banner{
position: relative;
width: 100%;
padding-top: 43%;
.banner-swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
}
// 公告
.notice{
background: white;
padding: $padding;
display: flex;
flex-direction: row;
align-items: center;
.notice-title{
background-color: #ececec;
color: #000;
height: 60rpx;
line-height: 60rpx;
width: 130rpx;
text-align: center;
font-size: 26rpx;
font-weight: bold;
border-radius: 20rpx;
.notice-icon{
width: 32rpx;
vertical-align: middle;
margin-bottom: 8rpx;
margin-right: 10rpx;
display: inline-block;
}
}
.notice-more{
font-size: 24rpx;
height: 50rpx;
border-radius: 25rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #999999;
.more-icon{
display: inline-block;
}
}
}
// 自由服务包
.free{
padding: $padding $padding $padding - 10 $padding ;
.free-img{
width: 100%;
}
}
// 增收赋能类
.closed{
background: white;
margin: 0 $margin;
border-radius: 35rpx;
padding-bottom: 10rpx;
.closed-item{
display: flex;
margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: solid 1rpx #f8f8f8;
&:last-child{
margin-bottom: 0;
border-bottom: none;
}
.closed-cover{
width: 168rpx;
height: 168rpx;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.closed-text{
width: calc(100% - 168rpx);
padding-left: 30rpx;
box-sizing: border-box;
.closed-title{
font-size: 32rpx;
font-weight: bold;
line-height: 50rpx;
}
.closed-subtitle{
color: gray;
font-size: 28rpx;
line-height: 40rpx;
}
.closed-price{
color: #d51959;
font-size: 34rpx;
line-height: 40rpx;
margin-top: 30rpx;
font-weight: bold;
}
}
}
}
// 诉讼委托类
.lawsuit{
padding: 0 20rpx $padding;
display: flex;
justify-content: space-between;
&-item{
background: #F6F6F6;
border-radius: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
width: calc(50% - 20rpx);
margin: 0 10rpx;
}
&-cover{
width: 138rpx;
height: 138rpx;
background-size: cover;
background-position: center;
}
&-text{
width: calc(100% - 138rpx);
padding: 0 20rpx;
box-sizing: border-box;
}
&-title{
font-size: 30rpx;
margin-bottom: 20rpx;
}
&-price{
font-size: 32rpx;
color: #d51959;
font-weight: bold;
}
}
// 经法
.the-tabs{
background: #ececec;
margin: 0 $margin;
height: 60rpx;
border-radius: 35rpx;
display: flex;
position: relative;
white-space: nowrap;
width: calc(100% - 60rpx);
&-item{
width: 25%;
line-height: 60rpx;
text-align: center;
font-size: 26rpx;
color: #454545;
transition: all .4s;
display: inline-block;
background-color: transparent;
&.active{
color: white;
position: relative;
z-index: 2;
}
}
&-acitve-block{
display: inline-block;
width: 25%;
height: 60rpx;
background-image: linear-gradient( to right, #d51959, #ec7247);
border-radius: 35rpx;
position: absolute;
left: 0;
top: 0;
transition: all .4s;
}
}
.the-flex{
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
&-item{
width: calc(33% - 20rpx);
margin: 0 10rpx;
display: inline-block;
&:last-child{
margin-right: 20rpx;
}
.cover{
width: 100%;
padding-top: 100%;
background-position: center;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.title{
font-size: 30rpx;
color: #111111;
padding: 10rpx 0;
line-height: 40rpx;
}
.price{
line-height: 40rpx;
font-weight: bold;
color: #d51959;
font-size: 32rpx;
text{
font-size: 80%;
}
.ding{
font-size: 64%;
margin-left: 4rpx;
position: relative;
bottom: 2rpx;
}
}
}
}
// 模块
.block{
background-color: white;
border-radius: $radius;
margin: 0 $margin $margin;
.block-title{
padding: 0 $padding;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
font-weight: bold;
color: #111111;
font-size: 36rpx;
}
.more{
background-color: #ececec;
font-size: 28rpx;
height: 50rpx;
border-radius: 25rpx;
width: 120rpx;
padding-left: 10rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #454545;
.more-icon{
display: inline-block;
}
}
}
}
</style>

View File

@@ -34,55 +34,27 @@
</view>
</view>
<!-- 自由服务包 -->
<view class="free" @click="clickFree">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
</view>
<!-- 金法产品 -->
<view class="block">
<view class="block-title">
<view class="title"> 金法产品</view>
<!-- <view class="more">更多<u-icon class="more-icon" size="28rpx" color="#999" name="arrow-right"/></view> -->
</view>
<scroll-view class="the-tabs" scroll-x="true" >
<block v-for="(item, index) in theTabs" :key="index">
<view class="the-tabs-item" :class="{'active': item.category_id == theTabId}" @click="onTheTab(item)">{{item.title}}</view>
</block>
<view class="the-tabs-acitve-block" :style="theTabStyle"></view>
</scroll-view>
<scroll-view
class="the-flex"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item"
v-for="item in jfList"
:key="item.service_id"
:id='"_tabs"+item.service_id'
@click="sevicesClick(item.service_id)"
>
<image class="cover" :src="item.cover" mode="aspectFill" />
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}}<text class="ding" v-if="item.type">定金</text></view>
</view>
</scroll-view>
</view>
<!-- 综法产品 -->
<view class="block">
<view class="block-title">
<view class="title">综法产品</view>
<view class="more">更多<u-icon class="more-icon" size="28rpx" color="#999" name="arrow-right" /></view>
</view>
<view class="zong-list">
<view class="zong-list-item" v-for="(item, index) in 3" :key="index">
<image class="cover" src="@/static/imgs/index-pack-01.png" mode="aspectFill" />
<view class="colum-flex">
<view class="title nowrap">2022年尊享综法服务包</view>
<view class="price nowrap"><text></text>2200</view>
</view>
</view>
</view>
</view>
<view class="free" v-if="free.has_free" @click="onView('FreeService')">
<image class="free-img" :src="free.cover" mode="widthFix" />
</view>
<view class="block">
<view class="module" :style="{'background-color':item.bg_color,'color':item.text_color}" v-for="(item, index) in bigfiveArr" :key="index">
<view class="moduleCont" @click="onNav('businessList', item.children)">
<view class="moduleCont-text">
<view class="moduleCont-text-name">{{item.title}}</view>
<view class="nowrap moduleCont-text-tips">{{item.subtitle}}</view>
</view>
<image class="moduleCont-img" :src="item.cover" mode="widthFix"></image>
</view>
<view class="moduleInfo" @click="moduleClick(index)">
<view class="moduleInfo-text" :class="{active : item.schemesShow}">{{item.remark}}</view>
<image class="moduleInfo-more" :class="{active : item.schemesShow}" src="@/static/imgs/basic_down.png" mode="widthFix"></image>
</view>
</view>
</view>
<!-- 弹窗 -->
<u-popup :show="showAdImg" mode="center" bgColor="transparent">
<view class="ad-lay">
@@ -98,7 +70,7 @@
</view>
</u-count-down>
</view>
<image class="ad-img" :src="layAdImg" mode="widthFix"></image>
<image class="ad-img" :src="layAdImg" mode="heightFix"></image>
<view class="ad-btn">
<u-icon
class="ad-btn-icon"
@@ -114,82 +86,42 @@
</template>
<script>
import { region } from '@/apis/interfaces/address.js'
import { categories, jf, zf, index } from '@/apis/interfaces/index.js'
import { index, bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
theTabs : [
{ category_id: '', title: '全部' }
],
theTabId : '',
theTabStyle : {
left: '0%'
},
bannerArr : [],
notice : [],
jfList:[],
defaultViewId:'',
zfList:[],
// 首次进入弹窗
timeData : {},
first : 1,
showAdTime : 0,
showAdImg : true,
layAdImg : ''
layAdImg : '',
appMenus : {
cases : [],
service : []
},
free : {
has_free: false,
cover : ""
},
bigfiveArr : [], //五大板块
moduleShow : false //展开默认
}
},
onLoad() {
this.getCategory()
this.getJf()
this.getIndex()
this.getZf()
this.getIndex();
this.bigfiveIndex();
},
methods: {
// 获取金法列表
getJf(){
let params = {
category_id:this.theTabId
}
jf(params).then(res=>{
if(res.length>0){
setTimeout(()=>{
this.defaultViewId = '_tabs'+res[0].service_id
},300)
}
this.jfList = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 点击金法产品跳转金法详情
sevicesClick(id){
uni.navigateTo({
url:'/pages/index/introduces?id='+id
})
},
// 获取综法列表
getZf(){
zf().then(res=>{
// this.jfList = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},// 获取综法列表
// 首页轮播图及公告
getIndex(){
index().then(res=>{
this.bannerArr = res.bannners
this.appMenus = res.app_menus
this.free = res.free
let list = []
res.notices.map(item=>{
let params = item.user.name + ' ' + item.user.text
@@ -213,53 +145,44 @@
duration:2000
})
})
},
// 获取金法分类列表
getCategory(){
categories().then(res=>{
this.theTabs = this.theTabs.concat(res)
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 金法产品筛选
onTheTab(e){
if(e.category_id != this.theTabId){
let index = this.theTabs.findIndex(val => val.category_id === e.category_id)
this.theTabStyle = {
left: index * 25 + '%'
}
this.theTabId = e.category_id
this.getJf()
}
},
// 选择城市节点
onCityPicker(e){
this.getRegion(e.value);
},
// 最新五大板块
bigfiveIndex(){
bigfive({parent_id: 0}).then(res=>{
let esArr = res
esArr.forEach((item, index) => {
item.schemesShow = false
})
this.bigfiveArr = esArr
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 点击查看全部
moduleClick(index) {
this.bigfiveArr[index].schemesShow = !this.bigfiveArr[index].schemesShow
},
// 跳转
onNav(name, children){
this.$Router.push({name, params:{children:encodeURIComponent(JSON.stringify(children))}})
},
// 点击轮播图
swiperClick(e){
// console.log(this.bannerArr[e])
},
// 点击轮播图跳转自由服务包
clickFree(){
uni.navigateTo({
url:'/pages/index/free'
})
onView(name){
this.$Router.push({ name })
},
// 获取城市数据
getRegion(id){
region({
parent_id: id
}).then(res => {
console.log(res)
})
},
// 关闭弹窗广告
onRemoveAd(){
this.first = 0;
@@ -276,8 +199,8 @@
}
// ad弹窗广告
.ad-lay{
width: 70vw;
position: relative;
text-align: center;
.ad-down{
position: absolute;
top: 20rpx;
@@ -295,7 +218,7 @@
}
}
.ad-img{
width: 70vw;
height: 75vh;
border-radius: 20rpx;
}
.ad-btn{
@@ -318,7 +241,7 @@
width: 100%;
}
}
// 轮播
// 公告
.notice{
background: white;
padding: $padding;
@@ -358,153 +281,27 @@
}
// 自由服务包
.free{
padding: $padding $padding $padding - 10 $padding ;
.free-img{
width: 100%;
}
}
// 综法
.zong-list{
padding: 0 $padding 20rpx;
margin-bottom: 30rpx;
&-item{
position: relative;
margin-bottom: 30rpx;
padding-left: 210rpx;
height: 180rpx;
.cover{
position: absolute;
left: 0;
top: 0;
width: 180rpx;
height: 180rpx;
}
.colum-flex{
display: flex;
flex-direction: column;
justify-content: space-around;
height: 180rpx;
.title{
line-height: 40rpx;
font-size: 28rpx;
color: #111111;
}
.price{
line-height: 40rpx;
font-weight: bold;
color: #d51959;
font-size: 38rpx;
text{
font-size: 80%;
}
}
}
}
}
// 经法
.the-tabs{
background: #ececec;
margin: 0 $margin;
height: 60rpx;
border-radius: 35rpx;
display: flex;
position: relative;
white-space: nowrap;
width: calc(100% - 60rpx);
&-item{
position: relative;
z-index: 2;
width: 25%;
line-height: 60rpx;
text-align: center;
font-size: 26rpx;
color: #454545;
transition: all .4s;
display: inline-block;
&.active{
color: white;
}
}
&-acitve-block{
display: inline-block;
width: 25%;
height: 60rpx;
background: linear-gradient( to right, #d51959, #ec7247);
border-radius: 35rpx;
position: absolute;
left: 0;
transition: all .4s;
}
}
.the-flex{
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
&-item{
width: calc(33.33% - 20rpx);
margin: 0 10rpx;
display: inline-block;
.cover{
width: 100%;
height: 200rpx;
border-radius: 10rpx;
}
.title{
font-size: 28rpx;
color: #111111;
padding: 10rpx 0;
line-height: 40rpx;
}
.price{
line-height: 40rpx;
font-weight: bold;
color: #d51959;
font-size: 38rpx;
text{
font-size: 80%;
}
.ding{
font-size: 64%;
margin-left: 4rpx;
position: relative;
bottom: 2rpx;
}
}
}
}
// 模块
.block{
background-color: white;
border-radius: $radius;
margin: 0 $margin $margin;
.block-title{
padding: 0 $padding;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
font-weight: bold;
color: #111111;
font-size: 36rpx;
}
.more{
background-color: #ececec;
font-size: 28rpx;
height: 50rpx;
border-radius: 25rpx;
width: 120rpx;
padding-left: 10rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #454545;
.more-icon{
display: inline-block;
}
}
}
}
padding: $padding $padding 0 $padding;
.free-img{ width: 100%; vertical-align: top; }
}
// 模块
.block {padding: $padding;box-sizing: border-box;width: 100%;}
.module {border-radius: $radius;padding: $padding - 10 $padding $padding $padding + 10;box-sizing: border-box; margin-bottom: $margin;}
.module.moduleRed {background-color: #fff1f2;color: #c92453;}
.module.moduleYellow {background-color: #fff7f2;color: #ff7b29;}
.module.moduleBlue {background-color: #eaf4f3;color: #0dc8b3;}
.module.moduleGreen {background-color: #eff5ee;color: #1fba05;}
.module.modulePurple {background-color: #f2eef5;color: #a13dec;}
.moduleCont {display: flex;}
.moduleCont-text {width: calc(100% - 170rpx);}
.moduleCont-text-name {font-weight: bold; font-size: $title-size + 12; padding: 20rpx 0 10rpx;}
.moduleCont-text-tips {font-size: $title-size + 2;}
.moduleCont-img {width: 170rpx;}
.moduleInfo {color: #666666;font-size: $title-size-m; line-height: 48rpx; display: flex;}
.moduleInfo-text {width: calc(100% - 28rpx); padding-right: 20rpx; box-sizing: border-box; height: 60rpx;overflow: hidden;}
.moduleInfo-text.active {height: auto;}
.moduleInfo-more {width: 24rpx; margin-top: 15rpx; transition: .2s;}
.moduleInfo-more.active {transform: rotate(180deg);}
</style>

View 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>

View 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>

View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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>

View 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>

344
pages/pay/bankPay.vue Normal file
View File

@@ -0,0 +1,344 @@
<template>
<view class="content">
<view class="header">
<view class="header-icon">
<u-icon name="tags-fill" color="white" size="32"></u-icon>
</view>
<view class="header-title">收款方银行信息</view>
<view class="header-content">
<view class="header-flex">
<label>开户银行</label>
<view>{{bankData.name}}</view>
</view>
<view class="header-flex">
<label>银行卡号</label>
<view>{{bankData.no}}</view>
</view>
<view class="header-flex">
<label>支付金额</label>
<view>{{price}}</view>
</view>
</view>
</view>
<view class="remarkText" v-if="type == 'edit'">
<text class="name">驳回原因</text>{{remark}}
</view>
<view class="form">
<view class="cover-header">
<view>
<view class="cover-title">上传打款凭证</view>
<view class="cover-subtitle">长按图片可删除已上传图片</view>
</view>
<view class="cover-num">{{pathArr.length}}/9</view>
</view>
<view class="cover-flex">
<view class="cover-item" v-for="(item, index) in pathArr" :key="index" @longpress="onRemove(index)">
<image class="cover-item-src" :src="item" mode="aspectFill"></image>
</view>
<view class="cover-item border" @click="albumClick" v-if="pathArr.length < 9">
<image class="cover-item-add" src="@/static/icons/img_add.png" mode="aspectFill"></image>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" @click="issueForm">确认提交</button>
</view>
</view>
</view>
</template>
<script>
import { uploads } from '@/apis/interfaces/uploading'
import { bankInfo, offlineOpen, bankSee, bankEdit } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
orderType: '', // 订单类型
bankData : '', // 账户信息
price : '', // 打款金额
name : '', // 打卡账户
pathArr : [], // 凭证图片
type : '', // 是否为编辑
remark : '', // 驳回原因
}
},
created() {
this.type = this.$Route.query.type
this.price = this.$Route.query.price
// 查看打款凭证-查看提交信息
this.yearServe();
// 查看提交信息
if(this.$Route.query.type == 'edit') {
bankSee(this.$Route.query.payId,{
order_type : this.$Route.query.orderType,
order_id : this.$Route.query.orderId
}).then(res => {
// 这里需要重新处理打款信息
this.price = res.price
this.name = res.name
this.pathArr = res.cover
this.remark = res.remark
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
},
methods: {
// 查看打款凭证
yearServe(page){
bankInfo().then(res => {
this.bankData = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 请上传转款电子回单
albumClick() {
var _this = this
uni.chooseImage({
count : 9 - this.pathArr.length,
sizeType : ['original', 'compressed'],
sourceType : ['album','camera'],
success: path=> {
let { tempFilePaths } = path
let paths = tempFilePaths.map((val, index) => {
return {
name: 'file' + index,
uri : val
}
})
uploads(paths).then(res => {
this.pathArr = this.pathArr.concat(res.url)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
});
},
// 表单提交
issueForm(e) {
let data = {
order_type : this.$Route.query.orderType.replace(/\-/g, '\\'),
order_id : this.$Route.query.orderId,
price : this.price,
cover : this.pathArr
}
if(this.$Route.query.type == 'edit') {
bankEdit(this.$Route.query.payId, data).then(res => {
this.onBack()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
offlineOpen(data).then(res => {
this.onBack()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 删除图片数据
onRemove(index){
uni.vibrateShort()
this.pathArr.splice(index, 1)
},
// 返回上一页
onBack(){
uni.showModal({
title : '提示',
content : '打款凭证已提交,请耐心等待审核,通过后请前往工作台综法订单管理中进行签约',
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
uni.navigateBack()
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: $window-color;
width: 100vw;
min-height: 100vh;
padding: 80rpx 30rpx 30rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
}
// 驳回原因
.remarkText{
background: white;
margin-top: 30rpx;
text-align: center;
font-size: 32rpx;
line-height: 50rpx;
width: 100%;
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
color: gray;
.name{
color: $text-price;
font-weight: bold;
}
}
// form
.form{
background: white;
width: 100%;
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
margin-top: 30rpx;
// 上传图片数组
.cover-header{
display: flex;
justify-content: space-between;
padding-bottom: 30rpx;
.cover-title{ line-height: 50rpx; font-size: 32rpx; color: #333; font-weight: bold; }
.cover-subtitle{ line-height: 40rpx; font-size: 28rpx; color: gray; }
.cover-num{ font-weight: bold; color: $main-color; line-height: 50rpx; font-size: 30rpx; }
}
.cover-flex{
margin: -10rpx -20rpx;
display: flex;
flex-wrap: wrap;
.cover-item{
position: relative;
width: calc(33.33% - 40rpx);
margin: 20rpx;
padding-top: calc(33.33% - 40rpx);
background: #f8f8f8;
.cover-item-src{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.cover-item-add{
width: 68rpx;
height: 68rpx;
position: absolute;
top: 50%;
left: 50%;
margin-top: -34rpx;
margin-left: -34rpx;
}
}
}
// 表单
.form-input{
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
@extend .border-solid;
label{
color: gray;
font-size: 32rpx;
width: 200rpx;
}
input{
flex: 1;
height: 90rpx;
text-align: right;
font-size: 32rpx;
}
// 上传
.form-upd-img{
width: 90rpx;
height: 90rpx;
}
}
.idcardBtn{
padding-top: 30rpx;
.idcardBtn-go{
background: $main-color;
color: white;
font-size: 34rpx;
line-height: 100rpx;
height: 100rpx;
padding: 0;
font-weight: bold;
border-radius: 20rpx;
&::after{ display: none; }
}
}
}
// header
.header{
background: white;
width: 100%;
border-radius: 20rpx;
padding: 80rpx 30rpx 30rpx;
box-sizing: border-box;
position: relative;
.header-icon{
position: absolute;
left: 50%;
top: -49rpx;
margin-left: -49rpx;
background: $main-color;
color: white;
height: 98rpx;
width: 98rpx;
line-height: 98rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.header-title{
font-size: 34rpx;
font-weight: bold;
color: #333;
text-align: center;
padding-bottom: 30rpx;
}
.header-content{
background: $window-color;
border-radius: 20rpx;
padding: 30rpx;
text-align: center;
line-height: 60rpx;
font-size: 32rpx;
.header-flex{
display: flex;
justify-content: space-between;
align-items: center;
label{
color: gray;
}
}
}
}
</style>

View File

@@ -4,42 +4,68 @@
<view class="header">
<view class="header-title">实付金额</view>
<view class="header-price"><text></text>{{total}}</view>
<block v-if="totalFire > 0">
<view class="header-fire">最大可抵扣{{totalFire}}</view>
<!-- <view class="header-no">当前火力值比例1:{{rate}}</view> -->
</block>
<view class="header-no">订单号:{{orderNo}}</view>
</view>
<!-- 选择支付方式 -->
<view class="choose">
<radio-group @change="payMethod = $event.detail.value" >
<label class="choose-item" v-if="payType != 'free'">
<radio-group @change="changeRadio" >
<!-- payType != 'free' -->
<label class="choose-item" v-if="payCan.coin">
<view class="choose-text nowrap">
<image src="@/static/icons/pay_alipay.png" mode="aspectFill"></image>
火力值支付
</view>
<radio class="choose-radio" value="coin" :checked="payMethod == 'coin'"></radio>
</label>
<!-- <label class="choose-item nowrap">
<label class="choose-item nowrap" v-if="payCan.wx">
<view class="choose-text">
<image src="@/static/icons/pay_wechat.png" mode="aspectFill"></image>
微信支付(银联)
</view>
<radio class="choose-radio" value="wx" :checked="payMethod == 'wx'"></radio>
</label>
<label class="choose-item nowrap" v-if="payCan.dgwx">
<view class="choose-text">
<image src="@/static/icons/pay_wechat.png" mode="aspectFill"></image>
微信支付(汇付)
</view>
<radio class="choose-radio" value="dgwx" :checked="payMethod == 'dgwx'"></radio>
</label>
<label class="choose-item nowrap" v-if="payCan.ali && Number(total) <= 10000">
<view class="choose-text">
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
支付宝支付(银联)
</view>
<radio class="choose-radio" value="ali" :checked="payMethod == 'ali'"></radio>
</label>
<label class="choose-item nowrap" v-if="payCan.dgali">
<view class="choose-text">
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
支付宝支付(汇付)
</view>
<radio class="choose-radio" value="dgali" :checked="payMethod == 'dgali'"></radio>
</label>
<label class="choose-item nowrap" v-if="payCan.code">
<view class="choose-text">
<image src="@/static/icons/pay_code.png" mode="aspectFill"></image>
付款码支付
</view>
<radio class="choose-radio" value="code"></radio>
</label> -->
<label class="choose-item nowrap">
<view class="choose-text">
<image src="@/static/icons/pay_wechat.png" mode="aspectFill"></image>
微信支付
</view>
<radio class="choose-radio" value="wx" :checked="payMethod == 'wx'"></radio>
<radio class="choose-radio" value="code" :checked="payMethod == 'code'"></radio>
</label>
<label class="choose-item nowrap" v-if="Number(total) <= 5000">
<label class="choose-item nowrap" v-if="payCan.offline">
<view class="choose-text">
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
支付宝支付
<image src="@/static/icons/pay_bank.png" mode="aspectFill"></image>
线下打款
</view>
<radio class="choose-radio" value="ali" :checked="payMethod == 'ali'"></radio>
<radio class="choose-radio" value="offline" :checked="payMethod == 'offline'"></radio>
</label>
</radio-group>
</view>
<view class="deduction" v-if="(payMethod == 'wx' || payMethod == 'ali') && payType != 'free'">
<view class="deduction" v-if="payCan.deduction == 1 && payType != 'free'">
<view class="deduction-item">
<view class="deduction-label">
<view class="title">使用火力值抵扣</view>
@@ -59,17 +85,60 @@
<input class="deduction-input" type="number" placeholder="输入火力值" v-model="deductionVal" @blur="blurDeductionVal">
</view>
</view>
<!-- 扫码付二维码 -->
<u-popup
:show="payCodeShow"
mode="center"
round="10px">
<view class="qrpay">
<view class="title">支付二维码</view>
<view class="src">
<l-painter class="qrcode-src">
<l-painter-qrcode
:text="payQrUrl"
css="width: 280rpx; height: 280rpx;"
/>
</l-painter>
</view>
<view class="time">请使用{{payQrType == 'app' ? '微信': '支付宝'}}扫码</view>
<view class="btns">
<button class="btn cancel" @click="onCancel">取消支付</button>
<button class="btn confirm" @click="onGetOrderPayState">我已支付</button>
</view>
</view>
</u-popup>
<!-- 确认支付 -->
<view class="payBtn">
<view class="payBtn" v-if="payMethod != 'offline'">
<button size="default" @click="onPay">支付</button>
</view>
<!-- 上传打款凭证 -->
<view class="payBtn" v-else>
<button size="default" @click="onOffline">上传打款凭证</button>
</view>
</view>
</template>
<script>
import { info } from '@/apis/interfaces/order.js'
import { coinPay, diffCoinPay, umsPay, umsState, diffUmsPay, umsFree, umsFreeInfo } from '@/apis/interfaces/pay.js'
import mixin from 'uview-ui/libs/mixin/mixin';
import { oderinfo } from '@/apis/interfaces/synthesisOrder.js'
import {
coinPay,
diffCoinPay,
umsPay,
umsState,
diffUmsPay,
umsFree,
umsFreeInfo,
dgPay,
diffDgPay,
dgFree,
umsSynthesize,
dgSynthesize,
coinSynthesize,
cashierOffline
} from '@/apis/interfaces/pay.js'
import mixin from 'uview-ui/libs/mixin/mixin';
import { uploads } from '@/apis/interfaces/uploading.js'
export default {
data() {
return {
@@ -83,11 +152,104 @@ import mixin from 'uview-ui/libs/mixin/mixin';
orderNo : '',
balance : 0,
isDeduction : false,
deductionVal: ''
deductionVal: '',
// 综法支付订单类型
orderType : '',
rate : 1,
totalFire : '',
// 二维码支付
payCodeShow : false,
payQrUrl : '',
payQrType : '',
// 支付选项
payCan : {}
};
},
onShow() {
if(this.getState && this.trade_id != ''){
this.onGetOrderPayState()
}
},
created() {
uni.showLoading({
title: '获取订单信息...',
mask : true
})
// 自由服务包订单信息
if(this.$Route.query.paytype === 'free'){
umsFreeInfo(this.$Route.query.serviceId).then(res => {
let { order_id, price, order_no, can_use_channel } = res;
this.orderId = order_id
this.total = price
this.orderNo = order_no
this.payType = this.$Route.query.paytype
this.payCan = can_use_channel
uni.hideLoading()
this.getDefaultType(can_use_channel)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
// 综法订单支付
if(this.$Route.query.paytype === 'synthesize'){
let order_type = this.$Route.query.orderType.replace(/\-/g, '\\')
oderinfo( this.$Route.query.orderId, order_type).then(res => {
let { order_no, price, score, order_id, rate, total_fire, can_use_channel } = res
this.rate = rate
this.totalFire = total_fire
this.orderType = order_type
this.payType = this.$Route.query.paytype
this.orderId = order_id
this.total = price
this.orderNo = order_no
this.balance = score
this.payCan = can_use_channel
uni.hideLoading()
this.getDefaultType(can_use_channel)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
// 其他支付方式订单信息
info(this.$Route.query.orderId).then(res => {
let { total, order_no, business_order_id, diff_prices, diff, score, can_use_channel } = res
this.orderId = business_order_id
this.diffId = diff.business_order_diff_price_id
this.payType = this.$Route.query.paytype
this.total = this.payType === 'diff' ? diff_prices: total
this.orderNo = order_no
this.balance = score
this.payCan = can_use_channel
uni.hideLoading()
this.getDefaultType(can_use_channel)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
// 检查默认支付选项
getDefaultType(can_use_channel){
// 检查支付默认选项
for(let key of Object.keys(can_use_channel)){
if(can_use_channel[key] > 1){
this.payMethod = key
return
}
}
},
// 查询订单状态
onGetOrderPayState(){
// 查询支付状态
uni.showLoading({
title: '查询支付结果...',
@@ -110,7 +272,7 @@ import mixin from 'uview-ui/libs/mixin/mixin';
clearInterval(outTime)
wx.showModal({
title : '提示',
content : '支付成功',
content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台查询您的订单' : '支付成功',
showCancel : false,
confirmColor: '#446EFE',
success : () => {
@@ -126,49 +288,23 @@ import mixin from 'uview-ui/libs/mixin/mixin';
})
})
}, 2000)
}
},
created() {
uni.showLoading({
title: '获取订单信息...',
mask : true
})
// 自由服务包订单信息
if(this.$Route.query.paytype === 'free'){
this.payMethod = "wx"
umsFreeInfo(this.$Route.query.serviceId).then(res => {
let { order_id, price, order_no } = res;
this.orderId = order_id
this.total = price
this.orderNo = order_no
this.payType = this.$Route.query.paytype
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
return
}
// 其他支付方式订单信息
info(this.$Route.query.orderId).then(res => {
let { total, order_no, business_order_id, diff_prices, diff, score } = res
this.orderId = business_order_id
this.diffId = diff.business_order_diff_price_id
this.payType = this.$Route.query.paytype
this.total = this.payType === 'diff' ? diff_prices: total
this.orderNo = order_no
this.balance = score
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
},
// 取消支付
onCancel(){
this.payCodeShow = false,
this.payQrUrl = '',
this.payQrType = ''
},
// 选择支付方式
changeRadio(e){
let { value } = e.detail
this.payMethod = value
// 初始化金额
if(value == 'coin' || value == 'code'){
this.isDeduction = false
this.deductionVal = 0
}
},
// 抵扣金额
onDeductionSwitch(e){
this.deductionVal = ''
@@ -187,27 +323,351 @@ import mixin from 'uview-ui/libs/mixin/mixin';
case 'coin':
if(this.payType == 'price') this.onCoinPay()
if(this.payType == 'diff') this.onDiffCoinPay()
if(this.payType == 'synthesize') this.onCoinSynthesizePay()
break;
case 'code':
uni.showToast({
title: '付款码支付暂未开放,请敬期待',
icon : 'none'
uni.showActionSheet({
itemList:["微信付款码", "支付宝付款码"],
success : actionRes => {
if(actionRes.tapIndex === 0){
if(this.payType == 'price') this.onDgPay('app', true)
if(this.payType == 'diff') this.onDgDiffPay('app', true)
if(this.payType == 'free') this.onDgFreePay('app', true)
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app', true)
}
if(actionRes.tapIndex === 1){
if(this.payType == 'price') this.onDgPay('app_alipay', true)
if(this.payType == 'diff') this.onDgDiffPay('app_alipay', true)
if(this.payType == 'free') this.onDgFreePay('app_alipay', true)
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app_alipay', false)
}
}
})
break;
case 'wx':
if(this.payType == 'price') this.onUmsPay('app')
if(this.payType == 'diff') this.onDiffUmsPay('app')
if(this.payType == 'free') this.onFreePay('app')
if(this.payType == 'synthesize') this.onFreeToast('onUmsSynthesizePay', 'app')
break;
case 'ali':
if(this.payType == 'price') this.onUmsPay('app_alipay')
if(this.payType == 'diff') this.onDiffUmsPay('app_alipay')
if(this.payType == 'free') this.onFreePay('app_alipay')
if(this.payType == 'synthesize') this.onFreeToast('onUmsSynthesizePay', 'app_alipay')
break;
case 'dgwx':
if(this.payType == 'price') this.onDgPay('app', false)
if(this.payType == 'diff') this.onDgDiffPay('app', false)
if(this.payType == 'free') this.onDgFreePay('app', false)
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app', false)
break;
case 'dgali':
if(this.payType == 'price') this.onDgPay('app_alipay', false)
if(this.payType == 'diff') this.onDgDiffPay('app_alipay', false)
if(this.payType == 'free') this.onDgFreePay('app_alipay', false)
if(this.payType == 'synthesize') this.onFreeToast('onDgSynthesizePay', 'app_alipay', false)
break
case 'offline':
console.log('线下打款')
break
}
},
// 混合支付
// 上传打款凭证
onOffline(){
uni.chooseImage({
count: 4,
success: path => {
let { tempFiles } = path;
let paths = tempFiles.map(val => {
return {
name: 'file' + val.size,
uri : val.path
}
})
uploads(paths, {}).then(updRes => {
let { path } = updRes
cashierOffline({
pics : path,
order_type : this.orderType,
order_id : this.orderId,
}).then(res => {
uni.showModal({
title : '上传成功',
content : '请耐心等待打款审核',
showCancel : false,
success : () => {
uni.navigateBack()
}
})
}).catch(err => {
wx.showToast({
title: err.message,
icon : 'none'
})
})
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},complete: chooseErr => {
if(chooseErr.errMsg == "chooseImage:fail No Permission") {
uni.showModal({
title: '温馨提示',
content: '您关闭了相关权限,是否重新授权?',
success: showres=> {
if (showres.confirm) {
uni.openAppAuthorizeSetting({
success: openAppres=> {
console.log(openAppres)
}
})
} else if (showres.cancel) {}
}
});
}
}
})
},
// 火力值 - 综法
onCoinSynthesizePay(){
coinSynthesize({
order_type : this.orderType,
order_id : this.orderId
}).then(res => {
wx.showModal({
title : '提示',
content : '火力值支付成功',
showCancel : false,
confirmColor: '#446EFE',
success : () => {
this.onRrmoveItem()
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 火力值使用提示
onFreeToast(funName, type, isCode){
if(this.isDeduction){
let discount = this.deductionVal * this.rate
let surplus = Number(this.total) - (this.deductionVal * this.rate)
uni.showModal({
title : '支付提示',
content : '本次支付使用火力值抵扣现金:' + discount.toFixed(2) + '元,您还需支付现金:' + surplus.toFixed(2) + '元',
cancelText : '取消支付',
confirmText : '继续支付',
success : res => {
if(res.confirm){
this[funName](type, isCode)
}
}
})
return
}
this[funName](type, isCode)
},
// 银联三方 - 综法
onUmsSynthesizePay(type){
uni.showLoading({
title: '加载中...',
mask : true
})
umsSynthesize({
type,
order_type : this.orderType,
order_id : this.orderId,
fire : this.deductionVal || 0,
use_fire : this.isDeduction ? 1 : 0,
app_schema : 'doufire://',
}).then(res => {
this.getState = true
this.trade_id = res.trade_id
switch (type){
case 'app':
this.onMiniWx()
break;
case 'app_alipay':
plus.runtime.openURL(res.alipay)
break;
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 斗拱 - 综法
onDgSynthesizePay(type, code){
uni.showLoading({
title: '加载中...',
mask : true
})
dgSynthesize({
type,
order_type : this.orderType,
order_id : this.orderId,
fire : this.deductionVal || 0,
use_fire : this.isDeduction ? 1 : 0,
app_schema : 'doufire://',
}).then(res => {
let { params, trade_id } = res;
// 二维码支付
if(code){
this.onDgPayCode(type, params, trade_id)
return
}
// 转跳付款
this.getState = true
this.trade_id = trade_id
if(type == 'app'){
let jumpUrl = JSON.parse(params.miniapp_data)
plus.runtime.openURL(jumpUrl.scheme_code)
}
if(type == 'app_alipay'){
plus.runtime.openURL(params.jump_url)
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 斗拱支付
onDgPay(type, code){
uni.showLoading({
title: '加载中...',
mask : true
})
dgPay(this.orderId, {
type,
use_fire : this.isDeduction ? 1 : 0,
fire : this.deductionVal || 0,
app_schema : 'doufire://'
}).then(res => {
let { params, trade_id } = res;
uni.hideLoading()
// 二维码支付
if(code){
this.onDgPayCode(type, params, trade_id)
return
}
// 转跳付款
this.getState = true
this.trade_id = trade_id
if(type == 'app'){
let jumpUrl = JSON.parse(params.miniapp_data)
plus.runtime.openURL(jumpUrl.scheme_code)
}
if(type == 'app_alipay'){
plus.runtime.openURL(params.jump_url)
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 斗拱补差价
onDgDiffPay(type, code){
uni.showLoading({
title: '加载中...',
mask : true
})
diffDgPay(this.diffId, {
type,
use_fire : this.isDeduction ? 1 : 0,
fire : this.deductionVal || 0,
app_schema : 'doufire://'
}).then(res => {
let { params, trade_id } = res;
uni.hideLoading()
// 二维码支付
if(code){
this.onDgPayCode(type, params, trade_id)
return
}
// 转跳付款
this.getState = true
this.trade_id = trade_id
if(type == 'app'){
let jumpUrl = JSON.parse(params.miniapp_data)
plus.runtime.openURL(jumpUrl.scheme_code)
}
if(type == 'app_alipay'){
plus.runtime.openURL(params.jump_url)
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 斗拱自由服务包
onDgFreePay(type, code){
uni.showLoading({
title: '加载中...',
mask : true
})
dgFree(this.orderId, {
type,
app_schema : 'doufire://'
}).then(res => {
let { params, trade_id } = res;
uni.hideLoading()
// 二维码支付
if(code){
this.onDgPayCode(type, params, trade_id)
return
}
// 转跳付款
this.getState = true
this.trade_id = trade_id
if(type == 'app'){
let jumpUrl = JSON.parse(params.miniapp_data)
plus.runtime.openURL(jumpUrl.scheme_code)
}
if(type == 'app_alipay'){
plus.runtime.openURL(params.jump_url)
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 抖拱二维码付款
onDgPayCode(type, params, trade_id){
this.trade_id = trade_id
this.payQrUrl = type == 'app_alipay' ? params.jump_url : 'https://dg-pay.douhuofalv.com?miniurlcode=' + encodeURIComponent(JSON.parse(params.miniapp_data).scheme_code)
this.payQrType = type
this.payCodeShow = true
},
// 银联三方支付
onUmsPay(type){
uni.showLoading({
@@ -362,6 +822,36 @@ import mixin from 'uview-ui/libs/mixin/mixin';
</script>
<style lang="scss">
// 二维码收款
.qrpay{
padding: 50rpx;
background: white;
width: 80vw;
box-sizing: border-box;
border-radius: 20rpx;
.title{ text-align: center; font-weight: bold; font-size: 40rpx; color: #333; padding-bottom: 50rpx; }
.src{ background: #f8f8f8; width: 300rpx; height: 300rpx; margin: 0 auto; }
.qrcode-src{ width: 300rpx; height: 300rpx; display: flex; align-items: center; justify-content: center; }
.time{ text-align: center; padding-top: 20rpx; font-size: 28rpx; color: gray; }
.btns{
display: flex;
justify-content: center;
padding-top: 50rpx;
.btn{
margin: 0;
height: 90rpx;
line-height: 90rpx;
font-size: 32rpx;
font-weight: bold;
border-radius: 10rpx;
padding: 0 40rpx;
&::after{ display: none; }
&.confirm{ margin-left: 30rpx; background: $main-color; color: white; }
&.cancel{ color: $main-color; border:solid 1rpx $main-color; background: white; box-sizing: border-box; line-height: 87rpx; }
}
}
}
// 支付收银台
.pay{
background: #f8f8f8;
height: 100vh;
@@ -388,6 +878,11 @@ import mixin from 'uview-ui/libs/mixin/mixin';
font-size: 28rpx;
color: gray;
}
.header-fire{
@extend .header-no;
font-size: 30rpx;
color: $text-price;
}
}
// 支付抵扣
.deduction{

View File

@@ -0,0 +1,448 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">个人法律咨询365服务包</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text>{{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit" >确认提交</button>
</view>
</view>
</template>
<script>
import { yearSynthInfo, yearSynthPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
import mouldInput from '@/components/mould-input.vue'
export default {
components: {
mouldInput
},
data() {
return {
paramsArr : [], // 信息
cityPicker : [], // 地址
// 目前所在地
price : '0.00',
address : {},
disabled : false,
orderId : '', // 订单 ID
orderType : '', // 订单类型
voucherState : false, // 上传凭证弹出
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
// 获取综法咨询-详情
this.getBusiness();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 综法咨询-详情
getBusiness(){
yearSynthInfo(this.$Route.query.serveId).then(res => {
let { params, price } = res;
params.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = ""
}
})
this.price = price
this.paramsArr = params
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = [];
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
yearSynthPost(this.$Route.query.serveId, {
data : dataArr,
type : 'self',
channel : 'app',
user_id : ''
}).then(res => {
let { order_id, order_type, can } = res;
this.expressSheet(order_id, order_type, can )
uni.hideLoading()
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.replace({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.replace({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
height: 100%;
overflow-y: scroll;
position: fixed;
}
.top {
position: relative;
height: 180rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 30%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 44rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 34rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 30rpx;
position: relative;
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
.idcardAdd-aline {
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
.idcardAdd-aline-write {
margin-right: 30rpx;
color: #999999;
}
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 140rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: 90rpx;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
// 打款凭证弹出
.voucherBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
display: none;
&.active {
display: block;
}
}
.voucherPop {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
display: none;
&.active {
display: -webkit-box;
}
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
position: relative;
.voucherPop-img {
position: absolute !important;
top: -80rpx;
right: calc(50% - 100rpx);
width: 200rpx;
}
.voucherPop-title {
box-sizing: border-box;
padding: 50rpx 70rpx;
margin-top: 100rpx;
text-align: center;
.voucherPop-name {
font-weight: 600;
font-size: 38rpx;
}
.voucherPop-text {
padding: 30rpx 0 35rpx;
line-height: 44rpx;
}
.voucherPop-btn {
display: flex;
.voucherPop-go {
flex: 2;
text-align: center;
border: 2rpx solid #da2b56;
color: #da2b56;
margin: 0 15rpx;
line-height: 74rpx;
border-radius: 10rpx;
background-color: #ffffff;
&.voucherPop-up {
background-color: #da2b56;
color: #ffffff;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,405 @@
<template>
<view class="content">
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">诉讼委托咨询单</view>
<view class="number">{{orderAll.all}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
<view class="title">已缴费</view>
<view class="number">{{orderAll.payed}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_03.png"></image>
<view class="title">已退款</view>
<view class="number">{{orderAll.refund}}<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.price}}<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('SynthesizeOrder', { status: 0, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_06.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('SynthesizeOrder', { status: 1, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_21.png"></image>
<view class="number" v-if="orderEntrust.audit > 0">{{orderEntrust.audit}}</view>
<view class="text">待审核</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 2, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_07.png"></image>
<view class="number" v-if="orderEntrust.sign > 0">{{orderEntrust.sign}}</view>
<view class="text">待签约</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 3, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderEntrust.signed > 0">{{orderEntrust.signed}}</view>
<view class="text">已签约</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 4, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderEntrust.complete > 0">{{orderEntrust.complete}}</view>
<view class="text">已完成</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 5, type: 'entrust' })">
<image class="icon" src="@/static/icons/work_icon_09.png"></image>
<view class="number" v-if="orderEntrust.reject > 0">{{orderEntrust.reject}}</view>
<view class="text">已驳回</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">拓展订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 0, type: 'expand' })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderExpand.init > 0">{{orderExpand.init}}</view>
<view class="text">待支付</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 1, type: 'expand' })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderExpand.paid > 0">{{orderExpand.paid}}</view>
<view class="text">已支付</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 2, type: 'expand' })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderExpand.refund > 0">{{orderExpand.refund}}</view>
<view class="text">已退款</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { synthesisAttorney } from '@/apis/interfaces/work.js'
export default {
data() {
return {
// 综法订单管理
orderAll : '',
orderEntrust : '',
orderExpand : ''
};
},
onShow() {
this.getIndex()
},
methods: {
// 工作台信息
getIndex(){
uni.showLoading({
title: '加载中...',
mask : true
})
// 综法法律咨询单统计
synthesisAttorney().then(res => {
uni.hideLoading()
this.orderAll = res.all
this.orderEntrust = res.orders.entrust
this.orderExpand = res.orders.expand
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 导航
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
}
}
}
</script>
<style lang="scss" scoped>
.content{
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>

View File

@@ -0,0 +1,543 @@
<template>
<view class="content">
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">预约咨询单</view>
<view class="number">{{orderCount.init_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
<view class="title">已缴费</view>
<view class="number">{{orderCount.service_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_02.png"></image>
<view class="title">办理完成</view>
<view class="number">{{orderCount.b_complete}}<text></text></view>
</view>
<view class="total-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_03.png"></image>
<view class="title">已退款</view>
<view class="number">{{orderCount.refund}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_04.png"></image>
<view class="title">完成结算</view>
<view class="number">{{orderCount.settlement_count}}<text></text></view>
</view>
<view class="total-item" @click="onNav('AccountBonus')">
<image class="icon" src="@/static/icons/work_icon_05.png"></image>
<view class="title">结算金额</view>
<view class="number">{{orderCount.settlement_price}}<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('Orders', { 'type': 0 })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderCount.a_init > 0">{{orderCount.a_init}}</view>
<view class="text">待预约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_21.png"></image>
<view class="number" v-if="orderCount.a_service > 0">{{orderCount.a_service}}</view>
<view class="text">匹配服务包</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 3 })">
<image class="icon" src="@/static/icons/work_icon_07.png"></image>
<view class="number" v-if="orderCount.a_serviced > 0">{{orderCount.a_serviced}}</view>
<view class="text">待缴服务费</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderCount.b_sign > 0">{{orderCount.b_sign}}</view>
<view class="text">待签约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 5 })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderCount.a_bank > 0">{{orderCount.a_bank}}</view>
<view class="text">待完善资料</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 6 })">
<image class="icon" src="@/static/icons/work_icon_09.png"></image>
<view class="number" v-if="orderCount.b_check > 0">{{orderCount.b_check}}</view>
<view class="text">初审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 7 })">
<image class="icon" src="@/static/icons/work_icon_12.png"></image>
<view class="number" v-if="orderCount.b_recheck > 0">{{orderCount.b_recheck}}</view>
<view class="text">复审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 8 })">
<image class="icon" src="@/static/icons/work_icon_13.png"></image>
<view class="number" v-if="orderCount.b_process > 0">{{orderCount.b_process}}</view>
<view class="text">办理中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 9 })">
<image class="icon" src="@/static/icons/work_icon_14.png"></image>
<view class="number" v-if="orderCount.b_confirm > 0">{{orderCount.b_confirm}}</view>
<view class="text">待结案</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_15.png"></image>
<!-- <view class="number" v-if="orderCount.b_complete > 0">{{orderCount.b_complete}}</view> -->
<view class="text">办理完成</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">转让订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'out' })">
<image class="icon" src="@/static/icons/work_icon_26.png"></image>
<view class="number" v-if="orderCount.transfer_out > 0">{{orderCount.transfer_out}}</view>
<view class="text">转出订单</view>
</view>
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'in' })">
<image class="icon" src="@/static/icons/work_icon_19.png"></image>
<view class="number" v-if="orderCount.transfer_in > 0">{{orderCount.transfer_in}}</view>
<view class="text">转入订单</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">特殊订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('ModifyOrder', {})">
<image class="icon" src="@/static/icons/work_icon_16.png"></image>
<view class="number" v-if="orderCount.audit_bank > 0">{{orderCount.audit_bank}}</view>
<view class="text">修改资料</view>
</view>
<view class="tool-flex-item" @click="onNav('PoorOrder', {})">
<image class="icon" src="@/static/icons/work_icon_17.png"></image>
<view class="number" v-if="orderCount.diff_prices > 0">{{orderCount.diff_prices}}</view>
<view class="text">补差价</view>
</view>
<view class="tool-flex-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_18.png"></image>
<view class="number" v-if="orderCount.refund > 0">{{orderCount.refund}}</view>
<view class="text">退款订单</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>
</template>
<script>
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
export default {
data() {
return {
isAuth : false,
rightsArr : [],
userInfo : {
nickname: '',
avatar : ''
},
identity : {},
isAnswer : false,
isCertification : false,
certification : null,
isManager : false,
orderCount : {},
// 权益说明
privilegeShow : false,
privilegeText : '',
// 签约状态
sign : {
isSign : false,
address : ""
},
// 综法订单管理
synthesisData : {}
};
},
onShow() {
let i = 0;
this.isAuth = this.$store.getters.getToken != ''
if(this.isAuth){
this.getIndex()
}
},
methods: {
// 签约
onSign(){
if(!this.isCertification){
uni.showToast({
title: '暂未实名认证,无法签约,请完成实名认证',
icon : 'none'
})
return
}
if(this.sign.address == ''){
uni.showToast({
title: '暂时无法签约,请前往“我的”,点击用户头像,完善通讯地址信息后重试',
icon : 'none'
})
return
}
uni.showLoading({
title : '获取签约地址',
mask : true
})
sign().then(res => {
uni.hideLoading()
this.$Router.push({
name : 'ESign',
params : {
url: res.sign_url
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 显示业务员权益
onToast(val){
this.privilegeText = val.content
this.privilegeShow = true
},
// 工作台信息
getIndex(){
uni.showLoading({
title: '加载中...',
mask : true
})
Promise.all([rights(), index(), synthesisCount()]).then(res => {
let rightsData = res[0],
indexData = res[1],
synthesisData = res[2]
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData
this.rightsArr = rightsData
this.userInfo = {
nickname,
avatar
}
this.isCertification = isCertification
this.certification = certification
this.isManager = isManager
this.isAnswer = isAnswer
this.orderCount = business_orders_count
this.identity = identity
this.sign = sign
this.synthesisData = synthesisData
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 导航
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
// 创建订单
onCreateOrder(){
uni.showActionSheet({
itemList: ['个人订单', '客户订单'],
success : res => {
this.onNav('OrderCreate', {
type: res.tapIndex === 0 ? 'self' : 'other'
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content{
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>

View File

@@ -0,0 +1,313 @@
<template>
<view class="content">
<form class="diff-from" @submit="onDiff">
<label>补差价金额()</label>
<input placeholder="输入补差价金额" name="price" type="digit" />
<button form-type="submit">确认补差价</button>
</form>
<view class="diff-list">
<view class="diff-title">补差价记录</view>
<block v-if="diffArr.length > 0">
<view class="diff-item" v-for="(item, index) in diffArr" :key="index">
<view class="diff-info">
<view class="diff-info-item">
<label>差价金额</label>
<view class="nowrap">{{item.price}}</view>
</view>
<view class="diff-info-item">
<label>订单状态</label>
<view class="nowrap">{{item.status.text}}</view>
</view>
<view class="diff-info-item">
<label>创建时间</label>
<view class="nowrap">{{item.created_at}}</view>
</view>
</view>
<view class="diff-state border-solid" v-if="item.can.pay_status != 5 && item.can.pay_status != 7">
<view class="diff-btn" v-if="item.can.cancel" @click="onCancel(item.synthesis_diff_price_id, index)">取消订单</view>
<view class="diff-btn in" @click="onListPay(item)" :class="{'hide': item.can.pay_status == 2 || item.can.pay_status == 4}">
<text v-if="item.can.pay_status == 1">立即支付</text>
<text v-if="item.can.pay_status == 2 || item.can.pay_status == 4">审核中</text>
<text v-if="item.can.pay_status == 3 || item.can.pay_status == 6">被驳回</text>
</view>
</view>
</view>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</block>
<view class="diff-null" v-else>
<u-empty
mode="history"
icon="http://cdn.uviewui.com/uview/empty/history.png"
text="无补差价记录"
>
</u-empty>
</view>
</view>
</view>
</template>
<script>
import { orderDiff, orderDiffList, orderDiffCancel, orderDiffInfo } from '@/apis/interfaces/synthesisOrder'
export default {
data() {
return {
orderId : '', // 支付ID
orderType : '', // 支付类型
price : '', // 支付价格
diffArr : [], // 支付记录
page : {}, // 分页信息
pagesShow : false,// 是否显示分页
status : '' // 分页状态
};
},
onShow() {
this.getList()
},
methods: {
// 获取补差价列表
getList(){
uni.showLoading({
title: '加载中...',
mask : true
})
// 初始化分页
this.page = {
current: 1
}
// 获取补差价列表
let { orderId, ordertype } = this.$Route.query
orderDiffList(orderId, ordertype.replace(/\-/g, '\\'), this.page.current).then(res => {
let { data, page } = res
this.diffArr = page.current == 1 ? data: this.diffArr.concat(data)
this.page = page
this.pagesShow = !page.has_more
this.status = page.has_more ? 'loading' : 'nomore'
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 创建补差价订单
onDiff(e){
let { price } = e.detail.value
let { orderId, ordertype } = this.$Route.query
if( price == '' || price <= 0 ){
uni.showToast({
title: '金额需大于0元并不能为空',
icon : 'none'
})
return
}
uni.showLoading({
title: '加载中...',
mask : true
})
orderDiff(ordertype.replace(/\-/g, '\\'), orderId, price ).then(res => {
let { synthesis_diff_price_id, order_type, can, price } = res;
this.onPay( synthesis_diff_price_id, order_type, can, price )
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 取消补差价
onCancel(id, index){
uni.showModal({
title : '提示',
content : '确认取消当前补差价订单吗?',
success : res => {
if(res.confirm){
uni.showLoading({
title: '加载中...',
mask : true
})
orderDiffCancel(id).then(res => {
uni.showToast({
title: res,
icon : 'none'
})
this.diffArr.splice(index, 1)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
})
},
// 列表补差价
onListPay(obj){
let { synthesis_diff_price_id, order_type, can, price, remark, offline_pays, order_id } = obj
if(can.pay_status == 2 || can.pay_status == 4){
uni.showToast({
title: '补差价信息正在审核中',
icon : 'none'
})
return
}
if(can.pay_status == 3){
uni.showModal({
title : '驳回提示',
content : '线下银行打款被驳回,驳回原因:' + offline_pays.remark,
showCancel : false,
confirmText : '编辑',
success : res => {
if(res.confirm && can.pay_status == 3){
this.$Router.push({
name: 'BankPay',
params: {
payId : offline_pays.offline_pay_id,
orderType : order_type.replace(/\\/g, '-'),
price : price,
type : 'edit'
},
})
}
}
})
return
}
if(can.pay_status == 6){
uni.showModal({
title : '驳回提示',
content : '补差价被驳回,驳回原因:' + remark,
showCancel : false,
})
return
}
this.onPay(synthesis_diff_price_id, order_type, can, price)
},
// 差价支付
onPay(id, type, can, price){
this.orderId = id
this.orderType = type
this.price = price
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.push({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.push({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.page.current++
this.getList()
return
}
}
}
</script>
<style lang="scss">
.content{
background: #f8f8f8;
min-height: 100vh;
padding: 1rpx 0;
box-sizing: border-box;
}
// 页面空
.diff-null{
height: 40vh;
display: flex;
align-items: center;
justify-content: center;
}
// 差价列表
.diff-list{
padding: 0 30rpx;
.diff-title{ font-size: 30rpx; color: gray; line-height: 60rpx; margin-bottom: 20rpx; }
.diff-item{
background-color: white;
border-radius: 20rpx;
margin-bottom: 30rpx;
.diff-info{
padding: 30rpx;
.diff-info-item{
display: flex;
justify-content: space-between;
line-height: 60rpx;
font-size: 30rpx;
label{ color: gray; width: 200rpx; }
view{ text-align: right; width: calc(100% - 200rpx); }
}
}
.diff-state{
padding: 20rpx 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
&::after{ top: 0; }
.diff-btn{
border:solid 1rpx $main-color;
color: $main-color;
font-size: 30rpx;
line-height: 70rpx;
padding: 0 30rpx;
border-radius: 36rpx;
margin-left: 30rpx;
&.in{
background: $main-color;
color: white;
}
&.hide{
opacity: .7;
}
}
}
}
}
// 创建补差价
.diff-from{
background: white;
border-radius: 20rpx;
margin: 30rpx;
padding: 50rpx;
display: block;
label{ line-height: 70rpx; text-align: center; font-weight: bold; font-size: 30rpx; display: block; }
input{ text-align: center; font-size: 40rpx; height: 100rpx; @extend .border-solid; margin: 30rpx 0 50rpx; }
button{ background-color: $main-color; color: white; font-size: 32rpx; height: 90rpx; line-height: 90rpx; border-radius: 10rpx; }
}
</style>

View File

@@ -0,0 +1,373 @@
<template>
<view class="content">
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item" @click="onNav('EmpowerOrder', { status: 0 })">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">待支付</view>
<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>
</template>
<script>
import { empowerStatistics } from '@/apis/interfaces/work.js'
export default {
data() {
return {
// 综法订单管理
orderAll : '',
orderEntrust : '',
};
},
onShow() {
this.getIndex()
},
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>
<style lang="scss" scoped>
.content{
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>

View File

@@ -0,0 +1,310 @@
<template>
<view class="content">
<image class="yearImg" src="https://cdn.douhuofalv.com/images/2023/04/17/80a076d77afdbe716e29f2ea56f9b103.png" mode="widthFix"></image>
<view class="list">
<view class="title">
<view class="title-name"><text>企业法律咨询服务包</text></view>
<view class="title-text">legal advice</view>
</view>
<view class="item" :class="{active : item.is_open}" v-for="(item, index) in synthesisArr" :key="index">
<view class="endedAt" v-if="item.is_open">
<view class="endedAt-time">到期时间{{item.service_user.ended_at}}</view>
</view>
<view class="top">
<view class="top-title">{{item.title}}</view>
<view class="top-btn" :class="{'hide': item.button_status === 3}" @click="onBuy(index)">
<text v-if="item.button_status === 0">购买</text>
<text v-if="item.button_status === 1">续费</text>
<text v-if="item.button_status === 2">支付</text>
<text v-if="item.button_status === 3">审核中</text>
<text v-if="item.button_status === 4">被驳回</text>
</view>
</view>
<view class="range">
<view class="range-label">
<view class="range-label-title">面相群体</view>
<view class="range-label-text">
{{item.audiences}}
</view>
</view>
<view class="range-label">
<view class="range-label-title">咨询收费</view>
<view class="range-label-text">
{{item.price}}/
</view>
</view>
<view class="range-label scope" v-if="index == 0">
<view class="range-label-title">服务范围</view>
<view class="range-label-text">
<text v-for="(items, scopeIndex) in item.scope" :key="scopeIndex">{{scopeIndex + 1}}{{items}}</text>
</view>
</view>
</view>
<view class="shape" v-if="index >= 1">
<view class="shapeBack"></view>
<view class="shapeCont">
<view class="shapeWhite">
<view class="shapeWhite-title">
服务范围
</view>
<view class="shapeWhite-label" v-for="(items, scopeIndex) in item.scope" :key="scopeIndex">
{{scopeIndex + 1}}{{items}}
</view>
<image class="shapeWhite-back" src="https://cdn.douhuofalv.com/images/2023/04/17/893b41e87c2bdfca62c4936a880c79cd.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</view>
<image class="yearBttom" src="https://cdn.douhuofalv.com/images/2023/04/17/fc4cad00a630e3d69b3f486e9d2937e9.png" mode="widthFix"></image>
</view>
</template>
<script>
import { yearSynthList } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
synthesisArr: [], //企业-年费服务包列表
}
},
onShow() {
this.yearServe();
},
methods: {
// 年费服务包列表
yearServe(){
yearSynthList({
type: 2
}).then(res => {
this.synthesisArr = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 购买企业服务包
onBuy(index){
let obj = this.synthesisArr[index]
switch (obj.button_status){
case 3:
uni.showToast({
title: '打款凭证审核中,请耐心等待',
icon : 'none'
})
break;
case 4:
uni.showModal({
title : '审核被驳回',
content : '驳回原因:' + obj.service_order.offline_pays.remark,
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({
name : 'BankPay',
params : {
payId : obj.service_order.offline_pays.offline_pay_id,
type : 'edit',
orderId : obj.service_order.order_id,
orderType : obj.service_order.order_type.replace(/\\/g, '-'),
price : obj.price
}
})
}
}
})
break;
default:
this.$Router.push({
name: 'StandWrite',
params: {
serveId: obj.synthesis_service_id
}
})
break;
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
background-color: #121d4c;
}
.yearImg,
.yearBttom{
width: 100%;
display: block;
}
.list {
padding: 30rpx;
box-sizing: border-box;
background-color: #121d4c;
.title {
margin-bottom: 40rpx;
display: flex;
height: 80rpx;
line-height: 80rpx;
.title-name {
flex: 1;
text {
padding: 0 70rpx 0 30rpx;
font-size: 36rpx;
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
display: inline-block;
color: #2c3c66;
font-weight: 600;
position: relative;
&:after {
position: absolute;
content: '';
right: 0;
top: 0;
width: 0;
height: 0;
border-width: 40rpx;
border-style: solid;
border-color: transparent #121d4c transparent transparent;
}
}
}
.title-text {
font-size: 36rpx;
text-transform: uppercase;
background-image: -webkit-linear-gradient(top,#86716b, #8e8f9c);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
.item {
background-color: #002088;
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
position: relative;
&.active {
padding-top: 70rpx;
}
.endedAt {
position: absolute;
top: 0;
left: 0;
display: inline-block;
color: #2c3c66;
width: 100%;
text-align: center;
.endedAt-time {
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
margin: 0 auto;
display: inline-block;
padding: 0 20rpx;
line-height: 52rpx;
font-size: 26rpx;
border-radius: 0 0 5rpx 5rpx;
color: #582700;
}
}
.top {
display: flex;
font-weight: 600;
line-height: 54rpx;
margin-bottom: 20rpx;
.top-title {
font-size:36rpx;
background-image: -webkit-linear-gradient(top,#fdf6ca, #e29c68);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
flex: 1;
}
.top-btn {
background-image: -webkit-linear-gradient(top,#fff8da,#f3c796);
color: #582700;
padding: 0 30rpx;
border-radius: 50rpx;
font-size: 30rpx;
box-shadow: 0 8rpx 6rpx rgba(0, 0, 0, .3);
}
}
.range {
color: #ffffff;
font-size: 28rpx;
.range-label {
line-height: 40rpx;
padding: 10rpx 0;
display: flex;
.range-label-title {
width: 160rpx;
}
.range-label-text {
width: calc(100% - 160rpx);
text {
display: block;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
}
.shape {
position: relative;
margin-top: 30rpx;
font-size: 28rpx;
.shapeBack {
background-color: #0d245b;
height: 20rpx;
width: 100%;
border: 4rpx solid #e8c595;
border-radius: 80rpx;
}
.shapeCont {
padding: 0 30rpx;
box-sizing: border-box;
margin-top: -18rpx;
.shapeWhite {
background-color: #ffffff;
border-radius: 0 0 20rpx 20rpx;
padding: 40rpx 30rpx 30rpx;
box-sizing: border-box;
color: #0e2660;
position: relative;
&::after {
position: absolute;
content: '';
top: 0;
left: 0;
width: 100%;
height: 20rpx;
background-image: -webkit-linear-gradient(top, #a7a8ad, transparent);
}
.shapeWhite-title {
font-size: 38rpx;
margin-bottom: 20rpx;
}
.shapeWhite-label {
padding: 10rpx 0;
line-height: 44rpx;
}
.shapeWhite-back {
width: 85%;
position: absolute;
right: 0;
bottom: 0;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,457 @@
<template>
<view class="content">
<view class="orderTab">
<view class="orderTab-item" :class="{active : entrustId == item.entrust_id}" @click="tabClick(item.entrust_id, item.type.value)" v-for="(item, index) in entrustArr" :key="index">
<text>{{item.title}}</text>
</view>
</view>
<view class="module">
<view class="entrustTop">
<image class="entrustTop-img" :src="entrustData.cover" mode="widthFix"></image>
<view class="entrustTop-btn" @click="seekClick">立即购买</view>
</view>
<view class="entrustCont">
<block v-if="type === 0">
<view class="entrustCivil">
<view class="entrustCivil-top">
<view class="entrustCivil-top-name">民事诉讼阶段</view>
<view class="entrustCivil-top-text">一审二审再审劳动争议案件存在劳动仲裁阶段)</view>
</view>
<view class="entrustCivil-list" v-for="(item, index) in sonArr" :key="index">
<view class="entrustCivil-list-title">
<view class="entrustCivil-list-number">0{{index + 1}}</view>
<view class="entrustCivil-list-name">{{item.text}}</view>
<view class="entrustCivil-list-trim"></view>
</view>
<view class="entrustCivil-list-item">
<view class="entrustCivil-list-label" v-for="(items, sonIndex) in item.children" :key="sonIndex">{{items.text}}</view>
</view>
</view>
</view>
</block>
<block v-else-if="type === 1">
<view class="entrustBrief">
<view class="entrustBrief-title">
<image class="entrustBrief-title-img" src="https://cdn.douhuofalv.com/images/2023/04/18/4d57907913a7d9ca5f3c7417421c894d.png" mode="aspectFill"></image>
<view class="entrustBrief-title-name">{{entrustData.title}}</view>
</view>
<view class="entrustBrief-list">
<view class="entrustBrief-list-item">
<text>1</text><view class="entrustBrief-list-text">代理受害人代写报案材料提供法律咨询代理刑事附带民事诉讼代理提出法律意见代理参加庭审活动一审二审</view>
</view>
<view class="entrustBrief-list-item">
<text>2</text><view class="entrustBrief-list-text">代理犯罪嫌疑人/被告人侦查阶段审查起诉阶段一审阶段二审阶段再审阶段</view>
</view> </view>
<image class="entrustBrief-logo" src="https://cdn.douhuofalv.com/images/2023/04/18/5037800b0abd01d828890a2b6386c38a.png" mode="widthFix"></image>
</view>
<image class="entrustBrief-text" src="https://cdn.douhuofalv.com/images/2023/04/18/e0dbc0ce562b479b9ff3ad3820971612.png" mode="widthFix"></image>
</block>
<block v-else-if="type === 2">
<view class="entrustPolitics">
<view class="entrustPolitics-item">
<view class="entrustPolitics-back">
<view class="entrustPolitics-item-tips">stage</view>
<view class="entrustPolitics-item-name">诉讼阶段</view>
<view class="entrustPolitics-item-label">
<view class="entrustPolitics-item-list">
<text>1</text>一审
</view>
<view class="entrustPolitics-item-list">
<text>2</text>二审
</view>
<view class="entrustPolitics-item-list">
<text>3</text>再审
</view>
</view>
<image class="entrustPolitics-item-logo" src="https://cdn.douhuofalv.com/images/2023/04/18/f7804d7c91c2389dd62ce10c19e26bec.png" mode="widthFix"></image>
</view>
</view>
<view class="entrustPolitics-item">
<view class="entrustPolitics-back">
<view class="entrustPolitics-item-tips">type</view>
<view class="entrustPolitics-item-name">常见类型</view>
<view class="entrustPolitics-item-label">
<view class="entrustPolitics-item-list">
<text>1</text>强制拆迁
</view>
<view class="entrustPolitics-item-list">
<text>2</text>行政不作为
</view>
<view class="entrustPolitics-item-list">
<text>3</text>征收补偿等
</view>
</view>
<image class="entrustPolitics-item-logo" src="https://cdn.douhuofalv.com/images/2023/04/18/f7804d7c91c2389dd62ce10c19e26bec.png" mode="widthFix"></image>
</view>
</view>
</view>
</block>
</view>
<image class="entrustBottom" src="https://cdn.douhuofalv.com/images/2023/04/18/f08e45875d7dba6c3116690978a8a999.png" mode="widthFix"></image>
</view>
</view>
</template>
<script>
import { entrustList, entrustInfo, entrustSon } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
type : '', // 案件类型
entrustId : '',
sonArr : [], // 民事子分类
entrustData: '', // 案件委托详情
entrustArr : [], // 案件委托列表
}
},
onShow() {
// 获取-案件委托-列表
this.yearServe();
},
methods: {
// 案件委托-列表
yearServe(){
entrustList().then(res => {
this.entrustArr = res
if(this.entrustId == '') {
this.entrustId = res[0].entrust_id
this.type = res[0].type.value
}
// 获取-案件委托-详情
this.yearInfo();
if(this.type === 0) this.yearSon();
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 案件委托-详情
yearInfo(){
entrustInfo(this.entrustId).then(res => {
this.entrustData = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 获取-案件委托子分类
yearSon(){
entrustSon({
parent_id: this.entrustId
}).then(res => {
this.sonArr = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 顶级
tabClick(id, type) {
this.entrustId = id
this.type = type
if(type === 0) this.yearSon();
// 获取-案件委托-详情
this.yearInfo();
},
// 立即咨询
seekClick() {
if(this.type === 0) {
this.$Router.push({name: 'EntrustCivil', params: { entrustId: this.entrustId, title: '民事诉讼'}})
return
}
this.$Router.push({name: 'EntrustWrite', params: {entrustId: this.entrustId, title: this.type == 1 ? '刑事辩护': '行政诉讼'}})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #171c54;
}
.orderTab {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 9;
height: 100rpx;
background-color: white;
display: flex;
.orderTab-item {
flex: 3;
text-align: center;
margin-top: 20rpx;
font-size: 30rpx;
text {
display: inline-block;
color: #000;
background-image: white;
height: 64rpx;
line-height: 64rpx;
border-radius: 80rpx;
padding: 0 30rpx;
}
&.active text {
color: #ffffff;
background-color: $main-color;
}
}
}
.module {
padding-top: 100rpx;
}
.entrustCont {
background-color: #171c54;
padding: 30rpx 30rpx 0;
box-sizing: border-box;
width: 100%;
.entrustCivil {
.entrustCivil-top {
background-color: #111f6e;
border-radius: 15rpx;
padding: 30rpx 10rpx;
box-sizing: border-box;
color: #ffebbf;
text-align: center;
.entrustCivil-top-name {
margin-bottom: 10rpx;
font-size: 34rpx;
}
.entrustCivil-top-text {
font-size: 26rpx;
}
}
.entrustCivil-list {
margin-top: 30rpx;
color: #ffffff;
.entrustCivil-list-title {
font-size: 36rpx;
margin-bottom: 40rpx;
.entrustCivil-list-trim {
position: relative;
left: 290rpx;
bottom: 20rpx;
background-color: #2f3aae;
width: 35%;
height: 4rpx;
padding-left: 40rpx;
box-sizing: border-box;
&::after {
position: absolute;
content: '';
left: -50rpx;
top: -10rpx;
width: 20rpx;
height: 20rpx;
transform:rotate(45deg);
background-color: #2f3aae;
}
}
.entrustCivil-list-number {
font-weight: 600;
font-size: 68rpx;
background-image: -webkit-linear-gradient(top,#ffffff 40%, transparent 70%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
text-transform: uppercase;
}
.entrustCivil-list-name {
margin-top: -20rpx;
width: 280rpx;
}
}
.entrustCivil-list-item {
overflow: hidden;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin: 0 -20rpx;
.entrustCivil-list-label {
text-align: center;
flex: 1;
min-width: calc((100% - 64rpx) / 2);
margin: 0 15rpx 30rpx;
background-image: linear-gradient(to right, #3653cf, #1922a0);
border-radius: 10rpx;
line-height: 84rpx;
font-size: 26rpx;
}
}
}
}
.entrustPolitics {
display: flex;
.entrustPolitics-item {
flex: 2;
margin: 0 15rpx;
background-color: #0e1e58;
border-radius: 40rpx 15rpx 15rpx 15rpx;
padding: 20rpx;
overflow: hidden;
box-sizing: border-box;
.entrustPolitics-back {
padding: 30rpx 30rpx 80rpx;
box-sizing: border-box;
overflow: hidden;
border-radius: 40rpx 15rpx 15rpx 15rpx;
background-color: #002087;
position: relative;
.entrustPolitics-item-logo {
position: absolute;
bottom: 0;
right: 0;
width: 120rpx;
}
.entrustPolitics-item-name {
background-image: -webkit-linear-gradient(top,#fdf7ce, #e29c68);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-weight: 600;
font-size: 36rpx;
margin-bottom: 30rpx;
}
.entrustPolitics-item-tips {
font-size: 38rpx;
font-weight: 600;
background-image: -webkit-linear-gradient(top,#8090c3, transparent 85%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
text-transform: uppercase;
}
.entrustPolitics-item-label {
color: #ffffff;
font-size: 28rpx;
line-height: 80rpx;
.entrustPolitics-item-list {
display: flex;
text {
font-size: 22rpx;
display: block;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
border: 2rpx solid #ffffff;
text-align: center;
border-radius: 50%;
margin-right: 20rpx;
margin-top: 26rpx;
}
}
}
}
}
}
.entrustBrief {
background-color: #09216e;
border-radius: 20rpx;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
color: #ffffff;
position: relative;
.entrustBrief-title {
position: relative;
width: 100%;
text-align: center;
.entrustBrief-title-img,
.entrustBrief-title-name {
position: absolute;
top: -16rpx;
height: 80rpx;
line-height: 80rpx;
}
.entrustBrief-title-img {
width: 400rpx;
left: calc(50% - 200rpx);
display: block;
}
.entrustBrief-title-name {
width: 100%;
z-index: 9;
left: 0;
font-weight: 600;
}
}
.entrustBrief-list {
padding: 90rpx 10rpx 20rpx;
line-height: 48rpx;
font-size: 28rpx;
.entrustBrief-list-item {
margin-bottom: 30rpx;
display: flex;
text {
font-size: 22rpx;
display: block;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
border: 2rpx solid #ffffff;
text-align: center;
border-radius: 50%;
margin-right: 20rpx;
margin-top: 10rpx;
}
.entrustBrief-list-text {
width: calc(100% - 48rpx);
text-align: justify;
}
}
}
.entrustBrief-logo {
position: absolute;
bottom: -30rpx;
right: 30rpx;
width: 240rpx;
z-index: 5;
}
}
.entrustBrief-text {
width: 100%;
margin-top: 60rpx;
}
}
.entrustTop {
position: relative;
width: 100%;
padding-top: 60%;
.entrustTop-img,.entrustTop-btn {
position: absolute;
left: 0;
}
.entrustTop-img {
width: 100%;
height: 100%;
top: 0;
}
.entrustTop-btn {
z-index: 4;
bottom: 15%;
left: 45rpx;
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
color: #12053d;
display: inline-block;
line-height: 74rpx;
padding: 0 40rpx;
font-size: 34rpx;
border-radius: 10rpx;
}
}
.entrustBottom {
width: 100%;
}
</style>

View File

@@ -0,0 +1,641 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">法律咨询服务包</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://cdn.douhuofalv.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<!-- 民事诉讼 -->
<view class="idcardAdd-types" v-if="sonArr.length > 0">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text>*</text>民事诉讼
</view>
</view>
<view class="idcardAdd-block-write">
<picker class="idcardAdd-picker" @change="bindPickerChange" :value="indexValue" :range="sonArr" :range-key="'text'">
<view class="nowrap">{{ sonArr[indexValue].text }}</view>
<u-icon class="idcardAdd-picke-image" name="arrow-down"></u-icon>
</picker>
</view>
</view>
<!-- 纠纷类型 -->
<view class="idcardAdd-types" v-if="childrenArr.length > 0">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text>*</text>纠纷类型
</view>
</view>
<view class="idcardAdd-block-write">
<picker class="idcardAdd-picker" @change="childrenChange" :value="childrenValue" :range="childrenArr" :range-key="'text'">
<view class="nowrap">{{ childrenArr[childrenValue].text }}</view>
<u-icon class="idcardAdd-picke-image" name="arrow-down"></u-icon>
</picker>
</view>
</view>
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<block v-if="item.pre_key == null || isShow(item)">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 多选 -->
<view class="idcardAdd-aline" v-if="item.type === 'checkbox'">
<checkbox-group @change="item.value = $event.detail.value">
<label class="checkbox-item" v-for="(checkboxItem, checkboxIndex) in item.options">
<checkbox class="checkbox-input" :value="checkboxIndex" color="#446EFE"></checkbox>{{checkboxItem}}
</label>
</checkbox-group>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text> {{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 描述 -->
<view class="idcardAdd-depict-textarea" v-if="item.type === 'textarea'">
<textarea maxlength="500" class="textarea" :placeholder="'请输入' + item.title" v-model="item.value"></textarea>
<text>{{item.value.length}}/500</text>
</view>
<!-- 被告所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'defendant_address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="defendantPicker"
></uni-data-picker>
</view>
</block>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit">确认提交</button>
</view>
</view>
</template>
<script>
import { entrustSon, entrustInfo, entrustPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
export default {
data() {
return {
submitObj : {}, // 提交数据
sonArr : [], // 民事二级类型
childrenArr : [], // 纠纷类型
paramsArr : [], // 信息
cityPicker : [], // 地址
indexValue : 0, // 民事类型下标
childrenValue : 0, // 纠纷类型下标
price : '0.00', // 订单金额
entrustId : '', // 表单详情
// 被告所在地
defendant : {},
// 目前所在地
address : {},
orderId : '', // 订单 ID
orderType : '', // 订单类型
voucherState : false, // 上传凭证弹出
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
// 案件委托子分类
this.yearSon();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
computed: {
isShow(){
return (item) => {
if(item.pre_key != null){
let index = this.paramsArr.findIndex(val => val.key == item.pre_key)
return item.pre_value == this.paramsArr[index].value
}
return false
}
}
},
methods: {
// 民事类型列表
yearSon(){
entrustSon({parent_id: this.$Route.query.entrustId}).then(res => {
let froms = res
froms.map(val => {
val.indexValue = 0
})
this.sonArr = froms
let newChildren = froms[this.indexValue].children
newChildren.map(val => {
val.childrenValue = 0
})
this.childrenArr = newChildren
this.entrustId = newChildren[this.childrenValue].value
// 获取综法咨询-详情
this.getBusiness();
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 选择民事类型
bindPickerChange(e){
this.indexValue = e.detail.value
this.childrenValue = 0
// 获取-案件委托子分类
this.yearSon();
},
// 选择纠纷类型
childrenChange(e){
this.childrenValue = e.detail.value
this.entrustId = this.childrenArr[e.detail.value].value
},
// 综法咨询-详情
getBusiness(){
entrustInfo(this.entrustId).then(res => {
let { price, params } = res
params.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = ""
}
})
this.price = price
this.paramsArr = params
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 被告所在地-选择城市
defendantPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.defendant = dataArr
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = []
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
entrustPost(this.entrustId, {
data : dataArr,
type : 'self',
channel : 'app'
}).then(res => {
let { order_id, order_type, can } = res;
this.expressSheet(order_id, order_type, can )
uni.hideLoading()
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 支付金额是0
if(can.pay_status == 4){
uni.showModal({
title : '提示',
content : '下单成功',
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
uni.navigateBack()
}
}
})
return
}
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.replace({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.replace({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
overflow-y: scroll;
// position: fixed;
}
.top {
position: relative;
height: 180rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 40%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 54rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 30rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 30rpx;
position: relative;
.idcardAdd-types {
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.idcardAdd-depict-textarea {
background-color: #f7faff;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
width: 100%;
margin-bottom: 40rpx;
.textarea {
width: 100%;
padding: $padding 0;
box-sizing: border-box;
font-size: 30rpx;
height: 200rpx;
}
text {
width: 100%;
text-align: right;
font-size: 28rpx;
color: #999999;
display: block;
}
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
font-size: 30rpx;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: 0;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
// checkbox
.checkbox-item{
display: inline-block;
margin-right: 20rpx;
color: #999999;
line-height: 70rpx;
&:last-child {
margin-right: 0;
}
.checkbox-input{
transform:scale(0.6);
}
}
.idcardAdd-aline {
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
.idcardAdd-aline-write {
margin-right: 30rpx;
color: #999999;
}
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 140rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: 45rpx;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
// 打款凭证弹出
.voucherBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
display: none;
&.active {
display: block;
}
}
.voucherPop {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
display: none;
&.active {
display: -webkit-box;
}
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
position: relative;
.voucherPop-img {
position: absolute !important;
top: -80rpx;
right: calc(50% - 100rpx);
width: 200rpx;
}
.voucherPop-title {
box-sizing: border-box;
padding: 50rpx 70rpx;
margin-top: 100rpx;
text-align: center;
.voucherPop-name {
font-weight: 600;
font-size: 38rpx;
}
.voucherPop-text {
padding: 30rpx 0 35rpx;
line-height: 44rpx;
}
.voucherPop-btn {
display: flex;
.voucherPop-go {
flex: 2;
text-align: center;
border: 2rpx solid #da2b56;
color: #da2b56;
margin: 0 15rpx;
line-height: 74rpx;
border-radius: 10rpx;
background-color: #ffffff;
&.voucherPop-up {
background-color: #da2b56;
color: #ffffff;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,220 @@
<template>
<view class="info-content" v-if="entrust.title">
<view class="header">
<div class="title">订单详情</div>
</view>
<view class="block">
<view class="block-header border-solid">
<view class="title">
<text>业务类型</text>
<view>{{entrust.title}}</view>
</view>
<view class="price">
<text>实付</text>
<view>{{price}}</view>
</view>
</view>
<view class="block-item border-solid">
<view class="block-item-flex">
<label>下单用户</label>
<view class="val">{{user.nickname}}</view>
</view>
<view class="block-item-flex">
<label>用户手机</label>
<view class="val">{{user.username}}</view>
</view>
</view>
<view class="block-item">
<view class="block-item-flex" v-for="(item, index) in params" :key="index" v-if="item.value_text != null">
<label>{{item.title || '-'}}</label>
<view class="val" v-if="item.type === 'pro_city'">{{item.value_text.join_text}}</view>
<view class="val" v-else>{{item.value_text || '-'}}</view>
</view>
</view>
</view>
<view class="block" v-if="lawyer != null">
<view class="block-item">
<view class="block-item-flex">
<label>服务律师</label>
<view class="val">{{lawyer.name}}</view>
</view>
<view class="block-item-flex">
<label>律师电话</label>
<view class="val">{{lawyer.username}}</view>
</view>
</view>
</view>
<view class="block">
<view class="block-item">
<view class="block-item-flex">
<label>支付方式</label>
<view class="val">{{payType || '-'}}</view>
</view>
<view class="block-item-flex">
<label>业务姓名</label>
<view class="val">{{user.parent.nickname}}</view>
</view>
<view class="block-item-flex">
<label>业务手机</label>
<view class="val">{{user.parent.username}}</view>
</view>
<view class="block-item-flex" v-if="centerUser != ''">
<label>运营中心</label>
<view class="val">{{centerUser}}</view>
</view>
<view class="block-item-flex">
<label>订单编号</label>
<view class="val">{{no}}</view>
</view>
<view class="block-item-flex">
<label>创建时间</label>
<view class="val">{{createdAt}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { entrustInfo } from '@/apis/interfaces/synthesisOrder.js'
export default {
data() {
return {
entrust : {},
params : [],
createdAt : '',
payType : '',
user : {},
lawyer : null,
price : '0.00',
centerUser: ''
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
entrustInfo(this.$Route.query.id).then(res => {
let { entrust, params, created_at, user, order_no, total, lawyer, pay_driver_text, center_user } = res;
this.entrust = entrust
this.params = params
this.createdAt = created_at
this.user = user
this.no = order_no
this.price = total
this.lawyer = lawyer
this.payType = pay_driver_text || '-',
this.centerUser= center_user
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
}
}
</script>
<style lang="scss" scoped>
.info-content{
padding-top: var(--status-bar-height);
position: relative;
background: #eeefff;
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 10rpx;
&::before{
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
height: 50vh;
content: " ";
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
// 头部
.header{
position: relative;
z-index: 1;
padding: 100rpx 40rpx 70rpx;
.title{
font-size: 50rpx;
color: white;
font-weight: bold;
text{
font-weight: 400;
font-size: 30rpx;
margin-left: 20rpx;
}
}
.subtitle{
color: white;
margin-top: 10rpx;
}
}
// 模块
.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: 10rpx 0;
font-size: 30rpx;
display: flex;
color: #555;
justify-content: space-between;
label{ width: 240rpx; }
.val{
text-align: right;
width: calc(100% - 240rpx);
}
}
}
}
}
</style>

View File

@@ -0,0 +1,566 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">法律咨询服务包</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://cdn.douhuofalv.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<block v-if="item.pre_key == null || isShow(item)">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
<!-- {{item.options[item.value]}} -->
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 多选 -->
<view class="idcardAdd-aline" v-if="item.type === 'checkbox'">
<checkbox-group @change="item.value = $event.detail.value">
<label class="checkbox-item" v-for="(checkboxItem, checkboxIndex) in item.options">
<checkbox class="checkbox-input" :value="checkboxIndex" color="#446EFE"></checkbox>{{checkboxItem}}
</label>
</checkbox-group>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text>{{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 描述 -->
<view class="idcardAdd-depict-textarea" v-if="item.type === 'textarea'">
<textarea maxlength="500" class="textarea" :placeholder="'请输入' + item.title" v-model="item.value"></textarea>
<text>500字以内</text>
</view>
<!-- 被告所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'defendant_address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="defendantPicker"
></uni-data-picker>
</view>
</block>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit">确认提交</button>
</view>
</view>
</template>
<script>
import { entrustInfo, entrustPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
import mouldInput from '@/components/mould-input.vue'
export default {
components: {
mouldInput
},
data() {
return {
paramsArr : [], // 信息
cityPicker : [], // 地址
// 被告所在地
defendant : {},
// 目前所在地
address : {},
orderId : '', // 订单 ID
orderType : '', // 订单类型
voucherState : false, // 上传凭证弹出
price : '0.00', // 价格
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
// 设置标题
uni.setNavigationBarTitle({
title: '案件委托-' + this.$Route.query.title
})
// 获取综法咨询-详情
this.getBusiness();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
computed: {
isShow(){
return (item) => {
if(item.pre_key != null){
let index = this.paramsArr.findIndex(val => val.key == item.pre_key)
return item.pre_value == this.paramsArr[index].value
}
return false
}
}
},
methods: {
// 综法咨询-详情
getBusiness(){
entrustInfo(this.$Route.query.entrustId).then(res => {
let { price, params } = res
params.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = ""
}
})
this.price = price
this.paramsArr = params
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 被告所在地-选择城市
defendantPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.defendant = dataArr
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = []
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
entrustPost(this.$Route.query.entrustId, {
data: dataArr,
type: 'self',
channel: 'App',
user_id: ''
}).then(res => {
this.expressSheet(res.entrust_order_id, res.order_type, res.can)
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 支付金额是0
if(can.pay_status == 4){
uni.showModal({
title : '提示',
content : '下单成功',
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
uni.navigateBack()
}
}
})
return
}
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.replace({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.replace({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
height: 100%;
overflow-y: scroll;
position: fixed;
}
.top {
position: relative;
height: 180rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 30%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 44rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 34rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 30rpx;
position: relative;
}
.idcardAdd-depict-textarea {
background-color: #f7faff;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
width: 100%;
margin-bottom: 40rpx;
.textarea {
width: 100%;
padding: $padding 0;
box-sizing: border-box;
}
text {
width: 100%;
text-align: right;
font-size: 28rpx;
color: #999999;
display: block;
}
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
// checkbox
.checkbox-item{
display: inline-block;
margin-right: 20rpx;
color: #999999;
line-height: 70rpx;
&:last-child {
margin-right: 0;
}
.checkbox-input{
transform:scale(0.6);
}
}
.idcardAdd-aline {
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
.idcardAdd-aline-write {
margin-right: 30rpx;
color: #999999;
}
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 140rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: 45rpx;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
// 打款凭证弹出
.voucherBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
display: none;
&.active {
display: block;
}
}
.voucherPop {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
display: none;
&.active {
display: -webkit-box;
}
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
position: relative;
.voucherPop-img {
position: absolute !important;
top: -80rpx;
right: calc(50% - 100rpx);
width: 200rpx;
}
.voucherPop-title {
box-sizing: border-box;
padding: 50rpx 70rpx;
margin-top: 100rpx;
text-align: center;
.voucherPop-name {
font-weight: 600;
font-size: 38rpx;
}
.voucherPop-text {
padding: 30rpx 0 35rpx;
line-height: 44rpx;
}
.voucherPop-btn {
display: flex;
.voucherPop-go {
flex: 2;
text-align: center;
border: 2rpx solid #da2b56;
color: #da2b56;
margin: 0 15rpx;
line-height: 74rpx;
border-radius: 10rpx;
background-color: #ffffff;
&.voucherPop-up {
background-color: #da2b56;
color: #ffffff;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,220 @@
<template>
<view class="info-content" v-if="expand.title">
<view class="header">
<div class="title">订单详情</div>
</view>
<view class="block">
<view class="block-header border-solid">
<view class="title">
<text>业务类型</text>
<view>{{expand.title}}</view>
</view>
<view class="price">
<text>实付</text>
<view>{{price}}</view>
</view>
</view>
<view class="block-item border-solid">
<view class="block-item-flex">
<label>下单用户</label>
<view class="val">{{user.nickname}}</view>
</view>
<view class="block-item-flex">
<label>用户手机</label>
<view class="val">{{user.username}}</view>
</view>
</view>
<view class="block-item">
<view class="block-item-flex" v-for="(item, index) in params" :key="index" v-if="item.value_text != null">
<label>{{item.title || '-'}}</label>
<view class="val" v-if="item.type === 'pro_city'">{{item.value_text.join_text}}</view>
<view class="val" v-else>{{item.value_text || '-'}}</view>
</view>
</view>
</view>
<view class="block" v-if="lawyer != null">
<view class="block-item">
<view class="block-item-flex">
<label>服务律师</label>
<view class="val">{{lawyer.name}}</view>
</view>
<view class="block-item-flex">
<label>律师电话</label>
<view class="val">{{lawyer.username}}</view>
</view>
</view>
</view>
<view class="block">
<view class="block-item">
<view class="block-item-flex">
<label>支付方式</label>
<view class="val">{{payType || '-'}}</view>
</view>
<view class="block-item-flex">
<label>业务姓名</label>
<view class="val">{{user.parent.nickname}}</view>
</view>
<view class="block-item-flex">
<label>业务手机</label>
<view class="val">{{user.parent.username}}</view>
</view>
<view class="block-item-flex" v-if="centerUser != ''">
<label>运营中心</label>
<view class="val">{{centerUser}}</view>
</view>
<view class="block-item-flex">
<label>订单编号</label>
<view class="val">{{no}}</view>
</view>
<view class="block-item-flex">
<label>创建时间</label>
<view class="val">{{createdAt}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { expandInfo } from '@/apis/interfaces/synthesisOrder.js'
export default {
data() {
return {
expand : {},
params : [],
createdAt : '',
user : {},
payType : '',
lawyer : null,
price : '0.00',
centerUser: ''
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
expandInfo(this.$Route.query.id).then(res => {
let { expand, params, created_at, user, order_no, total, lawyer, pay_driver_text, center_user } = res;
this.lawyer = lawyer
this.expand = expand
this.params = params
this.createdAt = created_at
this.user = user
this.no = order_no
this.price = total
this.payType = pay_driver_text || ''
this.centerUser= center_user
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
}
}
</script>
<style lang="scss" scoped>
.info-content{
padding-top: var(--status-bar-height);
position: relative;
background: #eeefff;
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 10rpx;
&::before{
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
height: 50vh;
content: " ";
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
// 头部
.header{
position: relative;
z-index: 1;
padding: 100rpx 40rpx 70rpx;
.title{
font-size: 50rpx;
color: white;
font-weight: bold;
text{
font-weight: 400;
font-size: 30rpx;
margin-left: 20rpx;
}
}
.subtitle{
color: white;
margin-top: 10rpx;
}
}
// 模块
.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: 10rpx 0;
font-size: 30rpx;
display: flex;
color: #555;
justify-content: space-between;
label{ width: 240rpx; }
.val{
text-align: right;
width: calc(100% - 240rpx);
}
}
}
}
}
</style>

View File

@@ -0,0 +1,442 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">法律服务拓展包</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://cdn.douhuofalv.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<block v-if="item.pre_key == null || isShow(item)">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<!-- <view class="idcardAdd-block-write" v-if="item.type === 'price' || item.type === 'number' || item.type === 'text' || item.type === 'password' || item.type === 'mobile' || item.type === 'day'">
<mouldInput class="idcardAdd-input" :blur-value="item.value" :input-type="item.type" :input-title="item.title" :input-key="item.key" @onValue="($event) => {item.value = $event}"></mouldInput>
</view> -->
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" @blur="priceBlur(item, keyIndex)" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
<!-- {{item.options[item.value]}} -->
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 多选 -->
<view class="idcardAdd-aline" v-if="item.type === 'checkbox'">
<checkbox-group @change="item.value = $event.detail.value">
<label class="checkbox-item" v-for="(checkboxItem, checkboxIndex) in item.options">
<checkbox class="checkbox-input" :value="checkboxIndex" color="#446EFE"></checkbox>{{checkboxItem}}
</label>
</checkbox-group>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text>{{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 描述 -->
<view class="idcardAdd-depict-textarea" v-if="item.type === 'textarea'">
<textarea maxlength="500" class="textarea" :placeholder="'请输入' + item.title" v-model="item.value"></textarea>
<text>500字以内</text>
</view>
<!-- 被告所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'defendant_address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="defendantPicker"
></uni-data-picker>
</view>
</block>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit">确认提交</button>
</view>
</view>
</template>
<script>
import { expandsInfo, expandsPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
import mouldInput from '@/components/mould-input.vue'
export default {
components: {
mouldInput
},
data() {
return {
paramsArr : [], // 信息
cityPicker : [], // 地址
// 目前所在地
address : {},
orderId : '', // 订单 ID
orderType : '', // 订单类型
price : '' // 订单价格
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
uni.setNavigationBarTitle({
title: '拓展服务-' + this.$Route.query.title
})
// 获取综法咨询-详情
this.getBusiness();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 判断最小输入金额
priceBlur(obj, index){
let minPrice = this.price
if(Number(obj.value) < Number(minPrice)){
obj.value = Number(minPrice)
this.$set(this.paramsArr, index, obj)
uni.showToast({
title: '金额不能小于' + minPrice + '元',
icon : 'none'
})
}
},
// 综法咨询-详情
getBusiness(){
expandsInfo(this.$Route.query.entrustId).then(res => {
let { params, price } = res;
params.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = ""
}
})
this.price = price
this.paramsArr = params
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 被告所在地-选择城市
defendantPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.defendant = dataArr
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = [];
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
expandsPost(this.$Route.query.entrustId, {
data: dataArr,
type: 'self',
channel: 'app',
user_id: ''
}).then(res => {
uni.hideLoading()
this.expressSheet(res.expand_order_id, res.order_type, res.can)
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.replace({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.replace({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
height: 100%;
overflow-y: scroll;
position: fixed;
}
.top {
position: relative;
height: 180rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 30%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 44rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 34rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: $radius;
position: relative;
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
font-size: 30rpx;
width: 100%;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
.idcardAdd-aline {
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
.idcardAdd-aline-write {
margin-right: 30rpx;
color: #999999;
}
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 140rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: $radius * 3;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
</style>

View File

@@ -0,0 +1,420 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">个人法律咨询</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://cdn.douhuofalv.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<block v-if="item.pre_key == null || isShow(item)">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 数字类型输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
<!-- {{item.options[item.value]}} -->
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 多选 -->
<view class="idcardAdd-aline" v-if="item.type === 'checkbox'">
<checkbox-group @change="item.value = $event.detail.value">
<label class="checkbox-item" v-for="(checkboxItem, checkboxIndex) in item.options">
<checkbox class="checkbox-input" :value="checkboxIndex" color="#446EFE"></checkbox>{{checkboxItem}}
</label>
</checkbox-group>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text>{{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 描述 -->
<view class="idcardAdd-depict-textarea" v-if="item.type === 'textarea'">
<textarea maxlength="500" class="textarea" :placeholder="'请输入' + item.title" v-model="item.value"></textarea>
<text>500字以内</text>
</view>
<!-- 被告所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'defendant_address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="defendantPicker"
></uni-data-picker>
</view>
</block>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit">确认提交</button>
</view>
</view>
</template>
<script>
import { synthDet, synthPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
import mouldInput from '@/components/mould-input.vue'
export default {
components: {
mouldInput
},
data() {
return {
paramsArr : [], // 信息
cityPicker : [], // 地址
// 目前所在地
address : {},
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
// 获取综法咨询-详情
this.getBusiness();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
computed: {
isShow(){
return (item) => {
if(item.pre_key != null){
let index = this.paramsArr.findIndex(val => val.key == item.pre_key)
return item.pre_value == this.paramsArr[index].value
}
return false
}
}
},
methods: {
// 综法咨询-详情
getBusiness(){
synthDet(this.$Route.query.synthesisId).then(res => {
let froms = res.synthesis.params
froms.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = val.value || ''
}
})
this.paramsArr = froms
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = []
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
synthPost(this.$Route.query.synthesisId, {
data : dataArr,
type : 'self',
channel : 'app',
user_id : ''
}).then(res => {
uni.showModal({
title : '提示',
content : '个人咨询单创建成功',
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
uni.navigateBack()
}
}
})
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
height: 100%;
overflow-y: scroll;
position: fixed;
}
.top {
position: relative;
height: 180rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 30%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 44rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 34rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 40rpx;
position: relative;
}
.idcardAdd-depict-textarea {
background-color: #f7faff;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
width: 100%;
margin-bottom: 40rpx;
.textarea {
width: 100%;
padding: $padding 0;
box-sizing: border-box;
}
text {
width: 100%;
text-align: right;
font-size: 28rpx;
color: #999999;
display: block;
}
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
// checkbox
.checkbox-item{
display: inline-block;
margin-right: 20rpx;
color: #999999;
line-height: 70rpx;
&:last-child {
margin-right: 0;
}
.checkbox-input{
transform:scale(0.6);
}
}
.idcardAdd-aline {
position: relative;
display: flex;
width: 100%;
margin-bottom: 40rpx;
.idcardAdd-aline-write {
margin-right: 30rpx;
color: #999999;
}
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 140rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: 50rpx;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
</style>

View File

@@ -0,0 +1,291 @@
<template>
<view class="content">
<image class="yearImg" src="https://cdn.douhuofalv.com/images/2023/04/17/85db0728f2bae879ecbe561eed100549.png" mode="widthFix"></image>
<view class="list">
<view class="title">
<view class="title-name"><text>个人法律咨询365服务包</text></view>
<image class="title-img" src="https://cdn.douhuofalv.com/images/2023/04/17/79426f8fe9395c1c1f5be41d0a6f2eb8.png" mode="widthFix"></image>
</view>
<view class="item" v-for="(item, index) in synthesisArr" :key="index">
<view class="item-back">
<view class="item-title">{{item.title}}</view>
<view class="range">
<view class="range-label">
<view class="range-label-title">针对群体</view>
<view class="range-label-text">
{{item.audiences}}
</view>
</view>
<view class="range-label">
<view class="range-label-title">咨询收费</view>
<view class="range-label-text">
{{item.price}}//
</view>
</view>
<view class="range-label">
<view class="range-label-title">服务期限</view>
<view class="range-label-text">
{{item.day}}
</view>
</view>
<view class="range-label scope" v-if="index == 0">
<view class="range-label-title">服务范围</view>
<view class="range-label-text">
<text v-for="(items, scopeIndex) in item.scope" :key="scopeIndex">{{scopeIndex + 1}}{{items}}</text>
</view>
</view>
</view>
<image class="shapeWhite-back" src="https://cdn.douhuofalv.com/images/2023/04/17/705af638ddaed151ce5bc5ead85f604d.png" mode="widthFix"></image>
</view>
<view class="btn">
<view class="btn-go" :class="{'hide': item.button_status === 3}" @click="onBtn(index)">
<text v-if="item.button_status === 0">立即购买</text>
<text v-if="item.button_status === 1">立即续费</text>
<text v-if="item.button_status === 2">等待支付</text>
<text v-if="item.button_status === 3">打款审核中</text>
<text v-if="item.button_status === 4">打款被驳回</text>
</view>
<!-- 到期时间 -->
<view class="order-at" v-if="item.is_open">到期时间{{item.service_user.ended_at}}</view>
</view>
</view>
</view>
<image class="yearBttom" src="https://cdn.douhuofalv.com/images/2023/04/17/fc4cad00a630e3d69b3f486e9d2937e9.png" mode="widthFix"></image>
</view>
</template>
<script>
import { yearSynthList } from '@/apis/interfaces/synthesis'
import { certified } from '@/apis/interfaces/user'
export default {
data() {
return {
synthesisArr: [], // 服务单信息
price : '' // 支付价格
}
},
onShow() {
this.yearServe();
},
methods: {
// 年费服务包列表
yearServe(){
yearSynthList({
type: 1
}).then(res => {
this.synthesisArr = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 点击开通按钮
onBtn(index){
let obj = this.synthesisArr[index]
switch (obj.button_status){
case 2:
let { order_id, order_type, can, price } = obj.service_order
this.price = price
this.expressSheet(order_id, order_type, can)
break;
case 3:
uni.showToast({
title: '打款凭证审核中,请耐心等待',
icon : 'none'
})
break;
case 4:
uni.showModal({
title : '审核被驳回',
content : '驳回原因:' + obj.service_order.offline_pays.remark,
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({
name : 'BankPay',
params : {
payId : obj.service_order.offline_pays.offline_pay_id,
type : 'edit',
orderId : obj.service_order.order_id,
orderType : obj.service_order.order_type.replace(/\\/g, '-'),
price : obj.price
}
})
}
}
})
break;
default:
this.$Router.push({
name: 'PersonWrite',
params: {
serveId: obj.synthesis_service_id
}
})
break;
}
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.push({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.push({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
background-color: #121d4c;
}
.yearImg,
.yearBttom{
width: 100%;
display: block;
}
.list {
padding: 30rpx;
box-sizing: border-box;
background-color: #032e9e;
border-radius: 0 0 60rpx 60rpx;
.title {
margin-bottom: 40rpx;
display: flex;
height: 80rpx;
line-height: 80rpx;
.title-name {
flex: 1;
text {
padding: 0 70rpx 0 30rpx;
font-size: 36rpx;
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
display: inline-block;
color: #2c3c66;
font-weight: 600;
position: relative;
&:after {
position: absolute;
content: '';
right: 0;
top: 0;
width: 0;
height: 0;
border-width: 40rpx;
border-style: solid;
border-color: transparent #03339e transparent transparent;
}
}
}
.title-img {
width: 110rpx;
}
}
.item {
margin-bottom: 30rpx;
.item-back {
background-color: #002088;
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
position: relative;
.item-title {
font-weight: 600;
font-size:36rpx;
background-image: -webkit-linear-gradient(top,#fdf6ca, #e29c68);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
flex: 1;
margin-bottom: 30rpx;
}
.range {
color: #ffffff;
font-size: 28rpx;
.range-label {
line-height: 40rpx;
padding: 10rpx 0;
display: flex;
.range-label-title {
width: 160rpx;
}
.range-label-text {
width: calc(100% - 160rpx);
text {
display: block;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
}
.shapeWhite-back {
width: 50%;
position: absolute;
left: 0;
bottom: 0;
}
}
.btn {
padding: 40rpx;
box-sizing: border-box;
text-align: center;
.btn-go {
display: inline-block;
background-image: -webkit-linear-gradient(top,#fff8da,#f3c796);
color: #582700;
width: 50%;
font-weight: 600;
font-size: 36rpx;
line-height: 88rpx;
border-radius: 50rpx;
box-shadow: 0 8rpx 6rpx rgba(0, 0, 0, .3);
&.hide{
opacity: .7;
}
}
.order-at{ text-align: center; color: white; font-size: 30rpx; padding-top: 30rpx; }
}
}
}
</style>

501
pages/synthesize/order.vue Normal file
View File

@@ -0,0 +1,501 @@
<template>
<view class="content">
<u-sticky bgColor="#fff" v-if="$Route.query.type != 'synthesis'">
<view class="header-sticky">
<u-tabs
:current="tabsCurrent"
:list="tabs"
:scrollable="tabScroll"
:lineWidth="20"
:lineHeight="4"
:lineColor="`url(${tabsBg}) 100% 100%`"
@click="onTab"
></u-tabs>
</view>
</u-sticky>
<!-- 列表 -->
<view class="list" v-if="orderArr.length > 0">
<block v-for="(item, index) in orderArr" :key="index">
<!-- 年费单 -->
<services-block
v-if="$Route.query.type === 'service'"
:no="item.order_no"
:status="item.status"
:user="item.user"
:time="item.created_at"
:service="item.service"
:price="item.total"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@cancel="onCancel"
@info="onInfo"
@pay="onPay"
@sing="onSing"
@diff="onDiff"
@callPhone="onCallPhone"
/>
<!-- 咨询单 -->
<synthesis-block
v-if="$Route.query.type === 'synthesis'"
:no="item.order_no"
:user="item.user"
:time="item.created_at"
:synthesis="item.synthesis"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
@info="onInfo"
@pay="onPay"
@cancel="onCancel"
/>
<!-- 委托单 -->
<entrust-block
v-if="$Route.query.type === 'entrust'"
:no="item.order_no"
:entrust="item.entrust"
:user="item.user"
:time="item.created_at"
:status="item.status"
:price="item.total"
:diff="item.need_pay_diff_prices"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@info="onInfo"
@pay="onPay"
@sing="onSing"
@diff="onDiff"
@callPhone="onCallPhone"
@cancel="onCancel"
@payTurn="onPayTurn"
/>
<!-- 拓展单 -->
<expand-block
v-if="$Route.query.type === 'expand'"
:no="item.order_no"
:user="item.user"
:time="item.created_at"
:expand="item.expand"
:price="item.total"
:status="item.status"
:diff="item.need_pay_diff_prices"
:lawyer="item.lawyer || {name: ''}"
:isSelf="item.is_self"
:payStatus="item.pay_status"
:can="item.can"
@info="onInfo"
@pay="onPay"
@diff="onDiff"
@callPhone="onCallPhone"
@cancel="onCancel"
/>
</block>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</view>
<view class="null-pages" v-else>
<u-empty
mode="order"
icon="http://cdn.uviewui.com/uview/empty/order.png"
text="暂无相关订单"
>
</u-empty>
</view>
</view>
</template>
<script>
import { certified } from '@/apis/interfaces/user.js'
import { servicesOrder, synthesisOrder, entrustOrder, expandOrder, orderRead, cancelOrder } from '@/apis/interfaces/synthesisOrder.js'
import { esignUrl } from '@/apis/interfaces/synthesis.js'
import entrustBlock from '@/components/entrustOrder.vue'
import expandBlock from '@/components/expandOrder.vue'
import servicesBlock from '@/components/servicesOrder.vue'
import synthesisBlock from '@/components/synthesisOrder.vue'
import permision from "@/js_sdk/wa-permission/permission.js"
export default {
components: { entrustBlock, expandBlock, servicesBlock, synthesisBlock },
data() {
return {
tabsBg : require('@/static/icons/synthesize_icon.png'),
tabType : null,
tabs : [
{ name: '全部', type: null }
],
tabScroll : false,
orderArr : [],
funName : '',
isRefresh : false, // 更新页面数据
// 分页
page : {
current : 1
},
pagesShow : false,
status : '',
tabsCurrent : null,
};
},
created() {
let funName = ''
let tabsArr = []
let tabName = ''
let isScroll = false
// 订单类型
switch(this.$Route.query.type){
case 'service':
funName = servicesOrder
tabName = '年费订单'
tabsArr = [
{ name: '待支付', type: 0 },
{ name: '待签约', type: 1 },
{ name: '已签约', type: 2 },
{ name: '已退款', type: 3 },
]
break;
case 'synthesis':
funName = synthesisOrder
tabName = '咨询订单'
break;
case 'entrust':
isScroll = true
funName = entrustOrder
tabName = '委托咨询订单'
tabsArr = [
{ name: '待支付', type: 0 },
{ name: '待审核', type: 1 },
{ name: '待签约', type: 2 },
{ name: '已签约', type: 3 },
{ name: '已完成', type: 4 },
{ name: '已驳回', type: 5 },
]
break;
case 'expand':
funName = expandOrder
tabName = '拓展订单'
tabsArr = [
{ name: '待支付', type: 0 },
{ name: '已支付', type: 1 },
{ name: '已退款', type: 2 },
]
break;
}
this.tabs = [
...this.tabs,
...tabsArr
]
this.tabScroll = isScroll
this.funName = funName
uni.setNavigationBarTitle({
title: tabName
})
let { status } = this.$Route.query
this.tabType = status
this.tabsCurrent = this.tabs.findIndex(val => val.type == status);
this.getList()
},
onShow() {
if(this.isRefresh){
this.page = { current: 1 }
this.getList()
}
},
methods: {
// 切换tab
onTab(e) {
let { type } = e;
if(this.tabType != type){
this.tabType = type
this.page.current = 1
this.getList()
}
},
// 委托单线上支付被驳回
onPayTurn(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
uni.showModal({
title : '提示',
content : '支付驳回原因:' + orderObj.remark,
showCancel : false
})
},
// 取消订单
onCancel(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
let orderIndex = orderArr.findIndex(val => val.order_no === no)
uni.showModal({
title : '提示',
content : '确认取消当前订单嘛?',
success : modalRes => {
if(modalRes.confirm){
uni.showLoading({
title: '加载中...',
mask : true
})
cancelOrder(this.$Route.query.type, orderObj.order_id).then(res => {
this.orderArr.splice(orderIndex, 1)
uni.showToast({
title: '订单已取消',
icon : 'none'
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
})
},
// 签约
onSing(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
uni.showLoading({
title: '加载中...',
mask : true
})
certified().then(res => {
let { e_sign } = res
if(!e_sign){
uni.hideLoading()
uni.showModal({
title : '提示',
content : '暂未实名认证,请实名后在完成签约',
cancelText : '稍后认证',
confirmText : '去认证',
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({name: 'UserCertification'})
}
}
})
return
}
esignUrl({
order_type : orderObj.order_type,
order_id : orderObj.order_id,
app_scheme : "doufire://",
redirect_url: getApp().globalData.signUrl,
channel : "app"
}).then(signRes => {
this.$Router.push({
name: 'ESign',
params: {
url: signRes.sign_url
}
})
uni.hideLoading()
}).catch(signErr => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 支付
onPay(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
let { can, price, order_id, order_type } = orderObj
switch(can.pay_status){
case 1:
this.expressSheet(order_id, order_type, can, price)
break;
case 2:
uni.showToast({
title: '打款凭证审核中,请耐心等待',
icon : 'none'
})
break;
case 3:
uni.showModal({
title : '审核被驳回',
content : '驳回原因:' + orderObj.offline_pays.remark,
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({
name : 'BankPay',
params : {
payId : orderObj.offline_pays.offline_pay_id,
type : 'edit',
orderId : orderObj.order_id,
orderType : orderObj.order_type.replace(/\\/g, '-'),
price : orderObj.price
}
})
}
}
})
break;
}
},
// 选择支付方式
expressSheet(id, type, can, price) {
this.price = price
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.push({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.push({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
},
// 打开详情
onInfo(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
let orderId = orderObj.order_id
let orderType = this.$Route.query.type
let pagesName = ''
switch(this.$Route.query.type){
case 'service':
pagesName = 'OrderServicesInfo'
break;
case 'synthesis':
pagesName = 'OrderSynthesisInfo'
break;
case 'entrust':
pagesName = 'OrderEntrustInfo'
break;
case 'expand':
pagesName = 'OrderExpandInfo'
break;
}
this.$Router.push({
name : pagesName,
params : {
id: orderId
}
})
},
// 补差价
onDiff(no){
let orderArr = this.orderArr
let orderObj = orderArr.find(val => val.order_no === no)
this.$Router.push({
name : 'Difference',
params : {
orderId : orderObj.order_id,
ordertype : orderObj.order_type.replace(/\\/g, '-')
}
})
},
// 联系电话
async onCallPhone(number){
let result = await permision.requestAndroidPermission('android.permission.CALL_PHONE')
// 检查用户权限
if(result == 1){
uni.makePhoneCall({
phoneNumber: number
})
return
}
// 引导用户设置联系电话
uni.showModal({
title : '提示',
content : '请授权应用获得[拨打电话]权限',
showCancel : false,
confirmText : '设置',
success : modalRes => {
permision.gotoAppPermissionSetting()
}
})
},
// 获取列表信息
getList(){
uni.showLoading({
title: '加载中...',
mask : true
})
this.funName({
status: this.tabType,
page : this.page.current
}).then(res => {
let { data, page } = res
this.orderArr = page.current == 1 ? data: this.orderArr.concat(data)
this.page = page
this.pagesShow = !page.has_more
this.status = page.has_more ? 'loading' : 'nomore'
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.page.current++
this.getList()
return
}
},
onHide() {
this.isRefresh = true
}
}
</script>
<style lang="scss">
.content{ padding-bottom: 10rpx; box-sizing: border-box; }
// 滑块
.header-sticky{ padding-bottom: 12rpx; }
// 列表
.list{ overflow: hidden; padding-top: 30rpx; }
// 内容为空
.null-pages{ height: 70vh; display: flex; align-items: center; justify-content: center; }
</style>

View File

@@ -0,0 +1,169 @@
<template>
<view class="content">
<image class="expandImg" src="https://cdn.douhuofalv.com/images/2023/04/19/df2ecf6ece3e59de1d51c4ad09aa68f3.jpg" mode="widthFix"></image>
<view class="list">
<view class="list-title">
<view class="list-title-number">expand</view>
<view class="list-title-name">法律服务拓展包</view>
<view class="list-title-trim"></view>
</view>
<view class="list-item">
<view class="list-label" v-for="(item, index) in entrustArr" :key="index">
<view class="list-label-name">
{{item.title}}
</view>
<view class="list-label-price"><rich-text :nodes="item.content"></rich-text></view>
<view class="list-label-go" @click="$Router.push({name: 'ExpandWrite', params: { entrustId: item.expand_id, title: item.title }})">购买</view>
</view>
</view>
</view>
<image class="expandBttom" src="https://cdn.douhuofalv.com/images/2023/04/17/fc4cad00a630e3d69b3f486e9d2937e9.png" mode="widthFix"></image>
</view>
</template>
<script>
import { expandsList } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
entrustArr: [], //案件委托列表
}
},
created() {
// 获取-案件委托-列表
this.yearServe();
},
methods: {
// 案件委托-列表
yearServe(){
expandsList().then(res => {
this.entrustArr = res
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #121d4c;
}
.expandImg,
.expandBttom{
width: 100%;
display: block;
}
.list {
padding: 0 30rpx 30rpx;
box-sizing: border-box;
background-color: #121d4c;
.list-title {
font-size: 36rpx;
margin-bottom: 40rpx;
color: #ffffff;
.list-title-trim {
position: relative;
left: 390rpx;
bottom: 28rpx;
background-color: #2f3aae;
width: 35%;
height: 4rpx;
padding-left: 40rpx;
box-sizing: border-box;
&::after {
position: absolute;
content: '';
left: -50rpx;
top: -10rpx;
width: 20rpx;
height: 20rpx;
transform:rotate(45deg);
background-color: #2f3aae;
}
}
.list-title-number {
font-weight: 600;
font-size: 58rpx;
background-image: -webkit-linear-gradient(top,#ffffff 40%, transparent 70%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
text-transform: uppercase;
}
.list-title-name {
font-size: 44rpx;
margin-top: -20rpx;
width: 390rpx;
}
}
.list-item {
position: relative;
padding-left: 100rpx;
box-sizing: border-box;
&::after {
position: absolute;
content: '';
left: 10rpx;
top: 0;
border-left: 4rpx dashed #3b46d6;
width: 0;
height: calc(100% - 64rpx);
}
.list-label {
background-image: linear-gradient(to right,#3d48dd, #1f2a6f);
padding: 15rpx 40rpx 15rpx 90rpx;
box-sizing: border-box;
border-radius: 80rpx 15rpx 15rpx 80rpx;
margin-bottom: 30rpx;
color: #ffffff;
position: relative;
&::before {
position: absolute;
content: '';
left: -88rpx;
top: calc(50% - 1rpx);
border-bottom: 4rpx dashed #3b46d6;
width: 60rpx;
height: 0;
}
&::after {
position: absolute;
content: '';
left: 40rpx;
top: calc(50% - 9rpx);
background-color: #091443;
width: 18rpx;
height: 18rpx;
border-radius: 50%;
}
.list-label-name {
margin-bottom: 5rpx;
}
.list-label-price {
line-height: 48rpx;
}
.list-label-go {
position: absolute;
right: 30rpx;
top: 35rpx;
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
color: #12053d;
display: inline-block;
line-height: 54rpx;
padding: 0 35rpx;
border-radius: 54rpx;
font-size: 28rpx;
font-weight: 600;
}
}
}
}
</style>

View File

@@ -0,0 +1,383 @@
<template>
<view class="content">
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">法律咨询单</view>
<view class="number">{{orderAll.all}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
<view class="title">已缴费</view>
<view class="number">{{orderAll.payed}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_03.png"></image>
<view class="title">已退款</view>
<view class="number">{{orderAll.refund}}<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.price}}<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('SynthesizeOrder', { type: 'synthesis' })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderSynthesis.all > 0">{{orderSynthesis.all}}</view>
<view class="text">咨询单</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">年费单</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 0, type: 'service' })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderService.init > 0">{{orderService.init}}</view>
<view class="text">待支付</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 1, type: 'service' })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderService.paid > 0">{{orderService.paid}}</view>
<view class="text">待签约</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 2, type: 'service' })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderService.signed > 0">{{orderService.signed}}</view>
<view class="text">已签约</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { status: 3, type: 'service' })">
<image class="icon" src="@/static/icons/work_icon_09.png"></image>
<view class="number" v-if="orderService.refund > 0">{{orderService.refund}}</view>
<view class="text">已退款</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { synthesisServices } from '@/apis/interfaces/work.js'
export default {
data() {
return {
// 综法订单管理
orderAll : '',
orderService : '',
orderSynthesis : ''
};
},
onShow() {
this.getIndex()
},
methods: {
// 工作台信息
getIndex(){
uni.showLoading({
title: '加载中...',
mask : true
})
// 综法法律咨询单统计
synthesisServices().then(res => {
uni.hideLoading()
this.orderAll = res.all
this.orderService = res.orders.service
this.orderSynthesis = res.orders.synthesis
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 导航
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
}
}
}
</script>
<style lang="scss" scoped>
.content{
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>

View File

@@ -0,0 +1,217 @@
<template>
<view class="info-content" v-if="service.title">
<view class="header">
<div class="title">订单详情</div>
</view>
<view class="block">
<view class="block-header border-solid">
<view class="title">
<text>业务类型</text>
<view>{{service.title}}</view>
</view>
<view class="price">
<text>实付</text>
<view>{{price}}</view>
</view>
</view>
<view class="block-item border-solid">
<view class="block-item-flex">
<label>下单用户</label>
<view class="val">{{user.nickname}}</view>
</view>
<view class="block-item-flex">
<label>用户手机</label>
<view class="val">{{user.username}}</view>
</view>
</view>
<view class="block-item">
<view class="block-item-flex" v-for="(item, index) in params" :key="index">
<label>{{item.title || '-'}}</label>
<view class="val" v-if="item.type === 'pro_city'">{{item.value_text.join_text}}</view>
<view class="val" v-else>{{item.value_text || '-'}}</view>
</view>
</view>
</view>
<view class="block" v-if="lawyer != null">
<view class="block-item">
<view class="block-item-flex">
<label>服务律师</label>
<view class="val">{{lawyer.name}}</view>
</view>
<view class="block-item-flex">
<label>律师电话</label>
<view class="val">{{lawyer.username}}</view>
</view>
</view>
</view>
<view class="block">
<view class="block-item">
<view class="block-item-flex">
<label>支付方式</label>
<view class="val">{{payType || '-'}}</view>
</view>
<view class="block-item-flex">
<label>业务姓名</label>
<view class="val">{{user.parent.nickname}}</view>
</view>
<view class="block-item-flex">
<label>业务手机</label>
<view class="val">{{user.parent.username}}</view>
</view>
<view class="block-item-flex" v-if="centerUser != ''">
<label>运营中心</label>
<view class="val">{{centerUser}}</view>
</view>
<view class="block-item-flex">
<label>订单编号</label>
<view class="val">{{no}}</view>
</view>
<view class="block-item-flex">
<label>创建时间</label>
<view class="val">{{createdAt}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { servicesInfo } from '@/apis/interfaces/synthesisOrder.js'
export default {
data() {
return {
service : {},
params : [],
createdAt : '',
user : {},
lawyer : null,
price : '0.00',
payType : '',
centerUser: ''
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
servicesInfo(this.$Route.query.id).then(res => {
let { service, params, created_at, user, order_no, total, lawyer, pay_driver_text, center_user } = res;
this.lawyer = lawyer
this.service = service
this.params = params
this.createdAt = created_at
this.user = user
this.no = order_no
this.price = total
this.payType = pay_driver_text || ''
this.centerUser = center_user
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
}
}
</script>
<style lang="scss" scoped>
.info-content{
padding-top: var(--status-bar-height);
position: relative;
background: #eeefff;
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 10rpx;
&::before{
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
height: 50vh;
content: " ";
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
// 头部
.header{
position: relative;
z-index: 1;
padding: 100rpx 40rpx 70rpx;
.title{
font-size: 50rpx;
color: white;
font-weight: bold;
text{
font-weight: 400;
font-size: 30rpx;
margin-left: 20rpx;
}
}
.subtitle{
color: white;
margin-top: 10rpx;
}
}
// 模块
.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;
.title{
width: calc(100% - 200rpx);
text{
font-size: 30rpx;
line-height: 30rpx;
color: gray;
}
view{
font-weight: bold;
font-size: 40rpx;
line-height: 50rpx;
}
}
.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: 10rpx 0;
font-size: 30rpx;
display: flex;
color: #555;
justify-content: space-between;
label{ width: 240rpx; }
.val{
text-align: right;
width: calc(100% - 240rpx);
}
}
}
}
}
</style>

View File

@@ -0,0 +1,473 @@
<template>
<view class="content">
<view class="top">
<view class="top-cont">
<view class="top-cont-name">法律咨询服务包</view>
<view class="top-cont-text">请仔细填写以下信息</view>
</view>
<image class="top-img" src="https://cdn.douhuofalv.com/images/2023/04/20/2ea5fc20ffc90e7feec7ba2650b81c99.png" mode="widthFix"></image>
</view>
<view class="idcardBorder">
<!-- 表单部分 -->
<view class="idcardAdd-block">
<block v-for="(item, keyIndex) in paramsArr" :key="keyIndex">
<view class="idcardAdd-block-name">
<view class="idcardAdd-block-see">
<text v-if="item.is_required == 1">*</text>{{item.title}}
</view>
</view>
<!-- 单输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'text'">
<input class="idcardAdd-input" type="text" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<view class="idcardAdd-block-write" v-if="item.type === 'number' || item.type === 'mobile' || item.type === 'day'">
<input class="idcardAdd-input" type="number" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 价格输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'price'">
<input class="idcardAdd-input" type="digit" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 密码输入框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'password'">
<input class="idcardAdd-input" type="safe-password" v-model="item.value" :placeholder="'请输入' + item.title" />
</view>
<!-- 下拉框 -->
<view class="idcardAdd-block-write" v-if="item.type === 'select'">
<picker class="idcardAdd-picker" :range="item.options" :value="item.value" @change="item.value = $event.detail.value">
<view class="nowrap">
<!-- {{item.options[item.value]}} -->
{{item.options[item.value]}}
</view>
<image class="idcardAdd-picke-image" src="@/static/imgs/basic_down.png" mode="aspectFill"></image>
</picker>
</view>
<!-- 单选 -->
<view class="idcardAdd-aline" v-if="item.type === 'radio'">
<radio-group @change="item.value = $event.detail.value">
<label class="idcardAdd-aline-write" v-for="(radioItem, radioIndex) in item.options" :key="radioIndex">
<radio :value="radioIndex" color="#446EFE" style="transform:scale(.65)" :checked="item.value === radioIndex" /><text>{{radioItem}}</text>
</label>
</radio-group>
</view>
<!-- 被告所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'defendant_address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="defendantPicker"
></uni-data-picker>
</view>
</block>
<!-- 目前所在地 -->
<block v-if="item.type === 'pro_city' && item.key === 'address'">
<view class="idcardAdd-block-write">
<uni-data-picker
:localdata="cityPicker"
:border="false"
split="-"
placeholder="选择城市"
@change="addressPicker"
></uni-data-picker>
</view>
</block>
</block>
</view>
</view>
<view class="idcardBtn">
<button class="idcardBtn-go" type="default" @click="onSubmit">确认提交</button>
</view>
</view>
</template>
<script>
import { yearSynthInfo, yearSynthPost } from '@/apis/interfaces/synthesis'
import { createCity } from '@/apis/interfaces/user'
import mouldInput from '@/components/mould-input.vue'
export default {
components: {
mouldInput
},
data() {
return {
paramsArr : [], // 信息
cityPicker : [], // 地址
// 被告所在地
defendant : {},
// 目前所在地
address : {},
orderId : '', // 订单 ID
orderType : '', // 订单类型
price : ''
}
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
// 获取综法咨询-详情
this.getBusiness();
// 省市区
createCity().then(res => {
this.cityPicker = res;
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
methods: {
// 综法咨询-详情
getBusiness(){
yearSynthInfo(this.$Route.query.serveId).then(res => {
let { params, price } = res;
params.map(val => {
if(val.type === 'checkbox'){
val.value = []
}else if(val.type === 'select'){
val.value = 0
}else{
val.value = ""
}
})
this.price = price
this.paramsArr = params
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
// 被告所在地-选择城市
defendantPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.defendant = dataArr
},
// 目前所在地-选择城市
addressPicker(e){
let { value } = e.detail
let dataArr = {
province_id: value[0].value,
city_id: value[1].value
}
this.address = dataArr
},
// 提交订单数据
onSubmit(){
uni.showLoading({
title: '提交中...',
mask : true
})
let subData = {};
let dataArr = [];
for(let val of this.paramsArr){
if(val.type === 'pro_city'){
subData[val.key] = this.address
}else{
subData[val.key] = val.value
}
}
for(let key in subData){
dataArr.push({
key,
value: subData[key]
})
}
yearSynthPost(this.$Route.query.serveId, {
data: dataArr,
type: 'self',
channel: 'app',
user_id: ''
}).then(res => {
uni.hideLoading()
this.expressSheet(res.service_order_id, res.order_type, res.can )
}).catch( err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 选择支付方式
expressSheet(id, type, can) {
this.orderId = id
this.orderType = type
// 仅支持线下打款
if(!can.online){
this.onToBankPay()
return
}
// 选择线上、下支付方式
uni.showActionSheet({
itemList: ['线上支付', '线下支付'],
success: sheetRes => {
if(sheetRes.tapIndex == 0){
this.$Router.replace({
name: 'Pay',
params: {
paytype : 'synthesize',
orderId : id,
orderType : type.replace(/\\/g, '-')
},
})
return
}
this.onToBankPay()
}
})
},
// 去线下打款
onToBankPay(){
this.$Router.replace({
name: 'BankPay',
params: {
orderId : this.orderId,
orderType : this.orderType.replace(/\\/g, '-'),
price : this.price
},
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
background-color: #111e4b;
width: 100vw;
height: 100%;
overflow-y: scroll;
position: fixed;
}
.top {
position: relative;
height: 150rpx;
.top-img {
position: absolute;
right: 0;
top: 0;
width: 35%;
}
.top-cont {
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 40rpx 30rpx;
box-sizing: border-box;
.top-cont-name {
font-weight: 600;
font-size: 44rpx;
background-image: linear-gradient(to right,#f1c694, #fffbf6 42%);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
margin-bottom: 10rpx;
}
.top-cont-text {
font-size: 34rpx;
color: #ffffff;
}
}
}
.idcardBorder {
padding: 30rpx;
box-sizing: border-box;
}
.idcardAdd-block {
padding: $padding + 20 $padding;
box-sizing: border-box;
background-color: #ffffff;
border-radius: $radius;
position: relative;
}
.idcardAdd-block-write {
background-color: #f7faff;
height: 90rpx;
line-height: 90rpx;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
width: 100%;
font-size: 30rpx;
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.idcardAdd-input {
width: 100%;
height: 100%;
display: flex;
border: none;
background-color: transparent;
font-size: 30rpx;
}
}
.idcardAdd-picker {
position: relative;
width: 100%;
}
.idcardAdd-picke-image {
width: 24rpx;
height: 24rpx;
position: absolute;
top: $margin;
right: $margin;
}
.idcardAdd-block-name {
margin-bottom: $margin;
display: flex;
.idcardAdd-block-see {
color: $text-color;
margin-right: $margin;
font-size: 30rpx;
text {
color: red;
padding-right: 10rpx;
}
}
}
.idcardAdd-aline {
display: flex;
position: absolute;
right: 0;
top: 0;
}
// 按钮
.idcardBtn {
background-color: #111e4b;
width: 100%;
padding: 20rpx 60rpx 60rpx;
box-sizing: border-box;
display: flex;
.idcardBtn-go {
width: 100%;
background-image: linear-gradient(to bottom, #fff2d2, #f9cd9e);
color: #582700;
font-weight: 600;
font-size: 36rpx;
border-radius: $radius * 3;
height: 94rpx;
line-height: 94rpx;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .5);
text-align: center;
&[disabled] {
background-color: #f9f9f9;
border-color: #e2e2e2;
color: #959595;
}
&::after {
display: none;
}
}
}
// 打款凭证弹出
.voucherBack {
position: fixed;
width: 100vw;
height: 100vh;
left: 0;
top: 0;
z-index: 99;
background-color: rgba(0, 0, 0, .6);
display: none;
&.active {
display: block;
}
}
.voucherPop {
-webkit-box-orient: vertical;
-webkit-box-pack: center;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
padding: 0 10%;
box-sizing: border-box;
display: none;
&.active {
display: -webkit-box;
}
.tipsWhite {
background-color: #ffffff;
border-radius: 20rpx;
position: relative;
.voucherPop-img {
position: absolute !important;
top: -80rpx;
right: calc(50% - 100rpx);
width: 200rpx;
}
.voucherPop-title {
box-sizing: border-box;
padding: 50rpx 70rpx;
margin-top: 100rpx;
text-align: center;
.voucherPop-name {
font-weight: 600;
font-size: 38rpx;
}
.voucherPop-text {
padding: 30rpx 0 35rpx;
line-height: 44rpx;
}
.voucherPop-btn {
display: flex;
.voucherPop-go {
flex: 2;
text-align: center;
border: 2rpx solid #da2b56;
color: #da2b56;
margin: 0 15rpx;
line-height: 74rpx;
border-radius: 10rpx;
background-color: #ffffff;
&.voucherPop-up {
background-color: #da2b56;
color: #ffffff;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,219 @@
<template>
<view class="info-content" v-if="synthesis.title">
<view class="header">
<div class="title">订单详情</div>
</view>
<view class="block">
<view class="block-header border-solid">
<view class="title">
<text>业务类型</text>
<view>{{synthesis.title}}</view>
</view>
<view class="price">
<text>实付</text>
<view>{{price}}</view>
</view>
</view>
<view class="block-item border-solid">
<view class="block-item-flex">
<label>下单用户</label>
<view class="val">{{user.nickname}}</view>
</view>
<view class="block-item-flex">
<label>用户手机</label>
<view class="val">{{user.username}}</view>
</view>
</view>
<view class="block-item">
<view class="block-item-flex" v-for="(item, index) in params" :key="index">
<label>{{item.title || '-'}}</label>
<view class="val" v-if="item.type === 'pro_city'">{{item.value_text.join_text}}</view>
<view class="val" v-else>{{item.value_text || '-'}}</view>
</view>
</view>
</view>
<view class="block" v-if="lawyer != null">
<view class="block-item">
<view class="block-item-flex">
<label>服务律师</label>
<view class="val">{{lawyer.name}}</view>
</view>
<view class="block-item-flex">
<label>律师电话</label>
<view class="val">{{lawyer.username}}</view>
</view>
</view>
</view>
<view class="block">
<view class="block-item">
<view class="block-item-flex">
<label>支付方式</label>
<view class="val">{{payType}}</view>
</view>
<view class="block-item-flex">
<label>业务姓名</label>
<view class="val">{{user.parent.nickname}}</view>
</view>
<view class="block-item-flex">
<label>业务手机</label>
<view class="val">{{user.parent.username}}</view>
</view>
<view class="block-item-flex" v-if="centerUser != ''">
<label>运营中心</label>
<view class="val">{{centerUser}}</view>
</view>
<view class="block-item-flex">
<label>订单编号</label>
<view class="val">{{no}}</view>
</view>
<view class="block-item-flex">
<label>创建时间</label>
<view class="val">{{createdAt}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { synthesisInfo } from '@/apis/interfaces/synthesisOrder.js'
export default {
data() {
return {
synthesis : {},
params : [],
createdAt : '',
user : {},
payType : '',
lawyer : null,
price : '0.00',
centerUser: ''
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
synthesisInfo(this.$Route.query.id).then(res => {
let { synthesis, params, created_at, user, order_no, price, lawyer, pay_driver_text, center_user } = res;
this.synthesis = synthesis
this.params = params
this.createdAt = created_at
this.user = user
this.no = order_no
this.price = price
this.lawyer = lawyer
this.payType = pay_driver_text || '-'
this.centerUser= center_user
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
}
}
</script>
<style lang="scss" scoped>
.info-content{
padding-top: var(--status-bar-height);
position: relative;
background: #eeefff;
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 10rpx;
&::before{
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
height: 50vh;
content: " ";
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
// 头部
.header{
position: relative;
z-index: 1;
padding: 100rpx 40rpx 70rpx;
.title{
font-size: 50rpx;
color: white;
font-weight: bold;
text{
font-weight: 400;
font-size: 30rpx;
margin-left: 20rpx;
}
}
.subtitle{
color: white;
margin-top: 10rpx;
}
}
// 模块
.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: 10rpx 0;
font-size: 30rpx;
display: flex;
color: #555;
justify-content: space-between;
label{ width: 240rpx; }
.val{
text-align: right;
width: calc(100% - 240rpx);
}
}
}
}
}
</style>

View File

@@ -172,9 +172,6 @@
status: this.tabs[this.tabsCurrent].val,
type : this.type
}).then(res => {
console.log(res)
let { data } = res;
this.orders = data
}).catch(err => {

View File

@@ -26,7 +26,7 @@
<!-- 合同文件 -->
<view class="files-title">合同文件列表</view>
<view class="files">
<view class="files-flex" v-for="(item, index) in files" :key="index" @click="onPdf(item.fileName, item.downloadUrl)">
<view class="files-flex" v-for="(item, index) in files" :key="index" @click="isX5(item.fileName, item.downloadUrl)">
<view class="files-flex-title">{{item.fileName}}</view>
<view class="files-flex-id">{{item.fileId}}</view>
<u-icon class="files-flex-icon" name="arrow-right" size="28rpx"></u-icon>
@@ -35,7 +35,7 @@
<!-- 附件文件 -->
<view class="files-title">附件文件列表</view>
<view class="files">
<view class="files-flex" v-for="(item, index) in attachments" :key="index" @click="onPdf(item.fileName, item.downloadUrl)">
<view class="files-flex" v-for="(item, index) in attachments" :key="index" @click="isX5(item.fileName, item.downloadUrl)">
<view class="files-flex-title">{{item.fileName}}</view>
<view class="files-flex-id">{{item.fileId}}</view>
<u-icon class="files-flex-icon" name="arrow-right" size="28rpx"></u-icon>
@@ -45,7 +45,9 @@
</template>
<script>
const plugin = uni.requireNativePlugin('Pdf-Plugin')
// const plugin = uni.requireNativePlugin('Pdf-Plugin')
const open = uni.requireNativePlugin("Html5App-openFile");
import { getFlows } from '@/apis/interfaces/user.js'
export default {
data() {
@@ -88,13 +90,67 @@
})
},
methods: {
isX5(name, url){
// #ifdef APP-PLUS
if (uni.getSystemInfoSync().platform === 'android') {
let iswxX5 = open.isLoadTbs();
if(!iswxX5){
uni.showLoading({
title: '内核下载中...',
mask : true
})
uni.downloadFile({
url : 'https://douhuo-storage.oss-cn-beijing.aliyuncs.com/tbs_core_046239_20230210162827_nolog_fs_obfs_arm64-v8a_release.tbs',
success : x5 => {
open.installLocalTbs({
tbsFilePath : plus.io.convertLocalFileSystemURL(x5.tempFilePath),
isdelete : true
}, (installTabsRes) => {
switch(installTabsRes.code){
case '1':
uni.showLoading({
title: '内核安装中...',
mask : true
})
break;
case '0':
this.onPdf(name, url)
break;
case '-2':
uni.showToast({
title: '工具安装失败,请稍后重试, 错误码: ' + installTabsRes.msg,
})
break;
default:
uni.showToast({
title: installTabsRes.msg,
icon : 'none'
})
}
})
},
fail : x5Err => {
uni.showToast({
title: '工具安装失败,合同打开失败,请检查您的网络并稍后重试',
icon : 'none'
})
}
})
return
}
this.onPdf(name, url)
}
// #endif
},
onPdf(name, url){
plugin.showPdf({
title : name,
url : url,
maxScale : '20',
waterMark : '河北抖火法律咨询服务有限公司',
// this.user.name + ' ' + this.user.mobile,
uni.downloadFile({
url,
success: path => {
open.openFile({
filename : plus.io.convertLocalFileSystemURL(path.tempFilePath),
isShowBackIcon : true
})
}
})
}
},

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view>
<view class="user-info">
<block v-if="isAuth">
<view class="user-info-left">
@@ -42,7 +42,7 @@
</view>
</block>
</view>
<view class="border-solid-empty"></view>
<view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('AccountIntegral')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_00.png"></image>火力值
@@ -55,10 +55,16 @@
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="border-solid-empty"></view>
<view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('FreeService')" v-if="isAuth">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_11.png"></image>{{freeTitle}}
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('UserTeam')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的客户
<image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的团队
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
@@ -87,18 +93,30 @@
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onParent">
<view class="nav-flex" @click="onParent('parent')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
</view>
<view class="nav-flex" @click="onParent('salesman')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_10.png"></image>业务联系人
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('WeChat')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
</view>
<!-- <view class="nav-flex" @click="onReckoner">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_09.png"></image>盘债计算器
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> -->
<view class="border-solid-empty"></view>
<view class="nav-flex" @click="updateApp">
<view class="nav-icon">
@@ -165,12 +183,28 @@
<view class="button" @click="sureYunYing">确认名称</view>
</view>
</u-popup>
<!-- 盘债计算机二维码 -->
<!-- <u-popup :show="reckonerShow" mode="center" bgColor="transparent">
<view class="reckoner-lay">
<view class="reckoner-content">
<image class="reckoner-code" :src="reckonerQrcode" mode="widthFix"></image>
<view class="reckoner-url" @click="onCopyUrl(reckonerURL)">邀请码{{reckonerInvite}}<text>复制</text></view>
<view class="reckoner-btn" @click="onIsSeve">保存海报</view>
<image class="reckoner-back" src="@/static/imgs/reckoner-back.png" mode="aspectFill"></image>
</view>
<u-icon name="close-circle-fill" size="42" color="#fff" @click="reckonerShow = false"></u-icon>
</view>
</u-popup> -->
<!-- 海报 -->
<!-- <l-painter class="l-painter" :board="reckonerPoster" isCanvasToTempFilePath @success="qrcodePath"/> -->
</view>
</template>
<script>
import { info, relationsVerify, relationsBind, submitTeamName } from '@/apis/interfaces/user.js'
import { info, relationsVerify, relationsBind, submitTeamName, debtUrl } from '@/apis/interfaces/user.js'
import { getVersions } from '@/apis/interfaces/versions'
import { request } from '../../apis';
import permision from "@/js_sdk/wa-permission/permission.js"
export default {
data() {
return {
@@ -206,33 +240,192 @@
team_status :'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
team_id :'',
region_status :'', // 状态 0 不展示 大区中心 1可以申请但是没有完善2申请完审核中3已通过已修改
region_id :'',
region_id :'',
// 计算器
reckonerShow : false,
reckonerURL : '',
reckonerQrcode : '',
reckonerInvite : '',
reckonerPoster : {},
salesman : '', // 业务联系人
freeTitle : '' // 自由服务包标题
};
},
onShow() {
this.isAuth = this.$store.getters.getToken != ''
if (this.$store.getters.getToken != '') this.getUserInfo()
if (this.$store.getters.getToken != '') this.getUserInfo()
},
methods: {
methods: {
// 检查保存海报权限
async onIsSeve(){
let result = await permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')
// 检查用户权限
if(result == 1){
this.onDowQRcode()
return
}
// 引导用户设置联系电话
uni.showModal({
title : '提示',
content : '请授权应用获得[写入相册]权限',
showCancel : false,
confirmText : '设置',
success : modalRes => {
permision.gotoAppPermissionSetting()
}
})
},
// 保存盘债计算器海报
onDowQRcode(){
uni.showLoading({
title: '获取海报中...',
mask : true
})
this.reckonerPoster = {
css: {
width: '600rpx',
borderRadius: '20rpx'
},
views: [
{
css: {
width: '600rpx',
height: '840rpx',
objectFit: 'cover',
borderRadius: '20rpx'
},
src : require('@/static/imgs/reckoner-back.png'),
type: "image"
},
{
css: {
width: '440rpx',
height: '440rpx',
position: 'absolute',
left: '80rpx',
top: '120rpx',
borderRadius: '20rpx'
},
src : this.reckonerQrcode,
type: "image"
}, {
type: 'text',
text: '邀请码:' + this.reckonerInvite,
css: {
textAlign: 'center',
color: '#fff',
position: 'absolute',
left: '30rpx',
top: '600rpx',
width: '540rpx',
lineHeight: '50rpx',
fontSize: '16px',
fontWeight: 'bold'
}
}, {
type: 'text',
text: '使用微信扫一扫,打开盘债计算器',
css: {
textAlign: 'center',
color: '#fff',
position: 'absolute',
left: '30rpx',
top: '670rpx',
width: '540rpx',
lineHeight: '50rpx',
fontSize: '14px'
}
},
]
}
},
// 识别产品
onPhone(e){
uni.chooseImage({
crop : {
quality : 100,
width : 300,
height : 300,
},
success: res => {
console.log(res)
},
fail : err => {
console.log(err)
}
})
},
// 生成海报地址
qrcodePath(path){
uni.hideLoading()
uni.saveImageToPhotosAlbum({
filePath: path,
success :() => {
uni.showToast({
title: '海报已保存,赶快去分享吧',
icon : 'none'
})
},
fail : () => {
uni.showToast({
title: '保存失败,请检查系统权限',
icon : 'none'
})
}
});
},
// 复制用户地址
onCopyUrl(url){
uni.setClipboardData({
data : url,
success : res => {
uni.showToast({
title: '地址已复制'
})
}
})
},
// 盘债计算器
onReckoner() {
if(!this.isAuth){
this.$Router.push({
name: 'Auth'
})
return
}
uni.showLoading({
title: '获取邀请码',
mask : true
})
debtUrl().then(res => {
uni.hideLoading()
let { url, qrcode, invite } = res;
this.reckonerURL = url
this.reckonerQrcode = qrcode
this.reckonerInvite = invite
this.reckonerShow = true
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 获取用户信息
getUserInfo() {
uni.showLoading({
title: '加载中...'
})
info().then(res => {
let {
nickname,
identity,
avatar,
certification,
parent,team_name,teams
} = res
info().then(res => {
let { nickname, identity, avatar, certification, parent,team_name,teams, salesman, free } = res
this.freeTitle= free.title
this.nickname = nickname
this.identity = identity
this.avatar = avatar
this.certification = certification
this.parent = parent
this.team_name = team_name
this.salesman = salesman
uni.hideLoading()
// team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
this.team_status = teams.center.status // 运营中心状态
@@ -290,33 +483,39 @@
})
},
// 导航
onNav(name) {
this.$Router.push({
name
})
onNav(name) {
this.$Router.push({name})
},
// 推荐关系
onParent() {
if (this.parent == '') {
onParent(type) {
if(!this.isAuth){
this.$Router.push({
name: 'Auth'
})
return
}
let phone = type == 'parent' ? this.parent.username : this.salesman.username
let name = type == 'parent' ? this.parent.nickname : this.salesman.nickname
if (type == 'parent' && this.parent == '') {
this.showBind = true
return
}
uni.showModal({
title: '我的推荐人',
content: this.parent.nickname,
confirmText: '关闭',
cancelText: '联系TA',
title : type == 'parent' ? '我的推荐人': '我的业务联系人',
content : name + '['+ phone +']',
confirmText : '关闭',
cancelText : '联系TA',
success: modalRes => {
if (modalRes.cancel) {
uni.makePhoneCall({
phoneNumber: this.parent.username
phoneNumber: phone
})
}
}
})
},
// 绑定邀请码
onBind() {
onBind() {
// 检验邀请码
if (this.isInvitation) {
if (this.invitation === '') {
@@ -396,7 +595,6 @@
},
// 运营中心确认按钮处理
sureYunYing(){
console.log(this.team_status,this.region_status)
if(this.yunying_name == '' || this.yunying_name.length == 0){
uni.showToast({
title:this.team_status == 1?'请完善法务运营中心名称':'请完善大区运营中心名称',
@@ -437,7 +635,8 @@
// 获取系统版本号
getVersions({
platform: plus.os.name,
version : plus.runtime.version
version : plus.runtime.version,
channel : 'app'
}).then(res => {
uni.hideLoading()
if (res.update) {
@@ -498,7 +697,61 @@
}
</script>
<style lang="scss">
<style lang="scss">
// 计算器弹出层
.l-painter{ position: fixed; top: -100%; left: -100%; }
.reckoner-lay{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.reckoner-content{
border-radius: 20rpx;
padding: 70rpx 50rpx;
width: 75vw;
box-sizing: border-box;
margin-bottom: 30rpx;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.reckoner-back{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.reckoner-code{
width: 45vw;
height: 45vw;
margin-top: 20rpx;
margin-bottom: 30rpx;
}
.reckoner-btn{
margin-top: 50rpx;
background: white;
color: #051437;
width: 55vw;
text-align: center;
line-height: 100rpx;
border-radius: 50rpx;
font-size: 34rpx;
}
.reckoner-url{
color: white;
text-align: center;
font-size: 30rpx;
text{ font-weight: bold; margin-left: 15rpx; }
}
}
}
// close-circle-fill
// 导航栏
.nav-flex {
height: 120rpx;
padding: 0 30rpx;

View File

@@ -38,6 +38,14 @@
</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" @click="onLogout">
<label>退出登录</label>
@@ -91,7 +99,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.content{
padding-top: 30rpx;
box-sizing: border-box;

View File

@@ -1,21 +1,36 @@
<template>
<view class="content">
<view class="log-blcok" v-for="(item, index) in logs" :key="index" @click="onInfo(item.business_order_id)">
<view class="flex">
<label>订单编号</label>
<view class="val">{{item.order_no}}</view>
<block v-if="logs.length <= 0">
<view class="null-pages">
<u-empty
mode="history"
icon="http://cdn.uviewui.com/uview/empty/history.png"
text="暂无合同签约记录"
>
</u-empty>
</view>
<view class="flex">
<label>业务类型</label>
<view class="val">
<text v-for="(titem, tindex) in item.item_type" :key="tindex">{{titem.title}}</text>
</block>
<block v-else>
<view class="log-blcok" v-for="(item, index) in logs" :key="index" @click="onInfo(item.business_order_id)">
<view class="flex">
<label>订单编号</label>
<view class="val">{{item.order_no}}</view>
</view>
<view class="flex">
<label>业务类型</label>
<view class="val">
<text v-for="(titem, tindex) in item.item_type" :key="tindex">{{titem.title}}</text>
</view>
</view>
<view class="flex">
<label>签约时间</label>
<view class="val">{{item.created_at}}</view>
</view>
</view>
<view class="flex">
<label>签约时间</label>
<view class="val">{{item.created_at}}</view>
<view class="pages-loding" v-if="isLoding">
<u-loadmore :status="status" loadingIcon="semicircle" />
</view>
</view>
</block>
</view>
</template>
@@ -24,7 +39,10 @@
export default {
data() {
return {
logs: [],
status : 'loading',
isLoding: false,
logs : [],
page : { current : 0 }
};
},
created() {
@@ -37,10 +55,14 @@
mask : true
})
getSignLogs({
page: 1
page: this.page.current
}).then(res => {
this.logs = res.data
this.page = res.page
let { data, page } = res;
let atArr = page.current == 1 ? [] : this.logs
this.logs = atArr.concat(data)
this.page = page
this.status = !page.has_more ? 'nomore': 'loading'
this.isLoding = !page.has_more
uni.hideLoading()
}).catch(err => {
uni.showToast({
@@ -55,6 +77,13 @@
params : { id }
})
}
},
onReachBottom(){
this.isLoding = true
if(this.page.has_more){
this.page.current++
this.getLog()
}
}
}
</script>
@@ -68,6 +97,7 @@
border-radius: $radius;
padding: $padding;
position: relative;
margin-bottom: 20rpx;
// .log-icon{ position: absolute; right: $margin; top: 50%; margin-top: -14rpx; }
.flex{
display: flex;
@@ -77,4 +107,10 @@
label{ color: gray; }
}
}
// 分页加载
.pages-loding{ padding: 10rpx; }
// 记录为空
.null-pages{ display: flex; align-items: center; justify-content: space-around; height: 80vh;}
</style>

View File

@@ -1,13 +1,23 @@
<template>
<view class="content">
<view class="total">
<!-- <view class="total">
<uni-icons type="staff" size="50" color="white"></uni-icons>
<view class="total-user">
<view class="total-number">{{count.one}}</view>
<view class="total-title">客户总人数</view>
<view class="total-title">总人数</view>
</view>
</view>
</view> -->
<u-sticky>
<u-tabs
:list="tabs"
:scrollable="false"
:current="tabVal"
style="margin-bottom: 30rpx;"
keyName="title"
lineColor="#446EFE"
@click="onClick"
></u-tabs>
</u-sticky>
<block v-if="users.length > 0">
<view class="team-item" v-for="(item, index) in users" :key="index" @click="onCallPhone(item.real_username)">
<u-avatar :src="item.avatar" size="48"></u-avatar>
@@ -44,10 +54,12 @@
</template>
<script>
import { relations } from '@/apis/interfaces/user.js'
import { relations, relationsTab } from '@/apis/interfaces/user.js'
export default {
data() {
return {
tabs : [],
tabVal : 0,
users : [],
count : {
all: 0
@@ -62,9 +74,29 @@
};
},
created() {
this.getList()
uni.showLoading({
title: '加载中...',
mask : true
})
relationsTab().then(res => {
uni.hideLoading()
this.tabs = res
this.getList()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
// 切换tabs
onClick(e){
this.tabVal = e.index
this.page = { current : 1, has_more: false },
this.getList()
},
// 获取列表
getList(){
uni.showLoading({
title: '加载中...',
@@ -72,11 +104,10 @@
})
relations({
larer : 1,
page : this.page.current
page : this.page.current,
key : this.tabs[this.tabVal].key
}).then(res => {
let { users, count } = res;
console.log(users)
let atList = users.page.current == 1 ? [] : this.users
this.count = count
this.users = atList.concat(users.data)
@@ -113,10 +144,11 @@
.content{
box-sizing: border-box;
background: white;
padding-top: 1rpx;
}
// 统计数据
.total{
margin: 30rpx;
margin: 30rpx 30rpx 0;
background: linear-gradient(to top left, #446EFE, #0f36bb);
box-shadow: 10rpx 0 15rpx 15rpx rgba(0, 0, 0, .03);
border-radius: 20rpx;
@@ -216,4 +248,6 @@
}
}
}
// 空页面
.list-null{ height: 60vh; display: flex; align-items: center; justify-content: center; }
</style>

330
pages/work/account.vue Normal file
View 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
View 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>

View File

@@ -18,11 +18,11 @@
<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}" @click="onBusiness(item.business_id)">
<image class="create-type-icon" :src="item.cover_url" mode="aspectFill"></image>
<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.subtitle || '-'}}</view>
<view class="submit nowrap">{{item.self_type == 'synthesis' ? '相关个人法律咨询服务' : item.subtitle || '-'}}</view>
</view>
</view>
</block>
@@ -36,12 +36,14 @@
<script>
import { business } from '@/apis/interfaces/business.js'
import { synthList } from '@/apis/interfaces/synthesis.js'
export default {
data() {
return {
createType : '',
businessArr: [],
businessId : '',
selfType : '',
user : ''
};
},
@@ -54,19 +56,31 @@
}
},
created() {
business().then(res => {
this.businessArr = res
this.businessId = res[0].business_id
uni.showLoading({
title: '加载中...',
mask : true
})
Promise.all([business(), synthList()]).then(res => {
let businessData = res[0]
let synthListData = res[1]
this.businessArr = this.createType === 'other' || this.createType === 'offline' ? businessData : businessData.concat(synthListData)
this.businessId = this.businessArr[0].business_id
this.selfType = this.businessArr[0].self_type
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
}).finally(() => {
uni.hideLoading()
})
},
methods: {
// 选择业务类型
onBusiness(id){
onBusiness(id, type){
this.selfType = type
this.businessId = id
},
// 创建业务单
@@ -78,7 +92,43 @@
})
return
}
// 个人综法业务
if(this.selfType === 'synthesis'){
let synthesisArr = []
let synthesisObj = {}
for(let val of this.businessArr){
if(val.self_type == 'synthesis'){
synthesisArr.push(val)
}
}
synthesisObj = synthesisArr.find(val => val.synthesis_id === this.businessId)
if(synthesisObj.can.buy){
this.$Router.replace({
name : 'FeeWrite',
params : {
synthesisId : synthesisObj.synthesis_id
}
})
return
}
uni.showModal({
title : '提示',
content : '开通个人365会员尊享全年不限次数免费法律咨询是否立即开通',
confirmText : '开通会员',
cancelText : '稍后开通',
success : modalRes => {
if(modalRes.confirm){
this.$Router.replace({
name: 'Individual'
})
}
}
})
return
}
let busines = this.businessArr.find(val => val.business_id === this.businessId)
// 金法业务
this.$Router.replace({
name : 'WorkGenerate',
params : {
@@ -97,7 +147,8 @@
.create-page{
padding: 50rpx;
box-sizing: border-box;
height: 100vh;
min-height: 100vh;
overflow: hidden;
.create-title{
text-align: center;
font-weight: bold;

323
pages/work/delegation.vue Normal file
View 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>

View File

@@ -11,20 +11,14 @@
<!-- 机构 -->
<view class="block-item">
<label class="block-item-label"><text>*</text>机构</label>
<!-- <picker :range="item.institution" range-key="title" :value="item.institutionIndex" @change="institutionChange($event, item, index)">
<view class="institution-picker">
<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>
</picker> -->
<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>
<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>
@@ -333,7 +327,7 @@
}).then(res => {
uni.showModal({
title : '提示',
content : '订单已创建,请尽快提醒用户完善用户资料',
content : '咨询订单已创建,请尽快提醒用户完善用户资料',
showCancel : false,
success : () => {
this.$Router.back()

View File

@@ -0,0 +1,639 @@
<template>
<view class="content">
<view v-if="isAuth">
<!-- 状态栏 -->
<u-sticky bgColor="#FFFFFF">
<view class="status_bar"></view>
<view class="work-bar">
<view class="work-bar-user">
<image class="cover" :src="userInfo.avatar || require('@/static/imgs/default-active.png')" mode="aspectFill"></image>
<view class="nickname">{{userInfo.nickname}}<text class="card" v-if="isManager">{{identity.name}}</text></view>
</view>
<view class="work-bar-add" @click="onCreateOrder" v-if="isManager">
<uni-icons class="icon" type="plusempty" size="30rpx" color="#111"></uni-icons>创建订单
</view>
</view>
</u-sticky>
<!-- 未认证或未考试 -->
<block v-if="!isManager">
<view class="block open-interest">
<view class="title">实习顾问专属权益</view>
<view class="open-interest-flex">
<view class="open-interest-item" v-for="(item, index) in rightsArr" :key="index" @click="onToast(item)">
<image class="open-interest-icon" :src="item.icon"></image>
<view class="open-interest-text">{{item.title}}</view>
</view>
</view>
</view>
<view class="block open-interest">
<view class="title">仅需3步即可成为实习顾问</view>
<view class="open-interest-block">
<image class="open-interest-icon" :src="isCertification ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_24.png')"></image>
<view class="open-interest-text">
<view class="open-interest-title">实名认证</view>
<view class="open-interest-submit">通过身份证实名认证</view>
</view>
<button class="open-interest-btn" size="mini" :disabled="isCertification" @click="$Router.push({name: 'UserCertification'})">{{isCertification ? '已认证': '去认证'}}</button>
</view>
<view class="open-interest-block">
<image class="open-interest-icon" :src="isAnswer ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_23.png')"></image>
<view class="open-interest-text">
<view class="open-interest-title">通过实习顾问考试</view>
<view class="open-interest-submit">通过线上考试即可完成</view>
</view>
<button class="open-interest-btn" size="mini" :disabled="isAnswer" @click="$Router.pushTab({name: 'CollegeTest'})">{{isAnswer ? '已通过': '去考试'}}</button>
</view>
<view class="open-interest-block">
<image class="open-interest-icon" :src="sign.isSign ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_27.png')"></image>
<view class="open-interest-text">
<view class="open-interest-title">实习顾问签约</view>
<view class="open-interest-submit">完成实习顾问在线签约</view>
</view>
<button class="open-interest-btn" size="mini" :disabled="sign.isSign" @click="onSign">{{sign.isSign ? '已签约': '去签约'}}</button>
</view>
</view>
<!-- 提示信息 -->
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
<view class="privilege-lay">
<image class="privilege-lay-img" src="@/static/imgs/privilege-lay-header.png" mode="widthFix"></image>
<view class="privilege-lay-content"><text>{{privilegeText}}</text></view>
<view class="privilege-lay-remove">
<u-icon class="privilege-lay-icon" name="close-circle" color="white" size="30" @click="privilegeShow = false"></u-icon>
</view>
</view>
</u-popup>
</block>
<!-- 管理中台 -->
<block v-else>
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">预约咨询单</view>
<view class="number">{{orderCount.init_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
<view class="title">已缴费</view>
<view class="number">{{orderCount.service_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_02.png"></image>
<view class="title">办理完成</view>
<view class="number">{{orderCount.b_complete}}<text></text></view>
</view>
<view class="total-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_03.png"></image>
<view class="title">已退款</view>
<view class="number">{{orderCount.refund}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_04.png"></image>
<view class="title">完成结算</view>
<view class="number">{{orderCount.settlement_count}}<text></text></view>
</view>
<view class="total-item" @click="onNav('AccountBonus')">
<image class="icon" src="@/static/icons/work_icon_05.png"></image>
<view class="title">结算金额</view>
<view class="number">{{orderCount.settlement_price}}<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('Orders', { 'type': 0 })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderCount.a_init > 0">{{orderCount.a_init}}</view>
<view class="text">待预约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_21.png"></image>
<view class="number" v-if="orderCount.a_service > 0">{{orderCount.a_service}}</view>
<view class="text">匹配服务包</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 3 })">
<image class="icon" src="@/static/icons/work_icon_07.png"></image>
<view class="number" v-if="orderCount.a_serviced > 0">{{orderCount.a_serviced}}</view>
<view class="text">待缴服务费</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderCount.b_sign > 0">{{orderCount.b_sign}}</view>
<view class="text">待签约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 5 })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderCount.a_bank > 0">{{orderCount.a_bank}}</view>
<view class="text">待完善资料</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 6 })">
<image class="icon" src="@/static/icons/work_icon_09.png"></image>
<view class="number" v-if="orderCount.b_check > 0">{{orderCount.b_check}}</view>
<view class="text">初审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 7 })">
<image class="icon" src="@/static/icons/work_icon_12.png"></image>
<view class="number" v-if="orderCount.b_recheck > 0">{{orderCount.b_recheck}}</view>
<view class="text">复审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 8 })">
<image class="icon" src="@/static/icons/work_icon_13.png"></image>
<view class="number" v-if="orderCount.b_process > 0">{{orderCount.b_process}}</view>
<view class="text">办理中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 9 })">
<image class="icon" src="@/static/icons/work_icon_14.png"></image>
<view class="number" v-if="orderCount.b_confirm > 0">{{orderCount.b_confirm}}</view>
<view class="text">待结案</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_15.png"></image>
<!-- <view class="number" v-if="orderCount.b_complete > 0">{{orderCount.b_complete}}</view> -->
<view class="text">办理完成</view>
</view>
</view>
</view>
<!-- 综法订单 -->
<view class="block">
<view class="block-title">综法订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { type: 'service' })">
<image class="icon" src="@/static/synthesize/icon_00.png"></image>
<view class="number" v-if="synthesisData.service.all > 0">{{synthesisData.service.all}}</view>
<view class="text">年费订单</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { type: 'synthesis' })">
<image class="icon" src="@/static/synthesize/icon_01.png"></image>
<view class="number" v-if="synthesisData.synthesis.all > 0">{{synthesisData.synthesis.all}}</view>
<view class="text">咨询订单</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { type: 'entrust' })">
<image class="icon" src="@/static/synthesize/icon_02.png"></image>
<view class="number" v-if="synthesisData.entrust.all > 0">{{synthesisData.entrust.all}}</view>
<view class="text">委托订单</view>
</view>
<view class="tool-flex-item" @click="onNav('SynthesizeOrder', { type: 'expand' })">
<image class="icon" src="@/static/synthesize/icon_03.png"></image>
<view class="number" v-if="synthesisData.expand.all > 0">{{synthesisData.expand.all}}</view>
<view class="text">拓展订单</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">转让订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'out' })">
<image class="icon" src="@/static/icons/work_icon_26.png"></image>
<view class="number" v-if="orderCount.transfer_out > 0">{{orderCount.transfer_out}}</view>
<view class="text">转出订单</view>
</view>
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'in' })">
<image class="icon" src="@/static/icons/work_icon_19.png"></image>
<view class="number" v-if="orderCount.transfer_in > 0">{{orderCount.transfer_in}}</view>
<view class="text">转入订单</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">特殊订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('ModifyOrder', {})">
<image class="icon" src="@/static/icons/work_icon_16.png"></image>
<view class="number" v-if="orderCount.audit_bank > 0">{{orderCount.audit_bank}}</view>
<view class="text">修改资料</view>
</view>
<view class="tool-flex-item" @click="onNav('PoorOrder', {})">
<image class="icon" src="@/static/icons/work_icon_17.png"></image>
<view class="number" v-if="orderCount.diff_prices > 0">{{orderCount.diff_prices}}</view>
<view class="text">补差价</view>
</view>
<view class="tool-flex-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_18.png"></image>
<view class="number" v-if="orderCount.refund > 0">{{orderCount.refund}}</view>
<view class="text">退款订单</view>
</view>
</view>
</view>
</block>
</view>
<!-- 未登录 -->
<view v-else class="auth-null">
<u-empty
mode="permission"
icon="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/09/04/3482a50a7b37798129c8754200c10466.png"
text="暂未登录"
/>
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
</view>
</view>
</template>
<script>
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
export default {
data() {
return {
isAuth : false,
rightsArr : [],
userInfo : {
nickname: '',
avatar : ''
},
identity : {},
isAnswer : false,
isCertification : false,
certification : null,
isManager : false,
orderCount : {},
// 权益说明
privilegeShow : false,
privilegeText : '',
// 签约状态
sign : {
isSign : false,
address : ""
},
// 综法订单管理
synthesisData : {}
};
},
onShow() {
let i = 0;
this.isAuth = this.$store.getters.getToken != ''
if(this.isAuth){
this.getIndex()
}
},
methods: {
// 签约
onSign(){
if(!this.isCertification){
uni.showToast({
title: '暂未实名认证,无法签约,请完成实名认证',
icon : 'none'
})
return
}
if(this.sign.address == ''){
uni.showToast({
title: '暂时无法签约,请前往“我的”,点击用户头像,完善通讯地址信息后重试',
icon : 'none'
})
return
}
uni.showLoading({
title : '获取签约地址',
mask : true
})
sign().then(res => {
uni.hideLoading()
this.$Router.push({
name : 'ESign',
params : {
url: res.sign_url
}
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 显示业务员权益
onToast(val){
this.privilegeText = val.content
this.privilegeShow = true
},
// 工作台信息
getIndex(){
uni.showLoading({
title: '加载中...',
mask : true
})
Promise.all([rights(), index(), synthesisCount()]).then(res => {
let rightsData = res[0],
indexData = res[1],
synthesisData = res[2]
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData
this.rightsArr = rightsData
this.userInfo = {
nickname,
avatar
}
this.isCertification = isCertification
this.certification = certification
this.isManager = isManager
this.isAnswer = isAnswer
this.orderCount = business_orders_count
this.identity = identity
this.sign = sign
this.synthesisData = synthesisData
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 导航
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
// 创建订单
onCreateOrder(){
uni.showActionSheet({
itemList: ['个人订单', '客户订单'],
success : res => {
this.onNav('OrderCreate', {
type: res.tapIndex === 0 ? 'self' : 'other'
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content{
padding-bottom: 30rpx;
}
// 登录提示
.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: 80vw;
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>

View File

@@ -9,15 +9,16 @@
<image class="cover" :src="userInfo.avatar || require('@/static/imgs/default-active.png')" mode="aspectFill"></image>
<view class="nickname">{{userInfo.nickname}}<text class="card" v-if="isManager">{{identity.name}}</text></view>
</view>
<view class="work-bar-add" @click="onCreateOrder" v-if="isManager">
<uni-icons class="icon" type="plusempty" size="30rpx" color="#111"></uni-icons>创建订单
</view>
<view class="work-bar-add" @click="onCreateOrder" v-if="isWorker">
<uni-icons class="icon" type="plusempty" size="30rpx" color="#111"></uni-icons>创建订单
</view>
</view>
</u-sticky>
<!-- 未认证或未考试 -->
<block v-if="!isManager">
<!-- ! -->
<!-- 工作台无权限 -->
<block v-if="!isWorker">
<view class="block open-interest">
<view class="title">实习顾问专属权益</view>
<view class="title">专属权益</view>
<view class="open-interest-flex">
<view class="open-interest-item" v-for="(item, index) in rightsArr" :key="index" @click="onToast(item)">
<image class="open-interest-icon" :src="item.icon"></image>
@@ -25,7 +26,16 @@
</view>
</view>
</view>
<view class="block open-interest">
<view class="block work-hint">
<u-empty
mode="permission"
icon="http://cdn.uviewui.com/uview/empty/permission.png"
:text="workerHint"
textColor="gray"
>
</u-empty>
</view>
<!-- <view class="block open-interest">
<view class="title">仅需3步即可成为实习顾问</view>
<view class="open-interest-block">
<image class="open-interest-icon" :src="isCertification ? require('@/static/icons/work_icon_25.png'): require('@/static/icons/work_icon_24.png')"></image>
@@ -51,7 +61,7 @@
</view>
<button class="open-interest-btn" size="mini" :disabled="sign.isSign" @click="onSign">{{sign.isSign ? '已签约': '去签约'}}</button>
</view>
</view>
</view> -->
<!-- 提示信息 -->
<u-popup :show="privilegeShow" mode="center" bgColor="transparent">
<view class="privilege-lay">
@@ -64,150 +74,44 @@
</u-popup>
</block>
<!-- 管理中台 -->
<block v-else>
<view class="block">
<view class="block-title">统计数据</view>
<view class="total-flex">
<view class="total-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_00.png"></image>
<view class="title">预约咨询单</view>
<view class="number">{{orderCount.init_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_01.png"></image>
<view class="title">已缴费</view>
<view class="number">{{orderCount.service_payed}}<text></text></view>
</view>
<view class="total-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_02.png"></image>
<view class="title">办理完成</view>
<view class="number">{{orderCount.b_complete}}<text></text></view>
</view>
<view class="total-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_03.png"></image>
<view class="title">已退款</view>
<view class="number">{{orderCount.refund}}<text></text></view>
</view>
<view class="total-item">
<image class="icon" src="@/static/icons/work_icon_04.png"></image>
<view class="title">完成结算</view>
<view class="number">{{orderCount.settlement_count}}<text></text></view>
</view>
<view class="total-item" @click="onNav('AccountBonus')">
<image class="icon" src="@/static/icons/work_icon_05.png"></image>
<view class="title">结算金额</view>
<view class="number">{{orderCount.settlement_price}}<text></text></view>
</view>
</view>
<view class="flex" v-else>
<view class="flex-item" @click="onNav('businessOrder', {bigId: item.id})" v-for="(item, index) in bigfiveArr" :key="index">
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/040906a765db310d77722cec9e0b9f46.png" mode="widthFix" v-if="index == 0"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/e0ac4aae85290f1148cea0005ed523a7.png" mode="widthFix" v-else-if="index == 1"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/8ff1eeeebd37b89026db8c2b8d1f87fc.png" mode="widthFix" v-else-if="index == 2"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/03167bf2cacaa63b6b0eebdf0fe31a92.png" mode="widthFix" v-else-if="index == 3"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/4dfe17b98e15dfdbae30df1a4fcddeaf.png" mode="widthFix" v-else></image>
<view class="flex-title">
<view class="flex-name">{{item.title}}订单</view>
<view class="flex-tips">{{item.subtitle}}</view>
</view>
<image class="flex-arrow" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/943544e5693c009bbe873ddaedd9c4be.png" mode="widthFix"></image>
</view>
<view class="block">
<view class="block-title">订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 0 })">
<image class="icon" src="@/static/icons/work_icon_06.png"></image>
<view class="number" v-if="orderCount.a_init > 0">{{orderCount.a_init}}</view>
<view class="text">待预约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 2 })">
<image class="icon" src="@/static/icons/work_icon_21.png"></image>
<view class="number" v-if="orderCount.a_service > 0">{{orderCount.a_service}}</view>
<view class="text">匹配服务包</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 3 })">
<image class="icon" src="@/static/icons/work_icon_07.png"></image>
<view class="number" v-if="orderCount.a_serviced > 0">{{orderCount.a_serviced}}</view>
<view class="text">待缴服务费</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 4 })">
<image class="icon" src="@/static/icons/work_icon_10.png"></image>
<view class="number" v-if="orderCount.b_sign > 0">{{orderCount.b_sign}}</view>
<view class="text">待签约</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 5 })">
<image class="icon" src="@/static/icons/work_icon_08.png"></image>
<view class="number" v-if="orderCount.a_bank > 0">{{orderCount.a_bank}}</view>
<view class="text">待完善资料</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 6 })">
<image class="icon" src="@/static/icons/work_icon_09.png"></image>
<view class="number" v-if="orderCount.b_check > 0">{{orderCount.b_check}}</view>
<view class="text">初审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 7 })">
<image class="icon" src="@/static/icons/work_icon_12.png"></image>
<view class="number" v-if="orderCount.b_recheck > 0">{{orderCount.b_recheck}}</view>
<view class="text">复审中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 8 })">
<image class="icon" src="@/static/icons/work_icon_13.png"></image>
<view class="number" v-if="orderCount.b_process > 0">{{orderCount.b_process}}</view>
<view class="text">办理中</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 9 })">
<image class="icon" src="@/static/icons/work_icon_14.png"></image>
<view class="number" v-if="orderCount.b_confirm > 0">{{orderCount.b_confirm}}</view>
<view class="text">待结案</view>
</view>
<view class="tool-flex-item" @click="onNav('Orders', { 'type': 10 })">
<image class="icon" src="@/static/icons/work_icon_15.png"></image>
<!-- <view class="number" v-if="orderCount.b_complete > 0">{{orderCount.b_complete}}</view> -->
<view class="text">办理完成</view>
</view>
</view>
<view class="flex-item" @click="onNav('businessOther')">
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/3f917a849dd07e254aaa9b0f218c8a0a.png" mode="widthFix"></image>
<view class="flex-title">
<view class="flex-name">其他咨询类订单</view>
<view class="flex-tips">信用卡贷款个人客户等</view>
</view>
<image class="flex-arrow" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/943544e5693c009bbe873ddaedd9c4be.png" mode="widthFix"></image>
</view>
<view class="block">
<view class="block-title">转让订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'out' })">
<image class="icon" src="@/static/icons/work_icon_26.png"></image>
<view class="number" v-if="orderCount.transfer_out > 0">{{orderCount.transfer_out}}</view>
<view class="text">转出订单</view>
</view>
<view class="tool-flex-item" @click="onNav('TransfersOrders', { type: 'in' })">
<image class="icon" src="@/static/icons/work_icon_19.png"></image>
<view class="number" v-if="orderCount.transfer_in > 0">{{orderCount.transfer_in}}</view>
<view class="text">转入订单</view>
</view>
</view>
</view>
<view class="block">
<view class="block-title">特殊订单管理</view>
<view class="tool-flex">
<view class="tool-flex-item" @click="onNav('ModifyOrder', {})">
<image class="icon" src="@/static/icons/work_icon_16.png"></image>
<view class="number" v-if="orderCount.audit_bank > 0">{{orderCount.audit_bank}}</view>
<view class="text">修改资料</view>
</view>
<view class="tool-flex-item" @click="onNav('PoorOrder', {})">
<image class="icon" src="@/static/icons/work_icon_17.png"></image>
<view class="number" v-if="orderCount.diff_prices > 0">{{orderCount.diff_prices}}</view>
<view class="text">补差价</view>
</view>
<view class="tool-flex-item" @click="onNav('RefundOrder')">
<image class="icon" src="@/static/icons/work_icon_18.png"></image>
<view class="number" v-if="orderCount.refund > 0">{{orderCount.refund}}</view>
<view class="text">退款订单</view>
</view>
</view>
</view>
</block>
</view>
</view>
<!-- 未登录 -->
<view v-else class="auth-null">
<u-empty
mode="permission"
icon="http://cdn.uviewui.com/uview/empty/permission.png"
text="暂未登录"
>
</u-empty>
mode="permission"
icon="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/06/06/c95ebcf8641fcbd413f990d661f638cb.gif"
text="暂未登录"
/>
<button class="auth-null-btn" size="mini" @click="onNav('Auth')">登录</button>
</view>
</view>
</template>
<script>
import { index, rights, sign } from '@/apis/interfaces/work.js'
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
import { bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
@@ -230,7 +134,15 @@
sign : {
isSign : false,
address : ""
}
},
// 综法订单管理
synthesisData : {},
bigfiveArr : [],
captchaShow : false,
// 工作台权限
isWorker : false,
workerHint : ""
};
},
onShow() {
@@ -238,9 +150,30 @@
this.isAuth = this.$store.getters.getToken != ''
if(this.isAuth){
this.getIndex()
}
}
this.bigfiveInfo();
},
methods: {
methods: {
// 最新五大板块
bigfiveInfo(){
bigfive({parent_id: 0}).then(res=>{
this.bigfiveArr = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 选择学期
onChange(e){
console.log(e)
},
// 签约
onSign(){
if(!this.isCertification){
@@ -287,11 +220,12 @@
title: '加载中...',
mask : true
})
Promise.all([rights(), index()]).then(res => {
let rightsData = res[0],
indexData = res[1]
Promise.all([rights(), index(), synthesisCount()]).then(res => {
let rightsData = res[0],
indexData = res[1],
synthesisData = res[2]
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData
let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign, is_worker, no_worker_message } = indexData
this.rightsArr = rightsData
this.userInfo = {
nickname,
@@ -304,39 +238,88 @@
this.orderCount = business_orders_count
this.identity = identity
this.sign = sign
this.synthesisData = synthesisData
this.isWorker = is_worker
this.workerHint = no_worker_message
uni.hideLoading()
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 导航
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
// 创建订单
onCreateOrder(){
uni.showActionSheet({
itemList: ['个人订单', '客户订单'],
success : res => {
this.onNav('OrderCreate', {
type: res.tapIndex === 0 ? 'self' : 'other'
})
}
})
onCreateOrder(){
// 最新五大板块
uni.showActionSheet({
itemList: [this.bigfiveArr[0].title,this.bigfiveArr[1].title, this.bigfiveArr[2].title, this.bigfiveArr[3].title, this.bigfiveArr[4].title],
success : res => {
switch (res.tapIndex){
case 0:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[0].children)) })
break;
case 1:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[1].children)) })
break;
case 2:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[2].children)) })
break;
case 3:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[3].children)) })
break;
case 4:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[4].children)) })
break;
}
}
})
// 旧数据备份
// uni.showActionSheet({
// itemList: ['线下订单','个人订单', '客户订单'],
// success : res => {
// switch (res.tapIndex){
// case 0:
// this.onNav('MagAccount2')
// break;
// case 1:
// this.onNav('OrderCreate', { type: 'self' })
// break;
// case 2:
// this.onNav('OrderCreate', { type: 'other' })
// break;
// }
// }
// })
}
}
}
</script>
<style lang="scss" scoped>
.content{
.content{
padding-bottom: 30rpx;
}
// 权限提示
.work-hint{
height: 50vh;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: gray;
font-size: 30rpx;
}
// 登录提示
.auth-null{
height: 100vh;
@@ -607,4 +590,46 @@
}
}
}
.flex{
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
.flex-item {
padding: 40rpx;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 30rpx;
display: flex;
position: relative;
margin-bottom: 30rpx;
.flex-icon {
width: 80rpx;
display: block;
margin-top: 10rpx;
}
.flex-title {
width: calc(100% - 80rpx);
padding: 0 30rpx;
box-sizing: border-box;
.flex-name {
font-weight: bold;
color: #405477;
font-size: 34rpx;
margin-bottom: 5rpx;
}
.flex-tips {
font-size: 28rpx;
color: #b2bbc9;
}
}
.flex-arrow {
width: 50rpx;
position: absolute;
right: 30rpx;
top: calc(50% - 25rpx);
}
}
}
</style>

View File

@@ -159,7 +159,6 @@
},
// 选择物流公司
onPicker(e){
console.log(e)
this.expressIndex = e.detail.value
},
// 扫码

View File

@@ -120,7 +120,7 @@
methods: {
// 订单详情
getInfo(){
info(this.orderId).then(res => {
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

View File

@@ -77,7 +77,6 @@
<view class="btns-item btns-border" v-if="item.status.value == 3" @click="$Router.push({name: 'Pay', params: {orderId: item.business_order_id, type: 'acting', paytype: 'price'}})">缴费</view>
<view class="btns-item btns-border" v-if="item.status.value == 5" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id, type: 'perfect'}})">完善</view>
<view class="btns-item btns-border" v-if="item.status.value == 6" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id }})">查看资料</view>
<!-- type: 'perfect' -->
<view class="btns-item btns-border" v-if="item.status.value == 8" @click="$Router.push({name: 'OrderLog', params: {orderId: item.business_order_id}})">查看记录</view>
<view class="btns-item btns-border" v-if="item.can.confirm && item.is_my" @click="$Router.push({name: 'ConfirmScheme', params: {orderId: item.business_order_id,}})">去确认</view>
<view class="btns-item" @click="$Router.push({name: 'OrderInfo', params: {orderId: item.business_order_id}})">查看</view>
@@ -112,7 +111,7 @@
<script>
import { lists, orderSign, getOrderSignStatus, orderCancel } from '@/apis/interfaces/order.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 {
data() {
return {

View File

@@ -185,7 +185,6 @@
</block>
</view>
</template>
<script>
import { perfectBase, updPerfectBase, historyBase } from '@/apis/interfaces/order.js'
import { region } from '@/apis/interfaces/address.js'
@@ -349,7 +348,6 @@
}
}
</script>
<style lang="scss">
.content{
padding-top: 30rpx;
@@ -450,4 +448,4 @@
}
}
}
</style>
</style>

View File

@@ -22,9 +22,6 @@
})
baseBase(this.$Route.query.itemId).then(res => {
let { params } = res;
console.log(params)
this.params = params
uni.hideLoading()
}).catch(err => {

View File

@@ -40,6 +40,8 @@
</view>
</view>
</view>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</block>
<block v-else>
<view class="null">
@@ -58,8 +60,14 @@
export default {
data() {
return {
orders: [],
page : ''
orders : [],
// 分页
page : {
current : 1,
has_more: false,
},
pagesShow : false,
status : ''
}
},
created() {
@@ -87,10 +95,15 @@
},
// 获取订单列表
getList(){
ordersDiffs().then(res => {
ordersDiffs({
page : this.page.current
}).then(res => {
let { data, page } = res;
this.orders = data
this.page = page
let atList = page.current == 1 ? [] : this.orders
this.orders = atList.concat(data)
this.page = page
this.pagesShow = false
}).catch(err => {
uni.showToast({
title: err.message,
@@ -101,12 +114,22 @@
// 变更当前列表状态
removeListVal(id){
let ListArr = this.orders
let ListIndex = ListArr.findIndex(val => val.business_order_id == id)
let ListIndex = ListArr.findIndex(val => val.order_id == id)
if(ListIndex >= 0){
this.orders.splice(ListIndex, 1)
}
this.$store.commit('setOrderId', null)
},
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.status = 'loading';
this.page.current++
this.getList()
return
}
this.status = 'nomore';
}
}
</script>

View File

@@ -38,6 +38,8 @@
</view>
</view>
</view>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</view>
<!-- 订单是空的 -->
<view class="order-null" v-else>
@@ -56,7 +58,14 @@
export default {
data() {
return {
orders: []
orders : [],
// 分页
page : {
current : 1,
has_more: false,
},
pagesShow : false,
status : ''
};
},
created() {
@@ -66,10 +75,15 @@
// 获取列表
getList(){
refunds({
status: ''
status: '',
page : this.page.current
}).then(res => {
let { data } = res;
this.orders = data
let { data, page } = res;
let atList = page.current == 1 ? [] : this.orders
this.orders = atList.concat(data)
this.page = page
this.pagesShow = false
}).catch(err => {
uni.showToast({
title: err.message,
@@ -77,6 +91,16 @@
})
})
}
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.status = 'loading';
this.page.current++
this.getList()
return
}
this.status = 'nomore';
}
}
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Some files were not shown because too many files have changed in this diff Show More