รายละเอียดคำสั่ง => API
This commit is contained in:
parent
d21be61715
commit
5316a945a8
5 changed files with 343 additions and 84 deletions
|
|
@ -1,9 +1,28 @@
|
|||
import { ref } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
import type { FormDataDetail } from "@/modules/18_command/interface/request/Main";
|
||||
|
||||
export const useCommandDetail = defineStore("commandDetailStore", () => {
|
||||
const readonly = ref<boolean>(false);
|
||||
const isChangeData = ref<boolean>(false);
|
||||
const dataCommand = ref<FormDataDetail>();
|
||||
const status = ref<string>("");
|
||||
|
||||
function checkStep(val: string) {
|
||||
status.value = val;
|
||||
switch (val) {
|
||||
case "DRAFT":
|
||||
return 1;
|
||||
case "PENDING":
|
||||
return 2;
|
||||
case "WAITING":
|
||||
return 3;
|
||||
case "REPORTED":
|
||||
return 4;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const classInput = (val: boolean) => {
|
||||
return {
|
||||
|
|
@ -13,8 +32,10 @@ export const useCommandDetail = defineStore("commandDetailStore", () => {
|
|||
};
|
||||
|
||||
return {
|
||||
checkStep,
|
||||
classInput,
|
||||
readonly,
|
||||
|
||||
status,
|
||||
dataCommand,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue