|
@@ -207,9 +207,14 @@ public:
|
|
|
LOGD("单个女孩");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ getMainInfo();
|
|
|
}
|
|
|
|
|
|
- getClerk(frameBed["customer_id"].asInt());
|
|
|
+ int customerId = frameBed["customer_id"].asInt();
|
|
|
+ if (customerId != 0) {
|
|
|
+ getClerk(frameBed["customer_id"].asInt());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void getClerk(int customerId) {
|
|
@@ -223,16 +228,39 @@ public:
|
|
|
Json::Value root;
|
|
|
if (reader.parse(r.body, root, false)){
|
|
|
nurseInfo = root;
|
|
|
- getMainInfo();
|
|
|
+ string clerkName = nurseInfo["clerk_name"].asString();
|
|
|
+ if (clerkName != "") {
|
|
|
+ mNurseNameTextViewPtr->setText(nurseInfo["clerk_name"].asCString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (babySex == BabySex.girl || babySex == BabySex.twins_girl) {
|
|
|
+ // 护士
|
|
|
+ mNursePhotoPainterPtr->setBackgroundPic("nurse_red.png");
|
|
|
+ mNurseNameTextViewPtr->setTextColor(redDeepColour);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // 护士
|
|
|
+ mNursePhotoPainterPtr->setBackgroundPic("nurse_blue.png");
|
|
|
+ mNurseNameTextViewPtr->setTextColor(buleDeepColour);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void getMainInfo() {
|
|
|
- mCustomerNameTextViewPtr->setText(frameBed["customer_name"].asCString());
|
|
|
- mDescTextViewPtr->setText(frameBed["customer_illness_desc"].asCString());
|
|
|
- mDescTextViewPtr->setVisible(true);
|
|
|
+ string customerName = frameBed["customer_name"].asString();
|
|
|
+ if (customerName == "") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ mCustomerNameTextViewPtr->setText(customerName);
|
|
|
+ string descText = frameBed["customer_illness_desc"].asString();
|
|
|
+ if (descText != "") {
|
|
|
+ mDescTextViewPtr->setText(descText);
|
|
|
+ mDescTextViewPtr->setVisible(true);
|
|
|
+ }
|
|
|
|
|
|
string inDateStr = LANGUAGEMANAGER->getValue("InTime");
|
|
|
string inDate = frameBed["customer_in_date"].asString();
|
|
@@ -261,8 +289,6 @@ public:
|
|
|
}
|
|
|
mOutDateTextViewPtr->setText(outDateStr + outDate);
|
|
|
|
|
|
- mNurseNameTextViewPtr->setText(nurseInfo["clerk_name"].asCString());
|
|
|
-
|
|
|
if (babySex == BabySex.girl || babySex == BabySex.twins_girl) {
|
|
|
// 背景
|
|
|
mMainPainterPtr->setBackgroundColor(redLightColour);
|
|
@@ -278,10 +304,6 @@ public:
|
|
|
mOutDateTextViewPtr->setTextColor(redDeepColour);
|
|
|
mMsgPainterPtr->setBackgroundPic("/main/msg_red.png");
|
|
|
|
|
|
- // 护士
|
|
|
- mNursePhotoPainterPtr->setBackgroundPic("nurse_red.png");
|
|
|
- mNurseNameTextViewPtr->setTextColor(redDeepColour);
|
|
|
-
|
|
|
// 更多
|
|
|
mMoreButtonPtr->setTextColor(redDeepColour);
|
|
|
|
|
@@ -322,6 +344,10 @@ public:
|
|
|
mBabySexTextViewPtr->setVisible(true);
|
|
|
mBabySexTextViewPtr->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
mBabySexTextViewPtr->setBackgroundColor(redDeepColour);
|
|
|
+
|
|
|
+ mBabyNameTextView2Ptr->setVisible(false);
|
|
|
+ mBabyBirTextView2Ptr->setText("");
|
|
|
+ mBabySexTextView2Ptr->setVisible(false);
|
|
|
}
|
|
|
else { // 双胞胎女孩
|
|
|
// 主图
|
|
@@ -393,11 +419,6 @@ public:
|
|
|
mInDateTextViewPtr->setTextColor(buleDeepColour);
|
|
|
mOutDateTextViewPtr->setTextColor(buleDeepColour);
|
|
|
mMsgPainterPtr->setBackgroundPic("/main/msg_blue.png");
|
|
|
-
|
|
|
- // 护士
|
|
|
- mNursePhotoPainterPtr->setBackgroundPic("nurse_blue.png");
|
|
|
- mNurseNameTextViewPtr->setTextColor(buleDeepColour);
|
|
|
-
|
|
|
// 更多
|
|
|
mMoreButtonPtr->setTextColor(buleDeepColour);
|
|
|
|
|
@@ -439,6 +460,11 @@ public:
|
|
|
mBabySexTextViewPtr->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
mBabySexTextViewPtr->setBackgroundColor(buleDeepColour);
|
|
|
|
|
|
+
|
|
|
+ mBabyNameTextView2Ptr->setVisible(false);
|
|
|
+ mBabyBirTextView2Ptr->setText("");
|
|
|
+ mBabySexTextView2Ptr->setVisible(false);
|
|
|
+
|
|
|
}
|
|
|
else if (babySex == BabySex.twins_boy) { // 双胞胎男孩
|
|
|
// 主图
|