807 lines
36 KiB
Plaintext
807 lines
36 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*"%>
|
|
<%@include file="/init_jqGrid.jsp"%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style type="text/css">
|
|
::-webkit-scrollbar-thumb {
|
|
background: linear-gradient(to bottom, #f5d78e, #f5d78e);
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var grid;
|
|
$(document).ready(function(){
|
|
|
|
var client_type = $.parseJSON($("#client_type").val()); // 거래처 구분 코드
|
|
|
|
//fnc_datepick();
|
|
fnc_setFileDropZone("excelImportDropZone", "${objid}", "CLIENT_EXCEL_IMPORT", "Client Excel Import Template", "setExcelFileArea",true,"fileDelete","/admin/excelImportFileProc.do");
|
|
fnc_setFileDropZone("partAttachFileDropZone", "${objid}", "CLIENT_IMPORT_ATTACH", "Import Client Attach File", "setPartFileArea",false,null,"/admin/partImportFileProc.do");
|
|
|
|
grid = $("#clientDetailGrid").jqGrid({
|
|
url: ""
|
|
,datatype: "local"
|
|
,colNames: ["거래처코드","거래처명","거래처약칭","구분","사업자등록번호","주민등록번호","대표자명","업태","업종","우편번호","주소1","주소2","전화번호","팩스번호","홈페이지","이메일",
|
|
"국가명","분류코드","분류명","등급코드","등급명","수금거래처코드","수금거래처명","지역코드","지역명","거래시작일","거래종료일","사용여부",
|
|
"계약시작일","계약종료일","거래형태","할인율","계약금액","월용역비","결제조건","여신한도금액","한도회귀일",
|
|
"매입_금융기관코드","매입_금융기관명","매입_지점명","매입_결제계좌","매입_예금주명","매입_지급예정","매입_전표유형","매입_세무구분",
|
|
"매출_은행코드","매출_은행명","매출_계좌개설점","매출_계좌번호","매출_수금예정","매출_전표유형","매출_세무구분",
|
|
"업체담당_부서명","업체담당_직급","업체담당_담당업무","업체담당_담당자명","업체담당_전화번호","업체담당_내선번호","업체담당_핸드폰","업체담당_메일",
|
|
"관리담당_부서코드","관리담당_부서명","관리담당_직급명","관리담당_담당업무","관리담당_사원코드","관리담당_사원명","관리담당_전화번호","관리담당_내선번호","관리담당_핸드폰","관리담당_메일","관리담당_비고",
|
|
"수신처_비고","수신처_우편번호","수신처_주소1","수신처_주소2","수신처_전화번호","수신처_팩스번호",
|
|
"프로젝트코드","프로젝트명","외부데이터코드","전자세금계산서여부","단위신고거래처","종사업장번호","조달청다수공급자",
|
|
"예정일구분","예정일","용도구분","해외여부","사용자정의1","사용자정의2","사용구분","사용명",
|
|
"거래조건구분","거래조건명","배송유형","배송명","체크데이터","체크상태","체크순서","고정순서","비고"]
|
|
,colModel: [
|
|
{name:"CLIENT_CD",index:"CLIENT_CD", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
|
|
,{name:"CLIENT_NM",index:"CLIENT_NM", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"CLIENT_NMK",index:"CLIENT_NMK", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"CLIENT_TYPE" ,index:"CLIENT_TYPE" , width:100, align:"center", hidden:false, sortable:false, editable: true
|
|
,edittype :"select"
|
|
,formatter :"select"
|
|
,editoptions:{
|
|
value: client_type
|
|
,dataInit : function(e){
|
|
e.style.width = "92%";
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
|
|
,{name:"BUS_REG_NO",index:"BUS_REG_NO", width: 50, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
|
|
,{name:"RESIDENT_NO",index:"RESIDENT_NO", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"BUS_TYPE",index:"BUS_TYPE", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"BUS_ITEM",index:"BUS_ITEM", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"CEO_NM",index:"CEO_NM", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"POST_NO",index:"POST_NO", width: 100, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"ADDR1",index:"ADDR1", width: 300, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"ADDR2",index:"ADDR2", width: 300, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"TEL_NO",index:"TEL_NO", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"FAX_NO",index:"FAX_NO", width: 150, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"HOMEPAGE",index:"HOMEPAGE", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
,{name:"EMAIL",index:"EMAIL", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{
|
|
dataInit : function(e){
|
|
e.style.fontSize = 13;
|
|
}
|
|
}
|
|
}
|
|
// 기본 정보 (17개 완료)
|
|
|
|
// 분류/등급 정보 (11개)
|
|
,{name:"COUNTRY_NM",index:"COUNTRY_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CLASS_CD",index:"CLASS_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CLASS_NM",index:"CLASS_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"GRADE_CD",index:"GRADE_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"GRADE_NM",index:"GRADE_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"COLLECT_CLIENT_CD",index:"COLLECT_CLIENT_CD", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"COLLECT_CLIENT_NM",index:"COLLECT_CLIENT_NM", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REGION_CD",index:"REGION_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REGION_NM",index:"REGION_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"TRADE_START_DT",index:"TRADE_START_DT", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"TRADE_END_DT",index:"TRADE_END_DT", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"USE_YN",index:"USE_YN", width: 80, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 거래 정보 (9개)
|
|
,{name:"CONTRACT_START_DT",index:"CONTRACT_START_DT", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CONTRACT_END_DT",index:"CONTRACT_END_DT", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"TRADE_TYPE",index:"TRADE_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"DISCOUNT_RATE",index:"DISCOUNT_RATE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CONTRACT_AMT",index:"CONTRACT_AMT", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MONTHLY_FEE",index:"MONTHLY_FEE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PAYMENT_TERM",index:"PAYMENT_TERM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CREDIT_LIMIT",index:"CREDIT_LIMIT", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"LIMIT_RETURN_DAY",index:"LIMIT_RETURN_DAY", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 매입 은행 정보 (8개)
|
|
,{name:"PUR_BANK_CD",index:"PUR_BANK_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_BANK_NM",index:"PUR_BANK_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_BRANCH_NM",index:"PUR_BRANCH_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_ACCOUNT_NO",index:"PUR_ACCOUNT_NO", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_ACCOUNT_HOLDER",index:"PUR_ACCOUNT_HOLDER", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_PAY_PLAN",index:"PUR_PAY_PLAN", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_SLIP_TYPE",index:"PUR_SLIP_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PUR_TAX_TYPE",index:"PUR_TAX_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 매출 은행 정보 (7개)
|
|
,{name:"SALE_BANK_CD",index:"SALE_BANK_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_BANK_NM",index:"SALE_BANK_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_BRANCH_NM",index:"SALE_BRANCH_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_ACCOUNT_NO",index:"SALE_ACCOUNT_NO", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_COLLECT_PLAN",index:"SALE_COLLECT_PLAN", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_SLIP_TYPE",index:"SALE_SLIP_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SALE_TAX_TYPE",index:"SALE_TAX_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 업체 담당자 (8개)
|
|
,{name:"VENDOR_DEPT_NM",index:"VENDOR_DEPT_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_POSITION",index:"VENDOR_POSITION", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_DUTY",index:"VENDOR_DUTY", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_MANAGER_NM",index:"VENDOR_MANAGER_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_TEL",index:"VENDOR_TEL", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_EXT",index:"VENDOR_EXT", width: 80, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_MOBILE",index:"VENDOR_MOBILE", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"VENDOR_EMAIL",index:"VENDOR_EMAIL", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 관리 담당자 (11개)
|
|
,{name:"MGR_DEPT_CD",index:"MGR_DEPT_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_DEPT_NM",index:"MGR_DEPT_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_POSITION",index:"MGR_POSITION", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_DUTY",index:"MGR_DUTY", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_EMP_CD",index:"MGR_EMP_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_EMP_NM",index:"MGR_EMP_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_TEL",index:"MGR_TEL", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_EXT",index:"MGR_EXT", width: 80, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_MOBILE",index:"MGR_MOBILE", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_EMAIL",index:"MGR_EMAIL", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"MGR_REMARK",index:"MGR_REMARK", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 수신처 정보 (6개)
|
|
,{name:"REC_REMARK",index:"REC_REMARK", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REC_POST_NO",index:"REC_POST_NO", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REC_ADDR1",index:"REC_ADDR1", width: 300, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REC_ADDR2",index:"REC_ADDR2", width: 300, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REC_TEL",index:"REC_TEL", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"REC_FAX",index:"REC_FAX", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 프로젝트/기타 (7개)
|
|
,{name:"PROJECT_CD",index:"PROJECT_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PROJECT_NM",index:"PROJECT_NM", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"EXT_DATA_CD",index:"EXT_DATA_CD", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"E_TAX_YN",index:"E_TAX_YN", width: 80, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"UNIT_REPORT_CLIENT",index:"UNIT_REPORT_CLIENT", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SUB_BUS_NO",index:"SUB_BUS_NO", width: 120, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PROCUREMENT_YN",index:"PROCUREMENT_YN", width: 80, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 예정일/용도 (4개)
|
|
,{name:"PLAN_DAY_TYPE",index:"PLAN_DAY_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PLAN_DAY",index:"PLAN_DAY", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"PURPOSE_TYPE",index:"PURPOSE_TYPE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"FOR_YN",index:"FOR_YN", width: 80, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 사용자정의/배송 (8개)
|
|
,{name:"USER_DEF_DC1",index:"USER_DEF_DC1", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"USER_DEF_DC2",index:"USER_DEF_DC2", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"USE_FG",index:"USE_FG", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"USE_NM",index:"USE_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"BIZCON_FG",index:"BIZCON_FG", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"BIZCON_NM",index:"BIZCON_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SHIP_TP",index:"SHIP_TP", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"SHIP_NM",index:"SHIP_NM", width: 150, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 체크 (4개)
|
|
,{name:"CHECK_DATA",index:"CHECK_DATA", width: 200, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CHECK_STATE",index:"CHECK_STATE", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"CHECK_ORDER",index:"CHECK_ORDER", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
,{name:"FIXED_ORDER",index:"FIXED_ORDER", width: 100, align:"center", hidden: true, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
// 비고
|
|
,{name:"REMARK",index:"REMARK", width: 200, align:"center", hidden: false, sortable:false, editable:true
|
|
,editoptions:{dataInit : function(e){e.style.fontSize = 13;}}}
|
|
|
|
]
|
|
,rownumbers : true
|
|
,viewrecords : true
|
|
,height : 330
|
|
,multiselect : false
|
|
,shrinkToFit : false
|
|
,autowidth : true
|
|
,sortable : false
|
|
,rowNum : 2000
|
|
,forceFit : false //컬럼의 width를 변화시킬때 그리드의 width를 고정 여부
|
|
,jsonReader : {repeatitems: false}
|
|
,mtype :"POST"
|
|
,footerrow : false //바닥합계
|
|
,userDataOnFooter: true //바닥합계
|
|
,loadComplete: function(){
|
|
}
|
|
|
|
,onCellSelect: function(rowid,icol,cellcontent,e){
|
|
|
|
var value = $("#"+rowid+"_CLIENT_CD").val();
|
|
if(icol==10){
|
|
fn_ClientDetail(value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
//gridFn.search();
|
|
});
|
|
function fn_count(){
|
|
$.ajax({
|
|
url:"/admin/countExcelclient.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${objid}"},
|
|
dataType:"json",
|
|
async: false,
|
|
success:function(data){
|
|
// Swal.fire("now_cnt :: " +data.RESULT.NOW_CNT);
|
|
$("#dup_cnt").text(data.RESULT.DUP_CNT);
|
|
$("#now_cnt").text(data.RESULT.NOW_CNT);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
//SR자료등록 팝업
|
|
function fn_ClientDetail(objId){
|
|
window.open("/admin/clientDetailPopUp.do?OBJID="+objId, "", "width=1750, height=460");
|
|
}
|
|
|
|
|
|
var gridFn = {
|
|
addRow : function() {
|
|
var newId = grid.getGridParam("reccount")+1;
|
|
var addData = {
|
|
"CLIENT_CD": "",
|
|
"CLIENT_NM": "",
|
|
"CLIENT_NMK": "",
|
|
"CLIENT_TYPE": "",
|
|
"BUS_REG_NO": "",
|
|
"RESIDENT_NO": "",
|
|
"CEO_NM": "",
|
|
"BUS_TYPE": "",
|
|
"BUS_ITEM": "",
|
|
"POST_NO": "",
|
|
"ADDR1": "",
|
|
"ADDR2": "",
|
|
"TEL_NO": "",
|
|
"FAX_NO": "",
|
|
"HOMEPAGE": "",
|
|
"EMAIL": "",
|
|
"REMARK": ""
|
|
};
|
|
grid.addRowData(newId, addData);
|
|
grid.jqGrid("editRow", newId);
|
|
}
|
|
,delRow : function(){
|
|
var selectedRowIds = grid.jqGrid("getGridParam","selarrrow");
|
|
if(selectedRowIds.length==0){
|
|
Swal.fire("삭제할 행을 선택해주십시오.");
|
|
return false;
|
|
}
|
|
for(var i = selectedRowIds.length - 1; i >= 0; i--){
|
|
grid.delRowData(selectedRowIds[i]);
|
|
}
|
|
}
|
|
,opennEdit : function() { //수정가능
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
for (var i = 0; i < ids.length; i++) {
|
|
grid.jqGrid("editRow",ids[i]);
|
|
}
|
|
}
|
|
,closeEdit : function() { //수정불가
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
for (var i = 0; i < ids.length; i++) {
|
|
grid.jqGrid("saveRow", ids[i], /*successFunction*/null, /*url*/"clientArray"/*, extraparam, aftersavefunc,errorfunc, afterrestorefunc*/);
|
|
}
|
|
}
|
|
,getStep2Cd : function(obj){ //2단계연결코드 재설정
|
|
var gridExpSubdCdArr = $.parseJSON($("#gridExpSubdCd").val());
|
|
var targetObj = $("#"+$(obj).attr("rowid")+"_CLIENT_TYPE_CD");
|
|
targetObj.empty(); //초기화
|
|
targetObj.append("<option value=\"\">선택</option>");
|
|
for(var i=0; i<gridExpSubdCdArr.length; i++){
|
|
cd = gridExpSubdCdArr[i];
|
|
if(cd["PARENT_CODE_ID"]==obj.value){
|
|
targetObj.append("<option value=\""+cd["CODE_ID"]+"\">"+cd["CODE_NAME"]+"</option>");
|
|
}
|
|
};
|
|
}
|
|
,search : function() {
|
|
//save_excel();
|
|
grid.setGridParam({
|
|
url: "/admin/parsingExcelClient.do"
|
|
,datatype : "json"
|
|
,postData:{"targetObjId":"${objid}","docType":"CLIENT_EXCEL_IMPORT"}
|
|
,loadComplete : function() {
|
|
gridFn.footerSummary();
|
|
fn_count();
|
|
}
|
|
,gridComplete : function() {
|
|
gridFn.opennEdit(); //수정가능
|
|
}
|
|
}).trigger("reloadGrid");
|
|
grid.setGridParam({url: "", datatype : "local"});
|
|
}
|
|
/* ,modify_search : function() {
|
|
Swal.fire('asdsadas');
|
|
grid.setGridParam({
|
|
url: "/partmgmt/parsingExcelData.do"
|
|
,datatype : "json"
|
|
,postData : {"targetObjId":"${objid}"}
|
|
,loadComplete : function(data) {
|
|
gridFn.footerSummary();
|
|
}
|
|
,gridComplete : function() {
|
|
gridFn.opennEdit(); //수정가능
|
|
}
|
|
}).trigger("reloadGrid");
|
|
grid.setGridParam({url: "", datatype : "local"});
|
|
} */
|
|
|
|
,footerSummary: function(){ //자동합계
|
|
$("select[id*=_CLIENT_TYPE]").each(function(){
|
|
$(this).select2();
|
|
} );
|
|
}
|
|
}
|
|
|
|
/* function save_excel(){
|
|
$.ajax({
|
|
url:"/partmgmt/parsingExcelFile.do?targetObjId=${objid}&docType=PART_EXCEL_IMPORT"
|
|
,type:"POST"
|
|
,data:""
|
|
,dataType:"json"
|
|
//,contentType: "application/json; charset=utf-8"
|
|
,success:function(data){
|
|
gridFn.modify_search();
|
|
}
|
|
,error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
} */
|
|
|
|
|
|
function fn_save(){
|
|
var ids = grid.jqGrid("getDataIDs");
|
|
if(ids!=""){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("저장 하시겠습니까? 기등록된 거래처는 제외 됩니다.")){
|
|
gridFn.closeEdit();
|
|
var gridData = JSON.stringify(grid.getRowData());
|
|
gridData = gridData.replace(/&/gi, "§");
|
|
gridData = gridData.replace(/%/gi, "※");
|
|
$.ajax({
|
|
url:"/admin/clientApplySave.do"
|
|
,type:"POST"
|
|
,data: $("#form1").serialize() + "&jqGrid="+ gridData
|
|
,dataType:"json"
|
|
//,contentType: "application/json; charset=utf-8"
|
|
,success:function(data){
|
|
if(data =="SUCCESS"){
|
|
Swal.fire("저장되었습니다.");
|
|
top.opener.fn_search();
|
|
self.close();
|
|
};
|
|
}
|
|
,error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}else{
|
|
Swal.fire('저장할 데이터가 없습니다.');
|
|
}
|
|
}
|
|
|
|
//Excel 파일 업로드 후 처리함수
|
|
function setExcelFileArea(){
|
|
setUploadTemplateFile("excelImport");
|
|
}
|
|
//파트 관련 첨부파일 업로드 후 처리함수
|
|
function setPartFileArea(){
|
|
setUploadTemplateFile("partAttachFile");
|
|
}
|
|
|
|
//템플릿 업로드 후 처리
|
|
function setUploadTemplateFile(type){
|
|
var docType = "";
|
|
var deleteCallBackFN = "";
|
|
if(type == "excelImport"){
|
|
docType = "CLIENT_EXCEL_IMPORT";
|
|
deleteCallBackFN = "excelFileDelete";
|
|
}else{
|
|
$("#clientAttachFileArea").empty();
|
|
docType = "CLIENT_IMPORT_ATTACH";
|
|
deleteCallBackFN = "setClientFileArea";
|
|
}
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${objid}", "docType":docType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(null != data && 0 < data.length){
|
|
if("CLIENT_IMPORT_ATTACH" == docType){
|
|
$("#defaultClientAttachFileRow").hide();
|
|
}
|
|
$("#"+type+"List").show();
|
|
}
|
|
$.each(data, function(i){
|
|
var s = "<tr>";
|
|
|
|
if("CLIENT_IMPORT_ATTACH" == docType){
|
|
s += "<td>"+(i+1)+"</td>";
|
|
}
|
|
s += "<td colspan='2'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
|
s += "<td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \""+deleteCallBackFN+"\")'></div></td>";
|
|
s += "</tr>";
|
|
$("#"+type+"Area").append(s);
|
|
});
|
|
if(type == "excelImport"){
|
|
parsingExcelFile();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
|
|
function excelFileDelete(){
|
|
$("#excelImportArea").empty();
|
|
$("#excelImportList").hide();
|
|
$("#parsingClientList").empty();
|
|
$("#defaultClientExcelTemplateRow").show();
|
|
}
|
|
|
|
//Excel 파일 업로드에 따른 파트 첨부파일 영역 DISPLAY
|
|
function displayPartFileInfo(flag){
|
|
|
|
if(flag == "true"){
|
|
$("#partAttachFileDropZone").show();
|
|
$("#clientAttachFileArea").empty();
|
|
$("#defaultClientAttachFileRow").show();
|
|
}else{
|
|
$("#partAttachFileDropZone").show();
|
|
$("#clientAttachFileArea").empty();
|
|
$("#clientAttachFileList").hide();
|
|
}
|
|
}
|
|
|
|
var duplicateCount = 0;
|
|
function parsingExcelFile(){
|
|
|
|
gridFn.search();
|
|
|
|
|
|
|
|
}
|
|
|
|
function savePart(){
|
|
if(0 < $("input[name='clientObjId']").length){
|
|
|
|
var cnt = 0;
|
|
$("input[name='clientObjId']").each(function(idx){
|
|
var targetObjId = $(this).val();
|
|
// 검증 로직 생략
|
|
|
|
if(cnt == 0){
|
|
$("input[name='clientObjId']").each(function(idx){
|
|
var otherObjId = $(this).val();
|
|
if(otherObjId != targetObjId){
|
|
if($("#"+otherObjId+"_CLIENT_CD").val() == $("#"+targetObjId+"_CLIENT_CD").val()){
|
|
Swal.fire("문서내 중복되는 거래처코드가 존재 합니다.("+$("#"+otherObjId+"_CLIENT_CD").val()+","+$("#"+targetObjId+"_CLIENT_CD").val()+")");
|
|
cnt++;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
if(duplicateCount > 0){
|
|
Swal.fire("등록 불가한 거래처코드가 있어 저장할 수 없습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(0 == cnt){
|
|
if(confirm("해당거래처 정보를 저장하시겠습니까?")){
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/admin/clientApplySave.do",
|
|
data: param,
|
|
dataType:"json",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
},
|
|
success: function(result){
|
|
if(null != result){
|
|
Swal.fire(result.message);
|
|
opener.search();
|
|
self.close();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
}else{
|
|
Swal.fire("저장할 정보가 없습니다.");
|
|
}
|
|
}
|
|
|
|
//파일을 삭제한다.
|
|
//Excel 파일 삭제 시 파트 첨부파일도 모두 삭제한다.
|
|
function fileDelete(){
|
|
if(confirm("Excel 파일을 변경하시겠습니까? 이미 Client 첨부파일이 첨부된 경우 파일은 삭제됩니다.")){
|
|
$.ajax({
|
|
url:"/common/deleteFileInfo.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${objid}"},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
excelFileDelete();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
|
</form>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="importPopObjid" id="importPopObjid" value="${objid}">
|
|
<input type="hidden" name="client_mgmt_objid" id="client_mgmt_objid" value="${client_mgmt_objid}">
|
|
<input type="hidden" name="upg_no" id="upg_no" value="${upg_objid}">
|
|
<input type="hidden" name="client_name" id="client_name" value="${client_name}">
|
|
<input type="hidden" name="client_type" id="client_type" value="${client_type}">
|
|
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2><span>거래처관리_Excel upload</span></h2>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
<div style="font-size:12px;float:left;margin:13px 13px 5px 13px">
|
|
회사코드 <select name="comp_code" id="comp_code" disabled="disabled">
|
|
<option value="">선택</option>
|
|
${code_map.comp_code}
|
|
</select>
|
|
<!-- <select name="model_code" id="model_code" style="" class="select2" autocomplete="off" disabled="disabled"> -->
|
|
<!-- </select> -->
|
|
</div>
|
|
<div style="clear:both"></div>
|
|
|
|
<div style=" margin: 0 8px;">
|
|
<div id="clientExcelPopupFormWrap">
|
|
<div class="form_popup_title" style="position:relative;"> Excel upload<img src="/images/btnExcel.png" style="position:absolute; top:9px; right:135px;"/><span style="position:absolute; top:0px; right:10px; cursor:pointer;" id="templateDownload">Template Download</span></div>
|
|
<div id="clientExcelUploadPopupForm">
|
|
<div class="fileDnDWrap">
|
|
<div id="excelImportDropZone" class="dropzone" style="height:50px;">Drag & Drop 엑셀 템플릿</div>
|
|
<div id="excelImportList">
|
|
<table id="excelImportTable" class="excelUploadPopupForm">
|
|
<thead>
|
|
<tr><td colspan="3">Excel 첨부파일</td></tr>
|
|
</thead>
|
|
<tbody id="excelImportArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<section>
|
|
<div class="btn_wrap">
|
|
|
|
<div class="plm_btn_wrap" style="padding:0 8 0 8; text-align: right;">
|
|
<input type="button" class="plm_btns" value="저장" onclick="fn_save();">
|
|
<input type="button" class="plm_btns" value="닫기" onclick="window.close();" >
|
|
|
|
</div>
|
|
<div class="ascendig_text">
|
|
<font size="3px" style="padding-left: 10px;">신규 <span id="now_cnt">0</span>건</font>
|
|
<font size="3px">중복 <span id="dup_cnt">0</span>건</font>
|
|
</div>
|
|
</div>
|
|
</br></br>
|
|
<style>
|
|
#excelUploadPopupForm .dropzone {width:99.8% !important}
|
|
</style>
|
|
<div id="client_table_wrap1" style="padding:0 8 0 8;">
|
|
<div style="">
|
|
<div style="height: 270px;">
|
|
<table id="clientDetailGrid"></table>
|
|
<!-- <div id="jqGridPager"></div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
</form>
|
|
<textarea style="width:0px; height:0px; visibility: hidden;" id="comp_code">${code_map.comp_code}</textarea><!-- 코드동적설정 -->
|
|
<textarea style="width:0px; height:0px; visibility: hidden;" id="client_type">${code_map.client_type}</textarea><!-- 코드동적설정 -->
|
|
<textarea style="width:0px; height:0px; visibility: hidden;" id="client_addr1">${code_map.client_addr1}</textarea><!-- 코드동적설정 -->
|
|
</body>
|
|
</html> |