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
a47af7cf
Commit
a47af7cf
authored
Jun 23, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品
parent
b3f3181c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
45 deletions
+104
-45
zh-CN.js
i18n/locale/zh-CN.js
+4
-1
add.vue
pages/technology/productMix/product/add.vue
+4
-4
bom.vue
pages/technology/productMix/product/bom.vue
+68
-24
detail.vue
pages/technology/productMix/product/detail.vue
+3
-6
edit.vue
pages/technology/productMix/product/edit.vue
+19
-4
index.vue
pages/technology/productMix/productTree/index.vue
+6
-6
No files found.
i18n/locale/zh-CN.js
View file @
a47af7cf
...
...
@@ -1427,7 +1427,10 @@ export default {
},
product_info
:{
mmcode
:
'物料编号'
,
// mmcode:'物料编号',
materialId
:
'物料'
,
levelId
:
'产品分类'
,
type
:
"类型"
,
drawingNo
:
'图号'
,
name
:
'名称'
,
productCode
:
'产品编号'
,
...
...
pages/technology/productMix/product/add.vue
View file @
a47af7cf
...
...
@@ -9,7 +9,7 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
:span=
"12"
>
<FormItem
label=
"产品分类
"
prop=
"levelId"
>
<FormItem
:label=
"l('levelId')
"
prop=
"levelId"
>
<productSelect1
v-model=
"entity.levelId"
@
on-change=
"proChange"
/>
</FormItem>
</Col>
...
...
@@ -19,7 +19,7 @@
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"物料
"
prop=
"materialId"
>
<FormItem
:label=
"l('materialId')
"
prop=
"materialId"
>
<!--
<Input
v-model=
"entity.mmcode"
></Input>
-->
<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>
...
...
@@ -37,7 +37,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"物料类型
"
prop=
"type"
>
<FormItem
:label=
"l('type')
"
prop=
"type"
>
<!--
<Input
v-model=
"entity.type"
></Input>
-->
<Dictionary
code=
"material.main.type"
...
...
@@ -154,7 +154,7 @@ export default {
conditions
:
[]
};
Api
.
materiallist
(
data
).
then
(
r
=>
{
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
=
3
);
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
3
);
});
},
change
(
val
)
{
...
...
pages/technology/productMix/product/bom.vue
View file @
a47af7cf
<
template
>
<div
class=
"bom"
>
<Layout>
<Sider
width=
"300"
>
<div
class=
"p-list"
>
ddd
</div>
</Sider>
<Content>
ff
</Content>
</Layout>
<div
class=
"new-detail"
>
<Row>
<Filed
:span=
"8"
:name=
"l('levelId')+':'"
>
{{
entity
.
levelId
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('materialId')+':'"
>
{{
entity
.
materialId
}}
</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
.
madeCompany
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('productUrl')+':'"
>
<a
href=
"#"
@
click=
"seeImg(entity.productUrl)"
>
查看图片
</a>
</Filed>
<div>
</div>
</Row>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
// import service from "@/plugins/request";
export
default
{
data
()
{
return
{
entity
:
{},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
}
};
},
props
:
{
eid
:
Number
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
productUrlList
;
this
.
$emit
(
"on-load"
);
});
},
seeImg
(
url
)
{
if
(
url
)
{
window
.
open
(
url
,
"_blank"
);
}
else
{
this
.
$Message
.
error
(
"暂无图片"
);
}
},
l
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
};
</
script
>
<
style
lang=
"less"
>
.bom {
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 90vh;
padding: 10px;
overflow: auto;
}
.ivu-layout-content {
// margin-left: 5px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
padding: 10px;
height: 90vh;
overflow: auto;
}
}
</
style
>
\ No newline at end of file
</
style
>
pages/technology/productMix/product/detail.vue
View file @
a47af7cf
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('mmcode')"
>
{{
entity
.
mmcode
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('levelId')"
>
{{
entity
.
levelId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('materialId')"
>
{{
entity
.
materialId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('drawingNo')"
>
{{
entity
.
drawingNo
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('productCode')"
>
{{
entity
.
productCode
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
-->
<!--
<Filed
:span=
"24"
:name=
"l('remark')"
>
{{
entity
.
remark
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('madeCompany')"
>
{{
entity
.
madeCompanyTitle
}}
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('extend')"
>
{{
entity
.
extend
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('madeCompany')"
>
{{
entity
.
madeCompany
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('productUrl')"
>
<a
href=
"#"
@
click=
"seeImg(entity.productUrl)"
>
查看图片
</a>
</Filed>
...
...
pages/technology/productMix/product/edit.vue
View file @
a47af7cf
...
...
@@ -9,13 +9,13 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<Col
:span=
"12"
>
<FormItem
label=
"产品分类
"
prop=
"levelId"
>
<FormItem
:label=
"l('levelId')
"
prop=
"levelId"
>
<!--
<Input
v-model=
"entity.parentName"
disabled
></Input>
-->
<productSelect1
v-model=
"entity.levelId"
@
on-change=
"proChange"
ref=
"edit"
/>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"物料
"
prop=
"materialId"
>
<FormItem
:label=
"l('materialId')
"
prop=
"materialId"
>
<!--
<Input
v-model=
"entity.mmcode"
></Input>
-->
<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>
...
...
@@ -43,7 +43,7 @@
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"物料类型
"
prop=
"type"
>
<FormItem
:label=
"l('type')
"
prop=
"type"
>
<!--
<Input
v-model=
"entity.type"
></Input>
-->
<Dictionary
code=
"material.main.type"
...
...
@@ -92,6 +92,7 @@ export default {
componaylist
:
[],
label
:
""
,
value
:
""
,
dataList
:
[],
data2
:
[],
selectdata1
:
[],
rules
:
{
...
...
@@ -126,14 +127,27 @@ export default {
}
}
},
created
()
{
this
.
getMaterialList
();
},
mounted
()
{
this
.
treeCompany
();
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
getMaterialList
()
{
let
data
=
{
conditions
:
[]
};
Api
.
materiallist
(
data
).
then
(
r
=>
{
this
.
dataList
=
r
.
result
.
filter
(
item
=>
item
.
status
==
3
);
});
},
clickData
(
data
,
liUrl
)
{
this
.
img
=
liUrl
;
this
.
entity
.
productUrl
=
liUrl
;
...
...
@@ -172,6 +186,7 @@ export default {
this
.
componayId
=
r
.
result
.
madeCompany
;
this
.
$refs
.
edit
.
dep
=
r
.
result
.
levelId
;
this
.
$refs
.
edit
.
label
=
r
.
result
.
levelTitle
;
this
.
entity
.
materialId
=
r
.
result
.
materialId
;
});
},
handleSubmit
()
{
...
...
pages/technology/productMix/productTree/index.vue
View file @
a47af7cf
...
...
@@ -121,9 +121,9 @@ export default {
"span"
,
{
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
},
//
click: () => {
//
this.handleSelect(data); //手动选择树节点
//
},
//右键点击事件
contextmenu
:
e
=>
{
e
.
preventDefault
();
...
...
@@ -137,9 +137,9 @@ export default {
data
.
title
);
},
handleSelect
(
data
)
{
this
.
$emit
(
"clickItem"
,
data
);
},
//
handleSelect(data) {
//
this.$emit("clickItem", data);
//
},
loadTree
()
{
Api
.
getleveltree
().
then
(
r
=>
{
setTree
(
r
.
result
);
...
...
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