updated ui sent command at organization
This commit is contained in:
parent
2239e40ef9
commit
95cfcee530
1 changed files with 49 additions and 16 deletions
|
|
@ -42,7 +42,9 @@ const commandNo = ref<string>(""); //คำสั่งเลขที่
|
|||
const commandYear = ref<number>(new Date().getFullYear());
|
||||
const commandAffectDate = ref<Date | null>(null); //วันที่ลงนาม
|
||||
const commandExcecuteDate = ref<Date | null>(null); //วันที่คำสั่งมีผล
|
||||
const group = ref<string>(""); //กลุ่ม
|
||||
const group = ref<string>(
|
||||
"กลุ่มที่ 1.1 : ปฏิบัติงาน ชำนาญงาน ปฏิบัติการ ชำนาญการ"
|
||||
); //กลุ่ม
|
||||
const isCheckOrgPublishDate = ref<boolean>(false); //เช็คค่าของวันที่คำสั่งมีผล
|
||||
const groupOp = ref<DataOption[]>([]);
|
||||
const groupDataOp = ref<DataOption[]>([
|
||||
|
|
@ -61,7 +63,28 @@ const groupDataOp = ref<DataOption[]>([
|
|||
]);
|
||||
|
||||
//Table
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref<any[]>([
|
||||
{
|
||||
id: "1",
|
||||
posMasterNo: "สกก.3",
|
||||
positionName: "นักจัดการงานทั่วไป",
|
||||
posTypeName: "ทั่วไป",
|
||||
posLevelName: "ปฏิบัติงาน",
|
||||
positionIsSelected: "นายศรัณย์ ศิลาดี",
|
||||
group: "1.1",
|
||||
selected: true,
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
posMasterNo: "สกก.4",
|
||||
positionName: "นักจัดการงานทั่วไป",
|
||||
posTypeName: "วิชาการ",
|
||||
posLevelName: "ปฏิบัติการ",
|
||||
positionIsSelected: "นางเกษมณี ใจดี",
|
||||
group: "1.1",
|
||||
selected: true,
|
||||
},
|
||||
]);
|
||||
const selected = ref<any[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -149,10 +172,10 @@ function closeModal() {
|
|||
commandYear.value = new Date().getFullYear();
|
||||
commandAffectDate.value = null;
|
||||
commandExcecuteDate.value = null;
|
||||
group.value = "";
|
||||
group.value = "กลุ่มที่ 1.1 : ปฏิบัติงาน ชำนาญงาน ปฏิบัติการ ชำนาญการ";
|
||||
isCheckOrgPublishDate.value = false;
|
||||
rows.value = [];
|
||||
selected.value = [];
|
||||
// rows.value = [];
|
||||
// selected.value = [];
|
||||
}
|
||||
|
||||
/** ฟังก์ชันดึงข้อมูลคำสั่ง */
|
||||
|
|
@ -188,30 +211,33 @@ function updateGroup(val: string) {
|
|||
const data = [
|
||||
{
|
||||
id: "1",
|
||||
posMasterNo: "สกก.1",
|
||||
positionName: "นักบริหาร",
|
||||
posTypeName: "บริหาร",
|
||||
posMasterNo: "สกก.3",
|
||||
positionName: "นักจัดการงานทั่วไป",
|
||||
posTypeName: "ทั่วไป",
|
||||
posLevelName: "ปฏิบัติงาน",
|
||||
positionIsSelected: "นายศรัณย์ ศิลาดี",
|
||||
group: "1.1",
|
||||
selected: true,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
posMasterNo: "สกก.2",
|
||||
positionName: "นักบริหาร",
|
||||
posTypeName: "บริหาร",
|
||||
posLevelName: "อำนวยการต้น",
|
||||
positionName: "นักทรัพยากรบุคคล",
|
||||
posTypeName: "วิชาการ",
|
||||
posLevelName: "ชำนาญการพิเศษ",
|
||||
positionIsSelected: "นางสาวพรทิพย์ กาญจนา",
|
||||
group: "1.2",
|
||||
selected: true,
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
posMasterNo: "สกก.3",
|
||||
posMasterNo: "สกก.1",
|
||||
positionName: "นักบริหาร",
|
||||
posTypeName: "บริหาร",
|
||||
posLevelName: "อำนวยการสูง",
|
||||
positionIsSelected: "",
|
||||
posLevelName: "สูง",
|
||||
positionIsSelected: "นางสาวพรทิพย์ กาญจนา",
|
||||
group: "2",
|
||||
selected: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -269,8 +295,10 @@ watch(modal, () => {
|
|||
class="inputgreen"
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
v-model="commandNo"
|
||||
:label="`${'คำสั่งเลขที่'}`"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอกคำสั่งเลขที่'}`]"
|
||||
/>
|
||||
</div>
|
||||
<label class="col-1 flex justify-center items-center text-bold"
|
||||
|
|
@ -465,7 +493,7 @@ watch(modal, () => {
|
|||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
v-model="props.row.selected"
|
||||
/>
|
||||
</q-td>
|
||||
|
||||
|
|
@ -518,7 +546,12 @@ watch(modal, () => {
|
|||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
label="ส่งไปออกคำสั่ง"
|
||||
:disable="commandType == '' || selected.length === 0"
|
||||
:disable="
|
||||
commandType == '' ||
|
||||
rows.filter((x) => x.selected).length === 0 ||
|
||||
!commandNo ||
|
||||
!commandYear
|
||||
"
|
||||
type="submit"
|
||||
color="public"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue