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
08dbd69e
Commit
08dbd69e
authored
Jun 07, 2024
by
zhuli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# ipqc模板配置更新
parent
8a66b8a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
87 deletions
+105
-87
index.vue
src/views/mes/qc/qctemplate/index.vue
+8
-8
templateindex.vue
src/views/mes/qc/qctemplate/templateindex.vue
+97
-79
No files found.
src/views/mes/qc/qctemplate/index.vue
View file @
08dbd69e
...
...
@@ -195,9 +195,9 @@
</el-col>
</el-row>
</el-form>
<el-tabs
type=
"border-card"
v-if=
"form.
templateI
d != null"
>
<el-tabs
type=
"border-card"
v-if=
"form.
i
d != null"
>
<el-tab-pane
label=
"检测项"
>
<TemplateIndex
ref=
"indexTab"
:templateId=
"form.
templateI
d"
:optType=
"optType"
></TemplateIndex>
<TemplateIndex
ref=
"indexTab"
:templateId=
"form.
i
d"
:optType=
"optType"
></TemplateIndex>
</el-tab-pane>
<!-- <el-tab-pane label="物料产品">
<TemplateProduct ref="productTab" :templateId="form.templateId" :optType="optType"></TemplateProduct>
...
...
@@ -294,7 +294,7 @@ export default {
// 表单重置
reset
()
{
this
.
form
=
{
templateI
d
:
null
,
i
d
:
null
,
templateCode
:
null
,
templateName
:
null
,
qcTypesParam
:
[],
...
...
@@ -320,7 +320,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
templateI
d
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
i
d
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
...
...
@@ -334,7 +334,7 @@ export default {
// 查询明细按钮操作
handleView
(
row
){
this
.
reset
();
const
templateId
=
row
.
templateI
d
||
this
.
ids
;
const
templateId
=
row
.
i
d
||
this
.
ids
;
getQctemplate
(
templateId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
...
...
@@ -345,7 +345,7 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
templateId
=
row
.
templateI
d
||
this
.
ids
const
templateId
=
row
.
i
d
||
this
.
ids
getQctemplate
(
templateId
).
then
(
response
=>
{
debugger
;
this
.
form
=
response
.
data
;
...
...
@@ -358,7 +358,7 @@ export default {
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
templateI
d
!=
null
)
{
if
(
this
.
form
.
i
d
!=
null
)
{
updateQctemplate
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
...
...
@@ -376,7 +376,7 @@ export default {
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
templateIds
=
row
.
templateI
d
||
this
.
ids
;
const
templateIds
=
row
.
i
d
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除检测模板编号为"'
+
templateIds
+
'"的数据项?'
).
then
(
function
()
{
return
delQctemplate
(
templateIds
);
}).
then
(()
=>
{
...
...
src/views/mes/qc/qctemplate/templateindex.vue
View file @
08dbd69e
...
...
@@ -9,7 +9,8 @@
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:qc:qctemplate:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -20,7 +21,8 @@
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['mes:qc:qctemplate:edit']"
>
修改
</el-button>
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -31,15 +33,16 @@
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['mes:qc:qctemplate:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"templateindexList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检测项名称"
align=
"center"
prop=
"indexName"
/>
<el-table-column
label=
"检测项类型"
align=
"center"
prop=
"indexType"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检测项名称"
align=
"center"
prop=
"indexName"
/>
<el-table-column
label=
"检测项类型"
align=
"center"
prop=
"indexType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_index_type"
:value=
"scope.row.indexType"
/>
</
template
>
...
...
@@ -50,13 +53,14 @@
<span
v-if=
"scope.row.inputType==2"
>
选择框
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"检测工具"
align=
"center"
prop=
"qcTool"
/>
<el-table-column
label=
"检测工具"
align=
"center"
prop=
"qcTool"
/>
<el-table-column
label=
"检测方法"
align=
"center"
prop=
"checkMethod"
:show-overflow-tooltip=
"true"
/>
<!-- <el-table-column label="标准值" align="center" prop="standerVal" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="误差上限" align="center" prop="thresholdMax" />
<el-table-column label="误差下限" align="center" prop="thresholdMin" /> -->
<el-table-column
label=
"操作"
v-if=
"optType != 'view'"
align=
"center"
width=
"150px"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
v-if=
"optType != 'view'"
align=
"center"
width=
"150px"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
...
...
@@ -64,14 +68,16 @@
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['mes:qc:qctemplate:edit']"
>
修改
</el-button>
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['mes:qc:qctemplate:remove']"
>
删除
</el-button>
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -88,53 +94,55 @@
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"960px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"检测项"
prop=
"indexId"
>
<el-input
v-model=
"form.indexName"
placeholder=
"请选择检测项"
>
<el-button
slot=
"append"
@
click=
"handleSelectIndex"
icon=
"el-icon-search"
></el-button>
</el-input>
<IndexSelect
ref=
"indexSelect"
@
onSelected=
"onIndexSelected"
></IndexSelect>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检测工具"
prop=
"qcTool"
>
<el-input
v-model=
"form.qcTool"
placeholder=
"请输入检测工具"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检测项"
prop=
"indexId"
>
<el-input
v-model=
"form.indexName"
placeholder=
"请选择检测项"
>
<el-button
slot=
"append"
@
click=
"handleSelectIndex"
icon=
"el-icon-search"
></el-button>
</el-input>
<IndexSelect
ref=
"indexSelect"
@
onSelected=
"onIndexSelected"
></IndexSelect>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"检测工具"
prop=
"qcTool"
>
<el-input
v-model=
"form.qcTool"
placeholder=
"请输入检测工具"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"检测要求"
prop=
"checkMethod"
>
<el-input
v-model=
"form.checkMethod"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if=
"form.inputType == 2"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"检测要求"
prop=
"checkMethod"
>
<el-input
v-model=
"form.checkMethod"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if=
"form.inputType == 2"
align=
"center"
>
<el-col
:span=
"20"
>
<!-- <el-form-item label="选择框值" prop="selectValues">
<el-input v-model="form.selectValues" type="textarea" placeholder="请输入下拉选择框内容,格式为:[{"label":"显式值","value":"存储值"}]" />
</el-form-item> -->
<el-table
:data=
"form.selectValues"
style=
"margin-bottom:20px;
"
>
<el-table-column
label=
"参数值"
align=
"center"
>
<el-table
:data=
"form.selectValues"
align=
"right"
style=
"width: 100%
"
>
<el-table-column
label=
"参数值"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.name"
placeholder=
""
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
>
<el-table-column
label=
"操作"
align=
"left"
min-
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"form.selectValues.splice(scope.$index, 1)"
>
删除
</el-button>
<el-button
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-plus"
v-if=
"scope.$index === form.selectValues.length -1"
@
click=
"form.selectValues.push(
{name: ''})"
>新增
</el-button>
>新增
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -173,18 +181,18 @@
</el-col>
</el-row> -->
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"说明图"
prop=
"docUrl"
>
<el-input
v-model=
"form.docUrl"
placeholder=
"请输入说明图"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"说明图"
prop=
"docUrl"
>
<el-input
v-model=
"form.docUrl"
placeholder=
"请输入说明图"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -197,17 +205,24 @@
</template>
<
script
>
import
{
listTemplateindex
,
getTemplateindex
,
delTemplateindex
,
addTemplateindex
,
updateTemplateindex
}
from
"@/api/mes/qc/templateindex"
;
import
{
listTemplateindex
,
getTemplateindex
,
delTemplateindex
,
addTemplateindex
,
updateTemplateindex
}
from
"@/api/mes/qc/templateindex"
;
import
IndexSelect
from
"@/components/qcindexSelect/single.vue"
;
import
{
listAllUnitmeasure
}
from
"@/api/mes/md/unitmeasure"
;
import
{
listAllUnitmeasure
}
from
"@/api/mes/md/unitmeasure"
;
export
default
{
name
:
"Templateindex"
,
dicts
:
[
'mes_index_type'
],
props
:{
optType
:
null
,
templateId
:
null
props
:
{
optType
:
null
,
templateId
:
null
},
components
:{
IndexSelect
},
components
:
{
IndexSelect
},
data
()
{
return
{
// 遮罩层
...
...
@@ -225,12 +240,12 @@ export default {
// 检测模板-检测项表格数据
templateindexList
:
[],
//单位选择
measureOptions
:[],
measureOptions
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
inputTypeOptions
:
[{
"label"
:
"输入框"
,
"value"
:
1
},{
"label"
:
"选择框"
,
"value"
:
2
}],
inputTypeOptions
:
[{
"label"
:
"输入框"
,
"value"
:
1
},
{
"label"
:
"选择框"
,
"value"
:
2
}],
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -254,10 +269,10 @@ export default {
// 表单校验
rules
:
{
templateId
:
[
{
required
:
true
,
message
:
"检测模板ID不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"检测模板ID不能为空"
,
trigger
:
"blur"
}
],
indexId
:
[
{
required
:
true
,
message
:
"检测项不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"检测项不能为空"
,
trigger
:
"blur"
}
],
}
};
...
...
@@ -276,10 +291,10 @@ export default {
this
.
loading
=
false
;
});
},
getUnits
(){
listAllUnitmeasure
().
then
(
response
=>
{
this
.
measureOptions
=
response
.
data
;
});
getUnits
()
{
listAllUnitmeasure
().
then
(
response
=>
{
this
.
measureOptions
=
response
.
data
;
});
},
// 取消按钮
cancel
()
{
...
...
@@ -323,7 +338,7 @@ export default {
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
...
...
@@ -349,7 +364,9 @@ export default {
if
(
valid
)
{
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
selectValues
=
JSON
.
stringify
(
this
.
form
.
selectValues
)
if
(
this
.
form
.
recordId
!=
null
)
{
// this.form.templateId = this.templateId;
console
.
log
(
this
.
form
)
if
(
this
.
form
.
id
!=
null
)
{
updateTemplateindex
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
...
...
@@ -368,32 +385,33 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
recordIds
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除检测模板-检测项编号为"'
+
recordIds
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除检测模板-检测项编号为"'
+
recordIds
+
'"的数据项?'
).
then
(
function
()
{
return
delTemplateindex
(
recordIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
//选择检测项弹出框
handleSelectIndex
(){
this
.
$refs
.
indexSelect
.
showFlag
=
true
;
handleSelectIndex
()
{
this
.
$refs
.
indexSelect
.
showFlag
=
true
;
},
//弹框返回值
onIndexSelected
(
obj
){
if
(
obj
!=
undefined
&&
obj
!=
null
){
this
.
form
.
indexId
=
obj
.
indexId
;
this
.
form
.
indexCode
=
obj
.
indexCode
;
this
.
form
.
indexName
=
obj
.
indexName
;
this
.
form
.
indexType
=
obj
.
indexType
;
this
.
form
.
qcTool
=
obj
.
qcTool
;
this
.
form
.
inputType
=
obj
.
inputType
;
if
(
this
.
form
.
inputType
==
2
)
{
this
.
form
.
selectValues
=
[{
name
:
''
}]
}
else
{
this
.
form
.
selectValues
=
null
}
onIndexSelected
(
obj
)
{
if
(
obj
!=
undefined
&&
obj
!=
null
)
{
this
.
form
.
indexId
=
obj
.
indexId
;
this
.
form
.
indexCode
=
obj
.
indexCode
;
this
.
form
.
indexName
=
obj
.
indexName
;
this
.
form
.
indexType
=
obj
.
indexType
;
this
.
form
.
qcTool
=
obj
.
qcTool
;
this
.
form
.
inputType
=
obj
.
inputType
;
if
(
this
.
form
.
inputType
==
2
)
{
this
.
form
.
selectValues
=
[{
name
:
''
}]
}
else
{
this
.
form
.
selectValues
=
null
}
}
}
}
};
...
...
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