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-28 16:25:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9e3c0a0548621060dc15a2bb7b38548ee6d57da4
9e3c0a05
1 parent
b29d799f
modify
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
194 additions
and
47 deletions
src/components/YlTable/index.vue
src/views/et86Config/et86HsCodeBlack/components/ModleView.vue
src/views/et86Config/et86HsCodeBlack/index.vue
src/views/et86Config/et86HsCodeBlack/tableConfig.js
src/views/systemConfig/superAllocation/index.vue
src/components/YlTable/index.vue
View file @
9e3c0a0
...
...
@@ -2,17 +2,43 @@
<div class="table-container">
<el-row v-if="attrs.btnCofig.isBtn" style="margin-bottom: 15px">
<el-col>
<
el-butto
n
v-for="
item
in attrs.btnCofig.btnGroup"
<
spa
n
v-for="
(item, i)
in attrs.btnCofig.btnGroup"
:key="item.btnName"
:type="item.type"
:icon="item.icon"
:round="item.round"
:size="item.size"
:loading="item.loading"
@click="handleClick(item)"
>{{ item.btnName }}</el-button
:class="i == 0 ? 'first-span' : 'span'"
>
<el-button
:type="item.type"
:icon="item.icon"
:round="item.round"
:size="item.size"
:loading="item.loading"
@click="handleClick(item)"
v-if="item.btnName !== '导入' && item.btnName !== '导出'"
>{{ item.btnName }}</el-button
>
<el-upload
v-else
ref="upload"
:action="item.action"
:fileName="item.fileName"
:http-request="toUpload"
:on-remove="onRemoveUpload"
:limit="item.limit"
:accept="item.accept"
:show-file-list="false"
class="upload"
>
<el-button
:type="item.type"
:icon="item.icon"
:round="item.round"
:size="item.size"
:loading="item.loading"
>{{ item.btnName }}</el-button
>
</el-upload>
</span>
</el-col>
</el-row>
<el-table
...
...
@@ -231,6 +257,14 @@ export default {
},
});
},
// 选择上传
toUpload(options) {
this.$emit("upload", options);
},
//移除上传
onRemoveUpload(file, fileList) {
this.$emit("rmfile", { file, fileList });
},
},
watch: {
data() {
...
...
@@ -250,4 +284,10 @@ export default {
padding: 0;
}
}
.first-span,.span{
display: inline-block;
}
.span{
margin-left: 6px;
}
</style>
...
...
src/views/et86Config/et86HsCodeBlack/components/ModleView.vue
View file @
9e3c0a0
<template>
<div class="error-container">
<el-dialog
title="错误信息"
:width="width"
:title="title"
:center="center"
:visible.sync="dialogVisible"
:close-on-click-modal="onModalClickClose"
@open="dialogOpenEvent"
@close="dialogCloseEvent"
>
<el-table :data="errorMessageData">
<el-table-column
type="index"
width="50"
align="center"
></el-table-column>
<el-table-column label="错误信息" prop="errorMessage" width="200">
<template slot-scope="scope">
<div v-for="(m, key) in scope.row.errorMessage" :key="key">
{{ m }}
</div>
</template>
</el-table-column>
</el-table>
<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>
<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,
errorMessageData: [],
};
},
computed: {},
...
...
@@ -38,7 +55,6 @@ export default {
methods: {
dialogOpenEvent(data) {
if (data && data.length) {
this.errorMessageData = data;
console.log(data);
}
this.dialogVisible = true;
...
...
@@ -48,9 +64,19 @@ export default {
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 lang='scss' scoped>
</style>
</style>
...
...
src/views/et86Config/et86HsCodeBlack/index.vue
View file @
9e3c0a0
...
...
@@ -20,19 +20,69 @@
:pageConfig="pageConfig"
@search="searchBtn"
@download="downloadTemplate"
@up
Load="upLoadTemplate
"
@
export="exportTemplate
"
@up
load="toUpload
"
@
rmfile="onRemoveUpload
"
@delete="deleteData"
@sizeChange="handleSizeChange"
@currentChange="handleCurrentChange"
>
</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";
export default {
...
...
@@ -40,11 +90,21 @@ export default {
components: {
YlForm,
YlTable,
ModleView,
},
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {}, // 表单参数
paramsForm: {
skuName: "",
file: null,
},
rules: {
skuName: [
{ required: true, message: "请输入商品名称", trigger: "blur" },
],
},
pageConfig: {
// 分页配置项
isPagination: true,
...
...
@@ -63,17 +123,29 @@ export default {
created() {},
methods: {
// 失焦事件
blurEvent() {
blurEvent() {},
// 选择上传
toUpload(options) {
console.log(options);
},
//移除上传
onRemoveUpload(options) {
console.log(options);
},
// 搜索
searchBtn() {
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {});
},
// 确认对话框
dialogConfirm() {},
// 下载
downloadTemplate() {},
downloadTemplate() {
// this.$refs.modleViewRef.dialogOpenEvent();
},
// 上传
upLoadTemplate() {},
upLoadTemplate() {
// console.log(this.$refs.modleViewRef);
},
// 导出
exportTemplate() {},
// 删除
...
...
src/views/et86Config/et86HsCodeBlack/tableConfig.js
View file @
9e3c0a0
...
...
@@ -32,6 +32,10 @@ export const tableAttr = {
round
:
false
,
loading
:
false
,
event
:
"upLoad"
,
action
:
"/goods/uploadGoodsExcel"
,
fileName
:
"name"
,
limit
:
1
,
accept
:
".xlsx"
,
},
{
type
:
"primary"
,
...
...
@@ -41,6 +45,10 @@ export const tableAttr = {
round
:
false
,
loading
:
false
,
event
:
"export"
,
action
:
"/goods/uploadGoodsExcel"
,
fileName
:
"name"
,
limit
:
1
,
accept
:
".xlsx"
,
},
{
type
:
"danger"
,
...
...
@@ -69,35 +77,36 @@ export const columnHeader = (deleteRow) => [
width
:
"50"
,
},
{
label
:
"
货站名称
"
,
label
:
"
口岸
"
,
prop
:
"portName"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"
品名
"
,
prop
:
"goods
Nam
e"
,
label
:
"
HSCODE
"
,
prop
:
"goods
Cod
e"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"
操作人
"
,
prop
:
"
updateUserNa
me"
,
label
:
"
创建时间
"
,
prop
:
"
createTi
me"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"
操作时间
"
,
prop
:
"
updateTi
me"
,
label
:
"
创建人
"
,
prop
:
"
createUserNa
me"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"
创建时间
"
,
prop
:
"
createTi
me"
,
label
:
"
文件名
"
,
prop
:
"
fileNa
me"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"操作"
,
prop
:
"operate"
,
...
...
src/views/systemConfig/superAllocation/index.vue
View file @
9e3c0a0
...
...
@@ -186,7 +186,7 @@ export default {
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status })
this.statusChange({ id: val.id, status: status
, tip: tip
})
}).catch(() => { })
} else {
this.msgWarning(res.msg)
...
...
@@ -200,7 +200,7 @@ export default {
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status })
this.statusChange({ id: val.id, status: status
, tip: tip
})
}).catch(() => { })
}
},
...
...
Please
register
or
login
to post a comment