Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
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
mes-ui
Commits
7ca6414f
Commit
7ca6414f
authored
Dec 18, 2024
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 1.领料申请逻辑修改; 2.维护保养新增选择物料时添加报状态的逻辑
parent
cd76e88b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
31 deletions
+50
-31
maintenance.js
src/api/mes/tm/maintenance.js
+2
-2
index.vue
src/components/TmTool/index.vue
+5
-0
requestIndex.vue
src/views/mes/pro/request/components/requestIndex.vue
+2
-2
index.vue
src/views/mes/pro/request/index.vue
+6
-6
index.vue
src/views/mes/tm/maintenance/index.vue
+35
-21
No files found.
src/api/mes/tm/maintenance.js
View file @
7ca6414f
...
...
@@ -36,7 +36,7 @@ export function updateMaintenance(data) {
}
// 开始维护刀模版
export
function
del
Maintenance
(
toolMaintenanceId
)
{
export
function
start
Maintenance
(
toolMaintenanceId
)
{
return
request
({
url
:
'/md/maintenance/'
+
toolMaintenanceId
,
method
:
'Post'
...
...
@@ -48,4 +48,4 @@ export function delMaintenan(toolMaintenanceId) {
url
:
'/md/maintenance/'
+
toolMaintenanceId
,
method
:
'delete'
})
}
\ No newline at end of file
}
src/components/TmTool/index.vue
View file @
7ca6414f
...
...
@@ -115,6 +115,11 @@
</el-table-column>
<el-table-column
label=
"品牌"
align=
"center"
prop=
"brand"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"型号"
align=
"center"
prop=
"specification"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_tool_status"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"类型"
align=
"center"
prop=
"toolTypeName"
/>
<el-table-column
label=
"库存数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
label=
"可用数量"
align=
"center"
prop=
"quantityAvail"
/>
...
...
src/views/mes/pro/request/components/requestIndex.vue
View file @
7ca6414f
...
...
@@ -39,7 +39,7 @@
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作中心编码"
prop=
"workstationCode"
>
<el-input
v-model=
"form.workstationCode"
placeholder=
"请输入工作中心编码"
>
<el-input
v-model=
"form.workstationCode"
disabled
placeholder=
"请输入工作中心编码"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleItemSelect('WorkstationSelectrRef')"
/>
</el-input>
<WorkstationSelect
...
...
@@ -58,7 +58,7 @@
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作单元编码"
prop=
"workunitCode"
>
<el-input
v-model=
"form.workunitCode"
placeholder=
"请输入工作单元编码"
>
<el-input
v-model=
"form.workunitCode"
disabled
placeholder=
"请输入工作单元编码"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleItemSelect('WorkunitSelectRef')"
/>
</el-input>
<WorkuintSelect
...
...
src/views/mes/pro/request/index.vue
View file @
7ca6414f
...
...
@@ -458,18 +458,18 @@ export default {
optType
:
null
,
// 表单校验
rules
:
{
//
taskCode: [
//
{ required: true, message: "任务单号称不能为空", trigger: "blur" }
//
],
taskCode
:
[
{
required
:
true
,
message
:
"任务单号称不能为空"
,
trigger
:
"blur"
}
],
arrangeCode
:
[
{
required
:
true
,
message
:
"编排单号称不能为空"
,
trigger
:
"blur"
}
],
createTime
:
[
{
required
:
true
,
message
:
"申请时间不能为空"
,
trigger
:
"blur"
}
],
//
workorderCode: [
//
{ required: true, message: "工单号称不能为空", trigger: "blur" }
//
],
workorderCode
:
[
{
required
:
true
,
message
:
"工单号称不能为空"
,
trigger
:
"blur"
}
],
}
};
...
...
src/views/mes/tm/maintenance/index.vue
View file @
7ca6414f
...
...
@@ -92,10 +92,10 @@
<el-button
type=
"danger"
plain
icon=
"el-icon-
delete
"
icon=
"el-icon-
video-play
"
size=
"mini"
:disabled=
"
sing
le"
@
click=
"handle
Delete
"
:disabled=
"
multip
le"
@
click=
"handle
StartMaintain
"
v-hasPermi=
"['md:maintenance:remove']"
>
开始维护
</el-button>
</el-col>
...
...
@@ -103,7 +103,7 @@
<el-button
type=
"success"
plain
icon=
"el-icon-
edit
"
icon=
"el-icon-
video-pause
"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate(new Date().getTime)"
...
...
@@ -141,11 +141,14 @@
<el-table-column
label=
"SN编码"
align=
"center"
prop=
"toolCode"
/>
<el-table-column
label=
"存放位置"
align=
"center"
prop=
"location"
/>
<el-table-column
label=
"维护人"
align=
"center"
prop=
"processPerson"
/>
<el-table-column
label=
"开始时间"
align=
"center"
prop=
"startTime"
/>
<el-table-column
label=
"结束时间"
align=
"center"
prop=
"endTime"
/>
<el-table-column
label=
"维护时间"
align=
"center"
prop=
"processTime"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_tool_status"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createBy"
width=
"100"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"150"
>
<!-- <template slot-scope="scope">
...
...
@@ -209,7 +212,6 @@
icon=
"el-icon-search"
@
click=
"handleBrandSelect"
:disabled=
"form.toolMaintenanceId"
></el-button>
</el-input>
<BrandSelect
...
...
@@ -323,11 +325,11 @@
</template>
<
script
>
import
{
listMaintenance
,
getMaintenance
,
del
Maintenance
,
addMaintenance
,
updateMaintenance
,
delMaintenan
}
from
"@/api/mes/tm/maintenance"
;
import
{
listMaintenance
,
getMaintenance
,
start
Maintenance
,
addMaintenance
,
updateMaintenance
,
delMaintenan
}
from
"@/api/mes/tm/maintenance"
;
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
export
default
{
components
:
{
BrandSelect
},
dicts
:
[
'mes_maintenance_status'
,
'mes_course_type'
,
'mes_to_status'
],
dicts
:
[
'mes_maintenance_status'
,
'mes_course_type'
,
'mes_to_status'
,
'mes_tool_status'
],
name
:
"Maintenance"
,
data
()
{
return
{
...
...
@@ -352,7 +354,7 @@ export default {
// 是否显示弹出层
opena
:
false
,
selections
:
[],
optType
:
'add'
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -372,8 +374,6 @@ export default {
processTime
:
null
,
startTime
:
null
,
endTime
:
null
,
},
// 表单参数
form
:
{},
...
...
@@ -438,6 +438,24 @@ export default {
this
.
$refs
.
brSelect
.
showFlag
=
true
;
},
onBrandSelected
(
row
){
console
.
log
(
row
);
if
(
row
.
status
==
"SCRAP"
)
{
this
.
$confirm
(
'当前所选刀模已报废,是否继续选择!'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
if
(
row
!=
undefined
&&
row
!=
null
){
this
.
form
.
toolId
=
row
.
toolId
;
this
.
form
.
toolName
=
row
.
toolName
;
this
.
form
.
toolCode
=
row
.
toolCode
;
this
.
form
.
itemCode
=
row
.
sapItemCode
;
this
.
form
.
location
=
row
.
location
;
}
}).
catch
(()
=>
{
this
.
$refs
.
brSelect
.
showFlag
=
true
;
});
}
else
{
if
(
row
!=
undefined
&&
row
!=
null
){
this
.
form
.
toolId
=
row
.
toolId
;
this
.
form
.
toolName
=
row
.
toolName
;
...
...
@@ -445,16 +463,12 @@ export default {
this
.
form
.
itemCode
=
row
.
sapItemCode
;
this
.
form
.
location
=
row
.
location
;
}
}
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolMaintenanceId
)
this
.
selections
=
selection
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
...
...
@@ -503,7 +517,7 @@ export default {
if
(
this
.
form
.
toolMaintenanceId
!=
null
)
{
updateMaintenance
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"维护结束"
);
this
.
opena
=
false
;
2
this
.
opena
=
false
;
this
.
getList
();
});
}
else
{
...
...
@@ -517,13 +531,13 @@ export default {
});
},
/** 维护 */
handle
Delete
(
row
)
{
handle
StartMaintain
(
row
)
{
if
(
this
.
selections
.
some
(
v
=>
v
.
startTime
))
{
return
return
;
}
const
toolMaintenanceId
=
row
.
toolMaintenanceId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认要维护刀模版编号为"'
+
toolMaintenanceId
+
'"的数据项?'
).
then
(
function
()
{
return
del
Maintenance
(
toolMaintenanceId
);
return
start
Maintenance
(
toolMaintenanceId
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"开始维护"
);
...
...
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