| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800 | 
							- <link rel="stylesheet" type="text/css" href="/public/css/datatable/dataTables.bootstrap4.min.css">
 
- <link rel="stylesheet" type="text/css" href="/public/css/datatable/fixedColumns.bootstrap4.min.css">
 
- <style type="text/css" class="init">
 
-     #tablist li .active {
 
-         background: #e4e7ea;
 
-         font-weight: 600;
 
-     }
 
-     .qd-table .input-sm{
 
-         height:30px;
 
-         padding:2px;
 
-     }
 
-     .qd-table>tbody>tr>td, .qd-table>tbody>tr>th, .qd-table>tfoot>tr>td, .qd-table>tfoot>tr>th, .qd-table>thead>tr>td, .qd-table>thead>tr>th {
 
-         padding:5px 2px
 
-     }
 
-     #list td input{
 
-         width: 100%;
 
-         font-size: 0.9rem;
 
-     }
 
-     #list td select{
 
-         width: 100%;
 
-         font-size: 0.9rem;
 
-         vertical-align: middle;
 
-         line-height: 30px;
 
-     }
 
-     #list td a {
 
-         cursor: pointer;
 
-     }
 
-     .allwidth1{
 
-     }
 
-     .allwidth2{
 
-     }
 
-     .allwidth3{
 
-         text-align:right;
 
-     }
 
-     .allwidth3 input{
 
-         text-align:right;
 
-     }
 
-     .allwidth5{
 
-         text-align:center;
 
-     }
 
-     .allwidth4{
 
-         text-align:center;
 
-     }
 
-     div.DTFC_LeftFootWrapper table, div.DTFC_RightFootWrapper table{
 
-         border-top: 1px solid #ddd;
 
-     }
 
-     div.dataTables_scrollFootInner table{
 
-         margin-top: 1px !important;
 
-     }
 
-     table.dataTable{
 
-         border-collapse: collapse !important;
 
-     }
 
-     table.table-bordered.dataTable tbody th, table.table-bordered.dataTable tbody td{
 
-         border-bottom-width: 1px;
 
-     }
 
-     div.dataTables_scrollFootInner table{
 
-         margin-top: 0 !important;
 
-     }
 
-     .bg-con-warp:nth-child(2) th{
 
-         text-align: center !important;
 
-     }
 
-     .change-title {
 
-         font-size: 16px;
 
-         margin: 0;
 
-         height: 50px;
 
-         line-height: 50px;
 
-         display: block;
 
-     }
 
- </style>
 
- <div class="panel-sidebar">
 
-     <div class="panel-title">
 
-         <div class="title-bar">
 
-             <h2 class="text-truncate" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis;" data-toggle="tooltip" data-placement="right" title=""  data-original-title="<%- tender.name %>"><%- tender.name %></h2>
 
-         </div>
 
-     </div>
 
-     <div class="scrollbar-auto">
 
-         <div class="nav-box">
 
-             <ul class="nav-list list-unstyled">
 
-                 <li class=""><a href="/tender/<%- tender.id %>/change"><i class="fa fa-chevron-left "></i> <span>返回</span></a></li>
 
-             </ul>
 
-         </div>
 
-         <div class="nav-box">
 
-             <ul class="nav nav-tab nav-list list-unstyled" role="tablist" id="tablist" style="display: block">
 
-                 <li style="margin-bottom: 1rem;"><a href="#info" class="active" aria-controls="info" data-toggle="tab"><span class="ml-3">变更信息</span></a></li>
 
-                 <li style="margin-bottom: 1rem;"><a href="#bills" aria-controls="bills" data-toggle="tab"><span class="ml-3">变更清单</span></a></li>
 
-                 <li><a href="#files" aria-controls="files" data-toggle="tab"><span class="ml-3">附件</span></a></li>
 
-             </ul>
 
-         </div>
 
-         <div class="contarl-box">
 
-             <!--info状态区分-->
 
-             <% if (auditStatus === 1) { %>
 
-                 <a href="#sub-ap" data-category="up_change" data-toggle="modal" data-target="#sub-ap" class="btn btn-primary btn-sm btn-block">上报审批</a>
 
-             <% } else if (auditStatus === 2) { %>
 
-                 <a href="#sub-sp2" data-category="up_change" data-toggle="modal" data-target="#sub-sp2" class="btn btn-primary btn-sm btn-block">重新上报</a>
 
-             <% } else if (auditStatus === 3) { %>
 
-                 <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm btn-block text-muted">审批退回</a>
 
-             <% } else if (auditStatus === 4) { %>
 
-                 <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-success btn-sm  btn-block">审批完成</a>
 
-             <% } else if (auditStatus === 5) { %>
 
-                 <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-danger btn-sm  btn-block">审批终止</a>
 
-             <% } else if (auditStatus === 6) { %>
 
-                 <a href="#sp-done" data-toggle="modal" data-target="#sp-done" class="btn btn-success btn-sm btn-block">审批通过</a>
 
-                 <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm btn-block">审批退回</a>
 
-             <% } else if (auditStatus === 7) { %>
 
-                 <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm btn-block">审批中</a>
 
-             <% } %>
 
-         </div>
 
-     </div>
 
- </div>
 
- <div class="panel-content">
 
-     <div class="panel-title">
 
-         <div class="title-main d-flex justify-content-between">
 
-             <h2 id="info_title" class="show_title">变更信息</h2>
 
-             <div id="bills_title" class="show_title" style="display: none">
 
-                 <div>
 
-                     <% if (auditStatus === 1 || auditStatus === 2) { %>
 
-                     <div class="d-inline-block">
 
-                         <a href="#addlist" data-toggle="modal" class="btn btn-sm btn-light text-primary" id="open-list-modal" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单"><i class="fa fa-plus" aria-hidden="true"></i> 添加台帐清单</a>
 
-                     </div>
 
-                     <div class="d-inline-block">
 
-                         <a href="javascript:void(0);" class="btn btn-sm btn-light text-primary" id="add-white-btn" data-original-title="添加清单"><i class="fa fa-plus" aria-hidden="true"></i> 添加空白清单</a>
 
-                     </div>
 
-                     <% } else { %>
 
-                     <div class="d-inline-block">
 
-                         <h2 class="change-title">变更清单</h2>
 
-                     </div>
 
-                     <% } %>
 
-                     <div class="d-inline-block ml-3">
 
-                         <div class="custom-control custom-checkbox" style="line-height: normal;">
 
-                             <input type="checkbox" class="custom-control-input change-detail-checkbox" id="customCheck1" checked>
 
-                             <label class="custom-control-label" for="customCheck1">变更详情</label>
 
-                         </div>
 
-                     </div>
 
-                     <% if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
 
-                     <div class="d-inline-block ml-3">
 
-                         <div class="custom-control custom-checkbox" style="line-height: normal;">
 
-                             <input type="checkbox" class="custom-control-input" id="show-table-detail">
 
-                             <label class="custom-control-label" for="show-table-detail">审批过程</label>
 
-                         </div>
 
-                     </div>
 
-                     <% } %>
 
-                 </div>
 
-             </div>
 
-             <div id="files_title" class="show_title" style="display: none">
 
-                 <% if (auditStatus === 1 || auditStatus === 2 || auditStatus === 6) { %>
 
-                 <a href="#addfujian" data-toggle="modal" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加清单">
 
-                     <i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件
 
-                 </a>
 
-                 <% } else { %>
 
-                 <h2 class="change-title">附件</h2>
 
-                 <% } %>
 
-             </div>
 
-             <input id="tenderId" value="<%= tender.id %>" type="hidden">
 
-             <input id="changeId" value="<%= change.cid %>" type="hidden">
 
-             <!--info状态区分-->
 
-             <% if (auditStatus === 1 || auditStatus === 2) { %>
 
-             <div>
 
-                 <button class="btn btn-sm btn-success pull-right" id="save_change"><i class="fa fa-save"></i> 保存修改</button>
 
-             </div>
 
-             <% } %>
 
-         </div>
 
-     </div>
 
-     <div class="content-wrap tab-content">
 
-         <div class="c-body tab-pane active" role="tabpanel" id="info">
 
-             <!--变更信息-->
 
-             <% if (auditStatus === 1 || auditStatus === 2) { %>
 
-             <form action="/change/save?_csrf=<%= ctx.csrf %>" method="post" id="change_form">
 
-                 <div class="row">
 
-                     <div class="col-md-4">
 
-                         <div class="form-group">
 
-                             <label><b class="text-danger">* </b>申请编号</label>
 
-                             <a href="javascript:void(0);" class="pull-right reduction-code" data-toggle="tooltip" data-placement="bottom" title="" data-code="<%- change.code %>" data-original-title="重置"><i class="fa fa-repeat"></i></a>
 
-                             <input class="form-control" name="code" value="<%- change.code %>" type="text">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label><b class="text-danger">* </b>工程名称</label>
 
-                             <input class="form-control" name="name" value="<%- change.name %>" type="text">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>桩号</label>
 
-                             <input class="form-control" name="peg" value="<%- change.peg %>" type="text">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>原设计图名称</label>
 
-                             <input class="form-control" name="org_name" placeholder="" type="text" value="<%- change.org_name %>">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>原图号</label>
 
-                             <input class="form-control" name="org_code" placeholder="" type="text" value="<%- change.org_code %>">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更设计图名称</label>
 
-                             <input class="form-control" name="new_name" placeholder="" type="text" value="<%- change.new_name %>">
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更图号</label>
 
-                             <input class="form-control" name="new_code" placeholder="" type="text" value="<%- change.new_code %>">
 
-                         </div>
 
-                     </div>
 
-                     <div class="col-md-4" style="z-index:999">
 
-                         <div class="form-group">
 
-                             <label><b class="text-danger">* </b>工程变更理由及内容</label>
 
-                             <textarea class="form-control" name="content" rows="6"><%- change.content %></textarea>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>工程变更合同依据</label>
 
-                             <textarea class="form-control" name="basis" rows="6"><%- change.basis %></textarea>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>备注</label>
 
-                             <textarea class="form-control" name="memo" rows="3"><%- change.memo %></textarea>
 
-                         </div>
 
-                     </div>
 
-                     <div class="col-md-4">
 
-                         <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">
 
-                                     <input value="<%- cType.value %>" name="type[]"
 
-                                            type="checkbox"<% if (changeType.indexOf(cType.value.toString()) !== -1) { %> checked<% } %>><%- cType.name %>
 
-                                 </label>
 
-                                 <% } %>
 
-                             </div>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更类别 </label>
 
-                             <select class="form-control" name="class">
 
-                                 <% for (const c in changeConst.class) { %>
 
-                                 <% const cClass = changeConst.class[c] %>
 
-                                 <option value="<%- cClass.value %>"<% if (cClass.value === change.class) { %> selected<% } %>><%- cClass.name %></option>
 
-                                 <% } %>
 
-                             </select>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更性质 </label>
 
-                             <select class="form-control" name="quality">
 
-                                 <% for (const q in changeConst.quality) { %>
 
-                                 <% const cQuality = changeConst.quality[q] %>
 
-                                 <option value="<%- cQuality.value %>"<% if (cQuality.value === change.quality) { %> selected<% } %>><%- cQuality.name %></option>
 
-                                 <% } %>
 
-                             </select>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更提出单位</label>
 
-                             <a href="#editcompany" style="float:right;" class="" data-toggle="modal">编辑</a>
 
-                             <select class="form-control" id="company" name="company">
 
-                                 <% for (const company of companyList) { %>
 
-                                 <option <% if (company.name === change.company) { %>selected<% } %>><%- company.name %></option>
 
-                                 <% } %>
 
-                             </select>
 
-                         </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">
 
-                                     <input value="<%- cCharge.value %>" name="charge" type="radio"<% if (cCharge.value === change.charge) { %> checked<% } %>> <%- cCharge.name %>
 
-                                 </label>
 
-                                 <% } %>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <!--清单、附件、审批人上传数据-->
 
-                 <input type="hidden" name="changelist" id="change-list" value="<%= changeListData %>">
 
-                 <input type="hidden" name="changewhitelist" id="change-whitelist" value="<%= changeWhiteListData %>">
 
-                 <input type="hidden" name="changeaudit" id="changeaudit" value="">
 
-                 <input type="hidden" name="changestatus" id="changeStatus">
 
-                 <input type="hidden" name="cid" value="<%= change.cid %>">
 
-             </form>
 
-             <% } else { %>
 
-             <div class="row">
 
-                 <div class="col-md-4">
 
-                     <form>
 
-                         <div class="form-group">
 
-                             <label>申请编号</label>
 
-                             <input class="form-control" value="<%- change.code %>" type="text" readonly>
 
-                         </div>
 
-                         <% if (auditStatus === 4) { %>
 
-                         <div class="form-group">
 
-                             <label>变更令号(批复编号)</label>
 
-                             <input class="form-control" value="<%- change.p_code %>" type="text" readonly>
 
-                         </div>
 
-                         <% } %>
 
-                         <div class="form-group">
 
-                             <label>工程名称</label>
 
-                             <input class="form-control" value="<%- change.name %>" type="text" readonly>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>桩号</label>
 
-                             <input class="form-control" value="<%- change.peg %>" type="text" readonly>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>原设计图名称</label>
 
-                             <input class="form-control" placeholder="" type="text" value="<%- change.org_name %>" readonly>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>原图号</label>
 
-                             <input class="form-control" placeholder="" type="text" value="<%- change.org_code %>" readonly>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更设计图名称</label>
 
-                             <input class="form-control" placeholder="" type="text" value="<%- change.new_name %>" readonly>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更图号</label>
 
-                             <input class="form-control" placeholder="" type="text" value="<%- change.new_code %>" readonly>
 
-                         </div>
 
-                     </form>
 
-                 </div>
 
-                 <div class="col-md-4" style="z-index:999">
 
-                     <form>
 
-                         <div class="form-group">
 
-                             <label>工程变更理由及内容</label>
 
-                             <textarea class="form-control" rows="6" readonly><%- change.content %></textarea>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>工程变更合同依据</label>
 
-                             <textarea class="form-control" rows="6" readonly><%- change.basis %></textarea>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>备注</label>
 
-                             <textarea class="form-control" rows="3" readonly><%- change.memo %></textarea>
 
-                         </div>
 
-                     </form>
 
-                 </div>
 
-                 <div class="col-md-4">
 
-                     <form>
 
-                         <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>
 
-                             <select class="form-control" disabled>
 
-                                 <% for (const c in changeConst.class) { %>
 
-                                 <% const cClass = changeConst.class[c] %>
 
-                                 <% if (cClass.value === change.class) { %>
 
-                                 <option value="<%- cClass.value %>"><%- cClass.name %></option>
 
-                                 <% } %>
 
-                                 <% } %>
 
-                             </select>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更性质 </label>
 
-                             <select class="form-control" disabled>
 
-                                 <% for (const q in changeConst.quality) { %>
 
-                                 <% const cQuality = changeConst.quality[q] %>
 
-                                 <% if (cQuality.value === change.quality) { %>
 
-                                 <option value="<%- cQuality.value %>"><%- cQuality.name %></option>
 
-                                 <% } %>
 
-                                 <% } %>
 
-                             </select>
 
-                         </div>
 
-                         <div class="form-group">
 
-                             <label>变更提出单位</label>
 
-                             <select class="form-control" disabled>
 
-                                 <option><%- change.company %></option>
 
-                             </select>
 
-                         </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" id="w_code" placeholder="" type="text" value="<%- change.w_code %>" <% if (auditStatus !== 6) { %>readonly<% } %>>
 
-                         </div>
 
-                     </form>
 
-                 </div>
 
-             </div>
 
-             <% } %>
 
-         </div>
 
-         <div class="c-body tab-pane first-bill-pane" role="tabpanel" id="bills">
 
-             <!--变更清单-->
 
-             <% if (auditStatus === 1 || auditStatus === 2) { %>
 
-             <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
 
-                 <thead>
 
-                 <tr>
 
-                     <th rowspan="2" class="text-center">清单编号</th>
 
-                     <th rowspan="2" class="text-center">名称</th>
 
-                     <th rowspan="2" class="text-center">变更部位</th>
 
-                     <th rowspan="2" class="text-center">变更详情</th>
 
-                     <th rowspan="2" class="text-center">单位</th>
 
-                     <th rowspan="2" class="text-center">单价</th>
 
-                     <th colspan="2" class="text-center">原设计</th>
 
-                     <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
 
-                     <th rowspan="2" class="text-center">操作</th>
 
-                 </tr>
 
-                 <tr>
 
-                     <th class="text-center">数量</th>
 
-                     <th class="text-center">金额</th>
 
-                     <th class="text-center">数量</th>
 
-                     <th class="text-center">金额</th>
 
-                 </tr>
 
-                 </thead>
 
-                 <tbody id="list">
 
-                 <% let windex = 0; %>
 
-                 <% for (const [index,cl] of changeList.entries()) { %>
 
-                     <% if (cl.lid !== 0) { %>
 
-                     <tr class="clist clid" data-lid="<%= cl.lid %>_<%= index %>" data-index="<%= index %>">
 
-                         <td data-site="0"><%= cl.code %></td>
 
-                         <td data-site="1"><%= cl.name %></td>
 
-                         <td data-site="2"><%= cl.bwmx %></td>
 
-                         <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
 
-                         <td data-site="4"><%= cl.unit %></td>
 
-                         <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, tpUnit) %></td>
 
-                         <td data-site="6"><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                         <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
 
-                         <td data-site="8"><input class="form-control form-control-sm" placeholder="变更数量" type="text" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)"  value="<%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %>"></td>
 
-                         <td data-site="9"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
 
-                         <td><a class="text-danger">移除</a>
 
-                         </td>
 
-                     </tr>
 
-                     <% } else { %>
 
-                     <tr class="clist" data-lid="<%= windex %>" data-index="<%= windex %>">
 
-                         <td data-site="0"><input class="form-control form-control-sm" placeholder="清单编号" type="text" value="<%= cl.code %>"></td>
 
-                         <td data-site="1"><input class="form-control form-control-sm" placeholder="名称" type="text" value="<%= cl.name %>"></td>
 
-                         <td data-site="2"><input class="form-control form-control-sm" placeholder="变更部位" type="text" value="<%= cl.bwmx %>"></td>
 
-                         <td data-site="3"><input class="form-control form-control-sm" placeholder="变更详情" type="text" value="<%= cl.detail %>"></td>
 
-                         <td data-site="4">
 
-                             <select class="form-control input-sm">
 
-                                 <% for (const j in changeUnits) { %>
 
-                                     <% if (changeUnits[j].unit !== undefined && changeUnits[j].unit === cl.unit) { %>
 
-                                 <option selected="selected"><%= changeUnits[j].unit %></option>
 
-                                     <% } else if(changeUnits[j].unit !== undefined) { %>
 
-                                 <option><%= changeUnits[j].unit %></option>
 
-                                     <% } %>
 
-                                 <% } %>
 
-                             </select>
 
-                         </td>
 
-                         <td data-site="5"><input class="form-control form-control-sm" placeholder="单价" onkeyup="RegNum(this,event,upUnit)" type="text" value="<%= ctx.helper.roundNum(cl.unit_price, upUnit) %>"></td>
 
-                         <td data-site="6"><input class="form-control form-control-sm" placeholder="数量" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)" type="text" value="<%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %>"></td>
 
-                         <td data-site="7"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
 
-                         <td data-site="8"><input class="form-control form-control-sm" placeholder="变更数量" onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)" type="text" value="<%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %>"></td>
 
-                         <td data-site="9"><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
 
-                         <td><a class="text-danger">移除</a>
 
-                         </td>
 
-                     </tr>
 
-                         <% windex++ %>
 
-                     <% } %>
 
-                 <% } %>
 
-                 </tbody>
 
-                 <tfoot>
 
-                 <tr class="info">
 
-                     <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
 
-                     <td class="otatalamount"><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
 
-                     <td class="ctatalamount"><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
 
-                 </tr>
 
-                 </tfoot>
 
-             </table>
 
-             <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
 
-                 <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%">
 
-                     <thead>
 
-                     <tr>
 
-                         <th rowspan="2" class="text-center">清单编号</th>
 
-                         <th rowspan="2" class="text-center">名称</th>
 
-                         <th rowspan="2" class="text-center">变更部位</th>
 
-                         <th rowspan="2" class="text-center">变更详情</th>
 
-                         <th rowspan="2" class="text-center">单位</th>
 
-                         <th rowspan="2" class="text-center">单价</th>
 
-                         <th colspan="2" class="text-center">原设计</th>
 
-                         <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
 
-                         <th colspan="2" class="text-center">审批后变更</th>
 
-                     </tr>
 
-                     <tr>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                     </tr>
 
-                     </thead>
 
-                     <tbody id="list">
 
-                     <% for (const cl of changeList.sort()) { %>
 
-                         <tr>
 
-                             <td><%= cl.code %></td>
 
-                             <td><%= cl.name %></td>
 
-                             <td><%= cl.bwmx %></td>
 
-                             <td><%= cl.detail %></td>
 
-                             <td><%= cl.unit %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
 
-                             <td><%= cl.samount !== '' ? ctx.helper.roundNum(cl.samount, ctx.helper.findDecimal(cl.unit)) : '' %></td>
 
-                             <td><%= cl.samount !== '' ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.samount), tpUnit) : '' %></td>
 
-                             </td>
 
-                         </tr>
 
-                     <% } %>
 
-                     </tbody>
 
-                     <tfoot>
 
-                     <tr class="info">
 
-                         <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td><td></td>
 
-                         <td><%= stotalCost !== 0 ? ctx.helper.roundNum(stotalCost, tpUnit) : '' %></td>
 
-                     </tr>
 
-                     </tfoot>
 
-                 </table>
 
-                 <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist2" cellspacing="0" style="width:100%;display: none;">
 
-                     <thead>
 
-                     <tr>
 
-                         <th rowspan="2" class="text-center">清单编号</th>
 
-                         <th rowspan="2" class="text-center">名称</th>
 
-                         <th rowspan="2" class="text-center">变更部位</th>
 
-                         <th rowspan="2" class="text-center">变更详情</th>
 
-                         <th rowspan="2" class="text-center">单位</th>
 
-                         <th rowspan="2" class="text-center">单价</th>
 
-                         <th colspan="2" class="text-center">原设计</th>
 
-                         <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
 
-                         <% for (const audit of auditList2) { %>
 
-                         <% if (audit.usite !== 0) { %>
 
-                         <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
 
-                         <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     <tr>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <% for (const audit of auditList2) { %>
 
-                             <% if (audit.usite !== 0) { %>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                             <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     </thead>
 
-                     <tbody id="list">
 
-                     <% const audittotalCost = []; %>
 
-                     <% for (const [cindex,cl] of changeList.sort().entries()) { %>
 
-                         <tr>
 
-                             <td><%= cl.code %></td>
 
-                             <td><%= cl.name %></td>
 
-                             <td><%= cl.bwmx %></td>
 
-                             <td><%= cl.detail %></td>
 
-                             <td><%= cl.unit %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
 
-                             <% for (const audit of auditList2) { %>
 
-                                 <% if (audit.usite !== 0) { %>
 
-                                 <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
 
-                                 <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, audit.list_amount[cindex]), tpUnit) : '' %></td>
 
-                                 <% } %>
 
-                             <% } %>
 
-                             </td>
 
-                         </tr>
 
-                     <% } %>
 
-                     </tbody>
 
-                     <tfoot>
 
-                     <tr class="info">
 
-                         <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
 
-                         <% for (const audit of auditList2) { %>
 
-                             <% if (audit.usite !== 0) { %>
 
-                         <td></td><td><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
 
-                             <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     </tfoot>
 
-                 </table>
 
-             <% } else if (auditStatus === 6) { %>
 
-                 <table class="table table-striped table-bordered nowrap qd-table table-list" id="tablelist" cellspacing="0" style="width:100%;">
 
-                     <thead>
 
-                     <tr>
 
-                         <th rowspan="2" class="text-center">清单编号</th>
 
-                         <th rowspan="2" class="text-center">名称</th>
 
-                         <th rowspan="2" class="text-center">变更部位</th>
 
-                         <th rowspan="2" class="text-center">变更详情</th>
 
-                         <th rowspan="2" class="text-center">单位</th>
 
-                         <th rowspan="2" class="text-center">单价</th>
 
-                         <th colspan="2" class="text-center">原设计</th>
 
-                         <th colspan="2" class="text-center">申报变更增(+)减(-)</th>
 
-                         <% for (const audit of auditList) { %>
 
-                             <% if (audit.usite !== 0) { %>
 
-                                 <th colspan="2" class="text-center"><%= audit.name %> 审批</th>
 
-                             <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     <tr>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <th class="text-center">数量</th>
 
-                         <th class="text-center">金额</th>
 
-                         <% for (const audit of auditList) { %>
 
-                             <% if (audit.usite !== 0) { %>
 
-                                 <th class="text-center">数量</th>
 
-                                 <th class="text-center">金额</th>
 
-                             <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     </thead>
 
-                     <tbody id="list">
 
-                     <% const audittotalCost = []; %>
 
-                     <% for (const [cindex,cl] of changeList.entries()) { %>
 
-                         <tr class="clist" data-lid="<%= cl.id %>">
 
-                             <td><%= cl.code %></td>
 
-                             <td><%= cl.name %></td>
 
-                             <td><%= cl.bwmx %></td>
 
-                             <td><%= cl.detail %></td>
 
-                             <td><%= cl.unit %></td>
 
-                             <td data-site="5"><%= ctx.helper.roundNum(cl.unit_price, upUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.oamount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.oamount), tpUnit) %></td>
 
-                             <td><%= ctx.helper.roundNum(cl.camount, ctx.helper.findDecimal(cl.unit)) %></td>
 
-                             <td><%= ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, cl.camount), tpUnit) %></td>
 
-                             <% for (const audit of auditList) { %>
 
-                                 <% if (audit.usite !== 0) { %>
 
-                                     <% if (uid === audit.uid) { %>
 
-                                     <td>
 
-                                         <input class="form-control form-control-sm"  style="min-width:80px" placeholder="变更数量" type="text"
 
-                                                onkeyup="RegNum(this,event,<%= ctx.helper.findDecimal(cl.unit) %>)"
 
-                                                value="<%= audit.list_amount[cindex] !== undefined ?
 
-                                                        ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %>">
 
-                                     </td>
 
-                                     <% } else { %>
 
-                                     <td><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(audit.list_amount[cindex], ctx.helper.findDecimal(cl.unit)) : '' %></td>
 
-                                     <% } %>
 
-                                     <td<% if (uid === audit.uid) { %> class="amount_cost"<% } %>><%= audit.list_amount[cindex] !== undefined ? ctx.helper.roundNum(ctx.helper.accMul(cl.unit_price, audit.list_amount[cindex]), tpUnit) : '' %></td>
 
-                                 <% } %>
 
-                             <% } %>
 
-                             </td>
 
-                         </tr>
 
-                     <% } %>
 
-                     </tbody>
 
-                     <tfoot>
 
-                     <tr class="info">
 
-                         <td>合计</td><td></td><td></td><td></td><td></td><td></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ototalCost, tpUnit) %></td><td></td>
 
-                         <td><%= ctx.helper.roundNum(ctotalCost, tpUnit) %></td>
 
-                         <% for (const audit of auditList) { %>
 
-                             <% if (audit.usite !== 0) { %>
 
-                             <td></td><td <% if (uid === audit.uid) { %>class="amount_totalcost"<% } %>><%=audit.totalCost !== 0 ? ctx.helper.roundNum(audit.totalCost, tpUnit) : '' %></td>
 
-                             <% } %>
 
-                         <% } %>
 
-                     </tr>
 
-                     </tfoot>
 
-                 </table>
 
-             <% } %>
 
-         </div>
 
-         <div class="c-body tab-pane" role="tabpanel" id="files">
 
-             <table class="table table-bordered">
 
-                 <thead>
 
-                 <tr>
 
-                     <th width="50">序号</th>
 
-                     <th>名称</th>
 
-                     <th width="90">大小</th>
 
-                     <th width="100">上传时间</th>
 
-                     <th width="100">操作</th>
 
-                 </tr>
 
-                 </thead>
 
-                 <tbody id="attList">
 
-                 <% if (attList !== undefined && attList !== '') { %>
 
-                 <% for (const [index,att] of attList.entries()) { %>
 
-                 <tr>
 
-                     <td><%- index+1 %></td>
 
-                     <td><a href="/change/download/file/<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
 
-                     <td><%- ctx.helper.bytesToSize(att.filesize) %></td>
 
-                     <td><%- moment(att.in_time * 1000).format('YYYY-MM-DD') %></td>
 
-                     <td>
 
-                         <% if (att.uid === uid && (auditStatus === 1 || auditStatus === 2 || auditStatus === 6)) { %>
 
-                         <a class="btn btn-light btn-sm delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
 
-                         <% } %>
 
-                     </td>
 
-                 </tr>
 
-                 <% } %>
 
-                 <% } %>
 
-                 </tbody>
 
-             </table>
 
-         </div>
 
-     </div>
 
- </div>
 
- <link href="/public/css/toastr.css" rel="stylesheet">
 
- <script src="/public/js/toastr.min.js"></script>
 
- <script>
 
-     $(document).ready(() => {
 
-         toastr.options = {
 
-             "closeButton": false,
 
-             "debug": false,
 
-             "newestOnTop": false,
 
-             "progressBar": false,
 
-             "positionClass": "toast-top-right",
 
-             "preventDuplicates": false,
 
-             "onclick": null,
 
-             "showDuration": "300",
 
-             "hideDuration": "1000",
 
-             "timeOut": "5000",
 
-             "extendedTimeOut": "1000",
 
-             "showEasing": "swing",
 
-             "hideEasing": "linear",
 
-             "showMethod": "fadeIn",
 
-             "hideMethod": "fadeOut"
 
-         };
 
-     })
 
-     let table = '';
 
-     const totalPriceUnit = '<%- tpUnit %>';
 
-     const unitPriceUnit = '<%- upUnit %>';
 
- </script>
 
- <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
 
- <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>
 
- <script src="/public/js/datatable/dataTables.fixedColumns.min.js"></script>
 
- <script src="/public/js/datatable/jlzf-change-table.js"></script>
 
- <script src="/public/js/change_calculation.js"></script>
 
- <% if (auditStatus === 1 || auditStatus === 2) { %>
 
- <script>
 
-     const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
 
-     const changeUnits = JSON.parse('<%- JSON.stringify(changeUnits) %>');
 
-     const precision = JSON.parse('<%- JSON.stringify(precision) %>');
 
-     const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
 
-     const billsTable = {
 
-         columnDefs: [
 
-             { className: 'allwidth1', width: 100, targets: 0 },
 
-             { className: 'allwidth2', width: 150, targets: [1,2,3] },
 
-             { className: 'allwidth4', width: 40, targets: 10 },
 
-             { className: 'allwidth5', width: 60, targets: 4 },
 
-             { className: 'allwidth3',width: 80, targets: '_all' }
 
-         ],
 
-         fixedColumns: {
 
-             leftColumns: 6
 
-         }
 
-     }
 
-     const ledger = JSON.parse('<%- JSON.stringify(ledger) %>');
 
-     const pos = JSON.parse('<%- JSON.stringify(pos) %>');
 
-     const dealBillList = JSON.parse('<%- JSON.stringify(dealBillList) %>');
 
- </script>
 
- <script src="/public/js/decimal.min.js"></script>
 
- <script src="/public/js/zh_calc.js"></script>
 
- <script src="/public/js/path_tree.js"></script>
 
- <script src="/public/js/gcl_gather.js"></script>
 
- <script src="/public/js/jquery/jquery.form.min.js"></script>
 
- <script src="/public/js/change_set.js"></script>
 
- <% } else if (auditStatus === 3 || auditStatus === 4 || auditStatus === 5 || auditStatus === 7) { %>
 
- <script>
 
-     const billsTable = {
 
-         columnDefs: [
 
-             { className: 'allwidth1', width: 100, targets: 0 },
 
-             { className: 'allwidth2', width: 150, targets: [1,2,3] },
 
-             { className: 'allwidth5', width: 60, targets: 4 },
 
-             { className: 'allwidth3',width: 80, targets: '_all' }
 
-         ],
 
-         fixedColumns: {
 
-             leftColumns: 6
 
-         }
 
-     }
 
- </script>
 
- <script src="/public/js/change_show.js"></script>
 
- <% } else if (auditStatus === 6) { %>
 
- <script>
 
-     const billsTable = {
 
-         columnDefs: [
 
-             { className: 'allwidth1', width: 100, targets: 0 },
 
-             { className: 'allwidth2', width: 150, targets: [1,2,3] },
 
-             { className: 'allwidth5', width: 60, targets: 4 },
 
-             { className: 'allwidth3',width: 80, targets: '_all' }
 
-         ],
 
-         fixedColumns: {
 
-             leftColumns: 6
 
-         }
 
-     }
 
- </script>
 
- <script src="/public/js/change_approval.js"></script>
 
- <% } %>
 
- <script src="/public/js/change_detail.js"></script>
 
 
  |