Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
875464ee
Commit
875464ee
authored
Jul 14, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
materialIndex
parent
ae0ef794
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
57 deletions
+78
-57
edit.vue
pages/material/edit.vue
+1
-0
index.vue
pages/material/index.vue
+18
-10
itemIndex.vue
pages/material/itemIndex.vue
+59
-47
No files found.
pages/material/edit.vue
View file @
875464ee
...
...
@@ -177,6 +177,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
alert
(
v
)
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
...
...
pages/material/index.vue
View file @
875464ee
...
...
@@ -27,8 +27,8 @@
<Button
type=
"primary"
@
click=
"add"
>
入库
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
"fscreeen"
>
<component
:is=
"detail"
:eid=
"curId"
:storeId=
"storeId"
:mcode=
"mCode"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Content>
</Layout>
...
...
@@ -53,10 +53,13 @@ export default {
easySearch
:
{
keys
:
{
op
:
"name,storeTitle"
,
value
:
null
}
},
fscreeen
:
false
,
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
storeId
:
null
,
mCode
:
""
,
columns
:
[
{
key
:
"name"
,
...
...
@@ -71,10 +74,9 @@ export default {
align
:
"right"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
let
minNum
=
0
if
(
params
.
row
.
minNum
)
{
minNum
=
params
.
row
.
minNum
let
minNum
=
0
;
if
(
params
.
row
.
minNum
)
{
minNum
=
params
.
row
.
minNum
;
}
return
h
(
"Tooltip"
,
...
...
@@ -84,7 +86,7 @@ export default {
placement
:
"top"
,
disabled
:
params
.
row
.
total
>
minNum
?
true
:
false
},
class
:
params
.
row
.
total
>
minNum
?
""
:
"red"
class
:
params
.
row
.
total
>
minNum
?
""
:
"red"
},
params
.
row
.
total
);
...
...
@@ -128,7 +130,7 @@ export default {
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
}
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
}
},
"查看"
)
...
...
@@ -181,6 +183,7 @@ export default {
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
fscreeen
=
false
;
this
.
curId
=
0
;
},
search
()
{
...
...
@@ -190,6 +193,7 @@ export default {
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
fscreeen
=
false
;
this
.
modal
=
true
;
},
copy
(
id
)
{
...
...
@@ -198,10 +202,13 @@ export default {
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
view
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
storeId
=
row
.
storeId
;
this
.
mCode
=
row
.
materialCode
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./itemIndex"
);
this
.
fscreeen
=
true
;
this
.
modal
=
true
;
},
edit
(
id
)
{
...
...
@@ -238,6 +245,7 @@ export default {
this
.
curId
=
row
.
id
;
this
.
title
=
"设置最低库存"
;
this
.
detail
=
()
=>
import
(
"./setNum"
);
this
.
fscreeen
=
false
;
this
.
modal
=
true
;
},
l
(
key
)
{
...
...
pages/material/itemIndex.vue
View file @
875464ee
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字名称//入库编号/"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
</DataGrid>
<span
class=
"mr20"
>
物料名称:
{{
materialName
}}
</span><span
class=
"mr20"
>
物料编号:
{{
mcode
}}
</span><span
class=
"mr20"
>
库位:
{{
storeTitle
}}
</span>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:tool=
"false"
:height=
"treeHeight"
></DataGrid>
</div>
</
template
>
<
script
>
...
...
@@ -25,33 +22,31 @@ export default {
},
data
()
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
Stockitem
,
easySearch
:
{
keys
:
{
op
:
"name,storeTitle,code,materialCode"
,
value
:
null
}
materialCode
:
{
op
:
"Equal"
,
value
:
this
.
mcode
},
storeId
:
{
op
:
"In"
,
value
:
this
.
storeId
}
},
data
:
[],
treeHeight
:
300
,
curId
:
0
,
columns
:
[
{
key
:
"
nam
e"
,
title
:
this
.
l
(
"
nam
e"
),
key
:
"
cod
e"
,
title
:
this
.
l
(
"
cod
e"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"total"
,
title
:
this
.
l
(
"total"
),
align
:
"right"
,
high
:
true
},
{
key
:
"
originalManufacturer
"
,
title
:
this
.
l
(
"
originalManufacturer
"
),
align
:
"
lef
t"
,
key
:
"
nowTotal
"
,
title
:
this
.
l
(
"
nowTotal
"
),
align
:
"
righ
t"
,
high
:
true
},
{
key
:
"batch"
,
title
:
this
.
l
(
"batch"
),
align
:
"left"
,
high
:
true
},
{
key
:
"unitPrice"
,
title
:
this
.
l
(
"unitPrice"
),
align
:
"left"
,
high
:
true
},
{
key
:
"certificateOfApproval"
,
title
:
this
.
l
(
"certificateOfApproval"
),
...
...
@@ -59,31 +54,18 @@ export default {
high
:
true
},
{
key
:
"storeTitle"
,
title
:
this
.
l
(
"storeTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"total"
,
title
:
this
.
l
(
"total"
),
align
:
"left"
,
high
:
true
},
{
key
:
"nowTotal"
,
title
:
this
.
l
(
"nowTotal"
),
align
:
"left"
,
high
:
true
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
},
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
easy
:
true
,
key
:
"unitPrice"
,
title
:
this
.
l
(
"unitPrice"
),
align
:
"right"
,
high
:
true
},
{
key
:
"
materialCode
"
,
title
:
this
.
l
(
"
materialCode
"
),
key
:
"
originalManufacturer
"
,
title
:
this
.
l
(
"
originalManufacturer
"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
...
...
@@ -96,16 +78,39 @@ export default {
align
:
"left"
,
high
:
true
}
]
],
materialName
:
''
,
storeTitle
:
''
,
};
},
props
:
{
eid
:
Number
,
storeId
:
Number
,
mcode
:
String
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
150
;
},
mounted
()
{
console
.
log
(
this
);
this
.
load
();
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
treeHeight
=
window
.
screenHeight
-
150
;
})();
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
()
{
Api
.
get
({
id
:
this
.
eid
}).
then
(
r
=>
{
this
.
materialName
=
r
.
result
.
name
this
.
storeTitle
=
r
.
result
.
storeTitle
});
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
...
...
@@ -123,6 +128,13 @@ export default {
let
vkey
=
"stock_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
// this.load(v);
}
}
}
};
</
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