Accept Merge Request #64: (feature/zy -> develop)

Merge Request: feature: 面板

Created By: @zhuyu
Accepted By: @zhuyu
URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/64?initial=true
This commit is contained in:
zhuyu 2025-05-26 11:40:13 +08:00 committed by Coding
commit 72c48d1a51
4 changed files with 22 additions and 33 deletions

View File

@ -174,7 +174,7 @@ class Dashboard extends Backend
if (!$task) {
$this->error('任务状态已变更,请刷新后操作');
}
$task->save(['status' => 3, 'prove_file_path' => $params['prove_file_path']]);
$task->save(['status' => 3, 'prove_desc' => $params['prove_desc'], 'prove_file_path' => $params['prove_file_path']]);
$this->success();
}

View File

@ -14,6 +14,13 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Prove_desc')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-prove_desc" class="form-control" name="row[prove_desc]" type="text" value="{$row.prove_desc|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-3">文件地址</label>
<div class="col-xs-12">

View File

@ -50,7 +50,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
$(document).on('click', '.btn-preview', function (e) {
e.preventDefault();
var fileType = $(this).data('type'); // 自动从 data-type 获取,比如 pdf, jpg, doc
var url = $(this).attr('url');
var url = $(this).data('url');
if (fileType === 'pdf') {
Layer.open({

View File

@ -33,50 +33,32 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'title', title: __('Title'), operate: 'LIKE'},
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6')}, formatter: Table.api.formatter.status},
{field: 'operate', title: __('查看附件'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons:[
{
field: 'buttons',
width: "120px",
title: __('附件'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'detail',
title: __('查看详情'),
text: __('查看附件'),
title: __('查看附件'),
classname: 'btn btn-xs btn-primary btn-preview',
icon: 'fa fa-list',
extend: function(row) {
return 'data-type="' + row.filetype + '" data-url="' + row.url + '"';
}
}
]
],
formatter: Table.api.formatter.buttons
},
{field: 'prove_desc', title: __('Prove_desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'refuse_reason', title: __('Refuse_reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'expire_start_time', title: __('Expire_start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'expire_end_time', title: __('Expire_end_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'complete_time', title: __('Complete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons:[
{
name: 'complete',
text:"完成任务",
title:"完成任务",
extend: 'data-toggle="tooltip" data-container="body"',
classname: 'btn btn-xs btn-success btn-magic btn-ajax',
icon: 'fa fa-magic',
url: 'oa/task/complete',
confirm: '确认发送',
refresh: true,
success: function (data, ret) {
return false;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
},
visible: function (row) {
//返回true时按钮显示,返回false隐藏
if (row.status != 1) {
return false;
}
return true;
}
},
{
name: 'pass',
text:"通过",
@ -155,7 +137,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
$(document).on('click', '.btn-preview', function (e) {
e.preventDefault();
var fileType = $(this).data('type'); // 自动从 data-type 获取,比如 pdf, jpg, doc
var url = $(this).attr('href');
var url = $(this).data('url');
if (fileType === 'pdf') {
Layer.open({