Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
d9bb1ee6
Commit
d9bb1ee6
authored
Aug 06, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改页面
parent
f39d4179
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
18 deletions
+81
-18
src/components/SelectMaterial/index.vue
+80
-17
src/views/order/order/index.vue
+1
-1
No files found.
src/components/SelectMaterial/index.vue
View file @
d9bb1ee6
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
v-loading=
"loading"
:data=
"materialList"
ref=
"table"
@
selection-change=
"handleSelectionChange
"
>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"materialList"
@
selection-change=
"handleSelectionChange"
:row-key=
"getRowKey
"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:reserve-selection=
"true"
/>
<el-table-column
label=
"原料名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"原料名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"原料数量"
align=
"center"
prop=
"quantity"
>
<el-table-column
label=
"原料数量"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;"
>
<div
style=
"display: flex;align-items: center;"
>
<el-input
v-model=
"scope.row.quantity"
placeholder=
"请输入原料数量"
/>
<el-input
v-model=
"scope.row.quantity"
placeholder=
"请输入原料数量"
/>
...
@@ -23,9 +23,15 @@
...
@@ -23,9 +23,15 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-pagination
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
size-change=
"handleSizeChange"
@
pagination=
"getList"
/>
@
current-change=
"handleCurrentChange"
:current-page=
"queryParams.pageNum"
:page-sizes=
"[10, 20, 30, 40,50]"
:page-size=
"queryParams.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
<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>
...
@@ -45,10 +51,10 @@ export default {
...
@@ -45,10 +51,10 @@ export default {
loading
:
true
,
loading
:
true
,
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
// 非单个禁用
//
//
非单个禁用
single
:
true
,
//
single: true,
// 非多个禁用
//
//
非多个禁用
multiple
:
true
,
//
multiple: true,
// 显示搜索条件
// 显示搜索条件
showSearch
:
true
,
showSearch
:
true
,
// 总条数
// 总条数
...
@@ -61,13 +67,56 @@ export default {
...
@@ -61,13 +67,56 @@ export default {
pageSize
:
10
,
pageSize
:
10
,
name
:
null
,
name
:
null
,
state
:
1
,
state
:
1
,
}
,
}
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
handleCurrentChange
(
val
){
this
.
queryParams
.
pageNum
=
val
;
this
.
queryParams
.
pageSize
=
10
;
listMaterial
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
materialList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
if
(
this
.
ids
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
ids
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
materialList
.
length
;
j
++
){
if
(
this
.
ids
[
i
].
quantity
!=
""
){
if
(
this
.
ids
[
i
].
id
==
this
.
materialList
[
j
].
id
){
this
.
materialList
[
j
].
quantity
=
this
.
ids
[
i
].
quantity
}
}
}
}
}
});
},
handleSizeChange
(
val
){
this
.
queryParams
.
pageSize
=
val
;
this
.
queryParams
.
pageNum
=
1
;
listMaterial
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
materialList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
if
(
this
.
ids
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
ids
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
materialList
.
length
;
j
++
){
if
(
this
.
ids
[
i
].
quantity
!=
""
){
if
(
this
.
ids
[
i
].
id
==
this
.
materialList
[
j
].
id
){
this
.
materialList
[
j
].
quantity
=
this
.
ids
[
i
].
quantity
}
}
}
}
}
});
},
getRowKey
(
row
){
return
row
.
id
},
/** 查询列表 */
/** 查询列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -78,23 +127,37 @@ export default {
...
@@ -78,23 +127,37 @@ export default {
});
});
},
},
openModal
()
{
openModal
()
{
this
.
getList
()
this
.
getList
()
;
this
.
open
=
true
;
this
.
open
=
true
;
},
},
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
$refs
.
multipleTable
.
clearSelection
();
this
.
open
=
false
;
this
.
open
=
false
;
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
listMaterial
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
materialList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
if
(
this
.
ids
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
ids
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
materialList
.
length
;
j
++
){
if
(
this
.
ids
[
i
].
quantity
!=
""
){
if
(
this
.
ids
[
i
].
id
==
this
.
materialList
[
j
].
id
){
this
.
materialList
[
j
].
quantity
=
this
.
ids
[
i
].
quantity
}
}
}
}
}
});
},
},
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
;
this
.
ids
=
selection
;
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
...
@@ -123,7 +186,7 @@ export default {
...
@@ -123,7 +186,7 @@ export default {
return
item
;
return
item
;
})
})
);
);
this
.
$refs
.
t
able
.
clearSelection
();
this
.
$refs
.
multipleT
able
.
clearSelection
();
this
.
open
=
false
;
this
.
open
=
false
;
}
}
},
},
...
...
src/views/order/order/index.vue
View file @
d9bb1ee6
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2','3','4','5','6','7','13'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-if=
"authBtn(['2','3','4','5','6','7','1
0','1
3'], scope.row.state)"
@
click=
"refundClick(scope.row)"
v-hasPermi=
"['system:order:refund']"
>
退款
</el-button>
@
click=
"refundClick(scope.row)"
v-hasPermi=
"['system:order:refund']"
>
退款
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
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