增加仓库和角色类型的数据权限控制
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user