ui command tab 2/3/5
This commit is contained in:
parent
fc9f22ba2b
commit
df4cb61671
6 changed files with 396 additions and 62 deletions
|
|
@ -23,6 +23,7 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const commandId = ref<string>(route.params.id.toString()); //ID คำสั่ง
|
||||
const store = useCommandDetail();
|
||||
const isMomFirst = ref<boolean>(false);
|
||||
|
||||
const childDetailRef = ref<InstanceType<typeof Detail> | null>(null); //ref components รายละเอียดคำสั่ง
|
||||
const childListPersonsRef = ref<InstanceType<typeof ListPersons> | null>(null); //ref components รายชื่อผู้ออกคำสั่ง
|
||||
|
|
@ -31,7 +32,7 @@ const childReceivedCopyRef = ref<InstanceType<typeof ReceivedCopy> | null>(
|
|||
); //ref components รายชื่อผู้ได้รับสำเนาคำสั่ง
|
||||
const childAttachedRef = ref<InstanceType<typeof Attached> | null>(null); //ref components คำสั่งและบัญชีแนบท้าบ
|
||||
|
||||
const tabs = ref<string>("Detail"); //Tab
|
||||
const tabs = ref<string>("Main"); //Tab
|
||||
const readonly = ref<boolean>(route.name === "commandViewDetailPage"); //อ่านได้อย่างเดียว
|
||||
const isChangeData = ref<boolean>(false); //การเปลี่ยนแปลงของข้อมูล
|
||||
//รายการ Tab ละเอียดคำสั่ง
|
||||
|
|
@ -49,7 +50,7 @@ const tabsManu = ref<ItemTabs[]>([
|
|||
{ label: "พรีวิวคำสั่ง", name: "Attached" },
|
||||
]);
|
||||
|
||||
const formCommandList = reactive<FormDataDetail>({
|
||||
let formCommandList = reactive<FormDataDetail>({
|
||||
id: "",
|
||||
status: "",
|
||||
commandTypeName: "",
|
||||
|
|
@ -84,19 +85,7 @@ async function fetchDataCommandList() {
|
|||
.get(config.API.commandAction(commandId.value, "tab1"))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
formCommandList.id = data.id;
|
||||
formCommandList.status = data.status;
|
||||
formCommandList.commandTypeName = data.commandTypeName;
|
||||
formCommandList.commandNo = data.commandNo;
|
||||
formCommandList.commandYear = data.commandYear;
|
||||
formCommandList.detailHeader = data.detailHeader;
|
||||
formCommandList.detailBody = data.detailBody;
|
||||
formCommandList.detailFooter = data.detailFooter;
|
||||
formCommandList.issue = data.issue;
|
||||
formCommandList.commandAffectDate = data.commandAffectDate;
|
||||
formCommandList.commandExcecuteDate = data.commandExcecuteDate;
|
||||
formCommandList.commandSysId = data.commandSysId;
|
||||
|
||||
formCommandList = data;
|
||||
isChangeData.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -204,7 +193,7 @@ onMounted(async () => {
|
|||
ref="childListPersonsRef"
|
||||
v-model:is-change-data="isChangeData"
|
||||
:on-check-change-data="onCheckChangeData"
|
||||
:form-command-list="formCommandList"
|
||||
:command-sys-id="formCommandList.commandSysId as string"
|
||||
:fetch-data-command-list="fetchDataCommandList"
|
||||
/>
|
||||
</q-card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue