Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-08-30 14:26:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2ef99cce962d9a0f751da52904538a416de75960
2ef99cce
1 parent
9e3c0a05
et86黑名单维护
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
826 additions
and
96 deletions
src/api/et86HsCodeBlack.js
src/components/YlTable/index.vue
src/layout/index.vue
src/layout/mixin/ResizeHandler.js
src/router/index.js
src/store/getters.js
src/store/modules/app.js
src/utils/index.js
src/utils/request.js
src/views/et86Config/et86HsCodeBlack/errorInfo/index.vue → src/views/et86Config/errorInfo/index.vue
src/views/et86Config/et86HsCodeBlack/errorInfo/tableConfig.js → src/views/et86Config/errorInfo/tableConfig.js
src/views/et86Config/et86HsCodeBlack/formConfig.js
src/views/et86Config/et86HsCodeBlack/index.vue
src/views/et86Config/et86HsCodeBlack/tableConfig.js
src/views/et86Config/et86RuleConfig/index.vue
src/views/et86Config/et86RuleConfig/tableConfig.js
src/views/et86Config/et86ShipmentDesc/components/ModleView.vue
src/views/et86Config/et86ShipmentDesc/formConfig.js
src/views/et86Config/et86ShipmentDesc/index.vue
src/views/et86Config/et86ShipmentDesc/tableConfig.js
src/views/systemConfig/superAllocation/index.vue
src/views/systemLog/dmLog/index.vue
src/api/et86HsCodeBlack.js
0 → 100644
View file @
2ef99cc
import
request
from
"@/utils/request"
;
// HScode黑名单查询
export
function
findHsCodeList
(
data
)
{
return
request
({
url
:
"/etes/findHsCodeList"
,
method
:
"post"
,
data
:
data
,
});
}
// HScode黑名单删除
export
function
delBlackList
(
data
)
{
return
request
({
url
:
"/etes/delBlackList"
,
method
:
"post"
,
data
:
data
,
});
}
// HScode黑名单下载模板
export
function
downLoadTemplate
(
template
)
{
return
request
({
url
:
"/etes/downLoadTemplate?template="
+
template
,
method
:
"get"
,
responseType
:
"blob"
,
});
}
// HScode黑名单导入
export
function
uploadHsCode
(
data
)
{
return
request
({
url
:
"/etes/uploadHsCode"
,
method
:
"post"
,
data
:
data
,
});
}
src/components/YlTable/index.vue
View file @
2ef99cc
<template>
<div class="table-container">
<el-row v-if="attrs.btnCofig.isBtn" style="margin-bottom: 15px">
<el-row
v-if="attrs.btnCofig.isBtn"
style="margin-bottom: 15px"
id="group-btn"
>
<el-col>
<span
v-for="(item, i) in attrs.btnCofig.btnGroup"
...
...
@@ -13,8 +17,8 @@
:round="item.round"
:size="item.size"
:loading="item.loading"
@click="handleClick(item)"
v-if="item.btnName !== '导入' && item.btnName !== '
导出
'"
@click="handleClick(item
, i
)"
v-if="item.btnName !== '导入' && item.btnName !== '
增加
'"
>{{ item.btnName }}</el-button
>
<el-upload
...
...
@@ -62,8 +66,10 @@
<!-- 分页 -->
<div
v-if="pageConfig.isPagination"
id="pagination"
class="pagination-container"
:style="{ textAlign: pageConfig.position || 'right' }"
ref="paginationRef"
>
<el-pagination
background
...
...
@@ -219,8 +225,8 @@ export default {
this.$emit("currentChange", e);
},
// btn点击事件注册
handleClick(item) {
this.$emit(item.event, item);
handleClick(item
, i
) {
this.$emit(item.event, item
, i
);
},
// 拖拽行更新排序
rowDrop() {
...
...
@@ -259,6 +265,9 @@ export default {
},
// 选择上传
toUpload(options) {
this.$refs.upload.map((item) => {
item.clearFiles(); //上传成功之后清除历史记录
});
this.$emit("upload", options);
},
//移除上传
...
...
src/layout/index.vue
View file @
2ef99cc
...
...
@@ -4,7 +4,7 @@
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }"
ref="headerBlock"
>
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
...
...
src/layout/mixin/ResizeHandler.js
View file @
2ef99cc
import
store
from
'@/store'
import
store
from
"@/store"
;
const
{
body
}
=
document
const
WIDTH
=
992
// refer to Bootstrap's responsive design
const
{
body
}
=
document
;
const
WIDTH
=
992
;
// refer to Bootstrap's responsive design
export
default
{
watch
:
{
$route
(
route
)
{
this
.
getBlockCurrentHeight
();
if
(
this
.
device
===
"mobile"
&&
this
.
sidebar
.
opened
)
{
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
false
});
}
...
...
@@ -23,7 +24,9 @@ export default {
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
}
this
.
$nextTick
(()
=>
{
this
.
getBlockCurrentHeight
();
})
},
methods
:
{
// use $_ for mixins properties
...
...
@@ -42,9 +45,9 @@ export default {
}
}
},
getBlockCurrentHeight
()
{;
// console.log(this.$refs.headerBlock, this.$refs.headerBlock.clientHeight)
;
// console.log(this.$refs.appMainBlock
);
}
getBlockCurrentHeight
()
{
let
height
=
this
.
$refs
.
appMainBlock
.
$el
.
clientHeight
;
this
.
$store
.
dispatch
(
"app/setAppMainBlockCH"
,
height
);
}
,
},
};
...
...
src/router/index.js
View file @
2ef99cc
...
...
@@ -82,7 +82,7 @@ export const constantRoutes = [
{
path
:
"/errorInfo"
,
component
:
(
resolve
)
=>
require
([
"@/views/et86Config/e
t86HsCodeBlack/e
rrorInfo"
],
resolve
),
require
([
"@/views/et86Config/errorInfo"
],
resolve
),
name
:
"errorInfo"
,
meta
:
{
title
:
"错误信息提示"
,
icon
:
"user"
},
},
...
...
src/store/getters.js
View file @
2ef99cc
const
getters
=
{
sidebar
:
state
=>
state
.
app
.
sidebar
,
size
:
state
=>
state
.
app
.
size
,
device
:
state
=>
state
.
app
.
device
,
visitedViews
:
state
=>
state
.
tagsView
.
visitedViews
,
cachedViews
:
state
=>
state
.
tagsView
.
cachedViews
,
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
,
roles
:
state
=>
state
.
user
.
roles
,
permissions
:
state
=>
state
.
user
.
permissions
,
permission_routes
:
state
=>
state
.
permission
.
routes
,
topbarRouters
:
state
=>
state
.
permission
.
topbarRouters
,
defaultRoutes
:
state
=>
state
.
permission
.
defaultRoutes
,
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
filghtAllData
:
state
=>
state
.
permission
.
filghtAllData
,
tableHeader
:
state
=>
state
.
user
.
tableHeader
}
sidebar
:
(
state
)
=>
state
.
app
.
sidebar
,
size
:
(
state
)
=>
state
.
app
.
size
,
device
:
(
state
)
=>
state
.
app
.
device
,
appMainBlockClientHeight
:
(
state
)
=>
state
.
app
.
appMainBlockClientHeight
,
visitedViews
:
(
state
)
=>
state
.
tagsView
.
visitedViews
,
cachedViews
:
(
state
)
=>
state
.
tagsView
.
cachedViews
,
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
,
roles
:
(
state
)
=>
state
.
user
.
roles
,
permissions
:
(
state
)
=>
state
.
user
.
permissions
,
permission_routes
:
(
state
)
=>
state
.
permission
.
routes
,
topbarRouters
:
(
state
)
=>
state
.
permission
.
topbarRouters
,
defaultRoutes
:
(
state
)
=>
state
.
permission
.
defaultRoutes
,
sidebarRouters
:
(
state
)
=>
state
.
permission
.
sidebarRouters
,
filghtAllData
:
(
state
)
=>
state
.
permission
.
filghtAllData
,
tableHeader
:
(
state
)
=>
state
.
user
.
tableHeader
,
};
export
default
getters
...
...
src/store/modules/app.js
View file @
2ef99cc
...
...
@@ -2,13 +2,16 @@
const
state
=
{
sidebar
:
{
opened
:
localStorage
.
getItem
(
'sidebarStatus'
)
?
!!+
localStorage
.
getItem
(
'sidebarStatus'
)
:
true
,
withoutAnimation
:
false
opened
:
localStorage
.
getItem
(
"sidebarStatus"
)
?
!!+
localStorage
.
getItem
(
"sidebarStatus"
)
:
true
,
withoutAnimation
:
false
,
},
device
:
'desktop'
,
device
:
"desktop"
,
//size: Cookies.get('size') || 'medium'
size
:
localStorage
.
getItem
(
'size'
)
||
'medium'
}
size
:
localStorage
.
getItem
(
"size"
)
||
"medium"
,
appMainBlockClientHeight
:
null
};
const
mutations
=
{
TOGGLE_SIDEBAR
:
state
=>
{
...
...
@@ -35,23 +38,30 @@ const mutations = {
state
.
size
=
size
//Cookies.set('size', size)
localStorage
.
setItem
(
'size'
,
size
)
}
},
SET_APPMAINBLOCKCH
:
(
state
,
height
)
=>
{
state
.
appMainBlockClientHeight
=
height
;
},
}
const
actions
=
{
toggleSideBar
({
commit
})
{
commit
(
'TOGGLE_SIDEBAR'
)
commit
(
"TOGGLE_SIDEBAR"
);
},
closeSideBar
({
commit
},
{
withoutAnimation
})
{
commit
(
'CLOSE_SIDEBAR'
,
withoutAnimation
)
commit
(
"CLOSE_SIDEBAR"
,
withoutAnimation
);
},
toggleDevice
({
commit
},
device
)
{
commit
(
'TOGGLE_DEVICE'
,
device
)
commit
(
"TOGGLE_DEVICE"
,
device
);
},
setSize
({
commit
},
size
)
{
commit
(
'SET_SIZE'
,
size
)
}
}
commit
(
"SET_SIZE"
,
size
);
},
setAppMainBlockCH
({
commit
},
height
)
{
commit
(
"SET_APPMAINBLOCKCH"
,
height
);
},
};
export
default
{
namespaced
:
true
,
...
...
src/utils/index.js
View file @
2ef99cc
This diff is collapsed. Click to expand it.
src/utils/request.js
View file @
2ef99cc
...
...
@@ -79,7 +79,7 @@ service.interceptors.response.use(res => {
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
603
)
{
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
603
&&
code
!=
402
)
{
Message
({
message
:
msg
,
type
:
'error'
...
...
src/views/et86Config/e
t86HsCodeBlack/e
rrorInfo/index.vue
→
src/views/et86Config/errorInfo/index.vue
View file @
2ef99cc
...
...
@@ -37,7 +37,10 @@ export default {
tableData: [], // 表格数据
};
},
created() {},
created() {
const { data } = this.$route.query;
this.tableData = JSON.parse(data);
},
methods: {
//条数变化
handleSizeChange(e) {
...
...
@@ -50,10 +53,8 @@ export default {
this.pageConfig.pageData.page = e;
this.searchBtn();
},
// table勾选
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 搜索
searchBtn() {},
},
};
</script>
...
...
src/views/et86Config/e
t86HsCodeBlack/e
rrorInfo/tableConfig.js
→
src/views/et86Config/errorInfo/tableConfig.js
View file @
2ef99cc
...
...
@@ -12,19 +12,13 @@ export const columnHeader = () => [
{
type
:
"index"
,
label
:
"序号"
,
prop
:
"
id
"
,
prop
:
"
rowNum
"
,
align
:
"center"
,
width
:
"70"
,
},
{
label
:
"运单号"
,
prop
:
"waybillNo"
,
align
:
"center"
,
width
:
150
,
},
{
label
:
"错误信息"
,
prop
:
"
errorMessage
"
,
prop
:
"
msg
"
,
align
:
"center"
,
minWidth
:
150
,
},
...
...
src/views/et86Config/et86HsCodeBlack/formConfig.js
View file @
2ef99cc
...
...
@@ -2,8 +2,8 @@ export const formConfig = [
{
label
:
"商品名"
,
type
:
"Input"
,
name
:
"s
kuCod
e"
,
prop
:
"s
kuCod
e"
,
name
:
"s
earchValu
e"
,
prop
:
"s
earchValu
e"
,
placeholder
:
"根据Hscode查询"
,
span
:
6
,
trigger
:
"blur"
,
// 事件名
...
...
src/views/et86Config/et86HsCodeBlack/index.vue
View file @
2ef99cc
<template>
<div class="form-header container">
<div
ref="formHeaderRef"
class="form-header container">
<el-row>
<el-col>
<yl-form
...
...
@@ -22,9 +22,11 @@
@download="downloadTemplate"
@upload="toUpload"
@rmfile="onRemoveUpload"
@export="exportTemplate"
@delete="deleteData"
@sizeChange="handleSizeChange"
@currentChange="handleCurrentChange"
@selectionEvent="tableSelectionChange"
>
</yl-table>
<!-- <modle-view
...
...
@@ -85,6 +87,14 @@ import YlTable from "@/components/YlTable";
import ModleView from "./components/ModleView";
import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight } from "@/utils";
import {
findHsCodeList, // HScode黑名单查询
delBlackList, // HScode黑名单删除
downLoadTemplate, // HScode黑名单下载模板
uploadHsCode, // HScode黑名单导入
} from "@/api/et86HsCodeBlack";
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: "Et86HsCodeBlack",
components: {
...
...
@@ -95,7 +105,9 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {}, // 表单参数
queryForm: {
searchValue: "",
}, // 表单参数
paramsForm: {
skuName: "",
file: null,
...
...
@@ -120,13 +132,79 @@ export default {
multipleSelection: [],
};
},
created() {},
created() {
// 黑名单查询
this.$nextTick(() => {
this.searchBtn();
});
},
mounted() {
this.$nextTick(() => {
let app = document.querySelector(".app-main");
if (this.$store.getters.appMainBlockClientHeight) {
this.tableAttr.maxHeight =
this.$store.getters.appMainBlockClientHeight -
restTableHeight(this.$refs);
} else {
this.tableAttr.maxHeight =
app.clientHeight - restTableHeight(this.$refs);
}
});
},
methods: {
// HScode黑名单查询
queryFindHsCodeList(params) {
this.tableAttr.loadingTable = true;
findHsCodeList(params)
.then((res) => {
this.tableAttr.loadingTable = false;
const { code, data } = res;
if (code == 200) {
this.tableData = data.list;
this.pageConfig.total = data.total;
}
})
.catch(() => {});
},
// 删除黑名单
toDelBlackList(params) {
delBlackList(params)
.then((res) => {
const { code, msg } = res;
if (code == 200) {
this.searchBtn();
this.msgSuccess(msg || "删除成功!");
} else {
this.$message.error(msg || "删除失败");
}
})
.catch(() => {});
},
// 失焦事件
blurEvent() {},
// 选择上传
toUpload(options) {
console.log(options);
// 选择上传【HScode黑名单导入】
toUpload({ file }) {
const formData = new FormData();
formData.append("file", file);
uploadHsCode(formData)
.then((res) => {
const { code, data, msg } = res;
if (code == 200) {
this.searchBtn();
this.msgSuccess(msg || "增加成功!");
} else {
this.$message.error(msg || "增加失败");
this.$router.push({
path: "/errorInfo",
query: {
name: "errorInfo",
error: code,
data: JSON.stringify(data),
},
});
}
})
.catch(() => {});
},
//移除上传
onRemoveUpload(options) {
...
...
@@ -134,22 +212,74 @@ export default {
},
// 搜索
searchBtn() {
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {});
const { page, size } = this.pageConfig.pageData;
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
let params = {
limitStart: (page - 1) * size,
limitSize: size,
...this.queryForm,
};
this.queryFindHsCodeList(params);
});
},
// 确认对话框
dialogConfirm() {},
// 下载
// 下载
【HScode黑名单下载模板】
downloadTemplate() {
// this.$refs.modleViewRef.dialogOpenEvent();
downLoadTemplate("hsCode")
.then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = "HSCODE黑名单表.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("下载失败");
}
})
.catch(() => {});
},
// 上传
upLoadTemplate() {
// console.log(this.$refs.modleViewRef);
},
// 导出
exportTemplate() {},
exportTemplate(row, i) {
this.tableAttr.btnCofig.btnGroup[i].loading = true;
downLoadXlsx("/etes/exportHsCodeList", this.queryForm, "HSCODE黑名单表")
.then(() => {
this.tableAttr.btnCofig.btnGroup[i].loading = false;
})
.catch(() => {
this.$message.error("导出失败");
});
},
// 删除
deleteData() {},
deleteData(row) {
if (this.multipleSelection.length) {
let params = [];
this.multipleSelection.map((item) => {
params.push(item.id);
});
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.toDelBlackList(params);
})
.catch(() => {});
} else {
this.$message.error("请勾选一条或者多条数据再操作!");
}
},
//条数变化
handleSizeChange(e) {
this.pageConfig.pageData.size = e;
...
...
@@ -162,11 +292,11 @@ export default {
this.searchBtn();
},
// table勾选
hand
leSelectionChange(val) {
tab
leSelectionChange(val) {
this.multipleSelection = val;
},
// 删除
deleteRow() {
deleteRow(
{ row }
) {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
...
...
@@ -174,7 +304,7 @@ export default {
center: true,
})
.then(() => {
this.
msgSuccess("删除成功!"
);
this.
toDelBlackList([row.id]
);
})
.catch(() => {});
},
...
...
src/views/et86Config/et86HsCodeBlack/tableConfig.js
View file @
2ef99cc
...
...
@@ -2,7 +2,7 @@ export const tableAttr = {
border
:
true
,
loadingTable
:
false
,
isDragSort
:
false
,
// 拖拽tableData数据一定要加id字段
maxHeight
:
30
0
,
maxHeight
:
0
,
btnCofig
:
{
isBtn
:
true
,
btnGroup
:
[
...
...
@@ -27,7 +27,7 @@ export const tableAttr = {
{
type
:
"primary"
,
icon
:
"el-icon-upload"
,
btnName
:
"
导入
"
,
btnName
:
"
增加
"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
...
...
@@ -45,10 +45,6 @@ export const tableAttr = {
round
:
false
,
loading
:
false
,
event
:
"export"
,
action
:
"/goods/uploadGoodsExcel"
,
fileName
:
"name"
,
limit
:
1
,
accept
:
".xlsx"
,
},
{
type
:
"danger"
,
...
...
@@ -77,14 +73,8 @@ export const columnHeader = (deleteRow) => [
width
:
"50"
,
},
{
label
:
"口岸"
,
prop
:
"portName"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"HSCODE"
,
prop
:
"
goodsCod
e"
,
prop
:
"
blackValu
e"
,
align
:
"center"
,
minWidth
:
100
,
},
...
...
@@ -102,7 +92,7 @@ export const columnHeader = (deleteRow) => [
},
{
label
:
"文件名"
,
prop
:
"
f
ileName"
,
prop
:
"
uploadF
ileName"
,
align
:
"center"
,
minWidth
:
100
,
},
...
...
src/views/et86Config/et86RuleConfig/index.vue
View file @
2ef99cc
<template>
<div class="form-header container">
<div
ref="formHeaderRef"
class="form-header container">
<el-row>
<el-col>
<yl-form
...
...
@@ -13,6 +13,7 @@
</el-col>
</el-row>
<yl-table
ref="ylTable"
:attrs="tableAttr"
:loadingTable="tableAttr.loadingTable"
:columns="columns"
...
...
@@ -31,6 +32,7 @@ import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight } from "@/utils";
import {
findAllEtesRules, // ET86查询
deleteEtesRuleById, // 删除
...
...
@@ -67,7 +69,20 @@ export default {
this.searchBtn();
});
},
mounted() {},
mounted() {
this.$nextTick(() => {
let app = document.querySelector(".app-main");
if (this.$store.getters.appMainBlockClientHeight) {
this.tableAttr.maxHeight =
this.$store.getters.appMainBlockClientHeight -
restTableHeight(this.$refs);
} else {
this.tableAttr.maxHeight =
app.clientHeight - restTableHeight(this.$refs);
}
console.log(this.tableAttr.maxHeight);
});
},
methods: {
// ET86查询
queryFindAllEtesRules(params) {
...
...
src/views/et86Config/et86RuleConfig/tableConfig.js
View file @
2ef99cc
...
...
@@ -6,7 +6,7 @@ export const tableAttr = {
border
:
true
,
loadingTable
:
false
,
isDragSort
:
false
,
// 拖拽tableData数据一定要加id字段
maxHeight
:
30
0
,
maxHeight
:
0
,
btnCofig
:
{
isBtn
:
true
,
btnGroup
:
[
...
...
src/views/et86Config/et86ShipmentDesc/components/ModleView.vue
0 → 100644
View file @
2ef99cc
<template>
<div class="error-container">
<el-dialog
:width="width"
:title="title"
:center="center"
:visible.sync="dialogVisible"
:close-on-click-modal="onModalClickClose"
@open="dialogOpenEvent"
@close="dialogCloseEvent"
>
<slot></slot>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">{{
confirmBtnName
}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
width: {
type: String,
default: "50%",
},
title: {
type: String,
default: "标题",
},
center: {
type: String,
default: "center",
},
confirmBtnName: {
type: String,
default: "确 定",
},
onModalClickClose: {
type: Boolean,
default: false,
},
},
data() {
return {
dialogVisible: false,
};
},
computed: {},
created() {},
mounted() {},
methods: {
dialogOpenEvent(data) {
if (data && data.length) {
console.log(data);
}
this.dialogVisible = true;
this.$emit("open");
},
dialogCloseEvent() {
this.dialogVisible = false;
this.$emit("close");
},
// 确认事件
confirm() {
this.dialogVisible = false;
this.$emit("confirm");
},
// 取消事件
cancel() {
this.dialogVisible = false;
this.$emit("cancel");
},
},
};
</script>
<style lang='scss' scoped>
</style>
src/views/et86Config/et86ShipmentDesc/formConfig.js
0 → 100644
View file @
2ef99cc
export
const
formConfig
=
[
{
label
:
"ShipmentDesc"
,
type
:
"Input"
,
name
:
"ShipmentDesc"
,
prop
:
"ShipmentDesc"
,
placeholder
:
"根据ShipmentDesc查询"
,
span
:
7
,
trigger
:
"blur"
,
// 事件名
},
];
src/views/et86Config/et86ShipmentDesc/index.vue
0 → 100644
View file @
2ef99cc
<template>
<div ref="formHeaderRef" class="form-header container">
<el-row>
<el-col>
<yl-form
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
:inline="false"
formWidth="auto"
@blur="blurEvent"
/>
</el-col>
</el-row>
<yl-table
:attrs="tableAttr"
:loadingTable="tableAttr.loadingTable"
:columns="columns"
:tableData="tableData"
:pageConfig="pageConfig"
@search="searchBtn"
@download="downloadTemplate"
@upload="toUpload"
@rmfile="onRemoveUpload"
@export="exportTemplate"
@delete="deleteData"
@sizeChange="handleSizeChange"
@currentChange="handleCurrentChange"
@selectionEvent="tableSelectionChange"
>
</yl-table>
<!-- <modle-view
ref="modleViewRef"
width="30%"
title="导入Excel"
confirmBtnName="导入Excel"
@confirm="dialogConfirm"
>
<el-form
:model="paramsForm"
:rules="rules"
ref="ruleForm"
label-width="80px"
>
<el-row>
<el-col :span="20">
<el-form-item
label="商品名称"
prop="skuName"
size="small"
label-position="left"
>
<el-input
v-model="paramsForm.skuName"
placeholder="请输入商品名称"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item prop="file">
<el-upload
ref="upload"
action="/goods/uploadGoodsExcel"
name="file"
:http-request="toUpload"
:on-remove="onRemoveUpload"
:limit="1"
accept=".xlsx"
class="upload"
>
<el-button type="primary" icon="el-icon-upload2" size="small"
>选择文件</el-button
>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
</modle-view> -->
</div>
</template>
<script>
import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import ModleView from "./components/ModleView";
import { formConfig } from "./formConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import { restTableHeight } from "@/utils";
import {
findHsCodeList, // HScode黑名单查询
delBlackList, // HScode黑名单删除
downLoadTemplate, // HScode黑名单下载模板
uploadHsCode, // HScode黑名单导入
} from "@/api/et86HsCodeBlack";
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
name: "Et86HsCodeBlack",
components: {
YlForm,
YlTable,
ModleView,
},
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {
searchValue: "",
}, // 表单参数
paramsForm: {
skuName: "",
file: null,
},
rules: {
skuName: [
{ required: true, message: "请输入商品名称", trigger: "blur" },
],
},
pageConfig: {
// 分页配置项
isPagination: true,
total: 0,
pageData: {
page: 1,
size: 10,
},
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.deleteRow), // 表头
tableData: [], // 表格数据
multipleSelection: [],
};
},
created() {
// 黑名单查询
this.$nextTick(() => {
this.searchBtn();
});
},
mounted() {
this.$nextTick(() => {
let app = document.querySelector(".app-main");
if (this.$store.getters.appMainBlockClientHeight) {
this.tableAttr.maxHeight =
this.$store.getters.appMainBlockClientHeight -
restTableHeight(this.$refs);
} else {
this.tableAttr.maxHeight =
app.clientHeight - restTableHeight(this.$refs);
}
console.log(this.tableAttr.maxHeight);
});
},
methods: {
// HScode黑名单查询
queryFindHsCodeList(params) {
this.tableAttr.loadingTable = true;
findHsCodeList(params)
.then((res) => {
this.tableAttr.loadingTable = false;
const { code, data } = res;
if (code == 200) {
this.tableData = data.list;
this.pageConfig.total = data.total;
}
})
.catch(() => {});
},
// 删除黑名单
toDelBlackList(params) {
delBlackList(params)
.then((res) => {
const { code, msg } = res;
if (code == 200) {
this.searchBtn();
this.msgSuccess(msg || "删除成功!");
} else {
this.$message.error(msg || "删除失败");
}
})
.catch(() => {});
},
// 失焦事件
blurEvent() {},
// 选择上传【HScode黑名单导入】
toUpload({ file }) {
const formData = new FormData();
formData.append("file", file);
uploadHsCode(formData)
.then((res) => {
const { code, data, msg } = res;
if (code == 200) {
this.searchBtn();
this.msgSuccess(msg || "增加成功!");
} else {
this.$message.error(msg || "增加失败");
this.$router.push({
path: "/errorInfo",
query: {
name: "errorInfo",
error: code,
data: JSON.stringify(data),
},
});
}
})
.catch(() => {});
},
//移除上传
onRemoveUpload(options) {
console.log(options);
},
// 搜索
searchBtn() {
const { page, size } = this.pageConfig.pageData;
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
let params = {
limitStart: (page - 1) * size,
limitSize: size,
...this.queryForm,
};
this.queryFindHsCodeList(params);
});
},
// 确认对话框
dialogConfirm() {},
// 下载【HScode黑名单下载模板】
downloadTemplate() {
downLoadTemplate("hsCode")
.then((res) => {
if (res) {
const blob = new Blob([res]);
const link = document.createElement("a"); //创建a标签
link.download = "HSCODE黑名单表.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("下载失败");
}
})
.catch(() => {});
},
// 上传
upLoadTemplate() {
// console.log(this.$refs.modleViewRef);
},
// 导出
exportTemplate(row, i) {
this.tableAttr.btnCofig.btnGroup[i].loading = true;
downLoadXlsx("/etes/exportHsCodeList", this.queryForm, "HSCODE黑名单表")
.then(() => {
this.tableAttr.btnCofig.btnGroup[i].loading = false;
})
.catch(() => {
this.$message.error("导出失败");
});
},
// 删除
deleteData(row) {
if (this.multipleSelection.length) {
let params = [];
this.multipleSelection.map((item) => {
params.push(item.id);
});
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.toDelBlackList(params);
})
.catch(() => {});
} else {
this.$message.error("请勾选一条或者多条数据再操作!");
}
},
//条数变化
handleSizeChange(e) {
this.pageConfig.pageData.size = e;
this.pageConfig.pageData.page = 1;
this.searchBtn();
},
//页码变化
handleCurrentChange(e) {
this.pageConfig.pageData.page = e;
this.searchBtn();
},
// table勾选
tableSelectionChange(val) {
this.multipleSelection = val;
},
// 删除
deleteRow({ row }) {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.toDelBlackList([row.id]);
})
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped></style>
src/views/et86Config/et86ShipmentDesc/tableConfig.js
0 → 100644
View file @
2ef99cc
export
const
tableAttr
=
{
border
:
true
,
loadingTable
:
false
,
isDragSort
:
false
,
// 拖拽tableData数据一定要加id字段
maxHeight
:
300
,
btnCofig
:
{
isBtn
:
true
,
btnGroup
:
[
{
type
:
"primary"
,
// text、primary、danger
icon
:
"el-icon-search"
,
// el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
btnName
:
"搜索"
,
size
:
"mini"
,
// medium / small / mini
round
:
false
,
loading
:
false
,
event
:
"search"
,
},
{
type
:
"primary"
,
icon
:
"el-icon-download"
,
btnName
:
"下载模板"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
event
:
"download"
,
},
{
type
:
"primary"
,
icon
:
"el-icon-upload"
,
btnName
:
"增加"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
event
:
"upLoad"
,
action
:
"/goods/uploadGoodsExcel"
,
fileName
:
"name"
,
limit
:
1
,
accept
:
".xlsx"
,
},
{
type
:
"primary"
,
icon
:
"el-icon-download"
,
btnName
:
"导出"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
event
:
"export"
,
},
{
type
:
"danger"
,
icon
:
"el-icon-delete"
,
btnName
:
"删除"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
event
:
"delete"
,
},
],
},
};
export
const
columnHeader
=
(
deleteRow
)
=>
[
{
type
:
"selection"
,
align
:
"center"
,
prop
:
"selection"
,
width
:
"50"
,
},
{
type
:
"index"
,
label
:
"序号"
,
prop
:
"id"
,
align
:
"center"
,
width
:
"50"
,
},
{
label
:
"ShipmentDesc"
,
prop
:
"ShipmentDesc"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"创建时间"
,
prop
:
"createTime"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"创建人"
,
prop
:
"createUserName"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"文件名"
,
prop
:
"uploadFileName"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"操作"
,
prop
:
"operate"
,
align
:
"center"
,
minWidth
:
120
,
fixed
:
"right"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"el-button"
,
{
style
:
{
color
:
"#ff4949"
,
},
props
:
{
type
:
"text"
,
size
:
"mini"
,
icon
:
"el-icon-delete"
,
},
on
:
{
click
()
{
deleteRow
(
params
);
},
},
},
"删除"
),
]);
},
},
];
src/views/systemConfig/superAllocation/index.vue
View file @
2ef99cc
...
...
@@ -195,7 +195,7 @@ export default {
console.log(err)
})
} else {
this.$confirm(`是否要${tip}
记录
!`, "注意!", {
this.$confirm(`是否要${tip}
规则
!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
...
...
src/views/systemLog/dmLog/index.vue
View file @
2ef99cc
...
...
@@ -17,7 +17,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input v-model="selectForm.awbNbr" class="formItem" placeholder="
例: xxx;xxx;
" clearable></el-input>
<el-input v-model="selectForm.awbNbr" class="formItem" placeholder="
请输入运单号
" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
...
...
@@ -138,6 +138,7 @@ export default {
this.data = [];
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
},
methods: {
//数据查询
...
...
Please
register
or
login
to post a comment