|
|
|
@ -49,7 +49,9 @@
|
|
|
|
|
style="width: 66px"
|
|
|
|
|
:fieldNames="{
|
|
|
|
|
label: 'ctnName',
|
|
|
|
|
value: 'id'
|
|
|
|
|
value: 'id',
|
|
|
|
|
ctnCode: 'ediCode',
|
|
|
|
|
ctnSize: 'ctnSize'
|
|
|
|
|
}"
|
|
|
|
|
:options="optionsStore.getOptionsByCode('GetCtnSelectList')"
|
|
|
|
|
:filter-option="filterOption"
|
|
|
|
@ -58,7 +60,7 @@
|
|
|
|
|
</a-select>
|
|
|
|
|
<div class="ctn-price-box">
|
|
|
|
|
<span>箱量<i style="color: red;">*</i></span>
|
|
|
|
|
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" />
|
|
|
|
|
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" @change="ctnNumChange($event, item)" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ctn-price-box">
|
|
|
|
|
<span>报价<i style="color: red;">*</i></span>
|
|
|
|
@ -105,6 +107,7 @@
|
|
|
|
|
import { ref, watch, onMounted, computed } from 'vue'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
import { getDictOption } from '/@/utils/dictUtil'
|
|
|
|
|
import emitter from '/@/utils/Bus'
|
|
|
|
|
import { BatchDelBusinessCtnPrice } from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
import GoodsTable from '/@/views/baseinfo/goods/index.vue'
|
|
|
|
@ -425,48 +428,62 @@
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
})
|
|
|
|
|
function SetTOTALNO(SS) {
|
|
|
|
|
let DSS = SS.toString()
|
|
|
|
|
const i = DSS.indexOf('\n')
|
|
|
|
|
let num = 0
|
|
|
|
|
let strKind = ''
|
|
|
|
|
let enCapital = ''
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
const slist = DSS.split('\n')
|
|
|
|
|
for (let i = 0; i < slist.length; i += 1) {
|
|
|
|
|
const member = slist[i]
|
|
|
|
|
const strNum: any = GetStringNum(member)
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
strKind = member.substring(strNum.length)
|
|
|
|
|
}
|
|
|
|
|
num = parseFloat(num).add(parseFloat(strNum))
|
|
|
|
|
}
|
|
|
|
|
if (strKind !== '') {
|
|
|
|
|
enCapital = strKind
|
|
|
|
|
} else {
|
|
|
|
|
strKind = props.details.kindpkgs
|
|
|
|
|
enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
const strNum: any = GetStringNum(DSS)
|
|
|
|
|
strKind = DSS.substring(strNum.length)
|
|
|
|
|
if (strKind !== '') {
|
|
|
|
|
enCapital = strKind
|
|
|
|
|
} else {
|
|
|
|
|
strKind = props.details.kindpkgs
|
|
|
|
|
enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return enCapital
|
|
|
|
|
}
|
|
|
|
|
// function SetTOTALNO(SS) {
|
|
|
|
|
// let DSS = SS.toString()
|
|
|
|
|
// const i = DSS.indexOf('\n')
|
|
|
|
|
// let num = 0
|
|
|
|
|
// let strKind = ''
|
|
|
|
|
// let enCapital = ''
|
|
|
|
|
// if (i > 0) {
|
|
|
|
|
// const slist = DSS.split('\n')
|
|
|
|
|
// for (let i = 0; i < slist.length; i += 1) {
|
|
|
|
|
// const member = slist[i]
|
|
|
|
|
// const strNum: any = GetStringNum(member)
|
|
|
|
|
// if (i == 0) {
|
|
|
|
|
// strKind = member.substring(strNum.length)
|
|
|
|
|
// }
|
|
|
|
|
// num = parseFloat(num).add(parseFloat(strNum))
|
|
|
|
|
// }
|
|
|
|
|
// if (strKind !== '') {
|
|
|
|
|
// enCapital = strKind
|
|
|
|
|
// } else {
|
|
|
|
|
// strKind = props.details.kindpkgs
|
|
|
|
|
// enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// const strNum: any = GetStringNum(DSS)
|
|
|
|
|
// strKind = DSS.substring(strNum.length)
|
|
|
|
|
// if (strKind !== '') {
|
|
|
|
|
// enCapital = strKind
|
|
|
|
|
// } else {
|
|
|
|
|
// strKind = props.details.kindpkgs
|
|
|
|
|
// enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return enCapital
|
|
|
|
|
// }
|
|
|
|
|
// 选择箱型触发
|
|
|
|
|
const ctnChange = (v, item) => {
|
|
|
|
|
console.log(item)
|
|
|
|
|
let data = {}
|
|
|
|
|
optionsStore.getOptionsByCode('GetCtnSelectList').forEach(row => {
|
|
|
|
|
if (row.id == v) {
|
|
|
|
|
item.ctn = row.ctnName
|
|
|
|
|
data = row
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// 触发表格数据
|
|
|
|
|
emitter.emit('ctnTable', data)
|
|
|
|
|
}
|
|
|
|
|
// 箱量change
|
|
|
|
|
const ctnNumChange = (v, item) => {
|
|
|
|
|
let data = {}
|
|
|
|
|
optionsStore.getOptionsByCode('GetCtnSelectList').forEach(row => {
|
|
|
|
|
if (row.ctnName == item.ctn) {
|
|
|
|
|
data = row
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// 触发表格数据
|
|
|
|
|
emitter.emit('ctnNumTable', { item, data })
|
|
|
|
|
}
|
|
|
|
|
function ToEn(a) {
|
|
|
|
|
// eslint-disable-next-line no-array-constructor
|
|
|
|
|