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
da10fcf4
Commit
da10fcf4
authored
Jul 27, 2023
by
lenovo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
76729476
71096709
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1010 additions
and
993 deletions
+1010
-993
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
...ava/com/ruoyi/web/controller/common/CommonController.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesController.java
...va/com/ruoyi/system/controller/ActSuppliesController.java
+13
-5
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesDetailsController.java
...ruoyi/system/controller/ActSuppliesDetailsController.java
+1
-1
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSupplies.java
...es/src/main/java/com/ruoyi/system/domain/ActSupplies.java
+4
-4
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesServiceImpl.java
...com/ruoyi/system/service/impl/ActSuppliesServiceImpl.java
+8
-7
ruoyi-ui/src/views/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
...ws/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
+7
-5
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
+384
-382
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/indexone.vue
...-ui/src/views/system/Actsupplies/Actsupplies/indexone.vue
+13
-13
ruoyi-ui/src/views/system/supplies/index.vue
ruoyi-ui/src/views/system/supplies/index.vue
+1
-0
ruoyi-ui/src/views/system/supplies/index_template.vue
ruoyi-ui/src/views/system/supplies/index_template.vue
+1
-0
ruoyi-ui/src/views/system/suppliesrole/index.vue
ruoyi-ui/src/views/system/suppliesrole/index.vue
+4
-3
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+573
-572
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
View file @
da10fcf4
...
@@ -48,7 +48,7 @@ public class CommonController
...
@@ -48,7 +48,7 @@ public class CommonController
{
{
throw
new
Exception
(
StringUtils
.
format
(
"文件名称({})非法,不允许下载。 "
,
fileName
));
throw
new
Exception
(
StringUtils
.
format
(
"文件名称({})非法,不允许下载。 "
,
fileName
));
}
}
String
realFileName
=
System
.
currentTimeMillis
()
+
fileName
.
substring
(
fileName
.
indexOf
(
"_"
)
+
1
);
String
realFileName
=
fileName
.
substring
(
fileName
.
indexOf
(
"_"
)
+
1
);
System
.
out
.
println
(
realFileName
);
System
.
out
.
println
(
realFileName
);
String
filePath
=
RuoYiConfig
.
getDownloadPath
()
+
fileName
;
String
filePath
=
RuoYiConfig
.
getDownloadPath
()
+
fileName
;
System
.
out
.
println
(
filePath
);
System
.
out
.
println
(
filePath
);
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesController.java
View file @
da10fcf4
...
@@ -44,7 +44,6 @@ public class ActSuppliesController extends BaseController
...
@@ -44,7 +44,6 @@ public class ActSuppliesController extends BaseController
}
}
/**
/**
* 查询物料总分类管理列表
* 查询物料总分类管理列表
*/
*/
...
@@ -70,7 +69,6 @@ public class ActSuppliesController extends BaseController
...
@@ -70,7 +69,6 @@ public class ActSuppliesController extends BaseController
}
}
/**
/**
* 导出物料总分类管理列表
* 导出物料总分类管理列表
*/
*/
...
@@ -79,9 +77,19 @@ public class ActSuppliesController extends BaseController
...
@@ -79,9 +77,19 @@ public class ActSuppliesController extends BaseController
@GetMapping
(
"/export"
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
ActSupplies
actSupplies
)
public
AjaxResult
export
(
ActSupplies
actSupplies
)
{
{
List
<
ActSupplies
>
list
=
actSuppliesService
.
selectActSuppliesList
(
actSupplies
);
List
<
ActSupplies
>
list
=
actSuppliesService
.
selectActSuppliesList
(
actSupplies
);
for
(
ActSupplies
s
:
list
)
{
String
ss
=
s
.
getStatus
();
if
(
"0"
.
equals
(
ss
)){
s
.
setStatus
(
"启用"
);
}
else
{
s
.
setStatus
(
"禁用"
);
}
}
ExcelUtil
<
ActSupplies
>
util
=
new
ExcelUtil
<
ActSupplies
>(
ActSupplies
.
class
);
ExcelUtil
<
ActSupplies
>
util
=
new
ExcelUtil
<
ActSupplies
>(
ActSupplies
.
class
);
return
util
.
exportExcel
(
list
,
"
物料总分类管理数据
"
);
return
util
.
exportExcel
(
list
,
"
用友物料
"
);
}
}
/**
/**
...
@@ -119,7 +127,7 @@ public class ActSuppliesController extends BaseController
...
@@ -119,7 +127,7 @@ public class ActSuppliesController extends BaseController
actSupplies
.
setCreateBy
(
user
.
getUserName
());
actSupplies
.
setCreateBy
(
user
.
getUserName
());
/*return toAjax(actSuppliesService.insertActSupplies(actSupplies));*/
/*return toAjax(actSuppliesService.insertActSupplies(actSupplies));*/
int
i
=
actSuppliesService
.
insertActSupplies
(
actSupplies
);
int
i
=
actSuppliesService
.
insertActSupplies
(
actSupplies
);
if
(
i
==
0
){
if
(
i
==
0
){
return
AjaxResult
.
error
(
"添加名称失败,名称已被占用"
);
return
AjaxResult
.
error
(
"添加名称失败,名称已被占用"
);
}
}
return
AjaxResult
.
success
(
"添加成功"
);
return
AjaxResult
.
success
(
"添加成功"
);
...
@@ -148,7 +156,7 @@ public class ActSuppliesController extends BaseController
...
@@ -148,7 +156,7 @@ public class ActSuppliesController extends BaseController
*/
*/
@PreAuthorize
(
"@ss.hasPermi('Actsupplies:Actsupplies:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('Actsupplies:Actsupplies:remove')"
)
@Log
(
title
=
"物料总分类管理"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"物料总分类管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
{
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/controller/ActSuppliesDetailsController.java
View file @
da10fcf4
...
@@ -67,7 +67,7 @@ public class ActSuppliesDetailsController extends BaseController
...
@@ -67,7 +67,7 @@ public class ActSuppliesDetailsController extends BaseController
{
{
List
<
ActSuppliesDetails
>
list
=
actSuppliesDetailsService
.
selectActSuppliesDetailsList
(
actSuppliesDetails
);
List
<
ActSuppliesDetails
>
list
=
actSuppliesDetailsService
.
selectActSuppliesDetailsList
(
actSuppliesDetails
);
ExcelUtil
<
ActSuppliesDetails
>
util
=
new
ExcelUtil
<
ActSuppliesDetails
>(
ActSuppliesDetails
.
class
);
ExcelUtil
<
ActSuppliesDetails
>
util
=
new
ExcelUtil
<
ActSuppliesDetails
>(
ActSuppliesDetails
.
class
);
return
util
.
exportExcel
(
list
,
"
物料细分类管理数据
"
);
return
util
.
exportExcel
(
list
,
"
六矿物料
"
);
}
}
/**
/**
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/domain/ActSupplies.java
View file @
da10fcf4
...
@@ -21,7 +21,7 @@ public class ActSupplies extends BaseEntity
...
@@ -21,7 +21,7 @@ public class ActSupplies extends BaseEntity
/** 父ID */
/** 父ID */
private
Long
pid
;
private
Long
pid
;
@Excel
(
name
=
"
上级分类
"
)
@Excel
(
name
=
"
大类名称
"
)
private
String
fname
;
private
String
fname
;
/** 物料名称 */
/** 物料名称 */
...
@@ -33,7 +33,7 @@ public class ActSupplies extends BaseEntity
...
@@ -33,7 +33,7 @@ public class ActSupplies extends BaseEntity
/** 状态 */
/** 状态 */
@Excel
(
name
=
"状态"
)
@Excel
(
name
=
"状态"
)
private
Integer
status
;
private
String
status
;
...
@@ -82,11 +82,11 @@ public class ActSupplies extends BaseEntity
...
@@ -82,11 +82,11 @@ public class ActSupplies extends BaseEntity
return
orderNum
;
return
orderNum
;
}
}
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
Integer
getStatus
()
public
String
getStatus
()
{
{
return
status
;
return
status
;
}
}
...
...
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesServiceImpl.java
View file @
da10fcf4
...
@@ -137,12 +137,12 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
...
@@ -137,12 +137,12 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
@Override
@Override
public
void
setEnable
(
Long
id
)
{
public
void
setEnable
(
Long
id
)
{
updateStatusById
(
id
,
0
);
updateStatusById
(
id
,
"0"
);
}
}
@Override
@Override
public
void
setDisable
(
Long
id
)
{
public
void
setDisable
(
Long
id
)
{
updateStatusById
(
id
,
1
);
updateStatusById
(
id
,
"1"
);
}
}
@Override
@Override
...
@@ -166,21 +166,22 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
...
@@ -166,21 +166,22 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
return
actSuppliesMapper
.
selectActSuppliesListOne
(
actSupplies
);
return
actSuppliesMapper
.
selectActSuppliesListOne
(
actSupplies
);
}
}
private
void
updateStatusById
(
Long
id
,
String
status
){
private
void
updateStatusById
(
Long
id
,
Integer
status
){
String
[]
statusText
={
"禁用"
,
"启用"
};
String
[]
statusText
={
"禁用"
,
"启用"
};
//判断查询结果是否为空
//判断查询结果是否为空
ActSupplies
queryResult
=
actSuppliesMapper
.
selectActSuppliesById
(
id
);
ActSupplies
queryResult
=
actSuppliesMapper
.
selectActSuppliesById
(
id
);
if
(
queryResult
==
null
)
{
if
(
queryResult
==
null
)
{
String
message
=
statusText
[
status
]
+
"物料总分类管理失败,尝试访问的数据不存在"
;
String
message
=
statusText
[
Integer
.
parseInt
(
status
)
]
+
"物料总分类管理失败,尝试访问的数据不存在"
;
System
.
out
.
println
(
message
);
System
.
out
.
println
(
message
);
throw
new
RuntimeException
(
message
);
throw
new
RuntimeException
(
message
);
}
}
//判断以上查询结果中的status是否与参数status相同
//判断以上查询结果中的status是否与参数status相同
if
(
queryResult
.
getStatus
().
equals
(
status
)){
if
(
queryResult
.
getStatus
().
equals
(
status
)){
String
message
=
statusText
[
status
]
+
"物料总分类管理失败,当前物料总分类管理已经处理"
+
statusText
[
status
]
+
"状态!"
;
String
message
=
statusText
[
Integer
.
parseInt
(
status
)]
+
"物料总分类管理失败,当前物料总分类管理已经处理"
+
statusText
[
Integer
.
parseInt
(
status
)
]
+
"状态!"
;
System
.
out
.
println
(
message
);
System
.
out
.
println
(
message
);
throw
new
RuntimeException
(
message
);
throw
new
RuntimeException
(
message
);
}
}
...
@@ -192,7 +193,7 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
...
@@ -192,7 +193,7 @@ public class ActSuppliesServiceImpl implements IActSuppliesService
int
rows
=
actSuppliesMapper
.
updateActSupplies
(
actSupplies
);
int
rows
=
actSuppliesMapper
.
updateActSupplies
(
actSupplies
);
if
(
rows
!=
1
)
{
if
(
rows
!=
1
)
{
String
message
=
statusText
[
status
]
+
"物料总分类管理失败,服务器忙请再次重试"
;
String
message
=
statusText
[
Integer
.
parseInt
(
status
)
]
+
"物料总分类管理失败,服务器忙请再次重试"
;
System
.
out
.
println
(
message
);
System
.
out
.
println
(
message
);
throw
new
RuntimeException
(
message
);
throw
new
RuntimeException
(
message
);
}
}
...
...
ruoyi-ui/src/views/system/ActSuppliesDetails/ActSuppliesDetails/index.vue
View file @
da10fcf4
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
clearable
clearable
size=
"small"
size=
"small"
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
maxlength=
"15"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属系统"
prop=
"sysclassify"
>
<el-form-item
label=
"所属系统"
prop=
"sysclassify"
>
...
@@ -29,6 +30,7 @@
...
@@ -29,6 +30,7 @@
clearable
clearable
size=
"small"
size=
"small"
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
maxlength=
"15"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
...
@@ -149,7 +151,7 @@
...
@@ -149,7 +151,7 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<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
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"所属分类"
prop=
"sid"
>
<el-form-item
label=
"所属分类"
prop=
"sid"
>
<el-select
v-model=
"form.sid"
filterable
placeholder=
"请选择所属分类"
>
<el-select
v-model=
"form.sid"
filterable
placeholder=
"请选择所属分类"
style=
"width:380px"
>
<el-option
<el-option
v-for=
"option in options2"
v-for=
"option in options2"
:key=
"option.suppliesName"
:key=
"option.suppliesName"
...
@@ -159,13 +161,13 @@
...
@@ -159,13 +161,13 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"detailsName"
>
<el-form-item
label=
"物料名称"
prop=
"detailsName"
>
<el-input
v-model=
"form.detailsName"
placeholder=
"请输入物料名称"
/>
<el-input
v-model=
"form.detailsName"
placeholder=
"请输入物料名称"
maxlength=
"15"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属系统"
prop=
"sysclassify"
>
<el-form-item
label=
"所属系统"
prop=
"sysclassify"
>
<el-input
v-model=
"form.sysclassify"
placeholder=
"请输入所属系统"
/>
<el-input
v-model=
"form.sysclassify"
placeholder=
"请输入所属系统"
maxlength=
"15"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"
"
>
<el-form-item
label=
"状态"
prop=
"
status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
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>
...
...
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/index.vue
View file @
da10fcf4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"一级分类名称"
prop=
"pid"
label-width=
"100px"
>
<el-form-item
label=
"一级分类名称"
prop=
"pid"
label-width=
"100px"
>
<el-select
v-model=
"queryParams.pid"
filterable
clearable
placeholder=
"请输入一级分类分类名称"
>
<el-select
v-model=
"queryParams.pid"
filterable
clearable
placeholder=
"请输入一级分类分类名称"
>
<el-option
<el-option
v-for=
"option in options"
v-for=
"option in options"
:key=
"option.suppliesName"
:key=
"option.suppliesName"
:label=
"option.suppliesName"
:label=
"option.suppliesName"
:value=
"option.id"
:value=
"option.id"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"suppliesName"
>
<el-form-item
label=
"物料名称"
prop=
"suppliesName"
>
<el-input
<el-input
v-model=
"queryParams.suppliesName"
v-model=
"queryParams.suppliesName"
placeholder=
"请输入物料名称"
placeholder=
"请输入物料名称"
clearable
clearable
size=
"small"
size=
"small"
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
/>
maxlength=
"15"
</el-form-item>
/>
<el-form-item
label=
"状态"
prop=
"status"
>
</el-form-item>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
@
keyup.enter.native=
"handleQuery"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-option
label=
"启用"
:value=
"0"
></el-option>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
@
keyup.enter.native=
"handleQuery"
>
<el-option
label=
"禁用"
:value=
"1"
></el-option>
<el-option
label=
"启用"
:value=
"0"
></el-option>
</el-select>
<el-option
label=
"禁用"
:value=
"1"
></el-option>
</el-form-item>
</el-select>
<el-form-item>
</el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-form-item>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
</el-form-item>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
plain
icon=
"el-icon-plus"
icon=
"el-icon-plus"
size=
"mini"
size=
"mini"
@
click=
"handleAdd"
@
click=
"handleAdd"
v-hasPermi=
"['supplies:supplies:add']"
v-hasPermi=
"['supplies:supplies: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=
"['supplies:supplies:edit']"
v-hasPermi=
"['supplies:supplies: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"
plain
plain
icon=
"el-icon-delete"
icon=
"el-icon-delete"
size=
"mini"
size=
"mini"
:disabled=
"multiple"
:disabled=
"multiple"
@
click=
"handleDelete"
@
click=
"handleDelete"
v-hasPermi=
"['supplies:supplies:remove']"
v-hasPermi=
"['supplies:supplies:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
type=
"warning"
plain
plain
icon=
"el-icon-download"
icon=
"el-icon-download"
size=
"mini"
size=
"mini"
@
click=
"handleExport"
@
click=
"handleExport"
v-hasPermi=
"['supplies:supplies:export']"
v-hasPermi=
"['supplies:supplies:export']"
>
导出
</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>
<el-table
v-loading=
"loading"
:data=
"suppliesList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"suppliesList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<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=
"id"
/>
-->
<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"
>
<el-table-column
label=
"一级分类名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div>
<div>
<template>
<template>
{{
scope
.
row
.
fname
}}
{{
scope
.
row
.
fname
}}
</
template
>
</
template
>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"二级分类名称"
align=
"center"
prop=
"suppliesName"
/>
<el-table-column
label=
"二级分类名称"
align=
"center"
prop=
"suppliesName"
/>
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div>
<div>
<el-switch
<el-switch
@
change=
"toggleEnable(scope.row)"
@
change=
"toggleEnable(scope.row)"
v-model=
"scope.row.status"
v-model=
"scope.row.status"
:active-value=
"0"
:active-value=
"0"
:inactive-value=
"1"
:inactive-value=
"1"
active-color=
"#13ce66"
active-color=
"#13ce66"
inactive-color=
"#cccccc"
>
inactive-color=
"#cccccc"
>
</el-switch>
</el-switch>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</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
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['supplies:supplies:edit']"
v-hasPermi=
"['supplies:supplies:edit']"
>
修改
</el-button>
>
修改
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['supplies:supplies:remove']"
v-hasPermi=
"['supplies:supplies:remove']"
>
删除
</el-button>
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total>0"
v-show=
"total>0"
:total=
"total"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
<!-- 添加或修改物料总分类管理对话框 -->
<!-- 添加或修改物料总分类管理对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<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
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"所属一级分类"
prop=
"pid"
>
<el-form-item
label=
"所属一级分类"
prop=
"pid"
>
<el-select
v-model=
"form.pid"
filterable
placeholder=
"请输入所属一级分类"
>
<el-select
v-model=
"form.pid"
filterable
placeholder=
"请输入所属一级分类"
>
<el-option
<el-option
v-for=
"option in options"
v-for=
"option in options"
:key=
"option.suppliesName"
:key=
"option.suppliesName"
:label=
"option.suppliesName"
:label=
"option.suppliesName"
:value=
"option.id"
:value=
"option.id"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料名称"
prop=
"suppliesName"
>
<el-form-item
label=
"物料名称"
prop=
"suppliesName"
>
<el-input
v-model=
"form.suppliesName"
placeholder=
"请输入二级分类名称"
/>
<el-input
v-model=
"form.suppliesName"
placeholder=
"请输入二级分类名称"
maxlength=
"15"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
>
<el-select
v-model=
"form.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>
</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>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
listSupplies
,
toggleEnable
,
toggleDisable
,
getSupplies
,
delSupplies
,
addSupplies
,
updateSupplies
,
exportSupplies
,
getPid
}
from
"
@/api/Actsupplies/Actsupplies
"
;
import
{
listSupplies
,
toggleEnable
,
toggleDisable
,
getSupplies
,
delSupplies
,
addSupplies
,
updateSupplies
,
exportSupplies
,
getPid
}
from
"
@/api/Actsupplies/Actsupplies
"
;
export
default
{
export
default
{
name
:
"
Supplies
"
,
name
:
"
Supplies
"
,
components
:
{
components
:
{
},
},
data
()
{
data
()
{
let
checkId
=
(
rule
,
value
,
callback
)
=>
{
let
checkId
=
(
rule
,
value
,
callback
)
=>
{
};
};
return
{
return
{
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
// 非单个禁用
// 非单个禁用
single
:
true
,
single
:
true
,
// 非多个禁用
// 非多个禁用
multiple
:
true
,
multiple
:
true
,
// 显示搜索条件
// 显示搜索条件
showSearch
:
true
,
showSearch
:
true
,
// 总条数
// 总条数
total
:
0
,
total
:
0
,
// 物料总分类管理表格数据
// 物料总分类管理表格数据
suppliesList
:
[],
suppliesList
:
[],
options
:
[],
// 初始化空数组
selectedOption
:
''
,
// 选中的选项
options
:
[],
// 初始化空数组
selectedOption
:
''
,
// 选中的选项
// 弹出层标题
title
:
""
,
// 是否显示弹出层
// 弹出层标题
open
:
false
,
title
:
""
,
opentwo
:
false
,
// 查询参数
queryParams
:
{
id
:
null
,
pageNum
:
1
,
pageSize
:
10
,
pid
:
null
,
fname
:
null
,
suppliesName
:
null
,
orderNum
:
null
,
status
:
0
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
pid
:
[
{
required
:
true
,
message
:
"
关联id不能为空
"
,
trigger
:
"
change
"
},
],
suppliesName
:[
{
required
:
true
,
message
:
"
物料名称不能为空
"
,
trigger
:
"
blur
"
}
],
},
idRules
:[
{
pattern
:
/^
\d
+$/
,
message
:
'
ID只能输入数字
'
,
trigger
:
'
blur
'
}
]
};
},
created
()
{
this
.
getList
();
},
mounted
()
{
this
.
fetchOptions
();
},
methods
:
{
/**显示序号*/
// 是否显示弹出层
indexMethod
(
index
){
open
:
false
,
// const pageSize = this.queryParams.pageSize;
opentwo
:
false
,
// const pageNumber = this.queryParams.pageNum || 1;
// 查询参数
return
index
+
1
;
queryParams
:
{
id
:
null
,
pageNum
:
1
,
pageSize
:
10
,
pid
:
null
,
fname
:
null
,
suppliesName
:
null
,
orderNum
:
null
,
status
:
0
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
pid
:
[
{
required
:
true
,
message
:
"
关联id不能为空
"
,
trigger
:
"
change
"
},
],
suppliesName
:[
{
required
:
true
,
message
:
"
物料名称不能为空
"
,
trigger
:
"
blur
"
}
],
},
idRules
:[
{
pattern
:
/^
\d
+$/
,
message
:
'
ID只能输入数字
'
,
trigger
:
'
blur
'
}
]
};
},
},
/**启用 */
created
()
{
toggleEnable
(
actSupplies
){
this
.
getList
();
console
.
log
(
'
你点击了【
'
+
actSupplies
.
suppliesName
+
'
】的开关控件,当前开关值:
'
+
actSupplies
.
status
);
},
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
mounted
()
{
if
(
actSupplies
.
status
===
0
)
{
this
.
fetchOptions
();
toggleEnable
(
actSupplies
.
id
).
then
((
response
)
=>
{
if
(
response
.
code
===
200
){
let
message
=
'
操作成功,已经将【
'
+
actSupplies
.
suppliesName
+
'
】的状态改为【
'
+
enableText
[
actSupplies
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
});
}
else
{
toggleDisable
(
actSupplies
.
id
).
then
((
response
)
=>
{
if
(
response
.
msg
===
"
200
"
){
let
message
=
'
操作成功,已经将【
'
+
actSupplies
.
suppliesName
+
'
】的状态改为【
'
+
enableText
[
actSupplies
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
error
'
});
}
else
{
this
.
getList
();
this
.
$message
.
error
(
response
.
msg
);
}
});
}
},
},
methods
:
{
/**显示序号*/
indexMethod
(
index
){
// const pageSize = this.queryParams.pageSize;
// const pageNumber = this.queryParams.pageNum || 1;
return
index
+
1
;
},
/**启用 */
toggleEnable
(
actSupplies
){
console
.
log
(
'
你点击了【
'
+
actSupplies
.
suppliesName
+
'
】的开关控件,当前开关值:
'
+
actSupplies
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
actSupplies
.
status
===
0
)
{
toggleEnable
(
actSupplies
.
id
).
then
((
response
)
=>
{
if
(
response
.
code
===
200
){
let
message
=
'
操作成功,已经将【
'
+
actSupplies
.
suppliesName
+
'
】的状态改为【
'
+
enableText
[
actSupplies
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
/** 查询上级关联关系*/
});
fetchOptions
()
{
}
else
{
getPid
().
then
(
response
=>
{
toggleDisable
(
actSupplies
.
id
).
then
((
response
)
=>
{
this
.
options
=
response
.
rows
;
if
(
response
.
msg
===
"
200
"
){
});
let
message
=
'
操作成功,已经将【
'
+
actSupplies
.
suppliesName
+
'
】的状态改为【
'
+
enableText
[
actSupplies
.
status
]
+
'
】 !
'
;
},
this
.
$message
({
message
:
message
,
type
:
'
error
'
});
}
else
{
this
.
getList
();
this
.
$message
.
error
(
response
.
msg
);
}
/** 查询物料总分类管理列表 */
});
getList
()
{
}
this
.
indexMethod
(
0
);
},
this
.
loading
=
true
;
/** 查询上级关联关系*/
listSupplies
(
this
.
queryParams
).
then
(
response
=>
{
fetchOptions
()
{
this
.
suppliesList
=
response
.
rows
;
getPid
().
then
(
response
=>
{
this
.
total
=
response
.
total
;
this
.
options
=
response
.
rows
;
this
.
loading
=
false
;
});
});
},
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
opentwo
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
pid
:
null
,
fname
:
null
,
suppliesName
:
null
,
orderNum
:
null
,
status
:
0
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
/** 查询物料总分类管理列表 */
this
.
getList
();
getList
()
{
this
.
indexMethod
(
0
);
this
.
loading
=
true
;
listSupplies
(
this
.
queryParams
).
then
(
response
=>
{
for
(
let
i
=
0
;
i
<
response
.
rows
.
length
;
i
++
)
{
response
.
rows
[
i
].
status
=
parseInt
(
response
.
rows
[
i
].
status
);
}
this
.
suppliesList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
opentwo
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
pid
:
null
,
fname
:
null
,
suppliesName
:
null
,
orderNum
:
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
();
/** 重置按钮操作 */
},
resetQuery
()
{
// 多选框选中数据
this
.
resetForm
(
"
queryForm
"
);
handleSelectionChange
(
selection
)
{
this
.
handleQuery
();
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
},
this
.
single
=
selection
.
length
!==
1
// 多选框选中数据
this
.
multiple
=
!
selection
.
length
handleSelectionChange
(
selection
)
{
},
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
/** 新增按钮操作 */
this
.
single
=
selection
.
length
!==
1
handleAdd
()
{
this
.
multiple
=
!
selection
.
length
this
.
reset
();
},
this
.
open
=
true
;
/** 新增按钮操作 */
this
.
title
=
"
新增二级分类
"
;
handleAdd
()
{
},
this
.
reset
();
/** 修改按钮操作 */
this
.
open
=
true
;
handleUpdate
(
row
)
{
this
.
title
=
"
新增二级分类
"
;
this
.
reset
();
},
const
id
=
row
.
id
||
this
.
ids
/** 修改按钮操作 */
getSupplies
(
id
).
then
(
response
=>
{
handleUpdate
(
row
)
{
this
.
form
=
response
.
data
;
this
.
reset
();
this
.
open
=
true
;
const
id
=
row
.
id
||
this
.
ids
this
.
title
=
"
修改物料总分类管理
"
;
getSupplies
(
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
)
{
updateSupplies
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
opentwo
=
false
;
this
.
getList
();
});
});
}
else
{
},
addSupplies
(
this
.
form
).
then
(
response
=>
{
/** 提交按钮 */
this
.
msgSuccess
(
"
新增成功
"
);
submitForm
()
{
this
.
open
=
false
;
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
opentwo
=
false
;
if
(
valid
)
{
this
.
getList
();
if
(
this
.
form
.
id
!=
null
)
{
updateSupplies
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
opentwo
=
false
;
this
.
getList
();
});
}
else
{
addSupplies
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
opentwo
=
false
;
this
.
getList
();
});
}
}
});
});
}
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除物料总分类管理编号为"
'
+
row
.
suppliesName
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSupplies
(
ids
);
}).
then
((
result
)
=>
{
if
(
result
.
data
===
"
操作失败
"
){
this
.
getList
();
this
.
msgError
(
"
删除失败,存在关联关系
"
);
}
else
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
}
}).
catch
(()
=>
{
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有物料总分类管理数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSupplies
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除物料总分类管理编号为"
'
+
row
.
suppliesName
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSupplies
(
ids
);
}).
then
((
result
)
=>
{
if
(
result
.
data
===
"
操作失败
"
){
this
.
getList
();
this
.
msgError
(
"
删除失败,存在关联关系
"
);
}
else
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
}
}).
catch
(()
=>
{
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有物料总分类管理数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSupplies
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
}
};
};
</
script
>
</
script
>
ruoyi-ui/src/views/system/Actsupplies/Actsupplies/indexone.vue
View file @
da10fcf4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<!--
<el-form-item
label=
"一级分类名称"
prop=
"pid"
label-width=
"100px"
>
-->
<!--
<el-form-item
label=
"一级分类名称"
prop=
"pid"
label-width=
"100px"
>
-->
<!--
<el-select
v-model=
"queryParams.pid"
filterable
clearable
placeholder=
"请输入一级分类分类名称"
>
-->
<!--
<el-select
v-model=
"queryParams.pid"
filterable
clearable
placeholder=
"请输入一级分类分类名称"
>
-->
<!--
<el-option-->
<!--
<el-option-->
<!-- v-for="option in options"-->
<!-- v-for="option in options"-->
<!-- :key="option.suppliesName"-->
<!-- :key="option.suppliesName"-->
<!-- :label="option.suppliesName"-->
<!-- :label="option.suppliesName"-->
<!-- :value="option.id"-->
<!-- :value="option.id"-->
<!-- >
</el-option>
-->
<!-- >
</el-option>
-->
<!--
<el-option
label=
"无"
value=
"0"
></el-option>
-->
<!--
<el-option
label=
"无"
value=
"0"
></el-option>
-->
<!--
</el-select>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"一级分类名称"
prop=
"suppliesName"
label-width=
"100px"
>
<el-form-item
label=
"一级分类名称"
prop=
"suppliesName"
label-width=
"100px"
>
<el-input
<el-input
v-model=
"queryParams.suppliesName"
v-model=
"queryParams.suppliesName"
...
@@ -127,8 +127,8 @@
...
@@ -127,8 +127,8 @@
<!-- 添加或修改物料总分类管理对话框 -->
<!-- 添加或修改物料总分类管理对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<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
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"一级分类名称"
prop=
"suppliesName"
>
<el-form-item
label=
"一级分类名称"
prop=
"suppliesName"
>
<el-input
v-model=
"form.suppliesName"
placeholder=
"请输入一级分类名称"
/>
<el-input
v-model=
"form.suppliesName"
placeholder=
"请输入一级分类名称"
maxlength=
"15"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
>
...
...
ruoyi-ui/src/views/system/supplies/index.vue
View file @
da10fcf4
...
@@ -357,6 +357,7 @@ export default {
...
@@ -357,6 +357,7 @@ export default {
break
;
break
;
case
6
:
case
6
:
{
{
let
cost
=
[
'
安全费用
'
,
'
国债费用
'
,
'
办公费用
'
,
'
其它费用
'
,
'
原煤基本生产
'
,
'
洗煤费用
'
,
'
制造费用
'
,
'
其他业务成本
'
];
let
department
=
[
'
二掘区
'
,
'
后勤服务二科
'
,
'
后勤服务一科
'
,
'
机电科
'
,
'
井运区
'
,
'
救护队
'
,
'
开拓区
'
,
'
开运区
'
,
'
通风区
'
,
'
通讯管理科
'
,
'
物资管理科
'
,
'
巷修区
'
,
'
一掘区
'
,
'
准备区
'
,
'
综二区
'
,
'
综一区
'
,
'
钻探区
'
];
let
department
=
[
'
二掘区
'
,
'
后勤服务二科
'
,
'
后勤服务一科
'
,
'
机电科
'
,
'
井运区
'
,
'
救护队
'
,
'
开拓区
'
,
'
开运区
'
,
'
通风区
'
,
'
通讯管理科
'
,
'
物资管理科
'
,
'
巷修区
'
,
'
一掘区
'
,
'
准备区
'
,
'
综二区
'
,
'
综一区
'
,
'
钻探区
'
];
//加个费用循环
//加个费用循环
for
(
let
j
=
0
;
j
<
department
.
length
;
j
++
){
for
(
let
j
=
0
;
j
<
department
.
length
;
j
++
){
...
...
ruoyi-ui/src/views/system/supplies/index_template.vue
View file @
da10fcf4
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
placeholder=
"请输入模板名称"
placeholder=
"请输入模板名称"
clearable
clearable
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
maxlength=
"15"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
...
...
ruoyi-ui/src/views/system/suppliesrole/index.vue
View file @
da10fcf4
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
clearable
clearable
size=
"small"
size=
"small"
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
maxlength=
"15"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
...
@@ -137,7 +138,7 @@
...
@@ -137,7 +138,7 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<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
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"所属模板"
prop=
"tempId"
>
<el-form-item
label=
"所属模板"
prop=
"tempId"
>
<el-select
v-model=
"form.tempId"
filterable
placeholder=
"请选择关联项"
>
<el-select
v-model=
"form.tempId"
filterable
placeholder=
"请选择关联项"
style=
"width:380px"
>
<el-option
<el-option
v-for=
"option in options"
v-for=
"option in options"
:key=
"option.templateName"
:key=
"option.templateName"
...
@@ -147,10 +148,10 @@
...
@@ -147,10 +148,10 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"roleName"
>
<el-form-item
label=
"规则名称"
prop=
"roleName"
>
<el-input
v-model=
"form.roleName"
placeholder=
"请输入规则名称"
/>
<el-input
v-model=
"form.roleName"
placeholder=
"请输入规则名称"
maxlength=
"15"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"form.status"
>
<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>
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
da10fcf4
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-select
v-model=
"queryParams.roleId"
filterable
clearable
placeholder=
"请选择关联项"
>
<el-select
v-model=
"queryParams.roleId"
filterable
clearable
placeholder=
"请选择关联项"
>
<el-option
<el-option
v-for=
"option in options1"
v-for=
"option in options1"
:key=
"option.roleName"
:key=
"option.roleName"
:label=
"option.roleName"
:label=
"option.roleName"
:value=
"option.id"
:value=
"option.id"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-input
<el-input
v-model=
"queryParams.detailName"
v-model=
"queryParams.detailName"
placeholder=
"请输入规则名称"
placeholder=
"请输入规则名称"
clearable
clearable
size=
"small"
size=
"small"
@
keyup.enter.native=
"handleQuery"
@
keyup.enter.native=
"handleQuery"
/>
maxlength=
"15"
</el-form-item>
/>
<el-form-item
label=
"状态"
prop=
"status"
>
</el-form-item>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-option
label=
"启用"
:value=
"0"
></el-option>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
>
<el-option
label=
"禁用"
:value=
"1"
></el-option>
<el-option
label=
"启用"
:value=
"0"
></el-option>
</el-select>
<el-option
label=
"禁用"
:value=
"1"
></el-option>
</el-form-item>
</el-select>
<el-form-item
label=
"运算规则"
prop=
"convertStatus"
>
</el-form-item>
<el-select
v-model=
"queryParams.convertStatus"
clearable
filterable
placeholder=
"请运算规则"
>
<el-form-item
label=
"运算规则"
prop=
"convertStatus"
>
<el-option
<el-select
v-model=
"queryParams.convertStatus"
clearable
filterable
placeholder=
"请运算规则"
>
v-for=
"option in options2"
<el-option
:key=
"option.operationName"
v-for=
"option in options2"
:label=
"option.operationName"
:key=
"option.operationName"
:value=
"option.id"
:label=
"option.operationName"
></el-option>
:value=
"option.id"
</el-select>
></el-option>
</el-form-item>
</el-select>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:suppliesroledetail:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:suppliesroledetail:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:suppliesroledetail:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"suppliesroledetailList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
label=
"上级规则"
align=
"center"
prop=
"roleName"
/>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"detailName"
/>
<el-table-column
label=
"规则内容"
align=
"center"
prop=
"detailContent"
/>
<el-table-column
label=
"运算规则"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div>
<template
v-if=
"scope.row.convertStatus === 0"
>
无
</
template
>
<
template
v-else-if=
"scope.row.convertStatus === 1"
>
物料转换
</
template
>
<
template
v-else-if=
"scope.row.convertStatus === 2"
>
加法运算
</
template
>
<
template
v-else-if=
"scope.row.convertStatus === 3"
>
减法运算
</
template
>
<
template
v-else-if=
"scope.row.convertStatus === 4"
>
乘法运算
</
template
>
<
template
v-else-if=
"scope.row.convertStatus === 5"
>
除法运算
</
template
>
</div>
</template>
</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"
>
</el-switch>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:edit']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改规则详情对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"1300px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-select
v-model=
"form.roleId"
filterable
placeholder=
"请选择关联项"
>
<el-option
v-for=
"option in options1"
:key=
"option.roleName"
:label=
"option.roleName"
:value=
"option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-input
v-model=
"form.detailName"
placeholder=
"请输入规则名称"
maxlength=
"10"
show-word-limit
/>
</el-form-item>
<el-form-item
label=
"运算方法"
prop=
"convertStatus"
>
<el-select
v-model=
"form.convertStatus"
filterable
placeholder=
"请选择运算方法"
>
<el-option
v-for=
"option in options2"
:key=
"option.operationName"
:label=
"option.operationName"
:value=
"option.id"
></el-option>
</el-select>
</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-col
:span=
"8"
>
<el-form-item
label=
"转换类型"
prop=
"detailYS"
>
<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>
</el-col>
<el-form-item>
<el-col
:span=
"16"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-form-item
v-if=
"form.detailYS!==null"
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"addInputs"
>
添加规则
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:suppliesroledetail:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:suppliesroledetail:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:suppliesroledetail:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<!-- 生成输入框 -->
<div
v-for=
"index in instea"
:key=
"index"
v-if=
""
>
<el-table
v-loading=
"loading"
:data=
"suppliesroledetailList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-form-item
label=
"模板表行坐标"
prop=
"detailMH"
class=
"form-item-inline"
>
<el-table-column
type=
"index"
width=
"80"
align=
"center"
label=
"序号"
:index=
"indexMethod"
/>
<el-input-number
size=
"medium"
v-model=
"detailMH[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<el-table-column
label=
"上级规则"
align=
"center"
prop=
"roleName"
/>
</el-form-item>
<el-table-column
label=
"规则名称"
align=
"center"
prop=
"detailName"
/>
<el-form-item
label=
"模板表列坐标"
prop=
"detailML"
class=
"form-item-inline"
>
<el-table-column
label=
"规则内容"
align=
"center"
prop=
"detailContent"
/>
<el-input-number
size=
"medium"
v-model=
"detailML[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<el-table-column
label=
"运算规则"
align=
"center"
>
</el-form-item>
<template
slot-scope=
"scope"
>
<el-form-item
label=
"导入表行坐标"
prop=
"detailYH"
class=
"form-item-inline"
>
<div>
<el-input-number
size=
"medium"
v-model=
"detailYH[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<template
v-if=
"scope.row.convertStatus === 0"
>
</el-form-item>
无
<el-form-item
label=
"导入表列坐标"
prop=
"detailYL"
class=
"form-item-inline"
>
</
template
>
<el-input-number
size=
"medium"
v-model=
"detailYL[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<
template
v-else-if=
"scope.row.convertStatus === 1"
>
</el-form-item>
物料转换
<el-form-item
style=
"display: inline-block;"
>
</
template
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"small"
@
click=
"removeInputs(index)"
>
删除
</el-button>
<
template
v-else-if=
"scope.row.convertStatus === 2"
>
</el-form-item>
加法运算
</
template
>
</div>
<
template
v-else-if=
"scope.row.convertStatus === 3"
>
减法运算
<!-- <el-form-item label="模板表行坐标" prop="detailMH" v-if="showTemplate" class="form-item-inline">-->
</
template
>
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
<
template
v-else-if=
"scope.row.convertStatus === 4"
>
<!-- </el-form-item>-->
乘法运算
<!-- <el-form-item label="模板表列坐标" prop="detailML" v-if="showTemplate" class="form-item-inline">-->
</
template
>
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
<
template
v-else-if=
"scope.row.convertStatus === 5"
>
<!-- </el-form-item>-->
除法运算
<!-- <el-form-item label="导入表行坐标" prop="detailYH" v-if="showTemplate" class="form-item-inline">-->
</
template
>
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
</div>
<!-- </el-form-item>-->
</template>
<!-- <el-form-item label="导入表列坐标" prop="detailYL" v-if="showTemplate" class="form-item-inline">-->
</el-table-column>
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
<el-table-column
label=
"状态"
align=
"center"
>
<!-- </el-form-item>-->
<
template
slot-scope=
"scope"
>
<div>
<!-- <el-form-item label="模板表行坐标" prop="detailMH" v-if="showImport" class="form-item-inline">-->
<el-switch
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
@
change=
"toggleEnable(scope.row)"
<!-- </el-form-item>-->
v-model=
"scope.row.status"
<!-- <el-form-item label="模板表列坐标" prop="detailML" v-if="showImport" class="form-item-inline">-->
:active-value=
"0"
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
:inactive-value=
"1"
<!-- </el-form-item>-->
active-color=
"#13ce66"
<!-- <el-form-item label="导入表行坐标" prop="detailYH" v-if="showImport" class="form-item-inline">-->
inactive-color=
"#cccccc"
>
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
</el-switch>
<!-- </el-form-item>-->
</div>
<!-- <el-form-item label="导入表列坐标" prop="detailYL" v-if="showImport" class="form-item-inline">-->
</
template
>
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
</el-table-column>
<!-- </el-form-item>-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<!-- <el-form-item v-if="showLie" label="模板表行坐标" prop="detailMH" class="form-item-inline">-->
<el-button
<!-- <el-input-number size="medium" v-model="form.detailMH" :min="1" :step="1">1</el-input-number>-->
size=
"mini"
<!-- </el-form-item>-->
type=
"text"
<!-- <el-form-item v-if="showLie" label="模板表列坐标" prop="detailML" class="form-item-inline">-->
icon=
"el-icon-edit"
<!-- <el-input-number size="medium" v-model="form.detailML" :min="1" :step="1">1</el-input-number>-->
@
click=
"handleUpdate(scope.row)"
<!-- </el-form-item>-->
v-hasPermi=
"['system:suppliesroledetail:edit']"
<!-- <el-form-item v-if="showLie" label="导入表行坐标" prop="detailYH" class="form-item-inline">-->
>
修改
</el-button>
<!-- <el-input-number size="medium" v-model="form.detailYH" :min="1" :step="1">1</el-input-number>-->
<el-button
<!-- </el-form-item>-->
size=
"mini"
<!-- <el-form-item v-if="showLie" label="导入表列坐标" prop="detailYL" class="form-item-inline">-->
type=
"text"
<!-- <el-input-number size="medium" v-model="form.detailYL" :min="1" :step="1">1</el-input-number>-->
icon=
"el-icon-delete"
<!-- </el-form-item>-->
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:suppliesroledetail:remove']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"form.status"
>
<pagination
<el-option
label=
"启用"
:value=
"0"
></el-option>
v-show=
"total>0"
<el-option
label=
"禁用"
:value=
"1"
></el-option>
:total=
"total"
</el-select>
:page.sync=
"queryParams.pageNum"
</el-form-item>
:limit.sync=
"queryParams.pageSize"
</el-form>
@
pagination=
"getList"
<div
slot=
"footer"
class=
"dialog-footer"
>
/>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<!-- 添加或修改规则详情对话框 -->
</div>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"1300px"
append-to-body
>
</el-dialog>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
</div>
<el-form-item
label=
"上级规则"
prop=
"roleId"
>
<el-select
v-model=
"form.roleId"
filterable
placeholder=
"请选择关联项"
>
<el-option
v-for=
"option in options1"
:key=
"option.roleName"
:label=
"option.roleName"
:value=
"option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"规则名称"
prop=
"detailName"
>
<el-input
v-model=
"form.detailName"
placeholder=
"请输入规则名称"
maxlength=
"15"
show-word-limit
/>
</el-form-item>
<el-form-item
label=
"运算方法"
prop=
"convertStatus"
>
<el-select
v-model=
"form.convertStatus"
filterable
placeholder=
"请选择运算方法"
>
<el-option
v-for=
"option in options2"
:key=
"option.operationName"
:label=
"option.operationName"
:value=
"option.id"
></el-option>
</el-select>
</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-col
:span=
"8"
>
<el-form-item
label=
"转换类型"
prop=
"detailYS"
>
<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-col>
<el-col
:span=
"16"
>
<el-form-item
v-if=
"form.detailYS!==null"
>
<el-button
type=
"primary"
@
click=
"addInputs"
>
添加规则
</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- 生成输入框 -->
<div
v-for=
"index in instea"
:key=
"index"
v-if=
""
>
<el-form-item
label=
"模板表行坐标"
prop=
"detailMH"
class=
"form-item-inline"
>
<el-input-number
size=
"medium"
v-model=
"detailMH[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
label=
"模板表列坐标"
prop=
"detailML"
class=
"form-item-inline"
>
<el-input-number
size=
"medium"
v-model=
"detailML[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
label=
"导入表行坐标"
prop=
"detailYH"
class=
"form-item-inline"
>
<el-input-number
size=
"medium"
v-model=
"detailYH[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
label=
"导入表列坐标"
prop=
"detailYL"
class=
"form-item-inline"
>
<el-input-number
size=
"medium"
v-model=
"detailYL[index-1]"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
<el-form-item
style=
"display: inline-block;"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"small"
@
click=
"removeInputs(index)"
>
删除
</el-button>
</el-form-item>
</div>
<!-- <el-form-item label="模板表行坐标" prop="detailMH" v-if="showTemplate" 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="showTemplate" 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="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>
<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>
</template>
<
style
>
<
style
>
.form-item-inline
{
.form-item-inline
{
display
:
inline-block
;
display
:
inline-block
;
margin-right
:
20px
;
margin-right
:
20px
;
}
}
</
style
>
</
style
>
<
script
>
<
script
>
import
{
import
{
listSuppliesroledetail
,
listSuppliesroledetail
,
getSuppliesroledetail
,
getSuppliesroledetail
,
delSuppliesroledetail
,
delSuppliesroledetail
,
addSuppliesroledetail
,
addSuppliesroledetail
,
updateSuppliesroledetail
,
updateSuppliesroledetail
,
exportSuppliesroledetail
,
exportSuppliesroledetail
,
saveSid
,
saveSid
,
toggleEnable
,
toggleEnable
,
toggleDisable
,
toggleDisable
,
saveOperation
,
saveOperation
,
}
from
"
@/api/system/suppliesroledetail
"
;
}
from
"
@/api/system/suppliesroledetail
"
;
import
Editor
from
'
@/components/Editor
'
;
import
Editor
from
'
@/components/Editor
'
;
export
default
{
export
default
{
name
:
"
Suppliesroledetail
"
,
name
:
"
Suppliesroledetail
"
,
components
:
{
components
:
{
Editor
,
Editor
,
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 规则详情表格数据
suppliesroledetailList
:
[],
options1
:[],
//上级ID
options2
:[{
id
:
0
,
operationName
:
"
无
"
},{
id
:
1
,
operationName
:
"
物料转换
"
},{
id
:
2
,
operationName
:
"
加法运算
"
},{
id
:
3
,
operationName
:
"
减法运算
"
},{
id
:
4
,
operationName
:
"
乘法运算
"
},{
id
:
5
,
operationName
:
"
除法运算
"
}],
//上级ID
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
inputCount
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
roleId
:
null
,
detailName
:
null
,
detailContent
:
null
,
status
:
0
,
converStatus
:
null
,
},
// 表单参数
form
:
{
},
detailMH
:
[],
detailML
:
[],
detailYH
:
[],
detailYL
:
[],
instea
:
0
,
showTemplate
:
false
,
// 控制单元格的显示与隐藏
showImport
:
false
,
// 控制行转换的显示与隐藏
showLie
:
false
,
// 控制列转换的显示与隐藏
// 表单校验
rules
:
{
roleId
:[
{
required
:
true
,
message
:
'
关联id不能为空
'
,
trigger
:
'
change
'
},
],
// detailMH:[
// {required: true, message: '模板表行坐标不能为空', trigger: 'change'},
// ],
// detailML:[
// {required: true, message: '模板表列坐标不能为空', trigger: 'change'},
// ],
// detailYH:[
// {required: true, message: '导入表行坐标不能为空', trigger: 'change'},
// ],
// detailYL:[
// {required: true, message: '导入表列坐标不能为空', trigger: 'change'},
// ],
convertStatus
:[
{
required
:
true
,
message
:
'
运算规则不能为空
'
,
trigger
:
'
change
'
},
],
detailName
:[
{
required
:
true
,
message
:
'
规则名称不能为空
'
,
trigger
:
'
change
'
},
]
}
};
},
created
()
{
this
.
getList
();
this
.
getnameid
();
},
methods
:
{
removeInputs
(
index
){
this
.
detailMH
.
splice
(
index
-
1
,
1
);
this
.
detailML
.
splice
(
index
-
1
,
1
);
this
.
detailYH
.
splice
(
index
-
1
,
1
);
this
.
detailYL
.
splice
(
index
-
1
,
1
);
this
.
instea
=
this
.
instea
-
1
;
},
addInputs
()
{
this
.
instea
+=
1
;
this
.
detailMH
[
this
.
instea
-
1
]
=
1
;
this
.
detailML
[
this
.
instea
-
1
]
=
1
;
this
.
detailYH
[
this
.
instea
-
1
]
=
1
;
this
.
detailYL
[
this
.
instea
-
1
]
=
1
;
},
toggleEnable
(
suppliesRoleDetail
){
console
.
log
(
'
你点击了【
'
+
suppliesRoleDetail
.
s
+
'
】的开关控件,当前开关值:
'
+
suppliesRoleDetail
.
status
);
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
if
(
suppliesRoleDetail
.
status
===
0
)
{
toggleEnable
(
suppliesRoleDetail
.
id
).
then
((
response
)
=>
{
if
(
response
.
code
===
200
){
let
message
=
'
操作成功,已经将【
'
+
suppliesRoleDetail
.
roleName
+
'
】的状态改为【
'
+
enableText
[
suppliesRoleDetail
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
});
}
else
{
toggleDisable
(
suppliesRoleDetail
.
id
).
then
((
response
)
=>
{
if
(
response
.
code
===
200
){
let
message
=
'
操作成功,已经将【
'
+
suppliesRoleDetail
.
roleName
+
'
】的状态改为【
'
+
enableText
[
suppliesRoleDetail
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
}
else
{
this
.
$message
.
error
(
response
.
message
);
}
});
}
},
},
data
()
{
/**显示序号*/
return
{
indexMethod
(
index
){
// 遮罩层
return
index
+
1
;
loading
:
true
,
},
// 选中数组
ids
:
[],
/**获取关联表内容*/
// 非单个禁用
getnameid
(){
single
:
true
,
//上级规则
// 非多个禁用
saveSid
().
then
(
response
=>
{
multiple
:
true
,
this
.
options1
=
response
.
rows
;
// 显示搜索条件
})
showSearch
:
true
,
// //运算规则
// 总条数
// saveOperation().then(response =>{
total
:
0
,
// this.options2 = response.rows;
// 规则详情表格数据
// console.log(this.options2)
suppliesroledetailList
:
[],
// })
options1
:[],
//上级ID
},
options2
:[{
id
:
0
,
operationName
:
"
无
"
},{
id
:
1
,
operationName
:
"
物料转换
"
},{
id
:
2
,
operationName
:
"
加法运算
"
},{
id
:
3
,
operationName
:
"
减法运算
"
},{
id
:
4
,
operationName
:
"
乘法运算
"
},{
id
:
5
,
operationName
:
"
除法运算
"
}],
//上级ID
/** 查询规则详情列表 */
// 弹出层标题
getList
()
{
title
:
""
,
this
.
indexMethod
(
0
);
// 是否显示弹出层
this
.
loading
=
true
;
open
:
false
,
listSuppliesroledetail
(
this
.
queryParams
).
then
(
response
=>
{
inputCount
:
0
,
this
.
suppliesroledetailList
=
response
.
rows
;
this
.
total
=
response
.
total
;
// 查询参数
this
.
loading
=
false
;
queryParams
:
{
});
pageNum
:
1
,
},
pageSize
:
10
,
// 取消按钮
roleId
:
null
,
cancel
()
{
detailName
:
null
,
this
.
open
=
false
;
detailContent
:
null
,
this
.
reset
();
status
:
0
,
},
converStatus
:
null
,
// 表单重置
},
reset
()
{
// 表单参数
this
.
form
=
{
form
:
{
id
:
null
,
},
roleId
:
null
,
detailMH
:
[],
detailName
:
null
,
detailML
:
[],
detailYS
:
null
,
detailYH
:
[],
detailContent
:
null
,
detailYL
:
[],
status
:
0
,
instea
:
0
,
convertStatus
:
null
,
showTemplate
:
false
,
// 控制单元格的显示与隐藏
createBy
:
null
,
showImport
:
false
,
// 控制行转换的显示与隐藏
createTime
:
null
,
showLie
:
false
,
// 控制列转换的显示与隐藏
updateBy
:
null
,
// 表单校验
updateTime
:
null
rules
:
{
};
roleId
:[
this
.
resetForm
(
"
form
"
);
{
required
:
true
,
message
:
'
关联id不能为空
'
,
trigger
:
'
change
'
},
],
// detailMH:[
// {required: true, message: '模板表行坐标不能为空', trigger: 'change'},
// ],
// detailML:[
// {required: true, message: '模板表列坐标不能为空', trigger: 'change'},
// ],
// detailYH:[
// {required: true, message: '导入表行坐标不能为空', trigger: 'change'},
// ],
// detailYL:[
// {required: true, message: '导入表列坐标不能为空', trigger: 'change'},
// ],
convertStatus
:[
{
required
:
true
,
message
:
'
运算规则不能为空
'
,
trigger
:
'
change
'
},
],
detailName
:[
{
required
:
true
,
message
:
'
规则名称不能为空
'
,
trigger
:
'
change
'
},
]
}
};
},
},
/** 搜索按钮操作 */
created
()
{
handleQuery
()
{
this
.
getList
();
this
.
queryParams
.
pageNum
=
1
;
this
.
getnameid
();
this
.
getList
();
},
},
/** 重置按钮操作 */
methods
:
{
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
removeInputs
(
index
){
this
.
handleQuery
();
},
this
.
detailMH
.
splice
(
index
-
1
,
1
);
// 多选框选中数据
this
.
detailML
.
splice
(
index
-
1
,
1
);
handleSelectionChange
(
selection
)
{
this
.
detailYH
.
splice
(
index
-
1
,
1
);
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
detailYL
.
splice
(
index
-
1
,
1
);
this
.
single
=
selection
.
length
!==
1
this
.
instea
=
this
.
instea
-
1
;
this
.
multiple
=
!
selection
.
length
},
},
/** 新增按钮操作 */
handleAdd
()
{
addInputs
()
{
this
.
instea
=
0
;
this
.
getnameid
();
this
.
instea
+=
1
;
this
.
reset
();
this
.
detailMH
[
this
.
instea
-
1
]
=
1
;
this
.
open
=
true
;
this
.
detailML
[
this
.
instea
-
1
]
=
1
;
this
.
title
=
"
添加规则详情
"
;
this
.
detailYH
[
this
.
instea
-
1
]
=
1
;
},
this
.
detailYL
[
this
.
instea
-
1
]
=
1
;
/** 修改按钮操作 */
handleUpdate
(
row
)
{
},
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getSuppliesroledetail
(
id
).
then
(
response
=>
{
toggleEnable
(
suppliesRoleDetail
){
this
.
form
=
response
.
data
;
console
.
log
(
'
你点击了【
'
+
suppliesRoleDetail
.
s
+
'
】的开关控件,当前开关值:
'
+
suppliesRoleDetail
.
status
);
const
detailContent
=
response
.
data
.
detailContent
;
let
enableText
=
[
'
启用
'
,
'
禁用
'
];
const
parse
=
JSON
.
parse
(
detailContent
);
if
(
suppliesRoleDetail
.
status
===
0
)
{
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
toggleEnable
(
suppliesRoleDetail
.
id
).
then
((
response
)
=>
{
this
.
detailML
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ct
)
+
1
);
if
(
response
.
code
===
200
){
this
.
detailYH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
re
)
+
1
);
let
message
=
'
操作成功,已经将【
'
+
suppliesRoleDetail
.
roleName
+
'
】的状态改为【
'
+
enableText
[
suppliesRoleDetail
.
status
]
+
'
】 !
'
;
this
.
detailYL
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ce
)
+
1
);
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
this
.
instea
=
this
.
detailMH
.
length
;
}
else
{
this
.
$message
.
error
(
response
.
message
);
this
.
open
=
true
;
}
this
.
title
=
"
修改规则详情
"
;
});
});
}
else
{
},
toggleDisable
(
suppliesRoleDetail
.
id
).
then
((
response
)
=>
{
/** 提交按钮 */
if
(
response
.
code
===
200
){
submitForm
()
{
let
message
=
'
操作成功,已经将【
'
+
suppliesRoleDetail
.
roleName
+
'
】的状态改为【
'
+
enableText
[
suppliesRoleDetail
.
status
]
+
'
】 !
'
;
this
.
$message
({
message
:
message
,
type
:
'
success
'
});
this
.
form
.
detailMH
=
this
.
detailMH
;
}
else
{
this
.
form
.
detailML
=
this
.
detailML
;
this
.
$message
.
error
(
response
.
message
);
this
.
form
.
detailYH
=
this
.
detailYH
;
}
this
.
form
.
detailYL
=
this
.
detailYL
;
});
}
},
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
/**显示序号*/
if
(
this
.
form
.
id
!=
null
)
{
indexMethod
(
index
){
updateSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
return
index
+
1
;
this
.
msgSuccess
(
"
修改成功
"
);
},
this
.
open
=
false
;
this
.
getList
();
/**获取关联表内容*/
getnameid
(){
//上级规则
saveSid
().
then
(
response
=>
{
this
.
options1
=
response
.
rows
;
})
// //运算规则
// saveOperation().then(response =>{
// this.options2 = response.rows;
// console.log(this.options2)
// })
},
/** 查询规则详情列表 */
getList
()
{
this
.
indexMethod
(
0
);
this
.
loading
=
true
;
listSuppliesroledetail
(
this
.
queryParams
).
then
(
response
=>
{
this
.
suppliesroledetailList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
});
}
else
{
},
addSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
// 取消按钮
this
.
msgSuccess
(
"
新增成功
"
);
cancel
()
{
this
.
open
=
false
;
this
.
open
=
false
;
this
.
getList
();
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
roleId
:
null
,
detailName
:
null
,
detailYS
:
null
,
detailContent
:
null
,
status
:
0
,
convertStatus
:
null
,
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
.
instea
=
0
;
this
.
getnameid
();
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加规则详情
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getSuppliesroledetail
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
const
detailContent
=
response
.
data
.
detailContent
;
const
parse
=
JSON
.
parse
(
detailContent
);
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
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
=
"
修改规则详情
"
;
});
});
}
},
/** 提交按钮 */
submitForm
()
{
this
.
form
.
detailMH
=
this
.
detailMH
;
this
.
form
.
detailML
=
this
.
detailML
;
this
.
form
.
detailYH
=
this
.
detailYH
;
this
.
form
.
detailYL
=
this
.
detailYL
;
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除规则详情编号为"
'
+
row
.
detailName
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSuppliesroledetail
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有规则详情数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSuppliesroledetail
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$confirm
(
'
是否确认删除规则详情编号为"
'
+
row
.
detailName
+
'
"的数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
delSuppliesroledetail
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
})
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'
是否确认导出所有规则详情数据项?
'
,
"
警告
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
return
exportSuppliesroledetail
(
queryParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
})
}
}
}
};
};
</
script
>
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment