Commit 931cdb73 authored by 季圣华's avatar 季圣华
Browse files

增加仓库和角色类型的数据权限控制

parent f1fa71d3
......@@ -56,6 +56,7 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin'
import { getAction } from '@/api/manage'
import { getMpListShort } from "@/utils/util"
import JDate from '@/components/jeecg/JDate'
import Vue from 'vue'
......@@ -167,8 +168,17 @@
}
},
onAdded(event) {
let that = this
const { row, target } = event
getAction('/depot/findDepotByCurrentUser').then((res) => {
if (res.code === 200) {
let arr = res.data
for (let i = 0; i < arr.length; i++) {
if(arr[i].isDefault){
target.setValues([{rowKey: row.id, values: {depotId: arr[i].id+''}}])
}
}
}
})
if(target.rows.length>=2) {
target.setValues([{rowKey: row.id, values: {mType: '普通子件'}}])
} else {
......
......@@ -46,6 +46,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -46,6 +46,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -47,6 +47,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -51,6 +51,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......@@ -207,6 +208,7 @@
//调用完edit()方法之后会自动调用此方法
editAfter() {
if (this.action === 'add') {
let that = this
this.addInit("CGRK")
} else {
this.model.operTime = this.model.operTimeStr
......
......@@ -46,6 +46,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -48,6 +48,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
</a-col>
<a-col :lg="6" :md="12" :sm="24">
......
......@@ -55,6 +55,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
</a-col>
<a-col :lg="6" :md="12" :sm="24">
......@@ -177,6 +178,9 @@
editAfter() {
if (this.action === 'add') {
this.addInit("LSCK")
this.$nextTick(() => {
this.form.setFieldsValue({'payType': '现付'})
})
} else {
this.model.operTime = this.model.operTimeStr
this.model.getAmount = this.model.changeAmount
......
......@@ -47,6 +47,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -50,6 +50,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -51,6 +51,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
......
......@@ -135,12 +135,9 @@
methods: {
getSystemConfig() {
getCurrentSystemConfig().then((res) => {
if(res.code === 200){
let systemConfig = res.data
this.depotFlag = systemConfig.depotFlag
this.customerFlag = systemConfig.customerFlag
} else {
this.$message.warning(res.data);
if(res.code === 200 && res.data){
this.depotFlag = res.data.depotFlag
this.customerFlag = res.data.customerFlag
}
})
},
......
......@@ -64,6 +64,7 @@
visible: false,
model: {},
checked: false,
disableMixinCreated: true,
confirmLoading: false,
form: this.$form.createForm(this),
/* 数据源 */
......
......@@ -226,6 +226,7 @@
let err = {};
if(res.data.msgTip == 'user can login'){
Vue.ls.set('winBtnStrList', res.data.userBtn, 7 * 24 * 60 * 60 * 1000);
Vue.ls.set('roleType', res.data.roleType, 7 * 24 * 60 * 60 * 1000);
this.loginSuccess()
} else if(res.data.msgTip == 'user is not exist'){
err.message = '用户不存在';
......
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