|
@@ -0,0 +1,396 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
|
|
|
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
+ <title>标段概况-计量支付</title>
|
|
|
+ <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/wap/main.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/toast.css">
|
|
|
+ <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
|
|
|
+ <link rel="shortcut icon" href="/public/images/favicon.ico">
|
|
|
+ <style>
|
|
|
+ body {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="container">
|
|
|
+ <!--顶部-->
|
|
|
+ <nav class="fixed-top bg-dark">
|
|
|
+ <div class="my-2 d-flex justify-content-between">
|
|
|
+ <span class="text-white ml-3"><a href="/wap/tender/<%- tender.id %>" class="mr-2 text-white show-loading"><i class="fa fa-chevron-left"></i>工程变更</a></span>
|
|
|
+ <a tabindex="0" href="javascript:void(0)" class="text-white text-truncate text-center"
|
|
|
+ style="width:150px" data-toggle="popover" data-placement="top"
|
|
|
+ data-content="<%- tender.name %>" data-trigger="focus"><%- tender.name %></a>
|
|
|
+ <div class="mr-3">
|
|
|
+ <div class="dropdown">
|
|
|
+ <button class="btn btn-sm btn-light dropdown-toggle" type="button" data-toggle="dropdown">
|
|
|
+ <%- ctx.session.sessionUser.name.substr(ctx.session.sessionUser.name.length > 2 ? ctx.session.sessionUser.name.length - 2 : 0) %>
|
|
|
+ </button>
|
|
|
+ <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
|
|
+ <a class="dropdown-item" href="/wap/logout">退出登录</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </nav>
|
|
|
+ <!--标段概况-->
|
|
|
+ <div class="py-6">
|
|
|
+ <!--标签-->
|
|
|
+ <ul class="nav nav-tabs nav-fill">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link active" data-toggle="tab" href="#info" role="tab">变更信息</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" data-toggle="tab" href="#shenpi" role="tab">审批</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="tab-content">
|
|
|
+ <div class="tab-pane active" id="info">
|
|
|
+ <form>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>申请编号</label>
|
|
|
+ <input class="form-control form-control-sm" value="<%- change.code %>" type="text" readonly="">
|
|
|
+ </div>
|
|
|
+ <!--终审批复编号-->
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更令号(批复编号)</label>
|
|
|
+ <input class="form-control form-control-sm" type="text" value="<%- change.p_code %>" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>工程名称</label>
|
|
|
+ <input class="form-control form-control-sm" value="<%- change.name %>" type="text" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>桩号</label>
|
|
|
+ <input class="form-control form-control-sm" value="<%- change.peg %>" type="text" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>原设计图名称</label>
|
|
|
+ <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_name %>" readonly>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>原图号</label>
|
|
|
+ <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.org_code %>" readonly>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更设计图名称</label>
|
|
|
+ <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_name %>" readonly>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更图号</label>
|
|
|
+ <input class="form-control form-control-sm" placeholder="" type="text" value="<%- change.new_code %>" readonly>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label><b class="text-danger">* </b>工程变更理由及内容</label>
|
|
|
+ <textarea class="form-control form-control-sm" rows="6" readonly=""><%- change.content %></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>工程变更合同依据</label>
|
|
|
+ <textarea class="form-control form-control-sm" rows="6" readonly=""><%- change.basis %></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更工程量数量计算式</label>
|
|
|
+ <textarea class="form-control form-control-sm" rows="2" readonly=""><%- change.expr %></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>备注</label>
|
|
|
+ <textarea class="form-control form-control-sm" rows="3" readonly=""><%- change.memo %></textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更类型</label>
|
|
|
+ <div class="checkbox">
|
|
|
+ <% const changeType = change.type !== null && change.type !== '' ? change.type.split(',') : '' %>
|
|
|
+ <% for (const t in changeConst.type) { %>
|
|
|
+ <% const cType = changeConst.type[t] %>
|
|
|
+ <label class="checkbox-inline">
|
|
|
+ <% if (changeType.indexOf(cType.value.toString()) !== -1) { %>
|
|
|
+ <input value="<%- cType.value %>" type="checkbox" disabled checked><%- cType.name %>
|
|
|
+ <% } %>
|
|
|
+ </label>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更类别 </label>
|
|
|
+ <input class="form-control form-control-sm" value="<% for (const c in changeConst.class) { %><% const cClass = changeConst.class[c] %><% if (cClass.value === change.class) { %><%- cClass.name %><% } %><% } %>" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更性质 </label>
|
|
|
+ <input class="form-control form-control-sm" value="<% for (const q in changeConst.quality) { %><% const cQuality = changeConst.quality[q] %><% if (cQuality.value === change.quality) { %><%- cQuality.name %><% } %><% } %>" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>变更提出单位</label>
|
|
|
+ <input class="form-control form-control-sm" value="<%- change.company %>" readonly="">
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>费用承担方</label>
|
|
|
+ <div class="radio">
|
|
|
+ <% for (const c in changeConst.charge) { %>
|
|
|
+ <% const cCharge = changeConst.charge[c] %>
|
|
|
+ <label class="radio-inline">
|
|
|
+ <% if (cCharge.value === change.charge) { %>
|
|
|
+ <input value="<%- cCharge.value %>" type="radio" disabled checked> <%- cCharge.name %>
|
|
|
+ <% } %>
|
|
|
+ </label>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--除上报人,审批人填写-->
|
|
|
+ <!-- <div class="form-group">
|
|
|
+ <label>批复文号</label>
|
|
|
+ <input class="form-control form-control-sm" value="121212" type="text" ="">
|
|
|
+ </div> -->
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="tab-pane" id="shenpi">
|
|
|
+ <!--审批流程-->
|
|
|
+ <div class="card mt-3">
|
|
|
+ <ul class="list-group list-group-flush">
|
|
|
+ <% let checkingAudit = '' %>
|
|
|
+ <% for (const [index, audit] of auditList.entries()) { %>
|
|
|
+ <li class="list-group-item">
|
|
|
+ <% if (audit.usite === 0) { %>
|
|
|
+ <span class="<%- auditConst.auditStatusClass[audit.status] %> pull-right">
|
|
|
+ <% if (audit.status === auditConst.auditStatus.checking) { %>
|
|
|
+ 待上报
|
|
|
+ <% } else if (audit.status === auditConst.auditStatus.checked) { %>
|
|
|
+ <small><%- audit.sin_time.toLocaleDateString() %></small> 上报
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <h5 class="card-title">
|
|
|
+ <i class="fa fa-play-circle fa-rotate-90 <%- auditConst.auditStatusClass[audit.status] %>"></i> <%- audit.name %> <% if (audit.jobs !== '' || audit.jobs !== null) { %><small class="text-muted"><%- audit.jobs %></small><% } %>
|
|
|
+ </h5>
|
|
|
+ <% } else { %>
|
|
|
+ <% if (audit.status === auditConst.auditStatus.checking) { %>
|
|
|
+ <span class="pull-right">审批中</span>
|
|
|
+ <h5 class="card-title">
|
|
|
+ <i class="fa <% if (index !== auditList.length - 1) { %>fa-chevron-circle-down<% } else { %>fa-stop-circle<% } %>"></i> <%- audit.name %> <% if (audit.jobs !== '' || audit.jobs !== null) { %><small class="text-muted"><%- audit.jobs %></small><% } %>
|
|
|
+ </h5>
|
|
|
+ <% if (audit.uid === ctx.session.sessionUser.accountId) { %>
|
|
|
+ <% checkingAudit = audit; %>
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="text-center">
|
|
|
+ <button class="btn btn-success" data-toggle="modal" data-target="#sp-done" >审批通过</button>
|
|
|
+ <button class="btn btn-warning" data-toggle="modal" data-target="#sp-back" >审批退回</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <% } else if(audit.status === auditConst.auditStatus.uncheck) { %>
|
|
|
+ <h5 class="card-title"><i class="fa <% if (index !== auditList.length - 1) { %>fa-chevron-circle-down<% } else { %>fa-stop-circle<% } %>"></i> <%- audit.name %> <% if (audit.jobs !== '' || audit.jobs !== null) { %><small class="text-muted"><%- audit.jobs %></small><% } %></h5>
|
|
|
+ <% } else { %>
|
|
|
+ <span class="<%- auditConst.auditStatusClass[audit.status] %> pull-right">
|
|
|
+ <small><%- audit.sin_time.toLocaleDateString() %></small> <%- auditConst.auditStatusString[audit.status] %>
|
|
|
+ <% if (audit.status === auditConst.auditStatus.backnew) { %>
|
|
|
+ <%- auditGroupList[audit.usite-1].name %>
|
|
|
+ <% } else if (audit.status === auditConst.auditStatus.back) { %>
|
|
|
+ <%- auditGroupList[0].name %>
|
|
|
+ <% } %>
|
|
|
+ </span>
|
|
|
+ <h5 class="card-title"><i class="fa <% if (index !== auditList.length - 1) { %>fa-chevron-circle-down<% } else { %>fa-stop-circle<% } %> <%- auditConst.auditStatusClass[audit.status] %>"></i> <%- audit.name %> <% if (audit.jobs !== '' || audit.jobs !== null) { %><small class="text-muted"><%- audit.jobs %></small><% } %></h5>
|
|
|
+ <p class="card-text"><%- audit.sdesc %></p>
|
|
|
+ <% } %>
|
|
|
+ <% } %>
|
|
|
+ </li>
|
|
|
+ <% } %>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--底栏菜单-->
|
|
|
+ <nav class="fixed-bottom navbar-dark bg-light border-top">
|
|
|
+ <ul class="nav nav-fill my-2">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link text-muted show-loading" href="/wap/dashboard"><i class="fa fa-check-square-o"></i> 待审批</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link active show-loading" href="/wap/list"><i class="fa fa-list-ul"></i> 项目</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+</div>
|
|
|
+<% if (checkingAudit) { %>
|
|
|
+<!--审批通过弹窗-->
|
|
|
+<div class="modal" tabindex="-1" role="dialog" id="sp-done">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" action="/wap/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="success-approval">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批通过</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>审批意见</label>
|
|
|
+ <textarea class="form-control" rows="8" name="sdesc">同意</textarea>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <% if (checkingAudit.usort !== 0 && checkingAudit.uid === auditGroupList[auditGroupList.length-1].uid) { %>
|
|
|
+ <!--终审填写批复编号-->
|
|
|
+ <div class="form-group mt-3">
|
|
|
+ <label>变更令号(批复编号)</label>
|
|
|
+ <input class="form-control" value="<%= change.code %>" name="p_code" type="text">
|
|
|
+ </div>
|
|
|
+ <% } else { %>
|
|
|
+ <input type="hidden" name="audit_next_id" value="<%= auditGroupList[checkingAudit.usite+1].id %>">
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
|
|
+ <input type="hidden" name="status" value="<%- auditConst.auditStatus.checked %>">
|
|
|
+ <input type="hidden" name="w_code" value="<%- change.w_code %>">
|
|
|
+ <input type="hidden" name="change_id" value="<%- change.cid %>">
|
|
|
+ <input type="hidden" name="audit_id" value="<%= checkingAudit.id %>">
|
|
|
+ <button type="submit" class="btn btn-success approval-btn">审批通过</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!--审批退回弹窗-->
|
|
|
+<div class="modal" tabindex="-1" role="dialog" id="sp-back">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <form class="modal-content" action="/wap/change/approval?_csrf=<%= ctx.csrf %>" method="post" id="fail-approval">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">审批退回</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form-group">
|
|
|
+ <label>审批意见</label>
|
|
|
+ <textarea class="form-control" rows="8" name="sdesc">不同意</textarea>
|
|
|
+ </div>
|
|
|
+ <div class="alert alert-warning">
|
|
|
+ <div class="custom-control custom-radio custom-control-inline">
|
|
|
+ <input type="radio" name="status" id="change-back" value="<%- auditConst.auditStatus.back %>" class="custom-control-input" <% if (checkingAudit.usite === 1) { %>checked<% } %>>
|
|
|
+ <label class="custom-control-label" for="change-back">退回原报 <%- auditGroupList[0].name %></label>
|
|
|
+ </div>
|
|
|
+ <% if (checkingAudit.usite > 1) { %>
|
|
|
+ <div class="custom-control custom-radio custom-control-inline">
|
|
|
+ <input class="custom-control-input" type="radio" name="status" id="change-backnew" value="<%- auditConst.auditStatus.backnew %>" checked>
|
|
|
+ <label class="custom-control-label" for="change-backnew">退回上一审批人 <%- auditGroupList[checkingAudit.usite-1].name %></label>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
|
|
+ <input type="hidden" name="w_code" value="<%- change.w_code %>">
|
|
|
+ <input type="hidden" name="change_id" value="<%- change.cid %>">
|
|
|
+ <input type="hidden" name="audit_id" value="<%= checkingAudit.id %>">
|
|
|
+ <button type="submit" class="btn btn-warning approval-btn">确认退回</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<% } %>
|
|
|
+<script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
|
|
|
+<script src="/public/js/popper/popper.min.js"></script>
|
|
|
+<script src="/public/js/bootstrap/bootstrap.min.js"></script>
|
|
|
+<script src="/public/js/cookies.js"></script>
|
|
|
+<script src="/public/js/wap/global.js"></script>
|
|
|
+<script>
|
|
|
+ $(document).ready(function () {
|
|
|
+ if (window.location.hash && window.location.hash === '#shenpi') {
|
|
|
+ $('#info').removeClass('active');
|
|
|
+ $('.nav-item a[href="#info"]').removeClass('active');
|
|
|
+
|
|
|
+ $('#shenpi').addClass('active');
|
|
|
+ $('.nav-item a[href="#shenpi"]').addClass('active');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 审批提交与判断
|
|
|
+ $('.approval-btn').on('click', function () {
|
|
|
+ // 判断审批状态
|
|
|
+ let returnflag = true;
|
|
|
+ if ($(this).hasClass('btn-success')) {
|
|
|
+ const sdesc = $('#success-approval').find('textarea').val();
|
|
|
+ if (sdesc === '') {
|
|
|
+ toastr.error('审批意见不能为空!');
|
|
|
+ returnflag = false;
|
|
|
+ }
|
|
|
+ if ($('input[name="p_code"]').val() === '') {
|
|
|
+ toastr.error('变更令号(批复编号)不能为空!');
|
|
|
+ returnflag = false;
|
|
|
+ } else if ($('input[name="p_code"]').val() !== undefined) {
|
|
|
+ $('input[name="p_code"]').val($.trim($('input[name="p_code"]').val()));
|
|
|
+ const postData = {
|
|
|
+ p_code: $('input[name="p_code"]').val(),
|
|
|
+ };
|
|
|
+ postDataWithAsync('/tender/<%- tender.id %>/change/<%- change.cid %>/check/codeRepeat',postData, function (result) {
|
|
|
+ }, function (data) {
|
|
|
+ returnflag = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if(returnflag) {
|
|
|
+ $('input[name="w_code"]').val($.trim($('#w_code').val()));
|
|
|
+
|
|
|
+ $('#success-approval').find('textarea').val(sdesc.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '));
|
|
|
+ $('#success-approval').submit();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const sdesc = $('#fail-approval').find('textarea').val();
|
|
|
+ if (sdesc === '') {
|
|
|
+ toastr.error('审批意见不能为空!');
|
|
|
+ returnflag = false;
|
|
|
+ }
|
|
|
+ const type = $('#fail-approval').find('input[name="status"]:checked').val();
|
|
|
+ if (type === undefined) {
|
|
|
+ toastr.error('请选择退回类型!');
|
|
|
+ returnflag = false;
|
|
|
+ }
|
|
|
+ if(returnflag) {
|
|
|
+ $('#fail-approval').find('textarea').val(sdesc.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '));
|
|
|
+ $('input[name="w_code"]').val($.trim($('#w_code').val()));
|
|
|
+ $('#fail-approval').submit();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ const postDataWithAsync = function (url, data, successCallback, errorCallBack, showWaiting = true) {
|
|
|
+ if (showWaiting) showWaitingView();
|
|
|
+ $.ajax({
|
|
|
+ type:"POST",
|
|
|
+ url: url,
|
|
|
+ data: {'data': JSON.stringify(data)},
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ async: false,
|
|
|
+ timeout: 60000,
|
|
|
+ beforeSend: function(xhr) {
|
|
|
+ let csrfToken = Cookies.get('csrfToken');
|
|
|
+ xhr.setRequestHeader('x-csrf-token', csrfToken);
|
|
|
+ },
|
|
|
+ success: function(result){
|
|
|
+ if (result.err === 0) {
|
|
|
+ if (successCallback) {
|
|
|
+ successCallback(result.data);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ toastr.error(result.msg);
|
|
|
+ if (errorCallBack) {
|
|
|
+ errorCallBack(result.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (showWaiting) closeWaitingView();
|
|
|
+ },
|
|
|
+ error: function(jqXHR, textStatus, errorThrown){
|
|
|
+ toastr.error('error: ' + textStatus + " " + errorThrown);
|
|
|
+ if (errorCallBack) {
|
|
|
+ errorCallBack();
|
|
|
+ }
|
|
|
+ if (showWaiting) closeWaitingView();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|