Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manage
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
vanke
manage
Commits
bf9f35cc
Commit
bf9f35cc
authored
Jun 28, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物品新增和导入物品
parent
bf15f9b2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
StoreList.vue
src/views/inv/StoreList.vue
+14
-4
addGoodsModal.vue
src/views/inv/modules/addGoodsModal.vue
+8
-3
importGoodsModal.vue
src/views/inv/modules/importGoodsModal.vue
+0
-0
No files found.
src/views/inv/StoreList.vue
View file @
bf9f35cc
...
...
@@ -65,7 +65,7 @@
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"success"
@
click=
"handleAdd"
>
扫码入库
</el-button>
<el-button
type=
"info"
@
click=
"handleAdd"
>
扫码出库
</el-button>
<el-button
type=
"warning"
@
click=
"handle
Add
"
>
导入
</el-button>
<el-button
type=
"warning"
@
click=
"handle
Import
"
>
导入
</el-button>
</el-row>
<div
class=
"table-container"
>
<el-table
:data=
"list"
...
...
@@ -119,14 +119,16 @@
</div>
</el-card>
<!-- 弹窗-->
<add-goods
ref=
"addGoods"
@
ok=
"getList"
></add-goods>
<add-goods-modal
ref=
"addGoods"
@
ok=
"getList"
></add-goods-modal>
<import-goods-modal
ref=
"importGoods"
@
ok=
"getList"
></import-goods-modal>
</div>
</template>
<
script
>
import
moment
from
'moment'
import
{
getGoodsList
,
getGoodsCategoryList
,
getStockRooms
,
getAuditDetail
,
updateMcht
}
from
'@/api/inventory'
import
{
getSuppliersList
}
from
'@/api/supplier'
import
AddGoods
from
'./modules/addGoodsModal'
import
AddGoodsModal
from
'./modules/addGoodsModal'
import
ImportGoodsModal
from
'./modules/importGoodsModal'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
...
...
@@ -139,7 +141,10 @@ const defaultListQuery = {
export
default
{
name
:
'StoreList'
,
components
:
{
AddGoods
},
components
:
{
AddGoodsModal
,
ImportGoodsModal
},
data
()
{
return
{
listQuery
:
Object
.
assign
({},
defaultListQuery
),
...
...
@@ -218,8 +223,13 @@ export default {
this
.
listLoading
=
false
})
},
// 新增
handleAdd
(){
this
.
$refs
.
addGoods
.
add
()
},
// 导入
handleImport
(){
this
.
$refs
.
importGoods
.
add
()
}
}
}
...
...
src/views/inv/modules/addGoodsModal.vue
View file @
bf9f35cc
...
...
@@ -13,11 +13,12 @@
<el-table
:data=
"formData.tableData"
style=
"width: 100%"
@
row-dblclick=
"dbclick"
>
@
row-dblclick=
"dbclick"
:row-class-name=
"tableRowClassName"
>
<el-table-column
prop=
"name"
label=
"物品名称"
>
<template
slot-scope=
"scope"
>
<el-form-item
size=
"mini"
:prop=
"'tableData.' + scope.$index + '.name'"
:rules=
"[
{required: true,trigger: '
blur
',message: '物品名称不能为空'}]">
:rules=
"[
{required: true,trigger: '
change
',message: '物品名称不能为空'}]">
<el-autocomplete
class=
"input-width"
v-model=
"scope.row.name"
...
...
@@ -230,8 +231,12 @@ export default {
isOK
:
true
},)
},
tableRowClassName
({
row
,
rowIndex
})
{
// 把每一行的索引放进row
row
.
index
=
rowIndex
;
},
dbclick
(
row
,
event
,
column
)
{
for
(
var
i
of
this
.
tableData
)
{
for
(
var
i
of
this
.
formData
.
tableData
)
{
i
.
isOK
=
false
}
row
.
isOK
=
!
row
.
isOK
...
...
src/views/inv/modules/importGoodsModal.vue
View file @
bf9f35cc
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