Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Laisi_AutoMES2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiawei.su
Laisi_AutoMES2
Commits
d4615d8f
Commit
d4615d8f
authored
Jan 23, 2021
by
yucheng.jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
储位工装信息
parent
ac9f9fc6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
330 additions
and
81 deletions
+330
-81
associateProduct.vue
Html/src/view/fms/associate/associateProduct.vue
+0
-6
storageInfoQuery.vue
Html/src/view/wms/whStatusQuery/storageInfoQuery.vue
+330
-75
No files found.
Html/src/view/fms/associate/associateProduct.vue
View file @
d4615d8f
...
...
@@ -255,12 +255,6 @@ export default {
filename
:
''
,
//文件名称
fileurl
:
''
,
//文件路径
UploadAction
:
this
.
axios
.
publicPath
+
"config/upload/UploadImage"
,
headers
:
{
token
:
localStorage
.
getItem
(
"token"
),
timestamp
:
localStorage
.
getItem
(
"timestamp"
),
nonce
:
localStorage
.
getItem
(
"nonce"
),
sign
:
localStorage
.
getItem
(
"sign"
),
},
spinShow
:
false
,
}
},
...
...
Html/src/view/wms/whStatusQuery/storageInfoQuery.vue
View file @
d4615d8f
...
...
@@ -14,19 +14,12 @@
</div>
<div
class=
"filter"
>
<label>
{{
$t
(
5500316
)
}}
:
</label>
<Select
v-model=
"storageid"
label-in-value
clearable
filterable
filter-by-label
class=
"searchSelect"
>
<Option
v-for=
"(item,index) in storageList"
:value=
"item.id"
:key=
"index"
:label=
"item.name"
>
{{
item
.
name
}}
</Option>
</Select>
<Cascader
class=
"searchSelect"
:data=
"storageTree"
clearable
change-on-select
@
on-change=
"changeStorage"
></Cascader>
</div>
<div
class=
"searchBtn"
>
<Button
type=
"primary"
class=
"twoWord"
icon=
"ios-search"
@
click=
"tosearch()"
>
{{
$t
(
1001
)
}}
</Button>
<Button
type=
"success"
class=
"twoWord"
icon=
"md-add-circle"
@
click=
"add()"
>
{{
$t
(
'1002'
)
}}
</Button>
<
!--
<
Button
type=
"warning"
class=
"twoWord"
icon=
"ios-create-outline"
@
click=
"edit()"
>
{{
$t
(
'1003'
)
}}
</Button>
<Button
type=
"warning"
class=
"twoWord"
icon=
"ios-create-outline"
@
click=
"edit()"
>
{{
$t
(
'1003'
)
}}
</Button>
<Button
type=
"error"
class=
"twoWord intervalRight"
icon=
"md-close-circle"
@
click=
"dele()"
>
{{
$t
(
1004
)
}}
</Button>
<Button
type=
"primary"
class=
"fourWord"
icon=
"md-download"
@
click=
"loadexcel()"
>
{{
$t
(
'1005'
)
}}
</Button>
<Upload
...
...
@@ -47,7 +40,7 @@
icon=
"md-cloud-upload"
>
{{
$t
(
'1006'
)
}}
</Button>
</Upload>
<Button
type=
"primary"
class=
"fourWord"
icon=
"ios-cloud-download"
@
click=
"
Export()"
>
{{
$t
(
'1007'
)
}}
</Button>
--
>
<Button
type=
"primary"
class=
"fourWord"
icon=
"ios-cloud-download"
@
click=
"
search(1)"
>
{{
$t
(
'1007'
)
}}
</Button
>
</div>
</div>
<div
class=
"divborder newTableDiv"
>
...
...
@@ -96,16 +89,8 @@
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
{{
$t
(
5500316
)
}}
:
</label>
<Select
v-model=
"addstorageid"
label-in-value
clearable
filterable
filter-by-label
class=
"searchSelect"
>
<Option
v-for=
"(item,index) in storageList1"
:value=
"item.id"
:key=
"index"
:label=
"item.name"
>
{{
item
.
name
}}
</Option>
</Select>
<Cascader
class=
"searchSelect"
:data=
"addstorageTree"
v-model=
"addstorageList"
clearable
change-on-select
@
on-change=
"changeStorage1"
></Cascader>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
工装类型:
</label>
<Cascader
class=
"searchSelect"
:data=
"frockTypeTree"
v-model=
"parentType"
change-on-select
@
on-change=
"changeFrockType1"
></Cascader>
...
...
@@ -161,7 +146,7 @@ export default {
whdata
:[],
//仓库列表
warehouseid
:
""
,
//仓库id
//储位
storage
List
:[],
storage
Tree
:[],
storageid
:
""
,
//储位id
//列表
...
...
@@ -183,47 +168,61 @@ export default {
},
{
title
:
'仓库名称'
,
key
:
'wa
rehouse_nam
e'
key
:
'wa
vehous
e'
},
{
title
:
'储位信息'
,
key
:
'
storage_info
'
key
:
'
location
'
},
{
title
:
'储位ID'
,
key
:
'
storage_
id'
key
:
'
location
id'
},
{
title
:
'工装类别'
,
key
:
'
frock_type
'
key
:
'
category
'
},
{
title
:
'工装编号'
,
key
:
'
frock_
code'
key
:
'code'
},
{
title
:
'工装名称'
,
key
:
'f
rock_name
'
key
:
'f
ixturetool
'
},
{
title
:
'工装规格'
,
key
:
'
frock_spec
'
key
:
'
specfication
'
},
{
title
:
'工件编号'
,
key
:
'
workpiece_code
'
key
:
'
sn
'
},
{
title
:
'工序顺序'
,
key
:
'
process_seq
'
key
:
'
routenumber
'
},
{
title
:
'工序名称'
,
key
:
'
process_nam
e'
key
:
'
rout
e'
},
{
title
:
'物料状态'
,
key
:
'material_status'
key
:
'materialstate'
,
render
:(
h
,
params
)
=>
{
let
str
=
''
;
//materialstate:1:有工装无工件2:有工装有工件3:无工装无工件4:无工装有工件
if
(
params
.
row
.
materialstate
===
1
){
str
=
'有工装无工件'
;
}
else
if
(
params
.
row
.
materialstate
===
2
){
str
=
'有工装有工件'
;
}
else
if
(
params
.
row
.
materialstate
===
2
){
str
=
'无工装无工件'
;
}
else
if
(
params
.
row
.
materialstate
===
2
){
str
=
'无工装有工件'
;
}
return
h
(
'span'
,
str
);
}
},
{
title
:
'备注'
,
...
...
@@ -231,15 +230,32 @@ export default {
},
{
title
:
'附件'
,
key
:
'file_url'
key
:
'filename'
,
render
:(
h
,
params
)
=>
{
return
h
(
'span'
,{
style
:{
color
:
'#2b85e4'
,
cursor
:
'pointer'
},
on
:{
click
:()
=>
{
let
name
=
params
.
row
.
filename
;
let
url
=
params
.
row
.
fileurl
;
if
(
url
){
this
.
downFile
(
url
,
name
);
}
}
}
},
params
.
row
.
filename
);
}
},
{
title
:
'维护人'
,
key
:
'u
se
r'
key
:
'u
pdato
r'
},
{
title
:
'维护时间'
,
key
:
'datetime'
key
:
'
up
datetime'
}
],
...
...
@@ -247,8 +263,11 @@ export default {
addmodal
:
false
,
//添加弹窗
addwarehouseid
:
''
,
//仓库id
type
:
1
,
storageList1
:[],
//储位列表
addstorageTree
:[],
//储位列表
addstorageList
:[],
addstorageid
:
''
,
//储位id
storagelevelnum
:
0
,
//储位层级数
frockTypeTree
:[],
//工装类型
parentType
:[],
addfrockList
:[],
//工装列表
...
...
@@ -256,6 +275,7 @@ export default {
addremark
:
''
,
//备注
filename
:
''
,
fileurl
:
''
,
action
:
this
.
axios
.
publicPath
+
"wms/Upload/Submit?templateName=StorageLocation"
,
UploadAction
:
this
.
axios
.
publicPath
+
"config/upload/UploadImage"
,
headers
:
{
token
:
localStorage
.
getItem
(
"token"
),
...
...
@@ -270,9 +290,11 @@ export default {
created
(){
this
.
initWarehouse
();
//仓库
this
.
initStorage
();
this
.
tosearch
();
this
.
tableColumns1
=
this
.
$time
.
initTableTitle
(
this
.
tableColumns1
);
},
methods
:{
/*************搜索 start************ */
//仓库下拉框
initWarehouse
(){
let
params
=
{
...
...
@@ -305,60 +327,112 @@ export default {
this
.
initStorage
();
}
},
changeWarehouse1
(
value
){
this
.
storageList1
=
[];
this
.
addstorageid
=
""
;
if
(
value
!=
undefined
){
this
.
addwarehouseid
=
value
.
value
;
this
.
addinitStorage
();
}
},
//储位
initStorage
(){
let
params
=
{
page
:
1
,
pageSize
:
1000000
,
id
:
this
.
warehouseid
,
// 仓库id
isWarehouse
:
1
,
warehouseid
:
this
.
warehouseid
,
};
this
.
axios
.
request
({
url
:
"/wms/Location/GetLocation
List
"
,
url
:
"/wms/Location/GetLocation
Tree
"
,
params
,
method
:
"get"
,
})
.
then
(
(
res
)
=>
{
this
.
storageList
=
[];
let
data
=
res
.
data
.
data
;
if
(
res
.
data
.
ret
==
1
&&
Array
.
isArray
(
data
)
&&
data
.
length
)
{
this
.
storageList
=
res
.
data
.
data
;
.
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
let
arr
=
res
.
data
.
data
;
this
.
contentTree
(
arr
);
this
.
storageTree
=
arr
;
}
});
},
contentTree
(
arr
)
{
arr
.
forEach
(
ele
=>
{
ele
.
disabled
=
false
;
ele
.
value
=
ele
.
id
;
ele
.
label
=
ele
.
name
;
if
(
ele
.
children
!=
undefined
&&
ele
.
children
!=
null
&&
ele
.
children
.
length
!=
0
)
{
this
.
contentTree
(
ele
.
children
);
}
else
{
ele
.
children
=
[]
}
});
},
//切换储位
changeStorage
(){
this
.
storageid
=
""
;
if
(
value
!=
undefined
&&
value
.
length
){
this
.
storageid
=
value
[
value
.
length
-
1
];
}
},
/*************搜索 end************ */
/***************弹窗 start***************** */
//弹窗-切换仓库
changeWarehouse1
(
value
){
this
.
addstorageTree
=
[];
this
.
addstorageid
=
""
;
if
(
value
!=
undefined
){
this
.
addwarehouseid
=
value
.
value
;
this
.
addinitStorage
();
}
);
},
//弹窗-获取储位
addinitStorage
(){
let
params
=
{
page
:
1
,
pageSize
:
1000000
,
id
:
this
.
addwarehouseid
,
// 仓库id
isWarehouse
:
1
,
warehouseid
:
this
.
addwarehouseid
,
};
this
.
axios
.
request
({
url
:
"/wms/Location/GetLocation
List
"
,
url
:
"/wms/Location/GetLocation
Tree
"
,
params
,
method
:
"get"
,
})
.
then
(
(
res
)
=>
{
this
.
storageList1
=
[];
let
data
=
res
.
data
.
data
;
if
(
res
.
data
.
ret
==
1
&&
Array
.
isArray
(
data
)
&&
data
.
length
)
{
this
.
storageList1
=
res
.
data
.
data
;
.
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
let
arr
=
res
.
data
.
data
;
this
.
contentTree1
(
arr
);
this
.
addstorageTree
=
arr
;
}
});
},
contentTree1
(
arr
)
{
let
max
=
0
;
function
eachfun
(
arr
,
floor
){
arr
.
forEach
(
ele
=>
{
ele
.
disabled
=
false
;
ele
.
value
=
ele
.
id
;
ele
.
label
=
ele
.
name
;
if
(
floor
>
max
)
{
max
=
floor
;
}
if
(
ele
.
children
!=
undefined
&&
ele
.
children
!=
null
&&
ele
.
children
.
length
!=
0
)
{
eachfun
(
ele
.
children
,
floor
+
1
);
}
else
{
ele
.
children
=
[]
}
});
}
eachfun
(
arr
,
1
);
this
.
storagelevelnum
=
max
;
return
arr
;
},
//弹窗-切换储位
changeStorage1
(
value
){
this
.
addstorageid
=
""
;
if
(
Array
.
isArray
(
value
)
&&
value
.
length
==
this
.
storagelevelnum
){
this
.
addstorageid
=
value
[
value
.
length
-
1
];
}
else
{
this
.
addstorageList
=
[];
}
);
},
//工装类型
//
弹窗-
工装类型
initFrockType
(){
this
.
axios
.
request
({
url
:
"/acc/FixtureTools/GetCategoryList"
,
...
...
@@ -367,12 +441,12 @@ export default {
.
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
let
arr
=
res
.
data
.
data
;
this
.
contentTree
(
arr
);
this
.
contentTree
2
(
arr
);
this
.
frockTypeTree
=
arr
;
}
});
},
contentTree
(
arr
)
{
contentTree
2
(
arr
)
{
arr
.
forEach
(
ele
=>
{
ele
.
disabled
=
false
;
if
(
...
...
@@ -380,21 +454,23 @@ export default {
ele
.
children
!=
null
&&
ele
.
children
.
length
!=
0
)
{
this
.
contentTree
(
ele
.
children
);
this
.
contentTree
2
(
ele
.
children
);
}
else
{
ele
.
children
=
[]
}
});
},
//弹窗-工装类型变更
changeFrockType1
(
value
){
this
.
parentTypeid
=
""
;
this
.
parentType
=
[];
this
.
parentTypeid
=
""
;
//工装类型清空
this
.
addfrockList
=
[];
//工装清空
this
.
addfrockid
=
''
;
//工装id清空
if
(
value
!=
undefined
&&
value
.
length
){
this
.
parentTypeid
=
value
[
value
.
length
-
1
];
this
.
parentType
=
value
;
this
.
getFrocksChange
();
}
},
//弹窗-获取工装
getFrocksChange
(){
this
.
addfrockid
=
''
;
let
params
=
{
...
...
@@ -419,6 +495,7 @@ export default {
}
});
},
/***************弹窗 end***************** */
tosearch
(){
this
.
page
=
1
;
this
.
pagesize
=
10
;
...
...
@@ -460,17 +537,175 @@ export default {
},
add
(){
this
.
type
=
1
;
this
.
addwarehouseid
=
''
;
//仓库id
this
.
addstorageTree
=
[];
this
.
addstorageList
=
[];
this
.
addstorageid
=
''
;
//储位id
this
.
initFrockType
();
//工装类型
this
.
addstorageid
=
''
;
//仓库id
this
.
parentType
=
[];
//工装类型
this
.
parentTypeid
=
''
;
//工装类型id
this
.
addfrockid
=
''
;
//工装id
this
.
addremark
=
''
;
//备注
this
.
filename
=
''
;
this
.
fileurl
=
''
;
this
.
addmodal
=
true
;
},
//编辑
edit
(){
if
(
!
this
.
detailobj
||
!
this
.
detailobj
.
id
){
this
.
$Message
.
error
(
this
.
$t
(
'1017'
));
return
false
;
}
this
.
type
=
2
;
this
.
addwarehouseid
=
this
.
detailobj
.
wavehouseid
;
//仓库id
//获取储位
this
.
addinitStorage
();
this
.
addstorageList
=
this
.
detailobj
.
locationIds
;
this
.
addstorageid
=
this
.
detailobj
.
locationid
;
//获取工装类型
this
.
initFrockType
();
//工装类型
this
.
parentType
=
this
.
detailobj
.
categoryIds
;
//工装类型
let
categoryIds
=
this
.
detailobj
.
categoryIds
;
if
(
Array
.
isArray
(
categoryIds
)
&&
categoryIds
.
length
){
this
.
parentTypeid
=
categoryIds
[
categoryIds
.
length
-
1
];
this
.
getFrocksChange
();
}
this
.
addfrockid
=
this
.
detailobj
.
fixturetoolid
;
//工装id
this
.
addremark
=
this
.
detailobj
.
remark
?
this
.
detailobj
.
remark
:
''
;
//备注
this
.
filename
=
this
.
detailobj
.
filename
;
this
.
fileurl
=
this
.
detailobj
.
fileurl
;
this
.
addmodal
=
true
;
},
addPost
(){
if
(
!
this
.
addstorageid
){
this
.
$Message
.
error
(
"储位信息不能为空"
);
return
false
;
}
if
(
!
this
.
addfrockid
){
this
.
$Message
.
error
(
"工装名称不能为空"
);
return
false
;
}
let
url
=
''
;
let
id
=
''
;
if
(
this
.
type
===
1
){
url
=
'/acc/AutomationLocation/Add'
;
id
=
0
;
}
else
{
url
=
'/acc/AutomationLocation/Update'
;
id
=
this
.
detailobj
.
id
;
}
let
data
=
{
id
:
id
,
locationid
:
this
.
addstorageid
,
//储位ID,前端填写的那个
fixturetoolid
:
this
.
addfrockid
,
//工装ID
fileurl
:
this
.
fileurl
,
//url
filename
:
this
.
filename
,
//附件名称
remark
:
this
.
addremark
//备注
}
this
.
axios
.
request
({
url
:
url
,
data
,
method
:
"post"
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
this
.
addmodal
=
false
;
if
(
this
.
type
===
1
){
this
.
tosearch
();
this
.
$Message
.
success
(
this
.
$t
(
'1055'
));
}
else
{
this
.
$Message
.
success
(
this
.
$t
(
'1060'
));
this
.
search
(
0
);
}
}
else
{
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
.
msg
+
''
));
}
});
},
//删除
dele
(){
if
(
this
.
detailobj
.
id
===
undefined
||
this
.
detailobj
.
id
===
null
)
{
this
.
$Message
.
error
(
this
.
$t
(
"1017"
));
return
false
;
}
else
{
var
params
=
{
id
:
this
.
detailobj
.
id
,
};
this
.
$Modal
.
confirm
({
title
:
this
.
$t
(
"1018"
),
content
:
""
,
width
:
"290px"
,
closable
:
true
,
okText
:
this
.
$t
(
"1004"
),
onOk
:
()
=>
{
this
.
axios
.
request
({
url
:
"/acc/AutomationLocation/Delete"
,
params
,
method
:
"get"
,
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
ret
===
1
)
{
this
.
$Message
.
success
(
this
.
$t
(
"1058"
));
this
.
search
(
0
);
}
else
{
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
.
msg
));
}
});
},
});
}
},
//导出模板
loadexcel
()
{
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
},
/*********文件上传 start******** */
//下载文件
downFile
(
url
,
fileName
){
let
params
=
{
url
:
url
,
name
:
fileName
};
this
.
axios
.
request
({
url
:
"/config/Download/DownloadFileByUrl"
,
params
,
method
:
"get"
,
responseType
:
"blob"
})
.
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
let
url
;
let
link
=
document
.
createElement
(
"a"
);
url
=
window
.
URL
.
createObjectURL
(
res
.
data
);
link
.
style
.
display
=
"none"
;
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
}
}).
catch
(
error
=>
{
this
.
$Message
.
error
(
'请求错误'
)
});
},
handleBeforeUpload
(
file
){
this
.
spinShow
=
true
;
if
(
!
file
){
...
...
@@ -509,6 +744,26 @@ export default {
this
.
page
=
value
;
this
.
search
(
0
);
},
handleFormatError
(
file
)
{
this
.
$Message
.
error
(
this
.
$t
(
"950396"
)
+
file
.
name
+
this
.
$t
(
"950397"
)
);
},
handleSuccess
(
res
,
file
)
{
if
(
res
.
ret
==
1
)
{
this
.
$Message
.
success
(
this
.
$t
(
"950398"
));
this
.
tosearch
();
}
else
{
if
((
res
.
msg
+
""
).
indexOf
(
","
)
!=
-
1
)
{
inittip
(
res
.
msg
);
}
else
{
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
));
}
}
},
handleError
()
{
this
.
$Message
.
error
(
this
.
$t
(
"2010006"
)
+
"!"
);
},
}
}
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment