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
ximai
mes-ui
Commits
84e3c8f0
Commit
84e3c8f0
authored
Mar 08, 2024
by
chenzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增异常报告的完成按钮功能
parent
3caac670
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
report.js
src/api/mes/qc/report.js
+8
-0
index.vue
src/views/mes/md/workunit/index.vue
+28
-0
index.vue
src/views/mes/qc/report/index.vue
+18
-1
No files found.
src/api/mes/qc/report.js
View file @
84e3c8f0
...
...
@@ -42,3 +42,11 @@ export function delReport(abnormalReportId) {
method
:
'delete'
})
}
// 完成按钮功能
export
function
completeReport
(
abnormalReportId
)
{
return
request
({
url
:
'/qc/report/complete/'
+
abnormalReportId
,
method
:
'put'
})
}
src/views/mes/md/workunit/index.vue
View file @
84e3c8f0
...
...
@@ -97,6 +97,11 @@
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.enableFlag"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"是否故障"
align=
"center"
prop=
"faultFlag"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.faultFlag"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -172,6 +177,26 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
label=
"是否故障"
label-width=
"120px"
>
<el-radio-group
v-model=
"form.faultFlag"
disabled
v-if=
"optType=='view'"
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
<el-radio-group
v-model=
"form.faultFlag"
v-else
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
...
...
@@ -230,6 +255,7 @@ export default {
workunitCode
:
null
,
workunitName
:
null
,
enableFlag
:
null
,
faultFlag
:
null
,
},
// 表单参数
form
:
{
...
...
@@ -239,6 +265,7 @@ export default {
workstation
:
''
,
workunitName
:
''
,
enableFlag
:
'Y'
,
faultFlag
:
'N'
,
},
// 表单校验
rules
:
{
...
...
@@ -281,6 +308,7 @@ export default {
workstation
:
''
,
workunitName
:
''
,
enableFlag
:
'Y'
,
faultFlag
:
'N'
,
}
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
...
...
src/views/mes/qc/report/index.vue
View file @
84e3c8f0
...
...
@@ -134,6 +134,13 @@
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"handleComplete(scope.row)"
v
-
hasPermi
=
"['qc:report:edit']"
>
完成
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"primary"
...
...
@@ -249,7 +256,7 @@
<
/template
>
<
script
>
import
{
listReport
,
getReport
,
delReport
,
addReport
,
updateReport
}
from
"@/api/mes/qc/report"
;
import
{
listReport
,
getReport
,
delReport
,
addReport
,
updateReport
,
completeReport
}
from
"@/api/mes/qc/report"
;
export
default
{
dicts
:
[
'qc_submit_status'
,
'pc_abnormal_type'
],
...
...
@@ -404,6 +411,16 @@ export default {
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 完成按钮操作 */
handleComplete
(
row
)
{
const
abnormalReportIds
=
row
.
abnormalReportId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认完成车间异常单编号为"'
+
abnormalReportIds
+
'"的数据项?'
).
then
(
function
()
{
return
completeReport
(
abnormalReportIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"提交成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
...
...
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