|
@@ -8,106 +8,162 @@
|
|
|
:labelStyle="{ color: '#333', fontWeight: 500, marginBottom: '10rpx' }"
|
|
:labelStyle="{ color: '#333', fontWeight: 500, marginBottom: '10rpx' }"
|
|
|
:model="form" :rules="rules"
|
|
:model="form" :rules="rules"
|
|
|
>
|
|
>
|
|
|
- <view class="section-title">确认信息</view>
|
|
|
|
|
|
|
+ <view class="section-title">基本信息</view>
|
|
|
<view class="card-box">
|
|
<view class="card-box">
|
|
|
- <u-form-item label="真实姓名" prop="realName">
|
|
|
|
|
- <u-input v-model="form.realName" placeholder="请输入真实姓名" border="none" class="custom-input"></u-input>
|
|
|
|
|
|
|
+ <u-form-item label="真实姓名" prop="cName">
|
|
|
|
|
+ <u-input v-model="form.cName" placeholder="请输入真实姓名" border="none" class="custom-input"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="性别" prop="gender">
|
|
|
|
|
- <u-radio-group v-model="form.gender" activeColor="#00cba3">
|
|
|
|
|
- <u-radio label="男" name="男" customStyle="margin-right: 30px"></u-radio>
|
|
|
|
|
- <u-radio label="女" name="女"></u-radio>
|
|
|
|
|
|
|
+ <u-form-item label="性别" prop="nSex">
|
|
|
|
|
+ <u-radio-group v-model="form.nSex" activeColor="#00cba3">
|
|
|
|
|
+ <u-radio label="男" :name="1" customStyle="margin-right: 30px"></u-radio>
|
|
|
|
|
+ <u-radio label="女" :name="0"></u-radio>
|
|
|
</u-radio-group>
|
|
</u-radio-group>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="从业年份" prop="years">
|
|
|
|
|
- <u-input v-model="form.years" placeholder="请输入从业年份 如:5" border="none"
|
|
|
|
|
|
|
+ <u-form-item label="手机号" prop="cPhone">
|
|
|
|
|
+ <u-input v-model="form.cPhone" placeholder="请输入手机号" border="none" class="custom-input"></u-input>
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ <u-form-item label="入驻城市" prop="city" @click="show = true">
|
|
|
|
|
+ <u-input v-model="form.city" readonly placeholder="请选择城市" border="none"
|
|
|
class="custom-input"></u-input>
|
|
class="custom-input"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
|
|
+ <u-form-item label="近期生活照" prop="cImgList">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ @fileList="onUpload($event, 'cImgList')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="section-title">确认账户信息</view>
|
|
|
|
|
|
|
+ <view class="section-title">详细信息</view>
|
|
|
<view class="card-box">
|
|
<view class="card-box">
|
|
|
- <u-form-item label="结算户名" prop="accountName">
|
|
|
|
|
- <u-input v-model="form.accountName" placeholder="请输入结算银行户主姓名" border="none"
|
|
|
|
|
|
|
+ <u-form-item label="昵称" prop="cNickName">
|
|
|
|
|
+ <u-input v-model="form.cNickName" placeholder="请输入昵称" border="none"
|
|
|
class="custom-input"></u-input>
|
|
class="custom-input"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="开户行" prop="bankName">
|
|
|
|
|
- <u-input v-model="form.bankName" placeholder="请输入开户名称" border="none" class="custom-input"></u-input>
|
|
|
|
|
|
|
+ <u-form-item label="头像" prop="cPortrait">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ :maxCount="1"
|
|
|
|
|
+ @fileList="onUpload($event, 'cPortrait')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ <u-form-item label="所在位置" prop="address" @click="onSelAddr">
|
|
|
|
|
+ <u-input v-model="address" readonly placeholder="请选择工作所在位置" border="none" class="custom-input"></u-input>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="结算账号" prop="accountNo">
|
|
|
|
|
- <u-input v-model="form.accountNo" placeholder="请输入结算银行账号" border="none"
|
|
|
|
|
- class="custom-input"></u-input>
|
|
|
|
|
|
|
+ <u-form-item label="个人简介" prop="cJianjie">
|
|
|
|
|
+ <u--textarea v-model="form.cJianjie" placeholder="请输入个人简介" border="none"
|
|
|
|
|
+ class="custom-input"></u--textarea>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="section-title">上传身份证正反面</view>
|
|
|
|
|
|
|
+ <view class="section-title">上传身份证正反面 <text class="sub-tip">*最多3张</text></view>
|
|
|
<view class="card-box">
|
|
<view class="card-box">
|
|
|
- <u-form-item prop="idCard">
|
|
|
|
|
- <u-input v-model="form.idCard" placeholder="请输入身份证号码" border="none" class="custom-input"></u-input>
|
|
|
|
|
- </u-form-item>
|
|
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ :maxCount="3"
|
|
|
|
|
+ @fileList="onUpload($event, 'cSfzImg')"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
- <view class="id-upload-row">
|
|
|
|
|
- <Upload
|
|
|
|
|
- name="idCardFront"
|
|
|
|
|
- width="auto"
|
|
|
|
|
- height="220rpx"
|
|
|
|
|
- :maxCount="1"
|
|
|
|
|
- @fileList="onUpload($event, 'idCardFront')"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="upload-block" slot="content">
|
|
|
|
|
- <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
|
|
|
- <text class="up-text">身份证人像面</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </Upload>
|
|
|
|
|
|
|
+ <template v-if="0">
|
|
|
|
|
+ <view class="id-upload-row">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ name="idCardFront"
|
|
|
|
|
+ width="auto"
|
|
|
|
|
+ height="220rpx"
|
|
|
|
|
+ :maxCount="1"
|
|
|
|
|
+ @fileList="onUpload($event, 'idCardFront')"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="upload-block" slot="content">
|
|
|
|
|
+ <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
|
|
|
+ <text class="up-text">身份证人像面</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </Upload>
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ name="idCardBack"
|
|
|
|
|
+ width="auto"
|
|
|
|
|
+ height="220rpx"
|
|
|
|
|
+ :maxCount="1"
|
|
|
|
|
+ @fileList="onUpload($event, 'idCardBack')"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="upload-block" slot="content">
|
|
|
|
|
+ <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
|
|
|
+ <text class="up-text">身份证国徽面</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </Upload>
|
|
|
|
|
+ </view>
|
|
|
<Upload
|
|
<Upload
|
|
|
- name="idCardBack"
|
|
|
|
|
|
|
+ name="idCardHand"
|
|
|
width="auto"
|
|
width="auto"
|
|
|
height="220rpx"
|
|
height="220rpx"
|
|
|
:maxCount="1"
|
|
:maxCount="1"
|
|
|
- @fileList="onUpload($event, 'idCardBack')"
|
|
|
|
|
|
|
+ @fileList="onUpload($event, 'idCardHand')"
|
|
|
>
|
|
>
|
|
|
- <view class="upload-block" slot="content">
|
|
|
|
|
|
|
+ <view class="upload-block full-width" slot="content">
|
|
|
<view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
<view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
|
- <text class="up-text">身份证国徽面</text>
|
|
|
|
|
|
|
+ <text class="up-text">手持身份证照片</text>
|
|
|
</view>
|
|
</view>
|
|
|
</Upload>
|
|
</Upload>
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <Upload
|
|
|
|
|
- name="idCardHand"
|
|
|
|
|
- width="auto"
|
|
|
|
|
- height="220rpx"
|
|
|
|
|
- :maxCount="1"
|
|
|
|
|
- @fileList="onUpload($event, 'idCardHand')"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="upload-block full-width" slot="content">
|
|
|
|
|
- <view class="icon-bg"><u-icon name="camera-fill" color="#fff" size="20"></u-icon></view>
|
|
|
|
|
- <text class="up-text">手持身份证照片</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </Upload>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
<!-- 隐藏的表单项,用于校验图片 -->
|
|
<!-- 隐藏的表单项,用于校验图片 -->
|
|
|
- <u-form-item prop="idCardFront" style="display: none;"></u-form-item>
|
|
|
|
|
- <u-form-item prop="idCardBack" style="display: none;"></u-form-item>
|
|
|
|
|
|
|
+ <u-form-item prop="cSfzImg" style="display: none;"></u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="section-title">
|
|
<view class="section-title">
|
|
|
- 上传资格证书 <text class="sub-tip">*最多15张</text>
|
|
|
|
|
|
|
+ 上传资格证书
|
|
|
</view>
|
|
</view>
|
|
|
<view class="card-box">
|
|
<view class="card-box">
|
|
|
<Upload
|
|
<Upload
|
|
|
- :maxCount="15"
|
|
|
|
|
|
|
+ :maxCount="1"
|
|
|
@fileList="onUpload($event, 'certification')"
|
|
@fileList="onUpload($event, 'certification')"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <!-- 隐藏的表单项,用于校验图片 -->
|
|
|
|
|
+ <u-form-item prop="certification" style="display: none;"></u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="section-title">上传商家资质</view>
|
|
|
|
|
|
|
+ <view class="section-title">上传营业执照</view>
|
|
|
<view class="card-box">
|
|
<view class="card-box">
|
|
|
<Upload
|
|
<Upload
|
|
|
- :maxCount="15"
|
|
|
|
|
- @fileList="onUpload($event, 'business')"
|
|
|
|
|
|
|
+ :maxCount="1"
|
|
|
|
|
+ @fileList="onUpload($event, 'businessLicense')"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <!-- 隐藏的表单项,用于校验图片 -->
|
|
|
|
|
+ <u-form-item prop="businessLicense" style="display: none;"></u-form-item>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="section-title">上传无犯罪证明</view>
|
|
|
|
|
+ <view class="card-box">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ :maxCount="1"
|
|
|
|
|
+ @fileList="onUpload($event, 'noCrime')"
|
|
|
|
|
+ />
|
|
|
|
|
+ <!-- 隐藏的表单项,用于校验图片 -->
|
|
|
|
|
+ <u-form-item prop="noCrime" style="display: none;"></u-form-item>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="section-title">上传承诺书信息</view>
|
|
|
|
|
+ <view class="card-box">
|
|
|
|
|
+ <u-form-item label="承诺书" prop="commitment">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ accept="file"
|
|
|
|
|
+ :maxSize="10240"
|
|
|
|
|
+ :maxCount="2"
|
|
|
|
|
+ @fileList="onUpload($event, 'commitment')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ <u-form-item label="承诺录音" prop="recording">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ accept="file"
|
|
|
|
|
+ :maxSize="10240"
|
|
|
|
|
+ :maxCount="2"
|
|
|
|
|
+ @fileList="onUpload($event, 'recording')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ <u-form-item label="承诺录像" prop="videoRecording">
|
|
|
|
|
+ <Upload
|
|
|
|
|
+ accept="file"
|
|
|
|
|
+ :maxSize="51200"
|
|
|
|
|
+ :maxCount="2"
|
|
|
|
|
+ @fileList="onUpload($event, 'videoRecording')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </u-form-item>
|
|
|
</view>
|
|
</view>
|
|
|
</u--form>
|
|
</u--form>
|
|
|
|
|
|
|
@@ -118,10 +174,20 @@
|
|
|
></u-button>
|
|
></u-button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 城市选择 -->
|
|
|
|
|
+ <u-picker :show="show" :columns="[cityList]" keyName="label"
|
|
|
|
|
+ @cancel="show = false" @confirm="onSelect"
|
|
|
|
|
+ ></u-picker>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import {
|
|
|
|
|
+ getCityList,
|
|
|
|
|
+ getProjectList,
|
|
|
|
|
+ getMerchantData,
|
|
|
|
|
+} from '@/api/index';
|
|
|
import Upload from '@/components/upload/index.vue';
|
|
import Upload from '@/components/upload/index.vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -130,43 +196,141 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
form: {
|
|
form: {
|
|
|
- realName: '',
|
|
|
|
|
- gender: '男',
|
|
|
|
|
- years: '',
|
|
|
|
|
- accountName: '',
|
|
|
|
|
- bankName: '',
|
|
|
|
|
- accountNo: '',
|
|
|
|
|
- idCard: ''
|
|
|
|
|
|
|
+ cName: '',
|
|
|
|
|
+ nSex: 0,
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
city: [
|
|
city: [
|
|
|
{
|
|
{
|
|
|
required: true,
|
|
required: true,
|
|
|
- message: '请输入首选城市',
|
|
|
|
|
|
|
+ message: '请选择城市',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ cName: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入您的姓名',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ cNickName: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入您的昵称',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ cPhone: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入手机号',
|
|
|
trigger: ['blur', 'change']
|
|
trigger: ['blur', 'change']
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ pattern: /^1([3589]\d|4[01456879]|6[0-9]|7[0-8])\d{8}$/,
|
|
|
|
|
+ message: '请输入正确的手机号格式',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
|
|
+ address: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择位置',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ cJianjie: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请填写您的简介',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ cSfzImg: [{ required: true, message: '请上传身份证', trigger: ['change'] }],
|
|
|
|
|
+ cImgList: [{ required: true, message: '最少上传一张生活照片', trigger: ['change'] }],
|
|
|
|
|
+ cPortrait: [{ required: true, message: '请上传头像', trigger: ['change'] }],
|
|
|
// 针对隐藏表单项的校验规则
|
|
// 针对隐藏表单项的校验规则
|
|
|
- idCardBack: [{ required: true, message: '请上传身份证国徽面', trigger: ['change'] }],
|
|
|
|
|
- idCardFront: [{ required: true, message: '请上传身份证人像面', trigger: ['change'] }],
|
|
|
|
|
|
|
+ // idCardBack: [{ required: true, message: '请上传身份证国徽面', trigger: ['change'] }],
|
|
|
},
|
|
},
|
|
|
|
|
+ query: {},
|
|
|
|
|
+ // 城市选择
|
|
|
|
|
+ show: false,
|
|
|
|
|
+ cityList: [],
|
|
|
};
|
|
};
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ address() {
|
|
|
|
|
+ return (this.form.address || '') + (this.form.name || '');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(query) {
|
|
|
|
|
+ this.query = query;
|
|
|
|
|
+ if (query.id) this.getData();
|
|
|
|
|
+ this.getCity();
|
|
|
},
|
|
},
|
|
|
onReady() {
|
|
onReady() {
|
|
|
// 页面加载完成后为表单设置规则
|
|
// 页面加载完成后为表单设置规则
|
|
|
this.$refs.uForm.setRules(this.rules);
|
|
this.$refs.uForm.setRules(this.rules);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getData() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ cOpenId: uni.getStorageSync('wx_copenid')
|
|
|
|
|
+ }
|
|
|
|
|
+ getMerchantData(params).then(res => {
|
|
|
|
|
+ let data = res.data.data;
|
|
|
|
|
+ this.form = data;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getCity() {
|
|
|
|
|
+ getCityList().then(res => {
|
|
|
|
|
+ this.cityList = res.data.data.map(({
|
|
|
|
|
+ deptId,
|
|
|
|
|
+ deptName
|
|
|
|
|
+ }) => ({
|
|
|
|
|
+ value: deptId,
|
|
|
|
|
+ label: deptName
|
|
|
|
|
+ }))
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ onSelAddr() {
|
|
|
|
|
+ uni.chooseLocation({
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ this.form.name = res.name;
|
|
|
|
|
+ this.form.address = res.address;
|
|
|
|
|
+ this.form.latitude = res.latitude;
|
|
|
|
|
+ this.form.longitude = res.longitude;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ onSelect(e) {
|
|
|
|
|
+ this.form = {
|
|
|
|
|
+ ...this.form,
|
|
|
|
|
+ city: e.value[0].label,
|
|
|
|
|
+ deptId: e.value[0].value,
|
|
|
|
|
+ }
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ },
|
|
|
// upload事件
|
|
// upload事件
|
|
|
onUpload(e, t) {
|
|
onUpload(e, t) {
|
|
|
this.form[t] = e.map(item => item.url);
|
|
this.form[t] = e.map(item => item.url);
|
|
|
},
|
|
},
|
|
|
onSubmit() {
|
|
onSubmit() {
|
|
|
this.$refs.uForm.validate().then(res => {
|
|
this.$refs.uForm.validate().then(res => {
|
|
|
- uni.$u.toast('校验通过')
|
|
|
|
|
|
|
+ let api = netStaffAdd;
|
|
|
|
|
+ if (this.query.id) api = netStaffUpdate;
|
|
|
|
|
+ api().then(ares => {
|
|
|
|
|
+ uni.$u.toast(ares.data.msg);
|
|
|
|
|
+ if (ares.data.code == 200) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}).catch(errors => {
|
|
}).catch(errors => {
|
|
|
console.log(errors)
|
|
console.log(errors)
|
|
|
- let f = errors.some(item => ['idCardBack', 'idCardFront'].indexOf(item.field) !== -1);
|
|
|
|
|
|
|
+ let f = errors.some(item => ['cSfzImg', 'certification', 'businessLicense', 'noCrime'].indexOf(item.field) !== -1);
|
|
|
if (f) uni.$u.toast(errors[0].message);
|
|
if (f) uni.$u.toast(errors[0].message);
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|