123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- {extend name="common/base"/}
- <!-- 主体 -->
- {block name="body"}
- <form class="layui-form p-4">
- <h3 class="pb-3">编辑造价项目</h3>
- <table class="layui-table layui-table-form">
- <tr>
- <td class="layui-td-gray-2">项目名称<font>*</font></td>
- <td>
- <input type="text" name="project_name" lay-verify="required" readonly lay-reqText="请完善项目名称" value="{$detail.project_name}" autocomplete="off" placeholder="请输入项目名称" class="layui-input">
- </td>
- <td class="layui-td-gray-2">项目编号<font>*</font></td>
- <td>
- <input type="text" name="project_num" lay-verify="required" readonly lay-reqText="请完善项目编号" value="{$detail.project_num}" autocomplete="off" placeholder="请输入项目编号" class="layui-input">
- </td>
- <td class="layui-td-gray-2">项目周期<font>*</font></td>
- <td id="date">
- <div class="layui-input-inline">
- <input type="text" id="start_time" name="project_start_time" readonly lay-verify="required" lay-reqText="请选择开始时间" placeholder="请选择" class="layui-input" value="{$detail.project_start_time|date='Y-m-d'}">
- </div>
- -
- <div class="layui-input-inline">
- <input type="text" id="end_time" name="project_end_time" readonly lay-verify="required" lay-reqText="请选择结束时间" placeholder="请选择" class="layui-input" value="{$detail.project_end_time|date='Y-m-d'}">
- </div>
- </td>
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray">作业负责人<font>*</font></td>
- <td>
- <input type="text" name="operate_name" placeholder="请选择项目负责人" readonly class="layui-input picker-one" value="{$operate_name}">
- <input type="hidden" name="operate_head" lay-verify="required" readonly lay-reqText="请选择项目负责人" value="{$detail.operate_head}">
- </td>
- <td class="layui-td-gray">作业成员<span style="color: red">*</span></td>
- <td colspan="3">
- <input type="text" id="team_admin_names" name="operate_team_names" placeholder="请选择项目成员" readonly class="layui-input picker-more" value="{$operate_team_names}">
- <input type="hidden" id="team_admin_ids" name="operate_team" class="layui-input" value="{$detail.operate_team}">
- </td>
- </tr>
- </table>
- <div class="py-3">
- <input type="hidden" name="id" value="{$detail.id}"/>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">保存</button>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="pass">分配</button>
- </div>
- </form>
- {/block}
- <!-- /主体 -->
- <!-- 脚本 -->
- {block name="script"}
- <script>
- var moduleInit = ['tool','employeepicker'];
- function gouguInit() {
- var form = layui.form, tool = layui.tool,employeepicker = layui.employeepicker;
- //日期选择
- layui.laydate.render({
- elem: '#laydate_plan_time' //指定元素
- });//日期选择
- layui.laydate.render({
- elem: '#laydate_due_time' //指定元素
- });
- let a = 1;
- //监听提交
- form.on('submit(webform)', function (data) {
- if(a){
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- a = 1
- }
- }
- tool.post("/admin/project.received/edit", data.field, callback);
- }
-
- a = 0
- return false;
- });
- form.on('submit(pass)', function (data) {
- if(a){
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- a = 1
- }
- }
- tool.post("/admin/project.received/pass", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|