作者 小范

新增电报查询界面

... ... @@ -23,6 +23,9 @@ 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);};
//获取电报列表
export const selectList = params => {return http.get(`${base1}/awba/selectList`, params);};
export const selectByKey = params => {return http.get(`${base1}/awba/selectByKey`, params);};
... ...
... ... @@ -158,6 +158,7 @@ import Warehouse from './views/station_manage/Warehouse.vue'
import Express from './views/express_system/express.vue'
//给海龙做的货运单
import Way from './views/nav3/Way.vue'
import Telegram from './views/nav3/Telegram.vue'
//朱总让做的网页在线客服
import Webdialog from './views/bus/Webdialog.vue'
... ... @@ -213,6 +214,7 @@ let routes = [
iconCls: 'el-icon-collection',
children: [
{path: '/Way', component: Way, name: '货运单'},
{path: '/Telegram', component: Telegram, name: '电报查询'},
{path: '/Webdialog', component: Webdialog, name: '在线客服'}
]
},
... ...
<template>
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row class="toolbar">
<el-col :span="5">
<el-input v-model="queryInfo.waybillNum" prefix-icon="el-icon-search" size="small"
placeholder="主单号" clearable>
<template slot="prepend">主单号</template>
</el-input>
</el-col>
<el-col :span="5" style="margin-left: 10px">
<el-input v-model="queryInfo.hbs_serial_number" prefix-icon="el-icon-search" size="small"
placeholder="分单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
</el-col>
<el-col :span="5" style="margin-left: 10px">
<el-input v-model="queryInfo.opter" prefix-icon="el-icon-search" size="small"
placeholder="操作代理人" clearable>
<template slot="prepend">代理人</template>
</el-input>
</el-col>
<el-col :span="5" style="margin-left: 10px">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
</el-col>
</el-row>
<!-- 列表区域-->
<el-row>
<template>
<el-table
:data="tableData"
border
:cell-style="{textAlign:'center'}"
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
>
<el-table-column
prop="waybillNum"
label="主单号">
</el-table-column>
<el-table-column
prop="hbs_serial_number"
label="分单号">
</el-table-column>
<el-table-column
prop="opter"
label="代理人">
</el-table-column>
<el-table-column
prop="origin"
label="起始站">
</el-table-column>
<el-table-column
prop="destination"
label="目的站">
</el-table-column>
<el-table-column
prop="quantity_picecs"
label="件数">
</el-table-column>
<el-table-column
prop="quantity_weight"
label="重量">
</el-table-column>
<el-table-column
prop="cariier"
label="承运人">
</el-table-column>
<el-table-column
prop="flightNumber"
label="航班号">
</el-table-column>
<el-table-column
prop="day"
label="航班日期">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="160">
<template slot-scope="scope">
<el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
<!-- <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>-->
</template>
</el-table-column>
</el-table>
</template>
</el-row>
<el-row style="margin-top: 10px" class="toolbar">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-size="queryInfo.pageSize"
:page-sizes="[10, 50, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="50%" >
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="11">
<el-form-item label=" " :label-width="formLabelWidth" prop="billTypeName">
<el-input v-model="addForm.billTypeName" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">费用类别名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label=" " :label-width="formLabelWidth" prop="billRateUnit">
<el-input v-model="addForm.billRateUnit" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">计费单位</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label=" " :label-width="formLabelWidth" prop="billRate">
<el-input v-model="addForm.billRate" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">费率</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="apply_dialog = false" size="small">取 消</el-button>
<el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
</div>
</el-dialog>
</el-row>
</el-card>
</el-row>
</template>
<script>
import {selectList,selectByKey} from '../../api/remote_interface/byont_import';
export default {
name: "Telegram",
data() {
return {
queryInfo: {
waybillNum:'',
hbs_serial_number:'',
opter:'',
// 当前页数
pageNum: 1,
// 每页大小
pageSize: 10,
},
total: 0,
tableData:[],
dialogMap: {
update: '编辑',
create: '新增'
},
dis: undefined,
dialogApply: 'update',
apply_dialog: false,
addForm: {
billTypeName: '',
billTypeId: '',
billRateUnit: '',
billRate: '',
},
formLabelWidth: '220px',
rules: {
billTypeName: [
{ required: true, message: '必填', trigger: 'change' }
],
},
}
},
methods: {
handleCurrentChange(val) {
this.queryInfo.pageNum = val
this.getList()
},
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
},
getList() {
const _this = this
selectList(this.queryInfo).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.tableData = res.data.list
// 获取列表的总记录数
_this.total = res.data.total
_this.$message.success('获取消息收发记录,成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
// 打开编辑
applyEdit(row) {
this.$router.push(
{
path:'/Way',
query:{
id: row.id
}
}
)
},
// 编辑功能
edit() {
// 进行表单的预验证
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return
selectByKey(this.addForm).then((response) => {
// console.log(row)
const res = response.data
if (res.code != '200') {
return this.$message.error(res.msg)
}
this.$message.success(res.msg)
// 隐藏对话框
this.apply_dialog = false
// 刷新列表
this.getList()
}).catch(error => {
this.$message.error(error.toString())
})
})
},
},
mounted() {
this.getList();
}
}
</script>
<style scoped>
.toolbar{
height: 60px;
background-color: white;
/*line-height: 60px;*/
vertical-align: middle;
border-radius: 5px 5px 5px 5px;
padding: 15px 0 0 20px;
box-shadow: 0px 5px 5px #e5e8eb;
}
.my-text-area .prepand{
float: left;
width:89px;
height: 28px;
font-size: 12px;
line-height: 28px;
}
</style>
<style>
.my-text-area .el-textarea__inner{
min-height: 28px;
height: 28px;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
</style>
... ...
... ... @@ -655,7 +655,7 @@ Handling Information
</span>
</el-col>
<el-col :span="7">
<el-input :disabled="form.cvd.cvd_charge_prepaid=='PP'" v-model="form.rtd.rtd_charge_weight" auto-complete="off" placeholder="计费重量" size="mini"></el-input>
<el-input :disabled="form.cvd.cvd_charge_prepaid=='PP'" v-model="form.ppd.ppd_weight_amount" auto-complete="off" placeholder="计费重量" size="mini"></el-input>
</el-col>
</el-row>
</el-col>
... ... @@ -1847,12 +1847,12 @@ Handling Information
</template>
<script>
import {fhl,fwb,selectawabByid} from '../../api/remote_interface/byont_import';
import {fhl, fwb, selectawabByid, selectByKey, selectList} 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";
import jsutil from "@/common/js/util";
export default {
components: {
... ... @@ -2075,7 +2075,7 @@ Handling Information
hbs_pieces:'',
hbs_serial_number:'',
hbs_weight:'',
hbs_weight_code:'',
hbs_weight_code:'K',
hbs_slac:''
},
txt:{
... ... @@ -2128,7 +2128,8 @@ Handling Information
for (let key in circle) { //把第一个对象的属性都赋值给新对象newObj 然后每个属性的值都设置为空;
newObj[key] = '';
}
this.gridData.splice(this.gridData.length - 1, 0, newObj);
// this.gridData.splice(this.gridData.length - 1, 0, newObj);
this.gridData.push(newObj);
},
//删除行
deleteRows(scope) {
... ... @@ -2136,6 +2137,7 @@ Handling Information
},
//求体积
handleEdit(index, row) {
console.log("index="+index)
if(row.long && row.wide && row.height && row.pic){
row.vol = Number(row.long)*Number(row.wide)*Number(row.height)*Number(row.pic)/1000000
let measurement_info = {
... ... @@ -2145,10 +2147,13 @@ Handling Information
dim_weight:'',
dim_weightcode:'',
};
this.form.rtd.dimensions[index] = measurement_info;
console.log(this.form.rtd.dimensions)
// console.log(this.form.rtd.dimensions);
console.log("DIM数组加入了新的行数据>>"+JSON.stringify(this.form.rtd.dimensions))
}else {
console.error("DIM数组没加数据-ERRRRRR")
}
},
//合计体积
getSummaries(param) {
... ... @@ -2216,9 +2221,9 @@ Handling Information
this.form.shp.shp_adr = row.conAddress;
this.shp_oci.oci_csrc_info=row.conAeo;
this.shp_oci.oci_country_code=row.country;
this.form.oci.push(this.shp_oci);
// this.form.oci.push(this.shp_oci);
this.shp_contact.contact_number=row.conPhone;
this.form.shp.shp_contacts.push(this.shp_contact);
// this.form.shp.shp_contacts.push(this.shp_contact);
this.dialogVisible = false;
}
else if(this.activeName=='second'){
... ... @@ -2230,7 +2235,7 @@ Handling Information
this.addForm.shp.shp_adr_street = row.conAddress;
this.shp_aeo.oci_supplementary=row.conAeo;
this.shp_aeo.oci_country_code=row.country;
this.addForm.oci.push(this.shp_aeo);
// this.addForm.oci.push(this.shp_aeo);
this.dialogVisible = false;
}
else{
... ... @@ -2248,9 +2253,9 @@ Handling Information
this.form.cne.cne_adr = row.conAddress;
this.cne_oci.oci_csrc_info=row.conAeo;
this.cne_oci.oci_country_code=row.country;
this.form.oci.push(this.cne_oci);
// this.form.oci.push(this.cne_oci);
this.cne_contact.contact_number=row.conPhone;
this.form.cne.cne_contacts.push(this.cne_contact);
// this.form.cne.cne_contacts.push(this.cne_contact);
this.dialogVisible1 = false;
}
else if(this.activeName=='second'){
... ... @@ -2262,7 +2267,7 @@ Handling Information
this.addForm.cne.cne_adr_street = row.conAddress;
this.cne_aeo.oci_supplementary=row.conAeo;
this.cne_aeo.oci_country_code=row.country;
this.addForm.oci.push(this.cne_aeo);
// this.addForm.oci.push(this.cne_aeo);
this.dialogVisible1 = false;
}
else{
... ... @@ -2271,6 +2276,8 @@ Handling Information
},
//新增分运单
addFhl() {
this.addForm.oci.push(this.shp_aeo);
this.addForm.oci.push(this.cne_aeo);
/*进行表单的预验证*/
this.$refs.apply_addFormRef.validate(valid => {
// 未通过,表单预校验
... ... @@ -2351,7 +2358,17 @@ Handling Information
this.form.rtd.rtd_number_pieces=this.form.bill.quantity_picecs;
this.form.rtd.rtd_volume=this.form.bill.quantity_volume;
this.form.ppd.ppd_weight_amount=this.form.ppd.ppd_charge_summary_total;
this.form.acc=[];
this.form.oci=[];
this.form.shp.shp_contacts=[];
this.form.cne.cne_contacts=[];
this.shp_oci.oci_country_code=this.form.shp.shp_country;
this.cne_oci.oci_country_code=this.form.cne.cne_country;
this.form.acc.push(this.acc_info);
this.form.oci.push(this.shp_oci);
this.form.shp.shp_contacts.push(this.shp_contact);
this.form.oci.push(this.cne_oci);
this.form.cne.cne_contacts.push(this.cne_contact);
/*进行表单的预验证*/
this.$refs.apply_formRef.validate(valid => {
// 未通过,表单预校验
... ... @@ -2363,6 +2380,138 @@ Handling Information
return this.$message.error('新增主运单,失败');
}
this.$message.success('新增主运单,成功');
this.form = {
acc:[],
agt:{
agt_ADR:'',
agt_IATA_number:'',
agt_account_number:'',
agt_name:'',
agt_participant_id:'',
},
bill:{
destination:'',
origin:'',
quantity_density:'',
quantity_picecs:'',
//体积
quantity_volume:'',
quantity_volume_code:'MC',
quantity_weight:'',
quantity_weight_code:'K',
waybillNum:'',
},
cne:{
cne_contacts:[],
cne_account_number:'',
cne_adr:'',
cne_country:'',
cne_loc_place:'',
cne_loc_province:'',
cne_name:'',
cne_postcode:'',
},
cvd:{
cvd_amount_of_insurance:'XXX',
cvd_charge_code:'',
cvd_charge_prepaid:'PP',
cvd_currency_code:'',
cvd_value_for_carriage:'NVD',
cvd_value_for_customs:'NCV',
},
flt:{
cariier:'',
day:'',
flightNumber:'',
},
isu:{
isu_day_mounth_year:'',
isu_place_or_airport_code:'',
isu_signature:'',
},
nfy:{
nfy_contacts:[],
nfy_ADR:'',
nfy_LOC_city:'',
nfy_LOC_province:'',
nfy_country:'',
nfy_name:'',
nfy_postcode:''
},
oci:[
// {
// oci_country_code:'',
// oci_csrc_id:'',
// oci_csrc_info:'',
// oci_information_id:''
// }
],
osi:[{
osi_text:[],
}],
oth:{
oth_amount:'',
oth_charge_code:'',
oth_charges:'',
oth_entitlement_code:''
},
ppd:{
ppd_charge_summary_total:'',
ppd_other_charges_due_agent:'',
ppd_other_charges_due_carrier:'',
ppd_taxes_amount:'',
ppd_valuation_amount:'',
ppd_weight_amount:'',
},
ref:{
ref_address:'CGOFDEE',
ref_file_reference:'',
ref_participant_airport:'',
ref_participant_code:'',
ref_participant_id:'',
},
rtd:
{
dimensions:[],
rtd_charge_weight:'',
rtd_combination_point:'',
rtd_commodity_NUM:'',
rtd_goods_DES:'',
rtd_goods_consol_DES:'',
rtd_gross_weight:'',
rtd_number_pieces:'',
rtd_rate_charge:'',
rtd_rate_class:'Q',
rtd_total:'',
//体积
rtd_volume:'',
rtd_volume_code:'MC',
}
,
rtg:{
destinationAirport:'',
destinationCarrier:'',
onwardAirport:'',
onwardCarrier:'',
},
shp:{
shp_contacts:[],
shp_account_number:'',
shp_adr:'',
shp_country:'',
shp_loc_place:'',
shp_loc_province:'',
shp_name:'',
shp_postcode:'',
},
ssr:{
ssr_request_content:[],
},
cer:{
cer_signature:''
}
};
}).catch(error => {
this.$message.error(error.toString());
});
... ... @@ -2372,8 +2521,6 @@ 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;
... ... @@ -2387,7 +2534,73 @@ Handling Information
alert(error);
});
},
getAWBA(){
const _this = this
selectByKey({id:this.$route.query.id}).then((response) => {
const res = response.data
// console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.form = res.data
for (const i of res.data.shp.shp_contacts) {
_this.shp_contact=i
}
for (const i of res.data.cne.cne_contacts) {
_this.cne_contact=i
}
for (const i of res.data.oci) {
if(i.oci_information_id=="SHP"){
_this.shp_oci=i;
}else{
_this.cne_oci=i;
}
}
for (const i of res.data.acc) {
_this.acc_info=i
}
_this.$message.success(res.msg)
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
getAWBH(){
const _this = this
selectByKey({id:this.$route.query.id}).then((response) => {
const res = response.data
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.addForm = res.data
for (const i of res.data.oci) {
if(i.oci_information_id=="SHP"){
_this.shp_aeo=i;
}else{
_this.cne_aeo=i;
}
}
_this.$message.success(res.msg)
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
// console.log("获取分单的方法执行了")
}
},
activated(){
if(jsutil.checkNull(this.$route.query.id)){
if(this.$route.query.id.indexOf("AWBA")==0){
this.activeName='first';
this.getAWBA();
}else{
this.activeName='second';
this.getAWBH();
}
}
}
}
</script>
... ...