Commit 55530798 by liuyang

调整工序单价单位显示

parent 37d89ea1
...@@ -75,7 +75,7 @@ $(function (){ ...@@ -75,7 +75,7 @@ $(function (){
}) })
} }
}, },
template: function (dataItem) { /*template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) { for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) { if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'].split("]")[1]; dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
...@@ -84,7 +84,7 @@ $(function (){ ...@@ -84,7 +84,7 @@ $(function (){
} }
} }
return dataItem['processCode']; return dataItem['processCode'];
}, },*/
editor: function (container, options) { editor: function (container, options) {
this.filter(options); this.filter(options);
} }
...@@ -123,11 +123,19 @@ $(function (){ ...@@ -123,11 +123,19 @@ $(function (){
if (e.field == "factoryCode") { if (e.field == "factoryCode") {
loadChange(grid,e,"processCode"); loadChange(grid,e,"processCode");
}else if (e.field == "processCode") { }else if (e.field == "processCode") {
let dataItem = e.items[0];
for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) {
resultGrid.setCellValue(dataItem,"unit",processCodes[i]['param3Field']);
resultGrid.setCellValue(dataItem,"processName",processCodes[i]['textField'].split("]")[1])
break;
}
}
if (e.items[0].factoryCode.length===0){ if (e.items[0].factoryCode.length===0){
loadChange(grid,e,"factoryCode"); loadChange(grid,e,"factoryCode");
} }else {
loadChange(grid,e,"unit"); loadChange(grid,e,"unit");
loadChange(grid,e,"processClass"); }
} }
}); });
}, },
...@@ -173,7 +181,7 @@ $(function (){ ...@@ -173,7 +181,7 @@ $(function (){
exportGrid : { exportGrid : {
exportFileName: function (gridInstance) { exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss // 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "工艺流程_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR); return "工序单价_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
}, },
exportFileType: "xls", exportFileType: "xls",
exportBlockId: "result", exportBlockId: "result",
......
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