Commit a3a1d64c authored by 季圣华's avatar 季圣华
Browse files

权限控制

parent ba4819f3
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
import { triggerWindowResizeEvent } from '@/utils/util' import { triggerWindowResizeEvent } from '@/utils/util'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
import { mixin, mixinDevice } from '@/utils/mixin.js' import { mixin, mixinDevice } from '@/utils/mixin.js'
import Vue from 'vue'
export default { export default {
name: 'GlobalLayout', name: 'GlobalLayout',
...@@ -157,6 +158,7 @@ ...@@ -157,6 +158,7 @@
// update-begin-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常 // update-begin-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常
let storeKey = 'route:title:' + this.activeMenu.url let storeKey = 'route:title:' + this.activeMenu.url
this.$ls.set(storeKey, this.activeMenu.text) this.$ls.set(storeKey, this.activeMenu.text)
Vue.ls.set('funId', this.activeMenu.id, 7 * 24 * 60 * 60 * 1000);
// update-end-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常 // update-end-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常
}, },
findMenuBykey(menus,key){ findMenuBykey(menus,key){
......
...@@ -51,7 +51,9 @@ export const JeecgListMixin = { ...@@ -51,7 +51,9 @@ export const JeecgListMixin = {
/** 高级查询拼接方式 */ /** 高级查询拼接方式 */
superQueryMatchType: 'and', superQueryMatchType: 'and',
/** 是否加载时就执行 */ /** 是否加载时就执行 */
disableMixinCreated: false disableMixinCreated: false,
/* 按钮权限 */
btnEnableList: '',
} }
}, },
created() { created() {
...@@ -60,6 +62,8 @@ export const JeecgListMixin = { ...@@ -60,6 +62,8 @@ export const JeecgListMixin = {
this.loadData(); this.loadData();
//初始化字典配置 在自己页面定义 //初始化字典配置 在自己页面定义
this.initDictConfig(); this.initDictConfig();
//初始化按钮权限
this.initActiveBtnStr();
} }
}, },
methods:{ methods:{
...@@ -342,6 +346,21 @@ export const JeecgListMixin = { ...@@ -342,6 +346,21 @@ export const JeecgListMixin = {
let url = getFileAccessHttpUrl(text) let url = getFileAccessHttpUrl(text)
window.open(url); window.open(url);
}, },
/* 按钮权限 */
initActiveBtnStr() {
let funId = Vue.ls.get('funId'); //功能id
let btnStrList = Vue.ls.get('winBtnStrList'); //按钮功能列表 JSON字符串
this.btnEnableList = ""; //按钮列表
if (funId && btnStrList) {
for (let i = 0; i < btnStrList.length; i++) {
if (btnStrList[i].funId == funId) {
if (btnStrList[i].btnStr) {
this.btnEnableList = btnStrList[i].btnStr;
}
}
}
}
}
} }
} }
\ No newline at end of file
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '调拨出库')">查看</a> <a @click="myHandleDetail(record, '调拨出库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '组装单')">查看</a> <a @click="myHandleDetail(record, '组装单')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '拆卸单')">查看</a> <a @click="myHandleDetail(record, '拆卸单')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '其它入库')">查看</a> <a @click="myHandleDetail(record, '其它入库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '其它出库')">查看</a> <a @click="myHandleDetail(record, '其它出库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '采购退货出库')">查看</a> <a @click="myHandleDetail(record, '采购退货出库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '采购入库')">查看</a> <a @click="myHandleDetail(record, '采购入库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-item key="2" @click="batchSetStatus(1)"><a-icon type="check"/>审核</a-menu-item> <a-menu-item key="2" v-if="btnEnableList.indexOf(2)>-1" @click="batchSetStatus(1)"><a-icon type="check"/>审核</a-menu-item>
<a-menu-item key="3" @click="batchSetStatus(0)"><a-icon type="stop"/>反审核</a-menu-item> <a-menu-item key="3" v-if="btnEnableList.indexOf(2)>-1" @click="batchSetStatus(0)"><a-icon type="stop"/>反审核</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -65,10 +65,10 @@ ...@@ -65,10 +65,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '采购订单')">查看</a> <a @click="myHandleDetail(record, '采购订单')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { BillListMixin } from './mixins/BillListMixin' import { BillListMixin } from './mixins/BillListMixin'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
export default { export default {
name: "PurchaseOrderList", name: "PurchaseOrderList",
mixins:[JeecgListMixin,BillListMixin], mixins:[JeecgListMixin,BillListMixin],
...@@ -166,6 +167,9 @@ ...@@ -166,6 +167,9 @@
} }
} }
}, },
created() {
this.removeStatusColumn()
},
computed: { computed: {
}, },
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '零售退货入库')">查看</a> <a @click="myHandleDetail(record, '零售退货入库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '零售出库')">查看</a> <a @click="myHandleDetail(record, '零售出库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '销售退货入库')">查看</a> <a @click="myHandleDetail(record, '销售退货入库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-item key="2" @click="batchSetStatus(1)"><a-icon type="check"/>审核</a-menu-item> <a-menu-item key="2" v-if="btnEnableList.indexOf(2)>-1" @click="batchSetStatus(1)"><a-icon type="check"/>审核</a-menu-item>
<a-menu-item key="3" @click="batchSetStatus(0)"><a-icon type="stop"/>反审核</a-menu-item> <a-menu-item key="3" v-if="btnEnableList.indexOf(2)>-1" @click="batchSetStatus(0)"><a-icon type="stop"/>反审核</a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -65,10 +65,10 @@ ...@@ -65,10 +65,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '销售订单')">查看</a> <a @click="myHandleDetail(record, '销售订单')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
...@@ -166,6 +166,9 @@ ...@@ -166,6 +166,9 @@
} }
} }
}, },
created() {
this.removeStatusColumn()
},
computed: { computed: {
}, },
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '销售出库')">查看</a> <a @click="myHandleDetail(record, '销售出库')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
wrapClassName="ant-modal-cust-warp" wrapClassName="ant-modal-cust-warp"
style="top:5%;height: 100%;overflow-y: hidden"> style="top:5%;height: 100%;overflow-y: hidden">
<template slot="footer"> <template slot="footer">
<a-button key="print" type="primary" @click="handlePrint">
打印
</a-button>
<a-button key="back" @click="handleCancel"> <a-button key="back" @click="handleCancel">
取消 取消
</a-button> </a-button>
...@@ -1011,6 +1014,9 @@ ...@@ -1011,6 +1014,9 @@
close() { close() {
this.$emit('close'); this.$emit('close');
this.visible = false; this.visible = false;
},
handlePrint() {
window.print();
} }
} }
} }
......
import Vue from 'vue'
export const BillListMixin = { export const BillListMixin = {
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){
...@@ -44,6 +46,12 @@ export const BillListMixin = { ...@@ -44,6 +46,12 @@ export const BillListMixin = {
}, },
onDateOk(value) { onDateOk(value) {
console.log(value); console.log(value);
},
removeStatusColumn() {
//没有审核反审核权限的时候直接移除状态列
if(this.btnEnableList.indexOf(2)===-1) {
this.columns.splice(7,1)
}
} }
} }
} }
\ No newline at end of file
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '收预付款')">查看</a> <a @click="myHandleDetail(record, '收预付款')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '转账')">查看</a> <a @click="myHandleDetail(record, '转账')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</div> </div>
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px"> <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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 <a-icon type="down" /> 批量操作 <a-icon type="down" />
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
@change="handleTableChange"> @change="handleTableChange">
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="myHandleDetail(record, '支出')">查看</a> <a @click="myHandleDetail(record, '支出')">查看</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a @click="myHandleEdit(record)">编辑</a> <a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment