Compare commits
11 Commits
9f1ff579ce
...
up-line
| Author | SHA1 | Date | |
|---|---|---|---|
| 149b75a7dd | |||
| eab46f3108 | |||
| f75e48a3f9 | |||
| 480d4416c2 | |||
| 3f8baac1bd | |||
| a234b15f65 | |||
| 06771c8a68 | |||
| 5f290f3b78 | |||
| cba40b636e | |||
| 8b742c6212 | |||
| 2758d4b5b2 |
@@ -15,14 +15,6 @@
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"bundleId" : "io.douhuofalv.com",
|
||||
"certificateFile" : "/Users/tmoct5/Documents/App证书/抖火/抖火法律苹果证书/DevDouhuoApp.p12",
|
||||
"certificateProfileFile" : "/Users/tmoct5/Documents/App证书/抖火/抖火法律苹果证书/DevDouhuoApp.mobileprovision",
|
||||
"playground" : "custom",
|
||||
"runSignStatus" : 0,
|
||||
"type" : "uni-app:app-ios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
1
App.vue
1
App.vue
@@ -2,7 +2,6 @@
|
||||
import { getVersions } from './apis/interfaces/versions'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
return
|
||||
//#ifdef APP-PLUS
|
||||
// 获取系统版本号
|
||||
getVersions({
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# dou-Fire
|
||||
|
||||
抖火App ( 现在线上版本 2023-12-15)
|
||||
抖火App -- 上架 - 版本 删除修改部分功能 使用~
|
||||
@@ -11,7 +11,7 @@ import router from '../router'
|
||||
// 基础配置
|
||||
const config = {
|
||||
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
||||
apiUrl : 'https://douhuo.demos.uzchain.tech/api/', //测试环境
|
||||
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
||||
timeout : 60000
|
||||
}
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
@@ -39,35 +39,9 @@ const buy = 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
|
||||
buy
|
||||
}
|
||||
|
||||
|
||||
@@ -54,72 +54,6 @@ const fwbDetail = (service) =>{
|
||||
})
|
||||
}
|
||||
|
||||
// 账户管理类
|
||||
const accountManagement = () => {
|
||||
return request({
|
||||
url: "account_management/index"
|
||||
})
|
||||
}
|
||||
|
||||
// 账户管理类 - 办理
|
||||
const accountFrom = (data, id) => {
|
||||
return request({
|
||||
url : "account_management/" + id + "/store",
|
||||
method : "POST",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 账户管理类 - 订单
|
||||
const accountOrder = data => {
|
||||
console.log(data)
|
||||
return request({
|
||||
url : "account_management/order/lists",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 账户管理类 - 取消订单
|
||||
const accountCancel = id => {
|
||||
return request({
|
||||
url : "account_management/order/" + id + "/cancel",
|
||||
method : "DELETE"
|
||||
})
|
||||
}
|
||||
|
||||
// 委托管理类
|
||||
const delegation = () => {
|
||||
return request({
|
||||
url: "delegation/index"
|
||||
})
|
||||
}
|
||||
|
||||
// 委托管理类 - 办理
|
||||
const delegationFrom = (data, id) => {
|
||||
return request({
|
||||
url : "delegation/" + id + "/store",
|
||||
method : "POST",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 委托管理类 - 订单
|
||||
const delegationOrder = data => {
|
||||
return request({
|
||||
url : "delegation/order/lists",
|
||||
method : "POST",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 委托管理类 - 取消订单
|
||||
const delegationCancel = id => {
|
||||
return request({
|
||||
url : "delegation/order/" + id + "/cancel",
|
||||
method : "DELETE"
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
categories,
|
||||
jf,
|
||||
@@ -128,13 +62,5 @@ export {
|
||||
index,
|
||||
recharge,
|
||||
zyPay,
|
||||
accountManagement,
|
||||
accountFrom,
|
||||
accountOrder,
|
||||
accountCancel,
|
||||
delegation,
|
||||
delegationFrom,
|
||||
delegationOrder,
|
||||
delegationCancel
|
||||
}
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
@@ -114,15 +114,6 @@ const coinSynthesize = data => {
|
||||
})
|
||||
}
|
||||
|
||||
// 现在打款支付
|
||||
const cashierOffline = data => {
|
||||
return request({
|
||||
url : 'pay/cashier_desk/offline',
|
||||
data,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
coinPay,
|
||||
diffCoinPay,
|
||||
@@ -136,6 +127,5 @@ export {
|
||||
dgFree,
|
||||
umsSynthesize,
|
||||
dgSynthesize,
|
||||
coinSynthesize,
|
||||
cashierOffline
|
||||
coinSynthesize
|
||||
}
|
||||
@@ -9,9 +9,6 @@
|
||||
import { uploading as upd } from '../index'
|
||||
|
||||
const uploads = (paths, fromData) => {
|
||||
|
||||
console.log(paths)
|
||||
|
||||
return upd(paths, fromData)
|
||||
}
|
||||
|
||||
|
||||
@@ -187,23 +187,6 @@ const debtUrl = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 账户注销
|
||||
const offSmsCode = data => {
|
||||
return request({
|
||||
url : 'app/user/log_off_code',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 账户注销确认
|
||||
const offUser = data => {
|
||||
return request({
|
||||
url: 'app/user/log_off',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
relations,
|
||||
code,
|
||||
@@ -226,7 +209,5 @@ export {
|
||||
getSignLogs,
|
||||
getFlows,
|
||||
createCity,
|
||||
debtUrl,
|
||||
offSmsCode,
|
||||
offUser
|
||||
debtUrl
|
||||
}
|
||||
|
||||
@@ -59,12 +59,6 @@ const synthesisAttorney = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 增收赋能单数据统计
|
||||
const empowerStatistics = () =>{
|
||||
return request({
|
||||
url : 'empower/manager/index'
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
index,
|
||||
@@ -72,6 +66,5 @@ export {
|
||||
sign,
|
||||
synthesisCount,
|
||||
synthesisServices,
|
||||
synthesisAttorney,
|
||||
empowerStatistics
|
||||
synthesisAttorney
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "抖火法律",
|
||||
"name" : "抖火数字化咨询服务平台",
|
||||
"appid" : "__UNI__C305C03",
|
||||
"description" : "纵有疾风起,人生不言弃",
|
||||
"versionName" : "1.6.4",
|
||||
"versionCode" : 1064,
|
||||
"versionName" : "1.5.2",
|
||||
"versionCode" : 152,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@@ -37,40 +37,27 @@
|
||||
"<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",
|
||||
"minSdkVersion" : 21
|
||||
"minSdkVersion" : 21,
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false,
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "从您的相册中选择图片作为用户头像与身份认证照片",
|
||||
"NSPhotoLibraryAddUsageDescription" : "保存您的分享海报与二维码图片",
|
||||
"NSCameraUsageDescription" : "身份认证图片,用户身份活体认证与用户头头像",
|
||||
"NSContactsUsageDescription" : "快捷拨打业务联系电话",
|
||||
"NSLocalNetworkUsageDescription" : "获取网络数据",
|
||||
"NSUserTrackingUsageDescription" : "开启权限不会获取您在其他站点的隐私信息,该权限仅用于标识设备并保障服务安全"
|
||||
}
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"ad" : {
|
||||
"gdt" : {},
|
||||
"csj" : {},
|
||||
"ks" : {},
|
||||
"ks-content" : {},
|
||||
"sigmob" : {},
|
||||
"hw" : {},
|
||||
"bd" : {}
|
||||
},
|
||||
"ad" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx1bcdeda0dec3f1bd",
|
||||
"UniversalLinks" : "https://app.com.douhuofalv/ulink/"
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"payment" : {}
|
||||
@@ -147,6 +134,5 @@
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"fallbackLocale" : "zh-Hans"
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
|
||||
1670
pages.json
1670
pages.json
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@
|
||||
<input type="safe-password" password v-model="password" placeholder="请输入密码">
|
||||
</view>
|
||||
<view class="btn">
|
||||
<button :disabled="phone.length < 11 || password == ''" @click="onAuth()">登录</button>
|
||||
<button :disabled="phone.length < 11 || password == '' || agreement.length == 0" @click="onAuth()">登录</button>
|
||||
</view>
|
||||
<view class="agreement">
|
||||
<u-checkbox-group
|
||||
@@ -49,13 +49,6 @@
|
||||
},
|
||||
methods: {
|
||||
onAuth(){
|
||||
if(this.agreement.length <= 0){
|
||||
uni.showToast({
|
||||
title: '请阅读并同意服务协议与隐私政策',
|
||||
icon : 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '登录中...'
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,141 +0,0 @@
|
||||
<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>
|
||||
@@ -1,151 +0,0 @@
|
||||
<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>
|
||||
@@ -1,141 +0,0 @@
|
||||
<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>
|
||||
@@ -1,22 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -1,65 +0,0 @@
|
||||
<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>
|
||||
@@ -1,292 +0,0 @@
|
||||
<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>
|
||||
@@ -1,190 +0,0 @@
|
||||
<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>
|
||||
@@ -1,554 +0,0 @@
|
||||
<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>
|
||||
@@ -1,337 +0,0 @@
|
||||
<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>
|
||||
@@ -1,351 +0,0 @@
|
||||
<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>
|
||||
@@ -1,468 +0,0 @@
|
||||
<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>
|
||||
@@ -4,9 +4,9 @@
|
||||
<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 v-if="rate != 1">
|
||||
<view class="header-fire">火力值:{{totalFire}}</view>
|
||||
<view class="header-no">当前火力值比例1:{{rate}}</view>
|
||||
</block>
|
||||
<view class="header-no">订单号:{{orderNo}}</view>
|
||||
</view>
|
||||
@@ -56,16 +56,9 @@
|
||||
</view>
|
||||
<radio class="choose-radio" value="code" :checked="payMethod == 'code'"></radio>
|
||||
</label>
|
||||
<label class="choose-item nowrap" v-if="payCan.offline">
|
||||
<view class="choose-text">
|
||||
<image src="@/static/icons/pay_bank.png" mode="aspectFill"></image>
|
||||
线下打款
|
||||
</view>
|
||||
<radio class="choose-radio" value="offline" :checked="payMethod == 'offline'"></radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view class="deduction" v-if="payCan.deduction == 1 && payType != 'free'">
|
||||
<view class="deduction" v-if="(payMethod == 'wx' || payMethod == 'ali' || payMethod == 'dgwx' || payMethod == 'dgali') && payType != 'free'">
|
||||
<view class="deduction-item">
|
||||
<view class="deduction-label">
|
||||
<view class="title">使用火力值抵扣</view>
|
||||
@@ -108,13 +101,9 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 确认支付 -->
|
||||
<view class="payBtn" v-if="payMethod != 'offline'">
|
||||
<view class="payBtn">
|
||||
<button size="default" @click="onPay">支付</button>
|
||||
</view>
|
||||
<!-- 上传打款凭证 -->
|
||||
<view class="payBtn" v-else>
|
||||
<button size="default" @click="onOffline">上传打款凭证</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -135,10 +124,8 @@
|
||||
umsSynthesize,
|
||||
dgSynthesize,
|
||||
coinSynthesize,
|
||||
cashierOffline
|
||||
} from '@/apis/interfaces/pay.js'
|
||||
} from '@/apis/interfaces/pay.js'
|
||||
import mixin from 'uview-ui/libs/mixin/mixin';
|
||||
import { uploads } from '@/apis/interfaces/uploading.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -199,8 +186,6 @@
|
||||
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
|
||||
@@ -274,7 +259,7 @@
|
||||
clearInterval(outTime)
|
||||
wx.showModal({
|
||||
title : '提示',
|
||||
content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台查询您的订单' : '支付成功',
|
||||
content : this.$Route.query.paytype === 'synthesize' ? '支付成功,可在工作台综法订单管理查询您的订单' : '支付成功',
|
||||
showCancel : false,
|
||||
confirmColor: '#446EFE',
|
||||
success : () => {
|
||||
@@ -370,46 +355,8 @@
|
||||
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: 1,
|
||||
success: path => {
|
||||
let { tempFiles } = path;
|
||||
uploads([{
|
||||
name: 'file' + tempFiles[0].size,
|
||||
uri : tempFiles[0].path
|
||||
}], {}).then(updRes => {
|
||||
let { path } = updRes
|
||||
cashierOffline({
|
||||
image : path[0],
|
||||
order_type : this.orderType,
|
||||
order_id : this.orderId,
|
||||
}).then(res => {
|
||||
uni.showModal({
|
||||
title : '上传成功',
|
||||
content : '请耐心等待打款审核',
|
||||
showCancel : false,
|
||||
success : () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
})
|
||||
uni.hideLoading()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 火力值 - 综法
|
||||
onCoinSynthesizePay(){
|
||||
coinSynthesize({
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="block">
|
||||
<view class="block-title">委托咨询单管理</view>
|
||||
<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>
|
||||
|
||||
@@ -125,10 +125,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,373 +1,33 @@
|
||||
<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 class="null-pages">
|
||||
<u-empty
|
||||
mode="order"
|
||||
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||
text="暂无相关订单"
|
||||
>
|
||||
</u-empty>
|
||||
</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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 内容为空
|
||||
.null-pages{ height: 70vh; display: flex; align-items: center; justify-content: center; }
|
||||
</style>
|
||||
|
||||
@@ -38,14 +38,6 @@
|
||||
</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>
|
||||
@@ -99,7 +91,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
.content{
|
||||
padding-top: 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -1,319 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- tabs -->
|
||||
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||
<u-tabs
|
||||
:current="tabsCurrent"
|
||||
:list="tabs"
|
||||
keyName="value"
|
||||
lineColor="#446EFE"
|
||||
:scrollable="tabs.length > 5"
|
||||
:activeStyle="{
|
||||
color: '#111',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '32rpx'
|
||||
}"
|
||||
:inactiveStyle="{
|
||||
color: '#606266',
|
||||
fontSize: '30rpx'
|
||||
}"
|
||||
@click="onTabs"
|
||||
></u-tabs>
|
||||
</u-sticky>
|
||||
<!-- 订单列表 -->
|
||||
<view class="orders" v-if="orders.length > 0">
|
||||
<view class="orders-item" v-for="(item, index) in orders" :key="index">
|
||||
<view class="orders-flex">
|
||||
<view class="no nowrap" @click="copyNo(item.order_no)">
|
||||
{{item.order_no}}
|
||||
</view>
|
||||
<view class="state">{{item.status.text}}</view>
|
||||
</view>
|
||||
<view class="orders-content">
|
||||
<view class="orders-content-item">
|
||||
<label>业务名称</label>
|
||||
<view class="nowrap">{{item.item.title}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>客户姓名</label>
|
||||
<view class="nowrap">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>手机号码</label>
|
||||
<view class="nowrap">{{item.mobile}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>创建时间</label>
|
||||
<view class="nowrap">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item" v-if="item.paid_at != ''">
|
||||
<label>支付时间</label>
|
||||
<view class="nowrap">{{item.paid_at}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orders-flex">
|
||||
<view class="price">¥{{item.item.price}}</view>
|
||||
<view class="btns">
|
||||
<view class="btns-item border" v-if="item.can.cancel" @click="onCancel(item)">取消订单</view>
|
||||
<view class="btns-item" v-if="item.can.pay" @click="onPay(item)">立即支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
</view>
|
||||
<!-- 订单是空的 -->
|
||||
<view class="order-null" v-else>
|
||||
<u-empty
|
||||
mode="order"
|
||||
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||
text="暂无相关订单"
|
||||
>
|
||||
</u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { accountOrder, accountCancel } from '@/apis/interfaces/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabs : [{ id: '', value: '全部' }],
|
||||
tabsCurrent : 0,
|
||||
tabsId : '',
|
||||
orders : [],
|
||||
pagesShow : false,
|
||||
page : {
|
||||
current : 1,
|
||||
has_more: false,
|
||||
},
|
||||
status : ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getOrder()
|
||||
},
|
||||
methods: {
|
||||
// 筛选分类
|
||||
onTabs(e){
|
||||
let { id, index } = e;
|
||||
this.tabsCurrent = index
|
||||
this.tabsId = id
|
||||
this.page = { current: 1, has_more: false }
|
||||
this.getOrder()
|
||||
},
|
||||
// 获取订单列表
|
||||
getOrder(){
|
||||
let { tabsId, tabs, orders, page } = this
|
||||
accountOrder({
|
||||
manager: 1,
|
||||
status : tabsId,
|
||||
page : page.current
|
||||
}).then(res => {
|
||||
let { status, lists } = res;
|
||||
this.tabs = [{ id: '', value: '全部' }].concat(status)
|
||||
this.orders = lists.page.current == 1 ? lists.data : this.orders.concat(lists.data)
|
||||
this.page = lists.page
|
||||
this.pagesShow = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
onCancel(e){
|
||||
let { order_id } = e;
|
||||
uni.showModal({
|
||||
title : "提示",
|
||||
content : "确认取消当前订单嘛?",
|
||||
cancelText : "取消",
|
||||
confirmColor: "#446EFE",
|
||||
success : modalRes => {
|
||||
if(modalRes.confirm){
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
mask : true
|
||||
})
|
||||
accountCancel(order_id).then(res => {
|
||||
uni.showToast({
|
||||
title: '订单已取消',
|
||||
icon : 'none'
|
||||
})
|
||||
this.page = { current: 1, has_more: false }
|
||||
this.getOrder()
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制订单号码
|
||||
copyNo(no){
|
||||
uni.setClipboardData({
|
||||
data : no,
|
||||
success : res => {
|
||||
uni.showToast({
|
||||
title: '订单号已复制',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去支付
|
||||
onPay(obj){
|
||||
let { order_id, order_type, paid_at } = obj
|
||||
if(paid_at == ''){
|
||||
this.$Router.push({
|
||||
name : 'Pay',
|
||||
params : {
|
||||
paytype : 'synthesize',
|
||||
orderId : order_id,
|
||||
orderType : order_type.replace(/\\/g, '-')
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getOrder()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 订单列表
|
||||
.orders{
|
||||
padding: 30rpx 0 10rpx;
|
||||
.orders-item{
|
||||
margin: 0 30rpx 20rpx;
|
||||
background-color: white;
|
||||
border-radius: $radius;
|
||||
}
|
||||
.orders-content{
|
||||
padding: 20rpx 30rpx;
|
||||
&-item{
|
||||
line-height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
label{
|
||||
color: #999999;
|
||||
}
|
||||
.orders-content-btn{
|
||||
color: $main-color;
|
||||
}
|
||||
&.orders-content-bottom{
|
||||
padding-right: 40rpx;
|
||||
position: relative;
|
||||
.orders-content-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-type{
|
||||
text{
|
||||
margin-right: 30rpx;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
&::after{
|
||||
position: absolute;
|
||||
content: "/";
|
||||
width: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
top: 0;
|
||||
right: -30rpx;
|
||||
}
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-block{
|
||||
background: rgba(68, 110, 254, .03);
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 10rpx 0;
|
||||
.item-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orders-flex{
|
||||
border-bottom: solid 1rpx #F6F6F6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx $padding;
|
||||
&:last-child{
|
||||
border-top: solid 1rpx #F6F6F6;
|
||||
border-bottom: none;
|
||||
}
|
||||
.no{
|
||||
font-size: 30rpx;
|
||||
color: #111;
|
||||
line-height: 60rpx;
|
||||
width: calc(100% - 150rpx);
|
||||
}
|
||||
.state{
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
line-height: 60rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.price{
|
||||
font-weight: bold;
|
||||
color: $main-color;
|
||||
}
|
||||
.btns{
|
||||
width: 400rpx;
|
||||
text-align: right;
|
||||
.btns-item{
|
||||
display: inline-block;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background: $main-color;
|
||||
color: white;
|
||||
border-radius: 35rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
&.border{
|
||||
border: solid 1rpx $main-color;
|
||||
color: $main-color;
|
||||
background: white;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
&::after{ display: none;}
|
||||
}
|
||||
&:last-child{ margin-left: 30rpx; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,320 +0,0 @@
|
||||
<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>
|
||||
</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'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制订单号码
|
||||
copyNo(no){
|
||||
uni.setClipboardData({
|
||||
data : no,
|
||||
success : res => {
|
||||
uni.showToast({
|
||||
title: '订单号已复制',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去支付
|
||||
onPay(obj){
|
||||
let { order_id, order_type, paid_at } = obj
|
||||
if(paid_at == ''){
|
||||
this.$Router.push({
|
||||
name : 'Pay',
|
||||
params : {
|
||||
paytype : 'synthesize',
|
||||
orderId : order_id,
|
||||
orderType : order_type.replace(/\\/g, '-')
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getOrder()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 订单列表
|
||||
.orders{
|
||||
padding: 30rpx 0 10rpx;
|
||||
.orders-item{
|
||||
margin: 0 30rpx 20rpx;
|
||||
background-color: white;
|
||||
border-radius: $radius;
|
||||
}
|
||||
.orders-content{
|
||||
padding: 20rpx 30rpx;
|
||||
&-item{
|
||||
line-height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
label{
|
||||
color: #999999;
|
||||
}
|
||||
.orders-content-btn{
|
||||
color: $main-color;
|
||||
}
|
||||
&.orders-content-bottom{
|
||||
padding-right: 40rpx;
|
||||
position: relative;
|
||||
.orders-content-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-type{
|
||||
text{
|
||||
margin-right: 30rpx;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
&::after{
|
||||
position: absolute;
|
||||
content: "/";
|
||||
width: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
top: 0;
|
||||
right: -30rpx;
|
||||
}
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-block{
|
||||
background: rgba(68, 110, 254, .03);
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 10rpx 0;
|
||||
.item-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orders-flex{
|
||||
border-bottom: solid 1rpx #F6F6F6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx $padding;
|
||||
&:last-child{
|
||||
border-top: solid 1rpx #F6F6F6;
|
||||
border-bottom: none;
|
||||
}
|
||||
.no{
|
||||
font-size: 30rpx;
|
||||
color: #111;
|
||||
line-height: 60rpx;
|
||||
width: calc(100% - 150rpx);
|
||||
}
|
||||
.state{
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
line-height: 60rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.price{
|
||||
font-weight: bold;
|
||||
color: $main-color;
|
||||
}
|
||||
.btns{
|
||||
width: 400rpx;
|
||||
text-align: right;
|
||||
.btns-item{
|
||||
display: inline-block;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background: $main-color;
|
||||
color: white;
|
||||
border-radius: 35rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
&.border{
|
||||
border: solid 1rpx $main-color;
|
||||
color: $main-color;
|
||||
background: white;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
&::after{ display: none;}
|
||||
}
|
||||
&:last-child{ margin-left: 30rpx; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,8 @@
|
||||
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.businessArr = this.createType === 'other' ? businessData : businessData.concat(synthListData)
|
||||
this.businessId = this.businessArr[0].business_id
|
||||
this.selfType = this.businessArr[0].self_type
|
||||
}).catch(err => {
|
||||
@@ -127,8 +128,8 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
let busines = this.businessArr.find(val => val.business_id === this.businessId)
|
||||
// 金法业务
|
||||
let busines = this.businessArr.find(val => val.business_id === this.businessId)
|
||||
this.$Router.replace({
|
||||
name : 'WorkGenerate',
|
||||
params : {
|
||||
|
||||
@@ -1,312 +0,0 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- tabs -->
|
||||
<u-sticky bgColor="#FFF" zIndex="9" >
|
||||
<u-tabs
|
||||
:current="tabsCurrent"
|
||||
:list="tabs"
|
||||
keyName="value"
|
||||
lineColor="#446EFE"
|
||||
:scrollable="tabs.length > 5"
|
||||
:activeStyle="{
|
||||
color: '#111',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '32rpx'
|
||||
}"
|
||||
:inactiveStyle="{
|
||||
color: '#606266',
|
||||
fontSize: '30rpx'
|
||||
}"
|
||||
@click="onTabs"
|
||||
></u-tabs>
|
||||
</u-sticky>
|
||||
<!-- 订单列表 -->
|
||||
<view class="orders" v-if="orders.length > 0">
|
||||
<view class="orders-item" v-for="(item, index) in orders" :key="index">
|
||||
<view class="orders-flex">
|
||||
<view class="no nowrap" @click="copyNo(item.order_no)">
|
||||
{{item.order_no}}
|
||||
</view>
|
||||
<view class="state">{{item.status.text}}</view>
|
||||
</view>
|
||||
<view class="orders-content">
|
||||
<view class="orders-content-item">
|
||||
<label>业务名称</label>
|
||||
<view class="nowrap">{{item.item.title}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>客户姓名</label>
|
||||
<view class="nowrap">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>手机号码</label>
|
||||
<view class="nowrap">{{item.mobile}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item">
|
||||
<label>创建时间</label>
|
||||
<view class="nowrap">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="orders-content-item" v-if="item.paid_at != ''">
|
||||
<label>支付时间</label>
|
||||
<view class="nowrap">{{item.paid_at}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orders-flex">
|
||||
<view class="price">¥{{item.item.price}}</view>
|
||||
<view class="btns">
|
||||
<view class="btns-item border" v-if="item.can.cancel" @click="onCancel(item)">取消订单</view>
|
||||
<view class="btns-item" v-if="item.can.pay" @click="onPay(item)">立即支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<u-loadmore v-if="pagesShow" :status="status" />
|
||||
</view>
|
||||
<!-- 订单是空的 -->
|
||||
<view class="order-null" v-else>
|
||||
<u-empty
|
||||
mode="order"
|
||||
icon="http://cdn.uviewui.com/uview/empty/order.png"
|
||||
text="暂无相关订单"
|
||||
>
|
||||
</u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { delegationOrder, delegationCancel } from '@/apis/interfaces/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabs : [{ id: '', value: '全部' }],
|
||||
tabsCurrent : 0,
|
||||
tabsId : '',
|
||||
orders : [],
|
||||
pagesShow : false,
|
||||
page : {
|
||||
current : 1,
|
||||
has_more: false,
|
||||
},
|
||||
status : ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getOrder()
|
||||
},
|
||||
methods: {
|
||||
// 筛选分类
|
||||
onTabs(e){
|
||||
let { id, index } = e;
|
||||
this.tabsCurrent = index
|
||||
this.tabsId = id
|
||||
this.page = { current: 1, has_more: false }
|
||||
this.getOrder()
|
||||
},
|
||||
// 获取订单列表
|
||||
getOrder(){
|
||||
let { tabsId, tabs, orders, page } = this
|
||||
delegationOrder({
|
||||
manager: 1,
|
||||
status : tabsId,
|
||||
page : page.current
|
||||
}).then(res => {
|
||||
let { status, lists } = res;
|
||||
this.tabs = [{ id: '', value: '全部' }].concat(status)
|
||||
this.orders = lists.page.current == 1 ? lists.data : this.orders.concat(lists.data)
|
||||
this.page = lists.page
|
||||
this.pagesShow = false
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
onCancel(e){
|
||||
let { order_id } = e;
|
||||
uni.showModal({
|
||||
title : "提示",
|
||||
content : "确认取消当前订单嘛?",
|
||||
cancelText : "取消",
|
||||
confirmColor: "#446EFE",
|
||||
success : modalRes => {
|
||||
if(modalRes.confirm){
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
mask : true
|
||||
})
|
||||
delegationCancel(order_id).then(res => {
|
||||
uni.showToast({
|
||||
title: '订单已取消',
|
||||
icon : 'none'
|
||||
})
|
||||
this.page = { current: 1, has_more: false }
|
||||
this.getOrder()
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制订单号码
|
||||
copyNo(no){
|
||||
uni.setClipboardData({
|
||||
data : no,
|
||||
success : res => {
|
||||
uni.showToast({
|
||||
title: '订单号已复制',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去支付
|
||||
onPay(obj){
|
||||
let { order_id, order_type, paid_at } = obj
|
||||
if(paid_at == ''){
|
||||
this.$Router.push({
|
||||
name : 'Pay',
|
||||
params : {
|
||||
paytype : 'synthesize',
|
||||
orderId : order_id,
|
||||
orderType : order_type.replace(/\\/g, '-')
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.pagesShow = true;
|
||||
if(this.page.has_more){
|
||||
this.status = 'loading';
|
||||
this.page.current++
|
||||
this.getOrder()
|
||||
return
|
||||
}
|
||||
this.status = 'nomore';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// 订单列表
|
||||
.orders{
|
||||
padding: 30rpx 0 10rpx;
|
||||
.orders-item{
|
||||
margin: 0 30rpx 20rpx;
|
||||
background-color: white;
|
||||
border-radius: $radius;
|
||||
}
|
||||
.orders-content{
|
||||
padding: 20rpx 30rpx;
|
||||
&-item{
|
||||
line-height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
color: #111111;
|
||||
label{
|
||||
color: #999999;
|
||||
}
|
||||
.orders-content-btn{
|
||||
color: $main-color;
|
||||
}
|
||||
&.orders-content-bottom{
|
||||
padding-right: 40rpx;
|
||||
position: relative;
|
||||
.orders-content-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-type{
|
||||
text{
|
||||
margin-right: 30rpx;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
&::after{
|
||||
position: absolute;
|
||||
content: "/";
|
||||
width: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
top: 0;
|
||||
right: -30rpx;
|
||||
}
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
&::after{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-block{
|
||||
background: rgba(68, 110, 254, .03);
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 10rpx 0;
|
||||
.item-flex{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orders-flex{
|
||||
border-bottom: solid 1rpx #F6F6F6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx $padding;
|
||||
&:last-child{
|
||||
border-top: solid 1rpx #F6F6F6;
|
||||
border-bottom: none;
|
||||
}
|
||||
.no{
|
||||
font-size: 30rpx;
|
||||
color: #111;
|
||||
line-height: 60rpx;
|
||||
width: calc(100% - 150rpx);
|
||||
}
|
||||
.state{
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
line-height: 60rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.price{
|
||||
font-weight: bold;
|
||||
color: $main-color;
|
||||
}
|
||||
.btns{
|
||||
width: 400rpx;
|
||||
text-align: right;
|
||||
.btns-item{
|
||||
display: inline-block;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
background: $main-color;
|
||||
color: white;
|
||||
border-radius: 35rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
&.border{ border: solid 1rpx $main-color; color: $main-color; background: white; height: 68rpx; &::after{ display: none; } }
|
||||
&:last-child{ margin-left: 30rpx; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -16,7 +16,7 @@
|
||||
<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)">
|
||||
|
||||
@@ -223,13 +223,15 @@
|
||||
<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"
|
||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
||||
text="暂未登录"
|
||||
/>
|
||||
>
|
||||
</u-empty>
|
||||
<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 {
|
||||
@@ -379,7 +381,7 @@
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0;
|
||||
width: 80vw;
|
||||
width: 70vw;
|
||||
background: $main-color;
|
||||
color: white;
|
||||
font-size: 32rpx;
|
||||
|
||||
1253
pages/work/index.vue
1253
pages/work/index.vue
File diff suppressed because it is too large
Load Diff
@@ -111,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 {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
Reference in New Issue
Block a user