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
965a48ac
Commit
965a48ac
authored
Jun 23, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品bom
parent
ceee37a7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
464 additions
and
8 deletions
+464
-8
zh-CN.js
i18n/locale/zh-CN.js
+6
-2
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 @
965a48ac
...
...
@@ -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/technology/productMix/product/add.vue
View file @
965a48ac
...
...
@@ -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 @
965a48ac
<
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 @
965a48ac
<
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 @
965a48ac
<
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 @
965a48ac
...
...
@@ -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 @
965a48ac
...
...
@@ -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