Commit 0998f749 authored by yff's avatar yff

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents e07c7bc4 23342443
<div id="bomBomEdit" class="e-dialog-container" data-options="width:720,height:320">
<div class="e-single-dialog">
<input type="hidden" name="flag">
<input type="hidden" name="id" >
<input type="hidden" name="xh" >
<input type="hidden" name="bomid" >
<!-- <div class="gui-row" style="display: none">
<div class="gui-col-sm12">
<label class="gui-form-label">产品结构:</label>
<div class="gui-input-block">
<input type="text" name="bomid" data-toggle="gui-textbox" data-options="required:true" disabled >
</div>
</div>
</div>-->
<div class="gui-row">
<div class="gui-col-sm6" >
<label class="gui-form-label">物料:</label>
<div class="gui-input-block">
<input type="text" name="wlid" data-toggle="gui-textbox" data-title="wlxxName" data-options="required:true" >
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">单位用量:</label>
<div class="gui-input-block">
<input type="text" name="dwyl" data-toggle="gui-textbox" data-options="required:true" >
</div>
</div>
</div>
<div class="gui-row" >
<!-- <div class="gui-col-sm4">
<label class="gui-form-label">工厂:</label>
<div class="gui-input-block">
<input type="text" name="gcid" data-toggle="gui-textbox" >
</div>
</div>-->
<!-- <div class="gui-col-sm4">
<label class="gui-form-label">序号:</label>
<div class="gui-input-block">
<input type="text" name="xh" data-toggle="gui-textbox" data-options="" >
</div>
</div>-->
</div>
<div class="gui-row" >
<div class="gui-col-sm6">
<label class="gui-form-label">损耗率:</label>
<div class="gui-input-block">
<input type="text" name="shl" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">损耗值:</label>
<div class="gui-input-block">
<input type="text" name="shz" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
<div class="gui-row">
<div class="gui-col-sm6">
<label class="gui-form-label">发放原则:</label>
<div class="gui-input-block">
<input type="text" name="ffyz" data-toggle="gui-textbox" data-options="required:true" >
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">发放工序:</label>
<div class="gui-input-block">
<input type="text" name="ffgx" data-toggle="gui-textbox" data-title="gylxName" data-options="" >
<input type="hidden" name="gylxName">
</div>
</div>
</div>
<div class="gui-row" >
<div class="gui-col-sm12">
<label class="gui-form-label">备注:</label>
<div class="gui-input-block">
<input type="text" name="bz" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
</div>
<div class="e-dialog-footer">
<a href="javascript:void(0);" class="e-dialog-ok"></a>
<a href="javascript:void(0);" class="e-dialog-cancel"></a>
</div>
</div>
<script>
$(function () {
var $dialog=$('#bomBomEdit');
var $edtbomid=$dialog.find("input[name='bomid']");
var $edtWlid=$dialog.find("input[name='wlid']");
var $edtFfgx=$dialog.find("input[name='ffgx']");
var $edtFfyz=$dialog.find("input[name='ffyz']");
var $inputXh=$dialog.find("input[name='xh']");
var parmas=$dialog.parent().dialog("options").params;
var xh=parmas.xh;
var tag=$dialog.closest("form").attr("tag");
function paramsInit(){
}
function pageInit(){
$edtFfyz.iCombobox({valueField:'id', textField:'name',allowNull:false, allowEdit:false});
if(tag=="add"){
$edtbomid.val(parmas.bomid);
}
Auxiliary.box($edtWlid,{code:'WLID'});
Auxiliary.box($edtFfgx,{code:'FFGX',onBeforeLoad:function(){
return {wlid:$edtbomid.val()};
}});
}
function dataInit(ops) {
gas.postHTTP("bom/bom/init/ffyz",{},function (res) {
if(res.success){
$edtFfyz.combobox("loadData",res.data.records||[])
}
}, ops);
$inputXh.val(xh);
}
function run(){
}
gas.load(paramsInit,pageInit,dataInit,run);
$dialog.find(".e-dialog-ok").iMenubutton({
text:"确定",
iconCls:"fa fa-save",
btnCls:"gui-btn-save",
onClick:function (){
var data=DataBind.collectData($dialog);
var queryUrl="bom/bom/add";
if(tag=='add'){
HTTP.post(queryUrl,{master:data},function (res) {
if(res.success){
$dialog.closest(".panel-body").iDialog("setStatus",{"state":"ok",data:{
data:$.extend({},data,{
id:res.data.id,
bomid:data.bomid,
wlid:data.wlid
}),
type:tag
}});
gas.showTips("操作成功")
}else{
gas.showWarning(res,"操作失败")
}
})
}else if(tag=="edit"){
queryUrl="bom/bom/update";
HTTP.post(queryUrl,{master:data},function (res) {
if(res.success){
$dialog.closest(".panel-body").iDialog("setStatus",{"state":"ok",data:{
data:data,
type:tag
}});
gas.showTips("操作成功");
}else{
gas.showWarning(res,"操作失败")
}
})
}
}
});
})
</script>
\ No newline at end of file
This diff is collapsed.
<div id="bomSobomEdit" class="e-dialog-container" data-options="width:1050,height:350">
<div class="e-single-dialog">
<input type="hidden" name="flag">
<input type="hidden" name="id" >
<div class="gui-row" >
<div class="gui-col-sm4">
<label class="gui-form-label">销售单号:</label>
<div class="gui-input-block">
<input type="text" name="somxid" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">父节点ID:</label>
<div class="gui-input-block">
<input type="text" name="pid" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">父物料编码:</label>
<div class="gui-input-block">
<input type="text" name="pwlid" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
<div class="gui-row" >
<div class="gui-col-sm4">
<label class="gui-form-label">序号:</label>
<div class="gui-input-block">
<input type="text" name="xh" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">物料编码:</label>
<div class="gui-input-block">
<input type="text" name="wlid" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">单位用量:</label>
<div class="gui-input-block">
<input type="text" name="dwyl" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
<div class="gui-row" >
<div class="gui-col-sm4">
<label class="gui-form-label">损耗率:</label>
<div class="gui-input-block">
<input type="text" name="shl" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">损耗值:</label>
<div class="gui-input-block">
<input type="text" name="shz" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">物料批号:</label>
<div class="gui-input-block">
<input type="text" name="wlph" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
<div class="gui-row" >
<div class="gui-col-sm4">
<label class="gui-form-label">发放原则:</label>
<div class="gui-input-block">
<input type="text" name="ffyz" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">发放工序:</label>
<div class="gui-input-block">
<input type="text" name="ffgx" data-toggle="gui-textbox" data-options="" >
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">备注:</label>
<div class="gui-input-block">
<input type="text" name="bz" data-toggle="gui-textbox" data-options="" >
</div>
</div>
</div>
</div>
<div class="e-dialog-footer">
<a href="javascript:void(0);" class="e-dialog-ok"></a>
<a href="javascript:void(0);" class="e-dialog-cancel"></a>
</div>
</div>
<script>
$(function () {
var $dialog=$('#bomSobomEdit');
})
</script>
\ No newline at end of file
<div id="bomSobom" class="gui-div">
<table class="toolbar-table" data-options="id: 'bomSobomTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="bomSobomTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'bomSobomTable'}">
<div class="navbar-toolbar">
<a class="toolbar-print toolbar" href="javascript:void(0)"></a>
<a class="toolbar-export toolbar" href="javascript:void(0)"></a>
<a class="toolbar-review toolbar" href="javascript:void(0)"></a>
<a class="toolbar-add toolbar" href="javascript:void(0)"></a>
<a class="toolbar-copy toolbar" href="javascript:void(0)"></a>
<a class="toolbar-edit toolbar" href="javascript:void(0)"></a>
<a class="toolbar-delete toolbar" href="javascript:void(0)"></a>
</div>
<!-- <div class="form-sub">
<form class="query-criteria">
<ul>
</ul>
<span class="toolbar-search-span"><a class="toolbar-search" href="javascript:void(0)"></a></span>
</form>
</div>-->
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$(function () {
/*js初始化*/
var $div=$('#bomSobom');
var $datagrid=$div.find(".toolbar-table");
function paramInit(ops){
}
function pageInit() {
var options = {
url: 'bom/sobom',
noRequest: true,
columns: [[
{title: "销售单号", field: "somxid", fieldType: "ftString",width:140},
{title: "父节点ID", field: "pid", fieldType: "ftString",width:140},
{title: "父物料编码", field: "pwlid", fieldType: "ftString",width:140},
{title: "序号", field: "xh", fieldType: "int"},
{title: "物料编码", field: "wlid", fieldType: "ftString",width:140},
{title: "单位用量", field: "dwyl", fieldType: "float"},
{title: "损耗率", field: "shl", fieldType: "float"},
{title: "损耗值", field: "shz", fieldType: "float"},
{title: "物料批号", field: "wlph", fieldType: "ftString",width:140},
{title: "发放原则", field: "ffyz", fieldType: "ftString",width:100},
{title: "发放工序", field: "ffgx", fieldType: "ftString",width:120},
{title: "状态", field: "zt", fieldType: "ftString",width:80},
{title: "备注", field: "bz", fieldType: "ftString",width:240},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
]],
dialog: {
footerIn: true,
href: 'bom/sobom/edit'
}
};
$div.Holder(options);
}
/*数据初始化*/
function dataInit(ops){
}
/*用户操作*/
function run(ops){
$datagrid.datagrid("options").url="bom/sobom/query";
$datagrid.datagrid("load",DataBind.collectData($div))
}
gas.load(paramInit,pageInit,dataInit);
})
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment