Commit b3d95607f2c1047b74c8c897f1ed3289b7cbb287

Authored by gesilong
1 parent 909a33fe

commit:一致的条件补充

... ... @@ -525,16 +525,16 @@ export default {
525 525 this.weighList = []
526 526 return
527 527 }
528   - // 校验:所选计划的「是否买断、供料单位、收料单位、车间」必须一致
  528 + // 校验:所选计划的「是否买断、供料单位、收料单位、分厂、采购处、区域」必须一致
529 529 const first = list[0]
530 530 const isSame = list.every(item =>
531 531 item.buyout === first.buyout &&
532 532 item.supplierName === first.supplierName &&
533   - item.companyName === first.companyName &&
534   - item.workshopName === first.workshopName
  533 + item.companyName === first.companyName && item.workshopId === first.workshopId &&
  534 + item.purchaseDepartment === first.purchaseDepartment && item.region === first.region
535 535 )
536 536 if (!isSame) {
537   - uni.showToast({ title: '是否买断,供料单位,收料单位应保持一致', icon: 'none' })
  537 + uni.showToast({ title: '是否买断,供料单位,收料单位,分厂,采购处,区域应保持一致', icon: 'none' })
538 538 this.planSheet.selectedKeys = this.selectedPlanRows.map(it => it.id)
539 539 return
540 540 }
... ...
... ... @@ -576,10 +576,12 @@ export default {
576 576 item.buyout === first.buyout &&
577 577 item.supplierName === first.supplierName &&
578 578 item.companyName === first.companyName &&
579   - item.workshopName === first.workshopName
  579 + item.workshopId === first.workshopId &&
  580 + item.purchaseDepartment === first.purchaseDepartment &&
  581 + item.region === first.region
580 582 )
581 583 if (!isSame) {
582   - uni.showToast({ title: '是否买断,供料单位,收料单位应保持一致', icon: 'none' })
  584 + uni.showToast({ title: '是否买断,供料单位,收料单位,分厂,采购处,区域应保持一致', icon: 'none' })
583 585 this.planSheet.selectedKeys = this.selectedPlanRows.map(it => it.id)
584 586 return
585 587 }
... ...