|
|
|
@ -543,8 +543,11 @@
|
|
|
|
|
has-feedback
|
|
|
|
|
prop="pkgs"
|
|
|
|
|
>
|
|
|
|
|
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.pkgs" type="number" @change="changePkgs"/> -->
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
|
|
|
|
|
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
|
|
|
|
|
<!-- <a-input :allowClear="true" v-model="details.pkgs" type="number" @change="changePkgs"/> -->
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
@ -581,6 +584,7 @@
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :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-model-item>
|
|
|
|
@ -597,6 +601,7 @@
|
|
|
|
|
<div class="line-box">
|
|
|
|
|
<inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/>
|
|
|
|
|
<!-- <a-input :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-model-item>
|
|
|
|
@ -677,6 +682,109 @@
|
|
|
|
|
</a-form>
|
|
|
|
|
</template>
|
|
|
|
|
</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="tit">
|
|
|
|
|
<span>箱数或件数</span>
|
|
|
|
|
<span>No.of containers or pkgs</span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.pkgsTotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="pkgsTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="text-res">
|
|
|
|
|
<a-row :gutter="16">
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="总件数"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="12">
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="件数包装"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<auto-complete
|
|
|
|
|
:allowClear="true"
|
|
|
|
|
v-model="details.kindpkgs"
|
|
|
|
|
class="customer-input"
|
|
|
|
|
:data-source="kindpkgsDataArr"
|
|
|
|
|
:dropdown-match-select-width="false"
|
|
|
|
|
:dropdown-style="{ width: '200px' }"
|
|
|
|
|
@select="kindpkgsSelect"
|
|
|
|
|
@change="kindpkgsChange"
|
|
|
|
|
@focus="kindpkgsChange"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</div> -->
|
|
|
|
|
</a-form>
|
|
|
|
|
<!-- 毛重 -->
|
|
|
|
|
<a-form v-if="textEntryType === 'kgs'">
|
|
|
|
|
<!-- <div class="tit">
|
|
|
|
|
<span>毛重(公斤)</span>
|
|
|
|
|
<span>Gross Weight </span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.kgsTotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="kgsTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="text-res">
|
|
|
|
|
<div class="kgs-label">
|
|
|
|
|
<span class="left">总重量:</span>
|
|
|
|
|
<inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/>
|
|
|
|
|
<span class="unit">KGS</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</a-form>
|
|
|
|
|
<!-- 尺码 -->
|
|
|
|
|
<a-form v-if="textEntryType === 'cbm'">
|
|
|
|
|
<!-- <div class="tit">
|
|
|
|
|
<span>尺码(立方米)</span>
|
|
|
|
|
<span>Gross Weight </span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="text-input">
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model="details.cbmTotal"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
:auto-size="{ minRows: 6, maxRows: 9 }"
|
|
|
|
|
@change="cbmTextChange"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="text-res">
|
|
|
|
|
<div class="kgs-label">
|
|
|
|
|
<span class="left">总重量:</span>
|
|
|
|
|
<inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/>
|
|
|
|
|
<span class="unit">CBM</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template slot="footer">
|
|
|
|
|
<a-button type="primary" @click="textEntryClose">确定</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- == 件重尺编辑模板 == -->
|
|
|
|
|
</a-collapse-panel>
|
|
|
|
|
</a-collapse>
|
|
|
|
|
</template>
|
|
|
|
@ -767,7 +875,10 @@ export default {
|
|
|
|
|
customerModelconfirm: false,
|
|
|
|
|
showShipper: '',
|
|
|
|
|
showConsignee: '',
|
|
|
|
|
showNotifier: ''
|
|
|
|
|
showNotifier: '',
|
|
|
|
|
textEntryModalVisible: false,
|
|
|
|
|
textEntryType: '',
|
|
|
|
|
textEntryModalTitle: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
@ -1700,6 +1811,75 @@ export default {
|
|
|
|
|
this.changePkgs()
|
|
|
|
|
}
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
editTextEntryModel (type) {
|
|
|
|
|
this.textEntryModalVisible = true
|
|
|
|
|
if (type === 'pkgs') {
|
|
|
|
|
this.textEntryModalTitle = '件数/包装'
|
|
|
|
|
} else if (type === 'kgs') {
|
|
|
|
|
this.textEntryModalTitle = '毛重'
|
|
|
|
|
} else if (type === 'cbm') {
|
|
|
|
|
this.textEntryModalTitle = '尺码'
|
|
|
|
|
}
|
|
|
|
|
this.textEntryType = type
|
|
|
|
|
},
|
|
|
|
|
textEntryClose () {
|
|
|
|
|
this.textEntryModalVisible = false
|
|
|
|
|
this.textEntryModalTitle = ''
|
|
|
|
|
this.textEntryType = false
|
|
|
|
|
},
|
|
|
|
|
// 件数包装修改
|
|
|
|
|
pkgsTextChange () {
|
|
|
|
|
const pkgsTexyVal = this.details.pkgsTotal
|
|
|
|
|
const arr = pkgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let pkgs = 0
|
|
|
|
|
let kindpkgs = ''
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
pkgs += Number(regexStr[0])
|
|
|
|
|
}
|
|
|
|
|
if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) {
|
|
|
|
|
kindpkgs = regexStr[1]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('包装:', kindpkgs, ' 、件数:', pkgs)
|
|
|
|
|
this.details.pkgs = pkgs
|
|
|
|
|
this.details.kindpkgs = kindpkgs
|
|
|
|
|
},
|
|
|
|
|
// 毛重修改
|
|
|
|
|
kgsTextChange () {
|
|
|
|
|
const kgsTexyVal = this.details.kgsTotal
|
|
|
|
|
const arr = kgsTexyVal.split(/\n|\r/g)
|
|
|
|
|
let kgs = 0
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
kgs += Number(regexStr[0])
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('总重量:', kgs)
|
|
|
|
|
this.details.kgs = kgs
|
|
|
|
|
},
|
|
|
|
|
// 尺码修改
|
|
|
|
|
cbmTextChange () {
|
|
|
|
|
const cbmTexyVal = this.details.cbmTotal
|
|
|
|
|
const arr = cbmTexyVal.split(/\n|\r/g)
|
|
|
|
|
let cbm = 0
|
|
|
|
|
console.log('arr:', arr)
|
|
|
|
|
arr.map((item, index) => {
|
|
|
|
|
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
|
|
|
|
|
console.log('分割数组:', regexStr)
|
|
|
|
|
if (regexStr && Number(regexStr[0])) {
|
|
|
|
|
cbm += Number(regexStr[0])
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('总重量:', cbm)
|
|
|
|
|
this.details.cbm = cbm
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1918,6 +2098,7 @@ export default {
|
|
|
|
|
.line-box {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 6px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
span.unit {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
@ -1926,6 +2107,12 @@ export default {
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
padding-left: 5px;
|
|
|
|
|
}
|
|
|
|
|
.edit-icon{
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.required{
|
|
|
|
@ -2009,4 +2196,33 @@ export default {
|
|
|
|
|
right: 8px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text-entry-box {
|
|
|
|
|
.tit{
|
|
|
|
|
height:40px;
|
|
|
|
|
line-height:40px;
|
|
|
|
|
font-size:14px;
|
|
|
|
|
color: #333;
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
}
|
|
|
|
|
.text-res {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
.kgs-label{
|
|
|
|
|
display: flex;
|
|
|
|
|
.left{
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 68px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
.unit{
|
|
|
|
|
display: block;
|
|
|
|
|
width: 60px;
|
|
|
|
|
margin-left:10px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|