Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
3fb0fa8a
Commit
3fb0fa8a
authored
Oct 24, 2021
by
季圣华
Browse files
增加修复库存的功能
parent
0e5374e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/material/MaterialList.vue
View file @
3fb0fa8a
...
...
@@ -67,6 +67,7 @@
<a-menu-item
key=
"1"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchDel"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
<a-menu-item
key=
"2"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchSetStatus(true)"
><a-icon
type=
"check-square"
/>
启用
</a-menu-item>
<a-menu-item
key=
"3"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchSetStatus(false)"
><a-icon
type=
"close-square"
/>
禁用
</a-menu-item>
<a-menu-item
key=
"4"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchSetMaterialCurrentStock()"
><a-icon
type=
"stock"
/>
修正库存
</a-menu-item>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/>
...
...
@@ -121,8 +122,8 @@
</template>
<
script
>
import
MaterialModal
from
'
./modules/MaterialModal
'
import
{
queryMaterialCategoryTreeList
,
queryMaterialCategoryById
}
from
'
@/api/api
'
import
{
ge
tAction
}
from
'
@/api/manage
'
import
{
queryMaterialCategoryTreeList
}
from
'
@/api/api
'
import
{
pos
tAction
}
from
'
@/api/manage
'
import
{
getMpListShort
}
from
"
@/utils/util
"
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
JDate
from
'
@/components/jeecg/JDate
'
...
...
@@ -196,7 +197,8 @@
deleteBatch
:
"
/material/deleteBatch
"
,
importExcelUrl
:
"
/material/importExcel
"
,
exportXlsUrl
:
"
/material/exportExcel
"
,
batchSetStatusUrl
:
"
/material/batchSetStatus
"
batchSetStatusUrl
:
"
/material/batchSetStatus
"
,
batchSetMaterialCurrentStockUrl
:
"
/material/batchSetMaterialCurrentStock
"
}
}
},
...
...
@@ -224,6 +226,34 @@
}
})
},
batchSetMaterialCurrentStock
:
function
()
{
if
(
this
.
selectedRowKeys
.
length
<=
0
)
{
this
.
$message
.
warning
(
'
请选择一条记录!
'
);
}
else
{
let
ids
=
""
;
for
(
let
a
=
0
;
a
<
this
.
selectedRowKeys
.
length
;
a
++
)
{
ids
+=
this
.
selectedRowKeys
[
a
]
+
"
,
"
;
}
let
that
=
this
;
this
.
$confirm
({
title
:
"
确认操作
"
,
content
:
"
是否操作选中数据?
"
,
onOk
:
function
()
{
that
.
loading
=
true
;
postAction
(
that
.
url
.
batchSetMaterialCurrentStockUrl
,
{
ids
:
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
that
.
loadData
();
that
.
onClearSelected
();
}
else
{
that
.
$message
.
warning
(
res
.
data
.
message
);
}
}).
finally
(()
=>
{
that
.
loading
=
false
;
});
}
});
}
},
handleEdit
:
function
(
record
)
{
this
.
$refs
.
modalForm
.
edit
(
record
);
this
.
$refs
.
modalForm
.
title
=
"
编辑
"
;
...
...
Write
Preview
Supports
Markdown
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