index.html
3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!--验收 - 详情页 - wwb-->
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="import" href="./success_tpl.html" id="success"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../../css/mui.min.css" rel="stylesheet" />
<link href="../../css/themes.css" rel="stylesheet" />
<link href="../../css/index_view.css" rel="stylesheet" />
<style>
.result-footer{
text-align: center;
margin-top: 36px;
}
.btn{
display: inline-block;
width: 120px;
height: 36px;
line-height: 36px;
border-radius: 3px;
}
.keep{
color: #4cd964;
border: 1px solid #4cd964;
margin-right: 24px;
}
.keep:active{
color: #4cd964;
}
.finish{
color: #007aff;
border: 1px solid #007aff;
}
.finish:active{
color: #007aff;
}
</style>
</head>
<body>
<div class="mui-content">
<div id="result" class="am-result">
</div>
<div class="result-footer">
<a class="btn keep">继续<span class="actionName"></span></a>
<a class="btn finish">完成</a>
</div>
</div>
<script src="../../js/mui.min.js"></script>
<script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
(function($) {
$.init()
// 模板加载
$.ready(function(){
var utils = new Utils();
utils.appendModule('#success');
});
$.plusReady(function(){
var self = plus.webview.currentWebview();
var parmas = JSON.parse(self.parmas);
console.log(parmas,'parmas');
var data = {};
data.finishUrl = parmas.finishUrl;
data.keepUrl = parmas.keepUrl;
switch(parmas.resultType){
case 'acceptance':
data.resultType = '验收';
break;
case 'ground':
data.resultType = '上架';
break;
case 'picking':
data.resultType = '拣货';
break;
case 'check':
data.resultType = '盘点';
break;
case 'move':
data.resultType = '移动';
break;
default:
break;
}
document.querySelector('.actionName').innerText = data.resultType;
var html = template('success_tpl', data);
document.getElementById('result').innerHTML = html;
// 继续操作
$('.result-footer').on('click','.keep',function(){
var page = plus.webview.getWebviewById(parmas.keepUrl);
mui.fire(page,'pagefresh',{ params: JSON.stringify(parmas.itemData),selectTab: '1' });
common.gotowin(parmas.keepUrl,{ params: JSON.stringify(parmas.itemData) });
// plus.webview.currentWebview().close();
});
// 完成操作
$('.result-footer').on('tap','.finish',function(){
var page = plus.webview.getWebviewById(parmas.finishUrl);
console.log(page);
mui.fire(page,'pagefresh',{ hasAcceptance: true });
common.gotowin(parmas.finishUrl, {}, false)
})
})
})(mui);
</script>
</body>
</html>