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
052957f9
Commit
052957f9
authored
Oct 19, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
9dc65f96
dfd83c51
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
763 additions
and
687 deletions
+763
-687
actions.vue
components/page/actions.vue
+93
-0
zh-CN.js
i18n/locale/zh-CN.js
+19
-22
index.vue
layouts/basic-layout/header-bug/index.vue
+66
-63
henq.js
libs/henq.js
+2
-1
add.vue
pages/mesPlan/add.vue
+7
-1
edit.vue
pages/mesPlan/edit.vue
+295
-317
index.vue
pages/project/plan/index.vue
+50
-33
add.vue
pages/technology/details/add.vue
+4
-4
add.vue
pages/technology/details/routingqccard/add.vue
+5
-5
add.vue
pages/technology/details/routingsupporting/add.vue
+220
-241
iview.js
plugins/iview.js
+2
-0
No files found.
components/page/actions.vue
0 → 100644
View file @
052957f9
<
template
>
<ul
class=
"actions"
>
<li
class=
"item"
v-for=
"(li, i) in items"
@
click=
"detail(li)"
>
<span
v-if=
"mode == 'text'"
class=
"text"
v-text=
"li.label"
></span>
<Tooltip
v-if=
"mode == 'icon'"
:content=
"li.label"
><Icon
:type=
"li.icon"
/></Tooltip>
<div
v-else
class=
"ib"
>
<Icon
type=
"li.icon"
/>
<span
class=
"text"
v-text=
"li.label"
></span>
</div>
</li>
</ul>
</
template
>
<
script
>
export
default
{
name
:
"actions"
,
data
()
{
return
{};
},
props
:
{
row
:
{
type
:
Object
,
},
items
:
{
type
:
Array
,
default
:
()
=>
{
return
[
{
label
:
"复制"
,
icon
:
"md-copy"
,
vclick
:
""
},
{
label
:
"新增"
,
icon
:
"md-add"
,
vclick
:
""
},
{
label
:
"删除"
,
icon
:
"md-trash"
,
vclick
:
""
},
{
label
:
"移动"
,
icon
:
"md-move"
,
vclick
:
""
},
{
label
:
"派发"
,
icon
:
"ios-alarm"
,
vclick
:
""
},
];
},
},
mode
:
{
// 显示类型
type
:
String
,
validator
:
(
value
)
=>
{
// 这个值必须匹配下列字符串中的一个
return
[
"icon"
,
"text"
,
"icon-text"
].
indexOf
(
value
)
!==
-
1
;
},
default
:
"icon"
,
},
disabled
:
{
type
:
Boolean
,
default
:
true
,
},
max
:
{
type
:
Number
,
default
:
3
,
},
},
methods
:
{
detail
(
li
)
{
if
(
li
.
confirm
)
{
var
msg
=
li
.
confirm
;
if
(
li
.
confirm
===
true
)
{
msg
=
`确定要
${
li
.
label
}
吗?`
;
}
this
.
$Modal
.
confirm
({
title
:
"操作确认"
,
content
:
msg
,
onOk
:
()
=>
{
this
.
$emit
(
"on-click"
,
this
.
row
,
li
);
},
});
}
else
{
this
.
$emit
(
"on-click"
,
this
.
row
,
li
);
}
},
},
};
</
script
>
<
style
lang=
"less"
>
.actions {
ul {
li {
float: left;
list-style: none;
width: 20px;
height: 20px;
text-align: center;
margin-left: 5px;
color: red;
}
}
}
</
style
>
\ No newline at end of file
i18n/locale/zh-CN.js
View file @
052957f9
...
...
@@ -1818,27 +1818,24 @@ export default {
type
:
'类型'
,
attachment
:
'附件'
,
executor
:
'执行人'
,
},
project_main
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'标题'
,
note
:
'备注'
,
state
:
'状态'
,
type
:
'分类'
,
picture
:
'图片'
,
attachment
:
'附件'
,
phase
:
'阶段'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
}
,
project_main
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'标题'
,
note
:
'备注'
,
state
:
'状态'
,
type
:
'分类'
,
picture
:
'图片'
,
attachment
:
'附件'
,
phase
:
'阶段'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
}
}
layouts/basic-layout/header-bug/index.vue
View file @
052957f9
<
template
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<span
class=
"i-layout-header-trigger i-layout-header-trigger-min"
>
<Dropdown
transfer
trigger=
"hover"
@
on-click=
"handleClickUserDropdown"
>
<span
@
click=
"openModelBugAdd"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[10, 0]"
>
<Icon
type=
"ios-bug"
size=
"18"
/>
<span
@
click=
"openModelBugAdd"
>
<Badge
:count=
"bugCount === 0 ? null : bugCount"
:overflow-count=
"99"
:offset=
"[10, 0]"
>
<Icon
type=
"ios-bug"
size=
"18"
/>
</Badge>
</span>
<Icon
type=
"md-arrow-dropdown"
></Icon>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"bug"
>
bug列表
</DropdownItem>
</DropdownMenu>
</span>
<Icon
type=
"md-arrow-dropdown"
></Icon>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"bug"
>
bug列表
</DropdownItem>
</DropdownMenu>
</Dropdown>
<Modal
title=
"新增bug"
v-model=
"bugAdd"
fullscreen
:z-index=
"
10
"
>
<addBugModal
ref=
"addBug"
></addBugModal>
<div
slot=
"footer"
>
<Button
@
click=
"addCancel"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"addSave"
>
确定
</Button>
</div>
<Modal
title=
"新增bug"
v-model=
"bugAdd"
fullscreen
:z-index=
"
999
"
>
<addBugModal
ref=
"addBug"
></addBugModal>
<div
slot=
"footer"
>
<Button
@
click=
"addCancel"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"addSave"
>
确定
</Button>
</div>
</Modal>
</span>
</span>
</
template
>
<
script
>
import
addBugModal
from
"@/pages/bug/component/add"
;
export
default
{
name
:
"addBug"
,
components
:
{
addBugModal
},
data
()
{
return
{
bugAdd
:
false
,
bugCount
:
3
};
},
computed
:
{},
methods
:
{
async
handleClickUserDropdown
(
name
)
{
if
(
name
===
"bug"
)
{
this
.
$router
.
push
({
name
:
"bug"
});
}
name
:
"addBug"
,
components
:
{
addBugModal
},
openModelBugAdd
()
{
this
.
bugAdd
=
true
;
this
.
$refs
.
addBug
.
getEid
();
this
.
$refs
.
addBug
.
initial
();
data
()
{
return
{
bugAdd
:
false
,
bugCount
:
3
};
},
addCancel
()
{
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
computed
:
{},
methods
:
{
async
handleClickUserDropdown
(
name
)
{
if
(
name
===
"bug"
)
{
this
.
$router
.
push
({
name
:
"bug"
});
}
},
openModelBugAdd
()
{
this
.
bugAdd
=
true
;
this
.
$refs
.
addBug
.
getEid
();
this
.
$refs
.
addBug
.
initial
();
},
addCancel
()
{
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
},
addSave
()
{
let
param
=
this
.
$refs
.
addBug
.
addBugInfo
();
//alert(JSON.stringify(param))
if
(
param
.
id
==
null
)
{
//增加确定
this
.
$http
.
bug
.
createorupdate
(
param
).
then
(
res
=>
{
if
(
res
.
result
.
status
)
{
this
.
$Message
.
success
(
"新增成功!"
);
let
newId
=
res
.
result
.
bugId
;
this
.
$refs
.
addBug
.
updateEid
(
newId
);
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
});
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
}
},
addSave
()
{
let
param
=
this
.
$refs
.
addBug
.
addBugInfo
();
//alert(JSON.stringify(param))
if
(
param
.
id
==
null
)
{
//增加确定
this
.
$http
.
bug
.
createorupdate
(
param
).
then
(
res
=>
{
if
(
res
.
result
.
status
)
{
this
.
$Message
.
success
(
"新增成功!"
);
let
newId
=
res
.
result
.
bugId
;
this
.
$refs
.
addBug
.
updateEid
(
newId
);
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
this
.
$refs
.
addBug
.
resetFields
();
this
.
bugAdd
=
false
;
});
}
else
{
this
.
$Message
.
error
(
"新增失败!"
);
}
}
},
created
()
{},
mounted
()
{}
created
()
{},
mounted
()
{}
};
</
script
>
\ No newline at end of file
</
script
>
libs/henq.js
View file @
052957f9
...
...
@@ -344,7 +344,7 @@ henq.dirCode = (code, v) => {
return
items
}
//colums验证start
henq
.
makeRules
=
(
list
,
apiUrl
)
=>
{
//测试数据start
...
...
@@ -551,4 +551,5 @@ henq.makeRules = (list, apiUrl) => {
})
return
rules
}
//colums验证end
export
default
henq
;
pages/mesPlan/add.vue
View file @
052957f9
...
...
@@ -52,7 +52,7 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"紧急程度"
style=
"width:100%"
>
<FormItem
label=
"紧急程度"
style=
"width:100%"
prop=
"urgencyLevel"
>
<dictionary
style=
"width:240px"
code=
"plan.order.urgencyLevel"
v-model=
"orderSearchForm.urgencyLevel"
></dictionary>
</FormItem>
</Col>
...
...
@@ -136,6 +136,12 @@ export default {
type
:
"number"
,
trigger
:
"change"
,
},
],
urgencyLevel
:
[{
required
:
true
,
message
:
"请选择紧急程度"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
},
wfstatu
:
1
,
...
...
pages/mesPlan/edit.vue
View file @
052957f9
<
template
>
<Form
:model=
"orderSearchForm"
:label-width=
"95"
:rules=
"ruleValidate"
ref=
"formValidate"
>
<Form
:model=
"orderSearchForm"
:label-width=
"95"
:rules=
"ruleValidate"
ref=
"formValidate"
>
<Row>
<Col
span=
"8"
>
<Col
span=
"8"
>
<FormItem
label=
"订单编号"
style=
"width:100%"
>
{{
this
.
orderSearchForm
.
mesCode
}}
</FormItem>
</Col>
<Col
span=
"8"
>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('productName')"
style=
"width:100%"
prop=
"productId"
>
<Select
v-model=
"orderSearchForm.productId"
:placeholder=
"placeholdeinfo"
style=
"width:240px;"
>
<Option
v-for=
"(item,index) in list"
:key=
"index"
:value=
"item.value"
style=
"display:none"
:label=
"item.label"
></Option>
<Tree
key=
"mytree"
:data=
"data1"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
<Select
v-model=
"orderSearchForm.productId"
:placeholder=
"placeholdeinfo"
style=
"width:240px;"
>
<Option
v-for=
"(item,index) in list"
:key=
"index"
:value=
"item.value"
style=
"display:none"
:label=
"item.label"
></Option>
<Tree
key=
"mytree"
:data=
"data1"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
</FormItem>
</Col>
<Col
span=
"8"
>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('drawnNumber')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.drawnNumber"
style=
"width:240px"
disabled
/>
<Input
v-model=
"orderSearchForm.productName"
style=
"width:240px"
v-show=
"false"
/>
<Input
v-model=
"orderSearchForm.bomId"
style=
"width:240px"
v-show=
"false"
/>
<Input
v-model=
"orderSearchForm.drawnNumber"
style=
"width:240px"
disabled
/>
<Input
v-model=
"orderSearchForm.productName"
style=
"width:240px"
v-show=
"false"
/>
<Input
v-model=
"orderSearchForm.bomId"
style=
"width:240px"
v-show=
"false"
/>
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col
span=
"8"
>
<Col
span=
"8"
>
<FormItem
:label=
"l('taskType')"
style=
"width:100%"
prop=
"taskType"
>
<dictionary
code=
"plan.order.taskType"
v-model=
"orderSearchForm.taskType"
style=
"width:240px"
></dictionary>
<dictionary
code=
"plan.order.taskType"
v-model=
"orderSearchForm.taskType"
style=
"width:240px"
></dictionary>
</FormItem>
</Col>
<Col
span=
"8"
>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('quantity')"
style=
"width:100%"
prop=
"quantity"
>
<InputNumber
:min=
"0"
v-model=
"orderSearchForm.quantity"
style=
"width:240px"
></InputNumber>
<InputNumber
:min=
"0"
v-model=
"orderSearchForm.quantity"
style=
"width:240px"
></InputNumber>
</FormItem>
</Col>
<Col
span=
"8"
>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('demandStartDate')"
style=
"width:100%"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width:240px"
@
on-change=
"getStartDate"
v-model=
"orderSearchForm.demandStartDate"
></DatePicker>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width:240px"
@
on-change=
"getStartDate"
v-model=
"orderSearchForm.demandStartDate"
></DatePicker>
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col
span=
"8"
>
<Col
span=
"8"
>
<FormItem
:label=
"l('demandFinishDate')"
style=
"width:100%"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width:240px"
@
on-change=
"getFinishedDate"
v-model=
"orderSearchForm.demandFinishDate"
></DatePicker>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width:240px"
@
on-change=
"getFinishedDate"
v-model=
"orderSearchForm.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Col>
<Col
span=
"8"
>
<Col
span=
"8"
>
<FormItem
:label=
"l('projectNumber')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.projectNumber"
style=
"width:240px"
/>
<Input
v-model=
"orderSearchForm.projectNumber"
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('batchNumber')"
label=
"批次号"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.batchNumber"
style=
"width:240px"
/>
<Input
v-model=
"orderSearchForm.batchNumber"
style=
"width:240px"
/>
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('urgencyLevel')"
style=
"width:100%"
>
<dictionary
style=
"width:240px"
code=
"plan.order.urgencyLevel"
v-model=
"orderSearchForm.urgencyLevel"
></dictionary>
<Col
span=
"8"
>
<FormItem
:label=
"l('urgencyLevel')"
style=
"width:100%"
prop=
"urgencyLevel"
>
<dictionary
style=
"width:240px"
code=
"plan.order.urgencyLevel"
v-model=
"orderSearchForm.urgencyLevel"
></dictionary>
</FormItem>
</Col>
<Col
span=
"24"
>
</Col>
<Col
span=
"24"
>
<FormItem
:label=
"l('taskRequire')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.taskRequire"
placeholder
/>
<Input
v-model=
"orderSearchForm.taskRequire"
placeholder
/>
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
:label=
"l('remark')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.remark"
placeholder
type=
"textarea"
:rows=
"3"
/>
<Input
v-model=
"orderSearchForm.remark"
placeholder
type=
"textarea"
:rows=
"3"
/>
</FormItem>
</Col>
<Col
span=
"24"
>
</Col>
<Col
span=
"24"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
</Col>
</Row>
</Form>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Edit"
,
data
()
{
return
{
orderSearchForm
:
{},
ruleValidate
:
{
productId
:
[
{
required
:
true
,
message
:
"请选择产品名称"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
taskType
:
[
{
required
:
true
,
message
:
"请选择任务类型"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
quantity
:
[
{
required
:
true
,
message
:
"请输入数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
},
placeholdeinfo
:
""
,
list
:
[],
data1
:
[],
wfstatu
:
1
,
};
},
props
:
{
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
;
},
},
},
mounted
()
{
let
params
=
{
id
:
"123327da-42b3-41f6-b785-cf933f137a95"
,
};
this
.
$api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
wfstatu
=
1
;
}
else
{
this
.
wfstatu
=
3
;
}
}
});
this
.
loadTree
();
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleSubmit
()
{
this
.
$refs
.
formValidate
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
orderSearchForm
.
status
=
this
.
wfstatu
;
Api
.
mesorderupdate
(
this
.
orderSearchForm
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"mes_plan"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
handleSelect
(
data
)
{
this
.
placeholdeinfo
=
""
;
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[];
this
.
selectdata
=
data
;
this
.
list
=
[];
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
title
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
this
.
orderSearchForm
.
drawnNumber
=
data
[
0
].
drawingNo
;
this
.
orderSearchForm
.
bomId
=
data
[
0
].
bomId
;
}
else
{
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
},
resetFields
()
{
this
.
orderSearchForm
=
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawnNumber
:
null
,
//图号
taskType
:
null
,
//任务类型
quantity
:
1
,
//数量
taskRequire
:
""
,
//任务接点要求
demandStartDate
:
this
.
getFormatDate
(
nowDate
),
//开始时间
demandFinishDate
:
this
.
getFormatDateEnd
(
tomorrowDate
),
//完成时间
remark
:
""
,
//备注
projectNumber
:
""
,
//项目号
batchNumber
:
""
,
//批次号
urgencyLevel
:
null
,
//紧急程度
bomId
:
""
,
};
},
loadTree
()
{
//打开新增订单窗口加载产品
//this.resetFields();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
((
res
)
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
name
:
"Edit"
,
data
()
{
return
{
orderSearchForm
:
{},
ruleValidate
:
{
productId
:
[{
required
:
true
,
message
:
"请选择产品名称"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
taskType
:
[{
required
:
true
,
message
:
"请选择任务类型"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
quantity
:
[{
required
:
true
,
message
:
"请输入数量"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
urgencyLevel
:
[{
required
:
true
,
message
:
"请选择紧急程度"
,
trigger
:
"change"
,
type
:
"number"
,
},
],
},
placeholdeinfo
:
""
,
list
:
[],
data1
:
[],
wfstatu
:
1
,
};
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
"md-folder"
;
let
title
=
data
.
title
;
if
(
data
.
isProduct
!=
0
)
{
let
version
=
this
.
$store
.
getters
.
dictionaryByCode
(
"material.main.version"
,
data
.
version
);
type
=
"ios-image"
;
if
(
version
)
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
"/"
+
version
.
name
+
")"
;
}
else
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
")"
;
}
}
return
h
(
"span"
,
{
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
props
:
{
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
;
},
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
type
,
},
style
:
{
marginRight
:
"8px"
,
},
}),
h
(
"span"
,
{
style
:
{
color
:
data
.
isProduct
==
0
?
"#000"
:
"rgba(38, 128, 235, 1)"
,
},
},
title
),
]
);
},
//时间相关start
getStartDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
nowDate
);
}
else
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
value
);
}
},
getFinishedDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDateEnd
(
tomorrowDate
);
}
else
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDateEnd
(
value
);
}
},
getFormatDate
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 00:00:01"
;
return
resDate
;
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
mounted
()
{
let
params
=
{
id
:
"123327da-42b3-41f6-b785-cf933f137a95"
,
};
this
.
$api
.
get
(
`
${
workflowUrl
}
/schema/getbyid`
,
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
let
wfStatus
=
res
.
result
.
status
;
if
(
wfStatus
==
0
)
{
this
.
wfstatu
=
1
;
}
else
{
this
.
wfstatu
=
3
;
}
}
});
this
.
loadTree
();
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleSubmit
()
{
this
.
$refs
.
formValidate
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
orderSearchForm
.
status
=
this
.
wfstatu
;
Api
.
mesorderupdate
(
this
.
orderSearchForm
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"mes_plan"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
handleSelect
(
data
)
{
this
.
placeholdeinfo
=
""
;
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[];
this
.
selectdata
=
data
;
this
.
list
=
[];
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
});
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
title
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
this
.
orderSearchForm
.
drawnNumber
=
data
[
0
].
drawingNo
;
this
.
orderSearchForm
.
bomId
=
data
[
0
].
bomId
;
}
else
{
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
},
resetFields
()
{
this
.
orderSearchForm
=
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawnNumber
:
null
,
//图号
taskType
:
null
,
//任务类型
quantity
:
1
,
//数量
taskRequire
:
""
,
//任务接点要求
demandStartDate
:
this
.
getFormatDate
(
nowDate
),
//开始时间
demandFinishDate
:
this
.
getFormatDateEnd
(
tomorrowDate
),
//完成时间
remark
:
""
,
//备注
projectNumber
:
""
,
//项目号
batchNumber
:
""
,
//批次号
urgencyLevel
:
null
,
//紧急程度
bomId
:
""
,
};
},
loadTree
()
{
//打开新增订单窗口加载产品
//this.resetFields();
var
sumData
=
[];
this
.
$http
.
order
.
getallselecttree
().
then
((
res
)
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
]);
}
this
.
data1
=
sumData
;
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
let
type
=
"md-folder"
;
let
title
=
data
.
title
;
if
(
data
.
isProduct
!=
0
)
{
let
version
=
this
.
$store
.
getters
.
dictionaryByCode
(
"material.main.version"
,
data
.
version
);
type
=
"ios-image"
;
if
(
version
)
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
"/"
+
version
.
name
+
")"
;
}
else
{
title
=
data
.
title
+
"("
+
data
.
mmcode
+
")"
;
}
}
return
h
(
"span"
,
{
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
},
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
type
,
},
style
:
{
marginRight
:
"8px"
,
},
}),
h
(
"span"
,
{
style
:
{
color
:
data
.
isProduct
==
0
?
"#000"
:
"rgba(38, 128, 235, 1)"
,
},
},
title
),
]
);
},
//时间相关start
getStartDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
nowDate
);
}
else
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
value
);
}
},
getFinishedDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDateEnd
(
tomorrowDate
);
}
else
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDateEnd
(
value
);
}
},
getFormatDate
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 00:00:01"
;
return
resDate
;
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
//时间相关end
},
//时间相关end
},
watch
:
{
row
(
v
)
{
if
(
v
!=
null
)
{
this
.
orderSearchForm
=
this
.
$u
.
clone
(
this
.
row
);
//this.placeholdeinfo = this.orderSearchForm.productName;
this
.
list
=
[];
this
.
list
.
push
({
label
:
this
.
orderSearchForm
.
productName
,
value
:
this
.
orderSearchForm
.
productId
,
});
}
watch
:
{
row
(
v
)
{
if
(
v
!=
null
)
{
this
.
orderSearchForm
=
this
.
$u
.
clone
(
this
.
row
);
//this.placeholdeinfo = this.orderSearchForm.productName;
this
.
list
=
[];
this
.
list
.
push
({
label
:
this
.
orderSearchForm
.
productName
,
value
:
this
.
orderSearchForm
.
productId
,
});
}
},
},
},
};
</
script
>
pages/project/plan/index.vue
View file @
052957f9
...
...
@@ -5,6 +5,7 @@
<Icon
type=
"ios-arrow-down"
/>
</p>
项目信息
<Actions/>
</Card>
<Card>
<TreeGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
...
...
@@ -78,35 +79,47 @@ export default {
key
:
"action"
,
width
:
150
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
]);
},
// render:(h,params)=>{
// return h("Actions"
// ,{
// attrs:{
// row:params,
// },
// on:{
// 'on-click':()=>this.rowclick
// }
// }
// )
// }
// render: (h, params) => {
// return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.view(params.row.id) },
// },
// "查看"
// ),
// //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h(
// "op",
// {
// attrs: { oprate: "edit" },
// on: { click: () => this.edit(params.row.id) },
// },
// "编辑"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// ]);
// },
},
{
key
:
"type"
,
...
...
@@ -155,25 +168,29 @@ export default {
},
mounted
()
{
console
.
log
(
this
);
this
.
search
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
// this.$refs.grid.load
();
this
.
search
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
//
this.$refs.grid.reload(this.easySearch);
var
params
=
{
conditions
:[]
}
Api
.
list
(
params
).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
},
rowclick
(
row
,
li
){
console
.
warn
(
"rowclick"
,
row
,
li
);
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
...
...
@@ -201,7 +218,7 @@ export default {
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
search
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
...
...
pages/technology/details/add.vue
View file @
052957f9
...
...
@@ -187,14 +187,14 @@ export default {
runtime
:
0
,
efficiencyValue
:
1
,
singleOut
:
1
,
isOutside
:
null
,
isImportant
:
null
,
isOutside
:
0
,
isImportant
:
0
,
outsideTime
:
0
,
isImportantResources
:
null
,
isImportantResources
:
0
,
setupTime
:
0
,
realWorkingHours
:
0
,
realRuntime
:
0
,
isParticipateIntime
:
null
,
isParticipateIntime
:
0
,
equipType
:
""
,
},
rules
:
{
...
...
pages/technology/details/routingqccard/add.vue
View file @
052957f9
...
...
@@ -197,11 +197,11 @@ export default {
productionRequirement
:
""
,
standard
:
""
,
qualityTemplateName
:
""
,
isImportant
:
null
,
firstCheck
:
null
,
inspection
:
null
,
inspectionTime
:
null
,
sampling
:
null
,
isImportant
:
0
,
firstCheck
:
0
,
inspection
:
0
,
inspectionTime
:
0
,
sampling
:
0
,
samplingBatch
:
""
,
},
tempFile
:
""
,
...
...
pages/technology/details/routingsupporting/add.vue
View file @
052957f9
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"120"
>
<Row>
<!--
<!--
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingStepId')"
prop=
"routingStepId"
>
<InputNumber
v-model=
"entity.routingStepId"
></InputNumber>
...
...
@@ -34,19 +34,14 @@
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('routingDetailName')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
>
<Option
v-for=
"(item, index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option
>
</Select>
<Select
v-model=
"entity.routingDetailId"
>
<Option
v-for=
"(item, index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
<!--
<Col
:span=
"8"
>
</Col>
<!--
<Col
:span=
"8"
>
<FormItem
:label=
"l('materialType')"
prop=
"materialType"
>
<Dictionary
code=
"mes_xingchi_resource.material.materialReType"
...
...
@@ -54,66 +49,48 @@
></Dictionary>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<!--
<FormItem
:label=
"l('nameMaterial')"
prop=
"materialNumber"
>
<Materiel
:bomId=
"productBomId"
v-model=
"entity.materialId"
@
on-change=
"change"
></Materiel>
</FormItem>
-->
<FormItem
:label=
"l('nameMaterial')"
prop=
"materialId"
>
<Select
v-model=
"entity.materialId"
placeholder=
"请选择"
style=
"width: 300px"
>
<Option
v-for=
"(item, index) in listData"
:key=
"index"
:value=
"item.value"
:label=
"item.label"
style=
"display: none"
></Option>
<Tree
key=
"mytree"
:data=
"dataTree"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
<!--
<Materiel
<Select
v-model=
"entity.materialId"
placeholder=
"请选择"
style=
"width: 300px"
>
<Option
v-for=
"(item, index) in listData"
:key=
"index"
:value=
"item.value"
:label=
"item.label"
style=
"display: none"
></Option>
<Tree
key=
"mytree"
:data=
"dataTree"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
<!--
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:codeRuleType=
"1"
:setType=
"true"
></Materiel>
-->
</FormItem>
</Col>
<!--
<Col
:span=
"8"
v-if=
"false"
>
</Col>
<!--
<Col
:span=
"8"
v-if=
"false"
>
<FormItem
:label=
"l('nameMaterial')"
prop=
"nameMaterial"
>
<Input
v-model=
"entity.nameMaterial"
></Input>
</FormItem>
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('quantity')"
prop=
"quantity"
>
<InputNumber
v-model=
"entity.quantity"
style=
"width: 100%"
></InputNumber>
<InputNumber
v-model=
"entity.quantity"
style=
"width: 100%"
></InputNumber>
</FormItem>
</Col>
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Row>
<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>
<CustomProperties
:materialId=
"entity.materialId"
:forItem=
"forItem"
/>
<!--
<Col
:span=
"8"
>
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Row>
<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>
<CustomProperties
:materialId=
"entity.materialId"
:forItem=
"forItem"
/>
<!--
<Col
:span=
"8"
>
<FormItem
:label=
"l('brand')"
prop=
"brand"
>
<Input
v-model=
"entity.brand"
></Input>
</FormItem>
...
...
@@ -150,203 +127,205 @@
</Col>
-->
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</Form>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
ApiDetail
from
"../api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
forItem
:
{},
listData
:
[],
dataTree
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDetailId
:
null
,
routingStepId
:
0
,
quantity
:
null
,
materialId
:
""
,
materialType
:
""
,
materialNumber
:
null
,
nameMaterial
:
""
,
brand
:
""
,
specifications
:
""
,
xhgg
:
""
,
texture
:
""
,
procurementStandards
:
""
,
qualityGrade
:
""
,
state
:
null
,
extend
:
""
,
remark
:
""
,
drawNum
:
""
,
json
:
{},
},
rules
:
{
routingDetailId
:
[
{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
materialId
:
[
{
required
:
true
,
message
:
"请选择工序"
,
trigger
:
"change"
,
},
],
quantity
:
[
{
required
:
true
,
type
:
"number"
,
message
:
"请选择工序"
,
trigger
:
"blur"
,
},
],
},
routingDetailList
:
[],
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
headid
:
Number
,
productBomId
:
{
type
:
Number
,
default
:
null
,
},
},
mounted
()
{
this
.
loadDetails
();
this
.
getData
();
},
methods
:
{
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
cursor
:
"pointer"
,
},
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
name
:
"Add"
,
data
()
{
return
{
forItem
:
{},
listData
:
[],
dataTree
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDetailId
:
null
,
routingStepId
:
0
,
quantity
:
null
,
materialId
:
""
,
materialType
:
""
,
materialNumber
:
null
,
nameMaterial
:
""
,
brand
:
""
,
specifications
:
""
,
xhgg
:
""
,
texture
:
""
,
procurementStandards
:
""
,
qualityGrade
:
""
,
state
:
0
,
extend
:
""
,
remark
:
""
,
drawNum
:
""
,
json
:
{},
},
},
rules
:
{
routingDetailId
:
[{
required
:
true
,
message
:
"请选择工序"
,
type
:
"number"
,
trigger
:
"change"
,
},
],
materialId
:
[{
required
:
true
,
message
:
"请选择工序"
,
trigger
:
"change"
,
},
],
quantity
:
[{
required
:
true
,
type
:
"number"
,
message
:
"请选择工序"
,
trigger
:
"blur"
,
},
],
},
routingDetailList
:
[],
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
headid
:
Number
,
productBomId
:
{
type
:
Number
,
default
:
null
,
},
data
.
title
);
},
handleSelect
(
data
)
{
console
.
log
(
data
);
mounted
()
{
this
.
loadDetails
();
this
.
getData
();
},
methods
:
{
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
cursor
:
"pointer"
,
},
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
},
},
},
data
.
title
);
},
handleSelect
(
data
)
{
console
.
log
(
data
);
let
obj
=
{
label
:
data
.
title
,
value
:
data
.
materialId
,
};
this
.
listData
=
[];
this
.
listData
.
push
(
obj
);
this
.
entity
.
materialId
=
this
.
listData
[
0
].
value
;
this
.
entity
.
nameMaterial
=
this
.
listData
[
0
].
label
;
let
obj
=
{
label
:
data
.
title
,
value
:
data
.
materialId
,
};
this
.
listData
=
[];
this
.
listData
.
push
(
obj
);
this
.
entity
.
materialId
=
this
.
listData
[
0
].
value
;
this
.
entity
.
nameMaterial
=
this
.
listData
[
0
].
label
;
this
.
entity
.
nameMaterial
=
data
.
name
;
this
.
entity
.
materialId
=
data
.
materialId
;
this
.
entity
.
materialNumber
=
data
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
data
.
name
;
this
.
entity
.
json
.
materialNumber
=
data
.
mmcode
;
Api
.
getMaterial
({
id
:
data
.
materialId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
forItem
=
r
.
result
;
}
});
},
getData
()
{
Api
.
alltree
({
id
:
this
.
productBomId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataTree
=
r
.
result
;
// this.$Message.success("获取物料成功");
}
else
{
this
.
$Message
.
error
(
"获取物料失败"
);
}
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
entity
.
routingHeaderId
=
this
.
headid
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
this
.
entity
.
nameMaterial
=
data
.
name
;
this
.
entity
.
materialId
=
data
.
materialId
;
this
.
entity
.
materialNumber
=
data
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
data
.
name
;
this
.
entity
.
json
.
materialNumber
=
data
.
mmcode
;
Api
.
getMaterial
({
id
:
data
.
materialId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
forItem
=
r
.
result
;
}
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
// change(e, v) {
// console.log(e);
// console.log(v);
// this.entity.nameMaterial = e.name;
// this.entity.materialId = e.materialId;
// this.entity.materialNumber = e.mmcode;
},
getData
()
{
Api
.
alltree
({
id
:
this
.
productBomId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataTree
=
r
.
result
;
// this.$Message.success("获取物料成功");
}
else
{
this
.
$Message
.
error
(
"获取物料失败"
);
}
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
entity
.
routingHeaderId
=
this
.
headid
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
// 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;
// this.forItem = v;
// },
loadDetails
()
{
//获取工序列表
let
parms
=
{
headerID
:
this
.
headid
,
};
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
.
routingDetailList
=
tempD
;
});
},
l
(
key
)
{
key
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
// this.entity.json.nameMaterial = e.name;
// this.entity.json.materialNumber = e.mmcode;
// this.forItem = v;
// },
loadDetails
()
{
//获取工序列表
let
parms
=
{
headerID
:
this
.
headid
,
};
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
.
routingDetailList
=
tempD
;
});
},
l
(
key
)
{
key
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
productBomId
(
v
)
{
if
(
v
>
0
)
{
}
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
productBomId
(
v
)
{
if
(
v
>
0
)
{}
},
},
},
};
</
script
>
plugins/iview.js
View file @
052957f9
...
...
@@ -69,6 +69,7 @@ import CustomProperties from '@/components/page/customProperties.vue'
import
InputCode
from
'@/components/page/inputCode.vue'
import
Pictrue
from
'@/components/page/pictrue.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
Actions
from
'@/components/page/actions.vue'
...
...
@@ -144,6 +145,7 @@ Vue.component("CustomProperties",CustomProperties)
Vue
.
component
(
"InputCode"
,
InputCode
)
Vue
.
component
(
"Pictrue"
,
Pictrue
)
Vue
.
component
(
"WordTree"
,
WordTree
)
Vue
.
component
(
"Actions"
,
Actions
)
...
...
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