Showing
6 changed files
with
29 additions
and
21 deletions
| ... | ... | @@ -254,7 +254,7 @@ |
| 254 | 254 | <view class="item-title"><text>来料类型备注</text></view> |
| 255 | 255 | </template> |
| 256 | 256 | <template v-slot:footer> |
| 257 | - <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypeRemark" | |
| 257 | + <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypesRemarks" | |
| 258 | 258 | type="textarea" :inputBorder="false" placeholder="请输入来料类型备注" autoHeight /> |
| 259 | 259 | </template> |
| 260 | 260 | </uni-list-item> |
| ... | ... | @@ -345,7 +345,7 @@ export default { |
| 345 | 345 | totalGrossWeight: '', |
| 346 | 346 | actualImpurityWeight: '', |
| 347 | 347 | deductionTypes: [], |
| 348 | - deductionTypeRemark: '', | |
| 348 | + deductionTypesRemarks: '', | |
| 349 | 349 | supplierStockMaterial: '', |
| 350 | 350 | logisticsStockMaterial: '', |
| 351 | 351 | plateNumber: '', |
| ... | ... | @@ -451,7 +451,7 @@ export default { |
| 451 | 451 | .filter(text => !!text) |
| 452 | 452 | if (weightItems.length) parts.push(weightItems.join('、')) |
| 453 | 453 | // 来料扣杂类型段落以「来料类型备注」文本为准(用户可自由修改) |
| 454 | - const deductionSegment = (this.form.deductionTypeRemark || '').trim() | |
| 454 | + const deductionSegment = (this.form.deductionTypesRemarks || '').trim() | |
| 455 | 455 | if (deductionSegment) parts.push(deductionSegment) |
| 456 | 456 | if (this.form.supplierStockMaterial) parts.push(`供应存欠料:${this.form.supplierStockMaterial}`) |
| 457 | 457 | if (this.form.logisticsStockMaterial) parts.push(`物流存欠料:${this.form.logisticsStockMaterial}`) |
| ... | ... | @@ -527,7 +527,7 @@ export default { |
| 527 | 527 | .filter(it => selected.includes(it.value)) |
| 528 | 528 | .map(it => it.text) |
| 529 | 529 | .filter(name => !!name) |
| 530 | - const segments = (this.form.deductionTypeRemark || '') | |
| 530 | + const segments = (this.form.deductionTypesRemarks || '') | |
| 531 | 531 | .split('、') |
| 532 | 532 | .map(text => text.trim()) |
| 533 | 533 | .filter(text => !!text) |
| ... | ... | @@ -543,7 +543,7 @@ export default { |
| 543 | 543 | const found = matched.find(item => item.name === name) |
| 544 | 544 | return found ? found.text : name |
| 545 | 545 | }) |
| 546 | - this.form.deductionTypeRemark = result.join('、') | |
| 546 | + this.form.deductionTypesRemarks = result.join('、') | |
| 547 | 547 | }, |
| 548 | 548 | // 计划选择弹窗数据源 |
| 549 | 549 | fetchPlans({ pageIndex, pageSize, extra }) { |
| ... | ... | @@ -737,6 +737,7 @@ export default { |
| 737 | 737 | netWeight: this.computedNetWeight === '' ? null : Number(this.computedNetWeight), |
| 738 | 738 | netWeightUpper: this.computedNetWeightUpper || null, |
| 739 | 739 | deductionTypes: (this.form.deductionTypes || []).join(',') || null, |
| 740 | + deductionTypesRemarks: this.form.deductionTypesRemarks || null, | |
| 740 | 741 | supplierStockMaterial: this.form.supplierStockMaterial || null, |
| 741 | 742 | logisticsStockMaterial: this.form.logisticsStockMaterial || null, |
| 742 | 743 | plateNumber: this.form.plateNumber || null, | ... | ... |
| ... | ... | @@ -88,6 +88,7 @@ |
| 88 | 88 | <view class="row"><text class="label">货物净重(kg)</text><text class="value">{{ formatNumber(form.netWeight) }}</text></view> |
| 89 | 89 | <view class="row"><text class="label">净重大写</text><text class="value">{{ safeText(form.netWeightUpper) }}</text></view> |
| 90 | 90 | <view class="row"><text class="label">来料扣杂类型</text><text class="value">{{ deductionNames }}</text></view> |
| 91 | + <view class="row"><text class="label">来料类型备注</text><text class="value">{{ safeText(form.deductionTypesRemarks) }}</text></view> | |
| 91 | 92 | <view class="row"><text class="label">供应存欠料</text><text class="value">{{ safeText(form.supplierStockMaterial) }}</text></view> |
| 92 | 93 | <view class="row"><text class="label">物流存欠料</text><text class="value">{{ safeText(form.logisticsStockMaterial) }}</text></view> |
| 93 | 94 | <view class="row"><text class="label">车牌号</text><text class="value">{{ safeText(form.plateNumber) }}</text></view> | ... | ... |
| ... | ... | @@ -255,7 +255,7 @@ |
| 255 | 255 | <view class="item-title"><text>来料类型备注</text></view> |
| 256 | 256 | </template> |
| 257 | 257 | <template v-slot:footer> |
| 258 | - <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypeRemark" | |
| 258 | + <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypesRemarks" | |
| 259 | 259 | type="textarea" :inputBorder="false" placeholder="请输入来料类型备注" autoHeight /> |
| 260 | 260 | </template> |
| 261 | 261 | </uni-list-item> |
| ... | ... | @@ -347,7 +347,7 @@ export default { |
| 347 | 347 | totalGrossWeight: '', |
| 348 | 348 | actualImpurityWeight: '', |
| 349 | 349 | deductionTypes: [], |
| 350 | - deductionTypeRemark: '', | |
| 350 | + deductionTypesRemarks: '', | |
| 351 | 351 | supplierStockMaterial: '', |
| 352 | 352 | logisticsStockMaterial: '', |
| 353 | 353 | plateNumber: '', |
| ... | ... | @@ -457,7 +457,7 @@ export default { |
| 457 | 457 | .filter(text => !!text) |
| 458 | 458 | if (weightItems.length) parts.push(weightItems.join('、')) |
| 459 | 459 | // 来料扣杂类型段落以「来料类型备注」文本为准(用户可自由修改) |
| 460 | - const deductionSegment = (this.form.deductionTypeRemark || '').trim() | |
| 460 | + const deductionSegment = (this.form.deductionTypesRemarks || '').trim() | |
| 461 | 461 | if (deductionSegment) parts.push(deductionSegment) |
| 462 | 462 | if (this.form.supplierStockMaterial) parts.push(`供应存欠料:${this.form.supplierStockMaterial}`) |
| 463 | 463 | if (this.form.logisticsStockMaterial) parts.push(`物流存欠料:${this.form.logisticsStockMaterial}`) |
| ... | ... | @@ -523,7 +523,7 @@ export default { |
| 523 | 523 | .filter(it => selected.includes(it.value)) |
| 524 | 524 | .map(it => it.text) |
| 525 | 525 | .filter(name => !!name) |
| 526 | - const segments = (this.form.deductionTypeRemark || '') | |
| 526 | + const segments = (this.form.deductionTypesRemarks || '') | |
| 527 | 527 | .split('、') |
| 528 | 528 | .map(text => text.trim()) |
| 529 | 529 | .filter(text => !!text) |
| ... | ... | @@ -539,7 +539,7 @@ export default { |
| 539 | 539 | const found = matched.find(item => item.name === name) |
| 540 | 540 | return found ? found.text : name |
| 541 | 541 | }) |
| 542 | - this.form.deductionTypeRemark = result.join('、') | |
| 542 | + this.form.deductionTypesRemarks = result.join('、') | |
| 543 | 543 | }, |
| 544 | 544 | // 从已保存的业务摘要中解析来料扣杂类型段落,用于回显来料类型备注 |
| 545 | 545 | extractDeductionRemark(businessSummary) { |
| ... | ... | @@ -578,14 +578,14 @@ export default { |
| 578 | 578 | totalGrossWeight: data.totalGrossWeight == null ? '' : String(data.totalGrossWeight), |
| 579 | 579 | actualImpurityWeight: data.actualImpurityWeight == null ? '' : String(data.actualImpurityWeight), |
| 580 | 580 | deductionTypes: data.deductionTypes ? String(data.deductionTypes).split(',').filter(Boolean) : [], |
| 581 | - deductionTypeRemark: '', | |
| 581 | + deductionTypesRemarks: '', | |
| 582 | 582 | supplierStockMaterial: data.supplierStockMaterial || '', |
| 583 | 583 | logisticsStockMaterial: data.logisticsStockMaterial || '', |
| 584 | 584 | plateNumber: data.plateNumber || '', |
| 585 | 585 | specialNote: data.specialNote || '' |
| 586 | 586 | } |
| 587 | - // 回显来料类型备注:优先取已保存业务摘要中的扣杂段落 | |
| 588 | - this.form.deductionTypeRemark = this.extractDeductionRemark(data.businessSummary) | |
| 587 | + // 回显来料类型备注:优先取独立字段,历史数据从业务摘要解析 | |
| 588 | + this.form.deductionTypesRemarks = this.extractDeductionRemark(data.deductionTypesRemarks || data.businessSummary) | |
| 589 | 589 | // 计划选择回显:行对象缓存供提交 planIds 使用(id 取计划明细行上的计划 id) |
| 590 | 590 | this.planList = (Array.isArray(data.planLines) ? data.planLines : []).map(it => ({ ...it })) |
| 591 | 591 | this.selectedPlanRows = this.planList.map(item => ({ |
| ... | ... | @@ -810,6 +810,7 @@ export default { |
| 810 | 810 | netWeight: this.computedNetWeight === '' ? null : Number(this.computedNetWeight), |
| 811 | 811 | netWeightUpper: this.computedNetWeightUpper || null, |
| 812 | 812 | deductionTypes: (this.form.deductionTypes || []).join(',') || null, |
| 813 | + deductionTypesRemarks: this.form.deductionTypesRemarks || null, | |
| 813 | 814 | supplierStockMaterial: this.form.supplierStockMaterial || null, |
| 814 | 815 | logisticsStockMaterial: this.form.logisticsStockMaterial || null, |
| 815 | 816 | plateNumber: this.form.plateNumber || null, | ... | ... |
| ... | ... | @@ -200,7 +200,7 @@ |
| 200 | 200 | <view class="item-title"><text>来料类型备注</text></view> |
| 201 | 201 | </template> |
| 202 | 202 | <template v-slot:footer> |
| 203 | - <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypeRemark" | |
| 203 | + <uni-easyinput class="deduction-remark-input" v-model="form.deductionTypesRemarks" | |
| 204 | 204 | type="textarea" :inputBorder="false" placeholder="请输入来料类型备注" autoHeight /> |
| 205 | 205 | </template> |
| 206 | 206 | </uni-list-item> |
| ... | ... | @@ -301,7 +301,7 @@ export default { |
| 301 | 301 | totalGrossWeight: '', |
| 302 | 302 | actualImpurityWeight: '', |
| 303 | 303 | deductionTypes: [], |
| 304 | - deductionTypeRemark: '', | |
| 304 | + deductionTypesRemarks: '', | |
| 305 | 305 | supplierStockMaterial: '', |
| 306 | 306 | logisticsStockMaterial: '', |
| 307 | 307 | plateNumber: '', |
| ... | ... | @@ -376,7 +376,7 @@ export default { |
| 376 | 376 | .filter(text => !!text) |
| 377 | 377 | if (weightItems.length) parts.push(weightItems.join('、')) |
| 378 | 378 | // 来料扣杂类型段落以「来料类型备注」文本为准(用户可自由修改) |
| 379 | - const deductionSegment = (this.form.deductionTypeRemark || '').trim() | |
| 379 | + const deductionSegment = (this.form.deductionTypesRemarks || '').trim() | |
| 380 | 380 | if (deductionSegment) parts.push(deductionSegment) |
| 381 | 381 | if (this.form.supplierStockMaterial) parts.push(`供应存欠料:${this.form.supplierStockMaterial}`) |
| 382 | 382 | if (this.form.logisticsStockMaterial) parts.push(`物流存欠料:${this.form.logisticsStockMaterial}`) |
| ... | ... | @@ -435,7 +435,7 @@ export default { |
| 435 | 435 | .filter(it => selected.includes(it.value)) |
| 436 | 436 | .map(it => it.text) |
| 437 | 437 | .filter(name => !!name) |
| 438 | - const segments = (this.form.deductionTypeRemark || '') | |
| 438 | + const segments = (this.form.deductionTypesRemarks || '') | |
| 439 | 439 | .split('、') |
| 440 | 440 | .map(text => text.trim()) |
| 441 | 441 | .filter(text => !!text) |
| ... | ... | @@ -451,7 +451,7 @@ export default { |
| 451 | 451 | const found = matched.find(item => item.name === name) |
| 452 | 452 | return found ? found.text : name |
| 453 | 453 | }) |
| 454 | - this.form.deductionTypeRemark = result.join('、') | |
| 454 | + this.form.deductionTypesRemarks = result.join('、') | |
| 455 | 455 | }, |
| 456 | 456 | // 从已保存的业务摘要中解析来料扣杂类型段落,用于回显来料类型备注 |
| 457 | 457 | extractDeductionRemark(businessSummary) { |
| ... | ... | @@ -488,14 +488,14 @@ export default { |
| 488 | 488 | totalGrossWeight: data.totalGrossWeight == null ? '' : String(data.totalGrossWeight), |
| 489 | 489 | actualImpurityWeight: data.actualImpurityWeight == null ? '' : String(data.actualImpurityWeight), |
| 490 | 490 | deductionTypes: data.deductionTypes ? String(data.deductionTypes).split(',').filter(Boolean) : [], |
| 491 | - deductionTypeRemark: '', | |
| 491 | + deductionTypesRemarks: '', | |
| 492 | 492 | supplierStockMaterial: data.supplierStockMaterial || '', |
| 493 | 493 | logisticsStockMaterial: data.logisticsStockMaterial || '', |
| 494 | 494 | plateNumber: data.plateNumber || '', |
| 495 | 495 | specialNote: data.specialNote || '' |
| 496 | 496 | } |
| 497 | - // 回显来料类型备注:优先取已保存业务摘要中的扣杂段落 | |
| 498 | - this.form.deductionTypeRemark = this.extractDeductionRemark(data.businessSummary) | |
| 497 | + // 回显来料类型备注:优先取独立字段,历史数据从业务摘要解析 | |
| 498 | + this.form.deductionTypesRemarks = this.extractDeductionRemark(data.deductionTypesRemarks || data.businessSummary) | |
| 499 | 499 | this.planList = (Array.isArray(data.planLines) ? data.planLines : []).map(it => ({ ...it })) |
| 500 | 500 | // 选中计划行对象(buyout 供 isBuyout 判断,id 供 planIds 提交使用) |
| 501 | 501 | this.selectedPlanRows = this.planList.map(item => ({ |
| ... | ... | @@ -658,6 +658,7 @@ export default { |
| 658 | 658 | netWeight: this.computedNetWeight === '' ? null : Number(this.computedNetWeight), |
| 659 | 659 | netWeightUpper: this.computedNetWeightUpper || null, |
| 660 | 660 | deductionTypes: (this.form.deductionTypes || []).join(',') || null, |
| 661 | + deductionTypesRemarks: this.form.deductionTypesRemarks || null, | |
| 661 | 662 | supplierStockMaterial: this.form.supplierStockMaterial || null, |
| 662 | 663 | logisticsStockMaterial: this.form.logisticsStockMaterial || null, |
| 663 | 664 | plateNumber: this.form.plateNumber || null, | ... | ... |
| ... | ... | @@ -75,6 +75,7 @@ |
| 75 | 75 | <view class="row"><text class="label">货物净重(kg)</text><text class="value">{{ formatNumber(form.netWeight) }}</text></view> |
| 76 | 76 | <view class="row"><text class="label">净重大写</text><text class="value">{{ form.netWeightUpper || '-' }}</text></view> |
| 77 | 77 | <view class="row"><text class="label">来料扣杂类型</text><text class="value">{{ deductionNames }}</text></view> |
| 78 | + <view class="row"><text class="label">来料类型备注</text><text class="value">{{ form.deductionTypesRemarks || '-' }}</text></view> | |
| 78 | 79 | <view class="row"><text class="label">供应存欠料</text><text class="value">{{ form.supplierStockMaterial || '-' }}</text></view> |
| 79 | 80 | <view class="row"><text class="label">物流存欠料</text><text class="value">{{ form.logisticsStockMaterial || '-' }}</text></view> |
| 80 | 81 | <view class="row"><text class="label">车牌号</text><text class="value">{{ form.plateNumber || '-' }}</text></view> |
| ... | ... | @@ -168,6 +169,7 @@ export default { |
| 168 | 169 | netWeight: '', |
| 169 | 170 | netWeightUpper: '', |
| 170 | 171 | deductionTypes: '', |
| 172 | + deductionTypesRemarks: '', | |
| 171 | 173 | supplierStockMaterial: '', |
| 172 | 174 | logisticsStockMaterial: '', |
| 173 | 175 | plateNumber: '', |
| ... | ... | @@ -247,6 +249,7 @@ export default { |
| 247 | 249 | netWeight: data.netWeight == null ? '' : String(data.netWeight), |
| 248 | 250 | netWeightUpper: data.netWeightUpper || '', |
| 249 | 251 | deductionTypes: data.deductionTypes || '', |
| 252 | + deductionTypesRemarks: data.deductionTypesRemarks || '', | |
| 250 | 253 | supplierStockMaterial: data.supplierStockMaterial || '', |
| 251 | 254 | logisticsStockMaterial: data.logisticsStockMaterial || '', |
| 252 | 255 | plateNumber: data.plateNumber || '', | ... | ... |
| ... | ... | @@ -75,6 +75,7 @@ |
| 75 | 75 | <view class="row"><text class="label">货物净重(kg)</text><text class="value">{{ formatNumber(form.netWeight) }}</text></view> |
| 76 | 76 | <view class="row"><text class="label">净重大写</text><text class="value">{{ safeText(form.netWeightUpper) }}</text></view> |
| 77 | 77 | <view class="row"><text class="label">来料扣杂类型</text><text class="value">{{ deductionNames }}</text></view> |
| 78 | + <view class="row"><text class="label">来料类型备注</text><text class="value">{{ safeText(form.deductionTypesRemarks) }}</text></view> | |
| 78 | 79 | <view class="row"><text class="label">供应存欠料</text><text class="value">{{ safeText(form.supplierStockMaterial) }}</text></view> |
| 79 | 80 | <view class="row"><text class="label">物流存欠料</text><text class="value">{{ safeText(form.logisticsStockMaterial) }}</text></view> |
| 80 | 81 | <view class="row"><text class="label">车牌号</text><text class="value">{{ safeText(form.plateNumber) }}</text></view> | ... | ... |