isAttachment

This commit is contained in:
STW_TTTY\stwtt 2024-09-26 11:21:26 +07:00
parent 57dd12d6d2
commit 13317f94f2
5 changed files with 9 additions and 8 deletions

View file

@ -39,6 +39,8 @@ let formData = reactive<FormDataDetail>({
commandAffectDate: null, //
commandExcecuteDate: null, //
isBangkok: false,
isAttachment:true
});
const modalPreview = ref<boolean>(false); //

View file

@ -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);

View file

@ -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, "บันทึกข้อมูลสำเร็จ");

View file

@ -25,6 +25,7 @@ interface FormDataDetail {
commandSysId?: string;
commandTypeName?: string;
isBangkok?: boolean;
isAttachment:boolean
}
interface ListCommandSalaryType {

View file

@ -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>