123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- (function() {
- BemsWebApplication.FmsMaterialPurchaseRequestExViewModel = function (data) {
- this.SiteId = ko.observable();
- this.BusinessFieldId = ko.observable();
- this.PurchaseRequestId = ko.observable();
- this.PurchaseTypeId = ko.observable();
- this.RequestDate = ko.observable();
- this.RequestUserId = ko.observable();
- this.PurchaseHopeDate = ko.observable();
- this.Title = ko.observable();
- this.Reason = ko.observable();
- this.ProgressId = ko.observable();
- this.ApprovalDate = ko.observable();
- this.ApprovalUserId = ko.observable();
- this.CmBusinessField_Name = ko.observable();
- this.FmsMaterialCodeProgress_Name = ko.observable();
- this.RequestUserId_Name = ko.observable();
- this.ApprovalUserId_Name = ko.observable();
- this.bSameOrder = ko.observable();
- this.bSameOrder2 = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.FmsMaterialPurchaseRequestExViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- BusinessFieldId: this.BusinessFieldId(),
- PurchaseRequestId: this.PurchaseRequestId(),
- PurchaseTypeId: this.PurchaseTypeId(),
- RequestDate: this.RequestDate(),
- RequestUserId: this.RequestUserId(),
- PurchaseHopeDate: this.PurchaseHopeDate(),
- Title: this.Title(),
- Reason: this.Reason(),
- ProgressId: this.ProgressId(),
- ApprovalDate: this.ApprovalDate(),
- ApprovalUserId: this.ApprovalUserId(),
- CmBusinessField_Name: this.CmBusinessField_Name(),
- FmsMaterialCodeProgress_Name: this.FmsMaterialCodeProgress_Name(),
- RequestUserId_Name: this.RequestUserId_Name(),
- ApprovalUserId_Name: this.ApprovalUserId_Name(),
- bSameOrder: this.bSameOrder(),
- bSameOrder2: this.bSameOrder2(),
- };
- },
- fromJS: function(data) {
- if(data) {
- this.SiteId(data.SiteId);
- this.BusinessFieldId(data.BusinessFieldId);
- this.PurchaseRequestId(data.PurchaseRequestId);
- this.PurchaseTypeId(data.PurchaseTypeId);
- this.RequestDate(data.RequestDate);
- this.RequestUserId(data.RequestUserId);
- this.PurchaseHopeDate(data.PurchaseHopeDate);
- this.Title(data.Title);
- this.Reason(data.Reason);
- this.ProgressId(data.ProgressId);
- this.ApprovalDate(data.ApprovalDate);
- this.ApprovalUserId(data.ApprovalUserId);
- this.CmBusinessField_Name(data.CmBusinessField_Name);
- this.FmsMaterialCodeProgress_Name(data.FmsMaterialCodeProgress_Name);
- this.RequestUserId_Name(data.RequestUserId_Name);
- this.ApprovalUserId_Name(data.ApprovalUserId_Name);
- this.bSameOrder(data.bSameOrder);
- this.bSameOrder2(data.bSameOrder2);
- }
- }
- });
- })();
|