Commit e8e320f4 authored by 李苏's avatar 李苏 💬

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

parents 3033f611 fec40c4d
package com.gavel.kwell.controller;
import java.io.FileInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import com.gavel.common.attachment.persistent.Attachment;
import com.gavel.common.base.controller.BaseController;
import com.gavel.kwell.service.GpfkfjService;
import io.swagger.annotations.ApiOperation;
@Controller
@RequestMapping("kmes/gpfkfj")
public class GpfkForBzgxFjController extends BaseController {
@Autowired
private GpfkfjService gpfkfjService;
@ApiOperation(value = "扫码获取当前工票的操作附件")
@RequestMapping(value = "/queryFjBybzgx/{bzlx}/{type}")
public void doKwellGpfk(HttpServletRequest request, HttpServletResponse response, @PathVariable String bzlx, @PathVariable String type){
Attachment file = gpfkfjService.queryBzgxFj(bzlx, type);
if(file !=null) {
FileInputStream fileInputStream = attachmentService.download(file.getId());
doAttachmentPreview(file.getId(), response, fileInputStream);
}
}
}
......@@ -144,6 +144,18 @@ public class KmesBoardController extends BaseController {
FileInputStream fileInputStream = kmesBoardService.getVideo();
kmesBoardService.doAttachmentPreview(response, fileInputStream);
}
@RequestMapping(value = "/querySafeDays", method = RequestMethod.POST)
@ResponseBody
public Object querySafeDays(@RequestBody JSONObject param) {
return buildReturnData(kmesBoardService.querySafeDays());
}
@RequestMapping(value = "/queryCurProZtsl", method = RequestMethod.POST)
@ResponseBody
public Object queryCurProZtsl(@RequestBody JSONObject param) {
return buildReturnData(kmesBoardService.queryCurrentMadeZtsl());
}
......
......@@ -20,4 +20,6 @@ public interface KmesBoardDao extends BaseDao {
public List<UWoVO> queryWo();
public UWoVO queryWorkingWO();
public int queryZtsl(String[] fkids);
}
......@@ -82,4 +82,28 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
sqlMap.append(" ) ");
return sqlMap.queryEntity(UWoVO.class);
}
@Override
public int queryZtsl(String[] fkids) {
SqlMap sqlMap = new SqlMap();
sqlMap.append(" select sum(a.sl) from ");
sqlMap.append(" (select count(1) sl,bzgx_id bzgx from gpfk ");
sqlMap.append(" left join wogylx on wogylx_id = gpfk_fkgx ");
sqlMap.append(" left join bzgx on bzgx_id = WOGYLX_BZGXID ");
sqlMap.append(" group by bzgx_id) a ");
sqlMap.append(" where 1=1 ");
if(fkids!=null&&fkids.length>0) {
sqlMap.append(" and ( ");
for(int i=0;i<fkids.length;i++) {
if(i<fkids.length-1) {
sqlMap.append(" a.bzgx= '"+fkids[i]+"' or");
}
else {
sqlMap.append(" a.bzgx= '"+fkids[i]+"'");
}
}
sqlMap.append(" ) ");
}
return sqlMap.queryInt();
}
}
package com.gavel.kwell.service;
import com.gavel.common.attachment.persistent.Attachment;
import com.gavel.common.base.service.BaseEditService;
public interface GpfkfjService extends BaseEditService {
public Attachment queryBzgxFj(String bzgxid,String type);
}
......@@ -2,6 +2,7 @@ package com.gavel.kwell.service;
import java.io.FileInputStream;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
......@@ -35,4 +36,9 @@ public interface KmesBoardService extends BaseEditService {
public FileInputStream downloadFile(String path);
public void doAttachmentPreview(HttpServletResponse response, FileInputStream fileInputStream);
/**查询安全生产天数 */
public int querySafeDays();
/**查询在制品状态 */
public Map<String,Object> queryCurrentMadeZtsl();
}
package com.gavel.kwell.service.impl;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gavel.common.attachment.persistent.Attachment;
import com.gavel.common.attachment.service.AttachmentService;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.gygl.dao.BzgxDao;
import com.gavel.gygl.persistent.Bzgx;
import com.gavel.kwell.service.GpfkfjService;
@Service("gpfkfjService")
@Transactional
public class GpfkfjServiceImpl extends BaseEditServiceImpl implements GpfkfjService {
@Autowired
private AttachmentService attachmentService;
@Autowired
private BzgxDao bzgxDao;
private static final String ZDS1_FLODER="bzgx\\gyzyzdso";
private static final String ZDS2_FLODER="bzgx\\gyzyzdss";
private static final String SP_FLODER="bzgx\\gyzyzdssp";
private static final String ZDS1_BZ="O";
private static final String ZDS2_BZ="T";
private static final String SP_BZ="M";
@Override
public void initService() {
}
@Override
public Attachment queryBzgxFj(String bzgxid,String type) {
Bzgx bzgxVo = bzgxDao.queryById(Bzgx.class, bzgxid);
if(bzgxVo!=null&&StringUtils.isNotEmpty(type)) {
if(type.equals(ZDS1_BZ)) {
List<Attachment> list =attachmentService.getAttachmentAndSubFolder(bzgxVo.getId(), ZDS1_FLODER);
if(list!=null&&list.size()>0) {
return list.get(0);
}
}
else if(type.equals(ZDS2_BZ)) {
List<Attachment> list =attachmentService.getAttachmentAndSubFolder(bzgxVo.getId(), ZDS2_FLODER);
if(list!=null&&list.size()>0) {
return list.get(0);
}
}
else if(type.equals(SP_BZ)) {
List<Attachment> list =attachmentService.getAttachmentAndSubFolder(bzgxVo.getId(), SP_FLODER);
if(list!=null&&list.size()>0) {
return list.get(0);
}
}
}
return null;
}
}
......@@ -17,6 +17,8 @@ import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO;
import com.gavel.kwell.vo.UWoVO;
import com.gavel.wo.persistent.Pcjhmx;
import org.apache.commons.collections.ListUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,7 +30,9 @@ import java.io.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service("kmesBoardService")
......@@ -43,7 +47,7 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Autowired
private GpfkcxDao gpfkcxDao;
@Autowired
private CommonService commonService;
......@@ -212,4 +216,50 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
}
@Override
public int querySafeDays() {
String kgrqStr =commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_KGRQ.getId());
if(StringUtils.isNotEmpty(kgrqStr)) {
Date kgrq = DateUtils.parseDate(kgrqStr);
return DateUtils.betweenDay(kgrq, DateUtils.getDateTime());
}
return 0;
}
@Override
public Map<String, Object> queryCurrentMadeZtsl() {
Map<String, Object> maps = new HashMap<String, Object>();
int zpcount =0;
int cecount =0;
int lhcount =0;
int jycount =0;
String zpztIdsStr =commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_ZPZT.getId());
String ceztIdsStr =commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_CEZT.getId());
String lhztIdsStr =commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_LHZT.getId());
String jyztIdsStr =commonService.getStringOptionValue(KwellParamEnum.DASHBOARD_JYZT.getId());
if(StringUtils.isNotEmpty(zpztIdsStr)) {
String[] zpids = zpztIdsStr.split(",");
zpcount = kmesBoardDao.queryZtsl(zpids);
}
if(StringUtils.isNotEmpty(ceztIdsStr)) {
String[] ceids = ceztIdsStr.split(",");
cecount = kmesBoardDao.queryZtsl(ceids);
}
if(StringUtils.isNotEmpty(lhztIdsStr)) {
String[] lhids = zpztIdsStr.split(",");
lhcount = kmesBoardDao.queryZtsl(lhids);
}
if(StringUtils.isNotEmpty(jyztIdsStr)) {
String[] jyids = zpztIdsStr.split(",");
jycount = kmesBoardDao.queryZtsl(jyids);
}
maps.put(KwellParamEnum.DASHBOARD_ZPZT.getId(), zpcount);
maps.put(KwellParamEnum.DASHBOARD_CEZT.getId(), cecount);
maps.put(KwellParamEnum.DASHBOARD_LHZT.getId(), lhcount);
maps.put(KwellParamEnum.DASHBOARD_JYZT.getId(), jycount);
return maps;
}
}
......@@ -9,6 +9,15 @@ import java.util.List;
@GavelParams("901000000")
public enum KwellParamEnum {
DASHBOARD_KGRQ("KWELL006", "安全开工日期", "B", "安全开工日期", "S","", "2022-03-11", "日期格式为XXXX-XX-XX (年-月-日)"),
DASHBOARD_ZPZT("KWELL002", "在制品装配工序设置", "B", "在制品装配工序设置", "E",
"select BZGX_ID as ID, BZGX_CODE as CODE,CONCAT(BZGX_NAME,'--',isnull(GZZX_NAME,'')) as NAME from BZGX left join GZZX on GZZX_ID = BZGX_GZZXID where isnull(BZGX_TYBZ,'N')='N' order by BZGX_CODE", "", ""),
DASHBOARD_CEZT("KWELL003", "在制品测试工序设置", "B", "在制品测试工序设置", "E",
"select BZGX_ID as ID, BZGX_CODE as CODE,CONCAT(BZGX_NAME,'--',isnull(GZZX_NAME,'')) as NAME from BZGX left join GZZX on GZZX_ID = BZGX_GZZXID where isnull(BZGX_TYBZ,'N')='N' order by BZGX_CODE", "", ""),
DASHBOARD_LHZT("KWELL004", "在制品老化工序设置", "B", "在制品老化工序设置", "E",
"select BZGX_ID as ID, BZGX_CODE as CODE,CONCAT(BZGX_NAME,'--',isnull(GZZX_NAME,'')) as NAME from BZGX left join GZZX on GZZX_ID = BZGX_GZZXID where isnull(BZGX_TYBZ,'N')='N' order by BZGX_CODE", "", ""),
DASHBOARD_JYZT("KWELL005", "在制品检验工序设置", "B", "在制品检验工序设置", "E",
"select BZGX_ID as ID, BZGX_CODE as CODE,CONCAT(BZGX_NAME,'--',isnull(GZZX_NAME,'')) as NAME from BZGX left join GZZX on GZZX_ID = BZGX_GZZXID where isnull(BZGX_TYBZ,'N')='N' order by BZGX_CODE", "", ""),
DASHBOARD_HGL("KWELL001", "合格率按检验工序设置", "B", "合格率按检验工序设置", "E",
"select BZGX_ID as ID, BZGX_CODE as CODE,CONCAT(BZGX_NAME,'--',isnull(GZZX_NAME,'')) as NAME from BZGX left join GZZX on GZZX_ID = BZGX_GZZXID where isnull(BZGX_TYBZ,'N')='N' and BZGX_GXLX = 'JY' order by BZGX_CODE", "", ""),
DASHBORAD_PDF("PDF","配置大屏看板PDF文件路径", "B", "配置大屏看板PDF文件路径", "S", "", "D:\\projectinfo\\kwell-mes\\gavel\\src\\main\\resources\\static\\pdf\\dashboard.pdf", ""),
......
<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
<div id="gyglBzgxEdit" class="e-dialog-container" data-options="width:800,height:420">
<div class="editTable">
<input type="hidden" name="flag">
<input type="hidden" name="id" >
<div class="gui-row" >
<div class="gui-col-sm6">
<label class="gui-form-label">工序编码:</label>
<div class="gui-input-block">
<input type="text" name="code" data-toggle="gui-textbox" data-options="required:true,fieldType:'upper'">
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">名称:</label>
<div class="gui-input-block">
<input type="text" name="name" data-toggle="gui-textbox" data-options="required:true">
</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="gcid" 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="gzzxid" 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="gxlx" data-toggle="gui-textbox" data-options="">
</div>
</div>
</div>
<div class="gui-row" >
<div class="gui-col-sm6">
<div class="gui-input-block" data-toggle="gui-checkbox" data-options="label:'关键工序',labelPosition:'right'">
<input type="checkbox" name="gjgx" >
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">加工顺序:</label>
<div class="gui-input-block">
<input type="text" name="xh" data-toggle="gui-numberbox">
</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="sbsl" data-toggle="gui-numberbox">
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">作业人数:</label>
<div class="gui-input-block">
<input type="text" name="zyrsl" data-toggle="gui-numberbox" 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="pdhs" data-toggle="gui-numberbox" data-options="">
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">准备耗时(分钟):</label>
<div class="gui-input-block">
<input type="text" name="zbhs" data-toggle="gui-numberbox" 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="jghs" data-toggle="gui-numberbox" data-options="">
</div>
</div>
<div class="gui-col-sm6">
<label class="gui-form-label">转移耗时(小时):</label>
<div class="gui-input-block">
<input type="text" name="zyhs" data-toggle="gui-numberbox" data-options="">
</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 $div=$('#gyglBzgxEdit');
//新增初始化
if( $div.closest("form").attr("tag")=="add"){
$div.find("input[name='sbsl']").val(1);
}
$div.find("input[name='gcid']").iCombobox(
{url: 'jcsj/gc/query',valueField: 'id', textField: 'name', allowNull:false,
loadFilter: function (a) {
return a["data"]["records"]
}
}
);
$div.find("input[name='gzzxid']").iCombobox(
{url: 'gygl/gzzx/query',valueField: 'id', textField: 'name', allowNull:false,
loadFilter: function (a) {
return a["data"]["records"]
}
}
);
$div.find('input[name="gxlx"]').iCombobox({
url: 'gygl/bzgx/init/gxlx', valueField: 'id', textField: 'name',allowNull:false,
loadFilter: function (a) {return a["data"]["records"]}
});
})
</script>
<div id="gyglBzgx" class="gui-div">
<table class="toolbar-table" data-options="id: 'gyglBzgxTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 -->
<div id="gyglBzgxTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'gyglBzgxTable'}">
<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>
<a class="toolbar-attachment toolbar" href="javascript:void(0)"></a>
<a class="toolbar-run toolbar" href="javascript:void(0)"></a>
</div>
<div class="form-sub">
<form class="query-criteria">
<ul>
<li class="gui-form-row" >
<div class="gui-col-sm3">
<label class="gui-form-label">工作中心:</label>
<div class="gui-input-block">
<input type="text" name="gzzxid" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序类型:</label>
<div class="gui-input-block">
<input type="text" name="gxlx" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<label class="gui-form-label">工序信息:</label>
<div class="gui-input-block">
<input type="text" name="gxid" class="gui-textbox" style="width: 100%">
</div>
</div>
</li>
</ul>
<span class="toolbar-search-span"><a class="toolbar-search" href="javascript:void(0)"></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
/*js初始化*/
$(function () {
var $div=$('#gyglBzgx');
var gxlxData={};
var promise= new Promise(function( reslove,reject ) {
HTTP.post('gygl/bzgx/init/gxlx',{},function (result) {
if(result["success"]){
var data=result["data"]["records"]||[];
for(var i in data){
gxlxData[data[i].id]=data[i].name
}
reslove(gxlxData)
}
});
});
$div.find("input[name='gzzxid']").iCombobox(
{url: 'gygl/gzzx/query',valueField: 'id', textField: 'name', allowNull:true,
loadFilter: function (a) {
return a["data"]["records"]
}
}
);
$div.find("input[name='gxlx']").iCombobox(
{url: 'gygl/bzgx/init/gxlx',valueField: 'id', textField: 'name', allowNull:true,
loadFilter: function (a) {
return a["data"]["records"]
}
}
);
promise.then(function(data){
var options={
url:'gygl/bzgx',
queryParams:{
gzzxid: $div.find('form input[name="gzzxid"]').val(),
gxlx: $div.find('form input[name="gxlx"]').val(),
gxid: $div.find('form input[name="gxid"]').val()
},
columns:[[
{title: "工序编码", field: "code", width:120},
{title: "工序名称", field: "name", width:140},
/* {title: "工厂", field: "gcname", width:140}, */
{title: "工作中心", field: "gzzxname", width:140},
{title: "加工顺序", field: "xh", fieldType:"int", width:80},
{title: "设备数量", field: "sbsl", fieldType:"float"},
{title: "作业人数", field: "zyrsl", fieldType:"float"},
{title: "排队耗时(小时)", field: "pdhs", fieldType:"float",width:120},
{title: "准备耗时(分钟)", field: "zbhs", fieldType:"float",width:120},
{title: "加工耗时(分钟)", field: "jghs", fieldType:"float",width:120},
{title: "转移耗时(小时)", field: "zyhs", fieldType:"float",width:120},
{title: "工序类型", field: "gxlx", width:100, formatter: function (value, index, row) {
var text = gxlxData[value];
return text || "";
}
},
{title: "关键工序", field: "gjgx", fieldType:"checkbox",width:90},
{title: "状态", field: "tybz", width:80},
{title: "停用日期", field: "tyrq", fieldType:"ftDateTime"},
{title: "备注", field: "bz", width:200},
{title: "维护人", field: "whr", fieldType:"ftString"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
]],
dialog:{
footerIn: true,
href:'gygl/bzgx/edit'
}
};
$div.Holder(options);
});
});
</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