This commit is contained in:
PastSaid
2024-03-11 14:47:23 +08:00
parent 6dd1816c96
commit 08d8878eef
202 changed files with 274 additions and 246 deletions

View File

@@ -0,0 +1,67 @@
import clr
clr.AddReference("System")
clr.AddReference("System.Data")
clr.AddReference("Kingdee.BOS")
clr.AddReference("Kingdee.BOS.Core")
clr.AddReference("Kingdee.BOS.App")
clr.AddReference("Kingdee.BOS.ServiceHelper")
from Kingdee.BOS import *
from Kingdee.BOS.Core import *
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.Report import *
from System import *
from System.Data import *
from System.Net import *
from System.Text import *
from Kingdee.BOS.App.Data import *
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Core.List.PlugIn.Args import *
def FormatCellValue(args):
# <20><><EFBFBD>ڸ<EFBFBD>ʽ<EFBFBD><CABD>
if args.Header.ColType == SqlStorageType.SqlDatetime:
args.FormateValue = ("{0}").format(DateTime.Parse(str(args.FormateValue)).ToString("yyyy-MM-dd"))
def CellDbClick(e):
e.Cancel = True
fldKey = e.Header.FieldName;
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if fldKey == "FPPBOMBILLNO":
reportModel = this.Model
tab = reportModel.DataSource
row = e.CellRowIndex
_moId = value=("{0}").format(tab.Rows[row-1]["FPPBOMID"]);
if _moId != None and str(_moId) != "" and str(_moId) != "0":
ShowForm("PRD_PPBOM", _moId)
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if fldKey == "FBILLNO":
reportModel = this.Model
tab = reportModel.DataSource
row = e.CellRowIndex
_moId = value=("{0}").format(tab.Rows[row-1]["FID"]);
if _moId != None and str(_moId) != "" and str(_moId) != "0":
ShowForm("PRD_MO", _moId)
#<23><><EFBFBD><EFBFBD>
if fldKey == "MaterialName":
reportModel = this.Model
tab = reportModel.DataSource
row = e.CellRowIndex
_moId = value=("{0}").format(tab.Rows[row-1]["FMATERIALID"]);
if _moId != None and str(_moId) != "" and str(_moId) != "0":
ShowForm("BD_MATERIAL", _moId)
#<23><>Ʒ
if fldKey == "ProName":
reportModel = this.Model
tab = reportModel.DataSource
row = e.CellRowIndex
_moId = value=("{0}").format(tab.Rows[row-1]["ProMaterialId"]);
if _moId != None and str(_moId) != "" and str(_moId) != "0":
ShowForm("BD_MATERIAL", _moId)
def ShowForm(_fromId, _pkVal, _operationStatus = OperationStatus.VIEW ,_openStyleShowType = ShowType.Floating):
showParam = BillShowParameter();
showParam.FormId = _fromId;
showParam.OpenStyle.ShowType = _openStyleShowType;
showParam.Status = _operationStatus;
showParam.PKey = _pkVal;
this.View.ShowForm(showParam)