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
67c2ea8f
Commit
67c2ea8f
authored
Feb 18, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工序关联检测模板功能添加
parent
ef506f51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
698 additions
and
0 deletions
+698
-0
templateProcess.js
src/api/mes/qc/templateProcess.js
+44
-0
single.vue
src/components/qctemplateSelect/single.vue
+211
-0
index.vue
src/views/mes/qc/templateProcess/index.vue
+443
-0
No files found.
src/api/mes/qc/templateProcess.js
0 → 100644
View file @
67c2ea8f
import
request
from
'@/utils/request'
// 查询检测模板-工序列表
export
function
listTemplateProcess
(
query
)
{
return
request
({
url
:
'/mes/qc/templateProcess/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询检测模板-工序详细
export
function
getTemplateProcess
(
recordId
)
{
return
request
({
url
:
'/mes/qc/templateProcess/'
+
recordId
,
method
:
'get'
})
}
// 新增检测模板-工序
export
function
addTemplateProcess
(
data
)
{
return
request
({
url
:
'/mes/qc/templateProcess'
,
method
:
'post'
,
data
:
data
})
}
// 修改检测模板-工序
export
function
updateTemplateProcess
(
data
)
{
return
request
({
url
:
'/mes/qc/templateProcess'
,
method
:
'put'
,
data
:
data
})
}
// 删除检测模板-工序
export
function
delTemplateProcess
(
recordId
)
{
return
request
({
url
:
'/mes/qc/templateProcess/'
+
recordId
,
method
:
'delete'
})
}
src/components/qctemplateSelect/single.vue
0 → 100644
View file @
67c2ea8f
<
template
>
<el-dialog
title=
"检测模板选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
false
width=
"60%"
center
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"检测模板编号"
prop=
"templateCode"
>
<el-input
v-model=
"queryParams.templateCode"
placeholder=
"请输入检测模板编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"检测模板名称"
prop=
"templateName"
>
<el-input
v-model=
"queryParams.templateName"
placeholder=
"请输入检测模板名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品编码"
prop=
"itemCode"
>
<el-input
v-model=
"queryParams.itemCode"
placeholder=
"请输入产品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品名称"
prop=
"itemName"
>
<el-input
v-model=
"queryParams.itemName"
placeholder=
"请输入产品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<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>
<el-table
v-loading=
"loading"
:data=
"qctemplateList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"50"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedIndexId"
:label=
"scope.row.templateId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio>
</
template
>
</el-table-column>
<el-table-column
label=
"检测模板编号"
align=
"center"
prop=
"templateCode"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:qc:qctemplate:query']"
>
{{
scope
.
row
.
templateCode
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"检测模板名称"
align=
"center"
prop=
"templateName"
/>
<el-table-column
label=
"检测种类"
align=
"center"
prop=
"qcTypesParam"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_qc_type"
:value=
"scope.row.qcTypesParam"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.enableFlag"
/>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<el-button
@
click=
"showFlag=false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listQctemplate
,
getQctemplate
,
delQctemplate
,
addQctemplate
,
updateQctemplate
}
from
"@/api/mes/qc/qctemplate"
;
export
default
{
name
:
"QcindexSelect"
,
dicts
:
[
'mes_index_type'
,
'mes_qc_type'
],
data
()
{
return
{
showFlag
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
selectedIndexId
:
null
,
selectedRows
:
undefined
,
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 检测项表格数据
qcindexList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
inputTypeOptions
:
[{
"label"
:
"输入框"
,
"value"
:
1
},{
"label"
:
"选择框"
,
"value"
:
2
}],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
indexCode
:
null
,
indexName
:
null
,
indexType
:
null
,
qcTool
:
null
,
},
// 表单参数
form
:
{}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询检测项列表 */
getList
()
{
this
.
loading
=
true
;
listQctemplate
(
this
.
queryParams
).
then
(
response
=>
{
this
.
qctemplateList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 表单重置
reset
()
{
this
.
form
=
{
templateId
:
null
,
templateCode
:
null
,
templateName
:
null
,
qcTypesParam
:
[],
enableFlag
:
'Y'
,
remark
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
indexId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
handleCurrent
(
row
){
if
(
row
){
this
.
selectedRows
=
row
;
}
},
handleRowDbClick
(
row
){
if
(
row
){
this
.
selectedRows
=
row
;
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
// 单选选中数据
handleRowChange
(
row
)
{
debugger
;
if
(
row
){
this
.
selectedRows
=
row
;
}
},
//选中确认
confirmSelect
(){
if
(
this
.
selectedIndexId
==
null
||
this
.
selectedIndexId
==
0
){
this
.
$notify
({
title
:
'提示'
,
type
:
'warning'
,
message
:
'请至少选择一条数据!'
});
return
;
}
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
}
};
</
script
>
src/views/mes/qc/templateProcess/index.vue
0 → 100644
View file @
67c2ea8f
This diff is collapsed.
Click to expand it.
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