1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <div style="margin-top: 10px;" id="members-app">
- <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
- 编辑 - 会员
- </div>
- <el-form action="{{route('admin.member.update',array('id'=>$model->id))}}" method="post" id="form-create">
- <!-- 图片 -->
- <ui-input-text label="钱包地址:" disabled="disabled" value="{{ $model->address }}" maxlength="255" tips=""></ui-input-text>
- <ui-select label="会员等级:" value="{{$model->level_id.''}}" @set-keys="setLevel" id="level" name="level_id" placeholder=""
- :options="levelList" :free="true"></ui-select>
- <ui-submit></ui-submit>
- </el-form>
- </div>
- <script type="application/javascript">
- $(function () {
- // 注意:Vue组件一定放在jQuery.validator前面验证
- new Vue({
- el: '#members-app',
- data :function () {
- return {
- levelList:{!! $levelList !!}
- };
- }
- });
- jQuery.validator.setDefaults({
- debug: false, // 调试模式true不会提交,false允许提交
- success: "success", // 匹配成功的class样式名称
- errorElement: 'div' // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
- });
- // 前台数据验证 验证需要设置window.form全局变量
- window.form = $('#form-create').validate({
- rules: {
- image: {
- required: true,
- maxlength: 255,
- normalizer: function ( value ) {
- return $.trim(value);
- }
- },
- // link: {
- // required: true,
- // maxlength: 255,
- // normalizer: function ( value ) {
- // return $.trim(value);
- // }
- // },
- show: {
- required: true
- },
- sort: {
- required: true,
- normalizer: function ( value ) {
- return $.trim(value);
- }
- }
- }
- });
- // 编辑保存变量
- window.formDatum = $('form').serialize();
- });
- </script>
- @include('layouts.admin.form_script')
|