|
|
@@ -36,7 +36,7 @@
|
|
|
<tr>
|
|
|
<th>清单规则名称</th>
|
|
|
<th width="160">添加时间</th>
|
|
|
- <th width="60">操作</th>
|
|
|
+ <th width="70">操作</th>
|
|
|
<th width="90">导入</th>
|
|
|
<th width="90">复制</th>
|
|
|
</tr>
|
|
|
@@ -198,15 +198,9 @@
|
|
|
//main 增删改
|
|
|
$("#createA").click(function(){
|
|
|
let billsLibName = $("#createText").val();
|
|
|
- /* let compilationName = $('#compilationSels option:selected').text();
|
|
|
- let compilationId = $('#compilationSels option:selected').val();*/
|
|
|
if(billsLibName.trim().length === 0){
|
|
|
alert("请输入清单规则名称!");
|
|
|
- }
|
|
|
- /* else if(compilationName.trim().length === 0){
|
|
|
- alert("编办不可为空!");
|
|
|
- }*/
|
|
|
- else {
|
|
|
+ } else {
|
|
|
mainAjax.createStdBillsLib(userAccount, billsLibName);
|
|
|
$("#createText").val("");
|
|
|
}
|
|
|
@@ -252,7 +246,21 @@
|
|
|
let renameId = $(this).parent().parent().attr("id");
|
|
|
$('#renameText').val($(this).parent().parent().find('td:first-child').text());
|
|
|
$("#renameA").attr("renameId", renameId);
|
|
|
+ });
|
|
|
|
|
|
+ $('#showArea').on('click', '.lock', function () {
|
|
|
+ const $lock = $(this);
|
|
|
+ const $url = $lock.parent().parent().children(':first-child').children(':first-child');
|
|
|
+ const locked = $lock.data().locked;
|
|
|
+ const url = $url.prop('href');
|
|
|
+ const curLocked = !locked;
|
|
|
+ const curURL = url.replace(`locked=${locked}`, `locked=${curLocked}`);
|
|
|
+ $(this).data('locked', curLocked);
|
|
|
+ $url.prop('href', curURL);
|
|
|
+ const innerHtml = curLocked ? '<i class="fa fa-unlock-alt"></i>' : '<i class="fa fa-lock"></i>';
|
|
|
+ $lock.html(innerHtml);
|
|
|
+ const title = curLocked ? '解锁' : '锁定';
|
|
|
+ $lock.prop('title', title);
|
|
|
});
|
|
|
|
|
|
$('#edit').on('shown.bs.modal', function () {
|