Commit e9b4c25b authored by 全洪江's avatar 全洪江

客户主数据sap对接

parent 0f17487c
...@@ -123,25 +123,31 @@ function loadContactListGrid() { ...@@ -123,25 +123,31 @@ function loadContactListGrid() {
contactGridManager = UICtrl.grid("#contactListGrid", { contactGridManager = UICtrl.grid("#contactListGrid", {
columns: [ columns: [
{ {
display: "联系人名称", name: "contactName", width: 300, minWidth: 60, type: "string", align: "left", display: "联系人名称", name: "contactName", width: 150, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "text" required: true, type: "text"
} }
}, },
{ {
display: "联系人电话", name: "contactPhone", width: 300, minWidth: 60, type: "string", align: "left", display: "职位", name: "contactPosition", width: 150, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "text" required: true, type: "text"
} }
}, },
{ {
display: "传真", name: "contactFax", width: 300, minWidth: 60, type: "string", align: "left", display: "联系人电话", name: "contactPhone", width: 260, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text"
}
},
{
display: "传真", name: "contactFax", width: 260, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: false, type: "text" required: false, type: "text"
} }
}, },
{ {
display: "邮箱", name: "contactEmail", width: 300, minWidth: 60, type: "string", align: "left", display: "邮箱", name: "contactEmail", width: 260, minWidth: 60, type: "string", align: "left",
editor: { editor: {
required: true, type: "text" required: true, type: "text"
} }
...@@ -593,6 +599,10 @@ function bindEvent() { ...@@ -593,6 +599,10 @@ function bindEvent() {
saveData(); saveData();
}) })
$("#submit").click(function () {//提交给sap
submitToSap();
})
$("#close").click(function () {//关闭 $("#close").click(function () {//关闭
closeDispatchTabItem(); closeDispatchTabItem();
}) })
...@@ -645,6 +655,18 @@ function saveData() { ...@@ -645,6 +655,18 @@ function saveData() {
); );
} }
function submitToSap() {
var customerDetail = getCustomerDetail();
if (!customerDetail) {
return;
}
Public.ajax(web_app.name + '/customer/submitCustomerToSAP.ajax', customerDetail,
function () {
Public.successTip("common.tip.success");
}
)
}
function closeDispatchTabItem() { function closeDispatchTabItem() {
UICtrl.closeCurrentTab(); UICtrl.closeCurrentTab();
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<x:billTitle title="客户信息详情" needStatus="false" needPerson="true"/> <x:billTitle title="客户信息详情" needStatus="false" needPerson="true"/>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button> <button class="btn btn-default" type="button" id="close" style="left: 200px;float:right;bottom: 10px;">关闭</button>
<button class="btn btn-warning" type="button" id="submit" style="left: 200px;float:right;bottom: 10px;">提交给sap</button>
<button class="btn btn-success" type="button" id="save" style="left: 200px;float:right;bottom: 10px;">保存</button> <button class="btn btn-success" type="button" id="save" style="left: 200px;float:right;bottom: 10px;">保存</button>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<form class="hg-form" method="post" action="" id="submitForm"> <form class="hg-form" method="post" action="" id="submitForm">
...@@ -34,6 +35,10 @@ ...@@ -34,6 +35,10 @@
<li id="customerBaseInfo" divid="customerBaseInfoDiv">客户基本信息</li> <li id="customerBaseInfo" divid="customerBaseInfoDiv">客户基本信息</li>
<li id="customerDebtContact" divid="customerDebtContactDiv">催货款通知邮箱</li> <li id="customerDebtContact" divid="customerDebtContactDiv">催货款通知邮箱</li>
<li id="customerOtherInfo" divid="customerOtherInfoDiv">其他信息</li> <li id="customerOtherInfo" divid="customerOtherInfoDiv">其他信息</li>
<li id="customerBrand" divid="customerBrandDiv">品牌信息字段</li>
<li id="customerBank" divid="customerBankDiv">银行数据表字段</li>
<li id="customerCompany" divid="customerCompanyDiv">公司代码字段</li>
<li id="customerSale" divid="customerSaleDiv">销售组织字段</li>
</ul> </ul>
</div> </div>
...@@ -45,77 +50,161 @@ ...@@ -45,77 +50,161 @@
<x:hidden name="provinceCode"/> <x:hidden name="provinceCode"/>
<x:hidden name="primaryProvinceCode"/> <x:hidden name="primaryProvinceCode"/>
<x:hidden name="secondProvinceCode"/> <x:hidden name="secondProvinceCode"/>
<x:inputC name="customerCode" label="客户编码" labelCol="1" fieldCol="2"/> <%-- sap字段开始--%>
<x:inputC name="customerName" label="客户全称" required="true" labelCol="1" fieldCol="2"/> <x:inputC name="BU_GROUP" label="账户组" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="paymentRequest" label="请款要求" labelCol="1" fieldCol="2"/> <x:inputC name="KUNNR" label="客户编号" labelCol="1" fieldCol="2" readonly="true" maxLength="10"/>
<x:inputC name="customerShortName" label="客户简称" required="true" labelCol="1" fieldCol="2"/> <x:inputC name="RLTYP" label="业务伙伴角色" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="customerWorkTime" label="客户工作时间" wrapper="dateTime" labelCol="1" fieldCol="2"/> <%-- sap字段结束--%>
<x:inputC name="customerEnName" label="英文名称" labelCol="1" required="true" fieldCol="2"/> <x:inputC name="customerCode" label="客户编码" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="customerEnShortName" label="英文名简称" labelCol="1" fieldCol="2"/> <%-- sap字段开始--%>
<x:selectC name="customerLevel" label="客户等级" dictionary="customerLevel" labelCol="1" fieldCol="2"/> <x:inputC name="customerName" label="客户名称" required="true" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="customerShortName" label="客户简称" required="true" labelCol="1" fieldCol="2" maxLength="25"/>
<x:inputC name="STRAS" label="开票地址" required="true" labelCol="1" fieldCol="2" maxLength="140"/>
<x:inputC name="STR_SUPPL3" label="客户送货地址(固定)" labelCol="1" fieldCol="2" required="true" maxLength="80"/>
<%-- sap字段结束--%>
<x:inputC name="province" label="客户所在省份" wrapper="select" id="selectProvince" labelCol="1" fieldCol="2" />
<x:inputC name="city" label="(地级)市、地区、盟、自治州" wrapper="select" id="selectCity" labelCol="1" fieldCol="2" />
<x:inputC name="county" label="县、(县级)市、(市辖)区" wrapper="select" id="selectCounty" labelCol="1" fieldCol="2" />
<x:inputC name="deduction" label="扣款百分比" maxLength="32" labelCol="1" fieldCol="2"/>
<x:selectC name="signedBack" label="是否要求签回货单" dictionary="signedBack" labelCol="1" fieldCol="2"/>
<x:selectC name="customerSysOrder" label="是否用客户系统货单" dictionary="customerSysOrder" labelCol="1" fieldCol="2"/>
<x:selectC name="quotationCurrency" label="报价币别" dictionary="currency" labelCol="1" fieldCol="2"/>
<x:inputC name="customerEnName" label="英文名称" labelCol="1" required="true" fieldCol="2"/><%--金库--%>
<x:inputC name="customerEnShortName" label="英文名简称" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:selectC name="customerLevel" label="客户等级" dictionary="customerLevel" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="decimalPlaces" label="金额小数位数" labelCol="1" fieldCol="2"/>
<x:inputC name="customerFactoryCode" label="工厂代号" labelCol="1" fieldCol="2"/>
<x:inputC name="signedStyle" label="签回方式" required="true" labelCol="1" fieldCol="2"/> <x:inputC name="LAND1" label="国家" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="monthlySettlementMethod" label="月结方式" id="selectedMonthlySettlementMethod" wrapper="select" labelCol="1" fieldCol="2"/> <x:inputC name="province" label="客户所在省份" wrapper="select" id="selectProvince" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="customerZipCode" label="邮编" labelCol="1" fieldCol="2"/> <x:inputC name="city" label="(地级)市、地区、盟、自治州" wrapper="select" id="selectCity" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="county" label="县、(县级)市、(市辖)区" wrapper="select" id="selectCounty" labelCol="1" fieldCol="2" /><%--金库--%>
<%--后续添加数据字典--%> <x:inputC name="CITY1" label="城市" labelCol="1" fieldCol="2" maxLength="40"/><%--sap--%>
<x:inputC name="accountDifficultLevel" label="做账难度等级" labelCol="1" fieldCol="2"/> <x:inputC name="LAND1" label="国家" labelCol="1" fieldCol="2" maxLength="2"/><%--sap--%>
<x:inputC name="REGIO" label="地区" labelCol="1" fieldCol="2" maxLength="3"/><%--sap--%>
<x:inputC name="SPRAS" label="语言" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="customerZipCode" label="邮政编码" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="TELF1" label="电话号码" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="TEL_NUMBER" label="移动电话" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="SMTP_ADDR" label="Email" labelCol="1" fieldCol="2" required="true" maxLength="24"/><%--sap--%>
<x:inputC name="accountDifficultLevel" label="做账难度等级" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="customerSysOrder" label="要求用客户系统货单" dictionary="customerSysOrder" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="stampMethod" label="盖章方式" required="true" dictionary="stampMethod" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="paymentRequestForm" label="请款联" dictionary="paymentRequestFrom" required="true" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="customerReceipt" label="客户联" required="true" dictionary="customerReceipt" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="orderRequire" label="订单要求" required="true" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="acceptanceRequire" label="验收单要求" required="true" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="customerSysAcceptanceRequire" label="客户系统验收要求" required="true" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="signedBack" label="是否要求签回货单" dictionary="signedBack" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="isPrintDeliveryDate" label="货单是否打印送货日期" dictionary="productInspectionReportType" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="needInvoice" label="不开发票" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="paymentRequest" label="请款要求" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="customerWorkTime" label="客户工作时间" labelCol="1" fieldCol="2" maxLength="20"/><%--sap、金库--%>
<x:inputC name="receiverSignatureRequire" label="收货方签字要求" required="true" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="shipPrintRequire" label="货单打印要求" required="true" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="customerGroup" label="所属集团" labelCol="1" fieldCol="2" maxLength="20"/><%--sap、金库--%>
<x:selectC name="productInspectionReportType" label="产品检验报告类型" dictionary="productInspectionReportType" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="signedStyle" label="货单签回方式" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:selectC name="shipMethod" label="出货方式" required="true" dictionary="shipMethod" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:selectC name="route" label="路线" required="true" dictionary="route" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:selectC name="ZF12" label="送货单打印默认设置" required="true" labelCol="1" fieldCol="2"/><%--sap--%>
<x:inputC name="shipAbnormalDeadline" label="送货单统计异常期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="productionDeliveryMethod" label="生产发货方式" labelCol="1" fieldCol="2" required="true"/><%--sap、金库--%>
<x:inputC name="monthlySettlementMethod" label="月结方式" id="selectedMonthlySettlementMethod" wrapper="select" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="paymentDeadline" label="请款期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="accountDeadline" label="做账截止日" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="customerCollectionDeadline" label="客户收账截止日" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="orderAbnormalDeadline" label="订单统计异常期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="deduction" label="扣款百分比" maxLength="32" labelCol="1" fieldCol="2"/><%--金库--%>
<x:selectC name="quotationCurrency" label="币别" dictionary="currency" labelCol="1" fieldCol="2"/><%--金库、sap销售组织字段--%>
<x:inputC name="decimalPlaces" label="金额小数位数" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="ZF06" label="经营类型" labelCol="1" fieldCol="2" required="true" maxLength="10"/><%--sap品牌--%>
<x:inputC name="customerFactoryCode" label="工厂代号" labelCol="1" fieldCol="2" maxLength="50"/><%--sap品牌--%>
<x:inputC name="BANKL" label="开户银行代码" labelCol="1" fieldCol="2"/>
<x:inputC name="customerBankDeposit" label="开户银行" labelCol="1" fieldCol="2"/> <x:inputC name="customerBankDeposit" label="开户银行" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAccountNo" label="银行账户" labelCol="1" fieldCol="2"/> <x:inputC name="customerAccountNo" label="银行账户" labelCol="1" fieldCol="2"/>
<x:selectC name="stampMethod" label="盖章方式" required="true" dictionary="stampMethod" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAccountName" label="户名" labelCol="1" fieldCol="2"/> <x:inputC name="customerAccountName" label="户名" labelCol="1" fieldCol="2"/>
<x:inputC name="customerCorporation" label="公司法人" labelCol="1" fieldCol="2"/> <x:inputC name="customerCorporation" label="公司法人" labelCol="1" fieldCol="2"/>
<x:selectC name="paymentRequestForm" label="请款联" dictionary="paymentRequestFrom" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="businessRegistrationNumber" label="工商注册号" labelCol="1" fieldCol="2"/> <x:inputC name="businessRegistrationNumber" label="工商注册号" labelCol="1" fieldCol="2"/>
<x:inputC name="nationalTaxRegistrationNumber" label="国税注册号" labelCol="1" fieldCol="2"/> <x:inputC name="nationalTaxRegistrationNumber" label="国税注册号" labelCol="1" fieldCol="2"/>
<x:selectC name="customerReceipt" label="客户联" required="true" dictionary="customerReceipt" labelCol="1" fieldCol="2"/>
<x:selectC name="orderKind" label="订单性质" dictionary="orderKind" labelCol="1" fieldCol="2"/> <x:selectC name="orderKind" label="订单性质" dictionary="orderKind" labelCol="1" fieldCol="2"/>
<x:inputC name="customerBrand" label="品牌" labelCol="1" fieldCol="2"/> <x:inputC name="customerBrand" label="品牌" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAddress" label="地址" labelCol="1" fieldCol="2"/> <x:inputC name="customerAddress" label="收货地址" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="customerGroup" label="所属集团" labelCol="1" fieldCol="2"/>
<x:inputC name="receiverSignatureRequire" label="收货方签字要求" required="true" labelCol="1" fieldCol="2"/>
<x:selectC name="shipMethod" label="出货方式" required="true" dictionary="shipMethod" labelCol="1" fieldCol="2"/>
<x:selectC name="route" label="路线" required="true" dictionary="route" labelCol="1" fieldCol="2"/>
<x:inputC name="remark" label="备注" labelCol="1" fieldCol="2"/> <x:inputC name="remark" label="备注" labelCol="1" fieldCol="2"/>
<%--后续添加数据字典--%>
<x:inputC name="orderRequire" label="订单要求" required="true" labelCol="1" fieldCol="2"/>
<%--后续添加数据字典--%>
<x:inputC name="acceptanceRequire" label="验收单要求" required="true" labelCol="1" fieldCol="2"/>
<%--后续添加数据字典--%>
<x:inputC name="customerSysAcceptanceRequire" label="客户系统验收要求" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="accountDeadline" label="做账截止日" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="customerCollectionDeadline" label="客户收账单截止日" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="orderAbnormalDeadline" label="订单统计异常期限" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="shipAbnormalDeadline" label="送货单统计异常期限" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="paymentDeadline" label="请款期限" required="true" labelCol="1" fieldCol="2"/>
<x:selectC name="productInspectionReportType" label="产品检验报告类型" dictionary="productInspectionReportType" labelCol="1" fieldCol="2"/>
<%--后续添加数据字典--%>
<x:inputC name="shipPrintRequire" label="货单打印要求" required="true" labelCol="1" fieldCol="2"/>
<x:selectC name="isPrintDeliveryDate" label="货单是否打印送货日期" dictionary="productInspectionReportType" labelCol="1" fieldCol="2"/> <%--sap--%>
<%--后续添加数据字典--%>
<x:inputC name="needInvoice" label="是否开发票" labelCol="1" fieldCol="2"/> <%-- <x:inputC name="BUKRS" label="公司代码" labelCol="1" fieldCol="2"/>--%>
<%--后续添加数据字典--%> <%-- <x:inputC name="AKONT" label="统驭科目" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="productionDeliveryMethod" label="生产交货方式" labelCol="1" fieldCol="2"/> <%-- <x:inputC name="VKORG" label="销售组织" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="VTWEG" label="分销渠道" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="SPART" label="产品组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="KDGRP" label="客户组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="VKBUR" label="销售办公室" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="VKGRP" label="销售小组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="KLABC" label="客户分类" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="KURST" label="汇率类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="PLTYP" label="价格清单" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="INCO1" label="国际贸易条款" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="INCO2" label="国际贸易条款位置" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ZTERM" label="付款条件" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="KTGRD" label="客户科目分配组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="TATYP" label="税收类别" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="TAXKD" label="客户税分类" labelCol="1" fieldCol="2"/>--%>
...@@ -170,11 +259,30 @@ ...@@ -170,11 +259,30 @@
<div id="customerPayInfo" position="center"> <div id="customerPayInfo" position="center">
<x:title title="客户付款信息" name="group"/> <x:title title="客户付款信息" name="group"/>
<div id="customerPayInfoListGrid" style="margin: 2px;"> <div id="customerPayInfoListGrid" style="margin: 2px;">
<hr> <hr/>
</div> </div>
</div> </div>
</div> </div>
<div class="layout" id="customerBrandDiv">
<div id="customerBrandGrid">
<x:title title="客户品牌信息表"/>
<div id="customerBrandListGrid" style="margin: 2px;">
<hr/>
</div>
</div>
</div>
<div class="layout" id="customerBankDiv">
<div id="customerBankGrid">
<x:title title="客户银行数据表"/>
<div id="customerBrandListGrid" style="margin: 2px;">
<hr/>
</div>
</div>
</div>
</div> </div>
</div> </div>
......
...@@ -22,7 +22,8 @@ function loadCustomerInfoListGrid() { ...@@ -22,7 +22,8 @@ function loadCustomerInfoListGrid() {
gridManager = UICtrl.grid("#customerInfoListGrid", { gridManager = UICtrl.grid("#customerInfoListGrid", {
columns: [ columns: [
{display: "客户编码", name: "customerCode", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "客户编码", name: "customerCode", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "客户名称", name: "customerShortName", width: 120, minWidth: 60, type: "string", align: "left"}, {display: "客户名称", name: "customerName", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "客户名称简称", name: "customerShortName", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "客户英文名称", name: "customerEnName", width: 140, minWidth: 60, type: "string", align: "left"}, {display: "客户英文名称", name: "customerEnName", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "客户英文名称简称", name: "customerEnShortName", width: 160, minWidth: 60, type: "string", align: "left"}, {display: "客户英文名称简称", name: "customerEnShortName", width: 160, minWidth: 60, type: "string", align: "left"},
{display: "客户工作时间", name: "customerWorkTime", width: 120, minWidth: 60, type: "datetime", align: "left"}, {display: "客户工作时间", name: "customerWorkTime", width: 120, minWidth: 60, type: "datetime", align: "left"},
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<x:title title="common.button.search" hideTable="queryMainForm" isHide="true"/> <x:title title="common.button.search" hideTable="queryMainForm" isHide="true"/>
<%--查询表单--%> <%--查询表单--%>
<form class="hg-form ui-hide" method="post" action="" id="queryMainForm"> <form class="hg-form ui-hide" method="post" action="" id="queryMainForm">
<x:inputC name="ruleKind" required="false" label="客户名称" labelCol="1"/> <x:inputC name="customerName" required="false" label="客户名称" labelCol="1"/>
<x:searchButtons/> <x:searchButtons/>
</form> </form>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
......
package com.huigou.topsun.customer.application.Impl;
import com.huigou.topsun.customer.application.SapCustomerApplication;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.sap.CustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.uasp.bmp.common.application.AbstractApplication;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service
public class SapCustomerApplicationImpl extends AbstractApplication implements SapCustomerApplication {
@Override
public CustomerDto submitCustomerToSAP(CustomerVo customerVo, CustomerContact customerContact) {
CustomerDto customerDto = new CustomerDto();
//账目组
// customerDto.setBU_GROUP();
//sap:客户编号customerCode 金库:客户编码KUNNR
// customerDto.setKUNNR();
//业务伙伴角色
// customerDto.setPLTYP();
//客户名称
String customerName = customerVo.getCustomerName();
customerDto.setNAME1(customerName);
//客户简称
String customerShortName = customerVo.getCustomerShortName();
customerDto.setBU_SORT(customerShortName);
//收货地址
String customerAddress = customerVo.getCustomerAddress();
customerDto.setSTRAS(customerAddress);
//客户送货地址(固定)
// customerDto.setSTR_SUPPL3();
//城市
String city = customerVo.getCity();
customerDto.setCITY1(city);
//国家
// customerDto.setLAND1();
//地区
String province = customerVo.getProvince();
String region = province + city;
customerDto.setREGIO(region);
//语言
// customerDto.setSPRAS();
//邮政编码
String customerZipCode = customerVo.getCustomerZipCode();
customerDto.setPOST_CODE1(customerZipCode);
//公司电话号码
// customerDto.setTELF1();
//公司移动电话
// customerDto.setTEL_NUMBER();
//公司传真
// customerDto.setTELFX();
//公司邮箱
// customerDto.setSMTP_ADDR();
//开户银行代码(?)
String customerBankId = customerVo.getCustomerBankId();
customerDto.setBANKL(customerBankId);
//银行账号
String customerAccountNo = customerVo.getCustomerAccountNo();
customerDto.setBANKN(customerAccountNo);
//做账难度等级
String accountDifficultLevel = customerVo.getAccountDifficultLevel();
customerDto.setKUKLA(accountDifficultLevel);
//要求用客户系统货单(是、否)
String customerSysOrder = customerVo.getCustomerSysOrder();
customerDto.setKATR1(customerSysOrder);
//盖章方式(传key)
String stampMethod = customerVo.getStampMethod();
customerDto.setKATR2(stampMethod);
//请款联(传key,key是sap字典的数字编码)
String paymentRequestForm = customerVo.getPaymentRequestForm();
customerDto.setKATR3(paymentRequestForm);
//客户联(传key,key是sap字典的数字编码)
String customerReceipt = customerVo.getCustomerReceipt();
customerDto.setKATR4(customerReceipt);
//订单要求(sap数据字典)
String orderRequire = customerVo.getOrderRequire();
customerDto.setKATR5(orderRequire);
//验收单要求(sap数据字典)
String acceptanceRequire = customerVo.getAcceptanceRequire();
customerDto.setKATR6(acceptanceRequire);
//客户系统验收要求()
String customerSysAcceptanceRequire = customerVo.getCustomerSysAcceptanceRequire();
customerDto.setKATR7(customerSysAcceptanceRequire);
//要求签回货单
String signedBack = customerVo.getSignedBack();
customerDto.setKATR8(signedBack);
//货单是否打印送货日期
String isPrintDeliveryDate = customerVo.getIsPrintDeliveryDate();
customerDto.setKATR9(isPrintDeliveryDate);
//不开发票
String needInvoice = customerVo.getNeedInvoice();
customerDto.setKATR10(needInvoice);
//请款要求
String paymentRequest = customerVo.getPaymentRequest();
customerDto.setZT01(paymentRequest);
//客户工作时间
Date customerWorkTime = customerVo.getCustomerWorkTime();
customerDto.setZT02(String.valueOf(customerWorkTime));
//收货方签字要求
String receiverSignatureRequire = customerVo.getReceiverSignatureRequire();
customerDto.setZT03(receiverSignatureRequire);
//货单打印要求
String shipPrintRequire = customerVo.getShipPrintRequire();
customerDto.setZT04(shipPrintRequire);
//品牌
String customerBrand = customerVo.getCustomerBrand();
customerDto.setZF01(customerBrand);
//职位
String contactPosition = customerContact.getContactPosition();
customerDto.setZF02(contactPosition);
//联系人
String contactName = customerContact.getContactName();
customerDto.setZF03(contactName);
//电话号码
String contactPhone = customerContact.getContactPhone();
customerDto.setZF04(contactPhone);
//e_Mail
String contactEmail = customerContact.getContactEmail();
customerDto.setZF05(contactEmail);
//经营类型
// customerDto.setZF06();
//工厂代号
String customerFactoryCode = customerVo.getCustomerFactoryCode();
customerDto.setZF07(customerFactoryCode);
//产品检验报告类型
String productInspectionReportType = customerVo.getProductInspectionReportType();
customerDto.setZF08(productInspectionReportType);
//货单签回方式
String signedStyle = customerVo.getSignedStyle();
customerDto.setZF09(signedStyle);
//出货方式
String shipMethod = customerVo.getShipMethod();
customerDto.setZF10(shipMethod);
//路线
String route = customerVo.getRoute();
customerDto.setZF11(route);
//送货单打印默认设置
// customerDto.setZF12();
//送货单统计异常期限
Integer shipAbnormalDeadline = customerVo.getShipAbnormalDeadline();
customerDto.setZF13(String.valueOf(shipAbnormalDeadline));
//生产发货方式
String productionDeliveryMethod = customerVo.getProductionDeliveryMethod();
customerDto.setZF14(productionDeliveryMethod);
//月结方式
String monthlySettlementMethod = customerVo.getMonthlySettlementMethod();
customerDto.setZF15(monthlySettlementMethod);
//请款期限
Integer paymentDeadline = customerVo.getPaymentDeadline();
customerDto.setZF16(String.valueOf(paymentDeadline));
//做账截止日
Integer accountDeadline = customerVo.getAccountDeadline();
customerDto.setZF17(String.valueOf(accountDeadline));
//客户收账截止日
Integer customerCollectionDeadline = customerVo.getCustomerCollectionDeadline();
customerDto.setZF18(String.valueOf(customerCollectionDeadline));
//订单统计异常期限
Integer orderAbnormalDeadline = customerVo.getOrderAbnormalDeadline();
customerDto.setZF19(String.valueOf(orderAbnormalDeadline));
//公司代码
// customerDto.setBUKRS();
//统驭科目
// customerDto.setAKONT();
//销售组织
// customerDto.setVKORG();
//分销渠道
// customerDto.setVTWEG();
//产品组
// customerDto.setSPART();
//客户组
// customerDto.setKDGRP();
//销售办公室
// customerDto.setVKBUR();
//销售小组
// customerDto.setVKGRP();
//客户分类
// customerDto.setKLABC();
//币别
String quotationCurrency = customerVo.getQuotationCurrency();
customerDto.setWAERS(quotationCurrency);
//汇率类型
// customerDto.setKURST();
//价格清单
// customerDto.setPLTYP();
//国际贸易条款
// customerDto.setINCO1();
//国际贸易条款位置
// customerDto.setINCO2();
//付款条件
// customerDto.setZTERM();
//客户科目分配组
// customerDto.setKTGRD();
//税收类别
// customerDto.setTATYP();
//客户税分类
// customerDto.setTAXKD();
return customerDto;
}
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.sap.CustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
public interface SapCustomerApplication {
CustomerDto submitCustomerToSAP(CustomerVo customerVo, CustomerContact customerContact);
}
...@@ -3,25 +3,25 @@ package com.huigou.topsun.customer.controller; ...@@ -3,25 +3,25 @@ package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerBaseInfoApplication; import com.huigou.topsun.customer.application.CustomerBaseInfoApplication;
import com.huigou.topsun.customer.application.CustomerApplication; import com.huigou.topsun.customer.application.CustomerApplication;
import com.huigou.topsun.customer.application.CustomerOrderApplication; import com.huigou.topsun.customer.application.CustomerOrderApplication;
import com.huigou.topsun.customer.application.SapCustomerApplication;
import com.huigou.topsun.customer.domain.*; import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest; import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.domain.sap.CustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerListVo; import com.huigou.topsun.customer.domain.vo.CustomerListVo;
import com.huigou.topsun.customer.domain.vo.CustomerVo; import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.topsun.customer.domain.vo.ReturnCustomerListVo; import com.huigou.topsun.customer.domain.vo.ReturnCustomerListVo;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth; import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController; import com.huigou.uasp.client.CommonController;
import com.huigou.util.JSONUtil;
import com.huigou.util.SDO; import com.huigou.util.SDO;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
@Controller @Controller
...@@ -32,13 +32,17 @@ public class CustomerController extends CommonController { ...@@ -32,13 +32,17 @@ public class CustomerController extends CommonController {
@Autowired @Autowired
private CustomerApplication customerApplication; private CustomerApplication customerApplication;
@Autowired @Autowired
private CustomerOrderApplication customerOrderApplication; private SapCustomerApplication sapCustomerApplication;
@Override @Override
protected String getPagePath() { protected String getPagePath() {
return "/biz/topsun/customer/"; return "/biz/topsun/customer/";
} }
/**
* 金库查询客户接口
* @return
*/
@SkipAuth @SkipAuth
public String getCustomerList() { public String getCustomerList() {
List<CustomerListVo> customerListVoList = customerApplication.getCustomerList(); List<CustomerListVo> customerListVoList = customerApplication.getCustomerList();
...@@ -138,6 +142,16 @@ public class CustomerController extends CommonController { ...@@ -138,6 +142,16 @@ public class CustomerController extends CommonController {
} }
public String submitCustomerToSAP() {
SDO sdo = getSDO();
CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class);
CustomerContact customerContact = customerContactList.get(0);
CustomerDto customerDto = sapCustomerApplication.submitCustomerToSAP(customerVo, customerContact);
return JSONUtil.toString(customerDto);
}
// /** // /**
// * 展示客户省市数据,如果客户的省份编码是省级行政单位,直接返回省份数据, // * 展示客户省市数据,如果客户的省份编码是省级行政单位,直接返回省份数据,
// * 如果客户的省份编码是二级或者三级行政单位,则需要返回对应的省级或者市级行政单位 // * 如果客户的省份编码是二级或者三级行政单位,则需要返回对应的省级或者市级行政单位
......
...@@ -8,9 +8,10 @@ import org.hibernate.annotations.GenericGenerator; ...@@ -8,9 +8,10 @@ import org.hibernate.annotations.GenericGenerator;
/** /**
* 客户联系人信息 * 客户联系人信息
*
* @TableName customer_contact * @TableName customer_contact
*/ */
@Table(name="customer_contact") @Table(name = "customer_contact")
@Data @Data
@Entity @Entity
public class CustomerContact implements Serializable { public class CustomerContact implements Serializable {
...@@ -35,6 +36,12 @@ public class CustomerContact implements Serializable { ...@@ -35,6 +36,12 @@ public class CustomerContact implements Serializable {
@Column(name = "contact_name") @Column(name = "contact_name")
private String contactName; private String contactName;
/**
* 职位
*/
@Column(name = "contact_position")
private String contactPosition;
/** /**
* 联系人电话 * 联系人电话
*/ */
......
package com.huigou.topsun.customer.domain.sap;
import lombok.Data;
@Data
public class CustomerDto {
/**
* 账目组
*/
private String BU_GROUP;
/**
* 客户编号
*/
private String KUNNR;
/**
* 业务伙伴角色
*/
private String RLTYP;
/**
* 客户名称
*/
private String NAME1;
/**
* 客户简称
*/
private String BU_SORT;
/**
* 收货地址
*/
private String STRAS;
/**
* 客户送货地址(固定)
*/
private String STR_SUPPL3;
/**
* 城市
*/
private String CITY1;
/**
* 国家
*/
private String LAND1;
/**
* 地区
*/
private String REGIO;
/**
* 语言
*/
private String SPRAS;
/**
* 邮政编码
*/
private String POST_CODE1;
/**
* 电话号码
*/
private String TELF1;
/**
* 移动电话
*/
private String TEL_NUMBER;
/**
* 传真
*/
private String TELFX;
/**
* Email
*/
private String SMTP_ADDR;
/**
* 开户银行代码
*/
private String BANKL;
/**
* 银行账号
*/
private String BANKN;
/**
* 做帐难度等级
*/
private String KUKLA;
/**
* 要求用客户系统货单
*/
private String KATR1;
/**
* 盖章方式
*/
private String KATR2;
/**
* 请款联
*/
private String KATR3;
/**
* 客户联
*/
private String KATR4;
/**
* 订单要求
*/
private String KATR5;
/**
* 验收单要求
*/
private String KATR6;
/**
* 客户系统验收要求
*/
private String KATR7;
/**
* 要求签回货单
*/
private String KATR8;
/**
* 货单是否打印送货日期
*/
private String KATR9;
/**
* 不开发票
*/
private String KATR10;
/**
* 请款要求
*/
private String ZT01;
/**
* 客户工作时间
*/
private String ZT02;
/**
* 收货方签字要求
*/
private String ZT03;
/**
* 货单打印要求
*/
private String ZT04;
/**
* 品牌
*/
private String ZF01;
/**
* 职位
*/
private String ZF02;
/**
* 联系人
*/
private String ZF03;
/**
* 电话号码
*/
private String ZF04;
/**
* e_Mail
*/
private String ZF05;
/**
* 经营类型
*/
private String ZF06;
/**
* 工厂代号
*/
private String ZF07;
/**
* 产品检验报告类型
*/
private String ZF08;
/**
* 货单签回方式
*/
private String ZF09;
/**
* 出货方式
*/
private String ZF10;
/**
* 线路
*/
private String ZF11;
/**
* 送货单打印默认设置
*/
private String ZF12;
/**
* 送货单统计异常期限
*/
private String ZF13;
/**
* 生产发货方式
*/
private String ZF14;
/**
* 月结方式
*/
private String ZF15;
/**
* 请款期限
*/
private String ZF16;
/**
* 做账截止日
*/
private String ZF17;
/**
* 客户收账截止日
*/
private String ZF18;
/**
* 订单统计异常期限
*/
private String ZF19;
/**
* 公司代码
*/
private String BUKRS;
/**
* 统驭科目
*/
private String AKONT;
/**
* 销售组织
*/
private String VKORG;
/**
* 分销渠道
*/
private String VTWEG;
/**
* 产品组
*/
private String SPART;
/**
* 客户组
*/
private String KDGRP;
/**
* 销售办公室
*/
private String VKBUR;
/**
* 销售小组
*/
private String VKGRP;
/**
* 客户分类
*/
private String KLABC;
/**
* 币别
*/
private String WAERS;
/**
* 汇率类型
*/
private String KURST;
/**
* 价格清单
*/
private String PLTYP;
/**
* 国际贸易条款
*/
private String INCO1;
/**
* 国际贸易条款位置
*/
private String INCO2;
/**
* 付款条件
*/
private String ZTERM;
/**
* 客户科目分配组
*/
private String KTGRD;
/**
* 税收类别
*/
private String TATYP;
/**
* 客户税分类
*/
private String TAXKD;
/**
* 装运条件
*/
private String VSBED;
}
...@@ -103,7 +103,7 @@ public class CustomerVo implements Serializable { ...@@ -103,7 +103,7 @@ public class CustomerVo implements Serializable {
private String customerZipCode; private String customerZipCode;
/** /**
* * 开户银行id
*/ */
private String customerBankId; private String customerBankId;
...@@ -295,7 +295,7 @@ public class CustomerVo implements Serializable { ...@@ -295,7 +295,7 @@ public class CustomerVo implements Serializable {
private String needInvoice; private String needInvoice;
/** /**
* 生产货方式(productionDeliveryMethod) * 生产货方式(productionDeliveryMethod)
*/ */
private String productionDeliveryMethod; private String productionDeliveryMethod;
......
<?xml version="1.0" encoding="UTF-8" ?>
<query-mappings>
<query name="deleteCustomerBank" label="删除客户银行信息" table="customer_bank">
<sql-query>
delete
from customer_bank c
where customer_id = ?
</sql-query>
</query>
<query name="customerList" label="客户信息表" table="customer">
<sql-query>
select c.* from customer c where 1=1
</sql-query>
<condition column="customer_name" name="customerName" type="java.lang.String" symbol="like" alias="c"/>
</query>
<query name="getCustomerList" label="对外查询客户信息" table="customer">
<sql-query>
SELECT customer.customer_id,customer.customer_name,customer.province_code,co.quotation_currency,co.monthly_settlement_method,co.order_kind,ccc.contact_name,ccc.contact_phone,ccc.contact_fax,ccc.contact_email,co.remark
FROM customer LEFT JOIN
(SELECT c.customer_id,cc.contact_name,cc.contact_phone,cc.contact_fax,cc.contact_email FROM customer c LEFT JOIN customer_contact cc ON c.customer_id = cc.customer_id) AS ccc
ON customer.customer_id = ccc.customer_id LEFT JOIN customer_order co
ON customer.customer_id = co.customer_id
</sql-query>
</query>
<query name="customerDebtContact" label="催货款通知邮箱表" table="customer_debt_contact">
<sql-query>
select c.*
from customer_debt_contact c
where customer_id = ?
and customer_email_type = ?
</sql-query>
</query>
<query name="deleteCustomerDebtContact" label="删除催货款通知邮箱" table="customer_debt_contact">
<sql-query>
delete
from customer_debt_contact c
where customer_id = ?
</sql-query>
</query>
<query name="customerRelated" label="客户关系关联信息表" table="customer_related">
<sql-query>
select c.*
from customer_related c
where customer_id = ?
</sql-query>
</query>
<query name="deleteCustomerRelated" label="删除客户关系关联信息" table="customer_related">
<sql-query>
delete
from customer_related c
where customer_id = ?
</sql-query>
</query>
<query name="CustomerPayInfo" label="客户付款信息表" table="customer_pay_info">
<sql-query>
select c.*
from customer_pay_info c
where customer_id = ?
</sql-query>
</query>
<query name="deleteCustomerPayInfo" label="删除客户付款信息" table="customer_pay_info">
<sql-query>
delete
from customer_pay_info c
where customer_id = ?
</sql-query>
</query>
<query name="contactList" label="联系人信息表" table="customer_contact">
<sql-query>
select c.* from customer_contact c where c.customer_id = ?
</sql-query>
</query>
<query name="deleteContact" label="删除联系人信息" table="customer_contact">
<sql-query>
delete
from customer_contact c
where customer_id = ?
</sql-query>
</query>
<query name="monthlySettlementMethod" label="月结方式表" table="monthly_settlement_method">
<sql-query>
select t.* from monthly_settlement_method t where 1=1 order by t.sequence
</sql-query>
</query>
</query-mappings>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment