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
a10adea4
Commit
a10adea4
authored
Aug 26, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
new
parents
18015f14
e226e14c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
3386 additions
and
1441 deletions
+3386
-1441
dataGrid.vue
components/page/dataGrid.vue
+229
-230
materiel.vue
components/page/materiel.vue
+64
-52
storeTree.vue
components/page/storeTree.vue
+22
-19
userSelect.vue
components/page/userSelect.vue
+46
-41
product.vue
layouts/basic-layout/product.vue
+5
-5
index.vue
pages/aps/aps/index.vue
+1
-1
index.vue
pages/home/index.vue
+4
-1
index.vue
pages/index.vue
+1
-1
add.vue
pages/material/add.vue
+106
-80
api.js
pages/material/api.js
+7
-0
detail.vue
pages/material/detail.vue
+199
-51
index.vue
pages/material/index.vue
+75
-50
itemIndex.vue
pages/material/itemIndex.vue
+0
-148
materialProperties.vue
pages/material/materialProperties.vue
+102
-0
setNum.vue
pages/material/setNum.vue
+16
-15
add.vue
pages/materiel/classification/add.vue
+34
-29
edit.vue
pages/materiel/classification/edit.vue
+32
-28
add.vue
pages/resource/resource-j/add.vue
+139
-0
api.js
pages/resource/resource-j/api.js
+44
-0
api.vue
pages/resource/resource-j/api.vue
+21
-0
cart.vue
pages/resource/resource-j/cart.vue
+193
-0
detail.vue
pages/resource/resource-j/detail.vue
+59
-0
edit.vue
pages/resource/resource-j/edit.vue
+0
-0
index.vue
pages/resource/resource-j/index.vue
+472
-0
log.vue
pages/resource/resource-j/log.vue
+83
-0
return.vue
pages/resource/resource-j/return.vue
+165
-0
search.vue
pages/resource/resource-j/search.vue
+136
-0
add.vue
pages/resource/resource/add.vue
+179
-115
api.js
pages/resource/resource/api.js
+15
-11
cart.vue
pages/resource/resource/cart.vue
+155
-94
index.vue
pages/resource/resource/index.vue
+330
-279
log.vue
pages/resource/resource/log.vue
+47
-47
record.vue
pages/resource/resource/record.vue
+134
-0
return.vue
pages/resource/resource/return.vue
+91
-66
add.vue
pages/store/add.vue
+55
-14
api.js
pages/store/api.js
+4
-1
detail.vue
pages/store/detail.vue
+18
-11
edit.vue
pages/store/edit.vue
+61
-14
index.vue
pages/store/index.vue
+41
-38
add.vue
pages/technology/productMix/product/add.vue
+1
-0
No files found.
components/page/dataGrid.vue
View file @
a10adea4
...
...
@@ -33,7 +33,7 @@
</slot>
</Col>
</Row>
<Table
v-else
:border=
"border"
:columns=
"columnsNow"
:data=
"list"
:height=
"tableHeight"
:draggable=
"draggable"
ref=
"table"
class=
"tableCommon"
@
on-expand=
"expand"
@
on-drag-drop=
"onDragDrop"
@
on-selection-change=
"selectionChange"
@
on-select=
"onSelect"
:row-key=
"rowKey"
></Table>
<Table
v-else
:border=
"border"
:columns=
"columnsNow"
:data=
"list"
:height=
"tableHeight"
:draggable=
"draggable"
ref=
"table"
class=
"tableCommon"
@
on-expand=
"expand"
@
on-drag-drop=
"onDragDrop"
@
on-selection-change=
"selectionChange"
@
on-select=
"onSelect"
@
on-select-all=
"allChange"
:row-key=
"rowKey"
></Table>
</div>
<div
class=
"table-footer"
>
<slot
name=
"footer"
></slot>
...
...
@@ -298,63 +298,62 @@ export default {
this
.
columnsCur
=
curColumns
;
}
}
}
});
}
this
.
search
.
pageIndex
=
1
;
this
.
search
.
conditions
=
where
;
this
.
load
();
},
pageChange
(
page
)
{
this
.
search
.
page
=
page
;
this
.
search
.
pageIndex
=
page
;
this
.
load
();
},
pageSizeChange
(
size
)
{
this
.
search
.
pageSize
=
size
;
this
.
search
.
pageIndex
=
1
;
this
.
load
();
},
columnChange
(
item
,
i
)
{
item
.
hide
=
!
item
.
hide
;
this
.
$set
(
this
.
columnsCur
,
item
,
i
);
this
.
saveUserconfig
();
},
loadUserConfig
()
{
var
query
=
{
conditions
:
[{
fieldName
:
"creatorUserId"
,
fieldValue
:
this
.
userId
,
conditionalType
:
"Equal"
,
selectionChange
(
items
)
{
this
.
$emit
(
"on-selection-change"
,
items
);
this
.
selectItems
=
items
;
this
.
footerToolbar
=
items
.
length
>
0
;
},
{
fieldName
:
"component"
,
fieldValue
:
"Grid"
,
conditionalType
:
"Equal"
,
onSelect
(
rows
,
row
)
{
this
.
$emit
(
"on-change"
,
rows
,
row
);
},
{
fieldName
:
"page"
,
fieldValue
:
window
.
location
.
pathname
,
conditionalType
:
"Equal"
,
allChange
(
items
)
{
this
.
$emit
(
"all-change"
,
items
);
},
],
pageSize
:
1
,
};
this
.
$api
.
post
(
`
${
window
.
systemUrl
}
/config/list`
,
query
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
result
.
length
==
1
)
{
this
.
userConfig
=
r
.
result
[
0
];
this
.
columnInit
();
}
if
(
!
this
.
configLoad
)
{
this
.
easySearch
();
}
this
.
configLoad
=
true
;
intY
()
{
if
(
this
.
$refs
.
table
!=
undefined
)
{
this
.
firstY
=
this
.
$refs
.
table
.
$el
.
getBoundingClientRect
().
top
;
}
});
},
saveUserconfig
()
{
let
url
=
`
${
window
.
systemUrl
}
/config/update`
;
var
content
=
[];
this
.
columnsCur
.
map
((
u
)
=>
{
content
.
push
({
key
:
u
.
key
,
hide
:
u
.
hide
,
});
});
if
(
!
this
.
userConfig
)
{
url
=
`
${
window
.
systemUrl
}
/config/create`
;
var
data
=
{
page
:
window
.
location
.
pathname
,
component
:
"Grid"
,
key
:
this
.
$u
.
guid
(),
content
:
JSON
.
stringify
(
content
),
};
this
.
$api
.
post
(
url
,
data
).
then
((
r
)
=>
{
this
.
loadUserConfig
();
});
}
else
{
this
.
userConfig
.
content
=
JSON
.
stringify
(
content
);
this
.
$api
.
post
(
url
,
this
.
userConfig
);
selectAll
(
status
)
{
this
.
$refs
.
table
.
selectAll
(
status
);
},
//批量取消
cancelBatch
()
{
this
.
footerToolbar
=
false
;
this
.
$refs
.
table
.
selectAll
(
false
);
},
},
computed
:
{
columnsNow
()
{
var
cols
=
this
.
columnsCur
.
filter
((
u
)
=>
{
if
(
u
.
code
)
{
u
.
render
=
(
h
,
params
)
=>
{
let
values
=
u
.
key
;
let
type
=
"text"
;
if
(
u
.
category
)
{
type
=
u
.
category
;
}
},
//展开
...
...
@@ -534,7 +533,7 @@ export default {
this
.
columnsCur
=
this
.
$u
.
clone
(
this
.
columns
);
},
},
};
};
</
script
>
<
style
lang=
"less"
>
...
...
components/page/materiel.vue
View file @
a10adea4
...
...
@@ -80,7 +80,7 @@
export
default
{
model
:
{
prop
:
"value"
,
event
:
"on-change"
event
:
"on-change"
,
},
data
()
{
return
{
...
...
@@ -89,7 +89,7 @@ export default {
departId
:
""
,
group
:
[],
ids
:
[],
bId
:
this
.
bomId
,
bId
:
this
.
bomId
,
};
},
created
()
{
...
...
@@ -102,48 +102,53 @@ export default {
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择物料"
default
:
"请选择物料"
,
},
multiple
:
{
type
:
Boolean
,
default
:
false
default
:
false
,
},
disabled
:
{
type
:
Boolean
,
default
:
false
default
:
false
,
},
theme
:
{
type
:
String
,
default
:
"select"
default
:
"select"
,
},
type
:
{
type
:
Number
,
default
:
0
default
:
0
,
},
departmentId
:
{
type
:
Number
,
default
:
0
default
:
0
,
},
roleTitle
:
{
type
:
String
,
default
:
""
default
:
""
,
},
datas
:
{
//自定义用户数据
type
:
Array
,
default
:
null
default
:
null
,
},
//物料bomid
bomId
:
{
type
:
Number
,
default
:
null
}
default
:
null
,
},
materialType
:
{
//物料类型
type
:
String
,
default
:
""
,
},
},
methods
:
{
change
(
val
)
{
console
.
log
(
val
);
let
entity
=
{};
this
.
data
.
forEach
(
e
=>
{
this
.
data
.
forEach
(
(
e
)
=>
{
if
(
e
.
id
==
val
)
{
entity
.
name
=
e
.
name
;
entity
.
mmcode
=
e
.
code
;
...
...
@@ -157,17 +162,25 @@ export default {
// 加载物料
materiallist
()
{
let
url
=
`
${
material
}
/material/materiallist`
;
let
conditions
=
[];
if
(
this
.
materialType
)
{
conditions
=
[
{
conditionalType
:
"In"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
materialType
,
},
];
}
else
{
conditions
=
[];
}
this
.
$api
.
post
(
url
,
{
// pageIndex: 1,
//departmentId: id,
type
:
this
.
type
,
conditions
:
[]
// roleTitle: this.roleTitle
// pageSize: 0
conditions
:
conditions
,
})
.
then
(
r
=>
{
this
.
data
=
r
.
result
.
filter
(
u
=>
u
.
status
==
3
);
.
then
(
(
r
)
=>
{
this
.
data
=
r
.
result
.
filter
(
(
u
)
=>
u
.
status
==
3
);
if
(
this
.
theme
==
"list"
)
{
this
.
departmentGroup
();
}
...
...
@@ -175,17 +188,16 @@ export default {
let
url1
=
`
${
technologyUrl
}
productinfo/getmaterialids`
;
this
.
$api
.
get
(
url1
,
{
Id
:
this
.
bId
Id
:
this
.
bId
,
})
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
this
.
ids
=
res
.
result
;
let
arr
=
[...
this
.
data
].
filter
(
x
=>
[...
this
.
ids
].
some
(
y
=>
y
===
x
.
id
)
let
arr
=
[...
this
.
data
].
filter
(
(
x
)
=>
[...
this
.
ids
].
some
(
(
y
)
=>
y
===
x
.
id
)
);
this
.
data
=
arr
this
.
data
=
arr
;
}
});
}
});
...
...
@@ -194,11 +206,11 @@ export default {
var
group
=
[];
var
users
=
this
.
$u
.
clone
(
this
.
data
);
if
(
this
.
name
&&
this
.
name
.
length
>
0
)
{
users
.
map
(
u
=>
{
users
.
map
(
(
u
)
=>
{
u
.
checked
=
this
.
name
.
indexOf
(
u
.
id
)
>
-
1
;
});
}
group
=
this
.
$u
.
group
(
users
,
u
=>
{
group
=
this
.
$u
.
group
(
users
,
(
u
)
=>
{
return
u
.
departmentId
;
});
var
deps
=
[];
...
...
@@ -208,7 +220,7 @@ export default {
departmentId
:
u
[
0
].
departmentId
,
children
:
u
,
opened
:
(
i
=
0
),
checked
:
false
checked
:
false
,
});
});
this
.
group
=
deps
;
...
...
@@ -226,7 +238,7 @@ export default {
removeItem
(
item
)
{
this
.
group
.
map
((
u
,
i
)
=>
{
if
(
u
.
departmentId
==
item
.
departmentId
)
{
u
.
children
.
map
(
p
=>
{
u
.
children
.
map
(
(
p
)
=>
{
if
(
p
.
id
==
item
.
id
)
{
p
.
checked
=
false
;
}
...
...
@@ -239,13 +251,13 @@ export default {
//list 时,设置值。
listSetValue
()
{
var
ids
=
[];
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
ids
.
push
(
u
.
id
);
});
this
.
$emit
(
"on-change"
,
ids
);
},
checkAll
(
item
,
i
)
{
item
.
children
.
map
(
u
=>
{
item
.
children
.
map
(
(
u
)
=>
{
u
.
checked
=
item
.
checked
;
});
this
.
$set
(
this
.
group
,
i
,
this
.
group
[
i
]);
...
...
@@ -255,19 +267,19 @@ export default {
getSelectItems
()
{
var
items
=
[];
if
(
this
.
theme
==
"list"
)
{
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
items
.
push
(
u
);
});
}
else
{
if
(
!
this
.
multiple
)
{
//单选时返回信息
if
(
this
.
datas
&&
this
.
datas
.
length
>
0
)
{
var
item2
=
this
.
datas
.
filter
(
u
=>
u
.
value
==
this
.
value
);
var
item2
=
this
.
datas
.
filter
(
(
u
)
=>
u
.
value
==
this
.
value
);
if
(
item2
&&
item2
[
0
])
{
items
.
push
(
item2
[
0
]);
}
}
else
{
var
item1
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
this
.
value
);
var
item1
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
this
.
value
);
if
(
item1
&&
item1
[
0
])
{
items
.
push
(
item1
[
0
]);
}
...
...
@@ -275,15 +287,15 @@ export default {
}
else
{
//复选时返回
if
(
this
.
datas
&&
this
.
datas
.
length
>
0
)
{
this
.
value
.
forEach
(
v
=>
{
var
item3
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
this
.
value
.
forEach
(
(
v
)
=>
{
var
item3
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
v
);
if
(
item3
&&
item3
[
0
])
{
items
.
push
(
item3
[
0
]);
}
});
}
else
{
this
.
value
.
forEach
(
v
=>
{
var
item
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
this
.
value
.
forEach
(
(
v
)
=>
{
var
item
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
v
);
if
(
item
&&
item
[
0
])
{
items
.
push
(
item
[
0
]);
}
...
...
@@ -298,21 +310,21 @@ export default {
getSelectNames
()
{
var
names
=
[];
if
(
this
.
theme
==
"list"
)
{
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
items
.
push
(
u
.
name
);
});
}
else
{
this
.
getSelectItems
().
forEach
(
v
=>
{
this
.
getSelectItems
().
forEach
(
(
v
)
=>
{
names
.
push
(
v
.
label
);
});
}
return
names
;
}
}
,
},
computed
:
{
dic
()
{
let
result
=
[];
this
.
data
.
forEach
(
u
=>
{
this
.
data
.
forEach
(
(
u
)
=>
{
// result.push({
// value: u.id,
// label: u.userName
...
...
@@ -324,43 +336,43 @@ export default {
},
checkedItems
()
{
var
items
=
[];
this
.
group
.
map
(
u
=>
{
u
.
children
.
map
(
l
=>
{
this
.
group
.
map
(
(
u
)
=>
{
u
.
children
.
map
(
(
l
)
=>
{
if
(
l
.
checked
)
{
items
.
push
(
l
);
}
});
});
return
items
;
}
}
,
},
filters
:
{
vvv
:
lis
=>
{
vvv
:
(
lis
)
=>
{
return
3
;
// return lis.filter(u=>{
// return u.checked==true
// }).lenght;
}
}
,
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
name
=
v
;
},
deep
:
true
deep
:
true
,
},
departmentId
:
{
handler
(
v
,
o
)
{
this
.
getselectuser
(
v
);
},
deep
:
true
deep
:
true
,
},
datas
(
v
)
{
if
(
v
)
{
//alert(JSON.stringify(v))
}
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"less"
>
...
...
components/page/storeTree.vue
View file @
a10adea4
...
...
@@ -32,7 +32,7 @@ export default {
return
{
keys
:
""
,
expand
:
false
,
list
:
[]
list
:
[]
,
};
},
created
()
{
...
...
@@ -45,19 +45,19 @@ export default {
{
fieldName
:
"title"
,
fieldValue
:
name
,
conditionalType
:
"Like"
}
]
conditionalType
:
"Like"
,
}
,
]
,
};
this
.
$api
.
post
(
`
${
resourceUrl
}
/storeroomlocation/paged`
,
params
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
let
res
=
r
.
result
.
items
;
var
data
=
this
.
$u
.
toTree
(
res
,
0
,
u
=>
{
u
.
value
=
u
.
id
(
u
)
=>
{
u
.
value
=
u
.
id
;
u
.
expand
=
true
;
u
.
selected
=
false
;
u
.
checked
=
false
;
...
...
@@ -85,36 +85,39 @@ export default {
"span"
,
{
style
:
{
color
:
"#000"
}
color
:
"#000"
,
}
,
},
data
.
title
)
)
,
]);
},
change
(
v
,
b
)
{
// console.log(b);
let
ids
=
[];
let
productIds
=
[];
let
rootName
=
[];
ids
.
push
(
b
.
id
);
productIds
.
push
(
b
.
value
);
if
(
b
.
children
)
{
addId
(
b
.
children
);
function
addId
(
data
)
{
data
.
map
(
u
=>
{
data
.
map
(
(
u
)
=>
{
ids
.
push
(
u
.
id
);
productIds
.
push
(
u
.
value
);
if
(
u
.
children
)
{
addId
(
u
.
children
);
}
});
}
}
this
.
$emit
(
"on-select"
,
b
.
bomId
,
b
,
productIds
,
ids
);
var
roots
=
this
.
$u
.
findRoots
(
this
.
list
,
b
.
id
).
reverse
();
rootName
=
roots
.
map
((
u
)
=>
{
return
u
.
title
;
});
this
.
$emit
(
"on-select"
,
b
,
ids
,
rootName
);
},
hide
()
{
this
.
$emit
(
"on-hide"
);
}
}
,
},
computed
:
{
data
()
{
...
...
@@ -123,7 +126,7 @@ export default {
let
result
=
[];
search
(
this
.
keys
,
items
);
function
search
(
keys
,
data
)
{
data
.
map
(
u
=>
{
data
.
map
(
(
u
)
=>
{
if
(
keys
.
length
<
2
)
{
u
.
expand
=
expand
;
result
.
push
(
u
);
...
...
@@ -138,8 +141,8 @@ export default {
});
}
return
result
;
}
}
}
,
}
,
};
</
script
>
...
...
components/page/userSelect.vue
View file @
a10adea4
...
...
@@ -30,7 +30,7 @@
</div>
<div
class=
"fg"
>
<dl>
<dd
v-for=
"(li,i) in checkedItems"
>
<dd
v-for=
"(li,i) in checkedItems"
:key=
"i"
>
<div
class=
"flex"
>
<span
class=
"fg"
>
{{
li
.
userName
}}
</span>
<a
@
click=
"removeItem(li)"
>
...
...
@@ -73,14 +73,14 @@
export
default
{
model
:
{
prop
:
"value"
,
event
:
"on-change"
event
:
"on-change"
,
},
data
()
{
return
{
name
:
this
.
value
,
data
:
[],
departId
:
""
,
group
:
[]
group
:
[]
,
};
},
created
()
{
...
...
@@ -94,38 +94,43 @@ export default {
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择人员"
default
:
"请选择人员"
,
},
multiple
:
{
type
:
Boolean
,
default
:
false
default
:
false
,
},
theme
:
{
type
:
String
,
default
:
"select"
default
:
"select"
,
},
type
:
{
type
:
Number
,
default
:
0
default
:
0
,
},
departmentId
:
{
type
:
Number
,
default
:
0
default
:
0
,
},
roleTitle
:
{
type
:
String
,
default
:
""
default
:
""
,
},
datas
:
{
//自定义用户数据
type
:
Array
,
default
:
null
}
default
:
null
,
}
,
},
methods
:
{
change
(
event
)
{
// console.log(event)
this
.
$emit
(
"on-change"
,
event
);
let
name
=
""
;
this
.
data
.
forEach
((
e
)
=>
{
if
(
e
.
id
==
event
)
{
name
=
e
.
label
;
}
});
this
.
$emit
(
"on-change"
,
event
,
name
);
},
// 加载人员
getselectuser
(
id
)
{
...
...
@@ -135,10 +140,10 @@ export default {
// pageIndex: 1,
departmentId
:
id
,
type
:
this
.
type
,
roleTitle
:
this
.
roleTitle
roleTitle
:
this
.
roleTitle
,
// pageSize: 0
})
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
data
=
r
.
result
;
if
(
this
.
theme
==
"list"
)
{
this
.
departmentGroup
();
...
...
@@ -149,11 +154,11 @@ export default {
var
group
=
[];
var
users
=
this
.
$u
.
clone
(
this
.
data
);
if
(
this
.
name
&&
this
.
name
.
length
>
0
)
{
users
.
map
(
u
=>
{
users
.
map
(
(
u
)
=>
{
u
.
checked
=
this
.
name
.
indexOf
(
u
.
id
)
>
-
1
;
});
}
group
=
this
.
$u
.
group
(
users
,
u
=>
{
group
=
this
.
$u
.
group
(
users
,
(
u
)
=>
{
return
u
.
departmentId
;
});
var
deps
=
[];
...
...
@@ -163,7 +168,7 @@ export default {
departmentId
:
u
[
0
].
departmentId
,
children
:
u
,
opened
:
(
i
=
0
),
checked
:
false
checked
:
false
,
});
});
this
.
group
=
deps
;
...
...
@@ -181,7 +186,7 @@ export default {
removeItem
(
item
)
{
this
.
group
.
map
((
u
,
i
)
=>
{
if
(
u
.
departmentId
==
item
.
departmentId
)
{
u
.
children
.
map
(
p
=>
{
u
.
children
.
map
(
(
p
)
=>
{
if
(
p
.
id
==
item
.
id
)
{
p
.
checked
=
false
;
}
...
...
@@ -194,13 +199,13 @@ export default {
//list 时,设置值。
listSetValue
()
{
var
ids
=
[];
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
ids
.
push
(
u
.
id
);
});
this
.
$emit
(
"on-change"
,
ids
);
},
checkAll
(
item
,
i
)
{
item
.
children
.
map
(
u
=>
{
item
.
children
.
map
(
(
u
)
=>
{
u
.
checked
=
item
.
checked
;
});
this
.
$set
(
this
.
group
,
i
,
this
.
group
[
i
]);
...
...
@@ -210,19 +215,19 @@ export default {
getSelectItems
()
{
var
items
=
[];
if
(
this
.
theme
==
"list"
)
{
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
items
.
push
(
u
);
});
}
else
{
if
(
!
this
.
multiple
)
{
//单选时返回信息
if
(
this
.
datas
&&
this
.
datas
.
length
>
0
)
{
var
item2
=
this
.
datas
.
filter
(
u
=>
u
.
value
==
this
.
value
);
var
item2
=
this
.
datas
.
filter
(
(
u
)
=>
u
.
value
==
this
.
value
);
if
(
item2
&&
item2
[
0
])
{
items
.
push
(
item2
[
0
]);
}
}
else
{
var
item1
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
this
.
value
);
var
item1
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
this
.
value
);
if
(
item1
&&
item1
[
0
])
{
items
.
push
(
item1
[
0
]);
}
...
...
@@ -230,15 +235,15 @@ export default {
}
else
{
//复选时返回
if
(
this
.
datas
&&
this
.
datas
.
length
>
0
)
{
this
.
value
.
forEach
(
v
=>
{
var
item3
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
this
.
value
.
forEach
(
(
v
)
=>
{
var
item3
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
v
);
if
(
item3
&&
item3
[
0
])
{
items
.
push
(
item3
[
0
]);
}
});
}
else
{
this
.
value
.
forEach
(
v
=>
{
var
item
=
this
.
dic
.
filter
(
u
=>
u
.
value
==
v
);
this
.
value
.
forEach
(
(
v
)
=>
{
var
item
=
this
.
dic
.
filter
(
(
u
)
=>
u
.
value
==
v
);
if
(
item
&&
item
[
0
])
{
items
.
push
(
item
[
0
]);
}
...
...
@@ -253,21 +258,21 @@ export default {
getSelectNames
()
{
var
names
=
[];
if
(
this
.
theme
==
"list"
)
{
this
.
checkedItems
.
map
(
u
=>
{
this
.
checkedItems
.
map
(
(
u
)
=>
{
items
.
push
(
u
.
userName
);
});
}
else
{
this
.
getSelectItems
().
forEach
(
v
=>
{
this
.
getSelectItems
().
forEach
(
(
v
)
=>
{
names
.
push
(
v
.
label
);
});
}
return
names
;
}
}
,
},
computed
:
{
dic
()
{
let
result
=
[];
this
.
data
.
forEach
(
u
=>
{
this
.
data
.
forEach
(
(
u
)
=>
{
// result.push({
// value: u.id,
// label: u.userName
...
...
@@ -279,43 +284,43 @@ export default {
},
checkedItems
()
{
var
items
=
[];
this
.
group
.
map
(
u
=>
{
u
.
children
.
map
(
l
=>
{
this
.
group
.
map
(
(
u
)
=>
{
u
.
children
.
map
(
(
l
)
=>
{
if
(
l
.
checked
)
{
items
.
push
(
l
);
}
});
});
return
items
;
}
}
,
},
filters
:
{
vvv
:
lis
=>
{
vvv
:
(
lis
)
=>
{
return
3
;
// return lis.filter(u=>{
// return u.checked==true
// }).lenght;
}
}
,
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
name
=
v
;
},
deep
:
true
deep
:
true
,
},
departmentId
:
{
handler
(
v
,
o
)
{
this
.
getselectuser
(
v
);
},
deep
:
true
deep
:
true
,
},
datas
(
v
)
{
if
(
v
)
{
//alert(JSON.stringify(v))
}
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"less"
>
...
...
layouts/basic-layout/product.vue
View file @
a10adea4
...
...
@@ -7,7 +7,7 @@
<Icon
type=
"ios-keypad"
/>
<div
class=
"top_menu_box"
>
<table
class=
"t_table_box"
>
<tr>
<
!--
<
tr>
<td
class=
"t_title"
:class=
"
{addclass:isStatic}">
<div
class=
"title"
>
<Icon
type=
"ios-home"
/>
...
...
@@ -24,7 +24,7 @@
</li>
</ul>
</td>
</tr>
</tr>
-->
<tr
v-for=
"(item,i) in filterSider"
:key=
"i"
>
<td
class=
"t_title"
:class=
"isClass == item.id ? 'addclass' : '' "
>
<div
class=
"title"
>
...
...
@@ -469,7 +469,7 @@ export default {
}
}
.top_menu_box {
padding: 1
3px 15px 19
px 0;
padding: 1
2px 15px 20
px 0;
display: none;
border-radius: 5px;
position: absolute;
...
...
@@ -500,12 +500,12 @@ export default {
}
tr {
td {
padding:
8
px 10px 0px 10px;
padding:
10
px 10px 0px 10px;
.table_row_ul {
list-style: none;
border-bottom: 1px solid #172c5d;
text-align: left;
padding-bottom: 3px;
li {
list-style: none;
display: inline-block;
...
...
pages/aps/aps/index.vue
View file @
a10adea4
...
...
@@ -8,7 +8,7 @@
:high=
"false"
@
on-drag-drop=
"onDragDrop"
:page=
"false"
@
on-
selection-
change=
"onSelect"
@
on-change=
"onSelect"
:batch=
"true"
:border=
"true"
:easy=
"true"
...
...
pages/home/index.vue
View file @
a10adea4
...
...
@@ -350,7 +350,10 @@ export default {
background-color: none !important;
}
.home {
padding: 10px 0;
padding: 10px 5px;
width: 100%;
height: 100%;
overflow-x: hidden;
.card-user {
padding: 25px 0 0 15px;
height: 120px;
...
...
pages/index.vue
View file @
a10adea4
...
...
@@ -5,7 +5,7 @@
</
template
>
<
script
>
import
iview
from
"./
crm/statistical
/index.vue"
;
import
iview
from
"./
home
/index.vue"
;
export
default
{
components
:
{
iview
...
...
pages/material/add.vue
View file @
a10adea4
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
10
0"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"materialId"
>
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
></Materiel>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')"
prop=
"storeId"
>
<StoreSelect
v-model=
"entity.storeId"
@
on-change=
"storeChange"
></StoreSelect>
<FormItem
:label=
"l('storeTitle')+':'"
>
<div
style=
"color:#515a6e"
>
{{
rootName
}}
</div>
<!--
<StoreSelect
v-model=
"entity.storeId"
@
on-change=
"storeChange"
></StoreSelect>
-->
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('inputTotal')"
prop=
"total"
>
<InputNumber
v-model=
"entity.total"
></InputNumber>
</FormItem>
<FormItem
:label=
"l('creator')+':'"
>
{{
entity
.
creator
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
unitPrice')"
prop=
"unitPrice
"
>
<
InputNumber
v-model=
"entity.unitPrice"
></InputNumber
>
<FormItem
:label=
"l('
name')"
prop=
"materialId
"
>
<
Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:materialType=
"materialType"
></Materiel
>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('
batch')"
prop=
"batch
"
>
<Input
v-model=
"entity.batch"
></Input
>
<FormItem
:label=
"l('
inputTotal')"
prop=
"total
"
>
<Input
Number
v-model=
"entity.total"
style=
"width:280px"
></InputNumber
>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('certificateOfApproval')"
prop=
"certificateOfApproval"
>
<Input
v-model=
"entity.certificateOfApproval"
></Input>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('originalManufacturer')"
prop=
"originalManufacturer"
>
<Input
v-model=
"entity.originalManufacturer"
></Input>
</Row>
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
name
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12
"
>
<FormItem
:label=
"l('creator')"
prop=
"creator
"
>
{{
entity
.
creator
}}
<Col
:span=
"12"
v-if=
"entity.materialId
"
>
<FormItem
label=
"编码:
"
>
<span>
{{
entity
.
materialCode
}}
</span>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity.json[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity.json[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity.json[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity.json[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==4"
v-model=
"entity.json[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity.json[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity.json[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity.json[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</Col>
</Row>
...
...
@@ -55,11 +78,13 @@
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"
A
dd"
,
name
:
"
a
dd"
,
data
()
{
return
{
disabled
:
false
,
fileds
:
[],
//扩展属性
entity
:
{
name
:
""
,
materialId
:
""
,
...
...
@@ -75,7 +100,8 @@ export default {
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
unitPrice
:
null
,
originalManufacturer
:
""
,
remark
:
""
remark
:
""
,
json
:
{},
},
rules
:
{
materialId
:
[
...
...
@@ -83,44 +109,37 @@ export default {
required
:
true
,
message
:
"请选择物料"
,
type
:
"string"
,
trigger
:
"change"
}
],
storeId
:
[
{
required
:
true
,
message
:
"请选择库位"
,
type
:
"number"
,
trigger
:
"change"
}
trigger
:
"change"
,
},
],
total
:
[
{
required
:
true
,
message
:
"请输入入库数量"
,
type
:
"number"
,
trigger
:
"change"
}
]
}
trigger
:
"change"
,
}
,
]
,
}
,
};
},
props
:
{
v
:
Object
,
eid
:
Number
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
// v: Object,
eid
:
Number
,
rootName
:
String
,
storeTitle
:
String
,
materialType
:
String
,
},
mounted
()
{},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
this
.
entity
.
storeId
=
this
.
eid
;
this
.
entity
.
storeTitle
=
this
.
storeTitle
;
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
...
...
@@ -129,10 +148,10 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
//
console.warn(err);
});
}
});
...
...
@@ -140,35 +159,42 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
id
=
0
;
});
},
change
(
e
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialCode
=
e
.
mmcode
;
this
.
entity
.
json
.
name
=
e
.
name
;
this
.
entity
.
json
.
materialCode
=
e
.
mmcode
;
Api
.
getmaterialdefinitionproperty
({
materialId
:
e
.
materialId
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
// return item.fieldType != 1;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
);
},
storeChange
(
v
,
item
)
{
this
.
entity
.
storeId
=
item
.
id
;
this
.
entity
.
storeTitle
=
item
.
title
;
},
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
watch
:
{},
};
</
script
>
pages/material/api.js
View file @
a10adea4
...
...
@@ -30,4 +30,11 @@ export default {
pagedStockitem
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/stockitem/paged`
,
params
);
},
getmaterialdefinitionproperty
(
params
){
return
Api
.
get
(
`
${
material
}
/custompropertydefinition/getmaterialdefinitionproperty`
,
params
);
},
list
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
/stockdetail/list`
,
params
);
//物料动态属性展示
},
}
pages/material/detail.vue
View file @
a10adea4
<
template
>
<div
class=
"detail"
>
<div>
<span
class=
"mr20"
>
物料名称:
{{
materialName
}}
</span>
<span
class=
"mr20"
>
物料编码:
{{
mcode
}}
</span>
<span>
库位:
{{
storeTitle
}}
</span>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:tool=
"false"
:height=
"treeHeight"
></DataGrid>
<Modal
v-model=
"modal1"
title=
"查看物料属性"
@
on-ok=
"ok"
@
on-cancel=
"cancel"
>
<Form
ref=
"form"
:label-width=
"100"
>
<Row>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
{{
entity
.
creatorUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
{{
entity
.
lastModifierUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('isDeleted')"
>
{{
entity
.
isDeleted
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deletionTime')"
>
{{
entity
.
deletionTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('materialId')"
>
{{
entity
.
materialId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('materialType')"
>
{{
entity
.
materialType
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('total')"
>
{{
entity
.
total
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('storeId')"
>
{{
entity
.
storeId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('storeTitle')"
>
{{
entity
.
storeTitle
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('minNum')"
>
{{
entity
.
minNum
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('brand')"
>
{{
entity
.
brand
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('specifications')"
>
{{
entity
.
specifications
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('batch')"
>
{{
entity
.
batch
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('certificateOfApproval')"
>
{{
entity
.
certificateOfApproval
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creator')"
>
{{
entity
.
creator
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('unitPrice')"
>
{{
entity
.
unitPrice
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('originalManufacturer')"
>
{{
entity
.
originalManufacturer
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('remark')"
>
{{
entity
.
remark
}}
</Filed>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
>
<span>
{{
li
.
value
}}
</span>
<div
v-if=
"li.dataType==5"
v-html=
"li.value"
></div>
<InputFile
v-if=
"li.dataType==6"
v-model=
"li.value"
></InputFile>
<InputFile
v-if=
"li.dataType==7"
v-model=
"li.value"
></InputFile>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"li.value"
:code=
"li.note"
></Dictionary>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
name
:
"list"
,
head
:
{
title
:
"入库明细"
,
author
:
"henq"
,
description
:
"stock_item 7/13/2020 6:04:18 PM"
,
},
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
action
:
Api
.
indexStockitem
,
easySearch
:
{
materialCode
:
{
op
:
"Equal"
,
value
:
this
.
mcode
},
storeId
:
{
op
:
"In"
,
value
:
this
.
storeId
},
},
data
:
[],
modal1
:
false
,
treeHeight
:
300
,
curId
:
0
,
fileds
:
[],
columns
:
[
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"total"
,
title
:
this
.
l
(
"total"
),
high
:
true
},
{
key
:
"nowTotal"
,
title
:
this
.
l
(
"nowTotal"
),
high
:
true
,
},
{
key
:
"batch"
,
title
:
this
.
l
(
"batch"
),
align
:
"left"
,
high
:
true
},
{
key
:
"certificateOfApproval"
,
title
:
this
.
l
(
"certificateOfApproval"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"unitPrice"
,
title
:
this
.
l
(
"unitPrice"
),
high
:
true
,
},
{
key
:
"originalManufacturer"
,
title
:
this
.
l
(
"originalManufacturer"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"center"
,
high
:
true
,
},
{
key
:
"creator"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
150
,
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
)
},
},
"查看"
),
]);
},
},
],
cols
:
[],
//
materialName
:
""
,
storeTitle
:
""
,
newData
:
[],
};
},
props
:
{
eid
:
Number
eid
:
Number
,
storeId
:
Number
,
mcode
:
String
,
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
150
;
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
this
.
load
();
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
treeHeight
=
window
.
screenHeight
-
150
;
})();
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
detail
(
row
)
{
this
.
modal1
=
true
;
Api
.
getmaterialdefinitionproperty
({
materialId
:
row
.
materialId
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
let
fileds
=
r
.
result
.
map
(
function
(
item
)
{
item
.
span
=
12
;
item
.
value
=
null
;
return
item
;
});
let
conditions
=
[
{
conditionalType
:
"Equal"
,
fieldName
:
"code"
,
fieldValue
:
row
.
code
,
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
];
Api
.
list
({
conditions
:
conditions
,
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
let
customProperties
=
r
.
result
[
0
].
customProperties
;
for
(
var
f
in
customProperties
)
{
fileds
.
forEach
((
u
,
i
)
=>
{
if
(
u
.
field
==
f
)
{
fileds
[
i
].
value
=
customProperties
[
f
];
}
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
});
}
this
.
fileds
=
fileds
;
}
});
// console.log(this.fileds);
}
}
);
},
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
;
this
.
curId
=
0
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"stock_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
watch
:
{},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/material/index.vue
View file @
a10adea4
...
...
@@ -24,8 +24,18 @@
<Button
type=
"primary"
@
click=
"add"
>
入库
</Button>
</
template
>
</DataGrid>
<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
v-model=
"modal"
:title=
"title"
width=
"800"
footer-hide
:fullscreen=
"fscreeen"
>
<component
:is=
"detail"
:eid=
"curId"
:rootName=
"rootName"
:storeTitle=
"storeTitle"
:materialType=
"materialType"
:storeId=
"storeId"
:mcode=
"mCode"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Content>
</Layout>
...
...
@@ -36,26 +46,29 @@ import Search from "./search";
export
default
{
name
:
"list"
,
components
:
{
Search
Search
,
},
head
:
{
title
:
"库存表"
,
author
:
"henq"
,
description
:
"stock 7/13/2020 11:48:09 AM"
description
:
"stock 7/13/2020 11:48:09 AM"
,
},
data
()
{
return
{
action
:
Api
.
index
,
showMenu
:
true
,
easySearch
:
{
keys
:
{
op
:
"name,storeTitle,materialCode"
,
value
:
null
}
keys
:
{
op
:
"name,storeTitle,materialCode"
,
value
:
null
}
,
},
fscreeen
:
false
,
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
storeId
:
null
,
storeId
:
null
,
rootName
:
""
,
storeTitle
:
""
,
materialType
:
""
,
mCode
:
""
,
columns
:
[
{
...
...
@@ -63,19 +76,18 @@ export default {
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
high
:
true
,
},
{
key
:
"materialCode"
,
title
:
this
.
l
(
"materialCode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
high
:
true
,
},
{
key
:
"total"
,
title
:
this
.
l
(
"total"
),
align
:
"right"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
let
minNum
=
0
;
...
...
@@ -88,29 +100,34 @@ export default {
props
:
{
content
:
"库存不足,总数小于"
+
minNum
,
placement
:
"top"
,
disabled
:
params
.
row
.
total
>
minNum
?
true
:
false
disabled
:
params
.
row
.
total
>
minNum
?
true
:
false
,
},
class
:
params
.
row
.
total
>
minNum
?
""
:
"red"
class
:
params
.
row
.
total
>
minNum
?
""
:
"red"
,
},
params
.
row
.
total
);
}
}
,
},
{
key
:
"minNum"
,
title
:
this
.
l
(
"minNum"
),
align
:
"right"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{},
params
.
row
.
minNum
?
params
.
row
.
minNum
:
"0"
);
}
},
},
// {
// key: "unitPrice",
// title: this.l("unitPrice"),
// easy: true,
// high: true,
// },
{
key
:
"storeTitle"
,
title
:
this
.
l
(
"storeTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
high
:
true
,
},
{
title
:
"操作"
,
...
...
@@ -125,18 +142,18 @@ export default {
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
setNum
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
setNum
(
params
.
row
)
}
,
},
"
设置最低库存
"
"
预警
"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
}
,
},
"查看"
)
)
,
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h(
// "op",
...
...
@@ -155,14 +172,14 @@ export default {
// "删除"
// )
]);
}
}
}
,
}
,
],
treeData
:
[],
ocolumn
:
[],
treeHeight
:
""
,
ids
:
[],
list
:
[]
list
:
[]
,
};
},
created
()
{
...
...
@@ -187,17 +204,20 @@ export default {
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
fscreeen
=
false
;
this
.
curId
=
0
;
//
this.curId = 0;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
if
(
this
.
curId
)
{
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
fscreeen
=
false
;
this
.
modal
=
true
;
}
else
{
this
.
$Message
.
error
(
"请先选择库房库位"
);
}
},
copy
(
id
)
{
this
.
curId
=
id
;
...
...
@@ -207,27 +227,27 @@ export default {
},
view
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
storeId
=
row
.
storeId
;
this
.
storeId
=
row
.
storeId
;
this
.
mCode
=
row
.
materialCode
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./
itemIndex
"
);
this
.
detail
=
()
=>
import
(
"./
detail
"
);
this
.
fscreeen
=
true
;
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
//
edit(id) {
//
this.curId = id;
//
this.title = "编辑";
//
this.detail = () => import("./edit");
//
this.modal = true;
//
},
//
remove(id) {
// Api.delete(id).then((r)
=> {
//
if (r.success) {
//
this.$refs.grid.load();
//
this.$Message.success("删除成功");
//
}
//
});
//
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
...
...
@@ -240,13 +260,18 @@ export default {
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
productSearch
(
id
,
item
,
productIds
,
ids
)
{
productSearch
(
item
,
ids
,
rootName
)
{
console
.
log
(
item
);
this
.
curId
=
item
.
id
;
this
.
storeTitle
=
item
.
title
;
this
.
rootName
=
rootName
.
join
(
" / "
);
this
.
materialType
=
item
.
materialType
;
let
where
=
{
storeId
:
{
op
:
"In"
,
value
:
ids
}
};
this
.
$refs
.
grid
.
reload
(
where
);
},
setNum
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
title
=
"
设置最低库存
"
;
this
.
title
=
"
预警
"
;
this
.
detail
=
()
=>
import
(
"./setNum"
);
this
.
fscreeen
=
false
;
this
.
modal
=
true
;
...
...
@@ -258,7 +283,7 @@ export default {
//new tree start
initTree
()
{
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
this
.
$http
.
order
.
getallselecttree
().
then
(
(
res
)
=>
{
//alert(JSON.stringify(res))
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
...
...
@@ -269,8 +294,8 @@ export default {
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"less"
>
...
...
pages/material/itemIndex.vue
deleted
100644 → 0
View file @
18015f14
<
template
>
<div>
<span
class=
"mr20"
>
物料名称:
{{
materialName
}}
</span>
<span
class=
"mr20"
>
物料编码:
{{
mcode
}}
</span>
<span>
库位:
{{
storeTitle
}}
</span>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:tool=
"false"
:height=
"treeHeight"
></DataGrid>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"list"
,
head
:
{
title
:
"入库明细"
,
author
:
"henq"
,
description
:
"stock_item 7/13/2020 6:04:18 PM"
},
data
()
{
return
{
action
:
Api
.
indexStockitem
,
easySearch
:
{
materialCode
:
{
op
:
"Equal"
,
value
:
this
.
mcode
},
storeId
:
{
op
:
"In"
,
value
:
this
.
storeId
}
},
data
:
[],
treeHeight
:
300
,
curId
:
0
,
columns
:
[
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"total"
,
title
:
this
.
l
(
"total"
),
align
:
"right"
,
high
:
true
},
{
key
:
"nowTotal"
,
title
:
this
.
l
(
"nowTotal"
),
align
:
"right"
,
high
:
true
},
{
key
:
"batch"
,
title
:
this
.
l
(
"batch"
),
align
:
"left"
,
high
:
true
},
{
key
:
"certificateOfApproval"
,
title
:
this
.
l
(
"certificateOfApproval"
),
align
:
"left"
,
high
:
true
},
{
key
:
"unitPrice"
,
title
:
this
.
l
(
"unitPrice"
),
align
:
"right"
,
high
:
true
},
{
key
:
"originalManufacturer"
,
title
:
this
.
l
(
"originalManufacturer"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"center"
,
high
:
true
},
{
key
:
"creator"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
}
],
materialName
:
""
,
storeTitle
:
""
};
},
props
:
{
eid
:
Number
,
storeId
:
Number
,
mcode
:
String
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
150
;
},
mounted
()
{
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
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"stock_item"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
// this.load(v);
}
}
}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/material/materialProperties.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<div>
<Divider
orientation=
"left"
>
物料属性
</Divider>
</div>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==4"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<div
v-html=
"entity"
></div>
</Col>
-->
<!--
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
-->
</Row>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
""
,
data
()
{
return
{
fileds
:
[],
//扩展属性
};
},
props
:
{
materialId
:
Number
,
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{},
methods
:
{
initFiled
(
v
)
{
Api
.
getmaterialdefinitionproperty
({
materialId
:
v
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
materialId
(
v
)
{
if
(
v
)
{
this
.
initFiled
(
v
);
}
},
},
};
</
script
>
pages/material/setNum.vue
View file @
a10adea4
...
...
@@ -3,12 +3,14 @@
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
disabled
></Input>
<div
style=
"color:#515a6e"
>
{{
entity
.
name
}}
</div>
<!--
<Input
v-model=
"entity.name"
disabled
></Input>
-->
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')"
prop=
"storeTitle"
>
<Input
v-model=
"entity.storeTitle"
disabled
></Input>
<div
style=
"color:#515a6e"
>
{{
entity
.
storeTitle
}}
</div>
<!--
<Input
v-model=
"entity.storeTitle"
disabled
></Input>
-->
</FormItem>
</Col>
<Col
:span=
"12"
>
...
...
@@ -37,14 +39,14 @@ export default {
materialCode
:
""
,
storeId
:
null
,
storeTitle
:
""
,
minNum
:
null
minNum
:
null
,
},
rules
:
{}
rules
:
{}
,
};
},
props
:
{
v
:
Object
,
eid
:
Number
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
...
...
@@ -53,18 +55,17 @@ export default {
},
methods
:
{
handleSubmit
()
{
if
(
this
.
entity
.
minNum
==
0
)
{
if
(
this
.
entity
.
minNum
==
0
)
{
this
.
$Message
.
error
(
"设置最低库存不能小于1"
);
return
return
;
}
let
params
=
{
id
:
this
.
entity
.
id
,
minNum
:
this
.
entity
.
minNum
minNum
:
this
.
entity
.
minNum
,
};
this
.
disabled
=
true
;
Api
.
setminnum
(
params
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"设置成功"
);
...
...
@@ -73,7 +74,7 @@ export default {
this
.
$Message
.
error
(
"设置失败失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
...
...
@@ -83,7 +84,7 @@ export default {
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
if
(
!
r
.
result
.
minNum
)
{
this
.
entity
.
minNum
=
0
;
...
...
@@ -93,7 +94,7 @@ export default {
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
,
},
watch
:
{
v
()
{
...
...
@@ -103,7 +104,7 @@ export default {
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
}
,
}
,
};
</
script
>
pages/materiel/classification/add.vue
View file @
a10adea4
...
...
@@ -83,7 +83,7 @@
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
v-if=
"row.fieldType>1"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
...
...
@@ -109,7 +109,7 @@ export default {
upId
:
0
,
code
:
0
,
status
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
},
disabled
:
false
,
codeList
:
[],
...
...
@@ -118,58 +118,58 @@ export default {
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"center"
align
:
"center"
,
},
{
title
:
"属性名称"
,
key
:
"title"
,
slot
:
"title"
slot
:
"title"
,
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
200
width
:
200
,
},
{
title
:
"设置"
,
key
:
"note"
,
align
:
"center"
,
slot
:
"note"
slot
:
"note"
,
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
,
width
:
"150"
width
:
"150"
,
},
{
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
,
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
,
},
{
width
:
80
,
title
:
"操作"
,
slot
:
"action"
,
align
:
"center"
}
align
:
"center"
,
}
,
],
checkList
:
[],
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
,
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -184,30 +184,35 @@ export default {
{
conditionalType
:
"In"
,
fieldName
:
"fieldType"
,
fieldValue
:
"1,2"
fieldValue
:
"1,2"
,
},
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
"0"
}
fieldValue
:
"0"
,
},
{
conditionalType
:
"Equal"
,
fieldName
:
"codeRuleId"
,
fieldValue
:
this
.
nodeInfo
.
codeRuleId
,
},
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
isDesc
:
false
,
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
item
.
mid
=
item
.
id
;
delete
item
[
"id"
];
//删除属性id
return
item
.
fieldType
>
1
;
// return item.fieldType > 1;
return
true
;
});
}
});
Api
.
getChildren
({
id
:
582
}).
then
(
r
=>
{
Api
.
getChildren
({
id
:
582
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
...
...
@@ -229,7 +234,7 @@ export default {
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
this
.
checkList
.
map
(
(
u
)
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
...
...
@@ -245,17 +250,17 @@ export default {
fieldType
:
3
,
categoryId
:
0
,
action
:
1
,
add
:
0
//新增标识
add
:
0
,
//新增标识
};
this
.
checkList
.
push
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
let
categoryDto
=
this
.
entity
;
let
pro
=
this
.
checkList
.
concat
(
this
.
arr
);
Api
.
create
({
categoryDto
:
categoryDto
,
pro
:
pro
})
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
...
...
@@ -263,7 +268,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
});
...
...
@@ -272,7 +277,7 @@ export default {
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
}
}
}
,
}
,
};
</
script
>
pages/materiel/classification/edit.vue
View file @
a10adea4
...
...
@@ -47,7 +47,6 @@
v-model=
"row.note"
clearable
transfer
@
on-change=
"setRow(row,index)"
>
<Option
v-for=
"item in codeList"
:value=
"item.code"
:key=
"item.code"
>
{{
item
.
name
}}
</Option>
...
...
@@ -84,7 +83,7 @@
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
v-if=
"row.fieldType>1"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
...
...
@@ -108,7 +107,7 @@ export default {
entity
:
{
upId
:
0
,
code
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
},
arr
:
[],
disabled
:
false
,
...
...
@@ -117,56 +116,56 @@ export default {
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"center"
align
:
"center"
,
},
{
title
:
"属性名称"
,
key
:
"title"
,
slot
:
"title"
slot
:
"title"
,
},
{
title
:
"属性类型"
,
key
:
"dataType"
,
align
:
"center"
,
slot
:
"dataType"
,
width
:
150
width
:
150
,
},
{
title
:
"备注"
,
key
:
"note"
,
slot
:
"note"
slot
:
"note"
,
},
{
title
:
"单位"
,
key
:
"unitName"
,
align
:
"center"
,
slot
:
"unitName"
slot
:
"unitName"
,
},
{
title
:
"必填"
,
key
:
"required"
,
align
:
"center"
,
slot
:
"required"
,
width
:
80
width
:
80
,
},
{
title
:
"唯一"
,
key
:
"isUnique"
,
align
:
"center"
,
slot
:
"isUnique"
,
width
:
80
width
:
80
,
},
{
title
:
"操作"
,
slot
:
"action"
,
width
:
80
,
align
:
"center"
}
align
:
"center"
,
}
,
],
checkList
:
[],
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
,
};
},
...
...
@@ -178,7 +177,7 @@ export default {
},
methods
:
{
get
()
{
Api
.
get
({
id
:
this
.
nodeInfo
.
id
}).
then
(
r
=>
{
Api
.
get
({
id
:
this
.
nodeInfo
.
id
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
entity
=
r
.
result
;
this
.
tableData
();
...
...
@@ -190,23 +189,28 @@ export default {
{
conditionalType
:
"Equal"
,
fieldName
:
"categoryId"
,
fieldValue
:
this
.
nodeInfo
.
id
}
fieldValue
:
this
.
nodeInfo
.
id
,
},
{
conditionalType
:
"Equal"
,
fieldName
:
"codeRuleId"
,
fieldValue
:
this
.
nodeInfo
.
codeRuleId
,
},
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
isDesc
:
false
,
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
console
.
log
(
r
);
r
.
result
.
map
(
u
=>
{
r
.
result
.
map
(
(
u
)
=>
{
u
.
mid
=
u
.
id
;
});
this
.
checkList
=
r
.
result
;
}
});
Api
.
getChildren
({
id
:
582
}).
then
(
r
=>
{
Api
.
getChildren
({
id
:
582
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
codeList
=
r
.
result
;
}
...
...
@@ -227,7 +231,7 @@ export default {
},
addNew
()
{
let
maxId
=
0
;
this
.
checkList
.
map
(
u
=>
{
this
.
checkList
.
map
(
(
u
)
=>
{
if
(
u
.
mid
>
maxId
)
{
maxId
=
u
.
mid
;
}
...
...
@@ -243,17 +247,17 @@ export default {
fieldType
:
3
,
categoryId
:
0
,
action
:
1
,
add
:
0
//新增标识
add
:
0
,
//新增标识
};
this
.
checkList
.
push
(
obj
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
let
categoryDto
=
this
.
entity
;
let
pro
=
this
.
checkList
.
concat
(
this
.
arr
);
Api
.
update
({
categoryDto
:
categoryDto
,
pro
:
pro
})
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
...
...
@@ -261,7 +265,7 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
r
.
error
.
message
);
});
...
...
@@ -270,7 +274,7 @@ export default {
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
}
}
}
,
}
,
};
</
script
>
pages/resource/resource-j/add.vue
0 → 100644
View file @
a10adea4
<
template
>
<div
class=
"addform"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('nameOfResource')"
prop=
"nameOfResource"
>
<Input
v-model=
"entity.nameOfResource"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('specifications')"
>
<Input
v-model=
"entity.specifications"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('totalNum')"
prop=
"totalNum"
>
<InputNumber
v-model=
"entity.totalNum"
:min=
"1"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('measuringUnit')"
>
<Input
v-model=
"entity.measuringUnit"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('qualityCharacteristics')"
>
<Input
v-model=
"entity.qualityCharacteristics"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('batchNo')"
>
<Input
v-model=
"entity.batchNo"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')"
prop=
"storeTitle"
>
<Input
v-model=
"entity.storeTitle"
readonly
clearable
@
on-clear=
"clear"
placeholder=
"请选择..."
style=
"width:274px"
>
<Button
slot=
"append"
@
click=
"selectStoreHouse"
>
选择
</Button>
<label
slot=
"append"
v-if=
"false"
>
{{
entity
.
storeId
}}
</label>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('resourceType')"
>
<Dictionary
code=
"mes_xingchi_resource.resource.resource_type"
v-model=
"entity.resourceType"
style=
"width:274px"
></Dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"18"
>
</Col>
<Col
span=
"6"
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
</Col>
</Row>
</Form>
<StoreHouse
:show
.
sync=
"showStoreHouseTree"
:value
.
sync=
"entity.storeId"
:text
.
sync=
"entity.storeTitle"
:type=
'4'
/>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
StoreHouse
from
'@/components/modalTree/storeHouse.vue'
export
default
{
name
:
'Add'
,
components
:
{
StoreHouse
},
data
()
{
return
{
entity
:
{
totalNum
:
1
,
},
rules
:
{
nameOfResource
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
specifications
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
totalNum
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
,
type
:
"number"
}],
measuringUnit
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
qualityCharacteristics
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
batchNo
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
storeTitle
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
resourceType
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
},
showStoreHouseTree
:
false
}
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
entity
.
state
=
"1"
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'resource'
+
'.'
+
key
return
this
.
$t
(
key
)
},
//清空库房库位控件信息
clear
()
{
this
.
entity
.
storeId
=
null
this
.
entity
.
storeTitle
=
''
},
selectStoreHouse
()
{
this
.
showStoreHouseTree
=
true
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$clone
(
this
.
v
)
}
}
}
</
script
>
pages/resource/resource-j/api.js
0 → 100644
View file @
a10adea4
import
Api
from
'@/plugins/request'
export
default
{
// index: `${resourceUrl}/resource/paged`,
index
:
`
${
resourceUrl
}
/resource/pagelist`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
resourceUrl
}
/resource/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/create`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
resourceUrl
}
/resource/delete`
,
{
params
:
params
});
},
getTree
(
params
)
{
let
url
=
`
${
systemUrl
}
/storeroomlocation/getlocationfilterperson`
;
return
Api
.
get
(
url
,
params
)
},
//借出
cartCreate
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/trolley/create`
,
params
);
},
//归还列表
cartGetList
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/trolleyitem/paged`
,
params
);
},
//归还
cartGiveBack
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/trolley/giveback`
,
params
);
},
//历史操作
getHistory
(
params
)
{
return
Api
.
get
(
`
${
resourceUrl
}
/resourcehistory/gethistory`
,
params
);
},
}
\ No newline at end of file
pages/resource/resource-j/api.vue
0 → 100644
View file @
a10adea4
import Api from '@/plugins/request'
export default {
index:`${resourceUrl}/resource/paged`,
paged(params){
return Api.post(`${resourceUrl}/resource/paged`,params);
},
get(params){
return Api.get(`${resourceUrl}/resource/get`,params);
},
create(params){
return Api.post(`${resourceUrl}/resource/create`,params);
},
update(params){
return Api.post(`${resourceUrl}/resource/update`,params);
},
//删除:
delete(params) {
return Api.delete(`${resourceUrl}/resource/delete`,params);
},
}
\ No newline at end of file
pages/resource/resource-j/cart.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<Table
border
:columns=
"columns"
:data=
"cartList"
class=
"tableCommon"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="numberAvailable">
<InputNumber
:max=
"row.numberAvailable1"
:min=
"1"
v-model=
"row.numberAvailable"
@
on-change=
"inputOrderCat(row,index)"
></InputNumber>
</
template
>
</Table>
<Form
:model=
"resource"
:label-width=
"110"
class=
"mt20 mb20"
:rules=
"rules"
ref=
"form"
>
<Row>
<Col
span=
"9"
>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"库管员"
>
<Input
v-model=
"resource.libraryTube"
disabled
></Input>
</FormItem>
</Col>
<Col
span=
"7"
>
<FormItem
label=
"领料人"
style=
"width:100%"
prop=
"customerId"
>
<UserSelect
ref=
"userSelected"
v-model=
"resource.customerId"
:type=
"0"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
</Col>
<Col
span=
"4"
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
借出
</Button>
</Col>
</Row>
</Form>
</div>
</template>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
let
userInfo
=
this
.
$store
.
state
.
admin
.
user
.
info
;
return
{
columns
:
[
{
key
:
'resourceId'
,
title
:
this
.
l
(
'resourceId'
),
width
:
180
},
{
title
:
this
.
l
(
'nameOfResource'
),
key
:
'nameOfResource'
},
{
title
:
this
.
l
(
'specifications'
),
key
:
'specifications'
,
width
:
100
},
{
title
:
this
.
l
(
'measuringUnit'
),
key
:
'measuringUnit'
,
width
:
100
},
{
title
:
this
.
l
(
'qualityCharacteristics'
),
key
:
'qualityCharacteristics'
,
width
:
100
},
{
title
:
this
.
l
(
'batchNo'
),
key
:
'batchNo'
,
width
:
100
},
{
title
:
this
.
l
(
'storeTitle'
),
key
:
'storeTitle'
,
width
:
100
},
{
title
:
this
.
l
(
'numberAvailable'
),
key
:
'numberAvailable'
,
width
:
120
,
slot
:
'numberAvailable'
},
{
title
:
this
.
l
(
'action'
),
key
:
'action'
,
width
:
100
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
h
(
'a'
,
{
class
:
'remove'
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
}
],
resource
:
{
libraryTube
:
userInfo
.
userName
,
//库管员
libraryTubeId
:
userInfo
.
userId
,
//库管员ID
customer
:
''
,
//领料人
customerId
:
null
,
//领料人ID
category
:
0
,
//类别
state
:
2
,
//状态
item
:
[]
},
rules
:
{
customerId
:
[
{
required
:
true
,
message
:
'请选择'
,
trigger
:
'blur'
,
type
:
'number'
}
]
}
}
},
props
:
{
cartList
:
{
type
:
[
Array
],
default
:
()
=>
{
return
[]
}
}
},
methods
:
{
handleSubmit
()
{
var
items
=
[]
let
count
=
0
this
.
cartList
.
forEach
((
data
)
=>
{
let
objList
=
Object
.
assign
({},
this
.
resource
)
delete
objList
.
item
objList
.
resourceId
=
data
.
id
objList
.
count
=
data
.
numberAvailable
items
.
push
(
objList
)
count
+=
1
})
this
.
resource
.
item
=
items
if
(
this
.
resource
.
customerId
==
0
)
{
}
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
Api
.
cartCreate
(
this
.
resource
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'substr'
,
count
,
-
1
)
this
.
$emit
(
'on-ok'
)
}
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
remove
(
id
)
{
const
index
=
this
.
cartList
.
findIndex
(
function
(
item
)
{
return
item
.
id
===
id
})
this
.
cartList
.
splice
(
index
,
1
)
this
.
$emit
(
'substr'
,
1
,
index
)
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
},
changeCustom
(
val
)
{
this
.
resource
.
customerId
=
val
+
''
//this.resource.customer = this.arry2Name(this.userList1, val)
},
arry2Name
(
arryList
,
values
)
{
//类别转换
var
codes
=
arryList
var
name
=
''
for
(
let
i
in
codes
)
{
if
(
values
==
codes
[
i
].
value
)
{
name
=
codes
[
i
].
name
}
}
return
name
},
inputOrderCat
(
row
,
index
)
{
this
.
cartList
[
index
].
numberAvailable
=
row
.
numberAvailable
}
},
watch
:
{}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource-j/detail.vue
0 → 100644
View file @
a10adea4
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('resourceId')"
>
{{
entity
.
resourceId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('nameOfResource')"
>
{{
entity
.
nameOfResource
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('specifications')"
>
{{
entity
.
specifications
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('measuringUnit')"
>
{{
entity
.
measuringUnit
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('qualityCharacteristics')"
>
{{
entity
.
qualityCharacteristics
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('batchNo')"
>
{{
entity
.
batchNo
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('storeTitle')"
>
{{
entity
.
storeTitle
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('resourceType')"
>
<state
code=
"mes_xingchi_resource.resource.resource_type"
:value=
"entity.resourceType"
type=
"text"
></state>
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{
resourceType
:
''
}
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
.
resourceType
=
r
.
result
.
resourceType
+
''
this
.
$emit
(
'on-load'
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'resource'
+
'.'
+
key
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
pages/resource/resource/edit.vue
→
pages/resource/resource
-j
/edit.vue
View file @
a10adea4
File moved
pages/resource/resource-j/index.vue
0 → 100644
View file @
a10adea4
This diff is collapsed.
Click to expand it.
pages/resource/resource-j/log.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<Table
border
:columns=
"columns"
:data=
"data"
class=
"tableCommon"
height=
"300"
></Table>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'log'
,
data
()
{
return
{
data
:
[],
columns
:
[
{
title
:
this
.
l
(
'action'
),
key
:
'action'
,
width
:
120
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
props
:
{
code
:
'mes_xingchi_resource.resource.life_state'
,
type
:
'text'
,
value
:
params
.
row
.
action
+
''
}
})
}
},
{
title
:
this
.
l
(
'count'
),
key
:
'count'
,
width
:
120
,
align
:
'right'
},
{
title
:
this
.
l
(
'numberAvailable'
),
key
:
'numberAvailable'
,
width
:
120
,
align
:
'right'
},
{
title
:
this
.
l
(
'creationTime'
),
key
:
'creationTime'
,
width
:
200
,
align
:
"center"
},
{
title
:
this
.
l
(
'libraryTube'
),
key
:
'libraryTube'
,
align
:
"center"
,
}
]
}
},
props
:
{
eid
:
Number
},
methods
:
{
//数据初始化
load
(
v
)
{
Api
.
getHistory
({
id
:
v
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
data
=
r
.
result
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource-j/return.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<Input
search
enter-button
placeholder=
"请输入借出人/名称/编码"
@
on-search=
"easySearch"
v-model=
"search.name"
style=
"width:240px"
/>
<Table
border
:columns=
"columns"
:data=
"dataList"
class=
"tableCommon"
@
on-selection-change=
"selectInfo"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="count">
<InputNumber
:max=
"row.count1"
:min=
"1"
v-model=
"row.count"
@
on-change=
"inputOrderCat(row,index)"
></InputNumber>
</
template
>
</Table>
<Form
:label-width=
"110"
class=
"mt20 mb20"
>
<Row>
<Col
span=
"15"
>
</Col>
<Col
span=
"9"
>
<FormItem
label=
"库管员"
>
<Input
v-model=
"libraryTube"
disabled
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"16"
>
</Col>
<Col
span=
"8"
>
<FormItem>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
归还
</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
dataList
:
[],
columns
:
[
{
type
:
'selection'
,
width
:
70
,
align
:
'center'
},
{
key
:
'resourceCode'
,
title
:
this
.
l
(
'resourceCode'
),
width
:
180
},
{
title
:
this
.
l
(
'nameOfResource'
),
key
:
'nameOfResource'
},
{
title
:
this
.
l
(
'specifications'
),
key
:
'specifications'
,
width
:
100
},
{
title
:
this
.
l
(
'measuringUnit'
),
key
:
'measuringUnit'
,
width
:
100
},
{
title
:
this
.
l
(
'qualityCharacteristics'
),
key
:
'qualityCharacteristics'
,
width
:
100
},
{
title
:
this
.
l
(
'batchNo'
),
key
:
'batchNo'
,
width
:
100
},
{
title
:
this
.
l
(
'storeTitle'
),
key
:
'storeTitle'
,
width
:
100
},
{
title
:
this
.
l
(
'count'
),
key
:
'count'
,
width
:
120
,
slot
:
'count'
}
],
search
:
{
name
:
''
,
pageSize
:
0
,
pageIndex
:
0
},
resource
:
[],
selectList
:
[],
libraryTube
:
this
.
$store
.
state
.
userInfo
.
userName
//库管员
}
},
props
:
{},
methods
:
{
handleSubmit
()
{
if
(
JSON
.
stringify
(
this
.
selectList
)
!=
'[]'
)
{
this
.
resource
=
this
.
selectList
Api
.
cartGiveBack
(
this
.
resource
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'归还成功'
)
this
.
$emit
(
'on-ok'
)
}
})
}
else
{
this
.
$Message
.
error
(
'请选择归还的资源'
)
}
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
selectInfo
(
value
)
{
this
.
selectList
=
[]
this
.
selectList
=
value
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
},
easySearch
()
{
this
.
dataList
=
[]
Api
.
cartGetList
(
this
.
search
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
items
=
[]
let
dataList1
=
[]
dataList1
=
r
.
result
.
items
dataList1
.
forEach
((
data
)
=>
{
let
objList
=
data
objList
.
count1
=
parseFloat
(
data
.
count
)
objList
.
count
=
parseFloat
(
data
.
count
)
objList
.
state
=
'3'
items
.
push
(
objList
)
})
this
.
dataList
=
items
}
})
},
inputOrderCat
(
row
,
index
)
{
this
.
dataList
[
index
].
count
=
row
.
count
}
},
watch
:
{}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource-j/search.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('resourceId')"
prop=
"resourceId"
>
<Input
v-model=
"condition.resourceId.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('nameOfResource')"
prop=
"nameOfResource"
>
<Input
v-model=
"condition.nameOfResource.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('specifications')"
prop=
"specifications"
>
<Input
v-model=
"condition.specifications.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('measuringUnit')"
prop=
"measuringUnit"
>
<Input
v-model=
"condition.measuringUnit.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('qualityCharacteristics')"
prop=
"qualityCharacteristics"
>
<Input
v-model=
"condition.qualityCharacteristics.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('batchNo')"
prop=
"batchNo"
>
<Input
v-model=
"condition.batchNo.value"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')"
prop=
"storeTitle"
>
<Input
v-model=
"condition.storeTitle.value"
readonly
placeholder=
"请选择..."
style=
"width:274px"
>
<Button
slot=
"append"
@
click=
"selectStoreHouse"
>
选择
</Button>
<label
slot=
"append"
v-if=
"false"
>
{{
condition
.
storeId
.
value
}}
</label>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes_xingchi_resource.resource.state"
v-model=
"condition.state.value"
style=
"width:274px"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('resourceType')"
prop=
"resourceType"
>
<Dictionary
code=
"mes_xingchi_resource.resource.resource_type"
v-model=
"condition.resourceType.value"
:multiple=
"true"
style=
"width:274px"
></Dictionary>
</FormItem>
</Col>
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('CreationTime')"
prop=
"CreationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.CreationTime.value"
placement=
"bottom-end"
></DatePicker>
</FormItem>
</Col>
-->
</Row>
</Form>
<StoreHouse
:show
.
sync=
"showStoreHouseTree"
:value
.
sync=
"condition.storeId.value"
:text
.
sync=
"condition.storeTitle.value"
style=
"z-index:999999;position: absolute;"
/>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
StoreHouse
from
'@/components/modalTree/storeHouse.vue'
export
default
{
name
:
'Search'
,
components
:
{
StoreHouse
},
data
()
{
return
{
condition
:
{
resourceId
:
{
op
:
'Like'
,
value
:
null
},
nameOfResource
:
{
op
:
'Equal'
,
value
:
null
},
specifications
:
{
op
:
'Equal'
,
value
:
null
},
measuringUnit
:
{
op
:
'Equal'
,
value
:
null
},
qualityCharacteristics
:
{
op
:
'Equal'
,
value
:
null
},
batchNo
:
{
op
:
'Equal'
,
value
:
null
},
storeId
:
{
op
:
'Equal'
,
value
:
null
},
storeTitle
:
{
op
:
'Equal'
,
value
:
null
},
state
:
{
op
:
'Equal'
,
value
:
null
},
resourceType
:
{
op
:
'In'
,
value
:
null
},
CreationTime
:
{
op
:
'Range'
,
value
:
null
}
},
showStoreHouseTree
:
false
}
},
props
:
{
v
:
Object
},
methods
:
{
search
()
{
alert
(
'未实现'
)
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'resource'
+
'.'
+
key
return
this
.
$t
(
key
)
},
selectStoreHouse
()
{
this
.
showStoreHouseTree
=
true
}
},
watch
:
{
v
()
{
this
.
condition
=
this
.
$clone
(
this
.
v
)
}
}
}
</
script
>
pages/resource/resource/add.vue
View file @
a10adea4
<
template
>
<div
class=
"addform"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Row
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('nameOfResource')"
prop=
"nameOfResource"
>
<Input
v-model=
"entity.nameOfResource"
></Input>
<FormItem
:label=
"l('storeTitle')+':'"
>
<div
style=
"color:#515a6e"
>
{{
rootName
}}
</div>
<!--
<StoreSelect
v-model=
"entity.storeId"
@
on-change=
"storeChange"
></StoreSelect>
-->
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('specifications')"
>
<Input
v-model=
"entity.specifications"
></Input>
</FormItem>
<FormItem
:label=
"l('creator')+':'"
>
{{
entity
.
creator
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('totalNum')"
prop=
"totalNum
"
>
<InputNumber
v-model=
"entity.totalNum"
:min=
"1"
></InputNumber
>
<FormItem
:label=
"l('name')"
prop=
"resourceId
"
>
<Materiel
v-model=
"entity.resourceId"
@
on-change=
"change"
:materialType=
"materialType"
></Materiel
>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('measuringUnit')"
>
<Input
v-model=
"entity.measuringUnit"
></Input
>
<FormItem
:label=
"l('inputTotal')"
prop=
"totalNum"
>
<InputNumber
v-model=
"entity.totalNum"
style=
"width:280px"
></InputNumber
>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('qualityCharacteristics')"
>
<Input
v-model=
"entity.qualityCharacteristics"
></Input>
<Col
:span=
"24"
>
<FormItem
:label=
"l('remark')"
prop=
"remark"
>
<Input
v-model=
"entity.remark"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('batchNo')"
>
<Input
v-model=
"entity.batchNo"
></Input>
</Row>
<Divider
orientation=
"left"
>
资源属性
</Divider>
<Col
:span=
"12"
v-if=
"entity.resourceId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
nameOfResource
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')"
prop=
"storeTitle"
>
<Input
v-model=
"entity.storeTitle"
readonly
clearable
@
on-clear=
"clear"
placeholder=
"请选择..."
style=
"width:274px"
>
<Button
slot=
"append"
@
click=
"selectStoreHouse"
>
选择
</Button>
<label
slot=
"append"
v-if=
"false"
>
{{
entity
.
storeId
}}
</label>
</Input>
<Col
:span=
"12"
v-if=
"entity.resourceId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
resourceCode
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('resourceType')"
>
<Dictionary
code=
"mes_xingchi_resource.resource.resource_type"
v-model=
"entity.resourceType"
style=
"width:274px"
></Dictionary>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity.json[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity.json[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity.json[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity.json[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==4"
v-model=
"entity.json[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity.json[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity.json[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity.json[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"18"
>
</Col>
<Col
span=
"6"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
</Col>
</Row>
</FormItem>
</Form>
<StoreHouse
:show
.
sync=
"showStoreHouseTree"
:value
.
sync=
"entity.storeId"
:text
.
sync=
"entity.storeTitle"
:type=
'4'
/>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
StoreHouse
from
'@/components/modalTree/storeHouse.vue'
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
components
:
{
StoreHouse
},
name
:
"add"
,
data
()
{
return
{
disabled
:
false
,
fileds
:
[],
//扩展属性
entity
:
{
totalNum
:
1
,
nameOfResource
:
""
,
resourceId
:
""
,
resourceCode
:
""
,
materialType
:
null
,
totalNum
:
null
,
storeId
:
null
,
storeTitle
:
""
,
brand
:
""
,
specifications
:
""
,
batch
:
""
,
certificateOfApproval
:
""
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
unitPrice
:
null
,
originalManufacturer
:
""
,
remark
:
""
,
state
:
1
,
numberAvailable
:
0
,
json
:
{},
},
rules
:
{
nameOfResource
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
specifications
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
totalNum
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
,
type
:
"number"
}],
measuringUnit
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
qualityCharacteristics
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
batchNo
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
storeTitle
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
resourceType
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
resourceId
:
[
{
required
:
true
,
message
:
"请选择物料"
,
type
:
"string"
,
trigger
:
"change"
,
},
showStoreHouseTree
:
false
}
],
totalNum
:
[
{
required
:
true
,
message
:
"请输入入库数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
};
},
props
:
{
v
:
Object
// v: Object,
eid
:
Number
,
rootName
:
String
,
storeTitle
:
String
,
materialType
:
String
,
},
mounted
()
{},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
entity
.
state
=
"1"
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
true
;
this
.
entity
.
storeId
=
this
.
eid
;
this
.
entity
.
storeTitle
=
this
.
storeTitle
;
this
.
entity
.
numberAvailable
=
this
.
entity
.
totalNum
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
// console.warn(err);
});
}
})
})
;
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'resource'
+
'.'
+
key
return
this
.
$t
(
key
)
},
//清空库房库位控件信息
clear
()
{
this
.
entity
.
storeId
=
null
this
.
entity
.
storeTitle
=
''
this
.
$emit
(
"on-close"
);
},
selectStoreHouse
()
{
this
.
showStoreHouseTree
=
true
change
(
e
)
{
this
.
entity
.
nameOfResource
=
e
.
name
;
this
.
entity
.
resourceId
=
e
.
materialId
;
this
.
entity
.
resourceCode
=
e
.
mmcode
;
this
.
entity
.
json
.
nameOfResource
=
e
.
name
;
this
.
entity
.
json
.
resourceCode
=
e
.
mmcode
;
Api
.
getmaterialdefinitionproperty
({
materialId
:
e
.
materialId
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$clone
(
this
.
v
)
delete
item
[
"id"
];
// return item.fieldType != 1;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
</
script
>
}
);
},
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{},
};
</
script
>
pages/resource/resource/api.js
View file @
a10adea4
import
Api
from
'@/plugins/request'
export
default
{
// index: `${resourceUrl}/resource/paged`,
index
:
`
${
resourceUrl
}
/resource/pagelist`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/paged`
,
params
);
index
:
`
${
resourceUrl
}
/resourcenew/paged`
,
index1
:
`
${
resourceUrl
}
/trolley/paged`
,
//借出记录
paged
(
params
)
{
//借出记录查询明细
return
Api
.
post
(
`
${
resourceUrl
}
/trolleyitem/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
resourceUrl
}
/resource/get`
,
params
);
return
Api
.
get
(
`
${
resourceUrl
}
/resource
new
/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/create`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/update`
,
params
);
return
Api
.
post
(
`
${
resourceUrl
}
/resourcenew/create`
,
params
);
},
// update(params) {
// return Api.post(`${resourceUrl}/resourcenew/update`, params);
// },
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
resourceUrl
}
/resource/delete`
,
{
return
Api
.
delete
(
`
${
resourceUrl
}
/resource
new
/delete`
,
{
params
:
params
});
},
...
...
@@ -40,5 +41,8 @@ export default {
getHistory
(
params
)
{
return
Api
.
get
(
`
${
resourceUrl
}
/resourcehistory/gethistory`
,
params
);
},
getmaterialdefinitionproperty
(
params
){
return
Api
.
get
(
`
${
material
}
/custompropertydefinition/getmaterialdefinitionproperty`
,
params
);
},
}
\ No newline at end of file
pages/resource/resource/cart.vue
View file @
a10adea4
<
template
>
<div>
<Table
border
:columns=
"columns"
:data=
"cartList"
class=
"tableCommon"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="
numberAvailable
">
<template
slot-scope=
"
{ row, index }" slot="
count
">
<InputNumber
:max=
"row.numberAvailable
1
"
:max=
"row.numberAvailable"
:min=
"1"
v-model=
"row.
numberAvailable
"
v-model=
"row.
count
"
@
on-change=
"inputOrderCat(row,index)"
></InputNumber>
</
template
>
...
...
@@ -20,7 +20,12 @@
</Col>
<Col
span=
"7"
>
<FormItem
label=
"领料人"
style=
"width:100%"
prop=
"customerId"
>
<UserSelect
ref=
"userSelected"
v-model=
"resource.customerId"
:type=
"0"
/>
<UserSelect
ref=
"userSelected"
v-model=
"resource.customerId"
:type=
"0"
@
on-change=
"change"
/>
</FormItem>
</Col>
</Row>
...
...
@@ -35,159 +40,215 @@
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
let
userInfo
=
this
.
$store
.
state
.
admin
.
user
.
info
;
let
userInfo
=
this
.
$store
.
state
.
admin
.
user
.
info
;
return
{
columns
:
[
{
key
:
'resourceId'
,
title
:
this
.
l
(
'resourceId'
),
width
:
180
},
key
:
"resourceCode"
,
title
:
this
.
l
(
"resourceId"
),
align
:
"left"
,
easy
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"a"
,
{
title
:
this
.
l
(
'nameOfResource'
),
key
:
'nameOfResource'
props
:
{},
style
:
{},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
},
},
params
.
row
.
resourceCode
);
},
{
title
:
this
.
l
(
'specifications'
),
key
:
'specifications'
,
width
:
100
},
{
title
:
this
.
l
(
'measuringUnit'
),
key
:
'measuringUnit'
,
width
:
100
key
:
"nameOfResource"
,
title
:
this
.
l
(
"nameOfResource"
),
align
:
"left"
,
easy
:
true
,
tooltip
:
true
,
},
{
title
:
this
.
l
(
'qualityCharacteristics'
),
key
:
'qualityCharacteristics'
,
width
:
100
key
:
"code"
,
title
:
"编码"
,
align
:
"left"
,
width
:
150
,
},
// {
// key: "creatorUserId",
// title: this.l("creatorUserId"),
// hide: false,
// type: "user",
// align: "left",
// },
{
key
:
"totalNum"
,
title
:
this
.
l
(
"totalNum"
),
align
:
"left"
,
easy
:
true
,
},
{
title
:
this
.
l
(
'batchNo'
),
key
:
'batchNo'
,
width
:
100
key
:
"numberAvailable"
,
title
:
this
.
l
(
"numberAvailable"
),
align
:
"left"
,
easy
:
true
,
},
// {
// key: "storeId",
// title: this.l("storeId"),
// align: "left",
// high: true,
// hide: true,
// },
{
key
:
"storeTitle"
,
title
:
this
.
l
(
"storeTitle"
),
align
:
"left"
,
},
{
title
:
this
.
l
(
'storeTitle'
),
key
:
'storeTitle'
,
width
:
100
key
:
"state"
,
title
:
this
.
l
(
"state"
),
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"state"
,
{
props
:
{
code
:
"mes_xingchi_resource.resource.state"
,
type
:
"text"
,
value
:
params
.
row
.
state
+
""
,
},
});
},
},
{
title
:
this
.
l
(
'numberAvailable'
),
key
:
'numberAvailable'
,
width
:
1
2
0
,
slot
:
'numberAvailable'
title
:
this
.
l
(
"count"
),
key
:
"count"
,
width
:
1
0
0
,
slot
:
"count"
,
},
{
title
:
this
.
l
(
'action'
),
key
:
'action'
,
title
:
this
.
l
(
"action"
),
key
:
"action"
,
width
:
100
,
align
:
'center'
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
'a'
,
"a"
,
{
class
:
'remove'
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
class
:
"remove"
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
]);
},
},
'删除'
)
])
}
}
],
resource
:
{
libraryTube
:
userInfo
.
userName
,
//库管员
libraryTubeId
:
userInfo
.
userId
,
//库管员ID
customer
:
''
,
//领料人
customer
:
""
,
//领料人
customerId
:
null
,
//领料人ID
category
:
0
,
//类别
state
:
2
,
//状态
item
:
[]
item
:
[]
,
},
rules
:
{
customerId
:
[
{
required
:
true
,
message
:
'请选择'
,
trigger
:
'blur'
,
type
:
'number'
}
]
}
}
{
required
:
true
,
message
:
"请选择"
,
trigger
:
"blur"
,
type
:
"number"
,
},
],
},
};
},
props
:
{
cartList
:
{
type
:
[
Array
],
default
:
()
=>
{
return
[]
}
}
default
:
()
=>
{
return
[]
;
}
,
}
,
},
methods
:
{
change
(
val
,
name
)
{
this
.
resource
.
customer
=
name
;
},
handleSubmit
()
{
var
items
=
[]
let
count
=
0
if
(
this
.
cartList
.
length
>
0
)
{
var
items
=
[];
let
count
=
0
;
this
.
cartList
.
forEach
((
data
)
=>
{
let
objList
=
Object
.
assign
({},
this
.
resource
)
delete
objList
.
item
objList
.
resourceId
=
data
.
id
objList
.
count
=
data
.
numberAvailable
items
.
push
(
objList
)
count
+=
1
})
this
.
resource
.
item
=
items
let
objList
=
Object
.
assign
({},
this
.
resource
);
delete
objList
.
item
;
console
.
log
(
data
);
objList
.
resourceId
=
data
.
resourceId
;
objList
.
resourceCode
=
data
.
resourceCode
;
objList
.
resourceMainId
=
data
.
id
;
objList
.
count
=
data
.
count
;
items
.
push
(
objList
);
count
+=
1
;
});
this
.
resource
.
item
=
items
;
if
(
this
.
resource
.
customerId
==
0
)
{
}
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
Api
.
cartCreate
(
this
.
resource
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'substr'
,
count
,
-
1
)
this
.
$emit
(
'on-ok'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"substr"
,
count
,
-
1
);
this
.
$emit
(
"on-ok"
);
}
})
});
}
});
}
else
{
this
.
$Message
.
error
(
"借出车不能为空"
);
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
remove
(
id
)
{
const
index
=
this
.
cartList
.
findIndex
(
function
(
item
)
{
return
item
.
id
===
id
})
this
.
cartList
.
splice
(
index
,
1
)
this
.
$emit
(
'substr'
,
1
,
index
)
const
index
=
this
.
cartList
.
findIndex
(
function
(
item
)
{
return
item
.
id
===
id
;
})
;
this
.
cartList
.
splice
(
index
,
1
)
;
this
.
$emit
(
"substr"
,
1
,
index
);
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
let
vkey
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
changeCustom
(
val
)
{
this
.
resource
.
customerId
=
val
+
''
this
.
resource
.
customerId
=
val
+
""
;
//this.resource.customer = this.arry2Name(this.userList1, val)
},
arry2Name
(
arryList
,
values
)
{
//类别转换
var
codes
=
arryList
var
name
=
''
var
codes
=
arryList
;
var
name
=
""
;
for
(
let
i
in
codes
)
{
if
(
values
==
codes
[
i
].
value
)
{
name
=
codes
[
i
].
name
name
=
codes
[
i
].
name
;
}
}
return
name
return
name
;
},
inputOrderCat
(
row
,
index
)
{
this
.
cartList
[
index
].
numberAvailable
=
row
.
numberAvailable
}
this
.
cartList
[
index
].
numberAvailable
=
row
.
numberAvailable
;
this
.
cartList
[
index
].
count
=
row
.
count
;
},
},
watch
:
{}
}
watch
:
{}
,
}
;
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource/index.vue
View file @
a10adea4
This diff is collapsed.
Click to expand it.
pages/resource/resource/log.vue
View file @
a10adea4
...
...
@@ -4,80 +4,80 @@
</div>
</
template
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'log'
,
name
:
"log"
,
data
()
{
return
{
data
:
[],
columns
:
[
{
title
:
this
.
l
(
'action'
),
key
:
'action'
,
title
:
this
.
l
(
"action"
),
key
:
"action"
,
width
:
120
,
align
:
"center"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
return
h
(
"state"
,
{
props
:
{
code
:
'mes_xingchi_resource.resource.life_state'
,
type
:
'text'
,
value
:
params
.
row
.
action
+
''
}
})
}
code
:
"mes_xingchi_resource.resource.life_state"
,
type
:
"text"
,
value
:
params
.
row
.
action
+
""
,
}
,
})
;
}
,
},
{
title
:
this
.
l
(
'count'
),
key
:
'count'
,
width
:
120
,
align
:
'right'
title
:
this
.
l
(
"creatorUserId"
),
key
:
"customer"
,
},
{
title
:
this
.
l
(
'numberAvailable'
),
key
:
'numberAvailable'
,
width
:
120
,
align
:
'right'
title
:
"编号"
,
key
:
"code"
,
},
{
title
:
this
.
l
(
'creationTime'
),
key
:
'creationTime'
,
width
:
200
,
align
:
"center"
title
:
this
.
l
(
"count"
),
key
:
"count"
,
},
{
title
:
this
.
l
(
'libraryTube'
),
key
:
'libraryTube'
,
align
:
"center"
,
}
]
}
title
:
this
.
l
(
"numberAvailable"
),
key
:
"numberAvailable"
,
},
{
title
:
this
.
l
(
"creationTime"
),
key
:
"creationTime"
,
align
:
"center"
,
},
{
title
:
this
.
l
(
"libraryTube"
),
key
:
"libraryTube"
,
align
:
"center"
,
},
],
};
},
props
:
{
eid
:
Number
},
methods
:
{
//数据初始化
load
(
v
)
{
Api
.
getHistory
({
id
:
v
}).
then
((
r
)
=>
{
load
()
{
Api
.
getHistory
({
id
:
this
.
eid
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
data
=
r
.
result
this
.
data
=
r
.
result
;
}
})
})
;
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
}
let
vkey
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
},
mounted
()
{
this
.
load
();
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource/record.vue
0 → 100644
View file @
a10adea4
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入领料人名称/记录编号"
v-model=
"easySearch.keys.value"
v-width=
"260"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:cartList=
"this.$u.clone(this.$store.state.cart)"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
action
:
Api
.
index1
,
easySearch
:
{
keys
:
{
op
:
"serialNumber,customer"
,
value
:
null
},
},
detail
:
null
,
dataList
:
[],
curId
:
0
,
modal
:
false
,
title
:
"归还"
,
columns
:
[
{
type
:
"index"
,
width
:
70
,
align
:
"center"
,
},
{
title
:
"借出记录编号"
,
key
:
"serialNumber"
,
},
{
key
:
"creationTime"
,
title
:
"借出时间"
,
},
{
title
:
this
.
l
(
"libraryTube"
),
key
:
"libraryTube"
,
},
{
title
:
"领料人"
,
key
:
"customer"
,
},
{
title
:
"状态"
,
key
:
"status"
,
code
:
"resource.record.status"
,
},
{
title
:
this
.
l
(
"action"
),
key
:
"action"
,
width
:
150
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"a"
,
{
class
:
"details"
,
on
:
{
click
:
()
=>
this
.
details
(
params
.
row
.
id
)
},
},
params
.
row
.
status
==
0
?
"归还"
:
""
),
]);
},
},
],
name
:
""
,
resource
:
[],
selectList
:
[],
libraryTube
:
this
.
$store
.
state
.
userInfo
.
userName
,
//库管员
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
props
:
{},
mounted
()
{},
methods
:
{
details
(
id
)
{
this
.
curId
=
id
;
this
.
detail
=
()
=>
import
(
"./return"
);
this
.
modal
=
true
;
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
selectInfo
(
value
)
{
this
.
selectList
=
[];
this
.
selectList
=
value
;
},
l
(
key
)
{
let
vkey
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
},
watch
:
{},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/resource/resource/return.vue
View file @
a10adea4
...
...
@@ -5,7 +5,7 @@
enter-button
placeholder=
"请输入借出人/名称/编码"
@
on-search=
"easySearch"
v-model=
"search.name"
v-model
.
trim
=
"search.name"
style=
"width:240px"
/>
<Table
...
...
@@ -47,119 +47,144 @@
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
return
{
dataList
:
[],
columns
:
[
{
type
:
'selection'
,
type
:
"selection"
,
width
:
70
,
align
:
'center'
align
:
"center"
,
},
// {
// type: "index",
// width: 70,
// align: "center",
// },
{
key
:
'resourceCode'
,
title
:
this
.
l
(
'resourceCode'
),
width
:
180
title
:
this
.
l
(
"nameOfResource"
),
key
:
"nameOfResource"
,
},
{
title
:
this
.
l
(
'nameOfResource'
),
key
:
'nameOfResource'
key
:
"resourceCode"
,
title
:
this
.
l
(
"resourceCode"
),
width
:
180
,
},
{
title
:
this
.
l
(
'specifications'
),
key
:
'specifications'
,
width
:
100
title
:
this
.
l
(
"libraryTube"
),
key
:
"libraryTube"
,
},
{
title
:
this
.
l
(
'measuringUnit'
),
key
:
'measuringUnit'
,
width
:
100
title
:
"领料人"
,
key
:
"customer"
,
},
{
title
:
this
.
l
(
'qualityCharacteristics'
),
key
:
'qualityCharacteristics'
,
width
:
100
key
:
"creationTime"
,
title
:
"借出时间"
,
},
// {
// title: this.l("resourceMainId"),
// key: "resourceMainId",
// width: 100,
// },
{
title
:
this
.
l
(
"storeTitle"
),
key
:
"storeTitle"
,
width
:
100
,
},
{
title
:
this
.
l
(
'batchNo'
),
key
:
'batchNo'
,
width
:
100
title
:
"借出数量"
,
key
:
"lentCount"
,
},
{
title
:
this
.
l
(
'storeTitle'
),
key
:
'storeTitle'
,
width
:
100
title
:
"已归还数量"
,
key
:
"lentCount2"
,
},
{
title
:
this
.
l
(
'count'
),
key
:
'count'
,
title
:
this
.
l
(
"count"
),
key
:
"count"
,
width
:
120
,
slot
:
'count'
}
slot
:
"count"
,
}
,
],
search
:
{
name
:
''
,
pageSize
:
0
,
pageIndex
:
0
name
:
""
,
//
pageSize: 0,
// pageIndex: 0,
},
resource
:
[],
selectList
:
[],
libraryTube
:
this
.
$store
.
state
.
userInfo
.
userName
//库管员
}
libraryTube
:
this
.
$store
.
state
.
userInfo
.
userName
,
//库管员
};
},
props
:
{
eid
:
Number
,
},
mounted
()
{
this
.
get
();
},
props
:
{},
methods
:
{
get
(
name
)
{
let
data
=
{
trollerId
:
this
.
eid
};
if
(
name
)
{
data
.
name
=
name
;
}
Api
.
paged
(
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
items
=
[];
let
dataList1
=
[];
dataList1
=
r
.
result
.
items
;
dataList1
.
forEach
((
data
)
=>
{
let
objList
=
data
;
objList
.
count1
=
parseFloat
(
data
.
count
);
objList
.
count
=
parseFloat
(
data
.
count
);
objList
.
lentCount2
=
parseFloat
(
data
.
lentCount
-
data
.
count
);
objList
.
state
=
"3"
;
items
.
push
(
objList
);
});
this
.
dataList
=
items
;
}
});
},
handleSubmit
()
{
if
(
JSON
.
stringify
(
this
.
selectList
)
!=
'[]'
)
{
this
.
resource
=
this
.
selectList
if
(
JSON
.
stringify
(
this
.
selectList
)
!=
"[]"
)
{
this
.
resource
=
this
.
selectList
;
Api
.
cartGiveBack
(
this
.
resource
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'归还成功'
)
this
.
$emit
(
'on-ok'
)
this
.
$Message
.
success
(
"归还成功"
);
this
.
$emit
(
"on-ok"
);
}
})
})
;
}
else
{
this
.
$Message
.
error
(
'请选择归还的资源'
)
this
.
$Message
.
error
(
"请选择归还的资源"
);
}
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
selectInfo
(
value
)
{
this
.
selectList
=
[]
this
.
selectList
=
value
this
.
selectList
=
[]
;
this
.
selectList
=
value
;
},
l
(
key
)
{
let
vkey
=
'resource'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
let
vkey
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
easySearch
()
{
this
.
dataList
=
[]
Api
.
cartGetList
(
this
.
search
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
items
=
[]
let
dataList1
=
[]
dataList1
=
r
.
result
.
items
dataList1
.
forEach
((
data
)
=>
{
let
objList
=
data
objList
.
count1
=
parseFloat
(
data
.
count
)
objList
.
count
=
parseFloat
(
data
.
count
)
objList
.
state
=
'3'
items
.
push
(
objList
)
})
this
.
dataList
=
items
}
})
this
.
get
(
this
.
search
.
name
);
},
inputOrderCat
(
row
,
index
)
{
this
.
dataList
[
index
].
count
=
row
.
count
}
this
.
dataList
[
index
].
count
=
row
.
count
;
}
,
},
watch
:
{}
}
watch
:
{}
,
}
;
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/store/add.vue
View file @
a10adea4
...
...
@@ -27,6 +27,13 @@
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"物料类型"
prop=
"materialType"
>
<Select
v-model=
"entity.materialType"
multiple
@
on-change=
"changeVal"
>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
...
...
@@ -40,6 +47,7 @@ export default {
name
:
"Add"
,
data
()
{
return
{
list
:
[],
disabled
:
false
,
roleTitle
:
"库管员"
,
entity
:
{
...
...
@@ -52,17 +60,18 @@ export default {
deletionTime
:
null
,
upId
:
this
.
upId
,
materialType
:
""
,
materialTypeName
:
""
,
title
:
""
,
code
:
""
,
status
:
null
,
description
:
""
,
level
:
this
.
level
,
userName
:
""
,
userIds
:
""
userIds
:
""
,
},
rules
:
{
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
,
};
},
props
:
{
...
...
@@ -72,13 +81,42 @@ export default {
upId
:
Number
,
user
:
{
type
:
Boolean
,
default
:
true
}
default
:
true
,
},
},
mounted
()
{
this
.
getList
();
},
mounted
()
{},
methods
:
{
getList
()
{
let
data
=
{
conditions
:
[
{
fieldName
:
"upId"
,
fieldValue
:
0
,
conditionalType
:
"Equal"
,
},
],
};
Api
.
list
(
data
).
then
((
r
)
=>
{
this
.
list
=
r
.
result
;
// console.log(this.list);
});
},
changeVal
(
val
)
{
let
code
=
[];
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
let
obj
=
this
.
list
[
i
];
for
(
let
j
=
0
;
j
<
val
.
length
;
j
++
)
{
if
(
obj
.
id
==
val
[
j
])
{
code
.
push
(
obj
.
code
);
}
}
}
this
.
entity
.
materialTypeName
=
code
.
join
(
","
);
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
let
userNam
=
""
;
...
...
@@ -87,6 +125,7 @@ export default {
userId
=
this
.
entity
.
userIds
.
join
(
","
);
userNam
=
this
.
$refs
.
userSelected
.
getSelectNames
().
join
(
","
);
}
let
materialType
=
this
.
entity
.
materialType
.
join
(
","
);
let
paramsdata
=
{
id
:
this
.
entity
.
id
,
upId
:
this
.
entity
.
upId
,
...
...
@@ -95,11 +134,13 @@ export default {
description
:
this
.
entity
.
description
,
//位置
level
:
this
.
entity
.
level
,
userName
:
userNam
,
//库管员
userIds
:
userId
//库管员id
userIds
:
userId
,
//库管员id
materialType
:
materialType
,
//物料类型
materialTypeName
:
this
.
entity
.
materialTypeName
,
//物料编码
};
Api
.
create
(
paramsdata
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
...
...
@@ -108,7 +149,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
...
...
@@ -120,7 +161,7 @@ export default {
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
id
=
0
;
});
...
...
@@ -129,7 +170,7 @@ export default {
l
(
key
)
{
key
=
"store_room_location"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
,
},
watch
:
{
v
()
{
...
...
@@ -137,7 +178,7 @@ export default {
},
user
(
v
)
{
this
.
user
=
v
;
}
}
}
,
}
,
};
</
script
>
pages/store/api.js
View file @
a10adea4
...
...
@@ -25,5 +25,8 @@ export default {
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/storeroomlocation/batchdelete`
,
params
);
}
},
list
(
params
)
{
return
Api
.
post
(
`
${
material
}
/category/list`
,
params
);
//物料类型列表
},
}
pages/store/detail.vue
View file @
a10adea4
...
...
@@ -4,12 +4,19 @@
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('code')"
>
{{
entity
.
code
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('description')"
>
{{
entity
.
description
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('level')"
><state
code=
"store.level"
:value=
"entity.level+''"
type=
"text"
></state>
</Filed>
<Filed
:span=
"24"
:name=
"l('userName')"
>
{{
entity
.
userName
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
><User
:value=
"entity.creatorUserId"
/></Filed>
<Filed
:span=
"12"
:name=
"l('level')"
>
<state
code=
"store.level"
:value=
"entity.level+''"
type=
"text"
></state>
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
<User
:value=
"entity.lastModifierUserId"
/></Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
<User
:value=
"entity.lastModifierUserId"
/>
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"24"
name=
"物料编号"
>
{{
entity
.
materialTypeName
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('userName')"
>
{{
entity
.
userName
}}
</Filed>
</Row>
</div>
</
template
>
...
...
@@ -22,12 +29,12 @@ export default {
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
,
}
,
};
},
props
:
{
eid
:
Number
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
...
...
@@ -36,7 +43,7 @@ export default {
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
...
...
@@ -47,14 +54,14 @@ export default {
l
(
key
)
{
key
=
"store_room_location"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
,
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
}
,
}
,
};
</
script
>
pages/store/edit.vue
View file @
a10adea4
This diff is collapsed.
Click to expand it.
pages/store/index.vue
View file @
a10adea4
This diff is collapsed.
Click to expand it.
pages/technology/productMix/product/add.vue
View file @
a10adea4
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