新增报销bug处理

This commit is contained in:
hdm 2022-02-13 22:59:11 +08:00
parent 50eb87d82d
commit 1ff44793bd
3 changed files with 25 additions and 2 deletions

View File

@ -0,0 +1,23 @@
<?php
namespace app\finance\validate;
use think\Validate;
class ExpenseCheck extends Validate
{
protected $rule = [
'code' => 'require',
'id' => 'require',
'status' => 'require'
];
protected $message = [
'code.require' => '报销凭证编号不能为空',
'id.require' => '缺少更新条件',
'status.require' => '状态为必选',
];
protected $scene = [
'add' => ['code'],
'edit' => ['id', 'code']
];
}

View File

@ -47,7 +47,7 @@
, {field: 'module_title', width: 110, title: '所属模块',align: 'center'}
, {width: 200, title: '操作', align: 'center'
, templet: function (d) {
var html = '<span class="layui-btn-group"><button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="add">添加子菜单/节点</button><button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
var html = '<span class="layui-btn-group"><button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="add">添加子菜单/节点</button><button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button><button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button></span>';
return html;
}
}

View File

@ -48,7 +48,7 @@ class MDAvatars
) {
//如果是中文,并且没有中文字体包,则按拼音首字母对其进行转换
$CNByte = iconv("UTF-8", "gb2312", $this->Char);
$Code = ord($CNByte{0}) * 256 + ord($CNByte{1}) - 65536;//求其偏移量
$Code = ord($CNByte[0]) * 256 + ord($CNByte[1]) - 65536;//求其偏移量
if ($Code >= -20319 and $Code <= -20284) $this->Char = "A";
if ($Code >= -20283 and $Code <= -19776) $this->Char = "B";
if ($Code >= -19775 and $Code <= -19219) $this->Char = "C";