作者 shenhailong

修改预配新增页面海关关区为 输入框

合并全部出港业务新增编辑  承运人 航班号问题
... ... @@ -197,12 +197,12 @@
<span>航班信息</span>
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier"
:disabled="fenStatus === 'addAwbh'"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="7.5">-->
<!-- <el-form-item label="承运人" prop="carrier">-->
<!-- <el-input v-model="carrier"-->
<!-- :disabled="fenStatus === 'addAwbh'"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno"
... ... @@ -467,6 +467,7 @@
piece: [{required: true, trigger: 'change', validator: validatorNums}],
arrivetime: [{required: true, trigger: 'blur', message:'请选择运抵时间'}],
customcode: [{required: true, trigger: 'blur', message:'海关关区不能为空'}],
flightdate: [{required: true, trigger: 'blur', message:'请选择航班日期'}],
},
arriveData: [],
detailData: [],
... ... @@ -654,9 +655,11 @@
handelAddArriveInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.arriveModel.carrier = this.arriveQuery.carrier
// this.arriveModel.carrier = this.arriveQuery.carrier
this.arriveModel.flightdate = this.arriveQuery.flightdate
this.arriveModel.flightno = this.arriveQuery.flightno
if (this.arriveQuery.carrier!=undefined){
this.arriveModel.flightno = this.arriveQuery.carrier+this.arriveQuery.flightno
}
this.arriveModel.originstation = this.arriveQuery.originstation
this.arriveModel.destinationstation = this.arriveQuery.destinationstation
this.arriveModel.customcode = this.arriveQuery.customcode
... ... @@ -671,10 +674,10 @@
handleAddAwbh(row){
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.arriveModel.carrier = row.carrier
// this.arriveModel.carrier = row.carrier
this.arriveModel.awba = row.awba
this.arriveModel.flightdate = row.flightdate
this.arriveModel.flightno = row.flightno
this.arriveModel.flightno =row.carrier+ row.flightno
this.arriveModel.originstation = row.originstation
this.arriveModel.destinationstation = row.destinationstation
this.arriveModel.customcode = row.customcode
... ... @@ -691,6 +694,8 @@
createData() {
this.$refs.arriveFormData.validate(valid => {
if (valid) {
this.arriveModel.carrier = this.arriveModel.flightno.substring(0,2);
this.arriveModel.flightno = this.arriveModel.flightno.substring(2);
addMt3201(this.arriveModel).then(res => {
if (res.data.code == "200") {
this.dialogFormVisible = false
... ... @@ -732,6 +737,7 @@
// 编辑
handleEdit(row) {
this.arriveModel = Object.assign({}, row) // copy obj
this.arriveModel.flightno = row.carrier+row.flightno
if (row.awbh === ''){
this.fenStatus = undefined
}else {
... ... @@ -751,6 +757,8 @@
username : loginedUserInfo().username
}
if (valid) {
this.arriveModel.carrier = this.arriveModel.flightno.substring(0,2);
this.arriveModel.flightno = this.arriveModel.flightno.substring(2);
updateMT3201(this.arriveModel).then(res => {
if (res.data.code == "200") {
this.dialogFormVisible = false
... ...
... ... @@ -177,11 +177,11 @@
<el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="7.5">-->
<!-- <el-form-item label="承运人" prop="carrier">-->
<!-- <el-input v-model="carrier" :disabled="dialogStatus ==='update'"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus ==='update'"></el-input>
... ... @@ -478,8 +478,8 @@
goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, trigger: 'blur', validator: validatorAwbh}],
flightdate: [{required: true, trigger: 'blur'}],
loadingtime: [{required: true, trigger: 'blur'}],
flightdate: [{required: true, trigger: 'blur', message:'请选择航班时间'}],
loadingtime: [{required: true, trigger: 'blur', message:'请选择装载时间'}],
originstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
lodingpiece: [{type: 'number',required: true, trigger: 'change', message: '只能输入数字'}],
... ... @@ -545,7 +545,7 @@
},
}
},
created() {
activated() {
if (this.$route.params.flightData !== undefined) {
// 给查询条件赋值
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
... ... @@ -683,6 +683,7 @@
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
this.loadingModel.flightno = row.carrier+row.flightno
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -697,6 +698,8 @@
_this.loadingModel.user= {
username : loginedUserInfo().username
}
this.loadingModel.carrier = this.loadingModel.flightno.substring(0,2);
this.loadingModel.flightno = this.loadingModel.flightno.substring(2);
updateMT4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
... ... @@ -898,9 +901,11 @@
handelAddLoadingInfo() {
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.loadingModel.carrier = this.loadingQuery.carrier
// this.loadingModel.carrier = this.loadingQuery.carrier
this.loadingModel.flightdate = this.loadingQuery.flightdate
this.loadingModel.flightno = this.loadingQuery.flightno
if ( this.loadingQuery.carrier != undefined){
this.loadingModel.flightno = this.loadingQuery.carrier + this.loadingQuery.flightno
}
this.loadingModel.originstation = this.loadingQuery.originstation
this.loadingModel.destinationstation = this.loadingQuery.destinationstation
this.loadingModel.customcode = this.loadingQuery.customcode
... ... @@ -915,6 +920,8 @@
createData() {
this.$refs.loadingFormData.validate(valid => {
if (valid) {
this.loadingModel.carrier = this.loadingModel.flightno.substring(0,2);
this.loadingModel.flightno = this.loadingModel.flightno.substring(2);
addMt4201(this.loadingModel).then(res => {
if (res.data.count > 0) {
this.dialogFormVisible = false
... ...
... ... @@ -575,10 +575,20 @@
</el-col>
<el-col :span="6">
<el-form-item label="所属关区" prop="customcode">
<el-select v-model="preModel.customcode" clearable class="filter-item" style="width: 140px" placeholder="请选择所属关区">
<el-option v-for="item in custom" :key="item.value"
:label="item.label"
:value="item.value">
<!-- <el-select v-model="preModel.customcode" clearable class="filter-item" style="width: 140px" placeholder="请选择所属关区">-->
<!-- <el-option v-for="item in custom" :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<el-select v-model="preModel.customcode" class="filter-item" placeholder="请输入关区代码"
filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading"
allow-create
default-first-option>
<el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
... ...
... ... @@ -182,11 +182,11 @@
</el-col>
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="承运人" prop="carrier">
<el-input v-model="carrier" :disabled="dialogStatus === 'update'"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="7.5">-->
<!-- <el-form-item label="承运人" prop="carrier">-->
<!-- <el-input v-model="carrier" :disabled="dialogStatus === 'update'"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="7.5">
<el-form-item label="航班号" prop="flightno">
<el-input v-model="flightno" :disabled="dialogStatus === 'update'"></el-input>
... ... @@ -256,12 +256,12 @@
</el-row>
<el-row>
<el-col :span="7.5">
<el-form-item label="装载件数" prop="piece">
<el-form-item label="理货件数" prop="piece">
<el-input v-model="tidyModel.piece"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="装载重量" prop="weight">
<el-form-item label="理货重量" prop="weight">
<el-input v-model="tidyModel.weight"></el-input>
</el-form-item>
</el-col>
... ... @@ -450,6 +450,7 @@
goodsname: [{required: true, message: "货物描述不能为空"},{ trigger: 'blur', validator: validAlphabetsSpanceKey}],
carrier: [{required: true, message:"承运人不能为空"},{trigger: 'blur', validator: validatorAwbh}],
flightno: [{required: true, message:"航班号不能为空"}, { trigger: 'blur', validator: validatorAwbh}],
flightdate: [{required: true, trigger:'blur', message:"请选择航班日期"}],
originstation: [{required: true, message:"起始站不能为空"}, {trigger: 'blur', validator: validatorAlphabets}],
destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}],
weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}],
... ... @@ -724,10 +725,9 @@
// 清空from列表
this.restModel();
this.tidyModel.carrier = row.carrier
this.tidyModel.awba = row.awba
this.tidyModel.flightdate = row.flightdate
this.tidyModel.flightno = row.flightno
this.tidyModel.flightno = row.carrier + row.flightno
this.tidyModel.originstation = row.originstation
this.tidyModel.destinationstation = row.destinationstation
this.tidyModel.customcode = row.customcode
... ... @@ -886,9 +886,10 @@
this.fenStatus=undefined;
this.restModel()
// 给model赋值,所使用数据是以单独单号查询数据所得
this.tidyModel.carrier = this.tidyQuery.carrier
this.tidyModel.flightdate = this.tidyQuery.flightdate
this.tidyModel.flightno = this.tidyQuery.flightno
if (this.tidyQuery.carrier != undefined){
this.tidyModel.flightno = this.tidyQuery.carrier+this.tidyQuery.flightno
}
this.tidyModel.originstation = this.tidyQuery.originstation
this.tidyModel.destinationstation = this.tidyQuery.destinationstation
this.tidyModel.customcode = this.tidyQuery.customcode
... ... @@ -902,6 +903,8 @@
createData() {
this.$refs.tidyFormData.validate(valid => {
if (valid) {
this.tidyModel.carrier = this.tidyModel.flightno.substring(0,2);
this.tidyModel.flightno = this.tidyModel.flightno.substring(2);
addMt520X(this.tidyModel).then(res => {
if (res.data.code == "200") {
Message.success(res.data.msg);
... ... @@ -922,6 +925,7 @@
this.fenStatus=undefined
}
this.tidyModel = Object.assign({}, row)
this.tidyModel.flightno = row.carrier+row.flightno
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -942,7 +946,8 @@
this.tidyModel.userinfo = {
username : loginedUserInfo().username
}
this.tidyModel.carrier = this.tidyModel.flightno.substring(0,2);
this.tidyModel.flightno = this.tidyModel.flightno.substring(2);
updateMt520X(this.tidyModel).then(res => {
console.log(res.data)
if (res.data.count > 0) {
... ...