Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | { |
| | | //textBox1.Focus(); |
| | | string HPassWord = textBox1.Text.Trim().ToString(); |
| | | if (HPassWord == null || HPassWord == "") |
| | | { |
| | | MessageBox.Show("请å·å¡"); |
| | | return; |
| | | } |
| | | //MessageBox.Show(HPassWord); |
| | | SQLHelper.ClsCN oCn1 = new SQLHelper.ClsCN(); |
| | | //1.æ¥æ¾æ°æ®åºæä½å管ç表é颿¯å¦æå¯¹åºè¿ä¸ªå å¯å符串对åºçè®°å½ |
| | |
| | | ",HMaterTexture='" + omodel.HMaterTexture + "'" + |
| | | ",HProductNum='" + omodel.HProductNum + "'" + |
| | | ",HVerNum='" + omodel.HVerNum + "'" + |
| | | ",WorkBillSortNo='" + omodel.WorkBillSortNo + "'" + |
| | | //å å
¥ç产类å |
| | | ",HWorkTypeNum='" + omodel.HWorkTypeNum + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | |
| | | ",HProdMaterName,HCusName,HWorkRemark,HImportNote,HMaterNumber_A" + |
| | | ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" + |
| | | ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,WorkBillSortNo" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + |
| | |
| | | ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" + |
| | | ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" + |
| | | ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID + |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"'" + |
| | | ") "); |
| | | ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+"','" + omodel.WorkBillSortNo + |
| | | "') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl) |
| | | { |
| | |
| | | public string HVerNum;//çæ¬ |
| | | public string HSeOrderEntryID; |
| | | public string HSeOrderInterID; |
| | | public string WorkBillSortNo; |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.Kf_OtherInBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherInBillCheck_MustQtyCtl") |
| | | { |
| | | omodel.Kf_OtherInBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //å
¶ä»åºåºå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBill_AutoCheck") |
| | | { |
| | |
| | | { |
| | | omodel.Kf_OtherOutBill_BillTypeOneScan = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_OtherOutBillCheck_MustQtyCtl") |
| | | { |
| | | omodel.Kf_OtherOutBillCheck_MustQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //è°æ¨å |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBill_AutoCheck") |
| | | { |
| | |
| | | public string Kf_OtherInBill_MustQtyCtl; |
| | | public string Kf_OtherInBill_BarCodeMustSameSourceBill; // æ¡ç å¿
é¡»åæºåä¸è´ |
| | | public string Kf_OtherInBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_OtherInBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | //å
¶ä»åºåº |
| | | public string Kf_OtherOutBill_AutoCheck; |
| | | public string Kf_OtherOutBill_ERPMode; |
| | | public string Kf_OtherOutBill_MustQtyCtl; |
| | | public string Kf_OtherOutBill_BarCodeMustSameSourceBill; // æ¡ç å¿
é¡»åæºåä¸è´ |
| | | public string Kf_OtherOutBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_OtherOutBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | //è°æ¨ |
| | | public string Kf_MoveStockBill_AutoCheck; |
| | | public string Kf_MoveStockBill_ERPMode; |
| | |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag,HSeOrderSEQ " + |
| | | ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() + "," + HSourceEntryID.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | |
| | |
| | | |
| | | DataSet DSet; |
| | | |
| | | DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DSet = oCn.RunProcReturn("Select HEmpID from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (DSet == null) |
| | | //if (DSet == null|| DSet.Tables[0].Rows.Count == 0) |
| | |
| | | { |
| | | |
| | | |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value)) |
| | | { |
| | | //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | //grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | MessageBox.Show("请ç¹å»è¶
é¢ç产æé®çææ¡ç ï¼"); |
| | | return; |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | |
| | | //MessageBox.Show("请ç¹å»è¶
é¢ç产æé®çææ¡ç ï¼"); |
| | | //return; |
| | | } |
| | | else |
| | | { |
| | | //grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = HZXQty; |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = HZXQty; |
| | | // |
| | | |
| | | HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | //grdMain.Rows[i].Cells["æ¬æ¬¡æ°é"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["çäº§è®¢åæ°é"].Value); |
| | | } |
| | | } |
| | | else |
| | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | Int64 HEmpID = 0; |
| | | HEmpID = ClsPub.isLong(txtHEmpID.Tag); |
| | | HEmpID = Convert.ToInt64(txtHEmpID.Tag); |
| | | |
| | | |
| | | //MessageBox.Show(ClsPub.isStrNull(HEmpID)); |
| | | //string HEmpName = ""; |
| | | //HEmpName = ClsPub.isStrNull(txtHEmpID.Text); |
| | | |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (HEmpID != 0) |
| | | { |
| | | if (oSource.GetInfoByID(HEmpID)) |
| | | if (oSource.GetInfoByID_AoBang(HEmpID)) |
| | | { |
| | | this.txtHSourceID.Text = oSource.oModel.HName; |
| | | this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | |
| | | grdList.DataSource = null; |
| | | grdSub.DataSource = null; |
| | | grdMain.DataSource = null; |
| | | txtHEmpID.Tag = 0; |
| | | } |
| | | |
| | | private void button2_Click(object sender, EventArgs e) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString()==""?"0": ds.Tables[0].Rows[0][0].ToString()) +listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(HQty) from JIT_CallGoodsBackRequestBillSub " + |
| | | $"where HSourceInterID={listCa[i].HSouceInterID} and HSourceEntryID ={listCa[i].HSourceEntryID} and HSourceBillNo = '{listCa[i].HSourceBillNo}' and HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éæç³è¯·æ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åä¾åºåå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetSupplierList_Json")] |
| | | [HttpGet] |
| | | public object GetSupplierList_Json(string Supplier) |
| | | public object GetSupplierList_Json(string Supplier, Int64 HOrgID) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID =" + HOrgID + ""; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Supplier != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' ) "; |
| | | sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | WebS.WebService1 oWeb = new WebS.WebService1(); |
| | | ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |