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
ec2949f8
Commit
ec2949f8
authored
Jan 21, 2021
by
yucheng.jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工装类型
parent
d46d88c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
186 additions
and
52 deletions
+186
-52
accountInfo.vue
Html/src/view/fms/config/accountInfo.vue
+135
-5
typeMaintenance.vue
Html/src/view/fms/config/typeMaintenance.vue
+51
-47
No files found.
Html/src/view/fms/config/accountInfo.vue
View file @
ec2949f8
...
...
@@ -25,7 +25,7 @@
</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=
"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=
"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>
...
...
@@ -74,6 +74,67 @@
</div>
</div>
<Modal
class=
"newModalClass"
v-model=
"addmodal"
:styles=
"
{width:'650px'}">
<p
slot=
"header"
>
<span
v-show=
"type==1"
>
{{
$t
(
'1002'
)
}}
</span>
<span
v-show=
"type==2"
>
{{
$t
(
'1003'
)
}}
</span>
</p>
<div
style=
""
>
<div
class=
"filter"
>
<label>
工装类型:
</label>
<Cascader
class=
"searchSelect"
:data=
"frockTypeTree"
change-on-select
v-model=
"parentType"
@
on-change=
"changeFrockType1"
></Cascader>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
管理类型:
</label>
<Select
v-model=
"mtype"
clearable
class=
"searchSelect"
>
<Option
:value=
"1"
>
单件
</Option>
<Option
:value=
"2"
>
批次
</Option>
</Select>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
工装名称:
</label>
<Input
type=
"text"
class=
"searchInput"
v-model=
"frockname"
/>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
工装料号:
</label>
<Input
type=
"text"
class=
"searchInput"
v-model=
"frockno"
/>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
工装编号:
</label>
<Input
type=
"text"
class=
"searchInput"
v-model=
"frockcode"
/>
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
数量:
</label>
<InputNumber
type=
"text"
class=
"searchInput"
:formatter=
"value => `$
{parseInt(value)}`" v-model="num" />
</div>
<div
class=
"filter"
>
<label><i>
*
</i>
状态:
</label>
<RadioGroup
v-model=
"addstatus"
>
<Radio
label=
"1"
><span>
可用
</span></Radio>
<Radio
label=
"0"
><span>
停用
</span></Radio>
</RadioGroup>
</div>
<div
class=
"filter"
>
<label>
备注:
</label>
<Input
type=
"text"
class=
"searchInput"
v-model=
"remark"
/>
</div>
<div
class=
"filter"
>
<label>
上传文件:
</label>
<div
class=
"frockUploadFile"
>
<Upload
:before-upload=
"handleUpload"
:on-success=
"uploadFile"
:action=
"fileAction"
>
<Button
class=
"UFbtn"
icon=
"ios-cloud-upload-outline"
:title=
"filename"
>
{{
filename
?
filename
:
'上传文件'
}}
</Button>
</Upload>
</div>
</div>
</div>
<div
slot=
"footer"
>
<Button
type=
"text"
size=
"large"
@
click=
"this.addmodal=false"
>
{{
$t
(
'1033'
)
}}
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"addPost()"
>
{{
$t
(
'1011'
)
}}
</Button>
</div>
</Modal>
</div>
</
template
>
<
script
>
...
...
@@ -154,6 +215,24 @@ export default {
key
:
''
}
],
//弹窗
addmodal
:
false
,
type
:
0
,
//1添加 2编辑
parentType
:[],
//父级类型
parentTypeid
:
''
,
frockTypename
:
''
,
//工装类型名称
mtype
:
''
,
//管理类型
frockname
:
''
,
//工装名称
frockno
:
''
,
//工装料号
frockcode
:
''
,
//工装编号
num
:
0
,
addstatus
:
'1'
,
//状态 1可用 0停用
remark
:
''
,
//备注
filename
:
''
,
//文件名称
fileurl
:
''
,
//文件路径
loadingStatus
:
false
,
fileAction
:
this
.
axios
.
publicPath
+
"config/upload/UploadImage"
,
}
},
created
(){
...
...
@@ -194,6 +273,26 @@ export default {
this
.
frockTypeid
=
value
[
value
.
length
-
1
];
}
},
changeFrockType1
(
value
){
this
.
parentTypeid
=
""
;
if
(
value
!=
undefined
&&
value
.
length
){
this
.
parentTypeid
=
value
[
value
.
length
-
1
];
}
},
//获取工装列表
getFrocks
(){
// this.axios.request({
// url: "/fms/accountInfo/frockList",
// method: "get",
// })
// .then((res) => {
// this.frockList = [];
// let data = res.data.data;
// if (res.data.ret == 1&&Array.isArray(data)&&data.length) {
// this.frockList = data;
// }
// });
},
tosearch
(){
this
.
page
=
1
;
this
.
pagesize
=
10
;
...
...
@@ -201,14 +300,16 @@ export default {
},
search
(
toexcel
){
let
params
=
{
frockTypeid
:
this
.
frockTypeid
,
//工装类型id
frockTypeid
:
this
.
frockType
,
//工装类型id
frockid
:
this
.
frockCode
,
//工装id
staus
:
this
.
status
,
//0停用 1可用
page
:
this
.
page
,
pagesize
:
this
.
pagesize
,
toexcel
:
toexcel
//0查询 1导出
}
this
.
detailobj
=
{};
// this.axios.request({
// url: "/fms/
typeMaintenance
/search",
// url: "/fms/
accountInfo
/search",
// params,
// method: "get",
// })
...
...
@@ -232,6 +333,27 @@ export default {
// }
// });
},
add
(){
this
.
type
=
1
;
this
.
addmodal
=
true
;
},
handleUpload
(
file
)
{
this
.
file
=
file
;
return
false
;
},
uploadFile
(
res
)
{
console
.
log
(
222222
)
console
.
log
(
res
)
this
.
loadingStatus
=
true
;
setTimeout
(()
=>
{
this
.
file
=
null
;
this
.
loadingStatus
=
false
;
this
.
$Message
.
success
(
'Success'
)
},
1500
);
},
addPost
(){
},
handleRowChange
(
currentRow
,
oldCurrentRow
)
{
this
.
detailobj
=
currentRow
;
},
...
...
@@ -247,6 +369,13 @@ export default {
}
}
</
script
>
<
style
>
<
style
lang=
"less"
scoped
>
.frockUploadFile
{
display
:
inline-block
;
.UFbtn{
width
:
140px
;
height
:
29px
;
line-height
:
15px
;
}
}
</
style
>
\ No newline at end of file
Html/src/view/fms/config/typeMaintenance.vue
View file @
ec2949f8
...
...
@@ -73,7 +73,7 @@
</div>
</div>
<div
slot=
"footer"
>
<Button
type=
"text"
size=
"large"
@
click=
"
this.
addmodal=false"
>
{{
$t
(
'1033'
)
}}
</Button>
<Button
type=
"text"
size=
"large"
@
click=
"addmodal=false"
>
{{
$t
(
'1033'
)
}}
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"addPost()"
>
{{
$t
(
'1011'
)
}}
</Button>
</div>
</Modal>
...
...
@@ -106,11 +106,11 @@ export default {
},
{
title
:
'工装类型'
,
key
:
'
frockTyp
e'
key
:
'
nam
e'
},
{
title
:
'上级类型'
,
key
:
'parent
Typ
e'
key
:
'parent
nam
e'
}
],
...
...
@@ -123,27 +123,26 @@ export default {
},
created
(){
this
.
initFrockType
();
//工装类型树形结构
this
.
tosearch
();
},
methods
:{
//工装类型
initFrockType
(){
//
this.axios.request({
// url: "/fms/typeMaintenance/frockType
List",
//
method: "get",
//
})
//
.then((res) => {
//
if (res.data.ret == 1) {
// let arr = res.data.data.children
;
//
this.frockTypeTree = arr;
//
this.contentTree(arr);
//
}
//
});
this
.
axios
.
request
({
url
:
"/acc/FixtureTools/GetCategory
List"
,
method
:
"get"
,
})
.
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
let
arr
=
res
.
data
.
data
;
this
.
frockTypeTree
=
arr
;
this
.
contentTree
(
arr
);
}
});
},
contentTree
(
arr
)
{
arr
.
forEach
(
ele
=>
{
ele
.
disabled
=
false
;
ele
.
value
=
ele
.
id
;
ele
.
label
=
ele
.
name
;
if
(
ele
.
children
.
length
!=
0
&&
ele
.
children
!=
undefined
&&
...
...
@@ -172,39 +171,42 @@ export default {
},
search
(
toexcel
){
let
params
=
{
frockType
id
:
this
.
frockTypeid
,
//工装类型id
id
:
this
.
frockTypeid
,
//工装类型id
page
:
this
.
page
,
pagesize
:
this
.
pagesize
,
toexcel
:
toexcel
//0查询 1导出
}
this
.
detailobj
=
{};
//
this.axios.request({
// url: "/fms/typeMaintenance/search
",
//
params,
//
method: "get",
//
})
//
.then((res) => {
//
if(toexcel === 1){
//
if (res.data.ret === 1) {
//
window.location.href =
//
axios.publicPath + "" + res.data.data;
//
} else {
//
this.$Message.error(this.$t(res.data.msg));
//
}
//
}
//
else{
//
this.total = 0;
//
this.tableData1 = [];
//
let data = res.data.data;
//
if (res.data.ret == 1 &&Array.isArray(data)&&data.length) {
//
this.total = res.data.total;
//
this.tableData1 = res.data.data;
//
}
//
}
//
});
this
.
axios
.
request
({
url
:
"/acc/FixtureTools/GetCategoryPageList
"
,
params
,
method
:
"get"
,
})
.
then
((
res
)
=>
{
if
(
toexcel
===
1
){
if
(
res
.
data
.
ret
===
1
)
{
window
.
location
.
href
=
axios
.
publicPath
+
""
+
res
.
data
.
data
;
}
else
{
this
.
$Message
.
error
(
this
.
$t
(
res
.
data
.
msg
));
}
}
else
{
this
.
total
=
0
;
this
.
tableData1
=
[];
let
data
=
res
.
data
.
data
;
if
(
res
.
data
.
ret
==
1
&&
Array
.
isArray
(
data
)
&&
data
.
length
)
{
this
.
total
=
res
.
data
.
total
;
this
.
tableData1
=
res
.
data
.
data
;
}
}
});
},
add
(){
this
.
addmodal
=
true
;
this
.
parentType
=
[];
this
.
parentTypeid
=
''
;
this
.
frockTypename
=
''
;
this
.
type
=
1
;
},
addPost
(){
...
...
@@ -215,24 +217,26 @@ export default {
let
url
=
''
;
let
id
=
''
;
if
(
this
.
type
===
1
){
url
=
'/
fms/typeMaintenance/add
'
;
url
=
'/
acc/FixtureTools/AddCategory
'
;
id
=
0
;
}
else
{
url
=
'/
fms/typeMaintenance/update
'
;
url
=
'/
acc/FixtureTools/UpdateCategory
'
;
id
=
this
.
detailobj
.
id
;
}
let
data
=
{
id
:
id
,
parentid
:
0
,
name
:
''
parentid
:
this
.
parentTypeid
?
this
.
parentTypeid
:
0
,
name
:
this
.
frockTypename
}
this
.
axios
.
request
({
url
:
"/fms/typeMaintenance/frockTypeList"
,
method
:
"get"
,
url
:
url
,
data
,
method
:
"post"
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
ret
==
1
)
{
this
.
addmodal
=
false
;
this
.
initFrockType
();
//重新初始化类型
if
(
this
.
type
===
1
){
this
.
tosearch
();
this
.
$Message
.
success
(
this
.
$t
(
'1055'
));
...
...
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