1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <input type="hidden" name="id" id="id" value="{% if 'info' in data and data['info'] and 'id' in data['info'] and data['info']['id'] > 0 %}{{data['info']['id']}}{% end %}" />
- <div class="block">
- <label><span>劳作时间</span><input type="text" name="update_workdate" id="update_workdate" readonly value="{% if 'info' in data and data['info'] and 'workdate' in data['info'] and data['info']['workdate'] %}{{data['info']['workdate']}}{% end %}" /></label>
- <label><span>劳作类别</span>
- <select name="update_category_id" id="update_category_id" onchange="selectShow($(this), 'method_id')">
- {% for v in data['category'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'category_id' in data['info'] and data['info']['category_id'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- </label>
- <label><span>劳作方式</span>
- <select name="update_method_id" id="update_method_id" >
- <option value="0">请选择劳作方式</option>
- {% for v in data['method'] %}
- <option parent="{{v['category_id']}}" name="{{v['name']}}" value="{{v['id']}}" {% if 'info' in data and data['info'] and 'method_id' in data['info'] and data['info']['method_id'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- </label>
- <label><span>劳作用量</span><input type="text" name="update_amount" id="update_amount" value="{% if 'info' in data and data['info'] and 'amount' in data['info'] and data['info']['amount'] %}{{data['info']['amount']}}{% end %}" placeholder="如:60亩" /></label>
- <label><span>劳作地块</span>
- <select name="update_land_id" id="update_land_id" >
- {% for v in data['land'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'land_id' in data['info'] and data['info']['land_id'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- </label>
- <div class="form-group">
- <span>劳作图像</span>
- <div class="imgbox">
- <a class="upimg img500x500" ><img src="{% if 'info' in data and data['info'] and 'pic' in data['info'] and data['info']['pic'] %}{{data['info']['pic']}}{% else %}data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQB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A8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+eEhyRgAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=" {% end %}" width="100%" height="100%" id="upload_pic_show" /><i>500*500</i></a><a class="button">选择<input type="file" class="upload" name="file" id="pic"/><input type="hidden" id="update_pic" name="update_pic" value="{% if 'info' in data and data['info'] and 'pic' in data['info'] and data['info']['pic'] %}{{data['info']['pic']}}{% end %}"/></a>
- </div>
- </div>
- </div>
- <script>
- Farm.Upload('#pic');
- layui.use('laydate', function() {
- var laydate = layui.laydate;
- var dateTheme = '#247ed0';
- laydate.render({
- elem: '#update_workdate'
- ,theme: dateTheme
- ,max: 0
- ,type: 'datetime'
- });
- selectShow($('#update_category_id'), 'method_id')
- });
- </script>
|