add.html
7.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Vip_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-vip_id" data-rule="required" data-source="vip/index" data-field="title" class="form-control selectpage" name="row[vip_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
{foreach name="typeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Xi_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-xi_id" data-rule="required" data-source="user/index" data-field="nickname" class="form-control selectpage" name="row[xi_id]" type="text" value="" onfocus="set_next_input(this);">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Xi_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-xi_type" class="form-control selectpicker" name="row[xi_type]">
{foreach name="xiTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Xi_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-xi_images" class="form-control" size="50" name="row[xi_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-xi_images" class="btn btn-danger plupload" data-input-id="c-xi_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-xi_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-xi_images" class="btn btn-primary fachoose" data-input-id="c-xi_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-xi_images"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-xi_images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Zhao_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-zhao_id" data-rule="required" data-source="user/index" data-field="nickname" class="form-control selectpage" name="row[zhao_id]" type="text" value="" onfocus="set_next_input2(this);">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Zhao_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-zhao_type" class="form-control selectpicker" name="row[zhao_type]">
{foreach name="zhaoTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Zhao_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-zhao_images" class="form-control" size="50" name="row[zhao_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-zhao_images" class="btn btn-danger plupload" data-input-id="c-zhao_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-zhao_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-zhao_images" class="btn btn-primary fachoose" data-input-id="c-zhao_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-zhao_images"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-zhao_images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Car_address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-car_address" class="form-control" name="row[car_address]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-lat" class="form-control" name="row[lat]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-lng" class="form-control" name="row[lng]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Startime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-startime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[startime]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Endtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-endtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
function set_next_input(obj) {
//改变下面这个框的数据源
console.log('洗车');
$("#c-xi_id_text").data("selectPageObject").option.data = 'user/index?pid=1';
}
function set_next_input2(obj) {
//改变下面这个框的数据源
console.log('找车');
$("#c-zhao_id_text").data("selectPageObject").option.data = 'user/index?pid=2';
}
</script>