| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <div class="layui-fluid">
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12">
- <div class="layui-card">
- <div class="layui-card-header">订单信息</div>
- <div class="layui-card-body" pad15>
- <div class="layui-form layui-form-pane" lay-filter="LAY-worder-worderform-edit">
- <input type="hidden" name="id" value="{$worder.id}">
- <div class="layui-form-item">
- <label class="layui-form-label">分类</label>
- <div class="layui-input-block">
- <select name="cateid">
- {volist name="catelist" id="vo"}
- <option value="{$vo.id}" {$worder.cateid==$vo.id ? 'selected' : '' }>{$vo.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>劳务公司</label>
- <div class="layui-input-block">
- <select name="workerid" lay-search lay-verify="required">
- <option value="">请选择劳务公司(可搜索)...</option>
- {volist name="workerlist" id="vo"}
- <option value="{$vo.id}" {$worder.workerid==$vo.id ? 'selected' : '' }>{$vo.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>标题</label>
- <div class="layui-input-block">
- <input type="text" name="title" value="{$worder.title}" lay-verify="required" placeholder="请输入..."
- autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">标签</label>
- <div class="layui-input-block">
- <div class="tags" id="tags">
- <input type="text" name="" id="inputTags" placeholder="回车生成标签" autocomplete="off">
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">返佣政策</label>
- <div class="layui-input-block">
- <input type="text" name="otype" value="{$worder.otype}" placeholder="请输入...." autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>返佣价格</label>
- <div class="layui-input-block">
- <input type="text" name="wagall" value="{$worder.wagall}" lay-verify="required" placeholder="请输入...."
- autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">咨询电话</label>
- <div class="layui-input-block">
- <input type="text" name="telephone" value="{$worder.telephone}" placeholder="请输入..." autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item" id="LAY-worder-worderform-edit-areapicker">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>省市区</label>
- <div class="layui-input-inline">
- <select name="province" class="province-selector" data-value="{$worder.province}" lay-filter="province-2"
- lay-verify="required">
- <option value="">请选择省</option>
- </select>
- </div>
- <div class="layui-input-inline">
- <select name="city" class="city-selector" data-value="{$worder.city}" lay-filter="city-2" lay-verify="required">
- <option value="">请选择市</option>
- </select>
- </div>
- <div class="layui-input-inline">
- <select name="district" class="district-selector" data-value="{$worder.district}" lay-filter="district-2"
- lay-verify="required">
- <option value="">请选择区</option>
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">岗位介绍</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea" name="jobdetails" id="jobdetails" placeholder="请输入..." style="display: none" lay-verify="editcontent">
- {$worder.jobdetails}
- </textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">合作详情</label>
- <div class="layui-input-block">
- <textarea class="layui-textarea" name="coodetails" id="coodetails" placeholder="请输入..." style="display: none"
- lay-verify="editcontent">
- {$worder.coodetails}
- </textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">排序</label>
- <div class="layui-input-block">
- <input type="text" name="priority" value="{$worder.priority|default=0}" lay-verify="number" placeholder="请输入排序,倒序值越大越靠前。"
- autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item" pane>
- <label class="layui-form-label">状态</label>
- <div class="layui-input-block">
- <input type="radio" name="status" value="1" title="待修改" {eq name="worder.status|default=1" value="1"}checked{/eq}>
- <input type="radio" name="status" value="2" title="待审核" {eq name="worder.status" value="2"}checked{/eq}>
- <input type="radio" name="status" value="3" title="未通过" {eq name="worder.status" value="3"}checked{/eq}>
- <input type="radio" name="status" value="4" title="已上架" {eq name="worder.status" value="4"}checked{/eq}>
- <input type="radio" name="status" value="5" title="已下架" {eq name="worder.status" value="5"}checked{/eq}>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>更新时间</label>
- <div class="layui-input-block">
- <input type="text" name="updatetime" id="updatetime" value="{$worder.updatetime}" lay-verify="required"
- placeholder="请选择..." autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label"><span style="color:#f90c05;">*</span>创建时间</label>
- <div class="layui-input-block">
- <input type="text" name="createtime" id="createtime" value="{$worder.createtime}" lay-verify="required"
- placeholder="请选择..." autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">浏览量</label>
- <div class="layui-input-block">
- <input type="text" name="volume" value="{$worder.volume|default=0}" lay-verify="number" placeholder="请输入..."
- autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <input type="button" lay-submit lay-filter="LAY-worder-worderform-edit-submit" value="确认提交" class="layui-btn">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- layui.config({
- base: '/static/echoui/' //静态资源所在路径
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form', 'set', 'layedit', 'laydate', 'upload', 'inputTags', 'layarea'], function() {
- var $ = layui.$,
- setter = layui.setter,
- admin = layui.admin,
- layedit = layui.layedit,
- laydate = layui.laydate,
- form = layui.form,
- inputTags = layui.inputTags,
- upload = layui.upload,
- layarea = layui.layarea;
- form.render();
- inputTags.render({
- elem: '#inputTags',
- content: {:json_encode($worder.tags)} == null ? [] : {:json_encode($worder.tags)},
- aldaBtn: true,
- count: 6,
- done: function(value) {}
- });
- laydate.render({
- elem: '#updatetime',
- type: 'datetime'
- });
- laydate.render({
- elem: '#createtime',
- type: 'datetime'
- });
-
- layarea.render({
- elem: '#LAY-worder-worderform-edit-areapicker',
- data: {
- province: '福建省',
- city: '福州市',
- district: '马尾区',
- }
- });
- var jobdetails = layedit.build('jobdetails', {
- uploadImage: { url: setter.baseAdminUrl + 'attachment/tplfieldimage', type: 'post' }
- });
- var coodetails = layedit.build('coodetails', {
- uploadImage: { url: setter.baseAdminUrl + 'attachment/tplfieldimage', type: 'post' }
- });
- form.verify({
- editcontent: function(value) {
- layedit.sync(jobdetails);
- layedit.sync(coodetails);
- }
- });
- form.on('submit(LAY-worder-worderform-edit-submit)', function(obj) {
- var index = parent.layer.getFrameIndex(window.name);
- admin.req({
- url: setter.baseAdminUrl + 'worder/editworder',
- data: obj.field,
- type: 'post',
- done: function(res) {
- layer.msg("提交成功", {
- icon: 1
- });
- parent.layui.table.reload('LAY-worder-worderlist-table'); //重载表格
- parent.layer.close(index);
- }
- });
- });
-
- $('.echo-attachment-image-list').on('click', '.attachmentdel', function() {
- $(this).parent().remove();
- });
- upload.render({
- elem: '.attachment-upload-images',
- url: setter.baseAdminUrl + 'attachment/tplfieldimage',
- accept: 'images',
- exits: 'jpg|png|jpeg',
- acceptMime: 'image/*',
- size: 2048,
- number: 1,
- method: 'post',
- before: function(obj) {
- var item = this.item;
- upload_input = $(item).data('input');
- upload_amount = $(item).data('amount');
- layer.load();
- },
- done: function(res, index, upload) {
- layer.closeAll('loading');
- var html = "";
- if (upload_amount == 1) {
- html += '<div> <input type="hidden" name="' + upload_input + '" value="' + res.data.src + '"> ';
- html += '<img src="' + res.data.src + '"></div>';
- $("#" + upload_input).html(html);
- } else {
- html += '<div> <input type="hidden" name="' + upload_input + '[]" value="' + res.data.src + '"> ';
- html += '<img src="' + res.data.src +
- '"> <button type="button" class="attachmentdel layui-btn layui-btn-primary layui-btn-xs layui-btn-fluid">删除</button></div>';
- $("#" + upload_input).append(html);
- }
- },
- error: function(index, upload) {
- layer.closeAll('loading');
- }
- });
- });
- </script>
|