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
b4062645
Commit
b4062645
authored
Aug 29, 2023
by
lvzhuangzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
882f8729
3a7793ef
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
109385 additions
and
96 deletions
+109385
-96
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
...ruoyi/system/controller/ActSuppliesConvertController.java
+3
-19
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
...yi/system/controller/ActSuppliesRoleDetailController.java
+15
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesTemplateController.java
...uoyi/system/controller/ActSuppliesTemplateController.java
+0
-9
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActOperation.java
...s/src/main/java/com/ruoyi/system/domain/ActOperation.java
+23
-5
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/service/IActSuppliesConvertService.java
.../com/ruoyi/system/service/IActSuppliesConvertService.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
...m/ruoyi/system/service/IActSuppliesRoleDetailService.java
+3
-0
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesConvertServiceImpl.java
...yi/system/service/impl/ActSuppliesConvertServiceImpl.java
+23
-2
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+9
-8
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
...system/service/impl/ActSuppliesRoleDetailServiceImpl.java
+5
-0
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesConverMapper.xml
.../main/resources/mapper/system/ActSuppliesConverMapper.xml
+4
-2
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
...n/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
+4
-1
ruoyi-ui/public/exportExcel.js
ruoyi-ui/public/exportExcel.js
+8
-3
ruoyi-ui/src/api/login.js
ruoyi-ui/src/api/login.js
+1
-1
ruoyi-ui/src/api/system/suppliesroledetail.js
ruoyi-ui/src/api/system/suppliesroledetail.js
+7
-1
ruoyi-ui/src/views/system/historydata/index.vue
ruoyi-ui/src/views/system/historydata/index.vue
+49
-24
ruoyi-ui/src/views/system/supplies/index.vue
ruoyi-ui/src/views/system/supplies/index.vue
+44
-10
ruoyi-ui/src/views/system/supplies/index_template.vue
ruoyi-ui/src/views/system/supplies/index_template.vue
+0
-2
ruoyi-ui/src/views/system/supplies/viewuploads.vue
ruoyi-ui/src/views/system/supplies/viewuploads.vue
+28
-1
ruoyi-ui/src/views/system/suppliesrole/index.vue.bak1
ruoyi-ui/src/views/system/suppliesrole/index.vue.bak1
+329
-0
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+8
-6
sql/ry-20230720.sql
sql/ry-20230720.sql
+108819
-0
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesConvertController.java
View file @
b4062645
...
...
@@ -93,27 +93,11 @@ public class ActSuppliesConvertController extends BaseController{
@PostMapping
(
"/converSupplies"
)
public
TableDataInfo
convertSupplies
(
@RequestBody
String
[]
names
){
List
<
String
>
name
=
Arrays
.
asList
(
names
);
List
<
ActOperation
>
list
=
actSuppliesConvertService
.
converSupplies
(
name
);
name
=
name
.
stream
()
.
map
(
str
->
{
if
(
str
==
null
)
{
return
null
;
// 保留原始的null值
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
str
.
equals
(
list
.
get
(
i
).
getDetaliesName
()))
{
return
list
.
get
(
i
).
getSuppliesName
();
}
}
return
str
;
})
.
collect
(
Collectors
.
toList
());
List
<
String
>
list
=
actSuppliesConvertService
.
converSupplies
(
names
);
return
getDataTable
(
name
);
return
getDataTable
(
list
);
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesRoleDetailController.java
View file @
b4062645
...
...
@@ -32,7 +32,7 @@ public class ActSuppliesRoleDetailController extends BaseController
/**
* 查询上级分类
* 查询上级分类
(所有)
* */
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:savesid')"
)
@GetMapping
(
"/savesid"
)
...
...
@@ -45,6 +45,20 @@ public class ActSuppliesRoleDetailController extends BaseController
}
/**
* 查询上级分类(未发布)
* */
@PreAuthorize
(
"@ss.hasPermi('system:suppliesroledetail:savesidsta')"
)
@GetMapping
(
"/savesidsta"
)
@ResponseBody
public
TableDataInfo
saveSidsta
(){
List
<
ActSuppliesRole
>
options
=
actSuppliesRoleDetailService
.
saveSidsta
();
return
getDataTable
(
options
);
}
// /**
// * 查询运算方法
// * */
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesTemplateController.java
View file @
b4062645
...
...
@@ -108,11 +108,8 @@ public class ActSuppliesTemplateController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('SuppliesTemplate:SuppliesTemplate:listId')"
)
@GetMapping
(
"/listId/{id}"
)
public
TableDataInfo
listId
(
@PathVariable
(
"id"
)
Long
id
)
{
List
<
ActSuppliesTemplate
>
sysSupplies
=
actSuppliesTemplateService
.
saveTemplate
(
id
);
return
getDataTable
(
sysSupplies
);
}
/**
...
...
@@ -169,9 +166,7 @@ public class ActSuppliesTemplateController extends BaseController {
if
(
list
.
size
()>
0
){
return
AjaxResult
.
success
(
"312"
,
list
.
toArray
());
}
return
toAjax
(
1
);
}
/**
...
...
@@ -186,7 +181,6 @@ public class ActSuppliesTemplateController extends BaseController {
if
(
find
.
contains
(
name
)){
return
AjaxResult
.
success
(
"上传文件名重复,请修改后上传!"
,
"存在重复"
);
}
return
AjaxResult
.
success
(
"验证通过"
,
"验证通过"
);
}
...
...
@@ -197,7 +191,6 @@ public class ActSuppliesTemplateController extends BaseController {
@GetMapping
(
"/enable/{id}"
)
public
AjaxResult
setEnable
(
@PathVariable
(
"id"
)
Long
id
)
{
actSuppliesTemplateService
.
setEnable
(
id
);
return
AjaxResult
.
success
();
}
...
...
@@ -212,9 +205,7 @@ public class ActSuppliesTemplateController extends BaseController {
// if(actSuppliesTemplateService.find(id).size()>0){
// return AjaxResult.success("该物料下存在关联物料,请先删除关联物料!!!","操作失败");
// }
actSuppliesTemplateService
.
setDisable
(
id
);
return
AjaxResult
.
success
();
}
}
\ No newline at end of file
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActOperation.java
View file @
b4062645
...
...
@@ -9,7 +9,9 @@ public class ActOperation extends BaseEntity {
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
;
private
String
encoding
;
private
String
oneLevel
;
private
String
twoLevel
;
private
String
threeLevel
;
private
String
suppliesName
;
private
String
detaliesName
;
...
...
@@ -21,12 +23,28 @@ public class ActOperation extends BaseEntity {
this
.
id
=
id
;
}
public
String
get
Encoding
()
{
return
encoding
;
public
String
get
OneLevel
()
{
return
oneLevel
;
}
public
void
setEncoding
(
String
encoding
)
{
this
.
encoding
=
encoding
;
public
void
setOneLevel
(
String
oneLevel
)
{
this
.
oneLevel
=
oneLevel
;
}
public
String
getTwoLevel
()
{
return
twoLevel
;
}
public
void
setTwoLevel
(
String
twoLevel
)
{
this
.
twoLevel
=
twoLevel
;
}
public
String
getThreeLevel
()
{
return
threeLevel
;
}
public
void
setThreeLevel
(
String
threeLevel
)
{
this
.
threeLevel
=
threeLevel
;
}
public
String
getSuppliesName
()
{
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/mapper/ActSuppliesRoleDetailMapper.java
View file @
b4062645
...
...
@@ -68,5 +68,7 @@ public interface ActSuppliesRoleDetailMapper
void
updateRoleDetailStatus
(
ActSuppliesRoleDetail
actSuppliesRoleDetail
);
List
<
ActSuppliesRole
>
saveSidsta
();
// List<ActOperation> saveOperation();
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesConvertService.java
View file @
b4062645
...
...
@@ -16,5 +16,5 @@ public interface IActSuppliesConvertService {
ActSupplies
selectSuppliesname
(
String
name
);
List
<
ActOperation
>
converSupplies
(
List
<
String
>
name
);
List
<
String
>
converSupplies
(
String
[]
name
);
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/IActSuppliesRoleDetailService.java
View file @
b4062645
...
...
@@ -82,4 +82,7 @@ public interface IActSuppliesRoleDetailService
* @param id 尝试禁用物料细分类管理的id
*/
void
setDisable
(
Long
id
);
List
<
ActSuppliesRole
>
saveSidsta
();
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesConvertServiceImpl.java
View file @
b4062645
...
...
@@ -7,7 +7,9 @@ import com.ruoyi.system.service.IActSuppliesConvertService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
public
class
ActSuppliesConvertServiceImpl
implements
IActSuppliesConvertService
{
...
...
@@ -41,7 +43,26 @@ public class ActSuppliesConvertServiceImpl implements IActSuppliesConvertService
}
@Override
public
List
<
ActOperation
>
converSupplies
(
List
<
String
>
name
)
{
return
actSuppliesConverMapper
.
converSupplies
(
name
);
public
List
<
String
>
converSupplies
(
String
[]
names
)
{
List
<
String
>
name
=
Arrays
.
asList
(
names
);
List
<
ActOperation
>
list
=
actSuppliesConverMapper
.
converSupplies
(
name
);
name
=
name
.
stream
()
.
map
(
str
->
{
if
(
str
==
null
)
{
return
null
;
// 保留原始的null值
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
if
(
str
.
equals
(
list
.
get
(
i
).
getDetaliesName
()))
{
return
list
.
get
(
i
).
getSuppliesName
();
}
}
return
str
;
})
.
collect
(
Collectors
.
toList
());
return
name
;
}
}
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
b4062645
...
...
@@ -119,20 +119,21 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
}
}
else
{
Long
[]
longs
=
actSuppliesHistorydataMapper
.
selectActSuppliesRole
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
for
(
int
i
=
0
;
i
<
actSuppliesHistorydata
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
longs
.
length
;
i
++
){
if
(
actSuppliesHistorydata
.
get
(
i
).
getIdentifyingCode
()==
0
){
actSuppliesHistorydata1
.
setImportUuid
(
actSuppliesHistorydata
.
get
(
0
).
getImportUuid
());
actSuppliesHistorydata1
.
setTemplateId
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
actSuppliesHistorydata1
.
setRoleId
(
longs
[
i
]
);
actSuppliesHistorydata1
.
setRoleId
(
actSuppliesHistorydata
.
get
(
i
).
getRoleId
()
);
actSuppliesHistorydata1
.
setStatus
(
1L
);
actSuppliesHistorydata1
.
setIdentifyingCode
(
0L
);
actSuppliesHistorydataMapper
.
insertActSuppliesHistorydata
(
actSuppliesHistorydata1
);
}
}
actSuppliesHistorydata1
.
setImportUuid
(
actSuppliesHistorydata
.
get
(
0
).
getImportUuid
());
actSuppliesHistorydata1
.
setTemplateId
(
actSuppliesHistorydata
.
get
(
0
).
getTemplateId
());
actSuppliesHistorydata1
.
setStatus
(
1L
);
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesRoleDetailServiceImpl.java
View file @
b4062645
...
...
@@ -167,6 +167,11 @@ public class ActSuppliesRoleDetailServiceImpl implements IActSuppliesRoleDetailS
updateStatusById
(
id
,
1
);
}
@Override
public
List
<
ActSuppliesRole
>
saveSidsta
()
{
return
actSuppliesRoleDetailMapper
.
saveSidsta
();
}
private
void
updateStatusById
(
Long
id
,
Integer
status
){
String
[]
statusText
={
"禁用"
,
"启用"
};
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesConverMapper.xml
View file @
b4062645
...
...
@@ -63,7 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"com.ruoyi.system.domain.ActOperation"
id=
"ActOperationResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"encoding"
column=
"encoding"
/>
<result
property=
"oneLevel"
column=
"one_level"
/>
<result
property=
"twoLevel"
column=
"two_level"
/>
<result
property=
"threeLevel"
column=
"three_level"
/>
<result
property=
"suppliesName"
column=
"supplies_name"
/>
<result
property=
"detaliesName"
column=
"details_name"
/>
</resultMap>
...
...
@@ -90,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"converSupplies"
parameterType=
"java.util.List"
resultMap=
"ActOperationResult"
>
select
id , encoding,
supplies_name, b.details_name from act_supplies a ,(
select
a.id ,a.one_level,a.two_level,a.three_level, a.
supplies_name, b.details_name from act_supplies a ,(
SELECT sid ,details_name
FROM act_supplies_details
WHERE details_name IN
...
...
ruoyi-supplies/src/main/resources/mapper/system/ActSuppliesRoleDetailMapper.xml
View file @
b4062645
...
...
@@ -47,9 +47,12 @@
</sql>
<select
id=
"saveSid"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select id, temp_id, role_name from act_supplies_role
where status = 1
select id, temp_id, role_name from act_supplies_role
</select>
<select
id=
"saveSidsta"
parameterType=
"com.ruoyi.system.domain.ActSuppliesRole"
resultMap=
"ActSuppliesRoleResult"
>
select id, temp_id, role_name from act_supplies_role where status = 1;
</select>
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
<!-- select id, operation_name, status from act_operation_role where status = 0-->
<!-- </select>-->
...
...
ruoyi-ui/public/exportExcel.js
View file @
b4062645
...
...
@@ -3,7 +3,7 @@ import Excel from 'exceljs';
import
FileSaver
from
'
file-saver
'
;
const
exportExcel
=
function
(
luckysheet
,
value
)
{
const
exportExcel
=
function
(
luckysheet
,
value
,
contrast
)
{
// 参数为luckysheet.getluckysheetfile()获取的对象
// 1.创建工作簿,可以为工作簿添加属性
const
workbook
=
new
Excel
.
Workbook
();
...
...
@@ -18,7 +18,7 @@ const exportExcel = function(luckysheet, value) {
const
merge
=
(
table
.
config
&&
table
.
config
.
merge
)
||
{};
const
borderInfo
=
(
table
.
config
&&
table
.
config
.
borderInfo
)
||
{};
// 3.设置单元格合并,设置单元格边框,设置单元格样式,设置值
setStyleAndValue
(
table
.
data
,
worksheet
);
setStyleAndValue
(
table
.
data
,
worksheet
,
contrast
);
setMerge
(
merge
,
worksheet
);
setBorder
(
borderInfo
,
worksheet
);
return
true
;
...
...
@@ -88,7 +88,7 @@ var setBorder = function(luckyBorderInfo, worksheet) {
// worksheet.getCell(rang.row_focus + 1, rang.column_focus + 1).border = border
});
};
var
setStyleAndValue
=
function
(
cellArr
,
worksheet
)
{
var
setStyleAndValue
=
function
(
cellArr
,
worksheet
,
contrast
)
{
if
(
!
Array
.
isArray
(
cellArr
))
{
return
;
}
cellArr
.
forEach
(
function
(
row
,
rowid
)
{
row
.
every
(
function
(
cell
,
columnid
)
{
...
...
@@ -122,6 +122,11 @@ var setStyleAndValue = function(cellArr, worksheet) {
// style 填入到_value中可以实现填充色
let
letter
=
createCellPos
(
columnid
);
let
target
=
worksheet
.
getCell
(
letter
+
(
rowid
+
1
));
if
(
contrast
){
const
column
=
worksheet
.
getColumn
(
1
);
column
.
hidden
=
true
;
}
// console.log('1233', letter + (rowid + 1))
for
(
const
key
in
fill
)
{
target
.
fill
=
fill
;
...
...
ruoyi-ui/src/api/login.js
View file @
b4062645
ruoyi-ui/src/api/system/suppliesroledetail.js
View file @
b4062645
...
...
@@ -16,7 +16,13 @@ export function saveSid() {
method
:
'
get
'
})
}
//查询上级ID
export
function
saveSidsta
()
{
return
request
({
url
:
'
/system/suppliesroledetail/savesidsta
'
,
method
:
'
get
'
})
}
export
function
saveOperation
(){
return
request
({
...
...
ruoyi-ui/src/views/system/historydata/index.vue
View file @
b4062645
...
...
@@ -98,9 +98,30 @@
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<div
id=
"luckysheet"
:style=
"{ position: positionValue, top: '0', left: '0', right: '0', bottom: '0' }"
></div>
</div>
</template>
<
style
>
#luckysheet_info_detail_title
{
display
:
none
;
}
#luckysheet_info_detail_update
{
display
:
none
;
}
#luckysheet_info_detail_save
{
display
:
none
;
}
.luckysheet-share-logo
{
display
:
none
;
}
</
style
>
<
script
>
import
{
listHistorydata
,
getHistorydata
,
delHistorydata
,
addHistorydata
,
updateHistorydata
,
exportHistorydata
}
from
"
@/api/system/historydata
"
;
import
Editor
from
'
@/components/Editor
'
;
...
...
@@ -115,6 +136,8 @@ export default {
},
data
()
{
return
{
positionValue
:
'
static
'
,
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -155,6 +178,13 @@ export default {
},
created
()
{
this
.
getList
();
this
.
positionValue
=
"
static
"
;
},
mounted
()
{
window
.
handleReturnButtonClick
=
this
.
handleReturnButtonClick
;
},
methods
:
{
/** 查询 历史数据列表 */
...
...
@@ -241,20 +271,13 @@ export default {
});
},
handleDetails
(
row
)
{
getHistorydata
(
row
.
id
).
then
(
response
=>
{
this
.
TemplateId
=
response
.
rows
;
this
.
luckyLook
();
})
},
/**展示详情luckysheet */
luckyLook
()
{
this
.
positionValue
=
'
absolute
'
;
luckysheet
.
destroy
();
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
this
.
TemplateId
[
0
]
.
historyName
,
// Excel 文件名
data
:
JSON
.
parse
(
this
.
TemplateId
[
0
]
.
historyContent
),
// Excel 数据
title
:
row
.
historyName
,
// Excel 文件名
data
:
JSON
.
parse
(
row
.
historyContent
),
// Excel 数据
showtoolbar
:
false
,
//是否第二列显示工具栏
showinfobar
:
true
,
//是否显示顶部名称栏
showsheetbar
:
false
,
//是否显示底部表格名称区域
...
...
@@ -262,7 +285,9 @@ export default {
pointEditUpdate
:
null
,
//编辑器表格更新函数
allowEdit
:
false
,
//作用:是否允许前台编辑
functionButton
:
'
<button id="exportButton" class="btn btn-primary" style=" padding:3px 6px; font-size: 16px;width: 100px;height: 27px; margin-right: 85px;" onclick="handleReturnButtonClick()">返回</button>
'
,
});
},
/**详情返回按钮 */
handleReturnButtonClick
()
{
...
...
ruoyi-ui/src/views/system/supplies/index.vue
View file @
b4062645
...
...
@@ -51,7 +51,7 @@
<!-- luckysheet容器 -->
<div
id=
"luckysheet"
style=
"margin: 0px; padding: 0px; position: absolute; width: 100%; height:
78
vh; z-index: 0"
style=
"margin: 0px; padding: 0px; position: absolute; width: 100%; height:
80
vh; z-index: 0"
>
</div>
<div
v-if=
"showMask"
class=
"mask"
>
...
...
@@ -77,6 +77,7 @@ var rule=[];
var
tempId
;
var
roleId
;
var
uuid1
;
var
trueORfalse
=
false
;
export
default
{
name
:
"
Mymodule
"
,
data
()
{
...
...
@@ -106,7 +107,6 @@ export default {
created
()
{
//刷新页面时进行的操作
this
.
getList
();
},
mounted
()
{
...
...
@@ -127,6 +127,11 @@ export default {
this
.
disableNextButton
=
this
.
selectedRule
===
''
;
//根据选中的下拉选项值获取相应的信息
getSuppliesTemplate
(
this
.
selectedOption
).
then
(
response
=>
{
if
(
this
.
selectedOption
===
7
){
trueORfalse
=
true
;
}
else
{
trueORfalse
=
false
;
}
tempId
=
this
.
selectedOption
;
uuid1
=
this
.
uuid
=
uuidv4
().
substring
(
0
,
8
);
console
.
log
(
this
.
uuid
);
...
...
@@ -165,6 +170,37 @@ export default {
roleId
=
this
.
selectedRule
;
rule
=
response
.
rows
;
});
if
(
tempId
===
7
){
getSuppliesTemplate
(
7
).
then
(
response
=>
{
uuid1
=
this
.
uuid
=
uuidv4
().
substring
(
0
,
8
);
//console.log(this.uuid);
// 通过遍历this.luckyrule找到对应的iem.roleName
for
(
let
i
=
0
;
i
<
this
.
luckyrule
.
length
;
i
++
)
{
if
(
this
.
luckyrule
[
i
].
id
===
this
.
selectedRule
)
{
let
name
=
this
.
luckyrule
[
i
].
roleName
;
fileName
=
name
.
slice
(
0
,
-
2
);
break
;
}
}
const
sysSupplies
=
response
.
rows
;
this
.
luckysheetData
=
sysSupplies
[
0
].
templateContent
;
//将接收到的json存到json_data中
//const json_data = response.data;
let
json_data
=
JSON
.
parse
(
sysSupplies
[
0
].
templateContent
);
//luckysheet.destroy()
luckysheet
.
create
({
container
:
"
luckysheet
"
,
// Luckysheet 的容器元素 ID
title
:
fileName
,
// Excel 文件名
data
:
json_data
,
// Excel 数据
showinfobar
:
false
,
//是否显示顶部名称栏
lang
:
'
zh
'
,
});
}).
catch
(()
=>
{
// 处理错误逻辑,这里是一个空的错误处理函数
this
.
$message
.
error
(
'
查询失败,发生未知错误!
'
);
});
}
},
/** 回车事件和保存提交绑定 */
...
...
@@ -183,6 +219,7 @@ export default {
this
.
disableNextButton
=
''
;
this
.
selectedRule
=
''
;
this
.
luckyrule
=
[];
trueORfalse
=
false
;
uuid1
=
''
;
//刷新luckysheet表格
this
.
init
();
...
...
@@ -261,8 +298,8 @@ export default {
try
{
const
exportJson
=
await
cons
;
await
this
.
summary
(
exportJson
);
console
.
log
(
'
summary 执行完毕
'
);
//
this.submit(exportJson);
//
console.log('summary 执行完毕');
this
.
submit
(
exportJson
);
}
catch
(
Error
)
{
this
.
$message
({
...
...
@@ -852,9 +889,6 @@ export default {
"
color
"
:
"
#000000
"
,
"
range
"
:
[{
"
row
"
:
[
0
,
0
],
"
column
"
:
[
0
,
0
]
}]
}
...
...
@@ -889,7 +923,7 @@ export default {
});*/
config
=
luckysheet
.
getConfig
(
0
);
bord
.
range
[
0
].
row
=
[
rowws
+
1
,
rowws
+
1
];
bord
.
range
[
0
].
column
=
[
0
,
sysRules
[
sysRules
.
length
-
1
].
ct
];
bord
.
range
[
0
].
column
=
[
0
,
parseInt
(
sysRules
[
sysRules
.
length
-
1
].
ct
)
];
config
.
borderInfo
.
push
(
bord
);
luckysheet
.
setConfig
(
config
);
}
else
{
...
...
@@ -1039,7 +1073,7 @@ export default {
this
.
from
.
templateId
=
this
.
dfrom
.
templateId
=
tempId
;
this
.
from
.
importUuid
=
this
.
dfrom
.
importUuid
=
uuid1
;
this
.
from
.
roleId
=
this
.
dfrom
.
roleId
=
roleId
;
this
.
dfrom
.
historyName
=
name
;
this
.
dfrom
.
historyName
=
name
+
'
(导入文件)
'
;
this
.
dfrom
.
historyContent
=
str
;
this
.
dfrom
.
identifyingCode
=
0
;
this
.
from
.
status
=
this
.
dfrom
.
status
=
0
;
...
...
@@ -1062,7 +1096,7 @@ export default {
/** 导出设置 */
handleExport
:
debounce
(
function
()
{
// 处理点击事件
exportExcel
(
luckysheet
.
getAllSheets
(),
fileName
)
exportExcel
(
luckysheet
.
getAllSheets
(),
fileName
,
trueORfalse
)
},
500
),
// 设置延迟时间,单位为毫秒
}
// 配置项111
...
...
ruoyi-ui/src/views/system/supplies/index_template.vue
View file @
b4062645
...
...
@@ -388,9 +388,7 @@ export default {
},
mounted
()
{
window
.
handleReturnButtonClick
=
this
.
handleReturnButtonClick
;
},
methods
:
{
...
...
ruoyi-ui/src/views/system/supplies/viewuploads.vue
View file @
b4062645
...
...
@@ -151,6 +151,7 @@ export default {
const
originalName
=
item
.
name
;
let
newName
=
originalName
;
let
count
=
1
;
// 检查是否存在同名文件,如果存在则进行递增命名
while
(
this
.
isFileNameExists
(
newName
))
{
const
dotIndex
=
originalName
.
lastIndexOf
(
'
.
'
);
...
...
@@ -164,6 +165,12 @@ export default {
item
.
name
=
newName
;
this
.
fileName1
.
splice
(
index
+
1
,
0
,
item
);
this
.
fileName1
[
index
+
1
].
copy
=
`(
${
count
-
1
}
)`
;
if
(
!
this
.
fileName1
[
index
+
1
].
hasOwnProperty
(
'
oldname
'
))
{
let
suffixArr
=
originalName
.
split
(
'
.
'
);
suffixArr
.
pop
();
// 删除数组中的最后一项,即 '.xlsx'
const
newname
=
suffixArr
.
join
(
'
.
'
);
// 将数组中剩下的部分通过 . 连接起来
this
.
fileName1
[
index
+
1
].
oldname
=
newname
;
}
},
uploadFolder2
()
{
this
.
$refs
.
folderInput2
.
value
=
''
;
// 清空文件选择框的值
...
...
@@ -328,7 +335,18 @@ export default {
this
.
isDivVisible
=
false
;
this
.
isluckysheet
=
true
;
for
(
let
i
=
0
;
i
<
this
.
fileName1
.
length
;
i
++
){
await
this
.
handleFileChange
(
this
.
fileName1
[
i
].
data
,
this
.
fileName1
[
i
].
copy
);
let
sda
=
this
.
fileName1
;
const
name
=
this
.
fileName1
[
i
].
name
;
//ACCOUNT通用 (1) (1).xlsx
let
suffixArr
=
name
.
split
(
'
.
'
);
suffixArr
.
pop
();
// 删除数组中的最后一项,即 '.xlsx'
const
newname
=
suffixArr
.
join
(
'
.
'
);
// 将数组中剩下的部分通过 . 连接起来
const
oldname
=
this
.
fileName1
[
i
].
oldname
;
//ACCOUNT通用.xlsx
let
extraPart
if
(
oldname
!==
undefined
){
extraPart
=
newname
.
replace
(
oldname
,
''
).
trim
();
// 去掉前后空格
}
//const newcode = extraPart ? extraPart : '没有多余的部分';
await
this
.
handleFileChange
(
this
.
fileName1
[
i
].
data
,
extraPart
);
await
this
.
handleFileChange1
(
this
.
fileName2
[
i
].
data
);
}
luckysheet
.
create
({
...
...
@@ -377,6 +395,7 @@ export default {
}
else
{
name1
=
exportJson
.
sheets
[
0
].
name
;
}
//console.log(name1);
datast
=
exportJson
.
sheets
;
namest
=
exportJson
.
info
.
name
;
let
suffixArr
=
exportJson
.
info
.
name
.
split
(
'
.
'
);
...
...
@@ -419,6 +438,9 @@ export default {
let
cell
=
(
c1
<=
c2
)
?
c1
:
c2
;
let
array
=
[];
let
r
=
this
.
row
-
1
;
try
{
for
(
let
i
=
r
;
i
<
row
;
i
++
)
{
for
(
let
j
=
0
;
j
<
cell
;
j
++
)
{
//第一个表的单元格为null直接跳出
...
...
@@ -494,6 +516,11 @@ export default {
type
:
"
success
"
});
}
}
catch
(
err
){
this
.
$message
({
message
:
"
导入失败,导入文件与对比文件有所不匹
"
,
type
:
"
error
"
});
}
data1
=
''
;
ddd
=
''
;
resolve
(
data1
);
...
...
ruoyi-ui/src/views/system/suppliesrole/index.vue.bak1
0 → 100644
View file @
b4062645
<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
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</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" :formatter="statusFormat" />
<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-select v-model="form.tempId" filterable placeholder="请选择关联项" >
<el-option
v-for="option in options"
:key="option.templateName"
:label="option.templateName"
:value="option.id"
></el-option>
</el-select>
</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
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="parseInt(dict.dictValue)"
>{{dict.dictLabel}}</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,saveSid } from "@/api/system/suppliesrole";
export default {
name: "Suppliesrole",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 导入规则表格数据
suppliesroleList: [],
options:[],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 状态数据字典
statusOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
tempId: null,
roleName: null,
status: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
tempId: [
{ required: true, message: "关联id不能为空", trigger: "change" }
]
}
};
},
created() {
this.getList();
this.getnameid();
this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询上级id*/
getnameid(){
saveSid().then(response =>{
this.options = response.rows;
})
},
/** 查询导入规则列表 */
getList() {
this.loading = true;
listSuppliesrole(this.queryParams).then(response => {
this.suppliesroleList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 岗位状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// 取消按钮
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
View file @
b4062645
...
...
@@ -187,7 +187,7 @@
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-select
v-model=
"form.roleId"
filterable
placeholder=
"请选择关联项"
>
<el-option
v-for=
"option in options
1
"
v-for=
"option in options
3
"
:key=
"option.roleName"
:label=
"option.roleName"
:value=
"option.id"
...
...
@@ -279,6 +279,7 @@ import {
toggleEnable
,
toggleDisable
,
saveOperation
,
saveSidsta
,
}
from
"
@/api/system/suppliesroledetail
"
;
import
Editor
from
'
@/components/Editor
'
;
...
...
@@ -424,11 +425,6 @@ export default {
saveSid
().
then
(
response
=>
{
this
.
options1
=
response
.
rows
;
})
// //运算规则
// saveOperation().then(response =>{
// this.options2 = response.rows;
// console.log(this.options2)
// })
},
...
...
@@ -483,6 +479,12 @@ export default {
},
/** 新增按钮操作 */
handleAdd
()
{
//上级规则
saveSidsta
().
then
(
response
=>
{
this
.
options3
=
response
.
rows
;
})
this
.
instea
=
0
;
this
.
getnameid
();
this
.
reset
();
...
...
sql/ry-20230720.sql
0 → 100644
View file @
b4062645
This diff is collapsed.
Click to expand it.
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