Compare commits
No commits in common. "dev" and "v1.1.40" have entirely different histories.
7 changed files with 34 additions and 41 deletions
|
|
@ -354,11 +354,6 @@ function onClose() {
|
|||
|
||||
<div class="col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<div class="text-caption text-grey-8">
|
||||
ผู้ดูแลระบบจะติดต่อกลับผ่านทางอีเมลที่ท่านระบุ กรุณาตรวจสอบอีเมลของท่านเป็นระยะ
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-lg-6">
|
||||
<q-input
|
||||
dense
|
||||
|
|
@ -368,11 +363,10 @@ function onClose() {
|
|||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
(val: string) => !!val || 'กรุณากรอกที่อยู่อีเมล',
|
||||
(val: string) => {
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
return emailPattern.test(val) || 'กรุณากรอกที่อยู่อีเมลในรูปแบบที่ถูกต้อง';
|
||||
}
|
||||
() =>
|
||||
!!formData.email ||
|
||||
!!formData.phone ||
|
||||
'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -384,6 +378,12 @@ function onClose() {
|
|||
v-model="formData.phone"
|
||||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
() =>
|
||||
!!formData.email ||
|
||||
!!formData.phone ||
|
||||
'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -706,7 +706,6 @@ function classInput(val: boolean) {
|
|||
hide-bottom-space
|
||||
autocomplete="on"
|
||||
name="organization"
|
||||
:label="`${'หน่วยงาน'}`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1056,7 +1056,7 @@ onMounted(async () => {
|
|||
checkPermission($route)?.attrIsUpdate &&
|
||||
props.row.isDraft &&
|
||||
props.row.statusId === 'PREPARE-CONTAIN' &&
|
||||
(DataStore.isOfficer || checkPermission($route)?.attrOwnership == 'OWNER')
|
||||
DataStore.isOfficer
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ let formData = reactive<FormDataDetail>({
|
|||
});
|
||||
const commandVolume = ref<string>(""); //เล่มที่
|
||||
const commandChapter = ref<string>(""); //ตอนที่
|
||||
const isIdofficer = ref<boolean>(false); //เช็ค สกจ.
|
||||
|
||||
const rows = ref<Array<DataOperators>>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -113,7 +114,17 @@ const visibleColumns = ref<Array<string>>([
|
|||
|
||||
const modalAddOperator = ref<boolean>(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง
|
||||
|
||||
|
||||
/** ฟังก์ชันเช็ค สกจ.*/
|
||||
async function fetchCheckIdofficer() {
|
||||
await http
|
||||
.get(config.API.checkIdofficer)
|
||||
.then((res) => {
|
||||
isIdofficer.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง
|
||||
|
|
@ -122,7 +133,7 @@ const modalAddOperator = ref<boolean>(false); // แสดงเพิ่มร
|
|||
async function onSubmit() {
|
||||
//ถ้าเป็น สกจ. ต้องเลือกประเภทคำสั่งด้วย
|
||||
if (
|
||||
store.isIdofficer &&
|
||||
isIdofficer.value &&
|
||||
formData.isBangkok !== "BANGKOK" &&
|
||||
formData.isBangkok !== "OFFICE"
|
||||
) {
|
||||
|
|
@ -214,6 +225,7 @@ function onDeleteData(id: string) {
|
|||
onMounted(async () => {
|
||||
try {
|
||||
showLoader();
|
||||
await fetchCheckIdofficer();
|
||||
await fetchDataOperatorList();
|
||||
formData.commandNo = props.formCommandList.commandNo;
|
||||
formData.commandYear = props.formCommandList.commandYear;
|
||||
|
|
@ -223,7 +235,7 @@ onMounted(async () => {
|
|||
formData.issue = props.formCommandList.issue;
|
||||
formData.commandAffectDate = props.formCommandList.commandAffectDate;
|
||||
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
|
||||
formData.isBangkok = !store.isIdofficer
|
||||
formData.isBangkok = !isIdofficer.value
|
||||
? null
|
||||
: props.formCommandList.isBangkok;
|
||||
commandCode.value = props.formCommandList.commandCode;
|
||||
|
|
@ -488,7 +500,7 @@ onMounted(async () => {
|
|||
|
||||
<div
|
||||
class="col-12 q-gutter-sm"
|
||||
v-if="store.isIdofficer && commandCode !== 'C-PM-47'"
|
||||
v-if="isIdofficer && commandCode !== 'C-PM-47'"
|
||||
>
|
||||
<q-radio
|
||||
:disable="store.readonly"
|
||||
|
|
|
|||
|
|
@ -292,10 +292,7 @@ function onConfirmOrder() {
|
|||
if (
|
||||
store?.dataCommand?.commandNo !== "" &&
|
||||
store?.dataCommand?.commandAffectDate !== null &&
|
||||
store?.dataCommand?.commandExcecuteDate !== null &&
|
||||
(!store.isIdofficer ||
|
||||
store?.dataCommand?.isBangkok === "BANGKOK" ||
|
||||
store?.dataCommand?.isBangkok === "OFFICE")
|
||||
store?.dataCommand?.commandExcecuteDate !== null
|
||||
) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -319,10 +316,10 @@ function onConfirmOrder() {
|
|||
"คุณต้องการยืนยันการส่งออกคำสั่งใช่หรือไม่?"
|
||||
);
|
||||
} else {
|
||||
const messageWarning = !store.isIdofficer
|
||||
? "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม และวันที่คำสั่งมีผลให้ครบ"
|
||||
: "ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม วันที่คำสั่งมีผล และเลือกคำสั่งให้ครบ";
|
||||
dialogMessageNotify($q, messageWarning);
|
||||
dialogMessageNotify(
|
||||
$q,
|
||||
"ไม่สามารถดำเนินการต่อได้ กรุณากรอกเลขที่คำสั่ง วันที่ลงนาม และวันที่คำสั่งมีผลให้ครบ"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
|||
const readonly = ref<boolean>(false);
|
||||
const dataCommand = ref<FormDataDetail>();
|
||||
const status = ref<string>("");
|
||||
const isSalary = ref<boolean>(false);
|
||||
const isIdofficer = ref<boolean>(false);
|
||||
const isSalary = ref<boolean>(false)
|
||||
function checkStep(val: string) {
|
||||
status.value = val;
|
||||
switch (val) {
|
||||
|
|
@ -40,7 +39,6 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
|||
readonly,
|
||||
status,
|
||||
dataCommand,
|
||||
isSalary,
|
||||
isIdofficer,
|
||||
isSalary
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -92,25 +92,12 @@ async function fetchDataCommandList() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ฟังก์ชันเช็ค สกจ.*/
|
||||
async function fetchCheckIdofficer() {
|
||||
await http
|
||||
.get(config.API.checkIdofficer)
|
||||
.then((res) => {
|
||||
store.isIdofficer = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||
* กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await fetchDataCommandList();
|
||||
await fetchCheckIdofficer();
|
||||
store.readonly =
|
||||
route.name === "commandViewDetailPage" ||
|
||||
formCommandList.status === "REPORTED" ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue