作者 小范

新增获取主单信息功能

... ... @@ -22,6 +22,8 @@ export const edit = params => {return axios.post(`${base}/businesstype/edit`, pa
//生成主分单电报
export const fhl = params => {return axios.post(`${base1}/efre/fhl`, params);};
export const fwb = params => {return axios.post(`${base1}/efre/fwb`, params);};
export const selectawabByid = params => {return http.get(`${base1}/awba/selectawabByid`, params);};
... ...
... ... @@ -895,7 +895,8 @@ Handling Information
<el-row>
<el-col :span="4">
<el-form-item label-width="30px" label=" " prop="fhl.waybillNum">
<el-input v-model="addForm.fhl.waybillNum" auto-complete="off" placeholder="主运单号(必填)"></el-input>
<el-input v-model="addForm.fhl.waybillNum" auto-complete="off" placeholder="主运单号(必填)"
@blur="blur"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
... ... @@ -1846,9 +1847,11 @@ Handling Information
</template>
<script>
import {fhl,fwb} from '../../api/remote_interface/byont_import';
import {fhl,fwb,selectawabByid} from '../../api/remote_interface/byont_import';
import Consigner from "../consigner/consigner"
import Consignee from "../consigner/consignee"
import {loginedUserInfo} from "../../api/user";
import {getList} from "../../api/consigner/consigner";
export default {
... ... @@ -2029,12 +2032,12 @@ Handling Information
// 分单
addForm:{
fhl:{
waybillNum:'804-31118931',
quantity_weight_code:'K',
quantity_weight:'888',
quantity_picecs:'888',
origin:'LUX',
destination:'CGO',
waybillNum:'',
quantity_weight_code:'',
quantity_weight:'',
quantity_picecs:'',
origin:'',
destination:'',
},
shp:{
shp_detail_identifier:'TE',
... ... @@ -2082,7 +2085,6 @@ Handling Information
hts_commodity_code:''
},
oci:[],
},
shp_aeo:{
oci_country_code: "",
... ... @@ -2112,7 +2114,6 @@ Handling Information
gridData:[],
dialogVisible:false,
dialogVisible1:false,
}
},
methods:{
... ... @@ -2283,12 +2284,12 @@ Handling Information
this.$message.success('新增分运单,成功');
this.addForm = {
fhl:{
waybillNum:'804-31118931',
quantity_weight_code:'K',
quantity_weight:'888',
quantity_picecs:'888',
origin:'LUX',
destination:'CGO',
waybillNum:'',
quantity_weight_code:'',
quantity_weight:'',
quantity_picecs:'',
origin:'',
destination:'',
},
shp:{
shp_detail_identifier:'TE',
... ... @@ -2367,7 +2368,26 @@ Handling Information
});
})
},
}
//获取主运单信息
blur(){
selectawabByid({id: this.addForm.fhl.waybillNum}).then((res) => {
if (res.data.code == '200'){
console.log(res)
if(res.data.data != null&& res.data.data !=''){
this.addForm.fhl.quantity_weight = res.data.data.quantity_weight;
this.addForm.fhl.quantity_picecs = res.data.data.quantity_picecs;
this.addForm.fhl.origin = res.data.data.origin;
this.addForm.fhl.destination = res.data.data.destination;
this.addForm.fhl.quantity_weight_code = res.data.data.quantity_weight_code;
}
return this.$message.success(res.msg);
}
}).catch((error) => {
alert(error);
});
},
},
}
</script>
... ...