jinhui.wang

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

...@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) { ...@@ -86,3 +86,15 @@ export function updateWhiteListSwitchBatch(data) {
86 }) 86 })
87 } 87 }
88 88
89 +//黑名单自动配舱开关
90 +/**
91 + * @param updateIds idList *
92 + * @param status 状态 * 1开 0关
93 + */
94 +export function updateBlackListSwitchBatch(data) {
95 + return request({
96 + url: '/FlightPreserveController/updateBlackListSwitchBatch',
97 + method: 'post',
98 + data: data
99 + })
100 +}
......
...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) { ...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
41 /** 41 /**
42 * @param page * 页数 42 * @param page * 页数
43 * @param size * 页长 43 * @param size * 页长
44 + * @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
44 * @param goodsStation 货站名 45 * @param goodsStation 货站名
45 */ 46 */
46 export function searchGoods(data) { 47 export function searchGoods(data) {
...@@ -61,7 +62,7 @@ export function findStationName() { ...@@ -61,7 +62,7 @@ export function findStationName() {
61 }) 62 })
62 } 63 }
63 64
64 -//批量导入 65 +//白名单批量导入
65 export function uploadGoodsExcel(file, goodsStation) { 66 export function uploadGoodsExcel(file, goodsStation) {
66 let formData = new FormData(); 67 let formData = new FormData();
67 formData.append("file", file); 68 formData.append("file", file);
...@@ -84,4 +85,29 @@ export function userImportLog(data) { ...@@ -84,4 +85,29 @@ export function userImportLog(data) {
84 method: 'post', 85 method: 'post',
85 data: data 86 data: data
86 }) 87 })
88 +}
89 +
90 +//黑名单上传excel
91 +export function uploadGoodsBlackExce(file, goodsStation) {
92 + let formData = new FormData();
93 + formData.append("file", file);
94 + formData.append("goodsStation", goodsStation);
95 + return request({
96 + url: '/goods/uploadGoodsBlackExcel',
97 + method: 'post',
98 + data: formData
99 + })
100 +}
101 +
102 +//批量添加黑名单
103 +/**
104 + * @param goodsStation * 货站名
105 + * @param goodsList * 货品名list
106 + */
107 +export function batchAddBlackGoods(data) {
108 + return request({
109 + url: '/goods/batchAddBlackGoods',
110 + method: 'post',
111 + data: data
112 + })
87 } 113 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -67,6 +67,11 @@ let ductLabels = { ...@@ -67,6 +67,11 @@ let ductLabels = {
67 "1": "开启", 67 "1": "开启",
68 "0": "关闭", 68 "0": "关闭",
69 null: '关闭' 69 null: '关闭'
70 + },
71 + "blackListSwitch": {
72 + "1": "开启",
73 + "0": "关闭",
74 + null: '开启'
70 } 75 }
71 }, 76 },
72 "flightRand": {//航班顺位设置 77 "flightRand": {//航班顺位设置
......
...@@ -527,6 +527,12 @@ let tableHeaders = { ...@@ -527,6 +527,12 @@ let tableHeaders = {
527 status: 1 527 status: 1
528 }, 528 },
529 { 529 {
530 + columnChineseName: "黑名单是否自动配舱",
531 + columnName: "blackListSwitch",
532 + columnWidth: "160",
533 + status: 1
534 + },
535 + {
530 columnChineseName: "总重量", 536 columnChineseName: "总重量",
531 columnName: "totalWeight", 537 columnName: "totalWeight",
532 columnWidth: "90", 538 columnWidth: "90",
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen"> 3 + <el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
4 + @click="visibleOpen">
4 </el-button> 5 </el-button>
5 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false" 6 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
6 append-to-body center> 7 append-to-body center>
......
...@@ -7,6 +7,7 @@ const getters = { ...@@ -7,6 +7,7 @@ const getters = {
7 token: state => state.user.token, 7 token: state => state.user.token,
8 avatar: state => state.user.avatar, 8 avatar: state => state.user.avatar,
9 name: state => state.user.name, 9 name: state => state.user.name,
10 + id: state => state.user.id,
10 activePortName: state => state.user.activePortName, 11 activePortName: state => state.user.activePortName,
11 portName: state => state.user.portName, 12 portName: state => state.user.portName,
12 introduction: state => state.user.introduction, 13 introduction: state => state.user.introduction,
......
...@@ -8,6 +8,7 @@ const user = { ...@@ -8,6 +8,7 @@ const user = {
8 state: { 8 state: {
9 token: getToken(), 9 token: getToken(),
10 name: '', 10 name: '',
11 + id: '',
11 avatar: '', 12 avatar: '',
12 activePortName: '', 13 activePortName: '',
13 portNames: [], 14 portNames: [],
...@@ -23,6 +24,9 @@ const user = { ...@@ -23,6 +24,9 @@ const user = {
23 SET_NAME: (state, name) => { 24 SET_NAME: (state, name) => {
24 state.name = name 25 state.name = name
25 }, 26 },
27 + SET_ID: (state, id) => {
28 + state.id = id
29 + },
26 SET_AVATAR: (state, avatar) => { 30 SET_AVATAR: (state, avatar) => {
27 state.avatar = avatar 31 state.avatar = avatar
28 }, 32 },
...@@ -92,6 +96,7 @@ const user = { ...@@ -92,6 +96,7 @@ const user = {
92 const user = res.data.user 96 const user = res.data.user
93 const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; 97 const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
94 let ports = []; 98 let ports = [];
99 + commit('SET_ID', user.userId)
95 if (user.portName) { 100 if (user.portName) {
96 ports = user.portName.split(','); 101 ports = user.portName.split(',');
97 commit('SET_PORTNAMES', ports) 102 commit('SET_PORTNAMES', ports)
......
...@@ -175,14 +175,14 @@ ...@@ -175,14 +175,14 @@
175 </el-row> 175 </el-row>
176 <div style="margin: 0 0 0 10px"> 176 <div style="margin: 0 0 0 10px">
177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button> 177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
178 - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" 178 + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
179 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading" 179 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
180 - :disabled="tableData.length <= 0">{{ 180 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
181 downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 181 downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
182 }}</el-button> 182 }}</el-button>
183 - <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" icon="el-icon-download" 183 + <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
184 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading" 184 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
185 - :disabled="tableData.length <= 0">{{ 185 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
186 downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 186 downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
187 }}</el-button> 187 }}</el-button>
188 <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']" 188 <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
...@@ -331,6 +331,7 @@ export default { ...@@ -331,6 +331,7 @@ export default {
331 }, 331 },
332 //查询 332 //查询
333 async select(val) { 333 async select(val) {
334 + this.tableSelection = []
334 this.loading = true; 335 this.loading = true;
335 this.dataInfo(); 336 this.dataInfo();
336 if (val === 0) { 337 if (val === 0) {
......
...@@ -67,8 +67,7 @@ ...@@ -67,8 +67,7 @@
67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
68 <template slot-scope="scope"> 68 <template slot-scope="scope">
69 <el-button size="mini" type="text" icon="el-icon-edit" 69 <el-button size="mini" type="text" icon="el-icon-edit"
70 - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')"> 70 + @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
71 - 查看配置维度
72 </el-button> 71 </el-button>
73 </template> 72 </template>
74 </el-table-column> 73 </el-table-column>
......
...@@ -47,27 +47,35 @@ ...@@ -47,27 +47,35 @@
47 </el-form-item> 47 </el-form-item>
48 </el-col> 48 </el-col>
49 </el-row> 49 </el-row>
50 - <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索 50 + <el-button class="mt10" type="primary" icon="el-icon-search" size="mini" :loading="loading"
51 + @click="handleQuery">搜索
51 </el-button> 52 </el-button>
52 - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 53 + <el-button class="mt10" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
53 - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['base:flightInfo:add']"> 54 + <el-button class="mt10" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
55 + v-hasPermi="['base:flightInfo:add']">
54 新增</el-button> 56 新增</el-button>
55 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 57 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
56 @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button> 58 @click="handleFlightStatus('flightStatus10')" v-hasPermi="['base:flightInfo:open']">自动配舱开启</el-button>
57 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 59 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
58 @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button> 60 @click="handleFlightStatus('flightStatus80')" v-hasPermi="['base:flightInfo:close']">自动配舱关闭</el-button>
59 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 61 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
60 @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button> 62 @click="autoPushBatch('open')" v-hasPermi="['base:flightInfo:autoPushOpen']">自动推送开启</el-button>
61 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 63 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
62 @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button> 64 @click="autoPushBatch('close')" v-hasPermi="['base:flightInfo:autoPushClose']">自动推送关闭</el-button>
63 - <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0" 65 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
64 @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启 66 @click="whiteListSwitchStatus(1)" v-hasPermi="['base:flightInfo:whiteOpen']">白名单自动配舱开启
65 </el-button> 67 </el-button>
66 - <el-button type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0" 68 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
67 @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭 69 @click="whiteListSwitchStatus(0)" v-hasPermi="['base:flightInfo:whiteClose']">白名单自动配舱关闭
68 </el-button> 70 </el-button>
69 - <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0" @click="handleDelete" 71 + <el-button class="mt10" type="primary" icon="el-icon-circle-check" size="mini" :disabled="ids.length == 0"
70 - v-hasPermi="['base:flightInfo:delete']">删除 72 + @click="BlackListSwitchStatus(1)">黑名单自动配舱开启
73 + </el-button>
74 + <el-button class="mt10" type="primary" icon="el-icon-circle-close" size="mini" :disabled="ids.length == 0"
75 + @click="BlackListSwitchStatus(0)">黑名单自动配舱关闭
76 + </el-button>
77 + <el-button class="mt10" type="danger" icon="el-icon-delete" size="mini" :disabled="ids.length == 0"
78 + @click="handleDelete" v-hasPermi="['base:flightInfo:delete']">删除
71 </el-button> 79 </el-button>
72 </el-form> 80 </el-form>
73 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" 81 <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader"
...@@ -285,7 +293,8 @@ import { ...@@ -285,7 +293,8 @@ import {
285 findFltCommonConf, 293 findFltCommonConf,
286 updateStatusBatch, 294 updateStatusBatch,
287 updateAutoPushBatch, 295 updateAutoPushBatch,
288 - updateWhiteListSwitchBatch 296 + updateWhiteListSwitchBatch,
297 + updateBlackListSwitchBatch
289 } from "@/api/findAllFltData"; 298 } from "@/api/findAllFltData";
290 import { getpreAudit } from '@/api/system/preReview.js' 299 import { getpreAudit } from '@/api/system/preReview.js'
291 import { queryRouteByFltNo } from '@/api/destinationFlight.js' 300 import { queryRouteByFltNo } from '@/api/destinationFlight.js'
...@@ -778,8 +787,7 @@ export default { ...@@ -778,8 +787,7 @@ export default {
778 this.formdisabled.fltDate = true; 787 this.formdisabled.fltDate = true;
779 //航班种类 788 //航班种类
780 this.formdisabled.kindId = true; 789 this.formdisabled.kindId = true;
781 - //航线 790 +
782 - this.formdisabled.route = true
783 //根据ID查item 791 //根据ID查item
784 findFltById(row).then((response) => { 792 findFltById(row).then((response) => {
785 if (response.code == 200) { 793 if (response.code == 200) {
...@@ -1034,6 +1042,26 @@ export default { ...@@ -1034,6 +1042,26 @@ export default {
1034 console.log(err) 1042 console.log(err)
1035 }) 1043 })
1036 }, 1044 },
1045 + //黑名单配舱开关
1046 + BlackListSwitchStatus(val) {
1047 + let obj = {
1048 + updateIds: []
1049 + }
1050 + obj.status = val
1051 + this.ids.forEach(item => {
1052 + obj.updateIds.push(item.id)
1053 + })
1054 + updateBlackListSwitchBatch(obj).then(res => {
1055 + if (res.code === 200) {
1056 + this.msgSuccess(res.msg)
1057 + this.findAllFltData()
1058 + } else {
1059 + this.msgWarning(res.msg)
1060 + }
1061 + }).catch(err => {
1062 + console.log(err)
1063 + })
1064 + },
1037 //航线修改 1065 //航线修改
1038 routeChange(val) { 1066 routeChange(val) {
1039 this.$forceUpdate() 1067 this.$forceUpdate()
......
This diff is collapsed. Click to expand it.
1 +<template>
2 + <div>
3 + <el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
4 + label-width="auto" size="small" @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="货站名称">
8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="品名">
14 + <el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
15 + clearable />
16 + </el-form-item>
17 + </el-col>
18 + </el-row>
19 + </el-form>
20 + <div style="display:flex;padding:10px 20px">
21 + <el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
22 + </el-button>
23 + <el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
24 + @click="add">新 增
25 + </el-button>
26 + <el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
27 + style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
28 + 删 除
29 + </el-button>
30 + <el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
31 + @click="downloadTempleate">下载模板
32 + </el-button>
33 + <!-- <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 + @click="downloadExcel">
35 + 黑名单导出
36 + </el-button> -->
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 + v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</el-button>
39 + <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
40 + </el-button>
41 + </div>
42 + <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
43 + :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
44 + :limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
45 + :pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
46 + @currentChange="currentChange">
47 + <template slot="optionColumn">
48 + <el-table-column label="操作" align="center">
49 + <template slot-scope="scope">
50 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
51 + v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
52 + </template>
53 + </el-table-column>
54 + </template>
55 + </Tables>
56 + <Dialog :open="open" :openStatus="openStatus" @close="close" />
57 + </div>
58 +</template>
59 +
60 +<script>
61 +import { downLoadTemplate } from "@/api/flightInfoImport";
62 +import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
63 +import Dialog from './dialog.vue'
64 +
65 +export default {
66 + name: 'GoodsBlackStation',
67 + components: {
68 + Dialog,
69 + },
70 + data() {
71 + return {
72 + selectionData: {
73 + goodsStation: '',
74 + goodsName: '',
75 + goodsType: 2,
76 + size: 20,
77 + page: 1
78 + },
79 + tableData: [],
80 + tableHeader: this.tableHeaders['goodsStation'],
81 + checkData: [],
82 + fileList: [],
83 + errorData: [],
84 + tableHeight: null,
85 + totalCount: 0,
86 + openStatus: '',
87 + loading: false,
88 + open: false,
89 + }
90 + },
91 + created() {
92 +
93 + },
94 + mounted() {
95 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
96 + this.selection(1)
97 + },
98 + watch: {
99 + $route(to, from) {
100 + if (to.name == 'GoodsStation') {
101 + this.selection()
102 + }
103 + }
104 + },
105 + methods: {
106 + //查询
107 + selection(val) {
108 + this.tableData = []
109 + this.checkData = []
110 + this.loading = true
111 + if (val === 1) {
112 + this.selectionData.page = 1
113 + }
114 + searchGoods(this.selectionData).then(res => {
115 + this.loading = false
116 + if (res.code === 200) {
117 + this.tableData = res.data.list
118 + this.totalCount = res.data.total
119 + } else {
120 + this.msgWarning(res.msg)
121 + }
122 + }).catch(err => {
123 + this.loading = false
124 + console.log(err)
125 + })
126 + },
127 + //新增
128 + add() {
129 + this.open = true
130 + this.openStatus = 'add'
131 + },
132 + //删除
133 + del(val) {
134 + this.$confirm("是否要删除这条记录!", "注意!", {
135 + confirmButtonText: "确定",
136 + cancelButtonText: '取消',
137 + type: "warning",
138 + }).then(() => {
139 + this.deleteGoods([val.id])
140 + }).catch(() => {
141 +
142 + })
143 + },
144 + //批量删除
145 + batchDel() {
146 + let arr = []
147 + this.checkData.forEach(item => {
148 + arr.push(item.id)
149 + })
150 + this.$confirm("是否要删除这些记录!", "注意!", {
151 + confirmButtonText: "确定",
152 + cancelButtonText: '取消',
153 + type: "warning",
154 + }).then(() => {
155 + this.deleteGoods(arr)
156 + }).catch(() => {
157 +
158 + })
159 + },
160 + //删除请求
161 + deleteGoods(val) {
162 + batchDeleteGoods(val).then(res => {
163 + if (res.code === 200) {
164 + this.msgSuccess('删除成功!')
165 + this.selection(1)
166 + } else {
167 + this.msgWarning(res.msg)
168 + }
169 + }).catch(err => {
170 + console.log(err)
171 + })
172 + },
173 + //导出
174 + downloadExcel() {
175 + this.open = true
176 + this.openStatus = 'downloadExcel'
177 + },
178 + //复选
179 + tableSelect(val) {
180 + this.checkData = val.selection
181 + },
182 + //全选
183 + tableSelectAll(val) {
184 + this.checkData = val
185 + },
186 + //分页
187 + currentChange(val) {
188 + this.selectionData.page = val.page
189 + this.selection()
190 + },
191 + //上传excel
192 + uploadExcel() {
193 + this.openStatus = 'uploadExcel'
194 + this.open = true
195 + },
196 + //下载模板
197 + downloadTempleate() {
198 + downLoadTemplate('goodsStation').then((res) => {
199 + if (res) {
200 + const blob = new Blob([res]);
201 + const link = document.createElement("a"); //创建a标签
202 + link.download = '货物品名模板.xlsx'; //a标签添加属性
203 + link.style.display = "none";
204 + link.href = URL.createObjectURL(blob);
205 + document.body.appendChild(link);
206 + link.click(); //执行下载
207 + URL.revokeObjectURL(link.href); //释放url
208 + document.body.removeChild(link); //释放标签
209 + } else {
210 + this.$message.error("下载失败");
211 + }
212 + })
213 + },
214 + handleRemove(file, fileList) {
215 + //清掉上传的文件
216 + this.errorData = [];
217 + this.fileList = [];
218 + },
219 + handleExceed(files) {
220 + //重复上传文件
221 + let file = {};
222 + file.file = files[0];
223 + file.name = files[0].name;
224 + this.fileList = [];
225 + this.fileList.push(file);
226 + this.uploadExcel(file);
227 + },
228 + selectLog() {
229 + this.$router.push({ name: 'GoodsUploadLog' })
230 + },
231 + close() {
232 + this.open = false
233 + this.openStatus = ''
234 + this.selection(1)
235 + },
236 + resultClose() {
237 + this.resultOpen = false
238 + this.selection(1)
239 + }
240 + }
241 +}
242 +
243 +</script>
244 +
245 +<style lang="scss" scoped>
246 +
247 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -100,13 +100,13 @@ export default { ...@@ -100,13 +100,13 @@ export default {
100 trigger: "change", 100 trigger: "change",
101 }, 101 },
102 ], 102 ],
103 - // file: [ 103 + file: [
104 - // { 104 + {
105 - // required: true, 105 + required: true,
106 - // message: "文件不能为空", 106 + message: "文件不能为空",
107 - // trigger: "change", 107 + trigger: "change",
108 - // }, 108 + },
109 - // ] 109 + ]
110 }, 110 },
111 fileList: [], 111 fileList: [],
112 errorData: [], 112 errorData: [],
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
176 }, 176 },
177 //导入Excel 177 //导入Excel
178 upload() { 178 upload() {
179 - this.loading = true; 179 + this.loading = true
180 if (this.formData.file != null && this.formData.file != '') { 180 if (this.formData.file != null && this.formData.file != '') {
181 this.$refs['addForm'].validate(val => { 181 this.$refs['addForm'].validate(val => {
182 if (val) { 182 if (val) {
...@@ -211,9 +211,10 @@ export default { ...@@ -211,9 +211,10 @@ export default {
211 } 211 }
212 }) 212 })
213 } else { 213 } else {
214 - this.loading = false; 214 + this.loading = false
215 this.msgWarning('请选择文件后再导入!') 215 this.msgWarning('请选择文件后再导入!')
216 } 216 }
217 +
217 }, 218 },
218 //导出Excel 219 //导出Excel
219 download() { 220 download() {
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
32 </el-button> 32 </el-button>
33 <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px" 33 <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 @click="downloadExcel"> 34 @click="downloadExcel">
35 - 导出Excel 35 + 白名单导出
36 </el-button> 36 </el-button>
37 <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel" 37 <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 - v-hasPermi="['base:goodsStation:add']">导入Excel</el-button> 38 + v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
39 <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志 39 <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
40 </el-button> 40 </el-button>
41 </div> 41 </div>
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
72 selectionData: { 72 selectionData: {
73 goodsStation: '', 73 goodsStation: '',
74 goodsName: '', 74 goodsName: '',
75 + goodsType: 1,
75 size: 20, 76 size: 20,
76 page: 1 77 page: 1
77 }, 78 },
......
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
150 <el-col :span="6"> 150 <el-col :span="6">
151 <el-form-item label="预审状态"> 151 <el-form-item label="预审状态">
152 <el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple> 152 <el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
153 - <el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item" 153 + <el-option v-for="item in findConditionData.preQualificationStatus"
154 - :value="item"> </el-option> 154 + :label="item == '' ? '非预审' : item" :value="item"> </el-option>
155 </el-select> 155 </el-select>
156 </el-form-item> 156 </el-form-item>
157 </el-col> 157 </el-col>
......
...@@ -67,7 +67,6 @@ export default { ...@@ -67,7 +67,6 @@ export default {
67 fltDate: undefined, 67 fltDate: undefined,
68 route: null, 68 route: null,
69 overweight: false, 69 overweight: false,
70 - notInWhite: false,
71 }, 70 },
72 cargoHeader: [ 71 cargoHeader: [
73 { name: "口岸代码", value: "portName", width: "" }, 72 { name: "口岸代码", value: "portName", width: "" },
......
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
97 <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span> 97 <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
98 </div> 98 </div>
99 <Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader" 99 <Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
100 - :selection="false" :order="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="formData.size" 100 + :selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
101 - :page="formData.page" :pageSizes="[100]" :height="tableHeight" @currentChange="currentChange"> 101 + :limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
102 </Tables> 102 </Tables>
103 </div> 103 </div>
104 </template> 104 </template>
......
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
52 </el-button> 52 </el-button>
53 </div> 53 </div>
54 <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true' 54 <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
55 - :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"> 55 + :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
56 + :totalCount="total" :loading="tableLoading" @currentChange="currentChange"
57 + layout="total,prev, pager, next, jumper, ->">
56 </Tables> 58 </Tables>
57 </div> 59 </div>
58 </template> 60 </template>
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
84 </template> 84 </template>
85 85
86 <script> 86 <script>
87 -import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js' 87 +import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, orderRoute } from '@/api/system/dictionary.js'
88 import { queryRouteByFltNo } from "@/api/destinationFlight" 88 import { queryRouteByFltNo } from "@/api/destinationFlight"
89 89
90 export default { 90 export default {
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
30 <el-col :span="12"> 30 <el-col :span="12">
31 <el-form-item label="航线" prop="flightRoute"> 31 <el-form-item label="航线" prop="flightRoute">
32 <el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置" 32 <el-select class="formItem" v-model="formData.flightRoute" placeholder="未设置"
33 - :disabled="routeList.length == 0 || disabled" @change="routeChange"> 33 + :loading="routeLoading" :disabled="routeList.length == 0 || disabled"
34 + @change="routeChange">
34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" 35 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route"
35 :key="item.id"> 36 :key="item.id">
36 <Tooltips :content="item.route" :refName="item.route"></Tooltips> 37 <Tooltips :content="item.route" :refName="item.route"></Tooltips>
...@@ -193,6 +194,7 @@ export default { ...@@ -193,6 +194,7 @@ export default {
193 }, 194 },
194 title: '', 195 title: '',
195 loading: false, 196 loading: false,
197 + routeLoading: false,
196 disabled: false 198 disabled: false
197 } 199 }
198 }, 200 },
...@@ -237,6 +239,7 @@ export default { ...@@ -237,6 +239,7 @@ export default {
237 //获取航线 239 //获取航线
238 getRoute(val) { 240 getRoute(val) {
239 this.routeList = [] 241 this.routeList = []
242 + this.routeLoading = true
240 if (val != 1) { 243 if (val != 1) {
241 this.formData.flightRoute = null 244 this.formData.flightRoute = null
242 } 245 }
...@@ -246,6 +249,7 @@ export default { ...@@ -246,6 +249,7 @@ export default {
246 fltDate: this.formData.flightDate 249 fltDate: this.formData.flightDate
247 } 250 }
248 findFlightRoute(obj).then(res => { 251 findFlightRoute(obj).then(res => {
252 + this.routeLoading = false
249 if (res.code === 200) { 253 if (res.code === 200) {
250 this.routeList = res.data 254 this.routeList = res.data
251 } else { 255 } else {
...@@ -253,6 +257,7 @@ export default { ...@@ -253,6 +257,7 @@ export default {
253 } 257 }
254 this.$refs['superAllocationForm'].clearValidate('flightRoute') 258 this.$refs['superAllocationForm'].clearValidate('flightRoute')
255 }).catch(err => { 259 }).catch(err => {
260 + this.routeLoading = false
256 console.log(err) 261 console.log(err)
257 }) 262 })
258 }, 263 },
......