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
2acaad05
Commit
2acaad05
authored
Aug 14, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fqc更新
parent
9e9fe00a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1767 additions
and
53 deletions
+1767
-53
protask.js
src/api/mes/pro/protask.js
+4
-3
iqc.js
src/api/mes/qc/iqc.js
+9
-0
index.vue
src/views/mes/pro/scheduleList/index.vue
+13
-6
workorderSelect.vue
src/views/mes/pro/scheduleList/workorderSelect.vue
+13
-41
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+3
-2
index.vue
src/views/mes/qc/charge/index.vue
+699
-0
iqc.vue
src/views/mes/qc/charge/iqc.vue
+718
-0
iqcTable.vue
src/views/mes/qc/charge/iqcTable.vue
+141
-0
iqcline.vue
src/views/mes/qc/charge/iqcline.vue
+159
-0
index.vue
src/views/mes/qc/iqc/index.vue
+8
-1
No files found.
src/api/mes/pro/protask.js
View file @
2acaad05
...
...
@@ -73,10 +73,11 @@ export function unschedule(arrangeCode) {
}
// 选择工单
export
function
getWorkOrderListBy
TaskWorkunitId
(
taskWorkunitId
)
{
export
function
getWorkOrderListBy
Obj
(
data
)
{
return
request
({
url
:
"/mes/pro/taskWorkunit/getWorkOrderListByTaskWorkunitId/"
+
taskWorkunitId
,
method
:
"get"
,
url
:
"/mes/pro/taskWorkunit/getWorkOrderListByObj"
,
method
:
"post"
,
data
:
data
});
}
...
...
src/api/mes/qc/iqc.js
View file @
2acaad05
...
...
@@ -9,6 +9,15 @@ export function listIqc(query) {
})
}
// 查询来料检验单列表
export
function
listBack
(
query
)
{
return
request
({
url
:
'/md/back/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询来料检验单详细
export
function
getIqc
(
iqcId
)
{
return
request
({
...
...
src/views/mes/pro/scheduleList/index.vue
View file @
2acaad05
...
...
@@ -169,7 +169,7 @@
type=
"primary"
plain
size=
"mini"
:disabled=
'
single
'
:disabled=
'
this.selectedRows.length !== 1
'
@
click=
"handleSplitWorkstation"
>
工序新增
</el-button>
</el-col>
...
...
@@ -551,6 +551,7 @@
<el-input-number
:step=
"1"
:min=
"0"
:disabled=
"Assignform.splitWorkorder"
v-model=
"Assignform.quantity"
placeholder=
"请输入排产数量"
/>
...
...
@@ -698,7 +699,7 @@ import {
postAssistMark
,
getavailableToolCount
,
getdefaultWorkCenterList
}
from
'@/api/mes/pro/scheduleList'
import
{
putProtaskSplit
,
splitWorkstation
,
deleteTask
,
unschedule
,
updateProTaskWorkunitApi
,
getWorkOrderListBy
TaskWorkunitId
}
from
'@/api/mes/pro/protask'
import
{
putProtaskSplit
,
splitWorkstation
,
deleteTask
,
unschedule
,
updateProTaskWorkunitApi
,
getWorkOrderListBy
Obj
}
from
'@/api/mes/pro/protask'
import
BrandSelect
from
"@/components/TmTool/index.vue"
;
import
shiftSelectMixin
from
'@/utils/shiftSelectMixin'
import
OrderList
from
'./orderList.vue'
...
...
@@ -803,16 +804,22 @@ export default {
},
methods
:
{
selectWorkorder
()
{
getWorkOrderListBy
TaskWorkunitId
(
this
.
selectedRows
[
0
].
taskWorkunitId
).
then
(
response
=>
{
getWorkOrderListBy
Obj
({
taskWorkunitId
:
this
.
selectedRows
[
0
].
taskWorkunitId
}
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$refs
.
workorderSelect
.
showFlag
=
true
}
});
},
onWorkorderSelect
(
rows
){
console
.
log
(
'rows'
,
rows
)
if
(
!
rows
||
rows
.
length
===
0
)
this
.
Assignform
.
splitWorkorder
=
''
if
(
rows
&&
rows
.
length
>
0
)
{
this
.
Assignform
.
splitWorkorder
=
rows
.
map
(
v
=>
v
.
workorderCode
).
join
(
','
)
this
.
Assignform
.
quantity
=
rows
.
reduce
((
pre
,
cur
)
=>
{
return
pre
+
(
cur
.
quantity
||
0
)
},
0
)
}
else
{
this
.
Assignform
.
quantity
=
0
this
.
Assignform
.
splitWorkorder
=
null
}
},
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
taskId
);
...
...
src/views/mes/pro/scheduleList/workorderSelect.vue
View file @
2acaad05
...
...
@@ -6,55 +6,23 @@
width=
"80%"
center
>
<
!--
<
el-form
:model=
"queryParams"
@
submit
.
native
.
prevent
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工单编码"
prop=
"workorderCode"
>
<el-form
:model=
"queryParams"
@
submit
.
native
.
prevent
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工单编码"
prop=
"workorderCode
s
"
>
<el-input
v-model=
"queryParams.workorderCode"
v-model=
"queryParams.workorderCodes"
type=
"textarea"
:rows=
"2"
resize=
"none"
placeholder=
"请输入工单编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"workorderName"
>
<el-input
v-model=
"queryParams.workorderName"
placeholder=
"请输入工单名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品编号"
prop=
"productCode"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入产品编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品名称"
prop=
"productName"
>
<el-input
v-model=
"queryParams.productName"
placeholder=
"请输入产品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"客户名称"
prop=
"clientName"
>
<el-input
v-model=
"queryParams.clientName"
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-form>
<el-table
v-loading=
"loading"
:data=
"workorderList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
...
...
@@ -87,7 +55,7 @@
<
/template
>
<
script
>
import
{
getWorkOrderListBy
TaskWorkunitId
}
from
"@/api/mes/pro/protask"
;
import
{
getWorkOrderListBy
Obj
}
from
"@/api/mes/pro/protask"
;
export
default
{
name
:
'WorkOrderSelectSingle'
,
components
:
{
}
,
...
...
@@ -129,7 +97,7 @@
open
:
false
,
// 查询参数
queryParams
:
{
workorderCode
:
null
,
workorderCodes
:
null
,
workorderName
:
null
,
taskWorkunitId
:
this
.
workorder
.
taskWorkunitId
,
orderSource
:
null
,
...
...
@@ -162,7 +130,11 @@
getList
()
{
this
.
loading
=
true
;
if
(
!
this
.
workorder
||
!
this
.
workorder
.
taskWorkunitId
)
return
getWorkOrderListByTaskWorkunitId
(
this
.
workorder
.
taskWorkunitId
).
then
(
response
=>
{
const
params
=
{
taskWorkunitId
:
this
.
workorder
.
taskWorkunitId
,
workorderCodes
:
this
.
queryParams
.
workorderCodes
?
this
.
queryParams
.
workorderCodes
.
split
(
/
[\n
,;,、;。
]
/
).
filter
(
item
=>
item
)
:
null
,
}
getWorkOrderListByObj
(
params
).
then
(
response
=>
{
this
.
workorderList
=
response
.
data
;
this
.
loading
=
false
;
}
);
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
2acaad05
...
...
@@ -1060,9 +1060,10 @@ export default {
}
)
}
);
checkArrangeRulesApi(cparams).then(res => {
if(res.msg && res.msg !== '操作成功') {
if(res.data && typeof res.data == 'object') {
const text = res.data.join('\n')
this.$confirm(
res.msg
,
text
,
'提示',
{
distinguishCancelAndClose: true,
...
...
src/views/mes/qc/charge/index.vue
0 → 100644
View file @
2acaad05
<
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=
"检验单编号"
prop=
"chargeBackCode"
>
<el-input
v-model=
"queryParams.chargeBackCode"
placeholder=
"请输入检验单编号"
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=
"saleReturnNo"
>
<el-input
v-model=
"queryParams.saleReturnNo"
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>
<el-col
:span=
"1.2"
>
<el-button
type=
"warning"
plain
size=
"mini"
v-print=
"printContent"
id=
"printbtn"
style=
"display: none"
>
打印
</el-button>
<el-button
type=
"warning"
plain
size=
"mini"
style=
"margin-left: 0;"
icon=
"el-icon-printer"
ref=
"printbtn"
@
click=
"handlePrint"
:disabled=
"single"
:loading=
"printloading"
v-hasPermi=
"['mes:pro:workorder:print']"
>
打印
</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=
"chargeBackCode"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:qc:iqc:query']"
>
{{
scope
.
row
.
chargeBackCode
}}
</el-button>
</
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=
"quantityUnqualified"
/>
<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=
"checkStatus"
>
<
template
slot-scope=
"scope"
>
{{
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
checkStatus
)
?
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
checkStatus
).
dictValue
:
''
}}
</
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"
>
<
div
>
{{
statusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
status
)
?
statusList
.
find
(
v
=>
v
.
dictKey
===
scope
.
row
.
status
).
dictValue
:
''
}}
<
/div
>
<
/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
=
"saleReturnNo"
/>
<
el
-
table
-
column
label
=
"销退单行号"
width
=
"120px"
align
=
"center"
prop
=
"saleReturnItemNo"
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
=
"1060px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"100px"
label
-
position
=
"left"
>
<
el
-
row
>
<
el
-
col
:
span
=
"form.chargeBackName ? 8 : 12"
>
<
el
-
form
-
item
label
=
"检验单编号"
prop
=
"chargeBackCode"
>
{{
form
.
chargeBackCode
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"form.chargeBackName ? 8 : 12"
v
-
if
=
"form.chargeBackName"
>
<
el
-
form
-
item
label
=
"检验单名称"
prop
=
"chargeBackName"
>
{{
form
.
chargeBackName
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"form.chargeBackName ? 8 : 12"
>
<
el
-
form
-
item
label
=
"供应商名称"
prop
=
"vendorName"
>
{{
form
.
vendorName
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"销退单号"
prop
=
"saleReturnNo"
>
{{
form
.
saleReturnNo
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"销退单行号"
prop
=
"saleReturnItemNo"
>
{{
form
.
saleReturnItemNo
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"凭证号"
prop
=
"voucherNo"
>
{{
form
.
voucherNo
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"凭证行号"
prop
=
"voucherItemNo"
>
{{
form
.
voucherItemNo
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"批次号"
prop
=
"batchNo"
>
{{
form
.
batchNo
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"批次数量"
prop
=
"batchNo"
>
{{
form
.
quantity
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"物料分类"
prop
=
"itemTypeName"
>
{{
form
.
itemTypeName
}}
<
/el-form-item
>
<
WorkorderSelect
ref
=
"woSelect"
@
onSelected
=
"onWorkorderSelected"
><
/WorkorderSelect
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"物料编码"
prop
=
"sapItemCode"
>
{{
form
.
sapItemCode
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"物料名称"
prop
=
"itemName"
>
{{
form
.
itemName
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测数量"
prop
=
"quantityCheck"
>
<
el
-
input
-
number
v
-
model
=
"form.quantityCheck"
placeholder
=
"请输入检测数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"4"
>
<
el
-
form
-
item
label
=
"处理措施"
prop
=
"quantityCheck"
>
{{
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
form
.
checkStatus
)
?
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
form
.
checkStatus
).
dictValue
:
''
}}
<
/el-form-item
>
<
/el-col
>
<
WorkuintSelect
ref
=
"WorkuintSelect"
@
onSelected
=
"val => onWorkstationSelected(val)"
><
/WorkuintSelect
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"单位"
prop
=
"workunitCode"
>
{{
form
.
unitOfMeasure
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"是否客供"
prop
=
"workunitName"
>
{{
form
.
moveType
==
501
?
'是'
:
'否'
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
el
-
form
-
item
label
=
"送货日期"
prop
=
"inspectDate"
>
{{
form
.
createTime
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"6"
>
<
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
=
"quantityUnqualified"
>
<
el
-
input
-
number
v
-
model
=
"form.quantityUnqualified"
placeholder
=
"请输入不合格数"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"合格品数量"
prop
=
"quantityQualified"
>
<
el
-
input
-
number
v
-
model
=
"form.quantityQualified"
placeholder
=
"请输入合格品数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检测人员"
prop
=
"inspectorName"
>
{{
form
.
inspectorName
}}
<
/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
style
=
"overflow: hidden;width: 0;height: 0;"
>
<
div
id
=
"iqcDetail"
>
<
iqcTable
:
iqcTable
=
"iqcTable"
style
=
"page-break-after:always"
><
/iqcTable
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
script
>
import
{
listBack
,
getcheckResult
,
getvoucherNoYear
,
getcheckStatus
,
getstatus
,
printIqc
}
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
iqcTable
from
"./iqcTable.vue"
;
import
iqcline
from
"./iqcline.vue"
import
dayjs
from
'dayjs'
;
import
print
from
'vue-print-nb'
;
export
default
{
name
:
"Ipqc"
,
directives
:
{
print
}
,
components
:
{
WorkorderSelect
,
WorkuintSelect
,
iqcline
,
iqcTable
}
,
dicts
:
[
'mes_ipqc_type_pc'
,
'mes_qc_result'
,
'mes_order_status'
],
data
()
{
return
{
autoGenFlag
:
false
,
optType
:
undefined
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
printContent
:
{
id
:
'iqcDetail'
,
// preview: true, // 预览工具是否启用
// previewTitle: '储能服务费结算单', // 预览页面的标题
popTitle
:
''
,
// 打印页面的页眉
extraHead
:
'<meta http-equiv="Content-Language"content="zh-cn"/>'
,
previewBeforeOpenCallback
()
{
}
,
previewOpenCallback
()
{
}
,
beforeOpenCallback
(
vue
)
{
// vue.printLoading = true;
}
,
openCallback
(
vue
)
{
vue
.
printloading
=
false
;
}
,
closeCallback
()
{
}
,
clickMounted
(
vue
)
{
console
.
log
(
'clickMounted'
)
}
,
}
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
voucherNoYearList
:
[],
checkStatusList
:
[],
statusList
:
[],
selectedRows
:
[],
daterangePurchaseDate
:
[],
// 总条数
total
:
0
,
// 过程检验单表格数据
ipqcList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
chargeBackCode
:
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
,
saleReturnNo
:
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
,
}
,
printloading
:
false
,
iqcTable
:
{
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
chargeBackCode
:
[
{
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
:
{
handlePrint
(){
this
.
printloading
=
true
;
printIqc
(
this
.
ids
).
then
(
res
=>
{
if
(
!
res
.
data
||
res
.
data
.
length
===
0
)
{
return
this
.
$message
.
warning
(
'没有数据'
)
}
if
(
res
.
code
===
200
&&
res
.
data
)
{
this
.
iqcTable
=
{
"saleNo"
:
res
.
data
.
saleReturnNo
,
"quantity"
:
res
.
data
.
quantity
,
"unit"
:
res
.
data
.
baseunit
,
"sapItemCode"
:
res
.
data
.
sapItemCode
,
"vendorCode"
:
res
.
data
.
vendorCode
,
"vendorName"
:
res
.
data
.
vendorName
,
"itemName"
:
res
.
data
.
itemName
,
"checkResult"
:
res
.
data
.
checkResult
,
"checkStatus"
:
this
.
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
res
.
data
.
checkStatus
)
?
this
.
checkStatusList
.
find
(
v
=>
v
.
dictKey
===
res
.
data
.
checkStatus
).
dictValue
:
''
,
"quantityUnqualified"
:
res
.
data
.
quantityUnqualified
,
"checkTime"
:
res
.
data
.
inspectDate
}
this
.
iqcTable
[
'lineList'
]
=
res
.
data
.
qcIqcLineList
||
[]
this
.
$nextTick
(()
=>
{
document
.
getElementById
(
'printbtn'
).
click
()
}
)
}
}
).
finally
(()
=>
{
this
.
printloading
=
false
;
}
)
}
,
//筛选日期设置默认值
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
];
}
listBack
(
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
,
chargeBackCode
:
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
,
saleReturnNo
:
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
printIqc
(
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
()
{
if
(
this
.
selectedRows
&&
this
.
selectedRows
.
length
>
0
)
{
this
.
download1
(
'mes/qc/iqc/export'
,
{
chargeBackCodeList
:
this
.
selectedRows
.
map
(
v
=>
v
.
chargeBackCode
)
}
,
`iqc_${new Date().getTime()
}
.xlsx`
)
}
else
{
const
queryParams
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
queryParams
))
delete
queryParams
.
pageNum
delete
queryParams
.
pageSize
this
.
download1
(
'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
.
chargeBackCode
=
response
;
}
);
}
else
{
this
.
form
.
chargeBackCode
=
null
;
}
}
}
}
;
<
/script
>
src/views/mes/qc/charge/iqc.vue
0 → 100644
View file @
2acaad05
<
template
>
<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-item
label=
"检验单编号"
prop=
"iqcCode"
>
<el-input
v-model=
"queryParams.iqcCode"
placeholder=
"请输入来料检验单编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"供应商编码"
prop=
"vendorCode"
>
<el-input
v-model=
"queryParams.vendorCode"
placeholder=
"请输入供应商编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"供应商名称"
prop=
"vendorName"
>
<el-input
v-model=
"queryParams.vendorName"
placeholder=
"请输入供应商名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"供应商批次号"
prop=
"vendorBatch"
>
<el-input
v-model=
"queryParams.vendorBatch"
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
label=
"检测结果"
prop=
"checkResult"
>
<el-select
v-model=
"queryParams.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-form-item
label=
"来料日期"
prop=
"reciveDate"
>
<el-date-picker
clearable
v-model=
"queryParams.reciveDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择来料日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"检测日期"
prop=
"inspectDate"
>
<el-date-picker
clearable
v-model=
"queryParams.inspectDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择检测日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"检测人员"
prop=
"inspector"
>
<el-input
v-model=
"queryParams.inspector"
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-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:iqc: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"
v-hasPermi=
"['mes:qc:iqc:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['mes:qc:iqc:remove']"
>
删除
</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:iqc:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"iqcList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"来料检验单编号"
width=
"140px"
align=
"center"
prop=
"iqcCode"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:qc:iqc:query']"
>
{{
scope
.
row
.
iqcCode
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"来料检验单名称"
width=
"120px"
align=
"center"
prop=
"iqcName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"供应商简称"
width=
"100px"
align=
"center"
prop=
"vendorNick"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"供应商批次号"
width=
"120px"
align=
"center"
prop=
"vendorBatch"
/>
<el-table-column
label=
"产品物料编码"
width=
"120px"
align=
"center"
prop=
"itemCode"
/>
<el-table-column
label=
"产品物料名称"
width=
"120px"
align=
"center"
prop=
"itemName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"接收数量"
width=
"90px"
align=
"center"
prop=
"quantityRecived"
/>
<el-table-column
label=
"检测数量"
width=
"90px"
align=
"center"
prop=
"quantityCheck"
/>
<el-table-column
label=
"不合格数"
align=
"center"
prop=
"quantityUnqualified"
/>
<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=
"reciveDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
reciveDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/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
=
"inspectorName"
/>
<
el
-
table
-
column
label
=
"单据状态"
align
=
"center"
prop
=
"status"
>
<
template
slot
-
scope
=
"scope"
>
<
dict
-
tag
:
options
=
"dict.type.mes_order_status"
:
value
=
"scope.row.status"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
width
=
"100px"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
v
-
if
=
"scope.row.status =='PREPARE'"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['mes:qc:iqc:edit']"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
v
-
if
=
"scope.row.status =='PREPARE'"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['mes:qc:iqc:remove']"
>
删除
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"viewReport"
>
查看报表
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/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
=
"1080px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"检验单编号"
prop
=
"iqcCode"
>
<
el
-
input
v
-
model
=
"form.iqcCode"
placeholder
=
"请输入来料检验单编号"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"4"
>
<
el
-
form
-
item
label
-
width
=
"80"
>
<
el
-
switch
v
-
model
=
"autoGenFlag"
active
-
color
=
"#13ce66"
active
-
text
=
"自动生成"
@
change
=
"handleAutoGenChange(autoGenFlag)"
v
-
if
=
"optType != 'view' && form.status =='PREPARE'"
>
<
/el-switch
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"9"
>
<
el
-
form
-
item
label
=
"检验单名称"
prop
=
"iqcName"
>
<
el
-
input
v
-
model
=
"form.iqcName"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"3"
align
=
"middle"
>
<
el
-
image
fit
=
"contain"
v
-
if
=
"form.checkResult == 'ACCEPT'"
:
src
=
"acceptImg"
/>
<
el
-
image
fit
=
"contain"
v
-
else
-
if
=
"form.checkResult == 'REJECT'"
:
src
=
"rejectImg"
/>
<
el
-
image
fit
=
"contain"
v
-
else
:
src
=
"prepareImg"
/>
<
/el-col
>
<
/el-row
>
<
el
-
divider
content
-
position
=
"center"
>
物料与供应商
<
/el-divider
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"产品物料编码"
prop
=
"itemCode"
>
<
el
-
input
v
-
if
=
"form.iqcId ==null "
v
-
model
=
"form.itemCode"
readonly
placeholder
=
"请选择物料"
>
<
el
-
button
slot
=
"append"
@
click
=
"handleSelectProduct"
icon
=
"el-icon-search"
><
/el-button
>
<
/el-input
>
<!--
如果已经保存过,则产品不允许再修改,需要修改就删除重做
-->
<
el
-
input
v
-
else
v
-
model
=
"form.itemCode"
>
<
/el-input
>
<
/el-form-item
>
<
ItemSelect
ref
=
"itemSelect"
@
onSelected
=
"onItemSelected"
>
<
/ItemSelect
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"产品物料名称"
prop
=
"itemName"
>
<
el
-
input
v
-
model
=
"form.itemName"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"单位"
prop
=
"unitOfMeasure"
>
<
el
-
input
v
-
model
=
"form.unitOfMeasure"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"供应商编码"
prop
=
"vendorCode"
>
<
el
-
input
v
-
model
=
"form.vendorCode"
readonly
placeholder
=
"请选择供应商"
>
<
el
-
button
slot
=
"append"
@
click
=
"handleSelectVendor"
icon
=
"el-icon-search"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
VendorSelect
ref
=
"vendorSelect"
@
onSelected
=
"onVendorSelected"
/>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"供应商简称"
prop
=
"vendorNick"
>
<
el
-
input
v
-
model
=
"form.vendorNick"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"供应商批次号"
prop
=
"vendorBatch"
>
<
el
-
input
v
-
model
=
"form.vendorBatch"
placeholder
=
"请输入供应商批次号"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
divider
content
-
position
=
"center"
>
检测情况
<
/el-divider
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"本次接收数量"
prop
=
"quantityRecived"
>
<
el
-
input
-
number
:
min
=
"1"
v
-
model
=
"form.quantityRecived"
placeholder
=
"请输入本次接收数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"本次检测数量"
prop
=
"quantityCheck"
>
<
el
-
input
:
min
=
"1"
v
-
model
=
"form.quantityCheck"
placeholder
=
"请输入本次检测数量"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"不合格数量"
prop
=
"quantityUnqualified"
>
<
el
-
input
-
number
:
min
=
"0"
v
-
model
=
"form.quantityUnqualified"
placeholder
=
"请输入不合格数"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"来料日期"
prop
=
"reciveDate"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.reciveDate"
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
=
"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-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
-
collapse
accordion
>
<
el
-
collapse
-
item
title
=
"结果统计"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"致命缺陷率"
prop
=
"crRate"
>
<
el
-
input
v
-
model
=
"form.crRate"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"严重缺陷率"
prop
=
"majRate"
>
<
el
-
input
v
-
model
=
"form.majRate"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"轻微缺陷率"
prop
=
"minRate"
>
<
el
-
input
v
-
model
=
"form.minRate"
readonly
=
"readonly"
/>
<
/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"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"严重缺陷数量"
prop
=
"majQuantity"
>
<
el
-
input
v
-
model
=
"form.majQuantity"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"轻微缺陷数量"
prop
=
"minQuantity"
>
<
el
-
input
v
-
model
=
"form.minQuantity"
readonly
=
"readonly"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-collapse-item
>
<
/el-collapse>
<
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
=
line
:
iqcId
=
"form.iqcId"
:
optType
=
"optType"
><
/IqcLine
>
<
/el-card
>
<
/el-form
>
<
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
{
listIqc
,
getIqc
,
delIqc
,
addIqc
,
updateIqc
}
from
"@/api/mes/qc/iqc"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
import
VendorSelect
from
"@/components/vendorSelect/single.vue"
;
import
IqcLine
from
"./iqcline.vue"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
import
{
getReport
,
getReport2
}
from
"@/api/mes/report/report"
export
default
{
name
:
"Iqc"
,
dicts
:
[
'mes_qc_result'
,
'mes_order_status'
],
components
:
{
ItemSelect
,
VendorSelect
,
IqcLine
}
,
data
()
{
return
{
//自动生成编码
autoGenFlag
:
false
,
optType
:
undefined
,
acceptImg
:
require
(
'@/assets/images/accept.png'
),
rejectImg
:
require
(
'@/assets/images/reject.png'
),
prepareImg
:
require
(
'@/assets/images/prepare.png'
),
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 来料检验单表格数据
iqcList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
iqcCode
:
null
,
iqcName
:
null
,
templateId
:
null
,
vendorId
:
null
,
vendorCode
:
null
,
vendorName
:
null
,
vendorNick
:
null
,
vendorBatch
:
null
,
itemId
:
null
,
itemCode
:
null
,
itemName
:
null
,
specification
:
null
,
unitOfMeasure
:
null
,
quantityMinCheck
:
null
,
quantityMaxUnqualified
:
null
,
quantityRecived
:
null
,
quantityCheck
:
null
,
quantityUnqualified
:
null
,
crRate
:
null
,
majRate
:
null
,
minRate
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
null
,
reciveDate
:
null
,
inspectDate
:
null
,
inspector
:
null
,
status
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
iqcCode
:
[
{
required
:
true
,
message
:
"来料检验单编号不能为空"
,
trigger
:
"blur"
}
],
iqcName
:
[
{
required
:
true
,
message
:
"来料检验单名称不能为空"
,
trigger
:
"blur"
}
],
vendorCode
:
[
{
required
:
true
,
message
:
"供应商不能为空"
,
trigger
:
"blur"
}
],
itemCode
:
[
{
required
:
true
,
message
:
"物料不能为空"
,
trigger
:
"blur"
}
],
quantityRecived
:
[
{
required
:
true
,
message
:
"本次接收数量不能为空"
,
trigger
:
"blur"
}
],
quantityCheck
:
[
{
required
:
true
,
message
:
"本次检测数量不能为空"
,
trigger
:
"blur"
}
],
reciveDate
:[
{
required
:
true
,
message
:
"清选择来料日期"
,
trigger
:
"blur"
}
],
inspectDate
:[
{
required
:
true
,
message
:
"清选择检验日期"
,
trigger
:
"blur"
}
]
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询来料检验单列表 */
getList
()
{
this
.
loading
=
true
;
listIqc
(
this
.
queryParams
).
then
(
response
=>
{
this
.
iqcList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
iqcId
:
null
,
iqcCode
:
null
,
iqcName
:
null
,
templateId
:
null
,
vendorId
:
null
,
vendorCode
:
null
,
vendorName
:
null
,
vendorNick
:
null
,
vendorBatch
:
null
,
itemId
:
null
,
itemCode
:
null
,
itemName
:
null
,
specification
:
null
,
unitOfMeasure
:
null
,
quantityMinCheck
:
null
,
quantityMaxUnqualified
:
null
,
quantityRecived
:
null
,
quantityCheck
:
null
,
quantityUnqualified
:
null
,
crRate
:
null
,
majRate
:
null
,
minRate
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
null
,
reciveDate
:
null
,
inspectDate
:
null
,
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
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
iqcId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加来料检验单"
;
this
.
optType
=
'add'
;
}
,
//查看明细
handleView
(
row
){
this
.
reset
();
const
iqcId
=
row
.
iqcId
||
this
.
ids
;
getIqc
(
iqcId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"查看来料检验单信息"
;
this
.
optType
=
"view"
;
}
);
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
iqcId
=
row
.
iqcId
||
this
.
ids
getIqc
(
iqcId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改来料检验单"
;
this
.
optType
=
'edit'
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
iqcId
!=
null
)
{
updateIqc
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
//this.open = false;
this
.
getList
();
}
);
}
else
{
addIqc
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
//this.open = false;
this
.
form
.
iqcId
=
response
.
data
;
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
iqcIds
=
row
.
iqcId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除来料检验单编号为"'
+
iqcIds
+
'"的数据项?'
).
then
(
function
()
{
return
delIqc
(
iqcIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'qc/iqc/export'
,
{
...
this
.
queryParams
}
,
`iqc_${new Date().getTime()
}
.xlsx`
)
}
,
handleSelectProduct
(){
this
.
$refs
.
itemSelect
.
showFlag
=
true
;
}
,
//物料选择弹出框
onItemSelected
(
obj
){
debugger
;
if
(
obj
!=
undefined
&&
obj
!=
null
){
this
.
form
.
itemId
=
obj
.
itemId
;
this
.
form
.
itemCode
=
obj
.
itemCode
;
this
.
form
.
itemName
=
obj
.
itemName
;
this
.
form
.
specification
=
obj
.
specification
;
this
.
form
.
unitOfMeasure
=
obj
.
unitOfMeasure
;
}
}
,
handleSelectVendor
(){
this
.
$refs
.
vendorSelect
.
showFlag
=
true
;
}
,
//供应商选择弹出框
onVendorSelected
(
obj
){
debugger
;
if
(
obj
!=
undefined
&&
obj
!=
null
){
this
.
form
.
vendorId
=
obj
.
vendorId
;
this
.
form
.
vendorCode
=
obj
.
vendorCode
;
this
.
form
.
vendorName
=
obj
.
vendorName
;
this
.
form
.
vendorNick
=
obj
.
vendorNick
;
}
}
,
//自动生成编码
handleAutoGenChange
(
autoGenFlag
){
if
(
autoGenFlag
){
genCode
(
'QC_IQC_CODE'
).
then
(
response
=>
{
this
.
form
.
iqcCode
=
response
;
}
);
}
else
{
this
.
form
.
iqcCode
=
null
;
}
}
,
viewReport
(){
var
reportName
=
"Test"
;
getReport2
(
reportName
).
then
(
res
=>
{
debugger
;
let
blob
=
new
Blob
([
res
],{
type
:
'application/pdf'
}
);
let
href
=
URL
.
createObjectURL
(
blob
);
console
.
log
(
href
);
window
.
open
(
`/pdf/web/viewer.html?file=${encodeURIComponent(href)
}
`
);
}
);
}
}
}
;
<
/script
>
src/views/mes/qc/charge/iqcTable.vue
0 → 100644
View file @
2acaad05
<
template
>
<div
class=
"productOrderSpecification"
>
<table
border
class=
"form-header font-size-16"
style=
"table-layout: fixed;width: 100%;border:1px solid #000000;font-size:14px;line-height: 25px; margin: 8px 10px 5px 10px;"
>
<!-- -->
<tr
height=
"30"
class=
"color000"
>
<td
colspan=
"6"
align=
"center"
><img
width=
"140"
src=
"@/assets/logo/logo.png"
alt=
""
></td>
<td
colspan=
"18"
align=
"center"
><div
class=
"titles"
>
广州市宝绅科技应用有限公司
</div>
Guangzhou Baoshen Science
&
Applied Technologies Co., Ltd.
</td>
</tr>
<tr
height=
"35"
class=
"color000"
>
<td
colspan=
"24"
align=
"center"
><div
class=
"titles"
style=
"line-height: 40px;height:40px"
>
原材料检验记录表(
{{
body
.
vendorName
}}
)
</div></td>
</tr>
<tr
height=
"20"
class=
"color000"
>
<td
colspan=
"3"
align=
"center"
>
采购单号
</td>
<td
colspan=
"3"
align=
"center"
>
{{
body
.
saleNo
}}
</td>
<td
colspan=
"2"
align=
"center"
>
送货数量
</td>
<td
colspan=
"2"
align=
"center"
>
{{
body
.
quantity
}}
</td>
<td
colspan=
"2"
align=
"center"
>
不良品数
</td>
<td
colspan=
"2"
align=
"center"
style=
"word-wrap:break-word;word-break:break-all"
>
{{
body
.
quantityUnqualified
}}
</td>
<td
colspan=
"2"
align=
"center"
>
单位
</td>
<td
colspan=
"2"
align=
"center"
>
{{
body
.
unit
}}
</td>
<td
colspan=
"2"
align=
"center"
>
报检日期
</td>
<td
colspan=
"4"
align=
"center"
>
{{
body
.
checkTime
}}
</td>
</tr>
<tr
height=
"20"
class=
"color000"
>
<td
colspan=
"3"
align=
"center"
>
产品编号
</td>
<td
colspan=
"3"
align=
"center"
>
{{
body
.
sapItemCode
}}
</td>
<td
colspan=
"2"
align=
"center"
>
检验判定
</td>
<td
colspan=
"2"
align=
"center"
><dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"body.checkResult"
/></td>
<td
colspan=
"2"
align=
"center"
>
处理措施
</td>
<td
colspan=
"2"
align=
"center"
>
{{
body
.
checkStatus
}}
</td>
<td
colspan=
"2"
align=
"center"
>
产品名称
</td>
<td
colspan=
"2"
align=
"center"
>
{{
body
.
itemName
}}
</td>
<td
colspan=
"2"
align=
"center"
>
供应商名称
</td>
<td
colspan=
"4"
align=
"center"
style=
"word-wrap:break-word;word-break:break-all"
>
{{
body
.
vendorName
}}
</td>
</tr>
<tr
height=
"20"
class=
"color000"
style=
"font-weight: 400"
>
<td
colspan=
"1"
align=
"center"
>
序号
</td>
<td
colspan=
"2"
align=
"center"
>
检验项目
</td>
<td
colspan=
"15"
align=
"center"
>
检验标准
</td>
<td
colspan=
"4"
align=
"center"
>
检验结果
</td>
<td
colspan=
"2"
align=
"center"
>
判定
</td>
</tr>
<tr
height=
"20"
v-for=
"(item,index) in body.lineList"
:key=
"'processes' + index"
class=
"color000"
>
<td
colspan=
"1"
align=
"center"
>
{{
index
+
1
}}
</td>
<td
colspan=
"2"
align=
"center"
>
{{
item
.
qcTool
}}
</td>
<td
colspan=
"15"
align=
"center"
>
{{
item
.
indexName
}}
</td>
<td
colspan=
"4"
align=
"center"
>
{{
item
.
qualityCheckResults
}}
</td>
<td
colspan=
"2"
align=
"center"
><dict-tag
:options=
"dict.type.ver_item_determination"
:value=
"item.status"
/></td>
</tr>
<tr
height=
"40"
class=
"color000"
>
<td
colspan=
"2"
align=
"center"
>
备注
</td>
<td
colspan=
"22"
align=
"center"
style=
"word-wrap:break-word;word-break:break-all; height: 40px;line-height:15px;font-size: 13px"
>
(1)品牌或客户指定材料供应商的,按照其标准或要求执行: (2)品牌或客户的标准高于内部标准的,按照品牌或客户的标准执行:
<br>
(3)品牌或客户无具体标准要求的,按照内部标准执行;(4)★表示月度抽检测试项目,※表示周抽检项目;●表示年度测试项目;
</td>
</tr>
</table>
</div>
</
template
>
<
script
>
import
dayjs
from
'dayjs'
export
default
{
props
:
[
'iqcTable'
],
dicts
:
[
"ver_item_determination"
,
"mes_qc_result"
],
data
()
{
return
{
date
:
dayjs
().
format
(
'YYYY-MM-DD'
),
// body: {
// "saleNo": "采购单号/purchaseOrderNo",
// "quantity": "1",
// "unit": "单位/baseunit",
// "sapItemCode": "产品编码",
// "vendorCode": "工银上编码",
// "vendorName": "供应商名称/vendorName",
// "logoUrl": "http://192.168.3.181:81/downdir/logo444.png",
// "itemName": "产品名称",
// "quantityUnqualified":"1",
// "checkTime": "报检日期/提交时间",
// "lineList": [
// {
// "seqNo": "序号",
// "iqcItemName": "检验项目/qcIqcLineList.",
// "iqcItemBaseDesc": "检验标准/qcIqcLineList.",
// "checkResult": "检测结果/qcIqcLineList.",
// "checkStatus": "判定/qcIqcLineList."
// }
// ]
// }
}
},
computed
:
{
body
(){
return
this
.
iqcTable
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.productOrderSpecification
{
position
:
relative
;
width
:
920px
;
height
:
1300px
;
padding
:
0
49px
;
padding-top
:
20px
;
box-sizing
:
border-box
;
}
.titles
{
text-align
:
center
;
font-size
:
22px
;
font-weight
:
500
;
}
.pageBottom
{
display
:
flex
;
justify-content
:
flex-end
;
width
:
850px
;
padding
:
0px
49px
;
color
:
#000
;
div
{
margin-left
:
100px
;
min-width
:
200px
;
}
}
[
text-center
]
{
text-align
:
center
;
}
.color000
{
color
:
#000
;
td
{
word-wrap
:break-word
;
word-break
:break-all
}
}
</
style
>
src/views/mes/qc/charge/iqcline.vue
0 → 100644
View file @
2acaad05
<
template
>
<div
class=
"app-container"
>
<el-table
v-loading=
"loading"
:data=
"iqclineList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"检验名称"
width=
"100px"
align=
"center"
prop=
"qcTool"
/>
<el-table-column
label=
"检验要求"
align=
"center"
prop=
"indexName"
>
</el-table-column>
<el-table-column
label=
"项目判定"
width=
"100px"
align=
"center"
prop=
"qualityCheckResults"
/>
<el-table-column
label=
"判定"
width=
"100px"
align=
"center"
prop=
"checkMethod"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.ver_item_determination"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<Defectrecord
ref=
"defectDialog"
:qcId=
"defect_iqcid"
:lineId=
"defect_lineid"
:qcType=
"defect_qctype"
:optType=
"optType"
></Defectrecord>
</div>
</template>
<
script
>
import
{
listIqcline
,
getIqcline
,
delIqcline
,
addIqcline
,
updateIqcline
}
from
"@/api/mes/qc/iqcline"
;
import
Defectrecord
from
"../defectrecord/index.vue"
export
default
{
name
:
"IqcLine"
,
dicts
:
[
'mes_index_type'
,
'ver_item_determination'
],
props
:{
iqcId
:
null
,
optType
:
null
,
},
components
:{
Defectrecord
},
data
()
{
return
{
defect_iqcid
:
null
,
defect_lineid
:
null
,
defect_qctype
:
'IQC'
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 来料检验单行表格数据
iqclineList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
iqcId
:
this
.
iqcId
,
indexId
:
null
,
indexCode
:
null
,
indexName
:
null
,
indexType
:
null
,
qcTool
:
null
,
checkMethod
:
null
,
standerVal
:
null
,
unitOfMeasure
:
null
,
thresholdMax
:
null
,
thresholdMin
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
},
// 表单参数
form
:
{},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询来料检验单行列表 */
getList
()
{
debugger
;
this
.
loading
=
true
;
listIqcline
(
this
.
queryParams
).
then
(
response
=>
{
this
.
iqclineList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
lineId
:
null
,
iqcId
:
this
.
iqcId
,
indexId
:
null
,
indexCode
:
null
,
indexName
:
null
,
indexType
:
null
,
qcTool
:
null
,
checkMethod
:
null
,
standerVal
:
null
,
unitOfMeasure
:
null
,
thresholdMax
:
null
,
thresholdMin
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
remark
:
null
,
attr1
:
null
,
attr2
:
null
,
attr3
:
null
,
attr4
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
lineId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
handleDefect
(
row
){
this
.
defect_iqcid
=
row
.
iqcId
;
this
.
defect_lineid
=
row
.
lineId
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
defectDialog
.
showFlag
=
true
;
this
.
$refs
.
defectDialog
.
getList
();
})
}
}
};
</
script
>
src/views/mes/qc/iqc/index.vue
View file @
2acaad05
...
...
@@ -34,6 +34,12 @@
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"产品/原料"
prop=
"iqcType"
>
<el-select
v-model=
"queryParams.iqcType"
placeholder=
"请选择产品/原料"
clearable
>
<el-option
v-for=
"dict in dict.type.IQC_TYPE"
: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>
...
...
@@ -282,7 +288,7 @@ export default {
name
:
"Ipqc"
,
directives
:
{
print
}
,
components
:
{
WorkorderSelect
,
WorkuintSelect
,
iqcline
,
iqcTable
}
,
dicts
:
[
'mes_ipqc_type_pc'
,
'mes_qc_result'
,
'mes_order_status'
],
dicts
:
[
'mes_ipqc_type_pc'
,
'mes_qc_result'
,
'mes_order_status'
,
'IQC_TYPE'
],
data
()
{
return
{
autoGenFlag
:
false
,
...
...
@@ -365,6 +371,7 @@ export default {
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
null
,
type
:
null
,
inspectDate
:
null
,
inspector
:
null
,
status
:
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