|
@@ -350,16 +350,16 @@
|
|
|
<span style="padding-left: 20px"></span>
|
|
|
<el-input type="age" style="width: 100%;" v-model="assemblyForm.hscode"
|
|
|
size="small" autocomplete="off"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- clearable placeholder="请输入商品 HS-CODE" ></el-input>
|
|
|
+ :disabled="detailData.seeDisabled || !assemblyForm.commodityCnName"
|
|
|
+ clearable placeholder="商品 HS-CODE" ></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-input type="age" style="width: 100%;" v-model="assemblyForm.commodityEnName"
|
|
|
size="small" autocomplete="off"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- clearable placeholder="请输入商品简称" ></el-input>
|
|
|
+ :disabled="detailData.seeDisabled || !assemblyForm.commodityCnName"
|
|
|
+ clearable placeholder="商品名称" ></el-input>
|
|
|
</div>
|
|
|
<div style="margin-top: 4px">
|
|
|
<el-form-item label="货描" prop="cargoType" label-width="40px" >
|
|
@@ -497,8 +497,8 @@
|
|
|
<el-col :span="15">
|
|
|
<el-input type="age" style="width: 100%;margin-left: 20px;" v-model="assemblyForm.bookingAgentEnName"
|
|
|
size="small" autocomplete="off"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- clearable placeholder="请输入订舱代理" ></el-input>
|
|
|
+ :disabled="detailData.seeDisabled || !assemblyForm.bookingAgentCnName"
|
|
|
+ clearable placeholder="订舱代理" ></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
<div>
|
|
@@ -1051,6 +1051,15 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
let portArr = ['placeReceipt','destination','placeDelivery']
|
|
|
let cnPorArr = ['pol','pod','pot']
|
|
|
if (arr.indexOf(name) != -1) {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,name + 'Id','')
|
|
|
+ this.$set(this.assemblyForm,name + 'CnName','')
|
|
|
+ this.$set(this.assemblyForm,name + 'EnName','')
|
|
|
+ this.$set(this.assemblyForm,name + 'Code','')
|
|
|
+ this.$set(this.assemblyForm,name + 'Details','')
|
|
|
+ this.$set(this.assemblyForm,name + 'CntyName','')
|
|
|
+ this.$set(this.assemblyForm,name + 'CntyCode','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,name + 'Id',item.id)
|
|
@@ -1067,6 +1076,13 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 有中文名称的港口
|
|
|
else if (cnPorArr.indexOf(name) != -1) {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,name + 'Id','')
|
|
|
+ this.$set(this.assemblyForm,name + 'CnName','')
|
|
|
+ this.$set(this.assemblyForm,name + 'EnName','')
|
|
|
+ this.$set(this.assemblyForm,name + 'Code','')
|
|
|
+ this.$set(this.assemblyForm,name + 'NamePrint','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.enName == value) {
|
|
|
this.$set(this.assemblyForm,name + 'Id',item.id)
|
|
@@ -1090,6 +1106,12 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 没有中文名的港口
|
|
|
else if (portArr.indexOf(name) != -1) {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,name + 'Id','')
|
|
|
+ this.$set(this.assemblyForm,name + 'Name','')
|
|
|
+ this.$set(this.assemblyForm,name + 'Code','')
|
|
|
+ this.$set(this.assemblyForm,name + 'NamePrint','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.enName == value) {
|
|
|
this.$set(this.assemblyForm,name + 'Id',item.id)
|
|
@@ -1100,6 +1122,12 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
}
|
|
|
else if (name == 'commodity') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'hscode','')
|
|
|
+ this.$set(this.assemblyForm,'commodityShName','')
|
|
|
+ this.$set(this.assemblyForm,'commodityCnName','')
|
|
|
+ this.$set(this.assemblyForm,'commodityEnName','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,'hscode',item.hsCode)
|
|
@@ -1111,6 +1139,11 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 船名
|
|
|
else if (name == 'vessel') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'vesselId','')
|
|
|
+ this.$set(this.assemblyForm,'vesselCnName','')
|
|
|
+ this.$set(this.assemblyForm,'vesselEnName','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.enName == value) {
|
|
|
this.$set(this.assemblyForm,'vesselId',item.id)
|
|
@@ -1130,7 +1163,6 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
- console.log(item,1115)
|
|
|
this.$set(this.assemblyForm,'carrierId',item.id)
|
|
|
this.$set(this.assemblyForm,'carrierCnName',item.cnName)
|
|
|
this.$set(this.assemblyForm,'carrierEnName',item.enName)
|
|
@@ -1141,6 +1173,10 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 包装
|
|
|
else if (name == 'packingUnit') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'packingUnitId','')
|
|
|
+ this.$set(this.assemblyForm,'packingUnit','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,'packingUnitId',item.id)
|
|
@@ -1150,6 +1186,12 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 订舱代理
|
|
|
else if (name == 'bookingAgent') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'bookingAgentId','')
|
|
|
+ this.$set(this.assemblyForm,'bookingAgentCnName','')
|
|
|
+ this.$set(this.assemblyForm,'bookingAgentEnName','')
|
|
|
+ this.$set(this.assemblyForm,'bookingRemarks','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,'bookingAgentId',item.id)
|
|
@@ -1161,6 +1203,11 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// 航线
|
|
|
else if (name == 'line') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'lineId','')
|
|
|
+ this.$set(this.assemblyForm,'lineCnName','')
|
|
|
+ this.$set(this.assemblyForm,'lineEnName','')
|
|
|
+ }
|
|
|
for(let item of this[name + 'Data']) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,'lineId',item.id)
|
|
@@ -1171,6 +1218,11 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
// COLOADER
|
|
|
else if (name == 'coloaderCnName') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm,'coloaderId','')
|
|
|
+ this.$set(this.assemblyForm,'coloaderCnName','')
|
|
|
+ this.$set(this.assemblyForm,'coloaderEnName','')
|
|
|
+ }
|
|
|
for(let item of this.coloaderCnNameData) {
|
|
|
if (item.cnName == value) {
|
|
|
this.$set(this.assemblyForm,'coloaderId',item.id)
|
|
@@ -1180,14 +1232,14 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
}
|
|
|
}
|
|
|
else if (name == 'cargoType') {
|
|
|
- this.$set(this.assemblyForm,'cargoType',value)
|
|
|
+ this.$set(this.assemblyForm,'cargoType',value?value:'')
|
|
|
if (value == 'danger') {
|
|
|
// 危险品
|
|
|
this.DangerousGoodsAdd()
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- this.$set(this.assemblyForm,name,value)
|
|
|
+ this.$set(this.assemblyForm,name,value?value:'')
|
|
|
}
|
|
|
},
|
|
|
// 通知人添加第二个通知人弹窗
|
|
@@ -1264,24 +1316,24 @@ import {regularFloating, regularInteger} from "@/util/regularJudgment";
|
|
|
// 4E00-9FBF CJK 统一表意符号 F900-FAFF CJK 兼容象形文字
|
|
|
// FE30-FE4F CJK 兼容形式 FF00-FFEF 全角ASCII、全角标点
|
|
|
// 匹配中文字符
|
|
|
- let a = event.replace(/[\u2E80-\u2EFF\u2F00-\u2FDF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FBF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]+/g, '')
|
|
|
- this.assemblyForm[name] = a
|
|
|
+ // let a = event.replace(/[\u2E80-\u2EFF\u2F00-\u2FDF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FBF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF]+/g, '')
|
|
|
+ // this.assemblyForm[name] = a
|
|
|
},
|
|
|
// text文本框input
|
|
|
textareaBlur(name){
|
|
|
console.log(name,1160)
|
|
|
- if (this.assemblyForm[name].length > (35 * 5)) {
|
|
|
- this.$message({
|
|
|
- message: '输入的字体已经超出五行',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- }
|
|
|
- let arr = ['hshipperDetails','hconsigneeDetails','hnotifyDetails','marks','commodityDescr','hnotify2Details']
|
|
|
- if (arr.indexOf(name) != -1) {
|
|
|
- console.log(this.assemblyForm[name],1133)
|
|
|
- this.assemblyForm[name] = this.assemblyForm[name].toUpperCase()
|
|
|
- }
|
|
|
- this.assemblyForm[name] = textareaWrap(this.assemblyForm[name])
|
|
|
+ // if (this.assemblyForm[name].length > (35 * 5)) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '输入的字体已经超出五行',
|
|
|
+ // type: 'warning'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // let arr = ['hshipperDetails','hconsigneeDetails','hnotifyDetails','marks','commodityDescr','hnotify2Details']
|
|
|
+ // if (arr.indexOf(name) != -1) {
|
|
|
+ // console.log(this.assemblyForm[name],1133)
|
|
|
+ // this.assemblyForm[name] = this.assemblyForm[name].toUpperCase()
|
|
|
+ // }
|
|
|
+ // this.assemblyForm[name] = textareaWrap(this.assemblyForm[name])
|
|
|
},
|
|
|
// 同通知人
|
|
|
notifybyfun(){
|