
--- client/views/component/chart/Chart11.jsx
+++ client/views/component/chart/Chart11.jsx
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 |
const createChart = () => { |
9 | 9 |
let root = am5.Root.new("Chart11"); |
10 | 10 |
root._logo.dispose(); |
11 |
- |
|
11 |
+ |
|
12 | 12 |
// Set themes |
13 | 13 |
// https://www.amcharts.com/docs/v5/concepts/themes/ |
14 | 14 |
root.setThemes([ |
--- client/views/pages/equipment/EquipmentData.jsx
+++ client/views/pages/equipment/EquipmentData.jsx
... | ... | @@ -53,6 +53,16 @@ |
53 | 53 |
'currentPage': 1, |
54 | 54 |
'perPage': 10, |
55 | 55 |
}); |
56 |
+ // 월/달 변경 |
|
57 |
+ const monthChange = (value) => { |
|
58 |
+ var date = new Date(value); |
|
59 |
+ var currentYear = date.getFullYear(); |
|
60 |
+ var currentMonth = date.getMonth(); |
|
61 |
+ const newUserSearch = JSON.parse(JSON.stringify(userSearch)); |
|
62 |
+ newUserSearch['start_date'] = date; |
|
63 |
+ newUserSearch['end_date'] = new Date(currentYear, currentMonth + 1, 1); |
|
64 |
+ setUserSearch(newUserSearch); |
|
65 |
+ } |
|
56 | 66 |
const dateSearchChange = (targetKey, value) => { |
57 | 67 |
const newUserSearch = JSON.parse(JSON.stringify(userSearch)); |
58 | 68 |
newUserSearch[targetKey] = value; |
... | ... | @@ -117,7 +127,7 @@ |
117 | 127 |
newUserSearch['end_date'] = null; |
118 | 128 |
setUserSearch(newUserSearch); |
119 | 129 |
|
120 |
- if (selectValue == 'selectDatetime') { |
|
130 |
+ if (selectValue == 'selectDate') { |
|
121 | 131 |
setIsSelectDate(true); |
122 | 132 |
} else { |
123 | 133 |
setIsSelectDate(false); |
... | ... | @@ -130,7 +140,7 @@ |
130 | 140 |
|
131 | 141 |
React.useEffect(() => { |
132 | 142 |
orgSelectListOfHierarchy(); |
133 |
- // equipmentDataList(); |
|
143 |
+ equipmentDataList(); |
|
134 | 144 |
}, []); |
135 | 145 |
|
136 | 146 |
return ( |
... | ... | @@ -140,18 +150,17 @@ |
140 | 150 |
<select style={{ maxWidth: '150px' }} |
141 | 151 |
onChange={(e) => { dateSelect(e.target.value) }} |
142 | 152 |
> |
143 |
- <option value="selectDate">날짜선택</option> |
|
144 |
- <option value="selectDatetime">기간선택</option> |
|
153 |
+ <option value="selectMonth">연월선택</option> |
|
154 |
+ <option value="selectDate">기간선택</option> |
|
145 | 155 |
</select> |
146 | 156 |
{!isSelectDate ? |
147 |
- <div className="selectDate" style={{ width: 'calc(100% - 300px)' }}> |
|
148 |
- <input type="date" |
|
149 |
- value={userSearch['end_date']} |
|
150 |
- onChange={(e) => { dateSearchChange("end_date", e.target.value) }} |
|
157 |
+ <div className="selectMonth" style={{ width: 'calc(100% - 300px)' }}> |
|
158 |
+ <input type="month" |
|
159 |
+ onChange={(e) => { monthChange(e.target.value); }} |
|
151 | 160 |
onKeyDown={function (e) { e.preventDefault() }} /> |
152 | 161 |
</div> |
153 | 162 |
: |
154 |
- <div className="selectDatetime flex" style={{ width: 'calc(100% - 300px)' }}> |
|
163 |
+ <div className="selectDate flex" style={{ width: 'calc(100% - 300px)' }}> |
|
155 | 164 |
<input type="date" |
156 | 165 |
value={userSearch['start_date']} |
157 | 166 |
onChange={(e) => { dateSearchChange("start_date", e.target.value) }} |
--- client/views/pages/equipment/EquipmentSelect.jsx
+++ client/views/pages/equipment/EquipmentSelect.jsx
... | ... | @@ -353,6 +353,8 @@ |
353 | 353 |
equipmentDelivery['government_id'] = governmentId; |
354 | 354 |
setEquipmentDelivery({ ...equipmentDelivery }); |
355 | 355 |
|
356 |
+ console.log("equipmentDelivery: ", equipmentDelivery); |
|
357 |
+ |
|
356 | 358 |
fetch("/equipment/equipmentDeliveryInsert.json", { |
357 | 359 |
method: "POST", |
358 | 360 |
headers: { |
--- client/views/pages/equipment/GovernmentEquipmentSelect.jsx
+++ client/views/pages/equipment/GovernmentEquipmentSelect.jsx
... | ... | @@ -190,7 +190,7 @@ |
190 | 190 |
'equipment_serial_number': null, |
191 | 191 |
'equipment_type': 'SMART_PILLBOX', |
192 | 192 |
'equipment_name': null, |
193 |
- 'equipment_state': null, |
|
193 |
+ 'equipment_state': 'AVAILABLE', |
|
194 | 194 |
'equipment_product_date': null, |
195 | 195 |
'equipment_stock_date': null, |
196 | 196 |
'equipment_insert_datetime': null, |
... | ... | @@ -277,6 +277,7 @@ |
277 | 277 |
console.log('userIdCheck() /user/equipmentSelectSerialNumber.json error : ', error); |
278 | 278 |
}); |
279 | 279 |
} |
280 |
+ |
|
280 | 281 |
//장비 등록 |
281 | 282 |
const equipmentInsert = () => { |
282 | 283 |
if (equipmentValidation() == false) { |
... | ... | @@ -298,9 +299,31 @@ |
298 | 299 |
}).then((response) => response.json()).then((data) => { |
299 | 300 |
console.log("장비 등록 결과(건수) : ", data); |
300 | 301 |
if (data > 0) { |
301 |
- alert("등록완료"); |
|
302 |
- equipmentSearching(); |
|
303 |
- modalEquipmentClose(); |
|
302 |
+ fetch("/equipment/equipmentDeliveryInsert.json", { |
|
303 |
+ method: "POST", |
|
304 |
+ headers: { |
|
305 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
306 |
+ }, |
|
307 |
+ body: JSON.stringify({ |
|
308 |
+ 'government_id': equipment['government_id'], |
|
309 |
+ 'delivery_idx': null, |
|
310 |
+ 'delivery_date': CommonUtil.getDate(), |
|
311 |
+ 'delivery_total_price': null, |
|
312 |
+ 'delivery_insert_user_id': state.loginUser['user_id'], |
|
313 |
+ equipmentDeliveryDetailList: [equipment], |
|
314 |
+ }), |
|
315 |
+ }).then((response) => response.json()).then((data) => { |
|
316 |
+ console.log("장비 납품 결과(건수) : ", data); |
|
317 |
+ if (data > 0) { |
|
318 |
+ alert("등록완료"); |
|
319 |
+ equipmentSearching(); |
|
320 |
+ modalEquipmentClose(); |
|
321 |
+ } else { |
|
322 |
+ alert("장비납품에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
323 |
+ } |
|
324 |
+ }).catch((error) => { |
|
325 |
+ console.log('modalDelivery() /equipment/equipmentUpdate.json error : ', error); |
|
326 |
+ }); |
|
304 | 327 |
} else { |
305 | 328 |
alert("등록에 실패하였습니다. 관리자에게 문의바랍니다."); |
306 | 329 |
} |
... | ... | @@ -308,6 +331,7 @@ |
308 | 331 |
console.log('equipmentInsert() /equipment/equipmentInsert.json error : ', error); |
309 | 332 |
}); |
310 | 333 |
} |
334 |
+ |
|
311 | 335 |
// 미확인 장비 등록 |
312 | 336 |
const equipmentInsertUpdate = () => { |
313 | 337 |
if (equipmentValidation() == false) { |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?