Elements-SY

Merge branch 'et86' into 2023-08-14

......@@ -83,7 +83,7 @@ export function searchUrsaDestination(data) {
* @param waybillNo 运单号
* @param ursa ursa
* @param typeName 申报类别
* @param siteName 站点
* @param siteName 始发站
* @param regionArray 区域 list
* @param areaArray 地区 list
* @param serviceTypeArray 服务代码 list
......@@ -124,4 +124,4 @@ export function findPreMdeReport(data) {
method: 'post',
data: data
})
}
\ No newline at end of file
}
......
......@@ -143,9 +143,9 @@ export function delFlight(data) {
//查询航线
/**
* @param fltNo 航班号
* @param page 页数
* @param size 页长
* @param fltNo 航班号
* @param page 页数
* @param size 页长
*/
export function queryRoute(data) {
return request({
......@@ -194,8 +194,8 @@ export function orderRoute(data) {
//航线删除确认
/**
* @param fltNo 航班号
* @param route 航线
* @param fltNo 航班号
* @param route 航线
*/
export function checkFlightRoute(data) {
return request({
......@@ -203,4 +203,16 @@ export function checkFlightRoute(data) {
method: 'post',
data: data
})
}
\ No newline at end of file
}
//更新航线
/**
* @param id *
*/
export function updateRoute(id) {
return request({
url: `/dictionary/updateRoute/${id}`,
method: "post",
data: {},
});
}
......
......@@ -69,7 +69,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "80",
ext1: "sorTable",
......@@ -671,7 +671,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "80",
ext1: "sorTable",
......@@ -1764,7 +1764,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "",
ext1: "",
......@@ -1955,7 +1955,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "",
ext1: "",
......@@ -2282,4 +2282,4 @@ let tableHeaders = {
]
}
export default tableHeaders;
\ No newline at end of file
export default tableHeaders;
......
......@@ -200,7 +200,7 @@ export default {
// 拖拽行更新排序
rowDrop() {
const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
console.log("wrapperTr:", wrapperTr);
// console.log("wrapperTr:", wrapperTr);
this.sortable = Sortable.create(wrapperTr, {
sort: this.attrs.isDragSort,
animation: 100,
......@@ -226,7 +226,7 @@ export default {
animation: 100,
delay: 0,
onEnd({ newIndex, oldIndex }) {
console.log("onEnd:", newIndex, oldIndex);
// console.log("onEnd:", newIndex, oldIndex);
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
},
......
......@@ -112,7 +112,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable>
</el-input>
</el-form-item>
......
......@@ -73,7 +73,7 @@ export default {
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "始发站", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
......@@ -266,4 +266,4 @@ export default {
<style>
</style>
\ No newline at end of file
</style>
......
......@@ -396,10 +396,22 @@ export default {
tableEmptyText: "请添加配舱航班",
tableData: [],
currentIndex: 0, // 记录当前table 列的索引位置
id: 0,
};
},
computed: {},
created() {
this.tableData = [
{
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
routeList: [],
isOn: "0" ? false : true,
sort: "0", // 排序字段
},
];
this.getAllDictData();
this.getEdit();
this.PostFindDestinationFltRuleByFlightNo();
......@@ -455,8 +467,12 @@ export default {
list.map((item) => {
routeList.push(item);
});
let isEtesRoute = list.filter(item=>item.isEtesRoute == "Y"); // 过滤普通航线
if(isEtesRoute.length == 0){
this.msgError("该航班下的航线均为普通航线");
}
this.tableData[this.currentIndex].fltRoute = "";
this.tableData[this.currentIndex].routeList = routeList;
this.tableData[this.currentIndex].routeList = isEtesRoute;
} else {
this.msgError("暂无航线");
this.tableData[this.currentIndex].routeList = [];
......@@ -488,11 +504,11 @@ export default {
this.tableData[this.currentIndex].routeList = [];
this.msgError("请输入航班号");
}
}, 800),
}, 1000),
// 添加
addBtn(item) {
console.log("add:", item);
this.tableData.unshift({
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
......@@ -500,6 +516,7 @@ export default {
isOn: "0" ? false : true,
sort: "0", // 排序字段
});
console.log("add:", this.tableData);
},
// 是否爆仓
changeCheck({ $index, row }) {
......
......@@ -153,7 +153,7 @@ export default {
this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
return false;
}
} else if (Number(this.queryForm[name]) < 1) {
} else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
this.$refs.minNumOfPieces.innerHTML = "";
this.$refs.minNumOfPieces.innerHTML =
"最少件数1~100,并且最少件数不得大于最多件数";
......@@ -192,7 +192,7 @@ export default {
this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
return false;
}
} else if (Number(this.queryForm[name]) < 1) {
} else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
this.$refs.minNumOfPieces.innerHTML = "";
this.$refs.minNumOfPieces.innerHTML =
"最多件数1~100,并且最多件数不得小于最小件数";
......
......@@ -22,7 +22,6 @@ export const formConfig = [
prop: "status",
width: "140px",
placeholder: "请选择状态",
rules: { required: true, message: "请选择状态", trigger: "blur" },
options: {
data: [
{
......@@ -34,8 +33,8 @@ export const formConfig = [
label: "无效",
},
],
label: "",
value: "",
label: "有效",
value: "1",
},
},
];
......
......@@ -44,7 +44,9 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {}, // 表单参数
queryForm: { // 表单参数
status: "有效"
},
pageConfig: {
// 分页配置项
isPagination: true,
......@@ -55,7 +57,7 @@ export default {
},
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.editRow, this.deleteRow, this.viewRow), // 表头
columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
tableData: tableData, // 表格数据
selectionList: [], // table复选框筛选集合
};
......@@ -144,7 +146,7 @@ export default {
},
// 删除
deleteRow(item) {
this.$confirm("是否允许删除?", "提示", {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
......@@ -152,17 +154,9 @@ export default {
})
.then(() => {
console.log("删除:", item);
this.$message({
type: "success",
message: "删除成功!",
});
this.msgSuccess("删除成功!")
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
.catch(() => {});
},
// 查看
viewRow({ row }) {
......
......@@ -460,7 +460,7 @@
<el-card shadow="never" style="width: 95%">
<el-checkbox-group v-model="val.puporpuxCode" @change="change">
<el-row>
<el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item">
<el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item.code">
<el-checkbox
v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
:label="item.chineseName" :name="item.chineseName"
......
......@@ -23,7 +23,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1">
</el-input>
</el-form-item>
......@@ -106,7 +106,7 @@ export default {
fltNo: null,
//运单号
waybillNo: "",
//站点
//始发站
siteName: "",
//ursa
ursa: "",
......
......@@ -20,7 +20,7 @@
<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 v-for="item in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
......@@ -279,4 +279,4 @@ export default {
margin-left: 10px;
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -20,7 +20,7 @@
<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 v-for="item in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
......@@ -279,4 +279,4 @@ export default {
margin-left: 10px;
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -72,7 +72,7 @@ export default {
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "始发站", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
......@@ -286,4 +286,4 @@ export default {
};
</script>
<style></style>
\ No newline at end of file
<style></style>
......
......@@ -42,7 +42,7 @@
</el-form-item>
</el-form>
<el-row class="card2">
<el-col :span="1" v-for="item in fltBox" :key="item">
<el-col :span="1" v-for="item in fltBox" :key="item.fltNo">
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
......
......@@ -71,6 +71,7 @@ export default {
const username = localStorage.getItem("username");
const password = localStorage.getItem("password");
const rememberMe = localStorage.getItem("rememberMe");
console.log("rememberMe:", rememberMe)
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : password,
......
......@@ -56,7 +56,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
:rows="4" clearable>
</el-input>
......
......@@ -3,7 +3,7 @@
<el-card style="margin-bottom:10px">
<!-- cardHeader -->
<div slot="header" class="clearfix">
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '始发站' :
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
}}</span>
......@@ -88,7 +88,7 @@
</template>
</Tables>
<!-- 航线表 -->
<Tables v-else-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false"
<Tables v-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false"
:order='true' :height="tableHeight" :data="tableData" :headerData="routeTable" :page="selectDict.page"
:pageSizes="[20]" :totalCount="total" :loading="loading" @currentChange="currentChange"
layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection"
......@@ -100,6 +100,11 @@
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
<el-table-column label="是否为ET86航线" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isEtesRoute" @change="checkboxIsEtesRoute(scope)"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete"
......@@ -166,7 +171,7 @@
<script>
import Dialog from './dialog.vue'
import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute } from '@/api/system/dictionary.js'
import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute, updateRoute } from '@/api/system/dictionary.js'
export default {
name: 'DictionaryConfig',
......@@ -217,6 +222,16 @@ export default {
mounted() {
// this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
},
filters: {
// 是否为ET86航线
isEtesRoute(val) {
if(val == "N"){
return "否"
}else{
return "是"
}
},
},
watch: {
tableName(val, oldVal) {
this.tableName = val
......@@ -228,6 +243,25 @@ export default {
},
},
methods: {
/*
【更新航线】
更新路由成功后不用去调查询接口,
因为即便不去刷新页面调查询接口,
当前checkBox都是当前操作的状态;
所以调不调查询接口没有意义,反而消耗后台服务;
*/
async updateRouteSubmit(params){
await updateRoute(params).then(res=>{
if(res.code == 200){
this.msgSuccess(res.msg)
}else{
this.msgError(res.msg);
}
}).catch(err => {
console.log(err)
this.msgWarning(err)
})
},
//字典名称
dictNameSelect() {
getDictNameList().then(res => {
......@@ -281,6 +315,13 @@ export default {
}
queryRoute(obj).then(res => {
if (res.code === 200) {
res.data.list.map(item=>{
if(item.isEtesRoute == "N"){
item.isEtesRoute = false;
}else{
item.isEtesRoute = true;
}
})
this.tableData = res.data.list
this.total = res.data.total
} else {
......@@ -325,7 +366,15 @@ export default {
} else if (this.tableName === '虚拟航班') {
this.flightDel([val.id])
} else if (this.tableName === '航线') {
this.routeDel({ data: [val], id: [val.id] })
/*
如果该航线是普通航线直接删,如果是ET86航线,那么要查询该航线有没有设置维度,
如果没有直接删,如果已经设置了维度是否考虑将该航线下的维度删掉再进行操作;
*/
if(!val.isEtesRoute){ // 普通航线
this.routeDel({ data: [val], id: [val.id] })
}else{ // ET86航线
}
} else {
this.dicDel([val.id])
}
......@@ -488,6 +537,35 @@ export default {
serviceCodeTableSelectAll(val) {
this.nowSelect = val
},
// 确认消息提示
confirmHandle($index, row){
this.$confirm(row.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.updateRouteSubmit(row.id);
})
.catch(() => {
this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute;
});
},
// checkBox是否设置ET86航线
checkboxIsEtesRoute({ $index, row }){
if(!row.isEtesRoute){
/*
将ET86设置成普通航线要查询校验该航线有没有设置维度,
如果该航线设置了ET86维度是否考虑将该航线下的维度删掉再进行操作;
*/
row.msg = "是否将该航线设置为非ET86航线?";
this.confirmHandle($index, row)
}else{
row.msg = "是否将该航线设置为ET86航线?";
this.confirmHandle($index, row)
}
}
}
}
</script>
......