|
|
@ -533,7 +533,7 @@ |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;"> |
|
|
<el-form-item :label="'检验结论'"> |
|
|
<el-form-item :label="'检验结论'"> |
|
|
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择"> |
|
|
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择"> |
|
|
<el-option label="合格" value="合格"></el-option> |
|
|
<el-option label="合格" value="合格"></el-option> |
|
|
@ -548,11 +548,7 @@ |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 293px"></el-input> |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 293px"></el-input> |
|
|
<el-input v-else v-model="detailData.inspectionRemark" style="width: 293px"></el-input> |
|
|
<el-input v-else v-model="detailData.inspectionRemark" style="width: 293px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="' '"> |
|
|
|
|
|
<el-button type="primary" @click="openItemOperationDialog">项目操作</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item v-show="detailData.inspectionResult === '不合格'" style="margin-top: 5px"> |
|
|
|
|
|
<el-form-item :label="'处置措施'"> |
|
|
|
|
|
|
|
|
<el-form-item :label="'处置措施'" v-show="detailData.inspectionResult === '不合格'"> |
|
|
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px"> |
|
|
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in disposalMeasuresOptions" |
|
|
v-for = "i in disposalMeasuresOptions" |
|
|
@ -570,10 +566,13 @@ |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'处置说明'"> |
|
|
|
|
|
|
|
|
<el-form-item :label="'处置说明'" v-show="detailData.inspectionResult === '不合格'"> |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input> |
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input> |
|
|
<el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input> |
|
|
<el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="' '" style="margin-left: auto;"> |
|
|
|
|
|
<el-button type="primary" @click="openItemOperationDialog">项目操作</el-button> |
|
|
|
|
|
<el-button type="success" @click="openTemplateImportDialog">模板导入</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<!-- 展示列表 --> |
|
|
<!-- 展示列表 --> |
|
|
@ -1206,6 +1205,110 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 模板导入对话框 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="模板导入" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
v-drag |
|
|
|
|
|
:visible.sync="templateImportDialogFlag" |
|
|
|
|
|
width="900px" |
|
|
|
|
|
custom-class="template-import-dialog"> |
|
|
|
|
|
<!-- 查询区域 --> |
|
|
|
|
|
<div class="search-container"> |
|
|
|
|
|
<el-form :inline="true" size="small"> |
|
|
|
|
|
<el-form-item label="模板编码"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="templateQuery.templateId" |
|
|
|
|
|
placeholder="请输入模板编码" |
|
|
|
|
|
clearable |
|
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
|
style="width: 160px"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="模板名称"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="templateQuery.templateDesc" |
|
|
|
|
|
placeholder="请输入模板名称" |
|
|
|
|
|
clearable |
|
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
|
style="width: 200px"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="searchIPQCTemplates" size="small">查询</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="resetTemplateQuery" size="small">重置</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 模板列表 --> |
|
|
|
|
|
<div class="template-list-container"> |
|
|
|
|
|
<div class="panel-header"> |
|
|
|
|
|
<i class="el-icon-s-grid"></i> |
|
|
|
|
|
<span class="panel-title">IPQC检验模板</span> |
|
|
|
|
|
<span class="item-count">({{ templateList.length }})</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-table |
|
|
|
|
|
height="450px" |
|
|
|
|
|
:data="templateList" |
|
|
|
|
|
ref="templateTable" |
|
|
|
|
|
@row-click="templateClickRow" |
|
|
|
|
|
@selection-change="templateSelectionChange" |
|
|
|
|
|
highlight-current-row |
|
|
|
|
|
class="template-table" |
|
|
|
|
|
:header-cell-style="{background: '#f5f7fa', color: '#606266', fontWeight: '500'}"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
type="selection" |
|
|
|
|
|
width="50" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="templateId" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="120" |
|
|
|
|
|
label="模板编码"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="templateName" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="200" |
|
|
|
|
|
show-overflow-tooltip |
|
|
|
|
|
label="模板名称"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="itemCount" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="项目数量"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-tag size="small" type="info">{{ scope.row.itemCount || 0 }} 项</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="remark" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="150" |
|
|
|
|
|
show-overflow-tooltip |
|
|
|
|
|
label="备注"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部按钮 --> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
icon="el-icon-download" |
|
|
|
|
|
@click="confirmImportTemplate" |
|
|
|
|
|
:disabled="!templateSelections || templateSelections.length === 0" |
|
|
|
|
|
:loading="importLoading" |
|
|
|
|
|
size="small"> |
|
|
|
|
|
导入选中模板 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<el-button @click="templateImportDialogFlag = false" size="small">关闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
<!-- 上传文件的modal --> |
|
|
@ -1258,7 +1361,9 @@ |
|
|
getOperatorList, |
|
|
getOperatorList, |
|
|
getIPQCItemList, // 获取IPQC检验项目列表 |
|
|
getIPQCItemList, // 获取IPQC检验项目列表 |
|
|
addIPQCItemDetails, // 添加IPQC检验项目 |
|
|
addIPQCItemDetails, // 添加IPQC检验项目 |
|
|
deleteIPQCItemDetails // 删除IPQC检验项目 |
|
|
|
|
|
|
|
|
deleteIPQCItemDetails, // 删除IPQC检验项目 |
|
|
|
|
|
getIPQCTemplateList, // 获取IPQC模板列表 |
|
|
|
|
|
importIPQCTemplateItems // 导入IPQC模板项目 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
@ -2755,6 +2860,15 @@ |
|
|
selectedItemList: [], |
|
|
selectedItemList: [], |
|
|
availableItemSelections: [], |
|
|
availableItemSelections: [], |
|
|
selectedItemSelections: [], |
|
|
selectedItemSelections: [], |
|
|
|
|
|
// 模板导入相关 |
|
|
|
|
|
templateImportDialogFlag: false, |
|
|
|
|
|
templateQuery: { |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateDesc: '', |
|
|
|
|
|
}, |
|
|
|
|
|
templateList: [], |
|
|
|
|
|
templateSelections: [], |
|
|
|
|
|
importLoading: false, |
|
|
itemObjectColumnList: [ |
|
|
itemObjectColumnList: [ |
|
|
{ |
|
|
{ |
|
|
columnProp: 'itemNo', |
|
|
columnProp: 'itemNo', |
|
|
@ -4548,6 +4662,98 @@ |
|
|
this.getInspectionFormData() |
|
|
this.getInspectionFormData() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ======================== 模板导入相关方法 ======================== |
|
|
|
|
|
// 打开模板导入对话框 |
|
|
|
|
|
openTemplateImportDialog() { |
|
|
|
|
|
this.templateQuery = { |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateDesc: '', |
|
|
|
|
|
} |
|
|
|
|
|
this.searchIPQCTemplates() |
|
|
|
|
|
this.templateImportDialogFlag = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 查询IPQC检验模板 |
|
|
|
|
|
async searchIPQCTemplates() { |
|
|
|
|
|
try { |
|
|
|
|
|
const {data} = await getIPQCTemplateList({ |
|
|
|
|
|
site: this.detailData.site, |
|
|
|
|
|
buNo: this.detailData.buNo, |
|
|
|
|
|
templateId: this.templateQuery.templateId, |
|
|
|
|
|
templateDesc: this.templateQuery.templateDesc, |
|
|
|
|
|
}) |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.templateList = data.rows || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '查询失败') |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.$message.error('查询失败,请检查') |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重置模板查询条件 |
|
|
|
|
|
resetTemplateQuery() { |
|
|
|
|
|
this.templateQuery = { |
|
|
|
|
|
templateId: '', |
|
|
|
|
|
templateDesc: '', |
|
|
|
|
|
} |
|
|
|
|
|
this.searchIPQCTemplates() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 模板行点击 |
|
|
|
|
|
templateClickRow(row) { |
|
|
|
|
|
this.$refs.templateTable.toggleRowSelection(row) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 模板选择变化 |
|
|
|
|
|
templateSelectionChange(selection) { |
|
|
|
|
|
this.templateSelections = selection |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确认导入模板 |
|
|
|
|
|
async confirmImportTemplate() { |
|
|
|
|
|
if (!this.templateSelections || this.templateSelections.length === 0) { |
|
|
|
|
|
this.$message.warning('请选择要导入的模板!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$confirm(`确定要导入选中的 ${this.templateSelections.length} 个模板吗?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(async () => { |
|
|
|
|
|
this.importLoading = true |
|
|
|
|
|
try { |
|
|
|
|
|
const {data} = await importIPQCTemplateItems({ |
|
|
|
|
|
site: this.detailData.site, |
|
|
|
|
|
buNo: this.detailData.buNo, |
|
|
|
|
|
inspectionNo: this.detailData.inspectionNo, |
|
|
|
|
|
orderNo: this.detailData.orderNo, |
|
|
|
|
|
templateList: this.templateSelections.map(t => ({ |
|
|
|
|
|
templateId: t.templateId, |
|
|
|
|
|
templateName: t.templateName |
|
|
|
|
|
})) |
|
|
|
|
|
}) |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success(`导入成功!共导入 ${data.importCount || 0} 个检验项目`) |
|
|
|
|
|
this.templateImportDialogFlag = false |
|
|
|
|
|
this.templateSelections = [] |
|
|
|
|
|
// 刷新检验明细列表 |
|
|
|
|
|
this.getInspectionFormData() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '导入失败') |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
this.$message.error('导入失败,请检查') |
|
|
|
|
|
} finally { |
|
|
|
|
|
this.importLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.info('已取消导入') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -4986,4 +5192,72 @@ |
|
|
font-size: 18px; |
|
|
font-size: 18px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* ==================== 模板导入对话框样式 ==================== */ |
|
|
|
|
|
/deep/ .template-import-dialog { |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__header { |
|
|
|
|
|
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); |
|
|
|
|
|
padding: 20px 24px; |
|
|
|
|
|
border-radius: 8px 8px 0 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__title { |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
letter-spacing: 0.5px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__headerbtn .el-dialog__close { |
|
|
|
|
|
color: #ffffff; |
|
|
|
|
|
font-size: 20px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__headerbtn:hover .el-dialog__close { |
|
|
|
|
|
color: #f0f0f0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__body { |
|
|
|
|
|
padding: 24px; |
|
|
|
|
|
background: #f8f9fa; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 模板列表容器 */ |
|
|
|
|
|
.template-list-container { |
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
border-radius: 6px; |
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); |
|
|
|
|
|
overflow: hidden; |
|
|
|
|
|
transition: all 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.template-list-container:hover { |
|
|
|
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 模板表格 */ |
|
|
|
|
|
.template-table { |
|
|
|
|
|
border: none !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.template-table /deep/ .el-table__body tr:hover > td { |
|
|
|
|
|
background-color: #f0fff4 !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.template-table /deep/ .el-table__row.current-row > td { |
|
|
|
|
|
background-color: #e6ffed !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.template-table /deep/ td { |
|
|
|
|
|
border-bottom: 1px solid #f0f0f0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.template-table /deep/ .el-table__body { |
|
|
|
|
|
font-size: 13px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |