Browse Source

2025-11-24

IPQC检验增加项目操作
master
fengyuan_yang 2 months ago
parent
commit
efb95a3434
  1. 117
      src/views/modules/qc/IPQCResultEntry.vue
  2. 82
      src/views/modules/qc/IQCResultEntry.vue

117
src/views/modules/qc/IPQCResultEntry.vue

@ -533,7 +533,7 @@
</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;">
<el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;margin-right: 11px">
<el-form-item :label="'检验结论'">
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
<el-option label="合格" value="合格"></el-option>
@ -570,9 +570,15 @@
<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-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 :label="' '" style="margin-left: auto;margin-top: -10px">
<el-button class="operation-btn item-operation-btn" @click="openItemOperationDialog">
<i class="el-icon-setting"></i>
<span>项目导入</span>
</el-button>
<el-button class="operation-btn template-import-btn" @click="openTemplateImportDialog">
<i class="el-icon-download"></i>
<span>模板导入</span>
</el-button>
</el-form-item>
</el-form>
<!-- 展示列表 -->
@ -589,7 +595,11 @@
min-width="90"
label="操作">
<template slot-scope="scope">
<el-button icon="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button>
<el-button
icon="el-icon-picture"
:type="hasImage(scope.row) ? 'success' : 'primary'"
@click="uploadImageModal(scope.row)">
</el-button>
<el-button style="margin-left: 2px" icon="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button>
</template>
</el-table-column>
@ -3417,6 +3427,26 @@
})
},
//
hasImage(row) {
// itemImageUrl, imgUrl, imagePath, itemImg, img_url
const imageFields = ['itemImageUrl', 'imgUrl', 'imagePath', 'itemImg', 'img_url', 'image_url', 'imageUrl']
//
for (const field of imageFields) {
if (row[field] && row[field].trim() !== '') {
return true
}
}
//
const hasImageColumn = this.detailColumnList.some(col => {
return col.columnImage && row[col.columnProp] && row[col.columnProp].trim() !== ''
})
return hasImageColumn
},
//
uploadImageModal (row) {
let currentData = {
@ -5004,7 +5034,7 @@
}
/deep/ .item-operation-dialog .el-dialog__header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
padding: 20px 24px;
border-radius: 8px 8px 0 0;
}
@ -5081,8 +5111,8 @@
/* 面板头部 */
.panel-header {
padding: 14px 16px;
background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 100%);
border-bottom: 2px solid #dcdfe6;
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
border-bottom: 2px solid #9ac3d0;
display: flex;
align-items: center;
gap: 8px;
@ -5090,21 +5120,21 @@
.panel-header i {
font-size: 18px;
color: #606266;
color: #ffffff;
}
.panel-title {
font-size: 14px;
font-weight: 600;
color: #303133;
color: #ffffff;
letter-spacing: 0.5px;
}
.item-count {
margin-left: auto;
font-size: 12px;
color: #909399;
background: #ffffff;
color: #ffffff;
background: rgba(255, 255, 255, 0.25);
padding: 2px 10px;
border-radius: 12px;
font-weight: 500;
@ -5200,7 +5230,7 @@
}
/deep/ .template-import-dialog .el-dialog__header {
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
padding: 20px 24px;
border-radius: 8px 8px 0 0;
}
@ -5246,11 +5276,11 @@
}
.template-table /deep/ .el-table__body tr:hover > td {
background-color: #f0fff4 !important;
background-color: #f0f7ff !important;
}
.template-table /deep/ .el-table__row.current-row > td {
background-color: #e6ffed !important;
background-color: #e6f2ff !important;
}
.template-table /deep/ td {
@ -5260,4 +5290,61 @@
.template-table /deep/ .el-table__body {
font-size: 13px;
}
/* ==================== 按钮样式优化 ==================== */
.operation-btn {
position: relative;
padding: 8px 16px;
border: none;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.operation-btn:hover {
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
.operation-btn:active {
transform: translateY(0);
}
.operation-btn i {
margin-right: 4px;
font-size: 13px;
}
.operation-btn span {
position: relative;
z-index: 1;
}
/* 项目操作按钮 */
.item-operation-btn {
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
color: #ffffff;
}
.item-operation-btn:hover {
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
color: #ffffff;
}
/* 模板导入按钮 */
.template-import-btn {
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
color: #ffffff;
margin-left: 10px;
}
.template-import-btn:hover {
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
color: #ffffff;
}
</style>

82
src/views/modules/qc/IQCResultEntry.vue

@ -1021,6 +1021,24 @@
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1DisposalMeasures',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'disposalMeasures',
headerAlign: "center",
align: "center",
columnLabel: '处置措施',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
@ -1258,67 +1276,67 @@
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1PoOrderNo',
serialNumber: '301006Table1DocumentNo',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'poOrderNo',
columnProp: 'documentNo',
headerAlign: "center",
align: "center",
columnLabel: '单号',
align: "left",
columnLabel: '通知单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130,
columnWidth: 150,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1OrderType',
serialNumber: '301006Table1PoOrderNo',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'orderType',
columnProp: 'poOrderNo',
headerAlign: "center",
align: "center",
columnLabel: '采购类型',
align: "left",
columnLabel: '单据号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
columnWidth: 180,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1SubmissionType',
serialNumber: '301006Table1PoItemNo',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'submissionType',
columnProp: 'poItemNo',
headerAlign: "center",
align: "center",
columnLabel: '送检类型',
align: "right",
columnLabel: '单据行号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
columnWidth: 160,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1PoItemNo',
serialNumber: '301006Table1OrderType',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'poItemNo',
columnProp: 'orderType',
headerAlign: "center",
align: "right",
columnLabel: '单据行号',
align: "left",
columnLabel: '采购类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1330,31 +1348,31 @@
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1SupplierDesc',
serialNumber: '301006Table1SubmissionType',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'supplierDesc',
columnProp: 'submissionType',
headerAlign: "center",
align: "left",
columnLabel: '供应商',
align: "center",
columnLabel: '送检类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1InspectionRemark',
serialNumber: '301006Table1SupplierDesc',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'inspectionRemark',
columnProp: 'supplierDesc',
headerAlign: "center",
align: "left",
columnLabel: '质检备注',
columnLabel: '供应商',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1366,20 +1384,20 @@
{
userId: this.$store.state.user.name,
functionId: 301006,
serialNumber: '301006Table1DisposalMeasures',
serialNumber: '301006Table1InspectionRemark',
tableId: "301006Table1",
tableName: "IQC检验记录表",
columnProp: 'disposalMeasures',
columnProp: 'inspectionRemark',
headerAlign: "center",
align: "center",
columnLabel: '处置措施',
align: "left",
columnLabel: '质检备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
columnWidth: 200,
},
{
userId: this.$store.state.user.name,

Loading…
Cancel
Save