前端问题修改
This commit is contained in:
parent
4270fe5e94
commit
c7463d7605
|
|
@ -452,17 +452,26 @@ function goOnAddData() {
|
|||
let id = $(this).attr('id');
|
||||
if (parseInt(id) === parseInt(item.id)) {
|
||||
let quantityOfThisInventory = $(this).find('td').eq(7).find('input[name="quantityOfThisInventory"]').val(),
|
||||
inventoryProfit = $(this).find('td').eq(8).html(),
|
||||
inventoryDeficit = $(this).find('td').eq(9).html(),
|
||||
storageNum = $(this).find('td').eq(6).html(),
|
||||
remark = $(this).find('td').eq(10).find('input[name="remark"]').val();
|
||||
if (!item.quantityOfThisInventory || parseInt(item.quantityOfThisInventory) === 0) {
|
||||
if (!item.quantityOfThisInventory) {
|
||||
item.quantityOfThisInventory = quantityOfThisInventory;
|
||||
}
|
||||
if (!item.inventoryProfit || parseInt(item.inventoryProfit) === 0) {
|
||||
item.inventoryProfit = inventoryProfit;
|
||||
if(parseInt(item.quantityOfThisInventory) === 0){
|
||||
item.inventoryProfit = 0;
|
||||
item.inventoryDeficit = storageNum;
|
||||
}
|
||||
if (!item.inventoryDeficit || parseInt(item.inventoryDeficit) === 0) {
|
||||
item.inventoryDeficit = inventoryDeficit;
|
||||
if(parseInt(item.quantityOfThisInventory) === parseInt(storageNum)){
|
||||
item.inventoryProfit = 0;
|
||||
item.inventoryDeficit = 0;
|
||||
}
|
||||
if(parseInt(item.quantityOfThisInventory) > parseInt(storageNum)){
|
||||
item.inventoryProfit = parseInt(item.quantityOfThisInventory) - parseInt(storageNum);
|
||||
item.inventoryDeficit = 0;
|
||||
}
|
||||
if(parseInt(item.quantityOfThisInventory) < parseInt(storageNum) && parseInt(item.quantityOfThisInventory) > 0){
|
||||
item.inventoryProfit = 0;
|
||||
item.inventoryDeficit = parseInt(storageNum) - parseInt(item.quantityOfThisInventory);
|
||||
}
|
||||
if (!item.remark) {
|
||||
item.remark = remark;
|
||||
|
|
|
|||
Loading…
Reference in New Issue