물건현황 페이징
This commit is contained in:
parent
dae4de6825
commit
7f8a862dc8
@ -406,14 +406,14 @@ export default function Stuff() {
|
||||
<div className="sub-table-box">
|
||||
<div className="table-box-title-wrap">
|
||||
<div className="title-wrap">
|
||||
<h3>물건목록</h3>
|
||||
<h3>{getMessage('stuff.search.grid.title')}</h3>
|
||||
<ul className="info-wrap">
|
||||
<li>
|
||||
전체
|
||||
{getMessage('stuff.search.grid.all')}
|
||||
<span>{convertNumberToPriceDecimal(totalCount)}</span>
|
||||
</li>
|
||||
<li>
|
||||
선택
|
||||
{getMessage('stuff.search.grid.selected')}
|
||||
<span className="red">{convertNumberToPriceDecimal(selectedRowDataCount)}</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -421,8 +421,8 @@ export default function Stuff() {
|
||||
<div className="left-unit-box">
|
||||
<div className="select-box mr5" style={{ width: '110px' }}>
|
||||
<select className="select-light black" name="" id="" onChange={onChangeSortType}>
|
||||
<option value="R">최근 등록일</option>
|
||||
<option value="U">최근 수정일</option>
|
||||
<option value="R">{getMessage('stuff.search.grid.schSortTypeR')}</option>
|
||||
<option value="U">{getMessage('stuff.search.grid.schSortTypeU')}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="select-box" style={{ width: '80px' }}>
|
||||
|
||||
@ -99,7 +99,6 @@ export default function StuffSearchCondition() {
|
||||
|
||||
useEffect(() => {
|
||||
if (isObjectNotEmpty(sessionState)) {
|
||||
// console.log('판매대리점 리스트 가져오기 위한 세션정보::::::::', sessionState)
|
||||
// storeId가 T01 이거나 1차점일때만 판매대리점 선택 활성화
|
||||
// get({ url: `/api/object/saleStore/201TES01/list` }).then((res) => {
|
||||
get({ url: `/api/object/saleStore/${sessionState?.storeId}/list` }).then((res) => {
|
||||
@ -190,7 +189,6 @@ export default function StuffSearchCondition() {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
// placeholder="물건번호 입력"
|
||||
value={stuffSearch?.code === 'E' || stuffSearch?.code === 'M' ? stuffSearch.schObjectNo : objectNo}
|
||||
onChange={(e) => {
|
||||
setObjectNo(e.target.value)
|
||||
@ -205,7 +203,6 @@ export default function StuffSearchCondition() {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
// placeholder="판매대리점명 입력"
|
||||
value={stuffSearch?.schSaleStoreName ? stuffSearch.schSaleStoreName : saleStoreName}
|
||||
onChange={(e) => {
|
||||
setSaleStoreName(e.target.value)
|
||||
@ -220,7 +217,6 @@ export default function StuffSearchCondition() {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
// placeholder="물건주소 입력"
|
||||
value={stuffSearch?.schAddress ? stuffSearch.schAddress : address}
|
||||
onChange={(e) => {
|
||||
setAddress(e.target.value)
|
||||
@ -237,7 +233,6 @@ export default function StuffSearchCondition() {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
// placeholder="물건명 입력"
|
||||
value={stuffSearch?.schObjectName ? stuffSearch.schObjectName : objectName}
|
||||
onChange={(e) => {
|
||||
setobjectName(e.target.value)
|
||||
@ -252,7 +247,6 @@ export default function StuffSearchCondition() {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
// placeholder="견적처 입력"
|
||||
value={stuffSearch?.schDispCompanyName ? stuffSearch.schDispCompanyName : dispCompanyName}
|
||||
onChange={(e) => {
|
||||
setDispCompanyName(e.target.value)
|
||||
|
||||
@ -12,6 +12,9 @@ import dayjs from 'dayjs'
|
||||
import PlanRequestPopQGrid from './PlanRequestPopQGrid'
|
||||
import { sessionStore } from '@/store/commonAtom'
|
||||
import { planReqSearchState } from '@/store/planReqAtom'
|
||||
import { isObjectNotEmpty } from '@/util/common-utils'
|
||||
|
||||
import Select from 'react-select'
|
||||
export default function PlanRequestPop(props) {
|
||||
const sessionState = useRecoilValue(sessionStore)
|
||||
|
||||
@ -20,6 +23,7 @@ export default function PlanRequestPop(props) {
|
||||
const { get } = useAxios(globalLocaleState)
|
||||
|
||||
const { getMessage } = useMessage()
|
||||
const ref = useRef()
|
||||
// 검색조건 달력 셋팅
|
||||
const [startDate, setStartDate] = useState(dayjs(new Date()).add(-3, 'month').format('YYYY-MM-DD'))
|
||||
const [endDate, setEndDate] = useState(dayjs(new Date()).format('YYYY-MM-DD'))
|
||||
@ -34,7 +38,6 @@ export default function PlanRequestPop(props) {
|
||||
setStartDate: setEndDate,
|
||||
}
|
||||
|
||||
const ref = useRef()
|
||||
const resetPlanReqRecoil = useResetRecoilState(planReqSearchState)
|
||||
|
||||
const [planReqSearch, setPlanReqSearch] = useRecoilState(planReqSearchState)
|
||||
@ -47,14 +50,42 @@ export default function PlanRequestPop(props) {
|
||||
const [schDateGbn, setSchDateGbn] = useState('S') //기간구분코드(S/R)
|
||||
|
||||
//초기화
|
||||
const resetRecoil = () => {}
|
||||
const resetRecoil = () => {
|
||||
console.log('초기화')
|
||||
setSchPlanReqNo('')
|
||||
setSchTitle('')
|
||||
setSchAddress('')
|
||||
setSchSaleStoreName('')
|
||||
setSchPlanReqName('')
|
||||
setSchDateGbn('S')
|
||||
setStartDate(dayjs(new Date()).add(-3, 'month').format('YYYY-MM-DD'))
|
||||
setEndDate(dayjs(new Date()).format('YYYY-MM-DD'))
|
||||
setSchPlanStatCd('')
|
||||
handleClear() //셀렉트 자동완성 초기화
|
||||
resetPlanReqRecoil()
|
||||
}
|
||||
|
||||
//초기화 눌렀을 때 자동완성도..
|
||||
//셀렉트 자동완성 초기화
|
||||
const handleClear = () => {
|
||||
if (ref.current.state.dropDown) {
|
||||
ref.current.methods.dropDown()
|
||||
if (ref.current) {
|
||||
ref.current.clearValue()
|
||||
}
|
||||
}
|
||||
|
||||
// 상태 검색조건 변경
|
||||
const onSelectionChange = (key) => {
|
||||
//임시작업
|
||||
console.log('E::::::::', key)
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setSchPlanStatCd(key.value)
|
||||
setPlanReqSearch({
|
||||
...planReqSearch,
|
||||
schPlanStatCd: key.value,
|
||||
})
|
||||
} else {
|
||||
ref.current.state.values = []
|
||||
//X누름
|
||||
setSchPlanStatCd('')
|
||||
setPlanReqSearch({ ...planReqSearch, schPlanStatCd: '' })
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +94,11 @@ export default function PlanRequestPop(props) {
|
||||
setEndDate(planReqSearch?.schEndDt ? planReqSearch.schEndDt : dayjs(new Date()).format('YYYY-MM-DD'))
|
||||
}, [planReqSearch])
|
||||
|
||||
// 조회
|
||||
const onSubmit = () => {
|
||||
console.log('조회!!!!', planReqSearch)
|
||||
}
|
||||
|
||||
const [gridProps, setGridProps] = useState({
|
||||
gridData: [],
|
||||
isPageable: false,
|
||||
@ -117,6 +153,25 @@ export default function PlanRequestPop(props) {
|
||||
],
|
||||
})
|
||||
|
||||
const tempList = [
|
||||
{
|
||||
label: '완료',
|
||||
value: 'C',
|
||||
},
|
||||
{
|
||||
label: '저장',
|
||||
value: 'I',
|
||||
},
|
||||
{
|
||||
label: '접수',
|
||||
value: 'R',
|
||||
},
|
||||
{
|
||||
label: '제출',
|
||||
value: 'S',
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="modal-popup">
|
||||
<div className="modal-dialog big">
|
||||
@ -132,8 +187,12 @@ export default function PlanRequestPop(props) {
|
||||
<div className="design-tit-wrap">
|
||||
<h3>{getMessage('stuff.planReqPopup.popTitle')}</h3>
|
||||
<div className="design-search-wrap">
|
||||
<button className="btn-origin grey mr5">{getMessage('stuff.planReqPopup.btn1')}</button>
|
||||
<button className="btn-origin navy ">{getMessage('stuff.planReqPopup.btn2')}</button>
|
||||
<button className="btn-origin navy mr5" onClick={onSubmit}>
|
||||
{getMessage('stuff.planReqPopup.btn1')}
|
||||
</button>
|
||||
<button className="btn-origin grey" onClick={resetRecoil}>
|
||||
{getMessage('stuff.planReqPopup.btn2')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="design-request-table">
|
||||
@ -223,13 +282,22 @@ export default function PlanRequestPop(props) {
|
||||
</td>
|
||||
<th>{getMessage('stuff.planReqPopup.search.planStatName')}</th>
|
||||
<td>
|
||||
<div className="select-wrap">
|
||||
<select className="select-light" name="" id="">
|
||||
<div className="">
|
||||
{/* <select className="select-light" name="" id="" onChange={onSelectionChange}>
|
||||
<option value={''}>All</option>
|
||||
<option value={'SAVE'}>저장</option>
|
||||
<option value={'SUBMIT'}>제출</option>
|
||||
<option value={'RECEIPT'}>접수</option>
|
||||
</select>
|
||||
<option value={'C'}>완료</option>
|
||||
<option value={'I'}>저장</option>
|
||||
<option value={'R'}>접수</option>
|
||||
<option value={'S'}>제출</option>
|
||||
</select> */}
|
||||
<Select
|
||||
ref={ref}
|
||||
options={tempList}
|
||||
onChange={onSelectionChange}
|
||||
isSearchable={false}
|
||||
placeholder="선택하세요."
|
||||
isClearable={true}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -511,6 +511,11 @@
|
||||
"stuff.search.period": "期間検索",
|
||||
"stuff.search.schDateTypeU": "更新日",
|
||||
"stuff.search.schDateTypeR": "登録日",
|
||||
"stuff.search.grid.title": "商品リスト",
|
||||
"stuff.search.grid.all": "全体",
|
||||
"stuff.search.grid.selected": "選択",
|
||||
"stuff.search.grid.schSortTypeR": "最近の登録日",
|
||||
"stuff.search.grid.schSortTypeU": "最近の更新日",
|
||||
"stuff.windSelectPopup.title": "風速選択",
|
||||
"stuff.windSelectPopup.table.selected": "選択",
|
||||
"stuff.windSelectPopup.table.windspeed": "風速",
|
||||
|
||||
@ -516,6 +516,11 @@
|
||||
"stuff.search.period": "기간검색",
|
||||
"stuff.search.schDateTypeU": "갱신일",
|
||||
"stuff.search.schDateTypeR": "등록일",
|
||||
"stuff.search.grid.title": "물건목록",
|
||||
"stuff.search.grid.all": "전체",
|
||||
"stuff.search.grid.selected": "선택",
|
||||
"stuff.search.grid.schSortTypeR": "최근 등록일",
|
||||
"stuff.search.grid.schSortTypeU": "최근 갱신일",
|
||||
"stuff.windSelectPopup.title": "풍속선택",
|
||||
"stuff.windSelectPopup.table.selected": "선택",
|
||||
"stuff.windSelectPopup.table.windspeed": "풍속",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user