| | |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | $gridLeft.insertAt(item) |
| | | //重新赋值key |
| | | item._X_ROW_KEY = key |
| | | }) |
| | | |
| | | |
| | | |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | item._X_ROW_KEY = key |
| | | } else { |
| | |
| | | } else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | |
| | | checkedList.forEach((item) => { |
| | | //右侧表格 |
| | | let rightData = $grid.getTableData().fullData |
| | | let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber) |
| | | //左侧表格 |
| | | let leftData = $gridLeft.getTableData().fullData |
| | | let leftfilterIndex = leftData.findIndex(item1 => item1.orderNumber === item.orderNumber) |
| | | //无输入并且如果右边表格数据中存在当前数据则数量相加 |
| | | if (filterIndex > -1) { |
| | | rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1 |
| | |
| | | rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | } else { |
| | | delete item._X_ROW_KEY |
| | | console.log(item) |
| | | //$grid.insert(item) |
| | | |
| | | |
| | | item.baiscQuantity = item.baiscQuantity * 1 + leftData[leftfilterIndex].quantity * 1 |
| | | item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | //item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | // for (let i = 0; i <checkedList.length ; i++) { |
| | | // |
| | | // if (checkedList[i].orderNumber === item.orderNumber){ |
| | | // console.log(item.baiscQuantity +"---"+ checkedList[i].quantity ) |
| | | // item.baiscQuantity = item.baiscQuantity * 1 + checkedList[i].quantity * 1 |
| | | // } |
| | | // } |
| | | |
| | | delete item._X_ROW_KEY |
| | | $grid.insert(item) |
| | | |
| | | |
| | | } |
| | | |
| | | $gridLeft.remove(item) |
| | |
| | | leftData[filterIndex].computeGrossArea=(leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | //delete item._X_ROW_KEY |
| | | } else { |
| | |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | // /item.computeGrossArea=item.computeGrossArea |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | |
| | | } |
| | | for (let i = 0; i < leftData.length; i++) { |