mycoms 2024-04-30
240430 김하영
@f1a8e0ae8931798f207b44ee9a03725f6d5ebdf8
Global.js
--- Global.js
+++ Global.js
@@ -3,8 +3,8 @@
 const BASE_DIR = __dirname;
 const LOG_BASE_DIR = `${__dirname}/server/logs`;
 const SERVICE_STATUS = process.env.NODE_ENV;//development, production
-const PORT = 8080;
-const API_SERVER_HOST = 'localhost:8080';
+const PORT = 8083;
+const API_SERVER_HOST = 'localhost:8083';
 
 module.exports = {
     PROJECT_NAME,
client/views/pages/Business/Bn002.vue
--- client/views/pages/Business/Bn002.vue
+++ client/views/pages/Business/Bn002.vue
@@ -25,7 +25,7 @@
                                         <!-- 거래처 코드 -->
                                         <input type="text" style=" width: 50%;" v-model="selectClient.CUSTCD">
                                         <!-- 거래처 명 -->
-                                        <autocomplete ref="autocomplete1"
+                                        <autocomplete ref="autocomplete"
                                             @result-selected="result => handleResultSelected(result, 'search')"
                                             @compResults="compResults">
                                         </autocomplete>
@@ -34,8 +34,8 @@
                                 <div class="select-box flex justify-start align-center no-space gd-3 mr10">
                                     <p class="select-boxTitle pr30 ">품목</p>
                                     <div class="flex justify-between" style="flex-wrap: nowrap; gap: 5px;">
-                                        <input type="text" style=" width: 50%;" v-model="insertFormData.ITEMCD">
-                                        <input type="text" v-model="insertFormData.ITEMNM">
+                                        <input type="text" style=" width: 50%;" v-model="selectClient.ITEMCD">
+                                        <input type="text" v-model="selectClient.ITEMNM">
                                     </div>
                                 </div>
                                 <div class="select-box flex align-center gd-3">
@@ -70,19 +70,16 @@
                                         <colgroup>
                                             <col width="3%">
                                             <col width="10%">
-                                            <col width="5%">
                                         </colgroup>
                                         <thead>
                                             <th>코드</th>
                                             <th>거래처명</th>
-                                            <th>여분</th>
                                         </thead>
                                         <tbody>
                                             <tr v-for="(list, index) in lists" :key="index" @click="selectList(list)"
                                                 :style="{ backgroundColor: selectedList === index ? 'var(--trBackground)' : ' var(--white)' }">
                                                 <td>{{ list.CUSTCD }}</td>
                                                 <td>{{ list.JSNAME }}</td>
-                                                <td>{{ list.input }}</td>
                                             </tr>
                                         </tbody>
                                     </table>
@@ -98,6 +95,7 @@
                                 <p class="content-title">품목등록</p>
                                 <div>
                                     <button class=" green-border-btn" @click="resetFormData">신규</button>
+                                    <button class=" green-border-btn" @click="modifyFormData">수정</button>
                                     <button class="blue-border-btn" @click="postItem">저장</button>
                                     <button class="red-border-btn" @click="deleteItem">삭제</button>
                                 </div>
@@ -129,18 +127,17 @@
 
 
                                             <th>품목구분1</th>
-
-                                            <td>
-                                                <input type="text" name="" id="" class="gray-input" disabled
-                                                    v-model="insertFormData.ITGBNM">
-                                            </td>
-
+                                        
+                                                <td>
+                                                    <input type="text" name="" id="" class="gray-input" disabled
+                                                        v-model="insertFormData.ITGBNM1">
+                                                </td>
+                                                
 
                                             <th>품목구분2</th>
-                                            <td>
-                                                <input type="text" name="" id="" class="gray-input" disabled
-                                                    v-model="insertFormData.ITGBNM">
-                                            </td>
+                                                <td>
+                                                    <input type="text" name="" id=""  v-model="insertFormData.ITGBNM2">
+                                                </td>
 
 
                                         </tr>
@@ -221,10 +218,10 @@
                                             </colgroup>
                                             <thead>
                                                 <th>선택</th>
-                                                <th>품목구분</th>
+                                                <th>구분1</th>
+                                                <th>구분2</th>
                                                 <th>품목코드</th>
                                                 <th>품목명</th>
-                                                <th>고객사코드</th>
                                                 <th>규격정보</th>
                                                 <th>사용</th>
                                             </thead>
@@ -236,10 +233,10 @@
                                                     <td style="background-color: var(--inputgray); "><input
                                                             type="checkbox" class="ui-checkbox " disabled
                                                             style="background-color: var(--inputgray);"></td>
-                                                    <td>{{ item.ITGBNM }}</td>
+                                                    <td>{{ item.ITGBNM1 }}</td>
+                                                    <td>{{ item.ITGBNM2 }}</td>
                                                     <td>{{ item.ITEMCD }}</td>
                                                     <td>{{ item.ITEMNM }}</td>
-                                                    <td>{{ item.CUSTNO }}</td>
                                                     <td>{{ item.KUKEXX }}</td>
 
                                                     <td><input type="checkbox" class="ui-checkbox"
@@ -271,17 +268,20 @@
 <script>
 import axios from "axios";
 import Autocomplete from '../component/Autocomplete.vue';
-import AutocompleteList from "../component/AutocompleteList.vue";
 
 
 export default {
     data() {
         return {
+            // itemBoxList:{
+            //     COMPCD:"",
+            //     ITGBNM1:"",
+            // },
             selectedIndex: null,
             selectedList: {
                 CUSTCD: "",
                 JSNAME: "",
-                input: "",
+                YNUSAG: "",
             },
             lists: [],
             items: [],
@@ -307,6 +307,8 @@
             insertItemcd: '',
             selectClient: {
                 CUSTCD: '',
+                JSNAME: "",
+                ITEMCD:""
             },
             selectList: {
                 ITEMCD: '',
@@ -368,6 +370,9 @@
             }).then(function (response) {
                 vm.selectedCompany = response.data.resultData[0];
                 vm.searchClient();
+
+                console.log(vm.selectedCompany,"사업장 목록",);
+
             }).catch(function (error) {
                 console.log(error);
             });
@@ -381,30 +386,28 @@
                 data: {
                     compcd: vm.selectedCompany.COMPCD,
                     custcd: vm.selectClient.CUSTCD,
-                    ynusag: vm.selectedCheckbox,
+                    itemcd: vm.selectClient.ITEMCD,
+                    ynusag: vm.selectedList.YNUSAG,
                 },
             }).then(function (response) {
+                console.log(":::::",response);
                 vm.lists = response.data.resultData;
-                console.log(response);
+                
+
             }).catch(function (error) {
                 console.log(error);
             });
         },
         // 거래처 검색에서 데이터 가져오기
         handleResultSelected(result, identifier) {
+            console.log("handlerResultselected",result)
             if (identifier === 'search') {
                 this.selectClient = result;
             } else if (identifier === 'post') {
                 this.selectedList = result;
             }
         },
-        handleResult(result, identifier) {
-            if (identifier === 'search') {
-                this.selectList = result;
-            } else if (identifier === 'post') {
-                this.selectList = result;
-            }
-        },
+       
         // 품목 등록 - 거래처 품목 목록
         searchItem() {
             const vm = this;
@@ -423,6 +426,30 @@
                 console.log(error);
             });
         },
+        itemBox(){
+            const vm = this;
+
+            axios({
+                url:"https://jv.ajinpaper.app/SD/item_raw.do",
+                method:"post",
+                data:{
+                    compcd: vm.itemBoxList.COMPCD,
+                    itemcd: vm.itemBoxList.ITEMCD,
+                    widthx: vm.itemBoxList.WIDTHX,
+                    lengxx: vm.itemBoxList.LENGXX,
+                    ITGBNM1: vm.itemBoxList.ITGBNM1,
+                }
+            }).then(function (response) {
+                console.log(response, '품목내용');
+                vm.items = response.data.resultData;
+            }).catch(function (error) {
+                console.log(error);
+            });
+        },
+
+
+
+
         // 품목 등록 - 품목 저장
         insertItem() {
             const vm = this;
@@ -471,6 +498,8 @@
             }).then(function (response) {
                 vm.searchItem();
                 vm.resetFormData();
+                console.log(response);
+
             }).catch(function (error) {
                 console.log(error);
             });
@@ -561,7 +590,7 @@
     },
     computed: {},
     components: {
-        Autocomplete, AutocompleteList
+        Autocomplete
     },
     mounted() {
         this.searchCompany();
client/views/pages/component/Autocomplete.vue
--- client/views/pages/component/Autocomplete.vue
+++ client/views/pages/component/Autocomplete.vue
@@ -58,6 +58,7 @@
         method: "post",
       }).then(function (response) {
         vm.results = response.data.resultData;
+        console.log(vm.results,'거래처');
         vm.$emit('compResults', vm.results);
       }).catch(function (error) {
         console.log(error);
Add a comment
List