|
@@ -4,82 +4,33 @@
|
|
|
<el-row>
|
|
|
<el-col :span="5">
|
|
|
<basic-container>
|
|
|
- <avue-tree
|
|
|
- :option="treeOption"
|
|
|
- :data="treeData"
|
|
|
- @node-click="nodeClick"
|
|
|
- />
|
|
|
+ <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
<el-col :span="19">
|
|
|
<basic-container class="page-crad">
|
|
|
- <avue-crud
|
|
|
- :option="option"
|
|
|
- :search.sync="search"
|
|
|
- :table-loading="loading"
|
|
|
- :data="data"
|
|
|
- ref="crud"
|
|
|
- v-model="form"
|
|
|
- :permission="permissionList"
|
|
|
- @row-del="rowDel"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @row-save="rowSave"
|
|
|
- :before-open="beforeOpen"
|
|
|
- :page.sync="page"
|
|
|
- @search-change="searchChange"
|
|
|
- @search-reset="searchReset"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad"
|
|
|
- @search-criteria-switch="searchCriteriaSwitch"
|
|
|
- >
|
|
|
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
|
|
|
+ v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
|
|
|
+ :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange" @on-load="onLoad" @search-criteria-switch="searchCriteriaSwitch">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- icon="el-icon-bottom"
|
|
|
- @click="excelBox = true"
|
|
|
- >导入
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- v-if="isDisplayExport"
|
|
|
- icon="el-icon-top"
|
|
|
- @click="dataListExport"
|
|
|
- >导出
|
|
|
+ <el-button type="primary" size="small" v-if="isDisplayExport" icon="el-icon-top"
|
|
|
+ @click="dataListExport">导出
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
- @click.stop="copyDoc()"
|
|
|
- :disabled="selectionList.length != 1"
|
|
|
- >复制单据</el-button
|
|
|
- >
|
|
|
+ <el-button type="success" size="small" @click.stop="copyDoc()"
|
|
|
+ :disabled="selectionList.length != 1">复制单据</el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelAdminProfiles = true">批量修改分管员
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-view"
|
|
|
- size="small"
|
|
|
- @click.stop="editOpen(scope.row, 1)"
|
|
|
- >查看
|
|
|
+ <el-button type="text" icon="el-icon-view" size="small" @click.stop="editOpen(scope.row, 1)">查看
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="small"
|
|
|
- @click.stop="editOpen(scope.row, 1)"
|
|
|
- >编辑
|
|
|
+ <el-button type="text" icon="el-icon-edit" size="small" @click.stop="editOpen(scope.row, 1)">编辑
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="small"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)"
|
|
|
- >删除
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }" slot="tenantName">
|
|
@@ -95,23 +46,9 @@
|
|
|
<el-tag>{{ row.userTypeName }}</el-tag>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- <el-dialog
|
|
|
- title="用户角色配置"
|
|
|
- append-to-body
|
|
|
- :visible.sync="roleBox"
|
|
|
- :close-on-click-modal="false"
|
|
|
- width="345px"
|
|
|
- >
|
|
|
- <el-tree
|
|
|
- :data="roleGrantList"
|
|
|
- show-checkbox
|
|
|
- check-strictly
|
|
|
- default-expand-all
|
|
|
- node-key="id"
|
|
|
- ref="treeRole"
|
|
|
- :default-checked-keys="roleTreeObj"
|
|
|
- :props="props"
|
|
|
- >
|
|
|
+ <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" :close-on-click-modal="false" width="345px">
|
|
|
+ <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
|
|
|
+ :default-checked-keys="roleTreeObj" :props="props">
|
|
|
</el-tree>
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -119,18 +56,8 @@
|
|
|
<el-button type="primary" @click="submitRole">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="用户数据导入"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelBox"
|
|
|
- :close-on-click-modal="false"
|
|
|
- width="555px"
|
|
|
- >
|
|
|
- <avue-form
|
|
|
- :option="excelOption"
|
|
|
- v-model="excelForm"
|
|
|
- :upload-after="uploadAfter"
|
|
|
- >
|
|
|
+ <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
|
|
|
<template slot="excelTemplate">
|
|
|
<el-button type="primary" @click="handleTemplate">
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i>
|
|
@@ -138,30 +65,13 @@
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="用户平台配置"
|
|
|
- append-to-body
|
|
|
- :visible.sync="platformBox"
|
|
|
- :close-on-click-modal="false"
|
|
|
- >
|
|
|
- <avue-crud
|
|
|
- :option="platformOption"
|
|
|
- :table-loading="platformLoading"
|
|
|
- :data="platformData"
|
|
|
- ref="platformCrud"
|
|
|
- v-model="platformForm"
|
|
|
- :before-open="platformBeforeOpen"
|
|
|
- :page.sync="platformPage"
|
|
|
- :permission="platformPermissionList"
|
|
|
- @row-update="platformRowUpdate"
|
|
|
- @search-change="platformSearchChange"
|
|
|
- @search-reset="platformSearchReset"
|
|
|
- @selection-change="platformSelectionChange"
|
|
|
- @current-change="platformCurrentChange"
|
|
|
- @size-change="platformSizeChange"
|
|
|
- @refresh-change="platformRefreshChange"
|
|
|
- @on-load="platformOnLoad"
|
|
|
- >
|
|
|
+ <el-dialog title="用户平台配置" append-to-body :visible.sync="platformBox" :close-on-click-modal="false">
|
|
|
+ <avue-crud :option="platformOption" :table-loading="platformLoading" :data="platformData" ref="platformCrud"
|
|
|
+ v-model="platformForm" :before-open="platformBeforeOpen" :page.sync="platformPage"
|
|
|
+ :permission="platformPermissionList" @row-update="platformRowUpdate" @search-change="platformSearchChange"
|
|
|
+ @search-reset="platformSearchReset" @selection-change="platformSelectionChange"
|
|
|
+ @current-change="platformCurrentChange" @size-change="platformSizeChange"
|
|
|
+ @refresh-change="platformRefreshChange" @on-load="platformOnLoad">
|
|
|
<template slot-scope="{ row }" slot="tenantName">
|
|
|
<el-tag>{{ row.tenantName }}</el-tag>
|
|
|
</template>
|
|
@@ -170,18 +80,8 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="导入商品"
|
|
|
- append-to-body
|
|
|
- :visible.sync="excelBox"
|
|
|
- :close-on-click-modal="false"
|
|
|
- width="555px"
|
|
|
- >
|
|
|
- <avue-form
|
|
|
- :option="excelOption"
|
|
|
- v-model="excelForm"
|
|
|
- :upload-after="uploadAfter"
|
|
|
- >
|
|
|
+ <el-dialog title="导入商品" append-to-body :visible.sync="excelBox" :close-on-click-modal="false" width="555px">
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
|
|
|
<template slot="excelTemplate">
|
|
|
<el-button type="primary" @click="derivation">
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i>
|
|
@@ -192,17 +92,26 @@
|
|
|
温馨提示 第一次导入时请先下载模板
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="批量修改分管员" append-to-body :visible.sync="excelAdminProfiles" width="555px"
|
|
|
+ :close-on-click-modal="false" v-dialog-drag>
|
|
|
+ <avue-form :option="excelOptionAdminProfiles" v-model="excelAdminProfilesForm" table-loading="excelLoading"
|
|
|
+ :upload-before="uploadBeforeAdminProfiles" :upload-after="uploadAfterAdminProfiles">
|
|
|
+ <template slot="excelTemplate">
|
|
|
+ <el-button type="primary" @click="derivationAdminProfiles">
|
|
|
+ 点击下载<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>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
- <detail-page
|
|
|
- @goBack="goBack"
|
|
|
- :detailData="detailData"
|
|
|
- @copyOrder="copyOrder"
|
|
|
- v-if="!show"
|
|
|
- ></detail-page>
|
|
|
+ <detail-page @goBack="goBack" :detailData="detailData" @copyOrder="copyOrder" v-if="!show"></detail-page>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -245,6 +154,9 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ excelLoading: false,
|
|
|
+ excelAdminProfiles: false,
|
|
|
+ excelAdminProfilesForm: {},
|
|
|
isDisplayExport: false,
|
|
|
show: true,
|
|
|
detailData: {},
|
|
@@ -262,7 +174,7 @@ export default {
|
|
|
pageSize: 20,
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
- pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
|
|
|
+ pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
platformPage: {
|
|
|
pageSize: 10,
|
|
@@ -284,7 +196,7 @@ export default {
|
|
|
treeOption: {
|
|
|
nodeKey: "id",
|
|
|
lazy: true,
|
|
|
- treeLoad: function(node, resolve) {
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
console.log(node);
|
|
|
const parentId = node.level === 0 ? 0 : node.data.id;
|
|
|
getDeptLazyTree(parentId).then(res => {
|
|
@@ -408,6 +320,31 @@ export default {
|
|
|
action: "/api/blade-client/goodsdesc/import-desc"
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ excelOptionAdminProfiles: {
|
|
|
+ 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-client/goodsdesc/importGoods"
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -460,6 +397,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ uploadAfterAdminProfiles(res, done, loading, column) {
|
|
|
+ this.excelAdminProfiles = false;
|
|
|
+ this.$message.success("导入成功!");
|
|
|
+ this.refreshChange();
|
|
|
+ loading = false;
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ uploadBeforeAdminProfiles(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
+ derivationAdminProfiles() {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-client/goodsdesc/exportAdminProfiles?${this.website.tokenHeader
|
|
|
+ }=${getToken()}`
|
|
|
+ );
|
|
|
+ },
|
|
|
// 导出
|
|
|
dataListExport() {
|
|
|
let data = this.query
|
|
@@ -482,8 +436,7 @@ export default {
|
|
|
},
|
|
|
derivation() {
|
|
|
window.open(
|
|
|
- `/api/blade-client/goodsdesc/export-template?${
|
|
|
- this.website.tokenHeader
|
|
|
+ `/api/blade-client/goodsdesc/export-template?${this.website.tokenHeader
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
},
|
|
@@ -665,8 +618,7 @@ export default {
|
|
|
},
|
|
|
handleTemplate() {
|
|
|
window.open(
|
|
|
- `/api/blade-user/export-template?${
|
|
|
- this.website.tokenHeader
|
|
|
+ `/api/blade-user/export-template?${this.website.tokenHeader
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
},
|