quanwei
2 days ago 73b874c72ad55eb9eef21c36160ac0de58f0189e
admin/app/branch/model/position/Position.php
@@ -3,6 +3,7 @@
namespace app\branch\model\position;
use app\common\model\branch\Position as PositionModel;
use app\common\model\branch\Member as MemberModel;
/**
 * 职务模型
@@ -35,7 +36,7 @@
    public function remove()
    {
        // 判断是否存在
        $Count = (new Member())->where('position_id','=' ,$this['position_id'])->where('is_delete','=', 0)->count();
        $Count = (new MemberModel())->where('position_id','=' ,$this['position_id'])->where('is_delete','=', 0)->count();
        if ($Count > 0) {
            $this->error = '该职务使用中,不允许删除';
            return false;