提交
This commit is contained in:
1 parent
c90f72fd34
commit
6b6c80f182
100 files changed
+18631
-6278
No files matched your search
@@ -23,16 +23,6 @@ export interface PlanFormProductRow {
|
||||
transportCertUrl?: string
|
||||
}
|
||||
|
||||
export function determinePlPlanType(supplierName?: string, destinationName?: string) {
|
||||
if (destinationName && (destinationName.includes('安庆山峡') || destinationName.includes('安徽云栋'))) {
|
||||
return 'inbound'
|
||||
}
|
||||
if (supplierName && (supplierName.includes('安庆山峡') || supplierName.includes('安徽云栋'))) {
|
||||
return 'outbound'
|
||||
}
|
||||
return 'direct'
|
||||
}
|
||||
|
||||
export function resolveBelongsCompany(supplierName?: string) {
|
||||
if (supplierName?.includes('安徽云栋')) return 'yundong'
|
||||
return 'shanxia'
|
||||
@@ -66,21 +56,21 @@ export function mapContractProducts(products?: ContractProductForm[]) {
|
||||
}
|
||||
|
||||
export function applyContractToPlanForm(contract: ContractVO) {
|
||||
const supplierName = contract.supplierName || contract.partyA
|
||||
const destinationName = contract.customerName || contract.partyB
|
||||
const planType = determinePlPlanType(supplierName, destinationName)
|
||||
// 供方/需方以合同甲乙方可章名为准;supplierName/customerName 仅作冗余,供地磅按 planType 取用
|
||||
const supplierName = contract.partyA || contract.supplierName || ''
|
||||
const customerName = contract.partyB || contract.customerName || ''
|
||||
const destinationName = customerName
|
||||
|
||||
return {
|
||||
contractId: String(contract.id),
|
||||
contractNo: contract.contractNo,
|
||||
belongsCompany: resolveBelongsCompany(supplierName),
|
||||
planType,
|
||||
belongsCompany: resolveBelongsCompany(contract.supplierName || contract.partyA),
|
||||
supplierId: contract.supplierId != null ? String(contract.supplierId) : '',
|
||||
supplierName: supplierName || '',
|
||||
supplierName,
|
||||
destinationId: contract.customerId != null ? String(contract.customerId) : '',
|
||||
destinationName: destinationName || '',
|
||||
destinationName,
|
||||
customerId: contract.customerId != null ? String(contract.customerId) : '',
|
||||
customerName: contract.customerName || '',
|
||||
customerName,
|
||||
contactName: contract.contactName || contract.partyBContact || '',
|
||||
contactPhone: contract.contactMobile || contract.partyBMobile || '',
|
||||
partyA: contract.partyA || '',
|
||||
|
||||
Reference in new issue
Block a user