Commit c8330db4 authored by Tình Trương's avatar Tình Trương

update

parent 7b6b8a02
......@@ -94,4 +94,5 @@ export enum API_PATHS {
updateConfigSystem = 'config-page/update',
addConfigSystem = 'config-page/add',
deleteConfigSystem = 'config-page/delete',
getListVABInfo = 'information',
}
......@@ -511,3 +511,33 @@ export type AddConfigSystem = {
url: string;
numIndex: number;
};
export type VABInfoType = {
id: number;
comName: string;
logo: string;
email: string;
website: string;
phone: string;
address: string;
};
export type DetailVABInfoType = {
id: number;
comName: string;
logo: string;
email: string;
website: string;
phone: string;
address: string;
};
export type UpdateVABInfoType = {
id: number;
comName: string;
logo: string;
email: string;
website: string;
phone: string;
address: string;
};
......@@ -62,11 +62,11 @@
:rules="urlRules"
clearable
></q-input>
<!-- :rules="nameMenuRules" -->
<q-select
:model-value="nameMenu"
@update:model-value="$emit('update:nameMenu', $event)"
:label="$t('listConfigSystem.dialogLabel.fieldLabels.nameMenu')"
:rules="nameMenuRules"
:options="nameMenuOptions"
multiple
map-options
......@@ -236,15 +236,15 @@ export default defineComponent({
(val && val.trim().length) ||
i18n.global.t('listConfigSystem.validateMessages.requireUrl'),
];
const nameMenuRules = [
(val?: number) =>
val !== undefined ||
i18n.global.t('listConfigSystem.validateMessages.requireNameMenu'),
];
// const nameMenuRules = [
// (val?: number) =>
// val !== undefined ||
// i18n.global.t('listConfigSystem.validateMessages.requireNameMenu'),
// ];
return {
namePageRules,
urlRules,
nameMenuRules,
// nameMenuRules,
};
},
emits: [
......
......@@ -4,7 +4,7 @@
:model-value="isOpened"
@update:model-value="$emit('update:isOpened', $event)"
>
<q-card class="full-width" style="max-width: 60rem" bordered>
<q-card class="full-width" style="max-width: 80rem" bordered>
<q-form
greedy
@submit.prevent="
......@@ -30,55 +30,73 @@
style="max-height: calc(100vh - 10rem)"
>
<div class="row q-col-gutter-sm">
<div class="col-12">
<div class="row flex-center q-pt-sm">
<div>
<q-card style="margin-bottom: 8px" v-if="image !== null">
<div class="col-6">
<div class="row flex-center">
<div class="q-mt-lg">
<q-card v-if="logo !== null">
<q-img
:src="image"
style="height: 268px; width: 350px"
@click="uploadAvatar"
>
</q-img>
:src="logo"
style="height: 390px; width: 350px; cursor: pointer"
></q-img>
<q-icon
name="mdi-close-circle"
style="position: absolute; right: 0; font-size: 18px"
color="red"
style="
position: absolute;
right: 0;
font-size: 18px;
cursor: pointer;
"
@click="deleteAvatar"
></q-icon>
</q-card>
<q-card v-else style="margin-bottom: 8px">
<q-img
src="~/assets/noavatar.png"
style="height: 265px; width: 350px"
></q-img>
</q-card>
<q-card @click="uploadAvatar">
<div align="center" class="flex flex-center q-py-xs">
<div
@click="uploadAvatar"
v-else
style="
height: 390px;
width: 350px;
border: 2px dashed #5d319e;
border-radius: 4px;
cursor: pointer;
"
>
<div
style="
height: 390px;
width: 350px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<q-icon
style="color: #5d319e"
name="mdi-plus-circle-outline"
:size="'xs'"
name="mdi-cloud-upload"
size="xl"
></q-icon>
<div class="q-mt-xs">
{{ $t('infoVAB.uploadImg') }}
</div>
Tải ảnh lên
</div>
</div>
<div>
<input
ref="upload"
hidden
type="file"
@change="selectedFile($event.target.files)"
type="file"
accept="image/png, image/jpeg"
/>
</q-card>
</div>
</div>
</div>
</div>
<div class="col-6">
<q-input
:model-value="name"
@update:model-value="$emit('update:name', $event)"
:label="$t('infoVAB.dialogLabel.infoVABLabels.name')"
:model-value="comName"
@update:model-value="$emit('update:comName', $event)"
:label="$t('infoVAB.dialogLabel.infoVABLabels.comName')"
type="text"
class="q-my-sm q-pt-md"
outlined
......@@ -156,7 +174,7 @@
<template v-slot:body-cell-action="">
<q-td style="padding: 0" class="flex flex-center">
<q-btn flat round color="primary" icon="mdi-delete-outline">
<q-tooltip :offset="[20, 10]">{{
<q-tooltip :offset="[10, 10]">{{
$t('infoVAB.toolTipMessage.deleteBankAccount')
}}</q-tooltip>
</q-btn>
......@@ -166,7 +184,7 @@
color="primary"
icon="mdi-account-edit-outline"
>
<q-tooltip :offset="[20, 10]">{{
<q-tooltip :offset="[10, 10]">{{
$t('infoVAB.toolTipMessage.updateBankAccount')
}}</q-tooltip>
</q-btn>
......@@ -242,7 +260,6 @@
import { defineComponent, ref, Ref, PropType } from 'vue';
import InfoVABAddUpdateBankAccountDialog from 'components/update-info-vab/info-vab-add-update-bank-account/index.vue';
import { i18n } from 'src/boot/i18n';
//bankAccount
const bankAccountTableColumnsInfoVAB = [
{
......@@ -318,10 +335,10 @@ export default defineComponent({
required: true,
},
isUpdate: { type: Boolean, default: false },
name: { type: String, required: true },
image: { type: String, required: true },
comName: { type: String, required: true },
logo: { type: String, required: true },
website: { type: String, required: true },
phone: { type: String, required: true },
phone: { type: Number, required: true },
email: { type: String, required: true },
address: { type: String, required: true },
bankAccountList: { type: Array as PropType<unknown[]>, required: true },
......@@ -338,6 +355,7 @@ export default defineComponent({
};
const upload = ref(null);
const uploadAvatar = () => {
console.log(1);
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
......@@ -407,6 +425,7 @@ export default defineComponent({
selectedFile,
deleteAvatar,
uploadAvatar,
upload,
bankAccountTableColumnsInfoVAB,
addBankAccountDialogIsOpened,
bank,
......@@ -426,12 +445,12 @@ export default defineComponent({
},
emits: [
'update:isOpened',
'update:name',
'update:comName',
'update:website',
'update:phone',
'update:email',
'update:address',
'update:image',
'update:logo',
'SetAvatar',
'deleteAvatar',
'saveInfoVAB',
......
......@@ -846,8 +846,8 @@ export default {
titleBankAccount: 'Danh sách tài khoản ngân hàng thụ hưởng',
tableColumnsInfoVAB: {
stt: 'STT',
name: 'Tên công ty',
image: 'Logo',
comName: 'Tên công ty',
logo: 'Logo',
website: 'Website',
phone: 'Số điện thoại',
email: 'Email',
......@@ -869,7 +869,7 @@ export default {
updateBankAccount: 'Cập nhật ngân hàng thụ hưởng',
},
infoVABLabels: {
name: 'Tên công ty *',
comName: 'Tên công ty *',
website: 'Website *',
phone: 'Số điện thoại *',
email: 'Email *',
......
......@@ -144,7 +144,6 @@
/>
<AddUpdatePolicyDialog
isUpdate
v-model:isOpened="showDialogUpdate"
v-model:namePage="namePage"
v-model:content="content"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment