Merge pull request '955-견적서 2차 SAP 판매점 노출' (#17) from feature/ysCha into dev
Reviewed-on: #17
This commit is contained in:
commit
2e86c793c3
@ -504,6 +504,7 @@ export default function Estimate({}) {
|
||||
saleStoreId: estimateContextState.sapSaleStoreId,
|
||||
sapSalesStoreCd: estimateContextState.sapSalesStoreCd,
|
||||
docTpCd: estimateContextState.estimateType,
|
||||
secSapSalesStoreCd:(estimateContextState.secSapSalesStoreCd?.length > 0 && showPriceCd === 'QSP_PRICE')? estimateContextState.secSapSalesStoreCd :'',
|
||||
priceCd: showPriceCd,
|
||||
itemIdList: estimateContextState.itemList.filter((item) => item.delFlg === '0' && item.paDispOrder === null),
|
||||
}
|
||||
@ -1216,6 +1217,23 @@ export default function Estimate({}) {
|
||||
}
|
||||
}, [estimateContextState?.itemList, cableItemList])
|
||||
|
||||
const [agencyCustList, setAgencyCustList] = useState([])
|
||||
useEffect(() => {
|
||||
// 952 - 2차점 특가 sapSalesStoreCd
|
||||
if(estimateContextState?.sapSalesStoreCd && session?.storeLvl === '1') {
|
||||
const param = {
|
||||
sapSalesStoreCd: estimateContextState.sapSalesStoreCd,
|
||||
}
|
||||
const apiUrl = `api/estimate/agency-cust-list?${queryStringFormatter(param)}`
|
||||
get({ url: apiUrl }).then((res) => {
|
||||
if (isNotEmptyArray(res?.data)) {
|
||||
setAgencyCustList(res?.data);
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}, [estimateContextState?.sapSalesStoreCd])
|
||||
return (
|
||||
<div className="sub-content estimate">
|
||||
<div className="sub-content-inner">
|
||||
@ -1360,6 +1378,7 @@ export default function Estimate({}) {
|
||||
{getMessage('estimate.detail.estimateType')} <span className="important">*</span>
|
||||
</th>
|
||||
<td colSpan={3}>
|
||||
<div className="form-flex-wrap">
|
||||
<div className="radio-wrap">
|
||||
{/*pkgRank is null, empty 인 경우 : 사용불가, 이전에 등록된 경우 사용가능, style로 제어*/}
|
||||
<div className="d-check-radio light mr10" style={{display:
|
||||
@ -1396,6 +1415,36 @@ export default function Estimate({}) {
|
||||
<label htmlFor="YJOD">{getMessage('estimate.detail.estimateType.yjod')}</label>
|
||||
</div>
|
||||
</div>
|
||||
{ (session?.storeLvl === '1' && agencyCustList.length > 0 )? (
|
||||
<div className="form-flex-select ml10">
|
||||
<label htmlFor="">{getMessage('estimate.detail.agency')}</label>
|
||||
<div className="select-wrap" style={{ width: '400px' }}>
|
||||
<Select
|
||||
id="agencyName"
|
||||
instanceId="agencyName"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={agencyCustList}
|
||||
onChange={(e) => {
|
||||
if (isObjectNotEmpty(e)) {
|
||||
setEstimateContextState({ secSapSalesStoreCd: e.sapSalesStoreCd })
|
||||
} else {
|
||||
setEstimateContextState({ secSapSalesStoreCd: '' })
|
||||
}
|
||||
}}
|
||||
getOptionLabel={(x) => x.sapSalesStoreNm}
|
||||
getOptionValue={(x) => x.sapSalesStoreCd}
|
||||
isClearable={true}
|
||||
isSearchable={true}
|
||||
value={agencyCustList.filter(function (option) {
|
||||
return option.sapSalesStoreCd === estimateContextState.secSapSalesStoreCd
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
) : ('')}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -905,6 +905,7 @@
|
||||
"estimate.detail.estimateType": "注文分類",
|
||||
"estimate.detail.estimateType.yjss": "住宅PKG",
|
||||
"estimate.detail.estimateType.yjod": "積上げ(YJOD)",
|
||||
"estimate.detail.agency": "2次店名",
|
||||
"estimate.detail.roofCns": "屋根材・施工区分",
|
||||
"estimate.detail.remarks": "備考",
|
||||
"estimate.detail.fileFlg": "後日資料提出",
|
||||
|
||||
@ -906,6 +906,7 @@
|
||||
"estimate.detail.estimateType": "주문분류",
|
||||
"estimate.detail.estimateType.yjss": "住宅PKG",
|
||||
"estimate.detail.estimateType.yjod": "積上げ( YJOD )",
|
||||
"estimate.detail.agency": "2차점명",
|
||||
"estimate.detail.roofCns": "지붕재・사양시공",
|
||||
"estimate.detail.remarks": "비고",
|
||||
"estimate.detail.fileFlg": "후일자료제출",
|
||||
|
||||
@ -47,6 +47,16 @@ table{
|
||||
}
|
||||
.form-flex-wrap{
|
||||
@include flexbox;
|
||||
.form-flex-select{
|
||||
@include flexbox;
|
||||
label{
|
||||
flex: none;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.form-select{
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.date-picker-wrap{
|
||||
width: 100%;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user