ui command tab 2/3/5

This commit is contained in:
STW_TTTY\stwtt 2024-09-24 10:50:42 +07:00
parent fc9f22ba2b
commit df4cb61671
6 changed files with 396 additions and 62 deletions

View file

@ -29,10 +29,7 @@ const props = defineProps({
const commandId = ref<string>(route.params.id.toString()); //ID
//
const formData = reactive<FormDataDetail>({
id: "",
status: "",
commandTypeName: "",
let formData = reactive<FormDataDetail>({
commandNo: "",
commandYear: null,
detailHeader: "",
@ -41,7 +38,6 @@ const formData = reactive<FormDataDetail>({
issue: null,
commandAffectDate: null, //
commandExcecuteDate: null, //
commandSysId: "", //
});
const modalPreview = ref<boolean>(false); //
@ -69,14 +65,16 @@ async function onSubmit() {
/**
* ทำงานเม Components กเรยกใชงาน
*/
watch(
() => props.formCommandList,
() => {
const list = props.formCommandList;
console.log("🚀 ~ props.formCommandList:", props.formCommandList)
console.log("🚀 ~ onMounted ~ list:", list);
}
);
onMounted(() => {
formData.commandNo = props.formCommandList.commandNo;
formData.commandYear = props.formCommandList.commandYear;
formData.detailHeader = props.formCommandList.detailHeader;
formData.detailBody = props.formCommandList.detailBody;
formData.detailFooter = props.formCommandList.detailFooter;
formData.issue = props.formCommandList.issue;
formData.commandAffectDate = props.formCommandList.commandAffectDate;
formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate;
});
/**
* งกนทองการนำฟงกนออกไปใชใน Components แม
@ -90,7 +88,6 @@ defineExpose({
<q-card-section>
<div class="row q-col-gutter-sm">
<!-- คำสงเลขท -->
{{ props.formCommandList }}
<div class="col-4 row">
<div class="col-6">
<q-input