Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
9b99ade6
Commit
9b99ade6
authored
Jul 12, 2023
by
dongjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增权限
parent
5b56c1cc
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1720 additions
and
14 deletions
+1720
-14
pom.xml
pom.xml
+1
-0
ruoyi-admin/pom.xml
ruoyi-admin/pom.xml
+7
-0
ruoyi-admin/src/main/resources/application-dev.yml
ruoyi-admin/src/main/resources/application-dev.yml
+2
-2
ruoyi-admin/src/main/resources/application-druid.yml
ruoyi-admin/src/main/resources/application-druid.yml
+2
-2
ruoyi-admin/src/main/resources/application.yml
ruoyi-admin/src/main/resources/application.yml
+2
-2
ruoyi-admin/src/main/resources/logback.xml
ruoyi-admin/src/main/resources/logback.xml
+1
-1
ruoyi-supplies/pom.xml
ruoyi-supplies/pom.xml
+18
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleController.java
...om/ruoyi/system/controller/ActSuppliesRoleController.java
+103
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
...yi/system/controller/ActSuppliesRoleDetailController.java
+103
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRole.java
...rc/main/java/com/ruoyi/system/domain/ActSuppliesRole.java
+83
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
...n/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
+97
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
.../com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
+61
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
...n/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
+61
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
...m/ruoyi/system/service/IActSuppliesRoleDetailService.java
+61
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleService.java
...ava/com/ruoyi/system/service/IActSuppliesRoleService.java
+61
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
...system/service/impl/ActSuppliesRoleDetailServiceImpl.java
+96
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
...ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
+96
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
...n/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
+87
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleMapper.xml
...rc/main/resources/mapper/system/ActSuppliesRoleMapper.xml
+82
-0
ruoyi-ui/src/api/system/suppliesrole.js
ruoyi-ui/src/api/system/suppliesrole.js
+53
-0
ruoyi-ui/src/api/system/suppliesroledetail.js
ruoyi-ui/src/api/system/suppliesroledetail.js
+53
-0
ruoyi-ui/src/views/system/supplies/index_back.vue
ruoyi-ui/src/views/system/supplies/index_back.vue
+0
-7
ruoyi-ui/src/views/system/suppliesrole/index.vue
ruoyi-ui/src/views/system/suppliesrole/index.vue
+291
-0
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+299
-0
No files found.
pom.xml
View file @
9b99ade6
...
...
@@ -229,6 +229,7 @@
<module>
ruoyi-generator
</module>
<module>
ruoyi-common
</module>
<module>
ruoyi-activiti
</module>
<module>
ruoyi-supplies
</module>
</modules>
<packaging>
pom
</packaging>
...
...
ruoyi-admin/pom.xml
View file @
9b99ade6
...
...
@@ -76,7 +76,14 @@
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-activiti
</artifactId>
<version>
${ruoyi.version}
</version>
</dependency>
<!-- 物料管理 -->
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-supplies
</artifactId>
<version>
3.4.0
</version>
</dependency>
</dependencies>
...
...
ruoyi-admin/src/main/resources/application-dev.yml
View file @
9b99ade6
...
...
@@ -6,9 +6,9 @@ spring:
druid
:
# 主库数据源
master
:
url
:
jdbc:mysql://localhost:3306/
hbghgz_sc
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://localhost:3306/
ry
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
123456
password
:
root
# 从库数据源
slave
:
# 从数据源开关/默认关闭
...
...
ruoyi-admin/src/main/resources/application-druid.yml
View file @
9b99ade6
...
...
@@ -6,9 +6,9 @@ spring:
druid
:
# 主库数据源 114.115.162.32 127.0.0.1 hbghgz jDkrSt5Ts77zXWCJ
master
:
url
:
jdbc:mysql://localhost:3306/
hbghgz_sc
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
url
:
jdbc:mysql://localhost:3306/
ry
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username
:
root
password
:
123456
password
:
root
# 从库数据源
slave
:
# 从数据源开关/默认关闭
...
...
ruoyi-admin/src/main/resources/application.yml
View file @
9b99ade6
...
...
@@ -11,11 +11,11 @@ ruoyi:
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
#profile: /data1/hbtyftp/http/ghgz/uploadPath
#profile: /www/wwwroot/ghgz/uploadPath #生成环境目录
profile
:
D:/develop/idea-workspace/klbsxt
/hbghgz/uploadPath
#本地环境目录
profile
:
H:/Project/java/klck/klck
/hbghgz/uploadPath
#本地环境目录
# 获取ip地址开关
addressEnabled
:
false
# 验证码类型 math 数组计算 char 字符验证
captchaType
:
char
captchaType
:
math
# 开发环境配置
server
:
...
...
ruoyi-admin/src/main/resources/logback.xml
View file @
9b99ade6
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property
name=
"log.path"
value=
"
D:/develop/idea-workspace/klbsxt
/hbghgz/logs"
/>
<property
name=
"log.path"
value=
"
H:/Project/java/klck/klck
/hbghgz/logs"
/>
<!-- 日志输出格式 -->
<property
name=
"log.pattern"
value=
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"
/>
...
...
ruoyi-supplies/pom.xml
0 → 100644
View file @
9b99ade6
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ruoyi
</artifactId>
<groupId>
com.ruoyi
</groupId>
<version>
3.4.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
ruoyi-supplies
</artifactId>
<dependencies>
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-common
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleController.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.controller
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.system.domain.ActSuppliesRole
;
import
com.ruoyi.system.service.IActSuppliesRoleService
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 导入规则Controller
*
* @author dongjg
* @date 2023-07-12
*/
@RestController
@RequestMapping
(
"/system/suppliesrole"
)
public
class
ActSuppliesRoleController
extends
BaseController
{
@Autowired
private
IActSuppliesRoleService
actSuppliesRoleService
;
/**
* 查询导入规则列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
ActSuppliesRole
actSuppliesRole
)
{
startPage
();
List
<
ActSuppliesRole
>
list
=
actSuppliesRoleService
.
selectActSuppliesRoleList
(
actSuppliesRole
);
return
getDataTable
(
list
);
}
/**
* 导出导入规则列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:export')"
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
ActSuppliesRole
actSuppliesRole
)
{
List
<
ActSuppliesRole
>
list
=
actSuppliesRoleService
.
selectActSuppliesRoleList
(
actSuppliesRole
);
ExcelUtil
<
ActSuppliesRole
>
util
=
new
ExcelUtil
<
ActSuppliesRole
>(
ActSuppliesRole
.
class
);
return
util
.
exportExcel
(
list
,
"导入规则数据"
);
}
/**
* 获取导入规则详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Integer
id
)
{
return
AjaxResult
.
success
(
actSuppliesRoleService
.
selectActSuppliesRoleById
(
id
));
}
/**
* 新增导入规则
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:add')"
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
ActSuppliesRole
actSuppliesRole
)
{
return
toAjax
(
actSuppliesRoleService
.
insertActSuppliesRole
(
actSuppliesRole
));
}
/**
* 修改导入规则
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:edit')"
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
ActSuppliesRole
actSuppliesRole
)
{
return
toAjax
(
actSuppliesRoleService
.
updateActSuppliesRole
(
actSuppliesRole
));
}
/**
* 删除导入规则
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:remove')"
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Integer
[]
ids
)
{
return
toAjax
(
actSuppliesRoleService
.
deleteActSuppliesRoleByIds
(
ids
));
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.controller
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.system.domain.ActSuppliesRoleDetail
;
import
com.ruoyi.system.service.IActSuppliesRoleDetailService
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 规则详情Controller
*
* @author dongjg
* @date 2023-07-12
*/
@RestController
@RequestMapping
(
"/system/suppliesroledetail"
)
public
class
ActSuppliesRoleDetailController
extends
BaseController
{
@Autowired
private
IActSuppliesRoleDetailService
actSuppliesRoleDetailService
;
/**
* 查询规则详情列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
startPage
();
List
<
ActSuppliesRoleDetail
>
list
=
actSuppliesRoleDetailService
.
selectActSuppliesRoleDetailList
(
actSuppliesRoleDetail
);
return
getDataTable
(
list
);
}
/**
* 导出规则详情列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:export')"
)
@Log
(
title
=
"规则详情"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
List
<
ActSuppliesRoleDetail
>
list
=
actSuppliesRoleDetailService
.
selectActSuppliesRoleDetailList
(
actSuppliesRoleDetail
);
ExcelUtil
<
ActSuppliesRoleDetail
>
util
=
new
ExcelUtil
<
ActSuppliesRoleDetail
>(
ActSuppliesRoleDetail
.
class
);
return
util
.
exportExcel
(
list
,
"规则详情数据"
);
}
/**
* 获取规则详情详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Integer
id
)
{
return
AjaxResult
.
success
(
actSuppliesRoleDetailService
.
selectActSuppliesRoleDetailById
(
id
));
}
/**
* 新增规则详情
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:add')"
)
@Log
(
title
=
"规则详情"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
return
toAjax
(
actSuppliesRoleDetailService
.
insertActSuppliesRoleDetail
(
actSuppliesRoleDetail
));
}
/**
* 修改规则详情
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:edit')"
)
@Log
(
title
=
"规则详情"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
return
toAjax
(
actSuppliesRoleDetailService
.
updateActSuppliesRoleDetail
(
actSuppliesRoleDetail
));
}
/**
* 删除规则详情
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:remove')"
)
@Log
(
title
=
"规则详情"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Integer
[]
ids
)
{
return
toAjax
(
actSuppliesRoleDetailService
.
deleteActSuppliesRoleDetailByIds
(
ids
));
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRole.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 导入规则对象 act_supplies_role
*
* @author dongjg
* @date 2023-07-12
*/
public
class
ActSuppliesRole
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** ID */
private
Integer
id
;
/** 模板ID */
@Excel
(
name
=
"模板ID"
)
private
Integer
tempId
;
/** 规则名称 */
@Excel
(
name
=
"规则名称"
)
private
String
roleName
;
/** 状态 */
@Excel
(
name
=
"状态"
)
private
Integer
status
;
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setTempId
(
Integer
tempId
)
{
this
.
tempId
=
tempId
;
}
public
Integer
getTempId
()
{
return
tempId
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
{
return
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"tempId"
,
getTempId
())
.
append
(
"roleName"
,
getRoleName
())
.
append
(
"status"
,
getStatus
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
toString
();
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesRoleDetail.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 规则详情对象 act_supplies_role_detail
*
* @author dongjg
* @date 2023-07-12
*/
public
class
ActSuppliesRoleDetail
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 规则详情ID */
private
Integer
id
;
/** 导入规则ID */
@Excel
(
name
=
"导入规则ID"
)
private
Integer
roleId
;
/** 规则名称 */
@Excel
(
name
=
"规则名称"
)
private
String
detailName
;
/** 规则内容 */
@Excel
(
name
=
"规则内容"
)
private
String
detailContent
;
/** 状态 */
@Excel
(
name
=
"状态"
)
private
Integer
status
;
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setDetailName
(
String
detailName
)
{
this
.
detailName
=
detailName
;
}
public
String
getDetailName
()
{
return
detailName
;
}
public
void
setDetailContent
(
String
detailContent
)
{
this
.
detailContent
=
detailContent
;
}
public
String
getDetailContent
()
{
return
detailContent
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
{
return
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"roleId"
,
getRoleId
())
.
append
(
"detailName"
,
getDetailName
())
.
append
(
"detailContent"
,
getDetailContent
())
.
append
(
"status"
,
getStatus
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
toString
();
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.mapper
;
import
java.util.List
;
import
com.ruoyi.system.domain.ActSuppliesRoleDetail
;
/**
* 规则详情Mapper接口
*
* @author dongjg
* @date 2023-07-12
*/
public
interface
ActSuppliesRoleDetailMapper
{
/**
* 查询规则详情
*
* @param id 规则详情ID
* @return 规则详情
*/
public
ActSuppliesRoleDetail
selectActSuppliesRoleDetailById
(
Integer
id
);
/**
* 查询规则详情列表
*
* @param actSuppliesRoleDetail 规则详情
* @return 规则详情集合
*/
public
List
<
ActSuppliesRoleDetail
>
selectActSuppliesRoleDetailList
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 新增规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
public
int
insertActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 修改规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
public
int
updateActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 删除规则详情
*
* @param id 规则详情ID
* @return 结果
*/
public
int
deleteActSuppliesRoleDetailById
(
Integer
id
);
/**
* 批量删除规则详情
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteActSuppliesRoleDetailByIds
(
Integer
[]
ids
);
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.mapper
;
import
java.util.List
;
import
com.ruoyi.system.domain.ActSuppliesRole
;
/**
* 导入规则Mapper接口
*
* @author dongjg
* @date 2023-07-12
*/
public
interface
ActSuppliesRoleMapper
{
/**
* 查询导入规则
*
* @param id 导入规则ID
* @return 导入规则
*/
public
ActSuppliesRole
selectActSuppliesRoleById
(
Integer
id
);
/**
* 查询导入规则列表
*
* @param actSuppliesRole 导入规则
* @return 导入规则集合
*/
public
List
<
ActSuppliesRole
>
selectActSuppliesRoleList
(
ActSuppliesRole
actSuppliesRole
);
/**
* 新增导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
public
int
insertActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
);
/**
* 修改导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
public
int
updateActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
);
/**
* 删除导入规则
*
* @param id 导入规则ID
* @return 结果
*/
public
int
deleteActSuppliesRoleById
(
Integer
id
);
/**
* 批量删除导入规则
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
);
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.service
;
import
java.util.List
;
import
com.ruoyi.system.domain.ActSuppliesRoleDetail
;
/**
* 规则详情Service接口
*
* @author dongjg
* @date 2023-07-12
*/
public
interface
IActSuppliesRoleDetailService
{
/**
* 查询规则详情
*
* @param id 规则详情ID
* @return 规则详情
*/
public
ActSuppliesRoleDetail
selectActSuppliesRoleDetailById
(
Integer
id
);
/**
* 查询规则详情列表
*
* @param actSuppliesRoleDetail 规则详情
* @return 规则详情集合
*/
public
List
<
ActSuppliesRoleDetail
>
selectActSuppliesRoleDetailList
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 新增规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
public
int
insertActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 修改规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
public
int
updateActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
/**
* 批量删除规则详情
*
* @param ids 需要删除的规则详情ID
* @return 结果
*/
public
int
deleteActSuppliesRoleDetailByIds
(
Integer
[]
ids
);
/**
* 删除规则详情信息
*
* @param id 规则详情ID
* @return 结果
*/
public
int
deleteActSuppliesRoleDetailById
(
Integer
id
);
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleService.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.service
;
import
java.util.List
;
import
com.ruoyi.system.domain.ActSuppliesRole
;
/**
* 导入规则Service接口
*
* @author dongjg
* @date 2023-07-12
*/
public
interface
IActSuppliesRoleService
{
/**
* 查询导入规则
*
* @param id 导入规则ID
* @return 导入规则
*/
public
ActSuppliesRole
selectActSuppliesRoleById
(
Integer
id
);
/**
* 查询导入规则列表
*
* @param actSuppliesRole 导入规则
* @return 导入规则集合
*/
public
List
<
ActSuppliesRole
>
selectActSuppliesRoleList
(
ActSuppliesRole
actSuppliesRole
);
/**
* 新增导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
public
int
insertActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
);
/**
* 修改导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
public
int
updateActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
);
/**
* 批量删除导入规则
*
* @param ids 需要删除的导入规则ID
* @return 结果
*/
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
);
/**
* 删除导入规则信息
*
* @param id 导入规则ID
* @return 结果
*/
public
int
deleteActSuppliesRoleById
(
Integer
id
);
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.service.impl
;
import
java.util.List
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.system.mapper.ActSuppliesRoleDetailMapper
;
import
com.ruoyi.system.domain.ActSuppliesRoleDetail
;
import
com.ruoyi.system.service.IActSuppliesRoleDetailService
;
/**
* 规则详情Service业务层处理
*
* @author dongjg
* @date 2023-07-12
*/
@Service
public
class
ActSuppliesRoleDetailServiceImpl
implements
IActSuppliesRoleDetailService
{
@Autowired
private
ActSuppliesRoleDetailMapper
actSuppliesRoleDetailMapper
;
/**
* 查询规则详情
*
* @param id 规则详情ID
* @return 规则详情
*/
@Override
public
ActSuppliesRoleDetail
selectActSuppliesRoleDetailById
(
Integer
id
)
{
return
actSuppliesRoleDetailMapper
.
selectActSuppliesRoleDetailById
(
id
);
}
/**
* 查询规则详情列表
*
* @param actSuppliesRoleDetail 规则详情
* @return 规则详情
*/
@Override
public
List
<
ActSuppliesRoleDetail
>
selectActSuppliesRoleDetailList
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
return
actSuppliesRoleDetailMapper
.
selectActSuppliesRoleDetailList
(
actSuppliesRoleDetail
);
}
/**
* 新增规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
@Override
public
int
insertActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
actSuppliesRoleDetail
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
actSuppliesRoleDetailMapper
.
insertActSuppliesRoleDetail
(
actSuppliesRoleDetail
);
}
/**
* 修改规则详情
*
* @param actSuppliesRoleDetail 规则详情
* @return 结果
*/
@Override
public
int
updateActSuppliesRoleDetail
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
)
{
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
actSuppliesRoleDetailMapper
.
updateActSuppliesRoleDetail
(
actSuppliesRoleDetail
);
}
/**
* 批量删除规则详情
*
* @param ids 需要删除的规则详情ID
* @return 结果
*/
@Override
public
int
deleteActSuppliesRoleDetailByIds
(
Integer
[]
ids
)
{
return
actSuppliesRoleDetailMapper
.
deleteActSuppliesRoleDetailByIds
(
ids
);
}
/**
* 删除规则详情信息
*
* @param id 规则详情ID
* @return 结果
*/
@Override
public
int
deleteActSuppliesRoleDetailById
(
Integer
id
)
{
return
actSuppliesRoleDetailMapper
.
deleteActSuppliesRoleDetailById
(
id
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
0 → 100644
View file @
9b99ade6
package
com.ruoyi.system.service.impl
;
import
java.util.List
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.system.mapper.ActSuppliesRoleMapper
;
import
com.ruoyi.system.domain.ActSuppliesRole
;
import
com.ruoyi.system.service.IActSuppliesRoleService
;
/**
* 导入规则Service业务层处理
*
* @author dongjg
* @date 2023-07-12
*/
@Service
public
class
ActSuppliesRoleServiceImpl
implements
IActSuppliesRoleService
{
@Autowired
private
ActSuppliesRoleMapper
actSuppliesRoleMapper
;
/**
* 查询导入规则
*
* @param id 导入规则ID
* @return 导入规则
*/
@Override
public
ActSuppliesRole
selectActSuppliesRoleById
(
Integer
id
)
{
return
actSuppliesRoleMapper
.
selectActSuppliesRoleById
(
id
);
}
/**
* 查询导入规则列表
*
* @param actSuppliesRole 导入规则
* @return 导入规则
*/
@Override
public
List
<
ActSuppliesRole
>
selectActSuppliesRoleList
(
ActSuppliesRole
actSuppliesRole
)
{
return
actSuppliesRoleMapper
.
selectActSuppliesRoleList
(
actSuppliesRole
);
}
/**
* 新增导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
@Override
public
int
insertActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
)
{
actSuppliesRole
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
actSuppliesRoleMapper
.
insertActSuppliesRole
(
actSuppliesRole
);
}
/**
* 修改导入规则
*
* @param actSuppliesRole 导入规则
* @return 结果
*/
@Override
public
int
updateActSuppliesRole
(
ActSuppliesRole
actSuppliesRole
)
{
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
actSuppliesRoleMapper
.
updateActSuppliesRole
(
actSuppliesRole
);
}
/**
* 批量删除导入规则
*
* @param ids 需要删除的导入规则ID
* @return 结果
*/
@Override
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
)
{
return
actSuppliesRoleMapper
.
deleteActSuppliesRoleByIds
(
ids
);
}
/**
* 删除导入规则信息
*
* @param id 导入规则ID
* @return 结果
*/
@Override
public
int
deleteActSuppliesRoleById
(
Integer
id
)
{
return
actSuppliesRoleMapper
.
deleteActSuppliesRoleById
(
id
);
}
}
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
0 → 100644
View file @
9b99ade6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.ActSuppliesRoleDetailMapper"
>
<resultMap
type=
"ActSuppliesRoleDetail"
id=
"ActSuppliesRoleDetailResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"roleId"
column=
"role_id"
/>
<result
property=
"detailName"
column=
"detail_name"
/>
<result
property=
"detailContent"
column=
"detail_content"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"selectActSuppliesRoleDetailVo"
>
select id, role_id, detail_name, detail_content, status, create_by, create_time, update_by, update_time from act_supplies_role_detail
</sql>
<select
id=
"selectActSuppliesRoleDetailList"
parameterType=
"ActSuppliesRoleDetail"
resultMap=
"ActSuppliesRoleDetailResult"
>
<include
refid=
"selectActSuppliesRoleDetailVo"
/>
<where>
<if
test=
"roleId != null "
>
and role_id = #{roleId}
</if>
<if
test=
"detailName != null and detailName != ''"
>
and detail_name like concat('%', #{detailName}, '%')
</if>
<if
test=
"detailContent != null and detailContent != ''"
>
and detail_content = #{detailContent}
</if>
<if
test=
"status != null "
>
and status = #{status}
</if>
</where>
</select>
<select
id=
"selectActSuppliesRoleDetailById"
parameterType=
"Integer"
resultMap=
"ActSuppliesRoleDetailResult"
>
<include
refid=
"selectActSuppliesRoleDetailVo"
/>
where id = #{id}
</select>
<insert
id=
"insertActSuppliesRoleDetail"
parameterType=
"ActSuppliesRoleDetail"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into act_supplies_role_detail
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"detailName != null"
>
detail_name,
</if>
<if
test=
"detailContent != null"
>
detail_content,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
#{roleId},
</if>
<if
test=
"detailName != null"
>
#{detailName},
</if>
<if
test=
"detailContent != null"
>
#{detailContent},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
</trim>
</insert>
<update
id=
"updateActSuppliesRoleDetail"
parameterType=
"ActSuppliesRoleDetail"
>
update act_supplies_role_detail
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
role_id = #{roleId},
</if>
<if
test=
"detailName != null"
>
detail_name = #{detailName},
</if>
<if
test=
"detailContent != null"
>
detail_content = #{detailContent},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteActSuppliesRoleDetailById"
parameterType=
"Integer"
>
delete from act_supplies_role_detail where id = #{id}
</delete>
<delete
id=
"deleteActSuppliesRoleDetailByIds"
parameterType=
"String"
>
delete from act_supplies_role_detail where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleMapper.xml
0 → 100644
View file @
9b99ade6
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.ActSuppliesRoleMapper"
>
<resultMap
type=
"ActSuppliesRole"
id=
"ActSuppliesRoleResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"tempId"
column=
"temp_id"
/>
<result
property=
"roleName"
column=
"role_name"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"selectActSuppliesRoleVo"
>
select id, temp_id, role_name, status, create_by, create_time, update_by, update_time from act_supplies_role
</sql>
<select
id=
"selectActSuppliesRoleList"
parameterType=
"ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
<include
refid=
"selectActSuppliesRoleVo"
/>
<where>
<if
test=
"tempId != null "
>
and temp_id = #{tempId}
</if>
<if
test=
"roleName != null and roleName != ''"
>
and role_name like concat('%', #{roleName}, '%')
</if>
<if
test=
"status != null "
>
and status = #{status}
</if>
</where>
</select>
<select
id=
"selectActSuppliesRoleById"
parameterType=
"Integer"
resultMap=
"ActSuppliesRoleResult"
>
<include
refid=
"selectActSuppliesRoleVo"
/>
where id = #{id}
</select>
<insert
id=
"insertActSuppliesRole"
parameterType=
"ActSuppliesRole"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into act_supplies_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"tempId != null"
>
temp_id,
</if>
<if
test=
"roleName != null"
>
role_name,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"tempId != null"
>
#{tempId},
</if>
<if
test=
"roleName != null"
>
#{roleName},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
</trim>
</insert>
<update
id=
"updateActSuppliesRole"
parameterType=
"ActSuppliesRole"
>
update act_supplies_role
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"tempId != null"
>
temp_id = #{tempId},
</if>
<if
test=
"roleName != null"
>
role_name = #{roleName},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteActSuppliesRoleById"
parameterType=
"Integer"
>
delete from act_supplies_role where id = #{id}
</delete>
<delete
id=
"deleteActSuppliesRoleByIds"
parameterType=
"String"
>
delete from act_supplies_role where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
ruoyi-ui/src/api/system/suppliesrole.js
0 → 100644
View file @
9b99ade6
import
request
from
'
@/utils/request
'
// 查询导入规则列表
export
function
listSuppliesrole
(
query
)
{
return
request
({
url
:
'
/system/suppliesrole/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询导入规则详细
export
function
getSuppliesrole
(
id
)
{
return
request
({
url
:
'
/system/suppliesrole/
'
+
id
,
method
:
'
get
'
})
}
// 新增导入规则
export
function
addSuppliesrole
(
data
)
{
return
request
({
url
:
'
/system/suppliesrole
'
,
method
:
'
post
'
,
data
:
data
})
}
// 修改导入规则
export
function
updateSuppliesrole
(
data
)
{
return
request
({
url
:
'
/system/suppliesrole
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除导入规则
export
function
delSuppliesrole
(
id
)
{
return
request
({
url
:
'
/system/suppliesrole/
'
+
id
,
method
:
'
delete
'
})
}
// 导出导入规则
export
function
exportSuppliesrole
(
query
)
{
return
request
({
url
:
'
/system/suppliesrole/export
'
,
method
:
'
get
'
,
params
:
query
})
}
\ No newline at end of file
ruoyi-ui/src/api/system/suppliesroledetail.js
0 → 100644
View file @
9b99ade6
import
request
from
'
@/utils/request
'
// 查询规则详情列表
export
function
listSuppliesroledetail
(
query
)
{
return
request
({
url
:
'
/system/suppliesroledetail/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询规则详情详细
export
function
getSuppliesroledetail
(
id
)
{
return
request
({
url
:
'
/system/suppliesroledetail/
'
+
id
,
method
:
'
get
'
})
}
// 新增规则详情
export
function
addSuppliesroledetail
(
data
)
{
return
request
({
url
:
'
/system/suppliesroledetail
'
,
method
:
'
post
'
,
data
:
data
})
}
// 修改规则详情
export
function
updateSuppliesroledetail
(
data
)
{
return
request
({
url
:
'
/system/suppliesroledetail
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除规则详情
export
function
delSuppliesroledetail
(
id
)
{
return
request
({
url
:
'
/system/suppliesroledetail/
'
+
id
,
method
:
'
delete
'
})
}
// 导出规则详情
export
function
exportSuppliesroledetail
(
query
)
{
return
request
({
url
:
'
/system/suppliesroledetail/export
'
,
method
:
'
get
'
,
params
:
query
})
}
\ No newline at end of file
ruoyi-ui/src/views/system/supplies/index_back.vue
View file @
9b99ade6
...
...
@@ -47,12 +47,7 @@
v-hasPermi=
"['system:supplies:export']"
>
导出
</el-button>
</el-col>
</el-row>
<!--导出-->
<el-button
type=
"primary"
@
click=
"deriveExcel"
>
导出
</el-button>
<!--导入-->
...
...
@@ -148,8 +143,6 @@
//返回数据
this
.
selectData
=
response
.
data
;
});
},
mounted
()
{
// In some cases, you need to use $nextTick
...
...
ruoyi-ui/src/views/system/suppliesrole/index.vue
0 → 100644
View file @
9b99ade6
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"模板ID"
prop=
"tempId"
>
<el-input
v-model=
"queryParams.tempId"
placeholder=
"请输入模板ID"
clearable
size=
"small"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"roleName"
>
<el-input
v-model=
"queryParams.roleName"
placeholder=
"请输入规则名称"
clearable
size=
"small"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:suppliesrole:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:suppliesrole:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:suppliesrole:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:suppliesrole:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"suppliesroleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"ID"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"模板ID"
align=
"center"
prop=
"tempId"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"roleName"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:suppliesrole:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:suppliesrole:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改导入规则对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"模板ID"
prop=
"tempId"
>
<el-input
v-model=
"form.tempId"
placeholder=
"请输入模板ID"
/>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"roleName"
>
<el-input
v-model=
"form.roleName"
placeholder=
"请输入规则名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSuppliesrole
,
getSuppliesrole
,
delSuppliesrole
,
addSuppliesrole
,
updateSuppliesrole
,
exportSuppliesrole
}
from
"
@/api/system/suppliesrole
"
;
export
default
{
name
:
"
Suppliesrole
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 导入规则表格数据
suppliesroleList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
tempId
:
null
,
roleName
:
null
,
status
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询导入规则列表 */
getList
()
{
this
.
loading
=
true
;
listSuppliesrole
(
this
.
queryParams
).
then
(
response
=>
{
this
.
suppliesroleList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
tempId
:
null
,
roleName
:
null
,
status
:
0
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加导入规则
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getSuppliesrole
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改导入规则
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSuppliesrole
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSuppliesrole
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除导入规则编号为"
'
+
ids
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSuppliesrole
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有导入规则数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSuppliesrole
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
};
</
script
>
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
0 → 100644
View file @
9b99ade6
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"导入规则ID"
prop=
"roleId"
>
<el-input
v-model=
"queryParams.roleId"
placeholder=
"请输入导入规则ID"
clearable
size=
"small"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-input
v-model=
"queryParams.detailName"
placeholder=
"请输入规则名称"
clearable
size=
"small"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:suppliesroledetail:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:suppliesroledetail:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:suppliesroledetail:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"suppliesroledetailList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"规则详情ID"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"导入规则ID"
align=
"center"
prop=
"roleId"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"detailName"
/>
<el-table-column
label=
"规则内容"
align=
"center"
prop=
"detailContent"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改规则详情对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"导入规则ID"
prop=
"roleId"
>
<el-input
v-model=
"form.roleId"
placeholder=
"请输入导入规则ID"
/>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-input
v-model=
"form.detailName"
placeholder=
"请输入规则名称"
/>
</el-form-item>
<el-form-item
label=
"规则内容"
>
<editor
v-model=
"form.detailContent"
:min-height=
"192"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
label=
"1"
>
请选择字典生成
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
listSuppliesroledetail
,
getSuppliesroledetail
,
delSuppliesroledetail
,
addSuppliesroledetail
,
updateSuppliesroledetail
,
exportSuppliesroledetail
}
from
"
@/api/system/suppliesroledetail
"
;
import
Editor
from
'
@/components/Editor
'
;
export
default
{
name
:
"
Suppliesroledetail
"
,
components
:
{
Editor
,
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 规则详情表格数据
suppliesroledetailList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
roleId
:
null
,
detailName
:
null
,
detailContent
:
null
,
status
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询规则详情列表 */
getList
()
{
this
.
loading
=
true
;
listSuppliesroledetail
(
this
.
queryParams
).
then
(
response
=>
{
this
.
suppliesroledetailList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
roleId
:
null
,
detailName
:
null
,
detailContent
:
null
,
status
:
0
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加规则详情
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getSuppliesroledetail
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改规则详情
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除规则详情编号为"
'
+
ids
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSuppliesroledetail
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有规则详情数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSuppliesroledetail
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
};
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment