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
5aa16f3f
Commit
5aa16f3f
authored
Aug 23, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iqc对接口
parent
f39d8179
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
180 deletions
+196
-180
http.api.js
common/http.api.js
+15
-1
iqcDialog.vue
pages/mes/qc/components/iqcDialog.vue
+145
-168
index.vue
pages/mes/qc/index.vue
+36
-11
No files found.
common/http.api.js
View file @
5aa16f3f
...
@@ -187,6 +187,9 @@ const install = (Vue, vm) => {
...
@@ -187,6 +187,9 @@ const install = (Vue, vm) => {
//查询检验列表
//查询检验列表
ipqcList
:
(
params
=
{})
=>
ipqcList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/qc/ipqc/list'
,
params
),
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/qc/ipqc/list'
,
params
),
//查询IQC检验列表
iqcList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/qc/iqc/list'
),
//增加检验
//增加检验
addIpqc
:
(
params
=
{},
type
=
'postJson'
)
=>
addIpqc
:
(
params
=
{},
type
=
'postJson'
)
=>
vm
.
$u
[
type
](
config
.
adminPath
+
'/mes/qc/ipqc'
,
params
),
vm
.
$u
[
type
](
config
.
adminPath
+
'/mes/qc/ipqc'
,
params
),
...
@@ -204,7 +207,18 @@ const install = (Vue, vm) => {
...
@@ -204,7 +207,18 @@ const install = (Vue, vm) => {
params
params
),
),
// iqc查看详情
getIqcInfo
:
(
ipcId
)
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/qc/iqc/'
+
ipcId
),
// iqc加载校验项
reloadTable
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/mes/qc/iqc/reloadTable'
,
params
),
// iqc提交
commitIqcInfo
:
(
ipcId
)
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/qc/iqc/commit/'
+
ipcId
),
// iqc保存
saveIqcInfo
:
(
params
=
{})
=>
vm
.
$u
.
putJson
(
config
.
adminPath
+
'/mes/qc/iqc'
,
params
),
/**
/**
* 工艺工序相关API
* 工艺工序相关API
*/
*/
...
...
pages/mes/qc/components/iqcDialog.vue
View file @
5aa16f3f
<
template
>
<
template
>
<u-modal
width=
"90%"
@
confirm=
"submitIpqc"
v-model=
"visable"
:showConfirmButton=
"showIpqcConfirmButton"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
@
cancel=
"close"
>
<u-modal
width=
"90%"
v-model=
"visable"
:showConfirmButton=
"false"
:showCancelButton=
"false"
title=
"请填写检验单"
content=
"操作内容"
>
<u-button
type=
"primary"
class=
"reload-btn"
@
click=
"reloadTable"
style=
"width: 200rpx"
>
加载校验项
</u-button>
<u-form
ref=
"qcForm"
label-width=
"90px"
class=
"addForm"
>
<u-form
ref=
"qcForm"
label-width=
"90px"
class=
"addForm"
>
<u-row>
<u-row>
<u-col
span=
"4"
>
<u-col
span=
"4"
>
<u-form-item
label=
"检验单名称"
>
<u-form-item
label=
"检验单名称"
>
{{
qcForm
.
workorderCod
e
}}
{{
qcForm
.
iqcNam
e
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"4"
>
<u-col
span=
"4"
>
<u-form-item
label=
"检验单编号"
>
<u-form-item
label=
"检验单编号"
>
{{
qcForm
.
workorder
Code
}}
{{
qcForm
.
iqc
Code
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"4"
>
<u-col
span=
"4"
>
...
@@ -23,57 +24,57 @@
...
@@ -23,57 +24,57 @@
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"采购单号"
>
<u-form-item
label=
"采购单号"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
purchaseNo
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"采购单行号"
>
<u-form-item
label=
"采购单行号"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
purchaseLineNo
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"送货单号"
>
<u-form-item
label=
"送货单号"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
deliveryNo
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"送货单行号"
>
<u-form-item
label=
"送货单行号"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
deliveryLineNo
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"批次号"
>
<u-form-item
label=
"批次号"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
batchNo
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"批次数量"
>
<u-form-item
label=
"批次数量"
>
{{
qcForm
.
workorderCode
}}
{{
qcForm
.
quantity
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"单位"
>
<u-form-item
label=
"单位"
>
{{
qcForm
.
workorderCod
e
}}
{{
qcForm
.
unitOfMeasur
e
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"送货日期"
>
<u-form-item
label=
"送货日期"
>
{{
qcForm
.
workorderCod
e
}}
{{
qcForm
.
deliveryDat
e
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"物料分类"
>
<u-form-item
label=
"物料分类"
>
{{
qcForm
.
workorderCod
e
}}
{{
qcForm
.
itemTypeNam
e
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"3"
>
<u-col
span=
"3"
>
<u-form-item
label=
"物料编码"
>
<u-form-item
label=
"物料编码"
>
{{
qcForm
.
workorder
Code
}}
{{
qcForm
.
sapItem
Code
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
<u-col
span=
"6"
>
<u-col
span=
"6"
>
<u-form-item
label=
"物料名称"
>
<u-form-item
label=
"物料名称"
>
{{
qcForm
.
workorderCod
e
}}
{{
qcForm
.
itemNam
e
}}
</u-form-item>
</u-form-item>
</u-col>
</u-col>
</u-row>
</u-row>
...
@@ -96,16 +97,13 @@
...
@@ -96,16 +97,13 @@
</u-row>
</u-row>
<u-row>
<u-row>
<u-col
span=
"4"
>
<u-col
span=
"4"
>
<u-form-item
label=
"检测人员"
prop=
"inspectorN
ickN
ame"
>
<u-form-item
label=
"检测人员"
prop=
"inspectorName"
>
<u-input
disabled
v-model=
"qcForm.inspectorN
ickN
ame"
></u-input>
<u-input
disabled
v-model=
"qcForm.inspectorName"
></u-input>
<u-button
@
tap=
"userTempVisible=true"
v-if=
"btnType !== 'firstView'"
type=
"success"
size=
"mini"
>
选择人员
</u-button>
<u-button
@
tap=
"userTempVisible=true"
v-if=
"btnType !== 'firstView'"
type=
"success"
size=
"mini"
>
选择人员
</u-button>
</u-form-item>
</u-form-item>
</u-col>
</u-col>
</u-row>
</u-row>
</u-form>
</u-form>
<view
class=
"btnbox"
>
<u-button
type=
"success"
v-if=
"isEdit"
size=
"medium"
@
click=
"handleAddFirstEdit"
>
新增
</u-button>
</view>
<scroll-view
scroll-y=
"true"
show-scrollbar=
"true"
class=
"line-content-item"
>
<scroll-view
scroll-y=
"true"
show-scrollbar=
"true"
class=
"line-content-item"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
<uni-tr>
...
@@ -125,21 +123,6 @@
...
@@ -125,21 +123,6 @@
<view
@
click=
"del('qcAddList', index)"
:style=
"
{color: isEdit ? '#e56048' : '#ddd'}">删除
</view>
<view
@
click=
"del('qcAddList', index)"
:style=
"
{color: isEdit ? '#e56048' : '#ddd'}">删除
</view>
</uni-td>
-->
</uni-td>
-->
</uni-tr>
</uni-tr>
<uni-tr
v-for=
"(line, index) in qcAddList"
:key=
"index + 'add'"
>
<uni-td
align=
"center"
>
<view
style=
"display:flex;"
>
<u-input
disabled
v-model=
"line.indexName"
placeholder=
"选择质检项目"
></u-input>
<u-button
@
tap=
"chooseZJ(index)"
type=
"success"
size=
"mini"
>
选择质检项目
</u-button>
</view>
</uni-td>
<uni-td
align=
"center"
></uni-td>
<uni-td
width=
"150px"
align=
"center"
>
<uni-easyinput
v-model=
"line.qualityCheckResults"
></uni-easyinput>
</uni-td>
<!--
<uni-td
width=
"15px"
align=
"center"
>
<view
@
click=
"del('qcAddList', index)"
:style=
"
{color: isEdit ? '#e56048' : '#ddd'}">删除
</view>
</uni-td>
-->
</uni-tr>
</uni-table>
</uni-table>
</scroll-view>
</scroll-view>
<u-modal
<u-modal
...
@@ -154,6 +137,20 @@
...
@@ -154,6 +137,20 @@
<User
ref=
"userRef"
v-if=
"userTempVisible"
/>
<User
ref=
"userRef"
v-if=
"userTempVisible"
/>
</view>
</view>
</u-modal>
</u-modal>
<view
class=
"u-model__footer u-border-top"
>
<view
:hover-stay-time=
"100"
hover-class=
"u-model__btn--hover"
class=
"u-model__footer__button"
@
tap=
"close"
>
取消
</view>
<view
:hover-stay-time=
"100"
hover-class=
"u-model__btn--hover"
v-if=
"showIpqcConfirmButton"
class=
"u-model__footer__button hairline-left"
@
tap=
"save"
>
保存
</view>
<view
:hover-stay-time=
"100"
hover-class=
"u-model__btn--hover"
v-if=
"showIpqcConfirmButton"
class=
"u-model__footer__button hairline-left"
@
tap=
"submitIpqc"
>
确认提交
</view>
</view>
</u-modal>
</u-modal>
</
template
>
</
template
>
...
@@ -182,7 +179,7 @@
...
@@ -182,7 +179,7 @@
quantityCheck
:
1
,
quantityCheck
:
1
,
quantityQualified
:
1
,
quantityQualified
:
1
,
quantityUnqualified
:
0
,
quantityUnqualified
:
0
,
inspectorN
ickN
ame
:
''
,
inspectorName
:
''
,
inspector
:
''
inspector
:
''
},
},
Condition
:
{},
Condition
:
{},
...
@@ -210,11 +207,9 @@
...
@@ -210,11 +207,9 @@
currentItem
:
{
currentItem
:
{
handler
(){
handler
(){
if
(
this
.
btnType
&&
this
.
currentItem
)
{
if
(
this
.
btnType
&&
this
.
currentItem
)
{
this
.
qcForm
=
Object
.
assign
({},
this
.
currentItem
);
if
(
this
.
curQcType
===
'IQC'
)
{
this
.
qcLines
=
[]
this
.
getIqcInfo
(
this
.
currentItem
.
iqcId
)
this
.
getTemplateLineList
()
}
if
(
this
.
currentItem
.
workorderCode
)
this
.
searchTask
(
this
.
currentItem
.
workorderCode
)
if
(
this
.
currentItem
.
arrangeCode
)
this
.
searWorkorder
(
this
.
currentItem
.
arrangeCode
)
}
}
},
},
immediate
:
true
immediate
:
true
...
@@ -229,28 +224,15 @@
...
@@ -229,28 +224,15 @@
}
}
},
},
methods
:
{
methods
:
{
del
(
list
,
index
){
getIqcInfo
(
iqcId
)
{
if
(
this
.
isEdit
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您确定要删除此项吗?'
,
style
:
'z-index: 99999'
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
[
list
].
splice
(
index
,
1
)
}
}
})
}
},
getTemplateLineList
()
{
this
.
$u
.
api
this
.
$u
.
api
.
getIpqcLineList
({
.
getIqcInfo
(
iqcId
)
ipqcId
:
this
.
qcForm
.
ipqcId
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
qcLines
=
res
.
rows
.
map
((
item
)
=>
{
console
.
log
(
res
,
'rows88999655'
);
res
.
data
[
'iqcId'
]
=
this
.
currentItem
.
iqcId
this
.
qcForm
=
res
.
data
this
.
qcLines
=
res
.
data
.
qcIqcLineList
.
map
((
item
)
=>
{
let
selectValues
=
item
.
selectValues
;
let
selectValues
=
item
.
selectValues
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
if
(
item
.
inputType
==
2
)
{
if
(
item
.
inputType
==
2
)
{
...
@@ -274,28 +256,33 @@
...
@@ -274,28 +256,33 @@
qualityCheckResults
qualityCheckResults
};
};
});
});
console
.
log
(
this
.
qcLines
,
'this.qcLines'
);
}
}
});
});
},
},
handleSubmitZj
(
params
){
del
(
list
,
index
){
Object
.
keys
(
params
).
forEach
(
item
=>
{
if
(
this
.
isEdit
)
{
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
item
,
params
[
item
])
uni
.
showModal
({
title
:
'提示'
,
content
:
'您确定要删除此项吗?'
,
style
:
'z-index: 99999'
,
success
:
async
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
[
list
].
splice
(
index
,
1
)
}
}
})
})
}
},
},
chooseZJ
(
index
)
{
reloadTable
()
{
this
.
$emit
(
'update:zjVisible'
,
true
)
this
.
$u
.
api
this
.
$emit
(
'update:qcAddIndex'
,
index
)
.
reloadTable
({
'iqcCode'
:
this
.
currentItem
.
iqcCode
})
},
.
then
((
res
)
=>
{
userDetermine
()
{
this
.
qcForm
.
inspectorNickName
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
nickName
;
this
.
qcForm
.
inspector
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
userName
;
},
async
changeprocess
()
{
const
res
=
await
this
.
$u
.
api
.
generateItems
({
"workorderCode"
:
this
.
qcForm
.
workorderCode
,
"arrangeCode"
:
this
.
qcForm
.
arrangeCode
,
"qcTypes"
:
"PATROL"
,
"processId"
:
this
.
qcForm
.
processId
})
// const res = await this.$u.api.generateItems({"workorderCode":"","arrangeCode":"BP24531002","qcTypes":"PATROL","processId":389})
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
console
.
log
(
res
.
data
)
console
.
log
(
res
,
'rows88999655'
);
this
.
qcLines
=
res
.
data
.
map
((
item
)
=>
{
res
.
data
[
'iqcId'
]
=
this
.
currentItem
.
iqcId
this
.
qcForm
=
res
.
data
this
.
qcLines
=
res
.
data
.
qcIqcLineList
.
map
((
item
)
=>
{
let
selectValues
=
item
.
selectValues
;
let
selectValues
=
item
.
selectValues
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
let
qualityCheckResults
=
item
.
qualityCheckResults
;
if
(
item
.
inputType
==
2
)
{
if
(
item
.
inputType
==
2
)
{
...
@@ -320,11 +307,15 @@
...
@@ -320,11 +307,15 @@
};
};
});
});
}
}
});
},
userDetermine
()
{
this
.
qcForm
.
inspectorName
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
nickName
;
this
.
qcForm
.
inspector
=
this
.
$refs
.
userRef
.
tableSelectData
[
0
]?.
userName
;
},
},
handleChangeQuantityCheck
(
e
)
{
handleChangeQuantityCheck
(
e
)
{
console
.
log
(
'sadasdas'
,
e
)
const
sum
=
this
.
qcForm
.
quantityQualified
+
this
.
qcForm
.
quantityUnqualified
;
const
sum
=
this
.
qcForm
.
quantityQualified
+
this
.
qcForm
.
quantityUnqualified
;
this
.
$set
(
this
.
qcForm
,
'quantityCheck'
,
sum
);
!
isNaN
(
sum
)
&&
this
.
$set
(
this
.
qcForm
,
'quantityCheck'
,
sum
);
},
},
handleAddFirstEdit
()
{
handleAddFirstEdit
()
{
this
.
qcAddList
.
push
({
this
.
qcAddList
.
push
({
...
@@ -332,58 +323,25 @@
...
@@ -332,58 +323,25 @@
qualityCheckResults
:
''
qualityCheckResults
:
''
})
})
},
},
async
searchTask
(
val
)
{
submitIpqc
()
{
const
res
=
await
this
.
$u
.
api
.
getQcCondition
({
this
.
$u
.
api
.
commitIqcInfo
(
this
.
qcForm
.
iqcId
).
then
(
res
=>
{
workorderCode
:
val
,
if
(
res
.
code
===
200
)
{
arrangeCode
:
this
.
qcForm
.
arrangeCode
this
.
$u
.
toast
(
'提交成功'
)
});
this
.
$emit
(
'confirm'
)
if
(
res
.
code
===
200
)
{
}
else
{
if
(
!
res
.
data
)
{
this
.
$u
.
toast
(
res
.
msg
||
'提交失败'
)
this
.
$u
.
toast
(
'暂未查询到工序信息!'
);
this
.
$emit
(
'confirm'
)
}
this
.
Condition
=
res
.
data
this
.
qcForm
.
workorderCode
=
res
.
data
.
workorderCode
this
.
qcForm
.
arrangeCode
=
res
.
data
.
arrangeCode
if
(
res
.
data
.
processList
&&
res
.
data
.
processList
.
length
>
0
){
this
.
processList
=
res
.
data
.
processList
.
map
(
v
=>
({
text
:
v
.
processName
,
value
:
v
.
processId
,
code
:
v
.
processCode
,
workstationCode
:
v
.
workstationCode
,
workstationId
:
v
.
workstationId
,
workstationName
:
v
.
workstationName
,
workorderProcessId
:
v
.
workorderProcessId
}))
}
}
},
async
searWorkorder
(
val
)
{
const
res
=
await
this
.
$u
.
api
.
getQcCondition
({
workorderCode
:
this
.
qcForm
.
workorderCode
,
arrangeCode
:
val
});
if
(
res
.
code
===
200
)
{
if
(
!
res
.
data
)
{
this
.
$u
.
toast
(
'暂未查询到工序信息!'
);
}
this
.
Condition
=
res
.
data
this
.
qcForm
.
workorderCode
=
res
.
data
.
workorderCode
this
.
qcForm
.
arrangeCode
=
res
.
data
.
arrangeCode
if
(
res
.
data
.
processList
&&
res
.
data
.
processList
.
length
>
0
){
this
.
processList
=
res
.
data
.
processList
.
map
(
v
=>
({
text
:
v
.
processName
,
value
:
v
.
processId
,
code
:
v
.
processCode
,
workstationCode
:
v
.
workstationCode
,
workstationId
:
v
.
workstationId
,
workstationName
:
v
.
workstationName
,
workorderProcessId
:
v
.
workorderProcessId
}))
}
}
}
})
},
},
submitIpqc
()
{
save
()
{
if
(
!
this
.
qcForm
.
processId
)
{
this
.
$u
.
api
.
saveIqcInfo
(
this
.
qcForm
).
then
(
res
=>
{
this
.
$u
.
toast
(
'请输入工单编码或编排编码并选择工序!'
);
if
(
res
.
code
===
200
)
{
return
;
this
.
$u
.
toast
(
'保存成功'
)
}
else
{
this
.
$u
.
toast
(
'保存失败'
)
}
}
const
item
=
this
.
processList
.
find
(
v
=>
v
.
value
===
this
.
qcForm
.
processId
)
console
.
log
(
'item'
,
item
)
this
.
$emit
(
'confirm'
,
{
...
this
.
Condition
,
...
this
.
qcForm
,
processCode
:
item
.
code
,
processName
:
item
.
text
,
workstationCode
:
item
.
workstationCode
,
workorderProcessId
:
item
.
workorderProcessId
,
workstationId
:
item
.
workstationId
,
workstationName
:
item
.
workstationName
,
qcLines
:
this
.
qcLines
,
qcAddList
:
this
.
qcAddList
})
})
},
},
close
(){
close
(){
...
@@ -393,7 +351,7 @@
...
@@ -393,7 +351,7 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.line-content-item
{
.line-content-item
{
width
:
100%
;
width
:
100%
;
height
:
300px
;
height
:
300px
;
...
@@ -418,4 +376,23 @@
...
@@ -418,4 +376,23 @@
.del-modal
{
.del-modal
{
z-index
:
99999
;
z-index
:
99999
;
}
}
.u-model__footer
{
display
:
flex
;
.u-model__footer__button
{
flex
:
1
;
height
:
100rpx
;
line-height
:
100rpx
;
font-size
:
32rpx
;
box-sizing
:
border-box
;
cursor
:
pointer
;
text-align
:
center
;
border-radius
:
4rpx
;
}
}
.reload-btn
{
position
:
absolute
;
top
:
15rpx
;
left
:
40rpx
;
}
</
style
>
</
style
>
\ No newline at end of file
pages/mes/qc/index.vue
View file @
5aa16f3f
...
@@ -13,15 +13,15 @@
...
@@ -13,15 +13,15 @@
</view>
</view>
<view
class=
"grid-text"
>
首检确认
</view>
<view
class=
"grid-text"
>
首检确认
</view>
</view>
-->
</view>
-->
<view
class=
"button-frame"
:class=
"
{ active: qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type" @click="handleClickBtn(qcType.value)">
<view
class=
"button-frame"
:class=
"
{ active: qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type"
:key="qcType.value"
@click="handleClickBtn(qcType.value)">
<!--
<view
class=
"shortcut-icon icon-color01"
>
<!--
<view
class=
"shortcut-icon icon-color01"
>
<image
class=
"icon-button"
src=
"/static/icons/png/pro.png"
/>
<image
class=
"icon-button"
src=
"/static/icons/png/pro.png"
/>
</view>
-->
</view>
-->
<view
class=
"grid-text"
>
{{
qcType
.
label
}}
</view>
<view
class=
"grid-text"
>
{{
qcType
.
label
}}
</view>
</view>
</view>
<
!--
<view
class=
"button-frame"
:class=
"
{'active': !curQcType }" @click="handleClickBtn('
')">
<
view
class=
"button-frame"
:class=
"
{'active': curQcType === 'IQC' }" @click="handleClickBtn('IQC
')">
<view
class=
"grid-text"
>
全部
</view>
<view
class=
"grid-text"
>
IQC
</view>
</view>
-->
</view>
</view>
</view>
<view
class=
"list-bar"
>
<view
class=
"list-bar"
>
...
@@ -45,16 +45,17 @@
...
@@ -45,16 +45,17 @@
class=
"uni-button"
class=
"uni-button"
size=
"mini"
size=
"mini"
type=
"primary"
type=
"primary"
v-if=
"
curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING'
)"
v-if=
"
(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING')) || (curQcType === 'IQC' && (scope.row.status === 'PREPARE')
)"
@
click=
"qcLineClick(scope.row, true, 'firstEdit')"
@
click=
"qcLineClick(scope.row, true, 'firstEdit')"
>
>
查看编辑
查看编辑
</button>
</button>
<button
<button
class=
"uni-button"
class=
"uni-button"
style=
"margin-left: 10rpx"
size=
"mini"
size=
"mini"
type=
"primary"
type=
"primary"
v-if=
"(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED') || curQcType === 'PATROL'"
v-if=
"(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED') || curQcType === 'PATROL'
|| curQcType === 'IQC'
"
@
click=
"qcLineClick(scope.row, false, 'firstView')"
@
click=
"qcLineClick(scope.row, false, 'firstView')"
>
>
查看
查看
...
@@ -69,6 +70,7 @@
...
@@ -69,6 +70,7 @@
</view>
</view>
</view>
</view>
<addDialog
v-if=
"addQuFlag"
:visible
.
sync=
"addQuFlag"
:currentItem=
"qcForm"
:btnType=
"btnType"
:curQcType=
"curQcType"
:showIpqcConfirmButton=
"showIpqcConfirmButton"
ref=
"addDialog"
@
confirm=
"submitIpqc"
:qcAddIndex
.
sync =
"qcAddIndex"
:zjVisible
.
sync =
"zjVisible"
@
close=
"closemodel"
/>
<addDialog
v-if=
"addQuFlag"
:visible
.
sync=
"addQuFlag"
:currentItem=
"qcForm"
:btnType=
"btnType"
:curQcType=
"curQcType"
:showIpqcConfirmButton=
"showIpqcConfirmButton"
ref=
"addDialog"
@
confirm=
"submitIpqc"
:qcAddIndex
.
sync =
"qcAddIndex"
:zjVisible
.
sync =
"zjVisible"
@
close=
"closemodel"
/>
<iqcDialog
v-if=
"iqcFlag"
:visible
.
sync=
"iqcFlag"
:currentItem=
"qcForm"
:btnType=
"btnType"
:curQcType=
"curQcType"
:showIpqcConfirmButton=
"showIpqcConfirmButton"
ref=
"iqcDialog"
@
confirm=
"submitIpqc"
:qcAddIndex
.
sync =
"qcAddIndex"
:zjVisible
.
sync =
"zjVisible"
@
close=
"closemodel"
/>
<u-modal
width=
"90%"
@
confirm=
"submitIpqc"
@
cancel=
"closemodel"
v-model=
"qcModalFlag"
:showConfirmButton=
"showIpqcConfirmButton"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-modal
width=
"90%"
@
confirm=
"submitIpqc"
@
cancel=
"closemodel"
v-model=
"qcModalFlag"
:showConfirmButton=
"showIpqcConfirmButton"
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-form
ref=
"qcForm"
label-width=
"90px"
class=
"addForm"
>
<u-form
ref=
"qcForm"
label-width=
"90px"
class=
"addForm"
>
<u-row>
<u-row>
...
@@ -328,6 +330,7 @@ import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easy
...
@@ -328,6 +330,7 @@ import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easy
import
User
from
'@/components/User/User.vue'
;
import
User
from
'@/components/User/User.vue'
;
import
zjList
from
'./components/zjList.vue'
;
import
zjList
from
'./components/zjList.vue'
;
import
addDialog
from
'./components/addDialog.vue'
;
import
addDialog
from
'./components/addDialog.vue'
;
import
iqcDialog
from
'./components/iqcDialog.vue'
;
export
default
{
export
default
{
name
:
'QcContent'
,
name
:
'QcContent'
,
...
@@ -337,13 +340,18 @@ export default {
...
@@ -337,13 +340,18 @@ export default {
UniEasyinput
,
UniEasyinput
,
User
,
User
,
zjList
,
zjList
,
addDialog
addDialog
,
iqcDialog
},
},
dicts
:
[
'mes_ipqc_type'
,
'mes_qc_result'
,
'mes_order_status'
,
'mes_defect_level'
],
dicts
:
[
'mes_ipqc_type'
,
'mes_qc_result'
,
'mes_order_status'
,
'mes_defect_level'
],
computed
:
{
computed
:
{
tableColumn
()
{
tableColumn
()
{
if
(
this
.
curQcType
===
'FIRST'
||
this
.
curQcType
===
'SJQR'
)
{
if
(
this
.
curQcType
===
'FIRST'
||
this
.
curQcType
===
'SJQR'
)
{
return
this
.
tableSjColumn
;
return
this
.
tableSjColumn
;
}
else
if
(
this
.
curQcType
===
'IQC'
){
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSjColumn
))
list
[
0
].
name
=
'iqcCode'
return
list
}
else
{
}
else
{
return
this
.
tableDefaultColumn
;
return
this
.
tableDefaultColumn
;
}
}
...
@@ -355,6 +363,7 @@ export default {
...
@@ -355,6 +363,7 @@ export default {
qcAddIndex
:
null
,
qcAddIndex
:
null
,
zjVisible
:
false
,
zjVisible
:
false
,
addQuFlag
:
false
,
addQuFlag
:
false
,
iqcFlag
:
false
,
qcAddList
:
[],
qcAddList
:
[],
tableSjColumn
:
[
tableSjColumn
:
[
{
{
...
@@ -568,7 +577,9 @@ export default {
...
@@ -568,7 +577,9 @@ export default {
console
.
log
(
this
.
$refs
.
zjListRef
.
tableSelectData
,
'this.$refs.zjListRef.tableSelectData'
);
console
.
log
(
this
.
$refs
.
zjListRef
.
tableSelectData
,
'this.$refs.zjListRef.tableSelectData'
);
if
(
this
.
addQuFlag
)
{
if
(
this
.
addQuFlag
)
{
this
.
$refs
.
addDialog
.
handleSubmitZj
({
inputType
:
1
,
ipqcId
:
this
.
qcForm
.
ipqcId
,
indexId
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexId
,
indexCode
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexCode
,
indexName
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexName
,
indexType
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexType
,
qcTool
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
qcTool
})
this
.
$refs
.
addDialog
.
handleSubmitZj
({
inputType
:
1
,
ipqcId
:
this
.
qcForm
.
ipqcId
,
indexId
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexId
,
indexCode
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexCode
,
indexName
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexName
,
indexType
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexType
,
qcTool
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
qcTool
})
}
else
{
}
else
if
(
this
.
iqcFlag
)
{
this
.
$refs
.
iqcDialog
.
handleSubmitZj
({
inputType
:
1
,
ipqcId
:
this
.
qcForm
.
ipqcId
,
indexId
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexId
,
indexCode
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexCode
,
indexName
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexName
,
indexType
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
indexType
,
qcTool
:
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
].
qcTool
})
}
else
{
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'inputType'
,
1
)
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'inputType'
,
1
)
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'ipqcId'
,
this
.
qcForm
.
ipqcId
)
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'ipqcId'
,
this
.
qcForm
.
ipqcId
)
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'indexId'
,
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
]?.
indexId
)
this
.
$set
(
this
.
qcAddList
[
this
.
qcAddIndex
],
'indexId'
,
this
.
$refs
.
zjListRef
.
tableSelectData
[
0
]?.
indexId
)
...
@@ -590,7 +601,12 @@ export default {
...
@@ -590,7 +601,12 @@ export default {
if
(
this
.
curQcType
==
'SJQR'
)
{
if
(
this
.
curQcType
==
'SJQR'
)
{
params
=
{
status
:
'PENDING'
,
ipqcType
:
'FIRST'
};
params
=
{
status
:
'PENDING'
,
ipqcType
:
'FIRST'
};
}
}
const
res
=
await
this
.
$u
.
api
.
ipqcList
(
params
);
let
res
=
null
if
(
type
===
'IQC'
)
{
res
=
await
this
.
$u
.
api
.
iqcList
();
}
else
{
res
=
await
this
.
$u
.
api
.
ipqcList
(
params
);
}
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
qcList
=
res
.
rows
;
this
.
qcList
=
res
.
rows
;
}
else
{
}
else
{
...
@@ -616,6 +632,10 @@ export default {
...
@@ -616,6 +632,10 @@ export default {
},
},
async
submitIpqc
(
params
=
{})
{
async
submitIpqc
(
params
=
{})
{
if
(
this
.
curQcType
===
'IQC'
)
{
this
.
getIpqcList
(
this
.
curQcType
);
return
}
console
.
log
(
'params'
,
params
)
console
.
log
(
'params'
,
params
)
// if (this.btnType === 'sjqrFinish') {
// if (this.btnType === 'sjqrFinish') {
// this.firstCONFIRMED(this.qcForm);
// this.firstCONFIRMED(this.qcForm);
...
@@ -745,7 +765,9 @@ export default {
...
@@ -745,7 +765,9 @@ export default {
this
.
qcForm
=
{
this
.
qcForm
=
{
quantityCheck
:
0
quantityCheck
:
0
};
};
if
(
this
.
curQcType
!==
'FINAL'
)
{
if
(
this
.
curQcType
===
'IQC'
)
{
this
.
iqcFlag
=
true
}
else
if
(
this
.
curQcType
!==
'FINAL'
)
{
this
.
addQuFlag
=
true
this
.
addQuFlag
=
true
}
else
{
}
else
{
this
.
qcModalFlag
=
true
;
this
.
qcModalFlag
=
true
;
...
@@ -797,7 +819,9 @@ export default {
...
@@ -797,7 +819,9 @@ export default {
qcLineClick
(
item
,
flag
,
btnType
)
{
qcLineClick
(
item
,
flag
,
btnType
)
{
this
.
qcAddList
=
[]
this
.
qcAddList
=
[]
this
.
btnType
=
btnType
this
.
btnType
=
btnType
if
(
this
.
curQcType
!==
'FINAL'
)
{
if
(
this
.
curQcType
===
'IQC'
)
{
this
.
iqcFlag
=
true
}
else
if
(
this
.
curQcType
!==
'FINAL'
)
{
this
.
addQuFlag
=
true
this
.
addQuFlag
=
true
}
else
{
}
else
{
this
.
qcModalFlag
=
true
;
this
.
qcModalFlag
=
true
;
...
@@ -834,6 +858,7 @@ export default {
...
@@ -834,6 +858,7 @@ export default {
closemodel
(){
closemodel
(){
this
.
btnType
=
''
this
.
btnType
=
''
this
.
addQuFlag
=
false
this
.
addQuFlag
=
false
this
.
iqcFlag
=
false
},
},
addQcdeffect
()
{
addQcdeffect
()
{
this
.
defectrecordList
.
push
({
this
.
defectrecordList
.
push
({
...
...
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