Browse Source

[fix]销售模块:添加客户基本资料详情信息表。

dev
zhangsiqi 8 months ago
parent
commit
d041247498
  1. 390
      ruoyi-admin/src/main/resources/templates/erp/bom/detail.html
  2. 617
      ruoyi-admin/src/main/resources/templates/system/customer/detail.html

390
ruoyi-admin/src/main/resources/templates/erp/bom/detail.html

@ -0,0 +1,390 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('物料bom详情信息')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-bom-edit" th:object="${erpBom}">
<input id="id" name="id" th:field="*{id}" type="text" hidden>
<input name="bomNo" th:field="*{bomNo}" type="text" hidden>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="materialNo" name="materialNo" th:field="*{materialNo}" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" name = "materialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}">
<OPTGROUP>
<option value=""></option>
</OPTGROUP>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
</optgroup>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">加工方式:</label>
<div class="col-sm-8">
<select disabled id="selectProcessMethod" name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select disabled id="selectUnit" name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option value=""></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<textarea name="describe" class="form-control" readonly>[[*{describe}]]</textarea>
</div>
</div>
</form>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="insertRow()" disabled>
<i class="fa fa-plus"></i> 新增行
</a>
<a class="btn btn-danger multiple disabled" onclick="removeRow()" disabled>
<i class="fa fa-remove"></i> 删除选择行
</a>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var prefix = ctx + "erp/bom";
var materilaType1 = [[${erpBom.materialType}]];
$("select[name='materialType'] option[value='"+materilaType1+"']").attr("selected",true);
function selMaterialTb(){
var options = {
title: '物料选择',
url: ctx + "/erp/material/select",
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
layer.close(index);
}
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
$("#form-bom-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-bom-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-sub-table-1").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData))
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "erpBomList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
console.log("jsonData");
console.log(jsonData);
$.operate.saveJson(prefix + "/edit", jsonData);
}
}
}
$(function() {
$("#selectMaterialType").val([erpBom.materialType]).trigger("change");
// $("#selectMaterialType").val([erpBom.materialType]).trigger("change");
// $("#selectProcessMethod").val([erpBom.processMethod]).trigger("change");
// $("#selectUnit").val([erpBom.unit]).trigger("change");
$("#selMaterialNo").select2({
theme: "select2",
allowClear: true,
placeholder: "请选择一个料号",
ajax:{
type: "post",
url:ctx+"erp/material/list",
dataType:"json",
delay:250,
data:function(params){
var searchVal = params.term;
var obj = {
params:{
materialNo: searchVal
}
};
return obj;
/*return {
materialNo: params.term,
// page: params.page || 1
};*/
},
cache:true,
processResults: function (res, params) {
var resultList = res.rows;
var options = [];
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["materialNo"];
option.text = resultList[i]["materialNo"];
options.push(option);
}
return {
results: options,
pagination: {
// more:res["data"]["more"]
}
};
},
escapeMarkup: function (markup) { return markup; },
// minimumInputLength: 1
}
});
var materialNo = $("#materialNo").val();
$("#selMaterialNo").val([materialNo]).trigger("change");
$('#selMaterialNo').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='materialName']").val(data.materialName);
$("input[name='brand']").val(data.brand);
$("textarea[name='describe']").val(data.describe);
$("#selectMaterialType").val([data.materialType]).trigger("change");
$("#selectProcessMethod").val([data.processMethod]).trigger("change");
$("#selectUnit").val([data.unit]).trigger("change");
});
var options = {
url: prefix + "/oneLevelList",
id: 'bootstrap-sub-table-1',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
uniqueId: "id",
pagination: false, // 设置不分页
sidePagination: "client",
queryParams: queryParams,
columns: [{
checkbox: true
},
{
field: 'id',
title: 'bom主键id',
visible: false
},
{
field: 'parentId',
title: '父级id',
visible: false
},
{
field: 'index',
align: 'center',
title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{
field: 'materialNo',
align: 'center',
title: '料号'
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
},
{
field: 'materialType',
align: 'center',
title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'describe',
align: 'center',
title: '描述'
},
{
field: 'brand',
align: 'center',
title: '品牌'
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{
field: 'useNum',
align: 'center',
title: '用量',
editable : {
type : 'text',
title : '用量',
validate : function(value) {
if (!value) {
return '用量不能为空';
}
if (isNaN(value)) {
return '用量必须为数字';
}
}
}
},
{
field: 'lossRate',
align: 'center',
title: '损耗率',
editable : {
type : 'text',
title : '损耗率',
validate : function(value) {
if (!value) {
return '损耗率不能为空';
}
if (isNaN(value)) {
return '损耗率必须为数字';
}
}
}
},
{
field: 'processMethod',
align: 'center',
title: '加工方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'remark',
align: 'center',
title: '备注',
editable: true
}
]
};
$.table.init(options);
function optFormatter(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-search btn-xs optRow" href="javascript:void(0)"><i class="fa fa-search"></i>选择</a> ');
return actions.join('');
}
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
// 额外传参
curParams.parentId = $("#id").val();
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log(rowData.materialName);
var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-sub-table-1").bootstrapTable('getData').length;
$("#bootstrap-sub-table-1").bootstrapTable('insertRow', {
index:totalNum,
replace:true,
row: {
id:rowData.subId,
materialNo: rowData.materialNo,
bomNo: rowData.bomNo,
level: "1",
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
unit: rowData.unit,
processMethod: rowData.processMethod,
}
})
layer.close(index);
}
/* 新增表格行 */
function insertRow(){
// var uuidStr = uuid();
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(){
var ids = $.table.selectColumns("id");
if (ids.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$("#bootstrap-sub-table-1").bootstrapTable('remove', {
field: 'id',
values: ids
})
}
</script>
</body>
</html>

617
ruoyi-admin/src/main/resources/templates/system/customer/detail.html

@ -0,0 +1,617 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
<th:block th:include="include :: header('新增客户基本信息')" />
<th:block th:include="include :: datetimepicker-css" />
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customer-detail" th:object="${sysCustomer}">
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户ID:</label>
<div class="col-sm-6">
<input name="customerId" th:field="*{id}" class="form-control" type="number" >
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label is-required">客户代码:</label>
<div class="col-sm-6">
<input readonly name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">客户/企业名称:</label>
<div class="col-sm-6">
<input readonly name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">英文名称:</label>
<div class="col-sm-6">
<input readonly name="englishName" th:field="*{englishName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">事业部:</label>
<div class="col-sm-6">
<input readonly name="customerPurser" th:field="*{customerPurser}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">客户简称:</label>
<div class="col-sm-6">
<input readonly name="customerAbbreviation" th:field="*{customerAbbreviation}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">内外销:</label>
<div class="col-sm-6">
<select readonly name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}" th:field="*{exportSales}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">邮编:</label>
<div class="col-sm-6">
<input readonly name="postalCode" th:field="*{postalCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">公司地址:</label>
<div class="col-sm-6">
<input readonly name="customerAddress" th:field="*{customerAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label" is-required>法人代表:</label>
<div class="col-sm-6">
<input readonly name="legalRepresentative" class="form-control"
type="text" th:field="*{legalRepresentative}">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">成立日期:</label>
<div class="col-sm-6">
<div class="input-group date">
<input name="establishedTime" th:field="*{establishedTime}"
class="form-control" placeholder="yyyy-MM-dd" type="text" readonly >
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label" is-required>开票公司名称:</label>
<div class="col-sm-6">
<input name="invoicingCompanyName" th:field="*{invoicingCompanyName}" class="form-control"
type="text" readonly required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">开票公司税号:</label>
<div class="col-sm-6">
<input name="invoiceCode" th:field="*{invoiceCode}" class="form-control" type="text" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">开户银行:</label>
<div class="col-sm-6">
<input name="depositBank" th:field="*{depositBank}" class="form-control" type="text" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">开户银行账号:</label>
<div class="col-sm-6">
<input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">报价币种:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_common_currency')}">
<input type="radio" th:id="${'commonCurrency_' + dict.dictCode}"
name="commonCurrency" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{commonCurrency}" required disabled>
<label th:for="${'commonCurrency_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">诚信评级:</label>
<div class="col-sm-6">
<select name="integrityRating" class="form-control m-b"
th:with="type=${@dict.getType('sys_integrity_rating')}" th:field="*{integrityRating}" readonly>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" disabled
th:checked="${dict.default}" th:field="*{confirmTax}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}" ></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label" is-required>国内税率:</label>
<div class="col-sm-6">
<input name="taxRate" th:field="*{taxRate}" class="form-control" placeholder="%" type="text" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">RMB注册资金:</label>
<div class="col-sm-6">
<input name="rmbRegisteredCapital" th:field="*{rmbRegisteredCapital}" class="form-control" type="text" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">外币注册资金:</label>
<div class="col-sm-6">
<input name="registeredCapital" th:field="*{registeredCapital}" class="form-control" type="text" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">付款条件:</label>
<div class="col-sm-6">
<input name="paymentTerms" th:field="*{paymentTerms}" class="form-control" type="text" readonly />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">海关代码:</label>
<div class="col-sm-6">
<input name="customsCode" th:field="*{customsCode}" class="form-control" type="text" readonly />
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">客户联系人id:</label>
<div class="col-sm-6">
<input name="customerContactId" class="form-control" th:field="*{customerContactId}" type="number" readonly/>
</div>
</div>
<div class="form-group" >
<label class="col-sm-6 control-label is-required is-required" >客户第一联系人:</label>
<div class="col-sm-6">
<input name="customerContact" class="form-control" type="text" th:field="*{customerContact}" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人职务:</label>
<div class="col-sm-6">
<input name="customerOffice" class="form-control" type="text" th:field="*{customerOffice}" readonly/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">第一联系人电话:</label>
<div class="col-sm-6">
<input name="contactNumber" class="form-control" type="text" th:field="*{contactNumber}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人邮箱:</label>
<div class="col-sm-6">
<input name="customerEmail" class="form-control" type="text" th:field="*{customerEmail}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一联系人传真:</label>
<div class="col-sm-6">
<input name="customerFax" class="form-control" type="text" th:field="*{customerFax}" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-6 control-label">第一收货人:</label>
<div class="col-sm-6">
<input name="deliveryAddressId" class="form-control" type="text" th:field="*{deliveryAddressId}" readonly>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">客户第一收货人:</label>
<div class="col-sm-6">
<input name="deliveryAddress" class="form-control" type="text" th:field="*{deliveryAddress}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">第一收货人电话:</label>
<div class="col-sm-6">
<input name="deliveryCustomerPhone" class="form-control" type="text" th:field="*{deliveryCustomerPhone}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label is-required">第一收货人地址:</label>
<div class="col-sm-6">
<input required name="deliveryAddress" class="form-control" type="text" th:field="*{deliveryAddress}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一收货人邮编:</label>
<div class="col-sm-6">
<input name="deliveryCustomerPostal" class="form-control" type="text" th:field="*{deliveryCustomerPostal}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">第一收货人传真:</label>
<div class="col-sm-6">
<input name="deliveryCustomerFax" class="form-control" type="text" th:field="*{deliveryCustomerFax}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">业务员:</label>
<div class="col-sm-6">
<input name="businessMembers" class="form-control m-b" shiro:partial="customer:selectBusinessMembers" />
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">备注内容:</label>
<div class="col-sm-6">
<textarea name="customerRemarks" class="form-control"></textarea>
</div>
</div>
<div class="container">
<label class="col-sm-6 control-label">联系人</label>
<div class="col-sm-6">
<table id="contacts-table"></table>
</div>
</div>
<div class="container">
<label class="col-sm-6 control-label">送货地址</label>
<div class="col-sm-6">
<table id="address-table"></table>
</div>
</div>
<div class="container">
<label class="col-sm-6 control-label">操作记录</label>
<div class="col-sm-6">
<table id="oper-table"></table>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/customer"
var prefixShippingaddress = ctx + "system/shippingaddress";
var prefixinvoice = ctx + "system/invoice";
var prefixContacts = ctx + "system/contacts";
var customer = [[${sysCustomer}]];
$(function(){
//获取单号
$.ajax({
url: prefix + "/getId",
type: "post",
dateType: "json",
success: function (resp) {
if (resp.code === 0) {
$("input[name='enterpriseCode']").val(resp.data);
} else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
/*业务员列表*/
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-customer-detail select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
let userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-customer-detail select[name='businessMembers']").val(userName).trigger("change")
} else {
$.modal.msgError(res.msg);
}
}
});
var options = {
url: ctx + '/system/customer/operList',
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
enterpriseCode: $("#enterpriseCode").val(),
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'id',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
},
{
field: 'purser',
title: '事业部'
},
{
field: 'operPeople',
title: '操作人'
},
{
field: 'oper',
title: '操作'
},
{
field: 'createTime',
title: '操作时间'
},{
field: 'operStatus',
title: '操作状态',
formatter:function (value,index,row){
if (value == 0){
return '成功';
}else{
return '失败';
}
}
}
]
};
table.init('oper-table', options);
})
$("input[name='establishedTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
defaultDate: customer.establishedTime,
});
$("input[name='establishedTime']").val(customer.establishedTime);
// 联系人列表
$('#contacts-table').bootstrapTable('destroy');
$('#contacts-table').bootstrapTable({
url: '/system/contacts/list',
pagination: true,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
showRefresh: false,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
height: 150,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: $("#enterpriseCode").val()
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
visible: false
},
{
field: 'customerName',
title: '姓名'
},
{
field: 'customerPosition',
title: '职务'
},
{
field: 'customerBirthday',
title: '生日'
},
{
field: 'officeTelephone',
title: '办公电话'
},
{
field: 'homePhone',
title: '家中电话'
},
{
field: 'cellPhone',
title: '手机号'
},
{
field: 'customerFax',
title: '传真'
},
{
field: 'standbyTelephoneOne',
title: '备用电话1'
},
{
field: 'standbyTelephoneTwo',
title: '备用电话2'
},
{
field: 'commonEmail',
title: '常用Email'
},
{
field: 'alternateEmail',
title: '备用Email'
},
{
field: 'customerRemarks',
title: '备注'
},
]
});
// 送货地址列表
$('#address-table').bootstrapTable('destroy');
$('#address-table').bootstrapTable({
url: '/system/shippingaddress/addresslist',
pagination: true,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
showRefresh: false,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
singleSelect: true,
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: $("#enterpriseCode").val()
};
// console.log(data[0].enterpriseCode)
return curParams
},
columns: [
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
visible: false
},
{
field: 'customerPhone',
title: '联系人电话'
},
{
field: 'customerName',
title: '联系人'
},
{
field: 'customerNameTwo',
title: '联系人2'
},
{
field: 'deliveryAddress',
title: '送货地址'
},
{
field: 'detailedDescription',
title: '详细描述'
},
{
field: 'postalCode',
title: '邮编'
},
{
field: 'customerFax',
title: '传真'
},
]
});
// 客户表操作历史
$('#oper-table').bootstrapTable('destroy');
$('#oper-table').bootstrapTable({
url: '/system/customer/operList',
pagination: true,
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
showRefresh: false,
method: "post",
contentType: "application/x-www-form-urlencoded",
striped: true, // 是否显示行间隔色
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*)
queryParams: function (params) {
//console.log("123");
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
enterpriseCode: $("#enterpriseCode").val()
};
return curParams
},
columns: [
{
field: 'id',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseCode',
title: '客户/企业代码',
visible: false
},
{
field: 'enterpriseName',
title: '客户/企业名称',
},
{
field: 'purser',
title: '事业部'
},
{
field: 'operPeople',
title: '操作人'
},
{
field: 'oper',
title: '操作'
},
{
field: 'createTime',
title: '操作时间'
},{
field: 'operStatus',
title: '操作状态',
formatter:function (value,index,row){
if (value == 0){
return '成功';
}else{
return '失败';
}
}
}
]
});
// $("#detailsModal").modal("show");
</script>
</body>
</html>
Loading…
Cancel
Save