jinhui.wang

黑名单导出增加,文本修正,bug修复

......@@ -55,10 +55,11 @@ export function searchGoods(data) {
//查询货站
/**
*/
export function findStationName() {
export function findStationName(data) {
return request({
url: '/goods/findStationName',
method: 'post',
data: data
})
}
......
......@@ -2112,6 +2112,13 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "导入来源",
columnName: "module",
columnWidth: "",
ext1: "",
status: 1
},
{
columnChineseName: "货站名称",
columnName: "ext",
columnWidth: "",
......
......@@ -91,7 +91,7 @@ export const constantRoutes = [
meta: { title: '错误信息提示', icon: 'user' }
},
{
path: '/goodsLog',
path: '/goodsLog/type=:type',
component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
name: 'GoodsUploadLog',
meta: { title: '导入日志', icon: 'user' }
......
......@@ -126,7 +126,7 @@ export default {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName().then(res => {
findStationName({ goodsType: 2 }).then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
......@@ -221,8 +221,8 @@ export default {
this.$refs['addForm'].validate(val => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation }
downLoadXlsx("/goods/exportGoods", data, "货站表")
let data = { goodsStation: this.formData.goodsStation, goodsType: 2 }
downLoadXlsx("/goods/exportGoods", data, "黑名单货站表")
.then(() => {
this.downloading = false
this.close()
......
......@@ -30,10 +30,10 @@
<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"
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
@click="downloadExcel">
黑名单导出
</el-button> -->
</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()">查询导入日志
......@@ -199,7 +199,7 @@ export default {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.download = '黑名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
......@@ -226,7 +226,7 @@ export default {
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
this.$router.push({ name: 'GoodsUploadLog', params: { type: 2 } })
},
close() {
this.open = false
......
......@@ -126,7 +126,7 @@ export default {
//查询货站
getgoods() {
this.goodsStationLoading = true
findStationName().then(res => {
findStationName({ goodsType: 1 }).then(res => {
this.goodsStationLoading = false
if (res.code === 200) {
this.goodsStationList = res.data.list
......@@ -221,8 +221,8 @@ export default {
this.$refs['addForm'].validate(val => {
if (val) {
this.downloading = true
let data = { goodsStation: this.formData.goodsStation }
downLoadXlsx("/goods/exportGoods", data, "货站表")
let data = { goodsStation: this.formData.goodsStation, goodsType: 1 }
downLoadXlsx("/goods/exportGoods", data, "白名单货站表")
.then(() => {
this.downloading = false
this.close()
......
......@@ -43,6 +43,7 @@ export default {
methods: {
//日志查询
selectLog(val) {
this.logTabelData = []
if (val === 1) {
this.logData.page = 1
}
......@@ -50,8 +51,14 @@ export default {
userImportLog(this.logData).then(res => {
this.loading = false
if (res.code === 200) {
this.logCount = res.data.total
this.logTabelData = res.data.list
res.data.list.forEach(item => {
if (this.$route.params.type == 1 && item.module == '白名单导入') {
this.logTabelData.push(item)
} else if (this.$route.params.type == 2 && item.module == '黑名单导入') {
this.logTabelData.push(item)
}
})
this.logCount = this.logTabelData.length
} else {
this.msgWarning(res.msg)
}
......
......@@ -199,7 +199,7 @@ export default {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = '货物品名模板.xlsx'; //a标签添加属性
link.download = '白名单货物品名模板.xlsx'; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
......@@ -226,7 +226,7 @@ export default {
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
this.$router.push({ name: 'GoodsUploadLog', params: { type: 1 } })
},
close() {
this.open = false
......
......@@ -150,11 +150,17 @@
<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>
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
......@@ -164,12 +170,12 @@
<el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
:type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(0)"
:disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" icon="el-icon-download"
:type="downLoadingTip.downloading ? 'warning' : 'primary'" size="small" @click="xlse(1)"
:disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" icon="el-icon-s-flag" :disabled="selectTable.length == 0"
v-hasPermi="['base:cargo:release']" @click="release">释放舱位</el-button>
......@@ -206,7 +212,7 @@
<template v-slot:waybillNo="scope">
<el-link type="primary" @click="logView(scope.row)">
{{
scope.row.waybillNo
scope.row.waybillNo
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
......@@ -259,6 +265,7 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -362,13 +369,14 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
this.select(0)
// this.select(0,'create')
},
activated() {
this.selectTable = []
this.cargoTotal()
if (this.$route.params.fltNo) {
console.log(1)
//判断进入页面是否带参,确定是否是index跳转
this.formData = {
fltDateStart: "",
......@@ -387,6 +395,8 @@ export default {
typeId: null,
statusId: null,
serviceTypeId: null,
shipperAccount: null,
shipperAccountList: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
......@@ -399,20 +409,21 @@ export default {
limitStart: 1,
limitSize: 100,
}
console.log(this.$route)
this.cargoPlaneTime = [this.$route.params.fltDate, this.$route.params.fltDate]
this.formData.cargoPlaneStart = this.$route.params.fltDate
this.formData.cargoPlaneEnd = this.$route.params.fltDate
this.formData.cargoPlaneNo = this.$route.params.fltNo
this.formData.cargoPlaneRoute = this.$route.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
this.planeNoChange(this.formData.cargoPlaneNo.split(';'))
this.select(0, 'activated')
} else {
//否则请求原页面缓存状态
if (this.$store.state.tagsView.cachedViews.length > 0) {
this.$store.state.tagsView.cachedViews.forEach(item => {
if (item === 'QueryCargo') {
this.findCondition()
this.totalCount > 0 ? this.select() : ''
this.select()
}
})
}
......@@ -439,44 +450,46 @@ export default {
watch: {
$route: {
handler(to, from) {
if (to.name === 'Index') {
this.formData = {
fltDateStart: "",
fltDateEnd: "",
prematchFltDateStart: "",
prematchFltDateEnd: "",
createTimeStart: null,
createTimeEnd: null,
pickUpDate: null,
hasFlight: null,
waybillNo: "",
siteName: "",
fltNo: "",
mawbCode: "",
ursa: "",
typeId: null,
statusId: null,
serviceTypeId: null,
allocationTypeId: null,
kindToAllocFlightId: null,
historyAllocaCargoTypeId: null,
dataSources: "",
customsReceiptStatusId: null,
big: null,
cargoPlaneNo: null,
cargoPlaneStart: null,
cargoPlaneEnd: null,
limitStart: 1,
limitSize: 100,
}
this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
this.formData.cargoPlaneStart = from.params.fltDate
this.formData.cargoPlaneEnd = from.params.fltDate
this.formData.cargoPlaneNo = from.params.fltNo
this.formData.cargoPlaneRoute = from.params.route
this.planeNoChange(this.formData.cargoPlaneNo)
this.select(0)
}
// if (to.name === 'Index') {
// this.formData = {
// fltDateStart: "",
// fltDateEnd: "",
// prematchFltDateStart: "",
// prematchFltDateEnd: "",
// createTimeStart: null,
// createTimeEnd: null,
// pickUpDate: null,
// hasFlight: null,
// waybillNo: "",
// siteName: "",
// fltNo: "",
// mawbCode: "",
// ursa: "",
// typeId: null,
// statusId: null,
// serviceTypeId: null,
// shipperAccount: null,
// shipperAccountList: null,
// allocationTypeId: null,
// kindToAllocFlightId: null,
// historyAllocaCargoTypeId: null,
// dataSources: "",
// customsReceiptStatusId: null,
// big: null,
// cargoPlaneNo: null,
// cargoPlaneStart: null,
// cargoPlaneEnd: null,
// limitStart: 1,
// limitSize: 100,
// }
// this.cargoPlaneTime = [from.params.fltDate, from.params.fltDate]
// this.formData.cargoPlaneStart = from.params.fltDate
// this.formData.cargoPlaneEnd = from.params.fltDate
// this.formData.cargoPlaneNo = from.params.fltNo
// this.formData.cargoPlaneRoute = from.params.route
// this.planeNoChange(this.formData.cargoPlaneNo)
// this.select(0, 'watch')
// }
}
},
formShow(val, oldVal) {
......@@ -498,7 +511,7 @@ export default {
});
},
//查询
async select(val) {
async select(val, type) {
this.selectTable = []
this.tableData = [];
this.allWeight = 0;
......@@ -642,6 +655,12 @@ export default {
if (this.formData.hasFlight == "") {
this.formData.hasFlight = null
}
if (this.formData.shipperAccount != null && this.formData.shipperAccount != '') {
this.formData.shipperAccountList = this.formData.shipperAccount.split(';')
} else {
this.formData.shipperAccountList = null
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = 100;
},
......@@ -677,7 +696,7 @@ export default {
},
//配载航班号获取航线
planeNoChange(val) {
getFlightsRoutes(val.split(';')).then(res => {
getFlightsRoutes(val).then(res => {
if (res.code === 200) {
this.routeList = res.data
} else {
......