|
|
|
@ -29,7 +29,7 @@
|
|
|
|
|
></div>
|
|
|
|
|
<div>Marks & Nos.(标记与号码)</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-form-item has-feedback prop="marks" class="textarea-label" label="">
|
|
|
|
|
<a-form-item has-feedback name="marks" class="textarea-label" label="">
|
|
|
|
|
<div class="bottom">
|
|
|
|
|
<textareaView
|
|
|
|
|
class="input-box"
|
|
|
|
@ -53,18 +53,922 @@
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<div class="line">
|
|
|
|
|
<div class="left">
|
|
|
|
|
<div
|
|
|
|
|
class="title"
|
|
|
|
|
:class="{ required: rules['description'] && rules['description'][0].required }"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
@click="handleOpen(2)"
|
|
|
|
|
style="cursor: pointer; color: black; margin: 0px"
|
|
|
|
|
class="copy-btn iconfont icon-bianji"
|
|
|
|
|
></span>
|
|
|
|
|
Description of Goods (包装种类与货名)</div
|
|
|
|
|
>
|
|
|
|
|
<a-form-item
|
|
|
|
|
has-feedback
|
|
|
|
|
name="goodsname"
|
|
|
|
|
label=""
|
|
|
|
|
:class="{
|
|
|
|
|
'goods-name-box': rules['goodsname'] && rules['goodsname'][0].required,
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<i
|
|
|
|
|
style="top: 4px"
|
|
|
|
|
class="icon required goods-required"
|
|
|
|
|
v-if="rules['goodsname'] && rules['goodsname'][0].required"
|
|
|
|
|
></i>
|
|
|
|
|
<selectView
|
|
|
|
|
type="goodsname"
|
|
|
|
|
:defaultVal="details.goodsname"
|
|
|
|
|
searchApi="getGoodsname"
|
|
|
|
|
:disabled="BookingLockOrder['goodsname'] && isLockBooking"
|
|
|
|
|
:searchQuery="{ queryItem: '', top: 50 }"
|
|
|
|
|
:showLabel="['goodsNameEN', 'goodsCode']"
|
|
|
|
|
:openSearch="true"
|
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
|
style="width: 75%; max-width: 210px"
|
|
|
|
|
></selectView>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cargo-mark">
|
|
|
|
|
<div
|
|
|
|
|
:class="{ required: rules['cargoid'] && rules['cargoid'][0].required }"
|
|
|
|
|
class="tit"
|
|
|
|
|
>货物标志</div
|
|
|
|
|
>
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="cargoid"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="cargoid"
|
|
|
|
|
label=""
|
|
|
|
|
style="margin-top: -6px"
|
|
|
|
|
>
|
|
|
|
|
<selectView
|
|
|
|
|
type="cargoid"
|
|
|
|
|
:defaultVal="details.cargoid"
|
|
|
|
|
searchApi="cargoData"
|
|
|
|
|
:searchQuery="{ name: '' }"
|
|
|
|
|
:disabled="BookingLockOrder['cargoid'] && isLockBooking"
|
|
|
|
|
:showLabel="['name']"
|
|
|
|
|
:openSearch="false"
|
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
|
style="width: 120px; margin-top: 7px"
|
|
|
|
|
></selectView>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input">
|
|
|
|
|
<div
|
|
|
|
|
:class="{ required: rules['hscode'] && rules['hscode'][0].required }"
|
|
|
|
|
calss="tit"
|
|
|
|
|
>HS编码</div
|
|
|
|
|
>
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="cargoid"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="hscode"
|
|
|
|
|
label=""
|
|
|
|
|
style="margin-top: -2px"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['hscode'] && isLockBooking"
|
|
|
|
|
type="hscode"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.hscode"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-form-item has-feedback name="description" class="textarea-label" label="">
|
|
|
|
|
<div class="bottom">
|
|
|
|
|
<textareaView
|
|
|
|
|
id="description-scroll"
|
|
|
|
|
class="input-box"
|
|
|
|
|
:parentVal="details.description"
|
|
|
|
|
:disabled="BookingLockOrder['description'] && isLockBooking"
|
|
|
|
|
type="description"
|
|
|
|
|
:height="100"
|
|
|
|
|
:openToCDB="true"
|
|
|
|
|
@getTextareaChange="getTextareaChange"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
class="line-count"
|
|
|
|
|
id="description-scroll-right"
|
|
|
|
|
v-if="Object.keys(details).length > 1 && details.description.length > 1"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="(num, index) in details.description.split('\n')" :key="index">{{
|
|
|
|
|
num.length
|
|
|
|
|
}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="9">
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label pkgs-line-box"
|
|
|
|
|
label="件数"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="pkgs"
|
|
|
|
|
>
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
size="small"
|
|
|
|
|
:disabled="BookingLockOrder['pkgs'] && isLockBooking"
|
|
|
|
|
v-model="details.pkgs"
|
|
|
|
|
type="number"
|
|
|
|
|
@change="changePkgs"
|
|
|
|
|
/>
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-bianji1 edit-icon"
|
|
|
|
|
@click="editTextEntryModel('pkgs')"
|
|
|
|
|
></i>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12" style="overflow: hidden">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="包装"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="kindpkgs"
|
|
|
|
|
>
|
|
|
|
|
<selectView
|
|
|
|
|
type="kindpkgs"
|
|
|
|
|
:defaultVal="details.kindpkgs"
|
|
|
|
|
searchApi="GetPackage"
|
|
|
|
|
:disabled="BookingLockOrder['kindpkgs'] && isLockBooking"
|
|
|
|
|
:searchQuery="{ KeyWord: '' }"
|
|
|
|
|
:showLabel="['name']"
|
|
|
|
|
:openSearch="false"
|
|
|
|
|
@change="getSelectViewRes"
|
|
|
|
|
>
|
|
|
|
|
</selectView>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12" style="overflow: hidden">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label kgs-line-box"
|
|
|
|
|
label="毛重"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="kgs"
|
|
|
|
|
>
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input
|
|
|
|
|
:disabled="BookingLockOrder['kgs'] && isLockBooking"
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.kgs"
|
|
|
|
|
/>
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-bianji1 edit-icon"
|
|
|
|
|
@click="editTextEntryModel('kgs')"
|
|
|
|
|
></i>
|
|
|
|
|
<span class="unit">KGS</span>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12" style="overflow: hidden">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label cbm-line-box"
|
|
|
|
|
label="尺寸"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="cbm"
|
|
|
|
|
>
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<a-input
|
|
|
|
|
:disabled="BookingLockOrder['cbm'] && isLockBooking"
|
|
|
|
|
size="small"
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.cbm"
|
|
|
|
|
/>
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-bianji1 edit-icon"
|
|
|
|
|
@click="editTextEntryModel('cbm')"
|
|
|
|
|
></i>
|
|
|
|
|
<span class="unit">CBM</span>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<template v-if="details.cargoid == 'R'">
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="设置温度"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="tempset"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['tempset'] && isLockBooking"
|
|
|
|
|
type="tempset"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.tempset"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="冷藏通风量"
|
|
|
|
|
:labelCol="labelColCode"
|
|
|
|
|
:wrapperCol="wrapperColCode"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="reeferf"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['reeferf'] && isLockBooking"
|
|
|
|
|
type="reeferf"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.reeferf"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="温度单位"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="tempid"
|
|
|
|
|
>
|
|
|
|
|
<a-select
|
|
|
|
|
:disabled="BookingLockOrder['tempid'] && isLockBooking"
|
|
|
|
|
size="small"
|
|
|
|
|
:default-value="details.tempid || 'C摄氏'"
|
|
|
|
|
v-model="details.tempid"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option value="C"> C摄氏 </a-select-option>
|
|
|
|
|
<a-select-option value="F"> F华氏 </a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="最低温度"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="tempmin"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['tempmin'] && isLockBooking"
|
|
|
|
|
type="tempmin"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.tempmin"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="最高温度"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="tempmax"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['tempmax'] && isLockBooking"
|
|
|
|
|
type="tempmax"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.tempmax"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="湿度"
|
|
|
|
|
:labelCol="labelCol"
|
|
|
|
|
:wrapperCol="wrapperCol"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="humidity"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['humidity'] && isLockBooking"
|
|
|
|
|
type="humidity"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.humidity"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="details.cargoid == 'D'">
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="危险品等级"
|
|
|
|
|
:labelCol="labelColCode"
|
|
|
|
|
:wrapperCol="wrapperColCode"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="dclass"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['dclass'] && isLockBooking"
|
|
|
|
|
type="dclass"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.dclass"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="危险品编号"
|
|
|
|
|
:labelCol="labelColCode"
|
|
|
|
|
:wrapperCol="wrapperColCode"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="dunno"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['dunno'] && isLockBooking"
|
|
|
|
|
type="dunno"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.dunno"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="危险品页号"
|
|
|
|
|
:labelCol="labelColCode"
|
|
|
|
|
:wrapperCol="wrapperColCode"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="dpage"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['dpage'] && isLockBooking"
|
|
|
|
|
type="dpage"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.dpage"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="危险品标签"
|
|
|
|
|
:labelCol="labelColCode"
|
|
|
|
|
:wrapperCol="wrapperColCode"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="dlabel"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['dlabel'] && isLockBooking"
|
|
|
|
|
type="dlabel"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.dlabel"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
class="from-label"
|
|
|
|
|
label="危险品联系人"
|
|
|
|
|
:labelCol="{
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 10 },
|
|
|
|
|
md: { span: 12 },
|
|
|
|
|
}"
|
|
|
|
|
:wrapperCol="{
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 14 },
|
|
|
|
|
md: { span: 12 },
|
|
|
|
|
}"
|
|
|
|
|
has-feedback
|
|
|
|
|
name="linkman"
|
|
|
|
|
>
|
|
|
|
|
<inputView
|
|
|
|
|
:ishd="BookingLockOrder['linkman'] && isLockBooking"
|
|
|
|
|
type="linkman"
|
|
|
|
|
size="small"
|
|
|
|
|
:parentVal="details.linkman"
|
|
|
|
|
@getInputChange="inputChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</template>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col class="num-box" :span="24">
|
|
|
|
|
<span class="label">件数大写: </span>
|
|
|
|
|
<a-input
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
class="input-val num-box-right"
|
|
|
|
|
v-model="details.totalno"
|
|
|
|
|
disabled
|
|
|
|
|
placeholder="自动生成"
|
|
|
|
|
/>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<a-modal
|
|
|
|
|
:title="modelTitle"
|
|
|
|
|
:width="900"
|
|
|
|
|
:visible="visible"
|
|
|
|
|
@ok="visible = false"
|
|
|
|
|
@cancel="visible = false"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<div v-if="modelType === 1" style="display: flex">
|
|
|
|
|
<textareaView
|
|
|
|
|
class="input-box"
|
|
|
|
|
id="marks-scroll"
|
|
|
|
|
:parentVal="details.marks"
|
|
|
|
|
type="marks"
|
|
|
|
|
:height="500"
|
|
|
|
|
style="font-size: 20px; margin-right: 10px"
|
|
|
|
|
:openToCDB="true"
|
|
|
|
|
@getTextareaChange="getTextareaChange"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
class="line-count"
|
|
|
|
|
id="marks-scroll-right"
|
|
|
|
|
v-if="Object.keys(details).length > 1 && details.marks.length > 1"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="(num, index) in details.marks.split('\n')" :key="index">{{
|
|
|
|
|
num.length
|
|
|
|
|
}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="modelType === 2" style="display: flex">
|
|
|
|
|
<textareaView
|
|
|
|
|
id="description-scroll"
|
|
|
|
|
class="input-box"
|
|
|
|
|
:parentVal="details.description"
|
|
|
|
|
type="description"
|
|
|
|
|
:height="500"
|
|
|
|
|
style="font-size: 20px; margin-right: 10px"
|
|
|
|
|
:openToCDB="true"
|
|
|
|
|
@getTextareaChange="getTextareaChange"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
class="line-count"
|
|
|
|
|
id="description-scroll-right"
|
|
|
|
|
v-if="Object.keys(details).length > 1 && details.description.length > 1"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="(num, index) in details.description.split('\n')" :key="index">{{
|
|
|
|
|
num.length
|
|
|
|
|
}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal
|
|
|
|
|
width="500px"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
v-model="textEntryModalVisible"
|
|
|
|
|
:title="textEntryModalTitle"
|
|
|
|
|
>
|
|
|
|
|
<div class="text-entry-box">
|
|
|
|
|
<!-- 件数包装 -->
|
|
|
|
|
<a-form v-if="textEntryType === 'pkgs'">
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.pkgstotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="pkgsTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="total" v-if="pkgstotalRes">总计:{{ pkgstotalRes }}</div>
|
|
|
|
|
</a-form>
|
|
|
|
|
<!-- 毛重 -->
|
|
|
|
|
<a-form v-if="textEntryType === 'kgs'">
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.kgstotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="kgsTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="total" v-if="kgstotalRes">总计:{{ kgstotalRes }} / KGS</div>
|
|
|
|
|
</a-form>
|
|
|
|
|
<!-- 尺码 -->
|
|
|
|
|
<a-form v-if="textEntryType === 'cbm'">
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.cbmtotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="cbmTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="total" v-if="cbmtotalRes">总计:{{ cbmtotalRes }} / CBM</div>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button type="primary" @click="textEntryClose">确定</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</a-collapse-panel>
|
|
|
|
|
</a-collapse>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref, reactive, getCurrentInstance, h, watch, onMounted } from 'vue'
|
|
|
|
|
import { ref, getCurrentInstance, watch, onMounted } from 'vue'
|
|
|
|
|
import inputView from '../components/inputView.vue'
|
|
|
|
|
import textareaView from '../components/textareaView.vue'
|
|
|
|
|
import selectView from '../components/selectView.vue'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
details: { type: Object, default: {} },
|
|
|
|
|
rules: { type: Object, default: {} },
|
|
|
|
|
isLockBooking: { type: Boolean, default: false },
|
|
|
|
|
inSave: { type: Boolean, default: false },
|
|
|
|
|
moreStr: { type: String, default: '' },
|
|
|
|
|
})
|
|
|
|
|
const emit = defineEmits(['pkgsEnCapital', 'changeDetail'])
|
|
|
|
|
let { ctx: that, proxy }: any = getCurrentInstance()
|
|
|
|
|
const showKey = ref(['1'])
|
|
|
|
|
const BookingLockOrder = ref({})
|
|
|
|
|
const modelType = ref()
|
|
|
|
|
const modelTitle = ref('')
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
const labelCol = ref({
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 8 },
|
|
|
|
|
md: { span: 8 },
|
|
|
|
|
})
|
|
|
|
|
const wrapperCol = ref({
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 16 },
|
|
|
|
|
md: { span: 16 },
|
|
|
|
|
})
|
|
|
|
|
const labelColCode = ref({
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 8 },
|
|
|
|
|
md: { span: 10 },
|
|
|
|
|
})
|
|
|
|
|
const wrapperColCode = ref({
|
|
|
|
|
xs: { span: 24 },
|
|
|
|
|
sm: { span: 16 },
|
|
|
|
|
md: { span: 14 },
|
|
|
|
|
})
|
|
|
|
|
const textEntryModalVisible = ref(false)
|
|
|
|
|
const textEntryType: any = ref('')
|
|
|
|
|
const textEntryModalTitle = ref('')
|
|
|
|
|
const pkgstotalRes = ref(0)
|
|
|
|
|
const kgstotalRes = ref(0)
|
|
|
|
|
const cbmtotalRes = ref(0)
|
|
|
|
|
const id = ref()
|
|
|
|
|
watch(
|
|
|
|
|
() => props.details,
|
|
|
|
|
(nval) => {
|
|
|
|
|
if (!props.inSave) {
|
|
|
|
|
emit('changeDetail', {
|
|
|
|
|
detail: nval,
|
|
|
|
|
type: 'cargoInfo',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ deep: true },
|
|
|
|
|
)
|
|
|
|
|
watch(
|
|
|
|
|
() => props.moreStr,
|
|
|
|
|
(nval, oval) => {
|
|
|
|
|
if (nval !== oval) {
|
|
|
|
|
let str = props.details.description
|
|
|
|
|
if (str.length > 0) {
|
|
|
|
|
str += '\n'
|
|
|
|
|
}
|
|
|
|
|
props.details.description = str + nval
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
watch(
|
|
|
|
|
() => route.query,
|
|
|
|
|
() => {
|
|
|
|
|
id.value = route.query.id
|
|
|
|
|
},
|
|
|
|
|
{ immediate: true },
|
|
|
|
|
)
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// const marksScroll = document.getElementById('marks-scroll')
|
|
|
|
|
// if (marksScroll) {
|
|
|
|
|
// marksScroll.addEventListener('scroll', () => {
|
|
|
|
|
// document.getElementById('marks-scroll-right').scrollTop = marksScroll.scrollTop
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// const descriptionScroll = document.getElementById('description-scroll')
|
|
|
|
|
// if (descriptionScroll) {
|
|
|
|
|
// descriptionScroll.addEventListener('scroll', () => {
|
|
|
|
|
// document.getElementById('description-scroll-right').scrollTop = descriptionScroll.scrollTop
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// const obj = {}
|
|
|
|
|
// that.$options.filters['dictData']('BookingLockOrder').forEach((item) => {
|
|
|
|
|
// obj[item.code] = true
|
|
|
|
|
// })
|
|
|
|
|
// BookingLockOrder.value = obj
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
changePkgs()
|
|
|
|
|
}, 2000)
|
|
|
|
|
})
|
|
|
|
|
function tabStopFun() {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
function handleOpen(type) {
|
|
|
|
|
modelType.value = type
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
modelTitle.value = '唛头'
|
|
|
|
|
} else {
|
|
|
|
|
modelTitle.value = '货物描述'
|
|
|
|
|
}
|
|
|
|
|
visible.value = true
|
|
|
|
|
}
|
|
|
|
|
function getTextareaChange({ type, value }) {
|
|
|
|
|
props.details[type] = value
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
function getSelectViewRes({ type, res }) {
|
|
|
|
|
if (type === 'goodsname') {
|
|
|
|
|
props.details.goodscode = res.goodsCode || ''
|
|
|
|
|
props.details.goodsname = res.goodsNameEN || ''
|
|
|
|
|
} else if (type === 'cargoid') {
|
|
|
|
|
props.details.cargoid = res.code || ''
|
|
|
|
|
if (res.code == 'R') {
|
|
|
|
|
props.rules['goodsname'][0].required = true
|
|
|
|
|
} else {
|
|
|
|
|
props.rules['goodsname'][0].required = false
|
|
|
|
|
}
|
|
|
|
|
} else if (['kindpkgs'].includes(type)) {
|
|
|
|
|
props.details.kindpkgs = res['name'] || ''
|
|
|
|
|
const enCapitalRes = SetTOTALNO(props.details.pkgs)
|
|
|
|
|
emit('pkgsEnCapital', enCapitalRes)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function SetTOTALNO(SS) {
|
|
|
|
|
SS = SS.toString()
|
|
|
|
|
const i = SS.indexOf('\n')
|
|
|
|
|
let num = 0
|
|
|
|
|
let strKind = ''
|
|
|
|
|
let enCapital = ''
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
const slist = SS.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(SS)
|
|
|
|
|
strKind = SS.substring(strNum.length)
|
|
|
|
|
if (strKind !== '') {
|
|
|
|
|
console.log(strKind)
|
|
|
|
|
enCapital = strKind
|
|
|
|
|
} else {
|
|
|
|
|
strKind = props.details.kindpkgs
|
|
|
|
|
enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return enCapital
|
|
|
|
|
}
|
|
|
|
|
function ToEn(a) {
|
|
|
|
|
// eslint-disable-next-line no-array-constructor
|
|
|
|
|
const arr1 = new Array('', ' thousand', ' million', ' billion')
|
|
|
|
|
const b = a.length
|
|
|
|
|
let f: any = null
|
|
|
|
|
let h = 0
|
|
|
|
|
let g = ''
|
|
|
|
|
const e = Math.ceil(b / 3)
|
|
|
|
|
const k = b - e * 3
|
|
|
|
|
g = ''
|
|
|
|
|
for (f = k; f < b; f += 3) {
|
|
|
|
|
++h
|
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
|
const num3 = f >= 0 ? a.substring(f, f + 3) : a.substring(0, k + 3)
|
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
|
const strEng = English(num3)
|
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
|
if (strEng != '') {
|
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
|
if (g != '') g += ' '
|
|
|
|
|
g += English(num3) + arr1[e - h]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return g
|
|
|
|
|
}
|
|
|
|
|
function English(a) {
|
|
|
|
|
// eslint-disable-next-line no-array-constructor
|
|
|
|
|
var arr2 = new Array(
|
|
|
|
|
'zero',
|
|
|
|
|
'ten',
|
|
|
|
|
'twenty',
|
|
|
|
|
'thirty',
|
|
|
|
|
'forty',
|
|
|
|
|
'fifty',
|
|
|
|
|
'sixty',
|
|
|
|
|
'seventy',
|
|
|
|
|
'eighty',
|
|
|
|
|
'ninety',
|
|
|
|
|
)
|
|
|
|
|
// eslint-disable-next-line no-array-constructor
|
|
|
|
|
var arr3 = new Array(
|
|
|
|
|
'zero',
|
|
|
|
|
'one',
|
|
|
|
|
'two',
|
|
|
|
|
'three',
|
|
|
|
|
'four',
|
|
|
|
|
'five',
|
|
|
|
|
'six',
|
|
|
|
|
'seven',
|
|
|
|
|
'eight',
|
|
|
|
|
'nine',
|
|
|
|
|
)
|
|
|
|
|
// eslint-disable-next-line no-array-constructor
|
|
|
|
|
var arr4 = new Array(
|
|
|
|
|
'ten',
|
|
|
|
|
'eleven',
|
|
|
|
|
'twelve',
|
|
|
|
|
'thirteen',
|
|
|
|
|
'fourteen',
|
|
|
|
|
'fifteen',
|
|
|
|
|
'sixteen',
|
|
|
|
|
'seventeen',
|
|
|
|
|
'eighteen',
|
|
|
|
|
'nineteen',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
let strRet = ''
|
|
|
|
|
// eslint-disable-next-line eqeqeq
|
|
|
|
|
if (a.length == 3 && a.substr(0, 3) != '000') {
|
|
|
|
|
if (a.substr(0, 1) != '0') {
|
|
|
|
|
strRet += arr3[a.substr(0, 1)] + ' hundred'
|
|
|
|
|
if (a.substr(1, 2) != '00') strRet += ' and '
|
|
|
|
|
} else {
|
|
|
|
|
strRet += ' and '
|
|
|
|
|
}
|
|
|
|
|
a = a.substring(1)
|
|
|
|
|
}
|
|
|
|
|
if (a.length == 2) {
|
|
|
|
|
if (a.substr(0, 1) == '0') a = a.substring(1)
|
|
|
|
|
else if (a.substr(0, 1) == '1') strRet += arr4[a.substr(1, 2)]
|
|
|
|
|
else {
|
|
|
|
|
strRet += arr2[a.substr(0, 1)]
|
|
|
|
|
if (a.substr(1, 1) != '0') strRet += '-'
|
|
|
|
|
a = a.substring(1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)]
|
|
|
|
|
return strRet
|
|
|
|
|
}
|
|
|
|
|
function GetStringNum(str) {
|
|
|
|
|
var num = 0
|
|
|
|
|
if (str == null || str == '') return num
|
|
|
|
|
if (str.length == 0) return num
|
|
|
|
|
var if_find = false
|
|
|
|
|
var str_num = ''
|
|
|
|
|
for (var i = 0; i < str.length; i += 1) {
|
|
|
|
|
var member = str.substr(i, 1)
|
|
|
|
|
if (
|
|
|
|
|
member == '0' ||
|
|
|
|
|
member == '1' ||
|
|
|
|
|
member == '2' ||
|
|
|
|
|
member == '3' ||
|
|
|
|
|
member == '4' ||
|
|
|
|
|
member == '5' ||
|
|
|
|
|
member == '6' ||
|
|
|
|
|
member == '7' ||
|
|
|
|
|
member == '8' ||
|
|
|
|
|
member == '9' ||
|
|
|
|
|
member == '.' ||
|
|
|
|
|
member == '-'
|
|
|
|
|
) {
|
|
|
|
|
if (!if_find) {
|
|
|
|
|
str_num = str_num + member
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if_find = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return str_num
|
|
|
|
|
}
|
|
|
|
|
function inputChange({ type, value }) {
|
|
|
|
|
props.details[type] = value
|
|
|
|
|
if (type === 'pkgs') {
|
|
|
|
|
changePkgs()
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
function changePkgs() {
|
|
|
|
|
const enCapitalRes = SetTOTALNO(props.details.pkgs)
|
|
|
|
|
emit('pkgsEnCapital', enCapitalRes)
|
|
|
|
|
}
|
|
|
|
|
function editTextEntryModel(type) {
|
|
|
|
|
textEntryModalVisible.value = true
|
|
|
|
|
textEntryType.value = type
|
|
|
|
|
if (type === 'pkgs') {
|
|
|
|
|
textEntryModalTitle.value = '件数/包装'
|
|
|
|
|
if (props.details.pkgstotal) {
|
|
|
|
|
pkgsTextChange()
|
|
|
|
|
} else {
|
|
|
|
|
pkgstotalRes.value = 0
|
|
|
|
|
}
|
|
|
|
|
} else if (type === 'kgs') {
|
|
|
|
|
textEntryModalTitle.value = '毛重'
|
|
|
|
|
if (props.details.kgstotal) {
|
|
|
|
|
kgsTextChange()
|
|
|
|
|
} else {
|
|
|
|
|
kgstotalRes.value = 0
|
|
|
|
|
}
|
|
|
|
|
} else if (type === 'cbm') {
|
|
|
|
|
textEntryModalTitle.value = '尺码'
|
|
|
|
|
if (props.details.cbmtotal) {
|
|
|
|
|
cbmTextChange()
|
|
|
|
|
} else {
|
|
|
|
|
cbmtotalRes.value = 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function pkgsTextChange() {
|
|
|
|
|
const pkgsTexyVal = props.details.pkgstotal
|
|
|
|
|
const arr = pkgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kindpkgs = ''
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
pkgs = (pkgs * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) {
|
|
|
|
|
kindpkgs = regexStr[1]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
props.details.pkgs = parseInt(pkgs)
|
|
|
|
|
props.details.kindpkgs = kindpkgs
|
|
|
|
|
pkgstotalRes.value = parseInt(pkgs)
|
|
|
|
|
}
|
|
|
|
|
function kgsTextChange() {
|
|
|
|
|
const kgsTexyVal = props.details.kgstotal
|
|
|
|
|
const arr = kgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let kgs = 0
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
kgs = (kgs * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
props.details.kgs = kgs
|
|
|
|
|
kgstotalRes.value = kgs
|
|
|
|
|
}
|
|
|
|
|
function cbmTextChange() {
|
|
|
|
|
const cbmTexyVal = props.details.cbmtotal
|
|
|
|
|
const arr = cbmTexyVal.split(/\n|\r/g)
|
|
|
|
|
let cbm = 0
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
const num1 = Number(regexStr[0])
|
|
|
|
|
cbm = (cbm * 100 + num1 * 100) / 100
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
props.details.cbm = cbm
|
|
|
|
|
cbmtotalRes.value = cbm
|
|
|
|
|
}
|
|
|
|
|
function textEntryClose() {
|
|
|
|
|
textEntryModalVisible.value = false
|
|
|
|
|
textEntryModalTitle.value = ''
|
|
|
|
|
textEntryType.value = false
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.copy-btn {
|
|
|
|
@ -84,8 +988,8 @@
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
@import url('../style/cargoInfo.less');
|
|
|
|
|
@import url('../style/mailingInfo.less');
|
|
|
|
|
@import url('../style/cargoInfo.less');
|
|
|
|
|
.cargo-info {
|
|
|
|
|
padding-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|