12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- {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">送审单位</td>
- <td>
- <input type="text" name="sent_review_unit_name" value="" autocomplete="off" placeholder="送审单位"
- class="layui-input">
- </td>
- <td class="layui-td-gray-2">送审单位负责人</td>
- <td>
- <input type="text" name="sent_review_head_name" value="" autocomplete="off" placeholder="送审单位负责人"
- class="layui-input">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">送审单位负责人电话</td>
- <td>
- <input type="text" name="sent_review_phone" value="" autocomplete="off"
- placeholder="送审单位负责人电话"
- class="layui-input">
- </td>
- <td class="layui-td-gray-2">送审单位负责人邮箱</td>
- <td>
- <input type="text" name="sent_review_head_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/add_sent_review_unit", {data: data.field , type : 2 }, callback);
- }, function () {
- });
- } else if(e.code == 200) {
- tool.post("/admin/project.cost/add_sent_review_unit",{'data': data.field , 'type' :2 }, callback);
- }
- }
- let callback = function (e) {
- layer.msg(e.msg);
- console.log(e)
- parent.layui.userTable.reload();
- if (e.code == 0) {
- tool.tabRefresh(71);
- tool.sideClose(1000);
- b = 1
- }
- }
- tool.post("/admin/project.cost/add_sent_review_unit", {data:data.field , type : 1 }, calling);
- }
- b = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|