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
6f24905c
Commit
6f24905c
authored
Apr 09, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit/工时修改/工时同步到原始工艺
parent
b8e00f52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
67 deletions
+86
-67
dataGrid.vue
components/page/dataGrid.vue
+1
-1
api.js
pages/aps/aps/api.js
+14
-5
edit.vue
pages/aps/aps/components/edit.vue
+71
-61
No files found.
components/page/dataGrid.vue
View file @
6f24905c
...
...
@@ -162,7 +162,7 @@ export default {
},
size
:
{
type
:
String
,
default
:
"default
"
default
:
"default"
},
height
:
{
type
:
Number
,
...
...
pages/aps/aps/api.js
View file @
6f24905c
...
...
@@ -2,20 +2,20 @@ import Api from '@/plugins/request'
export
default
{
index
:
`
${
resourceUrl
}
mesparttaskplansimulate/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
mesparttaskplansimulate/paged`
,
params
);
return
Api
.
post
(
`
${
resourceUrl
}
/
mesparttaskplansimulate/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
resourceUrl
}
mesparttaskplansimulate/get`
,
params
);
return
Api
.
get
(
`
${
resourceUrl
}
/
mesparttaskplansimulate/get`
,
params
);
},
create
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
mesparttaskplansimulate/create`
,
params
);
return
Api
.
post
(
`
${
resourceUrl
}
/
mesparttaskplansimulate/create`
,
params
);
},
update
(
params
)
{
return
Api
.
post
(
`
${
resourceUrl
}
mesparttaskplansimulate/update`
,
params
);
return
Api
.
post
(
`
${
resourceUrl
}
/
mesparttaskplansimulate/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
resourceUrl
}
mesparttaskplansimulate/delete`
,
{
return
Api
.
delete
(
`
${
resourceUrl
}
/
mesparttaskplansimulate/delete`
,
{
params
:
params
});
},
...
...
@@ -76,4 +76,13 @@ export default {
userdepartmentsofworkshop
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/user/userdepartmentsofworkshop`
,
params
);
},
//工时修改
updatesetuptimeandfirstequip
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/mes_op_task_plan_simulate/updatesetuptimeandfirstequip`
,
params
);
},
//工时同步到原始工艺
apsupdate
(
params
)
{
return
Api
.
post
(
`
${
designUrl
}
/routingdetail/apsupdate `
,
params
);
},
}
pages/aps/aps/components/edit.vue
View file @
6f24905c
...
...
@@ -2,44 +2,25 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('tASKSEQ')"
prop=
"tASKSEQ"
>
<Input
v-model=
"entity.task_seq"
></Input>
</FormItem>
<FormItem
:label=
"l('tASKSEQ')"
prop=
"tASKSEQ"
>
{{
this
.
entity
.
task_seq
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('tASKNAME')"
prop=
"tASKNAME"
>
<Input
v-model=
"entity.task_name"
></Input>
</FormItem>
<FormItem
:label=
"l('tASKNAME')"
prop=
"tASKNAME"
>
{{
this
.
entity
.
task_name
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('sHOPID')"
prop=
"sHOPID"
>
<!-- v-model="orderSearchForm.orderCat" -->
<Select
v-model=
"entity.sHOPID"
>
<Option
value=
""
class=
"option-text"
>
请选择
</Option>
<Option
v-for=
"item in orderCatList"
:value=
"item"
:key=
"item"
>
{{
item
}}
</Option>
</Select>
<FormItem
label=
"生产设备"
>
<EquipSelect
v-model=
"entity.eQUIPID"
></EquipSelect>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('eQUIPID')"
prop=
"eQUIPID"
>
<Select
v-model=
"entity.eQUIPID"
>
<Option
value=
""
class=
"option-text"
>
请选择
</Option>
<Option
v-for=
"item in orderCatList"
:value=
"item"
:key=
"item"
>
{{
item
}}
</Option>
</Select>
<Col
:span=
"12"
v-model=
"entity.rUNTIME"
>
<FormItem
:label=
"l('rUNTIME')"
prop=
"rUNTIME"
>
<InputNumber
v-model=
"entity.run_time"
:max=
"100"
:min=
"1"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"关重资源名称"
prop=
"rUNTIME"
>
<Select
v-model=
"entity.run_time"
>
<Option
value=
""
class=
"option-text"
>
请选择
</Option>
<Option
v-for=
"item in orderCatList"
:value=
"item"
:key=
"item"
>
{{
item
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
v-model=
"entity.rUNTIME"
>
<FormItem
:label=
"l('rUNTIME')"
prop=
"rUNTIME"
>
<!-- v-model="value1" -->
<InputNumber
v-model=
"entity.run_time"
:max=
"100"
:min=
"1"
></InputNumber>
<FormItem
label=
" "
>
<Checkbox
v-model=
"single"
>
是否同步到原始工艺
</Checkbox>
</FormItem>
</Col>
</Row>
...
...
@@ -50,70 +31,99 @@
</Form>
</
template
>
<
script
>
import
Api
from
'../api'
import
Api
from
"../api"
;
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{},
orderCatList
:[
],
orderCatList
:
[],
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
single
:
false
};
},
props
:
{
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
type
:
Object
,
default
:
()
=>
{
return
null
;
}
}
},
methods
:
{
load
(
v
)
{
this
.
entity
=
v
this
.
entity
=
v
;
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
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-option-ok'
)
this
.
disabled
=
true
;
let
parmsUp
=
{
run_time
:
this
.
entity
.
run_time
,
first_equip
:
this
.
entity
.
eQUIPID
,
id
:
this
.
entity
.
id
};
Api
.
updatesetuptimeandfirstequip
(
parmsUp
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
!
this
.
single
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-option-ok"
);
}
else
{
let
parms
=
{
id
:
this
.
entity
.
routing_detail_id
,
//工序ID
name
:
this
.
entity
.
task_name
,
//工序名
task_seq
:
this
.
entity
.
task_seq
,
//工序号
resource_id
:
this
.
entity
.
eQUIPID
,
//设备id
runtime
:
this
.
entity
.
run_time
,
//单件工时
department_id
:
0
//班组ID
};
Api
.
apsupdate
(
parms
)
.
then
(
r
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-option-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
(
(
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
.
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
)
;
})
;
}
})
})
;
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
'mes_op_task_execute'
+
'.'
+
key
return
this
.
$t
(
key
)
key
=
"mes_op_task_execute"
+
"."
+
key
;
return
this
.
$t
(
key
)
;
}
},
watch
:
{
row
(
v
)
{
if
(
v
!=
{})
{
//alert(JSON.stringify(v))
this
.
entity
=
v
this
.
entity
=
v
;
}
}
}
}
}
;
</
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