|
@ -5,12 +5,12 @@ |
|
|
</head> |
|
|
</head> |
|
|
<body class="white-bg"> |
|
|
<body class="white-bg"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
<form class="form-horizontal m" id="form-plan-edit" th:object="${purchasePlan}"> |
|
|
<form class="form-horizontal m" id="form-plan-detail" th:object="${purchasePlan}"> |
|
|
<input name="purchasePlanId" th:field="*{purchasePlanId}" type="hidden"> |
|
|
<input name="purchasePlanId" th:field="*{purchasePlanId}" type="hidden"> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">采购计划单号:</label> |
|
|
<label class="col-sm-3 control-label">采购计划单号:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<input id="detail_purchasePlanCode" name="purchasePlanCode" th:field="*{purchasePlanCode}" class="form-control" type="text" readonly> |
|
|
<input id="purchasePlanCode" name="purchasePlanCode" th:field="*{purchasePlanCode}" class="form-control" type="text" readonly> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
@ -30,7 +30,7 @@ |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">采购来源:</label> |
|
|
<label class="col-sm-3 control-label">采购来源:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<select name="purchasePlanType" class="form-control m-b" th:with="type=${@dict.getType('purchase_plan_source')}" readonly> |
|
|
<select name="purchasePlanType" class="form-control m-b" th:with="type=${@dict.getType('purchase_plan_type')}" readonly> |
|
|
<option value="">所有</option> |
|
|
<option value="">所有</option> |
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchasePlanType}"></option> |
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{purchasePlanType}"></option> |
|
|
</select> |
|
|
</select> |
|
@ -39,13 +39,13 @@ |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">物料合计:</label> |
|
|
<label class="col-sm-3 control-label">物料合计:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<input name="materialAmount" th:field="*{materialAmount}" class="form-control" type="text" readonly> |
|
|
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label class="col-sm-3 control-label">数量总计:</label> |
|
|
<label class="col-sm-3 control-label">计划采购总数:</label> |
|
|
<div class="col-sm-8"> |
|
|
<div class="col-sm-8"> |
|
|
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text" readonly> |
|
|
<input name="planPurchaseSum" th:field="*{planPurchaseSum}" class="form-control" type="text" readonly> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
@ -62,17 +62,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</form> |
|
|
</form> |
|
|
<div class="container"> |
|
|
<div class="container"> |
|
|
<div class="form-row"> |
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group"> |
|
|
|
|
|
<span>选择报价信息</span> |
|
|
|
|
|
<a class="btn btn-success" onclick="insertRow()" disabled=""> |
|
|
|
|
|
<i class="fa fa-plus"></i> 添加物料 |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
<table id="bootstrap-sub-table-purchasePlanChild"></table> |
|
|
<table id="bootstrap-table"></table> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -80,10 +72,10 @@ |
|
|
<th:block th:include="include :: footer" /> |
|
|
<th:block th:include="include :: footer" /> |
|
|
<script th:inline="javascript"> |
|
|
<script th:inline="javascript"> |
|
|
var prefix = ctx + "purchase/purchasePlan"; |
|
|
var prefix = ctx + "purchase/purchasePlan"; |
|
|
var editFlag = [[${@permission.hasPermi('purchase:plan:edit')}]]; |
|
|
|
|
|
var removeFlag = [[${@permission.hasPermi('purchase:plan:remove')}]]; |
|
|
|
|
|
var cancelFlag = [[${@permission.hasPermi('purchase:plan:cancel')}]]; |
|
|
|
|
|
var restoreFlag = [[${@permission.hasPermi('purchase:plan:restore')}]]; |
|
|
|
|
|
var purchasePlanStatusDatas = [[${@dict.getType('purchase_plan_status')}]]; |
|
|
var purchasePlanStatusDatas = [[${@dict.getType('purchase_plan_status')}]]; |
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|
|
var useStatusDatas = [[${@dict.getType('useStatus')}]]; |
|
@ -91,42 +83,63 @@ |
|
|
var sysUnitClassDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|
|
var sysUnitClassDatas = [[${@dict.getType('sysUnitClassDatas')}]]; |
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
var purchasePlanTypeDatas = [[${@dict.getType('purchase_plan_source')}]]; |
|
|
var purchasePlanTypeDatas = [[${@dict.getType('purchase_plan_source')}]]; |
|
|
$("#form-plan-edit").validate({focusCleanup: true}); |
|
|
$("#form-plan-detail").validate({focusCleanup: true}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function submitHandler() { |
|
|
|
|
|
if ($.validate.form()) { |
|
|
|
|
|
$.operate.save(prefix + "/detail", $('#form-plan-detail').serialize()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){ |
|
|
$(function(){ |
|
|
var option = { |
|
|
var option = { |
|
|
id:'bootstrap-sub-table-purchasePlanChild', |
|
|
url: prefix + "/purchasePlanDetailList", |
|
|
url: ctx + "purchase/purchasePlanChild/list", |
|
|
queryParams: queryParams, |
|
|
method: 'post', |
|
|
showSearch: false, |
|
|
sidePagination: "server", |
|
|
showRefresh: false, |
|
|
contentType: "application/x-www-form-urlencoded", |
|
|
showToggle: false, |
|
|
queryParams : function (params){ |
|
|
showColumns:false, |
|
|
var temp = { |
|
|
modalName: "选择物料", |
|
|
purchasePlanCode: $("#detail_purchasePlanCode").val() |
|
|
|
|
|
} |
|
|
|
|
|
return temp; |
|
|
|
|
|
}, |
|
|
|
|
|
columns: [ |
|
|
columns: [ |
|
|
{field: 'purchasePlanId',title: '主键id',visible: false}, |
|
|
{field: 'purchasePlanChildId',title: '主键id',visible: false}, |
|
|
{field: 'materialCode',title: '料号',}, |
|
|
{title: '采购计划状态',field: 'purchasePlanStatus', |
|
|
{field: 'photoUrl',title: '图片', |
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(purchasePlanStatusDatas, value);} |
|
|
|
|
|
}, |
|
|
|
|
|
{field: 'materialNo',title: '料号',}, |
|
|
|
|
|
{field: 'materialPhotourl',title: '图片', |
|
|
formatter: function(value, row, index) {return $.table.imageView(value);} |
|
|
formatter: function(value, row, index) {return $.table.imageView(value);} |
|
|
}, |
|
|
}, |
|
|
{field: 'materialName',title: '物料名称',}, |
|
|
{field: 'materialName',title: '物料名称',}, |
|
|
{field: 'materialType',title: '物料类型', |
|
|
{field: 'materialType',title: '物料类型', |
|
|
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);} |
|
|
formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);} |
|
|
}, |
|
|
}, |
|
|
{field: 'describe',title: '描述',}, |
|
|
{field: 'materialDescribe',title: '描述',}, |
|
|
{field: 'brand',title: '品牌',}, |
|
|
{field: 'materialModel',title: '型号',}, |
|
|
{field: 'processMethod',title: '加工方式', |
|
|
{field: 'materialBrand',title: '品牌',}, |
|
|
|
|
|
{field: 'materialProcessMethod',title: '加工方式', |
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} |
|
|
formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);} |
|
|
}, |
|
|
}, |
|
|
{field: 'unit',title: '单位', |
|
|
{field: 'materialUnit',title: '单位', }, |
|
|
}, |
|
|
{title: '计划采购数',field: 'planPurchaseNum',}, |
|
|
{field: 'materialNum',title: '计划采购数', |
|
|
{title: '待采购数',field: 'purchaseNum',}, |
|
|
}, |
|
|
{title: '实际采购数',field: 'actualPurchaseNum',}, |
|
|
|
|
|
{title: '共享库存占用数',field: 'sharedInventoryOccupancyNum',}, |
|
|
|
|
|
{title: '作废数',field: 'cancelNum',}, |
|
|
|
|
|
{title: '不含税总价(RMB)',field: 'materialNoRmbSum',}, |
|
|
|
|
|
{title: '含税总价(RMB)',field: 'materialRmbSum',}, |
|
|
|
|
|
{field: 'warehouseDept',title: '入库部门',visible: false}, |
|
|
]} |
|
|
]} |
|
|
$.table.init(option); |
|
|
$.table.init(option); |
|
|
}); |
|
|
}); |
|
|
|
|
|
function queryParams(params) { |
|
|
|
|
|
var curParams = { |
|
|
|
|
|
purchasePlanCode: $("#purchasePlanCode").val(), |
|
|
|
|
|
}; |
|
|
|
|
|
return curParams; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
</body> |
|
|
</body> |
|
|