From a6bbb414616443b8e37f321760610e20d470940b Mon Sep 17 00:00:00 2001 From: pengda <10266652509@qq.com> Date: Fri, 25 Oct 2024 18:13:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=AF=E6=96=B9=E5=A4=87=E6=B3=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/templates/admin/formula_add.html | 4 +++ view/templates/admin/formula_list.html | 55 ++++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/view/templates/admin/formula_add.html b/view/templates/admin/formula_add.html index 549ea48..2ad3309 100644 --- a/view/templates/admin/formula_add.html +++ b/view/templates/admin/formula_add.html @@ -94,10 +94,14 @@
 
+ {if !$data.id}
+ {else} + + {/if}
 
diff --git a/view/templates/admin/formula_list.html b/view/templates/admin/formula_list.html index 7f901eb..91d6ac7 100644 --- a/view/templates/admin/formula_list.html +++ b/view/templates/admin/formula_list.html @@ -100,16 +100,17 @@ {$item.id} {$item.name} {$item.source} - +
{foreach from=$item.formula item=value} {$value.name}{if $value.desc}({$value.desc}){/if} {$value.num_str} {/foreach}
用法:{$item.method}
-
- 备注: 保存 +
+ {if $item.remark}备注:{/if}{$item.remark}
+ 修改备注 {if $item.uid==0} @@ -120,7 +121,7 @@ {if $item.uid == 0} - 审核 + 审核 编辑 {/if}
{if $user_list[$item.user_id]}{$user_list[$item.user_id].username}{/if}
@@ -139,8 +140,8 @@ @@ -187,8 +208,15 @@ } $('#check_div').show() } - $("#close_tip").click(function(){ + function to_remark(id){ + $('#remark_id').val(id); + let remark = $('.remark_'+id).html(); + $('#remark_text').val(remark); + $('#remark_div').show() + } + $(".close").click(function(){ $("#check_div").hide(); + $("#remark_div").hide(); }); function to_status() { @@ -241,8 +269,11 @@ }); } - function saveRemark(id){ - let remark = $('.remark_'+id).val(); + function saveRemark(){ + $("#remark_div").hide(); + + let id = $('#remark_id').val() + let remark = $('#remark_text').val(); const data = { id: id, remark: remark, @@ -256,6 +287,8 @@ success: function (response) { if (response.status == true) { showAlert('保存成功') + $('.remark_txt_'+id).html('备注:'+remark+''); + return true; } @@ -313,6 +346,10 @@ color: #aaa; /* 文字颜色变淡 */ cursor: not-allowed; /* 禁用手型指针 */ } + .remark-span{ + color: #0069d6 !important; + padding: 0 !important; + } {/literal}