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
852b30d4
Commit
852b30d4
authored
Aug 08, 2023
by
lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物资模板模块添加发布功能添加导入时的加载遮罩层,规则模块发布功能,历史数据模块后端保存接口,
parent
d9814bae
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
784 additions
and
257 deletions
+784
-257
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
...ruoyi/system/controller/ActSuppliesConvertController.java
+7
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
...i/system/controller/ActSuppliesHistorydataController.java
+19
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleController.java
...om/ruoyi/system/controller/ActSuppliesRoleController.java
+34
-5
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesTemplateController.java
...uoyi/system/controller/ActSuppliesTemplateController.java
+5
-4
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHTRImport.java
...in/java/com/ruoyi/system/domain/ActSuppliesHTRImport.java
+15
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
...com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
+9
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
.../com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
+2
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
...n/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
+12
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesTemplateMapper.java
...va/com/ruoyi/system/mapper/ActSuppliesTemplateMapper.java
+5
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/ActSuppliesTemplateService.java
.../com/ruoyi/system/service/ActSuppliesTemplateService.java
+1
-3
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesHistorydataService.java
.../ruoyi/system/service/IActSuppliesHistorydataService.java
+3
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleService.java
...ava/com/ruoyi/system/service/IActSuppliesRoleService.java
+4
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+55
-4
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
...ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
+145
-2
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesTemplateServiceImpl.java
...i/system/service/impl/ActSuppliesTemplateServiceImpl.java
+29
-22
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
.../resources/mapper/system/ActSuppliesHistorydataMapper.xml
+27
-1
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
...n/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
+12
-24
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleMapper.xml
...rc/main/resources/mapper/system/ActSuppliesRoleMapper.xml
+26
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesTemplateMapper.xml
...ain/resources/mapper/system/ActSuppliesTemplateMapper.xml
+12
-5
ruoyi-ui/public/exportExcel.js
ruoyi-ui/public/exportExcel.js
+7
-5
ruoyi-ui/src/api/system/historydata.js
ruoyi-ui/src/api/system/historydata.js
+10
-1
ruoyi-ui/src/api/system/suppliesrole.js
ruoyi-ui/src/api/system/suppliesrole.js
+17
-0
ruoyi-ui/src/views/system/supplies/index_template.vue
ruoyi-ui/src/views/system/supplies/index_template.vue
+103
-41
ruoyi-ui/src/views/system/suppliesrole/index.vue
ruoyi-ui/src/views/system/suppliesrole/index.vue
+148
-36
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+77
-98
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
View file @
852b30d4
...
@@ -86,7 +86,9 @@ public class ActSuppliesConvertController extends BaseController{
...
@@ -86,7 +86,9 @@ public class ActSuppliesConvertController extends BaseController{
}
}
/**
* 物料转换
* */
@PreAuthorize
(
"@ss.hasPermi('ActSuppliesConvert:ActSuppliesConvert:converSupplies')"
)
@PreAuthorize
(
"@ss.hasPermi('ActSuppliesConvert:ActSuppliesConvert:converSupplies')"
)
@PostMapping
(
"/converSupplies"
)
@PostMapping
(
"/converSupplies"
)
public
TableDataInfo
convertSupplies
(
@RequestBody
String
[]
names
){
public
TableDataInfo
convertSupplies
(
@RequestBody
String
[]
names
){
...
@@ -112,5 +114,9 @@ public class ActSuppliesConvertController extends BaseController{
...
@@ -112,5 +114,9 @@ public class ActSuppliesConvertController extends BaseController{
}
}
/**
*
* */
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesHistorydataController.java
View file @
852b30d4
package
com.ruoyi.system.controller
;
package
com.ruoyi.system.controller
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -74,7 +75,7 @@ public class ActSuppliesHistorydataController extends BaseController
...
@@ -74,7 +75,7 @@ public class ActSuppliesHistorydataController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:historydata:add')"
)
@PreAuthorize
(
"@ss.hasPermi('system:historydata:add')"
)
@Log
(
title
=
" 历史数据"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
" 历史数据"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
public
AjaxResult
add
(
@RequestBody
ActSuppliesHistorydata
actSuppliesHistorydata
)
public
AjaxResult
add
(
@RequestBody
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
{
return
toAjax
(
actSuppliesHistorydataService
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata
));
return
toAjax
(
actSuppliesHistorydataService
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata
));
}
}
...
@@ -100,4 +101,21 @@ public class ActSuppliesHistorydataController extends BaseController
...
@@ -100,4 +101,21 @@ public class ActSuppliesHistorydataController extends BaseController
{
{
return
toAjax
(
actSuppliesHistorydataService
.
deleteActSuppliesHistorydataByIds
(
ids
));
return
toAjax
(
actSuppliesHistorydataService
.
deleteActSuppliesHistorydataByIds
(
ids
));
}
}
/**
* 添加 历史数据
*/
@PreAuthorize
(
"@ss.hasPermi('system:historydata:addInsert')"
)
@Log
(
title
=
" 历史数据"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/addInsert"
)
public
AjaxResult
addInsert
(
@RequestBody
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
actSuppliesHistorydataService
.
addInsertActSuppliesHistorydata
(
actSuppliesHistorydata
);
return
toAjax
(
1
);
}
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleController.java
View file @
852b30d4
package
com.ruoyi.system.controller
;
package
com.ruoyi.system.controller
;
import
java.lang.reflect.Array
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -162,13 +163,12 @@ public class ActSuppliesRoleController extends BaseController
...
@@ -162,13 +163,12 @@ public class ActSuppliesRoleController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:remove')"
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"导入规则"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Integer
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
{
if
(
actSuppliesRoleService
.
findall
(
ids
).
size
()>
0
){
// if (actSuppliesRoleService.findall(ids).size()>0){
return
AjaxResult
.
error
(
"该规则下存在关联规则,请先删除关联规则!!!"
,
"操作失败"
);
// return AjaxResult.error("该规则下存在关联规则,请先删除关联规则!!!","操作失败");
}
// }
return
toAjax
(
actSuppliesRoleService
.
deleteActSuppliesRoleByIds
(
ids
));
return
toAjax
(
actSuppliesRoleService
.
deleteActSuppliesRoleByIds
(
ids
));
}
}
...
@@ -201,4 +201,33 @@ public class ActSuppliesRoleController extends BaseController
...
@@ -201,4 +201,33 @@ public class ActSuppliesRoleController extends BaseController
return
AjaxResult
.
success
(
"200"
,
"修改成功"
);
return
AjaxResult
.
success
(
"200"
,
"修改成功"
);
}
}
/**
* 发布Excel模板
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:releaseRS')"
)
@Log
(
title
=
"Excel模板"
,
businessType
=
BusinessType
.
UPDATE
)
@GetMapping
(
"/releaseRS/{ids}/{tempids}"
)
public
AjaxResult
releaseRS
(
@PathVariable
(
"ids"
)
Long
[]
ids
,
@PathVariable
(
"tempids"
)
Long
[]
tempids
)
{
List
<
String
>
longs
=
actSuppliesRoleService
.
releaseRS
(
ids
,
tempids
);
String
s
=
longs
.
toString
();
if
(
longs
.
size
()>
0
){
return
AjaxResult
.
success
(
"312"
,
s
);
}
else
{
return
AjaxResult
.
success
(
200
);
}
}
/**
* 下架Excel模板
*/
@PreAuthorize
(
"@ss.hasPermi('system:suppliesrole:offShelfRS')"
)
@Log
(
title
=
"Excel模板"
,
businessType
=
BusinessType
.
UPDATE
)
@GetMapping
(
"/offShelfRS/{ids}"
)
public
AjaxResult
offShelfRS
(
@PathVariable
(
"ids"
)
Long
[]
ids
)
{
return
toAjax
(
actSuppliesRoleService
.
offShelfRS
(
ids
));
}
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesTemplateController.java
View file @
852b30d4
...
@@ -136,13 +136,14 @@ public class ActSuppliesTemplateController extends BaseController {
...
@@ -136,13 +136,14 @@ public class ActSuppliesTemplateController extends BaseController {
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
List
<
String
>
list
=
actSuppliesTemplateService
.
deleteSuppliesTemplateByIds
(
ids
);
if
(
list
.
size
()>
0
){
return
AjaxResult
.
success
(
"312"
,
list
.
toArray
());
}
// if (actSuppliesTemplateService.findall(ids).size()>0){
return
toAjax
(
1
);
// return AjaxResult.error("该模板下存在关联规则,请先删除关联规则!!!","操作失败");
// }
return
toAjax
(
actSuppliesTemplateService
.
deleteSuppliesTemplateByIds
(
ids
));
}
}
/**
/**
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSuppliesHTRImport.java
0 → 100644
View file @
852b30d4
package
com.ruoyi.system.domain
;
public
class
ActSuppliesHTRImport
{
private
Long
uuid
;
private
Long
roleId
;
private
Long
tempId
;
private
String
HistoryContentImport
;
private
Long
identCode
;
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesHistorydataMapper.java
View file @
852b30d4
...
@@ -58,4 +58,13 @@ public interface ActSuppliesHistorydataMapper
...
@@ -58,4 +58,13 @@ public interface ActSuppliesHistorydataMapper
* @return 结果
* @return 结果
*/
*/
public
int
deleteActSuppliesHistorydataByIds
(
Long
[]
ids
);
public
int
deleteActSuppliesHistorydataByIds
(
Long
[]
ids
);
Long
[]
selectActSuppliesRole
(
Long
templateId
);
Long
selectActSuppliesHistorydatauuid
(
String
exportUuid
);
void
insertActSuppliesHistorydatas
(
ActSuppliesHistorydata
actSuppliesHistorydata1
);
void
updateActSuppliesHistorydatas
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
View file @
852b30d4
...
@@ -66,5 +66,7 @@ public interface ActSuppliesRoleDetailMapper
...
@@ -66,5 +66,7 @@ public interface ActSuppliesRoleDetailMapper
List
<
ActSuppliesRole
>
saveSid
();
List
<
ActSuppliesRole
>
saveSid
();
void
updateRoleDetailStatus
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
// List<ActOperation> saveOperation();
// List<ActOperation> saveOperation();
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleMapper.java
View file @
852b30d4
...
@@ -81,7 +81,7 @@ public interface ActSuppliesRoleMapper
...
@@ -81,7 +81,7 @@ public interface ActSuppliesRoleMapper
* @param ids 需要删除的数据ID
* @param ids 需要删除的数据ID
* @return 结果
* @return 结果
*/
*/
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
);
public
int
deleteActSuppliesRoleByIds
(
Long
[]
ids
);
List
<
ActSuppliesTemplate
>
saveSid
();
List
<
ActSuppliesTemplate
>
saveSid
();
...
@@ -91,6 +91,17 @@ public interface ActSuppliesRoleMapper
...
@@ -91,6 +91,17 @@ public interface ActSuppliesRoleMapper
public
int
countByRoleName
(
ActSuppliesRole
actSuppliesRole
);
public
int
countByRoleName
(
ActSuppliesRole
actSuppliesRole
);
Integer
saveTemp
(
Long
tempids
);
void
updateRelease
(
ActSuppliesRole
actSuppliesRole
);
String
saveRoleName
(
Long
id
);
int
saveHistory
(
Long
id
);
void
updateReleaseoff
(
Long
id
);
void
updateReleaseoffone
(
Long
id
);
void
saveStatus
(
Integer
[]
ids
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesTemplateMapper.java
View file @
852b30d4
...
@@ -27,13 +27,15 @@ public interface ActSuppliesTemplateMapper
...
@@ -27,13 +27,15 @@ public interface ActSuppliesTemplateMapper
int
updateSuppliesTemplate
(
ActSuppliesTemplate
sysSupplies
);
int
updateSuppliesTemplate
(
ActSuppliesTemplate
sysSupplies
);
int
deleteSuppliesTemplateById
(
Long
ids
);
int
deleteSuppliesTemplateByIds
(
Long
[]
ids
);
int
deleteSuppliesTemplateByIds
(
Long
[]
ids
);
int
updateSuppliesTemplateByIds
(
Long
[]
ids
);
int
updateSuppliesTemplateByIds
(
Long
[]
ids
);
List
<
ActSuppliesTemplate
>
saveTemplate
(
Long
id
);
List
<
ActSuppliesTemplate
>
saveTemplate
(
Long
id
);
L
ist
<
Integer
>
findall
(
Long
[]
ids
);
L
ong
findall
(
Long
ids
);
List
<
Integer
>
find
(
Long
id
);
List
<
Integer
>
find
(
Long
id
);
...
@@ -42,4 +44,6 @@ public interface ActSuppliesTemplateMapper
...
@@ -42,4 +44,6 @@ public interface ActSuppliesTemplateMapper
List
<
ActSuppliesTemplate
>
saveTemplateStatus
(
Long
[]
ids
);
List
<
ActSuppliesTemplate
>
saveTemplateStatus
(
Long
[]
ids
);
int
selectHistory
(
Long
id
);
int
selectHistory
(
Long
id
);
void
updateRelease
(
ActSuppliesTemplate
actSuppliesTemplate
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/ActSuppliesTemplateService.java
View file @
852b30d4
...
@@ -22,12 +22,10 @@ public interface ActSuppliesTemplateService
...
@@ -22,12 +22,10 @@ public interface ActSuppliesTemplateService
int
updateSuppliesTemplate
(
ActSuppliesTemplate
sysSupplies
);
int
updateSuppliesTemplate
(
ActSuppliesTemplate
sysSupplies
);
int
deleteSuppliesTemplateByIds
(
Long
[]
ids
);
List
<
String
>
deleteSuppliesTemplateByIds
(
Long
[]
ids
);
List
<
ActSuppliesTemplate
>
saveTemplate
(
Long
id
);
List
<
ActSuppliesTemplate
>
saveTemplate
(
Long
id
);
List
<
Integer
>
findall
(
Long
[]
ids
);
List
<
Integer
>
find
(
Long
id
);
List
<
Integer
>
find
(
Long
id
);
/**
/**
* 启用物料细分类管理
* 启用物料细分类管理
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesHistorydataService.java
View file @
852b30d4
...
@@ -33,7 +33,7 @@ public interface IActSuppliesHistorydataService
...
@@ -33,7 +33,7 @@ public interface IActSuppliesHistorydataService
* @param actSuppliesHistorydata 历史数据
* @param actSuppliesHistorydata 历史数据
* @return 结果
* @return 结果
*/
*/
public
int
insertActSuppliesHistorydata
(
ActSuppliesHistorydata
actSuppliesHistorydata
);
public
int
insertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
);
/**
/**
* 修改 历史数据
* 修改 历史数据
...
@@ -58,4 +58,6 @@ public interface IActSuppliesHistorydataService
...
@@ -58,4 +58,6 @@ public interface IActSuppliesHistorydataService
* @return 结果
* @return 结果
*/
*/
public
int
deleteActSuppliesHistorydataById
(
Long
id
);
public
int
deleteActSuppliesHistorydataById
(
Long
id
);
int
addInsertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleService.java
View file @
852b30d4
...
@@ -71,7 +71,7 @@ public interface IActSuppliesRoleService
...
@@ -71,7 +71,7 @@ public interface IActSuppliesRoleService
* @param ids 需要删除的导入规则ID
* @param ids 需要删除的导入规则ID
* @return 结果
* @return 结果
*/
*/
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
);
public
int
deleteActSuppliesRoleByIds
(
Long
[]
ids
);
/**
/**
* 删除导入规则信息
* 删除导入规则信息
...
@@ -100,4 +100,7 @@ public interface IActSuppliesRoleService
...
@@ -100,4 +100,7 @@ public interface IActSuppliesRoleService
List
<
Integer
>
findall
(
Integer
[]
ids
);
List
<
Integer
>
findall
(
Integer
[]
ids
);
List
<
Integer
>
find
(
Integer
id
);
List
<
Integer
>
find
(
Integer
id
);
List
<
String
>
releaseRS
(
Long
[]
ids
,
Long
[]
tempids
);
int
offShelfRS
(
Long
[]
ids
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
852b30d4
package
com.ruoyi.system.service.impl
;
package
com.ruoyi.system.service.impl
;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.system.mapper.ActSuppliesHistorydataMapper
;
import
com.ruoyi.system.mapper.ActSuppliesHistorydataMapper
;
...
@@ -15,7 +18,7 @@ import com.ruoyi.system.service.IActSuppliesHistorydataService;
...
@@ -15,7 +18,7 @@ import com.ruoyi.system.service.IActSuppliesHistorydataService;
* @date 2023-08-01
* @date 2023-08-01
*/
*/
@Service
@Service
public
class
ActSuppliesHistorydataServiceImpl
implements
IActSuppliesHistorydataService
public
class
ActSuppliesHistorydataServiceImpl
implements
IActSuppliesHistorydataService
{
{
@Autowired
@Autowired
private
ActSuppliesHistorydataMapper
actSuppliesHistorydataMapper
;
private
ActSuppliesHistorydataMapper
actSuppliesHistorydataMapper
;
...
@@ -51,10 +54,15 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -51,10 +54,15 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
insertActSuppliesHistorydata
(
ActSuppliesHistorydata
actSuppliesHistorydata
)
public
int
insertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
{
actSuppliesHistorydata
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata
);
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++){
Long
status
=
actSuppliesHistorydata
.
get
(
i
).
getStatus
();
}
return
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata
.
get
(
0
));
}
}
/**
/**
...
@@ -92,4 +100,47 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -92,4 +100,47 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
{
{
return
actSuppliesHistorydataMapper
.
deleteActSuppliesHistorydataById
(
id
);
return
actSuppliesHistorydataMapper
.
deleteActSuppliesHistorydataById
(
id
);
}
}
@Override
public
int
addInsertActSuppliesHistorydata
(
List
<
ActSuppliesHistorydata
>
actSuppliesHistorydata
)
{
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
ActSuppliesHistorydata
actSuppliesHistorydata1
=
new
ActSuppliesHistorydata
();
Long
s
=
actSuppliesHistorydataMapper
.
selectActSuppliesHistorydatauuid
(
actSuppliesHistorydata
.
get
(
0
).
getExportUuid
());
if
(
s
>
0
){
}
else
{
Long
[]
longs
=
actSuppliesHistorydataMapper
.
selectActSuppliesRole
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
for
(
int
i
=
0
;
i
<
longs
.
length
;
i
++){
actSuppliesHistorydata1
.
setImportUuid
(
actSuppliesHistorydata
.
get
(
0
).
getImportUuid
());
actSuppliesHistorydata1
.
setTemplateId
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
actSuppliesHistorydata1
.
setRoleId
(
longs
[
i
]);
actSuppliesHistorydata1
.
setStatus
(
1L
);
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata1
);
}
actSuppliesHistorydata1
.
setImportUuid
(
actSuppliesHistorydata
.
get
(
0
).
getImportUuid
());
actSuppliesHistorydata1
.
setTemplateId
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
actSuppliesHistorydata1
.
setStatus
(
1L
);
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydatas
(
actSuppliesHistorydata1
);
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++){
actSuppliesHistorydata
.
get
(
i
).
setCreateBy
(
user
.
getUserName
());
actSuppliesHistorydata
.
get
(
i
).
setCreateTime
(
DateUtils
.
getNowDate
());
actSuppliesHistorydataMapper
.
updateActSuppliesHistorydatas
(
actSuppliesHistorydata
.
get
(
i
));
}
}
return
0
;
}
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleServiceImpl.java
View file @
852b30d4
...
@@ -8,6 +8,7 @@ import com.ruoyi.common.utils.DateUtils;
...
@@ -8,6 +8,7 @@ import com.ruoyi.common.utils.DateUtils;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.system.domain.*
;
import
com.ruoyi.system.domain.*
;
import
com.ruoyi.system.ex.ServiceException
;
import
com.ruoyi.system.ex.ServiceException
;
import
com.ruoyi.system.mapper.ActSuppliesRoleDetailMapper
;
import
com.ruoyi.system.web.ServiceCode
;
import
com.ruoyi.system.web.ServiceCode
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,6 +28,9 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
...
@@ -27,6 +28,9 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
@Autowired
@Autowired
private
ActSuppliesRoleMapper
actSuppliesRoleMapper
;
private
ActSuppliesRoleMapper
actSuppliesRoleMapper
;
@Autowired
private
ActSuppliesRoleDetailMapper
actSuppliesRoleDetailMapper
;
/**
/**
* 查询导入规则
* 查询导入规则
*
*
...
@@ -149,9 +153,52 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
...
@@ -149,9 +153,52 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
deleteActSuppliesRoleByIds
(
Integer
[]
ids
)
public
int
deleteActSuppliesRoleByIds
(
Long
[]
ids
)
{
{
return
actSuppliesRoleMapper
.
deleteActSuppliesRoleByIds
(
ids
);
ActSuppliesRole
actSuppliesRole
=
new
ActSuppliesRole
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
ActSuppliesRoleDetail
actSuppliesRoleDetail
=
new
ActSuppliesRoleDetail
();
for
(
int
i
=
0
;
i
<
ids
.
length
;
i
++){
int
i1
=
actSuppliesRoleMapper
.
saveHistory
(
ids
[
0
]);
if
(
i1
>
0
){
actSuppliesRole
.
setId
(
ids
[
i
]);
actSuppliesRole
.
setStatus
(
2
);
actSuppliesRole
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleMapper
.
updateRelease
(
actSuppliesRole
);
actSuppliesRoleDetail
.
setRoleId
(
ids
[
i
].
intValue
());
actSuppliesRoleDetail
.
setStatus
(
2
);
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleDetailMapper
.
updateRoleDetailStatus
(
actSuppliesRoleDetail
);
}
else
{
ActSuppliesRole
actSuppliesRole1
=
actSuppliesRoleMapper
.
selectActSuppliesRoleById
(
ids
[
i
].
intValue
());
if
(
actSuppliesRole1
.
getStatus
()
==
0
){
actSuppliesRole
.
setId
(
ids
[
i
]);
actSuppliesRole
.
setStatus
(
1
);
actSuppliesRole
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleMapper
.
updateRelease
(
actSuppliesRole
);
actSuppliesRoleDetail
.
setRoleId
(
ids
[
i
].
intValue
());
actSuppliesRoleDetail
.
setStatus
(
1
);
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleDetailMapper
.
updateRoleDetailStatus
(
actSuppliesRoleDetail
);
}
else
{
actSuppliesRoleMapper
.
deleteActSuppliesRoleById
(
ids
[
i
].
intValue
());
actSuppliesRoleDetailMapper
.
deleteActSuppliesRoleDetailById
(
ids
[
i
].
intValue
());
}
}
}
return
1
;
}
}
/**
/**
...
@@ -191,6 +238,102 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
...
@@ -191,6 +238,102 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
return
actSuppliesRoleMapper
.
find
(
id
);
return
actSuppliesRoleMapper
.
find
(
id
);
}
}
/**
* 发布规则
*
* @param ids,tempids 导入规则ID
* @return 结果
*/
@Override
public
List
<
String
>
releaseRS
(
Long
[]
ids
,
Long
[]
tempids
)
{
List
<
String
>
releER
=
new
ArrayList
<>();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
ActSuppliesRole
actSuppliesRole
=
new
ActSuppliesRole
();
ActSuppliesRoleDetail
actSuppliesRoleDetail
=
new
ActSuppliesRoleDetail
();
for
(
int
i
=
0
;
i
<
ids
.
length
;
i
++){
//查询所属模板是否发布
Integer
integer
=
actSuppliesRoleMapper
.
saveTemp
(
tempids
[
i
]);
if
(
integer
!=
null
&&
integer
>
0
){
actSuppliesRole
.
setId
(
ids
[
i
]);
actSuppliesRole
.
setStatus
(
0
);
actSuppliesRole
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleMapper
.
updateRelease
(
actSuppliesRole
);
actSuppliesRoleDetail
.
setRoleId
(
ids
[
i
].
intValue
());
actSuppliesRoleDetail
.
setStatus
(
0
);
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleDetailMapper
.
updateRoleDetailStatus
(
actSuppliesRoleDetail
);
}
else
{
String
name
=
actSuppliesRoleMapper
.
saveRoleName
(
ids
[
i
]);
releER
.
add
(
name
);
}
}
return
releER
;
}
/**
* 下架规则
*
* @param ids 导入规则ID
* @return 结果
*/
@Override
public
int
offShelfRS
(
Long
[]
ids
)
{
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
ActSuppliesRole
actSuppliesRole
=
new
ActSuppliesRole
();
ActSuppliesRoleDetail
actSuppliesRoleDetail
=
new
ActSuppliesRoleDetail
();
for
(
int
i
=
0
;
i
<
ids
.
length
;
i
++){
//查询历史数据是否引用
int
count
=
actSuppliesRoleMapper
.
saveHistory
(
ids
[
i
]);
if
(
count
>
0
){
actSuppliesRole
.
setId
(
ids
[
i
]);
actSuppliesRole
.
setStatus
(
2
);
actSuppliesRole
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleMapper
.
updateRelease
(
actSuppliesRole
);
actSuppliesRoleDetail
.
setRoleId
(
ids
[
i
].
intValue
());
actSuppliesRoleDetail
.
setStatus
(
2
);
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleDetailMapper
.
updateRoleDetailStatus
(
actSuppliesRoleDetail
);
}
else
{
actSuppliesRole
.
setId
(
ids
[
i
]);
actSuppliesRole
.
setStatus
(
1
);
actSuppliesRole
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleMapper
.
updateRelease
(
actSuppliesRole
);
actSuppliesRoleDetail
.
setRoleId
(
ids
[
i
].
intValue
());
actSuppliesRoleDetail
.
setStatus
(
1
);
actSuppliesRoleDetail
.
setUpdateBy
(
user
.
getUserName
());
actSuppliesRoleDetail
.
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesRoleDetailMapper
.
updateRoleDetailStatus
(
actSuppliesRoleDetail
);
}
}
return
1
;
}
private
void
updateStatusById
(
Long
id
,
Integer
status
){
private
void
updateStatusById
(
Long
id
,
Integer
status
){
String
[]
statusText
={
"禁用"
,
"启用"
};
String
[]
statusText
={
"禁用"
,
"启用"
};
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesTemplateServiceImpl.java
View file @
852b30d4
package
com.ruoyi.system.service.impl
;
package
com.ruoyi.system.service.impl
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
...
@@ -9,6 +10,7 @@ import com.ruoyi.system.service.ActSuppliesTemplateService;
...
@@ -9,6 +10,7 @@ import com.ruoyi.system.service.ActSuppliesTemplateService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -57,37 +59,45 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
...
@@ -57,37 +59,45 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
}
}
@Override
@Override
public
int
deleteSuppliesTemplateByIds
(
Long
[]
ids
)
{
public
List
<
String
>
deleteSuppliesTemplateByIds
(
Long
[]
ids
)
{
List
<
ActSuppliesTemplate
>
actSuppliesTemplate
=
actSuppliesTemplateMapper
.
saveTemplateStatus
(
ids
);
List
<
ActSuppliesTemplate
>
actSuppliesTemplate
=
actSuppliesTemplateMapper
.
saveTemplateStatus
(
ids
);
List
<
String
>
releER
=
new
ArrayList
<>();
List
<
Long
>
idsd
=
new
LinkedList
<>();
List
<
Long
>
idsu
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
actSuppliesTemplate
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
actSuppliesTemplate
.
size
();
i
++)
{
if
(
actSuppliesTemplate
.
get
(
i
).
getStatus
()==
1
)
{
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
if
(
actSuppliesTemplate
.
get
(
i
).
getStatus
()==
0
)
{
idsd
.
add
(
actSuppliesTemplate
.
get
(
i
).
getId
());
}
else
{
int
count
=
actSuppliesTemplateMapper
.
selectHistory
(
actSuppliesTemplate
.
get
(
i
).
getId
());
int
count
=
actSuppliesTemplateMapper
.
selectHistory
(
actSuppliesTemplate
.
get
(
i
).
getId
());
if
(
count
>
0
){
if
(
count
>
0
){
idsu
.
add
(
actSuppliesTemplate
.
get
(
i
).
getId
());
actSuppliesTemplate
.
get
(
i
).
setStatus
(
2
);
actSuppliesTemplate
.
get
(
i
).
setUpdateBy
(
user
.
getUserName
());
actSuppliesTemplate
.
get
(
i
).
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesTemplateMapper
.
updateRelease
(
actSuppliesTemplate
.
get
(
i
));
}
else
{
}
else
{
idsd
.
add
(
actSuppliesTemplate
.
get
(
i
).
getId
());
actSuppliesTemplate
.
get
(
i
).
setStatus
(
1
);
actSuppliesTemplate
.
get
(
i
).
setUpdateBy
(
user
.
getUserName
());
actSuppliesTemplate
.
get
(
i
).
setUpdateTime
(
DateUtils
.
getNowDate
());
actSuppliesTemplateMapper
.
updateRelease
(
actSuppliesTemplate
.
get
(
i
));
}
}
}
}
else
if
(
actSuppliesTemplate
.
get
(
i
).
getStatus
()==
1
)
{
}
Long
findall
=
actSuppliesTemplateMapper
.
findall
(
actSuppliesTemplate
.
get
(
i
).
getId
());
if
(
findall
>
0
){
releER
.
add
(
actSuppliesTemplate
.
get
(
i
).
getTemplateName
());
}
actSuppliesTemplateMapper
.
deleteSuppliesTemplateById
(
actSuppliesTemplate
.
get
(
i
).
getId
());
if
(
idsd
.
size
()>
0
){
}
actSuppliesTemplateMapper
.
deleteSuppliesTemplateByIds
(
idsd
.
toArray
(
idsd
.
toArray
(
new
Long
[
0
])));
}
else
if
(
idsu
.
size
()>
0
){
actSuppliesTemplateMapper
.
updateSuppliesTemplateByIds
(
idsu
.
toArray
(
idsu
.
toArray
(
new
Long
[
0
])));
}
}
return
1
;
return
releER
;
}
}
...
@@ -96,10 +106,6 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
...
@@ -96,10 +106,6 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
return
actSuppliesTemplateMapper
.
saveTemplate
(
id
);
return
actSuppliesTemplateMapper
.
saveTemplate
(
id
);
}
}
@Override
public
List
<
Integer
>
findall
(
Long
[]
ids
)
{
return
actSuppliesTemplateMapper
.
findall
(
ids
);
}
@Override
@Override
public
List
<
Integer
>
find
(
Long
id
)
{
public
List
<
Integer
>
find
(
Long
id
)
{
...
@@ -121,6 +127,7 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
...
@@ -121,6 +127,7 @@ public class ActSuppliesTemplateServiceImpl implements ActSuppliesTemplateServic
return
actSuppliesTemplateMapper
.
findName
();
return
actSuppliesTemplateMapper
.
findName
();
}
}
@Override
@Override
public
int
releaseStatus
(
Long
[]
ids
)
{
public
int
releaseStatus
(
Long
[]
ids
)
{
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesHistorydataMapper.xml
View file @
852b30d4
...
@@ -96,4 +96,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -96,4 +96,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
#{id}
</foreach>
</foreach>
</delete>
</delete>
</mapper>
\ No newline at end of file
<select
id=
"selectActSuppliesHistorydatauuid"
parameterType=
"String"
resultType=
"Long"
>
select count(*) from act_supplies_historydata where import_uuid = #{importUuid}
</select>
<select
id=
"selectActSuppliesRole"
parameterType=
"Long"
resultType=
"Long"
>
select temp_id from act_supplies_role where temp_id = #{templateId}
</select>
<update
id=
"updateActSuppliesHistorydatas"
parameterType=
"ActSuppliesHistorydata"
>
update act_supplies_historydata
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"historyName != null"
>
history_name = #{historyName},
</if>
<if
test=
"historyContent != null"
>
history_content = #{historyContent},
</if>
<if
test=
"identifyingCode != null"
>
identifying_code = #{identifyingCode},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
</trim>
where import_uuid = #{importUuid}
</update>
</mapper>
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
View file @
852b30d4
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
</sql>
</sql>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select id, temp_id, role_name from act_supplies_role where status =
0
select id, temp_id, role_name from act_supplies_role where status =
1
</select>
</select>
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
...
@@ -77,17 +77,9 @@
...
@@ -77,17 +77,9 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"detailName != null"
>
detail_name,
</if>
<if
test=
"detailName != null"
>
detail_name,
</if>
<!-- <if test="detailMH != null">detail_m_h,</if>-->
<!-- <if test="detailML != null">detail_m_l,</if>-->
<!-- <if test="detailYH != null">detail_y_h,</if>-->
<!-- <if test="detailYL != null">detail_y_l,</if>-->
<if
test=
"detailYS != null"
>
detail_y_s,
</if>
<if
test=
"detailYS != null"
>
detail_y_s,
</if>
<if
test=
"detailContent != null"
>
detail_content,
</if>
<if
test=
"detailContent != null"
>
detail_content,
</if>
<if
test=
"convertStatus != null"
>
convert_status,
</if>
<if
test=
"convertStatus != null"
>
convert_status,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
...
@@ -97,17 +89,9 @@
...
@@ -97,17 +89,9 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
#{roleId},
</if>
<if
test=
"roleId != null"
>
#{roleId},
</if>
<if
test=
"detailName != null"
>
#{detailName},
</if>
<if
test=
"detailName != null"
>
#{detailName},
</if>
<!-- <if test="detailMH != null">#{detailMH},</if>-->
<!-- <if test="detailML != null">#{detailML},</if>-->
<!-- <if test="detailYH != null">#{detailYH},</if>-->
<!-- <if test="detailYL != null">#{detailYL},</if>-->
<if
test=
"detailYS != null"
>
#{detailYS},
</if>
<if
test=
"detailYS != null"
>
#{detailYS},
</if>
<if
test=
"detailContent != null"
>
#{detailContent},
</if>
<if
test=
"detailContent != null"
>
#{detailContent},
</if>
<if
test=
"convertStatus != null"
>
#{convertStatus},
</if>
<if
test=
"convertStatus != null"
>
#{convertStatus},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
...
@@ -123,13 +107,7 @@
...
@@ -123,13 +107,7 @@
<if
test=
"detailName != null"
>
detail_name = #{detailName},
</if>
<if
test=
"detailName != null"
>
detail_name = #{detailName},
</if>
<if
test=
"detailContent != null"
>
detail_content = #{detailContent},
</if>
<if
test=
"detailContent != null"
>
detail_content = #{detailContent},
</if>
<if
test=
"convertStatus != null"
>
convert_status = #{convertStatus},
</if>
<if
test=
"convertStatus != null"
>
convert_status = #{convertStatus},
</if>
<!-- <if test="detailMH != null">detail_m_h = #{detailMH},</if>-->
<!-- <if test="detailML != null">detail_m_l = #{detailML},</if>-->
<!-- <if test="detailYH != null">detail_y_h = #{detailYH},</if>-->
<!-- <if test="detailYL != null">detail_y_l = #{detailYL},</if>-->
<if
test=
"detailYS != null"
>
detail_y_s = #{detailYS},
</if>
<if
test=
"detailYS != null"
>
detail_y_s = #{detailYS},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
...
@@ -139,8 +117,18 @@
...
@@ -139,8 +117,18 @@
where id = #{id}
where id = #{id}
</update>
</update>
<update
id=
"updateRoleDetailStatus"
parameterType=
"ActSuppliesRoleDetail"
>
update act_supplies_role_detail
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where role_id = #{roleId}
</update>
<delete
id=
"deleteActSuppliesRoleDetailById"
parameterType=
"Integer"
>
<delete
id=
"deleteActSuppliesRoleDetailById"
parameterType=
"Integer"
>
delete from act_supplies_role_detail where id = #{id}
delete from act_supplies_role_detail where
role_
id = #{id}
</delete>
</delete>
<delete
id=
"deleteActSuppliesRoleDetailByIds"
parameterType=
"String"
>
<delete
id=
"deleteActSuppliesRoleDetailByIds"
parameterType=
"String"
>
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleMapper.xml
View file @
852b30d4
...
@@ -78,10 +78,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -78,10 +78,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, role_id, detail_name, detail_m_h, detail_m_l, detail_y_h, detail_y_l,detail_y_s, detail_content,convert_status, status, create_by, create_time, update_by, update_time from act_supplies_role_detail
select id, role_id, detail_name, detail_m_h, detail_m_l, detail_y_h, detail_y_l,detail_y_s, detail_content,convert_status, status, create_by, create_time, update_by, update_time from act_supplies_role_detail
</sql>
</sql>
<select
id=
"saveRoleName"
parameterType=
"Long"
resultType=
"String"
>
select role_name from act_supplies_role where id = #{id}
</select>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesTemplate"
resultMap=
"SuppliesTemplateResult"
>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesTemplate"
resultMap=
"SuppliesTemplateResult"
>
select id, det_id, template_name from act_supplies_template where status = 0
select id, det_id, template_name from act_supplies_template where status = 0
</select>
</select>
<select
id=
"saveTemp"
parameterType=
"Long"
resultType=
"Integer"
>
select id from act_supplies_template where id = #{id} and status =0
</select>
<select
id=
"saveHistory"
parameterType=
"Long"
resultType=
"Integer"
>
SELECT COUNT(role_id) FROM act_supplies_historydata where role_id = #{id}
</select>
<select
id=
"saveStatus"
parameterType=
"Long"
resultType=
"Integer"
>
select id from act_supplies_template where id = #{id} and status = 0
</select>
<update
id=
"updateRelease"
parameterType=
"ActSuppliesRole"
>
update act_supplies_role
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where id = #{id}
</update>
<select
id=
"selectActSuppliesRoleList"
parameterType=
"ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
<select
id=
"selectActSuppliesRoleList"
parameterType=
"ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select a.id,a.temp_id,a.role_name,a.status,b.template_name from act_supplies_role a,act_supplies_template b
select a.id,a.temp_id,a.role_name,a.status,b.template_name from act_supplies_role a,act_supplies_template b
<where>
<where>
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesTemplateMapper.xml
View file @
852b30d4
...
@@ -25,11 +25,8 @@
...
@@ -25,11 +25,8 @@
select temp_id from act_supplies_role where temp_id=#{id}
select temp_id from act_supplies_role where temp_id=#{id}
</select>
</select>
<select
id=
"findall"
parameterType=
"String"
resultType=
"Integer"
>
<select
id=
"findall"
parameterType=
"Long"
resultType=
"Long"
>
select temp_id from act_supplies_role where temp_id in
select count(*) from act_supplies_role where temp_id = #{id}
<foreach
collection=
"array"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</select>
</select>
...
@@ -64,6 +61,16 @@
...
@@ -64,6 +61,16 @@
SELECT COUNT(template_id) FROM act_supplies_historydata where template_id = #{id}
SELECT COUNT(template_id) FROM act_supplies_historydata where template_id = #{id}
</select>
</select>
<update
id=
"updateRelease"
parameterType=
"ActSuppliesTemplate"
>
update act_supplies_template
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
</trim>
where id = #{id}
</update>
<insert
id=
"insertSuppliesTemplate"
parameterType=
"ActSuppliesTemplate"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertSuppliesTemplate"
parameterType=
"ActSuppliesTemplate"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into act_supplies_template
insert into act_supplies_template
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
ruoyi-ui/public/exportExcel.js
View file @
852b30d4
...
@@ -102,7 +102,8 @@ var setStyleAndValue = function(cellArr, worksheet) {
...
@@ -102,7 +102,8 @@ var setStyleAndValue = function(cellArr, worksheet) {
cell
.
it
,
cell
.
it
,
cell
.
fs
,
cell
.
fs
,
cell
.
cl
,
cell
.
cl
,
cell
.
ul
cell
.
ul
,
cell
.
ps
);
);
let
alignment
=
alignmentConvert
(
cell
.
vt
,
cell
.
ht
,
cell
.
tb
,
cell
.
tr
);
let
alignment
=
alignmentConvert
(
cell
.
vt
,
cell
.
ht
,
cell
.
tb
,
cell
.
tr
);
let
value
=
''
;
let
value
=
''
;
...
@@ -155,7 +156,7 @@ var fontConvert = function(
...
@@ -155,7 +156,7 @@ var fontConvert = function(
it
=
0
,
it
=
0
,
fs
=
10
,
fs
=
10
,
cl
=
0
,
cl
=
0
,
ul
=
0
ul
=
0
,
)
{
)
{
// luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
// luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
const
luckyToExcel
=
{
const
luckyToExcel
=
{
...
@@ -186,7 +187,7 @@ var fontConvert = function(
...
@@ -186,7 +187,7 @@ var fontConvert = function(
bold
:
luckyToExcel
.
num2bl
(
bl
),
bold
:
luckyToExcel
.
num2bl
(
bl
),
italic
:
luckyToExcel
.
num2bl
(
it
),
italic
:
luckyToExcel
.
num2bl
(
it
),
underline
:
luckyToExcel
.
num2bl
(
ul
),
underline
:
luckyToExcel
.
num2bl
(
ul
),
strike
:
luckyToExcel
.
num2bl
(
cl
)
strike
:
luckyToExcel
.
num2bl
(
cl
)
,
};
};
return
font
;
return
font
;
...
@@ -196,7 +197,7 @@ var alignmentConvert = function(
...
@@ -196,7 +197,7 @@ var alignmentConvert = function(
vt
=
'
default
'
,
vt
=
'
default
'
,
ht
=
'
default
'
,
ht
=
'
default
'
,
tb
=
'
default
'
,
tb
=
'
default
'
,
tr
=
'
default
'
tr
=
'
default
'
,
)
{
)
{
// luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
// luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
const
luckyToExcel
=
{
const
luckyToExcel
=
{
...
@@ -233,7 +234,8 @@ var alignmentConvert = function(
...
@@ -233,7 +234,8 @@ var alignmentConvert = function(
vertical
:
luckyToExcel
.
vertical
[
vt
],
vertical
:
luckyToExcel
.
vertical
[
vt
],
horizontal
:
luckyToExcel
.
horizontal
[
ht
],
horizontal
:
luckyToExcel
.
horizontal
[
ht
],
wrapText
:
luckyToExcel
.
wrapText
[
tb
],
wrapText
:
luckyToExcel
.
wrapText
[
tb
],
textRotation
:
luckyToExcel
.
textRotation
[
tr
]
textRotation
:
luckyToExcel
.
textRotation
[
tr
],
};
};
return
alignment
;
return
alignment
;
};
};
...
...
ruoyi-ui/src/api/system/historydata.js
View file @
852b30d4
...
@@ -50,4 +50,13 @@ export function exportHistorydata(query) {
...
@@ -50,4 +50,13 @@ export function exportHistorydata(query) {
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
params
:
query
})
})
}
}
\ No newline at end of file
// 新增 历史数据
export
function
addInsert
(
data
)
{
return
request
({
url
:
'
/system/historydata/addInsert
'
,
method
:
'
post
'
,
data
:
data
})
}
ruoyi-ui/src/api/system/suppliesrole.js
View file @
852b30d4
...
@@ -100,3 +100,20 @@ export function toggleDisable(id) {
...
@@ -100,3 +100,20 @@ export function toggleDisable(id) {
})
})
}
}
//发布
export
function
releaseRoleStatus
(
ids
,
tempids
)
{
return
request
({
url
:
'
/system/suppliesrole/releaseRS/
'
+
ids
+
'
/
'
+
tempids
,
method
:
'
get
'
,
})
}
//下架
export
function
offShelfRoleStatus
(
ids
)
{
return
request
({
url
:
'
/system/suppliesrole/offShelfRS/
'
+
ids
,
method
:
'
get
'
,
})
}
ruoyi-ui/src/views/system/supplies/index_template.vue
View file @
852b30d4
...
@@ -35,18 +35,18 @@
...
@@ -35,18 +35,18 @@
>
新增
>
新增
</el-button>
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<!--
<el-col
:span=
"1.5"
>
--
>
<el-button
<!--
<el-button-->
type=
"success"
<!-- type="success"-->
plain
<!-- plain-->
icon=
"el-icon-edit"
<!-- icon="el-icon-edit"-->
size=
"mini"
<!-- size="mini"-->
:disabled=
"single"
<!-- :disabled="single"-->
@
click=
"handleUpdate"
<!-- @click="handleUpdate"-->
v-hasPermi=
"['SuppliesTemplate:SuppliesTemplate:edit']"
<!-- v-hasPermi="['SuppliesTemplate:SuppliesTemplate:edit']"-->
>
修改
<!-- >修改-->
</el-button
>
<!--
</el-button>
--
>
</el-col
>
<!--
</el-col>
--
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
type=
"danger"
...
@@ -71,7 +71,6 @@
...
@@ -71,7 +71,6 @@
>
发布
>
发布
</el-button>
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -79,23 +78,41 @@
...
@@ -79,23 +78,41 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
label=
"模板名称"
align=
"center"
prop=
"templateName"
/>
<el-table-column
label=
"模板名称"
align=
"center"
prop=
"templateName"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<!--
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<div>
-->
<!--
<el-switch-->
<!-- @change="toggleEnable(scope.row)"-->
<!-- v-model="scope.row.status"-->
<!-- :active-value="0"-->
<!-- :inactive-value="1"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#cccccc"-->
<!-- active-text="已发布"-->
<!-- inactive-text="未发布"-->
<!-- disabled = "true">-->
<!--
</el-switch>
-->
<!--
</div>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<el-switch
<template
v-if=
"scope.row.status === 0"
>
@
change=
"toggleEnable(scope.row)"
<span
style=
"color: #0cc030;"
>
已发布
</span>
v-model=
"scope.row.status"
</
template
>
:active-value=
"0"
<
template
v-else-if=
"scope.row.status === 1"
>
:inactive-value=
"1"
<span
style=
"color: #0077ff;"
>
未发布
</span>
active-color=
"#13ce66"
</
template
>
inactive-color=
"#cccccc"
<
template
v-else-if=
"scope.row.status === 2"
>
active-text=
"已发布"
<span
style=
"color: #ff0000;"
>
未发布
</span>
inactive-text=
"未发布"
>
</
template
>
</el-switch>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
prop=
"status"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"mini"
...
@@ -200,11 +217,44 @@
...
@@ -200,11 +217,44 @@
<div
id=
"luckysheet"
:style=
"{ position: positionValue, top: '0', left: '0', right: '0', bottom: '0' }"
></div>
<div
id=
"luckysheet"
:style=
"{ position: positionValue, top: '0', left: '0', right: '0', bottom: '0' }"
></div>
<!-- 遮罩层组件 -->
<div
v-if=
"uploading"
class=
"overlay"
>
<div
class=
"loader"
></div>
</div>
</div>
</div>
</template>
</template>
<
style
>
.overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
9999
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.loader
{
border
:
16px
solid
#f3f3f3
;
/* 转圈圈的颜色 */
border-top
:
16px
solid
#3498db
;
/* 转圈圈的主题颜色 */
border-radius
:
50%
;
width
:
120px
;
height
:
120px
;
animation
:
spin
2s
linear
infinite
;
}
@keyframes
spin
{
0
%
{
transform
:
rotate
(
0deg
);
}
100
%
{
transform
:
rotate
(
360deg
);
}
}
</
style
>
<
style
>
<
style
>
#luckysheet_info_detail_title
{
#luckysheet_info_detail_title
{
display
:
none
;
display
:
none
;
...
@@ -237,6 +287,7 @@ import {
...
@@ -237,6 +287,7 @@ import {
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
XLSX
from
'
xlsx
'
;
import
XLSX
from
'
xlsx
'
;
import
LuckyExcel
from
'
luckyexcel
'
;
import
LuckyExcel
from
'
luckyexcel
'
;
import
{
Loading
}
from
'
element-ui
'
;
export
default
{
export
default
{
name
:
"
SuppliesTemplate
"
,
name
:
"
SuppliesTemplate
"
,
...
@@ -304,6 +355,7 @@ export default {
...
@@ -304,6 +355,7 @@ export default {
},
},
methods
:
{
methods
:
{
/**启用 */
/**启用 */
toggleEnable
(
SuppliesTemplate
)
{
toggleEnable
(
SuppliesTemplate
)
{
console
.
log
(
'
你点击了【
'
+
SuppliesTemplate
.
s
+
'
】的开关控件,当前开关值:
'
+
SuppliesTemplate
.
status
);
console
.
log
(
'
你点击了【
'
+
SuppliesTemplate
.
s
+
'
】的开关控件,当前开关值:
'
+
SuppliesTemplate
.
status
);
...
@@ -351,7 +403,7 @@ export default {
...
@@ -351,7 +403,7 @@ export default {
},
},
/**上传事件 */
/**上传事件 */
beforeUpload
(
file
)
{
async
beforeUpload
(
file
)
{
//存在重复
//存在重复
findName
(
file
.
name
).
then
(
result
=>
{
findName
(
file
.
name
).
then
(
result
=>
{
console
.
log
(
result
.
data
)
console
.
log
(
result
.
data
)
...
@@ -368,12 +420,14 @@ export default {
...
@@ -368,12 +420,14 @@ export default {
if
(
!
isJpgOrPng
)
{
if
(
!
isJpgOrPng
)
{
this
.
$message
.
error
(
'
只能上传xlsx文件
'
);
this
.
$message
.
error
(
'
只能上传xlsx文件
'
);
}
}
LuckyExcel
.
transformExcelToLucky
(
file
,
(
exportJson
,
lucksheetfile
)
=>
{
this
.
uploading
=
true
;
await
LuckyExcel
.
transformExcelToLucky
(
file
,
(
exportJson
,
lucksheetfile
)
=>
{
this
.
form
.
templateName
=
file
.
name
;
this
.
form
.
templateName
=
file
.
name
;
this
.
form
.
templateContent
=
JSON
.
stringify
(
exportJson
.
sheets
);
this
.
form
.
templateContent
=
JSON
.
stringify
(
exportJson
.
sheets
);
});
});
this
.
uploading
=
false
;
return
isJpgOrPng
;
return
isJpgOrPng
;
},
},
// handleFileChange(event){
// handleFileChange(event){
...
@@ -442,15 +496,19 @@ export default {
...
@@ -442,15 +496,19 @@ export default {
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
fileListName
=
[];
if
(
row
.
status
===
1
)
{
this
.
reset
();
this
.
fileListName
=
[];
const
id
=
row
.
id
||
this
.
ids
this
.
reset
();
getSuppliesTemplate
(
id
).
then
(
response
=>
{
const
id
=
row
.
id
||
this
.
ids
console
.
log
(
response
.
rows
[
0
])
getSuppliesTemplate
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
rows
[
0
];
console
.
log
(
response
.
rows
[
0
])
this
.
open
=
true
;
this
.
form
=
response
.
rows
[
0
];
this
.
title
=
"
修改Excel模板
"
;
this
.
open
=
true
;
});
this
.
title
=
"
修改Excel模板
"
;
});
}
else
{
this
.
msgError
(
"
文件文件已发布无法修改!!!
"
)
}
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
...
@@ -528,16 +586,20 @@ export default {
...
@@ -528,16 +586,20 @@ export default {
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
ids
=
row
.
id
||
this
.
ids
;
const
name
=
row
.
templateName
||
this
.
name
;
const
name
=
row
.
templateName
||
this
.
name
;
this
.
$confirm
(
'
是否确认删除
Excel模板编号
为"
'
+
name
+
'
"的数据项?
'
,
"
警告
"
,
{
this
.
$confirm
(
'
是否确认删除
模板名称
为"
'
+
name
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
type
:
"
warning
"
}).
then
(
function
()
{
}).
then
(
function
()
{
return
delSuppliesTemplate
(
ids
);
return
delSuppliesTemplate
(
ids
);
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
if
(
result
.
data
===
"
操作失败
"
)
{
if
(
result
.
msg
===
"
312
"
)
{
this
.
getList
();
this
.
getList
();
this
.
msgError
(
"
该模板下存在关联规则,请先删除关联规则!!!
"
);
this
.
$confirm
(
'
模板名称为"
'
+
result
.
data
+
'
"的数据项下存在关联规则,请先删除关联规则在删除模板
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(()
=>
{
this
.
getList
();})
}
else
{
}
else
{
this
.
getList
();
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
this
.
msgSuccess
(
"
删除成功
"
);
...
...
ruoyi-ui/src/views/system/suppliesrole/index.vue
View file @
852b30d4
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
>
<el-option
label=
"
启用
"
value=
"0"
></el-option>
<el-option
label=
"
已发布
"
value=
"0"
></el-option>
<el-option
label=
"
禁用
"
value=
"1"
></el-option>
<el-option
label=
"
未发布
"
value=
"1"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
...
@@ -59,17 +59,17 @@
...
@@ -59,17 +59,17 @@
v-hasPermi=
"['system:suppliesrole:add']"
v-hasPermi=
"['system:suppliesrole:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<!--
<el-col
:span=
"1.5"
>
--
>
<el-button
<!--
<el-button-->
type=
"success"
<!-- type="success"-->
plain
<!-- plain-->
icon=
"el-icon-edit"
<!-- icon="el-icon-edit"-->
size=
"mini"
<!-- size="mini"-->
:disabled=
"single"
<!-- :disabled="single"-->
@
click=
"handleUpdate"
<!-- @click="handleUpdate"-->
v-hasPermi=
"['system:suppliesrole:edit']"
<!-- v-hasPermi="['system:suppliesrole:edit']"-->
>
修改
</el-button
>
<!-- >修改
</el-button>
--
>
</el-col
>
<!--
</el-col>
--
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
type=
"danger"
...
@@ -91,6 +91,16 @@
...
@@ -91,6 +91,16 @@
v-hasPermi=
"['system:suppliesrole:export']"
v-hasPermi=
"['system:suppliesrole:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"releaseStatus"
v-hasPermi=
"['system:suppliesrole:releaseRS']"
>
发布
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
...
@@ -99,20 +109,61 @@
...
@@ -99,20 +109,61 @@
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
label=
"所属模板"
align=
"center"
prop=
"templateName"
/>
<el-table-column
label=
"所属模板"
align=
"center"
prop=
"templateName"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"roleName"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"roleName"
/>
<!--
<el-table-column
label=
"状态"
align=
"center"
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<div>
-->
<!--
<el-switch-->
<!-- @change="toggleEnable(scope.row)"-->
<!-- v-model="scope.row.status"-->
<!-- :active-value="0"-->
<!-- :inactive-value="1"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#cccccc"-->
<!-- active-text="已发布"-->
<!-- inactive-text="未发布"-->
<!-- disabled = "true">-->
<!--
</el-switch>
-->
<!--
</div>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<el-switch
<template
v-if=
"scope.row.status === 0"
>
@
change=
"toggleEnable(scope.row)"
<span
style=
"color: #0cc030;"
>
已发布
</span>
v-model=
"scope.row.status"
</
template
>
:active-value=
"0"
<
template
v-else-if=
"scope.row.status === 1"
>
:inactive-value=
"1"
<span
style=
"color: #0077ff;"
>
未发布
</span>
active-color=
"#13ce66"
</
template
>
inactive-color=
"#cccccc"
>
<
template
v-else-if=
"scope.row.status === 2"
>
</el-switch>
<span
style=
"color: #ff0000;"
>
未发布
</span>
</
template
>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"releaseStatus(scope.row)"
v-hasPermi=
"['system:suppliesrole:releaseRS']"
:style=
"
{display : scope.row.status>0?'':'none'}"
>发布
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"offShelfStatus(scope.row)"
v-hasPermi=
"['system:suppliesrole:offShelfRS']"
:style=
"
{display : scope.row.status===0?'':'none'}"
>下架
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
...
@@ -121,6 +172,7 @@
...
@@ -121,6 +172,7 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:suppliesrole:edit']"
v-hasPermi=
"['system:suppliesrole:edit']"
:style=
"
{display : scope.row.status===1?'':'none'}"
>修改
</el-button>
>修改
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
...
@@ -172,12 +224,12 @@
...
@@ -172,12 +224,12 @@
></el-option>
></el-option>
</el-select>-->
</el-select>-->
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
>
<!-- <el-form-item label="状态">--
>
<el-select
v-model=
"form.status"
style=
"width:380px"
>
<!-- <el-select v-model="form.status" style="width:380px">--
>
<el-option
label=
"启用"
:value=
"0"
></el-option
>
<!-- <el-option label="启用" :value="0"></el-option>--
>
<el-option
label=
"禁用"
:value=
"1"
></el-option
>
<!-- <el-option label="禁用" :value="1"></el-option>--
>
</el-select
>
<!-- </el-select>--
>
</el-form-item
>
<!-- </el-form-item>--
>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
@@ -281,7 +333,7 @@
...
@@ -281,7 +333,7 @@
</
style
>
</
style
>
<
script
>
<
script
>
import
{
listSuppliesrole
,
detailUpdate
,
updateSuppliesroledetail
,
listSuppliesroledetail
,
toggleEnable
,
toggleDisable
,
getSuppliesrole
,
getSuppliesroledetail
,
delSuppliesrole
,
addSuppliesrole
,
updateSuppliesrole
,
exportSuppliesrole
,
saveSid
,
}
from
"
@/api/system/suppliesrole
"
;
import
{
listSuppliesrole
,
detailUpdate
,
updateSuppliesroledetail
,
listSuppliesroledetail
,
toggleEnable
,
toggleDisable
,
getSuppliesrole
,
getSuppliesroledetail
,
delSuppliesrole
,
addSuppliesrole
,
updateSuppliesrole
,
exportSuppliesrole
,
saveSid
,
releaseRoleStatus
,
offShelfRoleStatus
}
from
"
@/api/system/suppliesrole
"
;
import
{
delActSuppliesDetails
}
from
"
@/api/ActSuppliesDetails/ActSuppliesDetails
"
;
import
{
delActSuppliesDetails
}
from
"
@/api/ActSuppliesDetails/ActSuppliesDetails
"
;
/*import {listSuppliesroledetail, updateSuppliesroledetail} from "../../../api/system/suppliesrole";*/
/*import {listSuppliesroledetail, updateSuppliesroledetail} from "../../../api/system/suppliesrole";*/
...
@@ -296,6 +348,7 @@ export default {
...
@@ -296,6 +348,7 @@ export default {
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
name
:[],
name
:[],
tempIds
:[],
// 非单个禁用
// 非单个禁用
single
:
true
,
single
:
true
,
// 非多个禁用
// 非多个禁用
...
@@ -329,6 +382,7 @@ export default {
...
@@ -329,6 +382,7 @@ export default {
form
:
{},
form
:
{},
forms
:{},
forms
:{},
formdeta
:{},
formdeta
:{},
formtemp
:{},
detailMH
:
[],
detailMH
:
[],
detailML
:
[],
detailML
:
[],
detailYH
:
[],
detailYH
:
[],
...
@@ -421,6 +475,7 @@ export default {
...
@@ -421,6 +475,7 @@ export default {
getList
()
{
getList
()
{
this
.
indexMethod
(
0
);
this
.
indexMethod
(
0
);
this
.
loading
=
true
;
this
.
loading
=
true
;
listSuppliesrole
(
this
.
queryParams
).
then
(
response
=>
{
listSuppliesrole
(
this
.
queryParams
).
then
(
response
=>
{
this
.
suppliesroleList
=
response
.
rows
;
this
.
suppliesroleList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
...
@@ -462,6 +517,7 @@ export default {
...
@@ -462,6 +517,7 @@ export default {
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
name
=
selection
.
map
(
item
=>
item
.
roleName
)
this
.
name
=
selection
.
map
(
item
=>
item
.
roleName
)
this
.
tempIds
=
selection
.
map
(
item
=>
item
.
tempId
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
},
...
@@ -472,14 +528,19 @@ export default {
...
@@ -472,14 +528,19 @@ export default {
this
.
title
=
"
添加导入规则
"
;
this
.
title
=
"
添加导入规则
"
;
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
){
this
.
reset
();
if
(
row
.
status
===
1
){
const
id
=
row
.
id
||
this
.
ids
this
.
reset
();
getSuppliesrole
(
id
).
then
(
response
=>
{
const
id
=
row
.
id
||
this
.
ids
this
.
form
=
response
.
data
;
getSuppliesrole
(
id
).
then
(
response
=>
{
this
.
open
=
true
;
this
.
form
=
response
.
data
;
this
.
title
=
"
修改导入规则
"
;
this
.
open
=
true
;
});
this
.
title
=
"
修改导入规则
"
;
});
}
else
{
this
.
msgError
(
"
文件文件已发布无法修改!!!
"
)
}
},
},
detailUpdate
(
row
)
{
detailUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
...
@@ -513,6 +574,7 @@ export default {
...
@@ -513,6 +574,7 @@ export default {
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
form
.
status
=
1
;
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
@@ -553,6 +615,56 @@ export default {
...
@@ -553,6 +615,56 @@ export default {
})
})
},
},
releaseStatus
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
tempids
=
row
.
tempId
||
this
.
tempIds
;
const
name
=
row
.
templateName
||
this
.
name
;
this
.
$confirm
(
'
是否确认发布规则名称为"
'
+
name
+
'
"的数据项?(发布之后无法修改!)
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
releaseRoleStatus
(
ids
,
tempids
);
}).
then
((
result
)
=>
{
if
(
result
.
msg
===
"
312
"
)
{
this
.
getList
();
this
.
$confirm
(
'
规则名称为"
'
+
result
.
data
+
'
"的数据其所属模板未发布请先发布模板?(发布之后无法修改!)
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
})
}
else
{
this
.
getList
();
this
.
msgSuccess
(
"
发布成功
"
);
}
}).
catch
(()
=>
{
})
},
offShelfStatus
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
name
=
row
.
templateName
||
this
.
name
;
this
.
$confirm
(
'
是否确认下架规则名称为"
'
+
name
+
'
"的数据项?(下架之后转换规则中将无法使用该模板!)
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
offShelfRoleStatus
(
ids
);
}).
then
((
result
)
=>
{
if
(
result
.
data
===
"
下架失败
"
)
{
this
.
getList
();
this
.
msgError
(
"
下架失败
"
);
}
else
{
this
.
getList
();
this
.
msgSuccess
(
"
下架成功
"
);
}
}).
catch
(()
=>
{
})
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
const
queryParams
=
this
.
queryParams
;
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
852b30d4
...
@@ -54,17 +54,17 @@
...
@@ -54,17 +54,17 @@
v-hasPermi=
"['system:suppliesroledetail:add']"
v-hasPermi=
"['system:suppliesroledetail:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<!--
<el-col
:span=
"1.5"
>
--
>
<el-button
<!--
<el-button-->
type=
"success"
<!-- type="success"-->
plain
<!-- plain-->
icon=
"el-icon-edit"
<!-- icon="el-icon-edit"-->
size=
"mini"
<!-- size="mini"-->
:disabled=
"single"
<!-- :disabled="single"-->
@
click=
"handleUpdate"
<!-- @click="handleUpdate"-->
v-hasPermi=
"['system:suppliesroledetail:edit']"
<!-- v-hasPermi="['system:suppliesroledetail:edit']"-->
>
修改
</el-button
>
<!-- >修改
</el-button>
--
>
</el-col
>
<!--
</el-col>
--
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
type=
"danger"
...
@@ -119,17 +119,35 @@
...
@@ -119,17 +119,35 @@
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<!-- <el-table-column label="状态" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <div>-->
<!-- <el-switch-->
<!-- @change="toggleEnable(scope.row)"-->
<!-- v-model="scope.row.status"-->
<!-- :active-value="0"-->
<!-- :inactive-value="1"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#cccccc"-->
<!-- active-text="已发布"-->
<!-- inactive-text="未发布"-->
<!-- disabled = "true">-->
<!-- </el-switch>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<el-switch
<template
v-if=
"scope.row.status === 0"
>
@
change=
"toggleEnable(scope.row)"
<span
style=
"color: #0cc030;"
>
已发布
</span>
v-model=
"scope.row.status"
</
template
>
:active-value=
"0"
<
template
v-else-if=
"scope.row.status === 1"
>
:inactive-value=
"1"
<span
style=
"color: #0077ff;"
>
未发布
</span>
active-color=
"#13ce66"
</
template
>
inactive-color=
"#cccccc"
>
<
template
v-else-if=
"scope.row.status === 2"
>
</el-switch>
<span
style=
"color: #ff0000;"
>
未发布
</span>
</
template
>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
...
@@ -141,6 +159,7 @@
...
@@ -141,6 +159,7 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:edit']"
v-hasPermi=
"['system:suppliesroledetail:edit']"
:style=
"
{display : scope.row.status===1?'':'none'}"
>修改
</el-button>
>修改
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
...
@@ -148,6 +167,7 @@
...
@@ -148,6 +167,7 @@
icon=
"el-icon-delete"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:remove']"
v-hasPermi=
"['system:suppliesroledetail:remove']"
:style=
"
{display : scope.row.status===1?'':'none'}"
>删除
</el-button>
>删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -188,18 +208,6 @@
...
@@ -188,18 +208,6 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<!-- <el-form-item label="转换类型" prop="detailYS" v-if="form.convertStatus!==null">-->
<!-- <el-radio-group v-model="form.detailYS">-->
<!-- <el-radio :label="1" >单元格转换</el-radio>-->
<!-- <el-radio :label="2" >行转换</el-radio>-->
<!-- <el-radio :label="3" >列转换</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="form.detailYS!==null">-->
<!-- <el-button type="primary" @click="addInputs">添加规则</el-button>-->
<!-- </el-form-item>-->
<el-row>
<el-row>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"转换类型"
prop=
"detailYS"
>
<el-form-item
label=
"转换类型"
prop=
"detailYS"
>
...
@@ -237,55 +245,12 @@
...
@@ -237,55 +245,12 @@
</div>
</div>
<!-- <el-form-item label="模板表行坐标" prop="detailMH" v-if="showTemplate" class="form-item-inline">-->
<!-- <el-form-item label="状态">-->
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
<!-- <el-select v-model="form.status">-->
<!-- </el-form-item>-->
<!-- <el-option label="启用" :value="0"></el-option>-->
<!-- <el-form-item label="模板表列坐标" prop="detailML" v-if="showTemplate" class="form-item-inline">-->
<!-- <el-option label="禁用" :value="1"></el-option>-->
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="导入表行坐标" prop="detailYH" v-if="showTemplate" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="导入表列坐标" prop="detailYL" v-if="showTemplate" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="模板表行坐标" prop="detailMH" v-if="showImport" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="模板表列坐标" prop="detailML" v-if="showImport" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="导入表行坐标" prop="detailYH" v-if="showImport" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="导入表列坐标" prop="detailYL" v-if="showImport" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="showLie" label="模板表行坐标" prop="detailMH" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="showLie" label="模板表列坐标" prop="detailML" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="showLie" label="导入表行坐标" prop="detailYH" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item v-if="showLie" label="导入表列坐标" prop="detailYL" class="form-item-inline">-->
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
<!-- </el-form-item>-->
<el-form-item
label=
"状态"
>
<el-select
v-model=
"form.status"
>
<el-option
label=
"启用"
:value=
"0"
></el-option>
<el-option
label=
"禁用"
:value=
"1"
></el-option>
</el-select>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
@@ -356,7 +321,7 @@ export default {
...
@@ -356,7 +321,7 @@ export default {
roleId
:
null
,
roleId
:
null
,
detailName
:
null
,
detailName
:
null
,
detailContent
:
null
,
detailContent
:
null
,
status
:
0
,
status
:
null
,
converStatus
:
null
,
converStatus
:
null
,
},
},
// 表单参数
// 表单参数
...
@@ -526,22 +491,36 @@ export default {
...
@@ -526,22 +491,36 @@ export default {
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
this
.
getnameid
();
getSuppliesroledetail
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
const
ids
=
this
.
options1
.
map
(
option
=>
option
.
id
);
const
detailContent
=
response
.
data
.
detailContent
;
const
parse
=
JSON
.
parse
(
detailContent
);
if
(
ids
.
findIndex
(
item
=>
item
===
row
.
roleId
)
!==-
1
){
this
.
reset
();
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
const
id
=
row
.
id
||
this
.
ids
this
.
detailML
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ct
)
+
1
);
getSuppliesroledetail
(
id
).
then
(
response
=>
{
this
.
detailYH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
re
)
+
1
);
this
.
form
=
response
.
data
;
this
.
detailYL
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ce
)
+
1
);
const
detailContent
=
response
.
data
.
detailContent
;
this
.
instea
=
this
.
detailMH
.
length
;
const
parse
=
JSON
.
parse
(
detailContent
);
this
.
open
=
true
;
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
this
.
title
=
"
修改规则详情
"
;
this
.
detailML
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ct
)
+
1
);
});
this
.
detailYH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
re
)
+
1
);
this
.
detailYL
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ce
)
+
1
);
this
.
instea
=
this
.
detailMH
.
length
;
this
.
open
=
true
;
this
.
title
=
"
修改规则详情
"
;
});
}
else
{
this
.
msgError
(
"
上级规则已发布,无法修改
"
)
}
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
...
@@ -550,7 +529,7 @@ export default {
...
@@ -550,7 +529,7 @@ export default {
this
.
form
.
detailML
=
this
.
detailML
;
this
.
form
.
detailML
=
this
.
detailML
;
this
.
form
.
detailYH
=
this
.
detailYH
;
this
.
form
.
detailYH
=
this
.
detailYH
;
this
.
form
.
detailYL
=
this
.
detailYL
;
this
.
form
.
detailYL
=
this
.
detailYL
;
this
.
form
.
status
=
1
;
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
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