صفحه ی اول
نمای مینی اپ به صورت زیر میباشد
کد ها
<page id="main-page" title="تصدیق اصالت سند" layout="linear_vertical" margin="0" padding="16"
scrollable="false" gravity="top" height="match_parent" width="match_parent" clearBackStack="true">
<include layout="pages/main/main.js.appsan" />
<frame id="content" layout="linear_vertical" margin="0" padding="0" weightsum="1" scrollable="false"
height="match_parent">
<frame layout="linear_vertical" gravity="top" margin="0" padding="0" scrollable="true" weight="1" weightsum="1">
<frame layout="linear_horizontal" weightsum="1" background="#D5E3FF"
reverse="true" padding_bottom="10" layoutgravity="top"
padding_top="10" padding_left="16" padding_right="16"
borderCornerRadius="4" >
<img src="images/warning.png" width="24" height="24" scaleType="fit_center"/>
<text weight="1" textsize="14" textcolor="#0164BC" textstyle="normal"
text="اسناد ثبت شده از سال ۱۳۹۳ به بعد در سامانه میباشد." />
</frame>
<frame layout="linear_vertical" margin_top="16" margin="0" width="match_parent">
<text textsize="16" textcolor="#424750" textstyle="bold"
text="تصدیق اصالت سند اسناد رسمی" />
<img src="images/header.png" width="91"
height="91" scaleType="fit_center"/>
<frame layout="linear_vertical" margin="0"
margin_top="16" margin_bottom="32" width="match_parent">
<material-textinput id="doc_text_id" margin_left="10" margin_right="10"
rtl="true" expandHint="true" borderCornerRadius="4" width="match_parent"
erroricon="images/error_icon.png" hint="شناسه سند" margin="0"
>
<textinput hintsize="11" hintcolor="#424750" textsize="11" textcolor="black" maxlength="18"
id="doc_id" padding_top="16" width="match_parent"
padding_bottom="16" padding_right="12"
padding_left="12" inputtype="number"
onChange="script/main-script:check_empty_fields()"/>
</material-textinput>
<material-textinput margin_left="10" margin_right="10" expandHint="true" rtl="true"
endiconmode="password_toggle" showendicon="true"
hint="رمز تصدیق" borderCornerRadius="4"
hideArrow="true" margin_top="16" margin="0" >
<textinput hintsize="11" hintcolor="#424750" textsize="11" textcolor="black" id="pass_id"
padding_top="16" padding_bottom="16" padding_right="12" borderCornerRadius="4"
padding_left="12" inputtype="number_password"
onChange="script/main-script:check_empty_fields()"/>
</material-textinput>
</frame>
</frame>
</frame>
<frame layout="frame" layoutgravity="bottom_center" margin="0" >
<button height="wrap_content" onclick="script/main-script:check_inputs()"
textsize="14" id="btn_id"
width="match_parent" text="بررسی" textcolor="white" background="#92C0E2"
borderCornerRadius="4" elevation="0" enabled="false" />
</frame>
</frame>
</page>
<include layout="pages/main/dialogs/waiting.xml.appsan" />
<include layout="pages/result/result.xml.appsan" />
<include layout="pages/main/dialogs/waiting.js.appsan" />
<script id="main-script">
function check_empty_fields(id='doc_id', password='pass_id', btn='btn_id') {
if (Appsan.findElementById(password).value.length > 0 ) {
Appsan.setProperty(btn, 'background', '#0164BC');
Appsan.setProperty(btn, 'enabled', 'true');
return true;
} else {
Appsan.setProperty(btn, 'background', '#92C0E2');
Appsan.setProperty(btn, 'enabled', 'false');
return false;
}
}
function check_inputs(doc_id='doc_id', password='pass_id') {
let id = Appsan.findElementById(doc_id).value
let pass = Appsan.findElementById(password).value
let valid_id_number = 18
if (check_empty_fields()) {
if (id.length === valid_id_number){
Appsan.setProperty('doc_text_id', 'showError', 'false');
Appsan.runAction('dialog/waiting-dialog');
} else {
Appsan.setProperty('doc_text_id', 'showError', 'true');
Appsan.setProperty('doc_text_id', 'error', 'تعداد ارقام وارد شده صحیح نمیباشد.');
}
}
}
</script>
No Comments