Commit 03333e0f authored by 全洪江's avatar 全洪江

客户模块前端

parent 6531b6c8
......@@ -544,43 +544,86 @@ function loadCustomerBrandListGrid() {
}
}
);
customerPayInfoGridManager = UICtrl.grid("#customerPayInfoListGrid", {
customerBrandGridManager = UICtrl.grid("#customerBrandListGrid", {
columns: [
{
display: "支付方户名",
name: "customerPayAccountName",
width: 200,
display: "品牌",
name: "brand",
width: 100,
minWidth: 60,
type: "string",
align: "left",
editor: {
required: true, type: "text",
required: false,
type: "text"
}
},
{
display: "录入人", name: "createdByName", width: 200, minWidth: 60, type: "string", align: "left",
display: "职位", name: "position", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "录入时间", name: "createdDate", width: 200, minWidth: 60, type: "date", align: "left",
display: "录入时间", name: "createdDate", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "修改人", name: "lastModifiedByName", width: 200, minWidth: 60, type: "string", align: "left",
display: "联系人", name: "contact", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "修改时间", name: "lastModifiedDate", width: 200, minWidth: 60, type: "date", align: "left",
display: "电话号码", name: "tel", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "e-Mail", name: "eMail", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "经营类型", name: "operateType", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "工厂代码", name: "factoryCode", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "跟单员", name: "merchandiser", width: 120, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
}
],
dataAction: "server",
url: web_app.name + '/customerPayInfo/slicedCustomerPayInfoList.ajax',
url: web_app.name + '/customerBrand/slicedCustomerBrandList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "40%",
height: "100%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
......@@ -592,15 +635,15 @@ function deleteCustomerBrandHandler() {
var _grid = UICtrl.getGridManager('#customerBrandListGrid');
DataUtil.delSelectedRows(
{
action: 'customerPayInfo/deleteCustomerPayInfo.ajax',
action: 'customerBrand/deleteCustomerBrand.ajax',
param: {},
gridManager: _grid,
idFieldName: 'customerPayInfoId',
idFieldName: 'customerBrandId',
onSuccess: function (data) {
if (data == "1") {
Public.successTip("删除成功!");
}
customerPayInfoGridManager.loadData();
customerBrandGridManager.loadData();
}
}
)
......@@ -611,20 +654,20 @@ function loadCustomerBankListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions(
{
addHandler: function () {
UICtrl.addGridRow(customerPayInfoGridManager);
UICtrl.addGridRow(customerBankGridManager);
},
deleteHandler: function () {
deleteCustomerPayInfoHandler();
// deleteCustomerBankHandler();
}
}
);
customerPayInfoGridManager = UICtrl.grid("#customerPayInfoListGrid", {
customerBankGridManager = UICtrl.grid("#customerBankListGrid", {
columns: [
{
display: "支付方户名",
name: "customerPayAccountName",
display: "开户银行代码",
name: "depositBankCode",
width: 200,
minWidth: 60,
type: "string",
......@@ -634,43 +677,240 @@ function loadCustomerBankListGrid() {
}
},
{
display: "录入人", name: "createdByName", width: 200, minWidth: 60, type: "string", align: "left",
display: "银行账号", name: "bankAccount", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "录入时间", name: "createdDate", width: 200, minWidth: 60, type: "date", align: "left",
display: "账户持有人姓名", name: "accountHolderName", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
}
],
dataAction: "server",
url: web_app.name + '/customerBankList/slicedCustomerBankList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true
});
}
function loadCompanyCodeListGrid(currentTabId) {
var toolbarOptions = UICtrl.getDefaultToolbarOptions(
{
addHandler: function () {
UICtrl.addGridRow(companyCodeGridManager);
},
deleteHandler: function () {
// deleteCompanyCodeHandler();
}
}
);
companyCodeGridManager = UICtrl.grid("#companyCodeListGrid", {
columns: [
{
display: "公司代码",
name: "companyCode",
width: 200,
minWidth: 60,
type: "string",
align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "修改人", name: "lastModifiedByName", width: 200, minWidth: 60, type: "string", align: "left",
display: "统驭科目", name: "reconciliationAccount", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "修改时间", name: "lastModifiedDate", width: 200, minWidth: 60, type: "date", align: "left",
display: "付款条件", name: "companyPaymentTerms", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "催款过程", name: "collectionProcess", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
}
],
dataAction: "server",
url: web_app.name + '/customerPayInfo/slicedCustomerPayInfoList.ajax',
url: web_app.name + '/customerCompanyCode/slicedCustomerCompanyCodeList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "40%",
height: "100%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true
});
}
function loadCompanyCodeListGrid(currentTabId) {
}
function loadSalesOrganizationGrid(currentTabId) {
var toolbarOptions = UICtrl.getDefaultToolbarOptions(
{
addHandler: function () {
UICtrl.addGridRow(salesOrganizationGridManager);
},
deleteHandler: function () {
// deleteCompanyCodeHandler();
}
}
);
salesOrganizationGridManager = UICtrl.grid("#salesOrganizationListGrid", {
columns: [
{
display: "销售组织",
name: "organization",
width: 10,
minWidth: 60,
type: "string",
align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "分销渠道", name: "distributionChannel", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "产品组", name: "productGroup", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "销售办公室", name: "salesOffice", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "销售小组", name: "salesGroup", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "客户等级(客户分类)", name: "customerGrade", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "币别", name: "currency", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "汇率类型", name: "exchangeRate", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "国际贸易条款", name: "incoterm", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "国际贸易条款位置", name: "incotermPosition", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
},
{
display: "付款条件", name: "salesPaymentTerms", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "客户科目分配组", name: "customerAccountAllocationGroup", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "税收类别", name: "taxCategory", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "客户税分类", name: "customerTaxClassification", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: "text",
}
},
{
display: "装运条件", name: "shippingConditions", width: 100, minWidth: 60, type: "string", align: "left",
editor: {
required: false,
type: "text"
}
}
],
dataAction: "server",
url: web_app.name + '/customerSalesOrganization/slicedCustomerSalesOrganizationList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true
});
}
......
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerBankList;
import java.util.List;
public interface CustomerBankListApplication {
List<CustomerBankList> getCustomerBankList(String customerId);
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import java.util.List;
public interface CustomerBrandApplication {
List<CustomerBrand> getCustomerBrandList(String customerId);
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerCompanyCode;
import java.util.List;
public interface CustomerCompanyCodeApplication {
List<CustomerCompanyCode> getCustomerCompanyCodeList(String customerId);
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerBankList;
import com.huigou.topsun.customer.domain.CustomerSalesOrganization;
import java.util.List;
public interface CustomerSalesOrganizationApplication {
List<CustomerSalesOrganization> getCustomerSalesOrganizationList(String customerId);
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerBankListApplication;
import com.huigou.topsun.customer.domain.CustomerBankList;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CustomerBankListApplicationImpl extends BaseApplication implements CustomerBankListApplication {
String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Override
public List<CustomerBankList> getCustomerBankList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerBankList");
List<CustomerBankList> customerBankList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerBankList.class, customerId);
return customerBankList;
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerBrandApplication;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CustomerBrandApplicationImpl extends BaseApplication implements CustomerBrandApplication {
String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Override
public List<CustomerBrand> getCustomerBrandList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerBrandList");
List<CustomerBrand> customerBrandList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerBrand.class, customerId);
return customerBrandList;
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerCompanyCodeApplication;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.topsun.customer.domain.CustomerCompanyCode;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CustomerCompanyApplicationImpl extends BaseApplication implements CustomerCompanyCodeApplication {
String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Override
public List<CustomerCompanyCode> getCustomerCompanyCodeList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerCompanyCodeList");
List<CustomerCompanyCode> customerCompanyCodeList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerCompanyCode.class, customerId);
return customerCompanyCodeList;
}
}
package com.huigou.topsun.customer.application.Impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.customer.application.CustomerSalesOrganizationApplication;
import com.huigou.topsun.customer.domain.CustomerSalesOrganization;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CustomerSalesOrganizationApplicationImpl extends BaseApplication implements CustomerSalesOrganizationApplication {
String QUERY_XML_FILE_PATH = "config/topsun/customer/customerMapper.xml";
@Override
public List<CustomerSalesOrganization> getCustomerSalesOrganizationList(String customerId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "customerSalesOrganizationList");
List<CustomerSalesOrganization> customerSalesOrganizationList = this.sqlExecutorDao.queryToList(queryDescriptor.getSql(), CustomerSalesOrganization.class, customerId);
return customerSalesOrganizationList;
}
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerApplication;
import com.huigou.topsun.customer.application.CustomerBankListApplication;
import com.huigou.topsun.customer.domain.CustomerBankList;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
@Controller
@ControllerMapping("/customerBankList")
public class CustomerBankListController extends CommonController {
@Autowired
private CustomerBankListApplication customerBankListApplication;
public String slicedCustomerBankList() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
List<CustomerBankList> customerBrandList = customerBankListApplication.getCustomerBankList(customerId);
return packGridDataAndResult(customerBrandList);
}
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerBrandApplication;
import com.huigou.topsun.customer.domain.CustomerBrand;
import com.huigou.topsun.customer.domain.CustomerPayInfo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
@Controller
@ControllerMapping("/customerBrand")
public class CustomerBrandController extends CommonController {
@Autowired
private CustomerBrandApplication customerBrandApplication;
public String slicedCustomerBrandList() {
SDO sdo = this.getSDO();
String customerId = sdo.getString("customerId");
List<CustomerBrand> customerBrandList = customerBrandApplication.getCustomerBrandList(customerId);
return packGridDataAndResult(customerBrandList);
}
// public String deleteCustomerBrand() {
// SDO sdo = this.getSDO();
// List<String> ids = sdo.getIds();
// int result = customerBrandApplication.deleteCustomerBrandList(ids);
// if (result==1) {
// return success();
// }
// else {
// return error("品牌信息删除失败");
// }
// }
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerCompanyCodeApplication;
import com.huigou.topsun.customer.domain.CustomerBankList;
import com.huigou.topsun.customer.domain.CustomerCompanyCode;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
@Controller
@ControllerMapping("/customerCompanyCode")
public class CustomerCompanyCodeController extends CommonController {
@Autowired
private CustomerCompanyCodeApplication customerCompanyCodeApplication;
public String slicedCustomerCompanyCodeList() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
List<CustomerCompanyCode> customerCompanyCodeList = customerCompanyCodeApplication.getCustomerCompanyCodeList(customerId);
return packGridDataAndResult(customerCompanyCodeList);
}
}
package com.huigou.topsun.customer.controller;
import com.huigou.topsun.customer.application.CustomerSalesOrganizationApplication;
import com.huigou.topsun.customer.domain.CustomerBankList;
import com.huigou.topsun.customer.domain.CustomerSalesOrganization;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.util.List;
@Controller
@ControllerMapping("/customerSalesOrganization")
public class CustomerSalesOrganizationController extends CommonController {
@Autowired
private CustomerSalesOrganizationApplication customerSalesOrganizationApplication;
public String slicedCustomerSalesOrganizationList() {
SDO sdo = getSDO();
String customerId = sdo.getString("customerId");
List<CustomerSalesOrganization> customerSalesOrganizationList = customerSalesOrganizationApplication.getCustomerSalesOrganizationList(customerId);
return packGridDataAndResult(customerSalesOrganizationList);
}
}
......@@ -34,6 +34,11 @@ public class CustomerBrand implements Serializable {
*/
private String brand;
/**
* 职位
*/
private String position;
/**
* 联系人
*/
......
......@@ -93,4 +93,27 @@
select t.* from monthly_settlement_method t where 1=1 order by t.sequence
</sql-query>
</query>
<query name="customerBrandList" label="查询用户品牌" table="customer_brand">
<sql-query>
select cd.* from customer_brand cd where customer_id = ?
</sql-query>
</query>
<query name="customerBankList" label="查询客户银行列表" table="customer_bank_list">
<sql-query>
select cbl.* from customer_bank_list cbl where customer_id = ?
</sql-query>
</query>
<query name="customerCompanyCodeList" label="公司代码列表" table="customer_company_code">
<sql-query>
select c.* from customer_company_code c where customer_id = ?
</sql-query>
</query>
<query name="customerSalesOrganizationList" label="销售组织列表" table="customer_sales_organization">
<sql-query>
select c.* from customer_sales_organization c where customer_id = ?
</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