Browse Source

导入导出

wangzhuo 2 years ago
parent
commit
54cf4d918f

+ 96 - 0
src/views/iosBasicData/baccelements/index.vue

@@ -8,6 +8,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -51,14 +52,35 @@
                    v-if="permission.baccelements_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
     </avue-crud>
+    
+    <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
 <script>
   import {getBaccelementsList, getBaccelementsDetail, addBaccelements, updateBaccelements, removeBaccelements} from "@/api/iosBasicData/baccelements";
   import {mapGetters} from "vuex";
+  
+  import { getToken } from "@/util/auth";
 
   export default {
     data() {
@@ -66,6 +88,35 @@
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/baccelements/importBAccElements"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -270,6 +321,51 @@
           this.option = await this.getColumnData(this.getColumnName(299), this.optionBack);
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出包装?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/baccelements/exportBAccElements?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/baccelements/exportBAccElements/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
       rowSave(row, done, loading) {
         addBaccelements(row).then(() => {
           this.onLoad(this.page);

+ 96 - 0
src/views/iosBasicData/baccitemstype/index.vue

@@ -9,6 +9,7 @@
                      id="out-table"
                      :header-cell-class-name="headerClassName"
                      :before-open="beforeOpen"
+               :search.sync="search"
                      v-model="form"
                      ref="crud"
                      @row-update="rowUpdate"
@@ -35,6 +36,9 @@
                              plain
                              @click="handleDelete">删 除
                   </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
               </template>
               <template slot-scope="scope" slot="menu">
                   <el-button
@@ -57,6 +61,22 @@
       </basic-container>
 
       <bacc-items ref="baccitems" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bacc-items>
+      
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </div>
 </template>
 
@@ -64,6 +84,8 @@
   import {baccitemstypeList, baccitemstypeDetail, baccitemstypeSubmit, baccitemstypeRemove} from "@/api/iosBasicData/baccitemstype";
   import {mapGetters} from "vuex";
   import baccItems from "@/views/iosBasicData/baccitemstype/baccitems.vue";
+  
+  import { getToken } from "@/util/auth";
 
   export default {
       components: {baccItems},
@@ -76,6 +98,35 @@
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/baccitemstype/importBAccItemsType"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -241,6 +292,51 @@
           this.option = await this.getColumnData(this.getColumnName(300), this.optionBack);
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出核算项目?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/baccitemstype/exportBAccItemsType?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/baccitemstype/exportBAccItemsType/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 详情的返回列表
         goBack(){
             // 初始化数据

+ 96 - 0
src/views/iosBasicData/bcntrtypes/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -51,6 +52,9 @@
                    plain
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -137,6 +141,22 @@
       </el-dialog>
 
 
+
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -144,6 +164,8 @@
   import {bcntrtypesList, bcntrtypesDetail, bcntrtypesSubmit, bcntrtypesRemove} from "@/api/iosBasicData/bcntrtypes";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
@@ -157,6 +179,35 @@
         },
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bcntrtypes/importBCntrTypes"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -453,6 +504,51 @@
           this.option = await this.getColumnData(this.getColumnName(291), this.optionBack);
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出集装箱?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bcntrtypes/exportBCntrTypes?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bcntrtypes/exportBCntrTypes/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 扩展数据表格点击查询详情
         extendedDataview(row){
             this.form = row

+ 96 - 0
src/views/iosBasicData/bcommodity/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -40,6 +41,9 @@
                    plain
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
 
         <template slot="unitNoForm">
@@ -56,6 +60,22 @@
         </template>
 
     </avue-crud>
+
+    <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -66,6 +86,8 @@
   import bunits from '@/views/iosBasicData/bunits/index.vue'
   import {getBunitsList} from "@/api/iosBasicData/bunits";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
@@ -80,6 +102,35 @@
           total: 0
         },
         selectionList: [],
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bcommodity/importBCommodity"
+                    }
+                ]
+            },
         option:{},
         optionBack: {
             addBtnText:'新建货物',
@@ -265,6 +316,51 @@
         this.getBunitsListfun()
     },
     methods: {
+       // 导出
+       handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出货物?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bcommodity/exportBCommodity?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bcommodity/exportBCommodity/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 获取计算单位数据
         getBunitsListfun(cnName){
             getBunitsList(1, 10,{cnName}).then(res=>{

+ 95 - 0
src/views/iosBasicData/bfeesdefine/index.vue

@@ -27,6 +27,7 @@
                                id="out-table"
                                :header-cell-class-name="headerClassName"
                                :before-open="beforeOpen"
+               :search.sync="search"
                                v-model="form"
                                ref="crud"
                                @row-update="rowUpdate"
@@ -48,6 +49,9 @@
                                        plain
                                        @click="handleDelete">删 除
                             </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
                         </template>
                         <template slot="unitNoForm">
                             <search-query ref="SearchQuery"
@@ -112,6 +116,21 @@
             </span>
         </el-dialog>
 
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
     </div>
 </template>
 
@@ -126,6 +145,8 @@
   import bfeesdetype from "@/views/iosBasicData/bfeesdefine/bfeesdetype.vue";
   import rateManagement from '@/views/iosBasicData/rateManagement/index.vue'
 
+  import { getToken } from "@/util/auth";
+
 
   export default {
       components: {bunits,bfeesdetype,rateManagement, SearchQuery},
@@ -160,6 +181,35 @@
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bfees/importBFees"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -432,6 +482,51 @@
           this.getRateListfun()
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出费用信息?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bfees/exportBFees?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bfees/exportBFees/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 获取费用类别数据
         bfeesdefineListfun(){
             bfeesdefineList(1,10).then(res=>{

+ 96 - 0
src/views/iosBasicData/blines/index.vue

@@ -8,6 +8,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -34,6 +35,9 @@
                    plain
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -148,6 +152,22 @@
           </span>
       </el-dialog>
 
+
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -158,6 +178,8 @@
   import bcorps from "@/views/iosBasicData/bcorps/index.vue";
   import {getBcorpsList} from "@/api/iosBasicData/bcorps";
 
+  import { getToken } from "@/util/auth";
+
   export default {
       components: {bcorps, SearchQuery},
     data() {
@@ -172,6 +194,35 @@
         },
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/blines/importBLines"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -372,6 +423,51 @@
           this.getBcorpsListfun()
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出航线?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/blines/exportBLines?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/blines/exportBLines/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 扩展数据表格点击查询详情
         extendedDataview(row){
             this.form = row

+ 96 - 0
src/views/iosBasicData/blocations/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -51,8 +52,27 @@
                    v-if="permission.blocations_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
     </avue-crud>
+
+    <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -60,12 +80,43 @@
   import {getBlocationsList, getBlocationsDetail, addBlocations, updateBlocations, removeBlocations} from "@/api/iosBasicData/blocations";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/blocations/importBLocations"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -291,6 +342,51 @@
         this.option = await this.getColumnData(this.getColumnName(297), this.optionBack);
     },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出地点信息?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/blocations/exportBLocations?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/blocations/exportBLocations/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
       rowSave(row, done, loading) {
         addBlocations(row).then(() => {
           this.onLoad(this.page);

+ 95 - 0
src/views/iosBasicData/bpackages/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -40,6 +41,9 @@
                    plain
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="extendedDataArr">
             <span style="color: #1e9fff" @click="extendedDataview(scope.row)">
@@ -137,6 +141,21 @@
       </el-dialog>
 
 
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -144,6 +163,8 @@
   import {bpackagesList, bpackagesDetail, bpackagesSubmit, bpackagesRemove} from "@/api/iosBasicData/bpackages";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
@@ -155,6 +176,35 @@
         },
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bpackages/importBPackages"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -356,6 +406,51 @@
           this.option = await this.getColumnData(this.getColumnName(289), this.optionBack);
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出包装?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bpackages/exportBPackages?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bpackages/exportBPackages/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 扩展数据详情的---------------------------------------
         // 扩展数据添加
         extendedDataAdd(){

+ 99 - 0
src/views/iosBasicData/bports/index.vue

@@ -10,6 +10,7 @@
                      id="out-table"
                      :header-cell-class-name="headerClassName"
                      :before-open="beforeOpen"
+               :search.sync="search"
                      v-model="form"
                      ref="crud"
                      @row-update="rowUpdate"
@@ -36,6 +37,9 @@
                              plain
                              @click="handleDelete">删 除
                   </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
               </template>
               <template slot-scope="scope" slot="menu">
                   <el-button
@@ -69,6 +73,25 @@
 
       </basic-container>
       <ports-terms ref="portsterms" v-if="!isShow" :detailData="detailData" @goBack="goBack"></ports-terms>
+
+
+
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
+
   </div>
 </template>
 
@@ -77,6 +100,8 @@
   import {mapGetters} from "vuex";
   import portsTerms from "@/views/iosBasicData/bports/portsTerms.vue";
 
+  import { getToken } from "@/util/auth";
+
   export default {
       components: {portsTerms},
     data() {
@@ -89,6 +114,35 @@
           isShow:true, // 详情和列表切换
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bports/importBPorts"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -314,6 +368,51 @@
           this.option = await this.getColumnData(this.getColumnName(298), this.optionBack);
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出港口?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bports/exportBPorts?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bports/exportBPorts/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
           // 详情的返回列表
         goBack(){
             // 初始化数据

+ 95 - 0
src/views/iosBasicData/bserviceterms/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -67,6 +68,9 @@
                    v-if="permission.bserviceterms_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -151,6 +155,21 @@
           </span>
       </el-dialog>
 
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -158,6 +177,8 @@
   import {getBservicetermsList, getBservicetermsDetail, addBserviceterms, updateBserviceterms, removeBserviceterms} from "@/api/iosBasicData/bserviceterms";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
@@ -170,6 +191,35 @@
         // form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bserviceterms/importBServiceTerms"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -383,6 +433,51 @@
         this.option = await this.getColumnData(this.getColumnName(294), this.optionBack);
     },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出服务条款?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bserviceterms/exportBServiceTerms?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bserviceterms/exportBServiceTerms/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
       // 扩展数据详情的---------------------------------------
         // 扩展数据添加
         extendedDataAdd(){

+ 96 - 0
src/views/iosBasicData/btrademodes/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -56,6 +57,9 @@
                    v-if="permission.btrademodes_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -81,6 +85,22 @@
             </el-button>
         </template>
     </avue-crud>
+
+    <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -88,12 +108,43 @@
   import {getBtrademodesList, getBtrademodesDetail, addBtrademodes, updateBtrademodes, removeBtrademodes} from "@/api/iosBasicData/btrademodes";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/btrademodes/importBTradeModes"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -302,6 +353,51 @@
       }
     },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出贸易条款?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/btrademodes/exportBTradeModes?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/btrademodes/exportBTradeModes/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
         // 新增
         addbtnfun(){
             this.form.status = 0

+ 96 - 0
src/views/iosBasicData/bunits/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -51,8 +52,27 @@
                    v-if="permission.bunits_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
     </avue-crud>
+
+    <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -60,12 +80,43 @@
   import {getBunitsList, getBunitsDetail, addBunits, updateBunits, removeBunits} from "@/api/iosBasicData/bunits";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bunits/importBUnits"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -295,6 +346,51 @@
         this.option = await this.getColumnData(this.getColumnName(296), this.optionBack);
     },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出计量单位?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bunits/exportBUnits?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bunits/exportBUnits/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
       rowSave(row, done, loading) {
         addBunits(row).then(() => {
           this.onLoad(this.page);

+ 96 - 0
src/views/iosBasicData/bvessels/index.vue

@@ -9,6 +9,7 @@
                id="out-table"
                :header-cell-class-name="headerClassName"
                :before-open="beforeOpen"
+               :search.sync="search"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -80,6 +81,9 @@
                    v-if="permission.bvessels_delete"
                    @click="handleDelete">删 除
         </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
         <template slot-scope="scope" slot="menu">
             <el-button
@@ -164,6 +168,22 @@
           </span>
       </el-dialog>
 
+
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </basic-container>
 </template>
 
@@ -171,6 +191,8 @@
   import {getBvesselsList, getBvesselsDetail, addBvessels, updateBvessels, removeBvessels} from "@/api/iosBasicData/bvessels";
   import {mapGetters} from "vuex";
 
+  import { getToken } from "@/util/auth";
+
   export default {
     data() {
       return {
@@ -183,6 +205,35 @@
         // form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/bvessels/importBVessels"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -498,6 +549,51 @@
         this.option = await this.getColumnData(this.getColumnName(293), this.optionBack);
     },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出船名?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/bvessels/exportBVessels?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/bvessels/exportBVessels/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
       // 扩展数据详情的---------------------------------------
         // 扩展数据添加
         extendedDataAdd(){

+ 94 - 0
src/views/iosBasicData/losbfeestemplate/index.vue

@@ -55,6 +55,9 @@
                                      plain
                                      @click="handleDelete">删 除
                           </el-button>
+                <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入
+                </el-button>
+                <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
                       </template>
                       <template slot-scope="scope" slot="menu">
                           <el-button
@@ -102,6 +105,21 @@
           </span>
       </el-dialog>
 
+      <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+            v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                :upload-after="onSuccess">
+                <template slot="excelTemplate">
+                    <el-button type="primary" @click="handleGet">
+                        点击下载<i class="el-icon-download el-icon--right"></i>
+                    </el-button>
+                </template>
+            </avue-form>
+            <p style="text-align: center;color: #DC0505">
+                温馨提示 第一次导入时请先下载模板
+            </p>
+        </el-dialog>
+
   </div>
 </template>
 
@@ -111,6 +129,8 @@
   import feesTemplateItems from "@/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue";
   import {bbusinesstypeList} from "@/api/iosBasicData/bbusinesstype";
   import bbusinesstype from "@/views/iosBasicData/bbusinesstype/index.vue";
+  
+  import { getToken } from "@/util/auth";
 
   export default {
       components:{ feesTemplateItems,bbusinesstype},
@@ -139,6 +159,35 @@
         form: {},
         query: {},
         loading: true,
+        excelBox: false,
+            search: {},
+        excelForm: {},
+            excelLoading: false,
+        excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: "模板下载",
+                        prop: "excelTemplate",
+                        formslot: true,
+                        span: 24
+                    },
+                    {
+                        label: "模板上传",
+                        prop: "excelFile",
+                        type: "upload",
+                        drag: true,
+                        loadText: "模板上传中,请稍等",
+                        span: 24,
+                        propsHttp: {
+                            res: "data"
+                        },
+                        tip: "请上传 .xls,.xlsx 标准格式文件",
+                        action: "/api/blade-los/losbfeestemplate/importLosBFeesTemplate"
+                    }
+                ]
+            },
         page: {
           pageSize: 10,
           currentPage: 1,
@@ -376,6 +425,51 @@
           this.bbusinesstypeListfun()
       },
     methods: {
+        // 导出
+        handleExport() {
+            var condition = ''
+            for (const key in this.search) {
+                var value = this.search[key]
+                if (value) {
+                    condition += `&${key}=${this.search[key]}`
+                }
+            }
+
+            this.$confirm('是否导出费用模板?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                window.open(
+                    `/api/blade-los/losbfeestemplate/exportLosBFeesTemplate?${this.website.tokenHeader
+                    }=${getToken()}${condition}`
+                );
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消' //
+                });
+            })
+        },
+        uploadBefore(file, done, loading) {
+            done();
+            loading = true;
+        },
+        // 上传成功
+        onSuccess(res, done, loading, column) {
+            this.excelBox = false;
+            this.$message.success("导入成功!");
+            loading = false;
+            this.onLoad(this.page);
+            done();
+        },
+        // 下载模板
+        handleGet() {
+            window.open(
+                `/api/blade-los/losbfeestemplate/exportLosBFeesTemplate/template?${this.website.tokenHeader
+                }=${getToken()}`
+            );
+        },
           // 获取左侧业务类别数据
         bbusinesstypeListfun(){
             bbusinesstypeList().then(res=>{