支持多商品锁价及待交付修改作废审批
This commit is contained in:
1 parent
1cbcdc728c
commit
337b2a709f
28 files changed
+1187
-344
No files matched your search
@@ -110,6 +110,10 @@ function orderChangeInventoryHTML(inventory){
|
||||
}
|
||||
function orderChangePriceLockCostsHTML(before,after){
|
||||
if(!before.priceLockCosts&&!after.priceLockCosts)return '';
|
||||
if(before.priceLockCosts?.lines||after.priceLockCosts?.lines){
|
||||
const a=before.priceLockCosts||{},b=after.priceLockCosts||{},rows=a.lines||b.lines;
|
||||
return rows.map((row,index)=>{const left=a.lines?.find(item=>item.lineId===row.lineId)||{},right=b.lines?.find(item=>item.lineId===row.lineId)||{};return orderChangePriceLockCostsHTML({priceLockCosts:{...left,date:a.date}},{priceLockCosts:{...right,date:b.date}}).replace('锁价购料成本</th>','商品 '+(index+1)+' · 锁价购料成本</th>');}).join('');
|
||||
}
|
||||
const a=before.priceLockCosts||{},b=after.priceLockCosts||{},source=value=>value==='pool'?'原锁料池':value==='manual'?'手填原锁料价':'未提供';
|
||||
return '<tr class="change-section-row"><th colspan="3" scope="colgroup">锁价购料成本</th></tr>'+orderChangePair('原锁日期',a.date,b.date)+orderChangePair('原锁料费来源',source(a.materialSource),source(b.materialSource))+orderChangePair('原锁进货料价(每克)',orderChangeMoney(a.buyRate),orderChangeMoney(b.buyRate))+orderChangePair('原锁料费付款人',a.materialSource==='pool'?'按原锁料池分摊':orderChangePayer(a.buyPayer),b.materialSource==='pool'?'按原锁料池分摊':orderChangePayer(b.buyPayer))+orderChangePair('原锁整批料费',orderChangeMoney(a.materialAmount),orderChangeMoney(b.materialAmount))+orderChangePair('补重进货料价(每克)',orderChangeMoney(a.extraRate),orderChangeMoney(b.extraRate))+orderChangePair('补重料费付款人',a.extraPayer?orderChangePayer(a.extraPayer):'无补重',b.extraPayer?orderChangePayer(b.extraPayer):'无补重');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user