| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272 | 
							- <!--标段设置-标段属性-->
 
- <div class="modal fade" id="bd-set-1" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">标段属性</h5>
 
-             </div>
 
-             <div class="modal-height-500" style="overflow-y: auto">
 
-                 <div class="modal-body">
 
-                     <ul class="nav nav-tabs nav-justified mb-2">
 
-                         <li class="nav-item">
 
-                             <a class="nav-link active" data-toggle="tab" href="#htxx" role="tab" aria-selected="true">合同信息</a>
 
-                         </li>
 
-                         <li class="nav-item">
 
-                             <a class="nav-link" data-toggle="tab" href="#cjdw" role="tab" aria-selected="false">参建单位</a>
 
-                         </li>
 
-                         <li class="nav-item">
 
-                             <a class="nav-link" data-toggle="tab" href="#jscs" role="tab">技术参数</a>
 
-                         </li>
 
-                     </ul>
 
-                     <div class="tab-content">
 
-                         <div class="tab-pane active" id="htxx">
 
-                             <div class="form-group">
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">建设项目名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="项目A" id="build-name" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:90px">合同编号</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="deal-code" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-12">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:90px">合同名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="deal-name" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                         </div>
 
-                         <div class="tab-pane" id="cjdw">
 
-                             <div class="form-group mb-4">
 
-                                 <label>建设单位:</label>
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">单位名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="build-company" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">法人代表</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="build-corporation" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">签订日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="build-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="form-group mb-4">
 
-                                 <label>承包单位1:</label>
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">单位名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="contract1-company" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">法人代表</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="contract1-corporation" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">签订日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="contract1-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="form-group mb-4">
 
-                                 <label>承包单位2:</label>
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">单位名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="contract2-company" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">法人代表</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="contract2-corporation" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">签订日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="contract2-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="form-group mb-4">
 
-                                 <label>监理单位1:</label>
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">单位名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="supervision1-company" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">法人代表</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="supervision1-corporation" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">签订日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="supervision1-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="form-group">
 
-                                 <label>监理单位2:</label>
 
-                                 <div class="row">
 
-                                     <div class="col-12 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">单位名称</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="supervision2-company" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">法人代表</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="supervision2-corporation" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">签订日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="supervision2-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                         </div>
 
-                         <div class="tab-pane" id="jscs">
 
-                             <div class="form-group">
 
-                                 <div class="row">
 
-                                     <div class="col-6 pr-0 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">公路等级</span>
 
-                                             </div>
 
-                                             <select class="form-control" id="load-level">
 
-                                                 <option>高速公路</option>
 
-                                                 <option>一级公路</option>
 
-                                                 <option>二级公路</option>
 
-                                                 <option>三级公路</option>
 
-                                                 <option>四级公路</option>
 
-                                             </select>
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:90px">长度(KM)</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="length" min="0" max="10000"
 
-                                                    oninput="limitDealParamLength(this)" onchange="checkNumberValid(this)">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">起始桩号</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="start-peg" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:90px">终止桩号</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="end-peg" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:66px">车道数</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="lane-count" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text" style="width:90px">合同工期</span>
 
-                                             </div>
 
-                                             <input type="text" class="form-control" value="" id="deal-period" maxlength="100">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6 pr-0 mb-2">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">开工日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="start-date">
 
-                                         </div>
 
-                                     </div>
 
-                                     <div class="col-6">
 
-                                         <div class="input-group input-group-sm">
 
-                                             <div class="input-group-prepend">
 
-                                                 <span class="input-group-text">计划完工日期</span>
 
-                                             </div>
 
-                                             <input type="date" class="form-control" value="" id="plan-end-date">
 
-                                         </div>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post1();">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% if (((tender.ledger_status === audit.ledger.status.uncheck || tender.ledger_status === audit.ledger.status.checkNo) && tender.user_id === ctx.session.sessionUser.accountId)
 
-         || (lastStage && lastStage.user_id === ctx.session.sessionUser.accountId && (lastStage.status === audit.stage.status.checkNo || lastStage.status === audit.stage.status.uncheck))) { %>
 
- <!--标段设置-小数位数-->
 
- <div class="modal fade" id="bd-set-2" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">小数位数</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <label>全局设置</label>
 
-                     <div class="row">
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">单价</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="3" id="decimal-up"
 
-                                        min="0" max="4" maxlength="1" oninput="limitDecimal(this)">
 
-                             </div>
 
-                         </div>
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">金额</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="2" id="decimal-tp"
 
-                                        oninput="limitDecimal(this)" min="0" max="4" maxlength="1">
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <div class="form-group">
 
-                     <label>单独设置</label>
 
-                     <div class="row">
 
-                         <div class="col-auto mt-1">
 
-                             <div class="form-group form-check pl-0">
 
-                                 <div class="custom-control custom-switch">
 
-                                     <input type="checkbox" class="custom-control-input" id="decimal-pay">
 
-                                     <label class="custom-control-label" for="decimal-pay">合同支付</label>
 
-                                 </div>
 
-                             </div>
 
-                         </div>
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">金额</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="2" id="decimal-pay-tp"
 
-                                        oninput="limitDecimal(this)" min="0" max="4" maxlength="1">
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post2();">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <!--标段设置-清单精度-->
 
- <div class="modal fade" id="bd-set-3" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">数量精度</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group" id="precision-spread" style="height: 397px; width: 465px;">
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <div id="hint-3" class="text-danger fa fa-exclamation-circle" style="display: none;"></div>
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post3();">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% } else { %>
 
- <!--标段设置-小数位数-->
 
- <div class="modal fade" id="bd-set-2" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">小数位数</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <label>全局设置</label>
 
-                     <div class="row">
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">单价</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="3" id="decimal-up" readonly="">
 
-                             </div>
 
-                         </div>
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">金额</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="2" id="decimal-tp" readonly="">
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <div class="form-group">
 
-                     <label>单独设置</label>
 
-                     <div class="row">
 
-                         <div class="col-auto mt-1">
 
-                             <div class="form-group form-check pl-0">
 
-                                 <div class="custom-control custom-switch">
 
-                                     <input type="checkbox" class="custom-control-input" id="decimal-pay" readonly="">
 
-                                     <label class="custom-control-label" for="decimal-pay">合同支付</label>
 
-                                 </div>
 
-                             </div>
 
-                         </div>
 
-                         <div class="col-4">
 
-                             <div class="input-group input-group-sm">
 
-                                 <div class="input-group-prepend">
 
-                                     <span class="input-group-text">金额</span>
 
-                                 </div>
 
-                                 <input type="number" class="form-control" value="2" id="decimal-pay-tp" readonly="">
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">确定</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <!--标段设置-清单精度-->
 
- <div class="modal fade" id="bd-set-3" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">数量精度</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="sjs-option-height" id="precision-spread" style="height: 397px; width: 465px;">
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">确定</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% } %>
 
- <% if (!lastStage || (lastStage.order === 1 && lastStage.user_id === ctx.session.sessionUser.accountId && (lastStage.status === audit.stage.status.checkNo || lastStage.status === audit.stage.status.uncheck))) { %>
 
- <!--标段设置-合同参数-->
 
- <div class="modal fade" id="bd-set-4" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">合同参数</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <!--默认显示-->
 
-                     <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post4()">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% } else { %>
 
- <!--标段设置-合同参数-->
 
- <div class="modal fade" id="bd-set-4" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">合同参数</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <!--默认显示-->
 
-                     <div class="form-group" id="param-spread" style="height: 230px; width: 465px;">
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">确定</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% } %>
 
- <!--标段设置-显示设置-->
 
- <div class="modal fade" id="bd-set-5" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">显示设置</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <div class="custom-control custom-checkbox mb-2">
 
-                         <input type="checkbox" class="form-check-input" id="ledger-dgn-qty" checked="">
 
-                         <label class="form-check-label" for="ledger-dgn-qty">项目节数量</label>
 
-                     </div>
 
-                     <div class="custom-control custom-checkbox mb-2">
 
-                         <input type="checkbox" class="form-check-input" id="ledger-cl-qty" checked="">
 
-                         <label class="form-check-label" for="ledger-cl-qty">错漏增减</label>
 
-                     </div>
 
-                     <div class="custom-control custom-checkbox mb-2">
 
-                         <input type="checkbox" class="form-check-input" id="thousandth" checked="">
 
-                         <label class="form-check-label" for="thousandth">千分位</label>
 
-                     </div>
 
-                     <div class="custom-control custom-checkbox mb-2">
 
-                         <input type="checkbox" class="form-check-input" id="stage-rc" checked="">
 
-                         <label class="form-check-label" for="stage-rc">实际完成量</label>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post5()">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <!--标段设置-章节设置-->
 
- <div class="modal fade" id="bd-set-6" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">章节设置</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group" id="chapter-spread" style="height: 330px; width: 465px;">
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post6()">确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <!--标段设置-付款账号-->
 
- <div class="modal fade" id="bd-set-7" data-backdrop="static">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title">付款账号</h5>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="sjs-option-height">
 
-                     <table class="table table-bordered">
 
-                         <tr><th colspan="2" class="text-center">工程款账户</th></tr>
 
-                         <tr><td>开户名称</td><td><input type="text" id="project-name" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>开户银行</td><td><input type="text" id="project-bank" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>开户账号</td><td><input type="text" id="project-account" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>分账划拨比例(%)</td><td><input type="text" id="project-rate" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>联系人</td><td><input type="text" id="project-contact" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>联系电话</td><td><input type="text" id="project-phone" class="form-control form-control-sm"></td></tr>
 
-                         <tr><th colspan="2" class="text-center">农民工工资专用账户</th></tr>
 
-                         <tr><td>开户名称</td><td><input type="text" id="worker-name" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>开户银行</td><td><input type="text" id="worker-bank" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>开户账号</td><td><input type="text" id="worker-account" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>分账划拨比例(%)</td><td><input type="text" id="worker-rate" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>联系人</td><td><input type="text" id="worker-contact" class="form-control form-control-sm"></td></tr>
 
-                         <tr><td>联系电话</td><td><input type="text" id="worker-phone" class="form-control form-control-sm"></td></tr>
 
-                     </table>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                 <button type="button" class="btn btn-sm btn-primary" onclick="post7()" >确认修改</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <script>
 
-     let property = JSON.parse('<%- JSON.stringify(tenderInfo) %>');
 
-     let ledgerChecked = <%- tender.ldeger_status === audit.ledger.status.checked %>;
 
-     let firstStageChecked = <%- lastStage !== undefined && lastStage !== null && (lastStage.order > 1 || (lastStage.order === 1 && lastStage.status === audit.stage.status.checked)) %>;
 
-     // 根据Min Max限制Input输入
 
-     function limitInputMinMax (obj) {
 
-         if (_.toNumber(obj.value) > _.toNumber(obj.max)) {
 
-             obj.value = obj.max;
 
-         }
 
-         if(_.toNumber(obj.value) < _.toNumber(obj.min)) {
 
-             obj.value = obj.min;
 
-         }
 
-     }
 
-     // 根据Maxlength限制input输入
 
-     function limitMaxLength (obj) {
 
-         if (obj.value.length > obj.maxLength) {
 
-             obj.value = obj.value.substr(0, obj.maxLength);
 
-         }
 
-     }
 
-     // 根据正则限制输入
 
-     function limitReg(obj, reg) {
 
-         obj.value = obj.value.replace(reg, '');
 
-     }
 
-     // 小数位数 input 输入限制
 
-     function limitDecimal(obj) {
 
-         limitReg(obj, /[^\d]/g);
 
-         limitMaxLength(obj);
 
-         limitInputMinMax(obj);
 
-     }
 
-     function limitDealParamLength(obj) {
 
-         limitReg(obj, /[^\d\.]/g); // 过滤数字和.
 
-         limitReg(obj, /\.{2,}/g); // 过滤第二个.
 
-         limitInputMinMax(obj);
 
-     }
 
-     function checkNumberValid(obj) {
 
-         const value = _.toNumber(obj.value);
 
-         obj.value = value ? value : '';
 
-     }
 
-     // 属性
 
-     function loadCommonProperty () {
 
-         // 合同信息
 
-         $('#build-name').val(property.deal_info.buildName);
 
-         $('#deal-code').val(property.deal_info.dealCode);
 
-         $('#deal-name').val(property.deal_info.dealName);
 
-         // 参建单位
 
-         // 建设单位
 
-         $('#build-company').val(property.construction_unit.build.company);
 
-         $('#build-corporation').val(property.construction_unit.build.corporation);
 
-         $('#build-date').val(property.construction_unit.build.date);
 
-         // 承包单位1
 
-         $('#contract1-company').val(property.construction_unit.contract1.company);
 
-         $('#contract1-corporation').val(property.construction_unit.contract1.corporation);
 
-         $('#contract1-date').val(property.construction_unit.contract1.date);
 
-         // 承包单位2
 
-         $('#contract2-company').val(property.construction_unit.contract2.company);
 
-         $('#contract2-corporation').val(property.construction_unit.contract2.corporation);
 
-         $('#contract2-date').val(property.construction_unit.contract2.date);
 
-         // 监理单位1
 
-         $('#supervision1-company').val(property.construction_unit.supervision1.company);
 
-         $('#supervision1-corporation').val(property.construction_unit.supervision1.corporation);
 
-         $('#supervision1-date').val(property.construction_unit.supervision1.date);
 
-         // 监理单位2
 
-         $('#supervision2-company').val(property.construction_unit.supervision2.company);
 
-         $('#supervision2-corporation').val(property.construction_unit.supervision2.corporation);
 
-         $('#supervision2-date').val(property.construction_unit.supervision2.date);
 
-         // 技术参数
 
-         $('#load-level').find("option:contains('" + property.tech_param.loadLevel + "')").attr("selected",true);;
 
-         $('#length').val(property.tech_param.loadLength);
 
-         $('#start-peg').val(property.tech_param.startPeg);
 
-         $('#end-peg').val(property.tech_param.endPeg);
 
-         $('#lane-count').val(property.tech_param.laneCount);
 
-         $('#deal-period').val(property.tech_param.dealPeriod);
 
-         $('#start-date').val(property.tech_param.startDate);
 
-         $('#plan-end-date').val(property.tech_param.planEndDate);
 
-     }
 
-     $('#bd-set-1').on('show.bs.modal', function () {
 
-         loadCommonProperty();
 
-     })
 
-     function post1 () {
 
-         const prop = {
 
-             deal_info: {
 
-                 buildName: $('#build-name').val(),
 
-                 dealCode: $('#deal-code').val(),
 
-                 dealName: $('#deal-name').val(),
 
-             },
 
-             construction_unit: {
 
-                 build: {
 
-                     company: $('#build-company').val(),
 
-                     corporation: $('#build-corporation').val(),
 
-                     date: $('#build-date').val(),
 
-                 },
 
-                 contract1: {
 
-                     company: $('#contract1-company').val(),
 
-                     corporation: $('#contract1-corporation').val(),
 
-                     date: $('#contract1-date').val(),
 
-                 },
 
-                 contract2: {
 
-                     company: $('#contract2-company').val(),
 
-                     corporation: $('#contract2-corporation').val(),
 
-                     date: $('#contract2-date').val(),
 
-                 },
 
-                 supervision1: {
 
-                     company: $('#supervision1-company').val(),
 
-                     corporation: $('#supervision1-corporation').val(),
 
-                     date: $('#supervision1-date').val(),
 
-                 },
 
-                 supervision2: {
 
-                     company: $('#supervision2-company').val(),
 
-                     corporation: $('#supervision2-corporation').val(),
 
-                     date: $('#supervision2-date').val(),
 
-                 },
 
-             },
 
-             tech_param: {
 
-                 loadLevel: $('#load-level').find("option:selected").text(),
 
-                 loadLength: _.toNumber($('#length').val()),
 
-                 startPeg: $('#start-peg').val(),
 
-                 endPeg: $('#end-peg').val(),
 
-                 laneCount: _.toNumber($('#lane-count').val()),
 
-                 dealPeriod: $('#deal-period').val(),
 
-                 startDate: $('#start-date').val(),
 
-                 planEndDate: $('#plan-end-date').val(),
 
-             }
 
-         };
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.deal_info = data.deal_info;
 
-             property.construction_unit = data.construction_unit;
 
-             property.tech_param = data.tech_param;
 
-             $('#bd-set-1').modal('hide');
 
-         });
 
-     }
 
-     // 小数位数
 
-     function loadCalculateProperty () {
 
-         $('#decimal-up').val(property.decimal.up);
 
-         $('#decimal-tp').val(property.decimal.tp);
 
-         $('#decimal-pay')[0].checked = property.decimal.pay;
 
-         $('#decimal-pay-tp').val(property.decimal.payTp);
 
-     }
 
-     $('#bd-set-2').on('show.bs.modal', function () {
 
-         loadCalculateProperty();
 
-     });
 
-     function post2() {
 
-         const prop = {
 
-             decimal: {
 
-                 up: _.toNumber($('#decimal-up').val()),
 
-                 tp: _.toNumber($('#decimal-tp').val()),
 
-                 pay: $('#decimal-pay')[0].checked,
 
-                 payTp: _.toNumber($('#decimal-pay-tp').val()),
 
-             }
 
-         };
 
-         if (ledgerChecked) {
 
-             if (prop.decimal.up < property.decimal.up) {
 
-                 toastr.warning('台账已审批完成,单价的小数位数,不可小于' + property.decimal.up);
 
-                 return;
 
-             }
 
-             if (prop.decimal.tp < property.decimal.tp) {
 
-                 toastr.warning('台账已审批完成,金额的小数位数,不可小于' + property.decimal.tp);
 
-                 return;
 
-             }
 
-         }
 
-         if (firstStageChecked) {
 
-             if (property.decimal.pay) {
 
-                 if (!prop.decimal.pay) {
 
-                     toastr.warning('第一期已审批完成,不可取消合同支付单独设置');
 
-                     return;
 
-                 }
 
-                 if (prop.decimal.payTp < property.decimal.payTp) {
 
-                     toastr.warning('第一期已审批完成,单独设置的合同支付小数位数,不可小于' + property.decimal.payTp);
 
-                     return;
 
-                 }
 
-             } else {
 
-                 if (prop.decimal.pay) {
 
-                     toastr.warning('第一期已审批完成,合同支付不可单独设置');
 
-                     return;
 
-                 }
 
-             }
 
-         }
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.decimal = data.decimal;
 
-             $('#bd-set-2').modal('hide');
 
-         }, null, true);
 
-     }
 
-     // 清单精度
 
-     const precisionObj = (function () {
 
-         const spread = SpreadJsObj.createNewSpread($('#precision-spread')[0]);
 
-         spread.options.showVerticalScrollbar = false;
 
-         spread.options.showHorizontalScrollbar = false;
 
-         const sheet = spread.getActiveSheet();
 
-         SpreadJsObj.protectedSheet(sheet);
 
-         sheet.setText(0, 0, '单位', spreadNS.SheetArea.colHeader);
 
-         sheet.setText(0, 1, '精度', spreadNS.SheetArea.colHeader);
 
-         sheet.setRowHeight(0, 32, spreadNS.SheetArea.colHeader);
 
-         const vStyle = new spreadNS.Style();
 
-         vStyle.font = '12px 微软雅黑';
 
-         sheet.setDefaultStyle(vStyle, spreadNS.SheetArea.viewport);
 
-         const xStyle = new spreadNS.Style();
 
-         xStyle.font = '12px 微软雅黑';
 
-         xStyle.vAlign = 1;
 
-         xStyle.hAlign = 1;
 
-         sheet.setDefaultStyle(xStyle, spreadNS.SheetArea.colHeader);
 
-         const yStyle = new spreadNS.Style();
 
-         yStyle.font = '12px 微软雅黑';
 
-         yStyle.vAlign = 1;
 
-         yStyle.hAlign = 1;
 
-         sheet.setDefaultStyle(yStyle, spreadNS.SheetArea.rowHeader);
 
-         SpreadJsObj.massOperationSheet(sheet, function () {
 
-             sheet.defaults.rowHeight = 21;
 
-             sheet.setColumnCount(2);
 
-             sheet.setRowCount(13);
 
-             sheet.setColumnWidth(0, 100);
 
-             sheet.setColumnWidth(1, 60);
 
-             sheet.getRange(0, 0, 13, 1).vAlign(1).backColor('#e4e7ea').locked(true);
 
-             sheet.getRange(0, 1, 13, 1).vAlign(1).hAlign(2).locked(false);
 
-             sheet.setText(0, 0, 't');
 
-             sheet.setText(1, 0, 'km');
 
-             sheet.setText(2, 0, 'm');
 
-             sheet.setText(3, 0, 'm2');
 
-             sheet.setText(4, 0, 'm3');
 
-             sheet.setText(5, 0, 'kg');
 
-             sheet.setText(6, 0, '个');
 
-             sheet.setText(7, 0, '台');
 
-             sheet.setText(8, 0, '套');
 
-             sheet.setText(9, 0, '棵');
 
-             sheet.setText(10, 0, '组');
 
-             sheet.setText(11, 0, '系统');
 
-             sheet.setText(12, 0, '其他未列单位');
 
-             const lineBorder = new spreadNS.LineBorder('#dee2e6', spreadNS.LineStyle.thin);
 
-             sheet.getRange(0, 0, 13, 2).setBorder(lineBorder, {all: true});
 
-             sheet.getRange(0, 0, 13, 2).formatter('@');
 
-             sheet.setSelection(0, 1, 1, 1);
 
-         });
 
-         spread.bind(spreadNS.Events.EditEnded, function (e, info) {
 
-             const value = _.toNumber(info.editingText);
 
-             if (!_.isInteger(value)) {
 
-                 toastr.warning('请输入0-6的整数');
 
-                 sheet.setText(info.row, info.col, '0');
 
-             } else if (value > 6) {
 
-                 toastr.warning('请输入0-6的整数');
 
-                 sheet.setText(info.row, info.col, '6');
 
-             } else if (value < 0) {
 
-                 toastr.warning('请输入0-6的整数');
 
-                 sheet.setText(info.row, info.col, '0');
 
-             }
 
-         });
 
-         SpreadJsObj.addDeleteBind(spread, function (sheet) {
 
-             const sel = sheet.getSelections()[0];
 
-             if (sel) {
 
-                 for (let iRow = sel.row, iRowLength = sel.row + sel.rowCount; iRow < iRowLength; iRow++) {
 
-                     for (let iCol = sel.col, iColLength = sel.col + sel.colCount; iCol < iColLength; iCol++) {
 
-                         if (iCol !== 1) continue;
 
-                         sheet.setText(iRow, iCol, '0');
 
-                     }
 
-                 }
 
-             }
 
-         });
 
-         spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
 
-             let bHint = false;
 
-             for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
 
-                 const curRow = info.cellRange.row + iRow;
 
-                 for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
 
-                     const curCol = info.cellRange.col + iCol;
 
-                     const value = _.toNumber(info.sheet.getText(curRow, curCol));
 
-                     if (_.isNaN(value) || !_.isInteger(value)) {
 
-                         bHint = true;
 
-                         info.sheet.setText(curRow, curCol, '0');
 
-                     } else if (value > 6) {
 
-                         bHint = true;
 
-                         info.sheet.setText(curRow, curCol, '6');
 
-                     } else if (value < 0) {
 
-                         bHint = true;
 
-                         info.sheet.setText(curRow, curCol, '0');
 
-                     }
 
-                 }
 
-             }
 
-             if (bHint) {
 
-                 toastr.warning('请输入0-6的整数');
 
-             }
 
-         });
 
-         function loadPrecisonProperty() {
 
-             $('#hint-3').hide();
 
-             sheet.setValue(0, 1, property.precision.t.value);
 
-             sheet.setValue(1, 1, property.precision.km.value);
 
-             sheet.setValue(2, 1, property.precision.m.value);
 
-             sheet.setValue(3, 1, property.precision.m2.value);
 
-             sheet.setValue(4, 1, property.precision.m3.value);
 
-             sheet.setValue(5, 1, property.precision.kg.value);
 
-             sheet.setValue(6, 1, property.precision.ge.value);
 
-             sheet.setValue(7, 1, property.precision.tai.value);
 
-             sheet.setValue(8, 1, property.precision.tao.value);
 
-             sheet.setValue(9, 1, property.precision.ke.value);
 
-             sheet.setValue(10, 1, property.precision.zu.value);
 
-             sheet.setValue(11, 1, property.precision.xitong.value);
 
-             sheet.setValue(12, 1, property.precision.other.value);
 
-         }
 
-         function setReadOnly(readOnly) {
 
-             sheet.getRange(0, 1, 13, 1).locked(readOnly);
 
-         }
 
-         function getNewPrecisionData() {
 
-             const precision = JSON.parse(JSON.stringify(property.precision));
 
-             precision.t.value = _.toNumber(sheet.getText(0, 1));
 
-             precision.km.value = _.toNumber(sheet.getText(1, 1));
 
-             precision.m.value = _.toNumber(sheet.getText(2, 1));
 
-             precision.m2.value = _.toNumber(sheet.getText(3, 1));
 
-             precision.m3.value = _.toNumber(sheet.getText(4, 1));
 
-             precision.kg.value = _.toNumber(sheet.getText(5, 1));
 
-             precision.ge.value = _.toNumber(sheet.getText(6, 1));
 
-             precision.tai.value = _.toNumber(sheet.getText(7, 1));
 
-             precision.tao.value = _.toNumber(sheet.getText(8, 1));
 
-             precision.ke.value = _.toNumber(sheet.getText(9, 1));
 
-             precision.zu.value = _.toNumber(sheet.getText(10, 1));
 
-             precision.xitong.value = _.toNumber(sheet.getText(11, 1));
 
-             precision.other.value = _.toNumber(sheet.getText(12, 1));
 
-             return precision;
 
-         }
 
-         function checkPrecisionMinLimit(precision, limit) {
 
-             for (const unit of precision) {
 
-                 if (precision[unit].value < limit[unit].value) {
 
-                     if (precision[unit].unit) {
 
-                         toastr.warning('台账已审批通过,清单精度不可减少,单位为' + limit[unit].unit + '的清单的精度不可小于' + limit[unit].value);
 
-                     } else {
 
-                         toastr.warning('台账已审批通过,清单精度不可减少,其他清单的精度不可小于' + limit[unit].value);
 
-                     }
 
-                     return false;
 
-                 }
 
-             }
 
-             return true;
 
-         };
 
-         return {loadPrecisonProperty, setReadOnly, getNewPrecisionData, checkPrecisionMinLimit};
 
-     })();
 
-     $('#bd-set-3').on('show.bs.modal', function () {
 
-         <% if (((tender.ledger_status !== audit.ledger.status.uncheck && tender.ledger_status !== audit.ledger.status.checkNo) || tender.user_id !== ctx.session.sessionUser.accountId)
 
-                 && (!lastStage || lastStage.user_id !== ctx.session.sessionUser.accountId || (lastStage.status !== audit.stage.status.checkNo || lastStage.status !== audit.stage.status.uncheck))) { %>
 
-         precisionObj.setReadOnly(true);
 
-         <% } %>
 
-         precisionObj.loadPrecisonProperty();
 
-     });
 
-     function post3 () {
 
-         const prop = { precision: precisionObj.getNewPrecisionData() };
 
-         if (ledgerChecked && !precisionObj.checkPrecisionMinLimit(prop.precision, property.precision)) return;
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.precision = data.precision;
 
-             $('#bd-set-3').modal('hide');
 
-         }, null, true);
 
-     }
 
-     // 合同参数
 
-     const dealObj = (function () {
 
-         const spread = SpreadJsObj.createNewSpread($('#param-spread')[0]);
 
-         spread.options.showVerticalScrollbar = false;
 
-         spread.options.showHorizontalScrollbar = false;
 
-         const sheet = spread.getActiveSheet();
 
-         SpreadJsObj.protectedSheet(sheet);
 
-         sheet.setText(0, 0, '参数名', spreadNS.SheetArea.colHeader);
 
-         sheet.setText(0, 1, '参数值', spreadNS.SheetArea.colHeader);
 
-         sheet.setRowHeight(0, 32, spreadNS.SheetArea.colHeader);
 
-         const vStyle = new spreadNS.Style();
 
-         vStyle.font = '12px 微软雅黑';
 
-         sheet.setDefaultStyle(vStyle, spreadNS.SheetArea.viewport);
 
-         const xStyle = new spreadNS.Style();
 
-         xStyle.font = '12px 微软雅黑';
 
-         xStyle.vAlign = 1;
 
-         xStyle.hAlign = 1;
 
-         sheet.setDefaultStyle(xStyle, spreadNS.SheetArea.colHeader);
 
-         const yStyle = new spreadNS.Style();
 
-         yStyle.font = '12px 微软雅黑';
 
-         yStyle.vAlign = 1;
 
-         yStyle.hAlign = 1;
 
-         sheet.setDefaultStyle(yStyle, spreadNS.SheetArea.rowHeader);
 
-         SpreadJsObj.massOperationSheet(sheet, function () {
 
-             sheet.defaults.rowHeight = 21;
 
-             sheet.setColumnCount(2);
 
-             sheet.setRowCount(5);
 
-             sheet.setColumnWidth(0, 200);
 
-             sheet.setColumnWidth(1, 200);
 
-             sheet.getRange(0, 0, 5, 1).vAlign(1).backColor('#e4e7ea').locked(true);
 
-             sheet.getRange(0, 1, 5, 1).vAlign(1).hAlign(2).locked(false);
 
-             sheet.setText(0, 0, '签约合同价');
 
-             sheet.setText(1, 0, '暂列金额');
 
-             sheet.setText(2, 0, '签约合同价(不含暂列金)');
 
-             sheet.setText(3, 0, '签约开工预付款');
 
-             sheet.setText(4, 0, '签约材料预付款');
 
-             sheet.getCell(2, 1).locked(true);
 
-             const lineBorder = new spreadNS.LineBorder('#dee2e6', spreadNS.LineStyle.thin);
 
-             sheet.getRange(0, 0, 5, 2).setBorder(lineBorder, {all: true});
 
-             sheet.getRange(0, 0, 5, 2).formatter('@');
 
-             sheet.setSelection(0, 1, 1, 1);
 
-         });
 
-         function calcHtjMinusZlj() {
 
-             const htj = _.toNumber(sheet.getText(0, 1));
 
-             const zlj = _.toNumber(sheet.getText(1, 1));
 
-             sheet.setValue(2, 1, ZhCalc.sub(htj, zlj));
 
-         }
 
-         spread.bind(spreadNS.Events.EditEnded, function (e, info) {
 
-             const value = _.toNumber(info.editingText);
 
-             if (_.isNaN(value)) {
 
-                 toastr.warning('请输入不超过万亿的数字');
 
-                 info.sheet.setText(info.row, info.col, '0');
 
-             } else if (value > Math.pow(10, 13)) {
 
-                 toastr.warning('请输入不超过万亿的数字');
 
-                 info.sheet.setText(info.row, info.col, '0');
 
-             }
 
-             if (info.row === 0 || info.row === 1) {
 
-                 calcHtjMinusZlj();
 
-             }
 
-         });
 
-         SpreadJsObj.addDeleteBind(spread, function (sheet) {
 
-             const sel = sheet.getSelections()[0];
 
-             let calc = false;
 
-             if (sel) {
 
-                 for (let iRow = sel.row, iRowLength = sel.row + sel.rowCount; iRow < iRowLength; iRow++) {
 
-                     if (iRow === 2) continue;
 
-                     for (let iCol = sel.col, iColLength = sel.col + sel.colCount; iCol < iColLength; iCol++) {
 
-                         if (iCol !== 1) continue;
 
-                         sheet.setText(iRow, iCol, '0');
 
-                         if (iRow === 0 || iRow === 1) calc = true;
 
-                     }
 
-                 }
 
-             }
 
-             if (calc) calcHtjMinusZlj();
 
-         });
 
-         spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
 
-             let bHint = false;
 
-             for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
 
-                 const curRow = info.cellRange.row + iRow;
 
-                 for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
 
-                     const curCol = info.cellRange.col + iCol;
 
-                     const value = _.toNumber(info.sheet.getText(curRow, curCol));
 
-                     if (_.isNaN(value) || value > Math.pow(10, 13)) {
 
-                         bHint = true;
 
-                         info.sheet.setText(curRow, curCol, '0');
 
-                     }
 
-                 }
 
-             }
 
-             if (bHint) {
 
-                 toastr.warning('请输入不超过万亿的数字');
 
-             }
 
-             calcHtjMinusZlj();
 
-         });
 
-         function loadDealProperty() {
 
-             sheet.setValue(0, 1, property.deal_param.contractPrice);
 
-             sheet.setValue(1, 1, property.deal_param.zanLiePrice);
 
-             sheet.setValue(2, 1, ZhCalc.sub(property.deal_param.contractPrice, property.deal_param.zanLiePrice));
 
-             sheet.setValue(3, 1, property.deal_param.startAdvance);
 
-             sheet.setValue(4, 1, property.deal_param.materialAdvance);
 
-         }
 
-         function setReadOnly (readOnly) {
 
-             sheet.getCell(0, 1).locked(readOnly);
 
-             sheet.getCell(1, 1).locked(readOnly);
 
-             sheet.getCell(3, 1).locked(readOnly);
 
-             sheet.getCell(4, 1).locked(readOnly);
 
-         }
 
-         function getNewDealData () {
 
-             const result = {};
 
-             result.contractPrice = _.toNumber(sheet.getText(0, 1));
 
-             result.zanLiePrice = _.toNumber(sheet.getText(1, 1));
 
-             result.startAdvance = _.toNumber(sheet.getText(3, 1));
 
-             result.materialAdvance = _.toNumber(sheet.getText(4, 1));
 
-             return result;
 
-         }
 
-         return { loadDealProperty, setReadOnly, getNewDealData, };
 
-     })();
 
-     $('#bd-set-4').on('show.bs.modal', function () {
 
-         dealObj.loadDealProperty();
 
-         <% if (lastStage !== undefined && lastStage !== null && (lastStage.user_id !== ctx.session.sessionUser.accountId || lastStage.order > 1 || (lastStage.order === 1 && (lastStage.status !== audit.stage.status.uncheck && lastStage.status !== audit.stage.status.checkNo)))) { %>
 
-             dealObj.setReadOnly(true);
 
-         <% } %>
 
-     });
 
-     function post4 () {
 
-         if (firstStageChecked) return;
 
-         const prop = { deal_param: dealObj.getNewDealData() };
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.deal_param = data.deal_param;
 
-             $('#bd-set-4').modal('hide');
 
-             window.location.reload();
 
-         });
 
-     }
 
-     // 显示设置
 
-     function loadDisplayProperty () {
 
-         $('#ledger-dgn-qty')[0].checked = property.display.ledger.dgnQty;
 
-         $('#ledger-cl-qty')[0].checked = property.display.ledger.clQty;
 
-         $('#thousandth')[0].checked = property.display.thousandth;
 
-         $('#stage-rc')[0].checked = property.display.stage.realComplete;
 
-     }
 
-     $('#bd-set-5').on('show.bs.modal', function () {
 
-         loadDisplayProperty();
 
-     });
 
-     function post5 () {
 
-         const prop = {
 
-             display: {
 
-                 ledger: { dgnQty: $('#ledger-dgn-qty')[0].checked, clQty: $('#ledger-cl-qty')[0].checked, },
 
-                 thousandth: $('#thousandth')[0].checked,
 
-                 stage: { realComplete: $('#stage-rc')[0].checked, },
 
-             },
 
-         };
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.display = data.display;
 
-             $('#bd-set-5').modal('hide');
 
-         });
 
-     }
 
-     // 章节设置
 
-     const chapterObj = (function () {
 
-         const spreadSetting = {
 
-             cols: [
 
-                 {title: '章节', colSpan: '1', rowSpan: '1', field: 'code', hAlign: 0, width: 100, formatter: '@', readOnly: true},
 
-                 {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 230, formatter: '@', readOnly: true},
 
-             ],
 
-             emptyRows: 0,
 
-             headRows: 1,
 
-             headRowHeight: [32],
 
-             defaultRowHeight: 21,
 
-             headerFont: '12px 微软雅黑',
 
-             font: '12px 微软雅黑',
 
-         };
 
-         const spread = SpreadJsObj.createNewSpread($('#chapter-spread')[0]);
 
-         spread.options.showVerticalScrollbar = false;
 
-         spread.options.showHorizontalScrollbar = false;
 
-         SpreadJsObj.initSheet(spread.getActiveSheet(), spreadSetting);
 
-         function checkSheetData(sheet) {
 
-             let hint = '';
 
-             for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
 
-                 const cell = sheet.getCell(iRow, 1);
 
-                 const defaultStype = sheet.getDefaultStyle();
 
-                 if (cell.text().length > 50) {
 
-                     cell.backColor('#f8d7da');
 
-                     hint = '章节名称的长度超出范围,请重新输入';
 
-                 } else {
 
-                     cell.backColor(defaultStype.backColor);
 
-                 }
 
-             }
 
-             if (hint === '') {
 
-                 $('#hint-6').hide();
 
-             } else {
 
-                 $('#hint-6').html('<i class="fa fa-smile-o mr-2"></i>' + hint).show();
 
-             }
 
-         }
 
-         spread.bind(spreadNS.Events.EditEnding, function (e, info) {
 
-             checkSheetData(info.sheet);
 
-         });
 
-         spread.bind(spreadNS.Events.ClipboardPasted, function (e, info) {
 
-             checkSheetData(info.sheet);
 
-         });
 
-         function loadChapterProperty() {
 
-             SpreadJsObj.loadSheetData(spread.getActiveSheet(), SpreadJsObj.DataType.Data, property.chapter);
 
-             $('#hint-6').hide();
 
-             const sheet = spread.getActiveSheet();
 
-             const defaultStype = sheet.getDefaultStyle();
 
-             sheet.getRange(0, 0, sheet.getRowCount(), sheet.getColumnCount()).backColor(defaultStype.backColor);
 
-         }
 
-         function setReadOnly(readOnly) {
 
-             SpreadJsObj.resetFieldReadOnly(spread.getActiveSheet(), 'name', readOnly);
 
-         }
 
-         function getNewChapterData() {
 
-             const result = [];
 
-             const sheet = spread.getActiveSheet();
 
-             for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
 
-                 const data = {};
 
-                 for (let iCol = 0; iCol < sheet.getColumnCount(); iCol++) {
 
-                     const col = spreadSetting.cols[iCol];
 
-                     data[col.field] = sheet.getText(iRow, iCol);
 
-                     if (col.field === 'name') {
 
-                         if (data.name.length > 50) {
 
-                             return null;
 
-                         }
 
-                     }
 
-                 }
 
-                 result.push(data);
 
-             }
 
-             return result;
 
-         }
 
-         return { loadChapterProperty, setReadOnly, getNewChapterData, }
 
-     })();
 
-     $('#bd-set-6').on('show.bs.modal', function () {
 
-         chapterObj.loadChapterProperty();
 
-         chapterObj.setReadOnly(false);
 
-     });
 
-     function post6 () {
 
-         const chapter = chapterObj.getNewChapterData();
 
-         if (!chapter) { return; }
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', { chapter: chapter }, function (data) {
 
-             property.chapter = data.chapter;
 
-             $('#bd-set-6').modal('hide');
 
-         });
 
-     }
 
-     // 属性
 
-     function loadPayProperty () {
 
-         // 付款账号
 
-         $('#project-name').val(property.pay_account.project.name);
 
-         $('#project-bank').val(property.pay_account.project.bank);
 
-         $('#project-account').val(property.pay_account.project.account);
 
-         $('#project-rate').val(property.pay_account.project.rate);
 
-         $('#project-contact').val(property.pay_account.project.contact);
 
-         $('#project-phone').val(property.pay_account.project.phone);
 
-         $('#worker-name').val(property.pay_account.worker.name);
 
-         $('#worker-bank').val(property.pay_account.worker.bank);
 
-         $('#worker-account').val(property.pay_account.worker.account);
 
-         $('#worker-rate').val(property.pay_account.worker.rate);
 
-         $('#worker-contact').val(property.pay_account.worker.contact);
 
-         $('#worker-phone').val(property.pay_account.worker.phone);
 
-     }
 
-     $('#bd-set-7').on('show.bs.modal', function () {
 
-         loadPayProperty();
 
-     })
 
-     function post7 () {
 
-         let flag = false;
 
-         const rate_reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2}))|)$/;
 
-         const phone_reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/;
 
-         const project_rate = $('#project-rate').val();
 
-         if (!rate_reg.test(project_rate) && project_rate !== '') {
 
-             toastr.error('工程款账户分账划拨比例数字格式有误且最多保留2位小数');
 
-             flag = true;
 
-         }
 
-         const project_phone = $('#project-phone').val();
 
-         if (!phone_reg.test(project_phone) && project_phone !== '') {
 
-             toastr.error('工程款账户联系电话格式有误');
 
-             flag = true;
 
-         }
 
-         const worker_rate = $('#worker-rate').val();
 
-         if (!rate_reg.test(worker_rate) && worker_rate !== '') {
 
-             toastr.error('农民工工资专用账户分账划拨比例数字格式有误且最多保留2位小数');
 
-             flag = true;
 
-         }
 
-         const worker_phone = $('#worker-phone').val();
 
-         if (!phone_reg.test(worker_phone) && worker_phone !== '') {
 
-             toastr.error('农民工工资专用账户联系电话格式有误');
 
-             flag = true;
 
-         }
 
-         if (flag) {
 
-             return false;
 
-         }
 
-         const prop = {
 
-             pay_account: {
 
-                 project: {
 
-                     name: $('#project-name').val(),
 
-                     bank: $('#project-bank').val(),
 
-                     account: $('#project-account').val(),
 
-                     rate: $('#project-rate').val(),
 
-                     contact: $('#project-contact').val(),
 
-                     phone: $('#project-phone').val(),
 
-                 },
 
-                 worker: {
 
-                     name: $('#worker-name').val(),
 
-                     bank: $('#worker-bank').val(),
 
-                     account: $('#worker-account').val(),
 
-                     rate: $('#worker-rate').val(),
 
-                     contact: $('#worker-contact').val(),
 
-                     phone: $('#worker-phone').val(),
 
-                 },
 
-             },
 
-         };
 
-         const tenderId = window.location.pathname.split('/')[2];
 
-         postData('/tender/' + tenderId + '/save', prop, function (data) {
 
-             property.pay_account = data.pay_account;
 
-             $('#bd-set-7').modal('hide');
 
-         });
 
-     }
 
- </script>
 
 
  |