|
|
@ -12,7 +12,7 @@ |
|
|
|
<div class="select-list"> |
|
|
|
<ul> |
|
|
|
<li> |
|
|
|
<label>供应商编号:</label> |
|
|
|
<label>供应商ID:</label> |
|
|
|
<input type="text" name="supplierCode"/> |
|
|
|
</li> |
|
|
|
<li> |
|
|
@ -20,23 +20,29 @@ |
|
|
|
<input type="text" name="supplierName"/> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>内外销:</label> |
|
|
|
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}"> |
|
|
|
<label>审核状态:</label> |
|
|
|
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}"> |
|
|
|
<option value="">所有</option> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
|
</select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>供应商类型:</label> |
|
|
|
<select name="supplierType" th:with="type=${@dict.getType('supplier_status')}"> |
|
|
|
<option value="">所有</option> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
|
</select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>企业名称:</label> |
|
|
|
<input type="text" name="enterpriseName"/> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>主联系人:</label> |
|
|
|
<input type="text" name="customerContact"/> |
|
|
|
<label>使用状态:</label> |
|
|
|
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}"> |
|
|
|
<option value="">所有</option> |
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
|
|
</select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<label>跟单员:</label> |
|
|
|
<input type="text" name="merchandiser"/> |
|
|
|
<label>采购员:</label> |
|
|
|
<select name="purchaseBuyer" ></select> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|
|
@ -51,18 +57,6 @@ |
|
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:supplier:add"> |
|
|
|
<i class="fa fa-plus"></i> 添加 |
|
|
|
</a> |
|
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:supplier:edit"> |
|
|
|
<i class="fa fa-edit"></i> 修改 |
|
|
|
</a> |
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:supplier:remove"> |
|
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
|
</a> |
|
|
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:supplier:export">--> |
|
|
|
<!-- <i class="fa fa-download"></i> 导出--> |
|
|
|
<!-- </a>--> |
|
|
|
<!-- <a class="btn btn-warning single disabled" onclick="exportSupplierInfo()" shiro:hasPermission="system:supplier:export">--> |
|
|
|
<!-- <i class="fa fa-download"></i> 导出--> |
|
|
|
<!-- </a>--> |
|
|
|
</div> |
|
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
|
<table id="bootstrap-table" style="white-space:nowrap"></table> |
|
|
@ -75,9 +69,13 @@ |
|
|
|
var removeFlag = [[${@permission.hasPermi('system:supplier:remove')}]]; |
|
|
|
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
|
|
|
var enterpriseNatureDatas = [[${@dict.getType('sys_enterprise_nature')}]]; |
|
|
|
var supplierqualificationDatas = [[${@dict.getType('sys_supplier_qualification')}]]; |
|
|
|
var supplierTypeDatas = [[${@dict.getType('sys_supplier_type')}]]; |
|
|
|
var customerCountryDatas = [[${@dict.getType('sys_country')}]]; |
|
|
|
var paymentTermsDatas = [[${@dict.getType('sys_paymentTerms')}]]; |
|
|
|
var confirmTaxDatas = [[${@dict.getType('sys_confirm_tax')}]]; |
|
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
|
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|
|
|
var prefix = ctx + "system/supplier"; |
|
|
|
|
|
|
|
$(function() { |
|
|
@ -90,195 +88,129 @@ |
|
|
|
pageList: [10, 25, "all"], |
|
|
|
clickToSelect: true, |
|
|
|
modalName: "供应商资料", |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'supplierId', |
|
|
|
title: '供应商id', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'supplierCode', |
|
|
|
title: '供应商编号' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'supplierName', |
|
|
|
title: '供应商名称' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'exportSales', |
|
|
|
title: '内外销', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(exportSalesDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseName', |
|
|
|
title: '企业名称' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseNature', |
|
|
|
title: '企业性质', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(enterpriseNatureDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'customerAddress', |
|
|
|
title: '企业地址' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'manufacturerCategory', |
|
|
|
title: '厂商类别' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'postalCode', |
|
|
|
title: '邮编' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'businessScope', |
|
|
|
title: '经营范围' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'customerCountry', |
|
|
|
title: '国家', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(customerCountryDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'establishedTime', |
|
|
|
title: '成立日期' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'legalRepresentative', |
|
|
|
title: '法人代表' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'customerContact', |
|
|
|
title: '主联系人' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'contactNumber', |
|
|
|
title: '联系电话' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'customerFax', |
|
|
|
title: '传真' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'customerEmail', |
|
|
|
title: 'Email' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'website', |
|
|
|
title: '网站' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'paymentTerms', |
|
|
|
title: '付款条件', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(paymentTermsDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'supplierDays', |
|
|
|
title: '天数' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'actualPaymentDays', |
|
|
|
title: '实际付款天数' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'settlementBank', |
|
|
|
title: '结汇银行', |
|
|
|
visible: false |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'exchangeSettlementAccount', |
|
|
|
title: '结汇账号', |
|
|
|
visible: false |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'depositBank', |
|
|
|
title: '开户银行' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'bankAccount', |
|
|
|
title: '开户银行账号' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'rmbRegisteredCapital', |
|
|
|
title: 'RMB注册资金' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'industryCode', |
|
|
|
title: '行业代码' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'merchandiser', |
|
|
|
title: '跟单员' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'merchandiserTelephone', |
|
|
|
title: '跟单电话' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'financialContact', |
|
|
|
title: '财务联系人' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'confirmTax', |
|
|
|
title: '是否含税', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(confirmTaxDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'taxRate', |
|
|
|
title: '税率' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'firstAddTime', |
|
|
|
title: '录入时间', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) { |
|
|
|
return " "; |
|
|
|
} else { |
|
|
|
return value; |
|
|
|
fixedColumns:true, |
|
|
|
fixedRightNumber:1, |
|
|
|
columns: [{checkbox: true}, |
|
|
|
{title: '供应商id',field: 'supplierId',visible: false}, |
|
|
|
{title: '审核状态',field: 'auditStatus',formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(auditStatusDatas, value); |
|
|
|
}}, |
|
|
|
{title: '使用状态',field: 'useStatus',formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(useStatusDatas, value); |
|
|
|
}}, |
|
|
|
{ title: '供应商编号',field: 'supplierCode'}, |
|
|
|
{title: '供应商名称',field: 'supplierName'}, |
|
|
|
{title: '供应商类型',field: 'supplierType',formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(supplierTypeDatas, value); |
|
|
|
}}, |
|
|
|
{title: '供应商资质',field: 'supplierQualification',formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(supplierqualificationDatas, value); |
|
|
|
} }, |
|
|
|
{title: '企业性质',field: 'enterpriseNature',visible: false}, |
|
|
|
{title: '企业名称',field: 'enterpriseName',}, |
|
|
|
{title: '邮编',field: 'postalCode'}, |
|
|
|
{ title: '经营范围',field: 'businessScope'}, |
|
|
|
{ |
|
|
|
field: 'customerCountry', |
|
|
|
title: '国家', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(customerCountryDatas, value); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'updateInfoTime', |
|
|
|
title: '上次修改时间', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) { |
|
|
|
return " "; |
|
|
|
} else { |
|
|
|
var vArr = value.split(',') |
|
|
|
return vArr[0]; |
|
|
|
}, |
|
|
|
{title: '成立日期',field: 'establishedTime'}, |
|
|
|
{ title: '法人代表',field: 'legalRepresentative'}, |
|
|
|
{title: '主联系人',field: 'customerContact'}, |
|
|
|
{title: '联系电话',field: 'contactNumber'}, |
|
|
|
{title: '传真',field: 'customerFax'}, |
|
|
|
{ title: 'Email',field: 'customerEmail'}, |
|
|
|
{ title: '网站',field: 'website'}, |
|
|
|
{title: '付款条件',field: 'paymentTerms'}, |
|
|
|
{title: '采购员',field: 'purchaseBuyer',visible: false}, |
|
|
|
{title: '天数',field: 'supplierDays'}, |
|
|
|
{ title: '实际付款天数',field: 'actualPaymentDays',visible: false}, |
|
|
|
{title: '结汇银行',field: 'settlementBank',visible: false}, |
|
|
|
{ title: '结汇账号',field: 'exchangeSettlementAccount',visible: false}, |
|
|
|
{title: '开户银行',field: 'depositBank'}, |
|
|
|
{title: '开户银行账号',field: 'bankAccount' }, |
|
|
|
{title: 'RMB注册资金',field: 'rmbRegisteredCapital'}, |
|
|
|
{title: '行业代码',field: 'industryCode'}, |
|
|
|
{title: '跟单员', field: 'merchandiser',visible: false}, |
|
|
|
{ title: '跟单电话',field: 'merchandiserTelephone',visible: false}, |
|
|
|
{title: '采购员',field: 'purchaseBuyer',}, |
|
|
|
{ |
|
|
|
field: 'confirmTax', |
|
|
|
title: '是否含税', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(confirmTaxDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '税率', field: 'taxRate'}, |
|
|
|
{ |
|
|
|
field: 'firstAddTime', |
|
|
|
title: '录入时间', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) { |
|
|
|
return " "; |
|
|
|
} else { |
|
|
|
return value; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'updateInfoTime', |
|
|
|
title: '上次修改时间', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) { |
|
|
|
return " "; |
|
|
|
} else { |
|
|
|
var vArr = value.split(',') |
|
|
|
return vArr[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
var actions = []; |
|
|
|
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) { |
|
|
|
// 作废 |
|
|
|
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.supplierId + '\')"><i class="fa fa-remove"></i> 作废</a>'); |
|
|
|
// 编辑 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplierId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
// 已作废 |
|
|
|
}else{ |
|
|
|
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> '); |
|
|
|
} |
|
|
|
// 有流程实例id |
|
|
|
if(row.useStatus=="2" && !row.restoreInstanceId){ |
|
|
|
// 恢复 |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.supplierId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); |
|
|
|
} |
|
|
|
// 有流程实例id |
|
|
|
if (row.instanceId) { |
|
|
|
// 有待办人展示审批按钮, |
|
|
|
if (row.todoUserId) { |
|
|
|
var todoUserIdList = row.todoUserId.split(","); |
|
|
|
if(todoUserIdList.includes(loginName)){ |
|
|
|
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; |
|
|
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); |
|
|
|
} |
|
|
|
} |
|
|
|
// 审批历史 |
|
|
|
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> '); |
|
|
|
// 进度查看 |
|
|
|
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> '); |
|
|
|
} |
|
|
|
// 详情 |
|
|
|
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.salesOrderId + '\')"><i class="fa fa-eye"></i> 详情</a> '); |
|
|
|
return actions.join(''); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// { |
|
|
|
// 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.supplierId + '\')"><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.supplierId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|
|
|
// return actions.join(''); |
|
|
|
// } |
|
|
|
// } |
|
|
|
] |
|
|
|
}; |
|
|
|
$.table.init(options); |
|
|
|
}); |
|
|
|
|
|
|
|
//导出 |
|
|
|
function exportSupplierInfo() { |
|
|
|
// rows为选中行的id |
|
|
|