12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- (function () {
- BemsWebApplication.FmsMonthlyStoredReleaseStatusViewViewModel = function (data) {
- this.SiteId = ko.observable();
- this.BusinessFieldId = ko.observable();
- this.MaterialId = ko.observable();
- this.MaterialCode = ko.observable();
- this.Name = ko.observable();
- this.Unit = ko.observable();
- this.StoredYear = ko.observable();
- this.StoredMonth = ko.observable();
- this.UnitCost = ko.observable();
- this.StockCount = ko.observable();
- this.StoredCount = ko.observable();
- this.ReleaseCount = ko.observable();
- this.ReleaseTotalCost = ko.observable();
- this.StockRemainCount = ko.observable();
- this.StockRemainAmount = ko.observable();
- this.FirstClassId = ko.observable();
- this.SecondClassId = ko.observable();
- this.ThirdClassId = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.FmsMonthlyStoredReleaseStatusViewViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- BusinessFieldId: this.BusinessFieldId(),
- MaterialId: this.MaterialId(),
- MaterialCode: this.MaterialCode(),
- Name: this.Name(),
- Unit: this.Unit(),
- StoredYear: this.StoredYear(),
- StoredMonth: this.StoredMonth(),
- UnitCost: this.UnitCost(),
- StockCount: this.StockCount(),
- StoredCount: this.StoredCount(),
- ReleaseCount: this.ReleaseCount(),
- ReleaseTotalCost: this.ReleaseTotalCost(),
- StockRemainCount: this.StockRemainCount(),
- StockRemainAmount: this.StockRemainAmount(),
- FirstClassId: this.FirstClassId(),
- SecondClassId: this.SecondClassId(),
- ThirdClassId: this.ThirdClassId(),
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.BusinessFieldId(data.BusinessFieldId);
- this.MaterialId(data.MaterialId);
- this.MaterialCode(data.MaterialCode);
- this.Name(data.Name);
- this.Unit(data.Unit);
- this.StoredYear(data.StoredYear);
- this.StoredMonth(data.StoredMonth);
- this.UnitCost(data.UnitCost);
- this.StockCount(data.StockCount);
- this.StoredCount(data.StoredCount);
- this.ReleaseCount(data.ReleaseCount);
- this.ReleaseTotalCost(data.ReleaseTotalCost);
- this.StockRemainCount(data.StockRemainCount);
- this.StockRemainAmount(data.StockRemainAmount);
- this.FirstClassId(data.FirstClassId);
- this.SecondClassId(data.SecondClassId);
- this.ThirdClassId(data.ThirdClassId);
- }
- }
- });
- })();
|