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

This commit is contained in:
季圣华
2021-05-19 23:29:15 +08:00
parent f1fa71d3cc
commit 931cdb736b
34 changed files with 142 additions and 75 deletions

View File

@@ -38,6 +38,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">

View File

@@ -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'
@@ -168,8 +169,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 {

View File

@@ -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 {

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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

View File

@@ -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">

View File

@@ -48,6 +48,7 @@
:rowSelection="true"
:actionButton="true"
@valueChange="onValueChange"
@added="onAdded"
@deleted="onDeleted" />
</a-col>
<a-col :lg="6" :md="12" :sm="24">

View File

@@ -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

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">