jinhui.wang

黑名单页面增加,样式修改,文本修正

......@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) {
})
}
//黑名单自动配舱开关
/**
* @param updateIds idList *
* @param status 状态 * 1开 0关
*/
export function updateBlackListSwitchBatch(data) {
return request({
url: '/FlightPreserveController/updateBlackListSwitchBatch',
method: 'post',
data: data
})
}
......
......@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
/**
* @param page * 页数
* @param size * 页长
* @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
* @param goodsStation 货站名
*/
export function searchGoods(data) {
......@@ -61,7 +62,7 @@ export function findStationName() {
})
}
//批量导入
//白名单批量导入
export function uploadGoodsExcel(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
......@@ -84,4 +85,29 @@ export function userImportLog(data) {
method: 'post',
data: data
})
}
//黑名单上传excel
export function uploadGoodsBlackExce(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
formData.append("goodsStation", goodsStation);
return request({
url: '/goods/uploadGoodsBlackExcel',
method: 'post',
data: formData
})
}
//批量添加黑名单
/**
* @param goodsStation * 货站名
* @param goodsList * 货品名list
*/
export function batchAddBlackGoods(data) {
return request({
url: '/goods/batchAddBlackGoods',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -67,6 +67,11 @@ let ductLabels = {
"1": "开启",
"0": "关闭",
null: '关闭'
},
"blackListSwitch": {
"1": "开启",
"0": "关闭",
null: '开启'
}
},
"flightRand": {//航班顺位设置
......
......@@ -527,6 +527,12 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "黑名单是否自动配舱",
columnName: "blackListSwitch",
columnWidth: "160",
status: 1
},
{
columnChineseName: "总重量",
columnName: "totalWeight",
columnWidth: "90",
......
<template>
<div>
<el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen">
<el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
@click="visibleOpen">
</el-button>
<el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
......
......@@ -7,6 +7,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
id: state => state.user.id,
activePortName: state => state.user.activePortName,
portName: state => state.user.portName,
introduction: state => state.user.introduction,
......
......@@ -8,6 +8,7 @@ const user = {
state: {
token: getToken(),
name: '',
id: '',
avatar: '',
activePortName: '',
portNames: [],
......@@ -23,6 +24,9 @@ const user = {
SET_NAME: (state, name) => {
state.name = name
},
SET_ID: (state, id) => {
state.id = id
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
},
......@@ -92,6 +96,7 @@ const user = {
const user = res.data.user
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
let ports = [];
commit('SET_ID', user.userId)
if (user.portName) {
ports = user.portName.split(',');
commit('SET_PORTNAMES', ports)
......
......@@ -175,14 +175,14 @@
</el-row>
<div style="margin: 0 0 0 10px">
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download"
v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0">{{
<el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
:loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
......@@ -331,6 +331,7 @@ export default {
},
//查询
async select(val) {
this.tableSelection = []
this.loading = true;
this.dataInfo();
if (val === 0) {
......
......@@ -67,8 +67,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">
查看配置维度
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
</el-button>
</template>
</el-table-column>
......
......@@ -47,27 +47,35 @@
</el-form-item>
</el-col>
</el-row>
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
<el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
@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" v-hasPermi="['base:flightInfo:add']">
<el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:flightInfo:add']">
新增</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete"
v-hasPermi="['base:flightInfo:delete']">删除
<el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(1)">黑名单自动配舱开启
</el-button>
<el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
@click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
</el-button>
<el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
@click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
</el-button>
</el-form>
<Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
......@@ -285,7 +293,8 @@ import {
findFltCommonConf,
updateStatusBatch,
updateAutoPushBatch,
updateWhiteListSwitchBatch
updateWhiteListSwitchBatch,
updateBlackListSwitchBatch
} from "@/api/findAllFltData";
import { getpreAudit } from '@/api/system/preReview.js'
import { queryRouteByFltNo } from '@/api/destinationFlight.js'
......@@ -778,8 +787,7 @@ export default {
this.formdisabled.fltDate = true;
//航班种类
this.formdisabled.kindId = true;
//航线
this.formdisabled.route = true
//根据ID查item
findFltById(row).then((response) => {
if (response.code == 200) {
......@@ -1034,6 +1042,26 @@ export default {
console.log(err)
})
},
//黑名单配舱开关
BlackListSwitchStatus(val) {
let obj = {
updateIds: []
}
obj.status = val
this.ids.forEach(item => {
obj.updateIds.push(item.id)
})
updateBlackListSwitchBatch(obj).then(res => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.findAllFltData()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//航线修改
routeChange(val) {
this.$forceUpdate()
......
<template>
<div>
<el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'"
:visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<div v-if="openStatus == 'add'">
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="品名" prop="goodsList">
<el-input type="textarea" v-model="formData.goodsList" rows="4" maxlength="125"
placeholder="请输入品名,多个用“;”隔开">
</el-input>
</el-form-item>
</div>
<div v-else-if="openStatus == 'downloadExcel'">
<el-form-item label="货站名称" prop="goodsStation">
<el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
:loading="goodsStationLoading" placeholder="不限">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item"
:key="item">
</el-option>
</el-select>
</el-form-item>
</div>
<div v-else>
<el-form-item label="货站名称" prop="uploadGoodsStation">
<el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25"
placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item prop="file" label-width="0px">
<el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx"
class="upload-demo">
<el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定
</el-button>
<el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading"
@click="download">导出Excel</el-button>
<el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel
</el-button>
<el-button style="margin-top:10px" size="small" @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddBlackGoods, findStationName, uploadGoodsBlackExce } from "@/api/goodsStation"
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: '',
props: {
open: {
type: Boolean,
default: false
},
openStatus: {
type: String,
default: 'add'
}
},
data() {
return {
formData: {
goodsStation: null,
uploadGoodsStation: null,
goodsList: '',
file: null
},
goodsStationList: [],
rules: {
goodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
goodsList: [
{
required: true,
message: "品名不能为空",
trigger: "blur",
},
],
uploadGoodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
},
fileList: [],
errorData: [],
goodsStationLoading: false,
downloading: false,
loading: false,
}
},
watch: {
open(val) {
if (val && this.openStatus == 'downloadExcel') {
this.getgoods()
}
}
},
methods: {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName().then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.goodsStationLoading = false
console.log(err)
})
},
//提交
submit() {
let obj = {
goodsList: []
}
obj.goodsStation = this.formData.goodsStation
this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
if (this.formData.goodsList != null && this.formData.goodsList != '') {
this.formData.goodsList.split(';').forEach(item => {
if (item != null && item != '') {
obj.goodsList.push(item)
}
})
}
this.$refs['addForm'].validate(val => {
if (val) {
this.loading = true
batchAddBlackGoods(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.msgSuccess('添加成功')
this.close()
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
}
})
},
//选择文件
uploadExcel(option) {
this.formData.file = option.file
},
//导入Excel
upload() {
this.loading = true
if (this.formData.file != null && this.formData.file != '') {
this.$refs['addForm'].validate(val => {
if (val) {
const file = this.formData.file;
let goodsStation = this.formData.uploadGoodsStation
uploadGoodsBlackExce(file, goodsStation).then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
if (res.data) {
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
}
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.success(res.msg);
}
setTimeout(() => {
this.close()
}, 1000);
});
} else {
this.loading = false;
}
})
} else {
this.loading = false
this.msgWarning('请选择文件后再导入!')
}
},
//导出Excel
download() {
this.$refs['addForm'].validate(val => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation }
downLoadXlsx("/goods/exportGoods", data, "货站表")
.then(() => {
this.downloading = false
this.close()
})
.catch(() => {
this.downloading = false
});
}
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
this.formData.file = null
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.formData.file = file
this.uploadExcel(file);
},
//取消
close() {
this.formData = {
goodsStation: null,
goodsList: null
}
if (this.openStatus == 'uploadExcel') {
this.$refs['upload'].clearFiles()
}
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
}
}
</script>
<style lang="scss" scoped>
.upload-demo {
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
label-width="auto" size="small" @submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="货站名称">
<el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
maxlength="50" clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="品名">
<el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display:flex;padding:10px 20px">
<el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
@click="add">新 增
</el-button>
<el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
删 除
</el-button>
<el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
@click="downloadTempleate">下载模板
</el-button>
<!-- <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
黑名单导出
</el-button> -->
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
<Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
:order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
:limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange">
<template slot="optionColumn">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
</Tables>
<Dialog :open="open" :openStatus="openStatus" @close="close" />
</div>
</template>
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
export default {
name: 'GoodsBlackStation',
components: {
Dialog,
},
data() {
return {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 2,
size: 20,
page: 1
},
tableData: [],
tableHeader: this.tableHeaders['goodsStation'],
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
totalCount: 0,
openStatus: '',
loading: false,
open: false,
}
},
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
this.selection(1)
},
watch: {
$route(to, from) {
if (to.name == 'GoodsStation') {
this.selection()
}
}
},
methods: {
//查询
selection(val) {
this.tableData = []
this.checkData = []
this.loading = true
if (val === 1) {
this.selectionData.page = 1
}
searchGoods(this.selectionData).then(res => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//新增
add() {
this.open = true
this.openStatus = 'add'
},
//删除
del(val) {
this.$confirm("是否要删除这条记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods([val.id])
}).catch(() => {
})
},
//批量删除
batchDel() {
let arr = []
this.checkData.forEach(item => {
arr.push(item.id)
})
this.$confirm("是否要删除这些记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.deleteGoods(arr)
}).catch(() => {
})
},
//删除请求
deleteGoods(val) {
batchDeleteGoods(val).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//导出
downloadExcel() {
this.open = true
this.openStatus = 'downloadExcel'
},
//复选
tableSelect(val) {
this.checkData = val.selection
},
//全选
tableSelectAll(val) {
this.checkData = val
},
//分页
currentChange(val) {
this.selectionData.page = val.page
this.selection()
},
//上传excel
uploadExcel() {
this.openStatus = 'uploadExcel'
this.open = true
},
//下载模板
downloadTempleate() {
downLoadTemplate('goodsStation').then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
this.$message.error("下载失败");
}
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
},
close() {
this.open = false
this.openStatus = ''
this.selection(1)
},
resultClose() {
this.resultOpen = false
this.selection(1)
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -100,13 +100,13 @@ export default {
trigger: "change",
},
],
// file: [
// {
// required: true,
// message: "文件不能为空",
// trigger: "change",
// },
// ]
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
},
fileList: [],
errorData: [],
......@@ -176,7 +176,7 @@ export default {
},
//导入Excel
upload() {
this.loading = true;
this.loading = true
if (this.formData.file != null && this.formData.file != '') {
this.$refs['addForm'].validate(val => {
if (val) {
......@@ -211,9 +211,10 @@ export default {
}
})
} else {
this.loading = false;
this.loading = false
this.msgWarning('请选择文件后再导入!')
}
},
//导出Excel
download() {
......
......@@ -32,10 +32,10 @@
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
导出Excel
白名单导出
</el-button>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsStation:add']">导入Excel</el-button>
v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
......@@ -72,6 +72,7 @@ export default {
selectionData: {
goodsStation: '',
goodsName: '',
goodsType: 1,
size: 20,
page: 1
},
......
......@@ -150,8 +150,8 @@
<el-col :span="6">
<el-form-item label="预审状态">
<el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
<el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
:value="item"> </el-option>
<el-option v-for="item in findConditionData.preQualificationStatus"
:label="item == '' ? '非预审' : item" :value="item"> </el-option>
</el-select>
</el-form-item>
</el-col>
......
......@@ -67,7 +67,6 @@ export default {
fltDate: undefined,
route: null,
overweight: false,
notInWhite: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName", width: "" },
......
......@@ -97,8 +97,8 @@
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
</div>
<Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="formData.size"
:page="formData.page" :pageSizes="[100]" :height="tableHeight" @currentChange="currentChange">
:selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
:limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
</Tables>
</div>
</template>
......
......@@ -52,7 +52,9 @@
</el-button>
</div>
<Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]">
:height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
:totalCount="total" :loading="tableLoading" @currentChange="currentChange"
layout="total,prev, pager, next, jumper, ->">
</Tables>
</div>
</template>
......
......@@ -84,7 +84,7 @@
</template>
<script>
import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js'
import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, orderRoute } from '@/api/system/dictionary.js'
import { queryRouteByFltNo } from "@/api/destinationFlight"
export default {
......
......@@ -30,7 +30,8 @@
<el-col :span="12">
<el-form-item label="航线" prop="flightRoute">
<el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
:disabled="routeList.length == 0 || disabled" @change="routeChange">
:loading="routeLoading" :disabled="routeList.length == 0 || disabled"
@change="routeChange">
<el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
:key="item.id">
<Tooltips :content="item.route" :refName="item.route"></Tooltips>
......@@ -193,6 +194,7 @@ export default {
},
title: '',
loading: false,
routeLoading: false,
disabled: false
}
},
......@@ -237,6 +239,7 @@ export default {
//获取航线
getRoute(val) {
this.routeList = []
this.routeLoading = true
if (val != 1) {
this.formData.flightRoute = null
}
......@@ -246,6 +249,7 @@ export default {
fltDate: this.formData.flightDate
}
findFlightRoute(obj).then(res => {
this.routeLoading = false
if (res.code === 200) {
this.routeList = res.data
} else {
......@@ -253,6 +257,7 @@ export default {
}
this.$refs['superAllocationForm'].clearValidate('flightRoute')
}).catch(err => {
this.routeLoading = false
console.log(err)
})
},
......