|
@@ -572,59 +572,69 @@ static int getListItemCount_BedListView(const ZKListView *pListView) {
|
|
|
|
|
|
static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
|
|
static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
|
|
//LOGD(" obtainListItemData_ BedListView !!!\n");
|
|
//LOGD(" obtainListItemData_ BedListView !!!\n");
|
|
|
|
+
|
|
if (frameBedList.size() > 0) {
|
|
if (frameBedList.size() > 0) {
|
|
|
|
+ ZKListView::ZKListSubItem* bedNum = pListItem->findSubItemByID(ID_MAIN_BedNumSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* name = pListItem->findSubItemByID(ID_MAIN_CustomerNameSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* age = pListItem->findSubItemByID(ID_MAIN_AgeSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* sex = pListItem->findSubItemByID(ID_MAIN_SexSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* doctorTitle = pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* nurseTitle = pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* doctor = pListItem->findSubItemByID(ID_MAIN_DoctorSubItem);
|
|
|
|
+ ZKListView::ZKListSubItem* nurse = pListItem->findSubItemByID(ID_MAIN_NurseSubItem);
|
|
|
|
+
|
|
string frameBedName = frameBedList[index]["frame_bed"]["full_name"].asString();
|
|
string frameBedName = frameBedList[index]["frame_bed"]["full_name"].asString();
|
|
if (frameBedName == "") {
|
|
if (frameBedName == "") {
|
|
- pListItem->findSubItemByID(ID_MAIN_BedNumSubItem)->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
|
|
|
|
|
|
+ bedNum->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
|
|
} else {
|
|
} else {
|
|
int nPos = frameBedName.find("-");
|
|
int nPos = frameBedName.find("-");
|
|
if (nPos != -1) {
|
|
if (nPos != -1) {
|
|
frameBedName = frameBedName.substr(nPos + 1, frameBedName.length());
|
|
frameBedName = frameBedName.substr(nPos + 1, frameBedName.length());
|
|
}
|
|
}
|
|
- pListItem->findSubItemByID(ID_MAIN_BedNumSubItem)->setText(frameBedName);
|
|
|
|
|
|
+ bedNum->setText(frameBedName);
|
|
}
|
|
}
|
|
|
|
|
|
// 用户相关
|
|
// 用户相关
|
|
string customerName = frameBedList[index]["customer_name"].asString();
|
|
string customerName = frameBedList[index]["customer_name"].asString();
|
|
if (customerName == "") {
|
|
if (customerName == "") {
|
|
- pListItem->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
|
|
|
|
|
|
+ name->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
|
|
} else {
|
|
} else {
|
|
- pListItem->setText(customerName);
|
|
|
|
|
|
+ name->setText(customerName);
|
|
}
|
|
}
|
|
- pListItem->findSubItemByID(ID_MAIN_AgeSubItem)->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
|
|
|
|
|
|
+ age->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
|
|
|
|
|
|
string customerSex = frameBedList[index]["customer_sex"].asString();
|
|
string customerSex = frameBedList[index]["customer_sex"].asString();
|
|
if (customerSex == "0") { // 如果性别为女性,替换成女性,底色为粉色
|
|
if (customerSex == "0") { // 如果性别为女性,替换成女性,底色为粉色
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0xFF9F9F);
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/woman.png");
|
|
|
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Woman"));
|
|
|
|
+ sex->setTextColor(0xFF9F9F);
|
|
|
|
+ sex->setBackgroundPic("main/woman.png");
|
|
}
|
|
}
|
|
else if (customerSex == "1") {
|
|
else if (customerSex == "1") {
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0x3A78EF);
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/man.png");
|
|
|
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Man"));
|
|
|
|
+ sex->setTextColor(0x3A78EF);
|
|
|
|
+ sex->setBackgroundPic("main/man.png");
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Unknown"));
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0x37B643);
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/age.png");
|
|
|
|
|
|
+ sex->setText(LANGUAGEMANAGER->getValue("Unknown"));
|
|
|
|
+ sex->setTextColor(0x37B643);
|
|
|
|
+ sex->setBackgroundPic("main/age.png");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
// 医生护士相关
|
|
// 医生护士相关
|
|
if (rightTitleInfo["doctor_valid"] != 1){
|
|
if (rightTitleInfo["doctor_valid"] != 1){
|
|
- pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem)->setVisible(false);
|
|
|
|
|
|
+ doctorTitle->setVisible(false);
|
|
} else {
|
|
} else {
|
|
- pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem)->setText(rightTitleInfo["doctor_title"].asString());
|
|
|
|
|
|
+ doctorTitle->setText(rightTitleInfo["doctor_title"].asString());
|
|
}
|
|
}
|
|
|
|
|
|
if (rightTitleInfo["nurse_valid"] != 1){
|
|
if (rightTitleInfo["nurse_valid"] != 1){
|
|
- pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem)->setVisible(false);
|
|
|
|
|
|
+ nurseTitle->setVisible(false);
|
|
} else {
|
|
} else {
|
|
- pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem)->setText(rightTitleInfo["nurse_title"].asString());
|
|
|
|
|
|
+ nurseTitle->setText(rightTitleInfo["nurse_title"].asString());
|
|
}
|
|
}
|
|
- pListItem->findSubItemByID(ID_MAIN_DoctorSubItem)->setText(frameBedList[index]["doctor_name"].asString());
|
|
|
|
- pListItem->findSubItemByID(ID_MAIN_NurseSubItem)->setText(frameBedList[index]["nurse_name"].asString());
|
|
|
|
|
|
+ doctor->setText(frameBedList[index]["doctor_name"].asString());
|
|
|
|
+ nurse->setText(frameBedList[index]["nurse_name"].asString());
|
|
|
|
|
|
// // 护理项相关
|
|
// // 护理项相关
|
|
// Json::Value nurseConfigList = frameBedList[index]["nurse_config_dtos"];
|
|
// Json::Value nurseConfigList = frameBedList[index]["nurse_config_dtos"];
|