zhangsiqi
5 months ago
5 changed files with 1224 additions and 0 deletions
@ -0,0 +1,506 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<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"> |
|||
<th:block th:include="include :: bootstrap-editable-css"/> |
|||
<style> |
|||
.other-container { |
|||
width: 90%; |
|||
height: 200px; |
|||
margin: auto; |
|||
} |
|||
.other { |
|||
margin-top: 20px; |
|||
} |
|||
h4 { |
|||
display: inline-block; |
|||
margin-right: 20px; |
|||
} |
|||
.modal-body{ |
|||
height: 550px; |
|||
} |
|||
iframe{ |
|||
width: 100%; |
|||
height: 500px; |
|||
frameborder: 0; |
|||
border: 0; |
|||
display: inline-block; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-purchaseOrder-detail" th:object="${purchaseOrder}"> |
|||
<input name="purchaseOrderId" th:field="*{purchaseOrderId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">采购单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="purchaseOrderCode" th:field="*{purchaseOrderCode}" 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"> |
|||
<!-- <input name="purchaseCategory" th:field="*{purchaseCategory}" class="form-control" type="text">--> |
|||
<select name="purchaseCategory" th:field="*{purchaseCategory}" class="form-control m-b" th:with="type=${@dict.getType('purchase_category')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="container"> |
|||
<!--物料相关--> |
|||
<div class="row"> |
|||
<div class="col-sm-12" id="tablesContainer"> |
|||
<!-- 表格将在这里动态生成 --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="other-container"> |
|||
<div class="other"> |
|||
<br><hr> |
|||
<h4>选择采购信息</h4> |
|||
<a class="btn btn-primary" onclick="showQuotationModal()"><i class="fa fa-plus"></i> 选择材料</a> |
|||
<a class="btn btn-danger" onclick="removeMaterial()" ><i class="fa fa-remove"></i> 删除材料</a> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="addQuotationTable" style="white-space:nowrap"></table> |
|||
</div> |
|||
</div> |
|||
<div class="modal inmodal" id="supplierQuotationModal" |
|||
role="dilog" aria-hidden="true"> |
|||
|
|||
<!-- 查询供应商报价--> |
|||
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF"> |
|||
|
|||
<div class="modal-content" style="background-color: #FFFFFF"> |
|||
|
|||
<div class="modal-body"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="quotationFormId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>报价编码:</label> |
|||
<input type="text" name="quotationCode"/> |
|||
</li> |
|||
<li> |
|||
<label>原辅料代码:</label> |
|||
<input type="text" name="rawSubsidiaryCode"/> |
|||
|
|||
</li> |
|||
<li> |
|||
<label>原辅料名称:</label> |
|||
<input type="text" name="rawSubsidiaryName"/> |
|||
</li> |
|||
<!-- <li>--> |
|||
<!-- <label>供应商名称:</label>--> |
|||
<!-- <input type="text" name="supplierName"/>--> |
|||
|
|||
<!-- </li>--> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('quotationFormId','quotationTable')"><i |
|||
class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('quotationFormId','quotationTable')"><i |
|||
class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="quotationTable" style="white-space:nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<a class="btn btn-warning btn-rounded" onclick="addQuotationToTable()">确认添加</a> |
|||
<a class="btn btn-primary btn-rounded" onclick="closeQuotationModal()">关闭</a> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
|
|||
var getData = [[${purchaseOrder}]]; |
|||
|
|||
|
|||
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var confirmTaxDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var confirmNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var auditNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var approveNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
|
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var prefixSupplierQuotation = ctx + 'system/supplierquotation' |
|||
var prefixPurchaseMaterial = ctx + 'purchase/purchaseMaterial' |
|||
|
|||
$("#form-purchaseOrder-detail").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
// if ($.validate.form()) { |
|||
// $.operate.save(prefix + "/edit", $('#form-purchaseOrder-detail').serialize()); |
|||
// } |
|||
let getData=$('#addQuotationTable').bootstrapTable('getData', true) |
|||
if(getData.length > 0){ |
|||
if ($.validate.form()) { |
|||
$.modal.confirm("确认以上修改吗?", function (){ |
|||
//确认添加选中的物料数据 |
|||
confirmQuotation(); |
|||
$.operate.save(prefix + "/edit", $('#form-purchaseOrder-detail').serialize()); |
|||
}) |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("未选择产品,请选择!") |
|||
} |
|||
} |
|||
|
|||
$("input[name='billingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
|
|||
$(function() { |
|||
//初始化添加材料表 |
|||
$('#addQuotationTable').bootstrapTable({ |
|||
url: prefixPurchaseMaterial + '/list', |
|||
pagination: true, |
|||
pageNumber: 1, |
|||
pageSize: 10, |
|||
method: "post", |
|||
contentType: "application/x-www-form-urlencoded", |
|||
striped: true, // 是否显示行间隔色 |
|||
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) |
|||
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
|||
cardView: false, // 是否显示详细视图 |
|||
detailView: false, // 是否显示父子表 |
|||
smartDisplay: false, // 加了这个才显示每页显示的行数 |
|||
showExport: false, // 是否显示导出按钮 |
|||
clickToSelect: true, |
|||
paginationDetailHAlign: ' hiddenDetailInfo', |
|||
height: 250, |
|||
uniqueId: 'purchaseOrderChildId', |
|||
queryParams: function (params) { |
|||
//console.log("123"); |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
purchaseOrderCode: getData.purchaseOrderCode, |
|||
supplierCode: getData.supplierCode, |
|||
supplierName: getData.supplierName |
|||
}; |
|||
// console.log(data[0].enterpriseCode) |
|||
return curParams |
|||
}, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '采购订单子表id', |
|||
field: 'purchaseOrderChildId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '关联采购订单号', |
|||
field: 'purchaseOrderCode', |
|||
}, |
|||
{ |
|||
title: '供应商代码', |
|||
field: 'supplierCode', |
|||
}, |
|||
{ |
|||
title: '供应商名称', |
|||
field: 'supplierName', |
|||
}, |
|||
{ |
|||
title: '物料料号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '物料不含税单价', |
|||
field: 'materialNormb', |
|||
}, |
|||
{ |
|||
title: '物料含税单价', |
|||
field: 'materialRmb', |
|||
}, |
|||
{ |
|||
title: '采购物料数量', |
|||
field: 'materialNum', |
|||
}, |
|||
{ |
|||
title: '物料合计', |
|||
field: 'materialAmount', |
|||
}, |
|||
{ |
|||
title: '数量合计', |
|||
field: 'materialSum', |
|||
}, |
|||
{ |
|||
title: '不含税总价(RMB)', |
|||
field: 'materialNormbsum', |
|||
}, |
|||
{ |
|||
title: '含税总价(RMB)', |
|||
field: 'materialRmbsum', |
|||
}, |
|||
{ |
|||
title: '交货时间', |
|||
field: 'deliveryTime', |
|||
}, |
|||
{ |
|||
title: '收货状态', |
|||
field: 'eceiptStatus', |
|||
}, |
|||
{ |
|||
title: '打款结案状态', |
|||
field: 'paymentStatus', |
|||
}, |
|||
{ |
|||
title: '税率', |
|||
field: 'taxRate', |
|||
}, |
|||
] |
|||
}) |
|||
|
|||
}); |
|||
|
|||
/*供应商列表*/ |
|||
$.ajax({ |
|||
url: ctx + 'system/supplier/list', |
|||
type: 'post', |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.rows.length > 0) { |
|||
var suppliertData = res.rows; |
|||
//alert(JSON.stringify(data)); |
|||
for (let i in suppliertData) { |
|||
// console.log(finishProductData[i].finishProductCode) |
|||
$("#form-purchaseOrder-detail select[name='supplierCode']").append("<option value='" + suppliertData[i].supplierCode + "'>" + suppliertData[i].supplierCode + "</option>"); |
|||
} |
|||
$("#form-purchaseOrder-detail select[name='supplierCode']").val(getData.supplierCode).trigger("change") |
|||
$("#form-purchaseOrder-detail select[name='supplierCode']").change(function () { |
|||
var code = $(this).val(); |
|||
for (let i=0;i<suppliertData.length;i++) { |
|||
if (suppliertData[i].supplierCode == code) { |
|||
$("#form-purchaseOrder-detail input[name='supplierName']").val(suppliertData[i].supplierName); |
|||
$("#form-purchaseOrder-detail input[name='customerContact']").val(suppliertData[i].customerContact); |
|||
$("#form-purchaseOrder-detail input[name='contactNumber']").val(suppliertData[i].contactNumber); |
|||
$("#form-purchaseOrder-detail input[name='customerFax']").val(suppliertData[i].customerFax); |
|||
$("#form-purchaseOrder-detail input[name='paymentTerms']").val(suppliertData[i].paymentTerms); |
|||
$("#form-purchaseOrder-detail input[name='taxRate']").val(suppliertData[i].taxRate); |
|||
} |
|||
} |
|||
}) |
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
} |
|||
}) |
|||
/*用户列表*/ |
|||
$.ajax({ |
|||
url: ctx + 'system/user/list', |
|||
type: 'post', |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.rows.length > 0) { |
|||
var usertData = res.rows; |
|||
//alert(JSON.stringify(data)); |
|||
for (let i in usertData) { |
|||
// console.log(finishProductData[i].finishProductCode) |
|||
$("#form-purchaseOrder-detail select[name='purchaseCommander']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); |
|||
} |
|||
$("#form-purchaseOrder-detail select[name='purchaseCommander']").val(getData.purchaseCommander).trigger("change") |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
} |
|||
}) |
|||
|
|||
/*添加报价信息*/ |
|||
//点击按钮显示报价信息模态框 |
|||
function showQuotationModal() { |
|||
if ($.validate.form()) { |
|||
$("#supplierQuotationModal").modal("show"); |
|||
//显示报价信息 |
|||
showQuotationData(); |
|||
} else { |
|||
$.modal.alertWarning("请填写必填项"); |
|||
} |
|||
} |
|||
|
|||
//关闭报价信息模态框 |
|||
function closeQuotationModal() { |
|||
$("#supplierQuotationModal").modal("hide"); |
|||
} |
|||
|
|||
//显示报价信息 |
|||
function showQuotationData() { |
|||
var supplierCode = $("#form-purchaseOrder-detail select[name='supplierCode']").val() |
|||
$("#quotationTable").bootstrapTable("destroy") |
|||
var options = { |
|||
id: 'quotationTable', |
|||
url: prefixSupplierQuotation + "/list", |
|||
modalName: "供应商报价", |
|||
pagination: true, |
|||
pageNumber: 1, |
|||
pageSize: 10, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
clickToSelect: true, |
|||
queryParams: function (params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
supplierCode: supplierCode |
|||
}; |
|||
let json = $.extend(curParams, $.common.formToJSON("quotationFormId")); |
|||
return json; |
|||
}, |
|||
columns: [ |
|||
{title: '采购单子表编号',field: 'purchaseOrderChildId',visible: false}, |
|||
{title: '关联采购订单号',field: 'purchaseOrderCode',visible: false}, |
|||
{title: '供应商ID',field: 'supplierCode',}, |
|||
{title: '供应商名称',field: 'supplierName',}, |
|||
{title: '物料合计',field: 'materialAmount',}, |
|||
{title: '数量合计',field: 'materialSum',}, |
|||
{title: '不含税总价(RMB)',field: 'materialNoRmbSum',}, |
|||
{title: '含税总价(RMB)',field: 'materialRmbSum',}, |
|||
{title:'收货状态',field: 'eceiptStatus',formatter: function (value, row, index) { |
|||
$.table.selectDictLabel(eceiptStatusDatas, value);} |
|||
}, |
|||
{title:'打款状态',field: 'paymentStatus',formatter: function (value, row, index) { |
|||
$.table.selectDictLabel(paymentStatusDatas, value);} |
|||
}, |
|||
{title: '交货时间',field: 'deliveryTime',visible: false}, |
|||
] |
|||
|
|||
}; |
|||
$.table.init(options); |
|||
} |
|||
|
|||
//表中添加选中的物料信息 |
|||
function addQuotationToTable() { |
|||
var data = $("#quotationTable").bootstrapTable("getSelections"); |
|||
var count = $('#addQuotationTable').bootstrapTable('getData').length; |
|||
var purchaseOrderNumber = $("input[name='purchaseOrderNumber']").val(); |
|||
var supplierCode = $("select[name='supplierCode']").val(); |
|||
var supplierName = $("input[name='supplierName']").val(); |
|||
// console.log(data); |
|||
// console.log(count); |
|||
for (var i = 0; i < data.length; i++) { |
|||
let rawSubsidiary = $('#addQuotationTable').bootstrapTable('getRowByUniqueId', data[i].rawSubsidiaryCode); |
|||
if (rawSubsidiary != null) { |
|||
alert(rawSubsidiary.rawSubsidiaryName + "已存在,不可重复添加!"); |
|||
continue; |
|||
} |
|||
$("#addQuotationTable").bootstrapTable('insertRow', { |
|||
index: count + i, |
|||
row: { |
|||
purchaseOrderNumber: purchaseOrderNumber, |
|||
supplierCode: supplierCode, |
|||
supplierName: supplierName, |
|||
materialQuantity: '', |
|||
amountMoney: '', |
|||
deliveryTime: '', |
|||
purchaseExplain: '', |
|||
accountReconciliationFlag: 0 |
|||
} |
|||
}); |
|||
} |
|||
|
|||
$("#quotationTable").bootstrapTable("uncheckAll"); |
|||
closeQuotationModal(); |
|||
} |
|||
|
|||
//确认添加选中的物料数据 |
|||
function confirmQuotation() { |
|||
$("#addQuotationTable").bootstrapTable('refresh'); |
|||
let data = $('#addQuotationTable').bootstrapTable('getData', true); |
|||
// console.log(data) |
|||
if (data.length > 0) { |
|||
for (var i = 0; i < data.length; i++) { |
|||
data[i].purchaseOrderNumber = $("input[name='purchaseOrderNumber']").val(); |
|||
data[i].supplierCode = $("select[name='supplierCode']").val(); |
|||
data[i].supplierName = $("input[name='supplierName']").val(); |
|||
} |
|||
$.ajax({ |
|||
url: prefixPurchaseMaterial + '/addEditSave', |
|||
type: "POST", |
|||
data: { |
|||
data: JSON.stringify(data) |
|||
}, |
|||
dataType: "json", |
|||
success: function (resp) { |
|||
// console.log(data) |
|||
console.log(resp) |
|||
}, |
|||
|
|||
}) |
|||
} |
|||
} |
|||
|
|||
// 批量删除成品 |
|||
function removeMaterial() { |
|||
var addQuotationTableData = $("#addQuotationTable").bootstrapTable("getSelections"); |
|||
var ids = []; |
|||
var rawSubsidiaryCodes=[]; |
|||
for (let i = 0;i < addQuotationTableData.length;i++) { |
|||
ids.push(addQuotationTableData[i].purchaseMaterialId) |
|||
rawSubsidiaryCodes.push(addQuotationTableData[i].rawSubsidiaryCode) |
|||
} |
|||
// console.log(ids) |
|||
if (addQuotationTableData.length > 0) { |
|||
$.modal.confirm("是否确认要删除选中的产品?", function (){ |
|||
$.ajax({ |
|||
url: prefixPurchaseMaterial + "/removeMaterial", |
|||
type: "POST", |
|||
data: { |
|||
ids: JSON.stringify(ids) |
|||
}, |
|||
success: function (res) { |
|||
// console.log(ids) |
|||
// console.log(res) |
|||
$.modal.msgSuccess("删除成功") |
|||
// $("#addProductTable").bootstrapTable('refreshOptions', {pageNumber: 1}); // pageNumber:1, 指定页码为第1页 |
|||
// $("#addProductTable").bootstrapTable('refresh'); |
|||
$("#addQuotationTable").bootstrapTable ('remove', { field: 'rawSubsidiaryCode', values: rawSubsidiaryCodes }) |
|||
} |
|||
}) |
|||
}) |
|||
|
|||
} else { |
|||
alert("请选择需要删除的数据") |
|||
} |
|||
|
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,181 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('采购经理审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-gcjl-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" 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"> |
|||
<div class="input-group date"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="cgjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_cgjlVerifyApproved" id="cgjlVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var erpMaterial = [[${formData}]]; |
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; |
|||
var warehouseCode = [[${purchaseOrder.stockNo}]]; |
|||
var warehouseName = [[${purchaseOrder.stockName}]]; |
|||
var warehouseDetailAddress = [[${purchaseOrder.stockAddress}]]; |
|||
$("#form-gcjl-edit").validate({focusCleanup: true}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-gcjl-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
$("#form-addPurchaseStorage-edit").validate({ focusCleanup: true}); |
|||
//生成的不同table的id集合 |
|||
var tableDatas = []; |
|||
$(function() { |
|||
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|||
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + purchaseOrderCode, function(data) { |
|||
for (var supplierCode in data) { |
|||
if (data.hasOwnProperty(supplierCode)) { |
|||
var supplierData = data[supplierCode]; |
|||
createTableForSupplier(supplierCode, supplierData); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
function createTableForSupplier(supplierCode, supplierData) { |
|||
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); |
|||
tableDatas.push(tableId); |
|||
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); |
|||
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 |
|||
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 |
|||
// 构建含有额外供应商信息的标题字符串 |
|||
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + supplierInfo.supplierName ; |
|||
var $header = $('<h4>' + headerTitle + '</h4>'); |
|||
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); |
|||
$table.bootstrapTable({ |
|||
data: supplierData, |
|||
columns: [ |
|||
{checkbox: false,visible: false}, |
|||
{title: '供应商ID',field: 'supplierCode',visible: false}, |
|||
{title: '料号',field: 'materialCode'}, |
|||
{title: '物料名称',field: 'materialName'}, |
|||
{title: '物料类型',field: 'materialType', |
|||
formatter: function (value,row, index) { |
|||
$.table.selectCategoryLabel(materialTypeDatas, value) |
|||
} |
|||
}, |
|||
{title: '物料图片地址',field: 'materialPhotourl', |
|||
formatter: function (value, row, index) { |
|||
$.table.imageView(value) |
|||
} |
|||
}, |
|||
{title: '物料描述',field: 'materialDescribe',}, |
|||
{title: '物料品牌',field: 'materialBrand',}, |
|||
{title: '物料单位',field: 'materialUnit', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(materialUnitDatas, value); |
|||
} |
|||
}, |
|||
{title: '物料加工方式',field: 'materialProcessMethod', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title: '计划采购数',field: 'materialNum',}, |
|||
{title: '实际采购数',field: 'materialRealNum',}, |
|||
{title: '交付时间',field: 'deliveryTime',}, |
|||
{title: '通知已到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '已入库数',field: 'hasStorageNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '通知到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
return '<input type="number" min="0" oninput="validity.valid || (value = 0)" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"'; |
|||
} |
|||
} |
|||
] |
|||
}); |
|||
$tableWrapper.append($header).append($table); |
|||
$('#tablesContainer').append($tableWrapper); |
|||
} |
|||
$("input[name='arrivedTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='deliveryInspectionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,181 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('工程主管审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" 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"> |
|||
<div class="input-group date"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="cgzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_cgzgVerifyApproved" id="cgzgVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var erpMaterial = [[${formData}]]; |
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; |
|||
var warehouseCode = [[${purchaseOrder.stockNo}]]; |
|||
var warehouseName = [[${purchaseOrder.stockName}]]; |
|||
var warehouseDetailAddress = [[${purchaseOrder.stockAddress}]]; |
|||
$("#form-gcjl-edit").validate({focusCleanup: true}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-gcjl-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
$("#form-addPurchaseStorage-edit").validate({ focusCleanup: true}); |
|||
//生成的不同table的id集合 |
|||
var tableDatas = []; |
|||
$(function() { |
|||
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|||
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + purchaseOrderCode, function(data) { |
|||
for (var supplierCode in data) { |
|||
if (data.hasOwnProperty(supplierCode)) { |
|||
var supplierData = data[supplierCode]; |
|||
createTableForSupplier(supplierCode, supplierData); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
function createTableForSupplier(supplierCode, supplierData) { |
|||
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); |
|||
tableDatas.push(tableId); |
|||
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); |
|||
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 |
|||
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 |
|||
// 构建含有额外供应商信息的标题字符串 |
|||
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + supplierInfo.supplierName ; |
|||
var $header = $('<h4>' + headerTitle + '</h4>'); |
|||
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); |
|||
$table.bootstrapTable({ |
|||
data: supplierData, |
|||
columns: [ |
|||
{checkbox: false,visible: false}, |
|||
{title: '供应商ID',field: 'supplierCode',visible: false}, |
|||
{title: '料号',field: 'materialCode'}, |
|||
{title: '物料名称',field: 'materialName'}, |
|||
{title: '物料类型',field: 'materialType', |
|||
formatter: function (value,row, index) { |
|||
$.table.selectCategoryLabel(materialTypeDatas, value) |
|||
} |
|||
}, |
|||
{title: '物料图片地址',field: 'materialPhotourl', |
|||
formatter: function (value, row, index) { |
|||
$.table.imageView(value) |
|||
} |
|||
}, |
|||
{title: '物料描述',field: 'materialDescribe',}, |
|||
{title: '物料品牌',field: 'materialBrand',}, |
|||
{title: '物料单位',field: 'materialUnit', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(materialUnitDatas, value); |
|||
} |
|||
}, |
|||
{title: '物料加工方式',field: 'materialProcessMethod', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title: '计划采购数',field: 'materialNum',}, |
|||
{title: '实际采购数',field: 'materialRealNum',}, |
|||
{title: '交付时间',field: 'deliveryTime',}, |
|||
{title: '通知已到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '已入库数',field: 'hasStorageNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '通知到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
return '<input type="number" min="0" oninput="validity.valid || (value = 0)" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"'; |
|||
} |
|||
} |
|||
] |
|||
}); |
|||
$tableWrapper.append($header).append($table); |
|||
$('#tablesContainer').append($tableWrapper); |
|||
} |
|||
$("input[name='arrivedTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='deliveryInspectionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,181 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('副总经理审核')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<input type="hidden" name="p_COM_comment" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" 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"> |
|||
<div class="input-group date"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="fzjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control m-b" required> |
|||
<option value=""></option> |
|||
<option value="true">同意</option> |
|||
<option value="false">拒绝</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">批注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="comment" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var erpMaterial = [[${formData}]]; |
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; |
|||
var warehouseCode = [[${purchaseOrder.stockNo}]]; |
|||
var warehouseName = [[${purchaseOrder.stockName}]]; |
|||
var warehouseDetailAddress = [[${purchaseOrder.stockAddress}]]; |
|||
$("#form-gcjl-edit").validate({focusCleanup: true}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-gcjl-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
$("#form-addPurchaseStorage-edit").validate({ focusCleanup: true}); |
|||
//生成的不同table的id集合 |
|||
var tableDatas = []; |
|||
$(function() { |
|||
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|||
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + purchaseOrderCode, function(data) { |
|||
for (var supplierCode in data) { |
|||
if (data.hasOwnProperty(supplierCode)) { |
|||
var supplierData = data[supplierCode]; |
|||
createTableForSupplier(supplierCode, supplierData); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
function createTableForSupplier(supplierCode, supplierData) { |
|||
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); |
|||
tableDatas.push(tableId); |
|||
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); |
|||
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 |
|||
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 |
|||
// 构建含有额外供应商信息的标题字符串 |
|||
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + supplierInfo.supplierName ; |
|||
var $header = $('<h4>' + headerTitle + '</h4>'); |
|||
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); |
|||
$table.bootstrapTable({ |
|||
data: supplierData, |
|||
columns: [ |
|||
{checkbox: false,visible: false}, |
|||
{title: '供应商ID',field: 'supplierCode',visible: false}, |
|||
{title: '料号',field: 'materialCode'}, |
|||
{title: '物料名称',field: 'materialName'}, |
|||
{title: '物料类型',field: 'materialType', |
|||
formatter: function (value,row, index) { |
|||
$.table.selectCategoryLabel(materialTypeDatas, value) |
|||
} |
|||
}, |
|||
{title: '物料图片地址',field: 'materialPhotourl', |
|||
formatter: function (value, row, index) { |
|||
$.table.imageView(value) |
|||
} |
|||
}, |
|||
{title: '物料描述',field: 'materialDescribe',}, |
|||
{title: '物料品牌',field: 'materialBrand',}, |
|||
{title: '物料单位',field: 'materialUnit', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(materialUnitDatas, value); |
|||
} |
|||
}, |
|||
{title: '物料加工方式',field: 'materialProcessMethod', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title: '计划采购数',field: 'materialNum',}, |
|||
{title: '实际采购数',field: 'materialRealNum',}, |
|||
{title: '交付时间',field: 'deliveryTime',}, |
|||
{title: '通知已到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '已入库数',field: 'hasStorageNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '通知到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
return '<input type="number" min="0" oninput="validity.valid || (value = 0)" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"'; |
|||
} |
|||
} |
|||
] |
|||
}); |
|||
$tableWrapper.append($header).append($table); |
|||
$('#tablesContainer').append($tableWrapper); |
|||
} |
|||
$("input[name='arrivedTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='deliveryInspectionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,175 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('驳回调整')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> |
|||
<input name="id" th:field="*{id}" type="hidden"> |
|||
<input name="taskId" th:field="*{taskId}" type="hidden"> |
|||
<input name="taskName" th:field="*{taskName}" type="hidden"> |
|||
<input name="instanceId" th:field="*{instanceId}" type="hidden"> |
|||
<input name="instanceType" th:field="*{instanceType}" type="hidden"> |
|||
<!--驳回调整允许更新内容--> |
|||
<input type="hidden" name="saveEntity" value="true" /> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUserName" th:field="*{applyUserName}" 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"> |
|||
<div class="input-group date"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">标题:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="reApply" name="p_B_reApply" class="form-control m-b"> |
|||
<option value="true">重新申请</option> |
|||
<option value="false">结束流程</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<script th:inline="javascript"> |
|||
var erpMaterial = [[${formData}]]; |
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; |
|||
var warehouseCode = [[${purchaseOrder.stockNo}]]; |
|||
var warehouseName = [[${purchaseOrder.stockName}]]; |
|||
var warehouseDetailAddress = [[${purchaseOrder.stockAddress}]]; |
|||
$("#form-gcjl-edit").validate({focusCleanup: true}); |
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
if ($('textarea[name="comment"]').val()) { |
|||
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); |
|||
} |
|||
var taskId = [[${taskId}]]; |
|||
$.operate.save(prefix + "/complete/" + taskId, $('#form-gcjl-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
var prefix = ctx + "purchase/purchaseOrder"; |
|||
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|||
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|||
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|||
var materialUnitDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|||
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|||
$("#form-addPurchaseStorage-edit").validate({ focusCleanup: true}); |
|||
//生成的不同table的id集合 |
|||
var tableDatas = []; |
|||
$(function() { |
|||
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 |
|||
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 |
|||
$.getJSON(prefix + "/detailListGroupedBySupplier?qualityOrderCode=" + purchaseOrderCode, function(data) { |
|||
for (var supplierCode in data) { |
|||
if (data.hasOwnProperty(supplierCode)) { |
|||
var supplierData = data[supplierCode]; |
|||
createTableForSupplier(supplierCode, supplierData); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
function createTableForSupplier(supplierCode, supplierData) { |
|||
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); |
|||
tableDatas.push(tableId); |
|||
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); |
|||
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 |
|||
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 |
|||
// 构建含有额外供应商信息的标题字符串 |
|||
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + supplierInfo.supplierName ; |
|||
var $header = $('<h4>' + headerTitle + '</h4>'); |
|||
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); |
|||
$table.bootstrapTable({ |
|||
data: supplierData, |
|||
columns: [ |
|||
{checkbox: false,visible: false}, |
|||
{title: '供应商ID',field: 'supplierCode',visible: false}, |
|||
{title: '料号',field: 'materialCode'}, |
|||
{title: '物料名称',field: 'materialName'}, |
|||
{title: '物料类型',field: 'materialType', |
|||
formatter: function (value,row, index) { |
|||
$.table.selectCategoryLabel(materialTypeDatas, value) |
|||
} |
|||
}, |
|||
{title: '物料图片地址',field: 'materialPhotourl', |
|||
formatter: function (value, row, index) { |
|||
$.table.imageView(value) |
|||
} |
|||
}, |
|||
{title: '物料描述',field: 'materialDescribe',}, |
|||
{title: '物料品牌',field: 'materialBrand',}, |
|||
{title: '物料单位',field: 'materialUnit', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(materialUnitDatas, value); |
|||
} |
|||
}, |
|||
{title: '物料加工方式',field: 'materialProcessMethod', |
|||
formatter:function (value) { |
|||
return $.table.selectDictLabel(processMethodDatas, value); |
|||
} |
|||
}, |
|||
{title: '计划采购数',field: 'materialNum',}, |
|||
{title: '实际采购数',field: 'materialRealNum',}, |
|||
{title: '交付时间',field: 'deliveryTime',}, |
|||
{title: '通知已到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '已入库数',field: 'hasStorageNum', |
|||
formatter: function (value, row, index) { |
|||
if (value == null || value == '') { |
|||
return 0; |
|||
} |
|||
return value; |
|||
} |
|||
}, |
|||
{title: '通知到货数',field: 'notifyArriveNum', |
|||
formatter: function (value, row, index) { |
|||
return '<input type="number" min="0" oninput="validity.valid || (value = 0)" data-id="notifyArriveNum" class="form-control" name="notifyArriveNum" value="'+value+'"'; |
|||
} |
|||
} |
|||
] |
|||
}); |
|||
$tableWrapper.append($header).append($table); |
|||
$('#tablesContainer').append($tableWrapper); |
|||
} |
|||
$("input[name='arrivedTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='deliveryInspectionTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue