权限控制

This commit is contained in:
季圣华
2021-05-18 20:18:30 +08:00
parent ba4819f3a8
commit a3a1d64c26
52 changed files with 424 additions and 206 deletions

View File

@@ -31,10 +31,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -55,13 +55,13 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定设为默认吗?" @confirm="() => handleSetDefault(record.id)">
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定设为默认吗?" @confirm="() => handleSetDefault(record.id)">
<a>设为默认</a>
</a-popconfirm>
<a-divider type="vertical" />
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -145,6 +145,14 @@
that.$message.warning(res.data.message);
}
});
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -31,8 +31,8 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-popover title="导入注意点">
<template slot="content">
<p>预收款、期初应收、期初应付、税率均为数值且要大于0<br/>另外期初应收、期初应付不能同时输入</p>
@@ -43,9 +43,9 @@
<a-button type="primary" icon="download" @click="handleExportXls('客户信息')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -67,8 +67,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -157,6 +157,14 @@
type:'客户',
}
this.loadData(1);
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -26,10 +26,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -50,13 +50,13 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定设为默认吗?" @confirm="() => handleSetDefault(record.id)">
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定设为默认吗?" @confirm="() => handleSetDefault(record.id)">
<a>设为默认</a>
</a-popconfirm>
<a-divider type="vertical" />
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -142,6 +142,14 @@
that.$message.warning(res.data.message);
}
});
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -21,10 +21,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -46,8 +46,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -118,7 +118,14 @@
},
methods: {
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}
</script>

View File

@@ -35,10 +35,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -60,8 +60,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -125,7 +125,14 @@
},
methods: {
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}
</script>

View File

@@ -31,8 +31,8 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-popover title="导入注意点">
<template slot="content">
<p>预收款、期初应收、期初应付、税率均为数值且要大于0<br/>另外期初应收、期初应付不能同时输入</p>
@@ -43,9 +43,9 @@
<a-button type="primary" icon="download" @click="handleExportXls('会员信息')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -157,6 +157,14 @@
type:'会员',
}
this.loadData(1);
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -5,8 +5,8 @@
<!-- 按钮操作区域 -->
<a-row style="margin-left: 14px">
<a-button @click="handleAdd()" type="primary">添加机构</a-button>
<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd()" type="primary">添加机构</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
<a-button @click="refresh" type="default" icon="reload">刷新</a-button>
</a-row>
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">

View File

@@ -31,10 +31,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -56,8 +56,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -123,7 +123,14 @@
},
methods: {
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}
</script>

View File

@@ -21,10 +21,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -45,13 +45,13 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleSetFunction(record)">分配功能</a>
<a-divider type="vertical" />
<a @click="handleSetPushBtn(record.id)">分配按钮</a>
<a-divider type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="handleSetFunction(record)">分配功能</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="handleSetPushBtn(record.id)">分配按钮</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -157,6 +157,14 @@
this.roleFunctionModalVisible = false;
this.handleSetPushBtn(this.currentRoleId)
}
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -26,11 +26,11 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="handleBatchAdd" type="primary" icon="plus">批量新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleBatchAdd" type="primary" icon="plus">批量新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -52,8 +52,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -142,6 +142,14 @@
},
simpleDateFormat(millisecond, format) {
return formatDate(millisecond, format)
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -21,10 +21,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -46,10 +46,10 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
<!-- 状态渲染模板 -->
<template slot="customRenderFlag" slot-scope="flag">
@@ -124,6 +124,14 @@
} else {
this.handleAdd()
}
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -21,10 +21,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -46,8 +46,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -107,7 +107,14 @@
},
methods: {
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}
</script>

View File

@@ -25,13 +25,10 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1">
<a-icon type="delete" @click="batchDel"/>
删除
</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" ><a-icon type="delete" @click="batchDel"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作
@@ -53,17 +50,17 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a v-if="depotFlag === '1'" @click="btnSetDepot(record)">分配仓库</a>
<a-divider v-if="depotFlag === '1'" type="vertical" />
<a v-if="customerFlag === '1'" @click="btnSetCustomer(record)">分配客户</a>
<a-divider v-if="customerFlag === '1'" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1 && depotFlag === '1' " @click="btnSetDepot(record)">分配仓库</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1 && depotFlag === '1'" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1 && customerFlag === '1'" @click="btnSetCustomer(record)">分配客户</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1 && customerFlag === '1'" type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical"/>
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a-popconfirm title="确定重置密码为123456吗?" @confirm="() => handleReset(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical"/>
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定重置密码为123456吗?" @confirm="() => handleReset(record.id)">
<a>重置密码</a>
</a-popconfirm>
</span>
@@ -156,6 +153,14 @@
this.loadData(1);
this.getSystemConfig();
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
},
handleReset(id) {
let that = this;
postAction(that.url.resetPwd, {id: id}).then((res) => {

View File

@@ -31,8 +31,8 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button v-if="btnEnableList.indexOf(1)>-1" type="primary" icon="plus" @click="handleAdd">新增</a-button>
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-popover title="导入注意点">
<template slot="content">
<p>预收款、期初应收、期初应付、税率均为数值且要大于0<br/>另外期初应收、期初应付不能同时输入</p>
@@ -43,9 +43,9 @@
<a-button type="primary" icon="download" @click="handleExportXls('供应商信息')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
@@ -67,8 +67,8 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
@@ -157,6 +157,14 @@
type:'供应商',
}
this.loadData(1);
},
handleEdit: function (record) {
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true
}
}
}
}

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:15%;height: 80%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
@@ -40,6 +45,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-col :span="24/2">
@@ -105,6 +110,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 6 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 98%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓库名称">
@@ -51,6 +56,7 @@
visible: false,
model: {},
userList: [],
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:10%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="编号">
@@ -54,6 +59,7 @@
visible: false,
model: {},
enabledSwitch: true, //是否启用
isReadOnly: false,
jselectMultiple: {
options: [
{ text: '编辑', value: '1' },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:25%;height: 60%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
@@ -37,6 +42,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-col :span="24/2">
@@ -105,6 +110,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 6 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:25%;height: 50%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="姓名">
@@ -35,6 +40,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 85%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="角色名称">
@@ -38,6 +43,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:15%;height: 70%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="序列号">
@@ -43,6 +48,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="公司名称">
@@ -58,6 +63,7 @@
depotFlagSwitch: false, //仓库权限状态
customerFlagSwitch: false, //客户权限状态
minusStockFlagSwitch: false, //负库存状态
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:20%;height: 70%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="基本单位">
@@ -38,6 +43,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="登录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -75,6 +80,7 @@
orgaTree: [],
roleList: [],
userId:"", //保存用户id
isReadOnly: false,
disableSubmit:false,
dateFormat:"YYYY-MM-DD",
validatorRules:{

View File

@@ -9,6 +9,11 @@
cancelText="关闭"
wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
关闭
</a-button>
</template>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-col :span="24/2">
@@ -105,6 +110,7 @@
title:"操作",
visible: false,
model: {},
isReadOnly: false,
labelCol: {
xs: { span: 24 },
sm: { span: 6 },