Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
a103caa2
Commit
a103caa2
authored
Apr 08, 2023
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
58365629
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
230 additions
and
21 deletions
+230
-21
configurations.example.ts
src/assets/configurations.example.ts
+5
-3
addFinedAmount.vue
src/components/booking/addFinedAmount.vue
+4
-5
listFinedAmount.vue
src/components/booking/listFinedAmount.vue
+27
-1
updateFinedAmount.vue
src/components/booking/updateFinedAmount.vue
+148
-0
index.vue
src/components/detailBooking/index.vue
+11
-5
index.vue
src/components/detailBooking/tableDeposit/index.vue
+32
-4
index.vue
src/pages/danh-sach-booking/index.vue
+1
-1
index.vue
src/pages/khach-hang-cho-duyet/index.vue
+2
-2
No files found.
src/assets/configurations.example.ts
View file @
a103caa2
...
@@ -97,7 +97,7 @@ export enum API_PATHS {
...
@@ -97,7 +97,7 @@ export enum API_PATHS {
getListBooking
=
'booking'
,
getListBooking
=
'booking'
,
getBookingDetail
=
'booking/detail'
,
getBookingDetail
=
'booking/detail'
,
getArrayArtist
=
'artist/arrayArtist'
,
getArrayArtist
=
'artist/arrayArtist'
,
getListBookingHis
=
'booking/waitingCancellation'
,
getListBookingHis
=
'booking/waitingCancellation'
,
getArrayCust
=
'customer/arrayCust'
,
getArrayCust
=
'customer/arrayCust'
,
getlistMenu
=
'web-page/list'
,
getlistMenu
=
'web-page/list'
,
getDetailMenu
=
'web-page/detail'
,
getDetailMenu
=
'web-page/detail'
,
...
@@ -171,7 +171,6 @@ export enum API_PATHS {
...
@@ -171,7 +171,6 @@ export enum API_PATHS {
// xóa công việc
// xóa công việc
workDelete
=
'work/delete'
,
workDelete
=
'work/delete'
,
// danh sách ngân hàng
// danh sách ngân hàng
listBank
=
'common/bank'
,
listBank
=
'common/bank'
,
...
@@ -188,5 +187,8 @@ export enum API_PATHS {
...
@@ -188,5 +187,8 @@ export enum API_PATHS {
contractPenaltiesUpdate
=
'contractPenalties/update'
,
contractPenaltiesUpdate
=
'contractPenalties/update'
,
//Xóa phạt
//Xóa phạt
contractPenaltiesDelete
=
'contractPenalties/delete'
contractPenaltiesDelete
=
'contractPenalties/delete'
,
// xác nhận
depositUpdateStatus
=
'deposit/updateStatus'
,
}
}
src/components/booking/addFinedAmount.vue
View file @
a103caa2
...
@@ -92,7 +92,7 @@ export default defineComponent({
...
@@ -92,7 +92,7 @@ export default defineComponent({
if
(
value
)
{
if
(
value
)
{
content
.
value
=
null
;
content
.
value
=
null
;
money
.
value
=
null
;
money
.
value
=
null
;
console
.
log
(
props
.
data
);
}
}
}
}
);
);
...
@@ -116,15 +116,14 @@ export default defineComponent({
...
@@ -116,15 +116,14 @@ export default defineComponent({
message
:
'Thêm thành công'
,
message
:
'Thêm thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
});
void
closeDialog
context
.
emit
(
'toggle'
);
context
.
emit
(
'success'
);
context
.
emit
(
'success'
)
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
closeDialog
=
()
=>
{
const
closeDialog
=
()
=>
{
context
.
emit
(
'toggle'
,
);
context
.
emit
(
'toggle'
);
};
};
return
{
return
{
...
...
src/components/booking/listFinedAmount.vue
View file @
a103caa2
...
@@ -60,7 +60,13 @@
...
@@ -60,7 +60,13 @@
</
template
>
</
template
>
<
template
v-slot:body-cell-action=
"item"
>
<
template
v-slot:body-cell-action=
"item"
>
<q-td
style=
"padding: 0; text-align: center"
>
<q-td
style=
"padding: 0; text-align: center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-pencil-outline"
>
<q-btn
@
click=
"openDialogUpdate(item.row)"
flat
round
color=
"primary"
icon=
"mdi-pencil-outline"
>
<q-tooltip
:offset=
"[10, 10]"
>
Cập nhật
</q-tooltip>
<q-tooltip
:offset=
"[10, 10]"
>
Cập nhật
</q-tooltip>
</q-btn>
</q-btn>
...
@@ -101,6 +107,14 @@
...
@@ -101,6 +107,14 @@
:data=
"data"
:data=
"data"
@
success=
"getList"
@
success=
"getList"
></add>
></add>
<update
:open=
"openUpdate"
@
toggle=
"openUpdate = !openUpdate"
:data=
"data"
:dataItem=
"dataItem"
@
success=
"getList"
></update>
</q-card>
</q-card>
</q-dialog>
</q-dialog>
</template>
</template>
...
@@ -114,9 +128,11 @@ import { api, BaseResponseBody } from 'src/boot/axios';
...
@@ -114,9 +128,11 @@ import { api, BaseResponseBody } from 'src/boot/axios';
import
{
formatMoney
}
from
'../../boot/functions'
;
import
{
formatMoney
}
from
'../../boot/functions'
;
import
{
ListBooking
,
ListFinedAmount
}
from
'src/assets/type'
;
import
{
ListBooking
,
ListFinedAmount
}
from
'src/assets/type'
;
import
add
from
'../booking/addFinedAmount.vue'
;
import
add
from
'../booking/addFinedAmount.vue'
;
import
update
from
'../booking/updateFinedAmount.vue'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
add
,
add
,
update
,
},
},
props
:
{
props
:
{
open
:
{
open
:
{
...
@@ -129,8 +145,10 @@ export default defineComponent({
...
@@ -129,8 +145,10 @@ export default defineComponent({
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
listFinedAmount
:
Ref
<
ListFinedAmount
[]
>
=
ref
([]);
const
listFinedAmount
:
Ref
<
ListFinedAmount
[]
>
=
ref
([]);
const
dataItem
:
Ref
<
ListFinedAmount
|
undefined
>
=
ref
();
const
totalPage
=
ref
(
1
);
const
totalPage
=
ref
(
1
);
const
openAddDialog
=
ref
(
false
);
const
openAddDialog
=
ref
(
false
);
const
openUpdate
=
ref
(
false
);
const
tableColumnsFinedAmount
=
[
const
tableColumnsFinedAmount
=
[
{
{
name
:
'stt'
,
name
:
'stt'
,
...
@@ -248,6 +266,11 @@ export default defineComponent({
...
@@ -248,6 +266,11 @@ export default defineComponent({
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
openDialogUpdate
=
(
item
:
ListFinedAmount
)
=>
{
openUpdate
.
value
=
true
;
dataItem
.
value
=
item
;
};
const
toggle
=
()
=>
{
const
toggle
=
()
=>
{
context
.
emit
(
'toggle'
);
context
.
emit
(
'toggle'
);
};
};
...
@@ -257,11 +280,14 @@ export default defineComponent({
...
@@ -257,11 +280,14 @@ export default defineComponent({
getList
,
getList
,
isformatMoney
,
isformatMoney
,
confirmDelete
,
confirmDelete
,
openDialogUpdate
,
//
//
listFinedAmount
,
listFinedAmount
,
tableColumnsFinedAmount
,
tableColumnsFinedAmount
,
totalPage
,
totalPage
,
openAddDialog
,
openAddDialog
,
dataItem
,
openUpdate
,
};
};
},
},
emits
:
[
'click:CloseBtn'
,
'editReCustomer'
,
'toggle'
],
emits
:
[
'click:CloseBtn'
,
'editReCustomer'
,
'toggle'
],
...
...
src/components/booking/updateFinedAmount.vue
0 → 100644
View file @
a103caa2
<
template
>
<q-dialog
persistent
:model-value=
"open"
>
<q-card
style=
"min-width: 750px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"confirmAdd"
>
<q-card-section
style=
"padding-bottom: 10px"
>
<q-item
style=
"padding-left: 10px"
>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
Cập nhật phạt
</q-item-label
>
</q-item-section>
</q-item>
</q-card-section>
<q-card-section
style=
"padding-top: 0px"
>
<div
class=
"cols-12 q-mb-sm"
>
<q-input
v-model=
"money"
outlined
hide-bottom-space
dense
type=
"text"
:rules=
"errorMoney"
label=
"Số tiền *"
/>
</div>
<div
class=
"cols-12"
>
<q-input
outlined
hide-bottom-space
v-model=
"content"
:rules=
"errorContent"
label=
"Nội dung *"
type=
"textarea"
/>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
label=
"Hủy"
@
click=
"closeDialog"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
label=
"Cập nhật"
/>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
ListBooking
,
ListFinedAmount
}
from
'src/assets/type'
;
export
default
defineComponent
({
props
:
{
open
:
{
type
:
Boolean
,
required
:
true
,
},
data
:
{
type
:
Object
as
PropType
<
ListBooking
>
,
required
:
true
,
},
dataItem
:
{
type
:
Object
as
PropType
<
ListFinedAmount
>
,
required
:
true
,
},
},
setup
(
props
,
context
)
{
const
content
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
money
:
Ref
<
string
|
null
>
=
ref
(
null
);
watch
(
()
=>
props
.
open
,
(
value
)
=>
{
if
(
value
)
{
content
.
value
=
props
.
dataItem
.
reason
;
money
.
value
=
props
.
dataItem
.
fee
;
}
}
);
const
confirmAdd
=
async
()
=>
{
try
{
const
browserResult
=
(
await
api
({
url
:
API_PATHS
.
contractPenaltiesUpdate
,
method
:
'POST'
,
data
:
{
id
:
props
.
dataItem
.
id
,
artistBooking
:
{
id
:
props
.
data
.
id
,
},
fee
:
money
.
value
,
reason
:
content
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
browserResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
'Cập nhật thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
context
.
emit
(
'toggle'
);
context
.
emit
(
'success'
);
}
}
catch
(
error
)
{}
};
const
closeDialog
=
()
=>
{
context
.
emit
(
'toggle'
);
};
// const errorMoney = [
// (val?: string) => (val && val.trim().length) || 'Vui lòng nhập số tiền',
// ];
// const errorContent = [
// (val?: string) => (val && val.trim().length) || 'Vui lòng nhập nội dung',
// ];
return
{
//
closeDialog
,
confirmAdd
,
//
money
,
content
,
// errorMoney,
// errorContent,
};
},
emits
:
[
'toggle'
,
'success'
],
});
</
script
>
src/components/detailBooking/index.vue
View file @
a103caa2
...
@@ -58,9 +58,9 @@
...
@@ -58,9 +58,9 @@
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
toTime
}}
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
toTime
}}
</div>
<div
class=
"col-4 fs-14 color"
>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.fee'
)
}}
:
{{
$t
(
'listBooking.titleColumnsTable.fee'
)
}}
:
</div>
</div>
<div
class=
"col-8 fs-14"
>
{{
detailInfoBooking
.
expectFee
}}
</div>
<div
class=
"col-8 fs-14"
>
{{
isformatMoney
(
detailInfoBooking
.
expectFee
)
}}
</div>
<div
class=
"col-4 fs-14 color"
>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.favoriteScore'
)
}}
:
{{
$t
(
'listBooking.titleColumnsTable.favoriteScore'
)
}}
:
...
@@ -112,7 +112,6 @@
...
@@ -112,7 +112,6 @@
<div
class=
"col-4 fs-14 color"
>
<div
class=
"col-4 fs-14 color"
>
{{
$t
(
'listBooking.titleColumnsTable.performStatus'
)
}}
:
{{
$t
(
'listBooking.titleColumnsTable.performStatus'
)
}}
:
</div>
</div>
...
@@ -163,6 +162,7 @@
...
@@ -163,6 +162,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
PropType
,
watch
}
from
'vue'
;
import
{
defineComponent
,
PropType
,
watch
}
from
'vue'
;
import
{
ListBooking
}
from
'src/assets/type'
;
import
{
ListBooking
}
from
'src/assets/type'
;
import
{
formatMoney
}
from
'../../boot/functions'
;
import
tableDeposit
from
'../../components/detailBooking/tableDeposit/index.vue'
;
import
tableDeposit
from
'../../components/detailBooking/tableDeposit/index.vue'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
...
@@ -187,7 +187,13 @@ export default defineComponent({
...
@@ -187,7 +187,13 @@ export default defineComponent({
}
}
);
);
return
{};
const
isformatMoney
=
(
value
:
string
)
=>
{
return
formatMoney
({
amount
:
value
});
};
return
{
isformatMoney
,
};
},
},
emits
:
[
'update:showDialog'
,
'click:CloseBtn'
],
emits
:
[
'update:showDialog'
,
'click:CloseBtn'
],
});
});
...
...
src/components/detailBooking/tableDeposit/index.vue
View file @
a103caa2
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
<q-tooltip
:offset=
"[20, 10]"
>
Cập nhật
</q-tooltip>
<q-tooltip
:offset=
"[20, 10]"
>
Cập nhật
</q-tooltip>
</q-btn>
</q-btn>
<q-btn
<q-btn
v-if=
"rowData.row.status == 0"
flat
flat
round
round
color=
"primary"
color=
"primary"
...
@@ -176,6 +177,7 @@ import addNewDialog from '../../detailBooking/tableDeposit/add.vue';
...
@@ -176,6 +177,7 @@ import addNewDialog from '../../detailBooking/tableDeposit/add.vue';
import
update
from
'../../detailBooking/tableDeposit/update.vue'
;
import
update
from
'../../detailBooking/tableDeposit/update.vue'
;
import
{
formatMoney
}
from
'boot/functions'
;
import
{
formatMoney
}
from
'boot/functions'
;
import
{
ListDeposit
,
FileUploadType
}
from
'src/assets/type'
;
import
{
ListDeposit
,
FileUploadType
}
from
'src/assets/type'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
addNewDialog
,
addNewDialog
,
...
@@ -312,11 +314,37 @@ export default defineComponent({
...
@@ -312,11 +314,37 @@ export default defineComponent({
dialogUpdate
.
value
=
true
;
dialogUpdate
.
value
=
true
;
};
};
const
confirmBrowser
=
(
id
:
number
)
=>
{
const
confirmBrowser
=
(
id
:
number
)
=>
{
console
.
log
(
id
);
Dialog
.
create
({
title
:
'Xác nhận'
,
message
:
'Bạn có chắc chắn duyệt đặt cọc này?'
,
cancel
:
'Hủy'
,
color
:
'negative'
,
}).
onOk
(()
=>
{
void
browser
(
id
);
});
};
};
const
confirmRefuse
=
(
id
:
number
)
=>
{
console
.
log
(
id
);
const
browser
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
depositUpdateStatus
,
method
:
'POST'
,
data
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
'Duyệt thành công'
,
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getList
();
}
}
catch
(
error
)
{}
};
};
const
isformatMoney
=
(
value
:
string
)
=>
{
const
isformatMoney
=
(
value
:
string
)
=>
{
...
@@ -382,7 +410,7 @@ export default defineComponent({
...
@@ -382,7 +410,7 @@ export default defineComponent({
handleUpdate
,
handleUpdate
,
isformatMoney
,
isformatMoney
,
confirmBrowser
,
confirmBrowser
,
confirmRefuse
,
};
};
},
},
});
});
...
...
src/pages/danh-sach-booking/index.vue
View file @
a103caa2
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
<
template
v-slot:body-cell-finedAmount=
"item"
>
<
template
v-slot:body-cell-finedAmount=
"item"
>
<q-td
style=
"cursor: pointer"
align=
"center"
>
<q-td
style=
"cursor: pointer"
align=
"center"
>
<div
@
click=
"openDialogfinedAmount(item.row)"
>
<div
style=
"color: blue; text-decoration:underline;"
@
click=
"openDialogfinedAmount(item.row)"
>
{{
isformatMoney
(
item
.
row
.
finedAmount
)
}}
{{
isformatMoney
(
item
.
row
.
finedAmount
)
}}
</div>
</div>
</q-td>
</q-td>
...
...
src/pages/khach-hang-cho-duyet/index.vue
View file @
a103caa2
...
@@ -281,8 +281,8 @@ export default defineComponent({
...
@@ -281,8 +281,8 @@ export default defineComponent({
sortable
:
false
,
sortable
:
false
,
},
},
{
{
name
:
'
e
mail'
,
name
:
'
representativeE
mail'
,
field
:
'
e
mail'
,
field
:
'
representativeE
mail'
,
required
:
true
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.email'
),
label
:
i18n
.
global
.
t
(
'customer.tableColumnsCustomer.email'
),
headerStyle
:
'text-align: center !important;'
,
headerStyle
:
'text-align: center !important;'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment