Commit 6f8c2677 by yucheng.jiang

汽轮机安卓版本app

parents
<widget id="A6157379969872" version="0.0.1">
<name>汽轮机智能储运</name>
<description>
Example For APICloud.
</description>
<author email="developer@apicloud.com" href="http://www.apicloud.com">
Developer
</author>
<content src="index.html" />
<access origin="*" />
<preference name="pageBounce" value="false"/>
<preference name="customRefreshHeader" value="UIPullRefresh"/>
<preference name="appBackground" value="rgba(0,0,0,0.0)"/>
<preference name="windowBackground" value="rgba(0,0,0,0.0)"/>
<preference name="frameBackgroundColor" value="rgba(0,0,0,0.0)"/>
<preference name="hScrollBarEnabled" value="false"/>
<preference name="vScrollBarEnabled" value="false"/>
<preference name="autoLaunch" value="true"/>
<preference name="fullScreen" value="false"/>
<preference name="autoUpdate" value="true"/>
<preference name="smartUpdate" value="false"/>
<preference name="debug" value="true"/>
<preference name="statusBarAppearance" value="true"/>
<preference name="checkSslTrusted" value="false" />
<permission name="readPhoneState"/>
<permission name="camera"/>
<permission name="record"/>
<permission name="location"/>
<permission name="fileSystem"/>
<permission name="internet"/>
<permission name="bootCompleted"/>
<permission name="hardware"/>
<preference name="softInputMode" value="pan"/>
<feature name="ajpush">
<param name="channel" value="qilunji"/>
<param name="app_key" value="d625f9b5b1ccf91bd300b2be"/>
</feature>
<feature name="aMap">
<!-- //ebcfb0b05daf0691debfdbedb06e9e5a -->
<param name="android_api_key" value="e010558845dccbe36b4b798912018e0e" />
<!-- <param name="ios_api_key" value="c6d4058008259cfb9b65cb6caf51517a" /> -->
</feature>
</widget>
html {
font-family: sans-serif;
}
html,
body,
header,
section,
footer,
div,
ul,
ol,
li,
img,
a,
span,
em,
del,
legend,
center,
strong,
var,
fieldset,
form,
label,
dl,
dt,
dd,
cite,
input,
hr,
time,
mark,
code,
figcaption,
figure,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin: 0;
border: 0;
padding: 0;
font-style: normal;
}
html,
body {
-webkit-touch-callout: none;
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-user-select: none;
background-color: #fff;
}
nav,
article,
aside,
details,
main,
header,
footer,
section,
fieldset,
figcaption,
figure {
display: block;
}
img,
a,
button,
em,
del,
strong,
var,
label,
cite,
small,
time,
mark,
code,
textarea {
display: inline-block;
}
header,
section,
footer {
position: relative;
}
ol,
ul {
list-style: none;
}
input,
button,
textarea {
border: 0;
margin: 0;
padding: 0;
font-size: 1em;
line-height: 1em;
/*-webkit-appearance:none;*/
background-color: rgba(0, 0, 0, 0);
outline: none;
}
span {
display: inline-block;
}
a:active,
a:hover {
outline: 0;
}
a,
a:visited {
text-decoration: none;
}
label,
.wordWrap {
word-wrap: break-word;
word-break: break-all;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
.clearfix:after {
content: ' ';
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.loading_more {
display: block;
height: 1.5em;
width: 100%;
}
.loading_more:before {
display: inline-block;
vertical-align: text-bottom;
content: ' ';
height: 16px;
width: 16px;
margin-right: 6px;
background: url(../image/loading_more.gif) no-repeat center;
-webkit-background-size: contain;
background-size: contain;
}
.loading_more:after {
content: '加载更多';
}
/*
* =========================================================================
* APIClud - AUI UI 框架 流浪男 QQ:343757327 http://www.auicss.com
* Verson 1.0
* =========================================================================
*/
@charset "UTF-8";
html{
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 20px;
}
html,body {
-webkit-touch-callout:none;
-webkit-text-size-adjust:none;
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
-webkit-user-select:none;
width: 100%;
}
body {
line-height: 1.5;
font-size: 0.8rem;
color: #212121;
background-color: #f5f5f5;
outline: 0;
}
html,body,header,section,footer,div,ul,ol,li,img,a,span,em,del,legend,center,strong,var,fieldset,form,label,dl,dt,dd,cite,input,hr,time,mark,code,figcaption,figure,textarea,h1,h2,h3,h4,h5,h6,p{
margin:0;
border:0;
padding:0;
font-style:normal;
}
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-user-select: none;
-webkit-tap-highlight-color: transparent;
outline: none;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 21px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
.aui-flex-col,
.aui-flex-row {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.aui-flex-col:before,
.aui-flex-row:before,
.aui-flex-col:after,
.aui-flex-row:after {
content: " ";
display: -webkit-box;
display: -webkit-flex;
display: flex;
box-sizing: border-box;
}
.aui-flex-col:after,
.aui-flex-row:after {
clear: both;
}
.aui-flex-col {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
}
.aui-flex-row {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
}
/*栅格*/
.aui-flex-item-1 {
float: left;
width: 8.33333333%;
}
.aui-flex-offset-1 {
margin-left: 8.33333333%;
}
.aui-flex-item-2 {
float: left;
width: 16.66666667%;
}
.aui-flex-offset-2 {
margin-left: 16.66666667%;
}
.aui-flex-item-3 {
float: left;
width: 25%;
}
.aui-flex-offset-3 {
margin-left: 25%;
}
.aui-flex-item-4 {
float: left;
width: 33.33333333%;
}
.aui-flex-offset-4 {
margin-left: 33.33333333%;
}
.aui-flex-item-5 {
float: left;
width: 41.66666667%;
}
.aui-flex-offset-5 {
margin-left: 41.66666667%;
}
.aui-flex-item-6 {
float: left;
width: 50%;
}
.aui-flex-offset-6 {
margin-left: 50%;
}
.aui-flex-item-7 {
float: left;
width: 58.33333333%;
}
.aui-flex-offset-7 {
margin-left: 58.33333333%;
}
.aui-flex-item-8 {
float: left;
width: 66.66666667%;
}
.aui-flex-offset-8 {
margin-left: 66.66666667%;
}
.aui-flex-item-9 {
float: left;
width: 75%;
}
.aui-flex-offset-9 {
margin-left: 75%;
}
.aui-flex-item-10 {
float: left;
width: 83.33333333%;
}
.aui-flex-offset-10 {
margin-left: 83.33333333%;
}
.aui-flex-order-10 {
-webkit-box-ordinal-group: 11;
-webkit-order: 10;
order: 10;
}
.aui-flex-item-11 {
float: left;
width: 91.66666667%;
}
.aui-flex-offset-11 {
margin-left: 91.66666667%;
}
.aui-flex-item-12 {
float: left;
width: 100%;
}
.aui-flex-offset-12 {
margin-left: 100%;
}
.aui-flex-auto {
float: left;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1;
}
.aui-flex-between {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/*对齐*/
.aui-flex-col.aui-flex-left {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-col.aui-flex-right {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-col.aui-flex-top {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-col.aui-flex-bottom {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-col.aui-flex-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.aui-flex-col.aui-flex-middle {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-left {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-row.aui-flex-right {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-row.aui-flex-top {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-row.aui-flex-bottom {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-row.aui-flex-center {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-middle {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
[class*=aui-flex-item-]{
position: relative;
}
[class*=aui-flex-auto].aui-flex-left {
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-right {
margin-left: auto;
}
[class*=aui-flex-auto].aui-flex-top {
margin-bottom: auto;
}
[class*=aui-flex-auto].aui-flex-bottom {
margin-top: auto;
}
[class*=aui-flex-auto].aui-flex-center {
margin-left: auto;
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-middle {
margin-top: auto;
margin-bottom: auto;
}
\ No newline at end of file
/**
* aui-pull-refresh.css 下拉刷新
* verson 0.0.1
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
.aui-refresh-content {
position: relative;
-webkit-overflow-scrolling: touch;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.aui-refresh-load {
width: 100%;
height: 2.2rem;
position: absolute;
top: -2.2rem;
left: 0;
padding: 0.75rem 0;
}
.aui-refresh-pull-arrow {
width: 1.2rem;
height: 1.2rem;
position: absolute;
left: 50%;
top: 50%;
visibility: visible;
margin-left: -0.6rem;
margin-top: -0.6rem;
background: no-repeat center;
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.225 3.528c8.34 0 15.104 6.763 15.104 15.105 0 8.34-6.766 15.105-15.105 15.105-8.342 0-15.105-6.763-15.105-15.105S90.883 3.528 99.225 3.528zM76.567 48.843h45.315c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H76.567c-4.172 0-7.553-3.38-7.553-7.552v-5.035c0-4.172 3.38-7.552 7.553-7.552zm-10.07 35.245h65.455c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H66.497c-4.172 0-7.553-3.38-7.553-7.552V91.64c0-4.172 3.38-7.552 7.553-7.552zm8.044 87.596c-20.397-23.16-45.805-52.352-45.805-52.352h140.98s-25.146 28.735-45.4 51.884c-33.454 38.234-18.118 36.4-49.774.468z" fill="#707070" class="transform-group"/></svg>');
background-size: 1.2rem 1.2rem;
z-index: 10;
-webkit-transform: rotate(0deg) translate3d(0, 0, 0);
transform: rotate(0deg) translate3d(0, 0, 0);
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
}
.aui-refresh-content.aui-refresh-pull-down .aui-refresh-pull-arrow {
-webkit-transform: rotate(0deg) translate3d(0,0,0);
transform: rotate(0deg) translate3d(0,0,0);
}
.aui-refresh-content.aui-refresh-pull-up .aui-refresh-pull-arrow {
-webkit-transform: rotate(180deg) translate3d(0,0,0);
transform: rotate(180deg) translate3d(0,0,0);
}
.aui-refreshing .aui-refresh-pull-arrow{
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.917.167C45.52.167 1.28 43.642.03 97.737c1.153-47.204 37.045-85.08 81.153-85.08 44.834 0 81.184 39.147 81.184 87.426 0 10.346 8.387 18.738 18.733 18.738 10.342 0 18.733-8.39 18.733-18.737C199.833 44.9 155.1.167 99.917.167zm0 199.833c54.395 0 98.637-43.475 99.883-97.57-1.15 47.2-37.042 85.082-81.15 85.082-44.833 0-81.183-39.15-81.183-87.43 0-10.34-8.392-18.732-18.738-18.732C8.39 81.35 0 89.737 0 100.083 0 155.267 44.733 200 99.917 200z" fill="#707070" class="transform-group"/></svg>');
-webkit-animation: rotate 1s 0s linear infinite;
animation: rotate 1s 0s linear infinite;
}
\ No newline at end of file
/**
* aui-slide.css 轮播样式
* verson 0.0.2
* @author 流浪男
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
.aui-slide-wrap {
display: block;
position: relative;
list-style: none;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.aui-slide-wrap .aui-slide-node {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
list-style: none;
overflow: hidden;
background: #ffffff;
}
.aui-slide-node-center {
display: -moz-box;
display: -webkit-box;
display: box;
-moz-box-pack: center;
-webkit-box-pack: center;
box-pack: center;
}
.aui-slide-node-middle {
display: -moz-box;
display: -webkit-box;
display: box;
-moz-box-align: center;
-webkit-box-align: center;
box-align: center;
}
.aui-slide-node img {
width: 100%;
height: 100%;
}
.aui-slide-page-wrap {
width: 100%;
height: 30px;
line-height: 30px;
position: absolute;
padding: 0;
left: 0;
right: 0;
bottom: 5px;
z-index: 9999;
text-align: center;
}
.aui-slide-page-dot {
position: relative;
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
list-style: none;
margin: 5px 3px 0 3px;
background: #c7c7c7;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.aui-slide-page-line {
position: absolute;
bottom: -14px;
height: 1px !important;
position: relative;
display: inline-block;
background: #eeeeee;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.aui-slide-page-active {
background: #1abc9c;
from { opacity: 0.3; }
to { opacity: 1 }
}
.aui-slide-prev-btn,
.aui-slide-next-btn {
display: inline-block;
width: 50px;
height: 30px;
line-height: 30px;
font-size: 1.2em;
color: #1abc9c;
background: rgba(249,249,249,0.6);
position: relative;
}
.aui-slide-prev-btn {
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
}
.aui-slide-next-btn {
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
.aui-slide-prev-btn:active,
.aui-slide-next-btn:active {
color: #f1c40f;
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
body {
height: 100vh;
background-color: #fff;
}
.flex {
display: flex;
align-items: center;
}
.f50 {
font-size: 50px;
}
.f30 {
font-size: 30px;
}
.f40 {
font-size: 40px;
}
.orderDetail {
height: 250px;
background-image: linear-gradient(to bottom right, #6666CC, #E86F25);
color: #ffffff;
}
.aui-header-bar .aui-iconfont{
font-size: 1rem;
color: #fff;
}
.orderNum {
text-align: center;
margin-bottom: 10px;
}
.route {
height: 80px;
}
.shipaddress {
height: 80px;
}
.ml30 {
margin-left: 30px;
}
.materialImg {
width: 50px;
}
.materialImg img {
width: 100%;
}
.fff {
color: #fff;
}
.bgc {
background-color: #F6AC13;
}
.routeIcon {
width: 35px;
height: 35px;
line-height: 35px!important;
color: #fff;
border-radius: 50%;
background-color: #8FB2FC;
text-align: center;
}
.icon-yunshupeisong{
display: block;
width: 35px;
height: 35px;
}
.addressicon {
width: 40px;
height: 40px;
line-height: 40px!important;
text-align: center;
color: #8FB2FC;
}
.addword {
width: 80%;
text-align: center;
line-height: 20px;
margin-right: 20px;
}
.aui-list .aui-list-item-center {
flex: 1;
}
.boxicon {
width: 35px;
height: 35px;
line-height: 35px!important;
color: #fff;
border-radius: 50%;
background-color: #8FB2FC;
text-align: center;
}
.icon-kuaidi{
display: block;
width: 35px;
height: 35px;
font-size: 30px;
border-radius: 50%;
background-color: #8FB2FC;
}
.boxItem {
padding-left: 30px;
}
.boxItem p {
font-size: 16px;
color: #666666;
}
.stage{
width: 30%;
}
.state{
color: #c9c9c9;
}
.transport .line{
width: 10%;
height: 30px;
border-bottom: 1px dashed #fff;
}
/* 箱单详情 */
.transport {
height: 60px;
/* line-height: 60px; */
text-align: center;
display: flex;
justify-content: center;
}
.transport div {
display: inline-block;
height: 60px;
line-height: 60px;
}
.transport p {
line-height: 20px;
color: #fff;
}
.process {
text-align: center;
}
.list {
position: absolute;
top: 72px;
bottom: 85px;
width: 100%;
overflow: auto;
}
.btnbox {
display: flex;
justify-content: center;
width: 100%;
padding: 0 40px;
position: fixed;
bottom: 20px;
}
.check {
width: 150px;
background-color: #ff0000;
color: #fff;
}
.goodtitle{
display: inline-block;
width: 50%;
}
.goodstxt {
display: inline-block;
/* margin-left: 30px; */
width: 50%;
text-align: center;
}
.materialDetail{
width: 80%;
}
/* 装箱凭证 */
.black {
padding: 20px;
width: 100%;
position: absolute;
top: 70px;
bottom: 80px;
overflow: auto;
}
.black p {
color: #000000;
width: 50%;
height: 50px;
/* line-height: 50px; */
text-align: left;
}
.flexbtw {
display: flex;
justify-content: space-between;
}
.closeImg {
padding: 10px 20px;
flex-wrap: wrap;
}
.closeImg img {
width: 40%;
height: 100%;
margin: 10px 0;
}
/* 确认开箱 */
.makesure {
color: #ff0000;
text-align: center;
/*position: absolute;*/
/*bottom: 30%;*/
position: relative;
width: 60%;
left: 50%;
transform: translateX(-50%);
}
.checkOk {
width: 80%;
position: fixed;
bottom: 20px;
background-color: #ff0000;
margin: 0 5%;
}
.checkCamera{
width: 100%;
height: 100px;
text-align: center;
display: flex;
justify-content: center;
}
.checkCamera span{
display: block;
color: #666666;
}
.paizhao{
margin-right: 50px;
font-size: 80px;
width: 100px;
height: 100px;
line-height: 100px;
}
.icon-sheying{
font-size: 100px;
width: 100px;
height: 100px;
line-height: 100px;
}
body{
background:#F1F6FD;
}
#header {
position: fixed;
top:0px;
}
.sub-title {
color: #ffffff !important;
font-size: 0.7rem;
text-align: center;
height: 30px;
line-height: 30px;
}
.aui-grid [class*=aui-col-] {
padding: 0.75rem 0;
}
#subheader {
z-index: 999;
position: fixed;
}
.logo {
text-align: center;
/*background: #ffffff;*/
height: 150px;
padding-top: 40px;
}
.hidden{display: none;}
.text-white{color:#ffffff;}
.container{
margin-top: 55px;
}
.dotflag{border-radius: 20px;width: 15px;height: 15px;background: #002bff;margin-top:20px;}
.aui-border-b {
border-bottom: 1px solid #dddddd!important;
}
.aui-popup-top, .aui-popup-top-left, .aui-popup-top-right {
top: 3.25rem;
}
.selectbox{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
background-color: #ffffff;
}
.aui-col-xs-3{padding: 8px;}
.aui-badge{
top: 0rem;
left: 80%;
}
.userselected{width:100%;}
.equipselected{width:100%;}
.tagcon{ padding: 16px 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-wrap: wrap;
}
.uploadimagescon{
padding: 16px 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-wrap: wrap;
}
.tag{ cursor: pointer;
max-height: 32px;
margin-right: 16px;
margin-bottom: 15px; font-size: 14px;
line-height: 14px;
padding: 8px 35px 10px 0px;
border-radius: 16px;color: #fff;
background-color: #1677d9;}
.m-badge{
display: inline-block;
width: auto;
text-align: center;
min-width: 1rem;
height: 1rem;
padding: 0.1rem 0rem;
font-size: 0.6rem;
color: #ffffff;
background-color: #ff2600;
border-radius: 1rem;
position: relative;
top: -0.2rem;
left: 108%;
z-index: 5;
}
.photo-badge{
display: inline-block;
width: auto;
text-align: center;
min-width: 0.8rem;
height: 0.8rem;
line-height: 0.8rem;
font-size: 0.6rem;
color: #ffffff;
background-color: #ff2600;
border-radius: 0.4rem;
position: relative;
top: -0.7rem;
left: 84%;
z-index: 6;
}
.imgthumb{margin-left:10px;margin-top:10px;border:1px #ccc solid;display:inline-block;width: 73px;height:73px; position: relative;}
.imgin{position: absolute; top: 0px;width: 100%;height: 100%;}
.red{color:#FF0000;}
.blue{color:#1A8BFF;}
.noti{height:20px;width: 20px;display:inline; vertical-align: middle; margin-right: 10px;}
.checkjhwh{float: left;margin-right: 10px;}
.rcon{ right: 34px;
position: absolute;
}}
.abc{
border-bottom: 1px solid #ccc;
}
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1588143806208'); /* IE9 */
src: url('iconfont.eot?t=1588143806208#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAwUAAsAAAAAFVAAAAvHAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFJAqaQJRlATYCJANACyIABCAFhG0HgUQbixGjoqQSJpH9ZQFviKZ+w2rdLqc9na21XmtA3LyOPb7QGRU4DgkCIOZzK+OSlwgRAkzi4fnD37lv/cZemI+lRQFGYeJFFOgWiqIt0OVa5olUhcn4B1KvSqRQ4f5lk9uj3ASeZMFpNrZCtsJ1/vlt/n3vgYNHKVmuAjFyEyMxGBJrMNaJ8Zh5unFRiS6LWKf6K0HC5q55oJGwdm3+fz6wBwjs/A66ZQnS/ifIS7hUZVjehtEMqRhwLyZZYU2gLuurjRWD+7+1ls862s8G015298Tm4D4+Z76IWiLyLhEy1VRC4xEhUorHRCwYrE0OV0EY2fu53Qn0WNBVOD08v2J1BdMGqt2QAlb3ZCoJwaErrUWsWhL3KrrSn24D4M54+/gDyiBEUnPYopfXB4JtfxIeMewfc6tle6qO4LIWGXuYQnxEmt4BYmn2DF1PVFmcB8wS/w2X+SSgoOERG0chlIqWWYkKDY+oxM5DF410EoxylKpLr249skF9in4dA5J2++O1MF0fBG+Fg3wSZBzBJyWOyidN64l5AL3AYoBu4HEAPcAKgAwcClnVWAXQB6wFKMBmaDWHSwA6wBUAA8ANiCPxFYEtIG9o7iXMOVamsHpBBLds1lRuypLD6dI15WqyAgo6hzMeVWSVEBSlXG0hI00z9zaIuDhlH5eqHSRrxFLjYIBV4sXo+n4fOh2HNFPT9l4gMCcxcY3euCouee/TRlI0JNHiO8tpiunVFrbsog7XlHMOg8PBgrM3+u3tpXdGxJrPtu3qtrXlLvkMY1IyOt3pd5xG9wPpTICx/CYcU68FwhNmrZTtWgsJG6FMIauZDDSyOsRutEST5aQ6TLpAvenBXbvLc6B+nm+7ge1ZGIRBpgcI8aQLLJG8hLLMCPazb/h2YMtrO49HQj6cZZHMSLYFQWwZadEigLGlVswzvdvNJjGIp7IE61BzaRW8t2NdbL0UfPKBqPO2Ee3Oy+8LUVnvPRExfc+jUVf6HOcCvO4c/U+uFDtgtW039qpLvtWdcLz1as6Q3fUj/sV+Rt+7He91zg969yejNVdG9jmBN9j10XCFFVlqxE2X5VhuuOtyOIZDqAzL30oJFVmo0xl87Rakvvvcse1QlOwyNDCZIwRJ2xfcpNhxyqO1XyUBBOlAW+s9bD9cNFxyrkKqYsr4pWF4fUBLrHJ1rbsgdf04bH76VT/ldTYZ029UF1+WZnuWMfIY48RIEijD/cDWXUwiPmsEx+nUs2x5dgD1gcAnE0tsJ9jCqfblIjjRRgDP1DZjGrZQOSnCWchSSA1QI2hiCc7ilaXQg82bvNG2n/KPH9Mcnn81mgu2kFhpmkMT52QtgRG+oHYUZIaiQudAwEdbyxu8c9x1wfTLhvMAwEBSCNsSPjJsKoIkme/ZEumgq9NDmA7fQqEkiWYJyELfNs+SPhxN7SCXM6zHoHXXc/pMEkDTfGagLC6O3fPU4F6Fu3HqHY9Hj8bvOnRO59RHbqPLNW0ZG15xymwOw7Hf2LXsSyt029vQKnctYQxUQOw1KpO0gB3D+8RAoQOqrjCOocVlqzyVxV1z+1LopyTFKxCyByCsuZwcg5T5n1WMA0fa6c4R1nYeEKD1nGetls7S7vOdsDT0hXp68a1axoqT/yTdegS9bJ4lNtS9HUR+vymEx7YCKZ92JJCzw66oA8psuKN1sUWbX66SR1ba9bmlyk4DNFqME9tiZGInmOR1fJvUWb9UOqTjWyJ4dHPdtv1CzIWVnI7lNuT+oPRvaZ2euyaRnir+900B/a9Zr9uYzMLC3SJ/UVtnZ5to9/gJziQx8GVYC4okBy/Kf10L8tGw1uRy8mzBO4vc1zdXLnxLmlNumqERhJZ9si8fVbp+xaiP9jJAAhbxyFkafBwoZq/OLmHHgyhIRgN10S3UY6crpDBB/9tLPXH7ZQWOMG9DquE0jjEiBs5QZs1fvnK1sPHPf4wjGQmHU2cHXc/ScNQLo/CHhOPkG4nBW4tsUz/eJzYMtfA6l4Zbr06cufhrQ6kcSZh3K+EogIlE/Bx+En29eLlEMRIJuTza2rVZEQwi+/PA3/9yAv31j7bZv0/lXqhNLDgf5Vt0+oAu79wgSyXpvH1GuILrLBbzWQFFv2JXJCeFeYt5gV3FmalYwxo3MwmfhvczjlkEQFJGdIBmupcoJ2is4hy8cwlvaIIy8hf/gXleE3beX7hmf1RI1ob9+Sffn5eYZ7PY/g+8r4DUW5rVq+iqsAj5v8Mksd1dnV2gpICrVlutUss1ZgTnq7TaqmcuKfQilidJ39mPgyBcP0CQKnMWCRcurZ0wZmRREv6JRPIEavw5C/+E/i9JRSPrHxKXCoEyq/fQ5tGGoMLFwkwwlXFbpsSUY+Q5Mvu4adw7GcHYmEN+I2Eu/Cv0hi0dB1SsBMWsyBW2bIH22hX2tGjamCxjcM88Ky8bhP9xQHfgzypdVVIxoYAQV9956NDetWunJN41u81+OhAGL1LXf9sqdUiOflNXX6dFCd7CA1KHdAB+JTjn+dnhkMfLQ4YcQ/LUdclpv6j+8sODhxyHBklvCSipvbqisXQ9x8NZr1aXkry2xnbvWsD21sQqdpIHuYNkpYyH6zFNR4UDh3S2/x8HhG5ZW/P5xI7aD/AO6j3KjpqvWnJ0/acdlHvki0iL6XbLiC9rReuu54QXUnZk9+JkOaE7KN1nOjLqsHeSnLDMW3mX60UwpD41z5R5e16Y6Rb4T0U7VXM3Sn57xG25X53zlOhU7QM/XMXDU7R5/847veDcvHMdl5naw++PvSmfTOlxZbC0vc8EJtKNw+8CoinkHrd2008FGuCzdZ4d/R89inqYg2iDDR3ANeY9RAPMgVrbTMz/0TNJVGJr7QDxah9Ej6Fy0aOT+5pPt9mIA8w04lH0/1ryKN+o6HXtxaWblm7UloxMHVkyahS8BahAOliypzDUmB6yaHZISui6glHKFa99aTvh9TbbBphT2ubg9dSdb33N/g4zVIDBJsKm7QOxsZQyFoNMGDZztT1dIxCmp/cdhkEocMqGv1UNJXqS+BOByAdrIGC6WCu1U32EPlSVjSKn2GxKiyFubumajKysQqsmJ0djLczKyljToo8zBIwASlUyowSZqTKhV2KCRpPjJTU/rIoio74eVjDt8ssietHLy702fxIaCu09I2UypWf2QqEoyV9bAEGLKg9whH3kXFsrxQAM/ZXqz0f0FwQDTPoKK2PPileRBUswEKLUXOnfmW9Sk2/bW+23yUuMvarz5zz1Jm+7+okWS/v075E2RauiDVlC/PdiG5apxN2BYDD2wuuX1AbKy9cd9LiFNQKHoHohPb7h9Q9qg/jl97He630afdZ7X0Ct65INLLPDzDrVql6uggwGSMUpjVZbOa7vCk+i4gAWD2DRPflOISvAjMhl+HfAU+I/ZJM32A5vYy8qQ6KM0D6lon4XkCkF9XYgc6N4l0Sv2ZH5pkMBWvAxCCFUYeqBexXLK0Rw6JoNXF84vcxEi/iNQPo3G/L0XsIFCp78YhzM9GKXFKeJt+xA1aIw/stVybKGyrNnpKwyyZBvdTahhw/g8GQb8dekfjyz/OioH3dQ0jGPsi5rnCLYQ1WvfdR0OUA9dh2t3WuUURJlhR2vBIUhbygZ8IiyIT8UKAh+UTXhHzVDgaAeV7G1yV4bsbC5ZxAcCj5fcwp0JkWOa5rVL1D5BIxbaQhv0Fjy8lF/6C8+wgxNFUvYhRo7J7k0OuWHZG+YJJrnRkcYuH7oXD4bDGTUkv1Ap6zphIGA06IL3Nw6NQloGRnYaQZe/wJSvAQwCe2+Ut9AhkXD50b6hhk4R7osU7tdqWstKGOOEonLpoaW4g4pQQkv0Lg8eqYICjh9YQE2NzOg/cmsun7z+nTN66y+Dtl1DAWsqJpumJbtuNwery98NJbjGnrgXVgLcUPT4aiywOul76x9ZkOfI1mdqcasbZWUN1iWCaiaoEwJyGo21D7tqauxBxLUXvqEQCsPWUIVCzqFiqBNSDU4HFr3BVznJLUcQp2gGQM=') format('woff2'),
url('iconfont.woff?t=1588143806208') format('woff'),
url('iconfont.ttf?t=1588143806208') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1588143806208#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
/* font-size: 24px; */
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-icon-auth:before {
content: "\e608";
}
.icon-hezi401:before {
content: "\e693";
}
.icon-huowu:before {
content: "\e630";
}
.icon-yunshupeisong:before {
content: "\e652";
}
.icon-configure:before {
content: "\e60d";
}
.icon-flag:before {
content: "\e73c";
}
.icon-dingdan:before {
content: "\e686";
}
.icon-shouhuo:before {
content: "\e60f";
}
.icon-kuaidi:before {
content: "\e61e";
}
.icon-wuliaoguanli:before {
content: "\e62b";
}
.icon-saoma:before {
content: "\e619";
}
.icon-dizhi:before {
content: "\e640";
}
.icon-icon-test:before {
content: "\e660";
}
.icon-sheying:before {
content: "\e68b";
}
.icon-paizhao:before {
content: "\e639";
}
"less.compile" : {
"outExt": ".css"
}
\ No newline at end of file
body{
background-color: #fff;
height: 100%;
position: absolute;
top: 0px;
overflow-y: scroll;
/* 增加该属性,可以增加弹性 */
-webkit-overflow-scrolling: touch;
background: url('../image/login.png') 0 0 no-repeat;
background-size: cover;
}
.loginwrap{
width: 90%;
height: 60%;
margin: 0 auto;
background-color: #fff;
border-radius: 20px;
margin-top: 3rem;
box-shadow: 0 2px 2px 0 #C0C0C0;
/* height: ; */
}
.usertype{
height: 50px;
display: flex;
text-align: center;
}
.staff,.client{
height: 50px;
line-height: 50px;
width: 50%;
text-align: center;
margin: 0 20px;
border-bottom: 2px solid rgb(212, 209, 200);
}
.active{
/* box-shadow: 0 2px 2px 0 #C0C0C0 inset; */
color: #F9BA00;
border-bottom: 2px solid #F9BA00;
}
.aui-list{
width: 80%;
margin: 20px auto;
background-image: none;
}
.usersearch{
display: none;
}
.loginbtn, .searchbtn{
background: #F9BA00;
width: 60%;
margin: 20px auto;
}
.company{
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 80%;
}
.aui-btn:active {
background: #F6D37B;
}
\ No newline at end of file
.tagcon{ padding: 16px 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-wrap: wrap;
}
.uploadimagescon{
padding: 16px 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-wrap: wrap;
}
.tag{ cursor: pointer;
max-height: 32px;
margin-right: 16px;
margin-bottom: 15px; font-size: 14px;
line-height: 14px;
padding: 8px 35px 10px 0px;
border-radius: 16px;color: #fff;
background-color: #1677d9;}
.m-badge{
display: inline-block;
width: auto;
text-align: center;
min-width: 1rem;
height: 1rem;
padding: 0.1rem 0rem;
font-size: 0.6rem;
color: #ffffff;
background-color: #ff2600;
border-radius: 1rem;
position: relative;
top: -0.2rem;
left: 108%;
z-index: 5;
}
.photo-badge{
display: inline-block;
width: auto;
text-align: center;
min-width: 0.8rem;
height: 0.8rem;
line-height: 0.8rem;
font-size: 0.6rem;
color: #ffffff;
background-color: #ff2600;
border-radius: 0.4rem;
position: relative;
top: -0.7rem;
left: 84%;
z-index: 6;
}
.imgthumb{margin-left:10px;margin-top:10px;border:1px #ccc solid;display:inline-block;width: 73px;height:73px; position: relative;}
.imgin{position: absolute; top: 0px;width: 100%;height: 100%;}
.red{color:#FF0000;}
.noti{height:20px;width: 20px;display:inline; vertical-align: middle; margin-right: 10px;}
.checkjhwh{float: left;margin-right: 10px;}
.rcon{ right: 34px;
position: absolute;
}
* {
margin: 0;
padding: 0;
}
.flex {
display: flex;
}
body, html {
/* position: absolute;
width: 100%; */
height: 100vh;
position: relative;
}
.homehead {
background-color: #F6AC13;
height: 170px;
/* padding: 30px; */
color: #fff;
font-size: 24px;
padding-top: 40px;
padding-left: 20px;
text-align: left;
}
.tabBox {
display: flex;
justify-content: space-between;
position: absolute;
top: 100px;
width: 100%;
padding: 20px;
}
.tabBox span {
display: block;
}
.tabname {
text-align: center;
}
.tabItem1, .tabItem2, .tabItem3 {
width: 30%;
height: 100px;
background-color: #fff;
}
.tabItem1 {
border-bottom: 1px solid rgb(224, 199, 52);
}
.tabItem2 {
border-bottom: 1px solid rgb(31, 161, 111);
}
.tabItem3 {
border-bottom: 1px solid rgb(43, 81, 207);
}
.wuliao, .icon-huowu, .icon-icon-auth {
color: #F6AC13;
font-size: 40px;
margin-left: 10px;
}
.aui-btn:active {
background: #F6D37B;
}
#demo{
position: absolute;
top: 240px;
bottom: 0;
overflow: auto;
width: 100%;
}
/* 物料管理 */
.mlrem{
margin-left: 0.6rem;
}
.managehead {
background-color: #F6AC13;
color: #fff;
/* padding-top: 30px; */
padding-left: 20px;
font-size: 1rem;
text-align: left;
}
.bgfff {
background-color: #fff;
}
.content {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
padding-top: 120px;
/* background-color: rgb(244, 237, 250); */
}
.materialWrap {
width: 100%;
height: 100%;
}
.materialImg {
width: 50px;
}
.materialImg img {
width: 100%;
}
.qrcode1{
width: 80%;
justify-content: center;
align-items: center;
}
.qrcode, .mtinfo {
font-size: 50px;
justify-content: center;
align-items: center;
}
.qrcode input {
display: inline-block;
background-color: #fff;
border: 1px solid #333;
/* width: 60%; */
margin-left: 30px;
padding-left: 10px;
}
.mtinfo input {
display: inline-block;
background-color: #fff;
border: 1px solid #333;
width: 60%;
margin-left: 30px;
padding-left: 10px;
}
.search {
width: 66px;
height: 30px;
line-height: 30px;
background-color: #F6AC13;
padding: 0;
position: absolute;
right: 10%;
}
.searchWrap {
position: absolute;
top: 0;
padding-top: 120px;
width: 100%;
display: none;
height: 100%;
background-color: #fff;
}
.mtlist {
background-color: #fff;
height: 100%;
}
.mtInfo {
background-color: #fff;
height: 100%;
display: none;
}
.mtImg {
display: block;
margin: 0 auto;
}
.mtInfo div {
justify-content: space-between;
padding: 0 20px;
}
.mtInfo p {
color: #000;
font-size: 24px;
line-height: 30px;
width: 50%;
}
.closeBtn1 {
background-color: #F6AC13;
border-radius: 5px;
color: #fff;
height: 40px;
line-height: 40px;
width: 60%;
text-align: center;
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
}
.printBtn {
background-color: #F6AC13;
border-radius: 5px;
color: #fff;
height: 30px;
line-height: 30px;
width: 50px;
text-align: center;
}
.mtInfo .operateBox {
width: 100%;
position: absolute;
bottom: 10px;
padding: 0 10%;
justify-content: space-between;
}
.operateBox .printBtn2 {
background-color: #F6AC13;
border-radius: 5px;
color: #fff;
height: 40px;
line-height: 40px;
width: 45%;
text-align: center;
color: #fff;
font-size: .8rem;
}
/* 装箱清单管理 */
.boxlist {
width: 80%;
height: 340px;
margin: 30px auto;
background-color: #fff;
border: 1px solid #333;
}
.aui-list .aui-list-item .mtItem{
padding: 0.7rem 0 0.7rem .2rem;
}
.materialDetail{
width: 60%;
}
.numblock1{
display: inline-block;
width: 50%;
text-align: left;
}
.numblock{
display: block;
width: 60%;
/*height: 20px;*/
line-height: 20px;
text-align: center;
/* margin-left: 30px; */
}
.minus,.plus{
width: 20px;
height: 20px;
}
.minus{
margin-right: 10px;
}
.plus{
margin-left: 10px;
}
.startBox {
background-color: #F6AC13;
width: 60%;
margin: 20px auto;
/* position: fixed;
bottom: 20px; */
}
.infoItem {
height: 45px;
line-height: 45px;
font-size: 20px;
text-align: center;
}
.infoItem p:first-child {
width: 40%;
text-align: center;
color: #333;
}
.infoItem p:last-child {
width: 60%;
text-align: #666;
}
.lack {
width: 80%;
height: 180px;
font-size: 24px;
background-color: #fff;
position: absolute;
top: 40%;
left: 50%;
transform: translateX(-50%);
text-align: center;
}
.lackWrap{
width: 100%;
height: 100%;
background-color:rgba(51,51,51,0.5);
z-index: 10;
display: none;
position: absolute;
top: 0;
bottom: 0;
}
.lackUpload{
font-size: 1rem;
height: 30px;
white-space: nowrap;
}
.uploadImg{
width: 100%;
height: 250px;
background-color: #f2f2f2;
/* background-color: #fff; */
position: absolute;
bottom:0;
z-index: 100;
}
.icon-paizhao{
display: block;
font-size: 80px;
color: #c9c9c9;
margin-left: 20px;
}
.codebtn, .takepic {
height: 20px;
line-height: 20px;
text-align: center;
width: 60px;
font-size: 16px;
color: #fff;
border-radius: 10px;
}
.codebtn{
background-color: #F6AC13;
}
.takepic{
margin-top: 25px;
background-color: #3472f7;
}
.actual{
display: none;
}
/* 质检管理 */
.review {
width: 50%;
background-color: #F6AC13;
margin: 0 10px;
border-radius: 20px;
}
.picbox {
position: absolute;
bottom: 70px;
width: 100%;
height: 130px;
}
.closebtn {
background-color: #ff0000;
width: 75%;
margin: 0 auto;
border-radius: 20px;
}
.mytick {
position: relative;
width: 20px;
height: 20px;
border: 1px solid #F6AC13;
}
.icon-true {
/* 确认打钩*/
width: 8px;
height: 14px;
border-bottom: 2px solid #F6AC13;
border-right: 2px solid #F6AC13;
/* margin: 20px auto; */
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
top: 0;
left: 5px;
display: none;
}
/* 封箱 */
.notice{
text-align: center;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/cilent.css">
<link rel="stylesheet" href="../css/iconfont.css">
<title>装箱凭证</title>
</head>
<body>
<header class="aui-header-bar bgc" id="aui-header">
<div class="aui-header-left" tapmode onclick="closeWin()">
<span class="aui-iconfont aui-icon-left"></span>
</div>
<div class="aui-title fff">装箱凭证</div>
</header>
<section class="black">
<!-- <div class="flexbtw">
<p>装箱时间:</p>
<p>2020-03-01</p>
</div>
<div class="flexbtw">
<p>装箱人:</p>
<p>储运张三</p>
</div>
<div class="flexbtw">
<p>复核人:</p>
<p>质检李四</p>
</div>
<div class="flexbtw">
<p>封箱评论:</p>
<div>
</div>
</div>
<div>
<div>封箱照片:</div>
<div class="closeImg flexbtw">
<img src="../image/error-img.png" alt="">
<img src="../image/error-img.png" alt="">
</div>
</div>
<div>
<p>封箱视频:</p>
<div>
<video src="http://172.8.10.74:5002/Files/image/2020-05-08/111111.mp4" controls="controls"
style="display:block;height:100%;margin: 0 auto;"></video>
</div>
</div> -->
</section>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript">
var host, codeid;
apiready = function () {
ajaxsetup();
initRequire();//引入拍照模块
api.parseTapmode();
var header = $api.byId('aui-header');
$api.fixStatusBar(header);
host = $api.getStorage('host');
codeid = api.pageParam.codeid;
// codeid = 58;
gerCertificate();
};
function gerCertificate() {
let data = { code: codeid };
$.ajax({
type: "get",
url: host + "/itm/AppCustomer/GetSealDetail?codeid=" + codeid,//查看装箱凭证
contentType: "application/json;charset=utf-8",
async: true,
dataType: 'json',
success: function (res) {
console.log(JSON.stringify(res))
let content = res.data;
if (content) {
renderPage(content);
}
},
error(err) {
alert(JSON.stringify(err))
}
})
}
function renderPage(content) {
let html = `
<div class="flexbtw">
<p>装箱时间:</p>
<p>${content.packtime}</p>
</div>
<div class="flexbtw">
<p>装箱人:</p>
<p>${content.packuser}</p>
</div>
<div class="flexbtw">
<p>复核人:</p>
<p>${content.checkuser}</p>
</div>
`;
let arr = [],arr1=[],arr2=[];
let arrurl= [];
let a = '';
arr1 = content.sealimage;
arr2 = content.packimage;
arr = arr1.concat(arr2);
let errorImg = '../image/error-img.png';
if (arr.length > 0) {
for (let i = 0; i < arr.length; i++) {
if(arr[i]==''){
arr[i] = '../image/error-img.png';
a += `<img src="${arr[i]}" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">`;
}
else{
var imgStr = arr[i];
a += `<img src="`+imgStr+`" alt="" data_url="`+imgStr+`" onclick="fnOpenLightBoxOneImg(this)">`;
}
}
} else {
arr.push(errorImg);
for (let i = 0; i < arr.length; i++) {
a += `<img src="${arr[i]}" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">`;
}
// a += `<img src="${arr[0]}" alt="">`;
}
let videosrc = '';
if(content.sealvideo!=""&&content.sealvideo!=undefined){
videosrc = `<video src="`+host+'/'+`${content.sealvideo}" controls="controls" style="display:block;width: 80%;margin: 0 auto;"></video>`;
}
html += `<div>
<p>封箱照片:</p>
<div class="closeImg flexbtw">
`+a+`
</div>
</div>
<div>
<p>封箱视频:</p>
<div>
`+videosrc+`
</div>
</div>`;
$('.black').html(html);
}
</script>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>
<body>
<header class="aui-header-bar bgc" id="aui-header">
<div class="aui-header-left" tapmode onclick="goback()">
<span class="aui-iconfont aui-icon-left"></span>
</div>
<div class="aui-title fff">物流详情</div>
</header>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
var aMap,address;
var slon,slat; //起始经纬度,货车位置
var elon,elat; //终点经纬度,目的地
apiready = function () {
api.parseTapmode();
var header = $api.byId('aui-header');
$api.fixStatusBar(header);
headerHeight = $api.offset(header).h;
aMap = api.require('aMap');
slon = api.pageParam.lon;
slat = api.pageParam.lat;
address = api.pageParam.address;
//调用高德地图
initMap();
aMap.removeAnnotations({
ids: []
});
//客户地址转经纬度,目的地
getCoordsFromName();
//获取货车当前位置
getNameFromCoords();
};
//获取线路
function searchRoute()
{
aMap.searchRoute({
type: 'drive',
policy: 'drive_fee_first',
start: {
lon: slon,
lat: slat
},
end: {
lon: elon,
lat: elat
}
}, function(ret, err) {
if (ret.status) {
aMap.drawRoute({
id: 33,
autoresizing: true,
index: 0,
styles: {
walkLine: {
width: 3,
color: '#698B22',
lineDash: false,
strokeImg: ''
},
driveLine: {
width: 6,
color: '#0000EE',
lineDash: false,
strokeImg: ''
},
busLine: {
width: 4,
color: '#00BFFF',
lineDash: false,
strokeImg: ''
},
icons: {
start: '',
end: '',
bus: '',
car: 'widget://image/car.png',
man: ''
}
}
});
} else {
api.alert({ msg: JSON.stringify(ret) });
}
});
}
//客户地址转经纬度
function getCoordsFromName()
{
aMap.getCoordsFromName({
city: '',
address: address
}, function(ret, err) {
if(ret.status){
// console.log(JSON.stringify(ret))
//根据经纬度标注客户地址-布告牌
elon = ret.lon;
elat = ret.lat;
// addAnnotations();//设置标注
searchRoute();//获取货车行动轨迹,线路
addBillboard(elon,elat,address,22,'目的地');//设置布告牌
}
else
{
// console.log(JSON.stringify(err))
}
});
}
//设置标注
function addAnnotations()
{
aMap.addAnnotations({
annotations: [{
id: 11,
lon: elon,
lat: elat
}],
icons: ['widget://'],
draggable: true,
timeInterval: 2.0
}, function(ret) {
// if (ret.eventType == 'click') {
// alert(ret.id);
// }
});
}
//客户地址设置广告牌
function addBillboard(elon,elat,address,id,title)
{
aMap.addBillboard({
id: id,
draggable: false,
coords: {
lon: elon,
lat: elat
},
bgImg: 'widget://image/map2.png',
content: {
title: title,
subTitle: address,
illus: ''
},
styles: {
marginT: 5,
titleColor: '#fff',
titleSize: 16,
subTitleColor: '#fff',
subTitleSize: 12,
subTitleMaxLines:2,
illusAlign: 'left'
}
}, function(ret) {
// if (ret) {
// alert(JSON.stringify(ret));
// }
});
}
//根据经纬度获取地址信息
function getNameFromCoords()
{
aMap.getNameFromCoords({
lon: slon,
lat: slat
}, function(ret, err) {
if (ret.status) {
addBillboard(slon,slat,ret.address,44,'当前位置');//设置广告牌
}
});
}
//调用高德地图
function initMap()
{
aMap.show();
aMap.open({
rect: {
x: 0,
y: headerHeight,
w: '100%',
h: api.frameHeight - headerHeight
},
showUserLocation: true,
showsAccuracyRing: true,
isGestureScaleByMapCenter: true,
zoomLevel: 11,
center: {
lon: 120.58,
lat: 31.30
},
fixedOn: api.frameName,
fixed: true
}, function (ret, err) {
if (ret.status) {
// console.log(JSON.stringify(ret));
} else {
console.log(JSON.stringify(err));
}
});
}
function goback()
{
aMap.removeAnnotations({
ids: []
});
aMap.close();
api.closeWin();
api.hideProgress();
}
</script>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/cilent.css">
<title>箱单详情</title>
</head>
<body>
<header class="aui-header-bar bgc" id="aui-header">
<div class="aui-header-left" tapmode onclick="closeWin()">
<span class="aui-iconfont aui-icon-left"></span>
</div>
<div class="aui-title fff">箱单详情</div>
</header>
<div class="list">
<div class="aui-list" style="margin-bottom: 15px;background-image: none;">
<!-- <div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-list-item-title">箱号名称</div>
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-center flex">
<div class="materialImg">
<img src="../image/error-img.png" alt="">
</div>
<div class="materialDetail ml30">
<div class="aui-list-item-title">物料名</div>
<div class="aui-list-item-subtitle">
<p>实装数量:<span class="goodstxt">123</span></p>
<p>备注:<span class="goodstxt">12234545</span></p>
</div>
</div>
</div>
</div> -->
<!-- <p>实装数量:<span class="goodstxt">123</span></p> -->
</div>
</div>
<div class="btnbox">
<div class="aui-btn aui-btn-round fff bgc" style="width: 150px;" onclick="toCheckPack()">
查看装箱凭证
</div>
<div class="aui-btn aui-btn-round check" onclick="toCheckOpen()" style="margin-left: 10px;">
确认开箱
</div>
</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript">
var host;
var codeid, state;
apiready = function () {
ajaxsetup();
initRequire();//引入拍照模块
host = $api.getStorage('host');
api.parseTapmode();
var header = $api.byId('aui-header');
$api.fixStatusBar(header);
var headerPos = $api.offset(header);
var body_h = $api.offset($api.dom('body')).h;
codeid = api.pageParam.codeid;
getList();
};
function getList() {
$.ajax({
url: host + '/itm/AppBox/GetPackDetail?codeid=' + codeid,
type: 'get',
success: function (res) {
console.log(JSON.stringify(res))
if (res.ret == 1) {
let title = `<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-list-item-title">${res.data.boxcode} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${res.data.partname}</div>
</div>
</div>`;
$('.aui-list').append(title);
goodsList = res.data.details;
state = res.data.state;
if (state == 8) {
$('.check').hide()
}
renderDetail(goodsList);
}
}
});
}
let goodsList = []
function renderDetail(goodsList) {
for (let i = 0; i < goodsList.length; i++) {
let html = '';
// let img = '../image/error-img.png';
// if(goodsList[i].image!=""&&goodsList[i].image!=undefined){
// img = goodsList[i].image;
// }
var color = '';
if (goodsList[i].actualquantity > 0) {
color = '#9e9e9e';
// $(".flex .goodstxt").css("color", '#9e9e9e');
} else {
color = 'red';
}
var img = '<img src="../image/error-img.png" style="width:100%;" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">';
if (goodsList[i].image1 != "" && goodsList[i].image1 != undefined && goodsList[i].image1 != null) {
var imgStr = goodsList[i].image1;
img = '<img src="' + imgStr + '" style="width:100%;" alt="" data_url="' + imgStr + '" onclick="fnOpenLightBoxOneImg(this)">';
}
html += `
<div class="aui-list-item">
<div class="aui-list-item-center flex">
<div>
<div class="materialImg" style="width:50px;max-height:36px;overflow:hidden;">
`+ img + `
</div>
<div style="text-align:center;">${goodsList[i].boxno}</div>
</div>
<div class="materialDetail ml30">
<div class="aui-list-item-title flex">
</div>
<div class="aui-list-item-subtitle">
<div class="aui-list-item-subtitle">
<p class="flex"><span class="goodtitle">物料代码:</span><span class="goodstxt" style="color:${color}">${goodsList[i].code}</span></p>
<p class="flex"><span class="goodtitle">物料名称:</span><span class="goodstxt" style="color:${color}">${goodsList[i].name}</span></p>
<p class="flex"><span class="goodtitle">实装数量:</span><span class="goodstxt" style="color:${color}">${goodsList[i].actualquantity}</span></p>
<p class="flex"><span class="goodtitle">备注:</span><span class="goodstxt" style="color:${color}">${goodsList[i].remark}</span></p>
</div>
</div>
</div>
</div>
</div>`;
$('.aui-list').append(html);
}
}
function toCheckPack() {
// window.location.href = './a_packing_certificate.html'
api.openWin({
name: 'client_certificate',
url: './client_certificate.html',
pageParam: {
codeid: codeid
}
});
}
function toCheckOpen() {
// window.location.href = './a_check_open.html';
api.openWin({
name: 'client_open',
url: './client_open.html',
pageParam: {
codeid: codeid
}
});
}
</script>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/staff.css">
<link rel="stylesheet" href="../css/iconfont.css">
<title>修改密码</title>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background:#F6AC13;color:#fff;">
<div class="aui-header-left" onclick="goback()">
<i class="aui-iconfont aui-icon-left"></i>
</div>
<div class="aui-title">修改密码</div>
</header>
<div class="aui-content aui-margin-b-15">
<ul class="aui-list">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-left"><i class="aui-iconfont aui-icon-lock"></i></div>
<div class="aui-list-item-center">
<input class="aui-input" type="password" id="oldpass" placeholder="请输入原密码" >
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-left"><i class="aui-iconfont aui-icon-lock"></i></div>
<div class="aui-list-item-center">
<input class="aui-input" type="password" id="onepass" placeholder="请输入新密码" >
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-left"><i class="aui-iconfont aui-icon-lock"></i></div>
<div class="aui-list-item-center">
<input class="aui-input" type="password" id="twopass" placeholder="请再次输入新密码" >
</div>
</div>
</div>
<li class="aui-list-item">
<div class="aui-list-item-center aui-padded-r-15">
<div class="aui-btn aui-btn-inline aui-margin-r-10" onclick="editPass()">提交</div>
<div class="aui-btn aui-btn-inline aui-btn-outline" onclick="goback()">取消</div>
</div>
</li>
</ul>
</div>
</body>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script>
var host,topTitleHight,headerHeight,userContent;
apiready = function () {
ajaxsetup();
api.parseTapmode();
host = $api.getStorage('host');
var user = $api.getStorage('current_user');
userContent = JSON.parse(user);
initPage();
}
function initPage()
{
$("#oldpass").val("");
$("#onepass").val("");
$("#twopass").val("");
}
function editPass()
{
let oldpass = $("#oldpass").val();
let onepass = $("#onepass").val();
let twopass = $("#twopass").val();
if(oldpass==""||onepass==""||twopass==""){
customToast('请输入完整密码', 2000);
return false;
}
if(oldpass == onepass){
customToast('新密码和原密码相同', 2000);
return false;
}
if(onepass != twopass){
customToast('两次输入的新密码不一致', 2000);
return false;
}
var data = {
mobile:userContent.mobile,
oldpassword:oldpass,
newpassword:onepass
}
$.ajax({
type: "post",
url: host + "/config/Login/updatePassword",
contentType: "application/json;charset=utf-8",
data:JSON.stringify(data),
async: true,
dataType: 'json',
success: function(res) {
if(res.ret == 1)
{
customToast('修改成功', 2000);
setTimeout(function(){
emptyStorage();
api.execScript({
name: 'root',
script: 'fnOpenLogin();'
});
api.closeFrame();
},2000)
}
else
{
customToast(lang[res.msg], 2000);
}
},
error:function(error){
console.log(JSON.stringify(error))
}
});
}
function goback(){
api.closeFrame();
api.hideProgress();
}
</script>
</html>
This diff is collapsed. Click to expand it.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>Hello APP</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<style>
label {
margin: 10px;
font-size: 24px;
}
ul {
margin-bottom: 10px;
}
ul li {
margin: 5px 10px;
padding: 5px;
color: #000;
word-wrap: break-word;
}
</style>
</head>
<body>
<label>Hello APP</label>
<div id='sys-info'></div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
apiready = function() {
var ver = api.version;
var sType = api.systemType;
var sVer = api.systemVersion;
var id = api.deviceId;
var model = api.deviceModel;
var name = api.deviceName;
var cType = api.connectionType;
var winName = api.winName;
var winWidth = api.winWidth;
var winHeight = api.winHeight;
var frameName = api.frameName || '';
var frameWidth = api.frameWidth || '';
var frameHeight = api.frameHeight || '';
var str = '<ul>';
str += '<li>引擎版本信息: ' + ver + '</li>';
str += '<li>系统类型: ' + sType + '</li>';
str += '<li>系统版本: ' + sVer + '</li>';
str += '<li>设备标识: ' + id + '</li>';
str += '<li>设备型号: ' + model + '</li>';
str += '<li>设备名称: ' + name + '</li>';
str += '<li>网络状态: ' + cType + '</li>';
str += '<li>主窗口名字: ' + winName + '</li>';
str += '<li>主窗口宽度: ' + winWidth + '</li>';
str += '<li>主窗口高度: ' + winHeight + '</li>';
str += '<li>子窗口名字: ' + frameName + '</li>';
str += '<li>子窗口宽度: ' + frameWidth + '</li>';
str += '<li>子窗口高度: ' + frameHeight + '</li>';
str += '</ul>';
$api.byId('sys-info').innerHTML = str;
};
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/staff.css">
<link rel="stylesheet" href="../css/iconfont.css">
<title>物料管理</title>
</head>
<body>
<div class="aui-header-bar managehead">
智能储运管理系统
</div>
<header class="aui-header-bar bgc" id="aui-header" style="border-bottom: 2px solid #5EF92D;position: relative">
<div class="aui-header-left" tapmode onclick="closePage()">
<span class="aui-iconfont aui-icon-left"></span>
</div>
<div class="aui-title fff">物料管理</div>
</header>
<section>
</section>
<footer class="aui-footer-bar" id="footer" style="height:60px;">
<div class="closeBtn1" onclick="closePage()">关闭</div>
</footer>
</body>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script>
var host,type,qrcode,topTitleHight,headerHeight,footerHeight,modulePrintlc,qrcode,materialName;
apiready = function () {
ajaxsetup();
api.parseTapmode();
var header = $api.dom('.managehead');
$api.fixStatusBar(header);
host = $api.getStorage('host');
var topTitle = $api.dom('.managehead');
topTitleHight = $api.offset(topTitle).h;
var header = $api.byId('aui-header');
headerHeight = $api.offset(header).h;
var footer = $api.byId('footer');
footerHeight = $api.offset(footer).h;
var type = api.pageParam.type;//1装箱单详情 2物料详情
qrcode = api.pageParam.qrcode; //装箱单二维码
materialName = api.pageParam.materialName;//物料名称
modulePrintlc = api.require('modulePrintlc');//打印模块
setTimeout(function(){
var param = {encode:"2",distance:"135"}; // 2 UTH-8 3 pagecode
modulePrintlc.initPrint(param);
},500)
initPage(type,qrcode);
}
//获取详情
function initPage(type,qrcode)
{
if(type == 1)
{
//物料装箱信息
$("#footer").html('<div class="closeBtn1" onclick="closePage()">关闭</div>');
}
else
{
//物料信息
let html = `<div class="mtInfo" style="display:block;"><div class="flex operateBox">
<p class="printBtn2" onclick="printBtn()">打印</p>
<p class="printBtn2" onclick="closePage()">关闭</p>
</div></div>`;
$("#footer").html(html);
}
api.openFrame({
name: 'material_info_f',
url: './material_info_f.html',
rect: { // 采用 margin相对布局
x:0,
y:headerHeight + topTitleHight,
w: 'auto',
h: api.winHeight - headerHeight - topTitleHight - footerHeight
},
bounces: false,
bgColor: 'rgba(0,0,0,0)',
pageParam: {
type: type,//1装箱清单 2 物料详情
qrcode:qrcode
}
});
}
function printBtn() {
// moPrintBackPaper();
// return false;
if(qrcode){
printText(qrcode);
}
}
function moPrintBackPaper(){
// var param = {Length:"48"};
// modulePrintlc.printFeatureList(param);
modulePrintlc.printCheckMark();
modulePrintlc.startPrint();
}
function printText(printCode){
var title1 = {encode:"UTF-8",text:materialName,bold:false,align:"2",fontSize:"1",concentration:35};
var title2 = {encode:"UTF-8",text:' ',bold:false,align:"2",fontSize:"1",concentration:35};
var param = {text:printCode,pix:5,unit:5,concentration:35}; // 文本 像素点 二维码版本 浓度
var param2={Length:60}; // true 为打开 false 为关闭 Length 走纸距离
modulePrintlc.printBackPaper(param2);
modulePrintlc.printText(title1);
modulePrintlc.printQR(param);
modulePrintlc.printText(title2);
modulePrintlc.printCheckMark();
modulePrintlc.startPrint();
}
//关闭打印模块
function closePrint()
{
modulePrintlc.closePrint();//关闭打印模块
}
function closePage()
{
api.closeFrame({
name: 'material_info_f'
});
api.closeWin({
name: 'material_info_w'
});
closePrint();
api.hideProgress();
}
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/staff.css">
<link rel="stylesheet" href="../css/iconfont.css">
<title>物料管理</title>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background: #ebeced;position:fixed;top:0px;">
<div class="aui-header-left" onclick="goback();">
<span class="aui-iconfont aui-icon-left"></span>
</div>
<div class="aui-title" style="left:2rem; right: 2rem;">
<div class="aui-searchbar" id="search">
<div class="aui-searchbar-input aui-border-radius">
<i class="aui-iconfont aui-icon-search"></i>
<input type="search" placeholder="请输入物料名称/代码" id="search-input">
<div class="aui-searchbar-clear-btn">
<i class="aui-iconfont aui-icon-close"></i>
</div>
</div>
<div class="aui-searchbar-btn" tapmode>取消</div>
</div>
</div>
<div class="aui-header-right" style="padding-left:5px;" onclick="initPage();">
<span>搜索<span>
</div>
</header>
<div class="aui-content aui-margin-b-15" style="position:relative;top:78px;">
<div class="aui-list mtlist_content">
</div>
</div>
</body>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script>
var host,topTitleHight,headerHeight;
apiready = function () {
ajaxsetup();
initRequire();//引入拍照模块
api.parseTapmode();
host = $api.getStorage('host');
initPage();
}
function initPage()
{
var key = $("#search-input").val();
var data = {
key:key
}
$('.mtlist_content').html('');
$.ajax({
type: "post",
url: host + "/config/Materials/SearchMaterials",
contentType: "application/json;charset=utf-8",
data:JSON.stringify(data),
async: true,
dataType: 'json',
success: function(res) {
// console.log(JSON.stringify(res))
if(res.ret == 1)
{
let list = res.data;
if(list.length > 0){
var html = '';
$.each(list,function(i,ele){
var img = '<img src="../image/error-img.png" style="width:100%;" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">';
if(ele.image!=""&&ele.image!=undefined){
var imgStr = ele.image;
img = '<img src="'+imgStr+'" style="width:100%;" alt="" data_url="'+imgStr+'" onclick="fnOpenLightBoxOneImg(this)">';
}
html += '<div class="aui-list-item" style="border-bottom:1px solid #ebeced">'
+' <div class="aui-list-item-left" style="width:50px;max-height:36px;overflow:hidden;">'
+img
+' </div>'
+' <div class="aui-list-item-center" data_pn="'+ele.pn+'" onclick="getMaterial(this)">'
+' <div class="aui-list-item-title" style="font-size:0.7rem;">物料名称:'+ele.name+'</div>'
+' <div class="aui-list-item-subtitle">物料编号:'+ele.pn+'</div>'
+' </div>'
// +' <div class="aui-list-item-right">'
// +' </div>'
+'</div>';
})
$('.mtlist_content').html(html);
}
}
},
error:function(error){
console.log(JSON.stringify(error))
}
});
}
//选中物料
function getMaterial(obj)
{
var pn = $(obj).attr("data_pn");
api.sendEvent({
name: 'materialcheck',
extra: {
pn: pn
}
});
goback();
}
function goback(){
api.closeFrame();
}
</script>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>我的</title>
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<style type="text/css">
.icon_class{
float:left;
margin-right:10px;
}
.statistics{
position:absolute;
right:15px;
}
.userdata{
display:none;
}
</style>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background:#F6AC13;color:#fff;">
<div class="aui-header-left">
<i class="aui-iconfont aui-icon-left" style="color:#F6AC13;"></i>
</div>
<div class="aui-title">个人中心</div>
<div class="aui-list aui-media-list aui-list-noborder" style="background:#F6AC13;color:#fff;">
<div class="aui-list-item aui-list-item-middle">
<div class="aui-media-list-item-inner">
<div class="aui-list-item-media" style="width:3rem;float:left;margin-right:10px;">
<img src="../image/login01.png" class="aui-img-round">
</div>
<div class="aui-list-item-inner" style="float:left;">
<div class="aui-list-item-text text-white aui-font-size-18 username"></div>
<div class="aui-list-item-text text-white">
<div><i class="aui-iconfont aui-icon-mobile aui-font-size-14"></i><span class="phone"></span></div>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="aui-content userdata">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-location icon_class"></i>
<div>
<span>当月完成装箱单</span>
<span class="statistics">(<span class="one_num">0</span>)</span>
</div>
</div>
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-like icon_class"></i>
<div>
<span>当月质检装箱单</span>
<span class="statistics">(<span class="two_num">0</span>)</span>
</div>
</div>
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-paper icon_class"></i>
<div>
<span>当月装车箱数</span>
<span class="statistics">(<span class="three_num">0</span>)</span>
</div>
</div>
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-flag icon_class"></i>
<div>
<span>当月发运箱数</span>
<span class="statistics">(<span class="four_num">0</span>)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="aui-content">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-pencil icon_class"></i>
<div onclick="editPassword()">修改密码</div>
</div>
</div>
</div>
</div>
</div>
<div class="aui-content">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-info icon_class"></i>
<div><span>版本号:<span class="Version"></span></div>
</div>
</div>
</div>
<div class="aui-list-item">
<div class="aui-list-item-center">
<div class="aui-col aui-col-span-6">
<i class="aui-iconfont aui-icon-back icon_class"></i>
<div onclick="logout()">退出</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript">
var host;
apiready = function () {
ajaxsetup();
host = $api.getStorage('host');
var user = JSON.parse($api.getStorage('current_user'));
if(user.roletype == 1){
$(".userdata").show();
}
else{
$(".userdata").hide();
}
$(".username").html(user.mobile);
$(".phone").html(user.phone)
$('.Version').html(api.appVersion);
$(".one_num").val(0);
$(".two_num").val(0);
$(".three_num").val(0);
$(".four_num").val(0);
initPage();
}
//获取统计数据
function initPage()
{
$.ajax({
type: "POST",
url: host + "/itm/AppBox/QuantityStatistics",
dataType: "JSON",
success: function (result) {
// console.log(JSON.stringify(result))
if(result.ret == 1){
$(".one_num").html(result.data.packnumber);
$(".two_num").html(result.data.checknumber);
$(".three_num").html(result.data.sendCarnumber);
$(".four_num").html(result.data.drivingnumber);
}
else
{
$(".one_num").html(0);
$(".two_num").html(0);
$(".three_num").html(0);
$(".four_num").html(0);
}
},
error:function(error){
// console.log(JSON.stringify(error))
}
})
}
function logout() {
emptyStorage();
api.execScript({
name: 'root',
script: 'fnOpenLogin();'
});
}
//修改密码
function editPassword(){
api.openFrame({
name: 'edit_password',
url: './edit_password.html',
rect: {//位置及大小参数
x:0,
y:0,
w: 'auto',
h: api.winHeight
}
});
}
function closeFrame()
{
api.closeFrame();
}
</script>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/cilent.css">
<link rel="stylesheet" href="../css/staff.css">
<link rel="stylesheet" href="../css/iconfont.css">
<style>
.review{
width:40%;
margin: 0 5px;
padding: 0.75rem 0.3rem;
}
.btnbox{
padding: 0 10px;
}
</style>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background:#F6AC13;color:#fff;">
<div class="aui-header-left" onclick="goBack();">
<i class="aui-iconfont aui-icon-left"></i>
</div>
<div class="aui-title">箱单详情</div>
</header>
<div class="list" style="bottom:0px;">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-center boxName">
<div class="aui-list-item-title"><span>箱号名称:</span><span class="boxName"></span></div>
</div>
</div>
<div class="contentList">
<!-- <div class="aui-list-item">
<div class="aui-list-item-left" style="width:50px;">
<img src="../image/error-img.png" style="100%;" alt="">
</div>
<div class="aui-list-item-center">
<div class="aui-list-item-title" style="font-size:0.7rem;">物料名称:</div>
<div class="aui-list-item-subtitle">物料编号:</div>
<div class="aui-list-item-subtitle">应装数量:</div>
</div>
<div class="aui-list-item-right">
<label><input type="checkbox" class="aui-checkbox" name=""></label>
</div>
</div> -->
</div>
</div>
</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript">
var host, code;
apiready = function () {
ajaxsetup();
initRequire();//引入拍照模块
api.parseTapmode();
host = $api.getStorage('host');
code = api.pageParam.code; //箱号 id
initPage(code);
}
//装箱详情
function initPage(codeid) {
if (codeid == "" || codeid == undefined) {
return false;
}
var data = {
code:codeid
}
$.ajax({
type: "POST",
contentType: "application/json;charset=UTF-8",
url: host + "/itm/AppBox/ScanCode",
data: JSON.stringify(data),
dataType: "JSON",
success: function (res) {
// console.log(JSON.stringify(res));
if (res.ret == 1) {
let title= `<div class="aui-list-item-title"><span>${res.data.boxcode}</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>${res.data.partname}</span></div>`
$(".boxName").html(title);
let info = res.data.details;
if (info.length > 0) {
getDetailHTML(info);
}
}
else {
customToast(lang[res.msg], 2000)
}
},
error(err) {
console.log(JSON.stringify(err))
}
});
}
function getDetailHTML(data) {
let html = '';
for (let i = 0; i < data.length; i++) {
var img = '<img src="../image/error-img.png" style="width:100%;" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">';
if(data[i].image!=""&&data[i].image!=undefined&&data[i].image!=null){
var imgStr = host +'/'+ data[i].image;
img = '<img src="'+imgStr+'" style="width:100%;" alt="" data_url="'+imgStr+'" onclick="fnOpenLightBoxOneImg(this)">';
}
let check = '';
if(data[i].auditstate == 1 ||data[i].actualquantity==0){
check = 'checked';
}
var drawing_code = ''
if(data[i].drawing_code!=null && data[i].drawing_code!=undefined){
drawing_code = data[i].drawing_code
}
html += `
<div class="aui-list-item">
<div class="aui-list-item-left">
<div style="width:50px;max-height:36px;overflow:hidden;">
`+ img + `
</div>
<div style="text-align:center;">${data[i].boxno}</div>
</div>
<div class="aui-list-item-center">
<div class="aui-list-item-title" style="font-size:0.7rem;">物料名称:${data[i].name}</div>
<div class="aui-list-item-subtitle">图号:`+drawing_code+`</div>
<div class="aui-list-item-subtitle">应装数量:${data[i].quantity}</div>
<div class="aui-list-item-subtitle">实装数量:${data[i].actualquantity}</div>
<div class="aui-list-item-subtitle">备注:${data[i].remark}</div>
</div>
<div class="aui-list-item-right">
</div>
</div>`;
}
$('.contentList').html(html);
}
function goBack() {
//刷新审核页面
api.sendEvent({
name: 'reloadCheck'
});
//刷新home页面数据
api.sendEvent({
name: 'RefreshhomeData'
});
api.closeWin();
}
</script>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" href="../css/cilent.css">
<link rel="stylesheet" href="../css/staff.css">
<link rel="stylesheet" href="../css/iconfont.css">
<style>
.review{
width:40%;
margin: 0 5px;
padding: 0.75rem 0.3rem;
}
.btnbox{
padding: 0 10px;
}
</style>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background:#F6AC13;color:#fff;">
<div class="aui-header-left" onclick="goBack();">
<i class="aui-iconfont aui-icon-left"></i>
</div>
<div class="aui-title">质检管理</div>
</header>
<div class="list">
<div class="aui-list" style="margin-bottom: 15px;">
<div class="aui-list-item">
<div class="aui-list-item-center boxName">
<div class="aui-list-item-title"><span>箱号名称:</span><span class="boxName"></span></div>
</div>
</div>
<div class="contentList">
<!-- <div class="aui-list-item">
<div class="aui-list-item-left" style="width:50px;">
<img src="../image/error-img.png" style="100%;" alt="">
</div>
<div class="aui-list-item-center">
<div class="aui-list-item-title" style="font-size:0.7rem;">物料名称:</div>
<div class="aui-list-item-subtitle">物料编号:</div>
<div class="aui-list-item-subtitle">应装数量:</div>
</div>
<div class="aui-list-item-right">
<label><input type="checkbox" class="aui-checkbox" name=""></label>
</div>
</div> -->
</div>
</div>
</div>
<div class="btnbox">
<div class="aui-btn aui-btn-round review look" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)" style="background:#F6AC13;display:none;">查看缺件审批</div>
<div class="aui-btn aui-btn-round review" onclick="toCheckOk()" style="background:#3472f7;">审核完成</div>
<div class="aui-btn aui-btn-round review" onclick="toCheckFail()" style="background:#ff0000;">审核失败</div>
</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript">
var host, codeid;
apiready = function () {
ajaxsetup();
initRequire();//引入拍照模块
api.parseTapmode();
host = $api.getStorage('host');
codeid = api.pageParam.codeid; //箱号 id
initPage(codeid);
//查看是否有缺陷申请图片
lookPhoto(codeid);
}
//查看是否有缺陷申请图片
function lookPhoto(codeid)
{
var data = {
id:codeid
}
$.ajax({
type: "POST",
contentType: "application/json;charset=UTF-8",
url: host + "/itm/AppBox/BoxLack",
data: JSON.stringify(data),
dataType: "JSON",
success: function (res) {
console.log(JSON.stringify(res));
if (res.ret == 1) {
$(".look").attr("data_url",host+'/'+res.data)
$(".look").show();
}
else
{
$(".look").hide();
}
},
error(err) {
console.log(JSON.stringify(err))
}
});
}
//装箱详情
function initPage(codeid) {
if (codeid == "" || codeid == undefined) {
return false;
}
$.ajax({
type: "GET",
contentType: "application/json;charset=UTF-8",
url: host + "/itm/AppBox/GetPackDetail?codeid=" + codeid,
data: null,
dataType: "JSON",
success: function (res) {
// console.log(JSON.stringify(res));
if (res.ret == 1) {
let title= `<div class="aui-list-item-title"><span>${res.data.boxcode}</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>${res.data.partname}</span></div>`
$(".boxName").html(title);
let info = res.data.details;
if (info.length > 0) {
getDetailHTML(info);
}
}
else {
customToast(lang[res.msg], 2000)
}
},
error(err) {
console.log(JSON.stringify(err))
}
});
}
function getDetailHTML(data) {
// console.log(JSON.stringify(data));
let html = '';
for (let i = 0; i < data.length; i++) {
// let img = '../image/error-img.png';
// if (data[i].image != "" && data[i].image != undefined) {
// img = data[i].image;
// }
// console.log(JSON.stringify(data[i].image));
var img = '<img src="../image/error-img.png" style="width:100%;" alt="" data_url="fs://image/error-img.png" onclick="fnOpenLightBoxOneImg(this)">';
if(data[i].image!=""&&data[i].image!=undefined&&data[i].image!=null){
var imgStr = data[i].image;
img = '<img src="'+imgStr+'" style="width:100%;" alt="" data_url="'+imgStr+'" onclick="fnOpenLightBoxOneImg(this)">';
}
let check = '';
if(data[i].auditstate == 1 ||data[i].actualquantity==0){
check = 'checked';
}
html += `
<div class="aui-list-item">
<div class="aui-list-item-left">
<div style="width:50px;max-height:36px;overflow:hidden;">
`+ img + `
</div>
<div style="text-align:center;">${data[i].boxno}</div>
</div>
<div class="aui-list-item-center">
<div class="aui-list-item-title" style="font-size:0.7rem;">物料名称:${data[i].name}</div>
<div class="aui-list-item-subtitle">图号:${data[i].drawing_code}</div>
<div class="aui-list-item-subtitle">应装数量:${data[i].quantity}</div>
<div class="aui-list-item-subtitle">实装数量:${data[i].actualquantity}</div>
</div>
<div class="aui-list-item-right">
<label><input type="checkbox" `+check+` class="aui-checkbox checkDetails" name="" data_id="${data[i].detailid}"></label>
</div>
</div>`;
}
$('.contentList').html(html);
}
//审核完成
function toCheckOk() {
let ids = [];
$(".checkDetails").each(function (i, ele) {
if ($(this).is(":checked")) {
let detailid = $(this).attr("data_id");
ids.push(parseInt(detailid))
}
})
if (ids.length == 0) {
customToast("请选择物料", 2000);
return false;
}
var data = {
ids: ids
}
$.ajax({
type: "POST",
contentType: "application/json;charset=UTF-8",
url: host + "/itm/AppBox/CheckBox",
data: JSON.stringify(data),
dataType: "JSON",
success: function (res) {
console.log(JSON.stringify(res));
if (res.ret == 1) {
customToast("操作成功", 2000);
setTimeout(function(){
goBack();
},2000)
}
else {
customToast(lang[res.msg], 2000);
}
},
error(err) {
console.log(JSON.stringify(err))
}
});
}
function toCheckFail(){
$.ajax({
type: "get",
contentType: "application/json;charset=UTF-8",
url: host + "/itm/AppBox/AuditFail?codeid="+codeid,
// data: JSON.stringify(data),
dataType: "JSON",
success: function (res) {
console.log(JSON.stringify(res));
if (res.ret == 1) {
customToast("操作成功", 2000);
setTimeout(function(){
goBack();
},2000)
}
else {
customToast(lang[res.msg], 2000);
}
},
error(err) {
console.log(JSON.stringify(err))
}
});
}
function goBack() {
//刷新审核页面
api.sendEvent({
name: 'reloadCheck'
});
//刷新home页面数据
api.sendEvent({
name: 'RefreshhomeData'
});
api.closeWin();
}
</script>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>二维码扫描</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<link rel="stylesheet" type="text/css" href="../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<style>
html,
body {
height: 100%;
background-color: rgba(0, 0, 0, 0);
}
.header {
position: relative;
background-color: #4CABFF;
color: #fff;
width: 100%;
height: 44px;
font-size: 16px;
line-height: 44px;
text-align: center;
}
.header-item-left {
position: absolute;
left: 0;
bottom: 0;
width: 44px;
height: 44px;
background: url(../image/back.png) no-repeat center center;
background-size: 22px 22px;
}
.qrcode-box {
width: 250px;
height: 250px;
position: absolute;
}
.btnc {
width: 100%;
height: 50px;
top: 460px;
position: absolute;
text-align: center;
}
.btnd {
width: 100%;
height: 50px;
top: 500px;
position: absolute;
text-align: center;
}
.qrcode-box:after {
-webkit-animation: rotateAnim linear 3.68s infinite;
animation: rotateAnim linear 3.68s infinite;
content: '';
position: absolute;
display: block;
width: 100%;
height: 2px;
background-color: #d8be26;
}
/*二维码上下移动的扫描横线*/
@keyframes rotateAnim {
from {
top: 0;
}
to {
top: 100%;
}
}
@-webkit-keyframes rotateAnim {
from {
top: 0;
}
to {
top: 100%;
}
}
/*二维码扫描框的四角*/
.qrcode-box span {
width: 14px;
height: 14px;
position: absolute;
border: 2px solid #1fa2ff;
}
.qrcode-box span:nth-child( 1) {
left: 0;
top: 0;
border-width: 2px 0 0 2px;
}
.qrcode-box span:nth-child( 2) {
right: 0;
top: 0;
border-width: 2px 2px 0 0;
}
.qrcode-box span:nth-child( 3) {
right: 0;
bottom: 0;
border-width: 0 2px 2px 0;
}
.qrcode-box span:nth-child( 4) {
left: 0;
bottom: 0;
border-width: 0 0 2px 2px;
}
.aui-fixbottom {
position: absolute;
bottom: 0;
right: 0;
left: 0;
z-index: 10;
width: 100%;
min-height: 2.25rem;
font-size: 0.9rem;
text-align: center;
display: table;
}
.aui-btn-sm.aui-active {
background-color: rgba(0, 0, 0, 0.5)!important;
color: #00bcd4!important;
}
.aui-btn-sm{
border:1px solid #03a9f4!important;
background-color: rgba(0, 0, 0, 0)!important;
color: black!important;
}
</style>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background:#F6AC13;color:#fff;">
<div class="aui-header-left" onclick="goBack();">
<i class="aui-iconfont aui-icon-left"></i>
</div>
<div class="aui-title">扫描二维码</div>
</header>
<div class="aui-card-list" style="background:rgba(0, 0, 0, 0);">
<div class="aui-btn-row" style="width:80%;margin-left:10%;margin-top:30px;">
<div class="aui-btn aui-btn-sm open-light aui-active" onclick="openlight()">开启闪光灯</div>
<div class="aui-btn aui-btn-sm close-light" onclick="closelight()">关闭闪光灯</div>
</div>
</div>
<!-- 二维码扫描框 -->
<div id="qrcode-box" class="qrcode-box">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div>
</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/aui-collapse.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript">
var destpag;
apiready = function() {
ajaxsetup();
fnShowQRScannerBox();
}
function fnShowQRScannerBox() { // 根据屏幕实际宽度修正二维码扫描框的位置并加载显示
var eQRCodeBox = $api.byId('qrcode-box');
var top = (api.winHeight - 250) / 2;
var left = (api.winWidth - 250) / 2;
$api.css(eQRCodeBox, 'top: ' + top + 'px;left:' + left + 'px;display:block;');
}
function goBack() {
api.sendEvent({
name: 'closescannn'
});
}
function openlight() {
$('.open-light').removeClass('aui-active');
$('.close-light').addClass('aui-active');
api.execScript({
name: 'root',
script: 'openMtsLight();'
});
}
function closelight() {
$('.close-light').removeClass('aui-active');
$('.open-light').addClass('aui-active');
api.execScript({
name: 'root',
script: 'closeMtsLight();'
});
}
</script>
</html>
image/add.png

496 Bytes

image/car.png

162 Bytes

This diff is collapsed. Click to expand it.
[{"name":"测试公司","url":"http://61.177.28.246:8100","ispush":"1"},
{"name":"利达铸造","url":"http://192.168.5.6/apis","ispush":"1"},
{"name":"华域测试","url":"http://61.177.28.246:8105","ispush":"1"},
{"name":"Engtek","url":"http://pluto.engtek.com/apis","ispush":"1"},
{"name":"华域车身","url":"http://47.103.47.87:8100","ispush":"1"},
{"name":"演示环境","url":"http://cloud.siger-data.com/apis","ispush":"1"},
{"name":"长龄液压","url":"http://192.168.5.200/apis","ispush":"1"},
{"name":"富士和","url":"http://fjw-tms.siger-data.com/apis","ispush":"1"},
{"name":"国匠演示","url":"http://guojiang.siger-data.com/apis","ispush":"1"},
{"name":"西格演示","url":"http://61.177.28.246:8999/apis","ispush":"1"},
{"name":"长龄外网","url":"http://61.177.28.246:8998/apis","ispush":"1"},
{"name":"南京汽轮机","url":"http://ngrok.siger-data.com:8700/apis","ispush":"1"},
{"name":"广德博朗","url":"http://60.173.116.136:18100","ispush":"1"},
{"name":"台朔重工(宁波)","url":"http://61.177.28.246:8997/apis","ispush":"1"},
{"name":"生态应用","url":"http://61.177.28.246:8101","ispush":"1"},
{"name":"三达包装","url":"http://tpm.kssdbz.cn:9090/apis","ispush":"1"},
{"name":"天博","url":"http://222.132.77.150:90/apis","ispush":"1"},
{"name":"SKF-GTC","url":"http://117.184.200.26:9000/apis","ispush":"1"},
{"name":"skf测试","url":"http://test.siger-data.com:10247","ispush":"1"},
{"name":"skfatc","url":"https://rc-app032-staging.secure.skf.com","ispush":"1"},
{"name":"skfatc2","url":"https://rc-app022-staging.secure.skf.com","ispush":"1"},
{"name":"科苑隆","url":"http://siger_app.i-lift.online:61000","ispush":"1"},
{"name":"SKF-ATC","url":"https://rc-app095.secure.skf.com","ispush":"1"},
{"name":"ITM","url":"http://61.177.28.246:5002","ispush":"0"}]
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<application name="targetSdkVersion" value="28"/>
</manifest>
\ No newline at end of file
function ajax(type, url, data = '') {
// if(type ==)
let res = '';
$.ajax({
//请求方式
type: type,
async:false,
contentType: "application/json;charset=UTF-8",
//请求地址
url: 'http://172.8.10.74:5002'+url,
//数据,json字符串
data: JSON.stringify(data),
dataType: 'json',
//请求成功
success: function (result) {
// console.log(res);
res = result;
},
//请求失败,包含具体的错误信息
error: function (e) {
res = 'error:'+e.status
}
});
return res;
}
This diff is collapsed. Click to expand it.
/**
* aui-actionsheet.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiActionsheet = function() {
};
var isShow = false;
auiActionsheet.prototype = {
init: function(params,callback){
this.frameBounces = params.frameBounces;
this.title = params.title;
this.buttons = params.buttons;
this.cancelTitle = params.cancelTitle;
this.destructiveTitle = params.destructiveTitle;
this.maskDiv;
this.actionsheetDiv;
var self = this;
self.open(params,callback);
},
open: function(params,callback) {
var titleHtml='',buttonsHtml='',destructiveHtml='',cancelHtml='',btnHtml='';
var self = this;
if(self.actionsheetDiv || (!self.title && !self.buttons && !self.cancelTitle && !self.destructiveTitle))return;
if(!self.maskDiv){
self.maskDiv = document.createElement("div");
self.maskDiv.className = "aui-mask";
document.body.appendChild(self.maskDiv);
}
self.actionsheetDiv = document.createElement("div");
self.actionsheetDiv.className = "aui-actionsheet";
document.body.appendChild(self.actionsheetDiv);
if(self.title){
titleHtml = '<div class="aui-actionsheet-title aui-border-b aui-font-size-12">'+self.title+'</div>';
}
if(self.buttons && self.buttons.length){
for(var i = 0; i < self.buttons.length;i++){
if(i == self.buttons.length-1){
buttonsHtml += '<div class="aui-actionsheet-btn-item">'+self.buttons[i]+'</div>';
}else{
buttonsHtml += '<div class="aui-actionsheet-btn-item aui-border-b">'+self.buttons[i]+'</div>';
}
}
}
if(self.destructiveTitle){
destructiveHtml = '<div class="aui-actionsheet-btn-item aui-border-t aui-text-danger">'+self.destructiveTitle+'</div>';
}else{
var destructiveHtml = '';
}
if(self.title || (self.buttons && self.buttons.length)){
btnHtml = '<div class="aui-actionsheet-btn">'+titleHtml+''+buttonsHtml+''+destructiveHtml+'</div>';
}
if(self.cancelTitle){
cancelHtml = '<div class="aui-actionsheet-btn"><div class="aui-actionsheet-btn-item">'+self.cancelTitle+'</div></div>';
}
self.actionsheetDiv.insertAdjacentHTML('beforeend', btnHtml+cancelHtml);
var actionsheetHeight = document.querySelector(".aui-actionsheet").offsetHeight;
self.maskDiv.classList.add("aui-mask-in");
self.actionsheetDiv.style.webkitTransform = self.actionsheetDiv.style.transform = "translate3d(0,0,0)";
self.actionsheetDiv.style.opacity = 1;
self.actionsheetDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
self.maskDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:false
});
}
var actionsheetButtons = document.querySelectorAll(".aui-actionsheet-btn-item");
if(actionsheetButtons && actionsheetButtons.length > 0){
setTimeout(function(){
self.maskDiv.onclick = function(){self.close();return;};
for(var ii = 0; ii < actionsheetButtons.length; ii++){
(function(e){
actionsheetButtons[e].onclick = function(){
if(callback){
callback({
buttonIndex: e+1,
buttonTitle: this.textContent
});
};
self.close();
return;
}
})(ii)
}
}, 350)
}
},
close: function(){
var self = this;
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:true
});
}
if(self.actionsheetDiv){
var actionsheetHeight = self.actionsheetDiv.offsetHeight;
self.actionsheetDiv.style.webkitTransform = self.actionsheetDiv.style.transform = "translate3d(0,"+actionsheetHeight+"px,0)";
self.maskDiv.style.opacity = 0;
setTimeout(function(){
if(self.maskDiv){
self.maskDiv.parentNode.removeChild(self.maskDiv);
}
self.actionsheetDiv.parentNode.removeChild(self.actionsheetDiv);
self.actionsheetDiv = self.maskDiv = false;
}, 300)
}
}
};
window.auiActionsheet = auiActionsheet;
})(window);
/**
* aui-collapse.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiCollapse = function(params) {
this.init(params);
};
auiCollapse.prototype = {
init: function(params,callback){
var collapseHeader = document.querySelectorAll(".aui-collapse-header");
if(collapseHeader.length){
for(var i=0;i<collapseHeader.length;i++){
(function(e){
collapseHeader[e].onclick = function(){
if(collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-collapse-content") > -1){
if(collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-show") > -1){
collapseHeader[e].nextSibling.nextElementSibling.classList.remove("aui-show");
collapseHeader[e].classList.remove("aui-active");
}else{
if(params.autoHide){
if(document.querySelector(".aui-collapse-header.aui-active")){
document.querySelector(".aui-collapse-header.aui-active").classList.remove("aui-active");
}
if(document.querySelector(".aui-collapse-content.aui-show")){
document.querySelector(".aui-collapse-content.aui-show").classList.remove("aui-show");
}
}
collapseHeader[e].nextSibling.nextElementSibling.classList.toggle("aui-show");
collapseHeader[e].classList.toggle("aui-active");
}
}
}
})(i)
}
}
}
};
window.auiCollapse = auiCollapse;
})(window);
\ No newline at end of file
/**
* aui-dialog.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiDialog = function() {
};
var isShow = false;
auiDialog.prototype = {
params: {
title:'',
msg:'',
buttons: ['取消','确定'],
input:false
},
create: function(params,callback) {
var self = this;
var dialogHtml = '';
var buttonsHtml = '';
var headerHtml = params.title ? '<div class="aui-dialog-header">' + params.title + '</div>' : '<div class="aui-dialog-header">' + self.params.title + '</div>';
if(params.input){
params.text = params.text ? params.text: '';
var msgHtml = '<div class="aui-dialog-body"><input type="text" class="aui-input aui-border" placeholder="'+params.text+'"></div>';
}else{
var msgHtml = params.msg ? '<div class="aui-dialog-body">' + params.msg + '</div>' : '<div class="aui-dialog-body">' + self.params.msg + '</div>';
}
var buttons = params.buttons ? params.buttons : self.params.buttons;
if (buttons && buttons.length > 0) {
for (var i = 0; i < buttons.length; i++) {
buttonsHtml += '<div class="aui-dialog-btn" tapmode button-index="'+i+'">'+buttons[i]+'</div>';
}
}
var footerHtml = '<div class="aui-dialog-footer">'+buttonsHtml+'</div>';
dialogHtml = '<div class="aui-dialog">'+headerHtml+msgHtml+footerHtml+'</div>';
document.body.insertAdjacentHTML('beforeend', dialogHtml);
// listen buttons click
var dialogButtons = document.querySelectorAll(".aui-dialog-btn");
if(dialogButtons && dialogButtons.length > 0){
for(var ii = 0; ii < dialogButtons.length; ii++){
dialogButtons[ii].onclick = function(){
if(callback){
if(params.input){
callback({
buttonIndex: parseInt(this.getAttribute("button-index"))+1,
text: document.querySelector("input").value
});
}else{
callback({
buttonIndex: parseInt(this.getAttribute("button-index"))+1
});
}
};
self.close();
return;
}
}
}
self.open();
},
open: function(){
if(!document.querySelector(".aui-dialog"))return;
var self = this;
document.querySelector(".aui-dialog").style.marginTop = "-"+Math.round(document.querySelector(".aui-dialog").offsetHeight/2)+"px";
if(!document.querySelector(".aui-mask")){
var maskHtml = '<div class="aui-mask"></div>';
document.body.insertAdjacentHTML('beforeend', maskHtml);
}
// document.querySelector(".aui-dialog").style.display = "block";
setTimeout(function(){
document.querySelector(".aui-dialog").classList.add("aui-dialog-in");
document.querySelector(".aui-mask").classList.add("aui-mask-in");
document.querySelector(".aui-dialog").classList.add("aui-dialog-in");
}, 10)
document.querySelector(".aui-mask").addEventListener("touchmove", function(e){
e.preventDefault();
})
document.querySelector(".aui-dialog").addEventListener("touchmove", function(e){
e.preventDefault();
})
return;
},
close: function(){
var self = this;
document.querySelector(".aui-mask").classList.remove("aui-mask-in");
document.querySelector(".aui-dialog").classList.remove("aui-dialog-in");
document.querySelector(".aui-dialog").classList.add("aui-dialog-out");
if (document.querySelector(".aui-dialog:not(.aui-dialog-out)")) {
setTimeout(function(){
if(document.querySelector(".aui-dialog"))document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
self.open();
return true;
},200)
}else{
document.querySelector(".aui-mask").classList.add("aui-mask-out");
document.querySelector(".aui-dialog").addEventListener("webkitTransitionEnd", function(){
self.remove();
})
document.querySelector(".aui-dialog").addEventListener("transitionend", function(){
self.remove();
})
}
},
remove: function(){
if(document.querySelector(".aui-dialog"))document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
if(document.querySelector(".aui-mask")){
document.querySelector(".aui-mask").classList.remove("aui-mask-out");
}
return true;
},
alert: function(params,callback){
var self = this;
return self.create(params,callback);
},
prompt:function(params,callback){
var self = this;
params.input = true;
return self.create(params,callback);
}
};
window.auiDialog = auiDialog;
})(window);
\ No newline at end of file
/**
* AUI JAVASCRIPT PLUGIN
* aui-indexid-list.js 索引列表
* version 0.0.2
* Copyright (c) 2015 auicss.com @流浪男 QQ:343757327 群:344869952
*/
(function(window){
var IndexedList = function(){
_init();
}
var listArr = document.querySelectorAll(".aui-indexed .aui-list-item");
var indexedWrap = document.querySelector(".aui-indexed");
// 搜索类
var searchWrap = document.querySelector(".aui-searchbar-wrap");
var searchBar = document.querySelector(".aui-searchbar");
var clearBtn = document.getElementById("aui-searchbar-clear");
var searchInput = document.getElementById("aui-searchbar-input");
var searchCancel = document.getElementById("aui-searchbar-cancel");
// 右侧bar
var bar = document.querySelector(".aui-indexed-bar");
// 重置bar高度
var barList = document.querySelectorAll(".aui-indexed-bar .aui-indexed-bar-item");
var barH = bar.offsetHeight;
var newBarH = barList.length*15;
var _init = function(){
indexedWrap.style.height = window.innerHeight+"px";
bar.style.height = newBarH+"px";
bar.style.top = "50%";
bar.style.marginTop = "-"+(newBarH/2)+"px";
bar.addEventListener('touchstart', function(event) {
bar.style.opacity = "1";
scrollTop(event);
}, false);
// 监听bar滑动
bar.addEventListener('touchmove', function(event) {
scrollTop(event);
}, false);
document.body.addEventListener('touchend', function(event) {
removeToast(event);
}, false);
document.body.addEventListener('touchcancel', function(event) {
removeToast(event);
}, false);
}
var scrollTop = function (event){
event.preventDefault();
var clientX = event.changedTouches[0].clientX;
var clientY = event.changedTouches[0].clientY;
var _thisBar = document.elementFromPoint(clientX, clientY);
if(clientX < window.innerWidth & clientY < window.innerHeight & clientY > 0){
var thisValue = _thisBar.getAttribute("data-value");
if(thisValue){
var groupElement = indexedWrap.querySelector('[data-group="' + thisValue + '"]');
if(thisValue != 'search' & thisValue != '*'){
document.querySelector(".aui-indexed-toast").textContent = thisValue;
document.querySelector(".aui-indexed-toast").classList.add("active");
document.querySelector(".aui-indexed-toast").style.top = clientY+'px';
}
if (groupElement) {
indexedWrap.scrollTop = groupElement.offsetTop;
}
}else{
document.querySelector(".aui-indexed-toast").textContent = '';
document.querySelector(".aui-indexed-toast").classList.remove("active");
}
}
}
var removeToast = function(event){
bar.style.opacity = "0.6";
document.querySelector(".aui-indexed-toast").classList.remove("active");
bar.classList.remove('active');
}
window.auiIndexedList = IndexedList;
})(window);
/**
* aui-lazyload.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var _loadImgNodes;
var auiLazyload = function(params) {
this.errorImage = params.errorImage||false;
this._init(params);
};
auiLazyload.prototype = {
_init: function(params) {
var self = this;
_loadImgNodes = document.querySelectorAll('[data-src]');
self._judgeImages();
window.addEventListener('scroll', function(){
_loadImgNodes = document.querySelectorAll('[data-src]');
self._judgeImages();
}, false);
},
_judgeImages:function() {
var self = this;
if(_loadImgNodes.length){
for(var i = 0; i < _loadImgNodes.length; i++){
if (_loadImgNodes[i].getBoundingClientRect().top < window.innerHeight) {
self._loadImage(_loadImgNodes[i]);
}
}
}
},
_loadImage:function(el){
var self = this;
var img = new Image();
img.src = el.getAttribute('data-src');
el.src = el.getAttribute('data-src');
el.removeAttribute("data-src");
// // 图片加载失败
img.onerror = function() {
el.src = self.errorImage || el.getAttribute('src');
el.removeAttribute("data-src");
};
}
}
window.auiLazyload = auiLazyload;
})(window);
/**
* aui-list-swipe.js 列表页滑动菜单
* verson 0.0.3
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
"use strict";
var translateVal,
friction = 1,
firstTouchX,
firstTouchxy,
firstTouchY,
firstTouch,
firstTouchTime,
touchXDelta,
handleTranslateVal;
var TranslateZero = "translate3d(0,0,0)",
TranslateCent = "translate3d(100%,0,0)";
var swipeHandle = false,
btnWidth = false,
swipeBtnsRight = false;
var isMoved = false,isOpened=false;
var d = false;
var auiListSwipe = function (callback) {
this._init(callback);
}
auiListSwipe.prototype = {
// var self = this;
_init: function(callback){
var self = this;
// var d = document.querySelectorAll("selectors")
window.addEventListener('touchstart', function(event){
if(isOpened){
console.log(1)
// return;
isOpened = false;
return;
}
if(swipeHandle){
event.preventDefault();
self.setTranslate(swipeHandle,"0px");
swipeHandle.classList.remove("aui-swipe-opened");
swipeHandle = false;
return;
}
isMoved = false;
swipeHandle = false;
var target = event.target;
// 过滤点击
for(; target && target !== document; target = target.parentNode){
// console.log(target.classList)
if (target.classList){
if (target.classList.contains("aui-swipe-handle")) {
swipeHandle = target;
firstTouch = event.changedTouches[0];
firstTouchX = firstTouch.clientX;
firstTouchY = firstTouch.clientY;
firstTouchTime = event.timeStamp;
if(swipeHandle.className.indexOf("aui-swipe-opened") > -1){
// console.log(1)
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
event.preventDefault();
return;
}else{
// setTimeout(function(){
self.toggleEvents(swipeHandle,callback);
// }, 100)
}
}
}
}
})
// window.addEventListener('touchmove', function(event){
// if(swipeHandle){
// // event.preventDefault();
// // self.setTranslate(swipeHandle,"0px");
// // swipeHandle.classList.remove("aui-swipe-opened");
// // swipeHandle = false;
// // return;
// }
// if(document.querySelector(".aui-swipe-opened")){
// event.preventDefault();
// if(swipeHandle != document.querySelector(".aui-swipe-opened")){
// self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
// document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
// isOpened = false;
// event.stopPropagation()
// return;
// }
// }
// })
window.addEventListener("touchmove", function(){
})
},
toggleEvents:function(element,callback){
if(!swipeHandle){
return;
}
var self = this;
self.setTransform(element,300);
element.addEventListener('touchstart', function(event){
// if(element.className.indexOf("aui-swipe-opened") > -1){
// self.setTranslate(element,"0px");
// element.classList.remove("aui-swipe-opened");
// return;
// }
//:active样式引起列表背景色冲突
element.parentNode.style.backgroundColor = "#ffffff";
if(!element.nextSibling)return;
},false)
element.addEventListener('touchmove', function(event){
if(document.querySelector(".aui-swipe-opened")){
event.preventDefault();
if(swipeHandle != document.querySelector(".aui-swipe-opened")){
self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
isOpened = false;
event.stopPropagation()
return;
}
}
// self.getAngle(event)
self.setTransform(element,0);
// if(element.className.indexOf("aui-swipe-opened") > -1)return;
if(element.parentNode.querySelector(".aui-swipe-btn")){
btnWidth = element.parentNode.querySelector(".aui-swipe-btn").offsetWidth;
}
// 列表触摸滑动时如果有已经显示的将其关闭,并退出。
var touchMoveObj = event.changedTouches[0],
touchX = touchMoveObj.clientX;
touchXDelta = -Math.pow(firstTouchX-touchX, 0.85);
handleTranslateVal = touchXDelta/friction;
// touchXDelta = touchX - firstTouchX;
// handleTranslateVal = touchXDelta/0.15;
// console.log(handleTranslateVal)
var moveX = touchMoveObj.clientX - firstTouchX;
var moveY = touchMoveObj.clientY - firstTouchY;
var direction = self.getDirection(moveX,moveY);
var angle = self.getAngle(Math.abs(moveX),Math.abs(moveY));
// console.log(isMoved);
// // 解决滑动屏幕返回时事件冲突,主要针对部分特殊机型
// if(touchMoveObj.screenX < 0){
// firstTouchxy = '';
// }
if(direction == "right"){
isMoved = false;
event.preventDefault();
}
if(direction == "top" || direction == "down"){
isMoved = false;
return;
}
if(angle <= 15 && direction === 'left'){
event.preventDefault()
isMoved = true;
}
// console.log(handleTranslateVal)
// if(isMoved)self.setTranslate(element,""+(handleTranslateVal+10)+"px");
if((event.timeStamp - firstTouchTime) >= 100 && touchXDelta < 0 && touchMoveObj.screenX > 0 && isMoved){
// event.stopPropagation();
// element.classList.add("aui-swipe-moving");
// event.preventDefault();
if(element.className.indexOf("aui-swipe-opened") <= -1){
if((handleTranslateVal+10) > -btnWidth){
self.setTranslate(element,""+(handleTranslateVal+10)+"px");
}
}else{
return
}
}
},false)
element.addEventListener('touchend', function(event){
self.setTransform(element,300);
var touchEndObj = event.changedTouches[0];
var touchEndxy = {
x: touchEndObj.clientX || 0,
y: touchEndObj.clientY || 0
};
var toucheEndX = touchEndObj.clientX - firstTouchX;
var toucheEndY = touchEndObj.clientY - firstTouchY;
var direction = self.getDirection(toucheEndX,toucheEndY);
// element.classList.remove("aui-swipe-moving");
if(direction=='left' && handleTranslateVal < (-btnWidth/3) && isMoved){
self.setTranslate(element,""+-btnWidth+"px");
element.classList.add("aui-swipe-opened");
callback({
'status':true,
'dom':element
})
isOpened = true;
}else{
element.classList.remove("aui-swipe-opened");
self.setTranslate(element,"0px");
isOpened = false;
}
// isMoved = false;
console.log(isOpened)
},true)
},
setTransform : function (el,value){
el.style.webkitTransitionDuration = el.style.transitionDuration = value+'ms';
},
setTranslate : function (el,value){
if(el)el.style.webkitTransform = el.style.transform = "translate3d("+value+",0,0)";
},
getDistance : function(p1, p2, props) {
if (!props) { props = ['x', 'y'];}
var x = p2[props[0]] - p1[props[0]];
var y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
},
getAngle:function(moveX, moveY){
// var x = Math.abs(x1 - x2);
// var y = Math.abs(y1 - y2);
var z = Math.sqrt(moveX*moveX + moveY*moveY);
return Math.round((Math.asin(moveY / z) / Math.PI*180));
},
getDirection : function(x, y) {
if (x === y) { return '';}
if (Math.abs(x) >= Math.abs(y)) {
return x > 0 ? 'right' : 'left';
} else {
return y > 0 ? 'down' : 'up';
}
}
}
window.auiListSwipe = auiListSwipe;
})(window);
\ No newline at end of file
/**
* aui-list-swipe.js 列表页滑动菜单
* verson 0.0.3
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
"use strict";
var translateVal,
friction = 1,
firstTouchX,
firstTouchxy,
firstTouchY,
firstTouch,
firstTouchTime,
touchXDelta,
handleTranslateVal;
var TranslateZero = "translate3d(0,0,0)",
TranslateCent = "translate3d(100%,0,0)";
var swipeHandle = false,
btnWidth = false,
swipeBtnsRight = false;
var isMoved = false,isOpened=false;
var d = false;
var auiListSwipe = function (callback) {
this._init(callback);
}
auiListSwipe.prototype = {
// var self = this;
_init: function(callback){
var self = this;
// var d = document.querySelectorAll("selectors")
window.addEventListener('touchstart', function(event){
// 如果已经打开,将已经打开的关闭
if(isOpened && swipeHandle){
// isOpened = false;
self.setTranslate(swipeHandle,"0px");
swipeHandle.classList.remove("aui-swipe-opened");
return;
}else{
var target = event.target;
// 过滤点击
for(; target && target !== document; target = target.parentNode){
// console.log(target.classList)
if (target.classList){
if (target.classList.contains("aui-swipe-handle")) {
swipeHandle = target;
firstTouch = event.changedTouches[0];
firstTouchX = firstTouch.clientX;
firstTouchY = firstTouch.clientY;
firstTouchTime = event.timeStamp;
if(swipeHandle.className.indexOf("aui-swipe-opened") > -1){
// console.log(1)
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
event.preventDefault();
return;
}else{
// setTimeout(function(){
self.toggleEvents(swipeHandle,callback);
// }, 100)
}
}
}
}
}
// if(swipeHandle){
// event.preventDefault();
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
// swipeHandle = false;
// return;
// }
// isMoved = false;
// swipeHandle = false;
})
},
toggleEvents:function(element,callback){
if(!swipeHandle){
return;
}
var self = this;
self.setTransform(element,300);
element.addEventListener('touchstart', function(event){
// if(element.className.indexOf("aui-swipe-opened") > -1){
// self.setTranslate(element,"0px");
// element.classList.remove("aui-swipe-opened");
// return;
// }
//:active样式引起列表背景色冲突
element.parentNode.style.backgroundColor = "#ffffff";
if(!element.nextSibling)return;
},false)
element.addEventListener('touchmove', function(event){
event.preventDefault();
if(document.querySelector(".aui-swipe-opened")){
event.preventDefault();
if(swipeHandle != document.querySelector(".aui-swipe-opened")){
self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
isOpened = false;
event.stopPropagation()
return;
}
}
// self.getAngle(event)
self.setTransform(element,0);
// if(element.className.indexOf("aui-swipe-opened") > -1)return;
if(element.parentNode.querySelector(".aui-swipe-btn")){
btnWidth = element.parentNode.querySelector(".aui-swipe-btn").offsetWidth;
}
// 列表触摸滑动时如果有已经显示的将其关闭,并退出。
var touchMoveObj = event.changedTouches[0],
touchX = touchMoveObj.clientX;
touchXDelta = -Math.pow(firstTouchX-touchX, 0.85);
handleTranslateVal = touchXDelta/friction;
// touchXDelta = touchX - firstTouchX;
// handleTranslateVal = touchXDelta/0.15;
// console.log(handleTranslateVal)
var moveX = touchMoveObj.clientX - firstTouchX;
var moveY = touchMoveObj.clientY - firstTouchY;
var direction = self.getDirection(moveX,moveY);
var angle = self.getAngle(Math.abs(moveX),Math.abs(moveY));
// console.log(isMoved);
// // 解决滑动屏幕返回时事件冲突,主要针对部分特殊机型
// if(touchMoveObj.screenX < 0){
// firstTouchxy = '';
// }
if(direction == "right"){
isMoved = false;
event.preventDefault();
}
if(direction == "top" || direction == "down"){
isMoved = false;
return;
}
if(angle <= 15 && direction === 'left'){
event.preventDefault()
isMoved = true;
}
// console.log(handleTranslateVal)
// if(isMoved)self.setTranslate(element,""+(handleTranslateVal+10)+"px");
if((event.timeStamp - firstTouchTime) >= 100 && touchXDelta < 0 && touchMoveObj.screenX > 0 && isMoved){
// event.stopPropagation();
// element.classList.add("aui-swipe-moving");
// event.preventDefault();
if(element.className.indexOf("aui-swipe-opened") <= -1){
if((handleTranslateVal+10) > -btnWidth){
self.setTranslate(element,""+(handleTranslateVal+10)+"px");
}
}else{
return
}
}
},false)
element.addEventListener('touchend', function(event){
self.setTransform(element,300);
var touchEndObj = event.changedTouches[0];
var touchEndxy = {
x: touchEndObj.clientX || 0,
y: touchEndObj.clientY || 0
};
var toucheEndX = touchEndObj.clientX - firstTouchX;
var toucheEndY = touchEndObj.clientY - firstTouchY;
var direction = self.getDirection(toucheEndX,toucheEndY);
// element.classList.remove("aui-swipe-moving");
if(direction=='left' && handleTranslateVal < (-btnWidth/3) && isMoved){
self.setTranslate(element,""+-btnWidth+"px");
element.classList.add("aui-swipe-opened");
callback({
'status':true,
'dom':element
})
// isOpened = true;
}else{
element.classList.remove("aui-swipe-opened");
self.setTranslate(element,"0px");
isOpened = false;
}
// isMoved = false;
console.log(isOpened)
},true)
},
setTransform : function (el,value){
el.style.webkitTransitionDuration = el.style.transitionDuration = value+'ms';
},
setTranslate : function (el,value){
if(el)el.style.webkitTransform = el.style.transform = "translate3d("+value+",0,0)";
},
getDistance : function(p1, p2, props) {
if (!props) { props = ['x', 'y'];}
var x = p2[props[0]] - p1[props[0]];
var y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
},
getAngle:function(moveX, moveY){
// var x = Math.abs(x1 - x2);
// var y = Math.abs(y1 - y2);
var z = Math.sqrt(moveX*moveX + moveY*moveY);
return Math.round((Math.asin(moveY / z) / Math.PI*180));
},
getDirection : function(x, y) {
if (x === y) { return '';}
if (Math.abs(x) >= Math.abs(y)) {
return x > 0 ? 'right' : 'left';
} else {
return y > 0 ? 'down' : 'up';
}
}
}
window.auiListSwipe = auiListSwipe;
})(window);
\ No newline at end of file
/**
* aui-popup.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiPopup = function() {
};
var isShow = false;
auiPopup.prototype = {
init: function(params,callback){
this.frameBounces = params.frameBounces;
this.location = params.location;
this.buttons = params.buttons;
this.maskDiv;
this.popupDiv;
var self = this;
self.open(params,callback);
},
open: function(params,callback) {
var buttonsHtml='',locationClass = 'aui-popup-top';
var self = this;
if(self.popupDiv){
self.close();
return;
}
if(!self.maskDiv){
self.maskDiv = document.createElement("div");
self.maskDiv.className = "aui-mask";
document.body.appendChild(self.maskDiv);
}
switch (self.location) {
case "top":
locationClass = 'aui-popup-top';
break;
case "top-left":
locationClass = 'aui-popup-top-left';
break;
case "top-right":
locationClass = 'aui-popup-top-right';
break;
case "bottom":
locationClass = 'aui-popup-bottom';
break;
case "bottom-left":
locationClass = 'aui-popup-bottom-left';
break;
case "bottom-right":
locationClass = 'aui-popup-bottom-right';
break;
default:
locationClass = 'aui-popup-top';
break;
}
self.popupDiv = document.createElement("div");
self.popupDiv.className = "aui-popup "+locationClass;
self.popupDiv.innerHTML = '<div class="aui-popup-arrow"></div><div class="aui-popup-content"></div>';
document.body.appendChild(self.popupDiv);
if(self.buttons && self.buttons.length){
buttonsHtml += '<div class="aui-list">';
for(var i = 0; i < self.buttons.length;i++){
buttonsHtml += '<div class="aui-list-item">';
buttonsHtml += '<div class="aui-list-item-left"><img src="'+self.buttons[i].image+'"></div>';
buttonsHtml += '<div class="aui-list-item-center">'+self.buttons[i].text+'</div>';
buttonsHtml += '</div>';
}
buttonsHtml += '</ul>';
}
document.querySelector(".aui-popup .aui-popup-content").insertAdjacentHTML('beforeend', buttonsHtml);
var actionsheetHeight = document.querySelector(".aui-popup").offsetHeight;
self.maskDiv.classList.add("aui-mask-in");
self.popupDiv.classList.add("aui-popup-in");
self.popupDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
self.maskDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:false
});
}
var popupButtons = document.querySelectorAll(".aui-popup .aui-list-item");
if(popupButtons && popupButtons.length > 0){
setTimeout(function(){
self.maskDiv.onclick = function(){self.close();return;};
for(var ii = 0; ii < popupButtons.length; ii++){
(function(e){
popupButtons[e].onclick = function(){
if(self.buttons[e].value){
var _value = self.buttons[e].value;
}else{
var _value = null;
}
if(callback){
callback({
buttonIndex: e+1,
buttonTitle: this.textContent,
buttonValue: _value
});
};
self.close();
return;
}
})(ii)
}
}, 350)
}
},
close: function(){
var self = this;
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:true
});
}
if(self.popupDiv){
var actionsheetHeight = self.popupDiv.offsetHeight;
self.popupDiv.classList.add("aui-popup-out");
self.maskDiv.style.opacity = 0;
setTimeout(function(){
if(self.maskDiv){
self.maskDiv.parentNode.removeChild(self.maskDiv);
}
self.popupDiv.parentNode.removeChild(self.popupDiv);
self.maskDiv = self.popupDiv = false;
}, 300)
}
}
};
window.auiPopup = auiPopup;
})(window);
/**
* aui-popup.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiPopup = function() {
this._init();
};
var CLASS_MASK = "aui-mask",
CLASS_MASK_IN = 'aui-mask-in',
CLASS_MASK_OUT = 'aui-mask-out',
CLASS_POPUP = 'aui-popup',
CLASS_POPUP_IN = 'aui-popup-in',
CLASS_POPUP_OUT = 'aui-popup-out',
CLASS_POPUP_FOR = 'aui-popup-for';
var __MASK = '.'+CLASS_MASK,
__MASK_IN = '.'+CLASS_MASK_IN,
__MASK_OUT = '.'+CLASS_MASK_OUT,
__POPUP = '.'+CLASS_POPUP,
__POPUP_IN = '.'+CLASS_POPUP_IN,
__POPUP_OUT = '.'+CLASS_POPUP_OUT;
var popupStatus = false;
auiPopup.prototype = {
_init: function() {
var self = this;
var _btn = document.querySelectorAll("["+CLASS_POPUP_FOR+"]");
if(_btn){
for(var i=0;i<_btn.length;i++){
_btn[i].setAttribute("tapmode", "");
_btn[i].onclick = function(e){
var popupId = this.getAttribute(CLASS_POPUP_FOR);
var popupDom = document.getElementById(popupId);
if(popupDom){
if(popupDom.className.indexOf(CLASS_POPUP_IN) > -1 || document.querySelector(__POPUP_IN)){
self.hide(popupDom);
}else{
self.show(popupDom);
}
}else{
return;
}
}
}
}
},
show: function(el){
var self = this;
if(el.className.indexOf(CLASS_POPUP_IN) > -1 || document.querySelector(__POPUP_IN)){
self.hide(el);
return;
}
if(popupStatus) return;
if(!document.querySelector(__MASK)){
var maskHtml = '<div class="aui-mask"></div>';
document.body.insertAdjacentHTML('beforeend', maskHtml);
}
el.style.display = "block";
setTimeout(function(){
document.querySelector(__MASK).classList.add(CLASS_MASK_IN);
el.classList.add(CLASS_POPUP_IN);
popupStatus = true;
}, 10)
document.querySelector(__MASK).addEventListener("touchstart", function(event){
event.preventDefault();
self.hide(el);
})
el.addEventListener("touchmove", function(event){
event.preventDefault();
},false)
},
hide: function(el){
if(!popupStatus) return;
document.querySelector(__MASK).classList.remove(CLASS_MASK_IN);
document.querySelector(__MASK).classList.add(CLASS_MASK_OUT);
if(!document.querySelector(__POPUP_IN))return;
document.querySelector(__POPUP_IN).classList.add(CLASS_POPUP_OUT);
document.querySelector(__POPUP_IN).classList.remove(CLASS_POPUP_IN);
setTimeout(function(){
if(!document.querySelector(__POPUP_OUT))return;
document.querySelector(__POPUP_OUT).style.display = "none";
document.querySelector(__POPUP_OUT).classList.remove(CLASS_POPUP_OUT);
if(document.querySelector(__MASK)){
document.querySelector(__MASK).parentNode.removeChild(document.querySelector(__MASK));
}
popupStatus = false;
}, 300)
}
};
window.auiPopup = auiPopup;
})(window);
\ No newline at end of file
/**
* aui-pull-refresh.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
'use strict';
/**
* Extend obj function
*
* This is an object extender function. It allows us to extend an object
* by passing in additional variables and overwriting the defaults.
*/
var auiPullToRefresh = function (params,callback) {
this.extend(this.params, params);
this._init(callback);
}
var touchYDelta;
var isLoading = false;
var docElem = window.document.documentElement,
loadWrapH,
win = {width: window.innerWidth, height: window.innerHeight},
winfactor= 0.2,
translateVal,
isMoved = false,
firstTouchY, initialScroll;
auiPullToRefresh.prototype = {
params: {
container: document.querySelector('.aui-refresh-content'),
friction: 2.5,
triggerDistance: 100,
callback:false
},
_init : function(callback) {
var self = this;
var loadingHtml = '<div class="aui-refresh-load"><div class="aui-refresh-pull-arrow"></div></div>';
self.params.container.insertAdjacentHTML('afterbegin', loadingHtml);
self.params.container.addEventListener('touchstart', function(ev){
self.touchStart(ev)
});
self.params.container.addEventListener('touchmove', function(ev){
self.touchMove(ev)
});
self.params.container.addEventListener('touchend', function(ev){
self.touchEnd(ev,callback);
});
},
touchStart : function(ev) {
// this.params.container.classList.remove("refreshing");
if (isLoading) {
return;
}
isMoved = false;
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '0ms';
touchYDelta = '';
var touchobj = ev.changedTouches[0];
// register first touch "y"
firstTouchY = parseInt(touchobj.clientY);
initialScroll = this.scrollY();
},
touchMove : function (ev) {
if (isLoading) {
ev.preventDefault();
return;
}
var self = this;
var moving = function() {
var touchobj = ev.changedTouches[0], // reference first touch point for this event
touchY = parseInt(touchobj.clientY);
touchYDelta = touchY - firstTouchY;
if ( self.scrollY() === 0 && touchYDelta > 0 ) {
ev.preventDefault();
}
if ( initialScroll > 0 || self.scrollY() > 0 || self.scrollY() === 0 && touchYDelta < 0 ) {
firstTouchY = touchY;
return;
}
translateVal = Math.pow(touchYDelta, 0.85);
self.params.container.style.webkitTransform = self.params.container.style.transform = 'translate3d(0, ' + translateVal + 'px, 0)';
isMoved = true;
if(touchYDelta > self.params.triggerDistance){
self.params.container.classList.add("aui-refresh-pull-up");
self.params.container.classList.remove("aui-refresh-pull-down");
}else{
self.params.container.classList.add("aui-refresh-pull-down");
self.params.container.classList.remove("aui-refresh-pull-up");
}
};
this.throttle(moving(), 20);
},
touchEnd : function (ev,callback) {
var self =this;
if (isLoading|| !isMoved) {
isMoved = false;
return;
}
// 根据下拉高度判断是否加载
if( touchYDelta >= this.params.triggerDistance) {
isLoading = true; //正在加载中
ev.preventDefault();
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '300ms';
this.params.container.style.webkitTransform =
this.params.container.style.transform = 'translate3d(0,60px,0)';
document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '0ms';
self.params.container.classList.add("aui-refreshing");
if(callback){
callback({
status:"success"
});
}
}else{
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '300ms';
this.params.container.style.webkitTransform =
this.params.container.style.transform = 'translate3d(0,0,0)';
if(callback){
callback({
status:"fail"
});
}
}
isMoved = false;
return;
},
cancelLoading : function () {
var self =this;
isLoading = false;
self.params.container.classList.remove("aui-refreshing");
document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '300ms';
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '0ms';
self.params.container.style.webkitTransform =
self.params.container.style.transform = 'translate3d(0,0,0)';
self.params.container.classList.remove("aui-refresh-pull-up");
self.params.container.classList.add("aui-refresh-pull-down");
return;
},
scrollY : function() {
return window.pageYOffset || docElem.scrollTop;
},
throttle : function(fn, delay) {
var allowSample = true;
return function(e) {
if (allowSample) {
allowSample = false;
setTimeout(function() { allowSample = true; }, delay);
fn(e);
}
};
},
winresize : function () {
var resize = function() {
win = {width: window.innerWidth, height: window.innerHeight};
};
throttle(resize(), 10);
},
extend: function(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
}
window.auiPullToRefresh = auiPullToRefresh;
})(window);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment