作者 朱兆平

Merge branch 'master' of 118.31.66.166:zp260/vue_cli

... ... @@ -6313,7 +6313,7 @@
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm": {
... ...
import http from './http.js'
let baseUrl = 'nmms-server-import/nmms/rep'
export const addResponse=params=>{return http.post(`${baseUrl}/InsertResponse`, params);};
\ No newline at end of file
... ...
... ... @@ -6,4 +6,6 @@ export const getMt1201List=params=>{return http.get(`${baseUrl}/getMt1201List`,
export const getFenList=params=>{return http.get(`${baseUrl}/getFenList`, params);};
export const addMt1201=params=>{return http.post(`${baseUrl}/addMt1201`, params);};
export const ediMt1201=params=>{return http.put(`${baseUrl}/ediMt1201`, params);};
export const selectAirport=params=>{return http.get(`${baseUrl}/selectList`, params);};
export const getCountryCode=params=>{return http.get(`${baseUrl}/getCountryCode`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl}/selectCustomcode`, params);};
\ No newline at end of file
... ...
... ... @@ -26,12 +26,34 @@
</el-col>
<el-col :span="5">
<el-form-item label="始发站" prop="originstation">
<el-input placeholder="" v-model="ruleForm.originstation"></el-input>
<el-select v-model="ruleForm.originstation" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportid }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="目的站" prop="destinationstation">
<el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input>
<el-select v-model="ruleForm.destinationstation" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in options2"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportid }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -56,6 +78,7 @@
</style>
<script>
import { selectAirport } from '../../api/mt1201'
export default {
data() {
return {
... ... @@ -64,8 +87,11 @@
flightno:'',
flightdate:'',
originstation:'',
destinationstation:'CGO'
destinationstation:''
},
options: [],
options2:[],
airportid:'',
/*表单校验规则*/
rules: {
flightno: [
... ... @@ -87,6 +113,13 @@
};
},
methods:{
getFlightList:function() {
let params={};
selectAirport(params).then(res=>{
this.options=res.data.data;
this.options2=res.data.data;
});
},
/*按钮点击请求方法*/
submitForm(formName) {
this.$refs[formName].validate((valid) => {
... ... @@ -110,12 +143,14 @@
this.ruleForm.flightno=this.$route.params.row.flightno;
this.ruleForm.flightdate=this.$route.params.row.flightdate;
this.ruleForm.originstation=this.$route.params.row.originstation;
this.ruleForm.destinationstation=this.$route.params.row.destinationstation;
}
}
},
/*渲染方法*/
mounted(){
this.getDefaultData();
this.getFlightList();
}
};
</script>
... ...
... ... @@ -25,13 +25,41 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="始发站" prop="originstation">
<!--<el-form-item label="始发站" prop="originstation">
<el-input placeholder="" v-model="ruleForm.originstation"></el-input>
</el-form-item>-->
<el-form-item label="始发站" prop="originstation">
<el-select v-model="ruleForm.originstation" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportid }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="目的站" prop="destinationstation">
<!--<el-form-item label="目的站" prop="destinationstation">
<el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input>
</el-form-item>-->
<el-form-item label="目的站" prop="destinationstation">
<el-select v-model="ruleForm.destinationstation" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.airportid"
:label="item.airportid"
:value="item.airportid">
<span style="float: left">{{ item.airportid }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -56,6 +84,7 @@
</style>
<script>
import { selectAirport } from '../../api/mt1201'
export default {
data() {
return {
... ... @@ -64,8 +93,10 @@
flightno: '',
flightdate:'',
originstation:'',
destinationstation:'CGO'
destinationstation:''
},
options: [],
airportid:'',
/*表单验证方法*/
rules: {
flightno: [
... ... @@ -87,6 +118,12 @@
};
},
methods:{
getFlightList:function() {
let params={};
selectAirport(params).then(res=>{
this.options=res.data.data;
});
},
/*按钮点击请求方法*/
submitForm(formName) {
this.$refs[formName].validate((valid) => {
... ... @@ -110,12 +147,14 @@
this.ruleForm.flightno=this.$route.params.row.flightno;
this.ruleForm.flightdate=this.$route.params.row.flightdate;
this.ruleForm.originstation=this.$route.params.row.originstation;
this.ruleForm.destinationstation=this.$route.params.row.destinationstation;
}
}
},
/*渲染方法*/
mounted(){
this.getDefaultData();
this.getFlightList();
}
};
... ...
... ... @@ -4,7 +4,7 @@
<!--检索条件-->
<el-row>
<el-col :span="4">
<div class="grid-content bg-purple">
<div>
<el-input v-model="carrier" placeholder="">
<template slot="prepend">航班号</template>
</el-input>
... ...
... ... @@ -116,7 +116,6 @@
label="回执信息"
width="180">
</el-table-column>
</el-table-column>
<el-table-column
prop="operation"
label="操作"
... ... @@ -362,9 +361,17 @@
</el-col>
<el-col :span="6">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="ruleForm.customcode" placeholder="" style="display:inline">
<el-option v-for="(item,index) in customcodes" :key="index" :label="item.label"
:value="item.value"></el-option>
<el-select v-model="ruleForm.customcode" filterable
allow-create
default-first-option filterable placeholder="请选择" style="display:inline">
<el-option
v-for="item in customcodes"
: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>
</el-col>
... ... @@ -390,11 +397,25 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<!--<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select v-model="ruleForm.awbinfo.shprcountyr" placeholder="" style="display:inline">
<el-option v-for="item in shprcountyrs" :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select v-model="ruleForm.awbinfo.shprcountyr" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in shprcountyrs"
:key="item.countryCode"
:label="item.countryCode"
:value="item.countryCode">
<span style="float: left">{{ item.countryNameCn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.countryCode }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
... ... @@ -421,10 +442,19 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国家代码" prop="awbinfo.cnscountyr">
<el-select v-model="ruleForm.awbinfo.cnscountyr" placeholder="" style="display:inline">
<el-option v-for="item in cnscountyrs" :key="item" :label="item"
:value="item"></el-option>
<el-select v-model="ruleForm.awbinfo.cnscountyr" filterable
allow-create
default-first-option filterable placeholder="请选择">
<el-option
v-for="item in cnscountyrs"
:key="item.countryCode"
:label="item.countryCode"
:value="item.countryCode">
<span style="float: left">{{ item.countryNameCn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.countryCode }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -522,13 +552,13 @@
</div>
</el-col>
<el-col :span="2.5" class="pub">
<div class="grid-content"><span>主单数:999</span></div>
<div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div>
</el-col>
<el-col :span="3.5" class="pub">
<div class="grid-content"><span>舱单总件数:999999</span></div>
<div class="grid-content"><span>舱单总件数:{{sumNmmsPrice}}</span></div>
</el-col>
<el-col :span="4" class="pub">
<div class="grid-content"><span>舱单总重量:999999</span></div>
<div class="grid-content"><span>舱单总重量:{{sumNmmsWeight}}</span></div>
</el-col>
</el-row>
<!--对话提示框-->
... ... @@ -545,6 +575,26 @@
</span>
</el-dialog>
</el-row>
<!--发送删除报修改报提示框-->
<el-row>
<el-dialog title="提交修改信息" :visible.sync="dialogFormVisible">
<el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
<el-form-item label="操作原因" prop="operreason">
<el-input type="textarea" v-model="Udform.operreason"></el-input>
</el-form-item>
<el-form-item label="操作人" prop="operperson">
<el-input v-model="Udform.operperson"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="opertel">
<el-input v-model="Udform.opertel"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="submitUdForm('Udform')">确 定</el-button>
</div>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -601,7 +651,9 @@
</style>
<script>
import { getMt1201List,addMt1201,ediMt1201,getFenList } from '../../api/mt1201'
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode } from '../../api/mt1201'
import{addResponse} from "../../api/InResponse";
export default {
data() {
/*初始数据*/
... ... @@ -712,23 +764,8 @@
value: '008',
label: '惰性物料'
}],
customcodes:[
{
value: '-1',
label: '请选择'
},
{
value: '4604',
label: '4604'
},
{
value: '4620',
label: '4620'
},
{
value: '4613',
label: '4613'
}],
customcodes:[],
customcode:'',
rules: {
waybill: [{required: true, message: '请输入运单号', trigger: 'blur'}],
flightno: [{required: true, message: '航班号必须输入', trigger: 'blur'}],
... ... @@ -757,12 +794,38 @@
},
labelPosition: 'left',
splitcodes: [{value:'T',label:'否'},{value:'P',label:'是'}],
shprcountyrs:['US','CN'],
cnscountyrs:['US','CN'],
shprcountyrs:[],
cnscountyrs:[],
countryCode:'',
msg:'',
code:'',
centerDialogVisible:false,
FenStatus:''
FenStatus:'',
sumNmmsCount:0,
sumNmmsPrice:0,
sumNmmsWeight:0,
dialogFormVisible: false,
formLabelWidth: '100px',
Udform:{
operreason:'',
operperson:'',
opertel:'',
flightdate:'',
flightno:'',
carrier:'',
awbano:'',
awbhno:'',
bustype:'',
busdate:'',
busweight:'',
buspiece:'',
opertype:'',
},
udrules:{
operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
},
}
},
methods: {
... ... @@ -783,6 +846,8 @@
this.FenQuery.originstation=this.defaultQuery.originstation;
this.FenQuery.destinationstation=row.destinationstation;
this.getFenList(this.FenQuery);
this.getCountryCode();
this.selectCustomcode();
},
/*编辑分单信息*/
handleFen(index,row){
... ... @@ -796,6 +861,48 @@
},
//发送舱单报
handleSend(index,row){},
/*发送舱单修改报*/
handleUpdate(index,row){
this.dialogFormVisible=true;
//console.log(row);
this.Udform.awbano=row.awba;
this.Udform.awbhno=row.awbh;
this.Udform.carrier=row.carrier;
this.Udform.flightno=row.flightno.substring(2);
this.Udform.flightdate=row.flightdate;
this.Udform.bustype='MT1201';
this.Udform.busdate=Date.parse(new Date());
this.Udform.busweight=row.weight;
this.Udform.buspiece=row.piece;
this.Udform.opertype='发送舱单修改报';
},
//提交发送舱单修改报表单
submitUdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.Udform)
addResponse(this.Udform).then(res=>{
let response=res.data;
this.code=response.code;
if(this.code=='200'){
this.outerVisible = false;
this.$refs[formName].resetFields();
this.centerDialogVisible=true;
this.msg=response.msg;
this.dialogFormVisible=false;
}else{
this.outerVisible = false;
this.centerDialogVisible=true;
this.$refs[formName].resetFields();
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
/*编辑分单列表信息*/
handleClick(row) {
this.outerVisible = true;
... ... @@ -817,8 +924,34 @@
getList(){
getMt1201List(this.defaultQuery).then(res =>{
//console.log(res);
this.sumNmmsCount=0;
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
let response=res.data.data;
this.tableData=response;
response.forEach((item,i) => {
if(item.awba!=null&&item.awbh=="");
this.sumNmmsCount=Number(this.sumNmmsCount)+1;
this.sumNmmsPrice=Number(this.sumNmmsPrice)+Number(item.piece);
this.sumNmmsWeight=Number(this.sumNmmsWeight)+Number(item.weight);
})
});
},
/*获取国家代码*/
getCountryCode(){
let params={};
getCountryCode(params).then(res =>{
//console.log(res);
this.shprcountyrs=res.data.data;
this.cnscountyrs=res.data.data;
});
},
//获取关区代码
selectCustomcode(){
let params={};
selectCustomcode(params).then(res =>{
//console.log(res);
this.customcodes=res.data.data;
});
},
//新增原始舱单按钮
... ...
... ... @@ -311,9 +311,9 @@
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini">批量发送删除报</el-button></div></el-col>
<el-col :span="2"><div class="grid-content"><el-button type="primary" size="mini">返回</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><span>主单数:999</span></div></el-col>
<el-col :span="3.5"><div class="grid-content"><span>理货总件数:999999</span></div></el-col>
<el-col :span="4"><div class="grid-content"><span>理货总重量:999999</span></div></el-col>
<el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col>
<el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col>
<el-col :span="4"><div class="grid-content"><span>理货总重量:{{sumNmmsWeight}}</span></div></el-col>
</el-row>
<!--对话提示框-->
<el-row>
... ... @@ -440,6 +440,9 @@
},
centerDialogVisible:false,
msg:'',
sumNmmsCount:0,
sumNmmsPrice:0,
sumNmmsWeight:0,
}
},
methods: {
... ... @@ -478,9 +481,17 @@
//获取进港理货列表
getMt5201List(){
getMt5201List(this.defaultQuery).then(res =>{
console.log(res);
this.sumNmmsCount=0;
this.sumNmmsPrice=0;
this.sumNmmsWeight=0;
let response=res.data.data;
this.tableData=response;
response.forEach((item,i) => {
if(item.awba!=null&&item.awbh=="");
this.sumNmmsCount=Number(this.sumNmmsCount)+1;
this.sumNmmsPrice=Number(this.sumNmmsPrice)+Number(item.piece);
this.sumNmmsWeight=Number(this.sumNmmsWeight)+Number(item.weight);
})
});
},
//新增理货按钮事件
... ...