zhanbo.xu

feat: 优化

......@@ -6,7 +6,7 @@ VUE_APP_BASE_ENV = "dev"
VUE_APP_Version = '1.0.0'
# FedEx 在线申报工具/开发环境
VUE_APP_BASE_API = 'http://101.132.100.41:7001/EcomExp'
VUE_APP_BASE_API = 'http://101.132.100.41:7008/EcomExp'
VUE_APP_BASE_ROUTE = '/EcomDev'
......
/**
/**
* 通用css样式布局处理
* Copyright (c) 2019 ruoyi
*/
/** 基础通用 **/
.pt5 {
/** 基础通用 **/
.pt5 {
padding-top: 5px;
}
}
.pr5 {
.pr5 {
padding-right: 5px;
}
}
.pb5 {
.pb5 {
padding-bottom: 5px;
}
}
.pl10 {
.pl10 {
padding-left: 10px;
}
}
.mt5 {
.mt5 {
margin-top: 5px;
}
}
.mr5 {
.mr5 {
margin-right: 5px;
}
}
.mb5 {
.mb5 {
margin-bottom: 5px;
}
}
.mb8 {
.mb8 {
margin-bottom: 8px;
}
}
.ml5 {
.ml5 {
margin-left: 5px;
}
}
.mt10 {
.mt10 {
margin-top: 10px;
}
}
.mr10 {
.mr10 {
margin-right: 10px;
}
}
.mb10 {
.mb10 {
margin-bottom: 10px;
}
}
.ml0 {
.ml0 {
margin-left: 10px;
}
}
.mt20 {
.mt20 {
margin-top: 20px;
}
}
.mr20 {
.mr20 {
margin-right: 20px;
}
}
.mb20 {
.mb20 {
margin-bottom: 20px;
}
}
.m20 {
.m20 {
margin-left: 20px;
}
.el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important;
}
.textCenter {
}
.el-dialog:not(.is-fullscreen) {
margin-top: 1vh !important;
}
.el-dialog {
top: 40% !important;
}
.textCenter {
text-align: center;
}
}
/** 表单布局 **/
.form-header {
/** 表单布局 **/
.form-header {
font-size: 15px;
color: #6379bb;
border-bottom: 1px solid #ddd;
margin: 8px 10px 25px 10px;
padding-bottom: 5px
}
padding-bottom: 5px;
}
/** 表格布局 **/
.pagination-container {
/** 表格布局 **/
.pagination-container {
position: relative;
height: 25px;
margin-bottom: 10px;
margin-top: 15px;
padding: 10px 20px !important;
}
}
/* tree border */
.tree-border {
/* tree border */
.tree-border {
margin-top: 5px;
border: 1px solid #e5e6e7;
background: #FFFFFF none;
background: #ffffff none;
border-radius: 4px;
}
}
.pagination-container .el-pagination {
.pagination-container .el-pagination {
right: 0;
position: absolute;
}
}
.el-table .fixed-width .el-button--mini {
.el-table .fixed-width .el-button--mini {
padding-left: 0;
padding-right: 0;
width: inherit;
}
}
.el-tree-node__content>.el-checkbox {
.el-tree-node__content > .el-checkbox {
margin-right: 8px;
}
}
.list-group-striped>.list-group-item {
.list-group-striped > .list-group-item {
border-left: 0;
border-right: 0;
border-radius: 0;
padding-left: 0;
padding-right: 0;
}
}
.list-group {
.list-group {
padding-left: 0px;
list-style: none;
}
}
.list-group-item {
.list-group-item {
border-bottom: 1px solid #e7eaec;
border-top: 1px solid #e7eaec;
margin-bottom: -1px;
padding: 11px 0px;
font-size: 13px;
}
}
.pull-right {
.pull-right {
float: right !important;
}
}
.el-card__header {
.el-card__header {
padding: 14px 15px 7px;
min-height: 40px;
}
}
.el-card__body {
.el-card__body {
padding: 15px 20px 20px 20px;
}
}
.card-box {
.card-box {
padding-right: 15px;
padding-left: 15px;
margin-bottom: 10px;
}
/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
background: #20B2AA;
border-color: #20B2AA;
color: #FFFFFF;
}
.el-button--cyan:focus,
.el-button--cyan:hover {
background: #48D1CC;
border-color: #48D1CC;
color: #FFFFFF;
}
.el-button--cyan {
background-color: #20B2AA;
border-color: #20B2AA;
color: #FFFFFF;
}
/* text color */
.text-navy {
}
/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
background: #20b2aa;
border-color: #20b2aa;
color: #ffffff;
}
.el-button--cyan:focus,
.el-button--cyan:hover {
background: #48d1cc;
border-color: #48d1cc;
color: #ffffff;
}
.el-button--cyan {
background-color: #20b2aa;
border-color: #20b2aa;
color: #ffffff;
}
/* text color */
.text-navy {
color: #1ab394;
}
}
.text-primary {
.text-primary {
color: inherit;
}
}
.text-success {
.text-success {
color: #1c84c6;
}
}
.text-info {
.text-info {
color: #23c6c8;
}
}
.text-warning {
.text-warning {
color: #f8ac59;
}
}
.text-danger {
.text-danger {
color: #ed5565;
}
}
.text-muted {
.text-muted {
color: #888888;
}
}
/* image */
.img-circle {
/* image */
.img-circle {
border-radius: 50%;
}
}
.img-lg {
.img-lg {
width: 120px;
height: 120px;
}
}
.avatar-upload-preview {
.avatar-upload-preview {
position: absolute;
top: 50%;
transform: translate(50%, -50%);
......@@ -230,16 +232,16 @@
border-radius: 50%;
box-shadow: 0 0 4px #ccc;
overflow: hidden;
}
}
/* 拖拽列样式 */
.sortable-ghost {
opacity: .8;
/* 拖拽列样式 */
.sortable-ghost {
opacity: 0.8;
color: #fff !important;
background: #42b983 !important;
}
}
.top-right-btn {
.top-right-btn {
position: relative;
float: right;
}
\ No newline at end of file
}
......
......@@ -12,7 +12,6 @@
:show-header="showHeader"
:show-summary="showSummary"
:summary-method="getSummaries"
:height="height"
:empty-text="emptyText"
:max-height="maxHeight"
:highlight-current-row="highlightCurrentRow"
......@@ -427,25 +426,28 @@ export default {
limitSize() {
this.sizes = this.limitSize;
},
data(val) {
let table = document.querySelector(".el-table__body-wrapper");
let tableBody = document.querySelector(".el-table__body");
if (this.data != null && this.data.length > 0) {
this.rowData = [this.data[0]];
this.data.forEach((item, index) => {
item.index = index;
});
}
this.$nextTick(() => {
if (table) {
table.style.maxHeight = this.maxHeight;
tableBody.clientHeight >= parseInt(this.maxHeight)
? (table.style.height = this.maxHeight - 40 + "px")
: (table.style.height = tableBody.clientHeight + "px");
this.$refs.tables.doLayout();
}
});
},
// data(val) {
// let table = document.querySelector(".el-table__body-wrapper");
// let tableBody = document.querySelector(".el-table__body");
// if (this.data != null && this.data.length > 0) {
// this.rowData = [this.data[0]];
// this.data.forEach((item, index) => {
// item.index = index;
// });
// }
// this.$nextTick(() => {
// if (table) {
// table.style.maxHeight = this.maxHeight + "px";
// if (val.length * 50 > this.maxHeight) {
// table.style.height = this.maxHeight + "px";
// } else {
// table.style.height = val.length * 50 + "px";
// }
// console.log(table);
// this.$refs.tables.doLayout();
// }
// });
// },
expandRowKeys(val) {
let tableBodyRow = document.getElementsByClassName("el-table__row");
if (val.length > 0) {
......@@ -466,8 +468,13 @@ export default {
},
},
mounted() {
let table = document.querySelector(".el-table__body-wrapper");
table.style.maxHeight = this.maxHeight + "px";
// this.$nextTick(() => {
// let table = document.querySelector(".el-table__body-wrapper");
// console.log(this.maxHeight, this.maxHeight);
// table.style.maxHeight = this.maxHeight + "px";
// // table.style.height = this.maxHeight + "px";
// console.log(table.style.maxHeight);
// });
},
methods: {
sizeChange(val) {
......
......@@ -17,7 +17,32 @@
</div>
<div v-loading="tableLoading">
<slot name="title"></slot>
<Table
<div style="height: 10px"></div>
<el-table
:pagination="false"
:border="true"
:empty-text="
loadingDatas &&
rowData &&
rowData.popoverData &&
!rowData.popoverData.length
? '数据加载中'
: $t('portEntry.emptyText')
"
:data="rowData.popoverData"
rowKey="id"
>
<el-table-column
v-for="(item, index) in receiptDataHead"
:key="index"
:prop="item.value"
:label="item.name"
:align="item.align"
:width="item.width"
>
</el-table-column>
</el-table>
<!-- <Table
class="fedexDetialTable mt20"
:data="rowData.popoverData"
:headerData="receiptDataHead"
......@@ -39,11 +64,11 @@
? '数据加载中'
: $t('portEntry.emptyText')
"
:height="tableHeight + 'px'"
:maxHeight="tableHeight + 'px'"
:height="tableHeight"
:maxHeight="tableHeight"
rowKey="id"
>
</Table>
</Table> -->
</div>
<el-button
slot="reference"
......@@ -90,7 +115,6 @@ export default {
data() {
return {
tableLoading: false,
tableHeight: 350,
};
},
computed: {
......@@ -98,17 +122,8 @@ export default {
return this.$store.state.viewOption.loadingDatas;
},
},
mounted() {
this.calculateTableHeight();
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
calculateTableHeight() {
this.tableHeight = window.innerHeight - 300;
},
//弹框关闭
popoverClose() {
this.$emit("popoverClose");
......@@ -176,4 +191,18 @@ export default {
};
</script>
<style></style>
<style lang="scss" scoped>
.tableList {
width: 200px;
max-height: 500px;
padding: 5px;
margin: 0;
position: absolute;
bottom: 35px;
right: 0px;
border: 1px solid #ccc;
border-radius: 3%;
background: #fff;
overflow-y: scroll;
}
</style>
......
......@@ -132,8 +132,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:maxHeight="tableMaxheight"
:border="true"
:pagination="true"
:order="false"
......@@ -298,13 +297,13 @@ export default {
loadings: {
sreachLoading: false,
},
tableMaxheight: 500,
tableMaxheight: null,
outerVisible: false,
};
},
created() {
this.search(0);
this.calculateTableHeight();
this.tableMaxheight = window.innerHeight - 300;
},
watch: {
$route(val, oldval) {
......@@ -312,12 +311,6 @@ export default {
},
},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
// 运单号跳转
linkChange(record, type) {
......@@ -361,9 +354,7 @@ export default {
this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY =
"auto";
},
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询回执
receiptApi(billNo, type) {
return new Promise((resolve, reject) => {
......
......@@ -271,7 +271,7 @@ export default {
loadings: {
searchLoading: false,
},
tableMaxheight: 500,
tableMaxheight: null,
outerVisible: false,
dialogTitle: "",
editType: "",
......@@ -282,18 +282,10 @@ export default {
created() {
this.searchPortDictData();
this.search(0);
this.calculateTableHeight();
},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
methods: {
//查询
search(val) {
this.loadings.searchLoading = true;
......
......@@ -57,7 +57,11 @@
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict.RECEIPT_STATUS.filter(fItem => fItem.itemChineseName !== '已提交')"
v-for="(
item, index
) in $store.getters.dict.RECEIPT_STATUS.filter(
(fItem) => fItem.itemChineseName !== '已提交'
)"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
......@@ -149,7 +153,7 @@
>
<div slot="title">
<span style="font-weight: 700; color: #515a6e">订单编号:</span
>{{ scope.row.orderno }}
>{{ scope.row.orderNo }}
</div>
<div slot="buttonLabel">
{{ scope.row.returnStatus }}
......@@ -324,7 +328,6 @@ export default {
}
getAllExportingBills(obj)
.then((res) => {
if (res.code === "200") {
this.tableData = res.data.value;
this.page.total = res.data.totalItems;
......@@ -376,7 +379,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$store.dispatch("setLoadingState", false);
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -205,7 +205,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:maxHeight="tableMaxheight"
:maxHeight="500"
:border="true"
:pagination="true"
:order="false"
......@@ -378,7 +378,9 @@ export default {
this.search(0);
},
mounted() {
this.$nextTick(() => {
this.tableMaxheight = window.innerHeight - 300;
});
},
watch: {
$route() {
......
......@@ -2,80 +2,40 @@
<el-dialog
class="entryDialog classCUploadDialog"
title="运抵单申报"
:visible.sync="outerVisible"
:show-close="false"
:visible.sync="visible"
top="8vh"
width="720px"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close(false)"
@close="close()"
>
<div class="modelItem">
<el-form
class="fedexFormStyle"
ref="formData"
:model="formData"
label-position="top"
size="small"
>
<el-row :gutter="5">
<el-col :span="8">
<Formitem label="监管场所" prop="operatorCode" type="edit">
<el-select
type="text"
id="inputInner-edit-operatorCode"
v-model="formData.operatorCode"
clearable
filterable
placeholder=""
>
<el-option
v-for="item in operatorCode"
:key="item.operatorCode"
:label="item.operatorName"
:value="item.operatorCode"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="8">
<Formitem
label="境内运输工具编码"
prop="domesticTrafNo"
type="edit"
>
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-domesticTrafNo"
resize="none"
v-model="formData.domesticTrafNo"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
</el-row>
</el-form>
</div>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
:disabled="loadings.submitLoading"
@click="submit"
>确 定</el-button
>
<el-button class="entrySaveButton" @click="close(false)">关 闭</el-button>
<el-descriptions class="margin-top" title="" :column="3" border>
<el-descriptions-item>
<template slot="label"> 用户名 </template>
kooriookami
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 手机号 </template>
18100000000
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 居住地 </template>
苏州市
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 备注 </template>
<el-tag size="small">学校</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 联系地址 </template>
江苏省苏州市吴中区吴中大道 1188 号
</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
</template>
<script>
import {
getCurrUserOperatorCode,
declareUpload,
} from "@/api/declareData-api.js";
export default {
props: {
outerVisible: {
......@@ -89,79 +49,22 @@ export default {
},
},
},
watch: {
outerVisible(val) {
if (val) {
this.loadings.dialogLoading = false;
this.fetchOperatorCode();
}
},
},
data() {
return {
formData: {
operatorCode: "",
domesticTrafNo: "",
},
loadings: {
dialogLoading: false,
submitLoading: false,
},
loadingText: "",
operatorCode: [],
visible: false,
};
},
methods: {
fetchOperatorCode() {
getCurrUserOperatorCode().then((res) => {
if (res.code === "200") {
this.operatorCode = res.data;
}
});
},
//数据保存
submit() {
this.loadings.dialogLoading = true;
let obj = {
...this.formData,
declareIds: this.selected.map((item) => item.declareId),
type: "arrivalIn",
};
this.$refs.formData.validate((valid) => {
if (valid) {
this.addapi(obj);
} else {
this.loadings.dialogLoading = false;
watch: {
outerVisible(val) {
if (val) {
this.visible = val;
}
});
},
//新增
addapi(val) {
declareUpload(val)
.then((res) => {
if (res.code === "200") {
this.msgSuccess(res.message);
this.close(true);
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
}
})
.catch((err) => {
console.log(err);
this.loadings.dialogLoading = false;
});
},
close(flag) {
this.formData = {
operatorCode: "",
domesticTrafNo: "",
};
this.loadings.dialogLoading = false;
this.$emit("close", flag);
methods: {
close() {
this.visible = false;
this.$emit("close", false);
},
},
};
......
......@@ -81,6 +81,7 @@
type="primary"
class="dropdown-style-button"
@click="addDeclare"
:loading="loadings.postLoading"
>
<svg-icon
class="el-icon-user-solid"
......@@ -94,8 +95,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:maxHeight="tableMaxheight"
:border="true"
:pagination="true"
:order="false"
......@@ -112,6 +112,13 @@
@tableSelectAll="tableSelectAll"
:selected="selected"
>
<template slot="optionColumn">
<el-table-column align="center" label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="detail(scope.row)"> 详情 </el-button>
</template>
</el-table-column>
</template>
</Table>
<DialogVue
:outerVisible="outerVisible"
......@@ -122,7 +129,7 @@
</template>
<script>
import { getHsCodeList } from "@/api/arrivalList-api.js";
import { getHsCodeList, getHsCodeIncr } from "@/api/arrivalList-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
......@@ -191,23 +198,18 @@ export default {
loadings: {
sreachLoading: false,
postLoading: false,
},
tableMaxheight: 500,
tableMaxheight: null,
outerVisible: false,
};
},
created() {
this.search(0);
this.calculateTableHeight();
this.tableMaxheight = window.innerHeight - 300;
},
watch: {},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
tableSelect(val) {
this.selected = val.selection;
......@@ -224,10 +226,6 @@ export default {
}
},
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
clear() {
this.$refs.sreachForm.resetFields();
//重置数据
......@@ -272,21 +270,37 @@ export default {
.catch((err) => {
console.log(err);
this.loadings.sreachLoading = false;
})
.finally(() => {
console.log("finally");
});
},
addDeclare() {
if (this.selected.length === 0) {
this.alertWarningMsg("请选择数据!");
return;
this.loadings.postLoading = true;
getHsCodeIncr()
.then((res) => {
if (res.code === "200") {
this.loadings.postLoading = false;
this.alertSuccessMsg(res.message);
} else {
this.alertWarningMsg(res.message);
}
this.loadings.postLoading = false;
})
.catch((err) => {
console.log(err);
this.loadings.postLoading = false;
})
.finally(() => {
console.log("finally");
});
},
detail() {
this.outerVisible = true;
},
dialogClose(flag = false) {
dialogClose() {
this.outerVisible = false;
if (flag) {
this.search(0);
}
},
//分页
currentChange(val) {
......
......@@ -109,14 +109,12 @@
</el-row>
</el-form>
<div style="height: 20px"></div>
<!-- :maxHeight="tableMaxheight + 'px'" -->
<Table
class="fedexDetialTable fedexSreachTable"
ref="entryTable"
:data="tableData"
:headerData="headerData"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:maxHeight="tableMaxheight"
:border="true"
:pagination="true"
:order="false"
......@@ -225,26 +223,19 @@ export default {
loadings: {
searchLoading: false,
},
tableMaxheight: 500,
tableMaxheight: null,
statusList: [],
};
},
created() {
this.search(0);
this.calculateTableHeight();
this.tableMaxheight = window.innerHeight - 300;
},
mounted() {
this.tableMaxheight = window.innerHeight - 300;
this.fetchStatusList();
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
fetchStatusList() {
getDictData({ doctCode: "RESPONSE_STATE" })
.then((res) => {
......
......@@ -270,8 +270,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:maxHeight="tableMaxheight"
:border="true"
:pagination="true"
:order="false"
......@@ -667,7 +666,7 @@ export default {
arrivalInLoading: false, // 运抵单申报加载状态
},
textareaVisible: {},
tableMaxheight: 500,
tableMaxheight: null,
outerVisible: false,
dropdownName: "一键申报",
dropdownCode: "full",
......@@ -684,8 +683,6 @@ export default {
};
},
created() {
this.calculateTableHeight();
try {
if (this.$route.query.billNo && this.$route.query.search == "true") {
this.sreachFormData.billNo = this.$route.query.billNo;
......@@ -695,14 +692,13 @@ export default {
console.log(error);
} finally {
this.search(0);
this.tableMaxheight = window.innerHeight - 300;
}
},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
console.log(this.tableMaxheight);
},
watch: {
$route(val, oldval) {
this.popoverClose();
......@@ -755,9 +751,7 @@ export default {
this.search(0);
}
},
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询申报数据
search(val) {
this.loadings.sreachLoading = true;
......
......@@ -194,8 +194,7 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:maxHeight="tableMaxheight"
:border="true"
:pagination="true"
:order="false"
......@@ -373,28 +372,20 @@ export default {
formItemconsignmentCode: false,
formItemconsignmentHeadCode: false,
},
tableMaxheight: 500,
tableMaxheight: null,
};
},
created() {
this.search(0);
this.calculateTableHeight();
},
mounted() {
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
this.tableMaxheight = window.innerHeight - 300;
},
watch: {
$route() {
this.popoverClose();
},
},
methods: {
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询
search(val) {
this.loadings.searchLoading = true;
......