Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
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
ximai
mes-pad
Commits
f620d844
Commit
f620d844
authored
Mar 28, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改质量按钮字典和列表去掉字段
parent
922a8335
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
217 additions
and
210 deletions
+217
-210
index.vue
pages/mes/qc/index.vue
+217
-210
No files found.
pages/mes/qc/index.vue
View file @
f620d844
...
...
@@ -13,8 +13,7 @@
</view>
<view
class=
"grid-text"
>
首检确认
</view>
</view>
-->
<view
class=
"button-frame"
:class=
"
{'active': qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type2"
@click="handleClickBtn(qcType.value )">
<view
class=
"button-frame"
:class=
"
{ active: qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type2" @click="handleClickBtn(qcType.value)">
<!--
<view
class=
"shortcut-icon icon-color01"
>
<image
class=
"icon-button"
src=
"/static/icons/png/pro.png"
/>
</view>
-->
...
...
@@ -30,21 +29,20 @@
<view
class=
"btnbox"
>
<u-button
v-if=
"getAddShow()"
type=
"success"
size=
"medium"
@
click=
"handleAddClick"
>
新增
</u-button>
</view>
<scroll-view
scroll-y=
"true"
class=
"scroll-list"
:style=
"
{
'height': (this.screenHeight -280)
+ 'px' }">
<scroll-view
scroll-y=
"true"
class=
"scroll-list"
:style=
"
{
height: this.screenHeight - 280
+ 'px' }">
<uni-table
ref=
"qcTable"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<!--
<zb-table
:columns=
"tableColumn"
:stripe=
"true"
@
rowClick=
"rowClick"
--
>
<!-- @toggleRowSelection="toggleRowSelection" @toggleAllSelection="toggleAllSelection" :border="true"-->
<!-- :data="tableData">
</zb-table>
-->
<uni-tr>
<uni-th
width=
"160px"
align=
"center"
>
检验单编号
</uni-th>
<
uni-th
width=
"160px"
align=
"center"
>
检验单名称
</uni-th
>
<
uni-th
width=
"150px"
align=
"center"
>
检验类型
</uni-th
>
<
!--
<uni-th
width=
"160px"
align=
"center"
>
检验单名称
</uni-th>
--
>
<
!--
<uni-th
width=
"150px"
align=
"center"
>
检验类型
</uni-th>
--
>
<uni-th
width=
"150px"
align=
"center"
>
工单编号
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
产品物料编码
</uni-th>
<uni-th
width=
"180px"
align=
"center"
>
产品物料名称
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
规格型号
</uni-th>
<
uni-th
width=
"100px"
align=
"center"
>
单位
</uni-th
>
<
!--
<uni-th
width=
"100px"
align=
"center"
>
单位
</uni-th>
--
>
<uni-th
width=
"100px"
align=
"center"
>
检测数量
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
检测结果
</uni-th>
<uni-th
width=
"120px"
align=
"center"
>
检测日期
</uni-th>
...
...
@@ -52,38 +50,38 @@
<uni-th
width=
"150px"
align=
"center"
>
单据状态
</uni-th>
<uni-th
width=
"150px"
align=
"center"
>
操作
</uni-th>
</uni-tr>
<uni-tr
v-for=
"(line,index) in qcList"
:key=
"index"
>
<uni-tr
v-for=
"(line,
index) in qcList"
:key=
"index"
>
<uni-td
align=
"center"
>
{{
line
.
ipqcCode
}}
</uni-td>
<
uni-td
align=
"center"
>
{{
line
.
ipqcName
}}
</uni-td
>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_ipqc_type2"
:value=
"line.ipqcType"
/>
</uni-td>
<
!--
<uni-td
align=
"center"
>
{{
line
.
ipqcName
}}
<ss
/
uni-td
>
--
>
<
!--
<
uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_ipqc_type2"
:value=
"line.ipqcType"
/>
</uni-td>
-->
<uni-td>
{{
line
.
workorderCode
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
itemCode
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
itemName
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
specification
}}
</uni-td>
<
uni-td
align=
"center"
>
{{
line
.
quantityCheck
}}
</uni-td
>
<
!--
<uni-td
align=
"center"
>
{{
line
.
quantityCheck
}}
</uni-td>
--
>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"line.checkResult"
/>
<dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"line.checkResult"
/>
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
unitOfMeasure
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
inspectDate
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
inspector
}}
</uni-td>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_order_status"
:value=
"line.status"
/>
<dict-tag
:options=
"dict.type.mes_order_status"
:value=
"line.status"
/>
</uni-td>
<uni-td>
<view
class=
"uni-group"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.ipqcType === 'SJQR'
&&line.quantityCheck>=line.maxNum"
@
click=
"qcLineClick(line)"
>
查看确认
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.ipqcType === 'SJQR'
&& line.quantityCheck >= line.maxNum"
@
click=
"qcLineClick(line)"
>
查看确认
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.ipqcType !== 'SJQR'&&line.quantityCheck>=line.maxNum"
@
click=
"qcLineClick(line)"
>
查看编辑
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.ipqcType !== 'SJQR' && line.quantityCheck >= line.maxNum"
@
click=
"qcLineClick(line)"
>
查看编辑
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.quantityCheck >= line.maxNum && line.ipqcType === 'SJQR'"
@
click=
"firstCONFIRMED(line)"
>
确认
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.quantityCheck>=line.maxNum&&line.ipqcType === 'SJQR'"
@
click=
"firstCONFIRMED(line)"
>
确认
</button>
</view>
</uni-td>
</uni-tr>
...
...
@@ -95,14 +93,12 @@
</view>
</view>
<u-modal
width=
"90%"
v-model=
"qcModalFlag"
:showConfirmButton=
true
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-modal
width=
"90%"
v-model=
"qcModalFlag"
:showConfirmButton=
"true"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-form
ref=
"qcForm"
label-width=
"90px"
>
<u-row>
<u-col
span=
"5"
>
<u-form-item
label=
"任务编号"
>
<SearchInput
v-model=
"qcForm.taskCode"
placeholder=
"请输入任务编号"
hassearchbtn=
"true"
@
serach=
"searchTask"
/>
<SearchInput
v-model=
"qcForm.taskCode"
placeholder=
"请输入任务编号"
hassearchbtn=
"true"
@
serach=
"searchTask"
/>
</u-form-item>
</u-col>
<u-col
span=
"3"
>
...
...
@@ -141,8 +137,7 @@
<u-col
span=
"12"
>
<u-form-item
label=
"检测人员"
prop=
"inspector"
>
<!--
<u-input
v-model=
"qcForm.inspector"
></u-input>
-->
<zxz-uni-data-select
v-model=
"qcForm.inspector"
filterable
multiple
dataKey=
"label"
dataValue=
"value"
:localdata=
"qcUserList"
@
change=
"change"
></zxz-uni-data-select>
<zxz-uni-data-select
v-model=
"qcForm.inspector"
filterable
multiple
dataKey=
"label"
dataValue=
"value"
:localdata=
"qcUserList"
@
change=
"change"
></zxz-uni-data-select>
</u-form-item>
</u-col>
</u-row>
...
...
@@ -173,7 +168,7 @@
<uni-th
width=
"100px"
align=
"center"
>
轻微缺陷数量
</uni-th>
<uni-th
width=
"150px"
align=
"center"
>
操作
</uni-th>
</uni-tr>
<uni-tr
v-for=
"(line,index) in qcLines"
:key=
"index"
>
<uni-tr
v-for=
"(line,
index) in qcLines"
:key=
"index"
>
<uni-td
align=
"center"
>
{{
line
.
indexName
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
qcTool
}}
</uni-td>
<uni-td>
{{
line
.
checkMethod
}}
</uni-td>
...
...
@@ -186,9 +181,7 @@
<uni-td
align=
"center"
>
{{
line
.
minQuantity
}}
</uni-td>
<uni-td>
<view
class=
"uni-group"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
@
click=
"qcLineItemClick(line)"
>
缺陷登记
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
@
click=
"qcLineItemClick(line)"
>
缺陷登记
</button>
</view>
</uni-td>
</uni-tr>
...
...
@@ -197,47 +190,53 @@
</scroll-view>
</u-modal>
<u-modal
width=
"80%"
v-model=
"qcMsgVisible"
:showConfirmButton=
false
:showCancelButton=
"true"
title=
"检验通知"
content=
"操作内容"
>
<scroll-view
scroll-y=
"true"
scroll-x=
"true"
class=
"line-list"
>
<view
class=
"line-content"
>
<uni-table
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
<uni-th
width=
"60px"
align=
"center"
>
单号
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业单元
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
用户
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业单元
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
单位
</uni-th>
<uni-th
width=
"60px"
align=
"center"
>
状态
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业人
</uni-th>
<uni-th
width=
"110px"
align=
"center"
>
请求检验时间
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
检验人
</uni-th>
</uni-tr>
<uni-tr
v-for=
"(line,index) in qcLines"
:key=
"index"
>
<uni-td
align=
"center"
>
{{
line
.
indexName
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
qcTool
}}
</uni-td>
<uni-td>
{{
line
.
checkMethod
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
standerVal
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
unitOfMeasure
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
thresholdMax
}}
</uni-td>
<uni-td
align=
"center"
>
{{
'0'
}}
</uni-td>
<uni-td>
<view
class=
"uni-group"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
>
缺陷登记
</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</scroll-view>
<u-modal
width=
"80%"
v-model=
"qcMsgVisible"
:showConfirmButton=
"false"
:showCancelButton=
"true"
title=
"检验通知"
content=
"操作内容"
>
<scroll-view
scroll-y=
"true"
scroll-x=
"true"
class=
"line-list"
>
<view
class=
"line-content"
>
<uni-table
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
<uni-th
width=
"60px"
align=
"center"
>
单号
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业单元
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
用户
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业单元
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
单位
</uni-th>
<uni-th
width=
"60px"
align=
"center"
>
状态
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
作业人
</uni-th>
<uni-th
width=
"110px"
align=
"center"
>
请求检验时间
</uni-th>
<uni-th
width=
"90px"
align=
"center"
>
检验人
</uni-th>
</uni-tr>
<uni-tr
v-for=
"(line, index) in qcLines"
:key=
"index"
>
<uni-td
align=
"center"
>
{{
line
.
indexName
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
qcTool
}}
</uni-td>
<uni-td>
{{
line
.
checkMethod
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
standerVal
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
unitOfMeasure
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
thresholdMax
}}
</uni-td>
<uni-td
align=
"center"
>
{{
'0'
}}
</uni-td>
<uni-td>
<view
class=
"uni-group"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
>
缺陷登记
</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</scroll-view>
</u-modal>
<u-modal
width=
"80%"
v-model=
"qcFirstVisible"
@
close=
"getIpqcList"
@
cancel=
"getIpqcList"
:showConfirmButton=
false
:showCancelButton=
"true"
title=
"首检确认"
content=
"操作内容"
>
<u-modal
width=
"80%"
v-model=
"qcFirstVisible"
@
close=
"getIpqcList"
@
cancel=
"getIpqcList"
:showConfirmButton=
"false"
:showCancelButton=
"true"
title=
"首检确认"
content=
"操作内容"
>
<scroll-view
scroll-y=
"true"
scroll-x=
"true"
class=
"line-list"
>
<view
class=
"line-content"
>
<uni-table
style=
"min-height: 900rpx
;
"
>
<uni-table
style=
"min-height: 900rpx"
>
<uni-tr>
<uni-th
width=
"160px"
align=
"center"
>
检验单编号
</uni-th>
<uni-th
width=
"160px"
align=
"center"
>
检验单名称
</uni-th>
...
...
@@ -254,11 +253,11 @@
<uni-th
width=
"150px"
align=
"center"
>
单据状态
</uni-th>
<uni-th
width=
"150px"
align=
"center"
>
操作
</uni-th>
</uni-tr>
<uni-tr
v-for=
"(line,index) in qcFirstLines"
:key=
"index"
>
<uni-tr
v-for=
"(line,
index) in qcFirstLines"
:key=
"index"
>
<uni-td
align=
"center"
>
{{
line
.
ipqcCode
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
ipqcName
}}
</uni-td>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_ipqc_type2"
:value=
"line.ipqcType"
/>
<dict-tag
:options=
"dict.type.mes_ipqc_type2"
:value=
"line.ipqcType"
/>
</uni-td>
<uni-td>
{{
line
.
workorderCode
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
itemCode
}}
</uni-td>
...
...
@@ -266,20 +265,18 @@
<uni-td
align=
"center"
>
{{
line
.
specification
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
quantityCheck
}}
</uni-td>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"line.checkResult"
/>
<dict-tag
:options=
"dict.type.mes_qc_result"
:value=
"line.checkResult"
/>
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
unitOfMeasure
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
inspectDate
}}
</uni-td>
<uni-td
align=
"center"
>
{{
line
.
inspector
}}
</uni-td>
<uni-td
align=
"center"
>
<dict-tag
:options=
"dict.type.mes_order_status"
:value=
"line.status"
/>
<dict-tag
:options=
"dict.type.mes_order_status"
:value=
"line.status"
/>
</uni-td>
<uni-td>
<view
class=
"uni-group"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.quantityCheck>=line.maxNum"
@
click=
"firstCONFIRMED(line)"
>
确认
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"line.quantityCheck >= line.maxNum"
@
click=
"firstCONFIRMED(line)"
>
确认
</button>
</view>
</uni-td>
</uni-tr>
...
...
@@ -288,16 +285,20 @@
</scroll-view>
</u-modal>
<u-modal
width=
"760px"
v-model=
"qcEditModalFlag"
:showConfirmButton=
false
:showCancelButton=
"true"
title=
"请填写出货检验单"
content=
"操作内容"
>
<u-form
ref=
"qcEditForm"
label-width=
"100px"
:model=
"qcEditForm"
:rules=
"qcEditRules"
>
</u-form>
<u-modal
width=
"760px"
v-model=
"qcEditModalFlag"
:showConfirmButton=
"false"
:showCancelButton=
"true"
title=
"请填写出货检验单"
content=
"操作内容"
>
<u-form
ref=
"qcEditForm"
label-width=
"100px"
:model=
"qcEditForm"
:rules=
"qcEditRules"
></u-form>
</u-modal>
<u-modal
width=
"80%"
v-model=
"deffectModalFlag"
@
confirm=
"subQcdeffect"
@
cancel=
"getTemplateLineList"
confirm-text=
"提交"
:showConfirmButton=
true
:showCancelButton=
true
title=
"缺陷登记"
>
<u-modal
width=
"80%"
v-model=
"deffectModalFlag"
@
confirm=
"subQcdeffect"
@
cancel=
"getTemplateLineList"
confirm-text=
"提交"
:showConfirmButton=
"true"
:showCancelButton=
"true"
title=
"缺陷登记"
>
<u-button
@
click=
"addQcdeffect"
>
新增
</u-button>
<uni-card
v-for=
"item in defectrecordList"
>
<u-form
label-width=
"100px"
>
...
...
@@ -315,8 +316,7 @@
<u-col>
<u-form-item
label=
"缺陷等级"
>
<u-radio-group
v-model=
"item.defectLevel"
>
<u-radio
:name=
"item.value"
v-for=
"item in dict.type.mes_defect_level"
v-key=
"item.value"
>
<u-radio
:name=
"item.value"
v-for=
"item in dict.type.mes_defect_level"
v-key=
"item.value"
>
{{
item
.
label
}}
</u-radio>
</u-radio-group>
...
...
@@ -330,11 +330,11 @@
</
template
>
<
script
>
import
SearchInput
from
"@/components/ScanInput/index.vue"
;
import
SearchInput
from
'@/components/ScanInput/index.vue'
;
import
UButton
from
'../../../uview-ui/components/u-button/u-button.vue'
;
export
default
{
name
:
"QcContent"
,
name
:
'QcContent'
,
components
:
{
SearchInput
,
UButton
...
...
@@ -363,19 +363,24 @@ export default {
qcMsgVisible
:
false
,
//所有检测单的列表
qcList
:
[],
qcUserList
:
[{
value
:
0
,
label
:
'admin'
},
{
value
:
1
,
label
:
'张三'
},
{
value
:
2
,
label
:
'李四'
},
{
value
:
3
,
label
:
'王五'
}],
qcUserList
:
[
{
value
:
0
,
label
:
'admin'
},
{
value
:
1
,
label
:
'张三'
},
{
value
:
2
,
label
:
'李四'
},
{
value
:
3
,
label
:
'王五'
}
],
taskInfo
:
{},
curQcType
:
''
,
defectrecordList
:
[],
...
...
@@ -383,7 +388,7 @@ export default {
deffectModalFlag
:
false
,
qcFirstVisible
:
false
,
qcFirstLines
:
[]
}
}
;
},
created
()
{
//获取屏幕高度
...
...
@@ -392,24 +397,24 @@ export default {
console
.
log
(
'windowHeight:'
+
res
.
windowHeight
);
this
.
screenHeight
=
res
.
windowHeight
;
}
})
this
.
getIpqcList
()
})
;
this
.
getIpqcList
()
;
},
methods
:
{
async
firstCONFIRMED
(
item
)
{
const
res
=
await
this
.
$u
.
api
.
changeState
({
ipqcId
:
item
.
ipqcId
,
status
:
'CONFIRMED'
})
const
res
=
await
this
.
$u
.
api
.
changeState
({
ipqcId
:
item
.
ipqcId
,
status
:
'CONFIRMED'
});
if
(
res
.
code
===
200
)
{
this
.
getQcFirstLines
();
}
},
async
getIpqcList
(
type
)
{
const
res
=
await
this
.
$u
.
api
.
ipqcList
({
ipqcType
:
type
})
const
res
=
await
this
.
$u
.
api
.
ipqcList
({
ipqcType
:
type
});
if
(
res
.
code
===
200
)
{
this
.
qcList
=
res
.
rows
;
}
},
async
getQcFirstLines
()
{
const
res
=
await
this
.
$u
.
api
.
ipqcList
({
status
:
'PREPARE'
})
const
res
=
await
this
.
$u
.
api
.
ipqcList
({
status
:
'PREPARE'
});
if
(
res
.
code
===
200
)
{
this
.
qcFirstLines
=
res
.
rows
;
}
...
...
@@ -417,7 +422,7 @@ export default {
async
searchTask
(
val
)
{
const
res
=
await
this
.
$u
.
api
.
getTaskInfoByTaskCode
({
taskCode
:
val
})
})
;
if
(
res
.
code
===
200
)
{
if
(
!
res
.
data
)
{
this
.
$u
.
toast
(
'暂未查询到任务订单信息!'
);
...
...
@@ -429,52 +434,52 @@ export default {
async
submitIpqc
(
status
=
'PREPARE'
)
{
if
(
!
this
.
taskInfo
)
{
this
.
$u
.
toast
(
'请输入任务单号!'
);
return
return
;
}
const
ipqcCode
=
await
this
.
$u
.
api
.
getIpqcCode
()
const
ipqcCode
=
await
this
.
$u
.
api
.
getIpqcCode
()
;
const
param
=
{
"ipqcId"
:
this
.
qcForm
.
ipqcId
,
"ipqcCode"
:
ipqcCode
,
"ipqcName"
:
this
.
qcForm
.
ipqcName
,
"ipqcType"
:
this
.
curQcType
,
"templateId"
:
null
,
"workorderId"
:
this
.
taskInfo
.
workorderId
,
"workorderCode"
:
this
.
taskInfo
.
workorderCode
,
"workorderName"
:
this
.
taskInfo
.
workorderName
,
"taskId"
:
this
.
taskInfo
.
taskId
,
"taskCode"
:
this
.
taskInfo
.
taskCode
,
"taskName"
:
this
.
taskInfo
.
taskName
,
"workstationId"
:
this
.
taskInfo
.
workstationId
,
"workstationCode"
:
this
.
taskInfo
.
workstationCode
,
"workstationName"
:
this
.
taskInfo
.
workstationName
,
"processId"
:
this
.
taskInfo
.
processId
,
"processCode"
:
this
.
taskInfo
.
processCode
,
"processName"
:
this
.
taskInfo
.
processName
,
"itemId"
:
this
.
taskInfo
.
itemId
,
"itemCode"
:
this
.
taskInfo
.
itemCode
,
"itemName"
:
this
.
taskInfo
.
itemName
,
"specification"
:
this
.
taskInfo
.
specification
,
"unitOfMeasure"
:
this
.
taskInfo
.
unitOfMeasure
,
"quantityCheck"
:
this
.
qcForm
.
quantityCheck
,
"quantityUnqualified"
:
this
.
qcForm
.
quantityUnqualified
,
"quantityQualified"
:
this
.
qcForm
.
quantityQualified
,
"crRate"
:
null
,
"majRate"
:
null
,
"minRate"
:
null
,
"crQuantity"
:
null
,
"majQuantity"
:
null
,
"minQuantity"
:
null
,
"checkResult"
:
this
.
qcForm
.
checkResult
,
"inspectDate"
:
new
Date
(),
"inspector"
:
this
.
vuex_user
.
userName
,
"status"
:
"PREPARE"
,
}
const
res
=
await
this
.
$u
.
api
.
addIpqc
(
param
)
ipqcId
:
this
.
qcForm
.
ipqcId
,
ipqcCode
:
ipqcCode
,
ipqcName
:
this
.
qcForm
.
ipqcName
,
ipqcType
:
this
.
curQcType
,
templateId
:
null
,
workorderId
:
this
.
taskInfo
.
workorderId
,
workorderCode
:
this
.
taskInfo
.
workorderCode
,
workorderName
:
this
.
taskInfo
.
workorderName
,
taskId
:
this
.
taskInfo
.
taskId
,
taskCode
:
this
.
taskInfo
.
taskCode
,
taskName
:
this
.
taskInfo
.
taskName
,
workstationId
:
this
.
taskInfo
.
workstationId
,
workstationCode
:
this
.
taskInfo
.
workstationCode
,
workstationName
:
this
.
taskInfo
.
workstationName
,
processId
:
this
.
taskInfo
.
processId
,
processCode
:
this
.
taskInfo
.
processCode
,
processName
:
this
.
taskInfo
.
processName
,
itemId
:
this
.
taskInfo
.
itemId
,
itemCode
:
this
.
taskInfo
.
itemCode
,
itemName
:
this
.
taskInfo
.
itemName
,
specification
:
this
.
taskInfo
.
specification
,
unitOfMeasure
:
this
.
taskInfo
.
unitOfMeasure
,
quantityCheck
:
this
.
qcForm
.
quantityCheck
,
quantityUnqualified
:
this
.
qcForm
.
quantityUnqualified
,
quantityQualified
:
this
.
qcForm
.
quantityQualified
,
crRate
:
null
,
majRate
:
null
,
minRate
:
null
,
crQuantity
:
null
,
majQuantity
:
null
,
minQuantity
:
null
,
checkResult
:
this
.
qcForm
.
checkResult
,
inspectDate
:
new
Date
(),
inspector
:
this
.
vuex_user
.
userName
,
status
:
'PREPARE'
}
;
const
res
=
await
this
.
$u
.
api
.
addIpqc
(
param
)
;
if
(
res
.
code
===
200
)
{
this
.
getIpqcList
()
this
.
taskInfo
=
{}
this
.
qcForm
=
param
this
.
qcForm
.
ipqcId
=
res
.
data
this
.
getIpqcList
()
;
this
.
taskInfo
=
{}
;
this
.
qcForm
=
param
;
this
.
qcForm
.
ipqcId
=
res
.
data
;
this
.
getTemplateLineList
();
this
.
$u
.
toast
(
'创建质检单成功!'
);
}
else
{
...
...
@@ -482,38 +487,40 @@ export default {
}
},
getTemplateLineList
()
{
this
.
$u
.
api
.
getIpqcLineList
({
ipqcId
:
this
.
qcForm
.
ipqcId
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
qcLines
=
res
.
rows
;
}
});
this
.
$u
.
api
.
getIpqcLineList
({
ipqcId
:
this
.
qcForm
.
ipqcId
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
qcLines
=
res
.
rows
;
}
});
},
handleAddClick
()
{
this
.
qcForm
=
{}
this
.
qcForm
=
{}
;
this
.
qcModalFlag
=
true
;
},
getAddShow
()
{
const
type
=
this
.
curQcType
switch
(
type
)
{
const
type
=
this
.
curQcType
;
switch
(
type
)
{
case
'FIRST'
:
// 首检
return
true
return
true
;
case
'FINAL'
:
// 末检
return
true
return
true
;
case
'PATROL'
:
// 巡检
return
true
return
true
;
case
'FQC'
:
// 终检
return
true
return
true
;
default
:
return
false
}
return
false
;
}
},
handleClickBtn
(
type
)
{
this
.
qcForm
=
{}
this
.
qcForm
=
{}
;
this
.
curQcType
=
type
;
this
.
getIpqcList
(
type
)
console
.
log
(
type
,
'type'
)
this
.
getIpqcList
(
type
)
;
console
.
log
(
type
,
'type'
)
;
// if (type === 'QCMSG') {
// this.qcMsgVisible = true
// } else if (type === 'SJQR') {
...
...
@@ -525,50 +532,52 @@ export default {
},
qcLineClick
(
item
)
{
this
.
qcModalFlag
=
true
;
this
.
qcForm
=
item
console
.
log
(
this
.
qcForm
)
this
.
getTemplateLineList
()
this
.
qcForm
=
item
;
console
.
log
(
this
.
qcForm
)
;
this
.
getTemplateLineList
()
;
},
qcLineItemClick
(
item
)
{
this
.
qcLineItem
=
item
this
.
getDefectrecordList
()
this
.
qcLineItem
=
item
;
this
.
getDefectrecordList
()
;
this
.
deffectModalFlag
=
true
;
},
getDefectrecordList
(
ipqcId
,
lineId
)
{
this
.
$u
.
api
.
getDefectrecordList
({
qcType
:
this
.
qcForm
.
ipqcType
,
qcId
:
this
.
qcLineItem
.
ipqcId
,
lineId
:
this
.
qcLineItem
.
lineId
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
defectrecordList
=
res
.
rows
;
}
});
this
.
$u
.
api
.
getDefectrecordList
({
qcType
:
this
.
qcForm
.
ipqcType
,
qcId
:
this
.
qcLineItem
.
ipqcId
,
lineId
:
this
.
qcLineItem
.
lineId
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
defectrecordList
=
res
.
rows
;
}
});
},
addQcdeffect
()
{
this
.
defectrecordList
.
push
({
"recordId"
:
null
,
"qcId"
:
this
.
qcLineItem
.
ipqcId
,
"qcType"
:
this
.
qcForm
.
ipqcType
,
"lineId"
:
this
.
qcLineItem
.
lineId
,
"defectName"
:
""
,
"defectLevel"
:
"CR"
,
"defectQuantity"
:
1
,
"flag"
:
"add"
,
"remark"
:
null
})
recordId
:
null
,
qcId
:
this
.
qcLineItem
.
ipqcId
,
qcType
:
this
.
qcForm
.
ipqcType
,
lineId
:
this
.
qcLineItem
.
lineId
,
defectName
:
''
,
defectLevel
:
'CR'
,
defectQuantity
:
1
,
flag
:
'add'
,
remark
:
null
})
;
},
subQcdeffect
()
{
console
.
log
(
this
.
defectrecordList
)
this
.
$u
.
api
.
addDefectrecord
(
this
.
defectrecordList
).
then
(
res
=>
{
console
.
log
(
this
.
defectrecordList
)
;
this
.
$u
.
api
.
addDefectrecord
(
this
.
defectrecordList
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$u
.
toast
(
'提交缺陷成功!'
);
this
.
getDefectrecordList
()
this
.
getDefectrecordList
()
;
}
});
}
}
}
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -576,7 +585,7 @@ export default {
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
background-color
:
#
FEFEFF
;
background-color
:
#
fefeff
;
}
.content
{
...
...
@@ -594,10 +603,9 @@ export default {
padding-bottom
:
10px
;
}
.button-frame
{
height
:
80rpx
;
padding
:
40rpx
;
padding
:
40rpx
;
background-color
:
#e5eeff
;
border-radius
:
10px
;
box-shadow
:
2px
2px
3px
#888888
;
...
...
@@ -605,19 +613,19 @@ export default {
// flex-wrap: wrap;
align-items
:
center
;
justify-content
:
center
;
color
:
#0256
FF
;
color
:
#0256
ff
;
// place-items: center;
&
.active
{
background-color
:rgb
(
2
,
86
,
255
)
;
color
:
#fff
;
&
.active
{
background-color
:
rgb
(
2
,
86
,
255
);
color
:
#fff
;
}
}
.btnbox
{
.btnbox
{
// display:flex;
margin-bottom
:
20rpx
;
padding-left
:
20rpx
;
.u-btn
{
padding-left
:
20rpx
;
.u-btn
{
width
:
150rpx
;
}
}
...
...
@@ -643,7 +651,6 @@ export default {
font-size
:
26px
;
}
.line-list
{
width
:
100%
;
white-space
:
nowrap
;
...
...
@@ -686,4 +693,4 @@ export default {
margin
:
1rpx
auto
;
display
:
block
;
}
</
style
>
\ No newline at end of file
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment