|
@@ -32,10 +32,11 @@
|
|
|
</div>
|
|
|
<div class="PeriodBtn" :style="$utils.PeriodBtnSty()">
|
|
|
<btns
|
|
|
- :showImport="false" :showExport="false" :showSave="false"
|
|
|
+ :showSave="false"
|
|
|
:showAdd="$utils.havePurview('moreBrand:oneLevel:add')"
|
|
|
:showDelete="false"
|
|
|
- @handleAdd="handleAdd('out')"></btns>
|
|
|
+ @handleAdd="handleAdd('out')"
|
|
|
+ @handleImport="handleImport" @handleExport="handleExport"></btns>
|
|
|
</div>
|
|
|
<div class="moreBrandTableData">
|
|
|
<el-table :data="moreBrandData" style="width: 100%" :class="moreBrandTableSty()">
|
|
@@ -158,16 +159,21 @@
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import importDailog from '../importPage/importDailog.vue'
|
|
|
import seachs from '../seachGroup.vue'
|
|
|
import btns from '../elbuttonS.vue'
|
|
|
-import {apiGetmultiplebrandtreeList, apiPostmultiplebrandSave, apiGetorganizationgetListTwo,
|
|
|
+import {
|
|
|
+ saveAs
|
|
|
+ } from 'file-saver'
|
|
|
+import {apiGetExportMsg, apiGetmultiplebrandtreeList, apiPostmultiplebrandSave, apiGetorganizationgetListTwo,
|
|
|
apiPostmultiplebrandRemove, apiGetbinsectionList, apiGetdatadictionaryList} from '../../api/api'
|
|
|
export default {
|
|
|
- components: { btns, seachs },
|
|
|
+ components: { btns, seachs, importDailog },
|
|
|
data() {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
@@ -383,6 +389,34 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ handleImport() {
|
|
|
+ this.$refs.importPage.upload.title = "单位营业收入导入"
|
|
|
+ this.$refs.importPage.upload.open = true
|
|
|
+ this.$refs.importPage.upload.showModel = true
|
|
|
+ this.$refs.importPage.showModelObj.url = '/multiple-brand/importTemplate'
|
|
|
+ this.$refs.importPage.upload.url = '/multiple-brand/importExcel'
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ let that = this
|
|
|
+ let url = 'multiple-brand/exportExcel'
|
|
|
+ let params = {
|
|
|
+ binSection: that.moduleStr,
|
|
|
+ checkCycle: that.checkCycleStr,
|
|
|
+ year: that.resAnnual
|
|
|
+ }
|
|
|
+ apiGetExportMsg(url, params).then(datas => {
|
|
|
+ let blob = new Blob([datas])
|
|
|
+ saveAs(blob, '单位营业收入数据导出.xlsx')
|
|
|
+ }).catch((r) => {
|
|
|
+ console.error(r)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ successImport(val) {
|
|
|
+ this.getMoreBrandData()
|
|
|
+ },
|
|
|
+ importLoading(val) {
|
|
|
+
|
|
|
+ },
|
|
|
getSeachData() {
|
|
|
this.page.currentPage = 1
|
|
|
this.getMoreBrandData()
|