万材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.
 
 
 
 

365 lines
14 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="SaleOrderID"/>
</li>
<li>
<label>客户名称:</label>
<input type="text" name="pName"/>
</li>
<li>
<label>成品代码:</label>
<input type="text" name="Itemname"/>
</li>
<li>
<label>成品名称:</label>
<input type="text" name="Itemname"/>
</li>
<li>
<label>客户料号:</label>
<input type="text" name="machineNo"/>
</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:productprice:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="finance:productprice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="finance:productprice:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="finance:productprice:export">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-primary single disabled" onclick="comfirm(1)" shiro:hasPermission="finance:productprice:edit">
<i class="glyphicon glyphicon-ok"></i> 确认
</a>
<a class="btn btn-primary single disabled" onclick="comfirm(2)" shiro:hasPermission="finance:productprice:edit">
<i class="glyphicon glyphicon-file"></i> 审核
</a>
<a class="btn btn-primary single disabled" onclick="comfirm(3)" shiro:hasPermission="finance:productprice:edit">
<i class="glyphicon glyphicon-check"></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:productprice:edit')}]];
var removeFlag = [[${@permission.hasPermi('finance:productprice:remove')}]];
var prefix = ctx + "finance/productprice";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
// onClickRow: onClickRow,//行点击事件
modalName: "产品报价",
height: 600,
columns: [{
checkbox: true
},
{
field: 'saleOrderID',
title: '报价编号',
},
{
field: 'wlCode',
title: '成品代码',
},
{
field: 'itemname',
title: '成品名称',
formatter: function(value, row, index) {
return $.table.tooltip(value, 10, "open");
}
},
{
field: 'itemstandard',
title: '规格型号',
formatter: function(value, row, index) {
return $.table.tooltip(value, 10, "open");
}
},
{
field: 'machineNo',
title: '机种',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'stockDw',
title: '单位',
// align: 'left',
},
{
field: 'crlName',
title: '币别',
},
{
field: 'rmbPrice',
title: '单价',
},
{
field: 'pCode',
title: '客户编号',
},
{
field: 'pName',
title: '客户名称',
formatter: function(value, row, index) {
return $.table.tooltip(value, 10, "open");
},
},
{
field: 'SendDate',
title: '定价日期',
// formatter: function (value, row, index) {
// return $.table.tooltip(value);
// },
// cellStyle: function (value, row, index) {
// return {
// css: {
// "min-width": "50px",
// "text-overflow": "ellipsis",
// "overflow": "hidden",
// "max-width": "50px",
// "white-space": "nowrap"
// }
// }
// }
},
{
field: 'memoText',
title: '说明',
// cellStyle: function (value, row, index) {
// return {
// css: {
// "min-width": "150px",
// "text-overflow": "ellipsis",
// "overflow": "hidden",
// "max-width": "170px",
// "white-space": "nowrap"
// }
// }
// }
},
// {
// field: 'IsNowPrice',
// title: '',
// visible: false
// },
{
field: 'comfirmFlag',
title: '是否确认',
formatter: function (value, row, index) {
if (value == 1){
value = "是"
return value
} else {
value = "否"
return value
}
}
},
{
field: 'comfirmMan',
title: '确认人'
},
{
field: 'comfirmDate',
title: '确认时间',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'writeMan',
title: '登记人'
},
{
field: 'auditingFlag',
title: '是否审核',
formatter: function (value, row, index) {
if (value == 1){
value = "是"
return value
} else {
value = "否"
return value
}
}
},
{
field: 'auditingMan',
title: '审核人'
},
{
field: 'auditingDatetime',
title: '审核时间',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'approveFlag',
title: '是否核准',
formatter: function (value, row, index) {
if (value == 1){
value = "是"
return value
} else {
value = "否"
return value
}
}
},
{
field: 'approveMan',
title: '核准人'
},
{
field: 'approveDate',
title: '核准时间',
formatter: function (value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'taxFlag',
title: '是否含税'
},
{
field: 'taxPercent',
title: '税率'
},
{
field: 'noTaxPrice',
title: '不含税价'
},
{
field: 'taxPrice',
title: '含税价'
},
// {
// field: 'rmbPrice',
// title: '不含税价',
// visible: false
// },
// {
// field: 'taxFlag',
// title: '',
// visible: false
// },
// {
// field: 'lastPrice',
// title: '',
// visible: false
// },
// {
// field: 'lastCrlName',
// title: '',
// visible: false
// },
{
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.saleOrderID + '\')"><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.saleOrderID + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function onClickRow(row, $element, field) {
console.log("row" + JSON.stringify(row))
}
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(tite) {
table.set();
$.modal.confirm("你确定数据正确,决定要确认吗? ", function() {
var SaleOrderID = $.table.selectFirstColumns();
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var date = new Date().Format("yyyy-MM-dd HH:mm:ss");
var date = {"Id":SaleOrderID.join(),"Name":userName,"Date":date}
if (tite == 1) {
var key = "comfirm";
var value = "comfirm";
var url = prefix + "/edit/comfirm";
}
if (tite == 2) {
var key = "auditing";
var value = "auditing";
var url = prefix + "/edit/auditing";
}
if (tite == 3) {
var key = "approve";
var value = "approve";
var url = prefix + "/edit/approve";
}
date[key] = value
console.log(date)
$.operate.submit(url, "post", "json",date);
});
}
</script>
</body>
</html>