Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
ccf97392
Commit
ccf97392
authored
Apr 30, 2021
by
季圣华
Browse files
给客户和仓库增加权限控制
parent
831b13fe
Changes
10
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/api/api.js
View file @
ccf97392
...
...
@@ -139,6 +139,7 @@ const checkFunction = (params)=>getAction("/function/checkIsNameExist",params);
const
addSystemConfig
=
(
params
)
=>
postAction
(
"
/systemConfig/add
"
,
params
);
const
editSystemConfig
=
(
params
)
=>
putAction
(
"
/systemConfig/update
"
,
params
);
const
checkSystemConfig
=
(
params
)
=>
getAction
(
"
/systemConfig/checkIsNameExist
"
,
params
);
const
getCurrentSystemConfig
=
(
params
)
=>
getAction
(
"
/systemConfig/getCurrentInfo
"
,
params
);
//用户|角色|模块关系
const
addUserBusiness
=
(
params
)
=>
postAction
(
"
/userBusiness/add
"
,
params
);
const
editUserBusiness
=
(
params
)
=>
putAction
(
"
/userBusiness/update
"
,
params
);
...
...
@@ -254,6 +255,7 @@ export {
addSystemConfig
,
editSystemConfig
,
checkSystemConfig
,
getCurrentSystemConfig
,
addUserBusiness
,
editUserBusiness
,
checkUserBusiness
,
...
...
jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue
View file @
ccf97392
...
...
@@ -260,9 +260,9 @@
},
getDepotList
()
{
let
that
=
this
;
getAction
(
'
/depot/findDepotBy
UserId?UBType=UserDepot&UBKeyId=
'
).
then
((
res
)
=>
{
if
(
res
)
{
that
.
depotList
=
res
getAction
(
'
/depot/findDepotBy
CurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
that
.
depotList
=
res
.
data
}
})
},
...
...
jshERP-web/src/views/bill/mixins/BillModalMixin.js
View file @
ccf97392
...
...
@@ -111,13 +111,14 @@ export const BillModalMixin = {
},
initDepot
()
{
let
that
=
this
;
getAction
(
'
/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=
'
).
then
((
res
)
=>
{
if
(
res
)
{
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
getAction
(
'
/depot/findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
depotInfo
=
{};
depotInfo
.
value
=
res
[
i
].
id
+
''
//注意-此处value必须为字符串格式
depotInfo
.
text
=
res
[
i
].
depotName
depotInfo
.
title
=
res
[
i
].
depotName
depotInfo
.
value
=
arr
[
i
].
id
+
''
//注意-此处value必须为字符串格式
depotInfo
.
text
=
arr
[
i
].
depotName
depotInfo
.
title
=
arr
[
i
].
depotName
for
(
let
item
of
that
.
materialTable
.
columns
){
if
(
item
.
key
==
'
depotId
'
||
item
.
key
==
'
anotherDepotId
'
)
{
item
.
options
.
push
(
depotInfo
)
...
...
jshERP-web/src/views/report/InDetail.vue
View file @
ccf97392
...
...
@@ -20,7 +20,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -169,15 +169,9 @@
});
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/report/InMaterialCount.vue
View file @
ccf97392
...
...
@@ -20,7 +20,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -155,15 +155,9 @@
});
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/report/InOutStockReport.vue
View file @
ccf97392
...
...
@@ -12,7 +12,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -137,15 +137,9 @@
return
param
;
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/report/OutDetail.vue
View file @
ccf97392
...
...
@@ -20,7 +20,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -169,15 +169,9 @@
});
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/report/OutMaterialCount.vue
View file @
ccf97392
...
...
@@ -20,7 +20,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -155,15 +155,9 @@
});
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/report/StockWarningReport.vue
View file @
ccf97392
...
...
@@ -11,7 +11,7 @@
placeholder=
"请选择仓库"
v-model=
"queryParam.depotId"
>
<a-select-option
v-for=
"(depot,index) in depotList"
:value=
"depot.id"
>
{{
depot
.
n
ame
}}
{{
depot
.
depotN
ame
}}
</a-select-option>
</a-select>
</a-form-item>
...
...
@@ -114,15 +114,9 @@
return
param
;
},
getDepotData
()
{
getAction
(
'
/depot/
getAllList
'
).
then
((
res
)
=>
{
getAction
(
'
/depot/
findDepotByCurrentUser
'
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
){
let
arr
=
res
.
data
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
obj
=
{};
obj
.
id
=
arr
[
i
].
id
;
obj
.
name
=
arr
[
i
].
name
;
this
.
depotList
.
push
(
obj
);
}
this
.
depotList
=
res
.
data
;
}
else
{
this
.
$message
.
info
(
res
.
data
);
}
...
...
jshERP-web/src/views/system/UserList.vue
View file @
ccf97392
...
...
@@ -53,10 +53,10 @@
:rowSelection=
"
{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span
slot=
"action"
slot-scope=
"text, record"
>
<a
@
click=
"btnSetDepot(record)"
>
分配仓库
</a>
<a-divider
type=
"vertical"
/>
<a
@
click=
"btnSetCustomer(record)"
>
分配客户
</a>
<a-divider
type=
"vertical"
/>
<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
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"确定删除吗?"
@
confirm=
"() => handleDelete(record.id)"
>
...
...
@@ -81,6 +81,7 @@
import
UserDepotModal
from
'
./modules/UserDepotModal
'
import
UserCustomerModal
from
'
./modules/UserCustomerModal
'
import
{
postAction
}
from
'
@/api/manage
'
;
import
{
getCurrentSystemConfig
}
from
'
@/api/api
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
JInput
from
'
@/components/jeecg/JInput
'
export
default
{
...
...
@@ -95,6 +96,8 @@
data
()
{
return
{
queryParam
:
{},
depotFlag
:
'
0
'
,
customerFlag
:
'
0
'
,
columns
:
[
{
title
:
'
#
'
,
...
...
@@ -129,7 +132,30 @@
},
}
},
created
()
{
this
.
getSystemConfig
()
},
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
);
}
})
},
searchQuery
()
{
this
.
loadData
(
1
);
this
.
getSystemConfig
();
},
searchReset
()
{
this
.
queryParam
=
{}
this
.
loadData
(
1
);
this
.
getSystemConfig
();
},
handleReset
(
id
)
{
let
that
=
this
;
postAction
(
that
.
url
.
resetPwd
,
{
id
:
id
}).
then
((
res
)
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment