Commit aaa6d7dc authored by Morson's avatar Morson
parents c156fdfc 97c5ce5f
......@@ -4,7 +4,7 @@ export default [{
"required": true,
"fieldsTitle": "A字裙",
"fieldsName": "name",
"fieldsType": "input",
"fieldsType": "text",
"fieldsValue": "",
"key": "A字裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg",
......@@ -55,13 +55,19 @@ export default [{
"cat": 10
},
{
"fieldsTitle": "连衣裙",
"fieldsTitle": "充电桩编码",
"fieldsName": "scan",
"fieldsType": "scan",
"required": true,
"key": "连衣裙",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/7.jpg",
"cat": 10
},
{
"fieldsTitle": "妈妈装",
"fieldsTitle": "多级选择",
"fieldsName": "mutiPicker",
"fieldsType": "mutipicker",
"required": true,
"key": "妈妈装",
"icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg",
"cat": 10
......
<!-- ******************* 多选框 ******************* -->
<template>
<view class="list">
<view v-for="(item,index) in settings" :key="index"
......
<!-- ******************* 文件上传 ******************* -->
<template>
<view class="file-box">
<view class="u-flex" @click="selectUpload">
......@@ -58,7 +59,7 @@
// 直接打开相册
let config = {
options:{
consourceType:['album'],//['album', 'camera']
sourceType:['album'],//['album', 'camera']
}
}
await this.chooseImage('qiniu',config)
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<u-input v-model="dataValue" @input="valueChange" :type="type" />
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [stringMixin],
props: {},
data() {
return {}
},
computed: {
type() {
if (this.item && this.item.fieldsType == 'password') {
return this.item.fieldsType
} else {
return 'text'
}
}
},
watch: {},
mounted() {},
methods: {}
}
</script>
<style>
</style>
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<u-input v-model="dataValue" @input="valueChange" :type="type" />
......
<!-- ******************* 定位 ******************* -->
<template>
<view class="list u-flex u-row-between">
<text class="required" v-if="item.required">*</text>
......@@ -10,7 +11,7 @@
<script>
import objMixin from './objMixin'
export default {
name: 'XhRadio',
name: 'XhLocation',
components: {},
mixins: [objMixin],
props: {},
......
<!-- ******************* 单级/多级 选择 ******************* -->
<template>
<view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker">
<view class="txt u-flex-1">{{item.fieldsTitle}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<u-picker v-model="showPicker" :rangeKey="rangeKey" @columnchange="columnchange" mode="multiSelector" @confirm="pickerConfirm" :default-selector='[0, 1]' :range="settings"></u-picker>
</view>
</template>
<script>
import objMixin from './objMixin'
export default {
name: 'XhPicker',
components: {},
mixins: [objMixin],
props: {
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
defaultSelector: {
type: Array,
default() {
return [0];
}
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey: {
type: String,
default: ''
},
},
filters:{},
data() {
return {
showPicker:false,
settings:[
[1, 2, 3],
[4, 5, 6]
]
}
},
computed: {
// settings() {
// let setting = [
// [1, 2, 3],
// [4, 5, 6]
// ]
// return setting
// // return this.item.settings || []
// }
},
watch: {},
mounted() {},
methods: {
openPicker(){
this.showPicker = true
},
pickerConfirm(data){
let result = []
data&&data.map((item,index)=>{
let val = this.settings[index][item]
result.push(val)
})
this.dataValue = result
this.valueChange(result)
console.log(result,'result')
},
columnchange(data){
console.log(data,'data')
// 树列改变时进行联动操作
const {column ,index} = data
let arr = [9,10,50]
this.settings.splice(column+1,1,arr)
console.log(this.settings,'this.settings')
},
}
}
</script>
<style lang="scss" scoped>
</style>
<!-- ******************* 单选框 ******************* -->
<template>
<view class="list">
<view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item===dataValue}"
......
<!-- ******************* 扫码 ******************* -->
<template>
<view class="">
<view class="u-flex">
请输入:<u-input class="u-flex-1" v-model="dataValue" @input="valueChange" type="text" />
</view>
<view class="u-flex" @click="scanCode">
<view class="txt u-flex-1">扫描二维码(仅挚达充电桩可扫描)</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
</view>
</template>
<script>
import stringMixin from './stringMixin'
export default {
name: 'XhScan',
components: {},
mixins: [stringMixin],
props: {},
filters:{},
data() {
return {}
},
computed: {
valueTxt() {
let str = ''
const dataValue = this.dataValue
if(dataValue && dataValue.length>1){
str = '经度:'+dataValue[0]+','+'维度:'+dataValue[1]
}
return str
}
},
watch: {},
mounted() {},
methods: {
scanCode(type){
const self = this
// qrCode 二维码;barCode 条形码
let scanType = type && [type] || ['qrCode']
uni.scanCode({
// scanType: scanType,
success: function (res) {
self.dataValue = res.result
self.valueChange(res.result)
// console.log('条码类型:' + res.scanType);
// console.log('条码内容:' + res.result);
}
});
},
// setValue(txt) {
// this.valueChange(this.dataValue)
// }
}
}
</script>
<style lang="scss" scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
</style>
<!-- ******************* 单个下拉选择 ******************* -->
<template>
<view>
<u-input v-model="dataValue" readOnly @click="show=true" type="select" />
......
......@@ -45,6 +45,9 @@
.settle-bottom {
position: fixed;
bottom: 44rpx;
width: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
......@@ -6,7 +6,9 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"disableScroll": true
}
},
{
......
<template>
<view class="content">
<scroll-view
scroll-y
style="height: 100%; width: 100%"
@scrolltolower="reachBottom"
@scroll="handleScroll"
refresher-enabled
:refresher-triggered="triggered"
@refresherrefresh="onRefresh"
scroll-anchoring
@refresherrestore="onRestore"
@refresherpulling="triggered = true"
>
<u-swiper
:height="250"
:list="list"
:indicator-pos="indicatorPos"
:mode="mode"
:interval="3000"
@click="clickSwiper"
>
</u-swiper>
<view>
<text class="title">最新消息</text>
<view v-for="(item, index) in messageList" :key="index">
<text class="title">{{ item.body }}</text>
</view>
<view class="order-view">
<!-- 订单推荐吸顶 -->
<u-sticky>
<view class="sticky">
<text>订单推荐</text>
</view>
</u-sticky>
<!-- 入驻成功之后显示推荐订单列表 -->
<view v-if="status == 7 && orderList.length > 0">
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell>
</view>
<u-loadmore
:status="currentLoadStatus"
bgColor="#f2f2f2"
></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view v-else-if="status == 7 && orderList.length <= 0">
暂无订单
</view>
<!-- 入驻前-->
<view v-else-if="loaded">
<text class="title"
>当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text
>
<u-button
class="settle-button"
type="primary"
shape="circle"
@click="immediatelyIn"
:custom-style="buttonStyle"
>
立即入驻
</u-button>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="content">
<scroll-view class="scroll-view" scroll-y style="height: 100%; width: 100%" @scrolltolower="reachBottom"
@scroll="handleScroll" refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh"
scroll-anchoring @refresherrestore="onRestore" @refresherpulling="triggered = true" :show-scrollbar="false"
enable-back-to-top>
<!-- <view class="title-view">充电桩自营平台</view> -->
<u-navbar :is-back="false" background="{background: transparent}" :border-bottom="false" :is-fixed="false">
<text class="title-view">充电桩自营平台</text>
</u-navbar>
<u-swiper :height="240" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000"
@click="clickSwiper">
</u-swiper>
<view class="msg-view">
<view class="msg-title">最新消息</view>
<view class="msg-list-view">
<view class="msg-content" v-for="(item, index) in messageList" :key="index">
<view class="msg-content-view">
<view class="left-view">
<image class="msg-icon"></image>
<text>{{item.body}}</text>
</view>
<image class="right-icon"></image>
</view>
<view class="line-view" v-if="messageList.length > index + 1"></view>
</view>
</view>
</view>
<view class="order-view">
<!-- 订单推荐吸顶 -->
<u-sticky>
<view class="sticky">
<text>订单推荐</text>
</view>
</u-sticky>
<!-- 入驻成功之后显示推荐订单列表 -->
<view class="order-list-view">
<view v-if="status == 7 && orderList.length > 0" class="order-item-view">
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item"> </OrderCell>
</view>
<u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view v-else-if="status == 7 && orderList.length <= 0" class="no-order-view">
暂无订单
</view>
<!-- 入驻前-->
<view v-else-if="loaded" class="tip-view">
<view class="tip-title">当前订单(笔)</view>
<view class="tip-count">{{ count }}</view>
<view class="tip-other">入驻通过后平台将向您推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle">
立即入驻
</u-button>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import util from "@/utils/util.js";
const app = getApp();
import OrderCell from "@/components/order/index.vue";
export default {
components: {
OrderCell,
},
data() {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false,
list: [
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
},
],
title: false,
mode: "round",
indicatorPos: "bottomCenter",
title: "Hello",
loaded: false,
count: 0, // 推荐订单数量
messageList: [
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
],
loadStatus: ["more", "loading", "noMore"],
currentLoadStatus: "loading",
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
bottomLoading: false,
};
},
computed: {
buttonStyle() {
return {
width: "300rpx",
};
},
},
onLoad() {
this._freshing = false;
this.triggered = false;
},
onShow() {
// 每次进入页面都刷新入驻状态
if (app.globalData.token) {
// 获取是否显示入驻按钮
this.initSettleInfo();
}
},
methods: {
async initSettleInfo() {
if (this.status == 7) return;
const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) {
vm.loaded = true;
vm.status = Number(result.record.status);
// vm.status = 1
}
};
await app.getBaseInfo(this, callBack);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
// 获取入驻状态
this.initSettleInfo();
// 获取推荐订单及数量
// ....
setTimeout(() => {
// 数据加载完成更新入驻状态和推荐列表
this.triggered = false;
this._freshing = false;
}, 1000);
},
onRestore() {
this.triggered = "restore";
},
reachBottom() {
console.log("-----bottom will-----");
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return;
}
console.log("-----bottom did-----");
this.bottomLoading = true;
setTimeout(() => {
// 加载更多数据
// ...
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成
this.currentLoadStatus = false /*是否还有*/
? this.loadStatus[1]
: this.loadStatus[2];
this.$nextTick(function () {
this.bottomLoading = false;
});
}, 1000);
},
clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
},
immediatelyIn() {
if (util.getToken()) {
uni.navigateTo({
url: this.status > 0 ? "/pages/settle/prompt" : "/pages/settle/index",
});
} else {
uni.navigateTo({
url: "pages/login/index",
});
}
},
},
};
import util from "@/utils/util.js";
const app = getApp();
import OrderCell from "@/components/order/index.vue";
export default {
components: {
OrderCell,
},
data() {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false,
list: [{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
},
],
title: false,
mode: "round",
indicatorPos: "bottomCenter",
title: "Hello",
loaded: false,
count: 0, // 推荐订单数量
messageList: [{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
{
id: 1234,
type: "",
level: "",
title: "",
url: "",
body: "好消息",
},
],
loadStatus: ["more", "loading", "noMore"],
currentLoadStatus: "loading",
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
bottomLoading: false,
};
},
computed: {
buttonStyle() {
return {
'width': '400rpx',
'height': '104rpx',
};
},
msgStyle() {
return {
'1': '', // 置顶
'2': '', // 通知
'3': '' // 消息
}
}
},
onLoad() {
this._freshing = false;
this.triggered = false;
},
onShow() {
// 每次进入页面都刷新入驻状态
if (app.globalData.token) {
// 获取是否显示入驻按钮
this.initSettleInfo();
}
},
methods: {
async initSettleInfo() {
if (this.status == 7) return;
const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) {
vm.loaded = true;
vm.status = Number(result.record.status);
}
};
await app.getBaseInfo(this, callBack);
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
// 获取入驻状态
this.initSettleInfo();
// 获取推荐订单及数量
// ....
setTimeout(() => {
// 数据加载完成更新入驻状态和推荐列表
this.triggered = false;
this._freshing = false;
}, 1000);
},
onRestore() {
this.triggered = "restore";
},
reachBottom() {
console.log("-----bottom will-----");
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return;
}
console.log("-----bottom did-----");
this.bottomLoading = true;
setTimeout(() => {
// 加载更多数据
// ...
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成
this.currentLoadStatus = false /*是否还有*/ ?
this.loadStatus[1] :
this.loadStatus[2];
this.$nextTick(function() {
this.bottomLoading = false;
});
}, 1000);
},
clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
},
immediatelyIn() {
if (util.getToken()) {
uni.navigateTo({
url: this.status > 0 ? "/pages/settle/prompt" : "/pages/settle/index",
});
} else {
uni.navigateTo({
url: "pages/login/index",
});
}
},
},
};
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
}
.logo {
height: 200 rpx;
width: 100%;
margin: 0 rpx auto 50 rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36 rpx;
color: #8f8f94;
}
.sticky {
height: 120 rpx;
background-color: #2979ff;
color: #fff;
padding: 24 rpx;
text-align: left;
}
.order-view {
text-align: center;
}
</style>
.content {
height: 100vh;
background-color: #F4F5F7;
padding: 0rpx 30rpx 0 30rpx;
.scroll-view {
::-webkit-scrollbar {/*隐藏滚轮*/
display: none;
}
}
.title-view {
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.msg-view {
.msg-title {
color: #333333;
font-size: 32rpx;
font-weight: bold;
padding: 50rpx 0rpx 30rpx 0rpx;
}
.msg-list-view {
border-radius: 12rpx;
background-color: #FFFFFF;
padding: 6rpx 30rpx;
}
.msg-content {
color: #333333;
font-size: 26rpx;
.msg-content-view {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
margin-bottom: 20rpx;
.left-view {
display: flex;
align-items: center;
.msg-icon {
width: 80rpx;
height: 36rpx;
}
}
.right-icon {
width: 14rpx;
height: 24px;
}
}
.line-view {
height: 2rpx;
background-color: #F4F5F7;
}
}
}
}
.logo {
height: 200 rpx;
width: 100%;
margin: 0 rpx auto 50 rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36 rpx;
color: #8f8f94;
}
.order-view {
text-align: center;
.sticky {
background-color: #F4F5F7;
color: #fff;
padding: 24 rpx;
text-align: left;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 46rpx 0 28rpx 0;
}
.order-list-view {
background-color: #FFFFFF;
border-radius: 12rpx;
min-height: 460rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.order-item-view {}
.no-order-view {}
.tip-view {
.tip-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-top: 30rpx;
}
.tip-count {
color: #2272FF;
font-size: 70rpx;
font-weight: bold;
margin-top: 50rpx;
margin-bottom: 20rpx;
}
.tip-other {
font-size: 28rpx;
color: #333333;
margin-bottom: 50rpx;
}
}
}
}
</style>
......@@ -12,11 +12,10 @@
</view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
</view>
<view class="learn-view">
<view class="learn-view-title">内容大纲</view>
<view class="learn-list" v-for="(item, key) in courseOutline" :key="key">
<view class="learn-view" v-if="currentIndex >= 0">
<view class="learn-view-title">视频内容介绍</view>
<view class="learn-list" v-for="(item, key) in courseOutlines[currentIndex]" :key="key">
<view class="learn-list-item">{{item}}</view>
<view class="line-view"></view>
</view>
</view>
</view>
......@@ -33,8 +32,38 @@
courseSrc: '',
courseTitle: '',
courseDesc: '',
courseOutline: ['1 aaa', '2 bbb'] // 视频大纲
currentIndex: -1 // 第几个视频
};
},
computed: {
courseOutlines() { // 视频内容介绍
return [[
'1、考核规则:接单及时率',
'2、考核规则:上门及时率',
'3、考核规则:安装完工率',
'4、考核规则:资料提交及时率',
'5、考核规则:安装完工率',
'6、考核规则:客户满意度'
],
[
'1、必备材料4大类',
'2、施工工具准备'
],
[
'1、接线安装工艺标准',
'2、PVC、镀锌管电缆管明敷',
'3、电缆敷设的防火要求',
'4、电源点标识',
'5、配电箱接线及安装',
'6、管线敷设接头处理',
'7、充电桩内部接线',
'8、配电箱安装'
],
[
'1、勘测环节录单要求',
'2、安装环节录单要求'
]]
}
},
onLoad(e) {
if (e) {
......
......@@ -22,32 +22,44 @@
<view class="class-item" :key="groupIndex">
<view class="title">{{groupItem.groupName}}</view>
<view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top"
:prop="item.fieldsName">
<view class="label" v-if="toLowerCase(item.fieldsType)!=='location'" @click="nextStep(item)">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex"
label-position="top" :prop="item.fieldsName">
<view class="label" v-if="item.fieldsType!=='location'">
<text class="required" v-if="item.required">*</text>
{{item.fieldsTitle}}
</view>
<template v-if="item.fieldsType">
<xh-input v-if="toLowerCase(item.fieldsType)==='input'" :groupIndex="groupIndex"
<xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
</xh-input>
<xh-radio v-else-if="toLowerCase(item.fieldsType)==='radio'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-radio v-else-if="typeToComponentType(item.fieldsType)==='radio'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-radio>
<xh-checkbox v-else-if="toLowerCase(item.fieldsType)==='checkbox'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-checkbox v-else-if="typeToComponentType(item.fieldsType)==='checkbox'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-checkbox>
<xh-select v-else-if="toLowerCase(item.fieldsType)==='select'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-select v-else-if="typeToComponentType(item.fieldsType)==='select'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-select>
<xh-files v-else-if="toLowerCase(item.fieldsType)==='file'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-files>
<xh-location v-else-if="toLowerCase(item.fieldsType)==='location'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange">
<xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-location>
<xh-scan v-else-if="typeToComponentType(item.fieldsType)==='scan'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-scan>
<xh-picker v-else-if="typeToComponentType(item.fieldsType)==='picker'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item"
@value-change="fieldValueChange">
</xh-picker>
</template>
</u-form-item>
</view>
......@@ -67,6 +79,8 @@
import XhSelect from '@/components/createCom/XhSelect.vue'
import XhFiles from '@/components/createCom/XhFiles.vue'
import XhLocation from '@/components/createCom/XhLocation.vue'
import XhScan from '@/components/createCom/XhScan.vue'
import XhPicker from '@/components/createCom/XhPicker.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
export default {
data() {
......@@ -120,7 +134,9 @@
XhCheckbox,
XhSelect,
XhFiles,
XhLocation
XhLocation,
XhScan,
XhPicker
// formCom
},
created() {
......@@ -155,16 +171,41 @@
// 下一步
console.log(item, 'item')
},
fieldTypeStatus(type){
let typeArr = ['input','radio','checkbox','select','file']
let fieldsType = type.toLocaleLowerCase()
let flag = false
flag = typeArr.indexOf(fieldsType)>=0
return flag
},
toLowerCase(str){
str = str || ''
return str.toLocaleLowerCase()
typeToComponentType(type) {
// 将fieldType类型统一转换为公共组件判定类型
let formType = ''
type = type.toLocaleLowerCase()
switch (type) {
case 'text':
case 'password':
case 'textarea':
case 'number':
formType = 'input'
break
case 'select':
formType = 'select'
break
case 'checkbox':
formType = 'checkbox'
break
case 'file':
formType = 'file'
break
case 'location':
formType = 'location'
break
case 'scan':
formType = 'scan'
break
case 'picker':
case 'mutipicker':
formType = 'picker'
break
// case 'file':
// formType = 'XhFiles'
// break
}
return formType
},
// ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换
......
......@@ -66,9 +66,10 @@
<view class="seat"></view>
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitStatus" @click="$u.debounce(submitBaseInfo, 500)">
确定
</button>
<u-button class="btn-submit" @click="$u.debounce(submitBaseInfo, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
{{submitStatus ? '已确认信息,下一步' : '下一步'}}
</u-button>
</view>
</template>
</Settle>
......@@ -123,15 +124,32 @@
},
cityText() {
return this.areaTxts.join('、')
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
},
dizhiImage() {
return qn_base_url + 'dizhi.png'
},
anquanImage() {
return qn_base_url + 'anquan.png'
},
mixingImage() {
return qn_base_url + 'mixing.png'
},
dizhiImage() {
return qn_base_url + 'dizhi.png'
},
buttonStyle() {
return this.submitStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
}
}
},
components: {
......@@ -572,20 +590,7 @@
.btn-wrap {
width: 100%;
.btn-submit {
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272FF;
font-size: 32rpx;
color: #fff;
&[disabled] {
background-color: #D1D4D4;
color: #FFFFFF;
}
}
.btn-submit {}
}
.itemView {
......@@ -696,8 +701,10 @@
}
.tip-image {
width: 34rpx;
width: 30rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 8rpx;
margin-top: 2rpx;
}
</style>
</style>
......@@ -44,9 +44,10 @@
<template v-slot:bottom>
<view class="btn-wrap flex-xc">
<button class="btn-submit" :disabled="!submitBtnStatus" @click="$u.debounce(submitFileInfo, 500)">
{{ !submitBtnStatus ? '完成必填项,可提交资料' : '提交' }}
</button>
<u-button class="btn-submit" @click="$u.debounce(submitFileInfo, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
{{ !submitBtnStatus ? '下一步' : '我已确认信息,下一步' }}
</u-button>
</view>
</template>
......@@ -232,6 +233,23 @@ export default {
},
tishiImage() {
return qn_base_url + 'tishi.png'
},
buttonStyle() {
return this.submitBtnStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
}
}
},
components: {
......@@ -448,7 +466,6 @@ export default {
return;
}
let fileInfo = this.fileInfo;
debugger
fileInfo.other_photos = JSON.stringify(fileInfo.other_photos)
let submitInfoData = {
...fileInfo,
......@@ -656,9 +673,11 @@ export default {
}
.tip-image {
width: 34rpx;
width: 30rpx;
height: 32rpx;
margin-right: 8rpx;
margin-top: 2rpx;
margin-top: 2rpx;
flex-shrink: 0;
}
.bottom-tip-view {
......@@ -686,18 +705,7 @@ export default {
width: 100%;
.btn-submit {
width: 600rpx;
height: 104rpx;
line-height: 104rpx;
border-radius: 52rpx;
background: #2272FF;
font-size: 32rpx;
color: #fff;
&[disabled] {
background-color: #D1D4D4;
color: #FFFFFF;
}
}
}
.card-info-view {
......
......@@ -2,65 +2,25 @@
<view class="back_view">
<Settle :index="1">
<view class="content-view">
<view style="padding: 30rpx;">
<view v-for="(item, index) in contentTexts" :key="index"
:class="['item-list', {last: contentTexts.length <= index + 1}]">
<view class="item">
<view class="item-label">
<text>招募要求</text>
<text>{{item.title}}</text>
</view>
<view class="item-content">
<text>
1.必须具备相关的从业证书——电工证;
2.有汽车:皮卡、小面包、小轿车等;
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;
4.有充电桩安装经验优先;
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>结算价格</text>
</view>
<view class="item-content">
<text>
1.不同车企品牌结算价格不一,675元-1890元不等;
2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);
3.结算账期:周结50%,剩余50%次月20号结算;
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>入驻资料</text>
</view>
<view class="item-content">
<text>
1.身份证正反面照片
2.高/低压电工证正反面照片
3.车辆照片
</text>
</view>
</view>
<view class="line-view"></view>
<view class="item">
<view class="item-label">
<text>注意事项:</text>
</view>
<view class="item-content">
<text>
1.身份证,银行卡,签约人共有同一人,否则无法入驻。
2.充电桩材料按要求自行准备。
</text>
<text>{{item.content}}</text>
</view>
</view>
<view class="line-view" v-if="contentTexts.length > index + 1"></view>
</view>
</view>
<template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)">
<u-button class="bottom_btn" @click="$u.debounce(applyClick, 500)" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="isStop ? '' : 'none'">
<text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text>
<text class="bottom_title" v-if="isStop">申请入驻</text>
</button>
</u-button>
</template>
</Settle>
</view>
......@@ -82,6 +42,44 @@
saving: true
}
},
computed: {
contentTexts() {
return [{
title: '招募要求',
content: '1.必须具备相关的从业证书——电工证;\n\
2.有汽车:皮卡、小面包、小轿车等\n\
3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;\n\
4.有充电桩安装经验优先;'
}, {
title: '结算价格',
content: '1.不同车企品牌结算价格不一,675元-1890元不等;\n\
2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);\n\
3.结算账期:周结50%,剩余50%次月20号结算;'
}, {
title: '入驻资料',
content: '1.身份证正反面照片\n\
2.高/低压电工证正反面照片\n\
3.车辆照片'
}, {
title: '注意事项',
content: '1.身份证,银行卡,签约人共有同一人,否则无法入驻。\n\
2.充电桩材料按要求自行准备。'
}]
},
buttonStyle() {
return this.isStop ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'height': '104rpx',
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'height': '104rpx'
}
}
},
onLoad(e) {
this.initpageData(e)
this.startCounting()
......@@ -166,7 +164,7 @@
this.jumpJudge()
},
jumpJudge() {
jumpJudge() {
if (Number(this.status) > 0) {
uni.navigateTo({
url: '/pages/settle/prompt'
......@@ -184,11 +182,11 @@
<style lang="scss" scoped>
.back_view {
background-color: #F4F5F7;
background-color: #F4F5F7;
position: absolute;
top: 0;
left: 0;
width: 100%;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
......@@ -204,9 +202,15 @@
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-bottom: 30rpx;
margin-top: 30rpx;
}
.item-list {
padding: 30rpx 30rpx 0rpx 30rpx;
&.last {
padding-bottom: 30rpx;
}
}
.item-label {
......@@ -220,24 +224,16 @@
color: #333333;
font-size: 26rpx;
line-height: 50rpx;
margin-top: 30rpx;
margin-top: 20rpx;
}
.bottom_btn {
width: 600rpx;
height: 104rpx;
line-height: 96rpx;
border-radius: 54rpx;
// border: 4rpx solid #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
}
.bottom_title {
color: #fff;
......
......@@ -126,7 +126,7 @@
vm.status = result.record.status
}
let settledInfo = await app.getBaseInfo(this, callBack)
this.settledInfo = settledInfo
this.settledInfo = settledInfo
this.status = settledInfo.record.status
uni.hideLoading()
this.initInfo(settledInfo.record)
......@@ -188,13 +188,14 @@
position: absolute;
.icon {
margin-top: 68rpx;
width: 334rpx;
height: 320rpx;
margin-top: 20rpx;
width: 224rpx;
height: 224rpx;
&.active {
width: 224rpx;
height: 224rpx;
&.active {
margin-top: 38rpx;
width: 234rpx;
height: 222rpx;
}
}
......
......@@ -16,6 +16,7 @@ export const randomChar = function(l, url = "") {
}
//图片选择
export const chooseImage = function(data) {
console.log(data,'data-chooseImage')
return new Promise((resolve, reject) => {
uni.chooseImage({
count: data.count || 9, //默认9
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment