|
@@ -1,74 +1,4 @@
|
|
|
<% if (tender.user_id === uid) { %>
|
|
|
-
|
|
|
- <% if (tender.c_rule_first) { %>
|
|
|
-<!--首次使用-->
|
|
|
-<div class="modal" id="first">
|
|
|
- <div class="modal-dialog" role="document" >
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title">设置变更令号规则</h5>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <h5 >
|
|
|
- 当前规则:
|
|
|
- <span id="preview">
|
|
|
- <% if (codeRule && codeRule instanceof Array) { %>
|
|
|
- <% const preview = []; %>
|
|
|
- <% for (const rule of codeRule) { %>
|
|
|
- <% preview.push(rule.preview); %>
|
|
|
- <% } %>
|
|
|
- <%- preview.join(tender.c_connector !== null && tender.c_connector !== '3' ? ruleConst.connectorString[tender.c_connector] : ''); %>
|
|
|
- <% } %>
|
|
|
- </span>
|
|
|
- </h5>
|
|
|
- <h5 id="ruleParts">
|
|
|
- <% if (codeRule && codeRule instanceof Array) { %>
|
|
|
- <% for (const rule of codeRule) { %>
|
|
|
- <span class="badge badge-light" title="<%- ruleConst.ruleString[rule.rule_type]%>">
|
|
|
- <span>
|
|
|
- <%- rule.preview %>
|
|
|
- </span>
|
|
|
- <a href="javascript: void(0);" class="text-danger" title="移除"><i class="fa fa-remove"></i></a>
|
|
|
- </span>
|
|
|
- <% } %>
|
|
|
- <% } %>
|
|
|
- </h5>
|
|
|
- <h5 class="my-3">连接符</h5>
|
|
|
- <div class="form-group">
|
|
|
- <select class="form-control connector-change">
|
|
|
- <option disabled selected>请选择</option>
|
|
|
- <% for (const index in ruleConst.connectorString) { %>
|
|
|
- <option value="<%- index %>"><%- ruleConst.connectorString[index] %></option>
|
|
|
- <% } %>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <h5 class="my-3">添加新规则组件</h5>
|
|
|
- <div class="form-group">
|
|
|
- <select class="form-control rule-change">
|
|
|
- <option disabled selected>请选择组件</option>
|
|
|
- <% for (const index in ruleConst.ruleString) { %>
|
|
|
- <option value="<%- index %>"><%- ruleConst.ruleString[index] %></option>
|
|
|
- <% } %>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="form-group" id="format" style="display: none">
|
|
|
- <label>自动编号位数</label>
|
|
|
- <input min="3" class="form-control" step="1" max="6" value="3" type="number">
|
|
|
- </div>
|
|
|
- <div class="form-group" id="text" style="display: none">
|
|
|
- <label>起始编号</label>
|
|
|
- <input class="form-control" value="001" type="text">
|
|
|
- </div>
|
|
|
- <button class="btn btn-outline-primary" id="addRule">添加组件</button>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-secondary" data-dismiss="modal" id="changeFirst">暂时不需要</button>
|
|
|
- <button class="btn btn-primary" id="setRule">确定</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
- <% } %>
|
|
|
<!--弹出添加变更令-->
|
|
|
<div class="modal fade" id="add-bj" data-backdrop="static">
|
|
|
<div class="modal-dialog" role="document">
|
|
@@ -169,7 +99,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
|
|
|
+ <% if (tender.c_rule_first) { %><button type="button" class="btn btn-secondary" data-dismiss="modal" id="changeFirst">暂时不需要</button><% } %>
|
|
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal" id="hide_modal" <% if (tender.c_rule_first) { %>style="display: none"<% } %>>关闭</button>
|
|
|
<button type="button" class="btn btn-primary" id="setRule">确定添加</button>
|
|
|
</div>
|
|
|
</div>
|