diff --git a/src/views/modules/sampleTracking/projectProofTracking.vue b/src/views/modules/sampleTracking/projectProofTracking.vue
index ffc9313..008235c 100644
--- a/src/views/modules/sampleTracking/projectProofTracking.vue
+++ b/src/views/modules/sampleTracking/projectProofTracking.vue
@@ -19,6 +19,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -31,11 +43,10 @@
一键创建
- 一键修改
- {{ batchEditMode ? '取消修改' : '批量修改' }}
- 保存修改
- 新增打样
- 同步项目物料到NPI
+
+ 新增打样
+ 同步项目物料到NPI
同步打样到NPI
@@ -53,16 +64,36 @@
style="width: 100%; margin-top: 8px"
>
-
-
-
-
+
+
+ {{ scope.row.projectNo || '-' }}
+
+
+
+
+ {{ scope.row.projectDesc || '-' }}
+
+
+
+
+ {{ scope.row.testPartNo || '-' }}
+
+
+
+
+ {{ scope.row.partDesc || '-' }}
+
+
-
+
+
+ {{ scope.row.proofingNo || '-' }}
+
+
-
+
{{ scope.row.proofingStatus || '进行中' }}
@@ -155,10 +186,11 @@
-
+
+ 修改
删除
打样完成
@@ -809,6 +841,8 @@ export default {
partDesc: '',
customerNo: '',
proofingNo: '',
+ projectPartSyncFlag: '',
+ proofSyncFlag: '',
proofingStatus: ''
},
processColumns: [
@@ -1333,6 +1367,8 @@ export default {
this.searchData.partDesc = ''
this.searchData.customerNo = ''
this.searchData.proofingNo = ''
+ this.searchData.projectPartSyncFlag = ''
+ this.searchData.proofSyncFlag = ''
this.searchData.proofingStatus = ''
this.getDataList('Y')
},
@@ -1432,6 +1468,35 @@ export default {
}
return row.projectPartId || row.project_part_id || null
},
+ isSyncedByIdRule (idValue) {
+ if (idValue == null || String(idValue).trim() === '') {
+ return false
+ }
+ // 约定:NPI 正式库主键 < 100000,tracking 临时主键 >= 100000。
+ const numericId = Number(idValue)
+ return Number.isFinite(numericId) && numericId > 0 && numericId < 100000
+ },
+ isProjectPartSynced (row) {
+ if (!row) {
+ return false
+ }
+ const projectId = row.projectId || row.project_id || null
+ const projectPartId = this.getTrackingProjectPartId(row)
+ return this.isSyncedByIdRule(projectId) && this.isSyncedByIdRule(projectPartId)
+ },
+ isProofSynced (row) {
+ if (!row) {
+ return false
+ }
+ const proofingId = row.proofingId || row.proofing_id || row.trackingId || null
+ return this.isSyncedByIdRule(proofingId)
+ },
+ getProjectPartSyncTextClass (row) {
+ return this.isProjectPartSynced(row) ? 'sync-text--ok' : 'sync-text--pending'
+ },
+ getProofSyncTextClass (row) {
+ return this.isProofSynced(row) ? 'sync-text--ok' : 'sync-text--pending'
+ },
getProjectCategoryValue (source) {
if (!source) {
return ''
@@ -1608,7 +1673,7 @@ export default {
form.cQualityEngineer7Name = this.getRoleDisplayName(form.cQualityEngineer7)
return form
},
- openOneKeyDialog (mode) {
+ openOneKeyDialog (mode, row) {
const dialogMode = mode === 'edit' ? 'edit' : 'create'
this.oneKeyDialogMode = dialogMode
if (dialogMode !== 'edit') {
@@ -1619,7 +1684,7 @@ export default {
this.oneKeyDialogVisible = true
return
}
- const current = this.getActionRow()
+ const current = this.getActionRow(row)
if (!current) {
this.$message.warning('请先选择一条记录后再修改项目/物料/打样')
this.oneKeyDialogMode = 'create'
@@ -1707,6 +1772,8 @@ export default {
this.searchData.partDesc = ''
this.searchData.customerNo = ''
this.searchData.proofingNo = ''
+ this.searchData.projectPartSyncFlag = ''
+ this.searchData.proofSyncFlag = ''
this.searchData.proofingStatus = ''
this.getDataList('Y')
} else {
@@ -2492,6 +2559,15 @@ export default {
color: #35b4b4;
}
+.sync-text--ok {
+ color: #67c23a;
+ font-weight: 600;
+}
+
+.sync-text--pending {
+ color: #e6a23c;
+}
+
.process-cell {
background: #fff;
min-height: 44px;
@@ -2617,6 +2693,10 @@ export default {
cursor: pointer;
}
+.edit-link {
+ color: #e6a23c;
+}
+
.delete-link {
color: #f56c6c;
}