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
c450aded
Commit
c450aded
authored
May 23, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加iqc检验
parent
9a2c565a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
727 additions
and
3 deletions
+727
-3
iqc.js
src/api/mes/qc/iqc.js
+34
-0
index.vue
src/views/mes/pro/arrangeRule/index.vue
+4
-1
index.vue
src/views/mes/qc/ipqc/index.vue
+5
-2
index.vue
src/views/mes/qc/iqc/index.vue
+684
-0
No files found.
src/api/mes/qc/iqc.js
View file @
c450aded
...
...
@@ -42,3 +42,37 @@ export function delIqc(iqcId) {
method
:
'delete'
})
}
export
function
getpclist
(
query
)
{
return
request
({
url
:
'/mes/qc/iqc/pclist'
,
method
:
'post'
,
data
:
query
})
}
export
function
getcheckResult
()
{
return
request
({
url
:
'/mes/qc/iqc/getIqcList/checkResult'
,
method
:
'get'
})
}
export
function
getvoucherNoYear
()
{
return
request
({
url
:
'/mes/qc/iqc/getIqcList/voucherNoYear'
,
method
:
'get'
})
}
export
function
getcheckStatus
()
{
return
request
({
url
:
'/mes/qc/iqc/getIqcList/checkStatus'
,
method
:
'get'
})
}
export
function
getstatus
()
{
return
request
({
url
:
'/mes/qc/iqc/getIqcList/status'
,
method
:
'get'
})
}
\ No newline at end of file
src/views/mes/pro/arrangeRule/index.vue
View file @
c450aded
...
...
@@ -816,8 +816,11 @@ export default {
},
/** 导出按钮操作 */
handleExport
()
{
const
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
delete
params
.
pageNum
delete
params
.
pageSize
this
.
download
(
'/mes/pro/ProWorkOrderArrangeRule/export'
,
{
...
this
.
queryP
arams
...
p
arams
},
`ProWorkOrderArrangeRule_
${
new
Date
().
getTime
()}
.xlsx`
)
},
/** 导入按钮操作 */
...
...
src/views/mes/qc/ipqc/index.vue
View file @
c450aded
...
...
@@ -622,8 +622,11 @@ export default {
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'qc/ipqc/export'
,
{
...
this
.
queryParams
const
queryParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
delete
queryParams
.
pageNum
delete
queryParams
.
pageSize
this
.
download
(
'mes/qc/ipqc/export'
,
{
...
queryParams
}
,
`ipqc_${new Date().getTime()
}
.xlsx`
)
}
,
//选择生产工单
...
...
src/views/mes/qc/iqc/index.vue
0 → 100644
View file @
c450aded
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
@
submit
.
native
.
prevent
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"120px"
>
<el-form-item
label=
"IQC检验单编号"
prop=
"iqcCode"
>
<el-input
v-model=
"queryParams.iqcCode"
placeholder=
"请输入IQC检验单编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"物料分类"
prop=
"itemTypeName"
>
<el-input
v-model=
"queryParams.itemTypeName"
placeholder=
"请输入物料分类"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"物料编码"
prop=
"sapItemCode"
>
<el-input
v-model=
"queryParams.sapItemCode"
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
label=
"凭证号"
prop=
"voucherNo"
>
<el-input
v-model=
"queryParams.voucherNo"
placeholder=
"请输入凭证号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"凭证年"
prop=
"voucherNo"
>
<el-select
v-model=
"queryParams.voucherNoYear"
placeholder=
"请选择凭证年"
clearable
>
<el-option
v-for=
"dict in voucherNoYearList"
:key=
"dict"
:label=
"dict"
:value=
"dict"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"采购单号"
prop=
"purchaseOrderNo"
>
<el-input
v-model=
"queryParams.purchaseOrderNo"
placeholder=
"请输入采购单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"检测结果"
prop=
"checkResult"
>
<el-select
v-model=
"queryParams.checkResult"
placeholder=
"请选择检验结果"
clearable
>
<el-option
v-for=
"dict in dict.type.mes_qc_result"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"检测日期"
>
<el-date-picker
v-model=
"daterangePurchaseDate"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"QC工号"
prop=
"inspector"
>
<el-input
v-model=
"queryParams.inspector"
placeholder=
"请输入QC工号"
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-row
:gutter=
"10"
class=
"mb8"
>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:qc:ipqc:add']"
>
新增
</el-button>
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate(selectedRows[0])"
v-hasPermi=
"['mes:qc:ipqc:edit']"
>
修改
</el-button>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['mes:qc:ipqc:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"ipqcList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"检验单编号"
width=
"150px"
align=
"center"
prop=
"iqcCode"
>
<!--
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:qc:ipqc:query']"
>
{{
scope
.
row
.
iqcCode
}}
</el-button>
</
template
>
-->
</el-table-column>
<el-table-column
label=
"检验类型"
align=
"center"
prop=
"checkStatus"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_ipqc_type_pc"
:value=
"scope.row.checkStatus"
/>
{{
scope
.
row
.
checkStatus
?
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
checkStatus
)?.
dictValue
:
''
}}
</
template
>
</el-table-column>
<el-table-column
label=
"物料分类"
width=
"150px"
align=
"center"
prop=
"itemTypeName"
/>
<el-table-column
label=
"物料编码"
width=
"120px"
align=
"center"
prop=
"sapItemCode"
/>
<el-table-column
label=
"物料名称"
width=
"150px"
align=
"center"
prop=
"itemName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位"
align=
"center"
prop=
"unitOfMeasure"
/>
<el-table-column
label=
"检测数量"
align=
"center"
prop=
"quantityCheck"
/>
<el-table-column
label=
"检测结果"
align=
"center"
prop=
"checkResult"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"scope.row.checkResult"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"检测日期"
align=
"center"
prop=
"inspectDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
inspectDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"检测人员"
align
=
"center"
prop
=
"inspector"
/>
<
el
-
table
-
column
label
=
"单据状态"
align
=
"center"
prop
=
"status"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
status
?
statusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
status
)?.
dictValue
:
''
}}
<
/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"
>
<
span
>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template> --
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"更新人"
align
=
"center"
prop
=
"updateBy"
width
=
"100"
/>
<
el
-
table
-
column
label
=
"更新时间"
align
=
"center"
prop
=
"updateTime"
width
=
"150"
/>
<
el
-
table
-
column
label
=
"采购单号"
width
=
"120px"
align
=
"center"
prop
=
"purchaseOrderNo"
/>
<
el
-
table
-
column
label
=
"采购单行号"
width
=
"120px"
align
=
"center"
prop
=
"purchaseOrderItemNo"
show
-
overflow
-
tooltip
/>
<
el
-
table
-
column
label
=
"凭证号"
align
=
"center"
prop
=
"voucherNo"
:
show
-
overflow
-
tooltip
=
"true"
/>
<
el
-
table
-
column
label
=
"凭证行号"
align
=
"center"
prop
=
"voucherItemNo"
:
show
-
overflow
-
tooltip
=
"true"
/>
<
el
-
table
-
column
label
=
"凭证年"
align
=
"center"
prop
=
"voucherNoYear"
:
show
-
overflow
-
tooltip
=
"true"
/>
<
/el-table
>
<
pagination
v
-
show
=
"total > 0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改过程检验单对话框
-->
<
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
=
"iqcCode"
>
<
div
style
=
"display:flex;align-items: center;"
>
<
el
-
input
v
-
model
=
"form.iqcCode"
placeholder
=
"请输入检验单编号"
/>
<
el
-
switch
v
-
model
=
"autoGenFlag"
active
-
color
=
"#13ce66"
active
-
text
=
"自动生成"
style
=
"width:175px;margin-left:10px;"
@
change
=
"handleAutoGenChange(autoGenFlag)"
v
-
if
=
"optType != 'view' && form.status == 'PREPARE'"
>
<
/el-switch
>
<
/div
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"检验单名称"
prop
=
"ipqcName"
>
<
el
-
input
v
-
model
=
"form.ipqcName"
placeholder
=
"请输入检验单名称"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检验类型"
prop
=
"voucherNo"
>
<
el
-
select
v
-
model
=
"form.voucherNo"
placeholder
=
"请选择检验类型"
>
<
el
-
option
v
-
for
=
"dict in dict.type.mes_ipqc_type_pc"
:
key
=
"dict.value"
:
label
=
"dict.label"
:
value
=
"dict.value"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"物料分类"
prop
=
"itemTypeName"
>
<
el
-
input
v
-
model
=
"form.itemTypeName"
>
<
/el-input
>
<
/el-form-item
>
<
WorkorderSelect
ref
=
"woSelect"
@
onSelected
=
"onWorkorderSelected"
><
/WorkorderSelect
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"工单名称"
prop
=
"workorderName"
>
<
el
-
input
v
-
model
=
"form.workorderName"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
WorkuintSelect
ref
=
"WorkuintSelect"
@
onSelected
=
"val => onWorkstationSelected(val)"
><
/WorkuintSelect
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"工作单元编号"
prop
=
"workunitCode"
>
<
el
-
input
v
-
model
=
"form.workunitCode"
placeholder
=
"工作单元编号"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs.WorkuintSelect.showFlag = true"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"工作单元名称"
prop
=
"workunitName"
>
<
el
-
input
v
-
model
=
"form.workunitName"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测数量"
prop
=
"quantityCheck"
>
<
el
-
input
v
-
model
=
"form.quantityCheck"
placeholder
=
"请输入检测数量"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
collapse
>
<
el
-
collapse
-
item
>
<
template
slot
=
"title"
>
更多信息
<
i
class
=
"header-icon el-icon-info"
><
/i
>
<
/template
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"产品编码"
prop
=
"itemCode"
>
<
el
-
input
v
-
model
=
"form.itemCode"
placeholder
=
"请输入产品编码"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"产品名称"
prop
=
"itemName"
>
<
el
-
input
v
-
model
=
"form.itemName"
placeholder
=
"请输入产品名称"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"单位"
prop
=
"unitOfMeasure"
>
<
el
-
input
v
-
model
=
"form.unitOfMeasure"
placeholder
=
"请输入单位"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"24"
>
<
el
-
form
-
item
label
=
"规格型号"
prop
=
"specification"
>
<
el
-
input
v
-
model
=
"form.specification"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"工序编码"
prop
=
"voucherNo"
>
<
el
-
input
v
-
model
=
"form.voucherNo"
placeholder
=
"请输入工序编码"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"采购单号"
prop
=
"purchaseOrderNo"
>
<
el
-
input
v
-
model
=
"form.purchaseOrderNo"
placeholder
=
"请输入采购单号"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"任务编号"
prop
=
"taskCode"
>
<
el
-
input
v
-
model
=
"form.taskCode"
placeholder
=
"请输入任务编号"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"任务名称"
prop
=
"taskName"
>
<
el
-
input
v
-
model
=
"form.taskCode"
placeholder
=
"请输入任务编号"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"不合格数"
prop
=
"quantityUnqualified"
>
<
el
-
input
v
-
model
=
"form.quantityUnqualified"
placeholder
=
"请输入不合格数"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"合格品数量"
prop
=
"quantityQualified"
>
<
el
-
input
v
-
model
=
"form.quantityQualified"
placeholder
=
"请输入合格品数量"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"致命缺陷数量"
prop
=
"crQuantity"
>
<
el
-
input
v
-
model
=
"form.crQuantity"
placeholder
=
"请输入致命缺陷数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"严重缺陷数量"
prop
=
"majQuantity"
>
<
el
-
input
v
-
model
=
"form.majQuantity"
placeholder
=
"请输入严重缺陷数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"轻微缺陷数量"
prop
=
"minQuantity"
>
<
el
-
input
v
-
model
=
"form.minQuantity"
placeholder
=
"请输入轻微缺陷数量"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-collapse-item
>
<
/el-collapse
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测日期"
prop
=
"inspectDate"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.inspectDate"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"请选择检测日期"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测结果"
prop
=
"checkResult"
>
<
el
-
select
v
-
model
=
"form.checkResult"
placeholder
=
"请选择检验结果"
>
<
el
-
option
v
-
for
=
"dict in dict.type.mes_qc_result"
:
key
=
"dict.value"
:
label
=
"dict.label"
:
value
=
"dict.value"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测人员"
prop
=
"inspector"
>
<
el
-
input
v
-
model
=
"form.inspector"
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-row
>
<
/el-form
>
<
el
-
divider
v
-
if
=
"form.iqcId != null"
content
-
position
=
"center"
>
检测项
<
/el-divider
>
<
el
-
card
shadow
=
"always"
v
-
if
=
"form.iqcId != null"
class
=
"box-card"
>
<
iqcline
ref
=
"lineRef"
:
iqcId
=
"form.iqcId"
:
optType
=
"optType"
><
/iqcline
>
<
/el-card
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"cancel"
v
-
if
=
"optType == 'view' || form.status != 'PREPARE'"
>
返回
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
v
-
if
=
"form.status == 'PREPARE' && optType != 'view'"
>
保
存
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"handleFinish"
v
-
if
=
"form.status == 'PREPARE' && optType != 'view' && form.iqcId != null"
>
完成
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getpclist
,
getcheckResult
,
getvoucherNoYear
,
getcheckStatus
,
getstatus
}
from
"@/api/mes/qc/iqc"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
import
WorkorderSelect
from
"@/components/workorderSelect/single.vue"
import
WorkuintSelect
from
"@/components/workunitSelect/single.vue"
;
import
iqcline
from
"./iqcline.vue"
import
dayjs
from
'dayjs'
;
export
default
{
name
:
"Ipqc"
,
components
:
{
WorkorderSelect
,
WorkuintSelect
,
iqcline
}
,
dicts
:
[
'mes_ipqc_type_pc'
,
'mes_qc_result'
,
'mes_order_status'
],
data
()
{
return
{
autoGenFlag
:
false
,
optType
:
undefined
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
voucherNoYearList
:
[],
checkStatusList
:
[],
statusList
:
[],
selectedRows
:
[],
daterangePurchaseDate
:
[],
// 总条数
total
:
0
,
// 过程检验单表格数据
ipqcList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
iqcCode
:
null
,
ipqcName
:
null
,
voucherNo
:
null
,
templateId
:
null
,
workorderId
:
null
,
itemTypeName
:
null
,
workorderName
:
null
,
taskId
:
null
,
taskCode
:
null
,
taskName
:
null
,
workunitId
:
null
,
workunitCode
:
null
,
workunitName
:
null
,
processId
:
null
,
voucherNo
:
null
,
purchaseOrderNo
:
null
,
itemId
:
null
,
itemCode
:
null
,
itemName
:
null
,
specification
:
null
,
unitOfMeasure
:
null
,
quantityCheck
:
null
,
quantityUnqualified
:
null
,
quantityQualified
:
null
,
crRate
:
null
,
majRate
:
null
,
minRate
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
null
,
inspectDate
:
null
,
inspector
:
null
,
status
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
iqcCode
:
[
{
required
:
true
,
message
:
"请输入或生产检验单编号"
,
trigger
:
"blur"
}
],
voucherNo
:
[
{
required
:
true
,
message
:
"请选择检验类型"
,
trigger
:
"change"
}
],
workunitCode
:
[
{
required
:
true
,
message
:
"请选择工作中心"
,
trigger
:
"blur"
}
],
quantityCheck
:
[
{
required
:
true
,
message
:
"检测数量不能为空"
,
trigger
:
"blur"
}
],
quantityUnqualified
:
[
{
required
:
true
,
message
:
"不合格品数量不能为空"
,
trigger
:
"blur"
}
],
quantityQualified
:
[
{
required
:
true
,
message
:
"合格品数量不能为空"
,
trigger
:
"blur"
}
]
}
}
;
}
,
created
()
{
this
.
setDate
();
this
.
getList
();
}
,
methods
:
{
//筛选日期设置默认值
setDate
()
{
this
.
daterangePurchaseDate
=
[
dayjs
().
format
(
'YYYY-MM-DD'
),
dayjs
().
add
(
7
,
'day'
).
format
(
'YYYY-MM-DD'
)]
getvoucherNoYear
().
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
){
this
.
voucherNoYearList
=
res
.
data
}
else
{
this
.
voucherNoYearList
=
[]
}
}
)
getcheckStatus
().
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
){
this
.
checkStatusList
=
res
.
data
}
else
{
this
.
checkStatusList
=
[]
}
}
)
getstatus
().
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
){
this
.
statusList
=
res
.
data
}
else
{
this
.
statusList
=
[]
}
}
)
}
,
/** 查询过程检验单列表 */
getList
()
{
this
.
loading
=
true
;
this
.
queryParams
.
params
=
{
}
;
if
(
null
!=
this
.
daterangePurchaseDate
&&
''
!=
this
.
daterangePurchaseDate
)
{
this
.
queryParams
.
params
[
"beginPurchaseDate"
]
=
this
.
daterangePurchaseDate
[
0
];
this
.
queryParams
.
params
[
"endPurchaseDate"
]
=
this
.
daterangePurchaseDate
[
1
];
}
getpclist
(
this
.
queryParams
).
then
(
response
=>
{
this
.
ipqcList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
iqcId
:
null
,
iqcCode
:
null
,
ipqcName
:
null
,
voucherNo
:
null
,
templateId
:
null
,
workorderId
:
null
,
itemTypeName
:
null
,
workorderName
:
null
,
taskId
:
null
,
taskCode
:
null
,
taskName
:
null
,
workunitId
:
null
,
workunitCode
:
null
,
workunitName
:
null
,
processId
:
null
,
voucherNo
:
null
,
purchaseOrderNo
:
null
,
itemId
:
null
,
itemCode
:
null
,
itemName
:
null
,
specification
:
null
,
unitOfMeasure
:
null
,
quantityCheck
:
null
,
quantityUnqualified
:
null
,
quantityQualified
:
null
,
crRate
:
null
,
majRate
:
null
,
minRate
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
null
,
inspectDate
:
new
Date
(),
inspector
:
null
,
status
:
"PREPARE"
,
remark
:
null
,
attr1
:
null
,
attr2
:
null
,
attr3
:
null
,
attr4
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
}
;
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
daterangePurchaseDate
=
[];
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
iqcId
)
this
.
selectedRows
=
selection
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加过程检验单"
;
this
.
optType
=
"add"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
iqcId
=
row
.
iqcId
||
this
.
ids
getIpqc
(
iqcId
).
then
(
response
=>
{
this
.
form
=
{...
row
,
...
response
.
data
}
;
this
.
open
=
true
;
this
.
title
=
"修改过程检验单"
;
this
.
optType
=
"edit"
;
}
);
}
,
//查看单据
handleView
(
row
)
{
this
.
reset
();
const
ipqcIds
=
row
.
iqcId
getIpqc
(
ipqcIds
).
then
(
response
=>
{
this
.
form
=
{...
row
,
...
response
.
data
}
;
this
.
open
=
true
;
this
.
title
=
"查看检验单信息"
;
this
.
optType
=
"view"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
iqcId
!=
null
)
{
const
data
=
Object
.
assign
({
}
,
this
.
form
)
const
qcLines
=
this
.
$refs
.
lineRef
.
ipqclineList
const
qcIpqclineList
=
qcLines
.
map
(
item
=>
{
let
selectValues
=
item
.
selectValues
let
qualityCheckResults
=
item
.
qualityCheckResults
if
(
item
.
inputType
==
2
)
{
selectValues
=
JSON
.
stringify
(
item
.
selectValues
)
qualityCheckResults
=
JSON
.
stringify
(
item
.
qualityCheckResults
)
}
return
{
...
item
,
selectValues
,
qualityCheckResults
}
}
)
data
.
qcIpqclineList
=
qcIpqclineList
updateIpqc
(
data
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
//this.open = false;
this
.
getList
();
}
);
}
else
{
addIpqc
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
form
.
iqcId
=
response
.
data
;
//将返回的ID保存
//this.open = false;
this
.
getList
();
}
);
}
}
}
);
}
,
//点击完成
handleFinish
()
{
let
that
=
this
;
if
(
this
.
form
.
checkResult
==
null
)
{
this
.
$modal
.
msgError
(
"请选择检测结果!"
);
return
;
}
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$modal
.
confirm
(
'是否完成检验单编制?【完成后将不能更改】'
).
then
(
function
()
{
that
.
form
.
status
=
'CONFIRMED'
;
that
.
submitForm
();
that
.
open
=
false
;
}
);
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ipqcIds
=
row
.
iqcId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除过程检验单编号为"'
+
ipqcIds
+
'"的数据项?'
).
then
(
function
()
{
return
delIpqc
(
ipqcIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
delete
queryParams
.
pageNum
delete
queryParams
.
pageSize
this
.
download
(
'mes/qc/iqc/export'
,
{
...
queryParams
}
,
`iqc_${new Date().getTime()
}
.xlsx`
)
}
,
//选择生产工单
handleWorkorderSelect
()
{
this
.
$refs
.
woSelect
.
showFlag
=
true
;
}
,
onWorkorderSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
debugger
;
this
.
form
.
workorderId
=
row
.
workorderId
;
this
.
form
.
workorderName
=
row
.
workorderName
;
this
.
form
.
itemId
=
row
.
productId
;
this
.
form
.
itemCode
=
row
.
productCode
;
this
.
form
.
itemName
=
row
.
productName
;
this
.
form
.
specification
=
row
.
productSpc
;
this
.
form
.
unitOfMeasure
=
row
.
unitOfMeasure
;
}
}
,
handleWorkstationSelect
()
{
this
.
$refs
.
wsSelect
.
showFlag
=
true
;
}
,
onWorkstationSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
workunitCode
=
row
.
workunitCode
;
this
.
form
.
workunitId
=
row
.
workunitId
;
this
.
form
.
workunitName
=
row
.
workunitName
;
}
}
,
//自动生成编码
handleAutoGenChange
(
autoGenFlag
)
{
if
(
autoGenFlag
)
{
genCode
(
'IPQC_CODE'
).
then
(
response
=>
{
this
.
form
.
iqcCode
=
response
;
}
);
}
else
{
this
.
form
.
iqcCode
=
null
;
}
}
}
}
;
<
/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