Browse Source

refactor(inspection): 调整检验请求相关组件的数据字段和状态逻辑

- 将com_inspectionRequestPoDetailTab.vue中的poNo和poItemNo字段替换为orderRef1和orderRef2
- 移除inspectionRequestAudit.vue中的主表格行样式类名绑定功能
- 删除inspectionRequestAudit.vue中的hasModifiedQty数量修改标记样式逻辑
- 在inspectionRequestList.vue中允许已审核状态的检验请求进行删除操作
- 为inspectionRequestList.vue表单添加建议验货日期必填验证规则
master
qiankanghui 2 days ago
parent
commit
81649639cb
  1. 4
      src/views/modules/inspection/com_inspectionRequestPoDetailTab.vue
  2. 30
      src/views/modules/inspection/inspectionRequestAudit.vue
  3. 6
      src/views/modules/inspection/inspectionRequestList.vue

4
src/views/modules/inspection/com_inspectionRequestPoDetailTab.vue

@ -7,8 +7,8 @@
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="poNo" label="PO号" header-align="center" align="left" min-width="150" show-overflow-tooltip/>
<el-table-column prop="poItemNo" label="PO行号" header-align="center" align="center" width="100"/>
<el-table-column prop="orderRef1" label="PO号" header-align="center" align="left" min-width="150" show-overflow-tooltip/>
<el-table-column prop="orderRef2" label="PO行号" header-align="center" align="center" width="100"/>
<el-table-column prop="partNo" label="产品编码" header-align="center" align="left" min-width="150" show-overflow-tooltip/>
<el-table-column prop="partDesc" label="产品名称" header-align="center" align="left" min-width="150" show-overflow-tooltip/>
<el-table-column prop="qty" label="验货数量" header-align="center" align="right" width="120"/>

30
src/views/modules/inspection/inspectionRequestAudit.vue

@ -53,7 +53,6 @@
highlight-current-row
@row-click="changeData"
v-loading="dataListLoading"
:row-class-name="mainTableRowClassName"
style="margin-top: 0px; width: 100%;">
<el-table-column
v-for="(item,index) in columnArray1" :key="index"
@ -495,19 +494,6 @@ export default {
this.currentRow = row ? JSON.parse(JSON.stringify(row)) : {}
},
//
mainTableRowClassName ({ row }) {
if (row.hasModifiedQty === true ||
row.hasModifiedQty === 'true' ||
row.hasModifiedQty === 'Y' ||
row.hasModifiedQty === 'y' ||
row.hasModifiedQty === 1 ||
row.hasModifiedQty === '1') {
return 'modified-request-row'
}
return ''
},
//
auditInspection (row) {
this.$confirm('确定要审核该验货申请吗?', '提示', {
@ -598,22 +584,6 @@ export default {
padding: 5px !important;
}
// -
// 使 ::v-deep
::v-deep .el-table .modified-request-row {
background-color: #fef0f0 !important;
}
// td Element td
::v-deep .el-table .modified-request-row td {
background-color: #fef0f0 !important;
color: #f56c6c !important;
}
// hover
::v-deep .el-table .el-table__body tr.modified-request-row:hover > td {
background-color: #fde2e2 !important; // 便 hover
}
</style>
<!-- 全局样式 - 仅对有 modified-request-row 类的行生效 -->

6
src/views/modules/inspection/inspectionRequestList.vue

@ -98,7 +98,8 @@
<a v-if="scope.row.status === '草稿' || scope.row.statusDb === 'Draft'"
class="customer-a" @click="confirmInspection(scope.row)">确认 |</a>
<a v-if="(scope.row.status === '草稿' || scope.row.statusDb === 'Draft') ||
(scope.row.status === '已确认' || scope.row.statusDb === 'Confirmed')"
(scope.row.status === '已确认' || scope.row.statusDb === 'Confirmed') ||
(scope.row.status === '已审核' || scope.row.statusDb === 'Audited')"
class="customer-a" @click="deleteInspectionRequest(scope.row)">删除</a>
<span v-else class="customer-a" style="color: #909399; cursor: default;">{{ scope.row.status }}</span>
</template>
@ -389,6 +390,9 @@ export default {
],
supplierNo: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
needInspectDate: [
{ required: true, message: '请选择建议验货日期', trigger: 'change' }
]
},
poList: [],

Loading…
Cancel
Save