万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

461 lines
16 KiB

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('客户资料列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>企业代码:</label>
<input type="text" name="pCode"/>
</li>
<li>
<label>企业名称:</label>
<input type="text" name="pName"/>
</li>
<li>
<label>内外销:</label><select name="NWX" th:with="type=${@dict.getType('sys_NWX_class')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="finance:customer:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="finance:customer:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="finance:customer:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="finance:customer:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-success single disabled" onclick="comfirm()"
shiro:hasPermission="finance:customer:export">
<i class="glyphicon glyphicon-ok"></i> 确认
</a>
</div>
<div class="col-sm-12 select-table table-striped table-single">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('finance:customer:edit')}]];
var removeFlag = [[${@permission.hasPermi('finance:customer:remove')}]];
var prefix = ctx + "finance/customer";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
onClickRow: onClickRow,//行点击事件
modalName: "客户资料",
columns: [{
checkbox: true
},
{
field: 'pCode',
title: '企业代码'
},
{
field: 'pName',
title: '企业名称'
},
{
field: 'pEnName',
title: '企业英文名称',
formatter: function (value, row, index) {
return $.table.tooltip(value);
},
visible: false
},
{
field: 'pAddress',
title: '地址',
visible: false
},
{
field: 'pPost',
title: '邮编',
visible: false
},
{
field: 'pCountry',
title: '国家地区',
visible: false
},
{
field: 'pCeo',
title: '法人代表',
visible: false
},
{
field: 'pLinkman',
title: '联系人'
},
{
field: 'pTel',
title: '联系电话',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'pFax',
title: '传真',
visible: false
},
{
field: 'pEmail',
title: 'EMAIL',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'pHttp',
title: '客户简称',
visible: false
},
{
field: 'pCiqCode',
title: '',
visible: false
},
{
field: 'pComCode',
title: '付款条件',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'pHyCode',
title: '发票代码',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'pCreatDate',
title: '成立时间',
visible: false
},
{
field: 'pJhbank',
title: '结汇银行',
visible: false
},
{
field: 'pJhbankCode',
title: '结汇账号',
visible: false
},
{
field: 'pBank',
title: '开户银行',
visible: false
},
{
field: 'pBankCode',
title: '开户银行账号',
visible: false
},
{
field: 'pRmbMoney',
title: '人民币注册资金',
visible: false
},
{
field: 'pWbType',
title: '送货地址',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'pWbMoney',
title: '外币注册资金',
visible: false
},
{
field: 'memoText',
title: '备注内容',
visible: false
},
{
field: 'moral',
title: '诚信评级',
visible: false
},
{
field: 'comfirmDate',
title: '确认时间',
visible: false
},
{
field: 'writeMan',
title: '制单人名',
visible: false
},
{
field: 'writeDate',
title: '',
visible: false
},
{
field: 'creditAmt',
title: '信用额度',
visible: false
},
{
field: 'NWX',
title: '内外销',
visible: false
},
{
field: 'ordernoLen',
title: '订单号长度'
},
{
field: 'sendcpReportname',
title: '出货单格式名称',
visible: false
},
{
field: 'saler',
title: '业务员'
},
{
field: 'dWaterNo',
title: '目的地港代号',
visible: false
},
{
field: 'sWaterName',
title: '起运港名',
visible: false
},
{
field: 'crlName',
title: '币别',
visible: false
},
{
field: 'pCountryCode',
title: '国家地区编号'
},
{
field: 'senduseConfirm',
title: '出货需录入使用量',
visible: false
},
{
field: 'taxPercent',
title: '税率',
visible: false
},
{
field: 'senddw',
title: '',
visible: false
},
{
field: 'taxFlag',
title: '含税否',
visible: false
},
{
field: 'comfirmFlag',
title: '确认否',
formatter: function (value, row, index) {
if (value == 1){
value = "是"
return value
} else {
value = "否"
return value
}
}
},
{
field: 'comfirmMan',
title: '确认人',
},
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pCode + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pCode + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
// 获取记录总数
// $("#bootstrap-table").on("load-success.bs.table", function () {
// var total_row_num1 = $('#bootstrap-table').bootstrapTable('getOptions').totalRows;
// console.log(total_row_num1)
// });
Date.prototype.Format = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"H+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
function comfirm() {
table.set();
$.modal.confirm("你确定数据正确,决定要确认吗?确认的记录不能删或修改 ", function () {
var P_Code = $.table.selectFirstColumns();
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var date = new Date().Format("yyyy-MM-dd HH:mm:ss");
var editList = {"Id": P_Code.join(), "Name": userName, "Date": date}
var key = "comfirm";
var value = "comfirm";
var url = prefix + "/edit/comfirm";
editList[key] = value
$.operate.submit(url, "post", "json", editList);
});
}
function onClickRow(row) {
// console.log("row"+JSON.stringify(row))
// $("#pCode").val(row.pCode);
// $("#pName").val(row.pName);
// $("#pEnName").val(row.pEnName);
// $("#pAddress").val(row.pAddress);
// $("#pWbType").val(row.pWbType);
// $("#pPost").val(row.pPost);
// $("#pCeo").val(row.pCeo);
//
// $("#memoText").val(row.memoText);
// $("#writeMan").val(row.writeMan);
// $("#comfirmMan").val(row.comfirmMan);
//
// $("#pLinkman").val(row.pLinkman);
// $("#pTel").val(row.pTel);
// $("#pFax").val(row.pFax);
// $("#pEmail").val(row.pEmail);
// $("#pHttp").val(row.pHttp);
// $("#pCiqCode").val(row.pCiqCode);
// $("#pComCode").val(row.pComCode);
// $("#pHyCode").val(row.pHyCode);
//
// $("#pType").val(row.pType);
// // $("#pCreatDate").val(row.pCreatDate);
// $("#pJhbank").val(row.pJhbank);
// $("#pJhbankCode").val(row.pJhbankCode);
// $("#pBank").val(row.pBank);
// $("#pBankCode").val(row.pBankCode);
// $("#pRmbMoney").val(row.pRmbMoney);
// $("#pWbMoney").val(row.pWbMoney);
// $("#ordernoLen").val(row.ordernoLen);
// // $("#saler").val(row.saler);
// $("#sendcpReportname").val(row.sendcpReportname);
//
// $("#dWaterNo").val(row.dWaterNo);
// $("#sWaterName").val(row.sWaterName);
// $("#sWaterNo").val(row.sWaterNo);
// $("#comCode").val(row.comCode);
// $("#crlName").val(row.crlName);
// $("#creditAmt").val(row.creditAmt);
// $("#ordernoLen").val(row.ordernoLen);
// $("#moral").val(row.moral);
// $("#senduseConfirm").val(row.senduseConfirm);
// $("#pCountry").val(row.pCountry);
// $("#pCountryCode").val(row.pCountryCode);
}
</script>
</body>
<style>
.label-100px li label:not(.radio-box) {
width: 110px;
}
.parallel {
width: 50%;
height: 30px;
float: left
}
#ordernoLen {
width: 50px;
}
#saler {
width: 86px;
}
#parallel-r {
width: 108px;
}
#parallel-r {
text-align: left;
width: 55px;
}
#memoText {
width: 570px;
height: 66px;
display: inline;
}
.nema {
width: 200px;
float: left;
}
#writeMan {
width: 120px;
}
#comfirmMan {
width: 120px;
}
</style>
</html>