Merge branch 'develop' into setthawut
This commit is contained in:
commit
667118b92f
55 changed files with 1396 additions and 686 deletions
|
|
@ -31,7 +31,6 @@ const isLoadPDF = ref<boolean>(false); // Loading display pdf
|
|||
const pdfSrc = ref<any>(null); // PDF path display
|
||||
const page = ref<number>(1); // หน้าที่แสดง
|
||||
const numOfPages = ref<number>(0); // จำนวนหน้า PDF ทั้งหมด
|
||||
const splitterModel = ref(14);
|
||||
const typeFile = ref<string>(type.value === "cover" ? "docx" : "xlsx"); // นามสกุลไฟล์ cover=docx หรือ attachment=xlsx
|
||||
// next page PDF
|
||||
function nextPage() {
|
||||
|
|
@ -269,7 +268,6 @@ defineExpose({
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
horizontal
|
||||
style="
|
||||
height: 70vh;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ interface ListOrder {
|
|||
isAttachment: boolean;
|
||||
category?: string;
|
||||
commandSysId: string;
|
||||
isUploadAttachment: boolean;
|
||||
}
|
||||
|
||||
interface ListTemplateSalary {
|
||||
|
|
@ -50,5 +51,5 @@ export type {
|
|||
ListOrder,
|
||||
Tabs,
|
||||
ListTemplateSalary,
|
||||
CommandSysType
|
||||
CommandSysType,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useDataStore } from "@/modules/05_command/stores/main";
|
||||
|
||||
import type {
|
||||
ActiveOptions,
|
||||
ListOrder,
|
||||
Tabs,
|
||||
DateOption,
|
||||
|
|
@ -59,6 +58,7 @@ const isActive = ref<boolean>(true); // สถานะของรายกา
|
|||
const isAttachment = ref<boolean>(true); // บัญชีแนบท้าย
|
||||
const isSalary = ref<boolean>(true); // แก้ไขเงินเดือน
|
||||
const isAttachmentShow = ref<boolean>(true); // บัญชีแนบท้าย show/off
|
||||
const isUploadAttachment = ref<boolean>(false);
|
||||
|
||||
const dataCategory = ref<DateOption[]>([]); //ข้อมูล หมวดหมู่
|
||||
const categoryOP = ref<DateOption[]>([]); // options หมวดหมู่
|
||||
|
|
@ -79,9 +79,7 @@ const page = ref<number>(1); // หน้า
|
|||
const pageSize = ref<number>(13); // จำนวนข้อมูล
|
||||
const maxPage = ref<number>(0); // จำนวนหน้า
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นดึงรายการประเภทคำสั่ง
|
||||
*/
|
||||
/** ฟังก์ชั่นดึงรายการประเภทคำสั่ง*/
|
||||
async function fetchCommandType() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -114,9 +112,7 @@ async function fetchCommandType() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันดึงข้อมูลรายการหมวดหมู่
|
||||
*/
|
||||
/** ฟังก์ชันดึงข้อมูลรายการหมวดหมู่*/
|
||||
function fetchCommandSys() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -161,6 +157,7 @@ function onDialogEdit(data: ListOrder) {
|
|||
subtitle.value = data.subtitle ? data.subtitle : "";
|
||||
isEdit.value = true;
|
||||
isAttachment.value = data.isAttachment;
|
||||
isUploadAttachment.value = data.isUploadAttachment;
|
||||
dialogFormCommand.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -177,9 +174,7 @@ function closeDialog() {
|
|||
category.value = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* บันทึกข้อมูลการแก้ไขคำสั่ง
|
||||
*/
|
||||
/** บันทึกข้อมูลการแก้ไขคำสั่ง*/
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
|
|
@ -191,6 +186,7 @@ function onSubmit() {
|
|||
isActive: status.value,
|
||||
isAttachment: isAttachment.value,
|
||||
isSalary: isSalary.value,
|
||||
isUploadAttachment: isUploadAttachment.value,
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchCommandType();
|
||||
|
|
@ -247,7 +243,6 @@ async function fetchDataCommandTypeId(id: string) {
|
|||
*/
|
||||
function filterSelector(val: string, update: Function) {
|
||||
update(() => {
|
||||
category.value = val ? "" : category.value;
|
||||
categoryOP.value = dataCategory.value.filter(
|
||||
(v: DateOption) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -281,13 +276,11 @@ onMounted(async () => {
|
|||
borderless
|
||||
dense
|
||||
outlined
|
||||
clearable
|
||||
v-model="keyword"
|
||||
placeholder="ค้นหา"
|
||||
@clear="(keyword = ''), searchByStatus()"
|
||||
@keydown.enter.prevent="searchByStatus()"
|
||||
>
|
||||
<template v-slot:append v-if="keyword === ''">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
@ -475,6 +468,8 @@ onMounted(async () => {
|
|||
option-value="id"
|
||||
lazy-rules
|
||||
use-input
|
||||
hide-selected
|
||||
fill-input
|
||||
hide-bottom-space
|
||||
outlined
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกหมวดหมู่'}`]"
|
||||
|
|
@ -505,9 +500,11 @@ onMounted(async () => {
|
|||
label="บัญชีแนบท้าย"
|
||||
size="sm"
|
||||
/>
|
||||
<q-checkbox v-model="isSalary" label="แก้ไขเงินเดือน" size="sm" />
|
||||
|
||||
<q-checkbox
|
||||
v-model="isSalary"
|
||||
label="แก้ไขเงินเดือน"
|
||||
v-model="isUploadAttachment"
|
||||
label="อัปโหลดบัญชีแนบท้าย"
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,20 +6,17 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/modules/05_command/stores/main";
|
||||
|
||||
import type {
|
||||
CommandSysType,
|
||||
ListTemplateSalary,
|
||||
ActiveOptions,
|
||||
} from "@/modules/05_command/interface/index/Main";
|
||||
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
import { options } from "@fullcalendar/core/preact";
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const store = useDataStore();
|
||||
|
||||
const {
|
||||
dialogConfirm,
|
||||
success,
|
||||
|
|
@ -42,16 +39,6 @@ const filter = ref<string>(""); // ตัวแปร ฟิลเตอร์
|
|||
const listOrder = ref<CommandSysType[]>([]);
|
||||
const activeOrderId = ref<string>(""); // ตัวแปรเก็บ id เพื่อเอาไป = class
|
||||
const isActive = ref<boolean>(true); // สถานะการใช้งาน
|
||||
const isActiveOption = ref<ActiveOptions[]>([
|
||||
{
|
||||
value: true,
|
||||
label: "ใช้งาน",
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: "ไม่ได้ใช้งาน",
|
||||
},
|
||||
]);
|
||||
const dataForm = reactive<ListTemplateSalary>({
|
||||
id: "",
|
||||
name: "",
|
||||
|
|
@ -139,7 +126,6 @@ function closeDialog() {
|
|||
dataForm.id = "";
|
||||
dataForm.name = "";
|
||||
dataForm.isActive = false;
|
||||
|
||||
isEdit.value = false;
|
||||
dialogForm.value = false;
|
||||
}
|
||||
|
|
@ -301,7 +287,7 @@ onMounted(() => {
|
|||
dense
|
||||
round
|
||||
icon="add"
|
||||
color="add"
|
||||
color="primary"
|
||||
@click="onDialogAdd"
|
||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -323,20 +309,13 @@ onMounted(() => {
|
|||
<q-input
|
||||
borderless
|
||||
dense
|
||||
debounce="300"
|
||||
outlined
|
||||
v-model="filter"
|
||||
placeholder="ค้นหา"
|
||||
@keydown.enter="(pagination.page = 1), fetchSalaryList()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" v-if="filter == ''" />
|
||||
<q-icon
|
||||
name="clear"
|
||||
v-else
|
||||
class="cursor-pointer"
|
||||
@click="filter = ''"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue