fix แสดงเลขที่ตำแหน่ง
This commit is contained in:
parent
840974d968
commit
4127b76bc0
1 changed files with 22 additions and 0 deletions
|
|
@ -742,6 +742,28 @@ export class PositionController extends Controller {
|
||||||
relations: ["posLevel", "posType", "posExecutive"],
|
relations: ["posLevel", "posType", "posExecutive"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(body.isAll === true) {
|
||||||
|
if(posMaster.orgRootId !== null && posMaster.orgChild1Id == null && posMaster.orgChild2Id == null
|
||||||
|
&& posMaster.orgChild2Id == null && posMaster.orgChild3Id == null) {
|
||||||
|
body.type = 0;
|
||||||
|
}
|
||||||
|
else if(posMaster.orgRootId !== null && posMaster.orgChild1Id !== null && posMaster.orgChild2Id == null
|
||||||
|
&& posMaster.orgChild2Id == null && posMaster.orgChild3Id == null) {
|
||||||
|
body.type = 1;
|
||||||
|
}
|
||||||
|
else if(posMaster.orgRootId !== null && posMaster.orgChild1Id !== null && posMaster.orgChild2Id !== null
|
||||||
|
&& posMaster.orgChild2Id == null && posMaster.orgChild3Id == null) {
|
||||||
|
body.type = 2;
|
||||||
|
}
|
||||||
|
else if(posMaster.orgRootId !== null && posMaster.orgChild1Id !== null && posMaster.orgChild2Id !== null
|
||||||
|
&& posMaster.orgChild2Id !== null && posMaster.orgChild3Id == null) {
|
||||||
|
body.type = 3;
|
||||||
|
}
|
||||||
|
else if(posMaster.orgRootId !== null && posMaster.orgChild1Id !== null && posMaster.orgChild2Id !== null
|
||||||
|
&& posMaster.orgChild2Id !== null && posMaster.orgChild3Id !== null) {
|
||||||
|
body.type = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
id: posMaster.id,
|
id: posMaster.id,
|
||||||
orgRootId: posMaster.orgRootId,
|
orgRootId: posMaster.orgRootId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue