| | |
| | | import android.widget.EditText;
|
| | | import android.widget.LinearLayout;
|
| | | import android.widget.TextView;
|
| | | import android.widget.Toast;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | | import com.bsk.zhangbo.demoforbsk.base.BaseFragment;
|
| | | import com.bsk.zhangbo.demoforbsk.com.bsk.zhangbo.demoforbsk.service.DictionaryService;
|
| | | import com.bsk.zhangbo.demoforbsk.com.bsk.zhangbo.demoforbsk.service.VisitorTypeService;
|
| | | import com.bsk.zhangbo.demoforbsk.listeners.OkButtonClickedListener;
|
| | | import com.bsk.zhangbo.demoforbsk.util.AppApi;
|
| | | import com.bsk.zhangbo.demoforbsk.widget.BirthdayPickerDialog;
|
| | | import com.bsk.zhangbo.demoforbsk.widget.CountrySelectionPopup;
|
| | | import com.bsk.zhangbo.demoforbsk.widget.SingleSelectionPopup;
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import cn.com.basic.face.discern.common.BaseCommonCallBack;
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.discern.entity.Dictionary;
|
| | | import cn.com.basic.face.discern.query.item.VistorTypeQueryItem;
|
| | |
|
| | | /**
|
| | |
| | | private View mViewName,mViewSex,mViewNation,mViewBirthday,mViewVisitorClass,mViewPhone,mViewIdClass,mViewIdNumber,mViewCompayName,mViewRemark;
|
| | | private TextView mViewNameTitle,mViewSexTitle,mViewNationTitle,mViewBirthdyTitle,mViewIdClassContent,mViewSexContent,mViewNationContent,mViewBirthdyContent,mViewVisitorClassContent,mViewVisitorClassTitle,mViewPhoneTitle,mViewIdClassTitle,mViewIdNumberTitle,mViewCompanyNameTitle,mViewRemarkTitle;
|
| | | private EditText mViewNameContent,mViewPhoneContent,mViewIdNumberContent,mViewCompanyNameContent,mViewRemarkContent;
|
| | | private List<String> mSexList;
|
| | | private List<String> mVisitorTypeList;
|
| | | private List<String> mCredentialsList;
|
| | | private List mSexList;
|
| | | private List mVisitorTypeList;
|
| | | private List mCredentialsList;
|
| | | private List mNationList;
|
| | | private LinearLayout mBaseLayout;
|
| | | private int mNowYear;
|
| | | private int mNowMonth;
|
| | |
| | |
|
| | | @Override
|
| | | protected void initData() {
|
| | | RequestParams params = new RequestParams("http://192.168.1.51:8080/ssm/VisitorType/v_list.do");
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<VistorTypeQueryItem> items = getList(VistorTypeQueryItem.class);
|
| | | mVisitorTypeList = new ArrayList<String>();
|
| | | mViewVisitorClassContent.setText(items.get(0).getLabel());
|
| | | for (VistorTypeQueryItem item : items) {
|
| | | mVisitorTypeList.add(item.getLabel());
|
| | | }
|
| | | }
|
| | |
|
| | | });
|
| | |
|
| | | mSexList = new ArrayList<>();
|
| | | mSexList.add("男");
|
| | | mSexList.add("女");
|
| | |
|
| | | mCredentialsList = new ArrayList<>();
|
| | | mCredentialsList.add("名片");
|
| | | mCredentialsList.add("身份证");
|
| | |
|
| | | mViewIdClassContent.setText(mCredentialsList.get(0));
|
| | | mVisitorTypeList = VisitorTypeService.mVisitorTypeList;
|
| | | mSexList = DictionaryService.mSexList;
|
| | | mCredentialsList = DictionaryService.mCredentialsList;
|
| | | mNationList = DictionaryService.nationList;
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | });
|
| | | break;
|
| | | case R.id.register_nation:
|
| | | // Toast.makeText(getActivity(),"中国",Toast.LENGTH_SHORT).show();
|
| | | CountrySelectionPopup countrySelectionPopup = new CountrySelectionPopup(getActivity());
|
| | | countrySelectionPopup.showAtLocation(mBaseLayout, Gravity.CENTER,0,0);
|
| | | countrySelectionPopup.addOkButtonClickedListener(new OkButtonClickedListener() {
|
| | | @Override
|
| | | public void onItemSelected(int position, Object o, String item) {
|
| | | mViewNationContent.setText(item);
|
| | | }
|
| | | });
|
| | | break;
|
| | | case R.id.register_birthday:
|
| | | // Toast.makeText(getActivity(),"1990-1-1",Toast.LENGTH_SHORT).show();
|
| | | // datePickerDialog.show();
|
| | | showDatePicker();
|
| | | break;
|
| | | case R.id.register_visitor_class:
|
| | |
| | | @Override
|
| | | public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
|
| | | int month=monthOfYear+1;
|
| | | Toast.makeText(
|
| | | getActivity(),
|
| | | year + "-" + month + "-" + dayOfMonth,
|
| | | Toast.LENGTH_SHORT).show();
|
| | | mViewBirthdyContent.setText(year+"-"+month+"-"+dayOfMonth);
|
| | | }
|
| | | },date);
|
| | | myDatePickerDialog.myShow();
|