UI แต่งตั้งคณะกรรมการทดลองงาน
This commit is contained in:
parent
8dadcb450a
commit
3728587c4e
7 changed files with 470 additions and 96 deletions
|
|
@ -30,6 +30,10 @@ const modal = defineModel<boolean>("modal", { required: true });
|
|||
const props = defineProps({
|
||||
commandTypeCode: String, // ไอดีประเภทคำสั่ง
|
||||
persons: Array, // ไอดีคนที่เลือกออกคำสั่งส่งมาเป็น array
|
||||
notPerson: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const commandOp = ref<ListCommand[]>([]); // ประเภทคำสั่ง
|
||||
|
|
@ -166,9 +170,10 @@ function createCommand(isRedirect: boolean) {
|
|||
commandYear: commandYear.value,
|
||||
commandNo: commandNo.value,
|
||||
commandTypeId: commandType.value,
|
||||
persons: data,
|
||||
persons: !props.notPerson ? data : [],
|
||||
};
|
||||
|
||||
console.log(body);
|
||||
await http
|
||||
.post(config.API.command + `/person`, body)
|
||||
.then(async (res) => {
|
||||
|
|
@ -263,6 +268,7 @@ async function fetchCommandType() {
|
|||
(v: ListCommand) => v.code == props.commandTypeCode
|
||||
);
|
||||
commandType.value = commandOp.value[0].id;
|
||||
console.log("🚀 ~ fetchCommandType ~ commandType.value:", commandType.value)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue