普通报销单表头

普通报销单表头

温馨提示:本文最后更新于2025-06-11 17:12:39,某些文章具有时效性,若有错误或已失效,请在下方留言

普通报销单表头添加经费来源,最终的效果如下图所示

普通报销单表头添加经费来源
普通报销单表头添加经费来源

录入页面

当选择经费来源字段时,表头后添加 [经费来源值]

打开 webmain/flow/input/inputjs/mode_putong.js 文件,修改代码如下所示

//流程模块【putong.普通报销单】下录入页面自定义js页面,初始函数
function initbodys(){
	$(form('fundSource')).change(function(){
        changeFundSource(true);
    });
}

function changeFundSource(bo){
    if(!form('fundSource')) return;
    var v = form('fundSource').value;
    var str = v ? '[' + v + ']' : '';
    var $font = $('#inputtitle font');
    if($font.length === 0) return; // 预览模式下没有font标签时直接返回
    if($font.next('.fundSourceInfo').length === 0) {
        $font.after('<span class="fundSourceInfo" style="font-size:16px;color:#888;margin-left:8px;">' + str + '</span>');
    } else {
        $font.next('.fundSourceInfo').text(str);
    }
}

展示页面

打开 webmain/task/mode/tpl_mode_p.html 文件,96~109行的内容,修改为

<?php
	//显示状态
	if($da['arr']['isflow']>0 && $stype==''){
		echo '<div class="statustext" onclick="$(this).remove()" style="color:'.$da['arr']['statuscolor'].';border-color:'.$da['arr']['statuscolor'].'">'.$da['arr']['statustext'].'</div>';
	}

	$contview = $da['arr']['contview'];
	if(!isempt($da['title']) && !isset($da['arr']['notitle']) && !contain($contview, 'notitle')){
	if($da['arr']['modenum']!='cpjian' && $da['arr']['modenum']!='putong') {
		echo '<div align="center"><div class="ptitle">广东智慧医学国际研究院<br/><font style="font-size: 18px">'.$da['title'].'</font></div></div>';
	} else if ($da['arr']['modenum']=='putong') {
		if (preg_match('/经费来源.*?<td[^>]*>(.*?)<\/td>/su', $contview, $matches)) {
			$fundingSource = trim(strip_tags($matches[1]));
			echo '<div align="center"><div class="ptitle">广东智慧医学国际研究院<br/><font style="font-size: 18px">'.$da['title'].'</font><span class="fundSourceInfo" style="font-size:16px;color:#888;margin-left:8px;">['.$fundingSource.']</span></div></div>';
		} else {
			echo '<div align="center"><div class="ptitle">广东智慧医学国际研究院<br/><font style="font-size: 18px">'.$da['title'].'</font></div></div>';
		}
	} else  {
		echo '<div align="center"><div class="ptitle"><br/><font style="font-size: 18px"></font></div></div>';
	}
	}
?>

展示页面的效果, 如下图所示

展示页面
展示页面
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容