diff --git a/src/views/modules/sampleTracking/projectProofTracking.vue b/src/views/modules/sampleTracking/projectProofTracking.vue index 7beb08b..0437bea 100644 --- a/src/views/modules/sampleTracking/projectProofTracking.vue +++ b/src/views/modules/sampleTracking/projectProofTracking.vue @@ -154,7 +154,7 @@ :data="dataList" border class="data-table" stripe highlight-current-row - height="700" + height="670" v-loading="dataListLoading" @sort-change="handleTrackingTableSortChange" @selection-change="selectionChange" @@ -4347,9 +4347,11 @@ export default { return } optionMap[applyNo] = true + // 预计完成日期、创建日期分别回填打样的预计完成/开始日期,避免二次查单。 optionRows.push({ applyNo: applyNo, expectedFinishDate: this.formatDate(item.expectedFinishDate), + createTime: this.formatDate(item.createTime), applyQuantity: this.isBlankValue(item.quantityReq) ? '' : String(item.quantityReq).trim() }) }) @@ -4366,6 +4368,7 @@ export default { this.oneKeyProofingApplyOptions = [] this.oneKeyForm.proofingNo = '' this.oneKeyForm.requiredDeliveryDate = '' + this.oneKeyForm.planStartDate = '' this.oneKeyProjectNoSnapshot = '' this.oneKeyForm.testPartNo = '' this.oneKeyForm.partDesc = '' @@ -4388,7 +4391,7 @@ export default { handleOneKeyProofingNoChange (proofingNo) { const selectedNo = this.isBlankValue(proofingNo) ? '' : String(proofingNo).trim() if (this.oneKeyDialogMode !== 'create') { - // 修改模式下预计完成日期以数据库已存值为准,不跟随打样单号自动回填/清空。 + // 修改模式下预计完成日期、打样开始日期以数据库已存值为准,不跟随打样单号自动回填/清空。 if (!selectedNo) { this.oneKeyForm.proofingNo = '' return @@ -4401,6 +4404,7 @@ export default { } if (!selectedNo) { this.oneKeyForm.requiredDeliveryDate = '' + this.oneKeyForm.planStartDate = '' return } const matched = this.oneKeyProofingApplyOptions.find(item => item && item.applyNo === selectedNo) @@ -4409,6 +4413,8 @@ export default { } this.oneKeyForm.proofingNo = matched.applyNo this.oneKeyForm.requiredDeliveryDate = matched.expectedFinishDate || '' + // 打样开始日期默认取工程实验单创建日期;清空打样单时同步清空,避免残留旧单日期。 + this.oneKeyForm.planStartDate = matched.createTime || '' this.syncOneKeyBaselineByRequiredDeliveryDate(this.oneKeyForm.requiredDeliveryDate, false) }, handleOneKeyRequiredDeliveryDateChange (dateVal) { @@ -4452,12 +4458,14 @@ export default { nextOptions.unshift({ applyNo: currentProofingNo, expectedFinishDate: this.formatDate(this.oneKeyForm.requiredDeliveryDate), + createTime: this.formatDate(this.oneKeyForm.planStartDate), applyQuantity: '' }) } if (!hasCurrent && !keepCurrentIfMissing) { this.oneKeyForm.proofingNo = '' this.oneKeyForm.requiredDeliveryDate = '' + this.oneKeyForm.planStartDate = '' } } this.oneKeyProofingApplyOptions = nextOptions @@ -4481,6 +4489,7 @@ export default { const selectedNo = this.isBlankValue(proofingNo) ? '' : String(proofingNo).trim() if (!selectedNo) { this.proofDialogData.requiredDeliveryDate = '' + this.proofDialogData.planStartDate = '' return } const matched = this.proofDialogApplyOptions.find(item => item && item.applyNo === selectedNo) @@ -4489,6 +4498,8 @@ export default { } this.proofDialogData.proofingNo = matched.applyNo this.proofDialogData.requiredDeliveryDate = matched.expectedFinishDate || '' + // 打样开始日期默认取工程实验单创建日期;清空打样单时同步清空,避免残留旧单日期。 + this.proofDialogData.planStartDate = matched.createTime || '' }, loadProofDialogApplyOptions (projectNo) { const normalizedProjectNo = this.normalizeProjectNo(projectNo) @@ -4499,6 +4510,7 @@ export default { this.proofDialogApplyOptions = [] this.proofDialogData.proofingNo = '' this.proofDialogData.requiredDeliveryDate = '' + this.proofDialogData.planStartDate = '' return Promise.resolve([]) } this.proofDialogApplyLoading = true @@ -6121,10 +6133,23 @@ export default {