解决商品多单位在单据中切换库存的bug
This commit is contained in:
@@ -995,26 +995,32 @@
|
|||||||
if(type === "basic"){
|
if(type === "basic"){
|
||||||
if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
|
if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
|
||||||
UnitPrice = basicPresetPriceOne;
|
UnitPrice = basicPresetPriceOne;
|
||||||
|
loadRatio = ratio;
|
||||||
}
|
}
|
||||||
else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
|
else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
|
||||||
UnitPrice = basicPresetPriceTwo;
|
UnitPrice = basicPresetPriceTwo;
|
||||||
|
loadRatio = 1;
|
||||||
}
|
}
|
||||||
else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
|
else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
|
||||||
UnitPrice = retailPriceOne;
|
UnitPrice = retailPriceOne;
|
||||||
|
loadRatio = 1;
|
||||||
}
|
}
|
||||||
body.find("[field='Stock']").find(input).val(stock); //修改库存
|
body.find("[field='Stock']").find(input).val(stock*loadRatio); //修改库存
|
||||||
}
|
}
|
||||||
else if(type === "other"){
|
else if(type === "other"){
|
||||||
if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
|
if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
|
||||||
UnitPrice = otherPresetPriceOne;
|
UnitPrice = otherPresetPriceOne;
|
||||||
|
loadRatio = 1;
|
||||||
}
|
}
|
||||||
else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
|
else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
|
||||||
UnitPrice = otherPresetPriceTwo;
|
UnitPrice = otherPresetPriceTwo;
|
||||||
|
loadRatio = ratio;
|
||||||
}
|
}
|
||||||
else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
|
else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
|
||||||
UnitPrice = retailPriceTwo;
|
UnitPrice = retailPriceTwo;
|
||||||
|
loadRatio = ratio;
|
||||||
}
|
}
|
||||||
body.find("[field='Stock']").find(input).val((stock/ratio).toFixed(2)); //修改库存
|
body.find("[field='Stock']").find(input).val((stock/loadRatio).toFixed(2)); //修改库存
|
||||||
}
|
}
|
||||||
body.find("[field='UnitPrice']").find(input).val(UnitPrice); //单价
|
body.find("[field='UnitPrice']").find(input).val(UnitPrice); //单价
|
||||||
var OperNumber = body.find("[field='OperNumber']").find(input).val(); //获取数量
|
var OperNumber = body.find("[field='OperNumber']").find(input).val(); //获取数量
|
||||||
|
|||||||
Reference in New Issue
Block a user