1 var editform = function () {
2 var self = this;
3 self.initialjointime = function () {
4 layui.use('laydate', function () {
5 var laydate = layui.laydate;
6 laydate.render({
7 elem: '#jointime'
8 });
9 });
10 }
11
12 self.initialtransfertime = function () {
13 layui.use('laydate', function () {
14 var laydate = layui.laydate;
15 laydate.render({
16 elem: '#transfertime'
17 });
18 });
19 }
20
21 self.initialformsubmit = function (param, callback) {
22 layui.use(["form"], function () {
23 layui.form.on("submit(submitedit)", function (data) {
24 $.ajax({
25 "contenttype": "application/json",
26 "datatype": "json",
27 "type": "post",
28 "url": urlconfig().submitpeopledata,
29 "data": json.stringify(param),
30 "success": function (response) {
31 if (response.responsecode === "200") {
32 layer.msg(response.message);
33 callback();
34 } else {
35 layer.alert(response.message);
36 }
37 }
38 });
39 return false;
40 });
41 });
42 }
43 }