增加合同到期前提醒,提前30天提醒
This commit is contained in:
parent
8f2c51f349
commit
6bfbd1f400
@ -1510,10 +1510,7 @@ function advancedDate($type)
|
||||
}
|
||||
|
||||
/**
|
||||
* 间隔时间段格式化
|
||||
* @param int $time 时间戳
|
||||
* @param string $format 格式 【d:显示到天 i显示到分钟 s显示到秒】
|
||||
* @return string
|
||||
* 计算按天数
|
||||
*/
|
||||
function countDays($a, $b = 0)
|
||||
{
|
||||
|
@ -65,6 +65,7 @@ class Contract extends Model
|
||||
$item->type_name = self::$Type[(int)$item->type_a];
|
||||
$item->status_name = self::$Status[(int)$item->check_status];
|
||||
$item->chack_status_name = self::$Status[(int) $item->CheckStatus];
|
||||
$item->delay = countDays(date("Y-m-d"),date('Y-m-d', $item->end_time));
|
||||
if($item->cost == 0){
|
||||
$item->cost = '-';
|
||||
}
|
||||
|
@ -93,6 +93,21 @@
|
||||
var html = '<span class="layui-color-' + d.type_a + '">' + d.type_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
},{
|
||||
field: 'interval_time',
|
||||
title: '合同有效时间',
|
||||
align: 'center',
|
||||
width: 248,
|
||||
templet: function (d) {
|
||||
var html = d.interval_time;
|
||||
if (d.delay > 0 && d.delay < 30) {
|
||||
html += '<span class="red ml-1" style="font-size:12px;">' + d.delay + '天后到期</span>';
|
||||
}
|
||||
if (d.delay == 0) {
|
||||
html += '<span class="red ml-1" style="font-size:12px;">已过期</span>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
},{
|
||||
field: 'cost',
|
||||
title: '合同金额/元',
|
||||
|
Loading…
x
Reference in New Issue
Block a user