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
f578aa44
Commit
f578aa44
authored
Aug 21, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资源
parent
ab18ca7a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
2014 additions
and
380 deletions
+2014
-380
dataGrid.vue
components/page/dataGrid.vue
+2
-3
index.vue
pages/aps/aps/index.vue
+1
-1
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
+171
-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
+11
-8
index.vue
pages/resource/resource/index.vue
+338
-253
No files found.
components/page/dataGrid.vue
View file @
f578aa44
...
...
@@ -320,7 +320,6 @@ export default {
this
.
list
=
r
.
result
.
items
;
}
this
.
search
.
total
=
r
.
result
.
totalCount
||
r
.
result
.
count
;
});
}
},
...
...
@@ -487,7 +486,7 @@ export default {
this
.
footerToolbar
=
items
.
length
>
0
;
},
onSelect
(
rows
,
row
)
{
this
.
$emit
(
"on-
selection-
change"
,
rows
,
row
);
this
.
$emit
(
"on-change"
,
rows
,
row
);
},
intY
()
{
if
(
this
.
$refs
.
table
!=
undefined
)
{
...
...
pages/aps/aps/index.vue
View file @
f578aa44
...
...
@@ -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/resource/resource-j/add.vue
0 → 100644
View file @
f578aa44
<
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 @
f578aa44
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 @
f578aa44
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 @
f578aa44
<
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 @
f578aa44
<
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-j/edit.vue
0 → 100644
View file @
f578aa44
<
template
>
<div
class=
"addform"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('resourceId')"
prop=
"resourceId"
>
<Input
v-model=
"entity.resourceId"
disabled
></Input>
</FormItem>
</Col>
<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"
:disabled=
"numdisabled"
></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>
</Input>
<label
slot=
"append"
v-if=
"false"
>
{{
entity
.
storeId
}}
</label>
</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=
"16"
>
</Col>
<Col
span=
"8"
>
<FormItem>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
</FormItem>
</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
:
'Edit'
,
components
:
{
StoreHouse
},
data
()
{
return
{
entity
:
{
color
:
''
},
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'
,
type
:
'number'
}]
},
showStoreHouseTree
:
false
,
numdisabled
:
false
}
},
props
:
{
eid
:
Number
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
.
resourceType
=
r
.
result
.
resourceType
+
''
if
(
r
.
result
.
totalNum
!=
r
.
result
.
numberAvailable
)
{
this
.
numdisabled
=
true
}
else
{
this
.
numdisabled
=
false
}
this
.
entity
.
resourceType
=
parseInt
(
r
.
result
.
resourceType
)
this
.
$emit
(
'on-load'
)
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
entity
.
state
=
'1'
if
(
!
this
.
numdisabled
)
{
this
.
entity
.
numberAvailable
=
this
.
entity
.
totalNum
}
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
})
}
})
},
//清空库房库位控件信息
clear
()
{
this
.
entity
.
storeId
=
null
this
.
entity
.
storeTitle
=
''
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
'resource'
+
'.'
+
key
return
this
.
$t
(
key
)
},
selectStoreHouse
()
{
this
.
showStoreHouseTree
=
true
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
}
}
}
}
</
script
>
pages/resource/resource-j/index.vue
0 → 100644
View file @
f578aa44
This diff is collapsed.
Click to expand it.
pages/resource/resource-j/log.vue
0 → 100644
View file @
f578aa44
<
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 @
f578aa44
<
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 @
f578aa44
<
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 @
f578aa44
<
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.title!='资源名称'&&li.title!='资源编码'"
>
<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 @
f578aa44
import
Api
from
'@/plugins/request'
export
default
{
// index: `${resourceUrl}/resource/paged`,
index
:
`
${
resourceUrl
}
/resource
/pagelist
`
,
index
:
`
${
resourceUrl
}
/resource
new/paged
`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
/resource/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 +40,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/index.vue
View file @
f578aa44
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