jinhui.wang

version:0.5.7,bug修复,页面缓存,大小写转换,件数重量精确

......@@ -26,6 +26,14 @@ export function findFltById(data) {
})
}
//删除航班
export function delFlight(data) {
return request({
url: '/FlightPreserveController/delFlight/'+ data,
method: 'post'
})
}
//新增修改
export function saveOrUpdate(data) {
return request({
......
......@@ -15,13 +15,18 @@
:lazy="lazy"
:downShiftKey="shiftKey"
:limitStart="limitStart"
:row-key="rowKey"
:default-expand-all="defaultExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
v-loading="loading"
@sort-change="sortChange"
@select="tableSelect"
@select-all="tableSelectAll"
@select-change="SelectChange"
>
<el-table-column
v-for="(item, index) in newHeader"
v-for="(item, index) in headerData"
:column-key="item.value"
:type="item.type"
:prop="item.value"
:label="item.name"
......@@ -32,12 +37,13 @@
:sortable="item.sorTable"
:formatter="formatter"
header-align="center"
:sort-orders="['descending', 'ascending', null]"
:slotHeader="slotHeader"
:key="index"
>
<template v-if="item.slot" slot-scope="">
<!-- <template v-if="item.slot" slot-scope="">
<Item :dom="item.slot" @change="itemChange"></Item>
</template>
</template> -->
</el-table-column>
<slot></slot>
</el-table>
......@@ -64,8 +70,8 @@
<script>
// import infoTable from "./info.vue";
import Item from "./item.vue";
import dictLabels from "../../assets/languages/dictLabels.js"
import { scrollTo } from '@/utils/scroll-to'
import dictLabels from "../../assets/languages/dictLabels.js";
import { scrollTo } from "@/utils/scroll-to";
export default {
name: "Table",
components: {
......@@ -136,9 +142,9 @@ export default {
type: Boolean,
default: true,
},
shiftKey:{
type:Boolean,
default:false,
shiftKey: {
type: Boolean,
default: false,
},
page: {
type: Number,
......@@ -148,9 +154,9 @@ export default {
type: Number,
default: 20,
},
limitStart:{
type:Number,
default:0,
limitStart: {
type: Number,
default: 0,
},
paginationBackground: {
type: Boolean,
......@@ -164,6 +170,14 @@ export default {
type: Number,
default: 0,
},
rowKey: {
type: String,
default: "",
},
defaultExpandAll: {
type: Boolean,
default: false,
},
},
inheritAttrs: false,
data() {
......@@ -171,7 +185,7 @@ export default {
newHeader: [],
selectTable: [],
pageNum: 1,
start:-1,
start: -1,
// {
// type: "selection",
// name: "",
......@@ -187,20 +201,28 @@ export default {
created() {
this.newHeader = this.headerData;
},
mounted() {
},
mounted() {},
methods: {
nextClick() {
this.$emit('currentChange',{page:this.pageNum + 1,start:this.limitStart + this.limitSize})
scrollTo(0,800);
this.$emit("currentChange", {
page: this.pageNum + 1,
start: this.limitStart + this.limitSize,
});
scrollTo(0, 800);
},
prevClick() {
this.$emit('currentChange',{page:this.pageNum - 1,start:this.limitStart - this.limitSiz})
scrollTo(0,800);
this.$emit("currentChange", {
page: this.pageNum - 1,
start: this.limitStart - this.limitSiz,
});
scrollTo(0, 800);
},
currentChange(val) {
this.$emit('currentChange',{page:val,start: val*this.limitSize+1});
scrollTo(0,800);
this.$emit("currentChange", {
page: val,
start: val * this.limitSize + 1,
});
scrollTo(0, 800);
},
tableSelect(selection, row) {
let end = row.index;
......@@ -208,20 +230,17 @@ export default {
const sum = Math.abs(this.start - end);
const min = Math.min(this.start, end);
let i;
if (
this.start === -1 &&
selection.includes(this.data[row.index])
) {
if (this.start === -1 && selection.includes(this.data[row.index])) {
for (i = 0; i < sum; i++) {
this.$refs.tables.toggleRowSelection(this.data[i], true);
this.selectTable.push(this.data[i]);
}
} else if (selection.includes(this.data[row.index])) {
if(!selection.includes(this.data[this.start])){
if (!selection.includes(this.data[this.start])) {
this.$refs.tables.toggleRowSelection(this.data[this.start], true);
this.selectTable.push(this.data[this.start]);
}
for (i = this.start+1; i <= this.start+sum; i++) {
for (i = this.start + 1; i <= this.start + sum; i++) {
this.$refs.tables.toggleRowSelection(this.data[i], true);
this.selectTable.push(this.data[i]);
}
......@@ -244,7 +263,7 @@ export default {
}
}
}
selection = this.selectTable
selection = this.selectTable;
this.$emit("tableSelect", { selection, row });
},
tableSelectAll(selection) {
......@@ -253,13 +272,13 @@ export default {
SelectChange(selection) {
this.$emit("SelectChange", selection);
},
clearTable(){
this.selectTable = []
this.$refs.tables.clearSelection()
},
itemChange(val) {
console.log(val)
clearTable() {
this.selectTable = [];
this.$refs.tables.clearSelection();
},
// itemChange(val) {
// console.log(val);
// },
// checkChange(val) {
// console.log(val);
// },
......@@ -269,10 +288,29 @@ export default {
// bottom(val) {
// console.log(val);
// },
sortChange({ column, prop, order }) {
this.$emit("sortChange",{prop:prop, order:order})
},
compare(propertyName, sort) {
return function (obj1, obj2) {
var value1 = obj1[propertyName];
var value2 = obj2[propertyName];
if (typeof value1 === "string" && typeof value2 === "string") {
const res = value1.localeCompare(value2, "zh");
return sort === "ascending" ? res : -res;
} else {
if (value1 <= value2) {
return sort === "ascending" ? -1 : 1;
} else if (value1 > value2) {
return sort === "ascending" ? 1 : -1;
}
}
};
},
formatter(row, column, cellValue, index) {
if(dictLabels[column.property]){
if(dictLabels[column.property][cellValue]){
return dictLabels[column.property][cellValue];
if (dictLabels[column.property]) {
if (dictLabels[column.property][cellValue]) {
return dictLabels[column.property][cellValue];
}
}
return cellValue;
......
......@@ -67,20 +67,6 @@ export const constantRoutes = [
]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: (resolve) => require(['@/views/systemConfig/userConfig/profile/index'], resolve),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
}
]
},
{
path: '/',
component: Layout,
hidden: true,
......@@ -89,13 +75,13 @@ export const constantRoutes = [
{
path: '/flightAllocConfig/:handle/:id',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'flightAllocConfigInfo',
name: 'FlightAllocConfigInfo',
meta: { title: '航班配舱', icon: 'user', breadcrumb: true }
},
{
path: '/flightAllocConfig/:handle',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'flightAllocConfigAdd',
name: 'FlightAllocConfigInfo',
meta: { title: '添加航班配舱', icon: 'user', breadcrumb: false }
},
]
......
......@@ -42,5 +42,5 @@ module.exports = {
/**
* 版本号
*/
version:'version:0.5.6'
version:'version:0.5.7'
}
......
import axios from 'axios'
import { Message,MessageBox } from 'element-ui'
import { Message, MessageBox } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
import { getToken, setToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
......@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.VUE_APP_BASE_API,
baseURL: `http://47.103.140.98:7001/IMAC2`, //阿里云服务器
// baseURL: 'https://imacuat.zmd.apac.fedex.com/IMAC2', //uat服务器
// baseURL: 'http://192.168.1.133:7001/IMAC2', //测试服务器
baseURL: `http://47.103.140.98:7001/iMAC`, //阿里云服务器
// baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', //uat服务器
// baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器
// 超时
timeout: 30000
......@@ -53,6 +53,9 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
if(res.headers['token']){
setToken(decodeURI(res.headers['token']))
}
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
// 获取错误信息
......
......@@ -6,8 +6,8 @@ const mimeMap = {
zip: 'application/zip'
}
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器
const baseUrl = 'http://47.103.140.98:7001/IMAC2' //阿里云服务器
// const baseUrl = 'http://192.168.1.133:7001/IMAC2' //测试服务器
const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器
// const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器
export function downLoadZip(str, filename) {
var url = baseUrl + str
......
......@@ -3,7 +3,6 @@
<el-form
ref="form"
v-model="formData"
v-show="formShow"
class="form-header"
label-position="right"
label-width="auto"
......@@ -35,6 +34,26 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in selectData.findConditionData
.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select
placeholder="不限"
......@@ -58,7 +77,7 @@
class="formItem"
type="textarea"
placeholder="请输入运单号(回车分割)"
v-model="formData.waybillNo"
v-model.trim="formData.waybillNo"
rows="1"
></el-input>
</el-form-item>
......@@ -208,26 +227,6 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in selectData.findConditionData
.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Handling Code">
<el-empty
......@@ -316,6 +315,7 @@
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
@sortChange="sortChange"
></Tables>
<Dialog
:tableData="tableSelection"
......@@ -334,6 +334,7 @@ import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "@/utils/FedEx";
export default {
name:"CargoAllocation",
components: {
Dialog,
},
......@@ -815,7 +816,6 @@ export default {
shiftKey: false,
createDate: null,
loading: false,
formShow:true,
downLoadingTip: {
tip: "",
downloading: false,
......@@ -868,11 +868,6 @@ export default {
});
},
mounted() {
// this.selectData.HandlingCode.forEach((item,index)=>{
// if(item.id === 108093){
// this.selectData.HandlingCode.unshift(this.HandlingCode.splice(index,1)[0])
// }
// })
window.addEventListener("keydown", (code) => {
if (code.keyCode === 16 && code.shiftKey) {
this.shiftKey = true;
......@@ -885,6 +880,7 @@ export default {
});
},
methods: {
//查询
select() {
this.loading = true;
this.dataInfo();
......@@ -915,6 +911,7 @@ export default {
this.loading = false;
});
},
//总和
cargoTotal() {
this.allWeight = 0;
this.allQty = 0;
......@@ -923,10 +920,11 @@ export default {
this.allWeight = this.allWeight + item.actualWeight;
this.allQty = this.allQty + item.qty;
});
this.allWeight = this.allWeight.toFixed();
this.allWeight = this.allWeight.toFixed(2);
this.allQty = this.allQty.toFixed();
}
},
//数据初始化
dataInfo() {
this.formData.ursaList = null;
this.formData.siteNameList = null;
......@@ -972,6 +970,7 @@ export default {
this.formData.page = this.page;
this.formData.size = this.size;
},
//导出表格
xlsx(val) {
this.downLoadingTip.downloading = true;
this.dataInfo();
......@@ -999,19 +998,27 @@ export default {
});
}
},
//表格选择
tableSelect(val) {
this.tableSelection = val.selection;
this.cargoTotal();
},
//表格全选
tableSelectAll(val) {
this.tableSelection = val;
this.cargoTotal();
},
//分页
currentChange(val) {
this.formData.limitStart = val.start;
this.page = val.page;
this.select();
},
//排序
sortChange(val){
this.tableData.sort(this.$refs.newTables.compare(val.prop,val.order));
},
//添加到航班
addFit() {
let open = true;
this.tableSelection.forEach((item) => {
......@@ -1031,6 +1038,7 @@ export default {
this.$refs.newTables.clearTable();
}
},
//关闭弹框
dialogBeforeClose(val) {
this.dialogVisible = val.close;
if (val.reload) {
......
......@@ -10,7 +10,7 @@
>
<el-form-item label="航班号">
<el-input
v-model.trim="queryParams.purposeOfFlightNo"
v-model.trim="purposeOfFlightNo"
placeholder="航班号"
@keyup.enter.native="getList"
></el-input>
......@@ -36,7 +36,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="$router.push({ name: 'flightAllocConfigAdd', params: { handle: 'add' } })"
@click="$router.push({ name: 'FlightAllocConfigInfo', params: { handle: 'add' } })"
>添加</el-button
>
</div>
......@@ -131,6 +131,7 @@ import {
import { parseTime } from "@/utils/FedEx";
export default {
name:"FlightAllocConfig",
data() {
return {
queryParams: {
......@@ -172,7 +173,7 @@ export default {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.$router.push({
name: "flightAllocConfigInfo",
name: "FlightAllocConfigInfo",
params: { handle: handle, id: flightiId },
});
},
......@@ -225,6 +226,16 @@ export default {
},
created() {
this.getList();
},
computed:{
purposeOfFlightNo: {
get: function () {
return this.queryParams.purposeOfFlightNo;
},
set: function (val) {
this.queryParams.purposeOfFlightNo = val.toUpperCase()
},
},
}
};
</script>
......
......@@ -2,16 +2,31 @@
<div style="margin: 40px" v-loading="loading">
<el-empty description="找不到这条数据!" v-if="isEmpty"></el-empty>
<template v-else>
<el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable" :rules="rules">
<el-form
ref="form"
:model="form"
label-width="200px"
size="small"
:disabled="disable"
:rules="rules"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="航班号" prop="purposeOfFlightNo">
<el-input v-model.trim="form.purposeOfFlightNo" style="width: 60%" :disabled="nameDisabled"></el-input>
<el-input
v-model.trim="form.purposeOfFlightNo"
style="width: 60%"
:disabled="nameDisabled"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班预审" prop="isNeedRequired">
<el-switch v-model="isNeedRequired" :active-value="1" :inactive-value="0">
<el-switch
v-model="isNeedRequired"
:active-value="1"
:inactive-value="0"
>
</el-switch>
</el-form-item>
</el-col>
......@@ -19,80 +34,140 @@
<el-form-item>
<el-row :gutter="20">
<el-col :span="6">
<el-radio v-model="isLocation" label="1" size="mini">站点包含</el-radio>
<el-radio v-model="isLocation" label="2" size="mini">站点不包含</el-radio>
<el-radio v-model="isLocation" label="1" size="mini"
>站点包含</el-radio
>
<el-radio v-model="isLocation" label="2" size="mini"
>站点不包含</el-radio
>
</el-col>
<el-col :span="6">
<el-alert title="提示:站点之间用回车符分隔" type="warning" show-icon size="mini" :closable="false"
style="height: 30px; width: fit-content">
<el-alert
title="提示:站点之间用回车符分隔"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="站点包含" v-show="isLocation == 1">
<el-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px"></el-input>
<el-input
type="textarea"
v-model="form.location"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item label="站点不包含" v-show="isLocation == 2">
<el-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px"></el-input>
<el-input
type="textarea"
v-model="form.notLocation"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item>
<el-alert title="提示:URSA之间用分号分隔,例:F2;F3;P_" type="warning" show-icon size="mini" :closable="false"
style="height: 30px; width: fit-content">
<el-alert
title="提示:URSA之间用分号分隔,例:F2;F3;P_"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="URSA包含">
<el-input type="textarea" v-model.trim="form.includeUrsa" :rows="6" resize="none"></el-input>
<el-input
type="textarea"
v-model.trim="form.includeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含">
<el-input type="textarea" v-model.trim="form.notIncludeUrsa" :rows="6" resize="none"></el-input>
<el-input
type="textarea"
v-model.trim="form.notIncludeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="件数">
<el-col :span="3">
<!-- <el-input v-model="form.minNumOfPieces"></el-input> -->
<el-input-number v-model="
form.minNumOfPieces == 0
? (form.minNumOfPieces = undefined)
: form.minNumOfPieces
" :precision="0" :controls="false" style="width: 100%" :min="1"></el-input-number>
<el-input
class="numberInput"
v-model.trim="minNumOfPieces"
></el-input>
<!-- <el-input-number
v-model="minNumOfPieces"
:precision="0"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<!-- <el-input v-model="form.maxNumOfPieces"></el-input> -->
<el-input-number v-model="
<el-input
class="numberInput"
v-model.trim="maxNumOfPieces"
></el-input>
<!-- <el-input-number
v-model="
form.maxNumOfPieces == 0
? form.maxNumOfPieces=undefined
? (form.maxNumOfPieces = undefined)
: form.maxNumOfPieces
" :precision="0" :controls="false" style="width: 100%" :min="form.minNumOfPieces"></el-input-number>
"
:precision="0"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
</el-form-item>
<el-form-item label="重量">
<el-col :span="3">
<!-- <el-input v-model="form.minWeight"></el-input> -->
<el-input-number v-model="
<el-input class="numberInput" v-model.trim="minWeight"></el-input>
<!-- <el-input-number
v-model="
form.minWeight == 0
? (form.minWeight = undefined)
: form.minWeight
" :precision="2" :controls="false" style="width: 100%" :min="0.01"></el-input-number>
"
:precision="2"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<!-- <el-input v-model="form.maxWeight"></el-input> -->
<el-input-number v-model="
<el-input class="numberInput" v-model.trim="maxWeight"></el-input>
<!-- <el-input-number
v-model="
form.maxWeight == 0
? (form.maxWeight = undefined)
: form.maxWeight
" :precision="2" :controls="false" style="width: 100%" :min="form.minWeight"></el-input-number>
"
:precision="2"
:controls="false"
style="width: 100%"
></el-input-number> -->
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
</el-form-item>
......@@ -102,7 +177,10 @@
<el-checkbox-group v-model="form.typeOfGoods">
<el-row>
<el-col :span="2" v-for="item in cargoType" :key="item.id">
<el-checkbox :label="item.chineseName" :name="item.chineseName">
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
>
</el-checkbox>
</el-col>
</el-row>
......@@ -115,7 +193,11 @@
<el-checkbox-group v-model="form.declarationCategory">
<el-row>
<el-col :span="3" v-for="item in cargoStatus" :key="item.id">
<el-checkbox :label="item.chineseName" :name="item.chineseName" disabled></el-checkbox>
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
disabled
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
......@@ -127,7 +209,10 @@
<el-checkbox-group v-model="form.serviceCode">
<el-row>
<el-col :span="2" v-for="item in serviceCode" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
......@@ -139,7 +224,10 @@
<el-checkbox-group v-model="form.handlingCode">
<el-row>
<el-col :span="3" v-for="item in handlingCode" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
......@@ -151,332 +239,402 @@
<el-checkbox-group v-model="form.subCategory">
<el-row>
<el-col :span="3" v-for="item in subCategory" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item>
</el-form-item>
<el-form-item> </el-form-item>
</el-form>
<div style="marginLeft:200px">
<el-button type="primary" size="small" v-if="$route.params.handle != 'detail'" @click="submit('form')"
:loading="btnLoading">
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
<div style="marginleft: 200px">
<el-button
type="primary"
size="small"
v-if="$route.params.handle != 'detail'"
@click="submit('form')"
:loading="btnLoading"
>
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
</div>
</template>
</div>
</template>
<script>
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
export default {
data() {
return {
form: {
typeOfGoods: [],
declarationCategory: [],
serviceCode: [],
subCategory: [],
handlingCode:[],
},
rules: {
purposeOfFlightNo: [{
required: true,
message: "请输入航班号",
trigger: "blur"
}, ],
},
export default {
name:"",
data() {
return {
form: {
minNumOfPieces: undefined,
maxNumOfPieces: undefined,
minWeight: undefined,
maxWeight: undefined,
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode:[],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode:[],
subCategory: [],
isLocation: "1",
isNeedRequired: 0,
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
};
},
methods: {
//排序
sorttodo(arr, englishName){
var index = 1, newArr = [], length = arr.length;
for ( var i=0; i<length; i++){
if ( arr[i].englishName === englishName ){
newArr[0] = arr[i];
}
else{
newArr[index++] = arr[i];
}
}
return newArr;
handlingCode: [],
},
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
rules: {
purposeOfFlightNo: [
{
required: true,
message: "请输入航班号",
trigger: "blur",
},
],
},
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode: [],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode: [],
subCategory: [],
isLocation: "1",
isNeedRequired: 0,
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
};
},
methods: {
//排序
sorttodo(arr, englishName) {
var index = 1,
newArr = [],
length = arr.length;
for (var i = 0; i < length; i++) {
if (arr[i].englishName === englishName) {
newArr[0] = arr[i];
} else {
newArr[index++] = arr[i];
}
}
return newArr;
},
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
}
if (flag == 0) {
errorList.push(element);
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
}
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
this.form.purposeOfFlightNo = this.form.purposeOfFlightNo.toUpperCase();
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
}
});
console.log(errorList);
if (errorList.length != 0) {
this.$message({
showClose: true,
message: "URSA不包含中[" +
errorList +
"]错误,URSA不包含必须属于URSA包含中的类型",
type: "error",
});
this.btnLoading = false;
return;
if (flag == 0) {
errorList.push(element);
}
}
});
console.log(errorList);
if (errorList.length != 0) {
this.$message({
showClose: true,
message:
"URSA不包含中[" +
errorList +
"]错误,URSA不包含必须属于URSA包含中的类型",
type: "error",
});
this.btnLoading = false;
return;
}
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
}
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.$message({
showClose: true,
message: "成功",
type: "success",
});
this.close();
} else {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.btnLoading = false;
}
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
},
close() {
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
1
);
this.$router.push(
this.$store.state.tagsView.visitedViews[
this.$store.state.tagsView.visitedViews.length - 1
].path
);
},
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
reuturn;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
this.subCategory = dict.subCategory;
});
if (handle === "detail") {
this.disable = true;
}
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: "成功",
type: "success",
message: response.msg,
type: "error",
});
this.close();
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
this.isNeedRequired = info.isNeedRequired;
}
this.loading = false;
});
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.btnLoading = false;
this.isEmpty = true;
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
}
this.loading = false;
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
}
} else {
this.loading = false;
}
},
computed: {
minNumOfPieces: {
get: function () {
return this.form.minNumOfPieces;
},
close() {
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
1
);
this.$router.push(
this.$store.state.tagsView.visitedViews[
this.$store.state.tagsView.visitedViews.length - 1
].path
);
set: function (val) {
if (val == 0 || val == null || val == "-") {
this.form.minNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.minNumOfPieces = val;
}
},
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
reuturn;
maxNumOfPieces: {
get: function () {
return this.form.maxNumOfPieces;
},
set: function (val) {
if (val == 0 || val == null || val == "-") {
this.form.maxNumOfPieces = undefined;
} else if (!isNaN(val)) {
this.form.maxNumOfPieces = val;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode =this.sorttodo(dict.handlingCode,"BLANK");
this.subCategory = dict.subCategory;
});
if (handle === "detail") {
this.disable = true;
}
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods ?
info.typeOfGoods.split(";") :
[];
info.declarationCategory = info.declarationCategory ?
info.declarationCategory.split(";") :
[];
info.serviceCode = info.serviceCode ?
info.serviceCode.split(";") :
[];
info.handlingCode = info.handlingCode ?
info.handlingCode.split(";") :
[];
info.subCategory = info.subCategory ?
info.subCategory.split(";") :
[];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
this.isNeedRequired = info.isNeedRequired;
}
this.loading = false;
});
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods ?
info.typeOfGoods.split(";") :
[];
info.declarationCategory = info.declarationCategory ?
info.declarationCategory.split(";") :
[];
info.serviceCode = info.serviceCode ?
info.serviceCode.split(";") :
[];
info.handlingCode = info.handlingCode ?
info.handlingCode.split(";") :
[];
info.subCategory = info.subCategory ?
info.subCategory.split(";") :
[];
this.form = info;
if (info.notLocation != null || info.notLocation == "") {
this.isLocation = "2";
} else {
this.isLocation = "1";
}
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
}
this.loading = false;
});
},
},
minWeight: {
get: function () {
return this.form.minWeight;
},
set: function (val) {
if (val == null || val == "-") {
this.form.minWeight = undefined;
} else if (!isNaN(val)) {
this.form.minWeight = val;
}
} else {
this.loading = false;
}
},
},
};
maxWeight: {
get: function () {
return this.form.maxWeight;
},
set: function (val) {
if (val == null || val == "-") {
this.form.maxWeight = undefined;
} else if (!isNaN(val)) {
this.form.maxWeight = val;
}
},
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
}
.el-checkbox__input.is-disabled+span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled + span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
}
.numberInput {
input {
text-align: center;
}
}
</style>
......
......@@ -148,7 +148,7 @@
findSourceFlightAndFlightDateApi
} from "@/api/sourceFlightRules";
export default {
name: "SourceFlightRules",
name: "FlightRandConfig",
data() {
return {
// data 中设定
......@@ -234,8 +234,9 @@
methods: {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.openFlightDate = false
this.$router.push({
name: "flightAllocConfigInfo",
name: "FlightAllocConfigInfo",
params: {
handle: handle,
id: flightiId
......
......@@ -44,6 +44,7 @@
importcaPreReview,
} from "@/api/caPreReviewImport";
export default {
name:"CAPreReviewImport",
data() {
return {
// 遮罩层
......
......@@ -73,6 +73,7 @@ import {
importFlight,
} from "@/api/flightInfoImport";
export default {
name:"FlightInformationImport",
data() {
return {
flightType: [],
......
......@@ -51,8 +51,11 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除
</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">自动配舱开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">自动配舱关闭</el-button>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
......@@ -112,7 +115,7 @@
class-name="small-padding fixed-width" width="130" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteorPlayorpause(scope.row,0,'删除')">
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'删除')">
删除</el-button> -->
</template>
</el-table-column>
......@@ -178,14 +181,14 @@
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%"
v-model="form.originalWeight" :precision="2"></el-input-number>
v-model="form.originalWeight"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="额外增重百分比" prop="extraWeightPercent">
<el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%"
v-model="form.extraWeightPercent" :precision="2"></el-input-number>
v-model="form.extraWeightPercent"></el-input-number>
</el-form-item>
</el-col>
......@@ -207,14 +210,14 @@
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
v-model="form.highPriceWeightPercent" :precision="2"></el-input-number>
v-model="form.highPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%"
v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number>
v-model="form.lowPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
......@@ -264,10 +267,19 @@
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible">
<el-table :data="gridData">
<el-table-column property="fltNo" label="航班号" width="150"></el-table-column>
<el-table-column property="fltDate" label="航班日期" width="200"></el-table-column>
<el-table-column property="alloctedWeight" label="已配重量" width="200"></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import {
delFlight,
findFltConditionDataApi,
findAllFltDataApi,
findFltById,
......@@ -277,9 +289,11 @@
} from "@/api/findAllFltData";
export default {
name: "findAllFltData",
name: "FlightInformationMaintenance",
data() {
return {
gridData:[],
dialogTableVisible: false,
//高价百分比是否打开
ishighPriceWeightPercent:true,
//form属性禁用状态
......@@ -624,40 +638,34 @@
});
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(row, status, statusText) {
//删除前需要停用
if (status === 0 && row.status != '3') {
this.$message({
message: '请停用后删除',
type: 'warning'
});
return;
}
this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
let disable = {
id: row.id,
status: status
};
/** 删除按钮操作 */
handleDelete(row) {
const fIds =this.ids;
this.$confirm('是否确认删除所选数据?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFlight(fIds);
}).then(response => {
this.findAllFltData();
if(response.data.length>0){
this.gridData=response.data;
this.$confirm(response.msg, '提示', {
confirmButtonText: '查看删除失败航班信息',
cancelButtonText: '取消',
type: 'warning',
center: true
}).then(() => {
this.dialogTableVisible=true;
}).catch(function() { });
return delOrEnableORDisableApi(disable);
}).then(response => {
if (response.code == 200) {
this.findAllFltData();
this.msgSuccess(statusText + "成功");
} else {
this.msgError(response.msg);
}
}else{
this.msgSuccess(response.msg);
}
}).catch(function() {});
},
}).catch(function() {});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
......
......@@ -3,7 +3,7 @@
<el-form
ref="cargoForm"
class="form-header"
label-position="top"
label-position="right"
label-width="auto"
size="small"
:model="formData"
......@@ -51,7 +51,7 @@
<el-form-item label="运单号">
<el-input
type="textarea"
v-model="formData.waybillNo"
v-model.trim="formData.waybillNo"
class="formItem"
placeholder="请输入运单号(回车间隔)"
rows="1"
......@@ -117,113 +117,106 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-collapse>
<el-collapse-item>
<template slot="title">
<span style="fontWeight:900;color:#409EFF;fontSize:14px"><i class="el-icon-s-tools"></i>更多查询条件</span>
</template>
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker
class="formItem"
v-model="flightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker
class="formItem"
v-model="formData.pickUpDate"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期">
<el-date-picker
class="formItem"
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select
placeholder="不限"
v-model="formData.statusId"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动">
<el-select
placeholder="不限"
v-model="formData.allocationTypeId"
class="formItem"
clearable
>
<el-option
label="手动"
value="1"
>
</el-option>
<el-option
label="自动"
value="2"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="口岸代码">
<el-select
placeholder="不限"
v-model="formData.portName"
class="formItem"
clearable
>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
</el-collapse-item>
</el-collapse>
<el-col :span="24" v-show="formShow">
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker
class="formItem"
v-model="flightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker
class="formItem"
v-model="formData.pickUpDate"
type="date"
placeholder="选择日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期">
<el-date-picker
class="formItem"
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-select
placeholder="不限"
v-model="formData.statusId"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动">
<el-select
placeholder="不限"
v-model="formData.allocationTypeId"
class="formItem"
clearable
>
<el-option
label="手动"
value="1"
>
</el-option>
<el-option
label="自动"
value="2"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="口岸代码">
<el-select
placeholder="不限"
v-model="formData.portName"
class="formItem"
clearable
>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
</el-col>
</el-row>
<div style="paddingLeft: 10px;marginTop:20px">
......@@ -250,6 +243,8 @@
<span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
<span>总件数:{{ allQty }}</span>
</div>
<RightToolbar :showSearch.sync="formShow" size="small"></RightToolbar>
<!-- <div style="formShow" @click="formShow = !formShow">{{formShow?'收起条件':'更多条件'}}</div> -->
</div>
</el-form>
<Tables
......@@ -265,6 +260,7 @@
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
@sortChange="sortChange"
></Tables>
</div>
</template>
......@@ -275,7 +271,7 @@ import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "@/utils/FedEx"
export default {
name:"queryCargo",
name:"QueryCargo",
data() {
return {
formData: {
......@@ -759,9 +755,12 @@ export default {
limitSize: 100, //无限制-1
page:1,
progress:0,
formShow:true,
};
},
activated(){
console.log("cargo")
},
created() {
//查询条件
findConditionData().then((res) => {
......@@ -885,6 +884,9 @@ export default {
this.page = val.page;
this.select()
},
sortChange(val){
this.tableData.sort();
},
// 导出表格
xlse(page) {
this.progress = 1;
......@@ -906,7 +908,7 @@ export default {
this.downLoadingTip.tip = "";
})
} else {
if(this.totalCount < 80000){
if(this.totalCount < 100000){
this.downLoadingTip.tip = "正在导出全部结果集请耐心等待"
cargoXlse.cargoConditionDto.limitStart = 0;
cargoXlse.cargoConditionDto.limitSize = -1;
......@@ -967,14 +969,23 @@ export default {
<style scoped>
.tips {
float: right;
display: inline-block;
color: #606266;
font-size: 14px;
margin-right: 40px;
margin-top: 10px;
margin-left: 50px;
}
.progress{
width:200px;
display: inline-block;
margin:0 0 0 20px;
}
.formShow{
height:48px;
line-height: 48px;
font-weight: 900;
color: rgb(64, 158, 255);
font-size: 14px;
float: right;
}
</style>
\ No newline at end of file
......
......@@ -35,9 +35,9 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `https://imacuat.zmd.apac.fedex.com/IMAC2`, //uat服务器
target: `http://47.103.140.98:7001/IMAC2`, //阿里云服务器
// target: `http://192.168.1.133:7001/IMAC2`, //测试服务器
// target: `https://imacuat.zmd.apac.fedex.com/iMAC`, //uat服务器
target: `http://47.103.140.98:7001/iMAC`, //阿里云服务器
// target: `http://192.168.1.133:7001/iMAC`, //测试服务器
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......