Merge branch 'refs/heads/main' into featrue/0526-update

This commit is contained in:
Yesol Choi
2025-05-29 19:21:38 +09:00
5 changed files with 97 additions and 105 deletions

View File

@@ -281,12 +281,12 @@ const columns = computed(() => {
</div>
</template>
<style lang="scss">
<style scoped lang="scss">
.flex-table {
.flex-table-header {
display: flex;
align-items: center;
padding: 20px 10px;
padding: 0.5rem 10px;
background-color: var(--primary);
> span,
@@ -360,7 +360,7 @@ const columns = computed(() => {
min-height: 60px;
background: var(--white);
border: 1px solid color-mix(in oklab, var(--fade-grey), black 3%);
padding: 8px;
padding: 4px;
margin-bottom: 6px;
&.is-row {

View File

@@ -36,7 +36,7 @@ const links = ref<NavbarItem[]>([
</script>
<template>
<NavbarLayout size="large" :links>
<NavbarLayout size="wide" :links>
<!-- Propagating the context to the default slot -->
<template #default="context">
<slot v-bind="context" />

View File

@@ -65,6 +65,7 @@ const params = reactive({
title: '',
priceData: [],
flexColumn: [
{ key: 'process', label: '구분', cellClass: 'paymentColumn5' },
{ key: 'apprNo', label: '결재번호', cellClass: 'paymentColumn1' },
{ key: 'title', label: '제목', cellClass: 'paymentColumn2' },
{ key: 'name', label: '작성자', cellClass: 'paymentColumn3' },
@@ -74,7 +75,6 @@ const params = reactive({
cellClass: 'paymentColumn4',
format: formatRegDt,
},
{ key: 'process', label: '구분', cellClass: 'paymentColumn5' },
],
approvalParams: [],
rowData: [],
@@ -147,37 +147,6 @@ const searchApproval = async () => {
type User = (typeof users)[0]
// duplicate user data to grow the array
const data: User[] = []
for (let i = 0; i < 1000; i++) {
data.push(...users)
}
// this is a sample for custom sort function
const locationSorter: VFlexTableWrapperSortFunction<User> = ({ order, a, b }) => {
if (order === 'asc') {
return a.location.localeCompare(b.location)
}
else if (order === 'desc') {
return b.location.localeCompare(a.location)
}
return 0
}
// this is a sample for custom filter function
const userFilter: VFlexTableWrapperFilterFunction<User> = ({ searchTerm, row }) => {
if (!searchTerm) {
return true
}
// search either in the name or the bio
return (
row.name.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())
|| row.bio.toLocaleLowerCase().includes(searchTerm.toLocaleLowerCase())
)
}
const onRowClick = async (row) => {
params.rowData = row
try {
@@ -205,14 +174,6 @@ const onRowClick = async (row) => {
}
}
const onRowClick2 = (row: any) => {
selectedRow.value = row
isModalOpen.value = true
prcsNo.value = row.prcsNo
// prcsNo.value = 'PRCS-20250527049'
console.log(row.apprNo)
}
</script>
@@ -319,11 +280,11 @@ const onRowClick2 = (row: any) => {
>
<template #payment-header>
<div class="flex-table-header">
<span class="flex-table-item paymentColumn5">구분</span>
<span class="flex-table-item paymentColumn1">결재번호</span>
<span class="flex-table-item paymentColumn2">제목</span>
<span class="flex-table-item paymentColumn3">작성자</span>
<span class="flex-table-item paymentColumn4">등록일</span>
<span class="flex-table-item paymentColumn5">구분</span>
</div>
</template>
</ComVFlexTable>
@@ -364,7 +325,9 @@ const onRowClick2 = (row: any) => {
}
.flex-table .flex-table-item {
min-height: 3rem;
min-height: 2rem;
background-color: var(--primary);
border: 0px;
}
input[readonly] {
@@ -380,12 +343,8 @@ input[readonly] {
margin-top: 1rem; // 필요 시 간격 추가
}
.flex-table .flex-table-item {
background-color: var(--primary);
border: 0px;
}
.flex-table .flex-table-header {
padding: 0px;
padding: 0.5rem;
}
.flex-table.is-table-clickable .flex-table-item:hover, .flex-table.is-table-clickable .flex-table-item:focus-within a:hover {
background-color: var(--primary)!important;

View File

@@ -11,6 +11,7 @@ const isSelectOpen = ref(false)
const notyf = useNotyf()
const router = useRouter()
const selectedCode = ref()
const selectedContractCompCode = ref()
const priceSearchCheckBoxStatus = ref(false)
const isLoading = ref(false)
@@ -169,6 +170,7 @@ function handlePriceRowClick(row) {
registerFormOpen.value = false
completedPriceDataParams.estimates = row.estimates
// priceSearchCheckBoxStatus.value = "false"
console.log(row)
console.log(completedPriceDataParams.estimates)
}
@@ -198,10 +200,12 @@ const saveContOne = async () => {
return
}
}
console.log(selectedContractCompCode)
const paramsCont ={
prcsNo: completedPriceDataParams.prcsNo,
bizNo: completedPriceDataParams.bizNo,
bizGubunCd: selectedContractCompCode.value,
bizGubunName: '',
cateCd: priceSearchCheckBoxStatus.value ? selectedCode.value : completedPriceDataParams.cateCd,
compNm: completedPriceDataParams.compNm,
title: completedPriceDataParams.title,
@@ -359,7 +363,7 @@ function onBizNoChange() {
<VField class="is-flex">
<VControl raw subcontrol>
<VCheckbox
label="예외사유"
label="예외"
color="info"
v-model="priceSearchCheckBoxStatus"
/>
@@ -370,9 +374,10 @@ function onBizNoChange() {
<div class="column is-fullhd">
<VField>
<VControl>
<span class="">사유:</span>
<input
v-model="completedPriceDataParams.reason"
class="input custom-text-filter"
class="input custom-text-filter "
placeholder="가격조사 안했을 시 예외 사유 입력(필수)"
:class="{ 'danger-placeholder': showReasonError }"
>
@@ -485,15 +490,13 @@ function onBizNoChange() {
</VControl>
</VField>
</td>
<td colspan="1">
<td>
<span class="colum">
<VField>
<VSelect>
<VOption value="">
수의계약 사유
</VOption>
</VSelect>
</VField>
<VField class="">
<VCodeSelect
v-model="selectedContractCompCode"
cd_grp="15"
/></VField>
</span>
</td>
<td>

View File

@@ -76,10 +76,14 @@ const params = reactive({
{ key: '', label: '금액(VAT별도)', editable: false },
],
dtlSpecs: [], //상세 규격 입력 데이터
minAmt: null,
minAmtComp: [],
})
function getDetailList(arg){
console.log("arg",arg)//svy_yn
if(!props.prcsNo){
params.stCdFalg = true
}
@@ -107,6 +111,8 @@ function getDetailList(arg){
})) //비고 데이터 없음, 승인일자 없음 todo
params.prcsAtts = arg.prcsAtts
params.svyYn = arg.svyYn
minAmtCalc(params.prcsBizs)
}
const updateState = async () => {
@@ -155,6 +161,17 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
link.click()
}
function minAmtCalc (est) {
const totAmts = est.map(value => value.totAmt)
if(totAmts.length === 0) {
return {minAmt : null, bizNo : []};
}
const minAmt = Math.min(...totAmts);
const bizNo = est.filter(value => value.totAmt === minAmt).map(value => value.bizNo);
params.minAmt = minAmt;
params.minAmtComp = bizNo;
}
</script>
@@ -164,6 +181,7 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
<div class="table-container">
<table class="table datatable-table is-fullwidth">
<colgroup>
<col style="width: 7%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 10%;">
@@ -172,8 +190,7 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 13%;">
</colgroup>
<tbody>
<tr>
@@ -275,7 +292,7 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
<td>등록기간</td>
<td colspan="6">
<div class="columns">
<div class="column is-4">
<div class="column is-2">
<input
:readonly=true
v-model="generalParams.regSdat"
@@ -283,8 +300,8 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
disabled
>
</div>
<div style="transform: translateY(9px)">~</div>
<div class="column is-4">
<span style="margin: 0.5rem 0.5rem">~</span>
<div class="column is-2">
<input
:readonly=true
v-model="generalParams.regEdat"
@@ -297,46 +314,32 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
</tr>
<tr>
<td>첨부파일</td>
<td colspan="9">
<td colspan="3">
<div class="column is-12">
<VField>
<VLabel>첨부파일</VLabel>
<VControl>
<div
v-for="f in params.prcsAtts"
:key="f.logiFnm"
class="content estimate-file-wrapper"
>
<div class="estimate-file-name">
<div class="estimate-file-name ml-2">
{{ f.logiFnm }}{{" ("}}{{Math.ceil(f.size / 1024)}}kb{{")"}}
</div>
<div>
<i class="fa fa-download estimate-file-download" @click="onPrcsFileDownload(f.prcsNo, f.fileOrd, f.logiFnm)" />
<i class="fa fa-download estimate-file-download pr-2" @click="onPrcsFileDownload(f.prcsNo, f.fileOrd, f.logiFnm)" />
</div>
</div>
</VControl>
</VField>
</div>
</td>
<td colspan="6"></td>
</tr>
<tr>
<td>견적서확인</td>
<td colspan="9">
<slot name="status"
v-if="params.stCd == '0200'"
>
<div style="display: flex; justify-content: flex-end; gap: 8px;">
<VButton
color="primary"
icon="fas fa-circle"
elevated
@click="onChangeFinal"
>
가격조사 완료
</VButton>
</div>
</slot>
<div class="mt-2">
<td colspan="6">
<div>
<VFlexTableCustomize
:key="params.prcsBizs.length"
:data="params.prcsBizs"
@@ -377,12 +380,39 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
</VFlexTableCustomize>
</div>
</td>
<td colspan="3">
<slot name="status"
v-if="params.stCd == '0200'"
>
<div>
<VButton
color="info"
icon="fas fa-circle"
elevated
@click="onChangeFinal"
>
가격조사 완료
</VButton>
</div>
</slot>
</td>
</tr>
<tr>
<td>최소견적서</td>
<td colspan="7">
<div class="columns">
<div class="column is-2">사업자명 : {{params.minAmtComp.join(',')}}</div>
<div class="column is-2">견적 금액 : {{formatCurrency(params.minAmt)}}</div>
</div>
</td>
<td colspan="2">
</td>
</tr>
</tbody>
</table>
</div>
<div class="column is-12">
<VField class="pr-2">
<div class="is-12">
<VField class="">
<VLabel class="has-fullwidth">
결재선
</VLabel>
@@ -425,19 +455,18 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
<style scoped lang="scss">
/*css 추가 start*/
.estimate-file-wrapper{
padding: 0;
margin: 0.25rem 0;
}
.flex-table {
.flex-table-header {
padding: 0.1rem !important;
padding: 1rem !important;
min-height: 40px;
border-top-left-radius: .75rem;
border-top-right-radius: .75rem;
}
.flex-table-cell {
.w-100 {
width: 100%;
}
}
.flex-table-item {
padding: 0.1rem !important;
min-height: 40px;
@@ -460,13 +489,12 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
width: 100%;
}
td {
padding: 10px 10px !important;
padding: 4px 10px;
.columns {
margin-left: 10px !important;
padding-top: 10px;
margin-inline-start : 0
}
.column {
padding: 0 !important;
padding: 0
}
}
}
@@ -478,15 +506,17 @@ const onPrcsFileDownload = async (prcsNo: string, fileOrd: number, logiFnm: stri
color: var(--smoke-white);
}
.datatable-table {
padding: 12px 12px;
.datatable-table {
td:nth-child(1) {
background-color: var(--primary);
}
td:nth-child(3) {
tr:nth-child(1) > td:nth-child(3) {
background-color: var(--primary);
}
tr:nth-child(3) > td:nth-child(3) {
background-color: var(--primary);
}
}
</style>