func : 최소견적서 표출 기능 추가

fix : priceDetail 스타일 수정
This commit is contained in:
Kasi
2025-05-29 18:01:23 +09:00
parent faad6e857d
commit f2e1c0b874

View File

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