修复模块卸载后,设置财务人员权限问题。新增模块是否存在的判断方法。

This commit is contained in:
hdm 2022-10-29 19:35:04 +08:00
parent a6ff9266c0
commit 9b53fd32fb
14 changed files with 55 additions and 32 deletions

View File

@ -122,7 +122,7 @@ composer install
⚠️⚠️ **注意:安装过程中,系统会自动创建数据库,请确保填写的数据库用户的权限可创建数据库,如果权限不足,请先手动创建空的数据库,然后填写刚创建的数据库名称和用户名也可完成安装。**
🔺🔺 **提醒安装过程中如果进度条卡住一般都是数据库写入权限或者安装环境配置问题请注意检查。遇到问题请到QQ群24641076 反馈**
🔺🔺 **提醒安装过程中如果进度条卡住一般都是数据库写入权限或者安装环境配置问题请注意检查。遇到问题请到QQ群反馈24641076群一满46924914群二名额不多 **
✅✅ **PS如需要重新安装请删除目录里面 config/install.lock 的文件,即可重新安装。**
@ -139,7 +139,7 @@ composer install
5. 访问 http://www.你的域名.com/install/index 请注意查看伪静态请配置是否设置了thinkphp规则。
6. 如果遇到无法解决的问题请到QQ群24641076群一满46924914群二名额不多 反馈交流
6. 如果遇到无法解决的问题请到QQ群反馈交流24641076群一满46924914群二名额不多
**📢如果需要提供安装服务请搜索微信号hdm588添加好友注意备注[安装勾股系统]。开源不易该服务需友情赞赏💰99元。**

View File

@ -94,6 +94,14 @@ function isTemplate($url='')
return $isTemplate;
}
//判断模块是否存在
function isModule($name)
{
$map = [];
$map[] = ['name', '=', $name];
$count = Db::name('AdminModule')->where($map)->count();
return $count;
}
//是否是某数据权限,count>1即有权限
function isAuth($uid,$name)
{

View File

@ -108,4 +108,4 @@ CREATE TABLE `oa_contract_log` (
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '合同操作记录表';
INSERT INTO `oa_data_auth` VALUES ((SELECT MAX(id) +1 FROM `oa_data_auth` a), '合同管理员','contract_admin','拥有该权限的员工可以查看、编辑、作废、中止所有合同。', 'contract', '',0,0,0,'','','',1656143065, 0);
INSERT INTO `oa_data_auth` VALUES ((SELECT MAX(id) +1 FROM `oa_data_auth` a), '合同管理员','contract_admin','拥有该权限的员工可以查看、编辑、作废、中止所有合同。', 'contract', '',1,1,0,'','','',1656143065, 0);

View File

@ -50,11 +50,19 @@
<td class="layui-td-gray">客户名称<span style="font-size:12px;">(甲方)</span><font>*</font></td>
<td>
{gt name="$pid" value="0"}
<input type="text" name="customer" autocomplete="off" value="{$p_contract.customer}" readonly lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input">
<input type="text" name="customer" autocomplete="off" value="{$p_contract.customer}" readonly lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input">
<input type="hidden" name="customer_id" value="{$p_contract.id}">
{else/}
<input type="text" name="customer" autocomplete="off" {eq name="$is_customer" value="1"}readonly{/eq} lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input {eq name="$is_customer" value="1"}customer-picker{/eq}">
{if condition="(isModule('customer') > 0) AND ($is_customer == 1)"}
<input type="text" name="customer" autocomplete="off" readonly lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input customer-picker">
{else/}
<input type="text" name="customer" autocomplete="off" lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input">
{/if}
<input type="hidden" name="customer_id" value="0">
{/gt}
<input type="hidden" name="customer_id" value="0">
</td>
<td class="layui-td-gray">签约客户代表<font>*</font></td>

View File

@ -48,7 +48,12 @@
<tr>
<td class="layui-td-gray">客户名称<span style="font-size:12px;">(甲方)</span><font>*</font></td>
<td>
<input type="text" name="customer" {eq name="$is_customer" value="1"}readonly{/eq} value="{$detail.customer}" autocomplete="off" lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input {eq name="$is_customer" value="1"}customer-picker{/eq}">
{if condition="(isModule('customer') > 0) AND ($is_customer == 1)"}
<input type="text" name="customer" value="{$detail.customer}" autocomplete="off" readonly lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input customer-picker">
{else/}
<input type="text" name="customer" value="{$detail.customer}" autocomplete="off" lay-verify="required" lay-reqText="请输入客户名称" placeholder="请输入客户名称" class="layui-input">
{/if}
<input type="hidden" name="customer_id" value="{$detail.customer_id}">
</td>
<td class="layui-td-gray">签约客户代表</td>
<td>

View File

@ -59,7 +59,7 @@
let callback = function (e) {
layer.msg(e.msg);
}
tool.post("/contract/cate/conf", data.field, callback);
tool.post("/customer/grade/conf", data.field, callback);
return false;
});
}

View File

@ -66,7 +66,7 @@
let callback = function (e) {
layer.msg(e.msg);
}
tool.post("/contract/cate/conf", data.field, callback);
tool.post("/finance/expense/conf", data.field, callback);
return false;
});
}

View File

@ -110,9 +110,9 @@
{elseif condition="($detail.check_status == 2)"}
<span class="green">审核通过,待开具</span>
{elseif condition="($detail.check_status == 3)"}
<span class="red">审核不通过 【原因:{$detail.check_remark}】</span>
<span class="red">审核不通过</span>
{elseif condition="($detail.check_status == 4)"}
<span class="red">已撤销 【原因:{$detail.check_remark}】</span>
<span class="red">已撤销</span>
{elseif condition="($detail.check_status == 5)"}
<span class="green">已开具</span>
{elseif condition="($detail.check_status == 10)"}

View File

@ -69,9 +69,9 @@
{elseif condition="($detail.check_status == 2)"}
<span class="green">审核通过,待开具</span>
{elseif condition="($detail.check_status == 3)"}
<span class="red">审核不通过 【原因:{$detail.check_remark}】</span>
<span class="red">审核不通过</span>
{elseif condition="($detail.check_status == 4)"}
<span class="red">已撤销 【原因:{$detail.check_remark}】</span>
<span class="red">已撤销</span>
{elseif condition="($detail.check_status == 5)"}
<span class="green">已开具</span>
{elseif condition="($detail.check_status == 10)"}

View File

@ -62,13 +62,15 @@
<td class="layui-td-gray">地址</td>
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value=""></td>
</tr>
{gt name=":isModule('contract')" value="0"}
<tr>
<td class="layui-td-gray">关联合同</td>
<td class="layui-td-gray">关联合同</td>
<td colspan="5">
<input type="text" class="layui-input contract-picker" name="contract_name" placeholder="请选择需要关联的合同" readonly value="">
<input type="hidden" class="layui-input" name="contract_id" value="0">
</td>
</tr>
{/gt}
<tr>
<td class="layui-td-gray">备注信息</td>
<td colspan="5"><textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea></td>
@ -156,13 +158,15 @@
<td class="layui-td-gray">地址</td>
<td colspan="3"><input type="text" name="invoice_address" class="layui-input" value="{$detail.invoice_address}"></td>
</tr>
{gt name=":isModule('contract')" value="0"}
<tr>
<td class="layui-td-gray">关联合同</td>
<td class="layui-td-gray">关联合同</td>
<td colspan="5">
<input type="text" class="layui-input contract-picker" name="contract_name" placeholder="请选择需要关联的合同" readonly value="{$detail.contract_name}">
<input type="hidden" class="layui-input" name="contract_id" value="{$detail.contract_id}">
</td>
</tr>
{/gt}
<tr>
<td class="layui-td-gray">备注信息</td>
<td colspan="5"><textarea name="remark" placeholder="请输入备注信息" class="layui-textarea">{$detail.remark}</textarea></td>

View File

@ -143,9 +143,9 @@
{elseif condition="($detail.check_status == 2)"}
<span class="green">审核通过,待开具</span>
{elseif condition="($detail.check_status == 3)"}
<span class="red">审核不通过 【原因:{$detail.check_remark}】</span>
<span class="red">审核不通过</span>
{elseif condition="($detail.check_status == 4)"}
<span class="red">已撤销 【原因:{$detail.check_remark}】</span>
<span class="red">已撤销</span>
{elseif condition="($detail.check_status == 5)"}
<span class="green">已开具</span>
{elseif condition="($detail.check_status == 10)"}

View File

@ -177,7 +177,8 @@
</div>
<div class="layui-row layui-col-space12">
<div class="layui-col-md12">
<div class="layui-col-md12">
{gt name=":isModule('project')" value="0"}
<div class="layui-card">
<div class="layui-card-title">项目列表</div>
<div style="padding: 12px;">
@ -190,6 +191,7 @@
<table id="Task" lay-filter="Task" class="layui-hide" style="margin-top:0"></table>
</div>
</div>
{/gt}
<div class="layui-card">
<div id="chartView" style="width: 100%;height:300px;"></div>
</div>

View File

@ -189,4 +189,4 @@ CREATE TABLE `oa_project_log` (
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '项目任务操作记录表';
INSERT INTO `oa_data_auth` VALUES ((SELECT MAX(id) +1 FROM `oa_data_auth` a), '项目管理员','project_admin','拥有该权限的员工可以查看所有项目。', 'contract', '',0,0,0,'立项阶段|实施阶段|验收阶段|交付阶段','','',1656143065, 0);
INSERT INTO `oa_data_auth` VALUES ((SELECT MAX(id) +1 FROM `oa_data_auth` a), '项目管理员','project_admin','拥有该权限的员工可以查看所有项目。', 'project', '',0,0,0,'立项阶段|实施阶段|验收阶段|交付阶段','','',1656143065, 0);

View File

@ -1,22 +1,18 @@
{
"name": "topthink/think",
"description": "the new thinkphp framework",
"name": "gougu/dev",
"description": "the gouguoa project",
"type": "project",
"keywords": [
"framework",
"thinkphp",
"ORM"
"dev",
"oa",
"cms"
],
"homepage": "http://thinkphp.cn/",
"license": "Apache-2.0",
"homepage": "http://www.gougucms.com/",
"license": "GPL-3.0",
"authors": [
{
"name": "liu21st",
"email": "liu21st@gmail.com"
},
{
"name": "yunwuxin",
"email": "448901948@qq.com"
"name": "dev",
"email": "hdm58@qq.com"
}
],
"require": {