|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<div class="flex" v-if="!isLockBooking" style="justify-content: space-between">
|
|
|
|
|
<div>
|
|
|
|
|
<a-button type="link" size="mini" v-show="list.length !== 0" @click="openDialog">
|
|
|
|
|
<a-button type="link" size="mini" @click="openDialog">
|
|
|
|
|
<span class="iconfont icon-liebiao1"></span>
|
|
|
|
|
多品名
|
|
|
|
|
</a-button>
|
|
|
|
@ -88,7 +88,14 @@
|
|
|
|
|
:indeterminate="someCheck"
|
|
|
|
|
v-if="list.length !== 0"
|
|
|
|
|
/>
|
|
|
|
|
<hot-table ref="hotmain" :data="list" :settings="settings"></hot-table>
|
|
|
|
|
<hot-table ref="hotmain" :data="list" :settings="settings">
|
|
|
|
|
<img
|
|
|
|
|
v-show="!list.length"
|
|
|
|
|
class="hot-tb-no-data"
|
|
|
|
|
src="../../../../../assets/images/nodata.png"
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</hot-table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-calc">
|
|
|
|
|
合计:
|
|
|
|
@ -117,7 +124,14 @@
|
|
|
|
|
@cancel="handleModelCancel"
|
|
|
|
|
>
|
|
|
|
|
<div class="model-content">
|
|
|
|
|
<hot-table ref="hotTb" :data="moreTList" :settings="moreTSettings"></hot-table>
|
|
|
|
|
<hot-table ref="hotTb" :data="moreTList" :settings="moreTSettings">
|
|
|
|
|
<img
|
|
|
|
|
v-show="!moreTList.length"
|
|
|
|
|
class="hot-tb-no-data"
|
|
|
|
|
src="../../../../../assets/images/nodata.png"
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</hot-table>
|
|
|
|
|
<div class="model-botton-box">
|
|
|
|
|
<a-button class="btn" type="primary" @click="addChildData">新增</a-button>
|
|
|
|
|
<a-button class="btn btn-delete" @click="removeChildData">删除</a-button>
|
|
|
|
@ -136,7 +150,14 @@
|
|
|
|
|
:data="moreData[moreSelectNum]"
|
|
|
|
|
v-if="moreSelectLoad"
|
|
|
|
|
:settings="moreSettings"
|
|
|
|
|
></hot-table>
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
v-show="!moreData[moreSelectNum].length"
|
|
|
|
|
class="hot-tb-no-data"
|
|
|
|
|
src="../../../../../assets/images/nodata.png"
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</hot-table>
|
|
|
|
|
</div>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</div>
|
|
|
|
@ -918,26 +939,33 @@
|
|
|
|
|
if (nval !== '') {
|
|
|
|
|
moreSelectLoad.value = false
|
|
|
|
|
let ctnId = moreTList.value[nval].id
|
|
|
|
|
GetOpCtnDetailList({
|
|
|
|
|
queryCondition: JSON.stringify([
|
|
|
|
|
{
|
|
|
|
|
FieldName: 'ctnId',
|
|
|
|
|
FieldValue: ctnId,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
},
|
|
|
|
|
]),
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 999,
|
|
|
|
|
sortConditions: [],
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
moreData.value[moreSelectNum.value] = res.data
|
|
|
|
|
// res.data.forEach(e=>{
|
|
|
|
|
console.log(ctnId, 'ctnId', nval)
|
|
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
moreSelectLoad.value = true
|
|
|
|
|
})
|
|
|
|
|
if (ctnId) {
|
|
|
|
|
GetOpCtnDetailList({
|
|
|
|
|
queryCondition: JSON.stringify([
|
|
|
|
|
{
|
|
|
|
|
FieldName: 'ctnId',
|
|
|
|
|
FieldValue: ctnId,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
},
|
|
|
|
|
]),
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 999,
|
|
|
|
|
sortConditions: [],
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
moreData.value[moreSelectNum.value] = res.data
|
|
|
|
|
moreSelectLoad.value = true
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
console.log(moreData.value, moreSelectNum.value, moreData.value[moreSelectNum.value])
|
|
|
|
|
moreData.value[moreSelectNum.value].splice(0)
|
|
|
|
|
moreSelectLoad.value = true
|
|
|
|
|
}, 100)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -1380,202 +1408,206 @@
|
|
|
|
|
checkboxOption.value.selectedRowKeys = keys
|
|
|
|
|
}
|
|
|
|
|
function importYarn() {
|
|
|
|
|
if (!props.details.id) {
|
|
|
|
|
notification.error({ message: '请先保存订舱信息', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
YarnLoading.value = true
|
|
|
|
|
GetYardData({
|
|
|
|
|
id: props.details.id,
|
|
|
|
|
isWeb: false,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
const data = JSON.parse(res.data)
|
|
|
|
|
console.log(data)
|
|
|
|
|
// const addTable: any[] = []
|
|
|
|
|
// const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : ''
|
|
|
|
|
// list.value = []
|
|
|
|
|
// const lastNum =
|
|
|
|
|
// list.value.length > 0 ? Number(list.value[list.value.length - 1].rowKey) + 1 : 0
|
|
|
|
|
// data.map((item, index) => {
|
|
|
|
|
// const _data = {
|
|
|
|
|
// rowKey: lastNum + index,
|
|
|
|
|
// ctnall: item.CTNALL,
|
|
|
|
|
// ctnnum: '1',
|
|
|
|
|
// cntrno: item.CNTRNO,
|
|
|
|
|
// sealno: item.SEALNO,
|
|
|
|
|
// ctncode: item.CtnCode,
|
|
|
|
|
// pkgs: item.PKGS,
|
|
|
|
|
// kindpkgs: kindpkgsOld || item.KINDPKGS,
|
|
|
|
|
// kgs: item.KGS,
|
|
|
|
|
// cbm: item.CBM,
|
|
|
|
|
// tareweight: item.TAREWEIGHT,
|
|
|
|
|
// weightype: '',
|
|
|
|
|
// weighkgs: '',
|
|
|
|
|
// weighdate: item.WEIGHDATE,
|
|
|
|
|
// }
|
|
|
|
|
// addTable.push(_data)
|
|
|
|
|
// })
|
|
|
|
|
notification.warning({ message: '功能开发中...', duration: 3 })
|
|
|
|
|
// if (!props.details.id) {
|
|
|
|
|
// notification.error({ message: '请先保存订舱信息', duration: 3 })
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
// YarnLoading.value = true
|
|
|
|
|
// GetYardData({
|
|
|
|
|
// id: props.details.id,
|
|
|
|
|
// isWeb: false,
|
|
|
|
|
// })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// if (res.succeeded) {
|
|
|
|
|
// const data = JSON.parse(res.data)
|
|
|
|
|
// console.log(data)
|
|
|
|
|
// // const addTable: any[] = []
|
|
|
|
|
// // const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : ''
|
|
|
|
|
// // list.value = []
|
|
|
|
|
// // const lastNum =
|
|
|
|
|
// // list.value.length > 0 ? Number(list.value[list.value.length - 1].rowKey) + 1 : 0
|
|
|
|
|
// // data.map((item, index) => {
|
|
|
|
|
// // const _data = {
|
|
|
|
|
// // rowKey: lastNum + index,
|
|
|
|
|
// // ctnall: item.CTNALL,
|
|
|
|
|
// // ctnnum: '1',
|
|
|
|
|
// // cntrno: item.CNTRNO,
|
|
|
|
|
// // sealno: item.SEALNO,
|
|
|
|
|
// // ctncode: item.CtnCode,
|
|
|
|
|
// // pkgs: item.PKGS,
|
|
|
|
|
// // kindpkgs: kindpkgsOld || item.KINDPKGS,
|
|
|
|
|
// // kgs: item.KGS,
|
|
|
|
|
// // cbm: item.CBM,
|
|
|
|
|
// // tareweight: item.TAREWEIGHT,
|
|
|
|
|
// // weightype: '',
|
|
|
|
|
// // weighkgs: '',
|
|
|
|
|
// // weighdate: item.WEIGHDATE,
|
|
|
|
|
// // }
|
|
|
|
|
// // addTable.push(_data)
|
|
|
|
|
// // })
|
|
|
|
|
|
|
|
|
|
// tableData.value = [...tableData.value, ...addTable]
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
YarnLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
YarnLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
// // tableData.value = [...tableData.value, ...addTable]
|
|
|
|
|
// // that.$forceUpdate()
|
|
|
|
|
// } else {
|
|
|
|
|
// notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
// }
|
|
|
|
|
// YarnLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
// .catch((err) => {
|
|
|
|
|
// YarnLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
function importsealno() {
|
|
|
|
|
sealnoLoading.value = true
|
|
|
|
|
GetYardData({
|
|
|
|
|
id: props.details.id,
|
|
|
|
|
isWeb: false,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
let type = true
|
|
|
|
|
tableData.value.forEach((item) => {
|
|
|
|
|
if (item.sealno || item.cntrno) {
|
|
|
|
|
notification.error({ message: '请清空所有箱封号后再引入', duration: 3 })
|
|
|
|
|
type = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (type) {
|
|
|
|
|
const data = JSON.parse(res.data)
|
|
|
|
|
if (data.length == tableData.value.length) {
|
|
|
|
|
data.forEach((item, index) => {
|
|
|
|
|
tableData.value[index].sealno = item.SEALNO
|
|
|
|
|
tableData.value[index].cntrno = item.CNTRNO
|
|
|
|
|
tableData.value[index].ctnnum = 1
|
|
|
|
|
})
|
|
|
|
|
const map = {}
|
|
|
|
|
const dest: any[] = []
|
|
|
|
|
for (var i = 0; i < tableData.value.length; i++) {
|
|
|
|
|
var ai = tableData.value[i]
|
|
|
|
|
if (!map[ai.ctnall]) {
|
|
|
|
|
dest.push({
|
|
|
|
|
ctnall: ai.ctnall,
|
|
|
|
|
ctnnum: ai.ctnnum,
|
|
|
|
|
})
|
|
|
|
|
map[ai.ctnall] = ai
|
|
|
|
|
} else {
|
|
|
|
|
for (var j = 0; j < dest.length; j++) {
|
|
|
|
|
var dj = dest[j]
|
|
|
|
|
if (dj.ctnall == ai.ctnall) {
|
|
|
|
|
dj.ctnnum = (parseFloat(dj.ctnnum) + parseFloat(ai.ctnnum)).toString()
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
changeEmit1(dest)
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: '箱量与场站不一致', duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
sealnoLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
sealnoLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
notification.warning({ message: '功能开发中...', duration: 3 })
|
|
|
|
|
// sealnoLoading.value = true
|
|
|
|
|
// GetYardData({
|
|
|
|
|
// id: props.details.id,
|
|
|
|
|
// isWeb: false,
|
|
|
|
|
// })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// if (res.succeeded) {
|
|
|
|
|
// let type = true
|
|
|
|
|
// tableData.value.forEach((item) => {
|
|
|
|
|
// if (item.sealno || item.cntrno) {
|
|
|
|
|
// notification.error({ message: '请清空所有箱封号后再引入', duration: 3 })
|
|
|
|
|
// type = false
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// if (type) {
|
|
|
|
|
// const data = JSON.parse(res.data)
|
|
|
|
|
// if (data.length == tableData.value.length) {
|
|
|
|
|
// data.forEach((item, index) => {
|
|
|
|
|
// tableData.value[index].sealno = item.SEALNO
|
|
|
|
|
// tableData.value[index].cntrno = item.CNTRNO
|
|
|
|
|
// tableData.value[index].ctnnum = 1
|
|
|
|
|
// })
|
|
|
|
|
// const map = {}
|
|
|
|
|
// const dest: any[] = []
|
|
|
|
|
// for (var i = 0; i < tableData.value.length; i++) {
|
|
|
|
|
// var ai = tableData.value[i]
|
|
|
|
|
// if (!map[ai.ctnall]) {
|
|
|
|
|
// dest.push({
|
|
|
|
|
// ctnall: ai.ctnall,
|
|
|
|
|
// ctnnum: ai.ctnnum,
|
|
|
|
|
// })
|
|
|
|
|
// map[ai.ctnall] = ai
|
|
|
|
|
// } else {
|
|
|
|
|
// for (var j = 0; j < dest.length; j++) {
|
|
|
|
|
// var dj = dest[j]
|
|
|
|
|
// if (dj.ctnall == ai.ctnall) {
|
|
|
|
|
// dj.ctnnum = (parseFloat(dj.ctnnum) + parseFloat(ai.ctnnum)).toString()
|
|
|
|
|
// break
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// changeEmit1(dest)
|
|
|
|
|
// } else {
|
|
|
|
|
// notification.error({ message: '箱量与场站不一致', duration: 3 })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
// }
|
|
|
|
|
// sealnoLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
// .catch((err) => {
|
|
|
|
|
// sealnoLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
function importWeight() {
|
|
|
|
|
notification.warning({ message: '功能开发中...', duration: 3 })
|
|
|
|
|
// if (!props.details.id) {
|
|
|
|
|
// notification.error({ message: '请先保存订舱信息', duration: 3 })
|
|
|
|
|
// return false
|
|
|
|
|
// }
|
|
|
|
|
// WeightLoading.value = true
|
|
|
|
|
// GetYardData({
|
|
|
|
|
// id: props.details.id,
|
|
|
|
|
// isWeb: false,
|
|
|
|
|
// })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// if (res.succeeded) {
|
|
|
|
|
// const data = JSON.parse(res.data)
|
|
|
|
|
// const addTable: any[] = []
|
|
|
|
|
// const cntrnoArr: any[] = []
|
|
|
|
|
// tableData.value.map((item: any, index) => {
|
|
|
|
|
// if (!item.cntrno) {
|
|
|
|
|
// // delete tableData.value[index]
|
|
|
|
|
// tableData.value.splice(index, 1)
|
|
|
|
|
// } else {
|
|
|
|
|
// cntrnoArr.push(item.cntrno)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// for (let i = tableData.value.length - 1; i >= 0; i--) {
|
|
|
|
|
// if (!tableData.value[i].cntrno) {
|
|
|
|
|
// tableData.value.splice(i, 1)
|
|
|
|
|
// } else {
|
|
|
|
|
// cntrnoArr.push(tableData.value[i].cntrno)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// const lastNum =
|
|
|
|
|
// tableData.value.length > 0
|
|
|
|
|
// ? Number(tableData.value[tableData.value.length - 1].rowKey) + 1
|
|
|
|
|
// : 0
|
|
|
|
|
// data.map((item, index) => {
|
|
|
|
|
// if (cntrnoArr.includes(item.CNTRNO)) {
|
|
|
|
|
// const setWeighkgs = calc(
|
|
|
|
|
// Number(tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kgs),
|
|
|
|
|
// Number(item.TAREWEIGHT),
|
|
|
|
|
// '+',
|
|
|
|
|
// )
|
|
|
|
|
// tableData.value[cntrnoArr.indexOf(item.CNTRNO)] = {
|
|
|
|
|
// rowKey: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].rowKey,
|
|
|
|
|
// ctnall: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].ctnall,
|
|
|
|
|
// ctnnum: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
|
|
|
|
|
// cntrno: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].cntrno,
|
|
|
|
|
// sealno: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].sealno,
|
|
|
|
|
// pkgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].pkgs,
|
|
|
|
|
// kindpkgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kindpkgs,
|
|
|
|
|
// kgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kgs,
|
|
|
|
|
// cbm: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].cbm,
|
|
|
|
|
// tareweight: item.TAREWEIGHT,
|
|
|
|
|
// weightype: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].weightype,
|
|
|
|
|
// weighkgs: setWeighkgs,
|
|
|
|
|
// weighdate: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].weighdate,
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// const _data = {
|
|
|
|
|
// rowKey: lastNum + index,
|
|
|
|
|
// ctnall: '',
|
|
|
|
|
// ctnnum: '1',
|
|
|
|
|
// cntrno: '',
|
|
|
|
|
// sealno: '',
|
|
|
|
|
// pkgs: '',
|
|
|
|
|
// kindpkgs: '',
|
|
|
|
|
// kgs: '',
|
|
|
|
|
// cbm: '',
|
|
|
|
|
// tareweight: item.TAREWEIGHT,
|
|
|
|
|
// weightype: '',
|
|
|
|
|
// weighkgs: '',
|
|
|
|
|
// weighdate: '',
|
|
|
|
|
// }
|
|
|
|
|
// addTable.push(_data)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// tableData.value = [...tableData.value, ...addTable]
|
|
|
|
|
// that.$forceUpdate()
|
|
|
|
|
// } else {
|
|
|
|
|
// notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
// }
|
|
|
|
|
// WeightLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
// .catch((err) => {
|
|
|
|
|
// WeightLoading.value = false
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
function changeEmit1(arr) {
|
|
|
|
|
emit('changectnall', arr)
|
|
|
|
|
}
|
|
|
|
|
function importWeight() {
|
|
|
|
|
if (!props.details.id) {
|
|
|
|
|
notification.error({ message: '请先保存订舱信息', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
WeightLoading.value = true
|
|
|
|
|
GetYardData({
|
|
|
|
|
id: props.details.id,
|
|
|
|
|
isWeb: false,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
const data = JSON.parse(res.data)
|
|
|
|
|
const addTable: any[] = []
|
|
|
|
|
const cntrnoArr: any[] = []
|
|
|
|
|
tableData.value.map((item: any, index) => {
|
|
|
|
|
if (!item.cntrno) {
|
|
|
|
|
// delete tableData.value[index]
|
|
|
|
|
tableData.value.splice(index, 1)
|
|
|
|
|
} else {
|
|
|
|
|
cntrnoArr.push(item.cntrno)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
for (let i = tableData.value.length - 1; i >= 0; i--) {
|
|
|
|
|
if (!tableData.value[i].cntrno) {
|
|
|
|
|
tableData.value.splice(i, 1)
|
|
|
|
|
} else {
|
|
|
|
|
cntrnoArr.push(tableData.value[i].cntrno)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const lastNum =
|
|
|
|
|
tableData.value.length > 0
|
|
|
|
|
? Number(tableData.value[tableData.value.length - 1].rowKey) + 1
|
|
|
|
|
: 0
|
|
|
|
|
data.map((item, index) => {
|
|
|
|
|
if (cntrnoArr.includes(item.CNTRNO)) {
|
|
|
|
|
const setWeighkgs = calc(
|
|
|
|
|
Number(tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kgs),
|
|
|
|
|
Number(item.TAREWEIGHT),
|
|
|
|
|
'+',
|
|
|
|
|
)
|
|
|
|
|
tableData.value[cntrnoArr.indexOf(item.CNTRNO)] = {
|
|
|
|
|
rowKey: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].rowKey,
|
|
|
|
|
ctnall: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].ctnall,
|
|
|
|
|
ctnnum: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
|
|
|
|
|
cntrno: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].cntrno,
|
|
|
|
|
sealno: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].sealno,
|
|
|
|
|
pkgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].pkgs,
|
|
|
|
|
kindpkgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kindpkgs,
|
|
|
|
|
kgs: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].kgs,
|
|
|
|
|
cbm: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].cbm,
|
|
|
|
|
tareweight: item.TAREWEIGHT,
|
|
|
|
|
weightype: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].weightype,
|
|
|
|
|
weighkgs: setWeighkgs,
|
|
|
|
|
weighdate: tableData.value[cntrnoArr.indexOf(item.CNTRNO)].weighdate,
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
const _data = {
|
|
|
|
|
rowKey: lastNum + index,
|
|
|
|
|
ctnall: '',
|
|
|
|
|
ctnnum: '1',
|
|
|
|
|
cntrno: '',
|
|
|
|
|
sealno: '',
|
|
|
|
|
pkgs: '',
|
|
|
|
|
kindpkgs: '',
|
|
|
|
|
kgs: '',
|
|
|
|
|
cbm: '',
|
|
|
|
|
tareweight: item.TAREWEIGHT,
|
|
|
|
|
weightype: '',
|
|
|
|
|
weighkgs: '',
|
|
|
|
|
weighdate: '',
|
|
|
|
|
}
|
|
|
|
|
addTable.push(_data)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
tableData.value = [...tableData.value, ...addTable]
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
WeightLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
WeightLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function calc(num1, num2, calcStr) {
|
|
|
|
|
var str1 // 转换为字符串的数字
|
|
|
|
|
var str2
|
|
|
|
|