...
|
...
|
@@ -54,7 +54,9 @@ |
|
|
v-loading="businesstypeListLoading"
|
|
|
style="width: 100%">
|
|
|
<el-table-column fixed prop="date" label="操作">
|
|
|
<el-button @click="handleClick(scope.row)" type="primary" size="small">查看</el-button>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="selectOne(scope.$index, scope.row)" type="primary" size="small">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="isvalid" :formatter="isvalidFormatter" label="是否失效">
|
|
|
</el-table-column>
|
...
|
...
|
@@ -62,9 +64,9 @@ |
|
|
</el-table-column>
|
|
|
<el-table-column prop="agentname" label="挂靠单位">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="endport" label="目的关区">
|
|
|
<el-table-column prop="endstation" :formatter="endstationName" label="目的场站" width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="aisle" label="卡口" width="100">
|
|
|
<el-table-column prop="aisle" :formatter="aisleName" label="卡口" width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="aislewt" label="地磅称重">
|
|
|
</el-table-column>
|
...
|
...
|
@@ -88,10 +90,10 @@ |
|
|
</el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="success" size="mini">修改</el-button>
|
|
|
<el-button type="danger" size="mini">删除</el-button>
|
|
|
<el-button type="success" @click="opneEdit(scope.$index, scope.row)" size="mini">修改</el-button>
|
|
|
<el-button type="danger" @click="deleteClick(scope.$index, scope.row)" size="mini">删除</el-button>
|
|
|
<el-button type="warning" size="mini" style="margin-top: 2px;margin-left: 0px">审核</el-button>
|
|
|
<el-button type="info" size="mini">异常</el-button>
|
|
|
<el-button type="info" @click="barCodeDelete(scope.$index, scope.row)" size="mini">异常</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
...
|
...
|
@@ -108,12 +110,269 @@ |
|
|
:total="this.total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
<!-- 编辑表单信息-->
|
|
|
<el-dialog title="编辑" :visible.sync="editFormVisible" width="80%" height="80%" :close-on-click-modal="false">
|
|
|
<!-- 工具条-->
|
|
|
<el-row class="toolbar" style="padding-bottom: 0px;">
|
|
|
<el-form :inline="true" ref="filtersForm" :model="filtersForm" :rules="rules" >
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="主单号:" prop="waybill">
|
|
|
<el-input v-model="filtersForm.waybill" placeholder="" size="small" style="width: 240px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="getWaybillList()" size="small" style="margin-left: 40px">查询</el-button>
|
|
|
<span style="color: red;margin-left: 10px">查询单号前请先选定业务类型</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
|
<!-- 列表-->
|
|
|
<el-row>
|
|
|
<el-table :data="awbaList" v-loading="commonLoading" style="width: 100%">
|
|
|
<el-table-column fixed label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button @click="addWaybill(scope.$index, scope.row)" type="primary" size="small">添加</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="flightno" label="航班号">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.flightno.length > 4" >{{scope.row.flightno}}</span>
|
|
|
<span v-else>{{scope.row.carrier}}{{scope.row.flightno}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="flightDate" label="航班日期">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.flightDate !=null">{{scope.row.flightDate | formatDate}}</span>
|
|
|
<span v-else>{{scope.row.flightdate | formatDate}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="segment" label="航段">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.segment != null" >{{scope.row.segment}}</span>
|
|
|
<span v-else>{{scope.row.originatingstation}}-{{scope.row.destinationstation}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="waybillnomaster" label="主单号">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="totalpiece" label="件数">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="totalweight" label="重量">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="customscode" label="关区">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="createdate" :formatter="formatDate" label="时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="receiptinformation" label="回执内容" width="280px">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-row>
|
|
|
<el-form ref="editForm" :model="editForm">
|
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
|
<el-row>
|
|
|
<el-form-item label="输入备注:">
|
|
|
<el-input
|
|
|
type="text"
|
|
|
v-model="editForm.remark3"
|
|
|
maxlength="10"
|
|
|
show-word-limit
|
|
|
size="small" style="width: 180px">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="车牌号码:" prop="trailerFrameNo">
|
|
|
<el-input v-model="editForm.trailerFrameNo" disabled placeholder="请输入车牌号" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="货物类型:" prop="cocode">
|
|
|
<el-select v-model="editForm.cocode" placeholder="请选择" size="small" style="width: 180px">
|
|
|
<el-option label="转关货" value="转关货"></el-option>
|
|
|
<el-option label="换单货" value="换单货"></el-option>
|
|
|
<el-option label="普通货" value="普通货"></el-option>
|
|
|
<el-option label="退库货" value="退库货"></el-option>
|
|
|
<el-option label="查验货" value="查验货"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="场站选择:" prop="endstation">
|
|
|
<el-select v-model="editForm.endstation" disabled placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.stationId"
|
|
|
:label="item.name"
|
|
|
:value="item.stationId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="运输公司:">
|
|
|
<el-input v-model="editForm.agentno" placeholder="" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="挂靠单位:">
|
|
|
<el-input v-model="editForm.agentname" placeholder="" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
|
<el-row>
|
|
|
<el-form-item label="业务类型:" prop="businesstype">
|
|
|
<el-select v-model="editForm.businesstype" clearable placeholder="请选择" size="small" style="width: 180px">
|
|
|
<el-option label="进口提货" value="进口提货"></el-option>
|
|
|
<el-option label="出口送货" value="出口送货"></el-option>
|
|
|
<el-option label="分拨业务" value="分拨业务"></el-option>
|
|
|
<el-option label="调拨业务" value="调拨业务"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="申请单位:">
|
|
|
<el-input v-model="editForm.veProperty" disabled size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="备案单位:">
|
|
|
<el-input v-model="editForm.trailerLicenseNo" disabled size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="主单列表:">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:rows="4"
|
|
|
placeholder="请输入主单号,例如17212341234,多个单号以‘,’(英文)分割"
|
|
|
v-model="editForm.masterList"
|
|
|
style="width: 180px">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-left: 320px">
|
|
|
<el-button type="primary" @click="editSubmit()" >保存</el-button>
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
<!-- 查看表单信息-->
|
|
|
<el-dialog title="查看" :visible.sync="selectOneVisible" width="80%" height="80%" :close-on-click-modal="false">
|
|
|
<el-form ref="editForm" :model="editForm">
|
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
|
<el-row>
|
|
|
<el-form-item label="输入备注:">
|
|
|
<el-input
|
|
|
type="text"
|
|
|
v-model="editForm.remark3"
|
|
|
maxlength="10"
|
|
|
show-word-limit
|
|
|
size="small" style="width: 180px">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="车牌号码:" prop="trailerFrameNo">
|
|
|
<el-input v-model="editForm.trailerFrameNo" disabled placeholder="请输入车牌号" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="货物类型:" prop="cocode">
|
|
|
<el-select v-model="editForm.cocode" placeholder="请选择" size="small" style="width: 180px">
|
|
|
<el-option label="转关货" value="转关货"></el-option>
|
|
|
<el-option label="换单货" value="换单货"></el-option>
|
|
|
<el-option label="普通货" value="普通货"></el-option>
|
|
|
<el-option label="退库货" value="退库货"></el-option>
|
|
|
<el-option label="查验货" value="查验货"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="场站选择:" prop="endstation">
|
|
|
<el-select v-model="editForm.endstation" disabled placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in options"
|
|
|
:key="item.stationId"
|
|
|
:label="item.name"
|
|
|
:value="item.stationId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="运输公司:">
|
|
|
<el-input v-model="editForm.agentno" placeholder="" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="挂靠单位:">
|
|
|
<el-input v-model="editForm.agentname" placeholder="" size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
|
<el-row>
|
|
|
<el-form-item label="业务类型:" prop="businesstype">
|
|
|
<el-select v-model="editForm.businesstype" clearable placeholder="请选择" size="small" style="width: 180px">
|
|
|
<el-option label="进口提货" value="进口提货"></el-option>
|
|
|
<el-option label="出口送货" value="出口送货"></el-option>
|
|
|
<el-option label="分拨业务" value="分拨业务"></el-option>
|
|
|
<el-option label="调拨业务" value="调拨业务"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="申请单位:">
|
|
|
<el-input v-model="editForm.veProperty" disabled size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="备案单位:">
|
|
|
<el-input v-model="editForm.trailerLicenseNo" disabled size="small" style="width: 180px"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form-item label="主单列表:">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
:rows="4"
|
|
|
placeholder="请输入主单号,例如17212341234,多个单号以‘,’(英文)分割"
|
|
|
v-model="editForm.masterList"
|
|
|
style="width: 180px">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {list, aisleList} from '../../api/remote_interface/byont_import';
|
|
|
import {list, aisleList, barCodeDel, remove, edit} from '../../api/remote_interface/byont_import';
|
|
|
import {getYardList as yartList} from "../../api/station_dispatch";
|
|
|
export default {
|
|
|
filters: {
|
|
|
formatDate(value) {
|
|
|
if(value == null) {
|
|
|
return null
|
|
|
}
|
|
|
let dt = new Date(value)
|
|
|
return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate();
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
businesstypeList: [],
|
...
|
...
|
@@ -121,15 +380,54 @@ |
|
|
limitSize: 10,
|
|
|
total: 1,
|
|
|
options: [],
|
|
|
awbaList:[],
|
|
|
aisleOptions: [],
|
|
|
filtersForm: {
|
|
|
waybill: ''
|
|
|
},
|
|
|
disabled: true,
|
|
|
commonLoading: false,
|
|
|
editFormVisible: false,
|
|
|
selectOneVisible: false,
|
|
|
filters: {
|
|
|
trailerFrameNo: '',
|
|
|
agentname: '',
|
|
|
endstation: '',
|
|
|
aisle: '',
|
|
|
},
|
|
|
businesstypeListLoading: false
|
|
|
businesstypeListLoading: false,
|
|
|
editForm: {
|
|
|
// 备注
|
|
|
remark3: '',
|
|
|
// 业务类型
|
|
|
businesstype: '',
|
|
|
// 车牌号
|
|
|
trailerFrameNo: '',
|
|
|
//备案单位
|
|
|
trailerLicenseNo: '',
|
|
|
// 主单列表
|
|
|
masterList: '',
|
|
|
// 场站编号
|
|
|
endstation: '',
|
|
|
endstationList: '',
|
|
|
stationId: '',
|
|
|
// 运输公司
|
|
|
agentno: '',
|
|
|
// 挂靠单位
|
|
|
agentname: '',
|
|
|
//申请单位
|
|
|
veProperty: '',
|
|
|
// 货物类型
|
|
|
cocode:'',
|
|
|
// 货物重量
|
|
|
remark: ''
|
|
|
},
|
|
|
weightFloat: 0,
|
|
|
rules:{
|
|
|
waybill: [
|
|
|
{ required: true, message: '请输入运单号', trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
...
|
...
|
@@ -141,6 +439,52 @@ |
|
|
return "失效"
|
|
|
}
|
|
|
},
|
|
|
|
|
|
aisleName: function(row, cloumn){
|
|
|
if (row.aisle=="4600010005"){
|
|
|
return "5号卡口-出"
|
|
|
}else if (row.aisle=="4600011005"){
|
|
|
return "5号卡口-进"
|
|
|
}else if (row.aisle=="4604333311"){
|
|
|
return "1号卡口-进"
|
|
|
}else if (row.aisle=="4604333312"){
|
|
|
return "1号卡口-出"
|
|
|
}else if (row.aisle=="4604444412"){
|
|
|
return "1号卡口-出"
|
|
|
}else if (row.aisle=="4600011006"){
|
|
|
return "6号卡口-进"
|
|
|
}else if (row.aisle=="4604110112"){
|
|
|
return "1号卡口-出"
|
|
|
}else if (row.aisle=="4612031001"){
|
|
|
return "内三卡口-进"
|
|
|
}else if (row.aisle=="4600010006"){
|
|
|
return "6号卡口-出"
|
|
|
}else if (row.aisle=="4604111111"){
|
|
|
return "1号卡口-进"
|
|
|
}else if (row.aisle=="4612030001"){
|
|
|
return "内三卡口-出"
|
|
|
}else if (row.aisle=="4604444411"){
|
|
|
return "1号卡口-进"
|
|
|
}else if (row.aisle=="4604333321"){
|
|
|
return "2号卡口-进"
|
|
|
}else if (row.aisle=="4604333322"){
|
|
|
return "2号卡口-出"
|
|
|
}
|
|
|
|
|
|
},
|
|
|
endstationName: function(row, cloumn){
|
|
|
if (row.endstation == "4604511001"){
|
|
|
return "快邮货站"
|
|
|
}else if (row.endstation == "4600329012"){
|
|
|
return "综保区货站"
|
|
|
}else if (row.endstation == "4604000000"){
|
|
|
return "西货站"
|
|
|
}else if (row.endstation == "4604000006"){
|
|
|
return "冷链货站"
|
|
|
}else if (row.endstation == "4604499001"){
|
|
|
return "三号货站"
|
|
|
}
|
|
|
},
|
|
|
turnoverflagFormatter: function(row, column){
|
|
|
if (row.turnoverflag == 'I'){
|
|
|
return "进场站"
|
...
|
...
|
@@ -156,10 +500,13 @@ |
|
|
trailerFrameNo: this.filters.trailerFrameNo,
|
|
|
agentname: this.filters.agentname,
|
|
|
endstation: this.filters.endstation,
|
|
|
aisle: this.filters.aisle
|
|
|
aisle: this.filters.aisle,
|
|
|
userId: this.userid = JSON.parse(sessionStorage.getItem('user')).id
|
|
|
};
|
|
|
if(JSON.parse(sessionStorage.getItem('user')).roles[0].roleName == "ROLE_admin"){
|
|
|
para.userId = '';
|
|
|
}
|
|
|
this.businesstypeListLoading = true;
|
|
|
console.log(para);
|
|
|
list(para).then((res) => {
|
|
|
this.total = res.data.data.total;
|
|
|
this.businesstypeList = res.data.data.list;
|
...
|
...
|
@@ -177,7 +524,6 @@ |
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取场站
|
|
|
getYardList(){
|
|
|
yartList().then((res) =>{
|
...
|
...
|
@@ -213,9 +559,109 @@ |
|
|
|
|
|
});
|
|
|
},
|
|
|
onSubmit() {
|
|
|
console.log('submit!');
|
|
|
// 二维码异常处理
|
|
|
barCodeDelete(index, row) {
|
|
|
this.$confirm('确认处理吗?', '提示', {}).then(() => {
|
|
|
let para = {
|
|
|
trailerFrameNo: row.trailerFrameNo,
|
|
|
barCode: row.barcode
|
|
|
}
|
|
|
barCodeDel(para).then((res) =>{
|
|
|
this.$message({
|
|
|
message: res.data.msg,
|
|
|
type: 'success'
|
|
|
|
|
|
});
|
|
|
this.getList();
|
|
|
}).catch((error)=>{
|
|
|
this.$message({
|
|
|
message: error,
|
|
|
type: 'error'
|
|
|
|
|
|
});
|
|
|
});
|
|
|
}).catch(() =>{
|
|
|
|
|
|
});
|
|
|
},
|
|
|
// 删除
|
|
|
deleteClick(index, row){
|
|
|
this.$confirm('确认删除吗?', '提示', {}).then(() => {
|
|
|
let para = {
|
|
|
id: row.id,
|
|
|
}
|
|
|
remove(para).then((res) =>{
|
|
|
this.$message({
|
|
|
message: res.data.msg,
|
|
|
type: 'success'
|
|
|
|
|
|
});
|
|
|
this.getList();
|
|
|
}).catch((error)=>{
|
|
|
this.$message({
|
|
|
message: error,
|
|
|
type: 'error'
|
|
|
|
|
|
});
|
|
|
});
|
|
|
}).catch(() =>{
|
|
|
|
|
|
});
|
|
|
},
|
|
|
// 修改
|
|
|
opneEdit(index, row){
|
|
|
this.editFormVisible = true;
|
|
|
|
|
|
if (this.$refs.filtersForm !== undefined) {
|
|
|
this.$refs.filtersForm.resetFields();
|
|
|
}
|
|
|
this.editForm = Object.assign({}, row);
|
|
|
},
|
|
|
// 查看
|
|
|
selectOne(index, row){
|
|
|
this.selectOneVisible = true;
|
|
|
this.editForm = Object.assign({}, row);
|
|
|
},
|
|
|
// 运单列表赋值
|
|
|
addWaybill: function(index, row){
|
|
|
this.editForm.masterList += row.waybillnomaster + ',';
|
|
|
},
|
|
|
// 运单查询
|
|
|
getWaybillList(){
|
|
|
let businesstype = this.editForm.businesstype;
|
|
|
if (businesstype != undefined && businesstype != null && businesstype != ''){
|
|
|
this.$refs.filtersForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.commonLoading = true;
|
|
|
let _this = this;
|
|
|
var url = "http://tjfx.15miaoo.com:8003/orig/orig";
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
// 访问nginx中的代理服务器
|
|
|
xhr.open('get', url+'?waybill='+this.filtersForm.waybill+'&imp='+this.getBusinesstype(), true);
|
|
|
xhr.send();
|
|
|
xhr.onreadystatechange = function(){
|
|
|
if(xhr.readyState == 4){
|
|
|
if(xhr.status ==200){
|
|
|
var data = JSON.parse(xhr.responseText);
|
|
|
_this.awbaList=data;
|
|
|
//console.log(data);
|
|
|
_this.commonLoading = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '请在下列选择业务类型',
|
|
|
type: "error"
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
// 分页
|
|
|
handleSizeChange(val) {
|
|
|
this.limitSize = val;
|
|
|
this.getList();
|
...
|
...
|
@@ -224,11 +670,145 @@ |
|
|
this.pageSize = val;
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
// 日期格式转换
|
|
|
flightDate: function (row, column) {
|
|
|
// 获取单元格数据
|
|
|
let data = row.flightDate
|
|
|
if(data == null) {
|
|
|
return null
|
|
|
}
|
|
|
let dt = new Date(data)
|
|
|
return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate();
|
|
|
},
|
|
|
formatDate: function (row, column) {
|
|
|
// 获取单元格数据
|
|
|
let data = row.createdate;
|
|
|
if(data == null) {
|
|
|
return null
|
|
|
}
|
|
|
let dt = new Date(data)
|
|
|
return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate()+ ' ' + dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds();
|
|
|
},
|
|
|
editweight(){
|
|
|
var _this = this;
|
|
|
// 运单重量累加
|
|
|
let lists = _this.wayBillList();
|
|
|
var split = lists.split(",");
|
|
|
_this.weightFloat = 0;
|
|
|
// 判断进出港 进出港返回字段不一样
|
|
|
if(_this.getBusinesstype() == "I"){
|
|
|
split.forEach((item) =>{
|
|
|
var url = "http://tjfx.15miaoo.com:8003/orig/orig";
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
// 访问nginx中的代理服务器
|
|
|
xhr.open('get', url+'?waybill='+item+'&imp='+_this.getBusinesstype(), true);
|
|
|
xhr.send();
|
|
|
xhr.onreadystatechange = function(){
|
|
|
if(xhr.readyState == 4){
|
|
|
if(xhr.status ==200){
|
|
|
var data = JSON.parse(xhr.responseText);
|
|
|
data.forEach((itmeData => {
|
|
|
if (itmeData != null){
|
|
|
_this.weightFloat += parseFloat(itmeData.manifesttotalweight);
|
|
|
}
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}else {
|
|
|
split.forEach((item) =>{
|
|
|
var url = "http://tjfx.15miaoo.com:8003/orig/orig";
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
// 访问nginx中的代理服务器
|
|
|
xhr.open('get', url+'?waybill='+item+'&imp='+_this.getBusinesstype(), true);
|
|
|
xhr.send();
|
|
|
xhr.onreadystatechange = function(){
|
|
|
if(xhr.readyState == 4){
|
|
|
if(xhr.status ==200){
|
|
|
var data = JSON.parse(xhr.responseText);
|
|
|
data.forEach((itmeData => {
|
|
|
if (itmeData != null){
|
|
|
_this.weightFloat += parseFloat(itmeData.preparetotalweight);
|
|
|
}
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
return _this.weightFloat;
|
|
|
},
|
|
|
editsubmit(){
|
|
|
this.editForm.masterList = this.wayBillList();
|
|
|
this.editForm.remark = this.weightFloat.toString();
|
|
|
let para = Object.assign({}, this.editForm);
|
|
|
edit(para).then((res) => {
|
|
|
if (res.data.code == 200){
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.editFormVisible = false;
|
|
|
this.getList();
|
|
|
}else {
|
|
|
this.$message({
|
|
|
message: '提交失败',
|
|
|
type: 'error'
|
|
|
});
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
},
|
|
|
getBusinesstype:function(){
|
|
|
let businesstype = this.editForm.businesstype;
|
|
|
if (businesstype == '进口提货'){
|
|
|
businesstype = 'I';
|
|
|
}else if (businesstype == '出口送货'){
|
|
|
businesstype = 'E';
|
|
|
}else if (businesstype == '分拨业务'){
|
|
|
businesstype = 'I';
|
|
|
}else if (businesstype == '调拨业务'){
|
|
|
businesstype = 'E';
|
|
|
}
|
|
|
return businesstype;
|
|
|
},
|
|
|
// 添加页面主单列表 结尾逗号处理
|
|
|
wayBillList:function () {
|
|
|
if (this.editForm.masterList.endsWith(",")){
|
|
|
return this.editForm.masterList.substring(0,this.editForm.masterList.length-1);
|
|
|
}else {
|
|
|
return this.editForm.masterList
|
|
|
}
|
|
|
},
|
|
|
// 申请添加
|
|
|
editSubmit (){
|
|
|
let _this = this;
|
|
|
this.$refs.editForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
_this.editsubmit();
|
|
|
}).catch(() =>{
|
|
|
|
|
|
});
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getYardList();
|
|
|
this.getList();
|
|
|
},
|
|
|
watch: {
|
|
|
'editForm.masterList':{
|
|
|
handler: function() {
|
|
|
this.editForm.remark = "";
|
|
|
this.editForm.masterList = this.editForm.masterList.replaceAll(",",",");
|
|
|
this.editweight();
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
...
|
...
|
|