1
This commit is contained in:
parent
2b2d3891ba
commit
068b3a12df
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,60 +1,70 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container_input">
|
<view class="container_input">
|
||||||
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow">
|
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index"
|
||||||
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
|
@click="selectItem(item)" v-if="!item.DoNotShow">
|
||||||
<view v-if="item.require" style="color: #e93323;">*</view>
|
<view class="select_and_input"
|
||||||
<view class="container_input_item_label">
|
v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
|
||||||
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1">
|
<view v-if="item.require" style="color: #e93323;">*</view>
|
||||||
<text v-if="item.select" class="iconfont"></text>
|
<view class="container_input_item_label">
|
||||||
</text>
|
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)"
|
||||||
<text class="select_label line1">{{ item.label }}</text>
|
v-if="Object.keys(item).indexOf('select') != -1">
|
||||||
</view>
|
<text v-if="item.select" class="iconfont"></text>
|
||||||
<view class="container_input_item_value greyColor" v-if="item.type == 'select'">
|
</text>
|
||||||
<text v-if="item.value" class="text">{{ item.value }}</text>
|
<text class="select_label line1">{{ item.label }}</text>
|
||||||
<text v-else>{{ item.holder }}</text>
|
</view>
|
||||||
<text class="iconfont"></text>
|
<view class="container_input_item_value greyColor" v-if="item.type == 'select'">
|
||||||
</view>
|
<text v-if="item.value" class="text">{{ item.value }}</text>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'number'">
|
<text v-else>{{ item.holder }}</text>
|
||||||
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<text class="iconfont"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="container_input_item_value" v-if="item.type == 'digit'">
|
<view class="container_input_item_value" v-if="item.type == 'number'">
|
||||||
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder"
|
||||||
</view>
|
placeholder-class="inputPlaceHolder" />
|
||||||
<view class="container_input_item_value" v-if="item.type == 'input'">
|
</view>
|
||||||
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
|
<view class="container_input_item_value" v-if="item.type == 'digit'">
|
||||||
</view>
|
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder"
|
||||||
<view class="container_input_item_value" v-if="item.type == 'switch'">
|
placeholder-class="inputPlaceHolder" />
|
||||||
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)" @change="switchChange($event, item)" />
|
</view>
|
||||||
</view>
|
<view class="container_input_item_value" v-if="item.type == 'input'">
|
||||||
</view>
|
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder"
|
||||||
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
|
placeholder-class="inputPlaceHolder" />
|
||||||
<view class="container_input_item_label">{{ item.label }}</view>
|
</view>
|
||||||
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
|
<view class="container_input_item_value" v-if="item.type == 'switch'">
|
||||||
<radio-group class="select_group" @change="radioChange($event, item)">
|
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)"
|
||||||
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList" :key="val.value">
|
@change="switchChange($event, item)" />
|
||||||
<view>
|
</view>
|
||||||
<radio :value="val.value" :checked="val.value == item.inforValue" />
|
</view>
|
||||||
</view>
|
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
|
||||||
<view>{{ val.name }}</view>
|
<view class="container_input_item_label">{{ item.label }}</view>
|
||||||
</label>
|
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
|
||||||
</radio-group>
|
<radio-group class="select_group" @change="radioChange($event, item)">
|
||||||
</view>
|
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList"
|
||||||
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
|
:key="val.value">
|
||||||
<checkbox-group class="select_group" @change="checkChange($event, item)">
|
<view>
|
||||||
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList" :key="val.value">
|
<radio :value="val.value" :checked="val.value == item.inforValue" />
|
||||||
<view>
|
</view>
|
||||||
<checkbox class="chenk_list" :value="val.value" :checked="val.value == item.inforValue" />
|
<view>{{ val.name }}</view>
|
||||||
</view>
|
</label>
|
||||||
<view>{{ val.name }}</view>
|
</radio-group>
|
||||||
</label>
|
</view>
|
||||||
</checkbox-group>
|
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
|
||||||
</view>
|
<checkbox-group class="select_group" @change="checkChange($event, item)">
|
||||||
</view>
|
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList"
|
||||||
</view>
|
:key="val.value">
|
||||||
</view>
|
<view>
|
||||||
|
<checkbox class="chenk_list" :value="val.value"
|
||||||
|
:checked="val.value == item.inforValue" />
|
||||||
|
</view>
|
||||||
|
<view>{{ val.name }}</view>
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/*
|
/*
|
||||||
item参数
|
item参数
|
||||||
id:
|
id:
|
||||||
type: select
|
type: select
|
||||||
@ -63,178 +73,190 @@
|
|||||||
select 有此key值时,可进行选择逻辑
|
select 有此key值时,可进行选择逻辑
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
platformClassification: {
|
platformClassification: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default () {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
|
||||||
form: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
value: '',
|
|
||||||
formData: this.form
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
formData: {
|
|
||||||
handler(val) {
|
|
||||||
this.$emit('input',val)
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
form: {
|
|
||||||
handler(val) {
|
|
||||||
this.formData = val
|
|
||||||
},
|
},
|
||||||
deep: true
|
form: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
value: '',
|
||||||
|
formData: this.form
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
formData: {
|
||||||
|
handler(val) {
|
||||||
|
this.$emit('input', val)
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
handler(val) {
|
||||||
|
this.formData = val;
|
||||||
|
|
||||||
|
// 需求方要求为空 直接输入 不需要默认值
|
||||||
|
this.formData.price = '';
|
||||||
|
this.formData.stock = '';
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.platformClassification.forEach(item => {
|
||||||
|
if (item.inforValue) {
|
||||||
|
this.$emit('formInitData', item.inforValue, item.model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
selectItem(item) {
|
||||||
|
if (item.jumpLogic) {
|
||||||
|
// 执行跳转新界面逻辑暴露的方法
|
||||||
|
this.$emit('handleJumpLogic', item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit('handleSelectItem', item);
|
||||||
|
},
|
||||||
|
radioChange(e, item) {
|
||||||
|
this.$emit('radioChange', e.detail.value, item);
|
||||||
|
},
|
||||||
|
// switch组件切换
|
||||||
|
switchChange(e, item) {
|
||||||
|
this.$emit('switchChange', e.detail.value, item);
|
||||||
|
},
|
||||||
|
// 可选择条框模式
|
||||||
|
// 选择事件
|
||||||
|
selectRadio(item) {
|
||||||
|
item.select = !item.select;
|
||||||
|
},
|
||||||
|
// 多选按钮
|
||||||
|
checkChange(e, item) {
|
||||||
|
this.$emit('checkChange', e.detail.value, item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
created() {
|
|
||||||
this.platformClassification.forEach(item => {
|
|
||||||
if(item.inforValue) {
|
|
||||||
this.$emit('formInitData', item.inforValue, item.model);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
selectItem(item) {
|
|
||||||
if(item.jumpLogic) {
|
|
||||||
// 执行跳转新界面逻辑暴露的方法
|
|
||||||
this.$emit('handleJumpLogic', item);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$emit('handleSelectItem', item);
|
|
||||||
},
|
|
||||||
radioChange(e, item) {
|
|
||||||
this.$emit('radioChange', e.detail.value, item);
|
|
||||||
},
|
|
||||||
// switch组件切换
|
|
||||||
switchChange(e, item) {
|
|
||||||
this.$emit('switchChange', e.detail.value, item);
|
|
||||||
},
|
|
||||||
// 可选择条框模式
|
|
||||||
// 选择事件
|
|
||||||
selectRadio(item) {
|
|
||||||
item.select = !item.select;
|
|
||||||
},
|
|
||||||
// 多选按钮
|
|
||||||
checkChange(e, item) {
|
|
||||||
this.$emit('checkChange', e.detail.value, item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container_input {
|
.container_input {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 31rpx;
|
margin-top: 31rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
&_item {
|
|
||||||
.select_and_input {
|
|
||||||
height: 106rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
.greyColor {
|
|
||||||
color: #bbbbbb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.radio {
|
&_item {
|
||||||
padding: 30rpx 0;
|
.select_and_input {
|
||||||
}
|
height: 106rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
&_label {
|
.greyColor {
|
||||||
padding-left: 10rpx;
|
color: #bbbbbb;
|
||||||
color: #333333;
|
}
|
||||||
font-size: 30rpx;
|
}
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.select_label{
|
|
||||||
max-width: 520rpx;
|
|
||||||
}
|
|
||||||
.select_check {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
border: 1px solid #cccccc;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
|
|
||||||
.iconfont {
|
.radio {
|
||||||
font-size: 24rpx;
|
padding: 30rpx 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.select {
|
&_label {
|
||||||
background: #e93323;
|
padding-left: 10rpx;
|
||||||
border: none;
|
color: #333333;
|
||||||
.iconfont {
|
font-size: 30rpx;
|
||||||
color: #fff;
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
}
|
|
||||||
}
|
|
||||||
&_value {
|
|
||||||
padding-right: 10rpx;
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-end;
|
|
||||||
|
|
||||||
> span:nth-child(1) {
|
.select_label {
|
||||||
display: inline-block;
|
max-width: 520rpx;
|
||||||
margin-right: 15rpx;
|
}
|
||||||
}
|
|
||||||
.text {
|
|
||||||
color: #000;
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 400rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
.select_check {
|
||||||
text-align: right;
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
.select_group {
|
.iconfont {
|
||||||
display: flex;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&_select {
|
.select {
|
||||||
display: flex;
|
background: #e93323;
|
||||||
margin-right: 110rpx;
|
border: none;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex_start {
|
.iconfont {
|
||||||
padding: 0 10rpx;
|
color: #fff;
|
||||||
margin-top: 40rpx;
|
}
|
||||||
justify-content: flex-start;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
> view:not(:last-child) {
|
|
||||||
border-bottom: 1px solid #eeeeee;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.inputPlaceHolder {
|
&_value {
|
||||||
color: #bbbbbb;
|
padding-right: 10rpx;
|
||||||
}
|
flex: 1;
|
||||||
</style>
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
>span:nth-child(1) {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #000;
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 400rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_group {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_select {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 110rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex_start {
|
||||||
|
padding: 0 10rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:not(:last-child) {
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputPlaceHolder {
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,306 +1,312 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="area_container">
|
<view class="area_container">
|
||||||
<view class="area_container_title">
|
<view class="area_container_title">
|
||||||
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
|
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
|
||||||
class="manage_btn">管理</navigator>
|
class="manage_btn">新增分类</navigator>
|
||||||
<view class="area_container_title_name">选择店铺分类</view>
|
<view class="area_container_title_name">选择店铺分类</view>
|
||||||
<view class="area_container_title_close" @click="close"><text class="iconfont"></text></view>
|
<view class="area_container_title_close" @click="close"><text class="iconfont"></text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="area_container_content">
|
<view class="area_container_content">
|
||||||
<view class="selectList_con">
|
<view class="selectList_con">
|
||||||
<view class="selectList_con_item" v-for="(item, index) in selectList" :key="index">
|
<view class="selectList_con_item" v-for="(item, index) in selectList" :key="index">
|
||||||
<text>{{ item.cate_name }}</text>
|
<text>{{ item.cate_name }}</text>
|
||||||
<text class="iconfont" @click="delSelectItem(item, index)"></text>
|
<text class="iconfont" @click="delSelectItem(item, index)"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="selectList_tap">
|
<view class="selectList_tap">
|
||||||
<view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index"
|
<view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index"
|
||||||
@click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
|
@click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
|
||||||
{{ item.cate_name }}
|
{{ item.cate_name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
|
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
|
||||||
:class="{ selectTap: selectTap == -1 }">请选择</view>
|
:class="{ selectTap: selectTap == -1 }">请选择</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="selectList_area">
|
<view class="selectList_area">
|
||||||
<scroll-view scroll-y="true" class="scroll">
|
<scroll-view scroll-y="true" class="scroll">
|
||||||
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
|
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
|
||||||
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
|
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
|
||||||
<view @click="handlyAddSelect(item)" v-if="!item.children"><text class="iconfont"></text></view>
|
<view @click="handlyAddSelect(item)" v-if="!item.children"><text
|
||||||
</view>
|
class="iconfont"></text></view>
|
||||||
</scroll-view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view class="handle">
|
</view>
|
||||||
<view class="handle_button" @click="handleGetSelectArea">确定</view>
|
<view class="handle">
|
||||||
</view>
|
<view class="handle_button" @click="handleGetSelectArea">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { serialize, Toast } from '@/libs/uniApi.js';
|
import {
|
||||||
export default {
|
serialize,
|
||||||
props: {
|
Toast
|
||||||
allReadySelect: {
|
} from '@/libs/uniApi.js';
|
||||||
type: Array,
|
export default {
|
||||||
default: () => {
|
props: {
|
||||||
return []
|
allReadySelect: {
|
||||||
}
|
type: Array,
|
||||||
},
|
default: () => {
|
||||||
classifiedData: {
|
return []
|
||||||
type: Array,
|
}
|
||||||
default: () => {
|
},
|
||||||
return []
|
classifiedData: {
|
||||||
}
|
type: Array,
|
||||||
},
|
default: () => {
|
||||||
mer_id: {
|
return []
|
||||||
type: Number || String,
|
}
|
||||||
default: 0
|
},
|
||||||
}
|
mer_id: {
|
||||||
},
|
type: Number || String,
|
||||||
data() {
|
default: 0
|
||||||
return {
|
}
|
||||||
selectList: [],
|
},
|
||||||
selectTap: -1,
|
data() {
|
||||||
selectTapIndex: -1, // 选择的列表下班
|
return {
|
||||||
tapList: [],
|
selectList: [],
|
||||||
isShowLastItem: true, // 是否展示最后一项请选择
|
selectTap: -1,
|
||||||
areaList: []
|
selectTapIndex: -1, // 选择的列表下班
|
||||||
};
|
tapList: [],
|
||||||
},
|
isShowLastItem: true, // 是否展示最后一项请选择
|
||||||
watch: {
|
areaList: []
|
||||||
classifiedData: {
|
};
|
||||||
handler(val) {
|
},
|
||||||
this.areaList = this.classifiedData
|
watch: {
|
||||||
},
|
classifiedData: {
|
||||||
deep: true
|
handler(val) {
|
||||||
}
|
this.areaList = this.classifiedData
|
||||||
},
|
},
|
||||||
created() {
|
deep: true
|
||||||
this.areaList = serialize(this.classifiedData);
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
created() {
|
||||||
|
this.areaList = serialize(this.classifiedData);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
// 选择地址
|
// 选择地址
|
||||||
async selectArea(item) {
|
async selectArea(item) {
|
||||||
|
|
||||||
// 当选择项没有子集时
|
// 当选择项没有子集时
|
||||||
if (!(item.children && item.children.length)) {
|
if (!(item.children && item.children.length)) {
|
||||||
// Toast('该选项没有子集');
|
// Toast('该选项没有子集');
|
||||||
return;
|
return;
|
||||||
if (this.isShowLastItem) {
|
if (this.isShowLastItem) {
|
||||||
this.tapList.push(item);
|
this.tapList.push(item);
|
||||||
} else {
|
} else {
|
||||||
this.tapList.splice(this.tapList.length - 1, 1, item);
|
this.tapList.splice(this.tapList.length - 1, 1, item);
|
||||||
}
|
}
|
||||||
this.isShowLastItem = false;
|
this.isShowLastItem = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log(item);
|
// 如果title被选中,选择子项时,删除后面所有title——item
|
||||||
// 如果title被选中,选择子项时,删除后面所有title——item
|
if (this.selectTapIndex > -1) {
|
||||||
if (this.selectTapIndex > -1) {
|
this.tapList.splice(this.selectTapIndex, 999);
|
||||||
this.tapList.splice(this.selectTapIndex, 999);
|
this.areaList = item.children;
|
||||||
this.areaList = item.children;
|
this.tapList.push(item);
|
||||||
this.tapList.push(item);
|
this.isShowLastItem = true;
|
||||||
this.isShowLastItem = true;
|
this.selectTap = -1;
|
||||||
this.selectTap = -1;
|
this.selectTapIndex = -1;
|
||||||
this.selectTapIndex = -1;
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 当所选择项拥有子集时
|
// 当所选择项拥有子集时
|
||||||
if (item.children && item.children.length) {
|
if (item.children && item.children.length) {
|
||||||
this.areaList = item.children;
|
this.areaList = item.children;
|
||||||
this.tapList.push(item);
|
this.tapList.push(item);
|
||||||
this.isShowLastItem = true;
|
this.isShowLastItem = true;
|
||||||
this.selectTap = -1;
|
this.selectTap = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 选择tap
|
// 选择tap
|
||||||
async selectTapItem(item, index) {
|
async selectTapItem(item, index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
this.areaList = serialize(this.classifiedData);
|
this.areaList = serialize(this.classifiedData);
|
||||||
this.selectTap = item.value; // 添加边框
|
this.selectTap = item.value; // 添加边框
|
||||||
this.selectTapIndex = index; // 用于判断选择子集时,是否需要删除后面得选项
|
this.selectTapIndex = index; // 用于判断选择子集时,是否需要删除后面得选项
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.selectTap = item.value;
|
this.selectTap = item.value;
|
||||||
this.areaList = item.children;
|
this.areaList = item.children;
|
||||||
},
|
},
|
||||||
// 点击请选择
|
// 点击请选择
|
||||||
selectTapLastItem(val) {
|
selectTapLastItem(val) {
|
||||||
this.selectTap = -1;
|
this.selectTap = -1;
|
||||||
if (!this.tapList.length) {
|
if (!this.tapList.length) {
|
||||||
// this.areaList = val.children;
|
// this.areaList = val.children;
|
||||||
this.areaList = serialize(this.classifiedData);
|
this.areaList = serialize(this.classifiedData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.areaList = this.tapList[this.tapList.length - 1].children;
|
this.areaList = this.tapList[this.tapList.length - 1].children;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击加号事件
|
// 点击加号事件
|
||||||
handlyAddSelect(item) {
|
handlyAddSelect(item) {
|
||||||
if (this.selectList.some(val => val.value == item.value)) {
|
if (this.selectList.some(val => val.value == item.value)) {
|
||||||
Toast('已经选择过了')
|
Toast('已经选择过了')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selectTapIndex > -1) {
|
if (this.selectTapIndex > -1) {
|
||||||
this.tapList.splice(this.selectTapIndex, 999);
|
this.tapList.splice(this.selectTapIndex, 999);
|
||||||
}
|
}
|
||||||
if (!item.parent_id) {
|
if (!item.parent_id) {
|
||||||
this.selectList.push(item);
|
this.selectList.push(item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let str = '';
|
let str = '';
|
||||||
str =
|
str =
|
||||||
serialize(this.tapList)
|
serialize(this.tapList)
|
||||||
.map(val => val.name)
|
.map(val => val.name)
|
||||||
.join('/') +
|
.join('/') +
|
||||||
'/' +
|
'/' +
|
||||||
item.name;
|
item.name;
|
||||||
this.selectList.push({ ...item, name: str });
|
this.selectList.push({
|
||||||
},
|
...item,
|
||||||
// 删除所选地址
|
name: str
|
||||||
delSelectItem(item, index) {
|
});
|
||||||
this.selectList.splice(index, 1);
|
},
|
||||||
},
|
// 删除所选地址
|
||||||
|
delSelectItem(item, index) {
|
||||||
|
this.selectList.splice(index, 1);
|
||||||
|
},
|
||||||
|
|
||||||
// 点击确定按钮,抛出已选项
|
// 点击确定按钮,抛出已选项
|
||||||
handleGetSelectArea() {
|
handleGetSelectArea() {
|
||||||
this.$emit('handleGetSelectArea', this.selectList);
|
this.$emit('handleGetSelectArea', this.selectList);
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
|
|
||||||
// 数组去重
|
// 数组去重
|
||||||
unique(arr) {
|
unique(arr) {
|
||||||
var obj = {};
|
var obj = {};
|
||||||
return arr.filter(ele => {
|
return arr.filter(ele => {
|
||||||
if (!obj[ele]) {
|
if (!obj[ele]) {
|
||||||
obj[ele] = true;
|
obj[ele] = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.area_container {
|
.area_container {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 16px 16px 0px 0px;
|
border-radius: 16px 16px 0px 0px;
|
||||||
|
|
||||||
&_title {
|
&_title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 36rpx 30rpx 46rpx 0;
|
padding: 36rpx 30rpx 46rpx 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&_close {
|
&_close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manage_btn {
|
.manage_btn {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 30rpx;
|
left: 30rpx;
|
||||||
top: 40rpx;
|
top: 40rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_content {
|
&_content {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
|
||||||
.selectList_con {
|
.selectList_con {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
|
|
||||||
&_item {
|
&_item {
|
||||||
padding: 3rpx 10rpx;
|
padding: 3rpx 10rpx;
|
||||||
background: #fff6f5;
|
background: #fff6f5;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
|
|
||||||
>span:nth-child(1) {
|
>span:nth-child(1) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 14rpx;
|
margin-right: 14rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectList_tap {
|
.selectList_tap {
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
&_item {
|
&_item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-right: 60rpx;
|
margin-right: 60rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectTap {
|
.selectTap {
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
border-bottom: 3rpx solid #e93323;
|
border-bottom: 3rpx solid #e93323;
|
||||||
padding-bottom: 21rpx;
|
padding-bottom: 21rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectList_area {
|
.selectList_area {
|
||||||
.scroll {
|
.scroll {
|
||||||
height: 597rpx;
|
height: 597rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectList_area_item {
|
.selectList_area_item {
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectList_area_item_name {
|
.selectList_area_item_name {
|
||||||
flex: 0.7;
|
flex: 0.7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.handle {
|
.handle {
|
||||||
height: 126rpx;
|
height: 126rpx;
|
||||||
|
|
||||||
&_button {
|
&_button {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
background: #e93323;
|
background: #e93323;
|
||||||
border-radius: 43rpx;
|
border-radius: 43rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -83,7 +83,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 相关凭证 -->
|
<!-- 相关凭证 -->
|
||||||
<view class="withdrawal-envidence">
|
<!-- <view class="withdrawal-envidence">
|
||||||
<view class="withdrawal-envidence">
|
<view class="withdrawal-envidence">
|
||||||
<text class="withdrawal-envidence-main">请上传相关凭证</text>
|
<text class="withdrawal-envidence-main">请上传相关凭证</text>
|
||||||
<text class="withdrawal-envidence-sub">(图片格式支持JPG、PNG、JPEG)</text>
|
<text class="withdrawal-envidence-sub">(图片格式支持JPG、PNG、JPEG)</text>
|
||||||
@ -102,9 +102,11 @@
|
|||||||
<text>上传凭证</text>
|
<text>上传凭证</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
||||||
锁定规则为连续输入超过3次后或当日总次数超过10次后锁定。恢复规则分为12时后恢复和次日0时恢复。锁定期间建议不要重复提交绑定,否则锁定时间会相应延长。
|
锁定规则:错误输入超 3 次后锁定。<br>
|
||||||
|
恢复规则:12 时后或次日 0 时恢复。<br>
|
||||||
|
温馨提示:锁定期间勿重复提交绑定,否则锁定时间延长。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -148,7 +150,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;">
|
||||||
锁定规则为连续输入超过3次后或当日总次数超过10次后锁定。恢复规则分为12时后恢复和次日0时恢复。锁定期间建议不要重复提交绑定,否则锁定时间会相应延长。
|
锁定规则:错误输入超 3 次后锁定。<br>
|
||||||
|
恢复规则:12 时后或次日 0 时恢复。<br>
|
||||||
|
温馨提示:锁定期间勿重复提交绑定,否则锁定时间延长。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -265,9 +269,9 @@
|
|||||||
Object.assign(this.bindForm, res.data.financial_account);
|
Object.assign(this.bindForm, res.data.financial_account);
|
||||||
this.bindForm.id = res.data.id;
|
this.bindForm.id = res.data.id;
|
||||||
this.mer_id = this.bindForm.mer_id;
|
this.mer_id = this.bindForm.mer_id;
|
||||||
if (this.bindForm.is_own === 0 && this.bindForm.financial_img) {
|
// if (this.bindForm.is_own === 0 && this.bindForm.financial_img) {
|
||||||
this.$set(this.bindForm, 'temp', this.bindForm.financial_img.split(","));
|
// this.$set(this.bindForm, 'temp', this.bindForm.financial_img.split(","));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -336,10 +340,10 @@
|
|||||||
|
|
||||||
// 法人账号验证
|
// 法人账号验证
|
||||||
if (this.bindForm.is_own === 0) {
|
if (this.bindForm.is_own === 0) {
|
||||||
if (!this.bindForm.temp.length > 0) return this.$util.Tips({
|
// if (!this.bindForm.temp.length > 0) return this.$util.Tips({
|
||||||
title: '请上传凭证!'
|
// title: '请上传凭证!'
|
||||||
});
|
// });
|
||||||
this.bindForm.financial_img = this.bindForm.temp.join(",");
|
// this.bindForm.financial_img = this.bindForm.temp.join(",");
|
||||||
|
|
||||||
if (!uni.$u.test.idCard(this.bindForm.id_card)) return this.$util.Tips({
|
if (!uni.$u.test.idCard(this.bindForm.id_card)) return this.$util.Tips({
|
||||||
title: '请输入正确的身份证号!'
|
title: '请输入正确的身份证号!'
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<!-- 协议 -->
|
<!-- 协议 -->
|
||||||
<view class="withdrawal-pro">
|
<view class="withdrawal-pro">
|
||||||
<text class="withdrawal-pro-txt" @click="handlePreview">《企业授权法人提现书》</text>
|
<!-- <text class="withdrawal-pro-txt" @click="handlePreview">《企业授权法人提现书》</text> -->
|
||||||
<text class="withdrawal-pro-progress" @click="viewProgress">查看审核进度</text>
|
<text class="withdrawal-pro-progress" @click="viewProgress">查看审核进度</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -122,15 +122,16 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 提现btn -->
|
<!-- 提现btn -->
|
||||||
<view class="withdrawal-btn tapActive" @click="handleSubmit">
|
<view class="withdrawal-btn tapActive" @click="handleSubmit" v-if="bankList.length != 0">
|
||||||
<view class="withdrawal-btn-wrap">
|
<view class="withdrawal-btn-wrap">
|
||||||
<text v-if="bankList.length == 0">点击查看审核进度</text>
|
<!-- <text v-if="bankList.length == 0">点击查看审核进度</text> -->
|
||||||
<text v-else>点击提现</text>
|
<text>点击提现</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 明细按钮 -->
|
<!-- 明细按钮 -->
|
||||||
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)">明细</view>
|
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)"
|
||||||
|
v-if="bankList.length != 0">明细</view>
|
||||||
|
|
||||||
<!-- 提现提示 -->
|
<!-- 提现提示 -->
|
||||||
<u-modal :show="tipShow" title="提示"
|
<u-modal :show="tipShow" title="提示"
|
||||||
@ -189,8 +190,6 @@
|
|||||||
this.getBankInfo();
|
this.getBankInfo();
|
||||||
// 用户信息
|
// 用户信息
|
||||||
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
|
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
|
||||||
|
|
||||||
console.log(this.userInfo.mer_info.is_company)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -202,15 +201,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 图片预览
|
// 图片预览
|
||||||
handlePreview() {
|
// handlePreview() {
|
||||||
let that = this;
|
// let that = this;
|
||||||
if (this.bankInfo && this.bankInfo.financial_account.financial_img) {
|
// if (this.bankInfo && this.bankInfo.financial_account.financial_img) {
|
||||||
uni.previewImage({
|
// uni.previewImage({
|
||||||
urls: that.bankInfo.financial_account.financial_img.split(','),
|
// urls: that.bankInfo.financial_account.financial_img.split(','),
|
||||||
current: 0
|
// current: 0
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
// 添加账户
|
// 添加账户
|
||||||
handleToAdd() {
|
handleToAdd() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user