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
91086728
Commit
91086728
authored
Jan 22, 2025
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 1.刀模版具台账增加升降序功能; 2.部分页面字段优化
parent
6719f085
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
478 additions
and
218 deletions
+478
-218
returnItem.vue
src/components/MaterialReturn/returnItem.vue
+1
-1
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+1
-0
index.vue
src/views/mes/tm/tool/index.vue
+476
-217
No files found.
src/components/MaterialReturn/returnItem.vue
View file @
91086728
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
/>
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<
el-table-column
label=
"申请退料数量"
align=
"center"
prop=
"backNum"
/
>
<
!-- <el-table-column label="申请退料数量" align="center" prop="backNum" /> --
>
<el-table-column
label=
"已退料数量"
align=
"center"
prop=
"returnNum"
/>
<el-table-column
label=
"已退料数量"
align=
"center"
prop=
"returnNum"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
91086728
...
@@ -244,6 +244,7 @@
...
@@ -244,6 +244,7 @@
<dict-tag
:options=
"dict.type.mes_workorder_type"
:value=
"scope.row.workorderType"
/>
<dict-tag
:options=
"dict.type.mes_workorder_type"
:value=
"scope.row.workorderType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"需求用途"
width=
"150"
align=
"center"
prop=
"requirementType"
/>
<el-table-column
label=
"组合单号"
width=
"180"
align=
"center"
prop=
"combinationCode"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"组合单号"
width=
"180"
align=
"center"
prop=
"combinationCode"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"showCombDetail(scope.row, scope.row.combinationCode)"
>
{{
<el-button
size=
"mini"
type=
"text"
@
click=
"showCombDetail(scope.row, scope.row.combinationCode)"
>
{{
...
...
src/views/mes/tm/tool/index.vue
View file @
91086728
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
@
submit
.
native
.
prevent
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form
:model=
"queryParams"
@
submit
.
native
.
prevent
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"物料编码"
prop=
"sapItemCode"
>
<el-form-item
label=
"物料编码"
prop=
"sapItemCode"
>
<el-input
<el-input
v-model=
"queryParams.sapItemCode"
v-model=
"queryParams.sapItemCode"
...
@@ -26,7 +34,11 @@
...
@@ -26,7 +34,11 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"刀模版具类型"
prop=
"toolTypeId"
>
<el-form-item
label=
"刀模版具类型"
prop=
"toolTypeId"
>
<el-select
v-model=
"queryParams.toolTypeId"
placeholder=
"请选择类型"
clearable
>
<el-select
v-model=
"queryParams.toolTypeId"
placeholder=
"请选择类型"
clearable
>
<el-option
<el-option
v-for=
"dict in toolTypeOptions"
v-for=
"dict in toolTypeOptions"
:key=
"dict.toolTypeId"
:key=
"dict.toolTypeId"
...
@@ -52,7 +64,11 @@
...
@@ -52,7 +64,11 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
>
<el-option
<el-option
v-for=
"dict in dict.type.mes_tool_status"
v-for=
"dict in dict.type.mes_tool_status"
:key=
"dict.value"
:key=
"dict.value"
...
@@ -62,8 +78,16 @@
...
@@ -62,8 +78,16 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -76,7 +100,8 @@
...
@@ -76,7 +100,8 @@
size=
"mini"
size=
"mini"
@
click=
"handleAdd"
@
click=
"handleAdd"
v-hasPermi=
"['mes:tm:tool:add']"
v-hasPermi=
"['mes:tm:tool:add']"
>
新增
</el-button>
>
新增
</el-button
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -87,7 +112,8 @@
...
@@ -87,7 +112,8 @@
:disabled=
"single"
:disabled=
"single"
@
click=
"handleUpdate"
@
click=
"handleUpdate"
v-hasPermi=
"['mes:tm:tool:edit']"
v-hasPermi=
"['mes:tm:tool:edit']"
>
修改
</el-button>
>
修改
</el-button
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -98,7 +124,8 @@
...
@@ -98,7 +124,8 @@
:disabled=
"multiple"
:disabled=
"multiple"
@
click=
"handleDelete"
@
click=
"handleDelete"
v-hasPermi=
"['mes:tm:tool:remove']"
v-hasPermi=
"['mes:tm:tool:remove']"
>
删除
</el-button>
>
删除
</el-button
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -108,7 +135,8 @@
...
@@ -108,7 +135,8 @@
size=
"mini"
size=
"mini"
@
click=
"handleExport"
@
click=
"handleExport"
v-hasPermi=
"['mes:tm:tool:export']"
v-hasPermi=
"['mes:tm:tool:export']"
>
导出
</el-button>
>
导出
</el-button
>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -121,58 +149,173 @@
...
@@ -121,58 +149,173 @@
>
打印二维码
</el-button
>
打印二维码
</el-button
>
>
</el-col>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"toolList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"toolList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"物料编码"
min-width=
"180"
align=
"center"
sortable
prop=
"sapItemCode"
/>
<el-table-column
min-width=
"180"
align=
"center"
prop=
"sapItemCode"
>
<el-table-column
label=
"名称"
min-width=
"180"
align=
"center"
prop=
"toolName"
>
<template
slot=
"header"
slot-scope=
"scope"
>
<div
class=
"t-cell"
>
物料编码
<span
class=
"t-caret-warpper"
>
<i
class=
"t-sort-caret ascend"
:class=
"[ascOrderKeyList.includes('sapItemCode') ? 'ascending' : '' ]"
@
click=
"handleSortChange('sapItemCode', 'asc')"
></i>
<i
class=
"t-sort-caret descend"
:class=
"[descOrderKeyList.includes('sapItemCode') ? 'descending' : '' ]"
@
click=
"handleSortChange('sapItemCode', 'desc')"
></i>
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"名称"
min-width=
"180"
align=
"center"
prop=
"toolName"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"text"
type=
"text"
@
click=
"handleView(scope.row)"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:tm:tool:query']"
v-hasPermi=
"['mes:tm:tool:query']"
style=
"white-space: wrap;line-height: 22px;"
style=
"white-space: wrap; line-height: 22px"
>
{{
scope
.
row
.
toolName
}}
</el-button>
>
{{
scope
.
row
.
toolName
}}
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"刀模SN"
width=
"100"
align=
"center"
sortable
prop=
"toolCode"
>
<el-table-column
width=
"120"
align=
"center"
prop=
"toolCode"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
<div
class=
"t-cell"
>
刀模SN
<span
class=
"t-caret-warpper"
>
<i
class=
"t-sort-caret ascend"
:class=
"[ascOrderKeyList.includes('toolCode') ? 'ascending' : '' ]"
@
click=
"handleSortChange('toolCode', 'asc')"
></i>
<i
class=
"t-sort-caret descend"
:class=
"[descOrderKeyList.includes('toolCode') ? 'descending' : '' ]"
@
click=
"handleSortChange('toolCode', 'desc')"
></i>
</span>
</div>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"品牌"
width=
"80"
align=
"center"
prop=
"brand"
:show-overflow-tooltip=
"true"
/>
<el-table-column
<el-table-column
label=
"型号"
width=
"80"
align=
"center"
prop=
"spec"
:show-overflow-tooltip=
"true"
/>
label=
"品牌"
width=
"80"
align=
"center"
prop=
"brand"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"型号"
width=
"80"
align=
"center"
prop=
"spec"
:show-overflow-tooltip=
"true"
/>
<!-- <el-table-column label="类型" width="80" align="center" prop="toolTypeName" /> -->
<!-- <el-table-column label="类型" width="80" align="center" prop="toolTypeName" /> -->
<el-table-column
label=
"可用数量"
width=
"100"
align=
"center"
prop=
"quantityAvail"
/>
<el-table-column
<el-table-column
label=
"保养维护类型"
width=
"120"
align=
"center"
prop=
"maintenType"
>
label=
"可用数量"
width=
"100"
align=
"center"
prop=
"quantityAvail"
/>
<el-table-column
label=
"保养维护类型"
width=
"120"
align=
"center"
prop=
"maintenType"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_mainten_type"
:value=
"scope.row.maintenType"
/>
<dict-tag
:options=
"dict.type.mes_mainten_type"
:value=
"scope.row.maintenType"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"剩余寿命"
width=
"100px"
align=
"center"
prop=
"lifeTime"
/>
<el-table-column
<el-table-column
label=
"下次保养日期"
align=
"center"
prop=
"nextMaintenDate"
width=
"180"
>
label=
"剩余寿命"
width=
"100px"
align=
"center"
prop=
"lifeTime"
/>
<el-table-column
label=
"下次保养日期"
align=
"center"
prop=
"nextMaintenDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
nextMaintenDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
nextMaintenDate
,
"{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"位置"
width
=
"120"
align
=
"center"
prop
=
"location"
>
<
template
slot
=
"header"
slot
-
scope
=
"scope"
>
<
div
class
=
"t-cell"
>
位置
<
span
class
=
"t-caret-warpper"
>
<
i
class
=
"t-sort-caret ascend"
:
class
=
"[ascOrderKeyList.includes('location') ? 'ascending' : '' ]"
@
click
=
"handleSortChange('location', 'asc')"
><
/i
>
<
i
class
=
"t-sort-caret descend"
:
class
=
"[descOrderKeyList.includes('location') ? 'descending' : '' ]"
@
click
=
"handleSortChange('location', 'desc')"
><
/i
>
<
/span
>
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"位置"
width
=
"120"
align
=
"center"
sortable
prop
=
"location"
/>
<
el
-
table
-
column
label
=
"状态"
width
=
"120"
align
=
"center"
prop
=
"status"
>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
sortable
prop
=
"status"
>
<
template
slot
=
"header"
slot
-
scope
=
"scope"
>
<
div
class
=
"t-cell"
>
状态
<
span
class
=
"t-caret-warpper"
>
<
i
class
=
"t-sort-caret ascend"
:
class
=
"[ascOrderKeyList.includes('status') ? 'ascending' : '' ]"
@
click
=
"handleSortChange('status', 'asc')"
><
/i
>
<
i
class
=
"t-sort-caret descend"
:
class
=
"[descOrderKeyList.includes('status') ? 'descending' : '' ]"
@
click
=
"handleSortChange('status', 'desc')"
><
/i
>
<
/span
>
<
/div
>
<
/template
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.mes_tool_status"
:
value
=
"scope.row.status"
/>
<
dict
-
tag
:
options
=
"dict.type.mes_tool_status"
:
value
=
"scope.row.status"
/>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"创建人"
align
=
"center"
prop
=
"createBy"
width
=
"100"
/>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"创建时间"
align
=
"center"
prop
=
"createTime"
width
=
"150"
>
label
=
"创建人"
align
=
"center"
prop
=
"createBy"
width
=
"100"
/>
<
el
-
table
-
column
label
=
"创建时间"
align
=
"center"
prop
=
"createTime"
width
=
"150"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template> --
>
<
/template> --
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"更新人"
align
=
"center"
prop
=
"updateBy"
width
=
"100"
/>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"更新时间"
align
=
"center"
prop
=
"updateTime"
width
=
"150"
>
label
=
"更新人"
align
=
"center"
prop
=
"updateBy"
width
=
"100"
/>
<
el
-
table
-
column
label
=
"更新时间"
align
=
"center"
prop
=
"updateTime"
width
=
"150"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<!--
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
updateTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
>
{{
parseTime
(
scope
.
row
.
updateTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template> --
>
<
/template> --
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
width
=
"120"
fixed
=
"right"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
el
-
table
-
column
label
=
"操作"
width
=
"120"
fixed
=
"right"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<!--
<
el
-
button
<!--
<
el
-
button
size
=
"mini"
size
=
"mini"
...
@@ -187,20 +330,22 @@
...
@@ -187,20 +330,22 @@
icon
=
"el-icon-query"
icon
=
"el-icon-query"
@
click
=
"handleView(scope.row)"
@
click
=
"handleView(scope.row)"
v
-
hasPermi
=
"['mes:tm:tool:query']"
v
-
hasPermi
=
"['mes:tm:tool:query']"
>
查看
<
/el-button
>
>
查看
<
/el-butto
n
>
<
el
-
button
<
el
-
button
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
icon
=
"el-icon-delete"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['mes:tm:tool:remove']"
v
-
hasPermi
=
"['mes:tm:tool:remove']"
>
删除
<
/el-button
>
>
删除
<
/el-butto
n
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
<
pagination
<
pagination
v
-
show
=
"total
>
0"
v
-
show
=
"total
>
0"
:
total
=
"total"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
:
limit
.
sync
=
"queryParams.pageSize"
...
@@ -209,15 +354,22 @@
...
@@ -209,15 +354,22 @@
<!--
添加或修改刀模版具清单对话框
-->
<!--
添加或修改刀模版具清单对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"960px"
append
-
to
-
body
>
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"960px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
model
=
"form"
:
rules
=
"rules"
:
rules
=
"rules"
:
disabled
=
"form.toolId&&optType!='edit'"
:
disabled
=
"form.toolId && optType != 'edit'"
label
-
width
=
"120px"
>
label
-
width
=
"120px"
>
<
el
-
row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"刀模版具类型"
prop
=
"toolTypeId"
>
<
el
-
form
-
item
label
=
"刀模版具类型"
prop
=
"toolTypeId"
>
<
el
-
select
style
=
"width:100%;"
v
-
model
=
"form.toolTypeId"
@
change
=
"onToolTypeChanged"
placeholder
=
"请选择类型"
>
<
el
-
select
style
=
"width: 100%"
v
-
model
=
"form.toolTypeId"
@
change
=
"onToolTypeChanged"
placeholder
=
"请选择类型"
>
<
el
-
option
<
el
-
option
v
-
for
=
"dict in toolTypeOptions"
v
-
for
=
"dict in toolTypeOptions"
:
key
=
"dict.toolTypeId"
:
key
=
"dict.toolTypeId"
...
@@ -242,7 +394,6 @@
...
@@ -242,7 +394,6 @@
><
/BrandSelect
>
><
/BrandSelect
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
el
-
row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
...
@@ -294,7 +445,13 @@
...
@@ -294,7 +445,13 @@
<
el
-
form
-
item
label
=
"数量"
prop
=
"quantity"
>
<
el
-
form
-
item
label
=
"数量"
prop
=
"quantity"
>
<!--
<
el
-
input
v
-
if
=
"form.codeFlag=='Y'"
readonly
v
-
model
=
"form.quantity"
/>
-->
<!--
<
el
-
input
v
-
if
=
"form.codeFlag=='Y'"
readonly
v
-
model
=
"form.quantity"
/>
-->
<!--
<
el
-
input
-
number
:
min
=
"0"
@
blur
=
"onQuantityChanged"
v
-
else
v
-
model
=
"form.quantity"
/>
-->
<!--
<
el
-
input
-
number
:
min
=
"0"
@
blur
=
"onQuantityChanged"
v
-
else
v
-
model
=
"form.quantity"
/>
-->
<
el
-
input
-
number
style
=
"width:100%;"
:
min
=
"0"
@
blur
=
"onQuantityChanged"
disabled
v
-
model
=
"form.quantity"
/>
<
el
-
input
-
number
style
=
"width: 100%"
:
min
=
"0"
@
blur
=
"onQuantityChanged"
disabled
v
-
model
=
"form.quantity"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
...
@@ -306,7 +463,11 @@
...
@@ -306,7 +463,11 @@
<
/el-col
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"保养维护类型"
prop
=
"maintenType"
>
<
el
-
form
-
item
label
=
"保养维护类型"
prop
=
"maintenType"
>
<
el
-
select
style
=
"width:100%;"
v
-
model
=
"form.maintenType"
placeholder
=
"请选择保养维护类型"
>
<
el
-
select
style
=
"width: 100%"
v
-
model
=
"form.maintenType"
placeholder
=
"请选择保养维护类型"
>
<
el
-
option
<
el
-
option
v
-
for
=
"dict in dict.type.mes_mainten_type"
v
-
for
=
"dict in dict.type.mes_mainten_type"
:
key
=
"dict.value"
:
key
=
"dict.value"
...
@@ -319,21 +480,35 @@
...
@@ -319,21 +480,35 @@
<
/el-row
>
<
/el-row
>
<
el
-
row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
v
-
if
=
"form.maintenType == 'REGULAR'"
label
=
"下一次保养日期"
prop
=
"nextMaintenDate"
>
<
el
-
form
-
item
<
el
-
date
-
picker
clearable
v
-
if
=
"form.maintenType == 'REGULAR'"
label
=
"下一次保养日期"
prop
=
"nextMaintenDate"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.nextMaintenDate"
v
-
model
=
"form.nextMaintenDate"
type
=
"date"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择下一次保养日期"
>
placeholder
=
"请选择下一次保养日期"
>
<
/el-date-picker
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
v
-
else
label
=
"最低寿命"
prop
=
"nextMaintenPeriod"
>
<
el
-
form
-
item
v
-
else
label
=
"最低寿命"
prop
=
"nextMaintenPeriod"
>
<
el
-
input
-
number
style
=
"width:100%;"
:
min
=
"0"
v
-
model
=
"form.nextMaintenPeriod"
/>
<
el
-
input
-
number
<
/el-form-item
>
style
=
"width: 100%"
:
min
=
"0"
v
-
model
=
"form.nextMaintenPeriod"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"剩余寿命"
prop
=
"lifeTime"
>
<
el
-
form
-
item
label
=
"剩余寿命"
prop
=
"lifeTime"
>
<
el
-
input
-
number
style
=
"width:100%;"
:
min
=
"0"
v
-
model
=
"form.lifeTime"
/>
<
el
-
input
-
number
style
=
"width: 100%"
:
min
=
"0"
v
-
model
=
"form.lifeTime"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
...
@@ -345,7 +520,8 @@
...
@@ -345,7 +520,8 @@
v
-
for
=
"dict in dict.type.mes_tool_status"
v
-
for
=
"dict in dict.type.mes_tool_status"
:
key
=
"dict.value"
:
key
=
"dict.value"
:
label
=
"dict.value"
:
label
=
"dict.value"
>
{{
dict
.
label
}}
<
/el-radio
>
>
{{
dict
.
label
}}
<
/el-radi
o
>
<
/el-radio-group
>
<
/el-radio-group
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
...
@@ -353,13 +529,19 @@
...
@@ -353,13 +529,19 @@
<
el
-
row
>
<
el
-
row
>
<
el
-
col
:
span
=
"24"
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remark"
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remark"
>
<
el
-
input
v
-
model
=
"form.remark"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
el
-
input
v
-
model
=
"form.remark"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
/el-form
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"cancel"
v
-
if
=
"optType =='view'"
>
返回
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"cancel"
v
-
if
=
"optType == 'view'"
>
返回
<
/el-butto
n
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
v
-
else
>
确
定
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
v
-
else
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/div
>
...
@@ -368,19 +550,25 @@
...
@@ -368,19 +550,25 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listTool
,
getTool
,
delTool
,
addTool
,
updateTool
}
from
"@/api/mes/tm/tool"
;
import
{
import
{
listAllTooltype
}
from
"@/api/mes/tm/tooltype"
listTool
,
import
{
postPrintPdf
}
from
"@/utils/ruoyi"
getTool
,
import
{
genCode
}
from
"@/api/system/autocode/rule"
delTool
,
addTool
,
updateTool
,
}
from
"@/api/mes/tm/tool"
;
import
{
listAllTooltype
}
from
"@/api/mes/tm/tooltype"
;
import
{
postPrintPdf
}
from
"@/utils/ruoyi"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
BrandSelect
from
"@/components/itemSelect/single.vue"
;
import
BrandSelect
from
"@/components/itemSelect/single.vue"
;
export
default
{
export
default
{
components
:
{
BrandSelect
}
,
components
:
{
BrandSelect
}
,
name
:
"Tool"
,
name
:
"Tool"
,
dicts
:
[
'mes_tool_status'
,
'mes_mainten_type'
],
dicts
:
[
"mes_tool_status"
,
"mes_mainten_type"
],
data
()
{
data
()
{
return
{
return
{
//自动生成编码
//自动生成编码
autoGenFlag
:
false
,
autoGenFlag
:
false
,
optType
:
undefined
,
optType
:
undefined
,
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
...
@@ -432,19 +620,23 @@ export default {
...
@@ -432,19 +620,23 @@ export default {
// 表单校验
// 表单校验
rules
:
{
rules
:
{
toolName
:
[
toolName
:
[
{
required
:
true
,
message
:
"刀模版具名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"刀模版具名称不能为空"
,
trigger
:
"blur"
}
,
],
],
toolTypeId
:
[
toolTypeId
:
[
{
required
:
true
,
message
:
"刀模版具类型不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"刀模版具类型不能为空"
,
trigger
:
"blur"
}
,
],
],
quantity
:
[
quantity
:
[
{
required
:
true
,
message
:
"数量不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"数量不能为空"
,
trigger
:
"blur"
}
,
],
nextMaintenPeriod
:
[
{
required
:
true
,
message
:
"最低寿命不能为空"
,
trigger
:
"blur"
}
],
lifeTime
:
[
{
required
:
true
,
message
:
"剩余寿命不能为空"
,
trigger
:
"blur"
}
],
],
}
nextMaintenPeriod
:
[
{
required
:
true
,
message
:
"最低寿命不能为空"
,
trigger
:
"blur"
}
,
],
lifeTime
:
[
{
required
:
true
,
message
:
"剩余寿命不能为空"
,
trigger
:
"blur"
}
,
],
}
,
ascOrderKeyList
:
[],
descOrderKeyList
:
[],
}
;
}
;
}
,
}
,
created
()
{
created
()
{
...
@@ -455,14 +647,19 @@ export default {
...
@@ -455,14 +647,19 @@ export default {
/** 查询刀模版具清单列表 */
/** 查询刀模版具清单列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listTool
(
this
.
queryParams
).
then
(
response
=>
{
const
params
=
{
...
this
.
queryParams
,
ascOrderKeyList
:
this
.
ascOrderKeyList
,
descOrderKeyList
:
this
.
descOrderKeyList
,
}
listTool
(
params
).
then
((
response
)
=>
{
this
.
toolList
=
response
.
rows
;
this
.
toolList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
}
);
}
,
}
,
getTypeList
(){
getTypeList
()
{
listAllTooltype
().
then
(
response
=>
{
listAllTooltype
().
then
(
(
response
)
=>
{
this
.
toolTypeOptions
=
response
.
data
;
this
.
toolTypeOptions
=
response
.
data
;
}
);
}
);
}
,
}
,
...
@@ -487,38 +684,38 @@ export default {
...
@@ -487,38 +684,38 @@ export default {
toolTypeId
:
null
,
toolTypeId
:
null
,
toolTypeCode
:
null
,
toolTypeCode
:
null
,
toolTypeName
:
null
,
toolTypeName
:
null
,
quantity
:
'1'
,
quantity
:
"1"
,
quantityAvail
:
'1'
,
quantityAvail
:
"1"
,
maintenType
:
'USAGE'
,
maintenType
:
"USAGE"
,
nextMaintenPeriod
:
null
,
nextMaintenPeriod
:
null
,
nextMaintenDate
:
null
,
nextMaintenDate
:
null
,
status
:
"STORE"
,
status
:
"STORE"
,
createBy
:
null
,
createBy
:
null
,
createTime
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
updateTime
:
null
,
}
;
}
;
this
.
autoGenFlag
=
false
;
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
}
,
}
,
onToolTypeChanged
(){
onToolTypeChanged
()
{
var
types
=
this
.
toolTypeOptions
.
filter
((
item
)
=>
{
var
types
=
this
.
toolTypeOptions
.
filter
((
item
)
=>
{
if
(
item
.
toolTypeId
==
this
.
form
.
toolTypeId
)
{
if
(
item
.
toolTypeId
==
this
.
form
.
toolTypeId
)
{
return
item
;
return
item
;
}
}
}
);
}
);
if
(
types
!==
null
&&
types
.
length
>
0
)
{
if
(
types
!==
null
&&
types
.
length
>
0
)
{
if
(
types
[
0
].
codeFlag
==
'Y'
)
{
if
(
types
[
0
].
codeFlag
==
"Y"
)
{
//如果是单独编码,则数量固定为1
//如果是单独编码,则数量固定为1
this
.
form
.
quantity
=
1
;
this
.
form
.
quantity
=
1
;
this
.
form
.
quantityAvail
=
1
;
this
.
form
.
quantityAvail
=
1
;
this
.
form
.
codeFlag
=
'Y'
;
this
.
form
.
codeFlag
=
"Y"
;
return
;
return
;
}
}
}
}
this
.
form
.
codeFlag
=
'N'
;
this
.
form
.
codeFlag
=
"N"
;
}
,
}
,
onQuantityChanged
(){
onQuantityChanged
()
{
this
.
form
.
quantityAvail
=
this
.
form
.
quantity
;
this
.
form
.
quantityAvail
=
this
.
form
.
quantity
;
}
,
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
...
@@ -533,11 +730,29 @@ export default {
...
@@ -533,11 +730,29 @@ export default {
}
,
}
,
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
toolId
);
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
toolId
);
this
.
codes
=
selection
.
map
(
item
=>
item
.
toolCode
);
this
.
codes
=
selection
.
map
(
(
item
)
=>
item
.
toolCode
);
this
.
selectRow
=
selection
;
this
.
selectRow
=
selection
;
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
;
}
,
handleSortChange
(
code
,
type
)
{
console
.
log
(
code
,
type
);
const
ascIndex
=
this
.
ascOrderKeyList
.
indexOf
(
code
);
const
descIndex
=
this
.
descOrderKeyList
.
indexOf
(
code
);
if
(
ascIndex
!=
-
1
)
{
this
.
ascOrderKeyList
.
splice
(
ascIndex
,
1
);
}
if
(
type
==
"asc"
&&
ascIndex
==
-
1
)
{
this
.
ascOrderKeyList
.
push
(
code
);
}
if
(
descIndex
!=
-
1
)
{
this
.
descOrderKeyList
.
splice
(
descIndex
,
1
);
}
if
(
type
==
"desc"
&&
descIndex
==
-
1
)
{
this
.
descOrderKeyList
.
push
(
code
);
}
this
.
getList
();
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
...
@@ -548,10 +763,10 @@ export default {
...
@@ -548,10 +763,10 @@ export default {
this
.
optType
=
"add"
;
this
.
optType
=
"add"
;
}
,
}
,
// 查询明细按钮操作
// 查询明细按钮操作
handleView
(
row
){
handleView
(
row
)
{
this
.
reset
();
this
.
reset
();
const
toolId
=
row
.
toolId
||
this
.
ids
;
const
toolId
=
row
.
toolId
||
this
.
ids
;
getTool
(
toolId
).
then
(
response
=>
{
getTool
(
toolId
).
then
(
(
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"查看刀模版具信息"
;
this
.
title
=
"查看刀模版具信息"
;
...
@@ -561,8 +776,8 @@ export default {
...
@@ -561,8 +776,8 @@ export default {
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
const
toolId
=
row
.
toolId
||
this
.
ids
const
toolId
=
row
.
toolId
||
this
.
ids
;
getTool
(
toolId
).
then
(
response
=>
{
getTool
(
toolId
).
then
(
(
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"修改刀模版具清单"
;
this
.
title
=
"修改刀模版具清单"
;
...
@@ -571,30 +786,30 @@ export default {
...
@@ -571,30 +786,30 @@ export default {
}
,
}
,
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
if
(
this
.
form
.
maintenType
===
'USAGE'
)
{
if
(
this
.
form
.
maintenType
===
"USAGE"
)
{
if
(
this
.
form
.
nextMaintenPeriod
==
0
)
{
if
(
this
.
form
.
nextMaintenPeriod
==
0
)
{
this
.
open
=
true
;
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'请输入最低寿命数值'
);
this
.
$modal
.
confirm
(
"请输入最低寿命数值"
);
return
;
return
;
}
}
}
}
if
(
this
.
form
.
lifeTime
==
0
)
{
if
(
this
.
form
.
lifeTime
==
0
)
{
this
.
open
=
true
;
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'请输入剩余寿命数值'
);
this
.
$modal
.
confirm
(
"请输入剩余寿命数值"
);
return
;
return
;
}
}
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
toolId
!=
null
)
{
if
(
this
.
form
.
toolId
!=
null
)
{
updateTool
(
this
.
form
).
then
(
response
=>
{
updateTool
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
open
=
false
;
this
.
getList
();
this
.
getList
();
}
);
}
);
}
else
{
}
else
{
addTool
(
this
.
form
).
then
(
response
=>
{
addTool
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
open
=
false
;
this
.
getList
();
this
.
getList
();
...
@@ -607,44 +822,48 @@ export default {
...
@@ -607,44 +822,48 @@ export default {
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
toolIds
=
row
.
toolId
||
this
.
ids
;
const
toolIds
=
row
.
toolId
||
this
.
ids
;
const
toolCodes
=
row
.
toolCode
||
this
.
codes
;
const
toolCodes
=
row
.
toolCode
||
this
.
codes
;
this
.
$modal
.
confirm
(
'是否确认删除刀模版具清单SN为"'
+
toolCodes
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除刀模版具清单SN为"'
+
toolCodes
+
'"的数据项?'
)
.
then
(
function
()
{
return
delTool
(
toolIds
);
return
delTool
(
toolIds
);
}
).
then
(()
=>
{
}
)
.
then
(()
=>
{
this
.
getList
();
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
)
.
catch
(()
=>
{
}
);
}
,
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
this
.
download
(
'mes/tm/tool/export'
,
{
this
.
download
(
...
this
.
queryParams
"mes/tm/tool/export"
,
}
,
`tool_${new Date().getTime()
}
.xlsx`
)
{
...
this
.
queryParams
,
}
,
`tool_${new Date().getTime()
}
.xlsx`
);
}
,
}
,
printQrCode
()
{
printQrCode
()
{
const
qrArr
=
[];
const
qrArr
=
[];
const
qrGp
=
[];
const
qrGp
=
[];
let
detail
=
[]
let
detail
=
[]
;
this
.
selectRow
.
forEach
((
s
,
i
)
=>
{
this
.
selectRow
.
forEach
((
s
,
i
)
=>
{
detail
.
push
({
detail
.
push
({
// "barcode": s.sapItemCode +'-'+ s.toolCode,
// "barcode": s.sapItemCode +'-'+ s.toolCode,
"barcode"
:
s
.
toolCode
,
barcode
:
s
.
toolCode
,
"showText"
:
s
.
itemName
+
'-'
+
s
.
toolCode
,
showText
:
s
.
itemName
+
"-"
+
s
.
toolCode
,
"gp"
:
i
+
1
gp
:
i
+
1
,
}
)
}
);
detail
.
push
({
detail
.
push
({
// "barcode": s.sapItemCode +'-'+ s.toolCode,
// "barcode": s.sapItemCode +'-'+ s.toolCode,
"barcode"
:
s
.
toolCode
,
barcode
:
s
.
toolCode
,
"showText"
:
s
.
itemName
+
'-'
+
s
.
toolCode
,
showText
:
s
.
itemName
+
"-"
+
s
.
toolCode
,
"gp"
:
i
+
1
gp
:
i
+
1
,
}
)
}
);
}
);
postPrintPdf
(
"qrcode-50*50-2"
,
{
detail
,
}
);
}
);
postPrintPdf
(
"qrcode-50*50-2"
,
{
detail
}
);
}
,
}
,
// //自动生成编码
// //自动生成编码
// handleAutoGenChange(autoGenFlag)
{
// handleAutoGenChange(autoGenFlag)
{
...
@@ -658,18 +877,17 @@ export default {
...
@@ -658,18 +877,17 @@ export default {
//
}
//
}
//
}
,
//
}
,
//自动生成编码
//自动生成编码
// gCode()
{
// gCode()
{
// genCode("TOOL_CODE").then((response) =>
{
// genCode("TOOL_CODE").then((response) =>
{
// this.form.toolCode = response;
// this.form.toolCode = response;
//
}
);
//
}
);
//
}
,
//
}
,
handleBrandSelect
(){
handleBrandSelect
()
{
this
.
$refs
.
brSelect
.
showFlag
=
true
;
this
.
$refs
.
brSelect
.
showFlag
=
true
;
}
,
}
,
onBrandSelected
(
row
){
onBrandSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemId
=
row
.
itemId
;
this
.
form
.
itemCode
=
row
.
itemCode
;
this
.
form
.
itemCode
=
row
.
itemCode
;
this
.
form
.
toolName
=
row
.
itemName
;
this
.
form
.
toolName
=
row
.
itemName
;
...
@@ -678,9 +896,50 @@ export default {
...
@@ -678,9 +896,50 @@ export default {
this
.
form
.
unitOfMeasure
=
row
.
unitOfMeasure
;
this
.
form
.
unitOfMeasure
=
row
.
unitOfMeasure
;
}
}
}
,
}
,
}
,
}
}
;
}
;
<
/script
>
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
t
-
cell
{
display
:
inline
-
block
;
box
-
sizing
:
border
-
box
;
position
:
relative
;
vertical
-
align
:
middle
;
padding
-
left
:
10
px
;
padding
-
right
:
10
px
;
width
:
100
%
;
.
t
-
caret
-
warpper
{
display
:
inline
-
flex
;
flex
-
direction
:
column
;
align
-
items
:
center
;
height
:
34
px
;
width
:
24
px
;
vertical
-
align
:
middle
;
cursor
:
pointer
;
overflow
:
initial
;
position
:
relative
;
.
t
-
sort
-
caret
{
width
:
0
;
height
:
0
;
border
:
5
px
solid
transparent
;
position
:
absolute
;
left
:
7
px
;
}
.
ascend
{
border
-
bottom
-
color
:
#
c0c4cc
;
top
:
5
px
;
}
.
ascending
{
border
-
bottom
-
color
:
#
409
eff
;
}
.
descend
{
border
-
top
-
color
:
#
c0c4cc
;
bottom
:
7
px
;
}
.
descending
{
border
-
top
-
color
:
#
409
eff
;
}
}
}
<
/style
>
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