123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- {extend name="common/base"/}
- <!-- 主体 -->
- {block name="body"}
- <form class="layui-form p-4">
- <div style="display:flex;align-items: baseline;">
- <h3 class="pb-3">添加施工单位</h3>
- <p style="padding-left:3vw;">
- 提醒<font style="color: red !important;">*</font>:仅限本单位用户可查看此联系信息(非公开)
- </p>
- </div>
-
- <table class="layui-table layui-table-form">
- <tr>
- <td class="layui-td-gray-2">施工单位</td>
- <td>
- <input type="text" name="construction_unit" value="" autocomplete="off" placeholder="施工单位"
- class="layui-input">
- </td>
- <td class="layui-td-gray-2">施工单位负责人</td>
- <td>
- <input type="text" name="construction_head" value="" autocomplete="off" placeholder="施工单位负责人"
- class="layui-input">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">施工单位负责人电话</td>
- <td>
- <input type="text" name="construction_phone" value="" autocomplete="off"
- placeholder="施工单位负责人电话"
- class="layui-input">
- </td>
- <td class="layui-td-gray-2">施工单位负责人邮箱</td>
- <td>
- <input type="text" name="construction_email" value="" autocomplete="off"
- placeholder="施工单位负责人邮箱" class="layui-input">
- </td>
- </tr>
- </table>
- <div class="pt-3">
- <input type="hidden" name="id" value="{$project_id}"/>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
- <button type="reset" class="layui-btn layui-btn-primary">重置</button>
- </div>
- </form>
- {/block}
- <!-- /主体 -->
- <!-- 脚本 -->
- {block name="script"}
- <script>
- const moduleInit = ['tool', 'tagpicker', 'tinymce', 'oaTool'];
- function gouguInit() {
- var form = layui.form, tool = layui.tool, oaTool = layui.oaTool;
- let b = 1;
- //监听提交
- form.on('submit(webform)', function (data) {
- if(b){
- let calling = function (e) {
-
- if (e.code == 0) {
- layer.confirm('已经存在施工单位人员,是否替换?', {
- btn: ['确定', '取消'] //按钮
- }, function () {
- tool.post("/admin/project.cost/addconstructionpeople", {data: data.field , type : 2 }, callback);
- }, function () {
- });
- } else if(e.code == 200) {
- tool.post("/admin/project.cost/addconstructionpeople",{'data': data.field , 'type' :2 }, callback);
- }
- }
- let callback = function (e) {
- layer.msg(e.msg);
- parent.layui.userTable.reload();
- if (e.code == 0) {
- tool.tabRefresh(71);
- tool.sideClose(1000);
- b = 1
- }
- }
- tool.post("/admin/project.cost/addconstructionpeople", {data:data.field , type : 1 }, calling);
- }
- b = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|