流转卡和生产订单只能自己删除自己的单据。pda进站单增加白坯发布字段,放在接收数量后面,不允许编辑,每次扫进站单出站单的时候,自动把白坯发布的汇总数量显示。生产订单模块增加一个字段,是否取库存,底部备注,做成下拉框。生产报表这个字段有值的不计算产能。工艺路线批量插入白坯定型和染厂(第一道和第二道)(把以前所有的流水号加20,在把白坯定型(10),和染厂(20)刷进去
| | |
| | | public string HBomNumber; |
| | | public Int64 HRoutingInterID; // --å·¥èºè·¯çº¿ID |
| | | public Int64 HOWNERID; // --货主 |
| | | public string HOWNERTYPEID; // --货主类å |
| | | public DateTime HPlanBeginDate; //计åå¼å·¥æ¥æ |
| | | public DateTime HPlanEndDate; //计åå®å·¥æ¥æ |
| | | public DateTime HBeginDate; // --æè¿å¼å·¥æ¥æ |
| | |
| | | public double HReadyQty; // --é½å¥æ°é |
| | | public double? HPlanQty; //计åç产æ°é |
| | | public string HRemark; |
| | | public string HIsStockQty;//æ¯å¦ååºå |
| | | public string HRemark3;//åºé¨å¤æ³¨ |
| | | |
| | | public double HRelationQty; |
| | | public string HOrderProcNo;//订åè·è¸ªå· |
| | |
| | | { |
| | | omodel.BarCode_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //-==================ç产订å |
| | | //ç产订å忥æ¶èªå¨çææµè½¬å¡ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ICMOBill_AutoProcExchBill") |
| | | { |
| | | omodel.Sc_ICMOBill_AutoProcExchBill = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ICMOBill_DeleterAndMakerMustSame") |
| | | { |
| | | omodel.Sc_ICMOBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | //-==================å·¥åºæµè½¬å¡ |
| | | //å·¥åºæµè½¬å¡ä¿åèªå¨åæ¥æ¡ç æ¡£æ¡ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ProcessExchangeBill_AutoBarCode") |
| | | { |
| | | omodel.Sc_ProcessExchangeBill_AutoBarCode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ProcessExchangeBill_DeleterAndMakerMustSame") |
| | | { |
| | | omodel.Sc_ProcessExchangeBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | |
| | | ////=========å·¥åºè¿ç«å |
| | | ////èªå¨å¹é
æµæ°´å· |
| | | //if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationBill_ProcNo") |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç©æå±æ§ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç©æåç±»ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | long HCenterID = list[0].HCenterID;//å·¥ä½ä¸å¿ID |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | double HmaterOutqty = list[0].HmaterOutqty;//ç½å¯åå¸ |
| | | //忮宿´æ§å¤æ |
| | | if (HMaterID <= 0) |
| | | { |
| | |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HQty,HPrice,HMoney,HPieceQty,HSourceName,HCenterID" + |
| | | ",HProcNo,HOrderProcNO,HMainInterID,HPRDOrgID" + |
| | | ",HmaterOutqty" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "'" + |
| | |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + ",'" + HSourceName + "'," + HCenterID + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "','" + HMainInterID + "'," + HPRDOrgID + |
| | | ") "); |
| | | ","+ HmaterOutqty + ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | | { |
| | |
| | | ",HProcExchBillNo='" + HProcExchBillNo + "'" + |
| | | ",HMaterID=" + HMaterID + |
| | | ",HProcID=" + HProcID + |
| | | ",HmaterOutqty=" + HmaterOutqty + |
| | | ",HICMOQty=" + HICMOQty + |
| | | ",HPlanQty=" + HPlanQty + |
| | | ",HStationInTime=getdate()" + |
| | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | #region[æ°å¢åæ®-ä¿åæé®] |
| | | /// <summary> |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //å é¤å夿å
³èæ°é |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | |
| | | DBUtility.ClsPub.HOrgID = HPRDORGID; |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn)) |
| | | { |
| | | if (oSystemParameter.omodel.Sc_ProcessExchangeBill_DeleterAndMakerMustSame == "Y") |
| | | { |
| | | if (oBill.omodel.HMaker != user) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åªè½å 餿¬äººçåæ®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + ".")) |
| | | { |
| | | TreeModel tbjson = new TreeModel(); |
| | | tbjson.id = dt.Rows[i]["hnumber"].ToString(); |
| | | tbjson.id = dt.Rows[i]["hitemid"].ToString(); |
| | | tbjson.title = dt.Rows[i]["hname"].ToString(); |
| | | tree[m].children.Add(tbjson); |
| | | } |
| | |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus |
| | | ,HOWNERID) |
| | | ,HOWNERID,HOWNERTYPEID) |
| | | values('3710'," + mainList[0].HInterID + ",'" + mainList[0].HBillNo + "','" + mainList[0].HDate + "'," + mainList[0].HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate()" + |
| | | ",'" + mainList[0].HSeOrderBillNo + "'," + mainList[0].HSeOrderInterID + "," + mainList[0].HSeOrderEntryID + "," + mainList[0].HEmpID + "," + mainList[0].HCusID + |
| | | "," + mainList[0].HCenterID + "," + mainList[0].HPlanQty + ",0,0,0,0,'','',2" + |
| | | ","+ mainList[0].HOWNERID + ") "); |
| | | ","+ mainList[0].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "') "); |
| | | //ä¿å主表 |
| | | foreach (var oSub in subList) |
| | | { |
| | |
| | | long HBomID = mainList[0].HBomID;//bom |
| | | //double? HPlanQty = mainList[0].HPlanQty == null ? 0 : mainList[0].HPlanQty;//è®¡åæ°é |
| | | string HMaker = user;//å¶å人 |
| | | string HIsStockQty = mainList[0].HIsStockQty; |
| | | string HRemark3 = mainList[0].HRemark3; |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where hmainid=" + HInterID + " and åæ®å·='" + HBillNo + "'", "h_v_IF_ICMOBillList"); |
| | | |
| | |
| | | (HBillType,HBillStatus,HInterID,HBillNo,HDate,HPRDORGID |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate) |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate |
| | | ,HIsStockQty,HRemark3) |
| | | values('3710',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'," + HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HEmpID + "," + HCusID + |
| | | "," + HCenterID + ",0,0,0,0," + HBomID + ",'','') "); |
| | | "," + HCenterID + ",0,0,0,0," + HBomID + ",'',''" + |
| | | ",'"+ HIsStockQty + "','"+ HRemark3 + "') "); |
| | | } |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { |
| | |
| | | //ä¿®æ¹ |
| | | oCN.RunProc("update Sc_ICMOBillMain set " + |
| | | "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + "" + |
| | | ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + " where HInterID=" + HInterID); |
| | | ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + |
| | | ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Sc_ICMOBillSub where HInterID='" + HInterID + "' and HEntryID='" + HEntryID + "'"); |
| | |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn)) |
| | | { |
| | | if (oSystemParameter.omodel.Sc_ICMOBill_DeleterAndMakerMustSame == "Y") |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HMaker"].ToString() != user) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åªè½å 餿¬äººçåæ®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) |
| | | { |
| | | objJsonResult.code = "0"; |