app/views/educode_sales/customers/new.html.erb in educode_sales-0.6.1 vs app/views/educode_sales/customers/new.html.erb in educode_sales-0.6.2
- old
+ new
@@ -1,19 +1,35 @@
-<form class="layui-form " action="">
+<form class="layui-form layuimini-form" action="">
<div class="layui-form-item" style="padding: 25px">
<div class="layui-inline">
<label class="layui-form-label required">学校:</label>
<div class="layui-input-block">
- <input type="text" name="name" required lay-verify="required" placeholder="请输入学校" autocomplete="off"
+ <input type="text" name="name" lay-verify="required" placeholder="请输入学校" autocomplete="off"
class="layui-input" id="inputFocus">
</div>
</div>
<br>
<div class="layui-inline">
- <label class="layui-form-label required">地址:</label>
+ <label class="layui-form-label required">省:</label>
<div class="layui-input-block">
- <input type="text" name="address" required lay-verify="required" autocomplete="off"
+ <input type="text" name="province" lay-verify="required" autocomplete="off"
+ class="layui-input" placeholder="请输入省" >
+ </div>
+ </div>
+ <br>
+ <div class="layui-inline">
+ <label class="layui-form-label ">市:</label>
+ <div class="layui-input-block">
+ <input type="text" name="city" autocomplete="off"
+ class="layui-input" placeholder="请输入市" >
+ </div>
+ </div>
+ <br>
+ <div class="layui-inline">
+ <label class="layui-form-label ">地址:</label>
+ <div class="layui-input-block">
+ <input type="text" name="address" autocomplete="off"
class="layui-input" placeholder="请输入地址" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">学校性质:</label>
@@ -64,26 +80,17 @@
//监听提交
form.on('submit(data-reset-btn)', function (data) {
console.log(data.field);
- // var area_ids = []
- // layui.each(transfer.getData('area_list'), function (i, v) {
- // area_ids.push(v.value)
- // })
- // if (area_ids.length === 0) {
- // layer.alert("请选择负责区域");
- // return false;
- // }
- // data.field['area_ids'] = area_ids;
- // request.authPost("missions/places", data.field, function (res) {
- // if (res.success === false) {
- // layer.alert(res.msg)
- // } else {
- // layer.closeAll(); //关闭所有层
- // table.reload('place')
- // }
- // })
+ request.authPost("missions/customers", data.field, function (res) {
+ if (res.success === false) {
+ layer.alert(res.msg)
+ } else {
+ layer.closeAll(); //关闭所有层
+ parent.table.reload('customers_table')
+ }
+ })
return false;
});
});
</script>
\ No newline at end of file