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
8aee2646
Commit
8aee2646
authored
Sep 03, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产准备
parent
862306c7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
846 additions
and
79 deletions
+846
-79
materiel.vue
components/page/materiel.vue
+36
-18
zh-CN.js
i18n/locale/zh-CN.js
+2
-0
details.vue
pages/technology/details.vue
+1
-0
add.vue
pages/technology/details/setup/add.vue
+212
-0
api.js
pages/technology/details/setup/api.js
+29
-0
detail.vue
pages/technology/details/setup/detail.vue
+117
-0
edit.vue
pages/technology/details/setup/edit.vue
+217
-0
index.vue
pages/technology/details/setup/index.vue
+232
-0
setupDetails.vue
pages/technology/details/setup/setupDetails.vue
+0
-61
No files found.
components/page/materiel.vue
View file @
8aee2646
...
@@ -147,33 +147,34 @@ export default {
...
@@ -147,33 +147,34 @@ export default {
type
:
Number
,
type
:
Number
,
default
:
""
,
default
:
""
,
},
},
setType
:
{
// 生产准备判断
type
:
Boolean
,
default
:
false
,
},
},
},
methods
:
{
methods
:
{
change
(
val
)
{
change
(
val
)
{
console
.
log
(
val
);
let
entity
=
{};
let
entity
=
{};
let
item
=
{}
this
.
data
.
forEach
((
e
)
=>
{
this
.
data
.
forEach
((
e
)
=>
{
if
(
e
.
id
==
val
)
{
if
(
e
.
id
==
val
)
{
entity
.
name
=
e
.
name
;
entity
.
name
=
e
.
name
;
entity
.
mmcode
=
e
.
code
;
entity
.
mmcode
=
e
.
code
;
entity
.
drawingNo
=
e
.
drawing
;
entity
.
drawingNo
=
e
.
drawing
;
entity
.
version
=
e
.
version
;
entity
.
version
=
e
.
version
;
item
=
e
}
}
});
});
entity
.
materialId
=
val
;
entity
.
materialId
=
val
;
this
.
$emit
(
"on-change"
,
entity
);
this
.
$emit
(
"on-change"
,
entity
,
item
);
},
},
// 加载物料
// 加载物料
materiallist
()
{
materiallist
()
{
let
url
=
`
${
material
}
/material/materiallist`
;
let
url
=
`
${
material
}
/material/materiallist`
;
let
conditions
=
[];
let
conditions
=
[];
if
(
this
.
material
Type
)
{
if
(
this
.
set
Type
)
{
conditions
=
[
conditions
=
[
{
conditionalType
:
"In"
,
fieldName
:
"rootCategoryId"
,
fieldValue
:
this
.
materialType
,
},
{
{
fieldName
:
"codeRuleType"
,
fieldName
:
"codeRuleType"
,
fieldValue
:
this
.
codeRuleType
+
""
,
fieldValue
:
this
.
codeRuleType
+
""
,
...
@@ -181,8 +182,24 @@ export default {
...
@@ -181,8 +182,24 @@ export default {
},
},
];
];
}
else
{
}
else
{
conditions
=
[];
if
(
this
.
materialType
)
{
conditions
=
[
{
conditionalType
:
"In"
,
fieldName
:
"rootCategoryId"
,
fieldValue
:
this
.
materialType
,
},
{
fieldName
:
"codeRuleType"
,
fieldValue
:
this
.
codeRuleType
+
""
,
conditionalType
:
"In"
,
},
];
}
else
{
conditions
=
[];
}
}
}
this
.
$api
this
.
$api
.
post
(
url
,
{
.
post
(
url
,
{
type
:
this
.
type
,
type
:
this
.
type
,
...
@@ -275,6 +292,7 @@ export default {
...
@@ -275,6 +292,7 @@ export default {
//获取所有的选中项
//获取所有的选中项
getSelectItems
()
{
getSelectItems
()
{
var
items
=
[];
var
items
=
[];
this
.
datas
=
r
.
result
.
filter
((
u
)
=>
u
.
status
==
3
);
if
(
this
.
theme
==
"list"
)
{
if
(
this
.
theme
==
"list"
)
{
this
.
checkedItems
.
map
((
u
)
=>
{
this
.
checkedItems
.
map
((
u
)
=>
{
items
.
push
(
u
);
items
.
push
(
u
);
...
@@ -355,14 +373,14 @@ export default {
...
@@ -355,14 +373,14 @@ export default {
return
items
;
return
items
;
},
},
},
},
filters
:
{
//
filters: {
vvv
:
(
lis
)
=>
{
//
vvv: (lis) => {
return
3
;
// return lis !=
3;
// return lis.filter(u=>{
//
// return lis.filter(u=>{
// return u.checked==true
//
// return u.checked==true
// }).lenght;
//
// }).lenght;
},
//
},
},
//
},
watch
:
{
watch
:
{
value
:
{
value
:
{
handler
(
v
,
o
)
{
handler
(
v
,
o
)
{
...
...
i18n/locale/zh-CN.js
View file @
8aee2646
...
@@ -98,6 +98,8 @@ export default {
...
@@ -98,6 +98,8 @@ export default {
action
:
'操作'
,
action
:
'操作'
,
creationTime
:
'操作时间'
,
creationTime
:
'操作时间'
,
libraryTube
:
'操作人'
,
libraryTube
:
'操作人'
,
routingDetail
:
'工序'
,
routingDetailNo
:
'工序号'
},
},
MaterialPowder
:
{
MaterialPowder
:
{
code
:
'粉末编码'
,
code
:
'粉末编码'
,
...
...
pages/technology/details.vue
View file @
8aee2646
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
:to=
"'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId"
:to=
"'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId"
>
工艺BOM
</MenuItem>
>
工艺BOM
</MenuItem>
<!--
<MenuItem
name=
"4"
to=
"/technology/details/setup/setupDetails"
>
生产准备
</MenuItem>
-->
<!--
<MenuItem
name=
"4"
to=
"/technology/details/setup/setupDetails"
>
生产准备
</MenuItem>
-->
<MenuItem
name=
"4"
:to=
"'/technology/details/setup?id='+headerId"
>
生产准备
</MenuItem>
<MenuItem
<MenuItem
name=
"5"
name=
"5"
:to=
"'/technology/details/routinghcorder?id='+headerId"
:to=
"'/technology/details/routinghcorder?id='+headerId"
...
...
pages/technology/details/setup/add.vue
0 → 100644
View file @
8aee2646
<
template
>
<div>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"110"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingDetail')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
@
on-change=
"clickChange"
>
<Option
v-for=
"(item,index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
:label=
"l('resourceId')"
prop=
"materialId"
>
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:codeRuleType=
"3"
:setType=
"true"
></Materiel>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('count')"
prop=
"quantity"
>
<InputNumber
v-model=
"entity.quantity"
style=
"width:280px"
></InputNumber>
</FormItem>
</Col>
</Row>
<Divider
orientation=
"left"
>
资源属性
</Divider>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
nameMaterial
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
materialNumber
}}
</span>
</FormItem>
</Col>
<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'"
>
<div>
{{
li
.
newConten
}}
</div>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
style=
"text-align:right"
>
<FormItem
label
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
ApiDetail
from
"../api"
;
import
{
forIn
}
from
"lodash"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
submitShow
:
true
,
//送审按钮显隐
checked
:
true
,
//送审选择框
fileds
:
[],
//扩展属性
entity
:
{
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
routingHeaderId
:
this
.
eid
,
//工艺规程id
nameMaterial
:
""
,
name
:
""
,
materialNumber
:
""
,
materialId
:
null
,
quantity
:
0
,
json
:
{},
},
rules
:
{
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
content
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
routingDetailId
:
[
{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
routingDetailList
:
[],
};
},
props
:
[
"eid"
],
mounted
()
{
this
.
loadDetails
();
},
methods
:
{
change
(
e
,
v
)
{
// console.log(e)
console
.
log
(
v
);
this
.
entity
.
nameMaterial
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialNumber
=
e
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
e
.
name
;
this
.
entity
.
json
.
materialNumber
=
e
.
mmcode
;
var
forItem
=
v
;
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
;
}
console
.
log
(
u
);
// this.$set(this.entity.customProperties,u.filed,v)
for
(
let
key
of
Object
.
keys
(
forItem
))
{
// console.log(key);
// console.log(forItem[key]);
if
(
key
==
u
.
field
)
{
this
.
entity
.
json
[
key
]
=
forItem
[
key
];
return
(
u
.
newConten
=
forItem
[
key
]);
}
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
);
},
clickChange
(
val
)
{
// this.routingDetailList.forEach((e) => {
// if (e.id == val) {
// this.entity.name = e.name;
// }
// });
// alert( this.entity.name)
},
loadDetails
()
{
//获取工序列表
let
parms
=
{
headerID
:
this
.
eid
,
};
ApiDetail
.
pagedDetails
(
parms
).
then
((
r
)
=>
{
let
tempDetails
=
r
.
result
;
let
tempD
=
[];
tempDetails
.
forEach
((
data
)
=>
{
let
tempObj
=
{};
tempObj
.
value
=
data
.
id
;
tempObj
.
label
=
data
.
taskSeq
+
" "
+
data
.
name
;
tempD
.
push
(
tempObj
);
this
.
entity
.
name
=
data
.
name
;
});
this
.
routingDetailList
=
tempD
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
ok
()
{
this
.
$emit
(
"on-ok"
);
},
l
(
key
)
{
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{},
};
</
script
>
pages/technology/details/setup/api.js
0 → 100644
View file @
8aee2646
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
technologyUrl
}
productready/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
technologyUrl
}
productready/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
technologyUrl
}
productready/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
technologyUrl
}
productready/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
technologyUrl
}
productready/update`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
technologyUrl
}
productready/delete`
,{
params
:{
id
:
id
}});
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
technologyUrl
}
productready/batchdelete`
,
params
);
},
getmaterialdefinitionproperty
(
params
){
return
Api
.
get
(
`
${
material
}
/custompropertydefinition/getmaterialdefinitionproperty`
,
params
);
},
materiallist
(
params
){
return
Api
.
post
(
`
${
material
}
/material/materiallist`
,
params
);
},
}
\ No newline at end of file
pages/technology/details/setup/detail.vue
0 → 100644
View file @
8aee2646
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"8"
:name=
"l('routingDetail')"
>
{{
entity
.
routingDetailId
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('nameOfResource')"
>
{{
entity
.
nameMaterial
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('resourceId')"
>
{{
entity
.
materialNumber
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('count')"
>
{{
entity
.
quantity
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creatorUserId')"
>
<User
:value=
"parseInt(entity.creatorUserId)"
/>
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
:name=
"li.title"
>
{{
li
.
newConten
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
fileds
:
[],
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
};
},
props
:
[
"eid"
,
"materialId"
],
mounted
()
{
this
.
load
(
this
.
eid
,
this
.
materialId
);
},
methods
:
{
clickData
(
data
,
liUrl
)
{
window
.
open
(
data
,
"_blank"
);
},
load
(
e
,
v
)
{
Api
.
get
({
id
:
e
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
// this.entity.id = r.result.id;
// alert(this.entity.id);
// this.entity.routingDetailId = r.result.routingDetailId;
// this.entity.quantity = r.result.quantity;
});
let
conditions
=
[];
conditions
=
[
{
fieldName
:
"codeRuleType"
,
fieldValue
:
"3"
,
conditionalType
:
"In"
,
},
];
Api
.
materiallist
({
type
:
0
,
conditions
:
conditions
}).
then
((
r
)
=>
{
let
data
=
[];
var
forItem
=
{};
data
=
r
.
result
.
filter
((
u
)
=>
u
.
status
==
3
);
data
.
forEach
((
e
)
=>
{
if
(
e
.
id
==
v
)
{
forItem
=
e
;
}
});
Api
.
getmaterialdefinitionproperty
({
materialId
:
v
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
console
.
log
(
r
);
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
8
;
if
(
item
.
dataType
==
8
||
item
.
dataType
==
5
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
// return item.fieldType != 1;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
a
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
a
=
0
;
}
// console.log(u);
// this.$set(this.entity.customProperties,u.filed,v)
for
(
let
key
of
Object
.
keys
(
forItem
))
{
// console.log(key);
// console.log(forItem[key]);
if
(
key
==
u
.
field
)
{
this
.
entity
[
key
]
=
forItem
[
key
];
return
(
u
.
newConten
=
forItem
[
key
]);
}
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
a
);
// console.log(this.entity)
});
}
});
// this.$emit("on-load");
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
)
{
this
.
load
(
v
,
this
.
materialId
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/technology/details/setup/edit.vue
0 → 100644
View file @
8aee2646
<
template
>
<div>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"110"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingDetail')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
@
on-change=
"clickChange"
>
<Option
v-for=
"(item,index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
:label=
"l('resourceId')"
prop=
"materialId"
>
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:codeRuleType=
"3"
:setType=
"true"
></Materiel>
</FormItem>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('count')"
prop=
"quantity"
>
<InputNumber
v-model=
"entity.quantity"
style=
"width:280px"
></InputNumber>
</FormItem>
</Col>
</Row>
<Divider
orientation=
"left"
>
资源属性
</Divider>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
nameMaterial
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
materialNumber
}}
</span>
</FormItem>
</Col>
<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'"
>
<div>
{{
li
.
newConten
}}
</div>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
style=
"text-align:right"
>
<FormItem
label
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
ApiDetail
from
"../api"
;
import
{
forIn
}
from
"lodash"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
submitShow
:
true
,
//送审按钮显隐
checked
:
true
,
//送审选择框
fileds
:
[],
//扩展属性
entity
:
{
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
creator
:
this
.
$store
.
state
.
userInfo
.
userName
,
id
:
null
,
routingHeaderId
:
this
.
headerid
,
//工艺规程id
nameMaterial
:
""
,
materialNumber
:
""
,
materialId
:
null
,
quantity
:
0
,
name
:
""
,
json
:
{},
},
rules
:
{
// routingDetailId: [
// {
// required: true,
// message: "请选择工序",
// type: "number",
// trigger: "change",
// },
// ],
},
routingDetailList
:
[],
};
},
props
:
[
"eid"
,
"headerid"
],
mounted
()
{
this
.
loadDetails
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
.
id
=
r
.
result
.
id
;
this
.
entity
.
routingDetailId
=
r
.
result
.
routingDetailId
;
this
.
entity
.
quantity
=
r
.
result
.
quantity
;
});
},
change
(
e
,
v
)
{
// console.log(e)
// console.log(v);
this
.
entity
.
nameMaterial
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialNumber
=
e
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
e
.
name
;
this
.
entity
.
json
.
materialNumber
=
e
.
mmcode
;
var
forItem
=
v
;
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
;
}
// console.log(u);
// this.$set(this.entity.customProperties,u.filed,v)
for
(
let
key
of
Object
.
keys
(
forItem
))
{
// console.log(key);
// console.log(forItem[key]);
if
(
key
==
u
.
field
)
{
this
.
entity
.
json
[
key
]
=
forItem
[
key
];
return
(
u
.
newConten
=
forItem
[
key
]);
}
}
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
);
},
clickChange
(
val
)
{
// this.routingDetailList.forEach((e) => {
// if (e.id == val) {
// this.entity.name = e.name;
// }
// });
},
loadDetails
()
{
//获取工序列表
let
parms
=
{
headerID
:
this
.
headerid
,
};
ApiDetail
.
pagedDetails
(
parms
).
then
((
r
)
=>
{
let
tempDetails
=
r
.
result
;
let
tempD
=
[];
tempDetails
.
forEach
((
data
)
=>
{
let
tempObj
=
{};
tempObj
.
value
=
data
.
id
;
tempObj
.
label
=
data
.
taskSeq
+
" "
+
data
.
name
;
tempD
.
push
(
tempObj
);
this
.
entity
.
name
=
data
.
name
;
});
this
.
routingDetailList
=
tempD
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
ok
()
{
this
.
$emit
(
"on-ok"
);
},
l
(
key
)
{
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{},
};
</
script
>
pages/technology/details/setup/index.vue
0 → 100644
View file @
8aee2646
<
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"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"850"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:headerid=
"headerid"
:materialId=
"materialId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
""
,
props
:
[
"headerid"
],
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
routingHeaderId
:
{
op
:
"Equal"
,
value
:
this
.
headerid
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[
// {
// type: "index",
// width: 60,
// align: "center",
// },
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
high
:
true
,
width
:
100
,
sortable
:
true
,
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetail"
),
align
:
"left"
,
easy
:
true
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"resourceId"
),
align
:
"left"
,
easy
:
true
,
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameOfResource"
),
align
:
"left"
,
easy
:
true
,
tooltip
:
true
,
},
// {
// key: "code",
// title: "编码",
// align: "left",
// },
// {
// key: "creationTime",
// title: this.l("creationTime"),
// sortable: true,
// hide: true,
// align: "left",
// },
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
false
,
type
:
"user"
,
align
:
"left"
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
hide
:
true
,
align
:
"left"
,
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
,
},
// {
// key: "specifications",
// title: this.l("specifications"),
// align: "left",
// easy: true,
// high: true,
// },
{
key
:
"storeId"
,
title
:
this
.
l
(
"storeId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"count"
),
align
:
"left"
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
},
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
]);
},
},
],
};
},
mounted
()
{
// console.log(this);
this
.
parms
.
eid
=
this
.
$u
.
guid
();
this
.
$refs
.
refFile
.
intFiles
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
add
()
{
this
.
curId
=
this
.
headerid
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
view
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
materialId
=
row
.
materialId
;
this
.
title
=
"查看属性"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
// this.modal = true;
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
l
(
key
)
{
key
=
"resource"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/technology/details/setup/setupDetails.vue
deleted
100644 → 0
View file @
862306c7
<
style
lang=
"less"
>
@import '../../technolog.less';
</
style
>
<
template
>
<Layout
class=
"setdetail_box"
>
<Header>
<div
class=
"setdetail_body"
>
<Menu
mode=
"horizontal"
theme=
"light"
active-name=
"1"
>
<MenuItem
name=
"1"
to=
"/technology/details/setup/setupDetails"
>
主材
</MenuItem>
<MenuItem
name=
"2"
to=
"/technology/details/setup/setupDetails"
>
辅材
</MenuItem>
<MenuItem
name=
"3"
to=
"/technology/details/setup/setupDetails"
>
工具
</MenuItem>
<MenuItem
name=
"4"
to=
"/technology/details/setup/setupDetails"
>
量具
</MenuItem>
<MenuItem
name=
"5"
to=
"/technology/details/setup/setupDetails"
>
工装
</MenuItem>
<MenuItem
name=
"6"
to=
"/technology/details/setup/setupDetails"
>
刀具
</MenuItem>
<MenuItem
name=
"7"
to=
"/technology/details/setup/setupDetails"
>
设备
</MenuItem>
<MenuItem
name=
"8"
to=
"/technology/details/setup/setupDetails"
>
NC程序
</MenuItem>
<MenuItem
name=
"9"
to=
"/technology/details/setup/setupDetails"
>
工艺附件
</MenuItem>
</Menu>
</div>
</Header>
<Layout
class=
"bottom_box"
>
<nuxt-child
keep-alive
></nuxt-child>
</Layout>
</Layout>
</
template
>
<
script
>
export
default
{
components
:
{},
data
()
{
return
{
showMenu
:
true
,
treeHeight
:
''
,
actNum
:
'1'
,
}
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
140
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
this
.
treeHeight
=
window
.
innerHeight
-
140
})()
}
},
computed
:
{
},
methods
:
{
back
(){
this
.
$router
.
push
({
name
:
"technology"
,
// params: { transmitData: lemData }
});
},
}
}
</
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