no message
This commit is contained in:
parent
8e8ab5b8cf
commit
fd2a76ecab
2 changed files with 37 additions and 33 deletions
|
|
@ -26,6 +26,7 @@ const selectRoundOption = ref<OptionData[]>([]);
|
|||
const modal = ref<boolean>(false);
|
||||
const action = ref<string>("");
|
||||
const personId = ref<string>();
|
||||
const profileType = ref<string>("");
|
||||
onMounted(async () => {
|
||||
await fecthRound();
|
||||
await fecthInsignia();
|
||||
|
|
@ -38,7 +39,7 @@ const fecthRound = async () => {
|
|||
let data = res.data.result;
|
||||
selectRoundOption.value = data;
|
||||
selectRound.value = data[0].id;
|
||||
console.log(selectRound.value);
|
||||
// console.log(selectRound.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
@ -48,7 +49,7 @@ const fecthInsignia = async () => {
|
|||
await http
|
||||
.get(config.API.insignia)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDatainsignia(data);
|
||||
})
|
||||
|
|
@ -59,7 +60,7 @@ const fecthInsignia = async () => {
|
|||
const fecthInsigniaType = async () => {
|
||||
await http(config.API.insigniaType)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
let data = res.data.result;
|
||||
DataStore.fetchDatainsigniaType(data);
|
||||
tab.value = DataStore.insigniaType[0].name;
|
||||
|
|
@ -226,7 +227,6 @@ watch(modal, () => {
|
|||
}
|
||||
});
|
||||
const selectorInsignia = () => {
|
||||
console.log(DataStore.insignia, selectRound.value, tab.value);
|
||||
fecthlistInsignia();
|
||||
};
|
||||
const selectorRound = (round: string) => {
|
||||
|
|
@ -242,7 +242,6 @@ const fecthlistInsignia = async () => {
|
|||
await http
|
||||
.post(config.API.noteSearch(), data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
let data = res.data.result;
|
||||
rows.value = [];
|
||||
rows.value = data.map((e: any) => ({
|
||||
|
|
@ -254,6 +253,7 @@ const fecthlistInsignia = async () => {
|
|||
name: e.fullName,
|
||||
type: e.requestInsignia,
|
||||
employeeType: DataStore.profileType(e.profileType),
|
||||
profileType: e.profileType,
|
||||
page: e.page,
|
||||
number: e.no,
|
||||
vatnumber: e.number,
|
||||
|
|
@ -261,7 +261,6 @@ const fecthlistInsignia = async () => {
|
|||
typepay: e.typePayment,
|
||||
address: e.address,
|
||||
}));
|
||||
console.log(rows.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
@ -284,14 +283,16 @@ const addData = () => {
|
|||
action.value = "addData";
|
||||
};
|
||||
|
||||
const editData = (id: string) => {
|
||||
personId.value = id;
|
||||
const editData = (data) => {
|
||||
console.log(data);
|
||||
|
||||
personId.value = data.id;
|
||||
profileType.value = data.profileType;
|
||||
action.value = "editData";
|
||||
modal.value = true;
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
console.log(122);
|
||||
console.log("save function");
|
||||
};
|
||||
|
||||
|
|
@ -469,7 +470,7 @@ const resetFilter = () => {
|
|||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click.stop="editData(props.row.id)"
|
||||
@click.stop="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
|
|
@ -601,7 +602,7 @@ const resetFilter = () => {
|
|||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="editData(props.row.id)"
|
||||
@click="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
|
|
@ -732,7 +733,7 @@ const resetFilter = () => {
|
|||
flat
|
||||
round
|
||||
color="primary"
|
||||
@click="editData(props.row.id)"
|
||||
@click="editData(props.row)"
|
||||
icon="mdi-pencil-outline"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||
|
|
@ -759,6 +760,7 @@ const resetFilter = () => {
|
|||
:roundId="selectRound"
|
||||
:action="action"
|
||||
:personId="personId"
|
||||
:profileType="profileType"
|
||||
/>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue