提交 da6f0ef8 authored 作者: Ras's avatar Ras

首次提交

上级
.DS_Store
node_modules/
unpackage/
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.project
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
{
"printWidth": 120,
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
# uni-merchant
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
const plugins = []
if (process.env.UNI_OPT_TREESHAKINGNG) {
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
}
if (
(
process.env.UNI_PLATFORM === 'app-plus' &&
process.env.UNI_USING_V8
) ||
(
process.env.UNI_PLATFORM === 'h5' &&
process.env.UNI_H5_BROWSER === 'builtin'
)
) {
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
const input = normalizePath(process.env.UNI_INPUT_DIR)
try {
plugins.push([
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
{
file (file) {
file = normalizePath(file)
if (file.indexOf(input) === 0) {
return path.relative(input, file)
}
return false
}
}
])
} catch (e) {}
}
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
process.UNI_LIBRARIES.forEach(libraryName => {
plugins.push([
'import',
{
'libraryName': libraryName,
'customName': (name) => {
return `${libraryName}/lib/${name}/${name}`
}
}
])
})
module.exports = {
presets: [
[
'@vue/app',
{
modules: 'commonjs',
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
}
]
],
plugins
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "uni-merchant",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
},
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.0-27920200527001",
"@dcloudio/uni-h5": "^2.0.0-27920200527001",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-mp-360": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-alipay": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-baidu": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-qq": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-toutiao": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-weixin": "^2.0.0-27920200527001",
"@dcloudio/uni-quickapp-native": "^2.0.0-27920200527001",
"@dcloudio/uni-quickapp-webview": "^2.0.0-27920200527001",
"@dcloudio/uni-stat": "^2.0.0-27920200527001",
"core-js": "^3.6.5",
"flyio": "^0.6.2",
"luch-request": "^3.0.2",
"regenerator-runtime": "^0.12.1",
"uview-ui": "^1.6.3",
"vue": "^2.6.11",
"vuex": "^3.2.0",
"vuex-persistedstate": "^3.0.1"
},
"devDependencies": {
"@dcloudio/types": "*",
"@dcloudio/uni-automator": "^2.0.0-27920200527001",
"@dcloudio/uni-cli-shared": "^2.0.0-27920200527001",
"@dcloudio/uni-migration": "^2.0.0-27920200527001",
"@dcloudio/uni-template-compiler": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-27920200527001",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-27920200527001",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-27920200527001",
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"mini-types": "*",
"miniprogram-api-typings": "*",
"node-sass": "^4.14.1",
"postcss-comment": "^2.0.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}
const path = require('path')
module.exports = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import')({
resolve (id, basedir, importOptions) {
if (id.startsWith('~@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
} else if (id.startsWith('@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
} else if (id.startsWith('/') && !id.startsWith('//')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
}
return id
}
}),
require('autoprefixer')({
remove: process.env.UNI_PLATFORM !== 'h5'
}),
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<script>
export default {
onLaunch: function () {
console.log('App Launch');
},
onShow: function () {
console.log('App Show');
},
onHide: function () {
console.log('App Hide');
},
};
</script>
<style lang="scss">
/*引入uView基础样式*/
@import 'uview-ui/index.scss';
/*每个页面公共css */
page {
background-color: #f4f4f5;
.mc-btn {
/deep/.u-hairline-border {
&::after {
border: none;
}
}
}
.position-sticky {
position: -webkit-sticky !important;
position: sticky !important;
}
.fixed-bottom {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 1030;
}
}
</style>
import store from '@/store';
const commonUrl = 'http://116.62.129.2/CSWX'; //公共路径
// const commonUrl = "http://sf.jtfw8.com/WXXCX";
//http://116.62.129.2/CSWX 测试环境
function postRequest(url, data) {
var promise = new Promise((resolve, reject) => {
let header = {
appid: 'wx08df2ca62f3e1766'
};
const token = uni.getStorageSync('token');
console.log("POST请求: ", url, data)
if (token) {
header.token = token;
}
uni.request({
url: commonUrl + url,
data: data,
method: 'POST',
header: header,
success: function(res) {
console.log("POST请求响应:", res)
if (res.data.code === 201) {
store.dispatch('user/logout').then(() => {
uni.switchTab({
url: '/pages/index/index'
});
});
}
resolve(res.data);
},
error: function(e) {
reject('网络出错');
}
});
});
return promise;
}
// get请求封装
function getRequest(url, data) {
var promise = new Promise((resolve, reject) => {
console.log("GET请求: ", url, data)
uni.request({
url: commonUrl + url,
data: data,
method: 'GET',
dataType: 'json',
header: {
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token')
},
success: function(res) {
console.log("GET请求响应:", res)
if (res.data.code === 201) {
store.dispatch('user/logout').then(() => {
uni.switchTab({
url: '/pages/index/index'
});
});
return;
}
resolve(res.data);
},
error: function(e) {
reject('网络出错');
}
});
});
return promise;
}
module.exports = {
post: postRequest,
get: getRequest
};
<template>
<view>
<u-card :show-foot="false">
<view slot="head">
<u-upload
:file-list="displayThumbs"
:action="action"
:header="uploadHeaders"
@on-uploaded="onUploaded"
@on-remove="onRemove"
width="160"
></u-upload>
<u-icon
class="deleteBtn"
name="close-circle-fill"
size="48"
color="#595959"
v-if="canbeDelete"
@click="deleteGood"
></u-icon>
</view>
<view slot="body" class="goodBd">
<u-cell-group :border="false">
<u-cell-item
required
title="商品类别"
arrow
:value="goodType | formatGoodType"
@click="chooseGoodType"
></u-cell-item>
<u-cell-item
required
title="商品规格"
arrow
:value="category | formatCategory"
@click="chooseCategory"
></u-cell-item>
<u-cell-item required title="商品数量" :arrow="false">
<u-number-box v-model="count" :min="1"></u-number-box>
</u-cell-item>
<!-- <u-cell-item title="商品规格" :arrow="false">
<u-input
type="text"
v-model="sku"
:border="false"
placeholder="墙体结构、尺寸或家具的长宽高等"
input-align="right"
:custom-style="{
marginRight: 0
}"
:clearable="false"
/>
</u-cell-item> -->
<u-cell-item title="备注说明" :arrow="false">
<u-input v-model="mark" type="textarea" input-align="right" :clearable="false" />
</u-cell-item>
<u-cell-item
title="预估价"
:value="totalAmount | formatPrice"
:arrow="false"
:border-bottom="false"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-picker
mode="selector"
v-model="showGoodTypes"
:range="goodTypesSource"
range-key="label"
@confirm="changeGoodType"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showCategories"
:range="categories"
range-key="label"
@confirm="changeCategory"
confirm-color="#ffcb57"
></u-picker>
</view>
</template>
<script>
import request from '../../common/service';
export default {
props: {
guid: {
type: String,
default: function () {
return '';
},
},
canbeDelete: {
type: Boolean,
default: function () {
return false;
},
},
source: {
type: Object,
default: function () {
return function () {};
},
},
goodTypesSource: {
type: Array,
default: function () {
return [];
},
},
},
data() {
return {
action: 'https://116.62.129.2/CSWX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
goodType: undefined,
// sku: '',
mark: '',
thumbs: [],
category: undefined,
count: 1,
showGoodTypes: false,
goodType: null,
showCategories: false,
categories: [],
category: null,
fileList: [],
displayThumbs: [],
};
},
computed: {
computedAll() {
const { goodType, mark, category, count, fileList, guid, thumbs, totalAmount } = this;
return {
guid,
goodType,
// sku,
mark,
thumbs,
category,
count,
totalAmount,
};
},
totalAmount() {
if (this.category) {
return this.category.price * this.count;
}
return 0;
},
},
watch: {
computedAll() {
this.$emit('change', {
guid: this.guid,
data: this.computedAll,
});
},
goodType() {
this.category = null;
}
},
filters: {
formatGoodType(value) {
if (!value) {
return '请选择商品类别';
}
return `${value.label}`;
},
formatCategory(value) {
if (!value) {
return '请选择商品规格';
}
return `${value.label}`;
},
formatPrice(value) {
return `${parseFloat(value).toLocaleString()}元`;
},
},
mounted() {
this.goodType = this.source.goodType;
// this.sku = this.source.sku;
this.mark = this.source.mark ? this.source.mark[0].Value : '';
this.thumbs = this.source.thumbs || [];
this.category = this.source.category || null;
this.displayThumbs = Array.isArray(this.source.thumbs) ? [...this.source.thumbs] : [];
if (this.goodType) {
this.getCategories(this.goodType.label);
}
},
methods: {
onUploaded(lists) {
const _t = this;
this.fileList = lists.map((item) => {
if (!item.response) {
return { fileurl: item.url };
}
var { code, result } = item.response;
if (code === 0) {
return result;
}
return;
});
this.thumbs = this.fileList.map((x) => {
return {
url: x.fileurl,
};
});
},
onRemove(index, lists, name) {
this.fileList.splice(index, 1);
this.thumbs.splice(index, 1);
},
deleteGood() {
this.$emit('delete', this.guid);
},
changeGoodType(e) {
const { currentCardIndex } = this;
this.goodType = this.goodTypesSource[e[0]];
this.getCategories(this.goodType.label);
},
chooseGoodType() {
this.showGoodTypes = true;
},
getCategories(goodtype) {
request.get('/api/BaseData/ServiceType', { GoodType: goodtype }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.categories = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
price: x.price,
};
});
}
});
},
changeCategory(e) {
const { currentCardIndex } = this;
this.category = this.categories[e[0]];
},
chooseCategory() {
this.showCategories = true;
},
},
};
</script>
<style>
.deleteBtn {
position: absolute;
top: 24rpx;
right: 24rpx;
}
</style>
\ No newline at end of file
import Vue from 'vue'
import App from './App'
import uView from 'uview-ui'
import store from '@/store'
Vue.use(uView)
Vue.prototype.$store = store
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
{
"name": "",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"app-plus": { /* 5+App特有相关 */
"usingComponents": true,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": { /* 模块配置 */
},
"distribute": { /* 应用发布信息 */
"android": { /* android打包配置 */
"permissions": ["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios": { /* ios打包配置 */
},
"sdkConfigs": { /* SDK配置 */
}
}
},
"quickapp": { /* 快应用特有相关 */
},
"mp-weixin": { /* 微信小程序特有相关 */
"appid": "wx08df2ca62f3e1766",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "小程序将使用定位功能"
}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
}
}
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/account/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/recharge/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/place/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/hire/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/pay/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/my/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/wallet/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/withdraw/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/transaction-detail/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/password/login/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/password/pay/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/customer/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/detail/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/add/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/edit/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/choose/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/aftersale/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedback/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/search/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/register/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/change-worker/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/join/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/applyjoin/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/apply-refund/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/change-phone/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/acceptance/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/applyjoin/refuse/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/company-members/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/qa/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#f4f4f5"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#FFCB57",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-selected.png",
"text": "首页"
}, {
"pagePath": "pages/orders/index",
"iconPath": "static/images/tabbar/order.png",
"selectedIconPath": "static/images/tabbar/order-selected.png",
"text": "订单"
}, {
"pagePath": "pages/my/index",
"iconPath": "static/images/tabbar/my.png",
"selectedIconPath": "static/images/tabbar/my-selected.png",
"text": "我的"
}]
},
"sitemapLocation": "sitemap.json"
}
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="验收"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<web-view
:webview-styles="webviewStyles"
:src="url"
></web-view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
url: '',
webviewStyles: {
progress: {
color: '#FF3333',
},
},
};
},
onLoad(options) {
this.url = `https://www.jtfw8.com/WXXCX/Evaluate/index/${options.orderId}`
},
computed: {},
methods: {
placeOrder() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Feedback/SH', {
Model: {
FContent: this.content,
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="账号信息"
title-color="#472d21"
></u-navbar>
</div>
<div class="card">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="用户类型" :value="curUserinfo.userType" :arrow="false"></u-cell-item>
<u-cell-item title="企业名称" :arrow="false" v-if="userDetail.FUserType == 2">
<span>{{companyName}}</span>
</u-cell-item>
<u-cell-item title="真实姓名" :arrow="false">
<u-input
v-model="userRealName"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入真实姓名"
/>
</u-cell-item>
<u-cell-item title="联系地址" :arrow="false">
<u-input
v-model="address"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入联系地址"
/>
</u-cell-item>
<u-cell-item title="电子邮箱" :arrow="false">
<u-input
v-model="mail"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入电子邮箱"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="save"
>保存</u-button>
</view>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
userType: '个人',
userNickname: null,
address: null,
mail: null,
userRealName: null,
companyName: ''
};
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
curUserinfo: 'user/displayUserInfo',
}),
},
onLoad() {
this.getAccountInfo();
console.log(this.userDetail)
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail'
}),
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
console.log(detail)
this.userNickname = detail.FCustBusinessMember[0].FNickName.replace(/\s+/g, '');
this.address = detail.FCustBusinessMember[0].FAdress.replace(/\s+/g, '');
this.mail = detail.FCustBusinessMember[0].FEmail.replace(/\s+/g, '');
this.userRealName = detail.FCustBusinessMember[0].FRealName.replace(/\s+/g, '');
this.companyName = detail.Name[0].Value;
this.updateUserDetail(detail);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
save() {
const { address, mail, userRealName } = this;
if (!userRealName || !address || !mail) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Business/edit', {
FID: this.userDetail.Id,
Adress: address,
Email: mail,
RealName: userRealName
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!',
isTab: true,
url: '/pages/index/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.card {
.u-body-item {
font-size: 32rpx;
color: #333;
padding: 0rpx 10rpx;
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 400rpx;
flex: 0 0 400rpx;
height: 120rpx;
border-radius: 8rpx;
margin-left: 12rpx;
.extra-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
.defaultBtnhover {
color: '#472d21';
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="售后管理"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="u-tabs-box">
<view class="pl">
<!-- <u-image src="/static/images/common/search.png" height="48rpx" width="48rpx"></u-image> -->
<u-tabs-swiper
activeColor="#ffcb57"
font-size="26"
ref="tabs"
:list="list"
:current="current"
@change="change"
></u-tabs-swiper>
</view>
</view>
<swiper
class="swiper-box"
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
>
<swiper-item class="swiper-item" v-for="itx in 4" :key="itx">
<scroll-view
scroll-y
style="height: 100%;width: 100%;"
@scrolltolower="reachBottom"
>
<view class="page-box">
<u-empty text="暂无数据" mode="list"></u-empty>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</div>
</template>
<script>
export default {
data() {
return {
list: [
{
name: '全部'
},
{
name: '处理中'
},
{
name: '已完结'
},
{
name: '关闭'
}
],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore']
};
},
onLoad() {},
computed: {
// 价格小数
priceDecimal() {
return val => {
if (val !== parseInt(val)) return val.slice(-2);
else return '00';
};
},
// 价格整数
priceInt() {
return val => {
if (val !== parseInt(val)) return val.split('.')[0];
else return val;
};
}
},
methods: {
reachBottom() {
return;
// 此tab为空数据
if (this.current != 2) {
this.loadStatus.splice(this.current, 1, 'loading');
setTimeout(() => {
this.getOrderList(this.current);
}, 1200);
}
},
// 页面数据
getOrderList(idx) {
for (let i = 0; i < 5; i++) {
let index = this.$u.random(0, this.dataList.length - 1);
let data = JSON.parse(JSON.stringify(this.dataList[index]));
data.id = this.$u.guid();
this.orderList[idx] && this.orderList[idx].push(data);
}
this.loadStatus.splice(this.current, 1, 'loadmore');
},
// 总价
totalPrice(item) {
let price = 0;
item.map(val => {
price += parseFloat(val.price);
});
return price.toFixed(2);
},
// 总件数
totalNum(item) {
let num = 0;
item.map(val => {
num += val.number;
});
return num;
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
this.getOrderList();
},
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
animationfinish({ detail: { current } }) {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
hireMan() {
this.$u.route('/pages/hire/index');
}
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
}
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.page-box {
.orderHd {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
justify-content: flex-start;
/deep/.u-image {
margin-right: 12rpx;
background-color: #fff;
}
.contact {
.line {
font-size: 24rpx;
color: #262626;
}
}
}
.right {
.status {
font-size: 24rpx;
color: #434343;
}
}
}
.orderBd {
.item {
display: flex;
margin: 20rpx 0 0;
border-bottom: 1rpx dashed #d9d9d9;
&::last-child {
border-bottom: none;
}
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.content {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.delivery-time {
color: #595959;
font-size: 24rpx;
}
}
.right {
margin-left: 10rpx;
padding-top: 20rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $u-tips-color;
font-size: 24rpx;
}
}
}
.workmans {
padding: 12rpx 0;
.mtitle {
font-size: 24rpx;
color: #262626;
}
.number {
font-size: 24rpx;
font-weight: 600;
color: #ffcb57;
}
}
}
.orderFt {
.actions {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 6rpx;
}
}
}
}
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请退款"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item
required
title="选择原因"
:value="displayReason"
@click="chooseReason"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item title="具体描述" :arrow="false">
<u-input
type="text"
v-model="desc"
height="48"
input-align="right"
placeholder="请输入具体的说明"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card title="上传凭证" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-upload
:action="action"
:header="uploadHeaders"
:max-count="3"
@on-uploaded="onUploaded"
name="file"
width="190"
></u-upload>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提交</u-button>
</view>
</view>
<u-picker
mode="selector"
v-model="showReason"
:range="reasons"
range-key="label"
@confirm="changeReason"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
showReason: false,
reasons: [
{
value: '001',
label: '技术不专业',
},
{
value: '002',
label: '态度不友好',
},
{
value: '003',
label: '未按时完成任务',
},
],
reason: null,
fileList: [],
desc: '',
};
},
onLoad() {
console.log(this.currentOrder);
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
}),
displayReason() {
if (!this.reason) {
return '请选择换师傅原因';
}
return `${this.reason.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => item.response.result);
},
changeReason(e) {
this.reason = this.reasons[e[0]];
},
chooseReason() {
this.showReason = true;
},
placeOrder() {
const _t = this;
const { reason } = this;
if (!reason) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const attachObj = {};
for (let index = 0; index < this.fileList.length; index++) {
const fileitem = this.fileList[index];
attachObj[`FRefundPZ${index}`] = fileitem.fileid;
}
request
.post('/api/Order/save', {
Model: {
FID: this.currentOrder.Id, //订单内码
FStatus: 'TKZ', //订单状态:待预约,传固定值:DYY
FRefundReason: this.reason.label, //退款原因
FRefundAmount: this.currentOrder.FSFAmount, //退款金额
FRefundDesc: this.desc, //退款
...attachObj,
},
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
const { IsSuccess } = result.Result.ResponseStatus;
if (IsSuccess) {
_t.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/orders/index',
});
}
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.wmBd {
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
.hdline {
margin-bottom: 24rpx;
.name {
margin-right: 12rpx;
font-size: 30rpx;
color: #262626;
}
}
.line {
margin-top: 12rpx;
.smtitle {
font-size: 24rpx;
color: #8c8c8c;
}
.smContent {
font-size: 24rpx;
color: #595959;
}
}
}
}
.wmFt {
display: flex;
justify-content: space-between;
align-items: center;
.left {
.amount {
font-size: 36rpx;
color: #ffcb57;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请管理"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="u-tabs-box">
<view class="pl">
<u-tabs-swiper
activeColor="#ffcb57"
font-size="26"
ref="tabs"
:list="list"
:current="current"
@change="change"
></u-tabs-swiper>
</view>
</view>
<swiper
class="swiper-box"
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
>
<swiper-item class="swiper-item" v-for="(tablist, index) in tabLists" :key="index">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty
text="没有数据"
mode="list"
margin-top="80"
v-if="tablist.length === 0 && !showLoading"
></u-empty>
<u-card
v-for="item in tablist"
:key="item.FBillNo"
:title="item.FApplyName"
:sub-title="item.FBillNo"
:show-foot="index === 0"
thumb="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
>
<view slot="body">
<view class="line">
<span class="title">手机:</span>
<span class="content">{{item.FApplyPhone}}</span>
</view>
<view class="line">
<span class="title">备注:</span>
<span class="content">{{item.FNote || '无'}}</span>
</view>
</view>
<view slot="foot">
<u-button
size="mini"
type="error"
hover-class="defaultBtnhover"
@click="handleRefuse(item)"
>拒绝</u-button>
<u-button
size="mini"
hover-class="defaultBtnhover"
:custom-style="{marginLeft: '48rpx'}"
@click="pass(item)"
>通过</u-button>
</view>
</u-card>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
list: [{ name: '待审核' }, { name: '已通过' }, { name: '已拒绝' }],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
tabLists: [[], [], []],
showLoading: false,
};
},
computed: {},
onLoad() {},
onShow() {
this.getMembers();
},
methods: {
async getMembers(id) {
this.showLoading = true;
const response = await request.get('/api/Business/GetApplyJoin');
this.showLoading = false;
const { code, message, result } = response;
if (code === 0) {
this.tabLists[0] = result.filter((x) => !['TG', 'BTG'].includes(x.FCHECKRESULT));
this.tabLists[1] = result.filter((x) => x.FCHECKRESULT === 'TG');
this.tabLists[2] = result.filter((x) => x.FCHECKRESULT === 'BTG');
} else {
this.$refs.uToast.show({
title: message,
});
}
},
handleRefuse(data) {
this.$u.route('/pages/applyjoin/refuse/index', { billNo: data.FBillNo });
},
async pass(data) {
const response = await request.post('/api/Business/ApplyJoinAudit', {
FNumber: data.FBillNo,
FCheckResult: 'TG',
});
const { code, message, result } = response;
if (code === 0) {
this.$refs.uToast.show({
title: '已审核',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
this.getMembers();
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
},
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
animationfinish({ detail: { current } }) {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
.line {
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
.title {
display: inline-block;
width: 120rpx;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="拒绝申请"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-input v-model="content" type="textarea" height="240"></u-input>
<view class="mc-btn">
<u-button
:custom-style="{margin: '0 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="refuse"
>立即提交</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../../common/service';
export default {
data() {
return {
content: '',
billNo: '',
};
},
onLoad(options) {
this.billNo = options.billNo;
},
computed: {},
methods: {
async refuse() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const response = await request.post('/api/Business/ApplyJoinAudit', {
FNumber: this.billNo,
FCheckResult: 'BTG',
FRefuseDesc: this.content
});
const { code, message, result } = response;
if (code === 0) {
this.$refs.uToast.show({
title: '已拒绝',
});
uni.navigateBack();
} else {
this.$refs.uToast.show({
title: message,
});
}
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="修改手机"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :arrow="false">
<u-input
v-model="phone"
type="number"
height="48"
input-align="right"
maxlength="11"
placeholder="请输入手机号码"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
placeholder="请输入验证码"
:clearable="false"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
:loading="loading"
@click="handleCommit"
>确定修改</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
phone: '',
code: '',
codeText: '',
loading: false,
};
},
onLoad() {},
computed: {
...mapGetters({
wxDetail: 'user/wxDetail',
userDetail: 'user/userDetail',
}),
},
methods: {
...mapActions({
handleLogin: 'user/login',
updateOtherInfo: 'user/updateOtherInfo',
updateRegisterStatus: 'user/updateRegisterStatus',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
verifyCode() {
return request.post('/api/VerificationCode', {
Phone: this.phone,
VerificationCode: this.code,
});
},
async handleCommit() {
const _t = this;
if (!this.phone || !this.code) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const verifyRes = await this.verifyCode();
if (verifyRes.code === 0) {
const { Id, FCustBusinessMember } = this.userDetail;
const commitData = {
IsDeleteEntry: false,
Model: {
FID: Id, //商户内码
FCustBusinessMember: [
{
FEntryID: FCustBusinessMember[0].Id, //单据体内码
FPHONE: this.phone, //手机号码
},
],
},
};
const res = await request.post('/api/Business/Modify', commitData);
if (res.code === 0) {
this.$refs.uToast.show({
title: '修改成功',
isTab: true,
url: '/pages/index/index',
});
} else {
this.$refs.uToast.show({
title: res.message,
});
}
} else {
this.$refs.uToast.show({
title: verifyRes.message,
});
}
// const { encryptedData, iv } = this.wxDetail;
// let registerData = {
// Phone: this.phone,
// UserType: this.selectedTypeNumber,
// VerificationCode: this.code,
// encryptedData,
// iv,
// };
// if (this.selectedTypeNumber === '1') {
// registerData.RealName = this.nickName;
// } else {
// registerData.ComPanyName = this.companyName;
// }
// this.loading = true;
// const res = await request.post('/api/Business/save', registerData);
// this.loading = false;
// const { code, result } = res;
// if (code === 0) {
// const { Id, Number } = result.Result;
// this.updateOtherInfo({
// Id,
// Number,
// });
// this.getUserInfo();
// return;
// }
// if (code === 100) {
// this.showJoin = true;
// }
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tips {
margin-top: 12rpx;
padding-left: 32rpx;
font-size: 24rpx;
color: #ff7a45;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="更换师傅"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item
required
title="选择原因"
:value="displayReason"
@click="chooseReason"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item title="具体描述" :arrow="false">
<u-input
type="text"
v-model="desc"
height="48"
input-align="right"
placeholder="请输入具体的说明"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card title="上传凭证" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-upload
:action="action"
:header="uploadHeaders"
:max-count="3"
@on-uploaded="onUploaded"
name="file"
width="190"
></u-upload>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提交</u-button>
</view>
</view>
<u-picker
mode="selector"
v-model="showReason"
:range="reasons"
range-key="label"
@confirm="changeReason"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
showReason: false,
reasons: [
{
value: '001',
label: '技术不专业',
},
{
value: '002',
label: '态度不友好',
},
{
value: '003',
label: '未按时完成任务',
},
],
reason: null,
fileList: [],
desc: '',
};
},
onLoad() {
console.log(this.currentOrder);
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
}),
displayReason() {
if (!this.reason) {
return '请选择换师傅原因';
}
return `${this.reason.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => item.response.result);
},
changeReason(e) {
this.reason = this.reasons[e[0]];
},
chooseReason() {
this.showReason = true;
},
placeOrder() {
const _t = this;
const { reason } = this;
if (!reason) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const attachObj = {};
for (let index = 0; index < this.fileList.length; index++) {
const fileitem = this.fileList[index];
attachObj[`FChangeWorkerImage${index}`] = fileitem.fileid;
}
request
.post('/api/Order/save', {
IsDeleteEntry: false,
Model: {
FID: this.currentOrder.Id, //订单内码
FStatus: 'DGY', //订单状态:待预约,传固定值:DYY
FWorkerID: {
FNUMBER: this.currentOrder.FWorkerID.Number,
},
FReceiveOrdertime: this.$u.timeFormat(+new Date(), 'yyyy-mm-dd hh:MM'),
FSFAmount: '',
FChangeWorkerEntity: [
{
FChangeWorkerID: {
FNUMBER: this.currentOrder.FWorkerID.Number, //更换师傅编码
},
FChangeWorkerReason: {
FNumber: this.reason.value, // 更换原因
},
FChangeWorkerDesc: this.desc, //具体描述
...attachObj,
},
],
},
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
const { IsSuccess } = result.Result.ResponseStatus;
if (IsSuccess) {
_t.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/orders/index',
});
}
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.wmBd {
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
.hdline {
margin-bottom: 24rpx;
.name {
margin-right: 12rpx;
font-size: 30rpx;
color: #262626;
}
}
.line {
margin-top: 12rpx;
.smtitle {
font-size: 24rpx;
color: #8c8c8c;
}
.smContent {
font-size: 24rpx;
color: #595959;
}
}
}
}
.wmFt {
display: flex;
justify-content: space-between;
align-items: center;
.left {
.amount {
font-size: 36rpx;
color: #ffcb57;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="企业成员"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty
text="没有数据"
mode="list"
margin-top="80"
v-if="list.length === 0 && !showLoading"
></u-empty>
<u-card
v-for="item in list"
:key="item.Id"
:title="item.FRealName"
:thumb="item.FUserImage"
>
<view slot="body">
<view class="line">
<span class="title">手机:</span>
<span class="content">{{item.FPHONE}}</span>
</view>
<view class="line">
<span class="title">备注:</span>
<span class="content">{{item.FNote || '无'}}</span>
</view>
</view>
<view slot="foot">
<u-button
size="mini"
type="error"
hover-class="defaultBtnhover"
@click="deleteMember(item)"
>删除</u-button>
</view>
</u-card>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
list: [],
showLoading: false,
};
},
computed: {},
onLoad() {},
onShow() {
this.getAccountInfo();
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
getAccountInfo() {
this.showLoading = true;
request
.get('/api/Business/View')
.then((res) => {
const { code, message, result } = res;
this.showLoading = false;
if (code === 0) {
let detail = JSON.parse(result.result);
this.updateUserDetail(detail);
this.list = detail.FCustBusinessMember.filter(x => !x.FIsManager);
} else {
this.$refs.uToast.show({
title: message,
});
}
})
.catch(() => {
this.showLoading = false;
});
},
deleteMember(data) {
request
.post('/api/Business/BusinessMemberDelete', {
FEntryID: data.Id,
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '已删除',
});
this.getAccountInfo();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
.line {
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
.title {
display: inline-block;
width: 120rpx;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="客户信息"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="recognition">
<u-input
type="textarea"
v-model="addresRec"
class="addresRec"
:border="true"
:height="120"
:auto-height="true"
:disabled="disableInput"
placeholder="上海市浦东新区纳贤路701号百度上海研发中心 张三 13000000000"
/>
<u-button
:custom-style="{ margin: '16rpx 0', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="handleRecognition"
:disabled="disableInput"
>一键识别</u-button
>
</view>
<u-card title="客户信息" margin="30rpx 30rpx 0 30rpx" :body-style="{ padding: 0 }">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item required title="姓名" :arrow="false">
<u-input
type="text"
v-model="name"
height="48"
input-align="right"
placeholder="请输入姓名"
:clearable="false"
:disabled="disableInput"
/>
</u-cell-item>
<u-cell-item required title="手机" :arrow="false">
<u-input
type="number"
v-model="phone"
height="48"
input-align="right"
placeholder="请输入手机号"
:clearable="false"
:disabled="disableInput"
/>
</u-cell-item>
<u-cell-item required title="区域" :value="region" @click="chooseRegion"></u-cell-item>
<u-cell-item required title="详细地址" :arrow="false">
<u-input
type="text"
v-model="addressDetail"
height="48"
input-align="right"
placeholder="请输入详细地址"
:clearable="false"
:disabled="disableInput"
/>
</u-cell-item>
<u-cell-item title="位置" :arrow="false">
<u-icon name="map-fill" slot="right-icon" @click="openMap"></u-icon>
<u-input
type="text"
disabled
v-model="address"
height="48"
input-align="right"
placeholder="点击选择地点"
@click="openMap"
/>
</u-cell-item>
<u-cell-item
required
title="期望上门时间"
:value="expectedTime"
@click="chooseExpectedTime"
></u-cell-item>
<!-- <u-cell-item required title="物流公司" :arrow="false">
<u-input
type="text"
v-model="logistics"
height="48"
input-align="right"
placeholder="请填写物流公司"
/>
</u-cell-item>-->
<u-cell-item title="备注说明" :arrow="false" :border-bottom="false">
<u-input
type="textarea"
v-model="mark"
height="48"
input-align="right"
placeholder="备注说明"
:clearable="false"
:disabled="disableInput"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<!-- <u-card title="悬赏金额" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<view class="reward">
<u-input type="number" :border="false" />
<view class="unit"></view>
</view>
</view>
<view slot="foot">
<view class="minddesc">师傅将根据服务内容、服务价格等因素综合考虑接单,请务必合理设置悬赏金额,价格过低可能导致无人接单。</view>
</view>
</u-card>-->
<u-card title="支付方式" margin="30rpx 30rpx 0 30rpx" :body-style="{ padding: 0 }">
<view slot="body">
<u-cell-group>
<u-cell-item
title="下单支付"
label="下单支付享受VIP人工专属客服跟单服务,保质保量省心省时"
:arrow="false"
v-if="userDetail.F_PAEZ_CheckBox"
@click="() => this.changePayType({ name: '1' })"
>
<u-checkbox
slot="right-icon"
shape="circle"
active-color="#ffcb57"
size="50"
:value="payType === 1"
name="1"
@change="changePayType"
:disabled="disableInput"
></u-checkbox>
</u-cell-item>
<u-cell-item
title="验收完成支付"
label="由系统自动推荐匹配师傅自行选择师傅验收后支付,平台仅提供流程和师傅信息不承担安装风险"
:arrow="false"
v-if="userDetail.F_PAEZ_CheckBox1"
@click="() => this.changePayType({ name: '2' })"
>
<u-checkbox
slot="right-icon"
shape="circle"
active-color="#ffcb57"
size="50"
:value="payType === 2"
name="2"
@change="changePayType"
:disabled="disableInput"
></u-checkbox>
</u-cell-item>
<u-cell-item
title="业主现场支付"
label="安装完成后现场支付给师傅,请及时通知用户现场验收满意再付款"
:arrow="false"
v-if="userDetail.F_PAEZ_CheckBox11"
@click="() => this.changePayType({ name: '3' })"
>
<u-checkbox
slot="right-icon"
shape="circle"
active-color="#ffcb57"
size="50"
:value="payType === 3"
name="3"
@change="changePayType"
:disabled="disableInput"
></u-checkbox>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="30rpx 30rpx 0 30rpx" :body-style="{ padding: 0 }" v-if="payType === 2">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item title="期望价格" :arrow="false" :border-bottom="false">
<u-input
type="number"
v-model="expectAmount"
height="48"
input-align="right"
placeholder="完成这笔订单您期望费用范围"
:clearable="false"
:disabled="disableInput"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="30rpx 30rpx 0 30rpx" :body-style="{ padding: 0 }">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item
title="建议收费标准"
:arrow="false"
:value="`${totalAmount}元`"
v-if="[1, 2].includes(payType)"
></u-cell-item>
<u-cell-item
title="商家应付费用"
:arrow="false"
:value="`${totalAmount}元`"
:border-bottom="false"
v-if="[1].includes(payType)"
></u-cell-item>
<u-cell-item
title="现场收费金额"
:arrow="false"
:value="`${totalAmount}元`"
:border-bottom="false"
label="以与客户沟通为准"
v-if="[3].includes(payType)"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx" :body-style="{ padding: 0 }">
<view slot="body">
<u-alert-tips
type="warning"
title="温馨提示"
description="标准收费不含加急费远程费特殊墙体打孔费材料费等,如有相关特殊需求请联系客服确认价格再下单。"
v-if="payType !== 3"
></u-alert-tips>
<u-alert-tips
type="warning"
title="温馨提示"
description="具体收费金额以最终现成客户沟通结果为准,如您对当前页面费用有疑问,请及时联系客服进行咨询。"
v-else
></u-alert-tips>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>提交订单</u-button
>
</view>
<u-picker mode="region" v-model="showRegion" @confirm="confirmRegion" confirm-color="#ffcb57"></u-picker>
<u-picker
v-model="showExpectedTime"
mode="time"
:params="params"
:default-time="defaultTime"
@confirm="confirmExpectedTime"
confirm-color="#ffcb57"
></u-picker>
<u-modal
v-model="showModal"
content="您的余额不足,请充值"
confirm-text="去充值"
confirm-color="#ffcb57"
:show-title="false"
@confirm="goRecharge"
></u-modal>
<u-modal
v-model="showPswModal"
content="请先设置支付密码"
confirm-color="#ffcb57"
:show-title="false"
@confirm="goChangePsw"
></u-modal>
<u-modal v-model="showPswTips" content="请联系企业管理员设置支付密码" confirm-color="#ffcb57"></u-modal>
<u-keyboard
default
ref="uKeyboard"
mode="number"
:mask="true"
:mask-close-able="true"
:dot-enabled="false"
v-model="showPay"
:safe-area-inset-bottom="true"
:tooltip="false"
@change="onChange"
@backspace="onBackspace"
>
<view>
<view class="u-flex u-row-center u-m-t-48">
<u-message-input
mode="box"
:maxlength="6"
:dot-fill="true"
v-model="password"
:disabled-keyboard="true"
@finish="finish"
></u-message-input>
</view>
<view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">支付键盘</view>
</view>
</u-keyboard>
<u-modal
:show-title="false"
v-model="showPayPswError"
content="密码有误!"
:show-cancel-button="true"
confirm-text="重新支付"
@confirm="payAgain"
confirm-color="#ffcb57"
></u-modal>
<u-toast ref="uToast" />
</view>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
isUrgentOrder: false,
isAutoChange: false,
showRegion: false,
showExpectedTime: false,
name: '',
phone: '',
address: '',
gps: '',
expectedTime: '选择上门时间',
logistics: '',
mark: '',
province: null,
city: null,
area: null,
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false,
},
loading: false,
addressDetail: '',
payType: null,
expectAmount: null,
addresRec: '',
showModal: false,
showPswModal: false,
password: '',
showPay: false,
orderId: '',
disableInput: false,
showPswTips: false,
showPayPswError: false,
defaultTime: '',
};
},
onLoad() {
console.log(this.publishDetail);
const now = new Date();
now.setTime(now.getTime() + 24 * 60 * 60 * 1000);
this.defaultTime = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate();
this.expectedTime = this.defaultTime;
},
onShow() {
if (this.orderId) {
this.disableInput = true;
}
},
computed: {
...mapGetters({
publishDetail: 'publish/publishDetail',
curUserinfo: 'user/displayUserInfo',
userDetail: 'user/userDetail',
}),
region() {
if (!this.province) {
return '请选择地址';
}
return `${this.province.label}/${this.city.label}/${this.area.label}`;
},
totalAmount() {
return this.publishDetail.FGoodsMouldEntity.map((x) => x.FAmount).reduce((prev, current) => {
return prev + current;
});
},
},
watch: {
addressDetail(value) {
const _t = this;
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/',
data: {
address: `${this.province.label}${this.city.label}${this.area.label}${value}`,
key: 'LXNBZ-L5UC3-VE33D-YNCRH-OJCKK-IABDF',
},
method: 'GET',
success: function (res) {
const { data, statusCode } = res;
if (statusCode !== 200) {
console.log('服务异常');
return;
}
if (data.status === 0) {
const { lat, lng } = data.result.location;
_t.gps = `${lat},${lng}`;
}
},
});
},
},
methods: {
...mapActions({
updateCurrentStatus: 'order/updateCurrentStatus',
updateCurrentOrder: 'order/updateCurrentOrder',
updateUserDetail: 'user/updateUserDetail',
}),
goChangePsw() {
this.$u.route('/pages/password/pay/index');
},
chooseRegion() {
if (this.disableInput) {
return;
}
this.showRegion = true;
},
confirmRegion(e) {
// const areaList = await this.getqqmapLocation(e);
// console.log(areaList, typeof areaList)
// debugger
this.province = e.province;
this.city = e.city;
this.area = e.area;
},
openMap() {
if (this.disableInput) {
return;
}
const _t = this;
uni.chooseLocation({
success: function (res) {
_t.address = res.name;
_t.gps = `${res.latitude},${res.longitude}`;
},
});
},
chooseExpectedTime() {
if (this.disableInput) {
return;
}
this.showExpectedTime = true;
},
confirmExpectedTime(e) {
this.expectedTime = `${e.year}-${e.month}-${e.day}`;
},
getqqmapLocation(params) {
console.table(params);
const cityList = ['北京市', '重庆市', '天津市', '上海市'];
//香港,澳门,台湾 查不到数据(id对应不上,写死)
const other = {
香港: '710000',
澳门: '810000',
台湾: '820000',
};
console.log('params.province.label', params);
// const id = params.city.value;
let id = cityList.includes(params.province.label)
? params.province.value + '0000'
: params.city.value + '00';
if (['香港', '澳门', '台湾'].includes(params.province.label)) {
id = other[params.province.label];
}
return new Promise((resolve, reject) => {
uni.request({
url: 'https://apis.map.qq.com/ws/district/v1/getchildren',
data: {
id,
key: 'QVXBZ-H4YEK-TOMJT-A2JU3-LMTQQ-H4BAD',
},
method: 'GET',
success: function (res) {
console.log('re', res);
const { data, statusCode } = res;
if (statusCode !== 200) {
reject('服务异常');
}
if (data.status === 0) {
resolve(data.result[0]);
} else {
reject(data.message || '查询行政区域服务异常');
}
},
error: function (err) {
reject(err);
},
});
});
},
changePayType(e) {
this.payType = parseInt(e.name);
},
handleRecognition() {
const _t = this;
const { addresRec } = this;
if (!addresRec) {
this.$refs.uToast.show({
title: '请按照格式填入您的地址',
});
return;
}
uni.request({
url: 'https://aip.baidubce.com/oauth/2.0/token',
data: {
grant_type: 'client_credentials',
client_id: 'zK0l8vY7b2rRFsyXHVlbOjzT',
client_secret: '3VOg0lP3Qg7bDnYtd8ro2oUCf8cDfHRX',
},
method: 'GET',
success: function (res) {
const { statusCode, data } = res;
if (statusCode === 200) {
const { access_token } = data;
uni.request({
url: `https://aip.baidubce.com/rpc/2.0/nlp/v1/address?access_token=${access_token}`,
data: {
text: addresRec,
},
success: function (res1) {
const {
log_id,
town,
city,
county_code,
county,
city_code,
phonenum,
province_code,
town_code,
province,
person,
detail,
text,
} = res1.data;
_t.confirmRegion({
area: {
label: county,
value: county_code,
},
city: {
label: city,
value: city_code,
},
province: {
label: province,
value: province_code,
},
});
_t.name = person;
_t.phone = phonenum;
_t.addressDetail = detail;
},
});
}
},
error: function (err) {},
});
},
placeOrder() {
const {
name,
phone,
address,
gps,
expectedTime,
logistics,
province,
city,
area,
isUrgentOrder,
isAutoChange,
mark,
addressDetail,
curUserinfo,
payType,
expectAmount,
totalAmount,
orderId,
} = this;
if (
!name ||
!phone ||
!addressDetail ||
expectedTime === '选择上门时间' ||
!province ||
!city ||
!area ||
!payType
) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
// 未设置支付密码
if (this.userDetail.FPayPassword === ' ') {
if (this.curUserinfo.userType === '个人') {
this.showPswModal = true;
return;
}
if (this.curUserinfo.userType === '企业用户' && !this.curUserinfo.isManager) {
this.showPswTips = true;
return;
}
this.showPswModal = true;
return;
}
// 正则校验
const phoneReg = new RegExp('0?(13|14|15|17|18|19)[0-9]{9}');
if (phoneReg.test(name) || phoneReg.test(addressDetail) || phoneReg.test(mark)) {
this.$refs.uToast.show({
title: '请勿在姓名、详细地址、备注中填写手机号码!',
});
return;
}
if (payType === 1) {
// 余额不足付款
if (this.curUserinfo.balance < this.totalAmount) {
this.showModal = true;
return;
}
// 输入支付密码
this.showPay = true;
return;
}
this.pay();
},
goRecharge() {
this.$u.route('/pages/recharge/index');
},
onChange(val) {
if (this.password.length < 6) {
this.password += val;
}
if (this.password.length >= 6) {
if (this.password === this.userDetail.FPayPassword) {
this.pay();
} else {
this.showPay = false;
this.password = '';
this.showPayPswError = true;
}
}
},
pay() {
this.showPay = false;
const {
name,
phone,
address,
gps,
expectedTime,
logistics,
province,
city,
area,
isUrgentOrder,
isAutoChange,
mark,
addressDetail,
curUserinfo,
payType,
expectAmount,
totalAmount,
orderId,
} = this;
if (!orderId) {
uni.showLoading({
title: '提交订单中',
});
let commitData = {
Model: {
FCustomerName: name,
FCustomerPhone: phone,
FHopeServiceTime: expectedTime,
Logistics: logistics,
FCustomerNote: mark,
FPROVINCE: province.label,
FPROVINCE_ID: String(province.value).padEnd(6, '0'),
FCity: city.label,
FCity_ID: String(city.value).padEnd(6, '0'),
FCOUNTY: area.label,
FCOUNTY_ID: area.value,
FLocation: gps,
FAdressLocation: address,
FAdress: addressDetail,
FIsAutoChange: isAutoChange,
FIsUrgentOrder: isUrgentOrder,
// 上一步的数据
FID: 0,
...this.publishDetail,
FPayWay: payType,
FExpectAmount: expectAmount,
FSHAmount: totalAmount,
// FSHSAmount: FPayWay === 1 ? totalAmount : '',
FDocumentMakerName: curUserinfo.name,
FStatus: 'DBJ',
},
};
request.post('/api/Order/save', commitData).then((res) => {
const { code, message } = res;
console.log('订单已生成:', res);
console.log('订单提交参数:', commitData);
uni.hideLoading();
if (code === 0) {
if (payType === 1) {
this.orderId = res.result.Result.Id;
this.payForOrder();
return;
}
this.updateCurrentStatus(1).then(() => {
this.$refs.uToast.show({
title: '下单成功!',
isTab: true,
url: '/pages/orders/index',
});
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
} else {
this.payForOrder();
}
},
payForOrder() {
const _t = this;
uni.showLoading({
title: '支付中',
});
request
.post('/api/Order/Pay', {
FID: this.orderId,
FSHSAmount: Number(this.totalAmount).toFixed(2),
FStatus: 'DBJ',
})
.then((res) => {
console.log('订单支付参数:', this.orderId);
const { code, message } = res;
if (code === 0) {
uni.showLoading({
title: '支付成功,正在跳转',
});
_t.updateCurrentStatus(1).then(() => {
_t.getAccountInfo();
});
} else {
_t.$refs.uToast.show({
title: message,
});
}
uni.hideLoading();
});
},
onBackspace(e) {
if (this.password.length > 0) {
this.password = this.password.substring(0, this.password.length - 1);
}
},
payAgain() {
this.showPay = true;
},
getAccountInfo() {
const _t = this;
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
uni.hideLoading();
const detail = JSON.parse(result.result);
_t.updateUserDetail(detail).then(() => {
_t.$refs.uToast.show({
title: '订单支付成功',
isTab: true,
url: '/pages/orders/index',
});
});
} else {
uni.hideLoading();
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.recognition {
margin: 30rpx 30rpx 0 30rpx;
.addresRec {
/deep/ .u-input--border {
background-color: #fff;
}
}
/deep/.u-hairline-border {
&::after {
border: none;
}
}
}
.distinguish {
/deep/.u-input {
padding: 0 !important;
}
/deep/.u-btn {
margin: 12rpx 0;
width: 300rpx;
}
}
.coupon {
display: flex;
justify-content: space-between;
align-items: center;
}
.paydetail {
.line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6rpx 0;
.title {
font-size: 24rpx;
color: #8c8c8c;
}
.content {
font-size: 26rpx;
color: #434343;
&.total {
font-size: 32rpx;
color: #f5222d;
}
}
}
}
.mlabel {
font-size: 24rpx;
color: #595959;
.desc {
font-size: 20rpx;
color: #8c8c8c;
}
}
.reward {
display: flex;
justify-content: space-between;
align-items: center;
}
.minddesc {
color: #f5222d;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="意见反馈"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-input v-model="content" type="textarea" height="240"></u-input>
<view class="mc-btn">
<u-button
:custom-style="{margin: '0 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>立即提交</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
content: '',
};
},
onLoad() {},
computed: {},
methods: {
placeOrder() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Feedback/SH', {
Model: {
FContent: this.content,
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="新增模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :foot-border-top="false" :body-style="{ padding: 0 }">
<view slot="head">
<u-upload
:action="action"
:header="uploadHeaders"
@on-uploaded="onUploaded"
@on-remove="onRemove"
name="file"
width="190"
></u-upload>
</view>
<view slot="body" class="goodBd">
<u-cell-group>
<u-cell-item required title="模板名称" :arrow="false">
<u-input
v-model="name"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入模板名称"
/>
</u-cell-item>
<u-cell-item
required
title="服务类目"
arrow
:value="displayServiceType"
@click="chooseServiceType"
></u-cell-item>
<u-cell-item
required
title="商品类别"
arrow
:value="displayGoodType"
@click="chooseGoodType"
></u-cell-item>
<!-- <u-cell-item title="商品规格" :arrow="false">
<u-input
v-model="sku"
type="text"
:border="false"
:clearable="false"
placeholder="墙体结构、尺寸或家具的长宽高等"
input-align="right"
:custom-style="{
marginRight: 0
}"
/>
</u-cell-item> -->
<u-cell-item title="备注说明" :arrow="false">
<u-input
v-model="mark"
type="textarea"
input-align="right"
:custom-style="{ paddingLeft: '8rpx' }"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>完成</u-button
>
</view>
<u-picker
mode="selector"
v-model="showGoodTypes"
:range="goodTypes"
range-key="label"
@confirm="changeGoodType"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showServiceTypes"
:range="serviceTypes"
range-key="label"
@confirm="changeServiceType"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</view>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
fileList: [],
showGoodTypes: false,
goodTypes: [],
goodType: null,
showServiceTypes: false,
serviceTypes: [],
serviceType: null,
// sku: '',
mark: '',
name: '',
loading: false,
};
},
onLoad() {
this.getServiceTypes();
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
}),
displayGoodType() {
if (!this.goodType) {
return '请选择商品类别';
}
return `${this.goodType.label}`;
},
displayServiceType() {
if (!this.serviceType) {
return '请选择服务类型';
}
return `${this.serviceType.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => {
var { code, result } = item.response;
if (code === 0) {
return result;
}
return;
});
},
onRemove(index, lists, name) {
this.fileList.splice(index, 1);
},
getGoodTypes(servicename) {
request.get('/api/BaseData/GoodsType', { serviceitem: servicename }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.goodTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
getServiceTypes() {
request.get('/api/BaseData/ServiceItem').then((res) => {
const { code, result } = res;
if (code === 0) {
this.serviceTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
changeGoodType(e) {
this.goodType = this.goodTypes[e[0]];
},
chooseGoodType() {
this.showGoodTypes = true;
},
changeServiceType(e) {
this.serviceType = this.serviceTypes[e[0]];
this.getGoodTypes(this.serviceType.label);
},
chooseServiceType() {
this.showServiceTypes = true;
},
placeOrder() {
const { name, goodType, serviceType, sku, mark, fileList } = this;
if (!name || !goodType || !serviceType || fileList.length === 0) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const commitData = {
Model: {
FName: name,
FBusinessID: {
FNumber: this.userDetail.Number,
},
FServiceItemID: {
FNumber: serviceType.number,
},
FGoodsTypeID: {
FNumber: goodType.number,
},
// FModel: sku,
F_PAEZ_ImagesEntity: fileList.map((x) => {
return {
FAttachmentImage: x.fileid,
};
}),
FDescription: mark,
},
};
this.loading = true;
request.post('/api/GoodsMould/save', commitData).then((res) => {
const { code, message } = res;
this.loading = false;
if (code === 0) {
this.$refs.uToast.show({
title: '添加成功!',
});
uni.navigateBack();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.goodFt {
.price {
display: flex;
justify-content: flex-end;
align-content: center;
.unit,
.amount {
font-size: 36rpx;
color: red;
}
.amount {
margin-right: 32rpx;
}
}
.delete {
margin-top: 12rpx;
padding-top: 24rpx;
border-top: 2rpx dashed #bfbfbf;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="选择模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="search">
<u-search
placeholder="模板名称/商品类目"
bg-color="#ffffff"
@search="handleSearch"
@custom="handleSearch"
></u-search>
</view>
<u-button size="mini" :custom-style="{ margin: '30rpx 32rpx 32rpx 32rpx' }" @click="addTemplate">
<u-icon name="plus"></u-icon>添加模板
</u-button>
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<template v-if="orders.length === 0 && !showLoading">
<u-empty text="暂无模板信息,前往添加" mode="list"></u-empty>
</template>
<template v-else>
<u-card :show-foot="false" margin="0 30rpx 15rpx 30rpx" v-for="item in orders" :key="item.Id">
<view slot="head">
<u-checkbox
v-model="item.checked"
shape="circle"
active-color="#ffcb57"
:size="48"
></u-checkbox>
</view>
<view slot="body">
<view class="gdtemplate">
<view class="left">
<image :src="item.thumbImg" mode="aspectFill" />
</view>
<view class="right">
<view class="title">{{ item.Name[0].Value }}</view>
<view class="type">{{ item.FServiceItemID.Name[0].Value }}</view>
<!-- <view class="extra">
<view class="exitem">
<span class="title">商品规格:</span>
{{item.FModel || '无'}}
</view>
</view> -->
</view>
</view>
</view>
</u-card>
</template>
</view>
<view class="fixBtn" v-if="selected" @click="confirmSelected">
<u-icon name="checkbox-mark"></u-icon>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
categoryId: '',
orders: [],
showLoading: false,
};
},
onLoad(options) {
this.categoryId = options.id;
this.getTemplates(options.id);
},
onShow() {
if (this.categoryId) {
this.getTemplates(this.categoryId);
}
},
computed: {
selected() {
return this.orders.some((x) => x.checked);
},
},
methods: {
...mapActions({
updateTemplateList: 'templateModule/updateTemplateList',
importTemplates: 'publish/importTemplates',
}),
addTemplate() {
this.$u.route('/pages/good-template/add/index');
},
async getTemplates(id) {
this.showLoading = true;
const response = await request.get('/api/GoodsMould/View', { id: id });
const { code, message, result } = response;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
// const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
imgArr.push({
fileid: item.CustGoodsMouldImages[j].FAttachmentImage,
filename: `${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
fileurl: `https://www.jtfw8.com/WXXCX/FileService/${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
});
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
item.checked = false;
}
this.orders = result;
console.log(result);
this.updateTemplateList(result);
} else {
this.$refs.uToast.show({
title: message,
});
}
this.showLoading = false;
},
async getImageUrl(fileId) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: fileId });
return res.result;
},
confirmSelected() {
if (this.selected) {
this.importTemplates(this.orders.filter((x) => x.checked)).then(() => {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.isAdding = true;
uni.navigateBack();
});
}
},
handleSearch(value) {
const { categoryId } = this;
request
.get('/api/GoodsMould/Search', {
name: value,
})
.then(async (res) => {
const { code, message, result } = res;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
console.log('item', item);
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
imgArr.push(temp[0]);
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
item.checked = false;
}
this.orders = result.filter((x) => x.FServiceItemID_Id == categoryId);
this.updateTemplateList(result);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="编辑模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :foot-border-top="false" :body-style="{ padding: 0 }">
<view slot="head">
<u-upload
:file-list="displayFileList"
:action="action"
:header="uploadHeaders"
@on-uploaded="onUploaded"
@on-remove="onRemove"
name="file"
width="190"
></u-upload>
</view>
<view slot="body" class="goodBd">
<u-cell-group>
<u-cell-item required title="模板名称" :arrow="false">
<u-input
v-model="name"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入模板名称"
/>
</u-cell-item>
<u-cell-item
required
title="服务类目"
arrow
:value="displayServiceType"
@click="chooseServiceType"
></u-cell-item>
<u-cell-item
required
title="商品类别"
arrow
:value="displayGoodType"
@click="chooseGoodType"
></u-cell-item>
<!-- <u-cell-item required title="商品规格" :arrow="false">
<u-input
v-model="sku"
type="text"
:border="false"
placeholder="墙体结构、尺寸或家具的长宽高等"
input-align="right"
:custom-style="{
marginRight: 0
}"
/>
</u-cell-item> -->
<u-cell-item title="备注说明" :arrow="false">
<u-input
v-model="mark"
type="textarea"
input-align="right"
:custom-style="{ paddingLeft: '8rpx' }"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>完成</u-button
>
</view>
<u-picker
mode="selector"
v-model="showGoodTypes"
:range="goodTypes"
range-key="label"
@confirm="changeGoodType"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showServiceTypes"
:range="serviceTypes"
range-key="label"
@confirm="changeServiceType"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</view>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
fileList: [],
showGoodTypes: false,
goodTypes: [],
goodType: null,
showServiceTypes: false,
serviceTypes: [],
serviceType: null,
// sku: '',
mark: '',
name: '',
loading: false,
displayFileList: [],
};
},
onLoad() {
this.getServiceTypes();
this.name = this.currentTemplate.Name[0].Value;
this.serviceType = {
value: this.currentTemplate.FServiceItemID.Id,
label: this.currentTemplate.FServiceItemID.Name[0].Value,
number: this.currentTemplate.FServiceItemID.Number,
};
this.getGoodTypes(this.serviceType.label);
this.goodType = {
value: this.currentTemplate.FGoodsTypeID.Id,
label: this.currentTemplate.FGoodsTypeID.Name[0].Value,
number: this.currentTemplate.FGoodsTypeID.Number,
};
// this.sku = this.currentTemplate.FModel;
this.mark = this.currentTemplate.Description[0].Value;
this.displayFileList = this.currentTemplate.CustGoodsMouldImagesURL.map((x) => {
return {
url: x.fileurl,
};
});
this.fileList = this.currentTemplate.CustGoodsMouldImagesURL;
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
currentTemplate: 'templateModule/currentTemplate',
}),
displayGoodType() {
if (!this.goodType) {
return '请选择商品类别';
}
return `${this.goodType.label}`;
},
displayServiceType() {
if (!this.serviceType) {
return '请选择服务类型';
}
return `${this.serviceType.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => {
if (!item.response) {
return this.fileList.find((x) => x.fileurl === item.url);
}
var { code, result } = item.response;
if (code === 0) {
return result;
}
return;
});
},
onRemove(index, lists, name) {
this.fileList.splice(index, 1);
},
getGoodTypes(servicename) {
request.get('/api/BaseData/GoodsType', { serviceitem: servicename }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.goodTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
getServiceTypes() {
request.get('/api/BaseData/ServiceItem').then((res) => {
const { code, result } = res;
if (code === 0) {
this.serviceTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
changeGoodType(e) {
this.goodType = this.goodTypes[e[0]];
},
chooseGoodType() {
this.showGoodTypes = true;
},
changeServiceType(e) {
this.serviceType = this.serviceTypes[e[0]];
this.getGoodTypes(this.serviceType.label);
},
chooseServiceType() {
this.showServiceTypes = true;
},
placeOrder() {
const { name, goodType, serviceType, sku, mark, fileList, currentTemplate } = this;
if (!name || !goodType || !serviceType || fileList.length === 0) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const commitData = {
Model: {
FID: currentTemplate.Id,
FName: name,
FBusinessID: {
FNumber: this.userDetail.Number,
},
FServiceItemID: {
FNumber: serviceType.number,
},
FGoodsTypeID: {
FNumber: goodType.number,
},
// FModel: sku,
F_PAEZ_ImagesEntity: fileList.map((x) => {
return {
FAttachmentImage: x.fileid,
};
}),
FDescription: mark,
},
};
this.loading = true;
request.post('/api/GoodsMould/save', commitData).then((res) => {
const { code, message } = res;
this.loading = false;
if (code === 0) {
this.$refs.uToast.show({
title: '添加成功!',
url: '/pages/good-template/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.goodFt {
.price {
display: flex;
justify-content: flex-end;
align-content: center;
.unit,
.amount {
font-size: 36rpx;
color: red;
}
.amount {
margin-right: 32rpx;
}
}
.delete {
margin-top: 12rpx;
padding-top: 24rpx;
border-top: 2rpx dashed #bfbfbf;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="商品模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="search">
<u-search
placeholder="模板名称/商品类别"
bg-color="#ffffff"
@search="handleSearch"
@custom="handleSearch"
></u-search>
</view>
<u-button size="mini" :custom-style="{ margin: '30rpx 32rpx 30rpx 32rpx' }" @click="addTemplate">
<u-icon name="plus"></u-icon>添加模板
</u-button>
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<template v-if="orders.length === 0 && !showLoading">
<u-empty text="暂无模板信息,前往添加" mode="list"></u-empty>
</template>
<template v-else>
<view class="templates">
<u-swipe-action
:index="index"
v-for="(item, index) in orders"
:key="item.Id"
@click="click"
:options="options"
>
<u-card :show-head="false" :show-foot="false" margin="0" padding="0" @click="editTemplate(item.Id)">
<view slot="body">
<view class="gdtemplate">
<view class="left">
<image :src="item.thumbImg" mode="aspectFill" />
</view>
<view class="right">
<view class="title">{{ item.Name[0].Value }}</view>
<view class="type">{{ item.FServiceItemID.Name[0].Value }}</view>
<!-- <view class="extra">
<view class="exitem">
<span class="title">商品规格:</span>
{{ item.FModel ? item.FModel : '无' }}
</view>
</view> -->
</view>
</view>
</view>
<!-- <view slot="foot">
<view class="action">
<u-button size="mini" @click="editTemplate(item.Id)">编辑</u-button>
<u-button size="mini" @click="deleteTemplate(item.Id)">删除</u-button>
</view>
</view> -->
</u-card>
</u-swipe-action>
</view>
</template>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
orders: [],
showLoading: false,
options: [
{
text: '编辑',
style: {
backgroundColor: '#007aff',
},
},
{
text: '删除',
style: {
backgroundColor: '#dd524d',
},
},
],
};
},
onLoad() {
this.getTemplates();
},
onShow() {
this.getTemplates();
},
computed: {},
methods: {
...mapActions({
updateTemplateList: 'templateModule/updateTemplateList',
updateCurrentTemplate: 'templateModule/updateCurrentTemplate',
}),
addTemplate() {
this.$u.route('/pages/good-template/add/index');
},
click(index, index1) {
const item = this.orders[index];
if (index1 === 0) {
this.editTemplate(item.Id);
} else if (index1 === 1) {
this.deleteTemplate(item.Id);
}
},
contentClick(index) {
const item = this.orders[index];
this.editTemplate(item.Id);
},
async getTemplates() {
this.showLoading = true;
const response = await request.get('/api/GoodsMould/View');
const { code, message, result } = response;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
// const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
// imgArr.push(temp[0]);
imgArr.push({
fileid: item.CustGoodsMouldImages[j].FAttachmentImage,
filename: `${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
fileurl: `https://www.jtfw8.com/WXXCX/FileService/${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
});
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
}
this.orders = result;
this.updateTemplateList(result);
} else {
this.orders = [];
this.updateTemplateList([]);
}
this.showLoading = false;
},
async getImageUrl(fileId) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: fileId });
return res.result;
},
editTemplate(id) {
const curTemplate = this.orders.find((x) => x.Id === id);
console.log(curTemplate);
this.updateCurrentTemplate(curTemplate).then(() => {
this.$u.route('/pages/good-template/edit/index');
});
},
deleteTemplate(id) {
if (!id) {
return;
}
request
.post('/api/GoodsMould/Delete', {
FID: id,
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.getTemplates();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
handleSearch(value) {
request
.get('/api/GoodsMould/Search', {
name: value,
})
.then(async (res) => {
const { code, message, result } = res;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
console.log('item', item);
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
// const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
imgArr.push({
fileid: item.CustGoodsMouldImages[j].FAttachmentImage,
filename: `${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
fileurl: `https://www.jtfw8.com/WXXCX/FileService/${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
});
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
}
this.orders = result;
this.updateTemplateList(result);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
.templates {
padding: 0 30rpx;
/deep/ .u-swipe-action {
margin-bottom: 24rpx;
background-color: #f4f4f5;
border-radius: 12rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="雇佣师傅"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<scroll-view scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom">
<u-card :show-head="false" v-for="item in workers" :key="item.Id">
<view slot="body" class="wmBd">
<view class="left">
<u-avatar src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"></u-avatar>
</view>
<view class="right">
<view class="hdline">
<span class="name">{{ item.FSFQuotedPriceWorkerID.Name[0].Value }}</span>
<u-icon name="integral" color="#ffec3d"></u-icon>
</view>
<!-- <view class="line">
<span class="smtitle">联系电话:</span>
<span class="smContent">{{item.FSFQuotedPriceWorkerID.FPHONE}}</span>
</view>-->
<view class="line">
<span class="smtitle">服务类目:</span>
<span class="smContent">{{
item.FSFQuotedPriceWorkerID.FServiceTypeEntity | formatServiceType
}}</span>
</view>
<view class="line">
<span class="smtitle">服务区域:</span>
<span class="smContent">{{
item.FSFQuotedPriceWorkerID.FServiceArea | formatArea
}}</span>
</view>
<view class="line">
<span class="smtitle">案例:</span>
</view>
<view class="line">
<view class="pre-box">
<u-image
:width="160"
:height="160"
v-for="(img, j) in item.FServiceImagesURL"
:key="j"
:src="img.url"
border-radius="5"
@click="previewImg(img.url)"
></u-image>
</view>
</view>
</view>
</view>
<view slot="foot">
<u-cell-group :border="false">
<!-- <u-cell-item title="师傅报价" :value="item.FSFQuotedPriceAmount" :arrow="false">
</u-cell-item> -->
<u-cell-item
title="商家应付费用"
:value="computedPrice(item)"
:border-bottom="false"
:arrow="false"
>
</u-cell-item>
</u-cell-group>
<u-button
type="primary"
:custom-style="{ marginTop: '24rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="hireHe(item)"
>雇佣他</u-button
>
<!-- <view class="left">
<span>报价:</span>
<span class="amount">¥ {{ item.FSFQuotedPriceAmount }}</span>
</view>
<view class="right">
</view> -->
</view>
</u-card>
</scroll-view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
workers: [],
};
},
onLoad() {
console.log(this.currentOrder);
this.getWorks();
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
}),
},
filters: {
formatServiceType(arr) {
return arr
.map((x) => {
return x.FSERVICEITEM.Name[0].Value;
})
.join(',');
},
formatArea(arr) {
return arr
.map((x) => {
return `${x.FEntityPROVINCE}${x.FEntityCity}${x.FEntityCOUNTY}`;
})
.join(', ');
},
},
methods: {
...mapActions({
updateCurrentWorker: 'order/updateCurrentWorker',
}),
computedPrice(data) {
return (this.currentOrder.FPayWay === "1" || this.currentOrder.FPayWay === "3") ? `${Number(this.currentOrder.FSHAmount).toFixed(2)}元` : `${(data.FSFQuotedPriceAmountSF * (1 + data.FSFQuotedPriceWorkerID.FInfoRate / 100)).toFixed(2)}元`;
},
async getWorks() {
for (let i = 0; i < this.currentOrder.FSFQuotedPriceEntity.length; i++) {
const worker = this.currentOrder.FSFQuotedPriceEntity[i];
worker.FServiceImagesURL = [];
for (let j = 0; j < worker.FSFQuotedPriceWorkerID.FServiceImagesEntity.length; j++) {
const imgInfo = worker.FSFQuotedPriceWorkerID.FServiceImagesEntity[j];
const result = await this.getImageUrl(imgInfo.FServiceImage);
worker.FServiceImagesURL.push({ url: result[0].fileurl });
}
}
this.workers = this.currentOrder.FSFQuotedPriceEntity;
console.log(this.workers);
},
async getImageUrl(fileId) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: fileId });
return res.result;
},
reachBottom() {},
hireHe(worker) {
const _t = this;
let commitData = {
Model: {
FID: this.currentOrder.Id, //订单内码
FStatus: 'DYY', //订单状态:待预约,传固定值:DYY
FWorkerID: {
FNUMBER: worker.FSFQuotedPriceWorkerID.Number,
},
FReceiveOrdertime: this.$u.timeFormat(+new Date(), 'yyyy-mm-dd hh:MM')
},
};
if (this.currentOrder.FPayWay === "1" || this.currentOrder.FPayWay === "3") {
const fee = (this.currentOrder.FSHAmount * (worker.FSFQuotedPriceWorkerID.FInfoRate / 100)).toFixed(2);
commitData.Model.FSFAmount = worker.FSFQuotedPriceAmountSF;
commitData.Model.FSFYAmount = this.currentOrder.FSHAmount - fee;
commitData.Model.FInfoFee = fee;
} else {
const fee = (worker.FSFQuotedPriceAmountSF * (worker.FSFQuotedPriceWorkerID.FInfoRate / 100)).toFixed(2);
commitData.Model.FSFAmount = worker.FSFQuotedPriceAmountSF;
commitData.Model.FSFYAmount = worker.FSFQuotedPriceAmountSF;
commitData.Model.FSHAmount = worker.FSFQuotedPriceAmountSF + parseFloat(fee);
commitData.Model.FInfoFee = fee;
}
request.post('/api/Order/save', commitData).then((res) => {
const { code, message, result } = res;
if (code === 0) {
const { IsSuccess } = result.Result.ResponseStatus;
if (IsSuccess) {
_t.updateCurrentWorker(worker).then(() => {
_t.$refs.uToast.show({
title: '提交成功',
isTab: true,
url: '/pages/orders/index',
});
});
}
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
previewImg(url) {
uni.previewImage({
current: 0,
urls: [url],
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.wmBd {
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
.hdline {
margin-bottom: 24rpx;
.name {
margin-right: 12rpx;
font-size: 30rpx;
color: #262626;
}
}
.line {
margin-top: 12rpx;
.smtitle {
font-size: 24rpx;
color: #8c8c8c;
}
.smContent {
font-size: 24rpx;
color: #595959;
}
}
}
}
.wmFt {
display: flex;
justify-content: space-between;
align-items: center;
.left {
.amount {
font-size: 36rpx;
color: #ffcb57;
}
}
}
.pre-box {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
/deep/ .u-image {
margin-bottom: 12rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:is-back="false"
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="首页"
title-color="#472d21"
></u-navbar>
<div class="overlook">
<div class="block">
<span class="title">账号信息</span>
<span class="name">{{ curUserinfo.name }}</span>
<span class="phone">{{ curUserinfo.phone }}</span>
<u-button
:custom-style="{ marginTop: '6rpx', backgroundColor: '#ffcb57', color: '472d21' }"
size="mini"
hover-class="defaultBtnhover"
@click="seeAccount"
>账号信息</u-button
>
</div>
<div class="line"></div>
<div class="block">
<span class="title">账号余额</span>
<span class="amount">{{ curUserinfo.balance }}</span>
<u-button
:custom-style="{ marginTop: '6rpx', backgroundColor: '#ffcb57', color: '472d21' }"
size="mini"
hover-class="defaultBtnhover"
@click="rechargeAmount"
>充值余额</u-button
>
</div>
</div>
</div>
<div class="card">
<u-card title="全部订单" sub-title="查看全部订单" :foot-border-top="false" @head-click="goOrders('0')">
<view slot="body" class="orderBd">
<view class="order-item" @click="goOrders('1')">
<u-badge type="error" :count="orderCounts.count1" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">待报价</view>
</view>
<view class="order-item" @click="goOrders('2')">
<u-badge type="error" :count="orderCounts.count2" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">待雇佣</view>
</view>
<view class="order-item" @click="goOrders('3')">
<u-badge type="error" :count="orderCounts.count3" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">待预约</view>
</view>
<view class="order-item" @click="goOrders('4')">
<u-badge type="error" :count="orderCounts.count4" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">施工中</view>
</view>
<view class="order-item" @click="goOrders('5')">
<u-badge type="error" :count="orderCounts.count5" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">待验收</view>
</view>
<view class="order-item" @click="goOrders('7')">
<u-badge type="error" :count="orderCounts.count6" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">待结算</view>
</view>
<view class="order-item" @click="goOrders('8')">
<u-badge type="error" :count="orderCounts.count7" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">已完成</view>
</view>
<view class="order-item" @click="goOrders('11')">
<u-badge type="error" :count="orderCounts.count8" :offset="[0, 16]"></u-badge>
<view class="avatarImg">
<view class="inner">
<img src="/static/images/common/4.png" alt srcset />
</view>
</view>
<view class="order-item-title">已取消</view>
</view>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 32rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="placeOrder"
>发布订单</u-button
>
</view>
</div>
<u-picker
mode="region"
v-model="showRegion"
:params="paramsRegion"
@confirm="changeRegion"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showCategories"
:range="categorylist"
range-key="label"
@confirm="changeCategory"
confirm-color="#ffcb57"
></u-picker>
<u-popup v-model="showService" mode="bottom" length="35%">
<div class="sScontent">
<u-checkbox-group @change="checkboxGroupChange" wrap active-color="#ffcb57">
<u-checkbox
v-model="item.checked"
v-for="(item, index) in services"
:key="index"
:name="item.name"
>{{ item.name }}</u-checkbox
>
</u-checkbox-group>
</div>
<div class="sSfooter">
<u-button
size="medium"
:custom-style="{ marginTop: '6rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="changeServices"
>确定</u-button
>
</div>
</u-popup>
<u-popup v-model="showAuth" mode="center" border-radius="15" :mask-close-able="false">
<div class="auContent">
<view class="title">授权登录</view>
<u-avatar
class="avatar"
src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
></u-avatar>
<view class="productname">京台服务客户版</view>
<view class="companyname">靖靖智能科技(上海)有限公司</view>
<u-button
size="medium"
:custom-style="{ marginTop: '32rpx', backgroundColor: '#ffcb57', color: '472d21' }"
hover-class="defaultBtnhover"
open-type="getUserInfo"
@getuserinfo="getUserInfo"
>授权登录</u-button
>
<u-button
size="medium"
:custom-style="{ margin: '18rpx 0 16rpx 0', backgroundColor: '#ffffff', color: '472d21' }"
hover-class="defaultBtnhover"
>暂不登录</u-button
>
<u-radio-group v-model="protocol" active-color="#ffcb57">
<u-radio name="agree" :disabled="false" shape="circle" label-size="24">
我已查看并同意以下
<u-link href="http://www.uviewui.com" font-size="24">《用户协议》</u-link>
</u-radio>
</u-radio-group>
</div>
</u-popup>
<u-popup v-model="showPassModal" mode="center" border-radius="15" :mask-close-able="false">
<div class="auContent">
<u-avatar
class="avatar"
src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
></u-avatar>
<view class="productname">京台服务客户版</view>
<view class="companyname">靖靖智能科技(上海)有限公司</view>
<view class="pass-title"
>请耐心等待企业管理员处理你的申请,如有任何问题可以关注公众号京台服务寻求客服帮助</view
>
<view class="mc-btn">
<u-button
size="medium"
:custom-style="{ marginTop: '32rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="confirmClose"
>确定</u-button
>
</view>
</div>
</u-popup>
<u-popup v-model="showRefuseModal" mode="center" border-radius="15" :mask-close-able="false">
<div class="auContent">
<u-avatar
class="avatar"
src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
></u-avatar>
<view class="productname">京台服务客户版</view>
<view class="companyname">靖靖智能科技(上海)有限公司</view>
<view class="refuse-title">您的申请被拒绝</view>
<view class="mc-btn">
<u-button
size="medium"
:custom-style="{ marginTop: '32rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
open-type="getUserInfo"
@getuserinfo="registerAgain"
>重新注册</u-button
>
</view>
</div>
</u-popup>
<u-popup v-model="showForbidModal" mode="center" border-radius="15" :mask-close-able="false">
<div class="auContent">
<u-avatar
class="avatar"
src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
></u-avatar>
<view class="productname">京台服务客户版</view>
<view class="companyname">靖靖智能科技(上海)有限公司</view>
<view class="refuse-title">您的账户已被禁用,请联系客服!</view>
<view class="mc-btn">
<u-button
size="medium"
:custom-style="{ marginTop: '32rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
open-type="contact"
>联系客服</u-button
>
</view>
</div>
</u-popup>
<u-popup v-model="showPasswordTips" mode="center" border-radius="15" :mask-close-able="false">
<div class="auContent">
<u-avatar
class="avatar"
src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
></u-avatar>
<view class="productname">京台服务客户版</view>
<view class="companyname">靖靖智能科技(上海)有限公司</view>
<view class="pass-title">您还未设置支付密码,请先设置您的支付密码</view>
<view class="mc-btn">
<u-button
size="medium"
:custom-style="{ marginTop: '32rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
@click="goSetPsw"
>立即设置</u-button
>
</view>
</div>
</u-popup>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
showRegion: false,
showCategories: false,
showService: false,
showAuth: false,
protocol: 'agree',
paramsRegion: {
province: true,
city: true,
area: true,
},
region: null,
categorylist: [
{
value: 'xxxxx',
label: '淋浴房',
},
{
value: 'yyyyy',
label: '汽车用品',
},
],
category: null,
services: [
{
name: '拆旧',
checked: false,
disabled: false,
},
{
name: '安装',
checked: false,
disabled: false,
},
{
name: '测量',
checked: false,
disabled: false,
},
],
chooseServices: null,
confirmServices: null,
orderCounts: {
count1: 0,
count2: 0,
count3: 0,
count4: 0,
count5: 0,
count6: 0,
count7: 0,
count8: 0,
},
showPassModal: false,
showRefuseModal: false,
showPasswordTips: false,
showForbidModal: false,
};
},
computed: {
...mapGetters({
login: 'user/login',
wxDetail: 'user/wxDetail',
isRegister: 'user/isRegister',
curUserinfo: 'user/displayUserInfo',
}),
displayRegion() {
if (!this.region) {
return '省份/市/区';
}
const { area, city, province } = this.region;
return `${province.label}/${city.label}/${area.label}`;
},
displayCategory() {
if (!this.category) {
return '请选择类目';
}
return `${this.category.label}`;
},
displayServices() {
if (!this.confirmServices || this.confirmServices.length === 0) {
return '请选择类型';
}
return this.confirmServices.join(',');
},
changeProtocol() {},
},
onLoad() {},
onShow() {
this.init();
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
methods: {
...mapActions({
handleLogin: 'user/login',
updateRegisterStatus: 'user/updateRegisterStatus',
updateWXInfo: 'user/updateWXInfo',
updateCurrentStatus: 'order/updateCurrentStatus',
}),
showRegionPicker() {
this.showRegion = true;
},
changeRegion(region) {
this.region = region;
},
showCategoryPicker() {
this.showCategories = true;
},
changeCategory(e) {
this.category = this.categorylist[e[0]];
},
showServicePopup() {
this.showService = true;
},
checkboxGroupChange(e) {
this.chooseServices = e;
},
changeServices() {
this.confirmServices = this.chooseServices;
this.showService = false;
},
seeAccount() {
this.$u.route('/pages/account/index');
},
rechargeAmount() {
this.$u.route('/pages/recharge/index');
},
goSetPsw() {
this.showPasswordTips = false;
this.$u.route('/pages/password/pay/index');
},
placeOrder() {
this.$u.route('/pages/place/index');
},
goOrders(num) {
this.updateCurrentStatus(num).then(() => {
this.$u.route({
type: 'switchTab',
url: '/pages/orders/index',
});
});
},
init() {
const _t = this;
uni.login({
success(ev) {
request
.post('/api/Validation', {
code: ev.code,
})
.then((res) => {
if (res.code === 0) {
const { isRegister, isForbid, result, token } = res.result;
uni.setStorageSync('token', token);
if (isRegister) {
const userDetail = JSON.parse(result);
_t.handleLogin({
userDetail: userDetail,
isRegister,
}).then(() => {
_t.getOrdersStatus();
if (userDetail.FPayPassword === ' ' || !userDetail.FPayPassword) {
_t.showPasswordTips = true;
}
});
return;
}
// 未审核状态
if (!isRegister && result === '您的申请还未通过审核') {
_t.showPassModal = true;
uni.hideTabBar();
return;
}
// 拒绝加入
if (!isRegister && result === '您的申请被拒绝') {
_t.showRefuseModal = true;
uni.hideTabBar();
return;
}
// 拒绝加入
if (!isRegister && isForbid) {
_t.showForbidModal = true;
uni.hideTabBar();
return;
}
_t.showAuth = true;
uni.hideTabBar();
}
});
},
});
},
getUserInfo(ev) {
this.updateWXInfo(ev.detail).then(() => {
this.showAuth = false;
uni.showTabBar();
this.$u.route('/pages/register/index');
});
},
getPolicy() {
request.get('/api/BaseData/UserAgreement').then((res) => {
console.log(res);
});
},
getOrdersStatus() {
request.get('/api/Order/GetOrderTypeQty').then((res) => {
const { code, message, result } = res;
if (code === 0) {
this.orderCounts = {
count1: result[0].qty,
count2: result[2].qty,
count3: result[6].qty,
count4: result[1].qty,
count5: result[5].qty,
count6: result[3].qty,
count7: result[12].qty,
count8: result[10].qty,
};
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
confirmClose() {
this.showPassModal = false;
},
registerAgain(ev) {
this.updateWXInfo(ev.detail).then(() => {
this.showRefuseModal = false;
uni.showTabBar();
this.$u.route('/pages/register/index');
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
.overlook {
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
padding: 60rpx 0 120rpx 0;
.block {
display: flex;
flex-direction: column;
align-items: center;
.title {
font-size: 28rpx;
color: #472d21;
}
.name {
margin-top: 6rpx;
font-size: 32rpx;
color: #303133;
}
.phone {
margin-top: 4rpx;
font-size: 24rpx;
color: #606266;
}
.amount {
position: relative;
margin-left: 12rpx;
font-size: 48rpx;
color: #303133;
&::before {
content: '¥';
position: absolute;
display: inline-block;
left: -30rpx;
}
}
}
.line {
display: inline-block;
width: 2rpx;
height: 170rpx;
border-left: 1px solid #303133;
}
}
}
.card {
margin-top: -100rpx;
.orderBd {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
.order-item {
flex: 0 0 25%;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 32rpx;
.order-item-title {
margin-top: 6rpx;
font-size: 24rpx;
color: #472d21;
}
.avatarImg {
display: flex;
justify-content: center;
align-items: center;
width: 90rpx;
height: 90rpx;
border-radius: 50%;
overflow: hidden;
background-color: #f5f5f5;
.inner {
width: 50rpx;
height: 50rpx;
._img {
width: 100%;
height: 100%;
}
}
}
}
}
}
.defaultBtnhover {
color: '#472d21';
}
.sScontent {
margin-top: 58rpx;
padding: 12px 16px;
}
.sSfooter {
display: flex;
justify-content: center;
}
.auContent {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 70rpx;
.title,
.productname {
font-size: 28rpx;
}
.companyname {
margin-top: 6rpx;
font-size: 24rpx;
color: #606266;
}
.avatar {
margin: 12rpx 0;
}
}
.pass-title {
margin: 48rpx 0 24rpx 0;
max-width: 400rpx;
font-size: 28rpx;
}
.refuse-title {
margin: 48rpx 0 24rpx 0;
font-size: 28rpx;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请加入企业"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item required title="企业名称" :arrow="false">
<u-input
v-model="company"
type="text"
height="48"
input-align="right"
placeholder="请输入企业名称"
:clearable="false"
/>
</u-cell-item>
<u-cell-item required title="姓名" :arrow="false">
<u-input
v-model="name"
type="text"
height="48"
input-align="right"
placeholder="请输入姓名"
:clearable="false"
/>
</u-cell-item>
<u-cell-item required title="手机号码" :arrow="false">
<u-input
v-model="phone"
type="number"
height="48"
input-align="right"
maxlength="11"
placeholder="请输入手机号码"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
placeholder="请输入验证码"
:clearable="false"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="备注" :arrow="false">
<u-input
v-model="mark"
type="text"
height="48"
input-align="right"
placeholder="备注:)"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-modal
v-model="showTips"
content="请耐心等待企业管理员处理你的申请,如有任何问题可以联系在线客服寻求帮助"
confirm-text="在线客服"
@confirm="getHelp"
></u-modal>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
:loading="loading"
@click="handleCommit"
>申请加入</u-button>
</view>
</view>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
company: '',
name: '',
phone: '',
code: '',
codeText: '',
mark: '',
loading: false,
showTips: false,
};
},
onLoad(options) {
this.company = options.name || '';
this.phone = options.phone || '';
this.name = options.realname || '';
},
computed: {
...mapGetters({
wxDetail: 'user/wxDetail',
}),
},
methods: {
...mapActions({
updateOtherInfo: 'user/updateOtherInfo',
updateRegisterStatus: 'user/updateRegisterStatus',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
handleCommit() {
const _t = this;
if (!this.company || !this.name || !this.phone || !this.code) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const { encryptedData, iv, userInfo } = this.wxDetail;
let registerData = {
Model: {
ComPanyName: this.company,
FApplyPhone: this.phone,
VerificationCode: this.code,
FApplyName: this.name,
FNote: this.mark,
FUserImage: userInfo.avatarUrl,
encryptedData,
iv,
},
};
this.loading = true;
request.post('/api/Business/ApplyJoin', registerData).then((res) => {
this.loading = false;
const { code, message, result } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '您的申请正在审核中,请稍后查询!',
isTab: true,
url: '/pages/index/index',
});
return;
}
this.$refs.uToast.show({
title: message,
});
});
},
getHelp() {
this.$u.route('/pages/index/index');
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tips {
margin-top: 12rpx;
padding-left: 32rpx;
font-size: 24rpx;
color: #ff7a45;
}
}
}
</style>
\<template>
<div class="content">
<div class="header">
<u-navbar
:is-back="false"
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="我的"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<view class="hdMsg">
<view class="left">
<u-avatar :src="curUserinfo.avator || wxDetail.userInfo.avatarUrl" size="120"></u-avatar>
</view>
<view class="right">
<view class="subline">
<view class="top">
{{ curUserinfo.name }}
<span class="tag">{{ curUserinfo.userType }}</span>
</view>
<view class="down">账号:{{ curUserinfo.phone }}</view>
<u-icon name="more-circle-fill" size="50" @click="openAccout"></u-icon>
</view>
<view class="split-line"></view>
<view class="subline">
<view class="top">账户余额(元)</view>
<view class="down">¥ {{ curUserinfo.balance }}</view>
<u-icon name="more-circle-fill" size="50" @click="openWallet"></u-icon>
</view>
</view>
</view>
</view>
</u-card>
<u-card
:show-head="false"
padding="0"
margin="0 30rpx 15rpx 30rpx"
v-if="curUserinfo.isManager && curUserinfo.userType === '企业用户'"
>
<view slot="body">
<u-cell-group>
<u-cell-item title="申请管理" @click="goApplyJoin"></u-cell-item>
<u-cell-item title="企业成员" @click="goMembers"></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" padding="0" margin="0 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<!-- <u-cell-item title="售后管理"></u-cell-item> -->
<u-cell-item title="商品模板" @click="goTemplates"></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card title="账号安全" :body-style="{ padding: 0 }" margin="0 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" @click="settingPhone"></u-cell-item>
<u-cell-item title="登录密码" @click="settingLoginPsw"></u-cell-item>
<u-cell-item
title="支付密码"
@click="settingPayPsw"
v-if="(curUserinfo.isManager && curUserinfo.userType === '企业用户') || curUserinfo.userType === '个人'"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" padding="0" margin="0 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="在线客服" :arrow="false">
<!-- <u-button
class="normalText"
size="mini"
@click="() => this.showCustomerModal = true"
>点击联系</u-button> -->
<u-button class="normalText" size="mini" open-type="contact">点击联系</u-button>
</u-cell-item>
<u-cell-item title="合作热线" value="4009965012" :arrow="false"></u-cell-item>
<u-cell-item title="疑难问题" @click="goQA"></u-cell-item>
<u-cell-item title="意见反馈" @click="goFeedback"></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" padding="0" margin="0 30rpx 30rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="我要接单" @click="goOtherMiniprogram"></u-cell-item>
</u-cell-group>
</view>
</u-card>
</view>
<u-popup v-model="showCustomerModal" mode="center" border-radius="16">
<view class="qrcode" @longpress.stop="saveImg(qrcode)">
<image mode="aspectFit" class="qrcode-img" :src="qrcode" />
<view class="text">长按保存到相册</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
phone: '',
showCustomerModal: false,
qrcode: '',
};
},
onLoad() {
this.phone = this.curUserinfo.phone;
this.getQRCode();
},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
wxDetail: 'user/wxDetail',
userDetail: 'user/userDetail',
}),
},
methods: {
reachBottom() {},
openAccout() {
this.$u.route('/pages/account/index');
},
openWallet() {
this.$u.route('/pages/wallet/index');
},
settingLoginPsw() {
this.$u.route('/pages/password/login/index');
},
settingPayPsw() {
this.$u.route('/pages/password/pay/index');
},
settingPhone() {
this.$u.route('/pages/change-phone/index');
},
goTemplates() {
this.$u.route('/pages/good-template/index');
},
goFeedback() {
this.$u.route('/pages/feedback/index');
},
goQA() {
request.get('/api/HelpCenter/GetSHHelpUrl').then((res) => {
this.$u.route(`/pages/qa/index?url=${res.result.helpUrl}`);
});
// this.$u.route('/pages/qa/index');
},
goOtherMiniprogram() {
uni.navigateToMiniProgram({
appId: 'wx6e2d664687c88632',
path: 'pages/index/index',
success(res) {
// 打开成功
},
});
},
goApplyJoin() {
this.$u.route('/pages/applyjoin/index');
},
goMembers() {
this.$u.route('/pages/company-members/index');
},
getQRCode() {
request.get('/api/BaseData/KFQRCode').then((res) => {
const { code, message, result } = res;
if (code === 0) {
this.qrcode = result[0].fileurl;
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
saveImg(qrcode) {
let that = this;
uni.authorize({
scope: 'scope.writePhotosAlbum',
success() {
uni.getImageInfo({
src: qrcode,
success: (image) => {
debugger;
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: () => {
that.showCustomerModal = false;
that.$refs.uToast.show({
title: '已保存至相册',
});
},
fail: (err) => {
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
that.handleOpenSetting();
}
},
});
},
});
},
fail() {
that.handleOpenSetting();
},
});
},
handleOpenSetting() {
uni.showModal({
title: '提示',
content: '请到设置中打开保存到相册',
success: (res) => {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting);
},
});
} else if (res.cancel) {
console.log('用户点击取消');
}
},
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.hdMsg {
position: relative;
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
width: 100%;
.subline {
position: relative;
.top {
display: flex;
align-items: center;
font-size: 32rpx;
color: #262626;
.tag {
display: inline-block;
margin-left: 12rpx;
padding: 4rpx 24rpx;
font-size: 20rpx;
background-color: #ffcb57;
color: #472d21;
border-radius: 6rpx;
}
}
.down {
margin-top: 10rpx;
font-size: 24rpx;
color: #434343;
}
/deep/u-icon {
display: inline;
.u-icon {
position: absolute;
top: 20rpx;
right: 10rpx;
}
}
}
.split-line {
margin: 16rpx 0;
border-bottom: 1rpx dashed #8c8c8c;
}
}
}
}
.qrcode {
width: 400rpx;
box-sizing: border-box;
padding: 20rpx;
text-align: center;
&-img {
width: 360rpx;
height: 360rpx;
}
.text {
margin-top: 10rpx;
font-size: 20rpx;
}
}
.normalText {
/deep/ .u-btn {
background-color: #1890ff;
color: #ffffff;
}
/deep/.u-hairline-border {
&::after {
display: none;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="订单详情"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="mstatus">
<view class="title">{{ currentOrder.FStatus | formatStatus }}</view>
</view>
<u-card :show-head="false" margin="-130rpx 30rpx 15rpx 30rpx">
<view slot="body">
<view class="address">
<view class="icon">
<u-icon name="map-fill" size="50" color="#ffcb57"></u-icon>
</view>
<view class="content">
<view class="line">
<span class="name">{{ currentOrder.FCustomerName }}</span>
<span class="phone">{{ currentOrder.FCustomerPhone }}</span>
<u-button size="mini" @click="handlePhoneCall" :custom-style="{ marginLeft: '16rpx' }"
><u-icon name="phone-fill" :custom-style="{ marginRight: '8rpx' }"></u-icon
>拨打电话</u-button
>
</view>
<view class="line" @longpress.stop="copyAddress">{{
`${currentOrder.FPROVINCE}${currentOrder.FCity}${currentOrder.FCOUNTY}${currentOrder.FAdress}`
}}</view>
</view>
</view>
<view class="process">
<u-tag
v-if="['DGY', 'DBJ'].includes(currentOrder.FStatus) && currentOrder.FPayWay != 2"
text="匹配师傅中"
mode="plain"
shape="circle"
type="info"
/>
</view>
<view class="extraNote">
<view class="title">备注信息</view>
<view class="content">{{ currentOrder.FCustomerNote }}</view>
</view>
<!-- <view class="action">
<u-button size="mini">修改客户信息</u-button>
</view>-->
</view>
</u-card>
<u-card title="商品信息" margin="20rpx 30rpx 15rpx 30rpx">
<view slot="body">
<view class="gooditem" v-for="good in currentOrder.CustOrderGoodsMould" :key="good.Id">
<view class="left">
<view class="pre-box">
<u-image
:width="160"
:height="160"
v-for="(img, j) in good.OrderBanners"
:key="j"
:src="img"
border-radius="5"
@click="previewImg(img)"
></u-image>
</view>
</view>
<view class="content">
<view class="title u-line-2">{{ `${good.FGoodsType.Name[0].Value}` }}</view>
<view class="type">{{ good.FServiceTypeID.Name[0].Value }}</view>
<view class="type">{{ good.FTools }}</view>
<!-- <view class="delivery-time">规格:{{good.FGoodsSpecs || '无'}}</view> -->
</view>
<view class="right">
<view class="number">{{ `x${good.FGoodsQty}` }}</view>
</view>
</view>
</view>
<view slot="foot">
<view class="total">
<span>{{ currentOrder.CustOrderGoodsMould | computedCount }}件商品</span>
<!-- <span class="amount">合计:¥ 20</span> -->
</view>
</view>
</u-card>
<u-card title="订单评价" margin="20rpx 30rpx 15rpx 30rpx" v-if="currentOrder.FIsEvaluate">
<view slot="body">
<view class="paydetail">
<view class="line">
<view class="title">客户评价:</view>
<view class="content">{{ currentOrder.FEvaluate === 'HP' ? '好评' : '差评' }}</view>
</view>
<view class="line">
<view class="title">详细评价:</view>
<view class="content">{{ currentOrder.FEvaluateDetail }}</view>
</view>
</view>
</view>
</u-card>
<u-card
title="完工效果图"
margin="20rpx 30rpx 15rpx 30rpx"
v-if="currentOrder.FFinishImagesEntity.length > 0"
>
<view slot="body">
<view class="ywg-imgs">
<u-image
:width="160"
:height="160"
v-for="(img, j) in ywgImgs"
:key="j"
:src="img"
border-radius="5"
@click="previewImg(img)"
></u-image>
</view>
</view>
</u-card>
<u-card :show-head="false" margin="20rpx 30rpx 15rpx 30rpx">
<view slot="body">
<view class="paydetail">
<view class="line">
<view class="title">订单编号:</view>
<view class="content"
>{{ currentOrder.BillNo
}}<u-button
size="mini"
:custom-style="{ marginLeft: '8rpx' }"
@click="copyBtn(currentOrder.BillNo)"
>复制</u-button
></view
>
</view>
<view class="line">
<view class="title">下单时间:</view>
<view class="content">{{ currentOrder.FCreateDate }}</view>
</view>
<view class="line">
<view class="title">付费方式:</view>
<view class="content">{{ currentOrder.FPayWay | formatPayway }}</view>
</view>
<!-- 应付信息费,已付信息费,平台应付费用,现场应收费用 -->
<view class="line">
<view class="title">已付费用:</view>
<view class="content">{{ currentOrder.FSHSAmount }}</view>
</view>
<view class="line">
<view class="title">应付费用:</view>
<view class="content">{{ currentOrder.FSHAmount }}</view>
</view>
<view class="line" v-if="currentOrder.FAppointmentDateTime">
<view class="title">预约上门时间:</view>
<view class="content">{{ currentOrder.FAppointmentDateTime }}</view>
</view>
<!-- <view class="line">
<view class="title">现场用户应付:</view>
<view class="content">{{ currentOrder.FSFYAmount }}</view>
</view> -->
<view class="line">
<view class="title">制单人:</view>
<view class="content">{{ currentOrder.FDocumentMakerName || '无' }}</view>
</view>
<!-- <view class="line">
<view class="title">付款时间:</view>
<view class="content">2020-07-10 23:12:00</view>
</view>-->
</view>
</view>
</u-card>
<view
class="actions"
v-if="
['DGY', 'DYY', 'DFW', 'DYS', 'DPJ', 'TKZ', 'YWC', 'YTK', 'DBJ'].includes(currentOrder.FStatus) ||
(currentOrder.FStatus === 'DJS' && currentOrder.FPayWay === '2')
"
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DGY', 'DBJ'].includes(currentOrder.FStatus) && currentOrder.FPayWay !== '1'"
>取消订单</u-button
>
<!-- <u-button type="success" size="mini" hover-class="defaultBtnhover" v-if="['DGY', 'DYY'].includes(currentOrder.FStatus)"
>再次下单</u-button
> -->
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
@click="hireMan"
v-if="['DGY'].includes(currentOrder.FStatus) && currentOrder.FPayWay == 2"
>雇佣师傅</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
@click="changeWorker"
v-if="['DYY'].includes(currentOrder.FStatus)"
>换师傅</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="
['DFW'].includes(currentOrder.FStatus) ||
(['DGY', 'DBJ'].includes(currentOrder.FStatus) && currentOrder.FPayWay === '1')
"
@click="handleRefund"
>申请退款</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DYS'].includes(currentOrder.FStatus)"
@click="() => (this.showVerifyCode = true)"
>确认验收</u-button
>
<!-- <u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DPJ', 'TKZ', 'YWC', 'YTK'].includes(currentOrder.FStatus)"
>申请售后</u-button
> -->
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DJS'].includes(currentOrder.FStatus) && currentOrder.FPayWay === '2'"
@click="paying"
>结算</u-button
>
</view>
<u-card
:show-head="false"
margin="20rpx 30rpx 15rpx 30rpx"
padding="0"
:body-style="{ backgroundColor: '#f4f4f5' }"
v-if="['DBJ','DGY'].includes(currentOrder.FStatus) && currentOrder.FPayWay === '2'"
>
<view slot="body">
<u-alert-tips
type="warning"
title="温馨提示"
description="预先支付费用,享受VIP人工专属客服跟单服务,保质保量省心省时"
></u-alert-tips>
<u-button
type="primary"
:custom-style="{ margin: '24rpx 0 0 0' }"
hover-class="defaultBtnhover"
@click="handlePay"
>立即支付</u-button
>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
open-type="contact"
>联系客服</u-button
>
</view>
</view>
<u-modal v-model="showAcceptanceTips" content="已验收!" confirm-color="#ffcb57"></u-modal>
<u-modal
title="完工验证码"
v-model="showVerifyCode"
:content="verifyCode"
@confirm="handleAcceptance"
:content-style="{
fontSize: '48rpx',
fontWeight: 600,
color: '#000',
letterSpacing: '18rpx',
}"
confirm-color="#ffcb57"
></u-modal>
<u-modal
v-model="showModal"
content="您的余额不足,请充值"
confirm-text="去充值"
confirm-color="#ffcb57"
:show-title="false"
@confirm="goRecharge"
></u-modal>
<u-modal
v-model="showPswModal"
content="请先设置支付密码"
confirm-color="#ffcb57"
:show-title="false"
@confirm="goChangePsw"
></u-modal>
<u-modal v-model="showPswTips" content="请联系企业管理员设置支付密码" confirm-color="#ffcb57"></u-modal>
<u-keyboard
default
ref="uKeyboard"
mode="number"
:mask="true"
:mask-close-able="true"
:dot-enabled="false"
v-model="showPay"
:safe-area-inset-bottom="true"
:tooltip="false"
@change="onChange"
@backspace="onBackspace"
>
<view>
<view class="u-flex u-row-center u-m-t-48">
<u-message-input
mode="box"
:maxlength="6"
:dot-fill="true"
v-model="password"
:disabled-keyboard="true"
@finish="finish"
></u-message-input>
</view>
<view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">支付键盘</view>
</view>
</u-keyboard>
<u-modal
:show-title="false"
v-model="showPayPswError"
content="密码有误!"
:show-cancel-button="true"
confirm-text="重新支付"
@confirm="payAgain"
confirm-color="#ffcb57"
></u-modal>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
showAcceptanceTips: false,
showVerifyCode: false,
verifyCode: '',
ywgImgs: [],
showModal: false,
showPswModal: false,
showPswTips: false,
showPay: false,
password: '',
showPayPswError: false,
};
},
filters: {
formatStatus(value) {
const status = {
DBJ: '待报价',
DGY: '待雇佣',
DYY: '待预约',
DFW: '待服务/施工中',
DYS: '待验收',
DPJ: '待评价',
DJS: '待结算',
YWC: '已完成',
TKZ: '退款中',
YTK: '已退款',
YQX: '已取消',
YZF: '待确认',
};
return status[value];
},
computedCount(value) {
return value.reduce(
(accumulator, currentValue) => {
return { FGoodsQty: accumulator.FGoodsQty + currentValue.FGoodsQty };
},
{ FGoodsQty: 0 }
).FGoodsQty;
},
formatPayway(value) {
switch (String(value)) {
case '1':
return '下单支付';
case '2':
return '验收完成支付';
case '3':
return '业主现场支付';
}
},
},
onLoad() {
console.log(this.currentOrder);
this.verifyCode = this.currentOrder.FFinishCode;
if (this.currentOrder.FFinishImagesEntity.length > 0) {
this.ywgImgs = this.currentOrder.FFinishImagesEntity.map((x) => {
return `https://www.jtfw8.com/WXXCX/FileService/${x.FFinishImage_Files[0].FileName}`;
});
}
console.log(this.ywgImgs);
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
curUserinfo: 'user/displayUserInfo',
userDetail: 'user/userDetail',
}),
},
methods: {
...mapActions({
updateCurrentStatus: 'order/updateCurrentStatus'
}),
onChange(val) {
if (this.password.length < 6) {
this.password += val;
}
if (this.password.length >= 6) {
if (this.password === this.userDetail.FPayPassword) {
this.payForOrder();
} else {
this.showPay = false;
this.password = '';
this.showPayPswError = true;
}
}
},
onBackspace(e) {
if (this.password.length > 0) {
this.password = this.password.substring(0, this.password.length - 1);
}
},
payAgain() {
this.showPay = true;
},
copyAddress() {
const { currentOrder } = this;
const text = `${currentOrder.FPROVINCE}${currentOrder.FCity}${currentOrder.FCOUNTY}${currentOrder.FAdress}`;
uni.setClipboardData({
data: text,
});
},
handlePhoneCall() {
uni.makePhoneCall({
phoneNumber: this.currentOrder.FCustomerPhone,
});
},
hireMan() {
this.$u.route('/pages/hire/index');
},
changeWorker() {
this.$u.route('/pages/change-worker/index');
},
handleRefund() {
this.$u.route('/pages/apply-refund/index');
},
goChangePsw() {
this.$u.route('/pages/password/pay/index');
},
goRecharge() {
this.$u.route('/pages/recharge/index');
},
handleAcceptance() {
this.showVerifyCode = false;
uni.showLoading({
title: '提交中',
});
request
.post('/api/Order/CheckAccept', {
FID: this.currentOrder.Id,
FinishCode: this.currentOrder.FFinishCode,
})
.then((res) => {
uni.hideLoading();
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '已验收',
});
this.showAcceptanceTips = true;
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
previewImg(url) {
uni.previewImage({
current: 0,
urls: [url],
});
},
paying() {
this.$u.route('/pages/pay/index');
},
copyBtn(text) {
uni.setClipboardData({
data: text,
});
},
handlePay() {
// 未设置支付密码
if (this.userDetail.FPayPassword === ' ') {
if (this.curUserinfo.userType === '个人') {
this.showPswModal = true;
return;
}
if (this.curUserinfo.userType === '企业用户' && !this.curUserinfo.isManager) {
this.showPswTips = true;
return;
}
this.showPswModal = true;
return;
}
// 余额不足付款
if (this.curUserinfo.balance < this.currentOrder.FSHAmount) {
this.showModal = true;
return;
}
// 输入支付密码
this.showPay = true;
},
payForOrder() {
uni.showLoading({
title: '支付中',
});
request
.post('/api/Order/Pay', {
FID: this.currentOrder.Id,
FSHSAmount: Number(this.currentOrder.FSHAmount).toFixed(2),
FStatus: 'DBJ',
FPayWay: '1',
})
.then((res) => {
console.log('订单支付参数:', this.orderId);
const { code, message } = res;
if (code === 0) {
uni.showLoading({
title: '支付成功,正在跳转',
});
this.updateCurrentStatus(1).then(() => {
uni.hideLoading();
this.$refs.uToast.show({
title: '订单支付成功',
isTab: true,
url: '/pages/orders/index',
});
});
} else {
this.$refs.uToast.show({
title: message,
});
}
uni.hideLoading();
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
.mstatus {
background-color: #ffcb57;
height: 200rpx;
.title {
padding-left: 36rpx;
font-size: 32rpx;
}
}
.address {
display: flex;
align-items: flex-start;
.content {
padding-left: 12rpx;
.line {
margin-bottom: 8rpx;
.name {
font-size: 28rpx;
color: #595959;
}
.phone {
margin-left: 8rpx;
font-size: 28rpx;
color: #8c8c8c;
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
padding-top: 24rpx;
}
.gooditem {
position: relative;
margin: 20rpx 0 0;
border-bottom: 1rpx dashed #d9d9d9;
&:last-child {
border-bottom: none;
}
.left {
.pre-box {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
/deep/ .u-image {
margin-right: 12rpx;
margin-bottom: 12rpx;
}
}
}
.content {
padding: 16rpx 0 0 0;
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.delivery-time {
color: #595959;
font-size: 24rpx;
}
}
.right {
position: absolute;
top: 20rpx;
right: 20rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $u-tips-color;
font-size: 24rpx;
}
}
}
.total {
display: flex;
justify-content: flex-end;
align-items: center;
.amount {
font-size: 32rpx;
color: #f5222d;
}
}
.paydetail {
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 28rpx;
.title {
font-size: 24rpx;
color: #434343;
}
.content {
font-size: 26rpx;
color: #8c8c8c;
&.total {
font-size: 32rpx;
color: #f5222d;
}
}
}
}
.actions {
display: flex;
justify-content: flex-end;
align-items: center;
margin: 20rpx 32rpx;
padding: 24rpx 24rpx;
background-color: #fff;
border-radius: 15rpx;
/deep/.u-btn {
margin-left: 12rpx;
}
}
.ywg-imgs {
display: flex;
flex-wrap: wrap;
/deep/ .u-image {
margin-right: 12rpx;
margin-bottom: 12rpx;
}
}
}
.process {
margin-top: 24rpx;
}
.extraNote {
margin-top: 24rpx;
border-top: 1px solid #e8e8e8;
padding: 24rpx 0 0 0;
.title {
font-size: 24rpx;
}
.content {
margin: 12rpx 0;
font-size: 24rpx;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
back-icon-name="search"
back-icon-size="46"
back-text="搜索"
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="订单管理"
title-color="#472d21"
:custom-back="handleSearch"
></u-navbar>
</div>
<view class="wrap">
<view class="u-tabs-box">
<view class="pl">
<u-tabs-swiper
activeColor="#ffcb57"
font-size="26"
ref="tabs"
:list="list"
:current="current"
@change="change"
></u-tabs-swiper>
</view>
</view>
<swiper
class="swiper-box"
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
>
<swiper-item class="swiper-item" v-for="(tablist, index) in tabLists" :key="index">
<scroll-view scroll-y style="height: 100%; width: 100%">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty
text="没有找到您的订单"
mode="list"
margin-top="80"
v-if="tablist.length === 0 && !showLoading"
></u-empty>
<u-card
v-for="item in tablist"
:key="item.Id"
@head-click="seeDetail(item)"
@body-click="seeDetail(item)"
:show-foot="
['DGY', 'DYY', 'DFW', 'DYS', 'DPJ', 'TKZ', 'YWC', 'YTK', 'DBJ'].includes(
item.FStatus
) ||
(item.FStatus === 'DJS' && item.FPayWay === '2')
"
>
<view slot="head" class="orderHd">
<div class="addres">
<view class="left">
<u-image
src="/static/images/common/local.png"
height="36rpx"
width="36rpx"
></u-image>
<view class="contact">
<view class="line"
>{{ item.FCustomerName }}{{ item.FCustomerPhone }}</view
>
<view class="line">
{{ `${item.FPROVINCE}${item.FCity}${item.FCOUNTY}${item.FAdress}` }}
</view>
</view>
</view>
<view class="right">
<view class="status">{{ item.FStatus | formatStatus }}</view>
</view>
</div>
<view class="process">
<u-tag
v-if="['DGY', 'DBJ'].includes(item.FStatus) && item.FPayWay != 2"
text="匹配师傅中"
mode="plain"
shape="circle"
type="info"
/>
</view>
<view class="extraNote">
<view class="title">备注信息</view>
<view class="content">{{ item.FCustomerNote }}</view>
</view>
</view>
<view slot="body" class="orderBd">
<view class="item" v-for="good in item.CustOrderGoodsMould" :key="good.Id">
<view class="left">
<view class="pre-box">
<u-image
:width="160"
:height="160"
v-for="(img, j) in good.OrderBanners"
:key="j"
:src="img"
border-radius="5"
></u-image>
</view>
</view>
<view class="content">
<view class="title u-line-2">
{{
good.FGoodsType && good.FGoodsType.Name
? good.FGoodsType.Name[0].Value
: '无'
}}
</view>
<view class="type">
{{
good.FServiceTypeID && good.FServiceTypeID.Name
? good.FServiceTypeID.Name[0].Value
: '无'
}}
</view>
<!-- <view
class="delivery-time"
>规格:{{ good.FGoodsSpecs || '无' }}</view> -->
</view>
<view class="right">
<view class="number">{{ `x${good.FGoodsQty}` }}</view>
</view>
</view>
<view class="workmans">
<span class="mtitle">订单编号:</span>
<span class="number"
>{{ item.BillNo
}}<u-button
size="mini"
:custom-style="{ marginLeft: '8rpx' }"
@click="copyBtn(item.BillNo)"
>复制</u-button
></span
>
</view>
<view class="workmans">
<span class="mtitle">下单时间:</span>
<span class="number">{{ item.FDatetime }}</span>
</view>
<view class="workmans">
<span class="mtitle">付费方式:</span>
<span class="number">{{ item.FPayWay | formatPayway }}</span>
</view>
<view class="workmans" v-if="!['1', '3'].includes(String(item.FPayWay))">
<span class="mtitle">报价师傅:</span>
<span class="number">{{ item.FSFQuotedPriceEntity.length }}人报价</span>
</view>
</view>
<view slot="foot" class="orderFt">
<view class="actions">
<!-- <u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['YQX'].includes(item.FStatus)"
@click="changeToDGY(item)"
>xxx</u-button>-->
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DGY', 'DBJ'].includes(item.FStatus) && item.FPayWay !== '1'"
@click="cancelOrder(item)"
>取消订单</u-button
>
<!-- <u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DGY', 'DYY'].includes(item.FStatus)"
@click="payAgain(item)"
>再次下单</u-button
> -->
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
@click="hireMan(item)"
v-if="['DGY'].includes(item.FStatus) && item.FPayWay == 2"
>雇佣师傅</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
@click="changeWorker(item)"
v-if="['DYY'].includes(item.FStatus)"
>换师傅</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="
['DFW'].includes(item.FStatus) ||
(['DGY', 'DBJ'].includes(item.FStatus) && item.FPayWay === '1')
"
@click="handleRefund(item)"
>申请退款</u-button
>
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DYS'].includes(item.FStatus)"
@click="handleShowVerifyCode(item)"
>确认验收</u-button
>
<!-- <u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DPJ', 'TKZ', 'YWC', 'YTK'].includes(item.FStatus)"
>申请售后</u-button
> -->
<u-button
type="success"
size="mini"
hover-class="defaultBtnhover"
v-if="['DJS'].includes(item.FStatus) && item.FPayWay === '2'"
@click="paying(item)"
>结算</u-button
>
</view>
</view>
</u-card>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<u-toast ref="uToast" />
<u-modal
title="完工验证码"
v-model="showVerifyCode"
:content="verifyCode"
@confirm="handleAcceptance"
:content-style="{
fontSize: '48rpx',
fontWeight: 600,
color: '#000',
letterSpacing: '18rpx',
}"
confirm-color="#ffcb57"
></u-modal>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
list: [
{
name: '全部',
},
{
name: '待报价',
},
{
name: '待雇佣',
},
{
name: '待预约',
},
{
name: '待服务/施工中',
},
{
name: '待验收',
},
{
name: '待评价',
},
{
name: '待结算',
},
{
name: '已完成',
},
{
name: '退款中',
},
{
name: '已退款',
},
{
name: '已取消',
},
],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore'],
tabLists: [[], [], [], [], [], [], [], [], [], [], [], []],
showLoading: false,
showVerifyCode: false,
verifyCode: '',
currentOrder: null,
};
},
onLoad() {},
onShow() {
this.current = this.currentStatus;
this.swiperCurrent = this.currentStatus;
this.getOrderList();
},
computed: {
...mapGetters({
currentStatus: 'order/currentStatus',
}),
},
filters: {
formatStatus(value) {
const status = {
DBJ: '待报价',
DGY: '待雇佣',
DYY: '待预约',
DFW: '待服务/施工中',
DYS: '待验收',
DPJ: '待评价',
DJS: '待结算',
YWC: '已完成',
TKZ: '退款中',
YTK: '已退款',
YQX: '已取消',
YZF: '待确认',
};
return status[value];
},
formatPayway(value) {
switch (String(value)) {
case '1':
return '下单支付';
case '2':
return '验收完成支付';
case '3':
return '业主现场支付';
}
},
},
methods: {
...mapActions({
updateCurrentOrder: 'order/updateCurrentOrder',
updateCurrentStatus: 'order/updateCurrentStatus',
}),
// 页面数据
getOrderList() {
const _t = this;
const { list, current } = this;
this.showLoading = true;
request
.get('/api/Order/SHView', {
status: list[current].name === '全部' ? '' : list[current].name,
})
.then(async (res) => {
const { code, message, result } = res;
if (code === 0) {
const tempList = Object.values(result).filter((x) => x !== null);
for (let i = 0; i < tempList.length; i++) {
const subList = tempList[i];
for (let j = 0; j < subList.length; j++) {
const order = subList[j];
for (let k = 0; k < order.CustOrderGoodsMould.length; k++) {
const good = order.CustOrderGoodsMould[k];
good.OrderBanners = [];
const { FGoodsMouldImagesEntity } = good;
for (let l = 0; l < FGoodsMouldImagesEntity.length; l++) {
const imgInfo = FGoodsMouldImagesEntity[l];
const result = await _t.getImageUrl(imgInfo.FGoodsImage);
good.OrderBanners.push(
result[0].fileurl
// `https://www.jtfw8.com/WXXCX/FileService/${imgInfo.FGoodsImage}.jpg`
);
}
}
}
}
this.tabLists[current] =
tempList.length > 0
? tempList.reduce((pre, next) => {
return [...pre, ...next];
})
: [];
} else {
this.$refs.uToast.show({
title: message,
});
}
this.showLoading = false;
});
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
},
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
animationfinish({ detail: { current } }) {
this.$refs.tabs.setFinishCurrent(current);
this.$refs.tabs.setScrollViewToCenter();
this.swiperCurrent = current;
this.current = current;
this.updateCurrentStatus(current);
this.getOrderList();
},
hireMan(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/hire/index');
});
},
async getImageUrl(value) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: value });
return res.result;
},
seeDetail(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/orders/detail/index');
});
},
payAgain(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/place/index', { type: 'payAgain' });
});
},
paying(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/pay/index');
});
},
handleRefund(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/apply-refund/index');
});
},
changeWorker(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/change-worker/index');
});
},
cancelOrder(data) {
request
.post('/api/Order/save', {
Model: {
FID: data.Id, //订单内码
FStatus: 'YQX', //订单状态
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '取消成功!',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
changeToDGY(data) {
request
.post('/api/Order/save', {
Model: {
FID: data.Id, //订单内码
FStatus: 'DGY', //订单状态
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '取消成功!',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
handleShowVerifyCode(data) {
this.currentOrder = data;
this.verifyCode = data.FFinishCode;
this.showVerifyCode = true;
},
handleAcceptance() {
this.showVerifyCode = false;
uni.showLoading({
title: '提交中',
});
request
.post('/api/Order/CheckAccept', {
FID: this.currentOrder.Id,
FinishCode: this.currentOrder.FFinishCode,
})
.then((res) => {
uni.hideLoading();
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '已验收',
});
this.getOrderList();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
handleSearch() {
this.$u.route('/pages/orders/search/index');
},
copyBtn(text) {
uni.setClipboardData({
data: text,
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
// height: calc(100vh - var(--window-top));
height: 100vh;
width: 100%;
.page-box {
.orderHd {
.addres {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
justify-content: flex-start;
/deep/.u-image {
margin-right: 12rpx;
background-color: #fff;
}
.contact {
.line {
font-size: 24rpx;
color: #262626;
}
}
}
.right {
flex: 0 0 72rpx;
.status {
font-size: 24rpx;
color: #434343;
}
}
}
.process {
margin-top: 24rpx;
}
.extraNote {
margin-top: 24rpx;
border-top: 1px solid #e8e8e8;
padding: 24rpx 0 0 0;
.title {
font-size: 24rpx;
}
.content {
margin: 12rpx 0;
font-size: 24rpx;
}
}
}
.orderBd {
.item {
position: relative;
// display: flex;
margin: 20rpx 0 0;
border-bottom: 1rpx dashed #d9d9d9;
&::last-child {
border-bottom: none;
}
.left {
.pre-box {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
/deep/ .u-image {
margin-right: 12rpx;
margin-bottom: 12rpx;
}
}
}
.content {
padding: 16rpx 0 24rpx 0;
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.delivery-time {
color: #595959;
font-size: 24rpx;
}
}
.right {
position: absolute;
top: 20rpx;
right: 20rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $u-tips-color;
font-size: 24rpx;
}
}
}
.workmans {
padding: 12rpx 0;
.mtitle {
font-size: 24rpx;
color: #262626;
}
.number {
font-size: 24rpx;
font-weight: 600;
}
}
}
.orderFt {
.actions {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 6rpx;
}
}
}
}
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="搜索"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="search">
<u-search
placeholder="客户姓名/手机号/订单号"
shape="square"
bg-color="#ffffff"
v-model="searchText"
@search="handleSearch"
:disabled="showLoading"
@custom="handleSearch"
></u-search>
</view>
<scroll-view scroll-y style="height: 100%; width: 100%">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty mode="search" margin-top="80" v-if="tablist.length === 0 && !showLoading"></u-empty>
<u-card
v-for="item in tablist"
:key="item.Id"
@head-click="seeDetail(item)"
@body-click="seeDetail(item)"
:show-foot="
['DGY', 'DYY', 'DFW', 'DYS', 'DPJ', 'TKZ', 'YWC', 'YTK', 'DBJ'].includes(item.FStatus) || (item.FStatus === 'DJS' && item.FPayWay === '2')
"
>
<view slot="head" class="orderHd">
<view class="left">
<u-image src="/static/images/common/local.png" height="36rpx" width="36rpx"></u-image>
<view class="contact">
<view class="line">{{ item.FCustomerName }}{{ item.FCustomerPhone }}</view>
<view class="line">
{{ `${item.FPROVINCE}${item.FCity}${item.FCOUNTY}${item.FAdress}` }}
</view>
</view>
</view>
<view class="right">
<view class="status">{{ item.FStatus | formatStatus }}</view>
</view>
</view>
<view slot="body" class="orderBd">
<view class="item" v-for="good in item.CustOrderGoodsMould" :key="good.Id">
<view class="left">
<view class="pre-box">
<u-image
:width="160"
:height="160"
v-for="(img, j) in good.OrderBanners"
:key="j"
:src="img"
border-radius="5"
></u-image>
</view>
</view>
<view class="content">
<view class="title u-line-2">
{{
good.FGoodsType && good.FGoodsType.Name
? good.FGoodsType.Name[0].Value
: '无'
}}
</view>
<view class="type">
{{
good.FServiceTypeID && good.FServiceTypeID.Name
? good.FServiceTypeID.Name[0].Value
: '无'
}}
</view>
<!-- <view
class="delivery-time"
>规格:{{ good.FGoodsSpecs || '无' }}</view> -->
</view>
<view class="right">
<view class="number">{{ `x${good.FGoodsQty}` }}</view>
</view>
</view>
<view class="workmans">
<span class="mtitle">订单编号:</span>
<span class="number">{{ item.BillNo }}</span>
</view>
<view class="workmans">
<span class="mtitle">报价师傅:</span>
<span class="number">{{ item.FSFQuotedPriceEntity.length }}人报价</span>
</view>
</view>
<view slot="foot" class="orderFt">
<view class="actions">
<!-- <u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['YQX'].includes(item.FStatus)"
@click="changeToDGY(item)"
>xxx</u-button>-->
<u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DGY', 'DBJ'].includes(item.FStatus) && item.FPayWay !== '1'"
@click="cancelOrder(item)"
>取消订单</u-button
>
<u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DGY', 'DYY'].includes(item.FStatus)"
@click="payAgain(item)"
>再次下单</u-button
>
<u-button
size="mini"
hover-class="defaultBtnhover"
@click="hireMan(item)"
v-if="['DGY'].includes(item.FStatus)"
>雇佣师傅</u-button
>
<u-button
size="mini"
hover-class="defaultBtnhover"
@click="changeWorker(item)"
v-if="['DYY'].includes(item.FStatus)"
>换师傅</u-button
>
<u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DFW'].includes(item.FStatus) || (['DGY', 'DBJ'].includes(item.FStatus) && item.FPayWay === '1')"
@click="handleRefund(item)"
>申请退款</u-button
>
<u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DYS'].includes(item.FStatus)"
@click="handleShowVerifyCode(item)"
>确认验收</u-button
>
<!-- <u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DPJ', 'TKZ', 'YWC', 'YTK'].includes(item.FStatus)"
>申请售后</u-button
> -->
<u-button
size="mini"
hover-class="defaultBtnhover"
v-if="['DJS'].includes(item.FStatus) && item.FPayWay === '2'"
@click="paying(item)"
>结算</u-button
>
</view>
</view>
</u-card>
<!-- <u-loadmore :status="loadStatus[0]" bgcolor="#f2f2f2"></u-loadmore> -->
</view>
</scroll-view>
</view>
<u-toast ref="uToast" />
<u-modal
title="完工验证码"
v-model="showVerifyCode"
:content="verifyCode"
@confirm="handleAcceptance"
:content-style="{
fontSize: '48rpx',
fontWeight: 600,
color: '#000',
letterSpacing: '18rpx',
}"
confirm-color="#ffcb57"
></u-modal>
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
searchText: '',
showLoading: false,
tablist: [],
showVerifyCode: false,
verifyCode: '',
currentOrder: null,
list: [],
};
},
onLoad() {
this.getOrderList();
},
computed: {},
filters: {
formatStatus(value) {
const status = {
DBJ: '待报价',
DGY: '待雇佣',
DYY: '待预约',
DFW: '待服务/施工中',
DYS: '待验收',
DPJ: '待评价',
DJS: '待结算',
YWC: '已完成',
TKZ: '退款中',
YTK: '已退款',
YQX: '已取消',
};
return status[value];
},
},
methods: {
...mapActions({
updateCurrentOrder: 'order/updateCurrentOrder',
}),
getOrderList() {
const _t = this;
const { list, current } = this;
this.showLoading = true;
request
.get('/api/Order/SHView', {
status: '',
})
.then(async (res) => {
const { code, message, result } = res;
if (code === 0) {
const resList = Object.values(result).filter((x) => x !== null);
const arr = [];
resList.forEach((subArr) => {
arr.push(...subArr);
});
for (let j = 0; j < arr.length; j++) {
const order = arr[j];
for (let k = 0; k < order.CustOrderGoodsMould.length; k++) {
const good = order.CustOrderGoodsMould[k];
good.OrderBanners = [];
const { FGoodsMouldImagesEntity } = good;
for (let l = 0; l < FGoodsMouldImagesEntity.length; l++) {
const imgInfo = FGoodsMouldImagesEntity[l];
// const result = await _t.getImageUrl(imgInfo.FGoodsImage);
good.OrderBanners.push(
`https://www.jtfw8.com/WXXCX/FileService/${imgInfo.FGoodsImage}.jpg`
);
}
}
}
this.list = arr;
} else {
this.$refs.uToast.show({
title: message,
});
}
this.showLoading = false;
});
},
handleSearch() {
this.showLoading = true;
this.tablist = this.list.filter((x) => {
if (
x.FCustomerName.includes(this.searchText) ||
x.FCustomerPhone.includes(this.searchText) ||
x.BillNo.includes(this.searchText)
) {
return true;
}
});
this.showLoading = false;
},
seeDetail(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/orders/detail/index');
});
},
hireMan(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/hire/index');
});
},
payAgain(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/place/index', { type: 'payAgain' });
});
},
paying(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/pay/index');
});
},
handleRefund(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/apply-refund/index');
});
},
changeWorker(data) {
this.updateCurrentOrder(data).then(() => {
this.$u.route('/pages/change-worker/index');
});
},
cancelOrder(data) {
request
.post('/api/Order/save', {
Model: {
FID: data.Id, //订单内码
FStatus: 'YQX', //订单状态
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '取消成功!',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
handleShowVerifyCode(data) {
this.currentOrder = data;
this.verifyCode = data.FFinishCode;
this.showVerifyCode = true;
},
handleAcceptance() {
this.showVerifyCode = false;
uni.showLoading({
title: '提交中',
});
request
.post('/api/Order/CheckAccept', {
FID: this.currentOrder.Id,
FinishCode: this.currentOrder.FFinishCode,
})
.then((res) => {
uni.hideLoading();
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '已验收',
});
// this.getOrderList();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.page-box {
.orderHd {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
justify-content: flex-start;
/deep/.u-image {
margin-right: 12rpx;
background-color: #fff;
}
.contact {
.line {
font-size: 24rpx;
color: #262626;
}
}
}
.right {
flex: 0 0 72rpx;
.status {
font-size: 24rpx;
color: #434343;
}
}
}
.orderBd {
.item {
position: relative;
// display: flex;
margin: 20rpx 0 0;
border-bottom: 1rpx dashed #d9d9d9;
&::last-child {
border-bottom: none;
}
.left {
.pre-box {
display: flex;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
/deep/ .u-image {
margin-right: 12rpx;
margin-bottom: 12rpx;
}
}
}
.content {
padding: 16rpx 0 24rpx 0;
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.delivery-time {
color: #595959;
font-size: 24rpx;
}
}
.right {
position: absolute;
top: 20rpx;
right: 20rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $u-tips-color;
font-size: 24rpx;
}
}
}
.workmans {
padding: 12rpx 0;
.mtitle {
font-size: 24rpx;
color: #262626;
}
.number {
font-size: 24rpx;
font-weight: 600;
}
}
}
.orderFt {
.actions {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 6rpx;
}
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="设置登录密码"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :value="phone" :arrow="false"></u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
:clearable="false"
placeholder="请输入验证码"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="新密码" :arrow="false">
<u-input
v-model="psw"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="请设置新密码"
/>
</u-cell-item>
<u-cell-item title="确认密码" :arrow="false">
<u-input
v-model="pswconfirm"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="再次输入新密码"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="changePsw"
>确认修改</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
code: '',
codeText: '',
phone: '',
psw: '',
pswconfirm: '',
};
},
onLoad() {
this.phone = this.curUserinfo.phone;
},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
changePsw() {
const { phone, code, psw, pswconfirm } = this;
if (!code || !psw || !pswconfirm) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
if (psw !== pswconfirm) {
this.$refs.uToast.show({
title: '密码不一致,请重新输入!',
});
return;
}
request
.post('/api/Business/SetLoginPsd', {
phone: phone,
verificationcode: code,
psd: psw,
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="设置支付密码"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :value="phone" :arrow="false"></u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
:clearable="false"
placeholder="请输入验证码"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="新密码" :arrow="false">
<u-input
v-model="psw"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="请设置新密码(6位数字)"
/>
</u-cell-item>
<u-cell-item title="确认密码" :arrow="false">
<u-input
v-model="pswconfirm"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="再次输入新密码(6位数字)"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="changePsw"
>完成</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
code: '',
codeText: '',
phone: '',
psw: '',
pswconfirm: '',
};
},
onLoad() {
this.phone = this.curUserinfo.phone;
},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
changePsw() {
const { phone, code, psw, pswconfirm } = this;
if (!code || !psw || !pswconfirm) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
if (psw !== pswconfirm) {
this.$refs.uToast.show({
title: '密码不一致,请重新输入!',
});
return;
}
request
.post('/api/Business/SetPayPsd', {
phone: phone,
verificationcode: code,
psd: psw,
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!'
});
this.getAccountInfo();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
this.updateUserDetail(detail).then(() => {
uni.navigateBack();
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="支付订单"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card title="支付信息">
<view slot="body" class="payBd">
<view
class="price"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
<view slot="foot" class="payFt">
<view class="line">
<view class="linetitle">应付金额:</view>
<view
class="linecontent"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
<view class="line">
<view class="linetitle">实付金额:</view>
<view
class="linecontent"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>立即支付</u-button>
</view>
</view>
<u-modal
v-model="showModal"
content="您的余额不足,请充值"
confirm-text="去充值"
confirm-color="#ffcb57"
@confirm="goRecharge"
></u-modal>
<u-modal
v-model="showPswModal"
content="请先设置支付密码"
confirm-color="#ffcb57"
@confirm="goChangePsw"
></u-modal>
<u-modal
v-model="showPswTips"
content="请联系企业管理员设置支付密码"
confirm-color="#ffcb57"
></u-modal>
<u-keyboard
default
ref="uKeyboard"
mode="number"
:mask="true"
:mask-close-able="false"
:dot-enabled="false"
v-model="showPay"
:safe-area-inset-bottom="true"
:tooltip="false"
@change="onChange"
@backspace="onBackspace"
>
<view>
<view class="u-flex u-row-center u-m-t-48">
<u-message-input
mode="box"
:maxlength="6"
:dot-fill="true"
v-model="password"
:disabled-keyboard="true"
@finish="finish"
></u-message-input>
</view>
<view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">支付键盘</view>
</view>
</u-keyboard>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
showModal: false,
showPswModal: false,
password: '',
showPay: false,
showPswTips: false
};
},
onLoad() {
console.log(this.currentOrder)
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
curUserinfo: 'user/displayUserInfo',
userDetail: 'user/userDetail',
}),
},
methods: {
goChangePsw() {
this.$u.route('/pages/password/pay/index');
},
placeOrder() {
// 未设置支付密码
if (this.userDetail.FPayPassword === ' ') {
if (this.userDetail.FUserType === '1') {
this.showPswTips = true;
return;
}
this.showPswModal = true;
return;
}
// 余额不足付款
if (this.curUserinfo.balance < this.currentOrder.FSFQuotedPriceEntity[0].FSFQuotedPriceAmount) {
this.showModal = true;
return;
}
// 输入支付密码
this.showPay = true;
},
goRecharge() {
this.$u.route('/pages/recharge/index');
},
onChange(val) {
if (this.password.length < 6) {
this.password += val;
}
if (this.password.length >= 6) {
if (this.password === this.userDetail.FPayPassword) {
this.pay();
} else {
this.$refs.uToast.show({
title: '密码错误!',
});
}
}
},
pay() {
this.showPay = false;
uni.showLoading({
title: '支付中',
});
request
.post('/api/Order/Pay', {
FID: this.currentOrder.Id,
FSHSAmount: this.currentOrder.FSHAmount,
FStatus: 'YZF'
})
.then((res) => {
uni.hideLoading();
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '订单已支付',
isTab: true,
url: '/pages/orders/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
onBackspace(e) {
if (this.password.length > 0) {
this.password = this.password.substring(0, this.password.length - 1);
}
},
finish() {
console.log(11111);
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.payBd {
padding: 48rpx 0;
.price {
display: flex;
justify-content: center;
align-items: center;
font-size: 48rpx;
color: #f5222d;
}
}
.payFt {
.title {
margin-bottom: 24rpx;
font-size: 32rpx;
color: #262626;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
.linecontent {
font-size: 24rpx;
color: #262626;
}
}
}
}
}
</style>
<template>
<div class="content safe-area-inset-bottom">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="发布订单"
title-color="#472d21"
></u-navbar>
</div>
<div class="card">
<u-card :show-head="false">
<view slot="body" class="ahHead">
<view class="left">
<span class="title">{{ displayServiceType }}</span>
</view>
<view class="right">
<u-button size="mini" hover-class="defaultBtnhover" @click="chooseServiceType"
>选择类目</u-button
>
</view>
</view>
<!-- <view slot="body" class="ahBody">
<u-radio-group v-model="mode" active-color="#ffcb57" wrap size="45">-->
<!-- <u-radio name="一口价下单" shape="circle">
<view class="mainT">一口价下单</view>
<view class="desc">下单后支付相应的订单金额,师傅接单马上与客户预约上门服务</view>
</u-radio>-->
<!-- <u-radio name="报价后下单" shape="circle">
<view class="mainT">报价后下单</view>
<view class="desc">下单后让师傅给您报价,您选择合适的师傅为您服务</view>
</u-radio>-->
<!-- <u-radio name="悬赏下单" shape="circle">
<view class="mainT">悬赏下单</view>
<view class="desc last">下单后价格由您决定,师傅接单后直接预约客户上门服务</view>
</u-radio>-->
<!-- </u-radio-group>
</view>-->
</u-card>
<view class="empty">
<u-button size="mini" @click="addGood">添加商品</u-button>
<u-button size="mini" @click="chooseTemplate">选择商品模板</u-button>
</view>
<Good
v-for="item in goods"
:key="item.guid"
:guid="item.guid"
:source="item"
:canbeDelete="showDeleteBtn"
@delete="deleteGood"
:goodTypesSource="goodTypes"
@change="handleGoodChange"
/>
</div>
<u-picker
mode="selector"
title="请选择服务类目"
v-model="showServiceTypes"
:range="serviceTypes"
range-key="label"
@confirm="changeServiceType"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="next"
>下一步</u-button
>
</view>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
import Good from '@/components/good/index';
export default {
components: {
Good,
},
data() {
return {
mode: '报价后下单',
goods: [],
showServiceTypes: false,
serviceTypes: [],
serviceType: null,
loading: false,
templates: [],
isAdding: false,
goodTypes: [],
};
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
attachOrders: 'publish/templates',
currentOrder: 'order/currentOrder',
}),
displayServiceType() {
if (!this.serviceType) {
return '请选择服务类目';
}
return `${this.serviceType.label}`;
},
showDeleteBtn() {
return this.goods.length > 1;
},
},
watch: {
serviceType() {
this.goods = [
{
guid: this.$u.guid(),
},
];
},
},
async onLoad(options) {
console.log(this.currentOrder);
this.getServiceTypes();
if (options.type && options.type === 'payAgain') {
this.serviceType = {
value: this.currentOrder.FServiceItemID.Id,
label: this.currentOrder.FServiceItemID.Name[0].Value,
number: this.currentOrder.FServiceItemID.Number,
};
this.getGoodTypes(this.serviceType.label);
for (let i = 0; i < this.currentOrder.CustOrderGoodsMould.length; i++) {
const good = this.currentOrder.CustOrderGoodsMould[i];
const { FGoodsMouldImagesEntity } = good;
if (!FGoodsMouldImagesEntity || FGoodsMouldImagesEntity.length === 0) {
good.thumbs = [
'//img13.360buyimg.com/n7/jfs/t1/103005/7/17719/314825/5e8c19faEb7eed50d/5b81ae4b2f7f3bb7.jpg',
];
} else {
good.thumbs = [];
for (let j = 0; j < FGoodsMouldImagesEntity.length; j++) {
const imgItem = FGoodsMouldImagesEntity[j];
const result = await this.getImageUrl(imgItem.FGoodsImage);
good.thumbs.push(result[0].fileurl);
}
}
this.goods.push({
guid: this.$u.guid(),
goodType: {
value: good.FGoodsType.Id,
label: good.FGoodsType.Name[0].Value,
number: good.FGoodsType.Number,
},
category: {
value: good.FServiceTypeID.Id,
label: good.FServiceTypeID.Name[0].Value,
number: good.FServiceTypeID.Number,
},
// sku: good.FGoodsSpecs,
mark: good.FTools,
thumbs: good.thumbs.map((x) => {
return {
url: x,
};
}),
});
}
} else {
this.goods.push({
guid: this.$u.guid(),
});
}
},
onShow() {
if (!this.isAdding) {
return;
}
const _t = this;
// 移除空白商品模板
this.goods = this.goods.filter((x) => x.goodType && x.thumbs.length !== 0);
// 插入选择的商品模板数据
this.attachOrders.forEach((od) => {
const guid = _t.$u.guid();
_t.goods.push({
guid,
goodType: {
value: od.FGoodsTypeID.Id,
label: od.FGoodsTypeID.Name[0].Value,
number: od.FGoodsTypeID.Number,
},
// sku: od.FModel,
mark: od.Description,
thumbs: od.CustGoodsMouldImagesURL.map((x) => {
return {
url: x.fileurl,
fileid: x.fileid,
};
}),
});
});
this.isAdding = false;
},
updated() {},
methods: {
...mapActions({
updatePublishDetail: 'publish/updatePublishDetail',
}),
addGood() {
if (!this.serviceType) {
this.$refs.uToast.show({
title: '请先选择类目',
});
this.showServiceTypes = true;
return;
}
this.goods.push({
guid: this.$u.guid(),
});
},
getServiceTypes() {
request.get('/api/BaseData/ServiceItem').then((res) => {
const { code, result } = res;
if (code === 0) {
this.serviceTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
price: x.price,
};
});
}
});
},
changeServiceType(e) {
const { currentCardIndex } = this;
this.serviceType = this.serviceTypes[e[0]];
this.getGoodTypes(this.serviceType.label);
},
chooseServiceType() {
this.showServiceTypes = true;
},
getGoodTypes(servicename) {
request.get('/api/BaseData/GoodsType', { serviceitem: servicename }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.goodTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
async getImageUrl(value) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: value });
return res.result;
},
checkIfCompleteness(good, index) {
const { goodType, category, count, thumbs } = good;
if (!goodType || !category || !count || thumbs.length === 0) {
return false;
}
return true;
},
next() {
const { serviceType, goods } = this;
if (!serviceType) {
this.$refs.uToast.show({
title: '请先选择类目',
});
this.showServiceTypes = true;
}
if (!goods.some((item, index) => this.checkIfCompleteness(item, index))) {
this.$refs.uToast.show({
title: '请先完善必填项',
});
return;
}
this.updatePublishDetail({
FServiceItemID: {
FNUMBER: serviceType.number, //服务类目编码
},
FBusinessID: {
FNumber: this.userDetail.Number,
},
//商品模板
FGoodsMouldEntity: goods.map((good, idx) => {
return {
FGoodsType: {
FNUMBER: good.goodType.number,
},
FServiceTypeID: {
FNUMBER: good.category.number,
},
FGoodsQty: good.count,
// FGoodsSpecs: good.sku,
FAmount: good.totalAmount,
FTools: good.mark,
FGoodsMouldImagesEntity: good.thumbs.map((file) => {
return {
FGoodsImage: file.fileid
? file.fileid
: this.GetQueryString(file.url, 'filename').split('.')[0],
};
}),
};
}),
}).then(() => {
this.$u.route('/pages/customer/index');
});
},
chooseTemplate() {
if (!this.serviceType) {
this.$refs.uToast.show({
title: '请先选择类目',
});
this.showServiceTypes = true;
return;
}
this.$u.route('/pages/good-template/choose/index', {
id: this.serviceType.value,
});
},
deleteGood(guid) {
const idx = this.goods.findIndex((x) => x.guid === guid);
this.goods.splice(idx, 1);
},
handleGoodChange(value) {
const idx = this.goods.findIndex((x) => x.guid === value.guid);
this.goods[idx] = value.data;
},
GetQueryString(url, name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = url.split('?')[1].substr(1).match(reg);
if (r != null) return r[2];
return null;
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.card {
.ahHead {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
.title {
margin-left: 6rpx;
font-size: 28rpx;
color: #262626;
}
}
}
.ahBody {
.mainT {
font-size: 32rpx;
color: #262626;
}
.desc {
position: relative;
margin: 6rpx 0 12rpx 0;
font-size: 24rpx;
color: #8c8c8c;
// &::after {
// content: '';
// display: block;
// margin: 16rpx 0 12rpx 0;
// width: 100%;
// border-bottom: 2rpx dashed #bfbfbf;
// }
&.last {
&::after {
display: none;
}
}
}
}
.goodBd {
.chooseBtn {
padding-bottom: 24rpx;
}
}
.goodFt {
.price {
display: flex;
justify-content: flex-end;
align-content: center;
.unit,
.amount {
font-size: 36rpx;
color: red;
}
.amount {
margin-right: 32rpx;
}
}
.delete {
margin-top: 12rpx;
padding-top: 24rpx;
border-top: 2rpx dashed #bfbfbf;
}
}
.u-body-item {
font-size: 32rpx;
color: #333;
padding: 0rpx 10rpx;
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 400rpx;
flex: 0 0 400rpx;
height: 120rpx;
border-radius: 8rpx;
margin-left: 12rpx;
.extra-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.empty {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 32rpx;
}
}
.defaultBtnhover {
color: '#472d21';
}
}
</style>
<template>
<div class="content">
<web-view :webview-styles="webviewStyles" :src="webviewURL"></web-view>
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
webviewStyles: {
progress: {
color: '#FF3333',
},
},
webviewURL: ''
};
},
onLoad(options) {
this.webviewURL = options.url;
},
computed: {},
methods: {},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="账户充值"
title-color="#472d21"
></u-navbar>
</div>
<div class="card">
<u-card>
<view slot="head" class="ahHead">
<u-input
v-model="total"
type="number"
:clearable="false"
:custom-style="{ marginRight: 0 }"
placeholder="请输入充值金额"
/>
<span class="unit"></span>
</view>
<view slot="body">
<u-radio-group v-model="amount" active-color="#ffcb57" width="50%">
<u-radio
v-for="(item, index) in amounts"
:key="index"
:name="item.name"
:disabled="item.disabled"
shape="circle"
>{{ item.name }}</u-radio
>
</u-radio-group>
</view>
</u-card>
<u-card title="选择支付方式">
<view class="payBd" slot="body">
<view class="left">
<u-icon name="weixin-fill" size="50" color="#1AAD19" />
<span class="payname">微信支付</span>
</view>
<u-icon name="checkmark-circle-fill" size="50" color="#ffcb57" />
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '6rpx 30rpx', backgroundColor: '#ffcb57', color: '472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>充值</u-button
>
</view>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
amounts: [
{
name: '100',
checked: false,
disabled: false,
},
{
name: '200',
checked: false,
disabled: false,
},
{
name: '500',
checked: false,
disabled: false,
},
{
name: '1000',
checked: false,
disabled: false,
},
],
amount: 100,
total: 100,
loading: false,
};
},
watch: {
amount() {
this.total = this.amount;
},
},
onLoad() {},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
changeAmount(e) {
this.amount = e;
},
placeOrder() {
const _t = this;
this.loading = true;
request
.post('/api/payment', {
amount: this.total,
})
.then((res) => {
const { code, message, result } = res;
this.loading = false;
if (code === 0) {
const { timeStamp, nonceStr, paySign, signType } = result;
uni.requestPayment({
provider: 'wxpay',
timeStamp: timeStamp,
nonceStr: nonceStr,
package: result.package,
signType: signType,
paySign: paySign,
success: function (res) {
_t.getAccountInfo();
},
fail: function (err) {
_t.$refs.uToast.show({
title: '充值失败!',
});
},
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
getAccountInfo() {
const _t = this;
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
_t.updateUserDetail(detail).then(() => {
uni.showLoading({
title: '充值中',
});
setTimeout(() => {
uni.hideLoading();
_t.$refs.uToast.show({
title: '充值成功!',
});
uni.navigateBack();
}, 2500);
});
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.card {
.ahHead {
display: flex;
justify-content: space-between;
align-items: center;
}
.payBd {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
justify-content: flex-start;
align-items: center;
.payname {
margin-left: 8px;
}
}
}
.u-body-item {
font-size: 32rpx;
color: #333;
padding: 0rpx 10rpx;
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 400rpx;
flex: 0 0 400rpx;
height: 120rpx;
border-radius: 8rpx;
margin-left: 12rpx;
.extra-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
.defaultBtnhover {
color: '#472d21';
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="用户登录"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :arrow="false">
<u-input
v-model="phone"
type="number"
height="48"
input-align="right"
maxlength="11"
placeholder="请输入手机号码"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
placeholder="请输入验证码"
:clearable="false"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button size="mini" slot="right" type="success" @click="getCode">{{
codeText
}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="tips">您尚未注册,请完善以下信息完成注册</view>
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="用户类型" arrow :value="selectedTypeName" @click="showSel"></u-cell-item>
<u-cell-item title="公司名称" :arrow="false" v-if="selectedTypeNumber === '2'">
<u-input
v-model="companyName"
type="text"
height="48"
input-align="right"
maxlength="50"
placeholder="请输入公司名称"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="真实姓名" :arrow="false">
<u-input
v-model="nickName"
type="text"
height="48"
input-align="right"
placeholder="请输入真实姓名"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-select v-model="showSelect" :list="list" @confirm="handleConfirm" confirm-color="#ffcb57"></u-select>
<u-modal
v-model="showJoin"
content="您输入的企业已注册,请您先进行申请加入企业"
confirm-text="申请加入企业"
:show-title="false"
@confirm="joinNow"
></u-modal>
<u-modal
v-model="showPayPswTips"
content="您已完成账号注册,请先设置支付密码"
confirm-text="立即设置"
:show-title="false"
@confirm="setPayPsw"
></u-modal>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="handleCommit"
>注册</u-button
>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
phone: '',
code: '',
codeText: '',
showSelect: false,
list: [
{
value: '1',
label: '个人',
},
{
value: '2',
label: '企业',
},
],
selectedTypeName: '个人',
selectedTypeNumber: '1',
nickName: '',
companyName: '',
loading: false,
showJoin: false,
showPayPswTips: false,
};
},
onLoad() {},
computed: {
...mapGetters({
wxDetail: 'user/wxDetail',
}),
},
methods: {
...mapActions({
handleLogin: 'user/login',
updateOtherInfo: 'user/updateOtherInfo',
updateRegisterStatus: 'user/updateRegisterStatus',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code, message } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
handleConfirm(e) {
this.selectedTypeName = e[0].label;
this.selectedTypeNumber = e[0].value;
},
showSel() {
this.showSelect = true;
},
async handleCommit() {
const _t = this;
if (
!this.phone ||
!this.code ||
(this.selectedTypeNumber === '1' && !this.nickName) ||
(this.selectedTypeNumber === '2' && !this.companyName)
) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const { encryptedData, iv, userInfo } = this.wxDetail;
let registerData = {
Phone: this.phone,
UserType: this.selectedTypeNumber,
VerificationCode: this.code,
UserImage: userInfo.avatarUrl,
encryptedData,
iv,
RealName: this.nickName,
};
if (this.selectedTypeNumber === '2') {
registerData.ComPanyName = this.companyName;
}
this.loading = true;
const res = await request.post('/api/Business/save', registerData);
this.loading = false;
const { code, result, message } = res;
if (code === 0) {
const { Id, Number } = result.Result;
this.updateOtherInfo({
Id,
Number,
});
this.getUserInfo();
return;
}
if (code === 100) {
if (message === '你输入的企业已注册,请你先进行申请加入企业') {
this.showJoin = true;
return;
}
this.$refs.uToast.show({
title: message,
});
}
},
joinNow() {
this.$u.route('/pages/join/index', {
phone: this.phone,
name: this.companyName,
realname: this.nickName,
});
},
getUserInfo() {
const _t = this;
uni.login({
success(ev) {
request
.post('/api/Validation', {
code: ev.code,
})
.then((res) => {
if (res.code === 0) {
const { isRegister, result, token } = res.result;
if (isRegister) {
_t.handleLogin({
userDetail: JSON.parse(result),
isRegister,
}).then(() => {
uni.setStorageSync('token', token);
_t.$refs.uToast.show({
title: '注册成功!',
isTab: true,
url: '/pages/index/index',
});
});
}
}
});
},
});
},
setPayPsw() {
this.$u.route('/pages/password/pay/index');
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tips {
margin-top: 12rpx;
padding-left: 32rpx;
font-size: 24rpx;
color: #ff7a45;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="账户明细"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="fl-tool" @click="handleShowFilter">
<span class="month">{{ selectKey }}</span>
<u-icon :name="`arrow-${showFilter ? 'up' : 'down'}`"></u-icon>
</view>
<view class="list">
<view class="list-item" v-for="item in list" :key="item.Id">
<view class="line mark">{{ item.FOrderBillNo }}</view>
<view class="line">
<view class="line-name">{{ item.FPayType }}</view>
<view class="line-name">{{ item.FAmount }}</view>
</view>
<view class="line">
<view class="line-desc">{{ item.FWxPayTime }}</view>
<view class="line-status">{{ item.FPayUserName }}</view>
</view>
</view>
</view>
</view>
<u-picker
mode="selector"
v-model="showFilter"
:range="filterKeys"
range-key="label"
@confirm="changeFilter"
confirm-color="#ffcb57"
></u-picker>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
data() {
return {
group: {},
showFilter: false,
list: [],
selectKey: '全部',
filterKeys: [],
};
},
onLoad() {
const arr = this.userDetail.FWxPayEntity.reverse();
this.group['全部'] = arr;
arr.forEach((payitem) => {
let groupitem = this.group[payitem.FWxPayTime.substring(0, 7)];
if (!groupitem) {
this.group[payitem.FWxPayTime.substring(0, 7)] = [];
}
this.group[payitem.FWxPayTime.substring(0, 7)].push(payitem);
});
this.list = arr;
this.filterKeys = Object.keys(this.group).map((x) => {
return {
value: x,
label: x,
};
});
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
}),
},
methods: {
changeFilter(e) {
this.selectKey = this.filterKeys[e[0]].value;
this.list = this.group[this.selectKey];
},
handleShowFilter() {
this.showFilter = true;
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.fl-tool {
padding: 24rpx 32rpx;
background-color: #ffe58f;
.month {
margin-right: 12rpx;
color: #434343;
}
}
.list {
padding: 0 32rpx;
.list-item {
padding: 32rpx 0;
border-bottom: 1rpx solid #d9d9d9;
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
&.mark {
font-weight: 500;
font-size: 24rpx;
color: #595959;
}
&:last-child {
margin-bottom: 0;
}
.line-name {
font-size: 28rpx;
color: #434343;
}
.line-desc {
font-size: 24rpx;
color: #8c8c8c;
}
.line-status {
font-size: 24rpx;
color: #faad14;
}
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="钱包"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="overview">
<view class="wallet">
<img class="icon-wallet" src="../../static/images/common/wallet.png" />
<view class="title">账户余额</view>
<view class="amount">¥ {{curUserinfo.balance}}</view>
</view>
</view>
<u-card :show-head="false" padding="0" margin="0 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="账户充值" icon="coupon-fill" @click="goRecharge"></u-cell-item>
<u-cell-item title="余额提现" icon="rmb-circle-fill" @click="goWithdraw"></u-cell-item>
<u-cell-item title="账户明细" icon="list-dot" @click="goDetail"></u-cell-item>
</u-cell-group>
</view>
</u-card>
</view>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
data() {
return {};
},
onLoad() {},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
goRecharge() {
this.$u.route('/pages/recharge/index');
},
goWithdraw() {
this.$u.route('/pages/withdraw/index');
},
goDetail() {
this.$u.route('/pages/transaction-detail/index');
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.overview {
padding: 80rpx 0 60rpx 0;
.wallet {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon-wallet {
width: 120rpx;
height: 120rpx;
}
.title {
margin-top: 6rpx;
font-size: 24rpx;
}
.amount {
margin-top: 12rpx;
font-size: 36rpx;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="提现"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="overview">
<view class="wallet">
<view class="title">可提现金额</view>
<view class="amount">¥ {{curUserinfo.balance}}</view>
</view>
</view>
<view class="wd-form">
<view class="wd-title">提现金额</view>
<view class="wd-input">
<view class="left">
<u-icon name="rmb" size="40"></u-icon>
<u-input v-model="amount" type="number" placeholder="请输入提现金额" />
</view>
<view>
<span class="wd-btn-font" @click="wdAll">全部提现</span>
</view>
</view>
<view class="description">本月还可免费提现5次,每日限额5000,最低10元起</view>
</view>
<view class="paytype">
<view class="pt-title">
提现方式:
<u-icon name="weixin-fill" color="#52c41a" size="36"></u-icon>
<span class="brand">微信钱包</span>
</view>
</view>
<view class="tips">
<view>温馨提示</view>
<view>用户每日最高提现金额为5000元,每月可免费提现5次,超过部分按1%收取手续费;最低提现金额为10元。</view>
</view>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 24rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提现</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
amount: '',
};
},
onLoad() {},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
placeOrder() {
const { amount, curUserinfo } = this;
if (amount === '' || amount > curUserinfo.balance) {
return;
}
request
.post('/api/CashOut/SH', {
amount: amount,
})
.then((res) => {
const { code, message, result } = res;
this.$refs.uToast.show({
title: code === 0 ? '提交成功!' : message,
});
if (code === 0) {
this.getAccountInfo();
}
});
},
wdAll() {
this.amount = this.curUserinfo.balance;
},
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
this.updateUserDetail(detail);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.overview {
padding: 80rpx 0 60rpx 0;
background-color: #ffe58f;
.wallet {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.title {
margin-top: 6rpx;
font-size: 32rpx;
}
.amount {
margin-top: 12rpx;
font-size: 36rpx;
font-weight: bold;
}
}
}
.wd-form {
background-color: #fff;
.wd-title {
position: relative;
padding: 24rpx 0 24rpx 48rpx;
font-size: 32rpx;
&::before {
content: '';
position: absolute;
display: block;
top: 28rpx;
left: 24rpx;
width: 8rpx;
height: 36rpx;
background-color: #ffcb57;
border-radius: 5rpx;
}
}
.wd-input {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 24rpx;
padding: 12rpx 0;
border-bottom: 1rpx solid #d9d9d9;
.left {
display: flex;
justify-content: flex-start;
align-items: center;
/deep/.u-icon {
margin-top: -3rpx;
margin-right: 6rpx;
}
}
.wd-btn-font {
font-weight: bold;
}
}
.description {
padding: 14rpx 24rpx 28rpx 24rpx;
font-size: 26rpx;
color: #8c8c8c;
}
}
.paytype {
margin-top: 30rpx;
background-color: #fff;
.pt-title {
position: relative;
padding: 24rpx 0 24rpx 48rpx;
font-size: 32rpx;
&::before {
content: '';
position: absolute;
display: block;
top: 28rpx;
left: 24rpx;
width: 8rpx;
height: 36rpx;
background-color: #ffcb57;
border-radius: 5rpx;
}
.brand {
margin-left: 18rpx;
}
}
}
.tips {
padding: 32rpx 24rpx;
font-size: 24rpx;
color: #595959;
}
}
}
</style>
{
"rules": [
{
"action": "allow",
"page": "*"
}
]
}
\ No newline at end of file
import Vue from 'vue';
import Vuex from 'vuex';
import createPersistedState from 'vuex-persistedstate';
// 用户模块
import user from './modules/user';
// 商品模板
import templateModule from './modules/template';
// 发布订单
import publish from './modules/publish';
// 订单相关
import order from './modules/order';
Vue.use(Vuex);
const vuexPersisted = new createPersistedState({
storage: {
getItem: key => uni.getStorageSync(key),
setItem: (key, value) => uni.setStorageSync(key, value),
removeItem: key => uni.removeStorageSync(key)
}
});
const store = new Vuex.Store({
plugins: [vuexPersisted],
modules: {
user,
templateModule,
publish,
order
}
});
Vue.prototype.$store = store;
export default store;
const state = {
currentOrder: null,
currentWorker: null,
currentStatus: 0
};
const mutations = {
UPDATE_CURRENT: (state, provider) => {
state.currentOrder = provider;
},
UPDATE_WORKER: (state, provider) => {
state.currentWorker = provider;
},
CLEAR: state => {
state.currentOrder = null;
state.currentWorker = null;
},
UPDATE_CURRENT_STATUS: (state, provider) => {
state.currentStatus = provider;
},
};
const actions = {
updateCurrentOrder({ commit }, data) {
commit('UPDATE_CURRENT', data);
},
updateCurrentWorker({ commit }, data) {
commit('UPDATE_WORKER', data);
},
clearOrder({ commit }) {
commit('CLEAR');
},
updateCurrentStatus({ commit }, data) {
commit('UPDATE_CURRENT_STATUS', data);
},
};
const getters = {
currentOrder: state => state.currentOrder,
currentWorker: state => state.currentWorker,
currentStatus: state => state.currentStatus,
};
export default {
namespaced: true,
state,
mutations,
actions,
getters
};
const state = {
detail: null,
address: null,
templates: []
};
const mutations = {
UPDATE_DETAIL: (state, provider) => {
state.detail = provider;
},
UPDATE_ADDRESS: (state, provider) => {
state.address = provider;
},
IMPORT_TEMPLATES:(state, provider) => {
state.templates = provider;
},
CLEAR: state => {
state.detail = null;
state.address = null;
}
};
const actions = {
updatePublishDetail({ commit }, data) {
commit('UPDATE_DETAIL', data);
},
updatePublishAddress({ commit }, data) {
commit('UPDATE_ADDRESS', data);
},
importTemplates({ commit }, data) {
commit('IMPORT_TEMPLATES', data);
},
clearPublish({ commit }) {
commit('CLEAR');
}
};
const getters = {
publishDetail: state => state.detail,
publishAddress: state => state.address,
templates: state => state.templates
};
export default {
namespaced: true,
state,
mutations,
actions,
getters
};
const state = {
list: [],
current: null
};
const mutations = {
UPDATE_LIST: (state, provider) => {
state.list = provider;
},
UPDATE_CURRENT: (state, provider) => {
state.current = provider;
},
CLEAR: state => {
state.list = [];
state.current = null;
}
};
const actions = {
updateTemplateList({ commit }, data) {
commit('UPDATE_LIST', data);
},
updateCurrentTemplate({ commit }, data) {
commit('UPDATE_CURRENT', data);
},
clearTemplate({ commit }) {
commit('CLEAR');
}
};
const getters = {
templates: state => state.list,
currentTemplate: state => state.current
};
export default {
namespaced: true,
state,
mutations,
actions,
getters
};
const state = {
login: false,
wxDetail: null,
isRegister: false,
other: {
Id: '',
Number: ''
},
userDetail: null
};
const mutations = {
LOGIN: (state, provider) => {
state.login = true;
state.isRegister = provider.isRegister;
state.userDetail = provider.userDetail;
},
LOGOUT: state => {
state.login = false;
state.wxDetail = null;
state.isRegister = false;
state.apiToken = '';
state.other = {
Id: '',
Number: ''
};
state.userDetail = null;
state.extra = null;
},
UPDATE_WXINFO: (state, provider) => {
state.wxDetail = provider;
},
UPDATE_OTHER: (state, provider) => {
state.other = provider;
},
UPDATE_REGISTER_STATUS: (state, provider) => {
state.isRegister = provider;
},
UPDATE_USER_DETAIL: (state, provider) => {
state.userDetail = provider;
}
};
const actions = {
login({ commit }, data) {
commit('LOGIN', data);
},
logout({ commit }) {
commit('LOGOUT');
},
updateWXInfo({ commit }, data) {
commit('UPDATE_WXINFO', data);
},
updateOtherInfo({ commit }, data) {
commit('UPDATE_OTHER', data);
},
updateRegisterStatus({ commit }, status) {
commit('UPDATE_REGISTER_STATUS', status);
},
updateUserDetail({ commit }, data) {
commit('UPDATE_USER_DETAIL', data);
}
};
const getters = {
login: state => state.login,
wxDetail: state => state.wxDetail,
isRegister: state => state.isRegister,
userDetail: state => state.userDetail,
displayUserInfo: state => {
if (!state.userDetail) {
return {
name: '',
phone: '',
balance: 0
};
}
const currentUser = state.userDetail.FCustBusinessMember.length > 1 ? state.userDetail.FCustBusinessMember.find(x => x.FIsManager) : state.userDetail.FCustBusinessMember[0];
return {
name: currentUser.FRealName,
phone: currentUser.FPHONE,
balance: state.userDetail.FBalanceAmount,
userType: state.userDetail.FUserType === '1' ? '个人' : '企业用户',
isManager: currentUser.FIsManager,
avator: currentUser.FUserImage
};
}
};
export default {
namespaced: true,
state,
mutations,
actions,
getters
};
/* uni.scss */
@import 'uview-ui/theme.scss';
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24upx;
$uni-font-size-base:28upx;
$uni-font-size-lg:32upx;
/* 图片尺寸 */
$uni-img-size-sm:40upx;
$uni-img-size-base:52upx;
$uni-img-size-lg:80upx;
/* Border Radius */
$uni-border-radius-sm: 4upx;
$uni-border-radius-base: 6upx;
$uni-border-radius-lg: 12upx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20upx;
$uni-spacing-row-lg: 30upx;
/* 垂直间距 */
$uni-spacing-col-sm: 8upx;
$uni-spacing-col-base: 16upx;
$uni-spacing-col-lg: 24upx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx;
{
"compilerOptions": {
"types": [
"@dcloudio/types",
"miniprogram-api-typings",
"mini-types"
]
}
}
module.exports = {
transpileDependencies: ['luch-request']
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论