fix bug แก้ไขอัตรากำลัง
This commit is contained in:
parent
ecb8366e4d
commit
da1bd5d937
2 changed files with 123 additions and 52 deletions
|
|
@ -71,6 +71,8 @@ const personalId = ref<string>(""); //ตัวแปร id ข้อมูล
|
|||
const modalSelectPerson = ref<boolean>(false); //เลือกคนครอล
|
||||
const rowId = ref<string>(""); //id ที่ต้องการกระทำ
|
||||
const actionType = ref<string>(""); //ประเภทการกระทำ
|
||||
const orgShortName = ref<string>(""); //ชื่อย่อหน่วยงาน
|
||||
const orgRootIdMain = ref<string>(""); //Id สำนัก
|
||||
/** ListMenu Table*/
|
||||
const listMenu = ref<ListMenu[]>([
|
||||
{
|
||||
|
|
@ -285,7 +287,12 @@ const dialogPosition = ref<boolean>(false); //ตำแหน่ง
|
|||
* @param type ประเภท
|
||||
* @param id id
|
||||
*/
|
||||
function onClickPosition(type: string, id: string) {
|
||||
function onClickPosition(
|
||||
type: string,
|
||||
id: string,
|
||||
data: PosMaster2 = {} as PosMaster2
|
||||
) {
|
||||
orgShortName.value = type === "EDIT" ? data?.orgShortname : "";
|
||||
rowId.value = id ? id : "";
|
||||
actionType.value = type;
|
||||
dialogPosition.value = !dialogPosition.value;
|
||||
|
|
@ -296,7 +303,12 @@ function onClickPosition(type: string, id: string) {
|
|||
* @param type ประเภทการกระทำ
|
||||
* @param id id ที่ต้องการกระทำ
|
||||
*/
|
||||
function onClickCopyPosition(type: string, id: string) {
|
||||
function onClickCopyPosition(
|
||||
type: string,
|
||||
id: string,
|
||||
data: PosMaster2 = {} as PosMaster2
|
||||
) {
|
||||
orgShortName.value = data?.orgShortname;
|
||||
rowId.value = id ? id : "";
|
||||
actionType.value = type;
|
||||
dialogPosition.value = !dialogPosition.value;
|
||||
|
|
@ -723,7 +735,7 @@ watch(
|
|||
v-close-popup
|
||||
@click="
|
||||
item.type === 'EDIT'
|
||||
? onClickPosition('EDIT', props.row.id)
|
||||
? onClickPosition('EDIT', props.row.id, props.row)
|
||||
: item.type === 'DEL'
|
||||
? onClickDelete(props.row.id)
|
||||
: item.type === 'MOVE'
|
||||
|
|
@ -733,7 +745,7 @@ watch(
|
|||
: item.type === 'INHERIT'
|
||||
? onClickInherit(props.row.id)
|
||||
: item.type === 'COPY'
|
||||
? onClickCopyPosition('COPY', props.row.id)
|
||||
? onClickCopyPosition('COPY', props.row.id, props.row)
|
||||
: item.type === 'CONDITION'
|
||||
? onClickCodition(props.row)
|
||||
: null
|
||||
|
|
@ -962,6 +974,7 @@ watch(
|
|||
:modal="dialogPosition"
|
||||
:data-tree="mainTree"
|
||||
:shortName="shortName"
|
||||
:orgShortName="orgShortName"
|
||||
:close="onClickPosition"
|
||||
:orgLevel="orgLevel"
|
||||
:treeId="treeId"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue