必填项

dev
lilu 2 years ago
parent 4e47ba9a55
commit 7b05278952

@ -1,253 +1,277 @@
<template> <template>
<div class="more-edi" :style="{paddingTop:'25px'}"> <div class="more-edi" :style="{paddingTop:'25px'}">
<a-form> <a-form-model ref="ediFrom" :model="details" :rules="rules">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="发送方EDI代码" label="发送方EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.sendCode"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.sendCode" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.sendCode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="接收方EDI代码" label="接收方EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.receiveCode"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.receiveCode" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.receiveCode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="通知EDI代码" label="通知EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.notifyCdoe"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.notifyCdoe" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.notifyCdoe" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="销售EDI代码" label="销售EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.salerCode"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.salerCode" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.salerCode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="Master Bol Indicator" label="Master Bol Indicator"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.masterBolIndicator"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.masterBolIndicator" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.masterBolIndicator" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="EMANIFEST HBL" label="EMANIFEST HBL"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.emanifestHbl"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.emanifestHbl" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.emanifestHbl" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="收货人EDI代码" label="收货人EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.consigneeEdiCode"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.consigneeEdiCode" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.consigneeEdiCode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="发货人EDI代码" label="发货人EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.shipperEdiCode"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.shipperEdiCode" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.shipperEdiCode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="EDI联系人名称" label="EDI联系人名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.ediAttn"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttn" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttn" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="EDI联系人电话" label="EDI联系人电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.ediAttnTel"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnTel" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnTel" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="EDI联系人邮箱" label="EDI联系人邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.ediAttnMail"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnMail" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnMail" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="AMS收货人" label="AMS收货人"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.amsConsignee"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.amsConsignee" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.amsConsignee" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="AMS通知人" label="AMS通知人"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.amsNotifyParty"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.amsNotifyParty" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.amsNotifyParty" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="操作英文名称" label="操作英文名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.opEName"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.opEName" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.opEName" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="操作电话" label="操作电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.opTel"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.opTel" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.opTel" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="操作邮箱" label="操作邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.opEmail"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.opEmail" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.opEmail" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="ACI HBL:" label="ACI HBL:"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.acihbl"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.acihbl" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.acihbl" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="S0C C0C:" label="S0C C0C:"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.s0CC0C"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.s0CC0C" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.s0CC0C" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="商品名称" label="商品名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="bookingEDIExt.goodsName"
> >
<a-input :allowClear="true" v-model="details.bookingEDIExt.goodsName" /> <a-input :allowClear="true" v-model="details.bookingEDIExt.goodsName" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="SOC箱" label="SOC箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="iscontainersoc"
> >
<a-select :default-value="iscontainersoc" style="width: 120px" v-model="iscontainersoc"> <a-select :default-value="iscontainersoc" style="width: 120px" v-model="iscontainersoc">
<a-select-option value="1"> </a-select-option> <a-select-option value="1"> </a-select-option>
<a-select-option value="0"> </a-select-option> <a-select-option value="0"> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="SCAC代码" label="SCAC代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="scaccode"
> >
<a-input :allowClear="true" v-model="details.scaccode" /> <a-input :allowClear="true" v-model="details.scaccode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item <a-form-model-item
label="ITN编号" label="ITN编号"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback has-feedback
prop="itncode"
> >
<a-input :allowClear="true" v-model="details.itncode" /> <a-input :allowClear="true" v-model="details.itncode" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="23"> <a-col :span="23">
<a-form-item <a-form-model-item
label="付款方" label="付款方"
:labelCol="{ xs: { span: 24 }, sm: { span: 3 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }"
has-feedback has-feedback
prop="freightpayer"
> >
<a-input :allowClear="true" v-model="details.freightpayer" /> <a-input :allowClear="true" v-model="details.freightpayer" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="23"> <a-col :span="23">
<a-form-item <a-form-model-item
label="委托方" label="委托方"
:labelCol="{ xs: { span: 24 }, sm: { span: 3 } }" :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }" :wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }"
has-feedback has-feedback
prop="bookingEDIExt.weiTuoFang"
> >
<a-textarea v-model="details.bookingEDIExt.weiTuoFang" /> <a-textarea v-model="details.bookingEDIExt.weiTuoFang" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form-model>
</div> </div>
</template> </template>
<script> <script>
@ -262,7 +286,33 @@ export default {
}, },
data() { data() {
return { return {
iscontainersoc: '' iscontainersoc: '',
rules: {
// 'bookingEDIExt.sendCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.receiveCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.notifyCdoe': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.salerCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.masterBolIndicator': [ { required: true, message: 'Master Bol Indicator', trigger: 'blur' } ],
// 'bookingEDIExt.emanifestHbl': [ { required: true, message: 'EMANIFEST HBL', trigger: 'blur' } ],
// 'bookingEDIExt.consigneeEdiCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.shipperEdiCode': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttn': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttnTel': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.ediAttnMail': [ { required: true, message: 'EDI', trigger: 'blur' } ],
// 'bookingEDIExt.amsConsignee': [ { required: true, message: 'AMS', trigger: 'blur' } ],
// 'bookingEDIExt.amsNotifyParty': [ { required: true, message: 'AMS', trigger: 'blur' } ],
// 'bookingEDIExt.opEName': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.opTel': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.opEmail': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.acihbl': [ { required: true, message: 'ACI HBL', trigger: 'blur' } ],
// 'bookingEDIExt.s0CC0C': [ { required: true, message: 'S0C C0C', trigger: 'blur' } ],
// 'bookingEDIExt.goodsName': [ { required: true, message: '', trigger: 'blur' } ],
// 'iscontainersoc': [ { required: true, message: 'SOC', trigger: 'blur' } ],
// 'scaccode': [ { required: true, message: 'SCAC', trigger: 'blur' } ],
// 'itncode': [ { required: true, message: 'ITN', trigger: 'blur' } ],
// 'freightpayer': [ { required: true, message: '', trigger: 'blur' } ],
// 'bookingEDIExt.weiTuoFang': [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -289,7 +339,20 @@ export default {
mounted() { mounted() {
this.iscontainersoc = this.details.iscontainersoc ? '1' : '0' this.iscontainersoc = this.details.iscontainersoc ? '1' : '0'
}, },
methods: {} methods: {
checkbasic () {
this.$refs.ediFrom.validate(valid => {
console.log(valid)
if (valid) {
console.log('验证成功!');
return true;
} else {
console.log('验证失败!');
return false;
}
});
},
}
} }
</script> </script>
<style lang="less"> <style lang="less">

@ -25,22 +25,25 @@
<a-tab-pane key="1-1" tab="基础信息"> <a-tab-pane key="1-1" tab="基础信息">
<div class="pane-box"> <div class="pane-box">
<!-- 基本信息 --> <!-- 基本信息 -->
<basicInfo :type="type" :details="bookingDetails" @changeDetail="changeDetailFun"></basicInfo> <basicInfo ref="basicInfo" :type="type" :details="bookingDetails" :rules="basicRules" @changeDetail="changeDetailFun"></basicInfo>
<!-- 收发通信息 --> <!-- 收发通信息 -->
<mailingInfo <mailingInfo
ref="mailingInfo"
:details="bookingDetails" :details="bookingDetails"
:rules="mailingRules"
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
@spliceMore="spliceMorefun" @spliceMore="spliceMorefun"
@pkgsEnCapital="pkgsEnCapitalFun" @pkgsEnCapital="pkgsEnCapitalFun"
></mailingInfo> ></mailingInfo>
<!-- 货物信息 --> <!-- 货物信息 -->
<cargoInfo :details="bookingDetails" :moreStr="moreStr" @changeDetail="changeDetailFun"></cargoInfo> <cargoInfo ref="cargoInfo" :details="bookingDetails" :rules="cargoRules" :moreStr="moreStr" @changeDetail="changeDetailFun"></cargoInfo>
<!-- 签单信息 --> <!-- 签单信息 -->
<billInfo :details="bookingDetails" @changeDetail="changeDetailFun"></billInfo> <billInfo ref="billInfo" :details="bookingDetails" :rules="billRules" @changeDetail="changeDetailFun"></billInfo>
<!-- 备注信息 --> <!-- 备注信息 -->
<remarksInfo :details="bookingDetails" @changeDetail="changeDetailFun"></remarksInfo> <remarksInfo ref="remarksInfo" :details="bookingDetails" :rules="remarksRules" @changeDetail="changeDetailFun"></remarksInfo>
<!-- 箱型 --> <!-- 箱型 -->
<goodsTable <goodsTable
ref="goodsTable"
:details="bookingDetails" :details="bookingDetails"
@changeDetail="changeDetailFun" @changeDetail="changeDetailFun"
@changeTotal="changeTotalFun" @changeTotal="changeTotalFun"
@ -49,7 +52,7 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2-2" tab="EDI补充信息"> <a-tab-pane key="2-2" tab="EDI补充信息">
<ediMore class="pane-box" :details="bookingDetails" @changeDetail="changeDetailFun"></ediMore> <ediMore ref="ediMore" class="pane-box" :details="bookingDetails" :rules="ediRules" @changeDetail="changeDetailFun"></ediMore>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</template> </template>
@ -251,7 +254,119 @@ export default {
historyData: {}, historyData: {},
Showtabs: false, Showtabs: false,
inChildLoading: false, inChildLoading: false,
scrollTop: 0 scrollTop: 0,
checkFrom: [],
basicRules: {
customername: [ { required: false, message: '请选择客户名', trigger: 'blur' } ],
mblno: [{ required: false, message: '请输入提单号', trigger: 'blur' }],
carrierid: [{ required: false, message: '请选择船公司', trigger: 'blur' }],
forwarder: [{ required: false, message: '请输入订舱代理', trigger: 'blur' }],
pono: [{ required: false, message: '请输入PO NO', trigger: 'blur' }],
hblno: [{ required: false, message: '请输入分提单号', trigger: 'blur' }],
bookingno: [{ required: false, message: '请输入订舱编号', trigger: 'blur' }],
contractno: [{ required: false, message: '请输入EP号/约号', trigger: 'blur' }],
vessel: [{ required: false, message: '请输入船名', trigger: 'blur' }],
lanecode: [{ required: false, message: '请输入航线代码', trigger: 'blur' }],
voynoinner: [{ required: false, message: '请输入内部航次', trigger: 'blur' }],
voyno: [{ required: false, message: '请输入海关航次', trigger: 'blur' }],
etd: [{ required: false, message: '请选择开船日期', trigger: 'blur' }],
atd: [{ required: false, message: '请选择实际开船日期', trigger: 'blur' }],
lanename: [{ required: false, message: '请输入航线', trigger: 'blur' }],
shipagency: [{ required: false, message: '请输入船代', trigger: 'blur' }],
sale: [{ required: false, message: '请选择销售人员', trigger: 'blur' }],
op: [{ required: false, message: '请选择操作人员', trigger: 'blur' }],
doc: [{ required: false, message: '请选择单证人员', trigger: 'blur' }],
custservice: [{ required: false, message: '请选择客服人员', trigger: 'blur' }]
},
mailingRules: {
shipper: [ { required: false, message: '请输入发货人', trigger: 'blur' } ],
consignee: [ { required: false, message: '请输入收货人', trigger: 'blur' } ],
notifyparty: [ { required: false, message: '请输入通知人', trigger: 'blur' } ],
yard: [ { required: false, message: '请输入场站', trigger: 'blur' } ],
customser: [ { required: false, message: '请输入报关行', trigger: 'blur' } ],
trucker: [ { required: false, message: '请输入车队', trigger: 'blur' } ],
agentid: [ { required: false, message: '请输入国外代理', trigger: 'blur' } ],
eta: [ { required: false, message: '请选择预抵日期', trigger: 'blur' } ],
closingdate: [ { required: false, message: '请选择截港时间', trigger: 'blur' } ],
closedocdate: [ { required: false, message: '请选择截单时间', trigger: 'blur' } ],
closevgmdate: [ { required: false, message: '请选择VGM时间', trigger: 'blur' } ],
placereceiptid: [ { required: false, message: '请选择收货代码', trigger: 'blur' } ],
placereceipt: [ { required: false, message: '请选择收货地', trigger: 'blur' } ],
portloadid: [ { required: false, message: '请选择装货港代码', trigger: 'blur' } ],
portload: [ { required: false, message: '请选择装货港', trigger: 'blur' } ],
transportid: [ { required: false, message: '请选择中转港代码', trigger: 'blur' } ],
transport: [ { required: false, message: '请选择中转港', trigger: 'blur' } ],
portdischargeid: [ { required: false, message: '请选择卸货港代码', trigger: 'blur' } ],
portdischarge: [ { required: false, message: '请选择卸货港', trigger: 'blur' } ],
destinationid: [ { required: false, message: '请选择目的代码', trigger: 'blur' } ],
destination: [ { required: false, message: '请选择目的地', trigger: 'blur' } ],
placedeliveryid: [ { required: false, message: '请选择交货代码', trigger: 'blur' } ],
placedelivery: [ { required: false, message: '请选择交货地', trigger: 'blur' } ],
pkgs: [ { required: false, message: '请输入件数', trigger: 'blur' } ],
kindpkgs: [ { required: false, message: '请输入包装', trigger: 'blur' } ],
kgs: [ { required: false, message: '请输入毛重', trigger: 'blur' } ],
cbm: [ { required: false, message: '请输入尺寸', trigger: 'blur' } ],
},
cargoRules: {
marks: [ { required: false, message: '请输入Seal No. Marks & Nos', trigger: 'blur' } ],
cargoid: [ { required: false, message: '请选择货物标志', trigger: 'blur' } ],
hscode: [ { required: false, message: '请输入HS编码', trigger: 'blur' } ],
description: [ { required: false, message: '请输入包装种类与货名', trigger: 'blur' } ]
},
billRules: {
issuetype: [ { required: false, message: '请选择签单方式', trigger: 'blur' } ],
issuedate: [ { required: false, message: '请选择签单日期', trigger: 'blur' } ],
issueplace: [ { required: false, message: '请选择签单地点', trigger: 'blur' } ],
issueplaceid: [ { required: false, message: '请输入签单地代码', trigger: 'blur' } ],
nobill: [ { required: false, message: '请选择提单份数', trigger: 'blur' } ],
copynobilll: [ { required: false, message: '请选择副本份数', trigger: 'blur' } ],
prepardat: [ { required: false, message: '请选择预付地点', trigger: 'blur' } ],
payableat: [ { required: false, message: '请选择到付地点', trigger: 'blur' } ],
blfrt: [ { required: false, message: '请选择付费方式', trigger: 'blur' } ],
thirdpayaddr: [ { required: false, message: '请输入第三付款地', trigger: 'blur' } ],
service: [ { required: false, message: '请选择运输条款', trigger: 'blur' } ],
reeferf: [ { required: false, message: '请输入冷藏通风量', trigger: 'blur' } ],
tempset: [ { required: false, message: '请输入温度', trigger: 'blur' } ],
tempid: [ { required: false, message: '请选择温度单位', trigger: 'blur' } ],
tempmin: [ { required: false, message: '请输入最低温度', trigger: 'blur' } ],
tempmax: [ { required: false, message: '请输入最高温度', trigger: 'blur' } ],
humidity: [ { required: false, message: '请输入湿度', trigger: 'blur' } ],
dclass: [ { required: false, message: '请输入危险品等级', trigger: 'blur' } ],
dunno: [ { required: false, message: '请输入危险品编号', trigger: 'blur' } ],
dpage: [ { required: false, message: '请输入危险品页号', trigger: 'blur' } ],
dlabel: [ { required: false, message: '请输入危险品标签', trigger: 'blur' } ],
linkman: [ { required: false, message: '请输入危险品联系人', trigger: 'blur' } ],
},
remarksRules: {
soremark: [ { required: false, message: '请输入订舱备注', trigger: 'blur' } ],
siremark: [ { required: false, message: '请输入截单备注', trigger: 'blur' } ],
},
ediRules: {
'bookingEDIExt.sendCode': [ { required: false, message: '请输入发送方EDI代码', trigger: 'blur' } ],
'bookingEDIExt.receiveCode': [ { required: false, message: '请输入接收方EDI代码', trigger: 'blur' } ],
'bookingEDIExt.notifyCdoe': [ { required: false, message: '请输入通知方EDI代码', trigger: 'blur' } ],
'bookingEDIExt.salerCode': [ { required: false, message: '请输入销售EDI代码', trigger: 'blur' } ],
'bookingEDIExt.masterBolIndicator': [ { required: false, message: '请输入Master Bol Indicator', trigger: 'blur' } ],
'bookingEDIExt.emanifestHbl': [ { required: false, message: '请输入EMANIFEST HBL', trigger: 'blur' } ],
'bookingEDIExt.consigneeEdiCode': [ { required: false, message: '请输入收货人EDI代码', trigger: 'blur' } ],
'bookingEDIExt.shipperEdiCode': [ { required: false, message: '请输入发货人EDI代码', trigger: 'blur' } ],
'bookingEDIExt.ediAttn': [ { required: false, message: '请输入EDI联系人名称', trigger: 'blur' } ],
'bookingEDIExt.ediAttnTel': [ { required: false, message: '请输入EDI联系人电话', trigger: 'blur' } ],
'bookingEDIExt.ediAttnMail': [ { required: false, message: '请输入EDI联系人邮箱', trigger: 'blur' } ],
'bookingEDIExt.amsConsignee': [ { required: false, message: '请输入AMS收货人', trigger: 'blur' } ],
'bookingEDIExt.amsNotifyParty': [ { required: false, message: '请输入AMS通知人', trigger: 'blur' } ],
'bookingEDIExt.opEName': [ { required: false, message: '请输入操作英文名称', trigger: 'blur' } ],
'bookingEDIExt.opTel': [ { required: false, message: '请输入操作电话', trigger: 'blur' } ],
'bookingEDIExt.opEmail': [ { required: false, message: '请输入操作邮箱', trigger: 'blur' } ],
'bookingEDIExt.acihbl': [ { required: false, message: '请输入ACI HBL', trigger: 'blur' } ],
'bookingEDIExt.s0CC0C': [ { required: false, message: '请输入S0C C0C', trigger: 'blur' } ],
'bookingEDIExt.goodsName': [ { required: false, message: '请输入商品名称', trigger: 'blur' } ],
'iscontainersoc': [ { required: false, message: '请输入SOC箱', trigger: 'blur' } ],
'scaccode': [ { required: false, message: '请输入SCAC代码', trigger: 'blur' } ],
'itncode': [ { required: false, message: '请输入ITN编号', trigger: 'blur' } ],
'freightpayer': [ { required: false, message: '请输入付款方', trigger: 'blur' } ],
'bookingEDIExt.weiTuoFang': [ { required: false, message: '请输入委托方', trigger: 'blur' } ],
}
} }
}, },
computed: { computed: {
@ -508,15 +623,48 @@ export default {
} else { } else {
this.isAdd = true this.isAdd = true
this.bookingDetails.carrierid = this.type this.bookingDetails.carrierid = this.type
this.bookingDetails.carrier = this.enmuCarrier(this.type) // this.bookingDetails.carrier = this.enmuCarrier(this.type)
this.bookingDetails.carrier = this.type
} }
this.getDjyTenantConfig()
}, },
getDjyTenantConfig () { getDjyTenantConfig () {
getDjyTenantConfig({ getDjyTenantConfig({
type: '' type: 'customer_config_type'
}) })
.then(res => { .then(res => {
this.checkFrom = ['customername', 'mblno', 'carrierid', 'forwarder', 'shipper', 'consignee', 'notifyparty', 'yard', 'customser', 'marks', 'cargoid', 'hscode', 'issuetype', 'issuedate', 'issueplace', 'soremark', 'siremark', 'bookingEDIExt.sendCode', 'bookingEDIExt.receiveCode']
Object.keys(this.basicRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.basicRules[item][0].required = true
}
})
Object.keys(this.mailingRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.mailingRules[item][0].required = true
}
})
Object.keys(this.cargoRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.cargoRules[item][0].required = true
}
})
Object.keys(this.billRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.billRules[item][0].required = true
}
})
Object.keys(this.remarksRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.remarksRules[item][0].required = true
}
})
Object.keys(this.ediRules).map((item, index) => {
if (this.checkFrom.includes(item)) {
this.ediRules[item][0].required = true
}
})
this.$forceUpdate() this.$forceUpdate()
}) })
.catch(err => { .catch(err => {
@ -631,6 +779,24 @@ export default {
this.$message.error('请输入提单号') this.$message.error('请输入提单号')
return false return false
} }
// - start
// const basicFrom = this.$refs.basicInfo.checkbasic()
// const mailingFrom = this.$refs.mailingInfo.checkbasic()
// const cargoFrom = this.$refs.cargoInfo.checkbasic()
// const billFrom = this.$refs.billInfo.checkbasic()
// const remarksFrom = this.$refs.remarksInfo.checkbasic()
// if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
// this.$message.error('')
// return false
// }
// if (this.$refs.ediMore && !this.$refs.ediMore.checkbasic()) {
// this.$message.error('')
// return false
// } else if (!this.$refs.ediMore) {
// console.log('== ==')
// }
debugger
// - end
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
BookingOrderAddOrUpdate(_data) BookingOrderAddOrUpdate(_data)

@ -911,6 +911,7 @@ export default {
console.log(valid) console.log(valid)
if (valid) { if (valid) {
console.log('验证成功!'); console.log('验证成功!');
return true;
} else { } else {
console.log('验证失败!'); console.log('验证失败!');
return false; return false;

@ -5,21 +5,22 @@
<div class="base-tit"><i class="iconfont icon-electronic-signature"></i>签单信息</div> <div class="base-tit"><i class="iconfont icon-electronic-signature"></i>签单信息</div>
</template> </template>
<div class="container bill-info"> <div class="container bill-info">
<a-form> <!-- <a-button type="primary" @click="checkbasic"> </a-button> -->
<a-form-model ref="billFrom" :model="details" :rules="rules">
<a-row :gutter="10"> <a-row :gutter="10">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="签单方式" label="签单方式"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="issuetype"
> >
<!-- <auto-complete <!-- <auto-complete
:allowClear="true" :allowClear="true"
v-model="details.issuetype" v-model="details.issuetype"
:data-source="issuetypeDataArr" :data-source="issuetypeDataArr"
@select="issuetypeSelect" @select="issuetypeSelect"
@change="issuetypeChange" @change="issuetypeChange"
/> --> /> -->
@ -35,26 +36,28 @@
{{ issuetype.selectShowTab }} {{ issuetype.selectShowTab }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="签单日期" label="签单日期"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="issuedate"
> >
<a-date-picker v-model="details.issuedate" format="YYYY-MM-DD" /> <a-date-picker v-model="details.issuedate" format="YYYY-MM-DD" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="签单地点" label="签单地点"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="issueplace"
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -67,26 +70,28 @@
@change="issueplaceChange" @change="issueplaceChange"
@focus="issueplaceChange" @focus="issueplaceChange"
/> />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="签单地代码" label="签单地代码"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="issueplaceid"
> >
<a-input :allowClear="true" v-model="details.issueplaceid" /> <a-input :allowClear="true" v-model="details.issueplaceid" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="提单份数" label="提单份数"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="nobill"
> >
<a-select :default-value="details.nobill || 'THREE'" @change="handleChange"> <a-select :default-value="details.nobill || 'THREE'" @change="handleChange">
<a-select-option value="ONE"> ONE </a-select-option> <a-select-option value="ONE"> ONE </a-select-option>
@ -100,15 +105,16 @@
<a-select-option value="NINE"> NINE </a-select-option> <a-select-option value="NINE"> NINE </a-select-option>
<a-select-option value="TEN"> TEN </a-select-option> <a-select-option value="TEN"> TEN </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="副本份数" label="副本份数"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="copynobilll"
> >
<a-select :default-value="details.copynobilll || 'THREE'" @change="handleChange"> <a-select :default-value="details.copynobilll || 'THREE'" @change="handleChange">
<a-select-option value="ONE"> ONE </a-select-option> <a-select-option value="ONE"> ONE </a-select-option>
@ -122,15 +128,16 @@
<a-select-option value="NINE"> NINE </a-select-option> <a-select-option value="NINE"> NINE </a-select-option>
<a-select-option value="TEN"> TEN </a-select-option> <a-select-option value="TEN"> TEN </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="预付地点" label="预付地点"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="prepardat"
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -142,15 +149,16 @@
@change="prepardatChange" @change="prepardatChange"
@focus="prepardatChange" @focus="prepardatChange"
/> />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="到付地点" label="到付地点"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="payableat"
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -162,15 +170,16 @@
@change="payableatChange" @change="payableatChange"
@focus="payableatChange" @focus="payableatChange"
/> />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="付费方式" label="付费方式"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="blfrt"
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -182,26 +191,28 @@
@change="blfrtChange" @change="blfrtChange"
@focus="blfrtChange" @focus="blfrtChange"
/> />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="第三付款地" label="第三付款地"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="thirdpayaddr"
> >
<a-input :allowClear="true" v-model="details.thirdpayaddr" /> <a-input :allowClear="true" v-model="details.thirdpayaddr" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="运输条款" label="运输条款"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="service"
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -213,133 +224,143 @@
@change="serviceChange" @change="serviceChange"
@focus="serviceChange" @focus="serviceChange"
/> />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<template v-if="details.cargoid == 'R'"> <template v-if="details.cargoid == 'R'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="冷藏通风量" label="冷藏通风量"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="reeferf"
> >
<a-input :allowClear="true" v-model="details.reeferf" /> <a-input :allowClear="true" v-model="details.reeferf" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="设置温度" label="设置温度"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="tempset"
> >
<a-input :allowClear="true" v-model="details.tempset" /> <a-input :allowClear="true" v-model="details.tempset" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="温度单位" label="温度单位"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="tempid"
> >
<!-- <a-input :allowClear="true" v-model="details.tempid" /> --> <!-- <a-input :allowClear="true" v-model="details.tempid" /> -->
<a-select :default-value="details.tempid || 'C'" v-model="details.tempid"> <a-select :default-value="details.tempid || 'C'" v-model="details.tempid">
<a-select-option value="C"> C摄氏 </a-select-option> <a-select-option value="C"> C摄氏 </a-select-option>
<a-select-option value="F"> F华氏 </a-select-option> <a-select-option value="F"> F华氏 </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="最低温度" label="最低温度"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="tempmin"
> >
<a-input :allowClear="true" v-model="details.tempmin" /> <a-input :allowClear="true" v-model="details.tempmin" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="最高温度" label="最高温度"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="tempmax"
> >
<a-input :allowClear="true" v-model="details.tempmax" /> <a-input :allowClear="true" v-model="details.tempmax" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="湿度" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-model-item class="from-label" label="湿度" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback prop="humidity">
<a-input :allowClear="true" v-model="details.humidity" /> <a-input :allowClear="true" v-model="details.humidity" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
</template> </template>
<template v-if="details.cargoid == 'D'"> <template v-if="details.cargoid == 'D'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="危险品等级" label="危险品等级"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="dclass"
> >
<a-input :allowClear="true" v-model="details.dclass" /> <a-input :allowClear="true" v-model="details.dclass" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="危险品编号" label="危险品编号"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="dunno"
> >
<a-input :allowClear="true" v-model="details.dunno" /> <a-input :allowClear="true" v-model="details.dunno" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="危险品页号" label="危险品页号"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="dpage"
> >
<a-input :allowClear="true" v-model="details.dpage" /> <a-input :allowClear="true" v-model="details.dpage" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="危险品标签" label="危险品标签"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="dlabel"
> >
<a-input :allowClear="true" v-model="details.dlabel" /> <a-input :allowClear="true" v-model="details.dlabel" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6"> <a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item <a-form-model-item
class="from-label" class="from-label"
label="危险品联系人" label="危险品联系人"
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="linkman"
> >
<a-input :allowClear="true" v-model="details.linkman" /> <a-input :allowClear="true" v-model="details.linkman" />
</a-form-item> </a-form-model-item>
</a-col> </a-col>
</template> </template>
</a-row> </a-row>
</a-form> </a-form-model>
</div> </div>
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
@ -380,7 +401,31 @@ export default {
prepardatData: [], prepardatData: [],
payableatData: [], payableatData: [],
blfrtData: [], blfrtData: [],
serviceData: [] serviceData: [],
rules: {
// issuetype: [ { required: true, message: '', trigger: 'blur' } ],
// issuedate: [ { required: true, message: '', trigger: 'blur' } ],
// issueplace: [ { required: true, message: '', trigger: 'blur' } ],
// issueplaceid: [ { required: true, message: '', trigger: 'blur' } ],
// nobill: [ { required: true, message: '', trigger: 'blur' } ],
// copynobilll: [ { required: true, message: '', trigger: 'blur' } ],
// prepardat: [ { required: true, message: '', trigger: 'blur' } ],
// payableat: [ { required: true, message: '', trigger: 'blur' } ],
// blfrt: [ { required: true, message: '', trigger: 'blur' } ],
// thirdpayaddr: [ { required: true, message: '', trigger: 'blur' } ],
// service: [ { required: true, message: '', trigger: 'blur' } ],
// reeferf: [ { required: true, message: '', trigger: 'blur' } ],
// tempset: [ { required: true, message: '', trigger: 'blur' } ],
// tempid: [ { required: true, message: '', trigger: 'blur' } ],
// tempmin: [ { required: true, message: '', trigger: 'blur' } ],
// tempmax: [ { required: true, message: '', trigger: 'blur' } ],
// humidity: [ { required: true, message: '湿', trigger: 'blur' } ],
// dclass: [ { required: true, message: '', trigger: 'blur' } ],
// dunno: [ { required: true, message: '', trigger: 'blur' } ],
// dpage: [ { required: true, message: '', trigger: 'blur' } ],
// dlabel: [ { required: true, message: '', trigger: 'blur' } ],
// linkman: [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -485,6 +530,18 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
checkbasic () {
this.$refs.billFrom.validate(valid => {
console.log(valid)
if (valid) {
console.log('验证成功!');
return true;
} else {
console.log('验证失败!');
return false;
}
});
},
init() { init() {
this.getIssuetypeList('') this.getIssuetypeList('')
// this.getPortloadlist('', 'issueplace') // this.getPortloadlist('', 'issueplace')

@ -4,12 +4,12 @@
<template slot="header"> <template slot="header">
<div class="base-tit"><i class="iconfont icon-goods"></i>货物信息</div> <div class="base-tit"><i class="iconfont icon-goods"></i>货物信息</div>
</template> </template>
<a-button type="primary" @click="checkbasic"> </a-button> <!-- <a-button type="primary" @click="checkbasic"> </a-button> -->
<div class="container cargo-info"> <div class="container cargo-info">
<a-form-model :selfUpdate="true" ref="cargoFrom" :model="details" :rules="rules"> <a-form-model :selfUpdate="true" ref="cargoFrom" :model="details" :rules="rules">
<a-row :gutter="20"> <a-row :gutter="20">
<a-col :span="8"> <a-col :span="8">
<div class="tit" :class="{'required':rules['marks'] && rules['marks'].required}"> <div class="tit" :class="{'required':rules['marks'] && rules['marks'][0].required}">
<div>Seal No.(封志号)</div> <div>Seal No.(封志号)</div>
<div>Marks & Nos.(标记与号码)</div> <div>Marks & Nos.(标记与号码)</div>
</div> </div>
@ -28,12 +28,12 @@
</a-col> </a-col>
<a-col :span="16"> <a-col :span="16">
<div class="line"> <div class="line">
<div class="left" :class="{'required':rules['description'] && rules['description'].required}"> <div class="left" :class="{'required':rules['description'] && rules['description'][0].required}">
<div>Description of Goods</div> <div>Description of Goods</div>
<div>(包装种类与货名)</div> <div>(包装种类与货名)</div>
</div> </div>
<div class="input cargo-mark" > <div class="input cargo-mark" >
<div :class="{'required':rules['cargoid'] && rules['cargoid'].required}" style="padding-top:4px;">货物标志</div> <div :class="{'required':rules['cargoid'] && rules['cargoid'][0].required}" style="padding-top:4px;">货物标志</div>
<a-form-model-item has-feedback prop="cargoid" label=""> <a-form-model-item has-feedback prop="cargoid" label="">
<a-select :default-value="details.cargoid || 'S'" v-model="details.cargoid" style="width: 120px" @change="handleChange"> <a-select :default-value="details.cargoid || 'S'" v-model="details.cargoid" style="width: 120px" @change="handleChange">
<a-select-option value="S"> S 普通货 </a-select-option> <a-select-option value="S"> S 普通货 </a-select-option>
@ -44,7 +44,7 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
<div class="input" > <div class="input" >
<div :class="{'required':rules['hscode'] && rules['hscode'].required}" style="padding-top:4px;">HS编码</div> <div :class="{'required':rules['hscode'] && rules['hscode'][0].required}" style="padding-top:4px;">HS编码</div>
<a-form-model-item has-feedback prop="hscode" label=""> <a-form-model-item has-feedback prop="hscode" label="">
<a-input :allowClear="true" v-model="details.hscode" /> <a-input :allowClear="true" v-model="details.hscode" />
</a-form-model-item> </a-form-model-item>
@ -132,6 +132,7 @@ export default {
console.log(valid) console.log(valid)
if (valid) { if (valid) {
console.log('验证成功!'); console.log('验证成功!');
return true;
} else { } else {
console.log('验证失败!'); console.log('验证失败!');
return false; return false;
@ -283,7 +284,9 @@ export default {
/deep/ .ant-form-explain{ /deep/ .ant-form-explain{
margin-top: -6px; margin-top: -6px;
} }
.textarea-label{
margin-top: 18px;
}
.required{ .required{
padding-left: 10px; padding-left: 10px;
position: relative; position: relative;

@ -822,7 +822,7 @@ export default {
}, },
created() { created() {
this.init() // this.init()
document.onkeydown = (event) => { document.onkeydown = (event) => {
// console.log(":"+event.key+":"+event.keyCode, document.activeElement); // console.log(":"+event.key+":"+event.keyCode, document.activeElement);
// console.log(document.activeElement); // console.log(document.activeElement);

@ -11,7 +11,7 @@
<a-col :xs="24" :sm="24" :md="24" :lg="10" :xl="12"> <a-col :xs="24" :sm="24" :md="24" :lg="10" :xl="12">
<a-form-model-item has-feedback prop="shipper" class="sender-label"> <a-form-model-item has-feedback prop="shipper" class="sender-label">
<div class="sender"> <div class="sender">
<div class="top"> <div class="top" :class="{'required':rules['shipper'] && rules['shipper'][0].required}">
<div class="name"><span class="iconfont icon-bianji"></span>发货人</div> <div class="name"><span class="iconfont icon-bianji"></span>发货人</div>
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -55,7 +55,7 @@
</a-form-model-item> </a-form-model-item>
<a-form-model-item has-feedback prop="consignee" class="sender-label"> <a-form-model-item has-feedback prop="consignee" class="sender-label">
<div class="consignee"> <div class="consignee">
<div class="top"> <div class="top" :class="{'required':rules['consignee'] && rules['consignee'][0].required}">
<div class="name"><span class="iconfont icon-bianji"></span>收货人</div> <div class="name"><span class="iconfont icon-bianji"></span>收货人</div>
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -98,7 +98,7 @@
</a-form-model-item> </a-form-model-item>
<a-form-model-item has-feedback prop="notifyparty" class="sender-label"> <a-form-model-item has-feedback prop="notifyparty" class="sender-label">
<div class="notifier"> <div class="notifier">
<div class="top"> <div class="top" :class="{'required':rules['notifyparty'] && rules['notifyparty'][0].required}">
<div class="name"><span class="iconfont icon-bianji"></span>通知人</div> <div class="name"><span class="iconfont icon-bianji"></span>通知人</div>
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
@ -1026,6 +1026,7 @@ export default {
console.log(valid) console.log(valid)
if (valid) { if (valid) {
console.log('验证成功!'); console.log('验证成功!');
return true;
} else { } else {
console.log('验证失败!'); console.log('验证失败!');
return false; return false;
@ -1890,6 +1891,23 @@ export default {
padding-left: 5px; padding-left: 5px;
} }
} }
.required{
padding-left: 10px;
position: relative;
&::before{
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
position: absolute;
top: 8px;
left: 0;
}
}
@media (max-width: 1700px) { @media (max-width: 1700px) {
.feeself { .feeself {
top: 15px !important; top: 15px !important;

@ -1456,7 +1456,7 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$message.destroy() this.$message.destroy()
if (!res.succ) { if (!res.data.succ) {
this.$message.error(res.data.msg) this.$message.error(res.data.msg)
} else { } else {
this.$message.success({ content: '校验完成' }) this.$message.success({ content: '校验完成' })

@ -1,15 +1,22 @@
<template> <template>
<a-card class="ramark-box" :bordered="false"> <a-card class="ramark-box" :bordered="false">
<a-row :gutter="24"> <!-- <a-button type="primary" @click="checkbasic"> </a-button> -->
<a-col :span="12"> <a-form-model style="margin-bottom:10px;" ref="remarkFrom" :model="details" :rules="rules">
<div class="tit"><span class="iconfont icon-bianji"></span>订舱备注</div> <a-row :gutter="24">
<a-textarea class="input-box" v-model="details.soremark" /> <a-col :span="12">
</a-col> <a-form-model-item prop="soremark">
<a-col :span="12"> <div class="tit" :class="{'required':rules['soremark'] && rules['soremark'][0].required}"><span class="iconfont icon-bianji"></span>订舱备注</div>
<div class="tit"><span class="iconfont icon-bianji"></span>截单备注</div> <a-textarea class="input-box" v-model="details.soremark" />
<a-textarea class="input-box" v-model="details.siremark" data-next="box-ctnall"/> </a-form-model-item>
</a-col> </a-col>
</a-row> <a-col :span="12">
<a-form-model-item prop="siremark">
<div class="tit" :class="{'required':rules['siremark'] && rules['siremark'][0].required}"><span class="iconfont icon-bianji"></span>截单备注</div>
<a-textarea class="input-box" v-model="details.siremark" data-next="box-ctnall"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-card> </a-card>
</template> </template>
<script> <script>
@ -25,7 +32,11 @@ export default {
}, },
data() { data() {
return { return {
remarks: '' remarks: '',
rules: {
// soremark: [ { required: true, message: '', trigger: 'blur' } ],
// siremark: [ { required: true, message: '', trigger: 'blur' } ],
}
} }
}, },
watch: { watch: {
@ -47,10 +58,23 @@ export default {
} }
}, },
created() {}, created() {},
methods: {} methods: {
checkbasic () {
this.$refs.remarkFrom.validate(valid => {
console.log(valid)
if (valid) {
console.log('验证成功!');
return true;
} else {
console.log('验证失败!');
return false;
}
});
},
}
} }
</script> </script>
<style lang="less"> <style lang="less" scoped>
.tit { .tit {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
@ -64,4 +88,20 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
// padding-bottom: 10px; // padding-bottom: 10px;
} }
.required{
padding-left: 10px;
position: relative;
&::before{
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
position: absolute;
top: 14px;
left: 0;
}
}
</style> </style>

Loading…
Cancel
Save