张同海 2 years ago
commit d034e52262

@ -644,9 +644,36 @@ export default {
maxCount: 3
})
}, 2000)
} else {
const arrayNum = changeValue.split('.')
if (!/\./.test(changeValue)) {
row[column.field] = changeValue + '.00'
} else if (arrayNum[1].length < 2) {
row[column.field] = changeValue + '0'
}
}
}
if (column.field === 'pkgs') {
if (!(/(^[1-9]\d*$)/.test(changeValue))) {
console.log('== 非正整数 ==')
const height = document.body.clientHeight - 100
this.$message.config({
top: `${height}px`,
duration: 2,
maxCount: 3
})
this.$message.error('件数请输入整数')
const cNum = changeValue.indexOf('.')
row[column.field] = changeValue.substr(0, cNum)
setTimeout(() => {
this.$message.destroy()
this.$message.config({
top: `100px`,
duration: 2,
maxCount: 3
})
}, 2000)
}
let num = 0
this.tableData.map((item, index) => {
num += Number(item.pkgs)
@ -658,14 +685,30 @@ export default {
this.tableData.map((item, index) => {
num += Number(item.kgs)
})
this.totalKgs = num
num += ''
const pNum = num.split('.')
if (!/\./.test(num)) {
this.totalKgs = num + '.00'
} else if (pNum[1].length < 2) {
this.totalKgs = num + '0'
} else {
this.totalKgs = num
}
}
if (column.field === 'cbm') {
let num = 0
this.tableData.map((item, index) => {
num += Number(item.cbm)
})
this.totalCbm = num
num += ''
const pNum = num.split('.')
if (!/\./.test(num)) {
this.totalCbm = num + '.00'
} else if (pNum[1].length < 2) {
this.totalCbm = num + '0'
} else {
this.totalCbm = num
}
}
if (column.field === 'kgs' || column.field === 'tareweight') {
// let nowIndex = 0
@ -682,6 +725,13 @@ export default {
const kgsCount = kgsVal.length - kgsIndex
if (kgsCount > 4) {
row['weighkgs'] = kgsVal.substr(0, kgsIndex + 4)
} else {
const arrayNum = kgsVal.split('.')
if (!/\./.test(kgsVal)) {
row['weighkgs'] = kgsVal + '.00'
} else if (arrayNum[1].length < 2) {
row['weighkgs'] = kgsVal + '0'
}
}
}
},
@ -1033,7 +1083,7 @@ export default {
cntrno: '',
sealno: '',
pkgs: '',
kindpkgs: '',
kindpkgs: this.tableData.length > 0 ? this.tableData[0].kindpkgs : '',
kgs: '',
cbm: '',
tareweight: '',

@ -273,7 +273,7 @@
<a-date-picker
style="min-width:100px"
show-time
format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm"
v-model="details.closingdate"
@change="closingdateChange"
>
@ -293,7 +293,7 @@
<a-date-picker
style="min-width:100px"
show-time
format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm"
v-model="details.closedocdate"
@change="closedocdateChange"
>
@ -313,7 +313,7 @@
<a-date-picker
style="min-width:100px"
show-time
format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm"
v-model="details.closevgmdate"
@change="closevgmdateChange"
>
@ -1148,14 +1148,13 @@ export default {
})
},
portloadSelect(value) {
this.details.issueplace = value
if (!this.details.prepardat) {
this.details.prepardat = value
}
const index = this.portloadDataArr.indexOf(value)
this.details.portloadid = this.portloadData[index].ediCode
this.details.portload = this.portloadData[index].enName
this.details.issueplace = this.portloadData[index].enName
if (!this.details.prepardat) {
this.details.prepardat = this.portloadData[index].enName
}
},
portloadChange(value) {
if (!value) {
@ -1193,12 +1192,12 @@ export default {
},
//
portdischargeSelect(value) {
if (!this.details.payableat) {
this.details.payableat = value
}
const index = this.portdischargeDataArr.indexOf(value)
this.details.portdischargeid = this.portdischargeData[index].ediCode
this.details.portdischarge = this.portdischargeData[index].enName
if (!this.details.payableat) {
this.details.payableat = this.portdischargeData[index].enName
}
},
portdischargeChange(value) {
if (!value) {

@ -124,6 +124,9 @@
<template #etd="{ row }">
<div class="etd" v-if="row.etd">{{ row.etd.substring(0, 10) }}</div>
</template>
<template #atd="{ row }">
<div class="atd" v-if="row.atd">{{ row.atd.substring(0, 10) }}</div>
</template>
<template #operate="{ row }">
<vxe-button class="operate-btn" type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
</template>

@ -65,7 +65,7 @@ export default {
{ field: 'createdUserName', label: 'CREATEDUSERNAME', width: 120, title: '创建人', showHeaderOverflow: true, sortable: true },
{ field: 'createdTime', label: 'CREATEDTIME', width: 160, title: '创建时间', showHeaderOverflow: true, sortable: true },
{ field: 'cntrtotal', label: 'CNTRTOTAL', width: 120, title: '箱型箱量', showHeaderOverflow: true, sortable: true },
{ field: 'atd', label: 'ATD', width: 160, title: '实际开船日期', showHeaderOverflow: true, sortable: true },
{ field: 'atd', label: 'ATD', width: 160, title: '实际开船日期', showHeaderOverflow: true, sortable: true, slots: { default: 'atd' } },
{ field: 'blfrt', label: 'BLFRT', width: 120, title: '付费方式', showHeaderOverflow: true, sortable: true },
{ field: 'cargoid', label: 'CARGOID', width: 120, title: '货物标识', showHeaderOverflow: true, sortable: true },
{ field: 'cbm', label: 'CBM', width: 90, title: '尺码', showHeaderOverflow: true, sortable: true },

Loading…
Cancel
Save