| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- {extend name="public/base"/}
- {block name="css"}
- {/block}
- {block name="body"}
- <van-nav-bar
- class="nav-theme"
- :fixed="true"
- :placeholder="true"
- >
- <template #title>
- <span class="text-white">简历</span>
- </template>
- </van-nav-bar>
- <van-form @submit="onSubmit">
- <div class="lw-title">基础信息</div>
- <van-cell-group inset>
- <van-field
- v-model="form.name"
- required
- label="姓名"
- placeholder="请填写姓名"
- :rules="[{ required: true, message: '请填写姓名' }]"
- ></van-field>
- <van-field required name="gender" label="性别">
- <template #input>
- <van-radio-group v-model="form.gender" direction="horizontal">
- <van-radio :name="1">男</van-radio>
- <van-radio :name="2">女</van-radio>
- </van-radio-group>
- </template>
- </van-field>
- <van-field
- v-model="form.mobile"
- required
- label="手机号"
- placeholder="请填写手机号"
- :rules="[
- { required: true, message: '请填写手机号' },
- { validator, message: '请输入正确的手机号'}
- ]"
- ></van-field>
- <van-field
- v-model="form.idcard"
- label="身份证"
- placeholder="请填写身份证号"
- ></van-field>
- <van-field
- v-model="form.age"
- type="digit"
- required
- label="年龄"
- placeholder="请填写年龄"
- :rules="[{ required: true, message: '请填写年龄' }]"
- ></van-field>
- </van-cell-group>
- <div class="lw-title">求职信息</div>
- <van-cell-group inset>
- <van-field
- v-model="form.jobintention"
- label="求职意向"
- placeholder="请填写求职意向"
- ></van-field>
- <van-field
- v-model="form.address"
- label="地址"
- placeholder="请填写地址"
- ></van-field>
- <van-field
- v-model="form.education"
- label="学历"
- placeholder="请填写学历"
- ></van-field>
- <van-field
- v-model="form.comment"
- rows="2"
- autosize
- label="备注"
- type="textarea"
- maxlength="1000"
- placeholder="请输入备注"
- show-word-limit
- ></van-field>
- </van-cell-group>
- <div style="margin: 16px;">
- <van-button round block type="primary" native-type="submit">
- 提交
- </van-button>
- </div>
- </van-form>
- {/block}
- {block name="script"}
- <script>
- function v_setup() {
- let base = {};
- base.broker = {$broker};
- //表单
- base.form = Vue.reactive({
- name: '',
- mobile: '',
- gender: 1,
- idcard: '',
- age: '',
- jobintention: '',
- address: '',
- education: '',
- brokerid: base.broker.id,
- });
- base.onSubmit = () => {
- postJson("{:url('candidate/infoPost')}", base.form).then(({data}) => {
- vant.showDialog({
- title: '提示',
- message: '提交成功',
- }).then(() => {
- location.href = "{:url('/mobile/worker/index')}?id=" + base.broker.agentid;
- });
- });
- };
- //手机号验证
- base.validator = (val) => {
- return /^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(val);
- };
- return base;
- }
- </script>
- {/block}
|