集装箱信息 table

szh-new
张同海 7 months ago
parent 804bc24cf6
commit 684c64f6bd

@ -646,54 +646,43 @@
} }
// //
function addboxLine() { function addboxLine() {
const data = { list.value.push({})
rowKey: dataSource.value.length
? dataSource.value[dataSource.value.length - 1].rowKey + 1
: 1,
id: '',
bsno: '',
ctnNum: '',
cntrNo: '',
sealNo: '',
kindPkgs: '',
kgs: '',
size: '',
tareWeight: '',
weightType: '',
ctnCode: '',
ctn: '',
weightKGS: '',
weightDate: '',
teu: '',
ctnAll: '',
cbm: '',
goodsName: '',
ctnStatus: '',
weightATTN: '',
weightTel: '',
weightSign: '',
masterNo: '',
trucker: '',
truckNo: '',
truckFee: '',
freeStorageDay: '',
storageDay: '',
storagePrice: '',
storageFee: '',
freeCtnDay: '',
ctnDay: '',
ctnPrice: '',
ctnFee: '',
isTemp: '',
vgmAddr: '',
vgmEmail: '',
pickUpTime: '',
actualArrivalPortTime: '',
pkgs: '',
} }
console.log(data) //
function removeLine() {
console.log(list.value)
list.value = list.value.filter((item) => item.selected !== true)
console.log(list.value)
setTableData([...getDataSource(), data]) // selectArr.value.map((item, index) => {
// tableData.value.map((oitem: any, oindex) => {
// if (item === oitem.rowKey) {
// tableData.value.splice(oindex, 1)
// }
// })
// })
// let kgs = 0
// tableData.value.map((item: any, index) => {
// kgs += Number(item.kgs)
// })
// totalKgs.value = kgs
// let cbm = 0
// tableData.value.map((item: any, index) => {
// cbm += Number(item.cbm)
// })
// totalCbm.value = cbm
// let pkgs = 0
// tableData.value.map((item: any, index) => {
// pkgs += Number(item.pkgs)
// })
// totalPkgs.value = pkgs
// checkboxOption.value.selectedRowKeys = []
// selectArr.value = []
// tableData.value.forEach((item: any, index) => {
// item.rowKey = index
// })
} }
function EditRow(record, index, event) { function EditRow(record, index, event) {
console.log('双击', record, index, event) console.log('双击', record, index, event)
@ -1955,37 +1944,6 @@
console.log('selectionRangeKeys::', selectionRangeKeys) console.log('selectionRangeKeys::', selectionRangeKeys)
} }
function removeLine() {
selectArr.value.map((item, index) => {
tableData.value.map((oitem: any, oindex) => {
if (item === oitem.rowKey) {
tableData.value.splice(oindex, 1)
}
})
})
let kgs = 0
tableData.value.map((item: any, index) => {
kgs += Number(item.kgs)
})
totalKgs.value = kgs
let cbm = 0
tableData.value.map((item: any, index) => {
cbm += Number(item.cbm)
})
totalCbm.value = cbm
let pkgs = 0
tableData.value.map((item: any, index) => {
pkgs += Number(item.pkgs)
})
totalPkgs.value = pkgs
checkboxOption.value.selectedRowKeys = []
selectArr.value = []
tableData.value.forEach((item: any, index) => {
item.rowKey = index
})
}
function changeSelectedRowKeys(keys) { function changeSelectedRowKeys(keys) {
selectArr.value = keys selectArr.value = keys
checkboxOption.value.selectedRowKeys = keys checkboxOption.value.selectedRowKeys = keys

Loading…
Cancel
Save