isAttachment
This commit is contained in:
parent
57dd12d6d2
commit
13317f94f2
5 changed files with 9 additions and 8 deletions
|
|
@ -39,6 +39,8 @@ let formData = reactive<FormDataDetail>({
|
|||
commandAffectDate: null, //วันที่ลงนาม
|
||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||
isBangkok: false,
|
||||
isAttachment:true
|
||||
|
||||
});
|
||||
const modalPreview = ref<boolean>(false); //แสดงตัวอย่าง
|
||||
|
||||
|
|
|
|||
|
|
@ -138,9 +138,10 @@ function onDelete(id: string) {
|
|||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.commandAction(id, "tab2"))
|
||||
.delete(config.API.commandAction(id, "tab2"))
|
||||
.then((res) => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
getPersonList();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ function onSubmit() {
|
|||
mouthSalaryAmount: formData.salaryAmount, //เงินเดือน
|
||||
positionSalaryAmount: formData.positionSalaryAmount, //เงินประจำตำแหน่ง
|
||||
amount: formData.monthSalaryAmount, //เงินค่าตอบแทนรายเดือน
|
||||
remarkHorizontal: formData.remarkVertical, //หมายเหตุแนวตั้ง
|
||||
remarkVertical: formData.remarkHorizontal, //หมายเหตุแนวนอน
|
||||
remarkVertical: formData.remarkVertical, //หมายเหตุแนวตั้ง
|
||||
remarkHorizontal: formData.remarkHorizontal, //หมายเหตุแนวนอน
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ interface FormDataDetail {
|
|||
commandSysId?: string;
|
||||
commandTypeName?: string;
|
||||
isBangkok?: boolean;
|
||||
isAttachment:boolean
|
||||
}
|
||||
|
||||
interface ListCommandSalaryType {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||
const store = useCommandDetail();
|
||||
const isAttachment = ref<boolean>(true);
|
||||
|
||||
const childDetailRef = ref<InstanceType<typeof Detail> | null>(null); //ref components รายละเอียดคำสั่ง
|
||||
const childListPersonsRef = ref<InstanceType<typeof ListPersons> | null>(null); //ref components รายชื่อผู้ออกคำสั่ง
|
||||
|
|
@ -63,6 +62,7 @@ let formCommandList = reactive<FormDataDetail>({
|
|||
commandAffectDate: null, //วันที่ลงนาม
|
||||
commandExcecuteDate: null, //วันที่คำสั่งมีผล
|
||||
commandSysId: "", // ประเภท คำสั่ง
|
||||
isAttachment:true
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -85,11 +85,8 @@ async function fetchDataCommandList() {
|
|||
.get(config.API.commandAction(commandId.value, "tab1"))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
console.log("🚀 ~ .then ~ data:", data);
|
||||
formCommandList = data;
|
||||
store.dataCommand = data;
|
||||
//รอ API ส่งมา isAttachment.value = data.isAttachment ;
|
||||
isAttachment.value = true; // จำลอง
|
||||
isChangeData.value = false; //จำลอง
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -217,7 +214,7 @@ onMounted(async () => {
|
|||
ref="childAttachedRef"
|
||||
v-model:is-change-data="isChangeData"
|
||||
:on-check-change-data="onCheckChangeData"
|
||||
v-model:is-attachment="isAttachment"
|
||||
v-model:is-attachment="formCommandList.isAttachment "
|
||||
/>
|
||||
</q-card>
|
||||
</q-tab-panel>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue