|
@@ -56,33 +56,40 @@
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.monthView];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
[self.companyView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.companyView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.top.equalTo(self.monthView.mas_bottom).offset(0);
|
|
make.top.equalTo(self.monthView.mas_bottom).offset(0);
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.companyView];
|
|
|
|
|
+
|
|
|
[self.nameView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.nameView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
|
|
|
make.top.equalTo(self.companyView.mas_bottom).offset(0);
|
|
make.top.equalTo(self.companyView.mas_bottom).offset(0);
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.nameView];
|
|
|
|
|
+
|
|
|
[self.workNumberView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.workNumberView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
|
|
|
make.top.equalTo(self.nameView.mas_bottom).offset(0);
|
|
make.top.equalTo(self.nameView.mas_bottom).offset(0);
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
-
|
|
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.workNumberView];
|
|
|
|
|
|
|
|
self.monthView.contentLabel.text = data[kHJSalaryKeyMonth][kHJSalaryKeyInnerValue];
|
|
self.monthView.contentLabel.text = data[kHJSalaryKeyMonth][kHJSalaryKeyInnerValue];
|
|
|
self.companyView.contentLabel.text = data[kHJSalaryKeyCompanyName][kHJSalaryKeyInnerValue];
|
|
self.companyView.contentLabel.text = data[kHJSalaryKeyCompanyName][kHJSalaryKeyInnerValue];
|
|
|
self.nameView.contentLabel.text = data[kHJSalaryKeyEmployeeName][kHJSalaryKeyInnerValue];
|
|
self.nameView.contentLabel.text = data[kHJSalaryKeyEmployeeName][kHJSalaryKeyInnerValue];
|
|
|
self.workNumberView.contentLabel.text = data[kHJSalaryKeyEmployeeNumber][kHJSalaryKeyInnerValue];
|
|
self.workNumberView.contentLabel.text = data[kHJSalaryKeyEmployeeNumber][kHJSalaryKeyInnerValue];
|
|
|
|
|
|
|
|
- self.grossPaymentView.contentLabel.text = data[kHJSalaryKeyGrossPayment][kHJSalaryKeyInnerValue];
|
|
|
|
|
|
|
+ self.grossPaymentView.contentLabel.text = [NSString stringWithFormat:@"%.2f",[data[kHJSalaryKeyGrossPayment][kHJSalaryKeyInnerValue] floatValue]];
|
|
|
self.totalChargebackView.contentLabel.text = data[kHJSalaryKeyCutPayment][kHJSalaryKeyInnerValue];
|
|
self.totalChargebackView.contentLabel.text = data[kHJSalaryKeyCutPayment][kHJSalaryKeyInnerValue];
|
|
|
- self.netPaymentView.contentLabel.text = data[kHJSalaryKeyNetPayment][kHJSalaryKeyInnerValue];
|
|
|
|
|
|
|
+ self.netPaymentView.contentLabel.text = [NSString stringWithFormat:@"%.2f",[data[kHJSalaryKeyNetPayment][kHJSalaryKeyInnerValue] floatValue]];
|
|
|
|
|
|
|
|
|
|
|
|
|
self.lastListView = self.workNumberView;
|
|
self.lastListView = self.workNumberView;
|
|
@@ -91,6 +98,10 @@
|
|
|
for (int i = 0; i < listArray.count; i ++ )
|
|
for (int i = 0; i < listArray.count; i ++ )
|
|
|
{
|
|
{
|
|
|
HJLabelContentView *listView = [[HJLabelContentView alloc]init];
|
|
HJLabelContentView *listView = [[HJLabelContentView alloc]init];
|
|
|
|
|
+ [listView.contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
+ make.centerY.equalTo(listView);
|
|
|
|
|
+ make.left.equalTo(listView.mas_left).offset(120);
|
|
|
|
|
+ }];
|
|
|
listView.titleLabel.text = listArray[i][kHJSalaryKeyInnerKey];
|
|
listView.titleLabel.text = listArray[i][kHJSalaryKeyInnerKey];
|
|
|
listView.contentLabel.text = listArray[i][kHJSalaryKeyInnerValue];
|
|
listView.contentLabel.text = listArray[i][kHJSalaryKeyInnerValue];
|
|
|
|
|
|
|
@@ -112,12 +123,16 @@
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.grossPaymentView];
|
|
|
|
|
+
|
|
|
[self.totalChargebackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.totalChargebackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
|
|
|
make.top.equalTo(self.grossPaymentView.mas_bottom).offset(0);
|
|
make.top.equalTo(self.grossPaymentView.mas_bottom).offset(0);
|
|
|
make.left.right.equalTo(self).offset(0);
|
|
make.left.right.equalTo(self).offset(0);
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.totalChargebackView];
|
|
|
|
|
+
|
|
|
[self.netPaymentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.netPaymentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
|
|
|
make.top.equalTo(self.totalChargebackView.mas_bottom).offset(0);
|
|
make.top.equalTo(self.totalChargebackView.mas_bottom).offset(0);
|
|
@@ -125,10 +140,17 @@
|
|
|
make.height.mas_equalTo(58);
|
|
make.height.mas_equalTo(58);
|
|
|
make.bottom.equalTo(self.mas_bottom).offset(0);
|
|
make.bottom.equalTo(self.mas_bottom).offset(0);
|
|
|
}];
|
|
}];
|
|
|
|
|
+ [self autoLayOutHJLabelContentView:self.netPaymentView];
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+- (void)autoLayOutHJLabelContentView:(HJLabelContentView *)view {
|
|
|
|
|
+
|
|
|
|
|
+ [view.contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
|
+ make.centerY.equalTo(view);
|
|
|
|
|
+ make.left.equalTo(view.mas_left).offset(120);
|
|
|
|
|
+ }];
|
|
|
|
|
+}
|
|
|
#pragma mark - getters and setters
|
|
#pragma mark - getters and setters
|
|
|
|
|
|
|
|
- (HJLabelContentView *)monthView {
|
|
- (HJLabelContentView *)monthView {
|