Commit 4aa34ba3 authored by 李苏's avatar 李苏 💬

排产计划

parent 224e8594
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<div class="gui-col-sm3"> <div class="gui-col-sm3">
<label class="gui-form-label">选择时间:</label> <label class="gui-form-label" data-options="required:true" >选择时间:</label>
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="xzny" > <input type="text" name="xzny" >
</div> </div>
...@@ -107,6 +107,8 @@ ...@@ -107,6 +107,8 @@
var $xzny = $div.find('input[name="xzny"]'); var $xzny = $div.find('input[name="xzny"]');
var $xzzc = $div.find('input[name="xzzc"]'); var $xzzc = $div.find('input[name="xzzc"]');
var $tag = $div.closest('form').attr("tag"); var $tag = $div.closest('form').attr("tag");
var woksrq=""
var wojsrq=""
gas.load(paramInit, pageInit, dataInit, run); gas.load(paramInit, pageInit, dataInit, run);
function paramInit(ops){ function paramInit(ops){
...@@ -117,14 +119,13 @@ ...@@ -117,14 +119,13 @@
var columns = [ var columns = [
{title: "序号", field: "xh", fieldType: "ftString",width:70}, {title: "序号", field: "xh", fieldType: "ftString",width:70},
{title: "生产单号", field: "woDjid", fieldType: "ftString",width:120}, {title: "生产单号", field: "woDjid", fieldType: "ftString",width:120},
// {title: "计划日期", field: "ksrq", fieldType: "date", editor: { {title: "开始日期", field: "ksrq", fieldType: "date"
// type: 'datebox', required: true },
// } {title: "结束日期", field: "jsrq", fieldType: "date"
// }, // , editor: {
// {title: "结束日期", field: "jsrq", fieldType: "date", editor: { // type: 'datebox', required: true,disabled:true
// type: 'datebox', required: true
// } // }
// }, },
{title: "物料ID", field: "wlid", hidden:true}, {title: "物料ID", field: "wlid", hidden:true},
{title: "物料编码", field: "wlxxCode", width: 120}, {title: "物料编码", field: "wlxxCode", width: 120},
{title: "物料名称", field: "wlxxName", width: 140}, {title: "物料名称", field: "wlxxName", width: 140},
...@@ -147,10 +148,16 @@ ...@@ -147,10 +148,16 @@
let weekStart=data.weekStart let weekStart=data.weekStart
let weekEnd=data.weekEnd let weekEnd=data.weekEnd
$xzzc.combobox('setValue',nowWeek); $xzzc.combobox('setValue',nowWeek);
woksrq=weekStart
wojsrq=weekEnd
$datksrq.datebox('setValue',new Date(weekStart)) $datksrq.datebox('setValue',new Date(weekStart))
$datjsrq.datebox('setValue',new Date(weekEnd)) $datjsrq.datebox('setValue',new Date(weekEnd))
console.log(weekEnd) let nowdata=$datagrid.datagrid('getData').rows
nowdata.forEach(function(e){
e.ksrq=woksrq
e.jsrq=wojsrq
})
$datagrid.datagrid("loadData",nowdata);
}}) }})
$xzzc.iCombobox({valueField: 'zcv', textField: 'zc', $xzzc.iCombobox({valueField: 'zcv', textField: 'zc',
data:[{zcv:0,zc:""},{zcv:1,zc:"第一周"},{zcv:0,zc:"第二周"},{zcv:0,zc:"第三周"},{zcv:0,zc:"第四周"},{zcv:0,zc:"第五周"},{zcv:0,zc:"第六周"}] data:[{zcv:0,zc:""},{zcv:1,zc:"第一周"},{zcv:0,zc:"第二周"},{zcv:0,zc:"第三周"},{zcv:0,zc:"第四周"},{zcv:0,zc:"第五周"},{zcv:0,zc:"第六周"}]
...@@ -177,11 +184,8 @@ ...@@ -177,11 +184,8 @@
item['woid']=item['id']; item['woid']=item['id'];
item['woDjid']=item['djid']; item['woDjid']=item['djid'];
item['jhsl']=item['xqsl']; item['jhsl']=item['xqsl'];
if(!ksrq){ item['ksrq']=woksrq
item["ksrq"]='' item['jsrq']=wojsrq
}else{
item['ksrq']=ksrq;
}
item['xh']=xh+1; item['xh']=xh+1;
delete item["id"]; delete item["id"];
delete item["bz"]; delete item["bz"];
......
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