diff --git a/src/views/modules/sampleTracking/projectProofTracking.vue b/src/views/modules/sampleTracking/projectProofTracking.vue
index 51ed337..668748a 100644
--- a/src/views/modules/sampleTracking/projectProofTracking.vue
+++ b/src/views/modules/sampleTracking/projectProofTracking.vue
@@ -52,6 +52,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
-
+
@@ -1013,7 +1061,18 @@
-
+
+
+
+
+
+
+
@@ -1387,6 +1446,91 @@ const DEFAULT_TRACKING_COLUMNS = [
columnWidth: 80,
showOverflowTooltip: false
},
+ // Sample Qty / Year / Month / LT 为计算列;仅 PM inquery time 落库。
+ {
+ serialNumber: 'proofTrackingTable1SampleQty',
+ columnProp: 'sampleQty',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Sample Qty',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ showOverflowTooltip: false
+ },
+ {
+ serialNumber: 'proofTrackingTable1PmInqueryTime',
+ columnProp: 'pmInqueryTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'PM inquery time',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 120,
+ showOverflowTooltip: false
+ },
+ {
+ serialNumber: 'proofTrackingTable1SampleMakingYear',
+ columnProp: 'sampleMakingYear',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Sample making Year',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ showOverflowTooltip: false
+ },
+ {
+ serialNumber: 'proofTrackingTable1SampleMakingMonth',
+ columnProp: 'sampleMakingMonth',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Sample making Month',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ showOverflowTooltip: false
+ },
+ {
+ serialNumber: 'proofTrackingTable1SampleLt',
+ columnProp: 'sampleLt',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Sample LT',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 90,
+ showOverflowTooltip: false
+ },
+ {
+ serialNumber: 'proofTrackingTable1SampleLtInquery',
+ columnProp: 'sampleLtInquery',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Sample LT(Inquery)',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ status: true,
+ fixed: '',
+ columnWidth: 140,
+ showOverflowTooltip: false
+ },
{
serialNumber: 'proofTrackingTable1Baseline',
columnProp: 'baseline',
@@ -1473,7 +1617,12 @@ export default {
pic: '',
projectPartSyncFlag: '',
proofSyncFlag: '',
- proofingStatusList: []
+ proofingStatusList: [],
+ sampleQty: '',
+ sampleMakingYear: '',
+ sampleMakingMonth: '',
+ pmInqueryTimeStart: '',
+ pmInqueryTimeEnd: ''
},
searchCustomerOptions: [],
searchCustomerOptionLoading: false,
@@ -1573,6 +1722,7 @@ export default {
'proofingNumber',
'baseline',
'planStartDate',
+ 'pmInqueryTime',
'requiredDeliveryDate',
'remark'
],
@@ -1729,6 +1879,17 @@ export default {
return null
}
return this.proofDialogApplyOptions.find(item => item && item.applyNo === selectedApplyNo) || null
+ },
+ sampleMakingYearOptions () {
+ const currentYear = new Date().getFullYear()
+ const years = []
+ for (let year = currentYear; year >= 2022; year--) {
+ years.push(year)
+ }
+ return years
+ },
+ sampleMakingMonthOptions () {
+ return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}
},
methods: {
@@ -1881,7 +2042,7 @@ export default {
const rows = data && Array.isArray(data.rows) ? data.rows : []
if (rows.length > 0) {
this.hasUserTrackingColumnConfig = true
- this.trackingColumnList = this.normalizeTrackingColumns(rows, false)
+ this.trackingColumnList = this.normalizeTrackingColumns(rows, true)
this.refreshTrackingTableLayout()
return this.trackingColumnList
}
@@ -1958,6 +2119,15 @@ export default {
return ''
}
const value = row[columnProp]
+ if (columnProp === 'pmInqueryTime') {
+ return this.formatDate(value)
+ }
+ if (columnProp === 'sampleMakingMonth' && !this.isBlankValue(value)) {
+ const month = Number(value)
+ if (!Number.isNaN(month)) {
+ return String(month).padStart(2, '0')
+ }
+ }
return this.isBlankValue(value) ? '' : String(value)
},
isDeliveryVarianceAlert (row) {
@@ -3834,6 +4004,7 @@ export default {
planStartDate: '',
requiredDeliveryDate: '',
baseline: '',
+ pmInqueryTime: '',
needDate: '',
remark: ''
}
@@ -3863,12 +4034,32 @@ export default {
planStartDate: '',
requiredDeliveryDate: '',
actualityDeliveryDate: '',
+ pmInqueryTime: '',
proofingStatus: '草稿',
remark: '',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name
}
},
+ normalizeSearchInteger (value) {
+ if (this.isBlankValue(value)) {
+ return null
+ }
+ const parsedValue = parseInt(value, 10)
+ return Number.isNaN(parsedValue) ? null : parsedValue
+ },
+ applyProofTrackingSearchFilters (inData) {
+ if (!inData) {
+ return inData
+ }
+ // 年/月筛选对应打样完成日期;空值转 null,避免空字符串把 Integer 查询参数打坏。
+ inData.sampleQty = this.normalizeSearchInteger(inData.sampleQty)
+ inData.sampleMakingYear = this.normalizeSearchInteger(inData.sampleMakingYear)
+ inData.sampleMakingMonth = this.normalizeSearchInteger(inData.sampleMakingMonth)
+ inData.pmInqueryTimeStart = this.isBlankValue(inData.pmInqueryTimeStart) ? null : inData.pmInqueryTimeStart
+ inData.pmInqueryTimeEnd = this.isBlankValue(inData.pmInqueryTimeEnd) ? null : inData.pmInqueryTimeEnd
+ return inData
+ },
getDataList (flag) {
if (flag === 'Y') {
this.pageIndex = 1
@@ -3883,6 +4074,7 @@ export default {
})
inData.buNo = this.normalizeBuNo(inData.buNo, inData.site)
inData.proofingStatusList = normalizedProofingStatusList
+ this.applyProofTrackingSearchFilters(inData)
this.dataListLoading = true
searchProofTracking(inData).then(({ data }) => {
this.dataListLoading = false
@@ -3966,6 +4158,7 @@ export default {
exportCommentsColumn: true
})
inData.proofingStatusList = normalizedProofingStatusList
+ this.applyProofTrackingSearchFilters(inData)
this.exportLoading = true
try {
const response = await exportProofTracking(inData)
@@ -4044,6 +4237,11 @@ export default {
this.searchData.projectPartSyncFlag = ''
this.searchData.proofSyncFlag = ''
this.searchData.proofingStatusList = []
+ this.searchData.sampleQty = ''
+ this.searchData.sampleMakingYear = ''
+ this.searchData.sampleMakingMonth = ''
+ this.searchData.pmInqueryTimeStart = ''
+ this.searchData.pmInqueryTimeEnd = ''
this.ensureSearchBuNoSelected()
this.queryProcessColumns().then(() => {
this.getDataList('Y')
@@ -4974,6 +5172,7 @@ export default {
} else if (!this.isBlankValue(inData.buildDate)) {
inData.projectCreationDate = inData.buildDate
}
+ inData.pmInqueryTime = this.isBlankValue(inData.pmInqueryTime) ? null : this.formatDate(inData.pmInqueryTime)
return inData
},
validateOneKeySubmitPayload (inData) {
@@ -5083,6 +5282,7 @@ export default {
planStartDate: current.planStartDate || '',
requiredDeliveryDate: current.requiredDeliveryDate || '',
baseline: current.baseline || '',
+ pmInqueryTime: this.formatDate(current.pmInqueryTime),
needDate: project.needDate || part.needDate || current.needDate || '',
remark: part.remark || project.remark || current.remark || ''
})
@@ -5275,6 +5475,7 @@ export default {
planStartDate: '',
requiredDeliveryDate: '',
actualityDeliveryDate: '',
+ pmInqueryTime: '',
proofingStatus: '草稿',
remark: '',
createBy: this.$store.state.user.name,
@@ -5511,7 +5712,8 @@ export default {
proofingNumber: Number(this.proofDialogData.proofingNumber),
planStartDate: this.proofDialogData.planStartDate,
requiredDeliveryDate: this.proofDialogData.requiredDeliveryDate,
- actualityDeliveryDate: this.proofDialogData.actualityDeliveryDate,
+ actualityDeliveryDate: this.proofDialogData.actualityDeliveryDate || null,
+ pmInqueryTime: this.isBlankValue(this.proofDialogData.pmInqueryTime) ? null : this.proofDialogData.pmInqueryTime,
proofingStatus: this.proofDialogData.proofingStatus || '草稿',
remark: this.proofDialogData.remark,
tracker: this.proofDialogData.projectOwner,