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
7a5ed869
Commit
7a5ed869
authored
Jun 24, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
2406be22
d555e978
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
499 additions
and
34 deletions
+499
-34
zh-CN.js
i18n/locale/zh-CN.js
+6
-2
detail.vue
pages/handle/examine1/detail.vue
+1
-1
index.vue
pages/handle/examine1/index.vue
+1
-1
detail.vue
pages/handle/examine10/detail.vue
+1
-1
index.vue
pages/handle/examine10/index.vue
+1
-1
detail.vue
pages/handle/examine11/detail.vue
+1
-1
index.vue
pages/handle/examine11/index.vue
+1
-1
detail.vue
pages/handle/examine12/detail.vue
+1
-1
index.vue
pages/handle/examine12/index.vue
+1
-1
detail.vue
pages/handle/examine13/detail.vue
+1
-3
index.vue
pages/handle/examine13/index.vue
+1
-1
index.vue
pages/handle/examine2/index.vue
+1
-1
index.vue
pages/handle/examine3/index.vue
+1
-1
detail.vue
pages/handle/examine4/detail.vue
+1
-1
index.vue
pages/handle/examine4/index.vue
+1
-1
detail.vue
pages/handle/examine6/detail.vue
+1
-1
index.vue
pages/handle/examine6/index.vue
+1
-1
detail.vue
pages/handle/examine7/detail.vue
+1
-1
index.vue
pages/handle/examine7/index.vue
+1
-1
detail.vue
pages/handle/examine8/detail.vue
+1
-1
index.vue
pages/handle/examine8/index.vue
+1
-1
detail.vue
pages/handle/examine9/detail.vue
+3
-2
index.vue
pages/handle/examine9/index.vue
+1
-1
shen.less
pages/handle/shen.less
+11
-1
add.vue
pages/technology/productMix/product/add.vue
+8
-0
bom.vue
pages/technology/productMix/product/bom.vue
+121
-5
bomAdd.vue
pages/technology/productMix/product/bomAdd.vue
+156
-0
bomEdit.vue
pages/technology/productMix/product/bomEdit.vue
+157
-0
detail.vue
pages/technology/productMix/product/detail.vue
+1
-1
edit.vue
pages/technology/productMix/product/edit.vue
+15
-0
No files found.
i18n/locale/zh-CN.js
View file @
7a5ed869
...
...
@@ -1427,7 +1427,7 @@ export default {
},
product_info
:{
//
mmcode:'物料编号',
mmcode
:
'物料编号'
,
materialId
:
'物料'
,
levelId
:
'产品分类'
,
type
:
"类型"
,
...
...
@@ -1437,10 +1437,14 @@ export default {
status
:
''
,
remark
:
'备注'
,
madeCompany
:
'主承制单位'
,
creationTime
:
'创建时间'
,
extend
:
''
,
productUrl
:
'产品图像'
,
productUrlList
:
'产品图象列表'
,
count
:
'数量'
,
postion
:
'位置'
,
upId
:
'上级id'
,
version
:
"版本"
},
order_list
:{
mesCode
:
'订单编号'
,
...
...
pages/handle/examine1/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"6"
:name=
"l('productName')"
>
{{
entity
.
productName
}}
</Filed>
<Filed
:span=
"6"
:name=
"l('mesCode')"
>
{{
entity
.
mesCode
}}
</Filed>
...
...
pages/handle/examine1/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
@
node-click=
"show"
/>
<!--
<Footer
:idVal=
"detailId"
:footerStatu=
"footerStatu"
@
showModalCheckOk=
'modalCheckOk=true'
></Footer>
-->
...
...
pages/handle/examine10/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"8"
:name=
"l('code')"
>
{{
formValidate
.
code
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
formValidate
.
creationTime
}}
</Filed>
...
...
pages/handle/examine10/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine11/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"8"
:name=
"l('code')"
>
{{
formValidate
.
code
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
formValidate
.
creationTime
}}
</Filed>
...
...
pages/handle/examine11/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine12/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"8"
:name=
"l('code')"
>
{{
formValidate
.
code
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
formValidate
.
creationTime
}}
</Filed>
...
...
pages/handle/examine12/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine13/detail.vue
View file @
7a5ed869
<
style
lang=
"less"
scope
>
@import "../shen.less";
</
style
>
<
template
>
<div
class=
"new-detail"
>
<Row>
...
...
pages/handle/examine13/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine2/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
/>
...
...
pages/handle/examine3/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
style=
"width:80%"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine4/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"8"
:name=
"l('documentCode')"
>
{{
processData
.
orderMaterial
.
code
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('platesNum')"
>
{{
processData
.
orderMaterial
.
platesnum
}}
</Filed>
...
...
pages/handle/examine4/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
>
...
...
pages/handle/examine6/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto"
>
<div
class=
"detail
table-detail"
>
<Row>
<Filed
:span=
"12"
:name=
"'工艺更改单'"
>
{{
results
.
changeorder_code
}}
</Filed>
<Filed
:span=
"12"
:name=
"'提出人'"
>
{{
results
.
propose_user_name
}}
</Filed>
...
...
pages/handle/examine6/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine7/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<!--
<Filed
:span=
"8"
:name=
"l('unqualifiedCode')"
>
{{
entity
.
unqualified_order_code
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('department')"
>
{{
entity
.
department_name
}}
</Filed>
...
...
pages/handle/examine7/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
@
node-click=
"show"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
>
...
...
pages/handle/examine8/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"detail
"
style=
"width:90%;margin:0 auto
"
>
<div
class=
"detail
table-detail
"
>
<Row>
<Filed
:span=
"12"
:name=
"'生产协调单'"
>
{{
results
.
technical_coordination_code
}}
</Filed>
<Filed
:span=
"12"
:name=
"'任务号'"
>
{{
results
.
taskCode
}}
</Filed>
...
...
pages/handle/examine8/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
@
node-click=
"show"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/examine9/detail.vue
View file @
7a5ed869
<
template
>
<div
class=
"pdf-detail
"
style=
"width:85%;margin:0 auto
"
>
<div
class=
"pdf-detail
table-detail
"
>
<div
class=
"cerioficate-pdf-detail"
>
<div
class=
"bian-hao"
>
产品合格证编号:
{{
results
.
serialNumber
}}
</div>
<div
class=
"body-d"
>
...
...
@@ -120,7 +120,8 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
.pdf-detail {
margin: 0 20px 20px 20px;
// margin: 0 20px 20px 20px;
background: #fff;
.pdf-out {
text-align: right;
}
...
...
pages/handle/examine9/index.vue
View file @
7a5ed869
<
template
>
<div
style=
"padding:
4
0px 0"
>
<div
style=
"padding:
3
0px 0"
>
<Detail
:idVal=
"detailId"
/>
<Process
ref=
"userProcess"
:idVal=
"detailId"
:resulstInfo=
"testObj"
/>
<div
class=
"footers"
v-if=
"footerStatu === '2'"
style=
"text-align:left;"
>
...
...
pages/handle/shen.less
View file @
7a5ed869
...
...
@@ -4,10 +4,20 @@
background: #fff;
box-shadow: 0px 2px 6px rgba(0,0,0,0.16);
}
.table-detail{
padding: 20px 100px;
display: block;
width: 98%;
margin: 0 auto;
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.16);
.ivu-row .filed-col > .label{
background: #267feb1e;
}
}
.Design{
margin:20px auto;
width: 98%;
padding: 20px;
padding: 20px
100px
;
background: #fff;
box-shadow: 0px 2px 6px rgba(0,0,0,0.16);
.ivu-timeline-item-head{
...
...
pages/technology/productMix/product/add.vue
View file @
7a5ed869
...
...
@@ -36,6 +36,12 @@
<Input
v-model=
"entity.name"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('version')"
prop=
"version"
>
<Input
v-model=
"entity.version"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<!--
<Input
v-model=
"entity.type"
></Input>
-->
...
...
@@ -162,6 +168,8 @@ export default {
if
(
e
.
id
==
val
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
code
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
this
.
entity
.
version
=
e
.
version
;
}
});
},
...
...
pages/technology/productMix/product/bom.vue
View file @
7a5ed869
<
template
>
<div
class=
"bom"
>
<div
class=
"btn"
>
<Button
type=
"primary"
@
click=
"add()"
class=
"mb10"
>
新增Bom
</Button>
</div>
<div
class=
"new-detail"
>
<Row>
<Filed
:span=
"8"
:name=
"l('levelId')+':'"
>
{{
entity
.
levelId
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('m
aterialId')+':'"
>
{{
entity
.
materialId
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('m
mcode')+':'"
>
{{
entity
.
mmcode
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('drawingNo')+':'"
>
{{
entity
.
drawingNo
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('name')+':'"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('madeCompany')+':'"
>
{{
entity
.
madeCompanyTitle
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('productUrl')+':'"
>
<a
href=
"#"
@
click=
"seeImg(entity.productUrl)"
>
查看图片
</a>
</Filed>
<div>
</div>
</Row>
</div>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
></TreeGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</
template
>
<
script
>
...
...
@@ -23,13 +27,69 @@ import Api from "./api";
export
default
{
data
()
{
return
{
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
entity
:
{},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
}
},
treeData
:
[{
name
:
"112"
}],
columns
:
[
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
title
:
"操作"
,
key
:
"id"
,
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
let
actions
=
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"add"
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
}
},
"新增"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
"删除"
)
];
return
h
(
"div"
,
{
class
:
"action"
},
actions
);
}
}
]
};
},
props
:
{
...
...
@@ -41,6 +101,47 @@ export default {
}
},
methods
:
{
// init() {
// Api.getpaged().then(r => {
// this.treeData = [];
// this.treeData = this.$u.toTree(
// r.result.items,
// 0,
// undefined,
// "parent_Id"
// );
// });
// },
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./bomAdd"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./bomEdit"
);
this
.
modal
=
true
;
},
remove
(
row
)
{
this
.
$Modal
.
confirm
({
title
:
"删除"
,
content
:
"<p>您确定要删除此物料吗?</p>"
,
onOk
:
()
=>
{
// Api.delete(row.id).then(r => {
// if (r.success) {
// this.$refs.grid.load();
// this.$Message.success("删除成功");
// }
// });
},
onCancel
:
()
=>
{
this
.
$Message
.
success
(
"取消删除"
);
}
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
...
...
@@ -55,6 +156,15 @@ export default {
this
.
$Message
.
error
(
"暂无图片"
);
}
},
ok
()
{
// this.$refs.grid.load();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
@@ -71,5 +181,11 @@ export default {
</
script
>
<
style
lang=
"less"
>
.bom {
.btn {
text-align: right;
}
.new-detail {
margin-bottom: 10px;
}
}
</
style
>
pages/technology/productMix/product/bomAdd.vue
0 → 100644
View file @
7a5ed869
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
:span=
"12"
>
<!--
<FormItem
label=
"层级类型"
prop=
"levelTitle"
>
<Input
v-model=
"entity.levelTitle"
></Input>
</FormItem>
-->
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('materialId')"
prop=
"materialId"
>
<Select
v-model=
"entity.materialId"
filterable
clearable
@
on-change=
"change"
>
<Option
v-for=
"item in dataList"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
code
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('drawingNo')"
prop=
"drawingNo"
>
<Input
v-model=
"entity.drawingNo"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('count')"
prop=
"count"
>
<Input
v-model=
"entity.count"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('postion')"
prop=
"postion"
>
<Input
v-model=
"entity.postion"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
service
from
"@/plugins/request"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
upId
:
this
.
eid
},
dataList
:
[],
downUrl
:
fileUrlDown
,
componaylist
:
[],
componaylist
:
[],
data2
:
[],
selectdata1
:
[],
rules
:
{
materialId
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"change"
}]
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
},
img
:
""
};
},
props
:
{
eid
:
Number
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
this
.
getTree
();
this
.
getMaterialList
();
},
methods
:
{
getTree
()
{
var
url
=
`
${
designUrl
}
/productlevel/getdepartmentstree`
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
data2
=
response
.
result
;
});
},
getMaterialList
()
{
let
data
=
{
conditions
:
[]
};
Api
.
materiallist
(
data
).
then
(
r
=>
{
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
3
);
});
},
change
(
val
)
{
this
.
dataList
.
forEach
(
e
=>
{
if
(
e
.
id
==
val
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
code
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
}
});
},
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
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
}
};
</
script
>
<
style
lang=
"less"
>
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
.add-list {
width: 100%;
height: 300px;
overflow: hidden;
}
}
</
style
>
\ No newline at end of file
pages/technology/productMix/product/bomEdit.vue
0 → 100644
View file @
7a5ed869
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
:span=
"12"
>
<!--
<FormItem
label=
"层级类型"
prop=
"levelTitle"
>
<Input
v-model=
"entity.levelTitle"
></Input>
</FormItem>
-->
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('materialId')"
prop=
"materialId"
>
<Select
v-model=
"entity.materialId"
filterable
clearable
@
on-change=
"change"
>
<Option
v-for=
"item in dataList"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
code
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('drawingNo')"
prop=
"drawingNo"
>
<Input
v-model=
"entity.drawingNo"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
disabled
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('count')"
prop=
"count"
>
<Input
v-model=
"entity.count"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('postion')"
prop=
"postion"
>
<Input
v-model=
"entity.postion"
></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
service
from
"@/plugins/request"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
upId
:
this
.
eid
},
dataList
:
[],
downUrl
:
fileUrlDown
,
componaylist
:
[],
componaylist
:
[],
data2
:
[],
selectdata1
:
[],
rules
:
{
materialId
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"change"
}]
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
},
img
:
""
};
},
props
:
{
eid
:
Number
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
this
.
getMaterialList
();
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
});
},
getMaterialList
()
{
let
data
=
{
conditions
:
[]
};
Api
.
materiallist
(
data
).
then
(
r
=>
{
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
3
);
});
},
change
(
val
)
{
this
.
dataList
.
forEach
(
e
=>
{
if
(
e
.
id
==
val
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
code
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
}
});
},
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
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
}
};
</
script
>
<
style
lang=
"less"
>
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
.add-list {
width: 100%;
height: 300px;
overflow: hidden;
}
}
</
style
>
\ No newline at end of file
pages/technology/productMix/product/detail.vue
View file @
7a5ed869
...
...
@@ -2,7 +2,7 @@
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('levelId')"
>
{{
entity
.
levelId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('m
aterialId')"
>
{{
entity
.
materialId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('m
mcode')"
>
{{
entity
.
mmcode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('drawingNo')"
>
{{
entity
.
drawingNo
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('madeCompany')"
>
{{
entity
.
madeCompanyTitle
}}
</Filed>
...
...
pages/technology/productMix/product/edit.vue
View file @
7a5ed869
...
...
@@ -42,6 +42,11 @@
<Input
v-model=
"entity.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('version')"
prop=
"version"
>
<Input
v-model=
"entity.version"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<!--
<Input
v-model=
"entity.type"
></Input>
-->
...
...
@@ -140,6 +145,16 @@ export default {
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
change
(
val
)
{
this
.
dataList
.
forEach
(
e
=>
{
if
(
e
.
id
==
val
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
mmcode
=
e
.
code
;
this
.
entity
.
drawingNo
=
e
.
drawingNo
;
this
.
entity
.
version
=
e
.
version
;
}
});
},
getMaterialList
()
{
let
data
=
{
conditions
:
[]
...
...
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