edit.blade.php 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <div style="margin-top: 10px;" id="invests-app">
  2. <div style="text-align: center;margin-top: 5px;margin-bottom: 10px;font-size: 20px;">
  3. 编辑 - 投资金额
  4. </div>
  5. <el-form action="{{route('admin.invest.update',array('id'=>$model->id))}}" method="post" id="form-create">
  6. <!-- 图片 -->
  7. <!-- 链接 -->
  8. <ui-input-text label="投资名称" name="title" value="{{$model->title}}" placeholder="投资名称" maxlength="255" tips="请输入投资名称" autofocus="true"></ui-input-text>
  9. <ui-input-float-number :max="9999999" label="投资金额" name="invest_money" value="{{$model->invest_money}}" placeholder="投资金额" maxlength="255" tips="请输入投资金额" autofocus="true" :precision="4"></ui-input-float-number>
  10. <!-- 是否显示 -->
  11. <ui-input-float-number :max="9999999" label="平台收益" name="platform_money" value="{{$model->platform_money}}" placeholder="平台收益" maxlength="255" tips="请输入平台收益" autofocus="true" :precision="4"></ui-input-float-number>
  12. <ui-input-float-number :max="9999999" label="直推收益" name="direct_proportion" value="{{$model->direct_proportion}}" placeholder="直推收益" maxlength="255" tips="请输入直推收益(%)" autofocus="true" :precision="2"></ui-input-float-number>
  13. <ui-input-float-number :max="9999999" label="间推收益" name="indirect_proportion" value="{{$model->indirect_proportion}}" placeholder="间推收益" maxlength="255" tips="请输入间推收益(%)" :precision="2" autofocus="true"></ui-input-float-number>
  14. <ui-input-float-number :max="9999999" label="团队收益" name="team_proportion" value="{{$model->team_proportion}}" placeholder="团队收益" maxlength="255" tips="请输入团队收益(%)" :precision="2" autofocus="true"></ui-input-float-number>
  15. <ui-input-float-number :max="9999999" label="公排比例" name="common_proportion" value="{{$model->common_proportion}}" placeholder="公排比例" maxlength="255" tips="请输入公排比例(%)" :precision="2" autofocus="true"></ui-input-float-number>
  16. <ui-input-float-number :max="9999999" label="沉淀比例" name="sediment_proportion" value="{{$model->sediment_proportion}}" placeholder="沉淀比例" maxlength="255" tips="请输入沉淀比例(%)" :precision="2" autofocus="true"></ui-input-float-number>
  17. <ui-input-float-number :max="9999999" label="代币比例" name="agency_proportion" value="{{$model->agency_proportion}}" placeholder="代币比例" maxlength="255" tips="请输入代币比例(%)" :precision="2" autofocus="true"></ui-input-float-number>
  18. <ui-submit></ui-submit>
  19. </el-form>
  20. </div>
  21. <script type="application/javascript">
  22. $(function () {
  23. // 注意:Vue组件一定放在jQuery.validator前面验证
  24. new Vue({
  25. el: '#invests-app',
  26. data :function () {
  27. return {
  28. };
  29. }
  30. });
  31. jQuery.validator.setDefaults({
  32. debug: false, // 调试模式true不会提交,false允许提交
  33. success: "success", // 匹配成功的class样式名称
  34. errorElement: 'div' // 兼容el标签时使用(兼容el Vue组件label.error标签问题)
  35. });
  36. // 前台数据验证 验证需要设置window.form全局变量
  37. window.form = $('#form-create').validate({
  38. rules: {
  39. image: {
  40. required: true,
  41. maxlength: 255,
  42. normalizer: function ( value ) {
  43. return $.trim(value);
  44. }
  45. },
  46. // link: {
  47. // required: true,
  48. // maxlength: 255,
  49. // normalizer: function ( value ) {
  50. // return $.trim(value);
  51. // }
  52. // },
  53. show: {
  54. required: true
  55. },
  56. sort: {
  57. required: true,
  58. normalizer: function ( value ) {
  59. return $.trim(value);
  60. }
  61. }
  62. }
  63. });
  64. // 编辑保存变量
  65. window.formDatum = $('form').serialize();
  66. });
  67. </script>
  68. @include('layouts.admin.form_script')