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
7a07fb8c
Commit
7a07fb8c
authored
Apr 10, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:提交质量的修改
parent
2d2dd714
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
370 additions
and
105 deletions
+370
-105
http.api.js
common/http.api.js
+2
-0
User.vue
components/User/User.vue
+115
-0
userPersonnel.vue
pages/mes/prodReport/components/userPersonnel.vue
+43
-25
index.vue
pages/mes/qc/index.vue
+210
-80
No files found.
common/http.api.js
View file @
7a07fb8c
...
...
@@ -15,6 +15,8 @@ const install = (Vue, vm) => {
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/index'
,
params
),
getUserInfo
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/user/getUserInfo'
,
params
),
getUserList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/system/user/list'
,
params
),
getUserPrintInfo
:
()
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/system/print/printer'
),
getPrintDown
:
(
params
)
=>
...
...
components/User/User.vue
0 → 100644
View file @
7a07fb8c
<
template
>
<view
class=
"dmodel-table"
>
<view
class=
"search"
>
<u-form
:model=
"tableParams"
labelAlign=
"right"
class=
"tableForm"
>
<u-form-item
label=
"编号"
label-width=
"60px"
name=
"userName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.userName"
placeholder=
"请输入编号"
/>
</u-form-item>
<u-form-item
label=
"名称"
label-width=
"60px"
name=
"nickName"
>
<uni-easyinput
type=
"text"
v-model=
"tableParams.nickName"
placeholder=
"请输入名称"
/>
</u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"handleClick"
type=
"primary"
size=
"medium"
>
搜索
</u-button>
</u-form-item>
</u-form>
</view>
<view>
<zb-table
ref=
"zbTable"
rowKey=
"userName"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
></zb-table>
</view>
<view
class=
"uni-pagination-box"
><uni-pagination
show-icon
:page-size=
"params.pageSize"
:current=
"params.pageNum"
:total=
"total"
@
change=
"change"
/></view>
</view>
</
template
>
<
script
>
export
default
{
name
:
'User'
,
data
()
{
return
{
params
:
{
pageNum
:
1
,
pageSize
:
10
},
total
:
0
,
tableParams
:
{
nickName
:
null
,
userName
:
null
},
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[
{
type
:
'radio'
,
width
:
40
},
{
name
:
'userName'
,
label
:
'编号'
,
width
:
160
},
{
name
:
'nickName'
,
label
:
'名称'
,
width
:
200
}
]
};
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted
()
{
this
.
getList
();
},
methods
:
{
handleClick
(
){
if
(
this
.
tableParams
.
userName
)
{
this
.
params
.
userName
=
this
.
tableParams
.
userName
;
}
if
(
this
.
tableParams
.
nickName
)
{
this
.
params
.
nickName
=
this
.
tableParams
.
nickName
;
}
this
.
params
.
pageNum
=
1
this
.
getList
()
},
async
getList
()
{
const
res
=
await
this
.
$u
.
api
.
getUserList
(
this
.
params
);
console
.
log
(
res
,
'res'
);
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
;
this
.
total
=
res
.
total
;
}
},
// 分页触发
change
(
e
)
{
this
.
params
.
pageNum
=
e
.
current
this
.
getList
()
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
;
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.dmodel-table
{
height
:
1200rpx
;
margin-top
:
20rpx
;
padding
:
0
20rpx
;
position
:
relative
;
}
.tableForm
{
display
:
flex
;
margin-bottom
:
20rpx
;
}
.btn
{
margin-left
:
10px
;
}
.uni-pagination-box
{
position
:
absolute
;
right
:
20rpx
;
bottom
:
40rpx
;
}
</
style
>
pages/mes/prodReport/components/userPersonnel.vue
View file @
7a07fb8c
...
...
@@ -9,14 +9,17 @@
<uni-easyinput
type=
"text"
v-model=
"tableParams.nickName"
placeholder=
"请输入名称"
/>
</u-form-item>
<u-form-item>
<u-button
class=
"btn"
@
click=
"
getList
"
type=
"primary"
size=
"medium"
>
搜索
</u-button>
<u-button
class=
"btn"
@
click=
"
handleClick
"
type=
"primary"
size=
"medium"
>
搜索
</u-button>
</u-form-item>
</u-form>
</view>
<zb-table
ref=
"zbTable"
rowKey=
"recordId"
<view>
<zb-table
ref=
"zbTable"
rowKey=
"userName"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
>
</zb-table>
</view>
<view
class=
"uni-pagination-box"
><uni-pagination
show-icon
:page-size=
"params.pageSize"
:current=
"params.pageNum"
:total=
"total"
@
change=
"change"
/></view>
</view>
</
template
>
...
...
@@ -30,6 +33,12 @@
},
data
()
{
return
{
params
:
{
pageNum
:
1
,
pageSize
:
10
,
workstationId
:
this
.
data
?.
workstationId
||
null
},
total
:
0
,
tableParams
:
{
nickName
:
null
,
userName
:
null
,
...
...
@@ -56,7 +65,6 @@
label
:
'工作站'
,
width
:
160
,
},
],
}
},
...
...
@@ -70,29 +78,33 @@
// this.data.workstationName
},
methods
:
{
handleClick
(
){
if
(
this
.
tableParams
.
userName
)
{
this
.
params
.
userName
=
this
.
tableParams
.
userName
;
}
if
(
this
.
tableParams
.
nickName
)
{
this
.
params
.
nickName
=
this
.
tableParams
.
nickName
;
}
this
.
params
.
pageNum
=
1
this
.
getList
()
},
async
getList
()
{
let
params
=
{
pageNum
:
1
,
pageSize
:
10
,
workstationId
:
this
.
data
.
workstationId
}
if
(
this
.
userName
)
{
params
.
userName
=
this
.
tableParams
.
userName
}
if
(
this
.
nickName
)
{
params
.
nickName
=
this
.
tableParams
.
nickName
}
const
res
=
await
this
.
$u
.
api
.
userQuery
(
params
)
const
res
=
await
this
.
$u
.
api
.
userQuery
(
this
.
params
)
console
.
log
(
res
,
'res'
)
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
(
item
=>
{
return
{
...
item
,
workstationName
:
this
.
data
.
workstationName
}
})
}
this
.
tableData
=
res
.
rows
.
map
(
item
=>
{
return
{
...
item
,
workstationName
:
this
.
data
?.
workstationName
||
null
}
})
this
.
total
=
res
.
total
}
},
// 分页触发
change
(
e
)
{
this
.
params
.
pageNum
=
e
.
current
this
.
getList
()
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
...
...
@@ -101,11 +113,12 @@
}
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.dmodel-table
{
height
:
5
00
rpx
;
height
:
12
00rpx
;
margin-top
:
20rpx
;
padding
:
0
20rpx
;
position
:
relative
;
}
.tableForm
{
display
:
flex
;
...
...
@@ -114,4 +127,9 @@
.btn
{
margin-left
:
10px
;
}
.uni-pagination-box
{
position
:
absolute
;
right
:
20rpx
;
bottom
:
40rpx
;
}
</
style
>
pages/mes/qc/index.vue
View file @
7a07fb8c
...
...
@@ -38,19 +38,29 @@
<
template
slot=
"status"
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_order_status"
:value=
"scope.row.status"
/>
</
template
>
<
template
slot=
"operation"
slot-scope=
"scope"
>
<view
style=
"padding-top:
10rpx;
"
>
<
template
slot=
"operation"
slot-scope=
"scope"
>
<view
style=
"padding-top:
10rpx
"
>
<!-- 首检按钮判断FIRST开始 -->
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&(scope.row.status === 'PREPARE'||scope.row.status === 'PENDING')"
@
click=
"qcLineClick(scope.row)"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING')"
@
click=
"qcLineClick(scope.row, true, 'firstEdit')"
>
查看编辑
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&scope.row.status === 'CONFIRMED'"
@
click=
"qcLineClick(scope.row, false)"
>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED'"
@
click=
"qcLineClick(scope.row, false)"
>
查看
</button>
<!-- 首检按钮判断FIRST结束 -->
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'SJQR'"
@
click=
"qcLineClick(scope.row)"
>
查看确认
</button>
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"curQcType === 'SJQR'"
@
click=
"qcLineClick(scope.row,true, 'sjqrFinish')"
>
查看确认
</button>
<!--
<button
class=
"uni-button"
size=
"mini"
type=
"primary"
v-if=
"scope.row.ipqcType === 'SJQR'"
@
click=
"firstCONFIRMED(scope.row)"
>
确认
</button>
-->
...
...
@@ -60,7 +70,7 @@
</view>
</view>
<u-modal
width=
"90%"
@
confirm=
"submitIpqc"
v-model=
"qcModalFlag"
:showConfirmButton=
"showIpqcConfirmButton"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-modal
width=
"90%"
@
confirm=
"submitIpqc"
v-model=
"qcModalFlag"
:showConfirmButton=
"showIpqcConfirmButton"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-form
ref=
"qcForm"
label-width=
"90px"
>
<u-row>
<u-col
span=
"5"
>
...
...
@@ -86,25 +96,27 @@
<u-row>
<u-col
span=
"4"
>
<u-form-item
label=
"检测数量"
prop=
"quantityCheck"
>
<u-number-box
v-model=
"qcForm.quantityCheck"
></u-number-box>
<u-number-box
disabled
v-model=
"qcForm.quantityCheck"
></u-number-box>
</u-form-item>
</u-col>
<u-col
span=
"4"
>
<u-form-item
label=
"合格数量"
prop=
"quantityQualified"
>
<u-number-box
:min=
"0"
v-model=
"qcForm.quantityQualified"
></u-number-box>
<u-number-box
:min=
"0"
v-model=
"qcForm.quantityQualified"
@
change=
"handleChangeQuantityCheck"
></u-number-box>
</u-form-item>
</u-col>
<u-col
span=
"4"
>
<u-form-item
label=
"不合格数量"
prop=
"quantityUnqualified"
>
<u-number-box
:min=
"0"
v-model=
"qcForm.quantityUnqualified"
></u-number-box>
<u-number-box
:min=
"0"
v-model=
"qcForm.quantityUnqualified"
@
change=
"handleChangeQuantityCheck"
></u-number-box>
</u-form-item>
</u-col>
</u-row>
<u-row>
<u-col
span=
"
12
"
>
<u-form-item
label=
"检测人员"
prop=
"inspector"
>
<u-col
span=
"
4
"
>
<u-form-item
label=
"检测人员"
prop=
"inspector
Name
"
>
<!-- <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-input
readonly
v-model=
"qcForm.inspectorName"
></u-input>
<u-button
@
tap=
"userTempVisible = true"
type=
"success"
size=
"mini"
>
选择人员
</u-button>
</u-form-item>
</u-col>
</u-row>
...
...
@@ -117,7 +129,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
+
'index'"
>
<uni-tr
v-for=
"(line, index) in qcLines"
:key=
"index
+
'index'"
>
<uni-td
align=
"center"
>
{{ line.indexName }}
</uni-td>
<uni-td
align=
"center"
>
{{ line.checkMethod }}
</uni-td>
<uni-td
width=
"150px"
align=
"center"
>
...
...
@@ -130,6 +142,18 @@
</view>
</scroll-view>
</u-modal>
<u-modal
title=
"选择人员"
@
confirm=
"userDetermine()"
show-cancel-button
:title-style=
"{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model=
"userTempVisible"
width=
"1300rpx"
>
<view
class=
"feedback-card"
>
<user
ref=
"userRef"
v-if=
"userTempVisible"
/>
</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"
>
...
...
@@ -241,7 +265,7 @@
title=
"缺陷登记"
>
<u-button
@
click=
"addQcdeffect"
>
新增
</u-button>
<uni-card
v-for=
"
item in defectrecordList
"
>
<uni-card
v-for=
"
(item,index) in defectrecordList"
:key=
"index
"
>
<u-form
label-width=
"100px"
>
<u-row>
<u-col>
...
...
@@ -257,8 +281,8 @@
<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"
>
{{
item
.label }}
<u-radio
:name=
"
v.value"
v-for=
"v in dict.type.mes_defect_level"
:key=
"v
.value"
>
{{
v
.label }}
</u-radio>
</u-radio-group>
</u-form-item>
...
...
@@ -274,68 +298,144 @@
import
SearchInput
from
'@/components/ScanInput/index.vue'
;
import
UButton
from
'../../../uview-ui/components/u-button/u-button.vue'
;
import
UniEasyinput
from
'../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
;
import
User
from
'@/components/User/User.vue'
export
default
{
name
:
'QcContent'
,
components
:
{
SearchInput
,
UButton
,
UniEasyinput
UniEasyinput
,
User
},
dicts
:
[
'mes_ipqc_type'
,
'mes_qc_result'
,
'mes_order_status'
,
'mes_defect_level'
],
computed
:
{
tableColumn
()
{
if
(
this
.
curQcType
===
'FIRST'
||
this
.
curQcType
===
'SJQR'
)
{
return
this
.
tableSjColumn
}
else
{
return
this
.
tableDefaultColumn
}
}
},
data
()
{
return
{
tableColumn
:[
tableSjColumn
:
[
{
name
:
'ipqcCode'
,
label
:
'检验单编号'
,
align
:
'center'
,
width
:
200
},
{
name
:
'arrangeCode'
,
label
:
'编排单号'
,
align
:
'center'
,
width
:
200
},
{
name
:
'quantityCheck'
,
label
:
'检测数量'
,
align
:
'center'
,
width
:
80
},
{
name
:
'checkResult'
,
label
:
'检测结果'
,
align
:
'center'
,
type
:
'slot'
,
slot
:
'checkResult'
,
width
:
150
},
{
name
:
'inspectDate'
,
label
:
'检测日期'
,
align
:
'center'
,
width
:
80
},
{
name
:
'inspector'
,
label
:
'检测人员'
,
align
:
'center'
,
width
:
100
},
{
name
:
'status'
,
label
:
'单据状态'
,
align
:
'center'
,
width
:
80
,
type
:
'slot'
,
slot
:
'status'
},
{
name
:
'operation'
,
label
:
'操作'
,
slot
:
'operation'
,
type
:
'slot'
,
width
:
80
}
],
tableDefaultColumn
:
[
{
name
:
'ipqcCode'
,
label
:
'检验单编号'
,
align
:
'center'
,
width
:
120
},
{
name
:
'workorderCode'
,
label
:
'工单编号'
,
name
:
'arrangeCode'
,
label
:
'编排单号'
,
align
:
'center'
,
width
:
130
},
{
name
:
'itemCode'
,
label
:
'产品物料编码'
,
align
:
'center'
,
width
:
110
},
{
name
:
'itemName'
,
label
:
'产品物料名称'
,
align
:
'center'
,
width
:
130
},
{
name
:
'specification'
,
label
:
'规格型号'
,
align
:
'center'
,
width
:
100
},
{
name
:
'
checkResult
'
,
name
:
'
quantityCheck
'
,
label
:
'检测数量'
,
slot
:
'checkResult'
,
type
:
'slot'
,
align
:
'center'
,
width
:
80
},
{
name
:
'
unitOfMeasure
'
,
name
:
'
checkResult
'
,
label
:
'检测结果'
,
align
:
'center'
,
type
:
'slot'
,
slot
:
'checkResult'
,
width
:
80
},
{
name
:
'inspectDate'
,
label
:
'检测日期'
,
align
:
'center'
,
width
:
80
},
{
name
:
'inspector'
,
label
:
'检测人员'
,
align
:
'center'
,
width
:
100
},
{
name
:
'status'
,
label
:
'单据状态'
,
align
:
'center'
,
width
:
80
,
type
:
'slot'
,
slot
:
'status'
...
...
@@ -346,8 +446,9 @@ export default {
slot
:
'operation'
,
type
:
'slot'
,
width
:
80
}
,
}
],
userTempVisible
:
false
,
screenHeight
:
768
,
queryParams
:
{
pageNum
:
1
,
...
...
@@ -370,22 +471,22 @@ export default {
//所有检测单的列表
qcList
:
[],
qcUserList
:
[
{
value
:
0
,
label
:
'admin'
},
{
value
:
1
,
label
:
'张三'
},
{
value
:
2
,
label
:
'李四'
},
{
value
:
3
,
label
:
'王五'
}
//
{
//
value: 0,
//
label: 'admin'
//
},
//
{
//
value: 1,
//
label: '张三'
//
},
//
{
//
value: 2,
//
label: '李四'
//
},
//
{
//
value: 3,
//
label: '王五'
//
}
],
taskInfo
:
{},
curQcType
:
'FIRST'
,
...
...
@@ -405,10 +506,9 @@ export default {
this
.
screenHeight
=
res
.
windowHeight
;
}
});
this
.
getIpqcList
(
"FIRST"
);
},
mounted
()
{
this
.
getIpqcList
(
'FIRST'
);
},
mounted
()
{},
methods
:
{
async
firstCONFIRMED
(
item
)
{
const
res
=
await
this
.
$u
.
api
.
changeState
({
ipqcId
:
item
.
ipqcId
,
status
:
'CONFIRMED'
});
...
...
@@ -416,10 +516,15 @@ export default {
this
.
getIpqcList
();
}
},
userDetermine
()
{
console
.
log
(
this
.
$refs
.
userRef
.
tableSelectData
,
'this.$refs.userRef.tableSelectData'
);
this
.
qcForm
.
inspectorName
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
nickName
;
this
.
qcForm
.
inspector
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
userName
;
},
async
getIpqcList
(
type
)
{
let
params
=
{
ipqcType
:
type
}
let
params
=
{
ipqcType
:
type
||
this
.
curQcType
};
if
(
this
.
curQcType
==
'SJQR'
)
{
params
=
{
status
:
'PENDING'
}
params
=
{
status
:
'PENDING'
};
}
const
res
=
await
this
.
$u
.
api
.
ipqcList
(
params
);
if
(
res
.
code
===
200
)
{
...
...
@@ -446,31 +551,31 @@ export default {
async
submitIpqc
(
status
=
'PREPARE'
)
{
if
(
this
.
curQcType
==
'SJQR'
)
{
this
.
firstCONFIRMED
(
this
.
qcForm
)
return
this
.
firstCONFIRMED
(
this
.
qcForm
)
;
return
;
}
if
(
!
this
.
taskInfo
)
{
this
.
$u
.
toast
(
'请输入任务单号!'
);
return
;
}
const
qcIpqclineList
=
this
.
qcLines
.
map
(
item
=>
{
let
selectValues
=
item
.
selectValues
let
qualityCheckResults
=
item
.
qualityCheckResults
const
qcIpqclineList
=
this
.
qcLines
.
map
(
(
item
)
=>
{
let
selectValues
=
item
.
selectValues
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
if
(
item
.
inputType
==
2
)
{
selectValues
=
item
.
selectValues
.
map
(
item
=>
{
selectValues
=
item
.
selectValues
.
map
(
(
item
)
=>
{
return
{
name
:
item
.
value
}
})
selectValues
=
JSON
.
stringify
(
selectValues
)
qualityCheckResults
=
JSON
.
stringify
(
item
.
qualityCheckResults
)
}
;
})
;
selectValues
=
JSON
.
stringify
(
selectValues
)
;
qualityCheckResults
=
JSON
.
stringify
(
item
.
qualityCheckResults
)
;
}
return
{
...
item
,
selectValues
,
qualityCheckResults
}
})
}
;
})
;
const
ipqcCode
=
await
this
.
$u
.
api
.
getIpqcCode
();
const
param
=
{
ipqcId
:
this
.
qcForm
.
ipqcId
,
...
...
@@ -507,7 +612,7 @@ export default {
checkResult
:
this
.
qcForm
.
checkResult
,
workorderId
:
this
.
qcForm
.
workorderId
,
inspectDate
:
new
Date
(),
inspector
:
this
.
vuex_user
.
userName
,
inspector
:
this
.
qcForm
.
inspector
,
status
:
'PREPARE'
,
qcIpqclineList
};
...
...
@@ -530,38 +635,53 @@ export default {
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
.
rows
,
'rows88999655'
)
this
.
qcLines
=
res
.
rows
.
map
(
item
=>
{
let
selectValues
=
item
.
selectValues
let
qualityCheckResults
=
item
.
qualityCheckResults
console
.
log
(
res
.
rows
,
'rows88999655'
)
;
this
.
qcLines
=
res
.
rows
.
map
(
(
item
)
=>
{
let
selectValues
=
item
.
selectValues
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
if
(
item
.
inputType
==
2
)
{
// selectValues = selectValues? JSON.parse(item.selectValues) : []
if
(
selectValues
)
{
const
data
=
JSON
.
parse
(
item
.
selectValues
)
selectValues
=
data
.
map
(
item
=>
{
const
data
=
JSON
.
parse
(
item
.
selectValues
)
;
selectValues
=
data
.
map
(
(
item
)
=>
{
return
{
text
:
item
.
name
,
value
:
item
.
name
}
})
}
;
})
;
}
else
{
selectValues
=
[]
selectValues
=
[]
;
}
qualityCheckResults
=
qualityCheckResults
?
JSON
.
parse
(
item
.
qualityCheckResults
)
:
[]
qualityCheckResults
=
qualityCheckResults
?
JSON
.
parse
(
item
.
qualityCheckResults
)
:
[];
}
return
{
...
item
,
selectValues
,
qualityCheckResults
}
})
console
.
log
(
this
.
qcLines
,
'this.qcLines'
)
}
;
})
;
console
.
log
(
this
.
qcLines
,
'this.qcLines'
)
;
}
});
},
handleAddClick
()
{
this
.
qcForm
=
{};
this
.
qcForm
=
{
quantityCheck
:
0
};
this
.
qcModalFlag
=
true
;
if
(
this
.
curQcType
===
'FIRST'
)
{
this
.
setDefaultQcForm
()
}
},
setDefaultQcForm
()
{
this
.
qcForm
.
checkResult
=
"REJECT"
this
.
qcForm
.
quantityCheck
=
1
this
.
qcForm
.
quantityQualified
=
1
this
.
qcForm
.
quantityUnqualified
=
0
},
handleChangeQuantityCheck
()
{
const
sum
=
this
.
qcForm
.
quantityQualified
+
this
.
qcForm
.
quantityUnqualified
this
.
$set
(
this
.
qcForm
,
'quantityCheck'
,
sum
)
},
getAddShow
()
{
const
type
=
this
.
curQcType
;
...
...
@@ -592,11 +712,21 @@ export default {
// this.qcModalFlag = true;
// }
},
qcLineClick
(
item
,
flag
)
{
qcLineClick
(
item
,
flag
,
btnType
)
{
this
.
qcModalFlag
=
true
;
this
.
qcForm
=
item
;
console
.
log
(
this
.
qcForm
);
this
.
showIpqcConfirmButton
=
flag
===
false
?
false
:
true
this
.
qcForm
=
Object
.
assign
({},
item
)
console
.
log
(
item
,
' itme33344'
)
if
(
btnType
===
'firstEdit'
||
btnType
===
'sjqrFinish'
)
{
this
.
qcForm
.
inspector
=
this
.
vuex_user
.
userName
this
.
qcForm
.
inspectorName
=
this
.
vuex_user
.
nickName
}
if
(
btnType
===
'firstEdit'
)
{
this
.
qcForm
.
checkResult
=
this
.
qcForm
.
checkResult
?
this
.
qcForm
.
checkResult
:
"REJECT"
this
.
qcForm
.
quantityCheck
=
this
.
qcForm
.
quantityCheck
?
this
.
qcForm
.
quantityCheck
:
1
this
.
qcForm
.
quantityQualified
=
this
.
qcForm
.
quantityQualified
?
this
.
qcForm
.
quantityQualified
:
1
this
.
qcForm
.
quantityUnqualified
=
this
.
qcForm
.
quantityUnqualified
?
this
.
qcForm
.
quantityUnqualified
:
0
}
this
.
showIpqcConfirmButton
=
flag
===
false
?
false
:
true
;
this
.
getTemplateLineList
();
},
qcLineItemClick
(
item
)
{
...
...
@@ -767,4 +897,4 @@ export default {
margin
:
1rpx
auto
;
display
:
block
;
}
</
style
>
</
style
>
\ No newline at end of file
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