|
|
|
@ -646,54 +646,43 @@
|
|
|
|
|
}
|
|
|
|
|
// 添加行
|
|
|
|
|
function addboxLine() {
|
|
|
|
|
const data = {
|
|
|
|
|
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)
|
|
|
|
|
list.value.push({})
|
|
|
|
|
}
|
|
|
|
|
// 删除行
|
|
|
|
|
function removeLine() {
|
|
|
|
|
console.log(list.value)
|
|
|
|
|
list.value = list.value.filter((item) => item.selected !== true)
|
|
|
|
|
console.log(list.value)
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
|
setTableData([...getDataSource(), data])
|
|
|
|
|
// 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) {
|
|
|
|
|
console.log('双击', record, index, event)
|
|
|
|
@ -1955,37 +1944,6 @@
|
|
|
|
|
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) {
|
|
|
|
|
selectArr.value = keys
|
|
|
|
|
checkboxOption.value.selectedRowKeys = keys
|
|
|
|
|