spd-pad项目代码
Showing
139 changed files
with
23838 additions
and
0 deletions
.gitignore
0 → 100644
.project
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>spd</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>com.aptana.ide.core.unifiedBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>com.pandora.projects.ui.MKeyBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | </buildSpec> | ||
19 | <natures> | ||
20 | <nature>com.pandora.projects.ui.MKeyNature</nature> | ||
21 | <nature>com.aptana.projects.webnature</nature> | ||
22 | </natures> | ||
23 | <filteredResources> | ||
24 | <filter> | ||
25 | <id>1537165259397</id> | ||
26 | <name></name> | ||
27 | <type>26</type> | ||
28 | <matcher> | ||
29 | <id>org.eclipse.ui.ide.multiFilter</id> | ||
30 | <arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
31 | </matcher> | ||
32 | </filter> | ||
33 | <filter> | ||
34 | <id>1537265424073</id> | ||
35 | <name></name> | ||
36 | <type>26</type> | ||
37 | <matcher> | ||
38 | <id>org.eclipse.ui.ide.multiFilter</id> | ||
39 | <arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
40 | </matcher> | ||
41 | </filter> | ||
42 | <filter> | ||
43 | <id>1537983961577</id> | ||
44 | <name></name> | ||
45 | <type>26</type> | ||
46 | <matcher> | ||
47 | <id>org.eclipse.ui.ide.multiFilter</id> | ||
48 | <arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
49 | </matcher> | ||
50 | </filter> | ||
51 | <filter> | ||
52 | <id>1538142712517</id> | ||
53 | <name></name> | ||
54 | <type>26</type> | ||
55 | <matcher> | ||
56 | <id>org.eclipse.ui.ide.multiFilter</id> | ||
57 | <arguments>1.0-name-matches-false-false-node_modules</arguments> | ||
58 | </matcher> | ||
59 | </filter> | ||
60 | </filteredResources> | ||
61 | </projectDescription> |
assest/guide-pic1.png
0 → 100644

71 KB
assest/guide-pic2.png
0 → 100644

72.1 KB
assest/guide-pic3.png
0 → 100644

73.4 KB
assest/login.png
0 → 100644

23 KB
assest/loginBg.jpg
0 → 100644

81.3 KB
assest/password.svg
0 → 100644
1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="48px" height="48.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#f2a11c" d="M868.593046 403.832442c-30.081109-28.844955-70.037123-44.753273-112.624057-44.753273L265.949606 359.079168c-42.554188 0-82.510202 15.908318-112.469538 44.690852-30.236652 28.782533-46.857191 67.222007-46.857191 108.198258l0 294.079782c0 40.977273 16.619516 79.414701 46.702672 108.136859 29.959336 28.844955 70.069869 44.814672 112.624057 44.814672l490.019383 0c42.585911 0 82.696444-15.969717 112.624057-44.814672 30.082132-28.844955 46.579875-67.222007 46.579875-108.136859L915.172921 511.968278C915.171897 471.053426 898.675178 432.677397 868.593046 403.832442zM841.821309 806.049083c0 22.098297-8.882298 42.772152-25.099654 58.306964-16.154935 15.661701-37.81935 24.203238-60.752666 24.203238L265.949606 888.559285c-22.934339 0-44.567032-8.54256-60.877509-24.264637-16.186657-15.474436-25.067932-36.148291-25.067932-58.246589L180.004165 511.968278c0-22.035876 8.881274-42.772152 25.192775-58.307987 16.186657-15.536858 37.81935-24.139793 60.753689-24.139793l490.019383 0c22.933315 0 44.597731 8.602935 60.752666 24.139793 16.21838 15.535835 25.099654 36.272112 25.099654 58.307987L841.822332 806.049083zM510.974136 135.440715c114.914216 0 208.318536 89.75214 208.318536 200.055338l73.350588 0c0-149.113109-126.366036-270.496667-281.669124-270.496667-155.333788 0-281.699824 121.383558-281.699824 270.496667l73.350588 0C302.623877 225.193879 396.059919 135.440715 510.974136 135.440715zM474.299865 747.244792l73.350588 0L547.650453 629.576859l-73.350588 0L474.299865 747.244792z" /></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assest/qrcode.png
0 → 100644

18.9 KB
assest/qrcode_icon.png
0 → 100644

1.8 KB
assest/start-1080x1882.png
0 → 100644

232 KB
assest/start-480x762.png
0 → 100644

61.3 KB
assest/start.jpg
0 → 100644

307 KB
assest/start720x1242.png
0 → 100644

121 KB
assest/success.svg
0 → 100644
1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1537252931070" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1137" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M510.545 28.22c-267.043 0-483.521 216.477-483.521 483.52s216.479 483.521 483.521 483.521 483.52-216.479 483.52-483.521S777.588 28.22 510.545 28.22zM776.855 407.855l-315.37 315.37c-9.763 9.763-22.559 14.645-35.355 14.645-12.796 0-25.592-4.882-35.355-14.645l-176.13-176.13c-19.526-19.525-19.526-51.184 0-70.71 19.526-19.526 51.184-19.527 70.711 0L426.13 617.159l280.015-280.015c19.527-19.526 51.184-19.526 70.711 0C796.382 356.671 796.382 388.329 776.855 407.855z" p-id="1138" fill="#f2a11c"></path></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assest/user.svg
0 → 100644
1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1537337112042" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3922" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M515.478588 14.230588c-274.025412 0-496.941176 222.945882-496.941176 496.941176 0 274.010353 222.915765 496.926118 496.941176 496.926118 273.980235 0 496.926118-222.915765 496.926118-496.926118C1012.404706 237.176471 789.473882 14.230588 515.478588 14.230588zM801.942588 878.742588c-14.652235-145.182118-137.532235-258.846118-286.479059-258.846118-148.946824 0-271.826824 113.679059-286.464 258.846118C119.627294 793.313882 49.136941 660.374588 49.136941 511.171765c0-257.144471 209.212235-466.386824 466.356706-466.386824 257.129412 0 466.341647 209.242353 466.341647 466.386824C981.820235 660.374588 911.329882 793.344 801.942588 878.742588z" p-id="3923" fill="#f2a11c"></path><path d="M511.713882 241.829647c-89.765647 0-162.816 73.065412-162.816 162.816s73.065412 162.800941 162.816 162.800941c89.720471 0 162.785882-73.035294 162.785882-162.800941S601.434353 241.829647 511.713882 241.829647z" p-id="3924" fill="#f2a11c"></path></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
assest/userlogin.svg
0 → 100644
1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="48px" height="48.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#f2a11c" d="M691.2 569.6c81.067-55.467 134.4-149.333 134.4-256C825.6 140.8 684.8 0 512 0S200.533 140.8 200.533 311.467c0 106.666 53.334 200.533 134.4 256C151.467 640 23.467 817.067 23.467 1024h87.466c0-204.8 155.734-375.467 354.134-398.933 2.133 0 55.466-4.267 100.266 0h4.267c194.133 27.733 343.467 194.133 343.467 396.8h89.6C1000.533 817.067 872.533 640 691.2 569.6zM512 546.133c-130.133 0-234.667-104.533-234.667-234.666C277.333 181.333 381.867 76.8 512 76.8c130.133 0 234.667 104.533 234.667 234.667 0 130.133-104.534 234.666-234.667 234.666z" /></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/acc_batch.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="batch_list_tpl.html" id="list_tpl" /> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <div class="mui-content"> | ||
17 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
18 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
19 | <label class="mui-pull-right theme_back_font">返回</label> | ||
20 | </a> | ||
21 | <h1 class="mui-title themes_title">药品信息</h1> | ||
22 | </header> | ||
23 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
24 | <div class="home-card-title">待验收</div> | ||
25 | </div> | ||
26 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;padding-bottom: 59px;"> | ||
27 | <div class="mui-slider-group"> | ||
28 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
29 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
30 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
31 | <ul class="mui-table-view"> | ||
32 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
33 | |||
34 | </li> | ||
35 | </ul> | ||
36 | </div> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div class="fix_bottom-wraper"> | ||
42 | <div class="fix-bottom-content"> | ||
43 | <div class="mui-checkbox mui-left"> | ||
44 | <label>全选</label> | ||
45 | <input name="checkboxAll" value="1" id="checkall" type="checkbox" style="top: -5px;z-index: 10;"> | ||
46 | </div> | ||
47 | <span style="margin-left: 8px;">已选中 <label class="total"> 0 </label> 项</span> | ||
48 | </div> | ||
49 | <a href="javascript:;" class="btn acceptance fix-bottom-extra">验 收</a> | ||
50 | </div> | ||
51 | </div> | ||
52 | |||
53 | <script src="../../js/mui.min.js"></script> | ||
54 | <script src="../../js/jquery.min.js"></script> | ||
55 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
56 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
57 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
58 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
59 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
60 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
61 | <script type="text/javascript"> | ||
62 | (function($, $JQ) { | ||
63 | |||
64 | $.init({ | ||
65 | beforeback: function() { | ||
66 | var list = plus.webview.currentWebview().opener(); | ||
67 | mui.fire(list, 'pagefresh', { selectTabs: '1', query: params.query || {} }); | ||
68 | return true; | ||
69 | } | ||
70 | }) | ||
71 | |||
72 | var page = 1, | ||
73 | totalPage = undefined, | ||
74 | pageSize = 15, | ||
75 | isMore = true; | ||
76 | |||
77 | |||
78 | var checkType = undefined, | ||
79 | status = undefined, // 验收单类型 // 验收状态 1 待验收 2 已验收 | ||
80 | params = undefined, | ||
81 | distributeCode = undefined, | ||
82 | isShowTemprature = undefined, | ||
83 | barcode = undefined, | ||
84 | isPsList = undefined, | ||
85 | selectedRows = [], | ||
86 | acceptList = [],// 数据 | ||
87 | selecteIndex = []; | ||
88 | var _url = '/a/exam/detail', // 分页接口 | ||
89 | checkUrl = '/a/checkacceptdetail/checkList'; | ||
90 | /* 渲染模板 */ | ||
91 | var utils = new Utils(); | ||
92 | utils.appendModule('#list_tpl'); | ||
93 | var deceleration = mui.os.ios?0.003:0.0009; | ||
94 | $('.mui-scroll-wrapper').scroll({ | ||
95 | bounce: true, | ||
96 | indicators: true, //是否显示滚动条 | ||
97 | deceleration:deceleration | ||
98 | }); | ||
99 | |||
100 | |||
101 | function template(data, insertType,render) { | ||
102 | utils.innerTplHtml('batch_list_tpl_view', '.mui-tab1', data, insertType); | ||
103 | if(render){ | ||
104 | var checkList = document.querySelectorAll('.checkone'); | ||
105 | mui.each(selecteIndex, function(index, item) { | ||
106 | checkList[item].checked = true; | ||
107 | }); | ||
108 | } | ||
109 | } | ||
110 | /* 下拉刷新 */ | ||
111 | function pulldownRefresh() { | ||
112 | // 重置 勾选项 | ||
113 | document.querySelector('.total').innerText = 0; | ||
114 | document.querySelector('#checkall').checked = false; | ||
115 | selecteIndex = []; | ||
116 | var self = this; | ||
117 | page = 1; | ||
118 | var postData = { | ||
119 | distributeCode: distributeCode, | ||
120 | status: status, | ||
121 | pageNo: page, | ||
122 | pageSize: pageSize | ||
123 | }; | ||
124 | if(barcode){ | ||
125 | postData = { | ||
126 | barcode: barcode, | ||
127 | status: status, | ||
128 | pageNo: page, | ||
129 | pageSize: pageSize | ||
130 | }; | ||
131 | } | ||
132 | mui.ajaxRequest(_url, { | ||
133 | type: 'POST', | ||
134 | data: postData, | ||
135 | success: function(data) { | ||
136 | if(data.code == 200){ | ||
137 | var resData = data.data; | ||
138 | resData.page = page; | ||
139 | resData.pageSize = pageSize; | ||
140 | acceptList = resData.list; | ||
141 | resData.acceptance = true; | ||
142 | resData.checkType = checkType; | ||
143 | resData.barcode = barcode; | ||
144 | resData.isPsList = isPsList; | ||
145 | totalPage = data.totalPage; | ||
146 | console.log( resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)) | ||
147 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
148 | isMore = false; | ||
149 | self.endPullDownToRefresh(true); | ||
150 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
151 | } else { | ||
152 | isMore = true; | ||
153 | self.endPullDownToRefresh(false); | ||
154 | self.refresh(true); | ||
155 | } | ||
156 | return template(resData, false) | ||
157 | }else{ | ||
158 | self.endPullDownToRefresh(true); | ||
159 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
160 | //mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
161 | } | ||
162 | }, | ||
163 | error: function(xhr, type, errorThrown) { | ||
164 | console.log(xhr.responseText) | ||
165 | } | ||
166 | }); | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | |||
171 | * 上拉加载更多 | ||
172 | * */ | ||
173 | function pullupRefresh() { | ||
174 | document.querySelector('#checkall').checked = false; | ||
175 | var self = this; | ||
176 | console.log(isMore, 'isMore'); | ||
177 | if (isMore) { | ||
178 | page++; | ||
179 | var paramData = { | ||
180 | distributeCode: distributeCode, | ||
181 | status: status, | ||
182 | pageNo: page, | ||
183 | pageSize: pageSize | ||
184 | } | ||
185 | if(barcode){ | ||
186 | paramData = { | ||
187 | barcode: barcode, | ||
188 | status: status, | ||
189 | pageNo: page, | ||
190 | pageSize: pageSize | ||
191 | }; | ||
192 | } | ||
193 | mui.ajaxRequest(_url, { | ||
194 | type: 'POST', | ||
195 | data: paramData, | ||
196 | success: function(data) { | ||
197 | if(data.code == 200){ | ||
198 | var resData = data.data; | ||
199 | resData.page = page; | ||
200 | resData.pageSize = pageSize; | ||
201 | mui.each(resData.list,function(index,item){ | ||
202 | acceptList.push(item) | ||
203 | }); | ||
204 | resData.acceptance = true; | ||
205 | resData.checkType = checkType; | ||
206 | resData.barcode = barcode; | ||
207 | resData.isPsList = isPsList; | ||
208 | if (resData.pageNo === resData.totalPage) { | ||
209 | isMore = false; | ||
210 | self.endPullUpToRefresh(true); | ||
211 | } else { | ||
212 | isMore = true; | ||
213 | self.endPullUpToRefresh(false); | ||
214 | self.refresh(true); | ||
215 | } | ||
216 | return template(resData, true,'rerender') | ||
217 | }else{ | ||
218 | //mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
219 | isMore = false; | ||
220 | self.endPullUpToRefresh(true); | ||
221 | } | ||
222 | }, | ||
223 | error: function(xhr, type, errorThrown) { | ||
224 | console.log(xhr.responseText) | ||
225 | } | ||
226 | }); | ||
227 | } else { | ||
228 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
229 | self.endPullUpToRefresh(true); | ||
230 | } | ||
231 | |||
232 | } | ||
233 | |||
234 | // 模板加载 | ||
235 | $.plusReady(function() { | ||
236 | window.addEventListener('pagefresh',function(event){ | ||
237 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
238 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
239 | }); | ||
240 | |||
241 | var self = plus.webview.currentWebview(); | ||
242 | params = JSON.parse(self.params); //获得参数 | ||
243 | distributeCode = params.distributeCode; | ||
244 | status = params.status; | ||
245 | checkType = params.checkType; | ||
246 | isShowTemprature = params.isShowTemprature; | ||
247 | barcode = params.barcode; | ||
248 | isPsList = params.isPsList; | ||
249 | console.log(checkType,'checkType') | ||
250 | console.log(params); | ||
251 | |||
252 | //循环初始化所有下拉刷新,上拉加载。 | ||
253 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
254 | |||
255 | $(pullRefreshEl).pullToRefresh({ | ||
256 | down: { | ||
257 | style: 'circle', | ||
258 | contentdown: "下拉可以刷新", | ||
259 | contentover: "释放立即刷新", | ||
260 | contentrefresh: "正在刷新...", | ||
261 | callback: pulldownRefresh | ||
262 | }, | ||
263 | up: { | ||
264 | contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
265 | contentnomore: '没有更多数据', | ||
266 | callback: pullupRefresh | ||
267 | } | ||
268 | }); | ||
269 | }); | ||
270 | // 第一个tab 默认加载一次数据 | ||
271 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
272 | |||
273 | |||
274 | // 全选 及反选 | ||
275 | $('.fix_bottom-wraper').on('click', '#checkall', function() { | ||
276 | selecteIndex = []; | ||
277 | var checkList = document.querySelectorAll('.checkone'); | ||
278 | if (document.querySelector('#checkall').checked) { | ||
279 | // 全选 | ||
280 | mui.each(checkList, function(index, item) { | ||
281 | item.checked = true; | ||
282 | selecteIndex.push(index); | ||
283 | }); | ||
284 | document.querySelector('.total').innerText = checkList.length; | ||
285 | } else { | ||
286 | // 取消全选 | ||
287 | mui.each(checkList, function(index, item) { | ||
288 | item.checked = false | ||
289 | }); | ||
290 | document.querySelector('.total').innerText = 0; | ||
291 | selectedRows = []; | ||
292 | selecteIndex = [] | ||
293 | } | ||
294 | console.log(selecteIndex) | ||
295 | }); | ||
296 | |||
297 | // 复选框选中 | ||
298 | $('#slider').on('change', '.checkone', function(e, index) { | ||
299 | selectedRows = []; | ||
300 | selecteIndex = []; | ||
301 | console.log(JSON.stringify(e), this.dataset) | ||
302 | var checkList = document.querySelectorAll('.checkone') | ||
303 | var checkAll = document.querySelector('#checkall'); | ||
304 | var checkLen = checkList.length; | ||
305 | var len = 0; | ||
306 | mui.each(checkList,function(index,item){ | ||
307 | if(item.checked){ | ||
308 | len++; | ||
309 | selecteIndex.push(Number(this.dataset.index)); | ||
310 | } | ||
311 | }); | ||
312 | checkAll.checked = len === checkLen ? true : false; | ||
313 | document.querySelector('.total').innerText = len; | ||
314 | console.log(selecteIndex) | ||
315 | }) | ||
316 | |||
317 | |||
318 | // 绑定事件 --确认验收 | ||
319 | $('.fix_bottom-wraper').on('tap', '.acceptance', function() { | ||
320 | document.activeElement.blur(); // 隐藏软键盘 | ||
321 | console.log(document.querySelector('.total').innerText) | ||
322 | if (Number(document.querySelector('.total').innerText) === 0) { | ||
323 | return mui.alert('请至少选中一项', '警告', ['确认'], function() {}, 'div') | ||
324 | } | ||
325 | var cards = document.querySelectorAll('.am-card'); | ||
326 | let detailList = [], | ||
327 | submitData = {}; | ||
328 | if (params.isPsList || params.barcode) { | ||
329 | let selectedCards = [], | ||
330 | cardFactNum = []; | ||
331 | mui.each(selecteIndex, function(index, item) { | ||
332 | selectedCards.push(cards[item]); | ||
333 | if (cards[index].dataset.isusual === '0') { | ||
334 | // 正常单据 | ||
335 | cardFactNum.push(cards[item].querySelector('.realReceiveQuantiry')); | ||
336 | } else { | ||
337 | // 异常单据 | ||
338 | cardFactNum.push(cards[item].querySelector('.errorQuantiry')) | ||
339 | } | ||
340 | }); | ||
341 | var flag = true; | ||
342 | mui.each(cardFactNum, function(index, item) { | ||
343 | if (item.tagName === 'INPUT') { | ||
344 | if (!item.value) { | ||
345 | flag = false; | ||
346 | } | ||
347 | } | ||
348 | |||
349 | }) | ||
350 | if (!flag) { | ||
351 | return mui.alert('实到数量不能为空', '警告', ['确定'], function() {}, 'div'); | ||
352 | }; | ||
353 | |||
354 | mui.each(selectedCards, function(index, item) { | ||
355 | |||
356 | var postData = {}; | ||
357 | postData.id = item.dataset.id; | ||
358 | postData.isUsual = item.dataset.isusual; | ||
359 | postData.drugCode = item.dataset.drugcode; | ||
360 | postData.distributeCode = item.dataset.distributecode; | ||
361 | postData.rowNo = item.dataset.rowno; | ||
362 | if (item.dataset.isusual === '0') { | ||
363 | var realReceiveQuantiry = item.querySelector('.realReceiveQuantiry').value; | ||
364 | var realProductTime = item.querySelector('.realProductTime').value; | ||
365 | var productBatchNo = item.querySelector('.productBatchNo').value; | ||
366 | var realValidEndDate = item.querySelector('.realValidEndDate').value; | ||
367 | if (isShowTemprature === 1) { | ||
368 | var realAcceptanceTemperature = item.querySelector('.realAcceptanceTemperature').value; | ||
369 | postData.realAcceptanceTemperature = realAcceptanceTemperature | ||
370 | } | ||
371 | postData.realReceiveQuantiry = realReceiveQuantiry; | ||
372 | postData.realProductTime = realProductTime; | ||
373 | postData.productBatchNo = productBatchNo; | ||
374 | postData.realValidEndDate = realValidEndDate; | ||
375 | |||
376 | } else { | ||
377 | var errorQuantiry = item.querySelector('.errorQuantiry').innerText; | ||
378 | var errRealProductTime = item.querySelector('.errRealProductTime').innerText; | ||
379 | var errVailEndDate = item.querySelector('.errVailEndDate').innerText; | ||
380 | postData.realReceiveQuantiry = errorQuantiry; | ||
381 | postData.realProductTime = errRealProductTime; | ||
382 | postData.productBatchNo = item.dataset.productbatchno; | ||
383 | postData.realValidEndDate = errVailEndDate; | ||
384 | } | ||
385 | detailList.push(postData); | ||
386 | }); | ||
387 | } else { | ||
388 | mui.each(selecteIndex, function(index, item) { | ||
389 | let postData = {}; | ||
390 | postData.realReceiveQuantiry = acceptList[item].realNum;//应海洪的要求改的 | ||
391 | postData.realProductTime = acceptList[item].realProductTime; | ||
392 | postData.productBatchNo = acceptList[item].productBatchNo; | ||
393 | postData.realValidEndDate = acceptList[item].realValidEndDate; | ||
394 | postData.id = acceptList[item].id; | ||
395 | postData.isUsual = acceptList[item].isUsual; | ||
396 | if (isShowTemprature === 1) { | ||
397 | postData.realAcceptanceTemperature = acceptList[item].realAcceptanceTemperature; | ||
398 | } | ||
399 | postData.drugCode = acceptList[item].drugCode; | ||
400 | postData.distributeCode = acceptList[item].distributeCode; | ||
401 | postData.rowNo = acceptList[item].rowNo; | ||
402 | detailList.push(postData); | ||
403 | }); | ||
404 | } | ||
405 | |||
406 | submitData.detailList = detailList; | ||
407 | submitData.distributeCode = distributeCode; | ||
408 | if(barcode){ | ||
409 | submitData.barcode = barcode; | ||
410 | } | ||
411 | console.log(submitData) | ||
412 | |||
413 | var btnArray = ['否', '是']; | ||
414 | mui.confirm('确认批量验收选中的药品?', '确认', btnArray, function(e) { | ||
415 | if (e.index == 1) { | ||
416 | mui.ajaxRequest(checkUrl, { | ||
417 | type: 'POST', | ||
418 | data: submitData, | ||
419 | showWaiting: true, | ||
420 | contentType: "application/json", | ||
421 | success: function(data) { | ||
422 | if (data.code === 200) { | ||
423 | var text = "验收成功!"; | ||
424 | if(data.data[0]){ | ||
425 | text = data.data[0]; | ||
426 | } | ||
427 | mui.alert(text,'提示','确定',function (e) { | ||
428 | $JQ('.total').text(0); | ||
429 | document.querySelector('#checkall').checked=false; | ||
430 | setTimeout(function(){ | ||
431 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
432 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
433 | },300) | ||
434 | },'div'); | ||
435 | }else{ | ||
436 | mui.alert(data.mag,'提示','确定',function (e) {},'div'); | ||
437 | } | ||
438 | }, | ||
439 | error: function(xhr, type, errorThrown) { | ||
440 | console.log(xhr.responseText) | ||
441 | } | ||
442 | }) | ||
443 | } | ||
444 | }, 'div') | ||
445 | }); | ||
446 | |||
447 | |||
448 | //绑定输入实到数量验证 | ||
449 | var countModal = false; | ||
450 | $JQ('#slider').on('keyup','.realReceiveQuantiry',function(){ | ||
451 | |||
452 | var _this = this,$this = $JQ(this); | ||
453 | var index = this.dataset.index; | ||
454 | var value = Number(this.value?this.value:0); | ||
455 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
456 | var realDeliveryQuantiry = _this_node.dataset.realdeliveryquantiry?_this_node.dataset.realdeliveryquantiry:0; | ||
457 | var realReceiveQuantiry = _this_node.dataset.realnum?_this_node.dataset.realnum:0; | ||
458 | var compareNum = realDeliveryQuantiry; | ||
459 | var text = "实到数量不能大于数量"+compareNum+",且不能小于0!"; | ||
460 | if(barcode){ | ||
461 | compareNum = realReceiveQuantiry; | ||
462 | text = "实到数量不能大于条码数量"+compareNum+",且不能小于0!"; | ||
463 | } | ||
464 | if(!countModal){ | ||
465 | if(value<0 || value>compareNum){ | ||
466 | countModal = true; | ||
467 | mui.alert(text,'提示','确定',function (e) { | ||
468 | countModal = false; | ||
469 | _this.value = compareNum; | ||
470 | },'div') | ||
471 | } | ||
472 | } | ||
473 | }); | ||
474 | |||
475 | |||
476 | //生产日期与有效日期验证 | ||
477 | $JQ('#slider').on('change','.realProductTime,.realValidEndDate',function(){ | ||
478 | |||
479 | var _this = this,$this = $JQ(this); | ||
480 | var index = this.dataset.index,cls = this.className; | ||
481 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
482 | var realProductTime = _this_node.dataset.realproducttime?_this_node.dataset.realproducttime:"0"; | ||
483 | var realValidEndDate = _this_node.dataset.realvalidenddate?_this_node.dataset.realvalidenddate:"0"; | ||
484 | var value = this.value?this.value:"0"; | ||
485 | var _realProductTime = "",_realValidEndDate = ""; | ||
486 | if(realProductTime.indexOf("-") != -1){ | ||
487 | _realProductTime = Number(realProductTime.replace(/-/g,"")); | ||
488 | } | ||
489 | if(realValidEndDate.indexOf("-") != -1){ | ||
490 | _realValidEndDate = Number(realValidEndDate.replace(/-/g,"")); | ||
491 | } | ||
492 | if(value.indexOf("-") != -1){ | ||
493 | value = Number(value.replace(/-/g,"")); | ||
494 | } | ||
495 | if(cls.indexOf("realProductTime")!=-1){//生产日期 | ||
496 | var text1 = "生产日期不能大于有效日期!"; | ||
497 | if(value > _realValidEndDate){ | ||
498 | mui.alert(text1,'提示','确定',function (e) { | ||
499 | _this.value = realProductTime; | ||
500 | },'div') | ||
501 | } | ||
502 | }else if(cls.indexOf("realValidEndDate")!=-1){//有效期至 | ||
503 | var text2 = "有效日期不能小于生产日期!"; | ||
504 | if(value < _realProductTime){ | ||
505 | mui.alert(text2,'提示','确定',function (e) { | ||
506 | _this.value = realValidEndDate; | ||
507 | },'div') | ||
508 | } | ||
509 | } | ||
510 | }); | ||
511 | |||
512 | |||
513 | |||
514 | }); | ||
515 | |||
516 | })(mui, jQuery); | ||
517 | </script> | ||
518 | </body> | ||
519 | |||
520 | </html> |
container/acceptance/acc_detail.html
0 → 100644
1 | <!--验收 - 详情页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./detail_tpl.html" id="acc_detail_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/check.css" rel="stylesheet"/> | ||
12 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
13 | |||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <div class="mui-content detailRow"> | ||
18 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
19 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
20 | <li class="mui-table-view-cell mui-collapse"> | ||
21 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
22 | <div class="mui-collapse-content"> | ||
23 | |||
24 | </div> | ||
25 | </li> | ||
26 | </ul> | ||
27 | </form> | ||
28 | <form id="List"> | ||
29 | |||
30 | </form> | ||
31 | </div> | ||
32 | |||
33 | <script src="../../js/mui.min.js"></script> | ||
34 | <script src="../../js/jquery.min.js" ></script> | ||
35 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
36 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
37 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
38 | <script type="text/javascript" src="../../js/request.js" ></script> | ||
39 | <script type="text/javascript"> | ||
40 | |||
41 | (function($,$$) { | ||
42 | var utils = new Utils(); | ||
43 | utils.appendModule('#acc_detail_tpl'); | ||
44 | |||
45 | function showData(data){ | ||
46 | var html = template('detail_tpl', data); | ||
47 | if(html){ | ||
48 | document.getElementById('detailContent').innerHTML = html; | ||
49 | } | ||
50 | } | ||
51 | var checkType = undefined, | ||
52 | type = undefined, | ||
53 | data = null, | ||
54 | details = undefined, | ||
55 | barcode = undefined, | ||
56 | isPsList = undefined, | ||
57 | url = '/a/exam/detail', // 分页接口 | ||
58 | titleUrl = '/a/exam/detailhead',// 头部接口 | ||
59 | checkUrl = '/a/checkacceptdetail/checkList'; | ||
60 | $.plusReady(function(){ | ||
61 | $.init({ | ||
62 | beforeback: function() { | ||
63 | var list = plus.webview.currentWebview().opener(); | ||
64 | console.log(details.selectTabs) | ||
65 | mui.fire(list, 'pagefresh',{ selectTabs: details.selectTabs === 1 ? '1': '0' , query: details.query }); | ||
66 | return true; | ||
67 | } | ||
68 | }) | ||
69 | |||
70 | var self = plus.webview.currentWebview(); | ||
71 | details = JSON.parse(self.details);//获得参数 | ||
72 | checkType = details.checkType; | ||
73 | status = details.status; | ||
74 | barcode = details.barcode; | ||
75 | isPsList = details.isPsList; | ||
76 | console.log(JSON.stringify(details) ); | ||
77 | console.log(typeof details.selectTabs) | ||
78 | var postData = { | ||
79 | distributeCode: details.distributeCode, | ||
80 | status: details.status, | ||
81 | id: details.id | ||
82 | }; | ||
83 | if(barcode){ | ||
84 | postData.barcode = barcode; | ||
85 | } | ||
86 | var detailData = {}; | ||
87 | plus.nativeUI.showWaiting('加载中...'); | ||
88 | mui.ajaxRequest(titleUrl,{ | ||
89 | type: 'POST', | ||
90 | data: { distributeCode: postData.distributeCode }, | ||
91 | success: function(data){ | ||
92 | if(data.code === 200){ | ||
93 | for(var key in data.data){ | ||
94 | detailData[key] = data.data[key]; | ||
95 | } | ||
96 | detailData.isPsList = details.isPsList; | ||
97 | detailData.barcode = details.barcode; | ||
98 | detailData.checkType = details.checkType; | ||
99 | mui.ajaxRequest(url,{ | ||
100 | type: 'POST', | ||
101 | data: postData, | ||
102 | success: function(data){ | ||
103 | plus.nativeUI.closeWaiting(); | ||
104 | if(data.code === 200){ | ||
105 | detailData.list = data.data.list; | ||
106 | console.log(detailData) | ||
107 | |||
108 | showData(detailData); | ||
109 | if(details.hasAcceptance){ | ||
110 | setTimeout(function(){ | ||
111 | // showOrHideBtn() | ||
112 | var acceptanceBtn = '<button type="button" id="acceptance" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认验收</button>' | ||
113 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",acceptanceBtn); | ||
114 | },100) | ||
115 | } | ||
116 | |||
117 | }else{ | ||
118 | mui.toast(data.msg,{ type: 'div' }); | ||
119 | } | ||
120 | }, | ||
121 | error: function(xhr,type,errorThrown){ | ||
122 | console.log(xhr.responseText) | ||
123 | } | ||
124 | }); | ||
125 | }else{ | ||
126 | mui.toast(data.msg,{ type: 'div' }); | ||
127 | } | ||
128 | |||
129 | }, | ||
130 | error: function(xhr,type,errorThrown){ | ||
131 | console.log(xhr.responseText) | ||
132 | } | ||
133 | }); | ||
134 | |||
135 | // checkType 1 2 4 配送单 可编辑 其余 出库单 不能编辑 | ||
136 | function showOrHideBtn(){ | ||
137 | if(checkType === 1 && (details.isPsList || details.barcode) && status === '1' && detailData.list[0].isUsual === 0){ | ||
138 | var node = '<div id="addBtn"><button class="mui-btn mui-btn-block btn">+ 增加批号</button></div>'; | ||
139 | document.querySelector('#List').insertAdjacentHTML('afterEnd',node); | ||
140 | } | ||
141 | } | ||
142 | |||
143 | |||
144 | /* | ||
145 | *2 点击添加按钮 增加选填项 开始 | ||
146 | * | ||
147 | * 拖拽后显示操作图标,点击操作图标删除元素 | ||
148 | */ | ||
149 | var itemNum = 0, orderList = []; | ||
150 | mui(".detailRow").on('tap', '.btn', function() { | ||
151 | var ParentDiv = document.createElement("div") | ||
152 | ParentDiv.className = "mui-table-view-cell slide-main"; | ||
153 | ParentDiv.setAttribute('data-index', itemNum); | ||
154 | ParentDiv.innerHTML = '<div class="mui-slider-handle">' + | ||
155 | '<div class="mui-input-group">' + | ||
156 | '<div class="mui-input-row">' + | ||
157 | '<label>生产批号</label>' + | ||
158 | '<input type="text" name="acc_lot" class="mui-input-clear mui-input mui-input-ph" placeholder="请输入" >' + | ||
159 | '</div>' + | ||
160 | '<div class="mui-input-row">' + | ||
161 | '<label>数量</label>' + | ||
162 | '<input type="number" name="acc_num" class="mui-input-clear mui-input mui-input-num" value="0" placeholder="请输入" >' + | ||
163 | '</div>' + | ||
164 | '</div>' + | ||
165 | '</div>' + | ||
166 | '<div class="mui-slider-right mui-disabled">' + | ||
167 | '<a class="mui-btn mui-btn-red">删除</a>' + | ||
168 | '</div>'; | ||
169 | document.getElementById("List").appendChild(ParentDiv); | ||
170 | itemNum++; | ||
171 | addSlideDelete(); //添加侧滑删除 | ||
172 | }) | ||
173 | function addSlideDelete() { | ||
174 | mui('.slide-main').off('tap', '.mui-btn').on('tap', '.mui-btn', function(event) { | ||
175 | var elem = this; | ||
176 | var li = elem.parentNode.parentNode; | ||
177 | var btnArray = ['确认', '取消']; | ||
178 | mui.confirm('确认删除该条记录?', '操作提醒', btnArray, function(e) { | ||
179 | if(e.index == 0) { | ||
180 | setTimeout(function() { | ||
181 | mui.swipeoutClose(li); | ||
182 | }, 0); | ||
183 | itemNum--; | ||
184 | li.parentNode.removeChild(li); | ||
185 | var index = li.getAttribute('data-index'); | ||
186 | } else { | ||
187 | setTimeout(function() { | ||
188 | mui.swipeoutClose(li); | ||
189 | }, 0); | ||
190 | } | ||
191 | },'div'); | ||
192 | }); | ||
193 | } | ||
194 | |||
195 | mui('#List').on('keypress','input',function(e){ | ||
196 | if(e.keyCode === 13){ | ||
197 | |||
198 | } | ||
199 | }) | ||
200 | |||
201 | // 验收 | ||
202 | mui('.detailRow').on('tap','#acceptance',function(event){ | ||
203 | let postData = [],submitData = {}; | ||
204 | |||
205 | if((details.isPsList || details.barcode) && detailData.list[0].isUsual === 0){ // 配送单验收 可以修改 | ||
206 | // 获取产品信息详情中编辑字段值 | ||
207 | |||
208 | var phValue = document.querySelector('.mui-input').value; // 批号文号 | ||
209 | var phList = document.querySelector('#List').querySelectorAll('.mui-input-ph'); // 新增批号数据 | ||
210 | var numList = document.querySelector('#List').querySelectorAll('.mui-input-num'); // 批号对应的数值 | ||
211 | var editBatchNo = document.querySelector('.BatchNo').value; | ||
212 | var realProductTime = document.querySelector('.realProductTime').value; | ||
213 | var realValidEndDate = document.querySelector('.realValidEndDate').value; | ||
214 | if(details.isShowTemprature === 1){ | ||
215 | realAcceptanceTemperature = document.querySelector('.realAcceptanceTemperature').value; | ||
216 | } | ||
217 | var realReceiveQuantiry = document.querySelector('.realReceiveQuantiry').value; | ||
218 | let parentData = { | ||
219 | productBatchNo: detailData.list[0].productBatchNo, | ||
220 | realReceiveQuantiry: realReceiveQuantiry, | ||
221 | realProductTime: realProductTime, | ||
222 | realValidEndDate: realValidEndDate, | ||
223 | isUsual: detailData.list[0].isUsual, | ||
224 | id: detailData.list[0].id, | ||
225 | drugCode: detailData.list[0].drugCode, | ||
226 | parentId: null, | ||
227 | } | ||
228 | if(phList.length){ | ||
229 | postData.push(parentData); | ||
230 | for (let i = 0 ;i < phList.length; i++) { | ||
231 | let values = {}; | ||
232 | values.productBatchNo = phList[i].value; | ||
233 | values.realReceiveQuantiry = numList[i].value; | ||
234 | values.realProductTime = realProductTime; | ||
235 | values.realValidEndDate = realValidEndDate; | ||
236 | if(details.isShowTemprature === 1){ | ||
237 | values.realAcceptanceTemperature = realAcceptanceTemperature; | ||
238 | } | ||
239 | values.isUsual = detailData.list[0].isUsual; | ||
240 | values.drugCode = detailData.list[0].drugCode; | ||
241 | values.distributeCode = detailData.list[0].distributeCode; | ||
242 | values.rowNo = detailData.list[0].rowNo; | ||
243 | values.id = null; | ||
244 | values.parentId = detailData.list[0].id; | ||
245 | postData.push(values); | ||
246 | } | ||
247 | }else{ | ||
248 | let values = {}; | ||
249 | values.productBatchNo = editBatchNo; | ||
250 | values.realProductTime = realProductTime; | ||
251 | values.realValidEndDate = realValidEndDate; | ||
252 | if(details.isShowTemprature === 1){ | ||
253 | values.realAcceptanceTemperature = realAcceptanceTemperature; | ||
254 | } | ||
255 | values.realReceiveQuantiry = realReceiveQuantiry; | ||
256 | values.drugCode = detailData.list[0].drugCode; | ||
257 | values.isUsual = detailData.list[0].isUsual; | ||
258 | values.id = detailData.list[0].id; | ||
259 | values.distributeCode = detailData.list[0].distributeCode; | ||
260 | values.rowNo = detailData.list[0].rowNo; | ||
261 | values.parentId = null; | ||
262 | postData.push(values); | ||
263 | } | ||
264 | }else{ | ||
265 | // 非配送单验收,不能修改 | ||
266 | let values = {}; | ||
267 | values.productBatchNo = detailData.list[0].productBatchNo; | ||
268 | values.realProductTime = detailData.list[0].realProductTime; | ||
269 | values.realValidEndDate = detailData.list[0].realValidEndDate; | ||
270 | if(defaultStatus.isShowTemprature === 1){ | ||
271 | values.realAcceptanceTemperature = detailData.list[0].realAcceptanceTemperature; | ||
272 | } | ||
273 | values.realReceiveQuantiry = detailData.list[0].realNum;//应海洪要求改的 | ||
274 | values.drugCode = detailData.list[0].drugCode; | ||
275 | values.isUsual = detailData.list[0].isUsual; | ||
276 | values.id = detailData.list[0].id; | ||
277 | values.parentId = detailData.list[0].id; | ||
278 | values.distributeCode = detailData.list[0].distributeCode; | ||
279 | values.rowNo = detailData.list[0].rowNo; | ||
280 | postData.push(values); | ||
281 | } | ||
282 | |||
283 | submitData.detailList = postData; | ||
284 | submitData.distributeCode = detailData.distributeCode; | ||
285 | if(barcode){ | ||
286 | submitData.barcode = barcode; | ||
287 | } | ||
288 | let count = 0; | ||
289 | mui.each(submitData.detailList,function(index,item){ | ||
290 | count += Number(item.realReceiveQuantiry) | ||
291 | }); | ||
292 | if(count > detailData.list[0].realNum){ | ||
293 | mui.toast('请注意:实到数量比配送数量多'); | ||
294 | } | ||
295 | console.log(submitData,'submitData'); // 批号 数据 | ||
296 | document.activeElement.blur(); // 隐藏软键盘 | ||
297 | var btnArray = ['否', '是']; | ||
298 | mui.confirm('是否确认验收?', '确认', btnArray, function(e) { | ||
299 | if (e.index == 1) { | ||
300 | |||
301 | var data = submitData; | ||
302 | mui.ajaxRequest(checkUrl,{ | ||
303 | type: 'POST', | ||
304 | data: submitData, | ||
305 | showWaiting: true, | ||
306 | contentType: "application/json", | ||
307 | success: function(data){ | ||
308 | if(data.code === 200){ | ||
309 | var text = "验收成功!"; | ||
310 | if(data.data[0]){ | ||
311 | text = data.data[0]; | ||
312 | } | ||
313 | mui.alert(text,'提示','确定',function (e) { | ||
314 | var page = plus.webview.getWebviewById('acc_not_list'); | ||
315 | mui.fire(page,'pagefresh',{ selectTabs: '1', query:{} }); | ||
316 | common.gotowin('acc_not_list',{ }); | ||
317 | plus.webview.currentWebview().close(); | ||
318 | },'div'); | ||
319 | }else{ | ||
320 | mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
321 | } | ||
322 | }, | ||
323 | error: function(xhr,type,errorThrown){ | ||
324 | console.log(xhr.responseText) | ||
325 | } | ||
326 | }) | ||
327 | } | ||
328 | },'div') | ||
329 | }) | ||
330 | |||
331 | |||
332 | //绑定输入实到数量验证 | ||
333 | var countModal = false; | ||
334 | $$('.detailRow').on('keyup','.realReceiveQuantiry',function(){ | ||
335 | |||
336 | var _this = this,$this = $$(this); | ||
337 | var value = Number(this.value?this.value:0); | ||
338 | var realDeliveryQuantiry = detailData.list[0].realDeliveryQuantiry?detailData.list[0].realDeliveryQuantiry:0; | ||
339 | var realReceiveQuantiry = detailData.list[0].realNum?detailData.list[0].realNum:0; | ||
340 | var compareNum = realDeliveryQuantiry; | ||
341 | var text = "实到数量不能大于配送数量"+compareNum+",且不能小于0!"; | ||
342 | if(barcode){ | ||
343 | compareNum = realReceiveQuantiry; | ||
344 | text = "实到数量不能大于条码数量"+compareNum+",且不能小于0!"; | ||
345 | } | ||
346 | |||
347 | if(!countModal){ | ||
348 | if(value<0 || value>compareNum){ | ||
349 | countModal = true; | ||
350 | mui.alert(text,'提示','确定',function (e) { | ||
351 | countModal = false; | ||
352 | _this.value = compareNum; | ||
353 | },'div') | ||
354 | } | ||
355 | } | ||
356 | }); | ||
357 | |||
358 | |||
359 | //生产日期与有效日期验证 | ||
360 | $$('.detailRow').on('change','.realProductTime,.realValidEndDate',function(){ | ||
361 | |||
362 | var _this = this,$this = $$(this),cls = this.className; | ||
363 | var realProductTime = detailData.list[0].realProductTime?detailData.list[0].realProductTime:"0"; | ||
364 | var realValidEndDate = detailData.list[0].realValidEndDate?detailData.list[0].realValidEndDate:"0"; | ||
365 | var value = this.value?this.value:"0"; | ||
366 | var _realProductTime = "",_realValidEndDate = ""; | ||
367 | if(realProductTime.indexOf("-") != -1){ | ||
368 | _realProductTime = Number(realProductTime.replace(/-/g,"")); | ||
369 | } | ||
370 | if(realValidEndDate.indexOf("-") != -1){ | ||
371 | _realValidEndDate = Number(realValidEndDate.replace(/-/g,"")); | ||
372 | } | ||
373 | if(value.indexOf("-") != -1){ | ||
374 | value = Number(value.replace(/-/g,"")); | ||
375 | } | ||
376 | if(cls.indexOf("realProductTime")!=-1){//生产日期 | ||
377 | var text1 = "生产日期不能大于有效日期!"; | ||
378 | if(value > _realValidEndDate){ | ||
379 | mui.alert(text1,'提示','确定',function (e) { | ||
380 | _this.value = realProductTime; | ||
381 | },'div') | ||
382 | } | ||
383 | }else if(cls.indexOf("realValidEndDate")!=-1){//有效期至 | ||
384 | var text2 = "有效日期不能小于生产日期!"; | ||
385 | if(value < _realProductTime){ | ||
386 | mui.alert(text2,'提示','确定',function (e) { | ||
387 | _this.value = realValidEndDate; | ||
388 | },'div') | ||
389 | } | ||
390 | } | ||
391 | }); | ||
392 | |||
393 | }) | ||
394 | })(mui,jQuery); | ||
395 | |||
396 | </script> | ||
397 | </body> | ||
398 | |||
399 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/acc_list.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="acc_list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | </header> | ||
22 | <div class="mui-content"> | ||
23 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
24 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家" > | ||
25 | </div> | ||
26 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
27 | <div class="home-card-title">已验收</div> | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;"> | ||
30 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
31 | <div class="mui-slider-group"> | ||
32 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
33 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
34 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
35 | <ul class="mui-table-view"> | ||
36 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
37 | |||
38 | </li> | ||
39 | </ul> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | |||
47 | <script src="../../js/mui.min.js"></script> | ||
48 | <script src="../../js/jquery.min.js" ></script> | ||
49 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
50 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
51 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
52 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
53 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
54 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script type="text/javascript"> | ||
56 | if(window.plus) { | ||
57 | plusready(); | ||
58 | } else { | ||
59 | document.addEventListener('plusready', plusready, false); | ||
60 | } | ||
61 | function plusready() { | ||
62 | plus.key.addEventListener('backbutton',function(){ | ||
63 | plus.webview.currentWebview().close(); | ||
64 | }) | ||
65 | } | ||
66 | //去搜索页面 | ||
67 | function toSearchPage (){ | ||
68 | document.activeElement.blur(); // 隐藏软键盘 | ||
69 | var params = {}; | ||
70 | params.id = 'acc_list'; | ||
71 | params.route = '../acceptance/acc_list'; | ||
72 | params.auditStatus = '2'; // 都是已验收单据 | ||
73 | params.selectTabs = 2; | ||
74 | params.selected = 'right'; | ||
75 | params.module = 'acceptance'; | ||
76 | params.location = 'sub_list'; | ||
77 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
78 | } | ||
79 | |||
80 | (function($,$JQ) { | ||
81 | |||
82 | $.init({ | ||
83 | beforeback: function() { | ||
84 | var list = plus.webview.currentWebview().opener(); | ||
85 | mui.fire(list, 'pagefresh',{ hasAcceptance: true }); // 参数判断是某一个Tabs 右侧tabs 刷寻右侧列表 | ||
86 | return true; | ||
87 | } | ||
88 | }) | ||
89 | var deceleration = mui.os.ios?0.003:0.0009; | ||
90 | $('.mui-scroll-wrapper').scroll({ | ||
91 | scrollX: false, | ||
92 | bounce: true, | ||
93 | indicators: true, //是否显示滚动条 | ||
94 | deceleration:deceleration | ||
95 | }); | ||
96 | /* 渲染模板 */ | ||
97 | var params = undefined, | ||
98 | checkType = undefined, | ||
99 | type = undefined, | ||
100 | isShowTemprature = undefined, //是否显示验收温度 1 显示 0 隐藏 | ||
101 | isPsList = undefined; // 验收单类型 | ||
102 | |||
103 | var utils = new Utils(); | ||
104 | utils.appendModule('#acc_list_tpl'); | ||
105 | |||
106 | var page = 1, totalPage = undefined, pageSize = 15, isMore = true, query = {}; | ||
107 | var _url = '/a/exam/detail', // 分页接口 | ||
108 | checkUrl = '/a/checkacceptdetail/checkList'; | ||
109 | url = '/a/checkaccept/detail'; | ||
110 | var distributeCode = undefined, status = '2'; | ||
111 | |||
112 | function template(data, insertType){ | ||
113 | utils.innerTplHtml('list_tpl_view','.mui-tab1', data, insertType); | ||
114 | } | ||
115 | /* | ||
116 | 下拉刷新 | ||
117 | * */ | ||
118 | function pulldownRefresh(){ | ||
119 | var self = this; | ||
120 | page = 1; | ||
121 | var postData = { | ||
122 | distributeCode: distributeCode, | ||
123 | status,status, | ||
124 | pageNo: page, | ||
125 | pageSize: pageSize | ||
126 | }; | ||
127 | if(query.hisDrugCode){ | ||
128 | postData.hisDrugCode = query.hisDrugCode | ||
129 | }else{ | ||
130 | globalQuery={} | ||
131 | $JQ('.mui-input-clear').val(''); | ||
132 | $JQ('.mui-placeholder').show(); | ||
133 | } | ||
134 | query = {}; | ||
135 | mui.ajaxRequest(_url,{ | ||
136 | type: 'POST', | ||
137 | data: postData, | ||
138 | success: function(data){ | ||
139 | var resData = data.data; | ||
140 | resData.acceptance = false; | ||
141 | console.log(resData) | ||
142 | totalPage = data.totalPage; | ||
143 | if(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
144 | isMore = false; | ||
145 | self.endPullDownToRefresh(true); | ||
146 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
147 | }else{ | ||
148 | isMore = true; | ||
149 | self.endPullDownToRefresh(false); | ||
150 | self.refresh(true); | ||
151 | } | ||
152 | return template(resData, false) | ||
153 | }, | ||
154 | error: function(xhr,type,errorThrown){ | ||
155 | console.log(xhr.responseText) | ||
156 | } | ||
157 | }); | ||
158 | } | ||
159 | |||
160 | |||
161 | /* | ||
162 | |||
163 | * 上拉加载更多 | ||
164 | * */ | ||
165 | function pullupRefresh(){ | ||
166 | var self = this; | ||
167 | console.log(isMore,'isMore') | ||
168 | if(isMore){ | ||
169 | page++; | ||
170 | mui.ajaxRequest(_url,{ | ||
171 | type: 'POST', | ||
172 | data:{ | ||
173 | distributeCode: distributeCode, | ||
174 | status,status, | ||
175 | pageNo: page, | ||
176 | pageSize: pageSize | ||
177 | }, | ||
178 | success: function(data){ | ||
179 | var resData = data.data; | ||
180 | resData.acceptance = false; | ||
181 | if(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
182 | isMore = false; | ||
183 | self.endPullUpToRefresh(true); | ||
184 | document.querySelectorAll('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
185 | }else{ | ||
186 | isMore = true; | ||
187 | self.endPullUpToRefresh(false); | ||
188 | self.refresh(true); | ||
189 | } | ||
190 | return template(resData, true) | ||
191 | |||
192 | }, | ||
193 | error: function(xhr,type,errorThrown){ | ||
194 | console.log(xhr.responseText) | ||
195 | } | ||
196 | }); | ||
197 | }else{ | ||
198 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
199 | self.endPullUpToRefresh(true); | ||
200 | } | ||
201 | |||
202 | } | ||
203 | |||
204 | // 模板加载 | ||
205 | $.plusReady(function(){ | ||
206 | let globalQuery = {}; | ||
207 | window.addEventListener('pagefresh',function(e){ | ||
208 | console.log('从详情回来') | ||
209 | console.log(e.detail.query) | ||
210 | query = e.detail.query; | ||
211 | |||
212 | setTimeout(function(){ | ||
213 | console.log('刷新了啊啊啊啊 啊'); | ||
214 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
215 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
216 | },200) | ||
217 | }); | ||
218 | |||
219 | // 触发刷新 搜索页面搜的值 | ||
220 | window.addEventListener('sub_search',function(event){ | ||
221 | console.log('从搜索页面回来') | ||
222 | console.log(JSON.stringify(event.detail) ); | ||
223 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
224 | $JQ('.mui-input-clear').val(query.hisDrugName); | ||
225 | $JQ('.mui-placeholder').hide(); | ||
226 | setTimeout(function(){ | ||
227 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
228 | },200) | ||
229 | console.log('刷新了') | ||
230 | }) | ||
231 | |||
232 | var isUsual = undefined; | ||
233 | var self = plus.webview.currentWebview(); | ||
234 | params = JSON.parse(self.params);//获得参数 | ||
235 | console.log(JSON.stringify(params)) | ||
236 | distributeCode = params.distributecode; | ||
237 | isUsual = params.isusual; | ||
238 | // 判断是否是配送单 | ||
239 | isPsList = (params.accepttype === '101' || params.accepttype === '102' || params.accepttype === '103' ||params.accepttype === '104' ) ? true: false; | ||
240 | console.log(isPsList) | ||
241 | |||
242 | //循环初始化所有下拉刷新,上拉加载。 | ||
243 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
244 | |||
245 | $(pullRefreshEl).pullToRefresh({ | ||
246 | down: { | ||
247 | style:'circle', | ||
248 | contentdown : "下拉可以刷新", | ||
249 | contentover : "释放立即刷新", | ||
250 | contentrefresh : "正在刷新...", | ||
251 | callback: pulldownRefresh | ||
252 | }, | ||
253 | up: { | ||
254 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
255 | contentnomore:'没有更多数据', | ||
256 | callback: pullupRefresh | ||
257 | } | ||
258 | }); | ||
259 | }); | ||
260 | // 第一个tab 默认加载一次数据 | ||
261 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
262 | if(plus.storage.getItem('currDept')){ | ||
263 | type = JSON.parse(plus.storage.getItem('currDept')).deptType; | ||
264 | switch(type){ | ||
265 | case '3': | ||
266 | checkType = 1; // 药库 | ||
267 | break; | ||
268 | case '4': | ||
269 | checkType = 2; // 药房 | ||
270 | break; | ||
271 | case '5': | ||
272 | checkType = 3; // 基数药 | ||
273 | break; | ||
274 | default: | ||
275 | break; | ||
276 | } | ||
277 | } | ||
278 | //绑定点击事件 - 进入详情页 | ||
279 | |||
280 | $('#slider').on('tap','.moreDetail',function(){ | ||
281 | let id = this.dataset.id; | ||
282 | let newData = {}; | ||
283 | newData.checkType = checkType; // 药房,药库,基数药 区分 | ||
284 | newData.distributeCode = distributeCode; | ||
285 | newData.isShowTemprature = isShowTemprature; | ||
286 | newData.hasAcceptance = false;// 判断 详情页面是否有验收按钮 | ||
287 | newData.status = status; | ||
288 | newData.id = id; | ||
289 | newData.isPsList = isPsList; // 是否是配送单 | ||
290 | newData.query = globalQuery ; | ||
291 | console.log('newData',JSON.stringify(newData)) | ||
292 | console.log('query',JSON.stringify(globalQuery)) | ||
293 | console.log(JSON.stringify(Object.assign(newData,globalQuery))) | ||
294 | document.activeElement.blur(); // 隐藏软键盘 | ||
295 | common.openwin('acc_detail',{ details: JSON.stringify(newData) },{ | ||
296 | titleText: '验收详情' | ||
297 | }) | ||
298 | }); | ||
299 | }); | ||
300 | |||
301 | })(mui,jQuery); | ||
302 | |||
303 | </script> | ||
304 | </body> | ||
305 | |||
306 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/acc_not_list.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="acc_list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | <a href="#" class="mui-pull-right batchAccetpance" style="height: 45px;padding-top: 12px;"> | ||
22 | 批量验收 | ||
23 | </a> | ||
24 | </header> | ||
25 | <div class="mui-content"> | ||
26 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
27 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家"> | ||
28 | </div> | ||
29 | |||
30 | <div id="slider" class="mui-slider themes_tab mui-fullscreen"> | ||
31 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待验收</a> | ||
33 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已验收</a> | ||
34 | </div> | ||
35 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
36 | <div class="mui-slider-group"> | ||
37 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
38 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
39 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
40 | <ul class="mui-table-view"> | ||
41 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
42 | |||
43 | </li> | ||
44 | </ul> | ||
45 | </div> | ||
46 | </div> | ||
47 | </div> | ||
48 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
49 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
50 | <div class="mui-scroll" id="mui-table-view-tab2"> | ||
51 | <ul class="mui-table-view"> | ||
52 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"> | ||
53 | |||
54 | </li> | ||
55 | </ul> | ||
56 | </div> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | |||
63 | <script src="../../js/mui.min.js"></script> | ||
64 | <script src="../../js/jquery.min.js" ></script> | ||
65 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
66 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
67 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
68 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
69 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
70 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
71 | <script type="text/javascript"> | ||
72 | if(window.plus) { | ||
73 | plusready(); | ||
74 | } else { | ||
75 | document.addEventListener('plusready', plusready, false); | ||
76 | } | ||
77 | function plusready() { | ||
78 | plus.key.addEventListener('backbutton',function(){ | ||
79 | plus.webview.currentWebview().close(); | ||
80 | }) | ||
81 | } | ||
82 | var auditStatus = undefined, //验收状态 1 待验收 2 已验收 | ||
83 | selectTabs = 1; // 默认选中第一个tab | ||
84 | var storeData = undefined;//批量传参的时候用来取第一个distributeCode,不在乎传哪一个,一定要传一个 | ||
85 | //去搜索页面 | ||
86 | function toSearchPage (){ | ||
87 | var params = {}; | ||
88 | params.id = 'acc_not_list'; | ||
89 | params.route = '../acceptance/acc_not_list'; | ||
90 | params.auditStatus = auditStatus; | ||
91 | params.selectTabs = selectTabs; | ||
92 | params.selected = selected; | ||
93 | params.module = 'acceptance'; | ||
94 | params.location = 'sub_list'; | ||
95 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false); | ||
96 | document.activeElement.blur(); // 隐藏软键盘 | ||
97 | } | ||
98 | |||
99 | (function($,$$) { | ||
100 | |||
101 | $.init({ | ||
102 | beforeback: function() { | ||
103 | var list = plus.webview.currentWebview().opener(); | ||
104 | mui.fire(list, 'pagefresh',{ hasAcceptance: selectTabs === 1 ? true: false}); | ||
105 | return true; | ||
106 | } | ||
107 | }) | ||
108 | var deceleration = mui.os.ios?0.003:0.0009; | ||
109 | $('.mui-scroll-wrapper').scroll({ | ||
110 | bounce: true, | ||
111 | indicators: true, //是否显示滚动条 | ||
112 | deceleration:deceleration | ||
113 | }); | ||
114 | var currentSelected = undefined; | ||
115 | |||
116 | /* 渲染模板 */ | ||
117 | var params = undefined, | ||
118 | checkType = undefined, | ||
119 | type = undefined, | ||
120 | isShowTemprature = undefined, //是否显示验收温度 1 显示 0 隐藏 | ||
121 | isPsList = undefined; // 验收单类型 | ||
122 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
123 | |||
124 | var utils = new Utils(); | ||
125 | utils.appendModule('#acc_list_tpl'); | ||
126 | |||
127 | var page = 1, totalPage = undefined, pageSize = 15, isMore = true, query = {}; | ||
128 | var _url = '/a/exam/detail', // 分页接口 | ||
129 | checkUrl = '/a/checkacceptdetail/checkList'; | ||
130 | url = '/a/checkaccept/detail', | ||
131 | pageLeft = 1, | ||
132 | pageRight = 1, | ||
133 | totalPageLeft = undefined, | ||
134 | totalPageRight = undefined, | ||
135 | isMore = true, | ||
136 | distributeCode = undefined, | ||
137 | status = undefined; | ||
138 | barcode = undefined; | ||
139 | |||
140 | function template(selected, data, insertType){ | ||
141 | utils.innerTplHtml('list_tpl_view', selected , data, insertType); | ||
142 | } | ||
143 | /* | ||
144 | 下拉刷新 | ||
145 | * */ | ||
146 | function pulldownRefresh(){ | ||
147 | |||
148 | var self = this; | ||
149 | pageLeft = 1; pageRight = 1; | ||
150 | status = selectTabs === 1 ? '1': '2'; | ||
151 | var postData = { | ||
152 | distributeCode: distributeCode, | ||
153 | status:status, | ||
154 | pageNo: 1, | ||
155 | pageSize: pageSize | ||
156 | }; | ||
157 | if(barcode){ | ||
158 | postData = { | ||
159 | barcode: barcode, | ||
160 | status:status, | ||
161 | pageNo: 1, | ||
162 | pageSize: pageSize | ||
163 | }; | ||
164 | } | ||
165 | if(query.hisDrugCode){ | ||
166 | postData.hisDrugCode = query.hisDrugCode | ||
167 | $$('.mui-input-clear').val(query.hisDrugName); | ||
168 | }else{ | ||
169 | globalQuery={} | ||
170 | $$('.mui-input-clear').val(''); | ||
171 | $$('.mui-placeholder').show(); | ||
172 | } | ||
173 | query = {}; | ||
174 | |||
175 | mui.ajaxRequest(_url,{ | ||
176 | type: 'POST', | ||
177 | data: postData, | ||
178 | success: function(data){ | ||
179 | var code = data.code; | ||
180 | if(code == 200){ | ||
181 | var resData = data.data; | ||
182 | storeData = resData; | ||
183 | resData.acceptance = selectTabs === 1 ? true: false; | ||
184 | resData.checkType = checkType; | ||
185 | resData.barcode = barcode; | ||
186 | resData.isPsList = isPsList; | ||
187 | totalPage = data.totalPage; | ||
188 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
189 | var i = selectTabs === 1 ? 0 : 1; | ||
190 | isMore = false; | ||
191 | self.endPullDownToRefresh(true); | ||
192 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
193 | }else{ | ||
194 | isMore = true; | ||
195 | self.endPullDownToRefresh(false); | ||
196 | self.refresh(true); | ||
197 | } | ||
198 | |||
199 | return template(selected,resData, false) | ||
200 | }else{ | ||
201 | mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
202 | var i = selectTabs === 1 ? 0 : 1; | ||
203 | isMore = false; | ||
204 | self.endPullDownToRefresh(true); | ||
205 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
206 | } | ||
207 | }, | ||
208 | error: function(xhr,type,errorThrown){ | ||
209 | console.log(xhr.responseText) | ||
210 | } | ||
211 | }); | ||
212 | } | ||
213 | |||
214 | /* | ||
215 | |||
216 | * 上拉加载更多 | ||
217 | * */ | ||
218 | function pullupRefresh(){ | ||
219 | |||
220 | var self = this; | ||
221 | console.log(isMore,'isMore') | ||
222 | if(isMore){ | ||
223 | page++; | ||
224 | var paramData = { | ||
225 | distributeCode: distributeCode, | ||
226 | status:status, | ||
227 | pageNo: page, | ||
228 | pageSize: pageSize | ||
229 | }; | ||
230 | if(barcode){ | ||
231 | paramData = { | ||
232 | barcode: barcode, | ||
233 | status:status, | ||
234 | pageNo: page, | ||
235 | pageSize: pageSize | ||
236 | }; | ||
237 | } | ||
238 | mui.ajaxRequest(_url,{ | ||
239 | type: 'POST', | ||
240 | data:paramData, | ||
241 | success: function(data){ | ||
242 | var code = data.code; | ||
243 | if(code == 200){ | ||
244 | var resData = data.data; | ||
245 | storeData = resData; | ||
246 | //resData.acceptance = selectTabs === 1 && checkType === 1 ? true: false; | ||
247 | resData.acceptance = status === '1'? true: false; | ||
248 | resData.checkType = checkType; | ||
249 | resData.barcode = barcode; | ||
250 | resData.isPsList = isPsList; | ||
251 | if(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
252 | var i = selectTabs === 1 ? 0 : 1; | ||
253 | isMore = false; | ||
254 | self.endPullUpToRefresh(true); | ||
255 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
256 | }else{ | ||
257 | isMore = true; | ||
258 | self.endPullUpToRefresh(false); | ||
259 | self.refresh(true); | ||
260 | } | ||
261 | return template(selected, resData, true) | ||
262 | }else{ | ||
263 | mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
264 | var i = selectTabs === 1 ? 0 : 1; | ||
265 | isMore = false; | ||
266 | self.endPullUpToRefresh(true); | ||
267 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
268 | } | ||
269 | }, | ||
270 | error: function(xhr,type,errorThrown){ | ||
271 | console.log(xhr.responseText) | ||
272 | } | ||
273 | }); | ||
274 | }else{ | ||
275 | var i = selectTabs === 1 ? 0 : 1; | ||
276 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
277 | self.endPullUpToRefresh(true); | ||
278 | } | ||
279 | |||
280 | } | ||
281 | |||
282 | // 模板加载 | ||
283 | $.plusReady(function(){ | ||
284 | |||
285 | let globalQuery = {}; | ||
286 | window.addEventListener('pagefresh',function(event){ | ||
287 | console.log('从详情回来') | ||
288 | console.log(JSON.stringify(event.detail)) | ||
289 | query = event.detail.query; | ||
290 | console.log(typeof event.detail.selectTabs); | ||
291 | let index = event.detail.selectTabs === '1' ? 0 : 1; | ||
292 | console.log(index,'index') | ||
293 | if(index === 1){ | ||
294 | mui('#slider').slider().gotoItem(1); | ||
295 | } | ||
296 | setTimeout(function(){ | ||
297 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
298 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
299 | },200) | ||
300 | |||
301 | }); | ||
302 | // 触发刷新 搜索页面搜的值 | ||
303 | window.addEventListener('sub_search',function(event){ | ||
304 | console.log('从搜索页面回来') | ||
305 | console.log(JSON.stringify(event.detail) ); | ||
306 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
307 | console.log(typeof event.detail.selectTabs) | ||
308 | let index = event.detail.selectTabs === 1 ? 0 : 1; | ||
309 | $$('.mui-input-clear').val(query.hisDrugName); | ||
310 | $$('.mui-placeholder').hide(); | ||
311 | |||
312 | setTimeout(function(){ | ||
313 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
314 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
315 | },300) | ||
316 | console.log('刷新了') | ||
317 | }); | ||
318 | |||
319 | if(plus.storage.getItem('currDept')){ | ||
320 | type = JSON.parse(plus.storage.getItem('currDept')).deptType; | ||
321 | switch(type){ | ||
322 | case '3': | ||
323 | checkType = 1; // 药库 | ||
324 | break; | ||
325 | case '4': | ||
326 | checkType = 2; // 药房 | ||
327 | break; | ||
328 | case '5': | ||
329 | checkType = 3; // 基数药 | ||
330 | break; | ||
331 | default: | ||
332 | break; | ||
333 | } | ||
334 | } | ||
335 | |||
336 | var isUsual = undefined; | ||
337 | var self = plus.webview.currentWebview(); | ||
338 | params = JSON.parse(self.params);//获得参数 | ||
339 | console.log(params) | ||
340 | distributeCode = params.distributecode; | ||
341 | barcode = params.barcode; | ||
342 | isUsual = params.isusual; | ||
343 | |||
344 | // 判断是否是配送单 | ||
345 | isPsList = (params.accepttype === '101' || params.accepttype === '102' || params.accepttype === '103' ||params.accepttype === '104' ) ? true: false; | ||
346 | console.log(isPsList) | ||
347 | currentSelected = params.currentSelected; // 当前选中tabs | ||
348 | status = currentSelected === 'left'? '1': '2'; | ||
349 | auditStatus = currentSelected === 'left'? '1': '2'; | ||
350 | selectTabs = currentSelected === 'left'? 1: 2; | ||
351 | |||
352 | console.log(status) | ||
353 | if(currentSelected === 'left'){ | ||
354 | $$('.batchAccetpance').show(); | ||
355 | }else{ | ||
356 | $$('.batchAccetpance').hide(); | ||
357 | } | ||
358 | console.log(currentSelected); | ||
359 | |||
360 | //循环初始化所有下拉刷新,上拉加载。 | ||
361 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
362 | |||
363 | $(pullRefreshEl).pullToRefresh({ | ||
364 | down: { | ||
365 | style:'circle', | ||
366 | contentdown : "下拉可以刷新", | ||
367 | contentover : "释放立即刷新", | ||
368 | contentrefresh : "正在刷新...", | ||
369 | callback: pulldownRefresh | ||
370 | }, | ||
371 | up: { | ||
372 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
373 | contentnomore:'没有更多数据', | ||
374 | callback: pullupRefresh | ||
375 | } | ||
376 | }); | ||
377 | }); | ||
378 | // 第一个tab 默认加载一次数据 | ||
379 | mui(".mui-scroll").pullToRefresh()[ selectTabs -1 ].pullDownLoading(); | ||
380 | |||
381 | // 展开编辑 | ||
382 | $('#slider').on('tap','.edit',function(){ | ||
383 | this.innerHTML = this.innerHTML === '收起编辑' ? '展开编辑':'收起编辑' ; | ||
384 | var editFormNode = this.parentNode.parentNode.previousElementSibling.querySelector('.editForm') | ||
385 | editFormNode.style.display = editFormNode.style.display === 'block' ? 'none': 'block'; | ||
386 | }); | ||
387 | |||
388 | |||
389 | var item2 = document.querySelector('#item2mobile'); | ||
390 | var item1 = document.querySelector('#item1mobile'); | ||
391 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
392 | $$('.mui-input-clear').val(''); | ||
393 | let index = e.detail.slideNumber; | ||
394 | if (index === 1) { | ||
395 | status = '2'; | ||
396 | selected = '.mui-tab2'; | ||
397 | selectTabs = 2; | ||
398 | mui('#slider').slider().gotoItem(1); | ||
399 | $$('.batchAccetpance').hide(); | ||
400 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
401 | if (!item2.querySelector('.am-card')) { | ||
402 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
403 | } | ||
404 | } | ||
405 | if(index === 0){ | ||
406 | status = '1'; | ||
407 | selected = '.mui-tab1'; | ||
408 | selectTabs = 1; | ||
409 | $$('.batchAccetpance').show(); | ||
410 | mui('#slider').slider().gotoItem(0); | ||
411 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
412 | if (!item1.querySelector('.am-card')) { | ||
413 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
414 | } | ||
415 | } | ||
416 | }); | ||
417 | |||
418 | //绑定点击事件 - 进入详情页 | ||
419 | |||
420 | $('#slider').on('tap','.moreDetail',function(){ | ||
421 | |||
422 | let id = this.dataset.id; | ||
423 | let newData = {}; | ||
424 | newData.checkType = checkType; // 药房,药库,基数药 区分 | ||
425 | hasAcceptance = selectTabs === 1 ? true: false; | ||
426 | newData.distributeCode = distributeCode; | ||
427 | newData.isShowTemprature = isShowTemprature; | ||
428 | newData.hasAcceptance = hasAcceptance;// 判断 详情页面是否有验收按钮 | ||
429 | newData.status = status;//1 | ||
430 | newData.id = id; | ||
431 | newData.selectTabs = selectTabs; | ||
432 | newData.isPsList = isPsList; // 是否是配送单true | ||
433 | newData.query = globalQuery; | ||
434 | if(barcode){ | ||
435 | newData.distributeCode = this.dataset.distributecode; | ||
436 | newData.barcode = barcode;//标记是扫描的数据,达到和isPlist同样的目的,显示数据可以修改 | ||
437 | } | ||
438 | console.log(JSON.stringify(newData)) | ||
439 | document.activeElement.blur(); // 隐藏软键盘 | ||
440 | common.openwin('acc_detail',{ details: JSON.stringify(newData) },{ | ||
441 | titleText: '验收详情' | ||
442 | }) | ||
443 | }); | ||
444 | |||
445 | /* 批量验收 */ | ||
446 | $('.mui-bar').on('tap','.batchAccetpance',function(){ | ||
447 | var paramsData = {}; | ||
448 | paramsData.isPsList = isPsList; | ||
449 | paramsData.distributeCode = distributeCode; | ||
450 | paramsData.status = '1'; | ||
451 | paramsData.isShowTemprature = isShowTemprature; | ||
452 | paramsData.itemData = params; | ||
453 | paramsData.checkType = checkType; | ||
454 | paramsData.acceptance = true; | ||
455 | if(barcode){//批量不带distributeCode查询 | ||
456 | paramsData.barcode = barcode;//标记是扫描的数据,达到和isPlist同样的目的,显示数据可以修改 | ||
457 | if(storeData && storeData.list && storeData.list[0]){ | ||
458 | paramsData.distributeCode = storeData.list[0].distributeCode; | ||
459 | } | ||
460 | } | ||
461 | console.log(JSON.stringify(paramsData)); | ||
462 | common.openwin('acc_batch',{ params: JSON.stringify(paramsData) },false) | ||
463 | }) | ||
464 | |||
465 | // 绑定事件 --确认验收 | ||
466 | $('#slider').on('tap','.acceptance',function(){ | ||
467 | document.activeElement.blur(); // 隐藏软键盘 | ||
468 | var editFormNode = this.parentNode.parentNode.previousElementSibling.querySelector('.editForm') | ||
469 | let id = this.dataset.id; | ||
470 | let index = this.dataset.index; | ||
471 | let rowNo = this.dataset.rowno; | ||
472 | let postData = {}, detailList = [], submitData = {}; | ||
473 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
474 | console.log(_this_node.dataset) | ||
475 | postData.id = _this_node.dataset.id; | ||
476 | postData.drugCode = _this_node.dataset.drugcode; | ||
477 | postData.isUsual = Number(_this_node.dataset.isusual); | ||
478 | //扫描的也能输入 | ||
479 | if((barcode || isPsList) && Number(_this_node.dataset.isusual) === 0){ | ||
480 | // 配送单验收 | ||
481 | var realReceiveQuantiry = editFormNode.querySelector('.realReceiveQuantiry').value?editFormNode.querySelector('.realReceiveQuantiry').value:"0"; | ||
482 | var realProductTime = editFormNode.querySelector('.realProductTime').value; | ||
483 | var productBatchNo = editFormNode.querySelector('.productBatchNo').value; | ||
484 | var realValidEndDate = editFormNode.querySelector('.realValidEndDate').value; | ||
485 | if(isShowTemprature === 1){ | ||
486 | var realAcceptanceTemperature = editFormNode.querySelector('.realAcceptanceTemperature').value; | ||
487 | } | ||
488 | if(realReceiveQuantiry && realProductTime && productBatchNo && realValidEndDate){ | ||
489 | postData.realReceiveQuantiry = Number(realReceiveQuantiry); | ||
490 | postData.realProductTime = realProductTime; | ||
491 | postData.productBatchNo = productBatchNo; | ||
492 | postData.realValidEndDate = realValidEndDate; | ||
493 | postData.distributeCode = _this_node.dataset.distributecode; | ||
494 | postData.rowNo = rowNo; | ||
495 | if(isShowTemprature === 1){ | ||
496 | postData.realAcceptanceTemperature = realAcceptanceTemperature; | ||
497 | } | ||
498 | } | ||
499 | }else{ | ||
500 | // 送货单验收 | ||
501 | postData.realReceiveQuantiry = _this_node.dataset.realnum;//realreceivequantiry->realnum,//应海洪要求改的 | ||
502 | postData.realProductTime = _this_node.dataset.realproducttime; | ||
503 | postData.productBatchNo = _this_node.dataset.productbatchno; | ||
504 | postData.realValidEndDate = _this_node.dataset.realvalidenddate; | ||
505 | postData.distributeCode = _this_node.dataset.distributecode; | ||
506 | postData.rowNo = rowNo; | ||
507 | } | ||
508 | detailList.push(postData); | ||
509 | |||
510 | submitData.detailList = detailList; | ||
511 | submitData.distributeCode = distributeCode; | ||
512 | if(barcode){ | ||
513 | submitData.barcode = barcode; | ||
514 | submitData.distributeCode = this.dataset.distributecode; | ||
515 | } | ||
516 | console.log(submitData); | ||
517 | |||
518 | var btnArray = ['否', '是']; | ||
519 | mui.confirm('是否确认验收?', '确认', btnArray, function(e) { | ||
520 | if (e.index == 1) { | ||
521 | var data = submitData; | ||
522 | mui.ajaxRequest(checkUrl,{ | ||
523 | type: 'POST', | ||
524 | data: submitData, | ||
525 | showWaiting: true, | ||
526 | contentType: "application/json", | ||
527 | success: function(data){ | ||
528 | if(data.code === 200){ | ||
529 | var text = "验收成功!"; | ||
530 | if(data.data[0]){ | ||
531 | text = data.data[0]; | ||
532 | } | ||
533 | mui.alert(text,'提示','确定',function (e) { | ||
534 | mui(".mui-scroll").pullToRefresh()[ selectTabs -1 ].pullDownLoading(); | ||
535 | },'div'); | ||
536 | }else{ | ||
537 | mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
538 | } | ||
539 | }, | ||
540 | error: function(xhr,type,errorThrown){ | ||
541 | console.log(xhr.responseText) | ||
542 | } | ||
543 | }) | ||
544 | } | ||
545 | },'div') | ||
546 | |||
547 | }); | ||
548 | |||
549 | //绑定输入实到数量验证 | ||
550 | var countModal = false; | ||
551 | $$('#slider').on('keyup','.realReceiveQuantiry',function(){ | ||
552 | |||
553 | var _this = this,$this = $$(this); | ||
554 | var index = this.dataset.index; | ||
555 | var value = Number(this.value?this.value:0); | ||
556 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
557 | var realDeliveryQuantiry = _this_node.dataset.realdeliveryquantiry?_this_node.dataset.realdeliveryquantiry:0; | ||
558 | var realReceiveQuantiry = _this_node.dataset.realnum?_this_node.dataset.realnum:0; | ||
559 | var compareNum = realDeliveryQuantiry; | ||
560 | var text = "实到数量不能大于数量"+compareNum+",且不能小于0!"; | ||
561 | if(barcode){//扫码 | ||
562 | compareNum = realReceiveQuantiry; | ||
563 | text = "实到数量不能大于条码数量"+compareNum+",且不能小于0!"; | ||
564 | } | ||
565 | |||
566 | if(!countModal){ | ||
567 | if(value<0 || value>compareNum){ | ||
568 | countModal = true; | ||
569 | mui.alert(text,'提示','确定',function (e) { | ||
570 | countModal = false; | ||
571 | _this.value = compareNum; | ||
572 | },'div') | ||
573 | } | ||
574 | } | ||
575 | }); | ||
576 | |||
577 | |||
578 | //生产日期与有效日期验证 | ||
579 | $$('#slider').on('change','.realProductTime,.realValidEndDate',function(){ | ||
580 | var _this = this,$this = $$(this); | ||
581 | var index = this.dataset.index,cls = this.className; | ||
582 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
583 | var realProductTime = _this_node.dataset.realproducttime?_this_node.dataset.realproducttime:"0"; | ||
584 | var realValidEndDate = _this_node.dataset.realvalidenddate?_this_node.dataset.realvalidenddate:"0"; | ||
585 | var value = this.value?this.value:"0"; | ||
586 | var _realProductTime = "",_realValidEndDate = ""; | ||
587 | if(realProductTime.indexOf("-") != -1){ | ||
588 | _realProductTime = Number(realProductTime.replace(/-/g,"")); | ||
589 | } | ||
590 | if(realValidEndDate.indexOf("-") != -1){ | ||
591 | _realValidEndDate = Number(realValidEndDate.replace(/-/g,"")); | ||
592 | } | ||
593 | if(value.indexOf("-") != -1){ | ||
594 | value = Number(value.replace(/-/g,"")); | ||
595 | } | ||
596 | if(cls.indexOf("realProductTime")!=-1){//生产日期 | ||
597 | var text1 = "生产日期不能大于有效日期!"; | ||
598 | if(value > _realValidEndDate){ | ||
599 | mui.alert(text1,'提示','确定',function (e) { | ||
600 | _this.value = realProductTime; | ||
601 | },'div') | ||
602 | } | ||
603 | }else if(cls.indexOf("realValidEndDate")!=-1){//有效期至 | ||
604 | var text2 = "有效日期不能小于生产日期!"; | ||
605 | if(value < _realProductTime){ | ||
606 | mui.alert(text2,'提示','确定',function (e) { | ||
607 | _this.value = realValidEndDate; | ||
608 | },'div') | ||
609 | } | ||
610 | } | ||
611 | }); | ||
612 | |||
613 | |||
614 | |||
615 | }); | ||
616 | })(mui,jQuery); | ||
617 | |||
618 | </script> | ||
619 | </body> | ||
620 | |||
621 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/batch_list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='batch_list_tpl_view'> | ||
3 | {{ each list value i}} | ||
4 | <div class="batch-wrapper"> | ||
5 | <div class="checkoneParent"> | ||
6 | <div class="mui-checkbox mui-left" style="width: 48px;height:48px;padding:50px 0 ;display: block;"> | ||
7 | <input name="selected" class="checkone" type="checkbox" data-index="{{ (page-1)*pageSize + i }}" style="top: 35px;left: 10px;"> | ||
8 | </div> | ||
9 | </div> | ||
10 | <div class="am-card scrollList-item am-card-full" style="width: 90%;border: none;" | ||
11 | data-id="{{ value.id }}" | ||
12 | data-drugCode="{{ value.drugCode }}" | ||
13 | data-isUsual="{{ value.isUsual }}" | ||
14 | data-parentId="{{ value.parentId }}" | ||
15 | data-productBatchNo="{{ value.productBatchNo }}" | ||
16 | data-realProductTime = "{{ value.realProductTime }}" | ||
17 | data-realValidEndDate = "{{ value.realValidEndDate }}" | ||
18 | data-realDeliveryQuantiry = "{{ value.realDeliveryQuantiry }}" | ||
19 | data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" | ||
20 | data-realNum = "{{ value.realNum }}" | ||
21 | data-distributeCode="{{ value.distributeCode }}" | ||
22 | data-rowNo = "{{ value.rowNo }}" | ||
23 | > | ||
24 | <div class="am-card-header" style="padding: 9px 15px 0px 5px !important;"> | ||
25 | <div class="am-card-header-content"> | ||
26 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
27 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
28 | </div> | ||
29 | <div class="am-card-header-extra"> | ||
30 | <span>待验收</span> | ||
31 | </div> | ||
32 | </div> | ||
33 | <div class="am-card-body" style="padding: 5px !important;"> | ||
34 | <div class="am-flexbox am-flexbox-align-center"> | ||
35 | <div class="am-flexbox-item"> | ||
36 | 单位:<span>{{ value.unit }}</span> | ||
37 | </div> | ||
38 | <div class="am-flexbox-item"> | ||
39 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
40 | </div> | ||
41 | <div class="am-flexbox-item"> | ||
42 | 数量:<span>{{ value.realDeliveryQuantiry }}</span> | ||
43 | </div> | ||
44 | </div> | ||
45 | {{ if acceptance }} | ||
46 | {{ if value.isUsual === 0 && checkType === 1 && (isPsList || barcode)}} | ||
47 | <div class="editForm" style="display: block;"> | ||
48 | <div class="am-flexbox am-flexbox-align-center"> | ||
49 | <div class="am-flexbox-item"> | ||
50 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
51 | <div class="am-list-line"> | ||
52 | <div class="am-input-label am-input-label-4 font-warning">实到数量:</div> | ||
53 | <div class="am-input-control"> | ||
54 | <input pattern="[0-9]*" type="number" value="{{ value.realNum ? value.realNum: value.realDeliveryQuantiry }}" data-index="{{ i }}" placeholder="请输入" class="realReceiveQuantiry flex-item-input" /> | ||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | </div> | ||
59 | <div class="am-flexbox-item"> | ||
60 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
61 | <div class="am-list-line"> | ||
62 | <div class="am-input-label am-input-label-5 font-warning">生产日期:</div> | ||
63 | <div class="am-input-control"> | ||
64 | <input pattern="[0-9]*" type="date" value="{{ value.realProductTime }}" data-index="{{ i }}" placeholder="请输入" class="realProductTime flex-item-input" /> | ||
65 | </div> | ||
66 | </div> | ||
67 | </div> | ||
68 | </div> | ||
69 | <div class="am-flexbox-item"> | ||
70 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
71 | <div class="am-list-line"> | ||
72 | <div class="am-input-label am-input-label-5 font-warning">有效期至:</div> | ||
73 | <div class="am-input-control"> | ||
74 | <input pattern="[0-9]*" type="date" value="{{ value.realValidEndDate }}" data-index="{{ i }}" placeholder="请输入" class="realValidEndDate flex-item-input" /> | ||
75 | </div> | ||
76 | </div> | ||
77 | </div> | ||
78 | </div> | ||
79 | </div> | ||
80 | <div class="am-flexbox am-flexbox-align-center"> | ||
81 | <div class="am-flexbox-item"> | ||
82 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
83 | <div class="am-list-line"> | ||
84 | <div class="am-input-label am-input-label-4 font-warning">生产批号:</div> | ||
85 | <div class="am-input-control"> | ||
86 | <input pattern="[0-9]*" type="text" value="{{ value.productBatchNo }}" placeholder="请输入" class="productBatchNo flex-item-input"/> | ||
87 | </div> | ||
88 | </div> | ||
89 | </div> | ||
90 | </div> | ||
91 | <div class="am-flexbox-item"> | ||
92 | 指示货位:<span>{{ value.replanStoreName }}</span> | ||
93 | </div> | ||
94 | {{ if isShowTemprature === 1 }} | ||
95 | <div class="am-flexbox-item"> | ||
96 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
97 | <div class="am-list-line"> | ||
98 | <div class="am-input-label am-input-label-4 font-warning">验收温度:</div> | ||
99 | <div class="am-input-control"> | ||
100 | <input pattern="[0-9]*" type="number" value="{{ value.realAcceptanceTemperature ? value.realAcceptanceTemperature: '' }}" placeholder="请输入" class="realAcceptanceTemperature flex-item-input"/> | ||
101 | </div> | ||
102 | </div> | ||
103 | </div> | ||
104 | </div> | ||
105 | {{ else }} | ||
106 | {{ /if }} | ||
107 | </div> | ||
108 | </div> | ||
109 | {{ else }} | ||
110 | <div class="am-flexbox am-flexbox-align-center"> | ||
111 | <div class="am-flexbox-item"> | ||
112 | 实到数量:<span class='errorQuantiry'>{{ value.realNum }}</span> | ||
113 | </div> | ||
114 | <div class="am-flexbox-item am-last-flexItem"> | ||
115 | 生产日期:<span class="errRealProductTime">{{ value.realProductTime }}</span> | ||
116 | </div> | ||
117 | <div class="am-flexbox-item am-last-flexItem"> | ||
118 | 有效期至:<span class="errVailEndDate">{{ value.realValidEndDate }}</span> | ||
119 | </div> | ||
120 | </div> | ||
121 | |||
122 | {{ /if }} | ||
123 | <div class="am-flexbox am-flexbox-align-center"> | ||
124 | <div class="am-flexbox-item"> | ||
125 | 批准文号:<span>{{ value.approvalNo }}</span> | ||
126 | </div> | ||
127 | {{ if checkType !== 1}} | ||
128 | <div class="am-flexbox-item"> | ||
129 | 指示货位: <span>{{ value.replanStoreName }}</span> | ||
130 | </div> | ||
131 | {{ /if }} | ||
132 | <div class="am-flexbox-item am-last-flexItem" style="margin-left: -50px;"> | ||
133 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
134 | </div> | ||
135 | </div> | ||
136 | {{ /if }} | ||
137 | </div> | ||
138 | </div> | ||
139 | </div> | ||
140 | {{/each}} | ||
141 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/detail_tpl.html
0 → 100644
1 | <script type="text/html" id='detail_tpl'> | ||
2 | <div style="margin-top:10px;"> | ||
3 | {{ each list value i }} | ||
4 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
5 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
6 | <a class="mui-navigate-right" href="#">单据信息</a> | ||
7 | <div class="mui-collapse-content"> | ||
8 | <div class="mui-input-row"> | ||
9 | <label>配送/验收单</label> | ||
10 | <p class="detailRow_content">{{ distributeCode ? distributeCode: '' }}</p> | ||
11 | </div> | ||
12 | <div class="mui-input-row"> | ||
13 | <label>状态</label> | ||
14 | <p class="detailRow_content">{{ value.status ? value.status === 1 ? '待验收':'已验收': '' }}</p> | ||
15 | </div> | ||
16 | <div class="mui-input-row"> | ||
17 | <label>类型</label> | ||
18 | <p class="detailRow_content">{{ typeName ? typeName: '' }}</p> | ||
19 | </div> | ||
20 | </div> | ||
21 | </li> | ||
22 | </ul> | ||
23 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
24 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
25 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
26 | <div class="mui-collapse-content"> | ||
27 | <div class="mui-input-row"> | ||
28 | <label>通用名称</label> | ||
29 | <p class="detailRow_content">{{value && value.ctmmGenericName ? value.ctmmGenericName: ''}}</p> | ||
30 | </div> | ||
31 | <div class="mui-input-row"> | ||
32 | <label>商品名</label> | ||
33 | <p class="detailRow_content">{{value && value.ctmmTradeName ? value.ctmmTradeName: ''}}</p> | ||
34 | </div> | ||
35 | <div class="mui-input-row"> | ||
36 | <label>规格</label> | ||
37 | <p class="detailRow_content">{{value && value.ctmmSpecification? value.ctmmSpecification:''}}</p> | ||
38 | </div> | ||
39 | <div class="mui-input-row"> | ||
40 | <label>剂型</label> | ||
41 | <p class="detailRow_content">{{value && value.ctmmDosageFormDesc ? value.ctmmDosageFormDesc:''}}</p> | ||
42 | </div> | ||
43 | <div class="mui-input-row"> | ||
44 | <label>生产厂家</label> | ||
45 | <p class="detailRow_content">{{value && value.ctmmManufacturerName ? value.ctmmManufacturerName: ''}}</p> | ||
46 | </div> | ||
47 | <div class="mui-input-row"> | ||
48 | <label>批准文号</label> | ||
49 | <p class="detailRow_content">{{ value && value.approvalNo ? value.approvalNo: ''}}</p> | ||
50 | </div> | ||
51 | <div class="mui-input-row"> | ||
52 | <label>包装规格</label> | ||
53 | <p class="detailRow_content">{{value && value.packageSpecification ? value.packageSpecification: ''}}</p> | ||
54 | </div> | ||
55 | <div class="mui-input-row"> | ||
56 | <label>单位</label> | ||
57 | <p class="detailRow_content">{{ value && value.unit ? value.unit: ''}}</p> | ||
58 | </div> | ||
59 | <div class="mui-input-row"> | ||
60 | {{ if (isPsList || barcode) && value.status === 1 && value.isUsual === 0 && checkType === 1}} | ||
61 | <label class="font-warning">生产批号</label> | ||
62 | <input class="mui-input editInput BatchNo" value="{{ value && value.productBatchNo ? value.productBatchNo: ''}}" /> | ||
63 | {{ else }} | ||
64 | <label>生产批号</label> | ||
65 | <p class="detailRow_content">{{ value && value.productBatchNo ?value.productBatchNo: ''}}</p> | ||
66 | {{ /if }} | ||
67 | </div> | ||
68 | <div class="mui-input-row"> | ||
69 | {{ if (isPsList || barcode) && value.status === 1 && value.isUsual === 0 && checkType === 1}} | ||
70 | <label class="font-warning">生产日期</label> | ||
71 | <input class="mui-input editInput realProductTime" type='date' value="{{ value && value.realProductTime ? value.realProductTime: ''}}" /> | ||
72 | {{ else }} | ||
73 | <label>生产日期</label> | ||
74 | <p class="detailRow_content">{{value && value.realProductTime ? value.realProductTime: ''}}</p> | ||
75 | {{ /if }} | ||
76 | |||
77 | </div> | ||
78 | <div class="mui-input-row"> | ||
79 | <label>指示货位</label> | ||
80 | <p class="detailRow_content">{{value && value.replanStoreName ? value.replanStoreName: ''}}</p> | ||
81 | </div> | ||
82 | <div class="mui-input-row"> | ||
83 | {{ if (isPsList || barcode) && value.status === 1 && isUsual === 0 && checkType === 1}} | ||
84 | <label class="font-warning">有效期至</label> | ||
85 | <input class="mui-input editInput realValidEndDate" type='date' value="{{ value && value.realValidEndDate ? value.realValidEndDate: '' }}" /> | ||
86 | {{ else }} | ||
87 | <label>有效期至</label> | ||
88 | <p class="detailRow_content">{{value && value.realValidEndDate ? value.realValidEndDate: ''}}</p> | ||
89 | {{ /if }} | ||
90 | </div> | ||
91 | {{ if isShowTemprature === 1 }} | ||
92 | <div class="mui-input-row"> | ||
93 | {{ if (isPsList || barcode) && value.status === 1 && isUsual === 0 && checkType === 1}} | ||
94 | <label class="font-warning">验收温度(℃)</label> | ||
95 | <input class="mui-input editInput realAcceptanceTemperature" type='number' value="{{ value && value.realAcceptanceTemperature ? value.realAcceptanceTemperature: ''}}" /> | ||
96 | {{ else }} | ||
97 | <label>验收温度(℃)</label> | ||
98 | <p class="detailRow_content">{{value && value.realAcceptanceTemperature ? value.realAcceptanceTemperature: ''}}</p> | ||
99 | {{ /if }} | ||
100 | </div> | ||
101 | {{ /if }} | ||
102 | <div class="mui-input-row"> | ||
103 | <label>配送数量</label> | ||
104 | <p class="detailRow_content">{{ value && value.realDeliveryQuantiry ? value.realDeliveryQuantiry: 0 }}</p> | ||
105 | </div> | ||
106 | <div class="mui-input-row"> | ||
107 | {{ if (isPsList || barcode) && value.status === 1 && isUsual === 0 && checkType === 1}} | ||
108 | <label class="font-warning">实到数量</label> | ||
109 | <input class="mui-input editInput realReceiveQuantiry" type="number" pattern="[0-9]*" value="{{ value && value.realNum ? value.realNum: value && value.realDeliveryQuantiry ? value.realDeliveryQuantiry: '' }}" /> | ||
110 | {{ else }} | ||
111 | <label>实到数量</label> | ||
112 | <p class="detailRow_content">{{value && value.isUsual === 0 && value.realNum ? value.realNum: 0 }}</p> | ||
113 | {{ /if }} | ||
114 | </div> | ||
115 | <div class="mui-input-row"> | ||
116 | <label>供应商</label> | ||
117 | <p class="detailRow_content">{{value && value.supplierName ? value.supplierName: ''}}</p> | ||
118 | </div> | ||
119 | </div> | ||
120 | </li> | ||
121 | </ul> | ||
122 | {{ /each }} | ||
123 | </div> | ||
124 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/index.html
0 → 100644
1 | <!--验收列表 - 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
10 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
11 | <link rel="import" href="../../tpl/acceptance_card.html " id="card_view"/> | ||
12 | </head> | ||
13 | |||
14 | <body> | ||
15 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
16 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
17 | <label class="mui-pull-right theme_back_font">返回</label> | ||
18 | </a> | ||
19 | <h1 class="mui-title themes_title">验收</h1> | ||
20 | <a id="barcode" href="#modal" class="mui-pull-right" style="height: 45px;padding-top: 12px;"> | ||
21 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
22 | <img src="../../assest/qrcode.png" width="24" height="24"/> | ||
23 | </div> | ||
24 | </a> | ||
25 | </header> | ||
26 | <div class="mui-content"> | ||
27 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
28 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="供应商名称"> | ||
29 | </div> | ||
30 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 102px;"> | ||
31 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待验收</a> | ||
33 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已验收</a> | ||
34 | </div> | ||
35 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
36 | <div class="mui-slider-group"> | ||
37 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
38 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
39 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
40 | <ul class="mui-table-view"> | ||
41 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
42 | </ul> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
47 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
48 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
49 | <ul class="mui-table-view"> | ||
50 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"></li> | ||
51 | </ul> | ||
52 | </div> | ||
53 | </div> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | <script src="../../js/mui.js"></script> | ||
59 | <script src="../../js/jquery.min.js" ></script> | ||
60 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
61 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
62 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
63 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
64 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
65 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
66 | |||
67 | <script type="text/javascript"> | ||
68 | |||
69 | |||
70 | var selectTabs = 1; // 默认选中第一个tab | ||
71 | //货位码 | ||
72 | function clicked(){ | ||
73 | |||
74 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码验收' }) | ||
75 | } | ||
76 | |||
77 | /*获取二维码返回值*/ | ||
78 | function scaned(t, r, f) { | ||
79 | |||
80 | console.log(r+"条形码读取的数据");//返回二维码读取的数据 | ||
81 | if(r){ | ||
82 | var itemData = {barcode:r} | ||
83 | itemData.currentSelected = selectTabs === 1 ? 'left': 'right'; | ||
84 | console.log(JSON.stringify(itemData)) | ||
85 | document.activeElement.blur(); // 隐藏软键盘 | ||
86 | let openwinUrl = 'acc_not_list'; | ||
87 | common.openwin(openwinUrl,{ params: JSON.stringify(itemData) },false) | ||
88 | } | ||
89 | } | ||
90 | |||
91 | //去搜索页面 | ||
92 | function toSearchPage (){ | ||
93 | var params = {}; | ||
94 | params.key = 'supplier'; | ||
95 | params.route = '../acceptance/index'; | ||
96 | params.module = 'acceptance'; | ||
97 | params.selectTabs = selectTabs; | ||
98 | params.location = 'main_list' | ||
99 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
100 | document.activeElement.blur(); // 隐藏软键盘 | ||
101 | } | ||
102 | |||
103 | |||
104 | (function($,$$) { | ||
105 | |||
106 | $.init({ | ||
107 | beforeback:function(){ | ||
108 | var list = plus.webview.currentWebview().opener(); | ||
109 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
110 | return true; | ||
111 | } | ||
112 | }); | ||
113 | |||
114 | var deceleration = mui.os.ios?0.003:0.0009; | ||
115 | $('.mui-scroll-wrapper').scroll({ | ||
116 | bounce: true, | ||
117 | indicators: true, //是否显示滚动条 | ||
118 | deceleration:deceleration | ||
119 | }); | ||
120 | var utils = new Utils(); | ||
121 | utils.appendModule('#card_view'); | ||
122 | |||
123 | /* 渲染模板 */ | ||
124 | var page = undefined, pageSize = 15,totalPage = undefined, query = {}; | ||
125 | |||
126 | var checkType, type, acceptanceType// 验收单类型 // 验收状态 5 待验收 2 已验收 | ||
127 | var requestUrl = '/a/checkaccept/list'; // 请求地址 | ||
128 | |||
129 | var pageLeft = 1, | ||
130 | pageRight = 1, | ||
131 | totalPageLeft, | ||
132 | totalPageRight, | ||
133 | isMore = true, | ||
134 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
135 | |||
136 | function template(selected, data, insertType){ | ||
137 | utils.innerTplHtml('acceptance', selected, data, insertType); | ||
138 | } | ||
139 | |||
140 | /* | ||
141 | 下拉刷新 | ||
142 | * */ | ||
143 | function pulldownRefresh(){ | ||
144 | console.log(query) | ||
145 | var self = this; | ||
146 | pageLeft = 1; pageRight = 1 | ||
147 | acceptanceType = selectTabs === 1 ? '5': '2'; | ||
148 | page = 1; | ||
149 | var postData = { | ||
150 | acceptanceType: acceptanceType, | ||
151 | checkType: checkType, | ||
152 | pageNo: page, | ||
153 | pageSize: pageSize | ||
154 | } | ||
155 | if(query.supplierCode){ | ||
156 | postData.supplierCodeList = [ query.supplierCode ]; | ||
157 | } | ||
158 | query = {}; | ||
159 | mui.ajaxRequest(requestUrl,{ | ||
160 | type: 'POST', | ||
161 | data: postData, | ||
162 | contentType: "application/json", | ||
163 | success: function(data){ | ||
164 | var resData = data.data; | ||
165 | var total = resData.totalPage; | ||
166 | if(selectTabs === 1){ | ||
167 | totalPageLeft = total; | ||
168 | }else{ | ||
169 | totalPageRight = total; | ||
170 | } | ||
171 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
172 | var i = selectTabs === 1 ? 0 : 1; | ||
173 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
174 | isMore = false; | ||
175 | self.endPullDownToRefresh(true); | ||
176 | }else{ | ||
177 | isMore = true; | ||
178 | self.endPullDownToRefresh(false); | ||
179 | self.refresh(true); | ||
180 | } | ||
181 | return template(selected,resData,false) | ||
182 | }, | ||
183 | error: function(xhr,type,errorThrown){ | ||
184 | console.log(xhr) | ||
185 | } | ||
186 | }); | ||
187 | } | ||
188 | /* | ||
189 | |||
190 | * 上拉加载更多 | ||
191 | * */ | ||
192 | function pullupRefresh(){ | ||
193 | var self = this; | ||
194 | if(isMore){ | ||
195 | if(selectTabs === 1){ | ||
196 | pageLeft ++ | ||
197 | }else{ | ||
198 | pageRight ++; | ||
199 | } | ||
200 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
201 | totalPage = selectTabs === 1 ? totalPageLeft: totalPageRight; | ||
202 | acceptanceType = selectTabs === 1 ? '5': '2'; | ||
203 | var postData = { | ||
204 | acceptanceType: acceptanceType, | ||
205 | checkType: checkType, | ||
206 | pageNo: page, | ||
207 | pageSize: pageSize | ||
208 | } | ||
209 | console.log(JSON.stringify(postData)) | ||
210 | if(page <= totalPage){ | ||
211 | mui.ajaxRequest(requestUrl,{ | ||
212 | type: 'POST', | ||
213 | data: postData, | ||
214 | contentType: "application/json", | ||
215 | success: function(data){ | ||
216 | var resData = data.data; | ||
217 | if(resData.pageNo === resData.totalPage){ | ||
218 | isMore = false; | ||
219 | self.endPullUpToRefresh(true); | ||
220 | }else{ | ||
221 | isMore = true; | ||
222 | self.endPullUpToRefresh(false); | ||
223 | self.refresh(true); | ||
224 | } | ||
225 | return template(selected,resData,true) | ||
226 | }, | ||
227 | error: function(xhr,type,errorThrown){ | ||
228 | console(xhr.responseText) | ||
229 | } | ||
230 | }); | ||
231 | } | ||
232 | }else{ | ||
233 | var i = selectTabs === 1 ? 0 : 1; | ||
234 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
235 | self.endPullUpToRefresh(true); | ||
236 | } | ||
237 | } | ||
238 | $.plusReady(function(){ | ||
239 | |||
240 | // 触发刷新 搜索页面搜的值 | ||
241 | window.addEventListener('search',function(event){ | ||
242 | console.log(event.detail) | ||
243 | query.supplierCode = JSON.parse(event.detail.searchParams).supplierCode; | ||
244 | query.supplierName = JSON.parse(event.detail.searchParams).supplierName; | ||
245 | console.log(JSON.stringify(query),'query') | ||
246 | $$('.mui-placeholder').hide(); | ||
247 | $$('.mui-input-clear').val(query.supplierName); | ||
248 | |||
249 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
250 | }) | ||
251 | |||
252 | window.addEventListener('pagefresh',function(e){ | ||
253 | let index = e.detail.hasAcceptance ? 0: 1; | ||
254 | if(index === 1){ | ||
255 | mui('#slider').slider().gotoItem(1); | ||
256 | } | ||
257 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
258 | setTimeout(function(){ | ||
259 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
260 | },300) | ||
261 | }) | ||
262 | |||
263 | plus.key.addEventListener('backbutton',function(){ | ||
264 | plus.webview.currentWebview().close(); | ||
265 | }) | ||
266 | |||
267 | if(plus.storage.getItem('currDept')){ | ||
268 | type = JSON.parse(plus.storage.getItem('currDept')).deptType; | ||
269 | switch(type){ | ||
270 | case '3'://药房 | ||
271 | checkType = 1; | ||
272 | break; | ||
273 | case '4':// 药库 | ||
274 | checkType = 2; | ||
275 | break; | ||
276 | case '5': // 基数药 | ||
277 | checkType = 3; | ||
278 | break; | ||
279 | default: | ||
280 | break; | ||
281 | } | ||
282 | //除了药库显示右上角扫描按钮,其他都不显示 | ||
283 | if(type == "3"){ | ||
284 | $$("#barcode").css("display","black"); | ||
285 | }else{ | ||
286 | $$("#barcode").css("display","none"); | ||
287 | } | ||
288 | }else{ | ||
289 | mui.toast('请重新登陆'); | ||
290 | common.openwin('../login/index') | ||
291 | } | ||
292 | |||
293 | var item2 = document.querySelector('#item2mobile'); | ||
294 | var item1 = document.querySelector('#item1mobile'); | ||
295 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
296 | $$('.mui-input-clear').val(''); | ||
297 | let index = e.detail.slideNumber; | ||
298 | if (index === 1) { | ||
299 | selected = '.mui-tab2'; | ||
300 | selectTabs = 2; | ||
301 | mui('#slider').slider().gotoItem(1); | ||
302 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
303 | if (!item2.querySelector('.am-card')) { | ||
304 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
305 | } | ||
306 | } | ||
307 | if(index === 0){ | ||
308 | selected = '.mui-tab1'; | ||
309 | selectTabs = 1; | ||
310 | mui('#slider').slider().gotoItem(0); | ||
311 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
312 | if (!item1.querySelector('.am-card')) { | ||
313 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
314 | } | ||
315 | } | ||
316 | }); | ||
317 | //循环初始化所有下拉刷新,上拉加载。 | ||
318 | $.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) { | ||
319 | |||
320 | $(pullRefreshEl).pullToRefresh({ | ||
321 | down: { | ||
322 | style:'circle', | ||
323 | contentdown : "下拉可以刷新", | ||
324 | contentover : "释放立即刷新", | ||
325 | contentrefresh : "正在刷新...", | ||
326 | callback: pulldownRefresh | ||
327 | }, | ||
328 | up: { | ||
329 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
330 | contentnomore:'没有更多数据', | ||
331 | callback: pullupRefresh | ||
332 | } | ||
333 | }); | ||
334 | }); | ||
335 | // 第一个tab 默认加载一次数据 | ||
336 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
337 | |||
338 | //绑定点击事件 - 进入详情页 | ||
339 | |||
340 | $('#slider').on('tap','.am-card',function(){ | ||
341 | |||
342 | let itemData = this.dataset; | ||
343 | itemData.currentSelected = selectTabs === 1 ? 'left': 'right'; | ||
344 | console.log(JSON.stringify(itemData)) | ||
345 | document.activeElement.blur(); // 隐藏软键盘 | ||
346 | let openwinUrl = selectTabs === 1 ? 'acc_not_list':'acc_list'; | ||
347 | common.openwin(openwinUrl,{ params: JSON.stringify(itemData) },false) | ||
348 | }) | ||
349 | }); | ||
350 | |||
351 | })(mui,jQuery); | ||
352 | |||
353 | </script> | ||
354 | </body> | ||
355 | |||
356 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/acceptance/list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='list_tpl_view'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-id="{{ value.id }}" | ||
6 | data-isUsual="{{ value.isUsual }}" | ||
7 | data-drugCode = "{{ value.drugCode }}" | ||
8 | data-parentId = "{{ value.parentId ? value.parentId:'-' }}" | ||
9 | data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" | ||
10 | data-realNum = "{{ value.realNum }}" | ||
11 | data-realProductTime = "{{ value.realProductTime }}" | ||
12 | data-productBatchNo = "{{ value.productBatchNo}}" | ||
13 | data-realValidEndDate = "{{ value.realValidEndDate }}" | ||
14 | data-realDeliveryQuantiry = "{{ value.realDeliveryQuantiry }}" | ||
15 | data-distributeCode="{{ value.distributeCode }}" | ||
16 | > | ||
17 | <div class="am-card-header"> | ||
18 | <div class="am-card-header-content"> | ||
19 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
20 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
21 | </div> | ||
22 | <div class="am-card-header-extra"> | ||
23 | <span>{{ value.type }}</span> | ||
24 | </div> | ||
25 | </div> | ||
26 | <div class="am-card-body"> | ||
27 | <div class="am-flexbox am-flexbox-align-center"> | ||
28 | <div class="am-flexbox-item"> | ||
29 | 单位:<span>{{ value.unit }}</span> | ||
30 | </div> | ||
31 | <div class="am-flexbox-item"> | ||
32 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
33 | </div> | ||
34 | <div class="am-flexbox-item"> | ||
35 | 数量:<span>{{ value.realDeliveryQuantiry }}</span> | ||
36 | </div> | ||
37 | </div> | ||
38 | {{ if acceptance }} | ||
39 | {{ if value.isUsual === 0 && checkType === 1 && (isPsList || barcode)}} | ||
40 | <div class="editForm" data-index="{{i}}" style="display: block;"> | ||
41 | <div class="am-flexbox am-flexbox-align-center"> | ||
42 | <div class="am-flexbox-item"> | ||
43 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
44 | <div class="am-list-line"> | ||
45 | <div class="am-input-label am-input-label-4 font-warning">实到数量:</div> | ||
46 | <div class="am-input-control"> | ||
47 | <input pattern="[0-9]*" type="number" value="{{ value.realNum ? value.realNum: value.realDeliveryQuantiry }}" data-index="{{i}}" placeholder="请输入" class="realReceiveQuantiry flex-item-input"/> | ||
48 | </div> | ||
49 | </div> | ||
50 | </div> | ||
51 | </div> | ||
52 | <div class="am-flexbox-item"> | ||
53 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
54 | <div class="am-list-line"> | ||
55 | <div class="am-input-label am-input-label-5 font-warning">生产日期:</div> | ||
56 | <div class="am-input-control"> | ||
57 | <input pattern="[0-9]*" type="date" value="{{ value.realProductTime }}" data-index="{{i}}" placeholder="请输入" class="realProductTime flex-item-input" /> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="am-flexbox-item"> | ||
63 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
64 | <div class="am-list-line"> | ||
65 | <div class="am-input-label am-input-label-5 font-warning">有效期至:</div> | ||
66 | <div class="am-input-control"> | ||
67 | <input pattern="[0-9]*" type="date" value="{{ value.realValidEndDate }}" data-index="{{i}}" placeholder="请输入" class="realValidEndDate flex-item-input" /> | ||
68 | </div> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | </div> | ||
73 | <div class="am-flexbox am-flexbox-align-center"> | ||
74 | <div class="am-flexbox-item"> | ||
75 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
76 | <div class="am-list-line"> | ||
77 | <div class="am-input-label am-input-label-4 font-warning">生产批号:</div> | ||
78 | <div class="am-input-control"> | ||
79 | <input pattern="[0-9]*" type="text" value="{{ value.productBatchNo }}" placeholder="请输入" class="productBatchNo flex-item-input"/> | ||
80 | </div> | ||
81 | </div> | ||
82 | </div> | ||
83 | </div> | ||
84 | <div class="am-flexbox-item"> | ||
85 | 指示货位:<span>{{ value.replanStoreName }}</span> | ||
86 | </div> | ||
87 | {{ if isShowTemprature === 1 }} | ||
88 | <div class="am-flexbox-item"> | ||
89 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
90 | <div class="am-list-line"> | ||
91 | <div class="am-input-label am-input-label-4 font-warning">验收温度:</div> | ||
92 | <div class="am-input-control"> | ||
93 | <input pattern="[0-9]*" type="number" value="{{ value.realAcceptanceTemperature ? value.realAcceptanceTemperature: '' }}" placeholder="请输入" class="realAcceptanceTemperature flex-item-input"/> | ||
94 | </div> | ||
95 | </div> | ||
96 | </div> | ||
97 | </div> | ||
98 | {{ else }} | ||
99 | {{ /if }} | ||
100 | </div> | ||
101 | </div> | ||
102 | {{ else }} | ||
103 | <div class="am-flexbox am-flexbox-align-center"> | ||
104 | <div class="am-flexbox-item"> | ||
105 | 实到数量:<span>{{ value.realNum }}</span> | ||
106 | </div> | ||
107 | <div class="am-flexbox-item am-last-flexItem"> | ||
108 | 生产日期:<span>{{ value.realProductTime }}</span> | ||
109 | </div> | ||
110 | <div class="am-flexbox-item am-last-flexItem"> | ||
111 | 有效期至:<span>{{ value.realValidEndDate }}</span> | ||
112 | </div> | ||
113 | </div> | ||
114 | {{ /if }} | ||
115 | <div class="am-flexbox am-flexbox-align-center"> | ||
116 | <div class="am-flexbox-item"> | ||
117 | 批准文号: <span>{{ value.approvalNo }}</span> | ||
118 | </div> | ||
119 | {{ if checkType !== 1}} | ||
120 | <div class="am-flexbox-item"> | ||
121 | 指示货位: <span>{{ value.replanStoreName }}</span> | ||
122 | </div> | ||
123 | {{ /if }} | ||
124 | <div class="am-flexbox-item am-last-flexItem"> | ||
125 | 生产厂家: <span>{{ value.ctmmManufacturerName }}</span> | ||
126 | </div> | ||
127 | |||
128 | </div> | ||
129 | {{ /if }} | ||
130 | </div> | ||
131 | <div class="am-card-footer"> | ||
132 | <div class="am-card-footer-content"></div> | ||
133 | <div class="am-card-footer-extra"> | ||
134 | {{ if acceptance && value.isUsual === 0 && value.showEditBtn }} | ||
135 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined edit" data-id="{{ value.id }}" data-index="{{i}}">收起编辑</button> | ||
136 | {{ /if }} | ||
137 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined moreDetail" data-distributeCode="{{ value.distributeCode }}" data-id="{{ value.id }}" data-index="{{i}}" style="margin: 0 5px;">更多详情</button> | ||
138 | {{ if acceptance }} | ||
139 | <button type="button" class="mui-btn mui-btn-blue mui-btn-danger acceptance" data-rowNo="{{ value.rowNo }}" data-distributeCode="{{ value.distributeCode }}" data-id="{{ value.id }}" data-index="{{i}}">确认验收</button> | ||
140 | {{ /if }} | ||
141 | |||
142 | </div> | ||
143 | </div> | ||
144 | </div> | ||
145 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
146 | </div> | ||
147 | {{/each}} | ||
148 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/acc_detail.html
0 → 100644
1 | <!--验收 - 详情页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./detail_tpl.html" id="acc_detail_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/check.css" rel="stylesheet"/> | ||
12 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
13 | |||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <div class="mui-content detailRow"> | ||
18 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
19 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
20 | <li class="mui-table-view-cell mui-collapse"> | ||
21 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
22 | <div class="mui-collapse-content"> | ||
23 | |||
24 | </div> | ||
25 | </li> | ||
26 | </ul> | ||
27 | </form> | ||
28 | <form id="List"> | ||
29 | |||
30 | </form> | ||
31 | </div> | ||
32 | |||
33 | <script src="../../js/mui.min.js"></script> | ||
34 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
35 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
36 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
37 | <script type="text/javascript" src="../../js/request.js" ></script> | ||
38 | <script type="text/javascript"> | ||
39 | |||
40 | (function($) { | ||
41 | var utils = new Utils(); | ||
42 | utils.appendModule('#acc_detail_tpl'); | ||
43 | |||
44 | function showData(data){ | ||
45 | var html = template('detail_tpl', data); | ||
46 | if(html){ | ||
47 | document.getElementById('detailContent').innerHTML = html; | ||
48 | } | ||
49 | |||
50 | } | ||
51 | var checkType = undefined, | ||
52 | type = undefined, | ||
53 | data = null, | ||
54 | details = undefined, | ||
55 | url = '/a/exam/detail', // 分页接口 | ||
56 | titleUrl = '/a/exam/detailhead',// 头部接口 | ||
57 | checkUrl = '/a/checkacceptdetail/basemedic'; // 验收接口 | ||
58 | $.plusReady(function(){ | ||
59 | $.init({ | ||
60 | beforeback: function() { | ||
61 | var list = plus.webview.currentWebview().opener(); | ||
62 | console.log(details.selectTabs) | ||
63 | mui.fire(list, 'pagefresh',{ selectTabs: details.selectTabs === 1 ? '1': '0' , query: details.query }); | ||
64 | return true; | ||
65 | } | ||
66 | }) | ||
67 | |||
68 | var self = plus.webview.currentWebview(); | ||
69 | details = JSON.parse(self.details);//获得参数 | ||
70 | checkType = details.checkType; | ||
71 | status = details.status; | ||
72 | console.log(JSON.stringify(details) ); | ||
73 | console.log(typeof details.selectTabs) | ||
74 | var postData = { | ||
75 | distributeCode: details.distributeCode, | ||
76 | status: details.status, | ||
77 | id: details.id | ||
78 | }; | ||
79 | var detailData = {}; | ||
80 | plus.nativeUI.showWaiting('加载中...'); | ||
81 | mui.ajaxRequest(titleUrl,{ | ||
82 | type: 'POST', | ||
83 | data: { distributeCode: postData.distributeCode }, | ||
84 | success: function(data){ | ||
85 | if(data.code === 200){ | ||
86 | console.log('titleUrl*****************') | ||
87 | console.log(JSON.stringify(data)) | ||
88 | for(var key in data.data){ | ||
89 | detailData[key] = data.data[key]; | ||
90 | detailData.isPsList = details.isPsList; | ||
91 | } | ||
92 | mui.ajaxRequest(url,{ | ||
93 | type: 'POST', | ||
94 | data: postData, | ||
95 | success: function(data){ | ||
96 | console.log('url*****************') | ||
97 | console.log(JSON.stringify(data)) | ||
98 | plus.nativeUI.closeWaiting(); | ||
99 | if(data.code === 200){ | ||
100 | detailData.list = data.data.list; | ||
101 | console.log(detailData) | ||
102 | showData(detailData); | ||
103 | if(details.hasAcceptance){ | ||
104 | setTimeout(function(){ | ||
105 | // showOrHideBtn() | ||
106 | var acceptanceBtn = '<button type="button" id="acceptance" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认验收</button>' | ||
107 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",acceptanceBtn); | ||
108 | },100) | ||
109 | } | ||
110 | |||
111 | }else{ | ||
112 | mui.toast(data.msg,{ type: 'div' }); | ||
113 | } | ||
114 | }, | ||
115 | error: function(xhr,type,errorThrown){ | ||
116 | console.log(xhr.responseText) | ||
117 | } | ||
118 | }); | ||
119 | }else{ | ||
120 | mui.toast(data.msg,{ type: 'div' }); | ||
121 | } | ||
122 | |||
123 | }, | ||
124 | error: function(xhr,type,errorThrown){ | ||
125 | console.log(xhr.responseText) | ||
126 | } | ||
127 | }); | ||
128 | |||
129 | // checkType 1 2 4 配送单 可编辑 其余 出库单 不能编辑 | ||
130 | // 验收 | ||
131 | mui('.detailRow').on('tap','#acceptance',function(event){ | ||
132 | let postData = [], submitData = {}, values = {}; | ||
133 | values.productBatchNo = detailData.list[0].productBatchNo; | ||
134 | values.realProductTime = detailData.list[0].realProductTime; | ||
135 | values.realValidEndDate = detailData.list[0].realValidEndDate; | ||
136 | if(defaultStatus.isShowTemprature === 1){ | ||
137 | values.realAcceptanceTemperature = detailData.list[0].realAcceptanceTemperature; | ||
138 | } | ||
139 | values.realReceiveQuantiry = detailData.list[0].realReceiveQuantiry; | ||
140 | values.drugCode = detailData.list[0].drugCode; | ||
141 | values.isUsual = detailData.list[0].isUsual; | ||
142 | values.id = detailData.list[0].id; | ||
143 | values.parentId = detailData.list[0].id; | ||
144 | postData.push(values); | ||
145 | submitData.detailList = postData; | ||
146 | submitData.distributeCode = detailData.distributeCode; | ||
147 | let count = 0; | ||
148 | mui.each(submitData.detailList,function(index,item){ | ||
149 | count += Number(item.realReceiveQuantiry) | ||
150 | }); | ||
151 | if(count > detailData.list[0].realReceiveQuantiry){ | ||
152 | mui.toast('请注意:实到数量比配送数量多'); | ||
153 | } | ||
154 | console.log(submitData,'submitData'); // 批号 数据 | ||
155 | document.activeElement.blur(); // 隐藏软键盘 | ||
156 | var btnArray = ['否', '是']; | ||
157 | mui.confirm('是否确认验收?', '确认', btnArray, function(e) { | ||
158 | if (e.index == 1) { | ||
159 | mui.ajaxRequest(checkUrl,{ | ||
160 | type: 'POST', | ||
161 | data: submitData, | ||
162 | showWaiting: true, | ||
163 | contentType: "application/json", | ||
164 | success: function(data){ | ||
165 | if(data.code === 200){ | ||
166 | mui.toast('验收成功',{ type: 'div' }); | ||
167 | var page = plus.webview.getWebviewById('basic_acc_list'); | ||
168 | mui.fire(page,'pagefresh',{ selectTabs: '1', query:{} }); | ||
169 | common.gotowin('basic_acc_list',{ }); | ||
170 | plus.webview.currentWebview().close(); | ||
171 | } | ||
172 | }, | ||
173 | error: function(xhr,type,errorThrown){ | ||
174 | console.log(xhr.responseText) | ||
175 | } | ||
176 | }) | ||
177 | } | ||
178 | },'div') | ||
179 | }) | ||
180 | }) | ||
181 | })(mui); | ||
182 | |||
183 | </script> | ||
184 | </body> | ||
185 | |||
186 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/basic_acc_batch.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="basic_acc_batch_tpl.html" id="list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <div class="mui-content"> | ||
17 | |||
18 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="padding-bottom: 59px;"> | ||
19 | <div class="mui-slider-group"> | ||
20 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
21 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
22 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
23 | <ul class="mui-table-view"> | ||
24 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
25 | |||
26 | </li> | ||
27 | </ul> | ||
28 | </div> | ||
29 | </div> | ||
30 | </div> | ||
31 | </div> | ||
32 | </div> | ||
33 | <div class="fix_bottom-wraper"> | ||
34 | <div class="fix-bottom-content"> | ||
35 | <div class="mui-checkbox mui-left"> | ||
36 | <label>全选</label> | ||
37 | <input name="checkboxAll" value="1" id="checkall" type="checkbox" style="top: -5px;z-index: 10;"> | ||
38 | </div> | ||
39 | <span style="margin-left: 8px;">已选中 <label class="total"> 0 </label> 项</span> | ||
40 | </div> | ||
41 | <a href="javascript:;" class="btn acceptance fix-bottom-extra">验 收</a> | ||
42 | </div> | ||
43 | </div> | ||
44 | |||
45 | <script src="../../js/mui.min.js"></script> | ||
46 | <script src="../../js/jquery.min.js"></script> | ||
47 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
48 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
49 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
50 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
51 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
52 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
53 | <script type="text/javascript"> | ||
54 | |||
55 | (function($,$JQ) { | ||
56 | |||
57 | var query ={}; | ||
58 | $.init({ | ||
59 | beforeback: function() { | ||
60 | var list = plus.webview.currentWebview().opener(); | ||
61 | mui.fire(list, 'pagefresh',{ selectTabs: '1', query: params.query || {} }); | ||
62 | return true; | ||
63 | } | ||
64 | }) | ||
65 | |||
66 | function template(data, insertType,render) { | ||
67 | utils.innerTplHtml('list_tpl_view', '.mui-tab1', data, insertType); | ||
68 | if(render){ | ||
69 | var checkList = document.querySelectorAll('.checkone'); | ||
70 | console.log(selecteIndex,'selecteIndex') | ||
71 | mui.each(selecteIndex, function(index, item) { | ||
72 | checkList[item].checked = true; | ||
73 | }); | ||
74 | } | ||
75 | } | ||
76 | |||
77 | var deceleration = mui.os.ios?0.003:0.0009; | ||
78 | $('.mui-scroll-wrapper').scroll({ | ||
79 | scrollX: false, | ||
80 | bounce: true, | ||
81 | indicators: true, //是否显示滚动条 | ||
82 | deceleration:deceleration | ||
83 | }); | ||
84 | |||
85 | /* 渲染模板 */ | ||
86 | var checkType, type, auditStatus;// 验收单类型 // 验收状态 1 待验收 2 已验收 ; | ||
87 | var acceptList = []; | ||
88 | var nullDataHtml = '<div class="mui-pull-bottom-tips"><div class="mui-pull-bottom-wrapper">'+ | ||
89 | '<span class="mui-pull-loading">暂无数据</span></div></div>' | ||
90 | var page = 1, | ||
91 | totalPage = undefined, | ||
92 | pageSize = 15, | ||
93 | isMore = true; | ||
94 | var checkType = undefined, | ||
95 | status = undefined, // 验收单类型 // 验收状态 1 待验收 2 已验收 | ||
96 | params = undefined, | ||
97 | distributeCode = undefined, | ||
98 | isShowTemprature = undefined, | ||
99 | selectedRows = [], | ||
100 | selecteIndex = []; | ||
101 | |||
102 | var _url = '/a/exam/detail', // 分页接口 | ||
103 | checkUrl = '/a/examdetail/checkList'; // 原验收接口'/a/checkacceptdetail/checkList'; | ||
104 | |||
105 | var utils = new Utils(); | ||
106 | utils.appendModule('#list_tpl'); | ||
107 | |||
108 | //下拉刷新 | ||
109 | function pulldownRefresh() { | ||
110 | document.querySelector('.total').innerText = 0; | ||
111 | document.querySelector('#checkall').checked = false; | ||
112 | selecteIndex = []; | ||
113 | var self = this; | ||
114 | page = 1; | ||
115 | var postData = { | ||
116 | distributeCode: distributeCode, | ||
117 | status: status, | ||
118 | pageNo: page, | ||
119 | pageSize: pageSize | ||
120 | }; | ||
121 | console.log('下拉**************') | ||
122 | mui.ajaxRequest(_url, { | ||
123 | type: 'POST', | ||
124 | data: postData, | ||
125 | success: function(data) { | ||
126 | var resData = data.data; | ||
127 | resData.page = page; | ||
128 | resData.pageSize = pageSize; | ||
129 | acceptList = resData.list; | ||
130 | resData.acceptance = true; | ||
131 | totalPage = data.totalPage; | ||
132 | console.log(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage) | ||
133 | if (resData.list.length === 0 || resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage) { | ||
134 | isMore = false; | ||
135 | self.endPullDownToRefresh(true); | ||
136 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
137 | } else { | ||
138 | isMore = true; | ||
139 | self.endPullDownToRefresh(false); | ||
140 | self.refresh(true); | ||
141 | } | ||
142 | return template(resData, false) | ||
143 | }, | ||
144 | error: function(xhr, type, errorThrown) { | ||
145 | console.log(xhr.responseText) | ||
146 | self.endPullDownToRefresh(false); | ||
147 | self.refresh(true); | ||
148 | } | ||
149 | }); | ||
150 | } | ||
151 | |||
152 | //上拉加载更多 | ||
153 | function pullupRefresh() { | ||
154 | document.querySelector('#checkall').checked = false; | ||
155 | var self = this; | ||
156 | console.log(isMore, 'isMore') | ||
157 | console.log('上拉**************') | ||
158 | |||
159 | if (isMore) { | ||
160 | page++; | ||
161 | mui.ajaxRequest(_url, { | ||
162 | type: 'POST', | ||
163 | data: { | ||
164 | distributeCode: distributeCode, | ||
165 | status: status, | ||
166 | pageNo: page, | ||
167 | pageSize: pageSize | ||
168 | }, | ||
169 | success: function(data) { | ||
170 | var resData = data.data; | ||
171 | resData.page = page; | ||
172 | resData.pageSize = pageSize; | ||
173 | mui.each(resData.list,function(index,item){ | ||
174 | acceptList.push(item) | ||
175 | }); | ||
176 | resData.acceptance = true; | ||
177 | if (resData.list.length === 0 ||resData.pageNo === resData.totalPage) { | ||
178 | isMore = false; | ||
179 | self.endPullUpToRefresh(true); | ||
180 | } else { | ||
181 | isMore = true; | ||
182 | self.endPullUpToRefresh(false); | ||
183 | self.refresh(true); | ||
184 | } | ||
185 | return template(resData, true, 'rerender') | ||
186 | |||
187 | }, | ||
188 | error: function(xhr, type, errorThrown) { | ||
189 | console.log(xhr.responseText) | ||
190 | } | ||
191 | }); | ||
192 | } else { | ||
193 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
194 | self.endPullUpToRefresh(true); | ||
195 | } | ||
196 | |||
197 | } | ||
198 | |||
199 | //模板加载 | ||
200 | $.plusReady(function(){ | ||
201 | // var params, distributeCode, isShowTemprature, selectedRows = [],selecteIndex = []; | ||
202 | window.addEventListener('pagefresh',function(event){ | ||
203 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
204 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
205 | }); | ||
206 | var self = plus.webview.currentWebview(); | ||
207 | params = JSON.parse(self.params); //获得参数 | ||
208 | distributeCode = params.distributeCode; | ||
209 | status = 1; | ||
210 | |||
211 | isShowTemprature = params.isShowTemprature; | ||
212 | console.log(JSON.stringify(params)) | ||
213 | |||
214 | //循环初始化所有下拉刷新,上拉加载。 | ||
215 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
216 | mui(".mui-scroll").pullToRefresh({ | ||
217 | down: { | ||
218 | style: 'circle', | ||
219 | contentdown: "下拉可以刷新", | ||
220 | contentover: "释放立即刷新", | ||
221 | contentrefresh: "正在刷新...", | ||
222 | callback: pulldownRefresh | ||
223 | }, | ||
224 | up: { | ||
225 | contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
226 | contentnomore: '没有更多数据', | ||
227 | callback: pullupRefresh | ||
228 | } | ||
229 | }); | ||
230 | }); | ||
231 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
232 | |||
233 | |||
234 | // 全选 及反选 | ||
235 | $('.fix_bottom-wraper').on('click','#checkall',function(){ | ||
236 | selecteIndex = []; | ||
237 | var checkList = document.querySelectorAll('.checkone'); | ||
238 | if (document.querySelector('#checkall').checked){ | ||
239 | // 全选 | ||
240 | mui.each(checkList,function(index,item){ | ||
241 | item.checked = true | ||
242 | }); | ||
243 | document.querySelector('.total').innerText = checkList.length; | ||
244 | selectedRows = acceptList; | ||
245 | mui.each(selectedRows,function(index,item){ | ||
246 | selecteIndex.push(index); | ||
247 | }); | ||
248 | console.log(selecteIndex) | ||
249 | } else { | ||
250 | // 取消全选 | ||
251 | mui.each(checkList,function(index,item){ | ||
252 | item.checked = false | ||
253 | }); | ||
254 | document.querySelector('.total').innerText = 0; | ||
255 | selectedRows = []; | ||
256 | selecteIndex = [] | ||
257 | } | ||
258 | console.log(selectedRows) | ||
259 | }); | ||
260 | |||
261 | // 复选框选中 | ||
262 | $('#slider').on('change','.checkone',function(){ | ||
263 | console.log('change') | ||
264 | selectedRows = []; | ||
265 | selecteIndex = []; | ||
266 | var checkList = document.querySelectorAll('.checkone') | ||
267 | var checkAll = document.querySelector('#checkall'); | ||
268 | var checkLen = checkList.length; | ||
269 | var len = 0; | ||
270 | mui.each(checkList,function(index,item){ | ||
271 | if(item.checked){ | ||
272 | len++; | ||
273 | // selecteIndex.push(this.dataset.index); | ||
274 | selecteIndex.push(Number(this.dataset.index)); | ||
275 | } | ||
276 | }); | ||
277 | checkAll.checked = len === checkLen ? true: false; | ||
278 | document.querySelector('.total').innerText = len; | ||
279 | console.log(selectedRows); | ||
280 | console.log(selecteIndex) | ||
281 | }) | ||
282 | |||
283 | |||
284 | // 绑定事件 --确认验收 | ||
285 | $('.fix_bottom-wraper').on('tap','.acceptance',function(){ | ||
286 | document.activeElement.blur(); // 隐藏软键盘 | ||
287 | if(Number(document.querySelector('.total').innerText) === 0){ | ||
288 | return mui.alert('请至少选中一项','警告',['确认'],function(){},'div') | ||
289 | } | ||
290 | var cards = document.querySelectorAll('.am-card'); | ||
291 | let detailList = [], | ||
292 | submitData = {}; | ||
293 | if(params.isPsList){ | ||
294 | let selectedCards = [], cardFactNum = []; | ||
295 | mui.each(selecteIndex, function(index, item) { | ||
296 | selectedCards.push(cards[item]); | ||
297 | if (cards[index].dataset.isusual === '0') { | ||
298 | // 正常单据 | ||
299 | cardFactNum.push(cards[item].querySelector('.realReceiveQuantity')); | ||
300 | } else { | ||
301 | // 异常单据 | ||
302 | cardFactNum.push(cards[item].querySelector('.errorQuantiry')) | ||
303 | } | ||
304 | }); | ||
305 | console.log(cardFactNum,'cardFactNum') | ||
306 | console.log(selectedCards,'selectedCards'); | ||
307 | var flag = true; | ||
308 | mui.each(cardFactNum,function(index,item){ | ||
309 | if(item.tagName === 'INPUT'){ | ||
310 | if(!item.value){ | ||
311 | flag = false; | ||
312 | } | ||
313 | } | ||
314 | |||
315 | }) | ||
316 | if(!flag){ | ||
317 | return mui.alert('实到数量不能为空','警告',['确定'],function(){},'div'); | ||
318 | }; | ||
319 | |||
320 | mui.each(selectedCards,function(index,item){ | ||
321 | var postData = {}; | ||
322 | postData.id = item.dataset.id; | ||
323 | postData.isUsual = item.dataset.isusual; | ||
324 | postData.drugCode = item.dataset.drugcode; | ||
325 | if(item.dataset.isusual === '0'){ | ||
326 | var realReceiveQuantity = item.querySelector('.realReceiveQuantity').value; | ||
327 | var realProductTime = item.querySelector('.realProductTime').value; | ||
328 | var productBatchNo = item.querySelector('.productBatchNo').value; | ||
329 | var realValidEndDate = item.querySelector('.realValidEndDate').value; | ||
330 | if(isShowTemprature === 1){ | ||
331 | var realAcceptanceTemperature = item.querySelector('.realAcceptanceTemperature').value; | ||
332 | postData.realAcceptanceTemperature = realAcceptanceTemperature | ||
333 | } | ||
334 | postData.realReceiveQuantiry = realReceiveQuantity; | ||
335 | postData.realProductTime = realProductTime; | ||
336 | postData.productBatchNo = productBatchNo; | ||
337 | postData.realValidEndDate = realValidEndDate; | ||
338 | }else{ | ||
339 | var errorQuantiry = item.querySelector('.errorQuantiry').innerText; | ||
340 | var errRealProductTime = item.querySelector('.errRealProductTime').innerText; | ||
341 | var errVailEndDate = item.querySelector('.errVailEndDate').innerText; | ||
342 | postData.realReceiveQuantiry = errorQuantiry; | ||
343 | postData.realProductTime = errRealProductTime; | ||
344 | postData.productBatchNo = item.dataset.productbatchno; | ||
345 | postData.realValidEndDate = errVailEndDate; | ||
346 | } | ||
347 | detailList.push(postData); | ||
348 | }); | ||
349 | }else{ | ||
350 | |||
351 | mui.each(selecteIndex,function(index,item){ | ||
352 | let postData = {}; | ||
353 | postData.realReceiveQuantiry = acceptList[item].realReceiveQuantiry; | ||
354 | postData.realProductTime = acceptList[item].realProductTime; | ||
355 | postData.productBatchNo = acceptList[item].productBatchNo; | ||
356 | postData.realValidEndDate = acceptList[item].realValidEndDate; | ||
357 | postData.id = acceptList[item].id; | ||
358 | postData.isUsual = acceptList[item].isUsual; | ||
359 | if(isShowTemprature === 1){ | ||
360 | postData.realAcceptanceTemperature = acceptList[item].realAcceptanceTemperature; | ||
361 | } | ||
362 | postData.drugCode = acceptList[item].drugCode; | ||
363 | detailList.push(postData); | ||
364 | }); | ||
365 | } | ||
366 | submitData.detailList = detailList; | ||
367 | submitData.distributeCode = distributeCode; | ||
368 | submitData.checkType= 3; | ||
369 | console.log(submitData) | ||
370 | |||
371 | var btnArray = ['否', '是']; | ||
372 | mui.confirm('确认批量验收选中的药品?', '确认', btnArray, function(e) { | ||
373 | if (e.index == 1) { | ||
374 | mui.ajaxRequest(checkUrl,{ | ||
375 | type: 'POST', | ||
376 | data: submitData, | ||
377 | showWaiting: true, | ||
378 | contentType: "application/json", | ||
379 | success: function(data){ | ||
380 | if(data.code === 200){ | ||
381 | mui.toast('验收成功',{ type: 'div' }); | ||
382 | $JQ('.total').text(0); | ||
383 | document.querySelector('#checkall').checked=false; | ||
384 | setTimeout(function(){ | ||
385 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
386 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
387 | },300) | ||
388 | } | ||
389 | }, | ||
390 | error: function(xhr,type,errorThrown){ | ||
391 | console.log(xhr.responseText) | ||
392 | } | ||
393 | }) | ||
394 | } | ||
395 | },'div') | ||
396 | }); | ||
397 | |||
398 | }); | ||
399 | |||
400 | })(mui,jQuery); | ||
401 | |||
402 | </script> | ||
403 | </body> | ||
404 | |||
405 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | |||
2 | <script type="text/html" id='list_tpl_view'> | ||
3 | {{ each list value i}} | ||
4 | <div class="batch-wrapper"> | ||
5 | <div> | ||
6 | <div class="mui-checkbox mui-left" style="width: 48px;"> | ||
7 | <input name="selected" class="checkone" type="checkbox" data-index="{{ (page-1)*pageSize + i }}" style="top: -10px;left: 10px;"> | ||
8 | </div> | ||
9 | </div> | ||
10 | <div class="am-card scrollList-item am-card-full" style="width: 90%;border: none;" | ||
11 | data-id="{{ value.id }}" | ||
12 | data-drugCode="{{ value.drugCode }}" | ||
13 | data-isUsual="{{ value.isUsual }}" | ||
14 | data-parentId="{{ value.parentId }}" | ||
15 | data-productBatchNo="{{ value.productBatchNo }}" | ||
16 | > | ||
17 | <div class="am-card-header" style="padding: 9px 15px 0px 5px !important;"> | ||
18 | <div class="am-card-header-content"> | ||
19 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
20 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
21 | </div> | ||
22 | <div class="am-card-header-extra"> | ||
23 | <span>待验收</span> | ||
24 | </div> | ||
25 | </div> | ||
26 | <div class="am-card-body" style="padding: 5px !important;"> | ||
27 | <div class="am-flexbox am-flexbox-align-center"> | ||
28 | <div class="am-flexbox-item"> | ||
29 | 单位:<span>{{ value.unit }}</span> | ||
30 | </div> | ||
31 | <div class="am-flexbox-item"> | ||
32 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
33 | </div> | ||
34 | <div class="am-flexbox-item"> | ||
35 | 数量:<span>{{ value.realDeliveryQuantiry }}</span> | ||
36 | </div> | ||
37 | </div> | ||
38 | {{ if acceptance }} | ||
39 | {{ if value.editable && value.isUsual === 0 }} | ||
40 | <!--<div class="editForm" style="display: block;"> | ||
41 | <div class="am-flexbox am-flexbox-align-center"> | ||
42 | <div class="am-flexbox-item"> | ||
43 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
44 | <div class="am-list-line"> | ||
45 | <div class="am-input-label am-input-label-4 font-warning">实到数量:</div> | ||
46 | <div class="am-input-control"> | ||
47 | <input pattern="[0-9]*" type="number" value={{ value.realReceiveQuantiry?value.realReceiveQuantiry: '' }} placeholder="请输入" class="realReceiveQuantity flex-item-input" /> | ||
48 | </div> | ||
49 | </div> | ||
50 | </div> | ||
51 | </div> | ||
52 | <div class="am-flexbox-item"> | ||
53 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
54 | <div class="am-list-line"> | ||
55 | <div class="am-input-label am-input-label-5 font-warning">生产日期:</div> | ||
56 | <div class="am-input-control"> | ||
57 | <input pattern="[0-9]*" type="date" value={{ value.realProductTime }} placeholder="请输入" class="realProductTime flex-item-input" /> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="am-flexbox-item"> | ||
63 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
64 | <div class="am-list-line"> | ||
65 | <div class="am-input-label am-input-label-5 font-warning">有效期至:</div> | ||
66 | <div class="am-input-control"> | ||
67 | <input pattern="[0-9]*" type="date" value={{ value.realValidEndDate }} placeholder="请输入" class="realValidEndDate flex-item-input" /> | ||
68 | </div> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | </div> | ||
73 | <div class="am-flexbox am-flexbox-align-center"> | ||
74 | <div class="am-flexbox-item"> | ||
75 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
76 | <div class="am-list-line"> | ||
77 | <div class="am-input-label am-input-label-4 font-warning">生产批号:</div> | ||
78 | <div class="am-input-control"> | ||
79 | <input pattern="[0-9]*" type="text" value={{ value.productBatchNo }} placeholder="请输入" class="productBatchNo flex-item-input"/> | ||
80 | </div> | ||
81 | </div> | ||
82 | </div> | ||
83 | </div> | ||
84 | {{ if isShowTemprature === 1 }} | ||
85 | <div class="am-flexbox-item"> | ||
86 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
87 | <div class="am-list-line"> | ||
88 | <div class="am-input-label am-input-label-4 font-warning">验收温度:</div> | ||
89 | <div class="am-input-control"> | ||
90 | <input pattern="[0-9]*" type="number" value={{ value.realAcceptanceTemperature ? value.realAcceptanceTemperature: '' }} placeholder="请输入" class="realAcceptanceTemperature flex-item-input"/> | ||
91 | </div> | ||
92 | </div> | ||
93 | </div> | ||
94 | </div> | ||
95 | {{ else }} | ||
96 | <div class="am-flexbox-item"> | ||
97 | |||
98 | </div> | ||
99 | {{ /if }} | ||
100 | |||
101 | <div class="am-flexbox-item"> | ||
102 | |||
103 | </div> | ||
104 | </div> | ||
105 | </div>--> | ||
106 | {{ else }} | ||
107 | |||
108 | <div class="am-flexbox am-flexbox-align-center"> | ||
109 | <div class="am-flexbox-item"> | ||
110 | 实到数量:<span class='errorQuantiry'>{{ value.realReceiveQuantiry || value.realReceiveQuantiry === 0 ? value.realReceiveQuantiry: '' }}</span> | ||
111 | </div> | ||
112 | <div class="am-flexbox-item am-last-flexItem"> | ||
113 | 生产日期:<span class="errRealProductTime">{{ value.realProductTime }}</span> | ||
114 | </div> | ||
115 | <div class="am-flexbox-item am-last-flexItem"> | ||
116 | 有效期至:<span class="errVailEndDate">{{ value.realValidEndDate }}</span> | ||
117 | </div> | ||
118 | </div> | ||
119 | |||
120 | {{ /if }} | ||
121 | <div class="am-flexbox am-flexbox-align-center"> | ||
122 | <div class="am-flexbox-item"> | ||
123 | 批准文号:<span>{{ value.approvalNo }}</span> | ||
124 | </div> | ||
125 | <div class="am-flexbox-item am-last-flexItem" style="margin-left: -50px;"> | ||
126 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
127 | </div> | ||
128 | </div> | ||
129 | {{ /if }} | ||
130 | </div> | ||
131 | </div> | ||
132 | </div> | ||
133 | {{/each}} | ||
134 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/basic_acc_list.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | <a href="#" class="mui-pull-right batchAccetpance" style="height: 45px;padding-top: 12px;"> | ||
22 | 批量验收 | ||
23 | </a> | ||
24 | </header> | ||
25 | <div class="mui-content"> | ||
26 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
27 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家" > | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen"> | ||
30 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
31 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待验收</a> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已验收</a> | ||
33 | </div> | ||
34 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
35 | <div class="mui-slider-group"> | ||
36 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
37 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
38 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
39 | <ul class="mui-table-view"> | ||
40 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
41 | |||
42 | </li> | ||
43 | </ul> | ||
44 | </div> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
48 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
49 | <div class="mui-scroll" id="mui-table-view-tab2"> | ||
50 | <ul class="mui-table-view"> | ||
51 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"> | ||
52 | |||
53 | </li> | ||
54 | </ul> | ||
55 | </div> | ||
56 | </div> | ||
57 | |||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | |||
63 | <script src="../../js/mui.min.js"></script> | ||
64 | <script src="../../js/jquery.min.js" ></script> | ||
65 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
66 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
67 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
68 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
69 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
70 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
71 | <script type="text/javascript"> | ||
72 | if(window.plus) { | ||
73 | plusready(); | ||
74 | } else { | ||
75 | document.addEventListener('plusready', plusready, false); | ||
76 | } | ||
77 | function plusready() { | ||
78 | plus.key.addEventListener('backbutton',function(){ | ||
79 | plus.webview.currentWebview().close(); | ||
80 | }) | ||
81 | } | ||
82 | var auditStatus = undefined, | ||
83 | selected = undefined, //验收状态 1 待验收 2 已验收 | ||
84 | selectTabs = 1; | ||
85 | |||
86 | |||
87 | //去搜索页面 | ||
88 | function toSearchPage (){ | ||
89 | // document.activeElement.blur(); // 隐藏软键盘 | ||
90 | var params = {}; | ||
91 | params.id = 'basic_acc_list'; | ||
92 | params.route = '../basicMedicine/basic_acc_list'; | ||
93 | params.selected = selected; | ||
94 | params.auditStatus = auditStatus; | ||
95 | params.selectTabs = selectTabs; | ||
96 | params.module = 'basicMedicine'; | ||
97 | params.location = 'sub_list'; | ||
98 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
99 | } | ||
100 | |||
101 | (function($,$$) { | ||
102 | |||
103 | $.init({ | ||
104 | beforeback: function() { | ||
105 | var list = plus.webview.currentWebview().opener(); | ||
106 | mui.fire(list, 'pagefresh',{ hasAcceptance: selectTabs === 1 ? true: false}); | ||
107 | return true; | ||
108 | } | ||
109 | }) | ||
110 | var deceleration = mui.os.ios?0.003:0.0009; | ||
111 | $('.mui-scroll-wrapper').scroll({ | ||
112 | bounce: true, | ||
113 | indicators: true, //是否显示滚动条 | ||
114 | deceleration:deceleration | ||
115 | }); | ||
116 | var currentSelected = undefined; | ||
117 | |||
118 | /* 渲染模板 */ | ||
119 | var params = undefined, | ||
120 | checkType = undefined, | ||
121 | type = undefined, | ||
122 | isShowTemprature = undefined, //是否显示验收温度 1 显示 0 隐藏 | ||
123 | isPsList = undefined; // 验收单类型 | ||
124 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
125 | |||
126 | var utils = new Utils(); | ||
127 | utils.appendModule('#list_tpl'); | ||
128 | |||
129 | var nullDataHtml = '<div class="mui-pull-bottom-tips"><div class="mui-pull-bottom-wrapper">'+ | ||
130 | '<span class="mui-pull-loading">暂无数据</span></div></div>' | ||
131 | var page = 1, totalPage = undefined, pageSize = 15, isMore = true, query = {}; | ||
132 | var _url = '/a/exam/detail', // 分页接口 | ||
133 | checkUrl = '/a/checkacceptdetail/checkList'; | ||
134 | url = '/a/checkaccept/detail', | ||
135 | pageLeft = 1, | ||
136 | pageRight = 1, | ||
137 | totalPageLeft = undefined, | ||
138 | totalPageRight = undefined, | ||
139 | isMore = true, | ||
140 | distributeCode = undefined, | ||
141 | status = undefined; | ||
142 | |||
143 | function template(selected, data, insertType){ | ||
144 | utils.innerTplHtml('list_tpl_view', selected , data, insertType); | ||
145 | } | ||
146 | |||
147 | |||
148 | // /* | ||
149 | // 获取列表数据 | ||
150 | // * */ | ||
151 | // function genData(url,postData,selected){ | ||
152 | // mui.ajaxRequest(url,{ | ||
153 | // type: 'post', | ||
154 | // data: postData, | ||
155 | // showWaiting: true, | ||
156 | // success: function(data){ | ||
157 | // plus.nativeUI.closeWaiting(); | ||
158 | // if(data.code === 200){ | ||
159 | // detailData = { | ||
160 | // unVerfiyList: { list: [] }, | ||
161 | // verifyList: { list: [] } | ||
162 | // } | ||
163 | // isShowTemprature = data.data.isShowTemprature; | ||
164 | // detailData.unVerfiyList.list = data.data.unVerfiyList && data.data.unVerfiyList.length ? data.data.unVerfiyList: []; | ||
165 | // detailData.unVerfiyList.acceptance = true; | ||
166 | // detailData.unVerfiyList.checkType = checkType; | ||
167 | // detailData.unVerfiyList.isShowTemprature = data.data.isShowTemprature; | ||
168 | // detailData.verifyList.list = data.data.verifyList && data.data.verifyList.length ? data.data.verifyList: [] ; | ||
169 | // detailData.verifyList.acceptance = false; | ||
170 | // detailData.verifyList.isShowTemprature = data.data.isShowTemprature; | ||
171 | // showData(detailData,selected) | ||
172 | // }else{ | ||
173 | // mui.alert(data.msg) | ||
174 | // } | ||
175 | // }, | ||
176 | // error: function(xhr,type,errorThrown){ | ||
177 | // console.log(xhr.responseText) | ||
178 | // } | ||
179 | // }); | ||
180 | // } | ||
181 | // | ||
182 | // /* | ||
183 | // 展示数据 | ||
184 | // * */ | ||
185 | // function showData(data,selected){ | ||
186 | // var batchAccetpance = document.querySelector('.batchAccetpance'); | ||
187 | // var acceptanceTab1 = document.querySelector('.mui-tab1'); | ||
188 | // var acceptanceTab2 = document.querySelector('.mui-tab2'); | ||
189 | // var html1 = undefined, html2 = undefined; | ||
190 | // batchAccetpance.style.display = selected === 'left'? 'block': 'none'; | ||
191 | // if(data.unVerfiyList.list.length === 0){ | ||
192 | // html1 = nullDataHtml; | ||
193 | // }else{ | ||
194 | // mui.each(data.unVerfiyList.list,function(index,item){ | ||
195 | // item.editable = (params.accepttype === '101' || params.accepttype === '102' || params.accepttype === '103'|| params.accepttype === '104' ) ? true: false; | ||
196 | // item.showEditBtn = item.editable; | ||
197 | // }); | ||
198 | // html1 = template('list_tpl_view',data.unVerfiyList); | ||
199 | // } | ||
200 | // acceptanceTab1.innerHTML = html1; | ||
201 | // if(data.verifyList.list.length === 0){ | ||
202 | // html2 = nullDataHtml | ||
203 | // }else{ | ||
204 | // html2 = template('list_tpl_view',data.verifyList); | ||
205 | // } | ||
206 | // acceptanceTab2.innerHTML = html2; | ||
207 | // } | ||
208 | // | ||
209 | |||
210 | |||
211 | $.plusReady(function(){ | ||
212 | let globalQuery = {}; | ||
213 | window.addEventListener('pagefresh',function(event){ | ||
214 | console.log('从详情回来') | ||
215 | console.log(JSON.stringify(event.detail)) | ||
216 | query = event.detail.query; | ||
217 | console.log(typeof event.detail.selectTabs); | ||
218 | let index = event.detail.selectTabs === '1' ? 0 : 1; | ||
219 | console.log(index,'index') | ||
220 | if(index === 1){ | ||
221 | mui('#slider').slider().gotoItem(1); | ||
222 | } | ||
223 | setTimeout(function(){ | ||
224 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
225 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
226 | },200) | ||
227 | }); | ||
228 | |||
229 | // 触发刷新 搜索页面搜的值 | ||
230 | window.addEventListener('sub_search',function(event){ | ||
231 | console.log('从搜索页面回来') | ||
232 | console.log(JSON.stringify(event.detail) ); | ||
233 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
234 | console.log(typeof event.detail.selectTabs) | ||
235 | let index = event.detail.selectTabs === 1 ? 0 : 1; | ||
236 | $$('.mui-input-clear').val(query.hisDrugName); | ||
237 | $$('.mui-placeholder').hide(); | ||
238 | |||
239 | setTimeout(function(){ | ||
240 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
241 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
242 | },300) | ||
243 | console.log('刷新了') | ||
244 | }) | ||
245 | |||
246 | if(plus.storage.getItem('currDept')){ | ||
247 | type = JSON.parse(plus.storage.getItem('currDept')).deptType; | ||
248 | switch(type){ | ||
249 | case '3': | ||
250 | checkType = 1; // 药库 | ||
251 | break; | ||
252 | case '4': | ||
253 | checkType = 2; // 药房 | ||
254 | break; | ||
255 | case '5': | ||
256 | checkType = 3; // 基数药 | ||
257 | break; | ||
258 | default: | ||
259 | break; | ||
260 | } | ||
261 | } | ||
262 | |||
263 | var isUsual = undefined; | ||
264 | |||
265 | var self = plus.webview.currentWebview(); | ||
266 | params = JSON.parse(self.params);//获得参数 | ||
267 | console.log(self.params) | ||
268 | distributeCode = params.distributecode; | ||
269 | isUsual = params.isusual; | ||
270 | // 判断是否是配送单 | ||
271 | isPsList = (params.accepttype === '101' || params.accepttype === '102' || params.accepttype === '103' ||params.accepttype === '104' ) ? true: false; | ||
272 | console.log(isPsList) | ||
273 | currentSelected = params.currentSelected; // 当前选中tabs | ||
274 | console.log(currentSelected) | ||
275 | status = currentSelected === 'left'? '1': '2'; | ||
276 | auditStatus = currentSelected === 'left'? '1': '2'; | ||
277 | selectTabs = currentSelected === 'left'? 1: 2; | ||
278 | console.log('selectTabs') | ||
279 | console.log(selectTabs) | ||
280 | if(currentSelected === 'left'){ | ||
281 | $$('.batchAccetpance').show(); | ||
282 | }else{ | ||
283 | $$('.batchAccetpance').hide(); | ||
284 | } | ||
285 | |||
286 | var checkUrl = '/a/checkacceptdetail/basemedic'; | ||
287 | var url = '/a/checkaccept/detail'; | ||
288 | |||
289 | var item2 = document.querySelector('#item2mobile'); | ||
290 | var item1 = document.querySelector('#item1mobile'); | ||
291 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
292 | $$('.mui-input-clear').val(''); | ||
293 | let index = e.detail.slideNumber; | ||
294 | if (index === 1) { | ||
295 | status = '2'; | ||
296 | selected = '.mui-tab2'; | ||
297 | selectTabs = 2; | ||
298 | mui('#slider').slider().gotoItem(1); | ||
299 | $$('.batchAccetpance').hide(); | ||
300 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
301 | if (!item2.querySelector('.am-card')) { | ||
302 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
303 | } | ||
304 | } | ||
305 | if(index === 0){ | ||
306 | status = '1'; | ||
307 | selected = '.mui-tab1'; | ||
308 | selectTabs = 1; | ||
309 | $$('.batchAccetpance').show(); | ||
310 | mui('#slider').slider().gotoItem(0); | ||
311 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
312 | if (!item1.querySelector('.am-card')) { | ||
313 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
314 | } | ||
315 | } | ||
316 | }); | ||
317 | |||
318 | |||
319 | //循环初始化所有下拉刷新,上拉加载。 | ||
320 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
321 | $(pullRefreshEl).pullToRefresh({ | ||
322 | down: { | ||
323 | style:'circle', | ||
324 | contentdown : "下拉可以刷新", | ||
325 | contentover : "释放立即刷新", | ||
326 | contentrefresh : "正在刷新...", | ||
327 | callback: pulldownRefresh | ||
328 | }, | ||
329 | up: { | ||
330 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
331 | contentnomore:'没有更多数据', | ||
332 | callback: pullupRefresh | ||
333 | } | ||
334 | }); | ||
335 | }); | ||
336 | // 第一个tab 默认加载一次数据 | ||
337 | mui(".mui-scroll").pullToRefresh()[ selectTabs -1 ].pullDownLoading(); | ||
338 | |||
339 | //下拉刷新 | ||
340 | function pulldownRefresh(){ | ||
341 | console.log('下拉') | ||
342 | var self = this; | ||
343 | pageLeft = 1; pageRight = 1; | ||
344 | status = selectTabs === 1 ? '1': '2'; | ||
345 | var postData = { | ||
346 | distributeCode: distributeCode, | ||
347 | status:status, | ||
348 | pageNo: 1, | ||
349 | pageSize: pageSize | ||
350 | }; | ||
351 | if(query.hisDrugCode){ | ||
352 | postData.hisDrugCode = query.hisDrugCode | ||
353 | $$('.mui-input-clear').val(query.hisDrugName); | ||
354 | }else{ | ||
355 | globalQuery={} | ||
356 | $$('.mui-input-clear').val(''); | ||
357 | $$('.mui-placeholder').show(); | ||
358 | } | ||
359 | query = {}; | ||
360 | console.log(JSON.stringify(postData)) | ||
361 | mui.ajaxRequest(_url,{ | ||
362 | type: 'POST', | ||
363 | data: postData, | ||
364 | success: function(data){ | ||
365 | console.log( '*************************' ) | ||
366 | var resData = data.data; | ||
367 | resData.acceptance = selectTabs === 1 ? true: false; | ||
368 | resData.checkType = checkType; | ||
369 | totalPage = data.totalPage; | ||
370 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
371 | var i = selectTabs === 1 ? 0 : 1; | ||
372 | isMore = false; | ||
373 | self.endPullDownToRefresh(true); | ||
374 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
375 | }else{ | ||
376 | isMore = true; | ||
377 | self.endPullDownToRefresh(false); | ||
378 | self.refresh(true); | ||
379 | } | ||
380 | return template(selected,resData, false) | ||
381 | }, | ||
382 | error: function(xhr,type,errorThrown){ | ||
383 | console.log(xhr.responseText) | ||
384 | } | ||
385 | }); | ||
386 | } | ||
387 | |||
388 | //上拉加载更多 | ||
389 | function pullupRefresh(){ | ||
390 | console.log('下拉') | ||
391 | var self = this; | ||
392 | console.log(isMore,'isMore') | ||
393 | if(isMore){ | ||
394 | page++; | ||
395 | mui.ajaxRequest(_url,{ | ||
396 | type: 'POST', | ||
397 | data:{ | ||
398 | distributeCode: distributeCode, | ||
399 | status:status, | ||
400 | pageNo: page, | ||
401 | pageSize: pageSize | ||
402 | }, | ||
403 | success: function(data){ | ||
404 | var resData = data.data; | ||
405 | // resData.acceptance = selectTabs === 1 && checkType === 1 ? true: false; | ||
406 | resData.acceptance = status === '1'? true: false; | ||
407 | resData.checkType = checkType; | ||
408 | if(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
409 | var i = selectTabs === 1 ? 0 : 1; | ||
410 | isMore = false; | ||
411 | self.endPullUpToRefresh(true); | ||
412 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
413 | }else{ | ||
414 | isMore = true; | ||
415 | self.endPullUpToRefresh(false); | ||
416 | self.refresh(true); | ||
417 | } | ||
418 | return template(selected, resData, true) | ||
419 | |||
420 | }, | ||
421 | error: function(xhr,type,errorThrown){ | ||
422 | console.log(xhr.responseText) | ||
423 | } | ||
424 | }); | ||
425 | }else{ | ||
426 | var i = selectTabs === 1 ? 0 : 1; | ||
427 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
428 | self.endPullUpToRefresh(true); | ||
429 | } | ||
430 | } | ||
431 | |||
432 | //绑定点击事件 - 进入详情页 | ||
433 | $('#slider').on('tap','.moreDetail',function(){ | ||
434 | let id = this.dataset.id; | ||
435 | let newData = {}; | ||
436 | newData.checkType = checkType; // 药房,药库,基数药 区分 | ||
437 | hasAcceptance = selectTabs === 1 ? true: false; | ||
438 | newData.distributeCode = distributeCode; | ||
439 | newData.isShowTemprature = isShowTemprature; | ||
440 | newData.hasAcceptance = hasAcceptance;// 判断 详情页面是否有验收按钮 | ||
441 | newData.status = status; | ||
442 | newData.id = id; | ||
443 | newData.selectTabs = selectTabs; | ||
444 | newData.isPsList = isPsList; // 是否是配送单 | ||
445 | newData.query = globalQuery; | ||
446 | console.log(JSON.stringify(newData)) | ||
447 | document.activeElement.blur(); // 隐藏软键盘 | ||
448 | common.openwin('acc_detail',{ details: JSON.stringify(newData) },{ | ||
449 | titleText: '验收详情' | ||
450 | }) | ||
451 | }); | ||
452 | |||
453 | /* 批量验收 */ | ||
454 | $('.mui-bar').on('tap','.batchAccetpance',function(){ | ||
455 | var paramsData = {}; | ||
456 | paramsData.isPsList = isPsList; | ||
457 | paramsData.distributeCode = distributeCode; | ||
458 | paramsData.status = '1'; | ||
459 | paramsData.isShowTemprature = isShowTemprature; | ||
460 | paramsData.itemData = params; | ||
461 | paramsData.checkType = checkType; | ||
462 | paramsData.acceptance = true; | ||
463 | console.log(JSON.stringify(paramsData)); | ||
464 | common.openwin('basic_acc_batch',{ params: JSON.stringify(paramsData) },{ | ||
465 | titleText: '药品信息' | ||
466 | }) | ||
467 | // common.openwin('acc_batch',{ params: JSON.stringify(paramsData) },false) | ||
468 | }) | ||
469 | |||
470 | // 绑定事件 --确认验收 | ||
471 | $('#slider').on('tap','.acceptance',function(){ | ||
472 | document.activeElement.blur(); // 隐藏软键盘 | ||
473 | let postData = {}, detailList = [], submitData = {}; | ||
474 | postData.id = this.dataset.id; | ||
475 | detailList.push(postData); | ||
476 | submitData.detailList = detailList; | ||
477 | submitData.distributeCode = distributeCode; | ||
478 | console.log(submitData); | ||
479 | var btnArray = ['否', '是']; | ||
480 | mui.confirm('是否确认验收?', '确认', btnArray, function(e) { | ||
481 | if (e.index == 1) { | ||
482 | mui.ajaxRequest(checkUrl,{ | ||
483 | type: 'POST', | ||
484 | data: submitData, | ||
485 | showWaiting: true, | ||
486 | contentType: "application/json", | ||
487 | success: function(data){ | ||
488 | if(data.code === 200){ | ||
489 | mui.toast('验收成功'); | ||
490 | mui(".mui-scroll").pullToRefresh()[ selectTabs -1 ].pullDownLoading(); | ||
491 | } | ||
492 | }, | ||
493 | error: function(xhr,type,errorThrown){ | ||
494 | console.log(xhr.responseText) | ||
495 | } | ||
496 | }) | ||
497 | } | ||
498 | },'div') | ||
499 | }); | ||
500 | }); | ||
501 | })(mui,jQuery); | ||
502 | </script> | ||
503 | </body> | ||
504 | |||
505 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/basic_has_acc.html
0 → 100644
1 | <!--验收列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="acc_list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | </header> | ||
22 | <div class="mui-content"> | ||
23 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
24 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家" > | ||
25 | </div> | ||
26 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
27 | <div class="home-card-title">已验收</div> | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;"> | ||
30 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
31 | <div class="mui-slider-group"> | ||
32 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
33 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
34 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
35 | <ul class="mui-table-view"> | ||
36 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
37 | |||
38 | </li> | ||
39 | </ul> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | |||
47 | <script src="../../js/mui.min.js"></script> | ||
48 | <script src="../../js/jquery.min.js" ></script> | ||
49 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
50 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
51 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
52 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
53 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
54 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script type="text/javascript"> | ||
56 | if(window.plus) { | ||
57 | plusready(); | ||
58 | } else { | ||
59 | document.addEventListener('plusready', plusready, false); | ||
60 | } | ||
61 | function plusready() { | ||
62 | plus.key.addEventListener('backbutton',function(){ | ||
63 | plus.webview.currentWebview().close(); | ||
64 | }) | ||
65 | } | ||
66 | //去搜索页面 | ||
67 | function toSearchPage (){ | ||
68 | document.activeElement.blur(); // 隐藏软键盘 | ||
69 | var params = {}; | ||
70 | params.id = 'basic_has_acc'; | ||
71 | params.route = '../basicMedicine/basic_has_acc'; | ||
72 | params.auditStatus = '2'; // 都是已验收单据 | ||
73 | params.selectTabs = 2; | ||
74 | params.selected = 'right'; | ||
75 | params.module = 'basicMedicine'; | ||
76 | params.location = 'sub_list'; | ||
77 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
78 | } | ||
79 | |||
80 | (function($,$JQ) { | ||
81 | |||
82 | $.init({ | ||
83 | beforeback: function() { | ||
84 | var list = plus.webview.currentWebview().opener(); | ||
85 | mui.fire(list, 'pagefresh',{ hasAcceptance: true }); // 参数判断是某一个Tabs 右侧tabs 刷寻右侧列表 | ||
86 | return true; | ||
87 | } | ||
88 | }) | ||
89 | var deceleration = mui.os.ios?0.003:0.0009; | ||
90 | $('.mui-scroll-wrapper').scroll({ | ||
91 | scrollX: false, | ||
92 | bounce: true, | ||
93 | indicators: true, //是否显示滚动条 | ||
94 | deceleration:deceleration | ||
95 | }); | ||
96 | /* 渲染模板 */ | ||
97 | var params = undefined, | ||
98 | checkType = undefined, | ||
99 | type = undefined, | ||
100 | isShowTemprature = undefined, //是否显示验收温度 1 显示 0 隐藏 | ||
101 | isPsList = undefined; // 验收单类型 | ||
102 | |||
103 | var utils = new Utils(); | ||
104 | utils.appendModule('#acc_list_tpl'); | ||
105 | |||
106 | $('.mui-scroll-wrapper').scroll({ | ||
107 | bounce: true, | ||
108 | indicators: true, //是否显示滚动条 | ||
109 | deceleration:deceleration | ||
110 | }); | ||
111 | |||
112 | var page = 1, | ||
113 | totalPage = undefined, | ||
114 | pageSize = 15, | ||
115 | isMore = true, | ||
116 | query = {}; | ||
117 | var _url = '/a/exam/detail'; // 分页接口 | ||
118 | var distributeCode = undefined , status = '2'; | ||
119 | |||
120 | function template(data, insertType){ | ||
121 | utils.innerTplHtml('list_tpl_view','.mui-tab1', data, insertType); | ||
122 | } | ||
123 | /* | ||
124 | 下拉刷新 | ||
125 | * */ | ||
126 | function pulldownRefresh(){ | ||
127 | var self = this; | ||
128 | page = 1; | ||
129 | var postData = { | ||
130 | distributeCode: distributeCode, | ||
131 | status,status, | ||
132 | pageNo: page, | ||
133 | pageSize: pageSize | ||
134 | }; | ||
135 | if(query.hisDrugCode){ | ||
136 | postData.hisDrugCode = query.hisDrugCode | ||
137 | }else{ | ||
138 | globalQuery={} | ||
139 | $JQ('.mui-input-clear').val(''); | ||
140 | $JQ('.mui-placeholder').show(); | ||
141 | } | ||
142 | query = {}; | ||
143 | mui.ajaxRequest(_url,{ | ||
144 | type: 'POST', | ||
145 | data: postData, | ||
146 | success: function(data){ | ||
147 | var resData = data.data; | ||
148 | resData.acceptance = false; | ||
149 | console.log(resData) | ||
150 | totalPage = data.totalPage; | ||
151 | if(resData.list.length === 0 ||resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
152 | isMore = false; | ||
153 | self.endPullDownToRefresh(true); | ||
154 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
155 | }else{ | ||
156 | isMore = true; | ||
157 | self.endPullDownToRefresh(false); | ||
158 | self.refresh(true); | ||
159 | } | ||
160 | return template(resData, false) | ||
161 | }, | ||
162 | error: function(xhr,type,errorThrown){ | ||
163 | console.log(xhr.responseText) | ||
164 | } | ||
165 | }); | ||
166 | } | ||
167 | |||
168 | |||
169 | /* | ||
170 | |||
171 | * 上拉加载更多 | ||
172 | * */ | ||
173 | function pullupRefresh(){ | ||
174 | var self = this; | ||
175 | console.log(isMore,'isMore') | ||
176 | if(isMore){ | ||
177 | page++; | ||
178 | mui.ajaxRequest(_url,{ | ||
179 | type: 'POST', | ||
180 | data:{ | ||
181 | distributeCode: distributeCode, | ||
182 | status,status, | ||
183 | pageNo: page, | ||
184 | pageSize: pageSize | ||
185 | }, | ||
186 | success: function(data){ | ||
187 | var resData = data.data; | ||
188 | resData.acceptance = false; | ||
189 | if(resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage){ | ||
190 | isMore = false; | ||
191 | self.endPullUpToRefresh(true); | ||
192 | document.querySelectorAll('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
193 | }else{ | ||
194 | isMore = true; | ||
195 | self.endPullUpToRefresh(false); | ||
196 | self.refresh(true); | ||
197 | } | ||
198 | return template(resData, true) | ||
199 | |||
200 | }, | ||
201 | error: function(xhr,type,errorThrown){ | ||
202 | console.log(xhr.responseText) | ||
203 | } | ||
204 | }); | ||
205 | }else{ | ||
206 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
207 | self.endPullUpToRefresh(true); | ||
208 | } | ||
209 | |||
210 | } | ||
211 | |||
212 | // 模板加载 | ||
213 | $.plusReady(function(){ | ||
214 | let globalQuery = {}; | ||
215 | window.addEventListener('pagefresh',function(e){ | ||
216 | console.log('从详情回来') | ||
217 | console.log(e.detail.query) | ||
218 | query = e.detail.query; | ||
219 | setTimeout(function(){ | ||
220 | console.log('刷新了啊啊啊啊 啊'); | ||
221 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
222 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
223 | },200) | ||
224 | }); | ||
225 | |||
226 | // 触发刷新 搜索页面搜的值 | ||
227 | window.addEventListener('sub_search',function(event){ | ||
228 | console.log('从搜索页面回来') | ||
229 | console.log(JSON.stringify(event.detail) ); | ||
230 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
231 | $JQ('.mui-input-clear').val(query.hisDrugName); | ||
232 | $JQ('.mui-placeholder').hide(); | ||
233 | setTimeout(function(){ | ||
234 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
235 | },200) | ||
236 | console.log('刷新了') | ||
237 | }) | ||
238 | |||
239 | var isUsual = undefined; | ||
240 | var self = plus.webview.currentWebview(); | ||
241 | params = JSON.parse(self.params);//获得参数 | ||
242 | console.log(JSON.stringify(params)) | ||
243 | distributeCode = params.distributecode; | ||
244 | isUsual = params.isusual; | ||
245 | //循环初始化所有下拉刷新,上拉加载。 | ||
246 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
247 | |||
248 | $(pullRefreshEl).pullToRefresh({ | ||
249 | down: { | ||
250 | style:'circle', | ||
251 | contentdown : "下拉可以刷新", | ||
252 | contentover : "释放立即刷新", | ||
253 | contentrefresh : "正在刷新...", | ||
254 | callback: pulldownRefresh | ||
255 | }, | ||
256 | up: { | ||
257 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
258 | contentnomore:'没有更多数据', | ||
259 | callback: pullupRefresh | ||
260 | } | ||
261 | }); | ||
262 | }); | ||
263 | // 第一个tab 默认加载一次数据 | ||
264 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
265 | |||
266 | if(plus.storage.getItem('currDept')){ | ||
267 | checkType = '3'; | ||
268 | }else{ | ||
269 | mui.toast('请重新登陆'); | ||
270 | common.openwin('../login/index') | ||
271 | } | ||
272 | |||
273 | //绑定点击事件 - 进入详情页 | ||
274 | |||
275 | $('#slider').on('tap','.moreDetail',function(){ | ||
276 | let id = this.dataset.id; | ||
277 | let newData = {}; | ||
278 | newData.checkType = checkType; // 药房,药库,基数药 区分 | ||
279 | newData.distributeCode = distributeCode; | ||
280 | newData.isShowTemprature = isShowTemprature; | ||
281 | newData.hasAcceptance = false;// 判断 详情页面是否有验收按钮 | ||
282 | newData.status = status; | ||
283 | newData.id = id; | ||
284 | newData.isPsList = false; // 是否是配送单 | ||
285 | newData.query = globalQuery ; | ||
286 | console.log('newData',JSON.stringify(newData)) | ||
287 | console.log('query',JSON.stringify(globalQuery)) | ||
288 | console.log(JSON.stringify(Object.assign(newData,globalQuery))) | ||
289 | document.activeElement.blur(); // 隐藏软键盘 | ||
290 | common.openwin('acc_detail',{ details: JSON.stringify(newData) },{ | ||
291 | titleText: '验收详情' | ||
292 | }) | ||
293 | }); | ||
294 | }); | ||
295 | |||
296 | })(mui,jQuery); | ||
297 | |||
298 | </script> | ||
299 | </body> | ||
300 | |||
301 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/detail_tpl.html
0 → 100644
1 | <script type="text/html" id='detail_tpl'> | ||
2 | <div style="margin-top:10px;"> | ||
3 | {{ each list value i }} | ||
4 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
5 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
6 | <a class="mui-navigate-right" href="#">单据信息</a> | ||
7 | <div class="mui-collapse-content"> | ||
8 | <div class="mui-input-row"> | ||
9 | <label>配送/验收单</label> | ||
10 | <p class="detailRow_content">{{ distributeCode ? distributeCode: '' }}</p> | ||
11 | </div> | ||
12 | <div class="mui-input-row"> | ||
13 | <label>状态</label> | ||
14 | <p class="detailRow_content">{{ value.status ? value.status === 1 ? '待验收':'已验收': '' }}</p> | ||
15 | </div> | ||
16 | <div class="mui-input-row"> | ||
17 | <label>类型</label> | ||
18 | <p class="detailRow_content">{{ typeName ? typeName: '' }}</p> | ||
19 | </div> | ||
20 | </div> | ||
21 | </li> | ||
22 | </ul> | ||
23 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
24 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
25 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
26 | <div class="mui-collapse-content"> | ||
27 | <div class="mui-input-row"> | ||
28 | <label>通用名称</label> | ||
29 | <p class="detailRow_content">{{value.ctmmGenericName}}</p> | ||
30 | </div> | ||
31 | <div class="mui-input-row"> | ||
32 | <label>商品名</label> | ||
33 | <p class="detailRow_content">{{value.ctmmTradeName}}</p> | ||
34 | </div> | ||
35 | <div class="mui-input-row"> | ||
36 | <label>规格</label> | ||
37 | <p class="detailRow_content">{{value.ctmmSpecification}}</p> | ||
38 | </div> | ||
39 | <div class="mui-input-row"> | ||
40 | <label>剂型</label> | ||
41 | <p class="detailRow_content">{{value.ctmmDosageFormDesc}}</p> | ||
42 | </div> | ||
43 | <div class="mui-input-row"> | ||
44 | <label>生产厂家</label> | ||
45 | <p class="detailRow_content">{{value.ctmmManufacturerName}}</p> | ||
46 | </div> | ||
47 | <div class="mui-input-row"> | ||
48 | <label>批准文号</label> | ||
49 | <p class="detailRow_content">{{value.approvalNo}}</p> | ||
50 | </div> | ||
51 | <div class="mui-input-row"> | ||
52 | <label>包装规格</label> | ||
53 | <p class="detailRow_content">{{value.packageSpecification}}</p> | ||
54 | </div> | ||
55 | <div class="mui-input-row"> | ||
56 | <label>单位</label> | ||
57 | <p class="detailRow_content">{{value.unit}}</p> | ||
58 | </div> | ||
59 | <div class="mui-input-row"> | ||
60 | {{ if (accepttype === '101' || accepttype === '102' || accepttype === '103'|| accepttype === '104') && hasAcceptance && value.isUsual === 0 }} | ||
61 | <label class="font-warning">生产批号</label> | ||
62 | <input class="mui-input editInput BatchNo" value="{{ value.productBatchNo }}" /> | ||
63 | {{ else }} | ||
64 | <label>生产批号</label> | ||
65 | <p class="detailRow_content">{{value.productBatchNo}}</p> | ||
66 | {{ /if }} | ||
67 | </div> | ||
68 | <div class="mui-input-row"> | ||
69 | {{ if (accepttype === '101' || accepttype === '102' || accepttype === '103'|| accepttype === '104') && hasAcceptance && value.isUsual === 0 }} | ||
70 | <label class="font-warning">生产日期</label> | ||
71 | <input class="mui-input editInput realProductTime" type='date' value="{{ value.realProductTime }}" /> | ||
72 | {{ else }} | ||
73 | <label>生产日期</label> | ||
74 | <p class="detailRow_content">{{value.realProductTime}}</p> | ||
75 | {{ /if }} | ||
76 | |||
77 | </div> | ||
78 | <div class="mui-input-row"> | ||
79 | {{ if (accepttype === '101' || accepttype === '102' || accepttype === '103' || accepttype === '104') && hasAcceptance && value.isUsual === 0 }} | ||
80 | <label class="font-warning">有效期至</label> | ||
81 | <input class="mui-input editInput realValidEndDate" type='date' value="{{ value.realValidEndDate }}" /> | ||
82 | {{ else }} | ||
83 | <label>有效期至</label> | ||
84 | <p class="detailRow_content">{{value.realValidEndDate}}</p> | ||
85 | {{ /if }} | ||
86 | </div> | ||
87 | {{ if isShowTemprature === 1 }} | ||
88 | <div class="mui-input-row"> | ||
89 | {{ if (accepttype === '101' || accepttype === '102' || accepttype === '103'|| accepttype === '104') && hasAcceptance && value.isUsual === 0 }} | ||
90 | <label class="font-warning">验收温度(℃)</label> | ||
91 | <input class="mui-input editInput realAcceptanceTemperature" type='number' value="{{ value.realAcceptanceTemperature}}"/> | ||
92 | {{ else }} | ||
93 | <label>验收温度(℃)</label> | ||
94 | <p class="detailRow_content">{{value.realAcceptanceTemperature}}</p> | ||
95 | {{ /if }} | ||
96 | </div> | ||
97 | {{ /if }} | ||
98 | <div class="mui-input-row"> | ||
99 | <label>配送数量</label> | ||
100 | <p class="detailRow_content">{{value.realDeliveryQuantiry}}</p> | ||
101 | </div> | ||
102 | <div class="mui-input-row"> | ||
103 | {{ if (accepttype === '101' || accepttype === '102' || accepttype === '103' ||accepttype === '104') && hasAcceptance && value.isUsual === 0 }} | ||
104 | <label class="font-warning">实到数量</label> | ||
105 | <input class="mui-input editInput realReceiveQuantiry" type="number" pattern="[0-9]*" value="{{ value.realReceiveQuantiry ? value.realReceiveQuantiry: value.realDeliveryQuantiry }}" /> | ||
106 | {{ else }} | ||
107 | <label>实到数量</label> | ||
108 | <p class="detailRow_content">{{value.isUsual === 0 && value.realReceiveQuantiry ? value.realReceiveQuantiry: 0 }}</p> | ||
109 | {{ /if }} | ||
110 | </div> | ||
111 | <div class="mui-input-row"> | ||
112 | <label>供应商</label> | ||
113 | <p class="detailRow_content">{{value.supplierName}}</p> | ||
114 | </div> | ||
115 | </div> | ||
116 | </li> | ||
117 | </ul> | ||
118 | {{ /each }} | ||
119 | </div> | ||
120 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/index.html
0 → 100644
1 | <!--验收列表 - 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
10 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
11 | <link rel="import" href="../../tpl/acceptance_card.html " id="card_view"/> | ||
12 | </head> | ||
13 | <body> | ||
14 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
15 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
16 | <label class="mui-pull-right theme_back_font">返回</label> | ||
17 | </a> | ||
18 | <h1 class="mui-title themes_title">验收</h1> | ||
19 | <a href="#modal" class="mui-pull-right" style="height: 45px;padding-top: 12px;"> | ||
20 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
21 | <img src="../../assest/qrcode.png" width="24" height="24"/> | ||
22 | </div> | ||
23 | </a> | ||
24 | </header> | ||
25 | <div class="mui-content"> | ||
26 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
27 | <input type="search" class="mui-input-clear" value="" readonly="readonly" placeholder="供应商名称" > | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 102px;"> | ||
30 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
31 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待验收</a> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已验收</a> | ||
33 | </div> | ||
34 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
35 | <div class="mui-slider-group"> | ||
36 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
37 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
38 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
39 | <ul class="mui-table-view"> | ||
40 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
41 | </ul> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
46 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
47 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
48 | <ul class="mui-table-view"> | ||
49 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"></li> | ||
50 | </ul> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | <script src="../../js/mui.js"></script> | ||
58 | <script src="../../js/jquery.min.js" ></script> | ||
59 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
60 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
61 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
62 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
63 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
64 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
65 | |||
66 | <script type="text/javascript"> | ||
67 | |||
68 | |||
69 | function clicked(){ | ||
70 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码验收' }) | ||
71 | } | ||
72 | |||
73 | //去搜索页面 | ||
74 | function toSearchPage (){ | ||
75 | document.activeElement.blur(); // 隐藏软键盘 | ||
76 | var params = {}; | ||
77 | params.key = 'supplier'; | ||
78 | params.route = '../basicMedicine/index'; | ||
79 | params.module = 'basicMedicine'; | ||
80 | params.location = 'main_list' | ||
81 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
82 | } | ||
83 | |||
84 | |||
85 | (function($,$$) { | ||
86 | |||
87 | $.init({ | ||
88 | beforeback:function(){ | ||
89 | var list = plus.webview.currentWebview().opener(); | ||
90 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
91 | return true; | ||
92 | } | ||
93 | }); | ||
94 | |||
95 | var deceleration = mui.os.ios?0.003:0.0009; | ||
96 | $('.mui-scroll-wrapper').scroll({ | ||
97 | bounce: true, | ||
98 | indicators: true, //是否显示滚动条 | ||
99 | deceleration:deceleration | ||
100 | }); | ||
101 | var utils = new Utils(); | ||
102 | utils.appendModule('#card_view'); | ||
103 | |||
104 | /* 渲染模板 */ | ||
105 | var selected = '.mui-tab1', | ||
106 | hasChecked = false, | ||
107 | page = undefined, | ||
108 | pageSize = 15, | ||
109 | totalPage = undefined, | ||
110 | query = {}; | ||
111 | |||
112 | var checkType, type, auditStatus// 验收单类型 // 验收状态 1 待验收 2 已验收 | ||
113 | var requestUrl = '/a/checkaccept/basicMediclist'; // 请求地址 | ||
114 | |||
115 | var pageLeft = 1, | ||
116 | pageRight = 1, | ||
117 | totalPageLeft, | ||
118 | totalPageRight, | ||
119 | isMore = true, | ||
120 | selectTabs = 1; | ||
121 | |||
122 | function template(selected, data, insertType){ | ||
123 | utils.innerTplHtml('acceptance', selected, data, insertType); | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | 下拉刷新 | ||
128 | * */ | ||
129 | function pulldownRefresh(){ | ||
130 | var self = this; | ||
131 | if(selectTabs === 1){ | ||
132 | pageLeft = 1 | ||
133 | }else{ | ||
134 | pageRight = 1; | ||
135 | } | ||
136 | auditStatus = selectTabs === 1 ? '1': '3'; | ||
137 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
138 | var postData = { | ||
139 | auditStatus: auditStatus, | ||
140 | checkType: checkType, | ||
141 | pageNo: 1, | ||
142 | pageSize: pageSize | ||
143 | } | ||
144 | if(query.supplierCode){ | ||
145 | postData.supplierCodeList = [ query.supplierCode ]; | ||
146 | } | ||
147 | query = {}; | ||
148 | mui.ajaxRequest(requestUrl,{ | ||
149 | type: 'POST', | ||
150 | data: postData, | ||
151 | contentType: "application/json", | ||
152 | success: function(data){ | ||
153 | var resData = data.data; | ||
154 | var total = resData.totalPage; | ||
155 | if(selectTabs === 1){ | ||
156 | totalPageLeft = total; | ||
157 | }else{ | ||
158 | totalPageRight = total; | ||
159 | } | ||
160 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
161 | var i = selectTabs === 1 ? 0 : 1; | ||
162 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
163 | isMore = false; | ||
164 | self.endPullDownToRefresh(true); | ||
165 | }else{ | ||
166 | isMore = true; | ||
167 | self.endPullDownToRefresh(false); | ||
168 | self.refresh(true); | ||
169 | } | ||
170 | return template(selected,resData,false) | ||
171 | }, | ||
172 | error: function(xhr,type,errorThrown){ | ||
173 | console.log(xhr.responseText) | ||
174 | } | ||
175 | }); | ||
176 | } | ||
177 | /* | ||
178 | |||
179 | * 上拉加载更多 | ||
180 | * */ | ||
181 | function pullupRefresh(){ | ||
182 | var self = this; | ||
183 | if(isMore){ | ||
184 | if(selectTabs === 1){ | ||
185 | pageLeft ++ | ||
186 | }else{ | ||
187 | pageRight ++; | ||
188 | } | ||
189 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
190 | totalPage = selectTabs === 1 ? totalPageLeft: totalPageRight; | ||
191 | console.log(page); | ||
192 | console.log(totalPage) | ||
193 | auditStatus = selectTabs === 1 ? '1': '3'; | ||
194 | var postData = { | ||
195 | auditStatus: auditStatus, | ||
196 | checkType: checkType, | ||
197 | pageNo: page, | ||
198 | pageSize: pageSize | ||
199 | } | ||
200 | console.log(JSON.stringify(postData)) | ||
201 | if(page <= totalPage){ | ||
202 | mui.ajaxRequest(requestUrl,{ | ||
203 | type: 'POST', | ||
204 | data: postData, | ||
205 | contentType: "application/json", | ||
206 | success: function(data){ | ||
207 | var resData = data.data; | ||
208 | if(resData.pageNo === resData.totalPage){ | ||
209 | isMore = false; | ||
210 | self.endPullUpToRefresh(true); | ||
211 | }else{ | ||
212 | isMore = true; | ||
213 | self.endPullUpToRefresh(false); | ||
214 | self.refresh(true); | ||
215 | } | ||
216 | return template(selected,resData,true); | ||
217 | }, | ||
218 | error: function(xhr,type,errorThrown){ | ||
219 | console.log(xhr.responseText) | ||
220 | } | ||
221 | }); | ||
222 | } | ||
223 | }else{ | ||
224 | var i = selectTabs === 1 ? 0 : 1; | ||
225 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
226 | self.endPullUpToRefresh(true); | ||
227 | } | ||
228 | |||
229 | } | ||
230 | |||
231 | |||
232 | $.plusReady(function(){ | ||
233 | |||
234 | // 触发刷新 搜索页面搜的值 | ||
235 | window.addEventListener('search',function(event){ | ||
236 | console.log(JSON.stringify(event.detail)) | ||
237 | query.supplierCode = JSON.parse(event.detail.searchParams).supplierCode; | ||
238 | query.supplierName = JSON.parse(event.detail.searchParams).supplierName; | ||
239 | console.log(JSON.stringify(query),'query') | ||
240 | $$('.mui-placeholder').hide(); | ||
241 | $$('.mui-input-clear').val(query.supplierName); | ||
242 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
243 | }) | ||
244 | |||
245 | window.addEventListener('pagefresh',function(e){ | ||
246 | let index = e.detail.hasAcceptance ? 0: 1; | ||
247 | if(index === 1){ | ||
248 | mui('#slider').slider().gotoItem(1); | ||
249 | } | ||
250 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
251 | setTimeout(function(){ | ||
252 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
253 | },300) | ||
254 | }); | ||
255 | |||
256 | plus.key.addEventListener('backbutton',function(){ | ||
257 | plus.webview.currentWebview().close(); | ||
258 | }) | ||
259 | |||
260 | if(plus.storage.getItem('currDept')){ | ||
261 | checkType = '3'; | ||
262 | }else{ | ||
263 | mui.toast('请重新登陆'); | ||
264 | common.openwin('../login/index') | ||
265 | } | ||
266 | |||
267 | var item2 = document.querySelector('#item2mobile'); | ||
268 | var item1 = document.querySelector('#item1mobile'); | ||
269 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
270 | $$('.mui-input-clear').val(''); | ||
271 | let index = e.detail.slideNumber; | ||
272 | if (index === 1) { | ||
273 | selected = '.mui-tab2'; | ||
274 | selectTabs = 2; | ||
275 | mui('#slider').slider().gotoItem(1); | ||
276 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
277 | if (!item2.querySelector('.am-card')) { | ||
278 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
279 | } | ||
280 | } | ||
281 | if(index === 0){ | ||
282 | selected = '.mui-tab1'; | ||
283 | selectTabs = 1; | ||
284 | mui('#slider').slider().gotoItem(0); | ||
285 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
286 | if (!item1.querySelector('.am-card')) { | ||
287 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
288 | } | ||
289 | } | ||
290 | }); | ||
291 | //循环初始化所有下拉刷新,上拉加载。 | ||
292 | $.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) { | ||
293 | |||
294 | $(pullRefreshEl).pullToRefresh({ | ||
295 | down: { | ||
296 | style:'circle', | ||
297 | contentdown : "下拉可以刷新", | ||
298 | contentover : "释放立即刷新", | ||
299 | contentrefresh : "正在刷新...", | ||
300 | callback: pulldownRefresh | ||
301 | }, | ||
302 | up: { | ||
303 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
304 | contentnomore:'没有更多数据', | ||
305 | callback: pullupRefresh | ||
306 | } | ||
307 | }); | ||
308 | }); | ||
309 | // 第一个tab 默认加载一次数据 | ||
310 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
311 | |||
312 | //绑定点击事件 - 进入详情页 | ||
313 | |||
314 | $('#slider').on('tap','.am-card',function(){ | ||
315 | |||
316 | |||
317 | let itemData = this.dataset; | ||
318 | itemData.currentSelected = hasChecked ? 'right': 'left'; | ||
319 | console.log(JSON.stringify(itemData)) | ||
320 | document.activeElement.blur(); // 隐藏软键盘 | ||
321 | if(selectTabs===2){ | ||
322 | common.openwin('basic_has_acc',{ params: JSON.stringify(itemData) },false) | ||
323 | }else{ | ||
324 | common.openwin('basic_acc_list',{ params: JSON.stringify(itemData) },false) | ||
325 | } | ||
326 | }) | ||
327 | }); | ||
328 | |||
329 | })(mui,jQuery); | ||
330 | |||
331 | </script> | ||
332 | </body> | ||
333 | |||
334 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/basicMedicine/list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='list_tpl_view'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-id="{{ value.id }}" | ||
6 | data-isUsual="{{ value.isUsual }}" | ||
7 | data-drugCode="{{ value.drugCode }}" | ||
8 | data-parentId="{{ value.parentId }}" | ||
9 | > | ||
10 | <div class="am-card-header"> | ||
11 | <div class="am-card-header-content"> | ||
12 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
13 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
14 | </div> | ||
15 | <div class="am-card-header-extra"> | ||
16 | <span>{{ value.type }}</span> | ||
17 | </div> | ||
18 | </div> | ||
19 | <div class="am-card-body"> | ||
20 | <div class="am-flexbox am-flexbox-align-center"> | ||
21 | <div class="am-flexbox-item"> | ||
22 | 单位:<span>{{ value.unit }}</span> | ||
23 | </div> | ||
24 | <div class="am-flexbox-item"> | ||
25 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
26 | </div> | ||
27 | <div class="am-flexbox-item"> | ||
28 | 数量:<span>{{ value.realDeliveryQuantiry }}</span> | ||
29 | </div> | ||
30 | </div> | ||
31 | <div class="am-flexbox am-flexbox-align-center"> | ||
32 | <div class="am-flexbox-item"> | ||
33 | 实到数量:<span>{{ value.realReceiveQuantiry }}</span> | ||
34 | </div> | ||
35 | <div class="am-flexbox-item am-last-flexItem"> | ||
36 | 生产日期:<span>{{ value.realProductTime }}</span> | ||
37 | </div> | ||
38 | <div class="am-flexbox-item am-last-flexItem"> | ||
39 | 有效期至:<span>{{ value.realValidEndDate }}</span> | ||
40 | </div> | ||
41 | </div> | ||
42 | <div class="am-flexbox am-flexbox-align-center"> | ||
43 | <div class="am-flexbox-item"> | ||
44 | 批准文号:<span>{{ value.approvalNo }}</span> | ||
45 | </div> | ||
46 | <div class="am-flexbox-item"> | ||
47 | 指示货位:<span>{{ value.replanStoreName }}</span> | ||
48 | </div> | ||
49 | <div class="am-flexbox-item am-last-flexItem"> | ||
50 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
51 | </div> | ||
52 | |||
53 | </div> | ||
54 | </div> | ||
55 | <div class="am-card-footer"> | ||
56 | <div class="am-card-footer-content"></div> | ||
57 | <div class="am-card-footer-extra"> | ||
58 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined moreDetail" data-id="{{ value.id }}" data-index="{{ i }}" style="margin: 0 5px;">更多详情</button> | ||
59 | {{ if acceptance }} | ||
60 | <button type="button" class="mui-btn mui-btn-blue mui-btn-danger acceptance" data-id="{{ value.id }}" data-index="{{ i }}">确认验收</button> | ||
61 | {{ /if }} | ||
62 | |||
63 | </div> | ||
64 | </div> | ||
65 | </div> | ||
66 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
67 | </div> | ||
68 | {{/each}} | ||
69 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/check/checkDetails.html
0 → 100644
1 | <!--盘点详情 - 详情页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./detail_tpl.html" id="acc_detail_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link href="../../css/check.css" rel="stylesheet"/> | ||
13 | |||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | |||
18 | <!--<header class="mui-bar mui-bar-nav theme_back"> | ||
19 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> | ||
20 | <a class="mui-pull-left theme_back_font">返回</a> | ||
21 | <h1 class="mui-title">详情</h1> | ||
22 | </header>--> | ||
23 | |||
24 | <div class="mui-content detailRow"> | ||
25 | <!--<div class="detail-header-flex"> | ||
26 | <div class="am-action"> | ||
27 | <a class="mui-icon mui-icon-arrowleft"></a> | ||
28 | <a class="theme_back_font">上一个</a> | ||
29 | </div> | ||
30 | <div>1/12</div> | ||
31 | <div class="am-action"> | ||
32 | <a class="theme_next_font">下一个</a> | ||
33 | <a class="mui-icon mui-icon-arrowright"></a> | ||
34 | </div> | ||
35 | </div>--> | ||
36 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
37 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
38 | <li class="mui-table-view-cell mui-collapse"> | ||
39 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
40 | <div class="mui-collapse-content"> | ||
41 | |||
42 | </div> | ||
43 | </li> | ||
44 | </ul> | ||
45 | </form> | ||
46 | </div> | ||
47 | <script src="../../js/mui.min.js"></script> | ||
48 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
49 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
50 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
51 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
52 | <script type="text/javascript"> | ||
53 | |||
54 | |||
55 | (function($) { | ||
56 | |||
57 | $.init() | ||
58 | |||
59 | // 模板加载 | ||
60 | $.plusReady (function(){ | ||
61 | //console.log("当前页面URL:"+plus.webview.currentWebview().getURL()); | ||
62 | var self = plus.webview.currentWebview(); | ||
63 | var details = JSON.parse(self.details);//获得参数 | ||
64 | console.log(details,'details') | ||
65 | var data = {}, checkUrl = '/a/checkbill/submitCheck'; | ||
66 | data.list = []; | ||
67 | data.list.push(details); | ||
68 | if(details.checkDetailStatus === 1){ | ||
69 | var node = '<div id="List"></div><div id="addBtn"><button class="mui-btn mui-btn-block btn">+ 增加批号</button></div>'; | ||
70 | var acceptanceBtn = '<button type="button" id="checkBtn" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认提交</button>' | ||
71 | document.querySelector('#detailContent').insertAdjacentHTML('afterEnd',node); | ||
72 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",acceptanceBtn); | ||
73 | } | ||
74 | |||
75 | var utils = new Utils(); | ||
76 | utils.appendModule('#acc_detail_tpl'); | ||
77 | var html = template('detail_tpl', data); | ||
78 | document.getElementById('detailContent').innerHTML = html; | ||
79 | |||
80 | |||
81 | /* | ||
82 | *2 点击添加按钮 增加选填项 开始 | ||
83 | * | ||
84 | * 拖拽后显示操作图标,点击操作图标删除元素 | ||
85 | */ | ||
86 | var itemNum = 0; | ||
87 | |||
88 | |||
89 | function addSlideDelete() { | ||
90 | mui('.slide-main').off('tap', '.mui-btn').on('tap', '.mui-btn', function(event) { | ||
91 | var elem = this; | ||
92 | var li = elem.parentNode.parentNode; | ||
93 | var btnArray = ['确认', '取消']; | ||
94 | mui.confirm('确认删除该条记录?', '操作提醒', btnArray, function(e) { | ||
95 | if(e.index == 0) { | ||
96 | itemNum--; | ||
97 | li.parentNode.removeChild(li); | ||
98 | //if(orderList.length==orderListArray.length){ | ||
99 | var index = li.getAttribute('data-index'); | ||
100 | //获取该删除的子项的index | ||
101 | // orderList.splice(index, 1); | ||
102 | // orderListArray.splice(index, 1); | ||
103 | } else { | ||
104 | setTimeout(function() { | ||
105 | mui.swipeoutClose(li); | ||
106 | }, 0); | ||
107 | } | ||
108 | },'div'); | ||
109 | }); | ||
110 | } | ||
111 | if(details.checkDetailStatus === 1){ | ||
112 | mui("#addBtn").on('tap', '.mui-btn', function() { | ||
113 | var ParentDiv = document.createElement("div") | ||
114 | ParentDiv.className = "mui-table-view-cell slide-main"; | ||
115 | ParentDiv.setAttribute('data-index', itemNum); | ||
116 | ParentDiv.innerHTML = '<div class="mui-slider-handle">' + | ||
117 | '<div class="mui-input-group">' + | ||
118 | '<div class="mui-input-row">' + | ||
119 | '<label class="font-warning">生产批号</label>' + | ||
120 | '<input type="text" name="buycontent" class="mui-input-clear mui-input mui-input-ph" placeholder="请输入" >' + | ||
121 | '</div>' + | ||
122 | '<div class="mui-input-row">' + | ||
123 | '<label class="font-warning">数量</label>' + | ||
124 | '<input type="text" name="buycontent" class="mui-input-clear mui-input mui-input-num" placeholder="请输入" >' + | ||
125 | '</div>' + | ||
126 | '</div>' + | ||
127 | '</div>' + | ||
128 | '<div class="mui-slider-right mui-disabled">' + | ||
129 | '<a class="mui-btn mui-btn-red">删除</a>' + | ||
130 | '</div>'; | ||
131 | document.getElementById("List").appendChild(ParentDiv); | ||
132 | itemNum++; | ||
133 | addSlideDelete(); //添加侧滑删除 | ||
134 | }); | ||
135 | } | ||
136 | var accountStoreNumNode = document.querySelector('#accountStoreNum'); | ||
137 | var checkNumNode = document.querySelector('#checkNum');// 实际数量 | ||
138 | var accountNum = document.querySelector('#accountNum');// 账面库存 | ||
139 | var total = document.querySelector('#total'); | ||
140 | var referencePrice = document.querySelector('#referencePrice'); | ||
141 | accountStoreNumNode.onkeyup = function(e){ | ||
142 | console.log(e.target.value); | ||
143 | console.log(accountNum.innerHTML) | ||
144 | let amount = e.target.value - (accountNum.innerHTML * 1); | ||
145 | checkNumNode.innerHTML = amount; | ||
146 | total.innerHTML = (amount * (referencePrice.innerHTML *1)).toFixed(4); | ||
147 | |||
148 | } | ||
149 | mui('.detailRow').on('tap','#checkBtn',function(event){ | ||
150 | |||
151 | var phList = document.querySelector('#List').querySelectorAll('.mui-input-ph'); // 新增批号数据 | ||
152 | var numList = document.querySelector('#List').querySelectorAll('.mui-input-num'); // 批号对应的数值 | ||
153 | |||
154 | var practicalRepertory = document.querySelector('.practicalRepertory').value; | ||
155 | var realProductTime = document.querySelector('.realProductTime').value; | ||
156 | var practicalBatch = document.querySelector('.practicalBatch').value; | ||
157 | var validEndTime = document.querySelector('.validEndTime').value; | ||
158 | var currData = data.list[0]; | ||
159 | var postData = {}, detailList = [], submitData = {}; | ||
160 | |||
161 | postData.practicalRepertory = practicalRepertory; | ||
162 | postData.realProductTime = realProductTime; | ||
163 | postData.practicalBatch = practicalBatch; | ||
164 | postData.validEndTime = validEndTime; | ||
165 | postData.accountBatchNo = currData.accountBatchNo; | ||
166 | postData.accountEndTime = currData.accountEndTime; | ||
167 | postData.accountProductTime = currData.accountProductTime; | ||
168 | postData.accountStoreNum = currData.accountStoreNum; | ||
169 | postData.id = currData.id; | ||
170 | postData.pId = currData.pId; | ||
171 | detailList.push(postData); | ||
172 | if(phList.length){ | ||
173 | for (let i =0 ;i < phList.length; i++) { | ||
174 | let values = {}; | ||
175 | values.accountBatchNo = null; | ||
176 | values.accountEndTime = null; | ||
177 | values.accountProductTime = null; | ||
178 | values.accountStoreNum = 0; | ||
179 | values.id = null; | ||
180 | values.pId = currData.id; | ||
181 | values.practicalBatch = phList[i].value; | ||
182 | values.practicalRepertory = numList[i].value; | ||
183 | |||
184 | detailList.push(values); | ||
185 | } | ||
186 | } | ||
187 | console.log(detailList,'detailList') | ||
188 | mui.each(detailList,function(index,item){ | ||
189 | item.locCode = currData.locCode; | ||
190 | item.bigDrugCode = currData.bigDrugCode; | ||
191 | item.drugCode = currData.drugCode; | ||
192 | item.referencePrice = currData.referencePrice; | ||
193 | item.supplierCode = currData.supplierCode; | ||
194 | item.unitCode = currData.unitCode; | ||
195 | item.supplierCode = currData.supplierCode; | ||
196 | item.validEndTime = validEndTime; | ||
197 | }) | ||
198 | submitData.detailList = detailList; | ||
199 | submitData.checkBillNo = details.checkBillNo; | ||
200 | console.log(submitData); | ||
201 | document.activeElement.blur(); // 隐藏软键盘 | ||
202 | var btnArray = ['否', '是']; | ||
203 | mui.confirm('是否确认提交?','警告',btnArray,function(e){ | ||
204 | if (e.index == 1) { | ||
205 | mui.ajaxRequest(checkUrl,{ | ||
206 | type: 'POST', | ||
207 | data: submitData, | ||
208 | showWaiting: true, | ||
209 | contentType: "application/json", | ||
210 | success: function(data){ | ||
211 | if(data.code === 200){ | ||
212 | mui.toast('提交成功'); | ||
213 | var parmasData = {}; | ||
214 | parmasData.finishUrl = '../check/index'; | ||
215 | parmasData.keepUrl = 'checkList'; | ||
216 | parmasData.resultType = 'check'; | ||
217 | parmasData.itemData = details.orderInfo; | ||
218 | common.openwin('../result/index',{ parmas: JSON.stringify(parmasData) },{ | ||
219 | titleText: '结果', | ||
220 | autoBackButton: false | ||
221 | }) | ||
222 | } | ||
223 | }, | ||
224 | error: function(xhr,type,errorThrown){ | ||
225 | console.log(xhr) | ||
226 | } | ||
227 | }) | ||
228 | } | ||
229 | },'div') | ||
230 | |||
231 | }) | ||
232 | |||
233 | }); | ||
234 | |||
235 | })(mui); | ||
236 | |||
237 | |||
238 | |||
239 | |||
240 | </script> | ||
241 | </body> | ||
242 | |||
243 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/check/checkList.html
0 → 100644
1 | <!--盘点 - 列表页 药品信息 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | |||
5 | <head> | ||
6 | <meta charset="UTF-8"> | ||
7 | <title></title> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link rel="import" href="./list_tpl.html" id="card_view"/> | ||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <div class="main-content" style='padding-top: 44px;'> | ||
17 | |||
18 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
19 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
20 | <label class="mui-pull-right theme_back_font">返回</label> | ||
21 | </a> | ||
22 | <h1 class="mui-title themes_title">药品信息</h1> | ||
23 | <a href="#modal" class="mui-pull-right" style="height: 45px;padding-top: 12px;"> | ||
24 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
25 | <img src="../../assest/qrcode.png" width="24" height="24"/> | ||
26 | </div> | ||
27 | </a> | ||
28 | </header> | ||
29 | <!--<div class="mui-input-row mui-search search_head"> | ||
30 | <input type="search" class="mui-input-clear" placeholder="商品名/生产厂家/货位"> | ||
31 | </div>--> | ||
32 | <div id="refreshContainer" class="mui-scroll-wrapper" style="top: 44px;"> | ||
33 | <div class="mui-scroll"> | ||
34 | <ul class="mui-table-view"> | ||
35 | <li class="mui-table-view-cell mui-tab" style="padding: 0;"></li> | ||
36 | </ul> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | |||
41 | <script src="../../js/mui.js"></script> | ||
42 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
43 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
44 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
45 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
46 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
47 | <script src="../../js/qrcode.js" type="text/javascript" charset="utf-8"></script> | ||
48 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
49 | <script type="text/javascript"> | ||
50 | if(window.plus) { | ||
51 | plusready(); | ||
52 | } else { | ||
53 | document.addEventListener('plusready', plusready, false); | ||
54 | } | ||
55 | function plusready() { | ||
56 | plus.key.addEventListener('backbutton',function(){ | ||
57 | plus.webview.currentWebview().close(); | ||
58 | }) | ||
59 | } | ||
60 | |||
61 | /*获取二维码返回值*/ | ||
62 | function scaned(t, r, f) { | ||
63 | console.log(r);//返回二维码读取的数据 | ||
64 | } | ||
65 | |||
66 | function clicked(){ | ||
67 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫一扫' }) | ||
68 | } | ||
69 | |||
70 | (function($) { | ||
71 | $.init({ | ||
72 | beforeback: function() { | ||
73 | var list = plus.webview.currentWebview().opener(); | ||
74 | mui.fire(list, 'pagefresh'); | ||
75 | return true; | ||
76 | } | ||
77 | }) | ||
78 | var deceleration = mui.os.ios?0.003:0.0009; | ||
79 | $('.mui-scroll-wrapper').scroll({ | ||
80 | bounce: true, | ||
81 | indicators: true, //是否显示滚动条 | ||
82 | deceleration:deceleration | ||
83 | }); | ||
84 | |||
85 | var utils = new Utils(); | ||
86 | utils.appendModule('#card_view'); | ||
87 | |||
88 | var nullDataHtml = '<div class="mui-pull-bottom-tips"><div class="mui-pull-bottom-wrapper">'+ | ||
89 | '<span class="mui-pull-loading">暂无数据</span></div></div>' | ||
90 | |||
91 | var checkStatus, | ||
92 | detailData = { list: [] }, url = '/a/checkbilldetail/getListByBillNo'; | ||
93 | var page = 0, pageSize = 15, totalPage = 0, checkBillNo = null,isMore = false; | ||
94 | checkUrl = '/a/checkbill/submitCheck'; | ||
95 | begCheckUrl = '/a/checkbill/beginCheck';// 开始盘点接口 | ||
96 | /* 渲染模板 */ | ||
97 | function template(data, insertType){ | ||
98 | mui.each(data.list,function(index,item){ | ||
99 | item.checkStatus = checkStatus; | ||
100 | item.editable = item.checkDetailStatus === 1 ? true: false; | ||
101 | }); | ||
102 | utils.innerTplHtml('check_list_tpl', '.mui-tab', data, insertType); | ||
103 | } | ||
104 | |||
105 | function pullupRefresh(){ | ||
106 | var self = this; | ||
107 | if(isMore){ | ||
108 | page++; | ||
109 | var postData = { | ||
110 | pageNo: page, | ||
111 | pageSize: pageSize, | ||
112 | checkBillNo: checkBillNo, | ||
113 | } | ||
114 | mui.ajaxRequest(url,{ | ||
115 | type: 'POST', | ||
116 | data: postData, | ||
117 | contentType: 'application/json', | ||
118 | success: function(data){ | ||
119 | var resData = data.data; | ||
120 | totalPage = resData.totalPage; | ||
121 | if(resData.list.length < resData.pageSize){ | ||
122 | isMore = false; | ||
123 | self.endPullUpToRefresh(true); | ||
124 | }else{ | ||
125 | isMore = true; | ||
126 | self.endPullUpToRefresh(false); | ||
127 | } | ||
128 | detailData.list = detailData.list.concat(resData.list); | ||
129 | return template(resData,true) | ||
130 | }, | ||
131 | error: function(xhr,type,errorThrown){ | ||
132 | console.log(xhr.responseText) | ||
133 | } | ||
134 | }) | ||
135 | }else{ | ||
136 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
137 | self.endPullUpToRefresh(true); | ||
138 | } | ||
139 | } | ||
140 | |||
141 | |||
142 | function pulldownRefresh(){ | ||
143 | var self = this; | ||
144 | detailData.list = []; | ||
145 | page = 1; | ||
146 | var postData = { | ||
147 | pageNo: page, | ||
148 | pageSize: pageSize, | ||
149 | checkBillNo: checkBillNo | ||
150 | } | ||
151 | mui.ajaxRequest(url,{ | ||
152 | type: 'POST', | ||
153 | data: postData, | ||
154 | contentType: 'application/json', | ||
155 | success: function(data){ | ||
156 | var resData = data.data; | ||
157 | totalPage = resData.totalPage; | ||
158 | if(resData.list.length < resData.pageSize){ | ||
159 | isMore = false; | ||
160 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
161 | self.endPullDownToRefresh(true); | ||
162 | }else{ | ||
163 | isMore = true; | ||
164 | self.endPullDownToRefresh(); | ||
165 | } | ||
166 | detailData.list = resData.list; | ||
167 | self.refresh(true); | ||
168 | return template(resData,false) | ||
169 | }, | ||
170 | error: function(xhr,type,errorThrown){ | ||
171 | console.log(xhr.responseText) | ||
172 | } | ||
173 | }) | ||
174 | } | ||
175 | |||
176 | |||
177 | |||
178 | $.plusReady(function(){ | ||
179 | |||
180 | window.addEventListener('pagefresh',function(event){ | ||
181 | plus.nativeUI.showWaiting(); | ||
182 | setTimeout(function(){ | ||
183 | plus.nativeUI.closeWaiting(); | ||
184 | },500); | ||
185 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
186 | |||
187 | }) | ||
188 | |||
189 | var params, flag = false | ||
190 | var self = plus.webview.currentWebview(); | ||
191 | params = JSON.parse(self.params);//获得参数 | ||
192 | console.log(params) | ||
193 | checkBillNo = params.checkbillno; | ||
194 | checkStatus = params.checkStatus; | ||
195 | |||
196 | |||
197 | //循环初始化所有下拉刷新,上拉加载。 | ||
198 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
199 | $(pullRefreshEl).pullToRefresh({ | ||
200 | down: { | ||
201 | style:'circle', | ||
202 | contentdown : "下拉可以刷新", | ||
203 | contentover : "释放立即刷新", | ||
204 | contentrefresh : "正在刷新...", | ||
205 | callback: pulldownRefresh | ||
206 | }, | ||
207 | up: { | ||
208 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
209 | contentnomore:'没有更多数据', | ||
210 | callback: pullupRefresh | ||
211 | } | ||
212 | }); | ||
213 | }); | ||
214 | |||
215 | var btnArray = ['否', '是']; | ||
216 | if(params.checkstatus === '1'){ | ||
217 | var mask = mui.createMask(); | ||
218 | mask.show(); | ||
219 | mui.confirm('是否开始盘点?','药品信息',btnArray,function(e){ | ||
220 | if (e.index == 1) { | ||
221 | mask.close(); | ||
222 | mui.ajaxRequest(begCheckUrl,{ | ||
223 | type: 'POST', | ||
224 | data: { checkBillNo: checkBillNo }, | ||
225 | showWaiting: true, | ||
226 | success: function(data){ | ||
227 | if(data.code === 200){ | ||
228 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
229 | }else{ | ||
230 | mui.toast(data.msg,3) | ||
231 | } | ||
232 | }, | ||
233 | error: function(xhr,type,errorThrown){ | ||
234 | console.log(xhr.responseText) | ||
235 | } | ||
236 | }) | ||
237 | } else { | ||
238 | |||
239 | } | ||
240 | },'div') | ||
241 | }else{ | ||
242 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
243 | } | ||
244 | |||
245 | // 展开编辑 | ||
246 | $('.main-content').on('tap','.eidtRow',function(){ | ||
247 | this.innerHTML = this.innerHTML === '展开编辑' ? '收起编辑':'展开编辑'; | ||
248 | let index = Number(this.dataset.index); | ||
249 | var currCard = document.querySelectorAll('.am-card')[index]; | ||
250 | var editForm = currCard.querySelector('.editForm'); | ||
251 | editForm.style.display = editForm.style.display === 'block' ? 'none': 'block'; | ||
252 | editForm.nextElementSibling.style.display = editForm.nextElementSibling.style.display === 'none'? 'flex':'none'; | ||
253 | }); | ||
254 | //绑定点击事件 - 进入详情页 | ||
255 | |||
256 | $('.main-content').on('tap','.toPage',function(){ | ||
257 | let index = this.dataset.index; | ||
258 | let data = detailData.list[index]; | ||
259 | let newData = Object.assign({}, data, params); | ||
260 | newData.orderInfo = params; | ||
261 | console.log(JSON.stringify(newData)) | ||
262 | document.activeElement.blur(); | ||
263 | common.openwin('checkDetails',{ details: JSON.stringify(newData) },{ | ||
264 | titleText:'详情' | ||
265 | }) | ||
266 | }) | ||
267 | |||
268 | // 提交 | ||
269 | $('.main-content').on('tap','.submitButton',function(){ | ||
270 | document.activeElement.blur(); | ||
271 | var _this = this; | ||
272 | mui.confirm('确定要执行此操作吗?', '确认提交', btnArray, function(e) { | ||
273 | if (e.index == 1) { | ||
274 | var index = _this.dataset.index; | ||
275 | var _this_card = document.querySelectorAll('.am-card')[index]; | ||
276 | // 获取实际数据 | ||
277 | var practicalRepertory = _this_card.querySelector('.practicalRepertory').value; | ||
278 | var realProductTime = _this_card.querySelector('.realProductTime').value; | ||
279 | var practicalBatch = _this_card.querySelector('.practicalBatch').value; | ||
280 | var validEndTime = _this_card.querySelector('.validEndTime').value; | ||
281 | |||
282 | |||
283 | var currData = detailData.list[index]; | ||
284 | var postData = {}, detailList = [], submitData = {} | ||
285 | console.log(index) | ||
286 | postData.accountBatchNo = currData.accountBatchNo; | ||
287 | postData.accountEndTime = currData.accountEndTime; | ||
288 | postData.accountProductTime = currData.accountProductTime; | ||
289 | postData.accountStoreNum = currData.accountStoreNum; | ||
290 | postData.bigDrugCode = currData.bigDrugCode; | ||
291 | postData.drugCode = currData.drugCode; | ||
292 | postData.id = currData.id; | ||
293 | postData.locCode = currData.locCode; | ||
294 | postData.pId = currData.pId; | ||
295 | postData.practicalBatch = practicalBatch; | ||
296 | postData.practicalRepertory = practicalRepertory; | ||
297 | postData.realProductTime = realProductTime; | ||
298 | postData.referencePrice = currData.referencePrice; | ||
299 | postData.unitCode = currData.unitCode; | ||
300 | postData.validEndTime = validEndTime; | ||
301 | postData.supplierCode = currData.supplierCode; | ||
302 | |||
303 | |||
304 | detailList.push(postData); | ||
305 | submitData.detailList = detailList; | ||
306 | submitData.checkBillNo = checkBillNo; | ||
307 | console.log(submitData); | ||
308 | |||
309 | mui.ajaxRequest(checkUrl,{ | ||
310 | type: 'POST', | ||
311 | data: submitData, | ||
312 | showWaiting: true, | ||
313 | contentType: "application/json", | ||
314 | success: function(data){ | ||
315 | if(data.code === 200){ | ||
316 | mui.toast('提交成功'); | ||
317 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
318 | } | ||
319 | }, | ||
320 | error: function(xhr,type,errorThrown){ | ||
321 | console.log(xhr.responseText) | ||
322 | } | ||
323 | }) | ||
324 | } else { | ||
325 | |||
326 | } | ||
327 | },'div') | ||
328 | |||
329 | |||
330 | }) | ||
331 | |||
332 | }); | ||
333 | |||
334 | })(mui); | ||
335 | </script> | ||
336 | </body> | ||
337 | |||
338 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/check/detail_tpl.html
0 → 100644
1 | <script type="text/html" id='detail_tpl'> | ||
2 | <div style="margin-top:10px;"> | ||
3 | {{ each list value i }} | ||
4 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
5 | <li class="mui-table-view-cell mui-collapse"> | ||
6 | <a class="mui-navigate-right" href="#">单据信息</a> | ||
7 | <div class="mui-collapse-content"> | ||
8 | <div class="mui-input-row"> | ||
9 | <label>盘点单号</label> | ||
10 | <p class="detailRow_content">{{value.checkbillno ? value.checkbillno: '--'}}</p> | ||
11 | </div> | ||
12 | <div class="mui-input-row"> | ||
13 | <label>类型</label> | ||
14 | <p class="detailRow_content">{{value.checkbilltypename?value.checkbilltypename:'--'}}</p> | ||
15 | </div> | ||
16 | <div class="mui-input-row"> | ||
17 | <label>部门</label> | ||
18 | <p class="detailRow_content">{{value.checkbilldeptname?value.checkbilldeptname:'--'}}</p> | ||
19 | </div> | ||
20 | <div class="mui-input-row"> | ||
21 | <label>制单人</label> | ||
22 | <p class="detailRow_content">{{value.createusername ? value.createusername:'--'}}</p> | ||
23 | </div> | ||
24 | <div class="mui-input-row"> | ||
25 | <label>制单时间</label> | ||
26 | <p class="detailRow_content">{{value.createdate ? value.createdate:'--'}}</p> | ||
27 | </div> | ||
28 | <div class="mui-input-row"> | ||
29 | <label>盘点周期</label> | ||
30 | <p class="detailRow_content">{{value.distributionNo}}</p> | ||
31 | </div> | ||
32 | <div class="mui-input-row"> | ||
33 | <label>盘点人</label> | ||
34 | <p class="detailRow_content">{{value.sheveusername ? value.sheveusername: '--'}}</p> | ||
35 | </div> | ||
36 | <div class="mui-input-row"> | ||
37 | <label>提交时间</label> | ||
38 | <p class="detailRow_content">{{value.updatedate ? value.updatedate: '--'}}</p> | ||
39 | </div> | ||
40 | </div> | ||
41 | </li> | ||
42 | </ul> | ||
43 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
44 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
45 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
46 | <div class="mui-collapse-content"> | ||
47 | <div class="mui-input-row"> | ||
48 | <label>货位</label> | ||
49 | <p class="detailRow_content">{{ value.locName }}</p> | ||
50 | </div> | ||
51 | <div class="mui-input-row"> | ||
52 | <label>货位类型</label> | ||
53 | <p class="detailRow_content">{{ value.positionTypeName }}</p> | ||
54 | </div> | ||
55 | <div class="mui-input-row"> | ||
56 | <label>通用名</label> | ||
57 | <p class="detailRow_content">{{value.ctmmGenericName}}</p> | ||
58 | </div> | ||
59 | <div class="mui-input-row"> | ||
60 | <label>规格</label> | ||
61 | <p class="detailRow_content">{{value.ctmmSpecification}}</p> | ||
62 | </div> | ||
63 | <div class="mui-input-row"> | ||
64 | <label>生产厂家</label> | ||
65 | <p class="detailRow_content">{{value.ctmmManufacturerName}}</p> | ||
66 | </div> | ||
67 | <div class="mui-input-row"> | ||
68 | <label>包装规格</label> | ||
69 | <p class="detailRow_content">{{value.packageSpecification}}</p> | ||
70 | </div> | ||
71 | <div class="mui-input-row"> | ||
72 | <label>单位</label> | ||
73 | <p class="detailRow_content">{{value.unit}}</p> | ||
74 | </div> | ||
75 | <div class="mui-input-row"> | ||
76 | <label>账面库存</label> | ||
77 | <p class="detailRow_content" id="accountNum">{{value.accountStoreNum}}</p> | ||
78 | </div> | ||
79 | <div class="mui-input-row"> | ||
80 | {{ if value.checkDetailStatus === 1 }} | ||
81 | <label class="font-warning">实际数量</label> | ||
82 | <input pattern="[0-9]*" id="accountStoreNum" type="number" value="{{ value.accountStoreNum }}" placeholder="请输入" class="practicalRepertory flex-item-input" /> | ||
83 | {{ else }} | ||
84 | <label>实际数量</label> | ||
85 | <p class="detailRow_content">{{value.practicalRepertory}}</p> | ||
86 | {{ /if }} | ||
87 | |||
88 | </div> | ||
89 | <div class="mui-input-row"> | ||
90 | <label>盈亏数量</label> | ||
91 | <p class="detailRow_content" id="checkNum">{{value.checkNum}}</p> | ||
92 | </div> | ||
93 | <div class="mui-input-row"> | ||
94 | <label>账面批号</label> | ||
95 | <p class="detailRow_content">{{value.accountBatchNo}}</p> | ||
96 | </div> | ||
97 | <div class="mui-input-row"> | ||
98 | {{ if value.checkDetailStatus === 1 }} | ||
99 | <label class="font-warning">实际批号</label> | ||
100 | <input pattern="[0-9]*" type="number" value="{{ value.accountBatchNo }}" placeholder="请输入" class="practicalBatch flex-item-input" /> | ||
101 | {{ else }} | ||
102 | <label>实际批号</label> | ||
103 | <p class="detailRow_content">{{value.practicalBatch}}</p> | ||
104 | {{ /if }} | ||
105 | </div> | ||
106 | <div class="mui-input-row"> | ||
107 | <label>生产日期</label> | ||
108 | <p class="detailRow_content">{{value.accountProductTime}}</p> | ||
109 | </div> | ||
110 | <div class="mui-input-row"> | ||
111 | {{ if value.checkDetailStatus === 1 }} | ||
112 | <label class="font-warning">实际生产日期</label> | ||
113 | <input pattern="[0-9]*" type="date" value="{{ value.accountProductTime }}" placeholder="请输入" class="realProductTime flex-item-input" /> | ||
114 | {{ else }} | ||
115 | <label>实际生产日期</label> | ||
116 | <p class="detailRow_content">{{value.realProductTime}}</p> | ||
117 | {{ /if }} | ||
118 | </div> | ||
119 | <div class="mui-input-row"> | ||
120 | <label>有效期至</label> | ||
121 | <p class="detailRow_content">{{value.accountEndTime}}</p> | ||
122 | </div> | ||
123 | <div class="mui-input-row"> | ||
124 | {{ if value.checkDetailStatus === 1 }} | ||
125 | <label class="font-warning">实际有效期至</label> | ||
126 | <input pattern="[0-9]*" type="date" value="{{ value.accountEndTime }}" placeholder="请输入" class="validEndTime flex-item-input"/> | ||
127 | {{ else }} | ||
128 | <label>实际有效期至</label> | ||
129 | <p class="detailRow_content">{{value.validEndTime}}</p> | ||
130 | {{ /if }} | ||
131 | </div> | ||
132 | <div class="mui-input-row"> | ||
133 | <label>单价</label> | ||
134 | <p class="detailRow_content" id="referencePrice">{{ value.referencePrice }}</p> | ||
135 | </div> | ||
136 | <div class="mui-input-row"> | ||
137 | <label>盈亏金额</label> | ||
138 | <p class="detailRow_content" id="total">{{ (value.referencePrice*value.checkNum).toFixed(4) }}</p> | ||
139 | </div> | ||
140 | </div> | ||
141 | </li> | ||
142 | </ul> | ||
143 | {{ /each }} | ||
144 | </div> | ||
145 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/check/index.html
0 → 100644
1 | <!--盘点 - 列表页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <meta name="apple-mobile-web-app-capable" content="yes"> | ||
9 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
10 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
11 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
12 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
13 | <link rel="stylesheet" href="../../css/mui.picker.min.css" /> | ||
14 | <link href="../../css/check.css" rel="stylesheet" /> | ||
15 | <link rel="import" href="../../tpl/check_card.html" id="card_view"/> | ||
16 | </head> | ||
17 | |||
18 | <body> | ||
19 | |||
20 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
21 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
22 | <label class="mui-pull-right theme_back_font">返回</label> | ||
23 | </a> | ||
24 | <h1 class="mui-title themes_title">盘点</h1> | ||
25 | <a href="#modal" id='showModal' class="mui-pull-right" style="height: 45px;padding-top: 12px;">新建盘点</a> | ||
26 | </header> | ||
27 | <div class="mui-content"> | ||
28 | <h4 class="title_h3">盘点记录</h4> | ||
29 | |||
30 | <div id="check_scroll1" class="mui-scroll-wrapper"> | ||
31 | <div class="mui-scroll" id='scroll'> | ||
32 | <ul class="mui-table-view"> | ||
33 | <li class="mui-table-view-cell mui-tab" style="padding: 0;"></li> | ||
34 | </ul> | ||
35 | </div> | ||
36 | </div> | ||
37 | <div id="modal1" class="mui-modal"> | ||
38 | <header class="mui-bar mui-bar-nav"> | ||
39 | <a class="mui-icon mui-icon-close mui-pull-right closeBtn" href="#modal1"></a> | ||
40 | <h1 class="mui-title">新建盘点</h1> | ||
41 | </header> | ||
42 | <div class="mui-content" style="height: 100%;padding-top: 12px;"> | ||
43 | <form id='radioForm' style="padding: 0 12px;"> | ||
44 | <div class="gird mui-table-view-radio" id="checkBillType"> | ||
45 | <div class="gird-label">盘点类型:</div> | ||
46 | <div class="mui-input-row mui-radio mui-left"> | ||
47 | <label for="mingpan">明盘</label> | ||
48 | <input name="radio1" id="mingpan" type="radio" value='1' class="radio"> | ||
49 | </div> | ||
50 | <div class="mui-input-row mui-radio mui-left"> | ||
51 | <label for="anpai">暗盘</label> | ||
52 | <input name="radio1" id="anpan" type="radio" value='2' class="radio"> | ||
53 | </div> | ||
54 | </div> | ||
55 | <div class="gird mui-table-view-radio" id="checkBillSubType"> | ||
56 | <div class="gird-label"></div> | ||
57 | <div class="mui-input-row mui-radio mui-left"> | ||
58 | <label for="allpan">全盘</label> | ||
59 | <input name="radio2" id="allpan" type="radio" value='1' class="radio2"> | ||
60 | </div> | ||
61 | <div class="mui-input-row mui-radio mui-left"> | ||
62 | <label for="dongpan">动盘</label> | ||
63 | <input name="radio2" id="dongpan" type="radio" value='2' class="radio2"> | ||
64 | </div> | ||
65 | <div class="mui-input-row mui-radio mui-left addDate"> | ||
66 | <label for="dongxiaopan">动销盘</label> | ||
67 | <input name="radio2" id="dongxiaopan" type="radio" value='3' class="radio2"> | ||
68 | </div> | ||
69 | </div> | ||
70 | <div style="background-color: #f5f5f9; height: 6px;" id="checkBill"></div> | ||
71 | <div class="mui-input-row dateRow" style="display: none;"> | ||
72 | <label class="font-warning" style="padding:11px 5px;width:24%">起始时间:</label> | ||
73 | <input class="mui-input checkInputDate" data-options='{ "beginYear":2018 }' readonly="readonly" type="input"/> | ||
74 | </div> | ||
75 | <div style="background-color: #f5f5f9; height: 6px;"></div> | ||
76 | <div style="background-color: #f5f5f9; height: 6px;" id="divide"></div> | ||
77 | <div class="gird mui-table-view-radio" id="purchaseType"> | ||
78 | <div class="gird-label">采购类型:</div> | ||
79 | <div class="mui-input-row mui-radio mui-left"> | ||
80 | <label for="zero_storage">零库存</label> | ||
81 | <input name="purchaseType" id="zero_storage" type="radio" value='1' class="purchaseType"> | ||
82 | </div> | ||
83 | <div class="mui-input-row mui-radio mui-left"> | ||
84 | <label for="buy_myself">自采</label> | ||
85 | <input name="purchaseType" id="buy_myself" type="radio" value='2' class="purchaseType"> | ||
86 | </div> | ||
87 | </div> | ||
88 | <div style="background-color: #f5f5f9; height: 6px;"></div> | ||
89 | <div class="gird mui-table-view-radio" id="isLocCheck"> | ||
90 | <div class="gird-label">盘点范围:</div> | ||
91 | <div class="mui-input-row mui-radio mui-left"> | ||
92 | <label for="checkAll">全部</label> | ||
93 | <input name="isLocCheck" id="checkAll" type="radio" value='0' class="isLocCheck"> | ||
94 | </div> | ||
95 | <div class="mui-input-row mui-radio mui-left"> | ||
96 | <label for="custom">自定义</label> | ||
97 | <input name="isLocCheck" id="custom" type="radio" value='1' class="isLocCheck"> | ||
98 | </div> | ||
99 | </div> | ||
100 | <div style="background-color: #f5f5f9; height: 6px;"></div> | ||
101 | <div id="position" style="display: none;"> | ||
102 | <div class="gird mui-table-view"> | ||
103 | <div class="gird-label font-warning">起始货位:</div> | ||
104 | <div class="mui-input-row mui-search search_head" style="width:80%;display: inline-block;"> | ||
105 | <input type="search" id="search_start" class="mui-input-clear" placeholder="请选择起始货位"> | ||
106 | |||
107 | </div> | ||
108 | <div id="ulList_start"> | ||
109 | |||
110 | </div> | ||
111 | </div> | ||
112 | <div style="background-color: #f5f5f9; height: 6px;"></div> | ||
113 | <div class="gird mui-table-view"> | ||
114 | <div class="gird-label font-warning">结束货位:</div> | ||
115 | <div class="mui-input-row mui-search search_head" style="width:80%;display: inline-block;"> | ||
116 | <input type="search" id="search_end" class="mui-input-clear" placeholder="请选择结束货位"> | ||
117 | </div> | ||
118 | <div id="ulList_end"> | ||
119 | |||
120 | </div> | ||
121 | </div> | ||
122 | </div> | ||
123 | <div class="gird textarea"> | ||
124 | <div class="gird-label">备注:</div> | ||
125 | <div class="gird-content" style="padding: 0 20px"> | ||
126 | <textarea id="textarea" rows="5" value='' placeholder="多行文本框"></textarea> | ||
127 | </div> | ||
128 | </div> | ||
129 | <button class="mui-btn mui-btn-block" readOnly id='check' data-loading-text = "提交中" data-loading-icon-position="right">确定</button> | ||
130 | </form> | ||
131 | </div> | ||
132 | </div> | ||
133 | </div> | ||
134 | |||
135 | <script src="../../js/mui.js"></script> | ||
136 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
137 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
138 | <script src="../../js/mui.picker.min.js" ></script> | ||
139 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
140 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
141 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
142 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
143 | |||
144 | <script type="text/javascript"> | ||
145 | mui.init(); | ||
146 | (function($){ | ||
147 | |||
148 | $.init({ | ||
149 | beforeback:function(){ | ||
150 | var list = plus.webview.currentWebview().opener(); | ||
151 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
152 | return true; | ||
153 | } | ||
154 | }); | ||
155 | |||
156 | var deceleration = mui.os.ios?0.003: 0.1; | ||
157 | $('.mui-scroll-wrapper').scroll({ | ||
158 | bounce: true, | ||
159 | indicators: false, //是否显示滚动条 | ||
160 | deceleration:deceleration | ||
161 | }); | ||
162 | |||
163 | var url = '/a/checkbill/list', newAddUrl = '/a/checkbill/create', medicineFeautureUrl = '/a/spd/dict/type', medicineData = []; | ||
164 | var page = 1, | ||
165 | totalPage = undefined, | ||
166 | pageSize = 15, | ||
167 | isMore = true; | ||
168 | var utils = new Utils(); | ||
169 | utils.appendModule('#card_view'); | ||
170 | |||
171 | /* | ||
172 | 下拉刷新 | ||
173 | * */ | ||
174 | function pulldownRefresh(){ | ||
175 | var self = this; | ||
176 | page = 1; | ||
177 | mui.ajaxRequest(url,{ | ||
178 | type: 'POST', | ||
179 | data: { | ||
180 | pageNo: page, | ||
181 | pageSize: pageSize | ||
182 | }, | ||
183 | success: function(data){ | ||
184 | if(data.code === 200){ | ||
185 | var resData = data.data; | ||
186 | totalPage = data.totalPage; | ||
187 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
188 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
189 | self.endPullDownToRefresh(true); | ||
190 | isMore = false; | ||
191 | }else{ | ||
192 | self.endPullDownToRefresh(); | ||
193 | } | ||
194 | self.refresh(true); | ||
195 | return template(resData, false) | ||
196 | } | ||
197 | }, | ||
198 | error: function(xhr,type,errorThrown){ | ||
199 | console.log(xhr.responseText) | ||
200 | } | ||
201 | }); | ||
202 | } | ||
203 | |||
204 | /* | ||
205 | |||
206 | * 上拉加载更多 | ||
207 | * */ | ||
208 | function pullupRefresh(){ | ||
209 | var self = this; | ||
210 | if(isMore){ | ||
211 | page++; | ||
212 | if( page <= totalPage ){ | ||
213 | mui.ajaxRequest(url,{ | ||
214 | type: 'POST', | ||
215 | data:{ | ||
216 | pageNo: page | ||
217 | }, | ||
218 | success: function(data){ | ||
219 | |||
220 | var resData = data.data; | ||
221 | if(resData.pageNo === resData.totalPage){ | ||
222 | isMore = false; | ||
223 | self.endPullUpToRefresh(true); | ||
224 | }else{ | ||
225 | isMore = true; | ||
226 | self.endPullUpToRefresh(false); | ||
227 | self.refresh(true); | ||
228 | } | ||
229 | return template(resData,true); | ||
230 | }, | ||
231 | error: function(xhr,type,errorThrown){ | ||
232 | console.log(xhr.responseText) | ||
233 | } | ||
234 | }); | ||
235 | } | ||
236 | }else{ | ||
237 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
238 | self.endPullUpToRefresh(true); | ||
239 | } | ||
240 | } | ||
241 | |||
242 | /* 渲染模板 */ | ||
243 | function template(data, insertType){ | ||
244 | utils.innerTplHtml('check_list', '.mui-tab', data, insertType); | ||
245 | } | ||
246 | // 数组分割 | ||
247 | function sliceArray(array, size) { | ||
248 | var result = []; | ||
249 | for (var x = 0; x < Math.ceil(array.length / size); x++) { | ||
250 | var start = x * size; | ||
251 | var end = start + size; | ||
252 | result.push(array.slice(start, end)); | ||
253 | } | ||
254 | return result; | ||
255 | } | ||
256 | $.plusReady(function(){ | ||
257 | |||
258 | window.addEventListener('pagefresh',function(){ | ||
259 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
260 | }) | ||
261 | //循环初始化所有下拉刷新,上拉加载。 | ||
262 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
263 | $(pullRefreshEl).pullToRefresh({ | ||
264 | down: { | ||
265 | style:'circle', | ||
266 | contentdown : "下拉可以刷新", | ||
267 | contentover : "释放立即刷新", | ||
268 | contentrefresh : "正在刷新...", | ||
269 | callback: pulldownRefresh | ||
270 | }, | ||
271 | up: { | ||
272 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
273 | contentnomore:'没有更多数据', | ||
274 | callback: pullupRefresh | ||
275 | } | ||
276 | }); | ||
277 | }); | ||
278 | /* | ||
279 | radio 与 modal相斥 bug 处理 | ||
280 | * */ | ||
281 | mui('.mui-bar').on('tap','#showModal',function(){ | ||
282 | document.activeElement.blur(); | ||
283 | document.querySelector('#modal1').className = 'mui-modal mui-active'; | ||
284 | // 清空值 | ||
285 | var radios = document.getElementsByTagName('input'); | ||
286 | for(var i=0; i <radios.length; i++){ | ||
287 | radios[i].checked = ''; | ||
288 | }; | ||
289 | document.querySelector('#textarea').value = ''; | ||
290 | document.querySelector('.dateRow').style.display = 'none'; | ||
291 | }) | ||
292 | /* 请求数据 */ | ||
293 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
294 | var divideDOM = document.querySelector('#divide'); | ||
295 | // 药品特征 | ||
296 | mui.ajaxRequest(medicineFeautureUrl,{ | ||
297 | type: 'POST', | ||
298 | data: { type: 'med_his_drug_feature' }, | ||
299 | showWaiting: true, | ||
300 | success: function(data){ | ||
301 | if(data.code === 200){ | ||
302 | medicineData = data.data; | ||
303 | var medicineSplitData = sliceArray( medicineData, 3 ); | ||
304 | mui.each(medicineSplitData,function(index,item){ | ||
305 | var wrap_node = document.createElement('div'); | ||
306 | var wrap_node_label = document.createElement('div'); | ||
307 | wrap_node_label.className = 'gird-label'; | ||
308 | wrap_node_label.innerText = index === 0 ? '药品特征:': ''; | ||
309 | wrap_node.appendChild(wrap_node_label); | ||
310 | wrap_node.className = 'gird mui-table-view-radio drugFeatureCode' | ||
311 | if(item.length){ | ||
312 | |||
313 | mui.each(item,function(_index,_item){ | ||
314 | var div = document.createElement('div'); | ||
315 | div.className = 'mui-input-row mui-radio mui-left'; | ||
316 | var label = document.createElement('label'); | ||
317 | label.innerText = _item.label; | ||
318 | var input = document.createElement('input'); | ||
319 | input.name = 'drugFeatureCode'; | ||
320 | input.className = 'drugFeatureCode_btn' | ||
321 | input.value = _item.value ? _item.value: ''; | ||
322 | input.type = 'radio'; | ||
323 | div.appendChild(label); | ||
324 | div.appendChild(input) | ||
325 | wrap_node.appendChild(div); | ||
326 | }) | ||
327 | } | ||
328 | divideDOM.parentNode.insertBefore(wrap_node,divideDOM) | ||
329 | }) | ||
330 | }else{ | ||
331 | mui.toast(data.msg) | ||
332 | } | ||
333 | }, | ||
334 | error: function(xhr,type,errorThrown){ | ||
335 | console.log(xhr.responseText) | ||
336 | } | ||
337 | }); | ||
338 | var position = document.querySelector('#position'); | ||
339 | document.querySelector('#isLocCheck').addEventListener('click',function(e){ | ||
340 | if(e.target.value === '1'){ | ||
341 | position.style.display = 'block'; | ||
342 | document.querySelector('#search_start').value = ''; | ||
343 | document.querySelector('#search_end').value = ''; | ||
344 | }else{ | ||
345 | position.style.display = 'none'; | ||
346 | } | ||
347 | },false) | ||
348 | |||
349 | // 动销盘判断 盘点时间 | ||
350 | $('#radioForm').on('tap','#checkBillSubType',function(e){ | ||
351 | let showFlag = false; | ||
352 | if(e.target.innerText === '动销盘' || e.target.value === '3'){ | ||
353 | showFlag = true; | ||
354 | } | ||
355 | document.querySelector('.dateRow').style.display = showFlag ? 'block': 'none'; | ||
356 | }) | ||
357 | |||
358 | // 起始货位搜索 | ||
359 | $('#position').on('keyup','#search_start',function(e){ | ||
360 | var positionName = e.target.value; | ||
361 | if(positionName){ | ||
362 | fetchSelect(positionName,'#ulList_start','start') | ||
363 | } | ||
364 | }) | ||
365 | |||
366 | // 结束货位搜索 | ||
367 | $('#position').on('keyup','#search_end',function(e){ | ||
368 | var positionName = e.target.value; | ||
369 | if(positionName){ | ||
370 | fetchSelect(positionName,'#ulList_end','end') | ||
371 | } | ||
372 | }); | ||
373 | |||
374 | $('#radioForm').on('tap','.checkInputDate',function(){ | ||
375 | var _self = this; | ||
376 | console.log(_self,'self') | ||
377 | if(_self.picker) { | ||
378 | _self.picker.show(function (rs) { | ||
379 | _self.value = rs.text; | ||
380 | _self.picker.dispose(); | ||
381 | _self.picker = null; | ||
382 | }); | ||
383 | } else{ | ||
384 | var optionsJson = this.getAttribute('data-options') || '{}'; | ||
385 | var options = JSON.parse(optionsJson); | ||
386 | var id = this.getAttribute('id'); | ||
387 | _self.picker = new $.DtPicker(options); | ||
388 | _self.picker.show(function(rs) { | ||
389 | _self.value = rs.text; | ||
390 | _self.picker.dispose(); | ||
391 | _self.picker = null; | ||
392 | }); | ||
393 | } | ||
394 | }) | ||
395 | |||
396 | function fetchSelect(name,target,key){ | ||
397 | var url = '/a/dept/queryDeptLocationInfo'; | ||
398 | mui.ajaxRequest(url,{ | ||
399 | data: { positionName: name }, | ||
400 | type:"post", | ||
401 | success: function(data){ | ||
402 | if(data.code === 200){ | ||
403 | let selectList = data.data; | ||
404 | createSelect(selectList,target,key); | ||
405 | }else{ | ||
406 | mui.toast('暂无数据',{ type: 'div' }) | ||
407 | } | ||
408 | |||
409 | }, | ||
410 | error: function(xhr,type,errorThrown){ | ||
411 | console.log(xhr.responseText) | ||
412 | } | ||
413 | }) | ||
414 | } | ||
415 | |||
416 | var start = document.querySelector('#search_start'); | ||
417 | var end = document.querySelector('#search_end'); | ||
418 | function createSelect(selectList,target,key){ | ||
419 | if(key === 'start'){ | ||
420 | if(document.querySelector('.search_ullist_start')){ | ||
421 | var ulList = document.querySelector('.search_ullist_start'); | ||
422 | document.querySelector('#ulList_start').removeChild(ulList); | ||
423 | } | ||
424 | }else{ | ||
425 | if(document.querySelector('.search_ullist_end')){ | ||
426 | var ulList = document.querySelector('.search_ullist_end'); | ||
427 | document.querySelector('#ulList_end').removeChild(ulList); | ||
428 | } | ||
429 | } | ||
430 | var ul = document.createElement('ul'); | ||
431 | ul.className = key === 'start'? 'search_ullist_start': 'search_ullist_end'; | ||
432 | for(var i=0;i<selectList.length; i++){ | ||
433 | var li = document.createElement('li'); | ||
434 | li.className = key === 'start'? 'search_ullist_start_li': 'search_ullist_end_li'; | ||
435 | li.innerText = selectList[i].positionName; | ||
436 | li.setAttribute('sort',selectList[i].sort); | ||
437 | ul.appendChild(li); | ||
438 | } | ||
439 | document.querySelector(target).appendChild(ul) | ||
440 | } | ||
441 | |||
442 | // 开始货位搜索选中 | ||
443 | $('#position').on('click','.search_ullist_start_li',function(e){ | ||
444 | start.value = this.innerText; | ||
445 | start.setAttribute('sort',this.getAttribute('sort')); | ||
446 | document.querySelector('.search_ullist_start').style.display = 'none'; | ||
447 | }) | ||
448 | // 结束货位搜索选中 | ||
449 | $('#position').on('click','.search_ullist_end_li',function(e){ | ||
450 | end.value = this.innerText; | ||
451 | end.setAttribute('sort',this.getAttribute('sort')); | ||
452 | document.querySelector('.search_ullist_end').style.display = 'none'; | ||
453 | }) | ||
454 | |||
455 | var dateButton = document.querySelector('.checkInputDate'); | ||
456 | |||
457 | // 隐藏键盘 | ||
458 | mui('#modal1').on('tap','.closeBtn',function(e){ | ||
459 | document.activeElement.blur(); | ||
460 | start.value = ''; | ||
461 | start.setAttribute('sort',''); | ||
462 | end.value = ''; | ||
463 | end.setAttribute('sort',''); | ||
464 | |||
465 | }) | ||
466 | // 新建盘点 | ||
467 | mui('#modal1').on('tap','.mui-btn',function(e){ | ||
468 | document.activeElement.blur(); | ||
469 | var checkBillType = undefined, // 盘点类型 | ||
470 | checkBillSubType = undefined, //盘点子类型 | ||
471 | purchaseType = undefined, //采购类型 | ||
472 | isLocCheck = undefined,// 盘点范围 | ||
473 | checkStartTime = undefined;// 备注 | ||
474 | drugFeatureCode = undefined;//药品特征 | ||
475 | var billTypeRadio = document.querySelector('#checkBillType').querySelectorAll('input'); | ||
476 | var subRadio = document.querySelector('#checkBillSubType').querySelectorAll('input'); | ||
477 | var drugFeatureRadio = document.querySelectorAll('.drugFeatureCode_btn'); | ||
478 | console.log(drugFeatureRadio) | ||
479 | var purchaseTypeRadio = document.querySelector('#purchaseType').querySelectorAll('input'); | ||
480 | var isLocCheckRodio = document.querySelector('#isLocCheck').querySelectorAll('input') | ||
481 | var startLocSort = document.querySelector('#search_start').getAttribute('sort'); | ||
482 | var endLocSort = document.querySelector('#search_end').getAttribute('sort'); | ||
483 | var dateButton = undefined; | ||
484 | if(document.querySelector('.checkInputDate')){ | ||
485 | checkStartTime = document.querySelector('.checkInputDate').value; | ||
486 | } | ||
487 | var remarks = document.querySelector('#textarea').value; | ||
488 | mui.each(billTypeRadio,function(index,item){ | ||
489 | if(item.checked){ | ||
490 | checkBillType = item.value; | ||
491 | } | ||
492 | }); | ||
493 | mui.each(subRadio,function(index,item){ | ||
494 | if(item.checked){ | ||
495 | checkBillSubType = item.value; | ||
496 | } | ||
497 | }); | ||
498 | mui.each(drugFeatureRadio,function(index,item){ | ||
499 | if(item.checked){ | ||
500 | drugFeatureCode = item.value; | ||
501 | } | ||
502 | }); | ||
503 | |||
504 | mui.each(isLocCheckRodio,function(index,item){ | ||
505 | if(item.checked){ | ||
506 | isLocCheck = item.value; | ||
507 | } | ||
508 | }) | ||
509 | |||
510 | mui.each(purchaseTypeRadio,function(index,item){ | ||
511 | if(item.checked){ | ||
512 | purchaseType = item.value; | ||
513 | } | ||
514 | }) | ||
515 | if(checkBillSubType === '3'){ | ||
516 | if(!checkStartTime){ | ||
517 | mui.toast('请填写起始时间'); | ||
518 | return; | ||
519 | } | ||
520 | } | ||
521 | var values = {}; | ||
522 | values.checkBillType = checkBillType; | ||
523 | values.checkBillSubType = checkBillSubType; | ||
524 | values.drugFeatureCode = drugFeatureCode; | ||
525 | values.purchaseType = purchaseType; | ||
526 | if(checkBillSubType === '3'){ | ||
527 | values.checkStartTime = checkStartTime; | ||
528 | } | ||
529 | values.isLocCheck = isLocCheck; | ||
530 | values.remarks = remarks; | ||
531 | if(isLocCheck === '1'){ | ||
532 | values.startLocSort = startLocSort; | ||
533 | values.endLocSort = endLocSort; | ||
534 | } | ||
535 | |||
536 | console.log(values) | ||
537 | mui.ajaxRequest(newAddUrl,{ | ||
538 | type: 'POST', | ||
539 | data: values, | ||
540 | showWaiting: true, | ||
541 | success: function(data){ | ||
542 | if(data.code === 200){ | ||
543 | mui.toast('新建盘点成功',{ type: 'div' }); | ||
544 | document.querySelector('#modal1').className = 'mui-modal'; | ||
545 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
546 | }else{ | ||
547 | mui.toast(data.msg,{ type: 'div' }) | ||
548 | } | ||
549 | }, | ||
550 | error: function(xhr,type,errorThrown){ | ||
551 | console.log(xhr.responseText) | ||
552 | } | ||
553 | }) | ||
554 | |||
555 | }) | ||
556 | |||
557 | |||
558 | $('#scroll').on('tap','.am-card',function(){ | ||
559 | let itemData = this.dataset; | ||
560 | console.log(JSON.stringify(itemData)) | ||
561 | document.activeElement.blur(); | ||
562 | common.openwin('checkList',{ params: JSON.stringify(itemData) }); | ||
563 | }) | ||
564 | }) | ||
565 | })(mui); | ||
566 | |||
567 | </script> | ||
568 | |||
569 | </body> | ||
570 | |||
571 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/check/list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='check_list_tpl'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" data-id="{{ value.id }}"> | ||
5 | <div class="am-card-header"> | ||
6 | <div class="am-card-header-content"> | ||
7 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
8 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
9 | </div> | ||
10 | <div class="am-card-header-extra"> | ||
11 | <span style="margin-right: 8px;">{{ value.checkNum }}</span> | ||
12 | <span>{{ value.checkDetailStatusName }}</span> | ||
13 | </div> | ||
14 | </div> | ||
15 | <div class="am-card-body"> | ||
16 | <div class="am-flexbox am-flexbox-align-center"> | ||
17 | <div class="am-flexbox-item"> | ||
18 | 单位:<span>{{ value.unit }}</span> | ||
19 | </div> | ||
20 | <div class="am-flexbox-item"> | ||
21 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
22 | </div> | ||
23 | <div class="am-flexbox-item"> | ||
24 | 货位:<span>{{ value.locName }}</span> | ||
25 | </div> | ||
26 | </div> | ||
27 | {{if value.checkDetailStatus === 1 }} | ||
28 | {{if value.editable}} | ||
29 | <div class="editForm" style="display: block;"> | ||
30 | <div class="am-flexbox am-flexbox-align-center"> | ||
31 | <div class="am-flexbox-item"> | ||
32 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
33 | <div class="am-list-line"> | ||
34 | <div class="am-input-label am-input-label-4 font-warning">数量:</div> | ||
35 | <div class="am-input-control"> | ||
36 | <input pattern="[0-9]*" type="number" value="{{ value.accountStoreNum }}" placeholder="请输入" class="practicalRepertory flex-item-input" /> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div class="am-flexbox-item"> | ||
42 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
43 | <div class="am-list-line"> | ||
44 | <div class="am-input-label am-input-label-5 font-warning">生产日期:</div> | ||
45 | <div class="am-input-control"> | ||
46 | <input pattern="[0-9]*" type="date" value="{{ value.accountProductTime }}" placeholder="请输入" class="realProductTime flex-item-input" /> | ||
47 | </div> | ||
48 | </div> | ||
49 | </div> | ||
50 | </div> | ||
51 | <div class="am-flexbox-item"> | ||
52 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
53 | <div class="am-list-line"> | ||
54 | <div class="am-input-label am-input-label-5 font-warning">生产批号:</div> | ||
55 | <div class="am-input-control"> | ||
56 | <input pattern="[0-9]*" type="text" value="{{ value.accountBatchNo }}" placeholder="请输入" class="practicalBatch flex-item-input" /> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="am-flexbox am-flexbox-align-center"> | ||
63 | <div class="am-flexbox-item"> | ||
64 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
65 | <div class="am-list-line"> | ||
66 | <div class="am-input-label am-input-label-4 font-warning">有效期至:</div> | ||
67 | <div class="am-input-control"> | ||
68 | <input pattern="[0-9]*" type="date" value="{{ value.accountEndTime }}" placeholder="请输入" class="validEndTime flex-item-input"/> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | </div> | ||
73 | <div class="am-flexbox-item am-last-flexItem"> | ||
74 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
75 | </div> | ||
76 | <div class="am-flexbox-item"> | ||
77 | |||
78 | </div> | ||
79 | </div> | ||
80 | </div> | ||
81 | <div class="am-flexbox am-flexbox-align-center" style="display: none;"> | ||
82 | <div class="am-flexbox-item"> | ||
83 | 数量:<span>{{ value.accountStoreNum }}</span> | ||
84 | </div> | ||
85 | <div class="am-flexbox-item am-last-flexItem"> | ||
86 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
87 | </div> | ||
88 | <div class="am-flexbox-item"> | ||
89 | |||
90 | </div> | ||
91 | </div> | ||
92 | {{/if}} | ||
93 | {{ else }} | ||
94 | <div class="am-flexbox am-flexbox-align-center"> | ||
95 | <div class="am-flexbox-item"> | ||
96 | 数量:<span>{{ value.accountStoreNum }}</span> | ||
97 | </div> | ||
98 | <div class="am-flexbox-item am-last-flexItem"> | ||
99 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
100 | </div> | ||
101 | <div class="am-flexbox-item"> | ||
102 | |||
103 | </div> | ||
104 | </div> | ||
105 | {{ /if }} | ||
106 | </div> | ||
107 | <div class="am-card-footer"> | ||
108 | <div class="am-card-footer-extra"> | ||
109 | {{if value.checkDetailStatus === 1 }} | ||
110 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined eidtRow" style="margin: 0 5px;" data-id="{{ value.id }}" data-index="{{ i }}">收起编辑</button> | ||
111 | {{/if}} | ||
112 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined toPage" style="margin: 0 5px;" data-index="{{ i }}">更多详情</button> | ||
113 | {{ if value.checkDetailStatus === 1 }} | ||
114 | <button type="button" class="mui-btn mui-btn-blue mui-btn-danger submitButton" data-id="{{ value.id }}" data-index="{{ i }}">提交</button> | ||
115 | {{ /if }} | ||
116 | </div> | ||
117 | </div> | ||
118 | </div> | ||
119 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
120 | </div> | ||
121 | {{/each}} | ||
122 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/commonPages/qrcode.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"/> | ||
5 | <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | ||
6 | <meta name="HandheldFriendly" content="true"/> | ||
7 | <meta name="MobileOptimized" content="320"/> | ||
8 | <title></title> | ||
9 | <script type="text/javascript" src="../../js/qrcode.js"></script> | ||
10 | <script type="text/javascript"> | ||
11 | var ws=null,wo=null; | ||
12 | var scan=null,domready=false; | ||
13 | // H5 plus事件处理 | ||
14 | |||
15 | function plusReady(){ | ||
16 | if(ws||!window.plus||!domready){ | ||
17 | return; | ||
18 | } | ||
19 | |||
20 | // 获取当前窗口对象 | ||
21 | ws=plus.webview.currentWebview(); | ||
22 | ws.setStyle({ | ||
23 | zindex:1 | ||
24 | }); | ||
25 | wo=ws.opener(); | ||
26 | // 开始扫描 | ||
27 | var filter = [plus.barcode.QR,plus.barcode.EAN13,plus.barcode.EAN8,plus.barcode.CODE128]; | ||
28 | var styles = {frameColor: "#29E52C",scanbarColor: "#29E52C",background: ""} | ||
29 | ws.addEventListener('show', function(){ | ||
30 | scan=new plus.barcode.Barcode('bcid',filter,styles); | ||
31 | scan.onmarked=onmarked; | ||
32 | scan.onerror = onerror; | ||
33 | scan.start({conserve:true,filename:'_doc/barcode/'}); | ||
34 | }, false); | ||
35 | // 显示页面并关闭等待框 | ||
36 | ws.show('pop-in'); | ||
37 | // wo.evalJS('closeWaiting()'); | ||
38 | } | ||
39 | if(window.plus){ | ||
40 | plusReady(); | ||
41 | }else{ | ||
42 | document.addEventListener('plusready', plusReady, false); | ||
43 | } | ||
44 | // 监听DOMContentLoaded事件 | ||
45 | document.addEventListener('DOMContentLoaded', function(){ | ||
46 | domready=true; | ||
47 | plusReady(); | ||
48 | }, false); | ||
49 | // 扫描失败 | ||
50 | function onerror(e){ | ||
51 | mui.alert(e) | ||
52 | } | ||
53 | // 二维码扫描成功 | ||
54 | function onmarked(type, result, file){ | ||
55 | |||
56 | switch(type){ | ||
57 | case plus.barcode.QR: | ||
58 | type = 'QR'; | ||
59 | break; | ||
60 | case plus.barcode.EAN13: | ||
61 | type = 'EAN13'; | ||
62 | break; | ||
63 | case plus.barcode.EAN8: | ||
64 | type = 'EAN8'; | ||
65 | break; | ||
66 | case plus.barcode.CODE128: | ||
67 | type = 'CODE128'; | ||
68 | break; | ||
69 | default: | ||
70 | type = '其它'+type; | ||
71 | break; | ||
72 | } | ||
73 | result = result.replace(/\n/g, ''); | ||
74 | scan.close(); | ||
75 | // 关闭当前页面webView | ||
76 | /*var allws = plus.webview.all(); | ||
77 | var len = allws.length; | ||
78 | |||
79 | for(var i=0;i<len;i++){ | ||
80 | console.log('webview'+i+': '+ allws[i].id); | ||
81 | }*/ | ||
82 | // console.log(ws.id) | ||
83 | // ws.close(); | ||
84 | |||
85 | /*common.openwin('../acceptance/acc_list',{ result: result }, { | ||
86 | titleText: '药品信息' | ||
87 | }); | ||
88 | |||
89 | //处理返回事件 | ||
90 | plus.key.addEventListener('backbutton', function() { | ||
91 | plus.webview.currentWebview().close(); | ||
92 | })*/ | ||
93 | |||
94 | wo.evalJS("scaned('"+ type +"','"+ result +"','"+ file +"');"); | ||
95 | |||
96 | back(); | ||
97 | } | ||
98 | // 从相册中选择二维码图片 | ||
99 | function scanPicture(){ | ||
100 | plus.gallery.pick(function(path){ | ||
101 | var filter = [plus.barcode.QR,plus.barcode.EAN13,plus.barcode.EAN8,plus.barcode.CODE128]; | ||
102 | plus.barcode.scan(path,onmarked,function(error){ | ||
103 | plus.nativeUI.alert('无法识别此图片'); | ||
104 | },filter); | ||
105 | }, function(err){ | ||
106 | console.log('Failed: '+err.message); | ||
107 | }); | ||
108 | } | ||
109 | |||
110 | </script> | ||
111 | |||
112 | <style type="text/css"> | ||
113 | #bcid { | ||
114 | width: 100%; | ||
115 | position: absolute; | ||
116 | top: 0px; | ||
117 | bottom: 44px; | ||
118 | text-align: center; | ||
119 | } | ||
120 | .tip { | ||
121 | color: #FFFFFF; | ||
122 | font-weight: bold; | ||
123 | text-shadow: 0px -1px #103E5C; | ||
124 | } | ||
125 | footer { | ||
126 | width: 100%; | ||
127 | height: 44px; | ||
128 | position: absolute; | ||
129 | bottom: 0px; | ||
130 | line-height: 44px; | ||
131 | text-align: center; | ||
132 | color: #FFF; | ||
133 | } | ||
134 | .fbt { | ||
135 | width: 49%; | ||
136 | height: 100%; | ||
137 | background-color:#f2a11c; | ||
138 | float: left; | ||
139 | } | ||
140 | .scanPicture{ | ||
141 | margin-left: 5px; | ||
142 | } | ||
143 | .fbt:active { | ||
144 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.5); | ||
145 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.5); | ||
146 | } | ||
147 | </style> | ||
148 | </head> | ||
149 | <body style="background-color: #000000;width:100vw;height:100vh;overflow: hidden;"> | ||
150 | <div id="bcid"> | ||
151 | <div style="height:40%"></div> | ||
152 | <p class="tip">...载入中...</p> | ||
153 | </div> | ||
154 | <footer> | ||
155 | <div class="fbt" onclick="back()">取 消</div> | ||
156 | <div class="fbt scanPicture" onclick="scanPicture()">从相册选择二维码</div> | ||
157 | </footer> | ||
158 | </body> | ||
159 | </html> |
container/commonPages/searchCode.html
0 → 100644
1 | <!--单号搜索页面--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title>搜索页面</title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <style> | ||
10 | #ulList{ | ||
11 | padding-top: 10px; | ||
12 | } | ||
13 | .search-ullist{ | ||
14 | z-index: 2; | ||
15 | background-color: #efeff4; | ||
16 | border-bottom: solid 1px #F5F5F9; | ||
17 | border-radius: 2px; | ||
18 | list-style: none; | ||
19 | position: relative; | ||
20 | margin-top: 0; | ||
21 | margin-bottom: 0; | ||
22 | padding-left: 0; | ||
23 | list-style: none; | ||
24 | width: 100%; | ||
25 | } | ||
26 | .search-ullist-li{ | ||
27 | position: relative; | ||
28 | overflow: hidden; | ||
29 | padding: 10px 36px; | ||
30 | } | ||
31 | .search-ullist-li::before{ | ||
32 | font-family: Muiicons; | ||
33 | content: '\e466'; | ||
34 | position: absolute; | ||
35 | left: 10px; | ||
36 | } | ||
37 | .history-title{ | ||
38 | display: flex; | ||
39 | justify-content: space-between; | ||
40 | padding-right: 10px; | ||
41 | } | ||
42 | .history-tags{ | ||
43 | display: flex; | ||
44 | flex-wrap: wrap; | ||
45 | padding: 0 10px 10px 0; | ||
46 | } | ||
47 | .tag{ | ||
48 | padding: 8px 10px; | ||
49 | margin: 8px 10px; | ||
50 | border: solid 1px #ccc; | ||
51 | background-color: #F5F5F9; | ||
52 | border-radius: 3px; | ||
53 | } | ||
54 | </style> | ||
55 | </head> | ||
56 | <body> | ||
57 | <header class="mui-bar mui-bar-nav"> | ||
58 | <div class="mui-input-row mui-search search_head" style="width:85%;display: inline-block;"> | ||
59 | <input type="search" id="search" class="mui-input-clear" placeholder="请输入单号"> | ||
60 | </div> | ||
61 | <a class="mui-action-back mui-pull-right" style="height:45px;line-height: 45px;">取消</a> | ||
62 | </header> | ||
63 | <div class="mui-content"> | ||
64 | <div id="ulList"> | ||
65 | |||
66 | </div> | ||
67 | <div style="padding:10px;"> | ||
68 | <div class="history-title"> | ||
69 | <h4>历史搜索记录</h4> | ||
70 | </div> | ||
71 | |||
72 | <div class="history-tags"> | ||
73 | |||
74 | </div> | ||
75 | |||
76 | </div> | ||
77 | </div> | ||
78 | |||
79 | <script src="../../js/mui.min.js"></script> | ||
80 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
81 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
82 | <script type="text/javascript"> | ||
83 | |||
84 | (function($) { | ||
85 | mui.init(); | ||
86 | |||
87 | var params = undefined, key = undefined, localStorageItem = [] // 单号 | ||
88 | $.plusReady(function(){ | ||
89 | var self = plus.webview.currentWebview(); | ||
90 | params = JSON.parse(self.params);//获得参数 | ||
91 | console.log(self.params); | ||
92 | key = params.key; | ||
93 | var searchList = JSON.parse(plus.storage.getItem('searchCodeHistory')); | ||
94 | console.log(searchList); | ||
95 | localStorageItem = searchList && searchList.list ? searchList.list: []; | ||
96 | if(searchList && searchList.list.length){ | ||
97 | // 创建 删除历史记录标签 | ||
98 | var span = document.createElement('span'); | ||
99 | span.className = 'mui-icon mui-icon-trash clearHistory'; | ||
100 | document.querySelector('.history-title').appendChild(span); | ||
101 | |||
102 | // 创建 历史记录tag | ||
103 | mui.each(searchList.list,function(index,item){ | ||
104 | var div = document.createElement('div'); | ||
105 | div.className = 'tag'; | ||
106 | div.innerHTML = item; | ||
107 | div.setAttribute('data-distributeCode',item); | ||
108 | document.querySelector('.history-tags').appendChild(div) | ||
109 | }) | ||
110 | } | ||
111 | console.log(localStorageItem) | ||
112 | // 删除 历史记录 | ||
113 | $('.history-title').on('tap','.clearHistory',function(){ | ||
114 | var btnArray = ['否', '是']; | ||
115 | mui.confirm('是否确认删除历史搜索记录?', '确认', btnArray, function(e) { | ||
116 | if (e.index == 1) { | ||
117 | plus.nativeUI.showWaiting(); | ||
118 | setTimeout(function(){ | ||
119 | plus.storage.removeItem('searchCodeHistory'); | ||
120 | console.log(plus.storage.getItem('searchCodeHistory')) | ||
121 | var deleteChild = document.querySelector('.clearHistory'); | ||
122 | document.querySelector('.history-title').removeChild(deleteChild); | ||
123 | document.querySelector('.history-tags').innerHTML = ''; | ||
124 | |||
125 | plus.nativeUI.closeWaiting(); | ||
126 | },1000) | ||
127 | } | ||
128 | },'div') | ||
129 | }); | ||
130 | |||
131 | // 点击tag 进行搜索 | ||
132 | $('.history-tags').on('tap','.tag',function(){ | ||
133 | var dataset = this.dataset; | ||
134 | var page = plus.webview.getWebviewById(params.route); | ||
135 | var searchData = { | ||
136 | distributeCode: dataset.distributecode, | ||
137 | auditStatus: params.auditStatus | ||
138 | } | ||
139 | mui.fire(page,'search',{ searchData: JSON.stringify(searchData) }); | ||
140 | mui.back() | ||
141 | }) | ||
142 | |||
143 | $('.search_head').on('keyup','#search',function(e){ | ||
144 | var paramName = e.target.value; | ||
145 | var url = null, data = {}; | ||
146 | if(paramName){ | ||
147 | if(key === 'distributeCode'){ | ||
148 | // 单号 | ||
149 | url = '/a/checkaccept/shelfListNoPage'; | ||
150 | data = { | ||
151 | distributeCode: paramName, | ||
152 | auditStatus: params.auditStatus | ||
153 | } | ||
154 | } | ||
155 | mui.ajaxRequest(url,{ | ||
156 | type:"post", | ||
157 | data: data, | ||
158 | success: function(data){ | ||
159 | if(data.code === 200){ | ||
160 | let dataList = data.data; | ||
161 | createSelect(dataList,key); | ||
162 | } | ||
163 | }, | ||
164 | error: function(xhr,type,errorThrown){ | ||
165 | alert(xhr.responseText) | ||
166 | } | ||
167 | }) | ||
168 | }else{ | ||
169 | document.querySelector('#ulList').innerHTML = ''; | ||
170 | } | ||
171 | }); | ||
172 | |||
173 | |||
174 | function createSelect(data,key){ | ||
175 | if(document.querySelector('.search-ullist')){ | ||
176 | var ulList = document.querySelector('.search-ullist'); | ||
177 | document.querySelector('#ulList').removeChild(ulList); | ||
178 | } | ||
179 | var ul = document.createElement('ul'); | ||
180 | ul.className = 'search-ullist'; | ||
181 | for(var i=0;i<data.length; i++){ | ||
182 | var li = document.createElement('li'); | ||
183 | li.className = 'search-ullist-li'; | ||
184 | li.setAttribute('data-distributeCode',data[i].distributeCode); | ||
185 | li.innerHTML = data[i].distributeCode; | ||
186 | ul.appendChild(li); | ||
187 | } | ||
188 | document.querySelector('#ulList').appendChild(ul) | ||
189 | } | ||
190 | $('#ulList').on('tap','.search-ullist-li',function(){ | ||
191 | console.log(localStorageItem) | ||
192 | let dataset = this.dataset; | ||
193 | console.log(dataset) | ||
194 | let flag = false; | ||
195 | mui.each(localStorageItem,function(index,item){ | ||
196 | if(item === dataset.distributecode){ | ||
197 | flag = true | ||
198 | } | ||
199 | }); | ||
200 | if(!flag){ | ||
201 | if(localStorageItem.length > 10){ | ||
202 | localStorageItem.shift(); | ||
203 | } | ||
204 | localStorageItem.push(dataset.distributecode); | ||
205 | console.log('当前不存在') | ||
206 | }else{ | ||
207 | console.log('已经存在') | ||
208 | } | ||
209 | let localParams = { | ||
210 | list: localStorageItem | ||
211 | } | ||
212 | let searchData = { | ||
213 | distributeCode: dataset.distributecode, | ||
214 | auditStatus: params.auditStatus | ||
215 | } | ||
216 | plus.storage.setItem('searchCodeHistory',JSON.stringify(localParams)) | ||
217 | var page = plus.webview.getWebviewById(params.route); | ||
218 | mui.fire(page,'search',{ searchData: JSON.stringify(searchData)}); | ||
219 | mui.back() | ||
220 | }); | ||
221 | }) | ||
222 | })(mui); | ||
223 | |||
224 | </script> | ||
225 | </body> | ||
226 | |||
227 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/commonPages/searchPage.html
0 → 100644
1 | <!--通用 搜索页面--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title>搜索页面</title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <style> | ||
10 | #noResult{ | ||
11 | display: none; | ||
12 | padding: 5px 10px; | ||
13 | font-size: 14px; | ||
14 | color: #666; | ||
15 | } | ||
16 | #ulList{ | ||
17 | padding-top: 10px; | ||
18 | } | ||
19 | .search-ullist{ | ||
20 | z-index: 2; | ||
21 | background-color: #efeff4; | ||
22 | border-bottom: solid 1px #F5F5F9; | ||
23 | border-radius: 2px; | ||
24 | list-style: none; | ||
25 | position: relative; | ||
26 | margin-top: 0; | ||
27 | margin-bottom: 0; | ||
28 | padding-left: 0; | ||
29 | list-style: none; | ||
30 | width: 100%; | ||
31 | } | ||
32 | .search-ullist-li{ | ||
33 | position: relative; | ||
34 | overflow: hidden; | ||
35 | padding: 10px 36px; | ||
36 | } | ||
37 | .search-ullist-li::before{ | ||
38 | font-family: Muiicons; | ||
39 | content: '\e466'; | ||
40 | position: absolute; | ||
41 | left: 10px; | ||
42 | } | ||
43 | .history-title{ | ||
44 | display: flex; | ||
45 | justify-content: space-between; | ||
46 | padding-right: 10px; | ||
47 | } | ||
48 | .history-tags{ | ||
49 | display: flex; | ||
50 | flex-wrap: wrap; | ||
51 | padding: 0 10px 10px 0; | ||
52 | } | ||
53 | .tag{ | ||
54 | padding: 8px 10px; | ||
55 | margin: 8px 10px; | ||
56 | border: solid 1px #ccc; | ||
57 | background-color: #F5F5F9; | ||
58 | border-radius: 3px; | ||
59 | } | ||
60 | </style> | ||
61 | </head> | ||
62 | <body> | ||
63 | <header class="mui-bar mui-bar-nav"> | ||
64 | <div class="mui-input-row mui-search search_head" style="width:85%;display: inline-block;"> | ||
65 | <input type="search" id="search" class="mui-input-clear" autofocus="autofocus" placeholder="供应商/通用名/商品名" > | ||
66 | </div> | ||
67 | <a class="mui-action-back mui-pull-right" style="height:45px;line-height: 45px;">取消</a> | ||
68 | </header> | ||
69 | <div class="mui-content"> | ||
70 | <div id="ulList"> | ||
71 | |||
72 | </div> | ||
73 | <div id="noResult">暂无搜索结果</div> | ||
74 | <div style="padding:10px;"> | ||
75 | <div class="history-title"> | ||
76 | <h4>历史搜索记录</h4> | ||
77 | </div> | ||
78 | <div class="history-tags"> | ||
79 | |||
80 | </div> | ||
81 | |||
82 | </div> | ||
83 | </div> | ||
84 | |||
85 | <script src="../../js/mui.min.js"></script> | ||
86 | <script src="../../js/jquery.min.js"></script> | ||
87 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
88 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
89 | <script type="text/javascript"> | ||
90 | (function($,$JQ) { | ||
91 | mui.init(); | ||
92 | // H5 plus事件处理 | ||
93 | |||
94 | function plusReady(){ | ||
95 | var Context = plus.android.importClass("android.content.Context"); | ||
96 | var InputMethodManager = plus.android.importClass("android.view.inputmethod.InputMethodManager"); | ||
97 | var main = plus.android.runtimeMainActivity(); | ||
98 | var imm = main.getSystemService(Context.INPUT_METHOD_SERVICE); | ||
99 | setTimeout(function(){ | ||
100 | imm.toggleSoftInput(0,InputMethodManager.SHOW_FORCED); | ||
101 | },200); | ||
102 | } | ||
103 | document.addEventListener("plusready",plusReady,false); | ||
104 | |||
105 | |||
106 | function back (){ | ||
107 | let searchValue = ''; | ||
108 | let searchParams = {}, saveData = {}, flag = false; | ||
109 | // 存储当前搜索记录 | ||
110 | if(location === 'sub_list'){ | ||
111 | searchParams = { hisDrugCode : '',hisDrugName: searchValue,type: params.auditStatus,selected: params.selected } | ||
112 | saveData = { hisDrugCode: '', hisDrugName: searchValue }; | ||
113 | } | ||
114 | if(module === 'acceptance' || module === 'basicMedicine'){ | ||
115 | if(location === 'main_list'){ | ||
116 | searchParams = { supplierCode: '', supplierName: searchValue }; | ||
117 | saveData = { supplierCode: '', supplierName: searchValue }; | ||
118 | |||
119 | } | ||
120 | }else if(module === 'grounding'){ | ||
121 | if(location==='main_list'){ | ||
122 | searchParams = { distributeCode: searchValue, auditStatus: params.auditStatus }; | ||
123 | saveData = searchValue; | ||
124 | } | ||
125 | }else if(module === 'pickingOff'){ | ||
126 | if(location === 'main_list'){ | ||
127 | searchParams = { pickingOrderNo: searchValue, auditStatus: params.auditStatus }; | ||
128 | saveData = searchValue; | ||
129 | } | ||
130 | }else{ | ||
131 | searchParams = { bigDrugCode : '',ctmmParam: searchValue }; | ||
132 | saveData = { bigDrugCode: '', ctmmParam: searchValue }; | ||
133 | } | ||
134 | |||
135 | var page = undefined; | ||
136 | if(location === 'main_list'){ | ||
137 | page = plus.webview.getWebviewById(params.route); | ||
138 | mui.fire(page,'search',{ searchParams: JSON.stringify(searchParams),selectTabs: params.selectTabs }); | ||
139 | }else{ | ||
140 | page = plus.webview.getWebviewById(params.id); | ||
141 | mui.fire(page,'sub_search',{ searchParams: JSON.stringify(searchParams),selectTabs: params.selectTabs }); | ||
142 | } | ||
143 | document.activeElement.blur(); | ||
144 | } | ||
145 | |||
146 | // 重写mui-back************************** | ||
147 | var old_back = mui.back; | ||
148 | mui.back = function(){ | ||
149 | //执行mui封装好的窗口关闭逻辑; | ||
150 | back(); | ||
151 | old_back(); | ||
152 | } | ||
153 | |||
154 | var params = undefined, | ||
155 | key = undefined, | ||
156 | selected = undefined, | ||
157 | module = undefined,// 模块 | ||
158 | location = undefined;// 入口:主列表/子列表 | ||
159 | |||
160 | $.plusReady(function(){ | ||
161 | var self = plus.webview.currentWebview(); | ||
162 | params = JSON.parse(self.params);//获得参数 | ||
163 | console.log(self.params); | ||
164 | console.log(params.selectTabs,'sdfad') | ||
165 | key = params.key; | ||
166 | selected = params.selected; | ||
167 | module = params.module; | ||
168 | location = params.location; | ||
169 | // 输入框聚焦 | ||
170 | var searchList = JSON.parse(plus.storage.getItem('searchHistory')); | ||
171 | console.log(searchList) | ||
172 | let currHistory = searchList[module][location]; | ||
173 | console.log(currHistory) | ||
174 | |||
175 | |||
176 | |||
177 | // 键盘搜索按钮 | ||
178 | document.querySelector('.search_head').addEventListener('keypress',function(e){ | ||
179 | if(e.keyCode == "13") { | ||
180 | console.log(e.target.value); | ||
181 | let searchValue = e.target.value; | ||
182 | e.preventDefault(); // 阻止默认事件---阻止页面刷新 | ||
183 | let searchParams = {}, saveData = {}, flag = false; | ||
184 | // 存储当前搜索记录 | ||
185 | if(location === 'sub_list'){ | ||
186 | searchParams = { hisDrugCode : '',hisDrugName: searchValue,type: params.auditStatus,selected: params.selected } | ||
187 | saveData = { hisDrugCode: '', hisDrugName: searchValue }; | ||
188 | mui.each(currHistory,function(index,item){ | ||
189 | if(item === saveData.hisDrugCode && item.hisDrugName === saveData.hisDrugName){ | ||
190 | flag = true; | ||
191 | } | ||
192 | }); | ||
193 | } | ||
194 | if(module === 'acceptance' || module === 'basicMedicine' ){ | ||
195 | if(location === 'main_list'){ | ||
196 | searchParams = { supplierCode: '', supplierName: searchValue }; | ||
197 | saveData = { supplierCode: '', supplierName: searchValue }; | ||
198 | mui.each(currHistory,function(index,item){ | ||
199 | if(item === saveData.supplierCode && item.supplierName === saveData.supplierName){ | ||
200 | flag = true; | ||
201 | } | ||
202 | }); | ||
203 | } | ||
204 | }else if(module === 'grounding'){ | ||
205 | if(location==='main_list'){ | ||
206 | searchParams = { distributeCode: searchValue, auditStatus: params.auditStatus }; | ||
207 | saveData = searchValue; | ||
208 | mui.each(currHistory,function(index,item){ | ||
209 | if(item === searchValue){ | ||
210 | flag = true | ||
211 | } | ||
212 | }); | ||
213 | } | ||
214 | }else if(module === 'pickingOff'){ | ||
215 | if(location === 'main_list'){ | ||
216 | searchParams = { pickingOrderNo: searchValue, auditStatus: params.auditStatus }; | ||
217 | saveData = searchValue; | ||
218 | mui.each(currHistory,function(index,item){ | ||
219 | if(item === searchValue){ | ||
220 | flag = true | ||
221 | } | ||
222 | }); | ||
223 | } | ||
224 | }else{ | ||
225 | searchParams = { bigDrugCode : '',ctmmParam: searchValue }; | ||
226 | saveData = { bigDrugCode: '', ctmmParam: searchValue }; | ||
227 | mui.each(currHistory,function(index,item){ | ||
228 | if(item.bigDrugCode === saveData.bigDrugCode && item.ctmmParam === saveData.ctmmParam){ | ||
229 | flag = true; | ||
230 | } | ||
231 | }); | ||
232 | } | ||
233 | if(!flag){ | ||
234 | if(currHistory.length >= 10){ | ||
235 | currHistory.shift(); | ||
236 | } | ||
237 | currHistory.unshift(saveData) | ||
238 | } | ||
239 | searchList[module][location] = currHistory; | ||
240 | plus.storage.setItem('searchHistory',JSON.stringify(searchList)); | ||
241 | var page = undefined; | ||
242 | if(location === 'main_list'){ | ||
243 | page = plus.webview.getWebviewById(params.route); | ||
244 | mui.fire(page,'search',{ searchParams: JSON.stringify(searchParams) }); | ||
245 | }else{ | ||
246 | page = plus.webview.getWebviewById(params.id); | ||
247 | mui.fire(page,'sub_search',{ searchParams: JSON.stringify(searchParams) }); | ||
248 | } | ||
249 | setTimeout(function(){ | ||
250 | document.activeElement.blur(); // 隐藏软键盘 | ||
251 | },300) | ||
252 | plus.webview.currentWebview().close(); | ||
253 | } | ||
254 | }) | ||
255 | |||
256 | var lastChildNode = document.querySelector('.mui-placeholder').lastChild; | ||
257 | if(location === 'sub_list' || module === 'stock'){ | ||
258 | lastChildNode.innerText = '请输入通用名/商品名'; | ||
259 | }else{ | ||
260 | if((module === 'acceptance' || module === 'basicMedicine') && location === 'main_list'){ | ||
261 | lastChildNode.innerText = '请输入供应商' | ||
262 | }else if(module === 'grounding' || module === 'pickingOff'){ | ||
263 | lastChildNode.innerText = '请输入单号' | ||
264 | } | ||
265 | } | ||
266 | |||
267 | if(currHistory && currHistory.length){ | ||
268 | // 创建 删除历史记录标签 | ||
269 | var span = document.createElement('span'); | ||
270 | span.className = 'mui-icon mui-icon-trash clearHistory'; | ||
271 | document.querySelector('.history-title').appendChild(span); | ||
272 | |||
273 | // 创建 历史记录tag | ||
274 | mui.each(currHistory,function(index,item){ | ||
275 | var div = document.createElement('div'); | ||
276 | div.className = 'tag'; | ||
277 | if(location === 'sub_list'){ | ||
278 | div.innerHTML = item.hisDrugName; | ||
279 | div.setAttribute('data-hisDrugName',item.hisDrugName); | ||
280 | div.setAttribute('data-hisDrugCode',item.hisDrugCode) | ||
281 | } | ||
282 | if(module === 'acceptance' || module === 'basicMedicine'){ | ||
283 | if(location === 'main_list'){ | ||
284 | div.innerHTML = item.supplierName | ||
285 | div.setAttribute('data-supplierCode',item.supplierCode); | ||
286 | div.setAttribute('data-supplierName',item.supplierName); | ||
287 | } | ||
288 | }else if(module === 'grounding'){ | ||
289 | if(location === 'main_list'){ | ||
290 | div.innerHTML = item; | ||
291 | div.setAttribute('data-distributeCode',item) | ||
292 | } | ||
293 | |||
294 | }else if(module === 'pickingOff'){ | ||
295 | if(location === 'main_list'){ | ||
296 | div.innerHTML = item; | ||
297 | div.setAttribute('data-applyOrderNo',item) | ||
298 | } | ||
299 | }else{ | ||
300 | div.innerHTML = item.ctmmParam; | ||
301 | div.setAttribute('data-bigDrugCode',item.bigDrugCode); | ||
302 | div.setAttribute('data-ctmmParam',item.ctmmParam) | ||
303 | } | ||
304 | document.querySelector('.history-tags').appendChild(div) | ||
305 | |||
306 | }) | ||
307 | } | ||
308 | |||
309 | // 删除 历史记录 | ||
310 | $('.history-title').on('tap','.clearHistory',function(){ | ||
311 | var btnArray = ['否', '是']; | ||
312 | mui.confirm('是否确认删除历史搜索记录?', '确认', btnArray, function(e) { | ||
313 | if (e.index == 1) { | ||
314 | plus.nativeUI.showWaiting(); | ||
315 | setTimeout(function(){ | ||
316 | currHistory = []; | ||
317 | searchList[module][location] = currHistory; | ||
318 | plus.storage.setItem('searchHistory',JSON.stringify(searchList)); | ||
319 | var deleteChild = document.querySelector('.clearHistory'); | ||
320 | document.querySelector('.history-title').removeChild(deleteChild); | ||
321 | document.querySelector('.history-tags').innerHTML = ''; | ||
322 | plus.nativeUI.closeWaiting(); | ||
323 | },500) | ||
324 | } | ||
325 | },'div') | ||
326 | }); | ||
327 | |||
328 | // 点击tag 进行搜索 | ||
329 | $('.history-tags').on('tap','.tag',function(){ | ||
330 | var dataset = this.dataset; | ||
331 | console.log(dataset) | ||
332 | let searchParams = {}; | ||
333 | if(location === 'sub_list'){ | ||
334 | searchParams = { hisDrugCode : dataset.hisdrugcode,hisDrugName: dataset.hisdrugname,type: params.auditStatus,selected: params.selected } | ||
335 | } | ||
336 | if(module === 'acceptance' || module === 'basicMedicine'){ | ||
337 | if(location === 'main_list'){ | ||
338 | console.log('acceptance main_list') | ||
339 | if(dataset.suppliercode || dataset.suppliercode ===""){ | ||
340 | searchParams = { | ||
341 | supplierCode: dataset.suppliercode, | ||
342 | supplierName: dataset.suppliername | ||
343 | } | ||
344 | } | ||
345 | } | ||
346 | }else if(module === 'grounding'){ | ||
347 | if(location==='main_list'){ | ||
348 | if(dataset.distributecode || dataset.distributecode ===""){ | ||
349 | searchParams = { distributeCode: dataset.distributecode, auditStatus: params.auditStatus } | ||
350 | } | ||
351 | } | ||
352 | }else if(module === 'pickingOff'){ | ||
353 | if(location === 'main_list'){ | ||
354 | if(dataset.applyorderno || dataset.applyorderno ===""){ | ||
355 | searchParams = { pickingOrderNo: dataset.applyorderno, auditStatus: params.auditStatus } | ||
356 | } | ||
357 | } | ||
358 | }else{ | ||
359 | if(dataset.bigdrugcode || dataset.bigdrugcode ===""){ | ||
360 | searchParams = { bigDrugCode : dataset.bigdrugcode,ctmmParam: dataset.ctmmparam } | ||
361 | } | ||
362 | } | ||
363 | var page = undefined; | ||
364 | console.log(searchParams) | ||
365 | if(location === 'main_list'){ | ||
366 | page = plus.webview.getWebviewById(params.route); | ||
367 | console.log(page) | ||
368 | console.log(JSON.stringify(searchParams)) | ||
369 | mui.fire(page,'search',{ searchParams: JSON.stringify(searchParams) }); | ||
370 | }else{ | ||
371 | page = plus.webview.getWebviewById(params.id); | ||
372 | mui.fire(page,'sub_search',{ searchParams: JSON.stringify(searchParams),selectTabs: params.selectTabs }); | ||
373 | } | ||
374 | old_back(); | ||
375 | setTimeout(function(){ | ||
376 | document.activeElement.blur(); // 隐藏软键盘 | ||
377 | },500) | ||
378 | }) | ||
379 | |||
380 | |||
381 | $('.search_head').on('keyup','#search',function(e){ | ||
382 | var paramName = e.target.value; | ||
383 | var url = null, data = {}, contentType = null; | ||
384 | if(paramName){ | ||
385 | if(module === 'acceptance' || module === 'basicMedicine'){ | ||
386 | if(location === 'main_list'){ | ||
387 | url = '/a/depot/supplier/all'; | ||
388 | data = { ctmaSupplierName: paramName } | ||
389 | }else{ | ||
390 | // url = '/a/common/queryDrugByList'; | ||
391 | url = '/a/commonCheckQuery/commonInfoSearch'; | ||
392 | data = { | ||
393 | paramName: paramName, | ||
394 | // queryType: '4' | ||
395 | type: params.selectTabs === 1 ? 'cache_listVoWYS': 'cache_listVoYYS' | ||
396 | } | ||
397 | } | ||
398 | }else if(module === 'grounding'){ | ||
399 | if(location === 'main_list'){ | ||
400 | url = '/a/checkaccept/shelfListNoPage'; | ||
401 | data = { | ||
402 | distributeCode: paramName, | ||
403 | auditStatus: params.auditStatus | ||
404 | } | ||
405 | }else{ | ||
406 | // url = '/a/common/queryDrugByList'; | ||
407 | url = '/a/commonCheckQuery/commonInfoSearch'; | ||
408 | data = { | ||
409 | paramName: paramName, | ||
410 | type: params.selectTabs === 1 ?'cache_listVoWSJ':'cache_listVoYSJ' | ||
411 | // queryType: '4' | ||
412 | } | ||
413 | } | ||
414 | }else if(module === 'pickingOff'){ | ||
415 | if(location === 'main_list'){ | ||
416 | url = '/a/common/pickingorder/JdCodeList', | ||
417 | data = { | ||
418 | pickingOrderNo: paramName, | ||
419 | type: params.auditStatus | ||
420 | } | ||
421 | }else{ | ||
422 | // url = '/a/common/queryDrugByList'; | ||
423 | url = '/a/commonCheckQuery/commonInfoSearch' | ||
424 | data = { | ||
425 | paramName: paramName, | ||
426 | // queryType: '4' | ||
427 | type: params.selectTabs === 1 ?'Cache_notDetailList':'Cache_existDetailList' | ||
428 | } | ||
429 | } | ||
430 | }else{ | ||
431 | url = '/a/common/queryDrugByList'; | ||
432 | data = { | ||
433 | paramName: paramName, | ||
434 | queryType: '3' | ||
435 | } | ||
436 | } | ||
437 | console.log(url); | ||
438 | console.log(JSON.stringify(data)) | ||
439 | contentType = location === 'sub_list' ? 'application/x-www-form-urlencoded':'application/json'; | ||
440 | if( module === 'acceptance' || module === 'stock'){ | ||
441 | contentType = 'application/x-www-form-urlencoded' | ||
442 | } | ||
443 | console.log(JSON.stringify(data)) | ||
444 | mui.ajaxRequest(url,{ | ||
445 | type:"post", | ||
446 | data: data, | ||
447 | contentType: contentType, | ||
448 | success: function(data){ | ||
449 | if(data.code === 200){ | ||
450 | if(!data.data.length){ | ||
451 | $JQ('#noResult').show() | ||
452 | }else{ | ||
453 | $JQ('#noResult').hide() | ||
454 | } | ||
455 | let dataList = data.data; | ||
456 | createSelect(dataList,module,location); | ||
457 | } | ||
458 | }, | ||
459 | error: function(xhr,type,errorThrown){ | ||
460 | console.log(xhr.responseText) | ||
461 | } | ||
462 | }) | ||
463 | }else{ | ||
464 | document.querySelector('#ulList').innerHTML = ''; | ||
465 | } | ||
466 | }); | ||
467 | |||
468 | |||
469 | function createSelect(data,module,location){ | ||
470 | if(document.querySelector('.search-ullist')){ | ||
471 | var ulList = document.querySelector('.search-ullist'); | ||
472 | document.querySelector('#ulList').removeChild(ulList); | ||
473 | } | ||
474 | var ul = document.createElement('ul'); | ||
475 | ul.className = 'search-ullist'; | ||
476 | for(var i=0;i<data.length; i++){ | ||
477 | var li = document.createElement('li'); | ||
478 | li.className = 'search-ullist-li'; | ||
479 | if(location === 'sub_list'){ | ||
480 | // li.setAttribute('data-hisDrugCode',data[i].bigDrugCode); | ||
481 | // li.setAttribute('data-hisdrugname',data[i].ctmmParam); | ||
482 | // li.innerHTML = data[i].ctmmParam; | ||
483 | li.setAttribute('data-hisDrugCode',data[i].value); | ||
484 | li.setAttribute('data-hisdrugname',data[i].key); | ||
485 | li.innerHTML = data[i].key; | ||
486 | } | ||
487 | if(module === 'acceptance' || module === 'basicMedicine'){ | ||
488 | //验收 | ||
489 | if(location === 'main_list'){ | ||
490 | li.setAttribute('data-supplierCode',data[i].ctmaSupplierCode); | ||
491 | li.setAttribute('data-supplierName',data[i].ctmaSupplierName); | ||
492 | li.innerHTML = data[i].ctmaSupplierName; | ||
493 | } | ||
494 | }else if(module === 'grounding'){ | ||
495 | // 上架 | ||
496 | if(location === 'main_list'){ | ||
497 | li.setAttribute('data-distributeCode',data[i].distributeCode); | ||
498 | li.innerHTML = data[i].distributeCode; | ||
499 | } | ||
500 | }else if(module === 'pickingOff'){ | ||
501 | // 拣货下架 | ||
502 | if(location === 'main_list'){ | ||
503 | li.setAttribute('data-applyOrderNo',data[i]); | ||
504 | li.innerHTML = data[i]; | ||
505 | } | ||
506 | }else{ | ||
507 | // 库存查询 | ||
508 | li.setAttribute('data-ctmmParam',data[i].ctmmParam); | ||
509 | li.setAttribute('data-bigDrugCode',data[i].bigDrugCode); | ||
510 | li.innerText = data[i].ctmmParam; | ||
511 | } | ||
512 | ul.appendChild(li); | ||
513 | } | ||
514 | document.querySelector('#ulList').appendChild(ul) | ||
515 | } | ||
516 | |||
517 | //搜索结果电机 | ||
518 | $('#ulList').on('tap','.search-ullist-li',function(){ | ||
519 | let dataset = this.dataset; | ||
520 | console.log(currHistory) | ||
521 | console.log(dataset); | ||
522 | let searchParams = {}; | ||
523 | if(location === 'sub_list'){ | ||
524 | if(dataset.hisdrugcode){ | ||
525 | let flag = false; | ||
526 | let saveData = { | ||
527 | hisDrugCode: dataset.hisdrugcode, | ||
528 | hisDrugName: dataset.hisdrugname | ||
529 | } | ||
530 | mui.each(currHistory,function(index,item){ | ||
531 | if(item.hisDrugCode === dataset.hisdrugcode){ | ||
532 | flag = true | ||
533 | } | ||
534 | }); | ||
535 | if(!flag){ | ||
536 | console.log('sub_list,不存在'); | ||
537 | if(currHistory.length >= 10){ | ||
538 | currHistory.shift(); | ||
539 | } | ||
540 | currHistory.unshift(saveData) | ||
541 | } | ||
542 | searchParams = { hisDrugCode : dataset.hisdrugcode,hisDrugName: dataset.hisdrugname,type: params.auditStatus,selected: params.selected } | ||
543 | } | ||
544 | } | ||
545 | if(module === 'acceptance'){ | ||
546 | if(location === 'main_list'){ | ||
547 | if(dataset.suppliercode){ | ||
548 | let supplier = { | ||
549 | supplierCode: dataset.suppliercode, | ||
550 | supplierName: dataset.suppliername | ||
551 | } | ||
552 | searchParams = supplier; | ||
553 | var flag = false; | ||
554 | console.log(searchList) | ||
555 | mui.each(currHistory,function(index,item){ | ||
556 | if(item.supplierCode === supplier.supplierCode){ | ||
557 | flag = true; | ||
558 | } | ||
559 | }); | ||
560 | if(!flag){ | ||
561 | console.log('历史记录中当前项不存在') | ||
562 | if(currHistory.length >= 10){ | ||
563 | currHistory.shift() | ||
564 | } | ||
565 | currHistory.unshift(supplier) | ||
566 | } | ||
567 | } | ||
568 | } | ||
569 | } | ||
570 | else if(module === 'grounding'){ | ||
571 | if(location==='main_list'){ | ||
572 | if(dataset.distributecode){ | ||
573 | let flag = false; | ||
574 | mui.each(currHistory,function(index,item){ | ||
575 | if(item === dataset.distributecode){ | ||
576 | flag = true | ||
577 | } | ||
578 | }); | ||
579 | searchParams = { distributeCode: dataset.distributecode, auditStatus: params.auditStatus,selected: params.selected } | ||
580 | if(!flag){ | ||
581 | console.log('不存在'); | ||
582 | if(currHistory.length >= 10){ | ||
583 | currHistory.shift(); | ||
584 | } | ||
585 | currHistory.unshift(dataset.distributecode) | ||
586 | } | ||
587 | } | ||
588 | } | ||
589 | }else if(module === 'pickingOff'){ | ||
590 | if(location === 'main_list'){ | ||
591 | if(dataset.applyorderno){ | ||
592 | let flag = false; | ||
593 | mui.each(currHistory,function(index,item){ | ||
594 | if(item === dataset.applyorderno){ | ||
595 | flag = true; | ||
596 | } | ||
597 | }); | ||
598 | searchParams = { pickingOrderNo: dataset.applyorderno, auditStatus: params.auditStatus,selected: params.selected } | ||
599 | if(!flag){ | ||
600 | console.log('pickingOff---main_list,不存在'); | ||
601 | if(currHistory.length >= 10){ | ||
602 | currHistory.shift(); | ||
603 | } | ||
604 | currHistory.unshift(dataset.applyorderno) | ||
605 | } | ||
606 | } | ||
607 | } | ||
608 | }else{ | ||
609 | if(dataset.bigdrugcode){ | ||
610 | let flag = false; | ||
611 | mui.each(currHistory,function(index,item){ | ||
612 | if(item.bigDrugCode === dataset.bigdrugcode){ | ||
613 | flag = true; | ||
614 | } | ||
615 | }); | ||
616 | if(!flag){ | ||
617 | console.log('stockQuery---main_list,不存在'); | ||
618 | if(currHistory.length >= 10){ | ||
619 | currHistory.shift(); | ||
620 | } | ||
621 | currHistory.unshift({ bigDrugCode: dataset.bigdrugcode,ctmmParam: dataset.ctmmparam }) | ||
622 | } | ||
623 | searchParams = { bigDrugCode : dataset.bigdrugcode,ctmmParam: dataset.ctmmparam } | ||
624 | } | ||
625 | } | ||
626 | searchList[module][location] = currHistory; | ||
627 | plus.storage.setItem('searchHistory',JSON.stringify(searchList)); | ||
628 | var page = undefined; | ||
629 | if(location === 'main_list'){ | ||
630 | page = plus.webview.getWebviewById(params.route); | ||
631 | console.log(JSON.stringify(searchParams)) | ||
632 | mui.fire(page,'search',{ searchParams: JSON.stringify(searchParams) }); | ||
633 | }else{ | ||
634 | page = plus.webview.getWebviewById(params.id); | ||
635 | // console.log(page); | ||
636 | console.log(JSON.stringify(searchParams)) | ||
637 | mui.fire(page,'sub_search',{ searchParams: JSON.stringify(searchParams),selectTabs: params.selectTabs}); | ||
638 | } | ||
639 | old_back(); | ||
640 | // plus.webview.currentWebview().close(); | ||
641 | setTimeout(function(){ | ||
642 | document.activeElement.blur(); // 隐藏软键盘 | ||
643 | },500) | ||
644 | }); | ||
645 | |||
646 | }) | ||
647 | |||
648 | })(mui,jQuery); | ||
649 | |||
650 | </script> | ||
651 | </body> | ||
652 | |||
653 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/batch_list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='ground_batch_list'> | ||
3 | {{ each list value i}} | ||
4 | <div class="batch-wrapper"> | ||
5 | <div class="checkoneParent"> | ||
6 | <div class="mui-checkbox mui-left" style="width: 48px;height:48px;padding:50px 0 ;display: block;"> | ||
7 | <input name="selected" class="checkone" type="checkbox" data-index="{{ (page-1)*pageSize + i }}" style="top: 35px;left: 10px;"> | ||
8 | </div> | ||
9 | </div> | ||
10 | <div class="am-card scrollList-item am-card-full" style="width: 90%;border: none;" | ||
11 | data-id="{{ value.id }}" data-upParentId="{{ value.upParentId?value.upParentId:'' }}" > | ||
12 | <div class="am-card-header"> | ||
13 | <div class="am-card-header-content"> | ||
14 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
15 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
16 | </div> | ||
17 | <div class="am-card-header-extra"> | ||
18 | <span>{{ value.type }}</span> | ||
19 | </div> | ||
20 | </div> | ||
21 | <div class="am-card-body"> | ||
22 | <div class="am-flexbox am-flexbox-align-center"> | ||
23 | <div class="am-flexbox-item"> | ||
24 | 单位:<span>{{ value.replanUnit }}</span> | ||
25 | </div> | ||
26 | <div class="am-flexbox-item"> | ||
27 | 数量:<span class="groundNum">{{ value.realReceiveQuantiry }}</span> | ||
28 | </div> | ||
29 | <div class="am-flexbox-item"> | ||
30 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
31 | </div> | ||
32 | </div> | ||
33 | {{ if hasGround }} | ||
34 | {{ if value.realNum && value.realNum.length && value.realNum.length > 1}} | ||
35 | {{ each value.realNum num index}} | ||
36 | <div class="editForm" style="display: block;" data-upParentId="{{ value.upParentId[index]?value.upParentId[index]:0 }}" | ||
37 | data-productBatchNo = "{{value.productBatchNo}}" data-id="{{value.id}}"> | ||
38 | <div class="am-flexbox am-flexbox-align-center"> | ||
39 | <div class="am-flexbox-item"> | ||
40 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
41 | <div class="am-list-line"> | ||
42 | {{ if value.upParentId[index] != null }} | ||
43 | <div class="am-input-label am-input-label-4 font-warning" style="width: 56px;">备选货位:</div> | ||
44 | {{ else }} | ||
45 | <div class="am-input-label am-input-label-4 font-warning" style="width: 56px;">指示货位:</div> | ||
46 | {{ /if }} | ||
47 | <div class="am-input-control"> | ||
48 | <select class="editInput select_actualStore" value="{{ value.replanStore }}"> | ||
49 | {{ each value.acceptoodsVo item i }} | ||
50 | {{ if value.realReceiveStore[index] === item.id }} | ||
51 | <option value="{{ item.id }}" selected="selected">{{ item.positionName }}</option> | ||
52 | {{ else }} | ||
53 | <option value="{{ item.id }}">{{ item.positionName }}</option> | ||
54 | {{ /if }} | ||
55 | {{ /each }} | ||
56 | </select> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | <div class="am-flexbox-item"> | ||
62 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
63 | <div class="am-list-line"> | ||
64 | <div class="am-input-label am-input-label-6 font-warning">实际上架数量:</div> | ||
65 | <div class="am-input-control"> | ||
66 | <input type="tel" value="{{ value.realNum[index] ? value.realNum[index] : 0}}" placeholder="请输入" data-id="{{value.id}}" data-oldValue = "{{value.realNum[index] ? value.realNum[index] : 0}}" data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" class="realNum flex-item-input" /> | ||
67 | </div> | ||
68 | </div> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | </div> | ||
73 | {{/each}} | ||
74 | {{ else }} | ||
75 | <div class="editForm" style="display: block;" data-upParentId="{{ value.upParentId?value.upParentId:0 }}" | ||
76 | data-productBatchNo = "{{value.productBatchNo}}" data-id="{{value.id}}"> | ||
77 | <div class="am-flexbox am-flexbox-align-center"> | ||
78 | <div class="am-flexbox-item"> | ||
79 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
80 | <div class="am-list-line"> | ||
81 | {{ if value.upParentId != null }} | ||
82 | <div class="am-input-label am-input-label-4 font-warning" style="width: 56px;">备选货位:</div> | ||
83 | {{ else }} | ||
84 | <div class="am-input-label am-input-label-4 font-warning" style="width: 56px;">指示货位:</div> | ||
85 | {{ /if }} | ||
86 | <div class="am-input-control"> | ||
87 | <select class="editInput select_actualStore" value="{{ value.replanStore }}"> | ||
88 | {{ each value.acceptoodsVo item i }} | ||
89 | {{ if value.realReceiveStore === item.id }} | ||
90 | <option value="{{ item.id }}" selected="selected">{{ item.positionName }}</option> | ||
91 | {{ else }} | ||
92 | <option value="{{ item.id }}">{{ item.positionName }}</option> | ||
93 | {{ /if }} | ||
94 | {{ /each }} | ||
95 | </select> | ||
96 | </div> | ||
97 | </div> | ||
98 | </div> | ||
99 | </div> | ||
100 | <div class="am-flexbox-item"> | ||
101 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
102 | <div class="am-list-line"> | ||
103 | <div class="am-input-label am-input-label-6 font-warning">实际上架数量:</div> | ||
104 | <div class="am-input-control"> | ||
105 | <input type="tel" value="{{ value.realNum ? value.realNum : 0}}" placeholder="请输入" data-id="{{value.id}}" data-oldValue = "{{value.realNum ? value.realNum : 0}}" data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" class="realNum flex-item-input" /> | ||
106 | </div> | ||
107 | </div> | ||
108 | </div> | ||
109 | </div> | ||
110 | </div> | ||
111 | </div> | ||
112 | {{ /if }} | ||
113 | {{ /if }} | ||
114 | <div class="am-flexbox am-flexbox-align-center"> | ||
115 | <div class="am-flexbox-item"> | ||
116 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
117 | </div> | ||
118 | <div id='productBatchNo'> | ||
119 | <span style="display: none;">{{ value.productBatchNo }}</span> | ||
120 | </div> | ||
121 | </div> | ||
122 | </div> | ||
123 | </div> | ||
124 | </div> | ||
125 | {{/each}} | ||
126 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/detail_tpl.html
0 → 100644
1 | <script type="text/html" id='detail_tpl'> | ||
2 | <div style="margin-top:10px;"> | ||
3 | {{ each list value i }} | ||
4 | {{ if value.upParentId == null }} | ||
5 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
6 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
7 | <a class="mui-navigate-right" href="#">单据信息</a> | ||
8 | <div class="mui-collapse-content"> | ||
9 | <div class="mui-input-row"> | ||
10 | <label>配送单/验收单号</label> | ||
11 | <p class="detailRow_content">{{ distributeCode ? distributeCode: '' }}</p> | ||
12 | </div> | ||
13 | <div class="mui-input-row"> | ||
14 | <label>状态</label> | ||
15 | <p class="detailRow_content">{{ value.upFinishType && value.upFinishType===1 ? '已上架': ' 待上架' }}</p> | ||
16 | </div> | ||
17 | <div class="mui-input-row"> | ||
18 | <label>验收时间</label> | ||
19 | <p class="detailRow_content">{{ receptionTime ? receptionTime: ''}}</p> | ||
20 | </div> | ||
21 | <!--<div class="mui-input-row"> | ||
22 | <label>上架人</label> | ||
23 | <p class="detailRow_content">{{ createname ? createname: '' }}</p> | ||
24 | </div>--> | ||
25 | <div class="mui-input-row"> | ||
26 | <label>上架时间</label> | ||
27 | <p class="detailRow_content">{{ upUserDate ? upUserDate: ''}}</p> | ||
28 | </div> | ||
29 | </div> | ||
30 | </li> | ||
31 | </ul> | ||
32 | {{/if}} | ||
33 | |||
34 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
35 | <li class="mui-table-view-cell mui-collapse mui-active goodsInfo"> | ||
36 | {{ if value.upParentId != null }} | ||
37 | <a class="mui-navigate-right" href="#">产品信息<span style="color: #f5222d;">(备选上架货位)</span></a> | ||
38 | {{ else }} | ||
39 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
40 | {{ /if }} | ||
41 | <div class="mui-collapse-content"> | ||
42 | <div class="mui-input-row"> | ||
43 | <label>通用名称</label> | ||
44 | <p class="detailRow_content">{{ value.ctmmGenericName }}</p> | ||
45 | </div> | ||
46 | <div class="mui-input-row"> | ||
47 | <label>规格</label> | ||
48 | <p class="detailRow_content">{{value.ctmmSpecification}}</p> | ||
49 | </div> | ||
50 | <div class="mui-input-row"> | ||
51 | <label>生产厂家</label> | ||
52 | <p class="detailRow_content">{{value.ctmmManufacturerName}}</p> | ||
53 | </div> | ||
54 | <div class="mui-input-row"> | ||
55 | <label>生产批号</label> | ||
56 | <p class="detailRow_content">{{value.productBatchNo}}</p> | ||
57 | </div> | ||
58 | <div class="mui-input-row"> | ||
59 | <label>生产日期</label> | ||
60 | <p class="detailRow_content">{{value.realProductTime}}</p> | ||
61 | </div> | ||
62 | <div class="mui-input-row"> | ||
63 | <label>有效期至</label> | ||
64 | <p class="detailRow_content">{{value.realValidEndDate}}</p> | ||
65 | </div> | ||
66 | <div class="mui-input-row"> | ||
67 | <label>包装规格</label> | ||
68 | <p class="detailRow_content">{{value.packageSpecification}}</p> | ||
69 | </div> | ||
70 | <div class="mui-input-row"> | ||
71 | <label>单位</label> | ||
72 | <p class="detailRow_content">{{value.unit}}</p> | ||
73 | </div> | ||
74 | <div class="mui-input-row"> | ||
75 | <label>指示货位</label> | ||
76 | <p class="detailRow_content">{{value.actualStore}}</p> | ||
77 | </div> | ||
78 | <div class="mui-input-row"> | ||
79 | {{ if value.upFinishType !== 1 }} | ||
80 | {{ if value.upParentId != null }} | ||
81 | <label class="font-warning">备选上架实际货位</label> | ||
82 | {{ else }} | ||
83 | <label class="font-warning">实际货位</label> | ||
84 | {{ /if }} | ||
85 | <select class="editInput realReceiveStore" style="float: left;width: 40%;"> | ||
86 | {{ each value.acceptoodsVo item i }} | ||
87 | {{ if value.realReceiveStore === item.id }} | ||
88 | <option value="{{ item.id }}" selected="selected">{{ item.positionName }}</option> | ||
89 | {{ else }} | ||
90 | <option value="{{ item.id }}">{{ item.positionName }}</option> | ||
91 | {{ /if }} | ||
92 | {{ /each }} | ||
93 | </select> | ||
94 | <a href="#modal" class="mui-pull-right qrcode" id="qrcode" onclick="clicked()" style="height: 45px;padding: 8px 25px;"> | ||
95 | <img src="../../assest/qrcode.png" width="32" height="32"/> | ||
96 | </a> | ||
97 | {{ else }} | ||
98 | {{ if value.upParentId != null }} | ||
99 | <label>备选上架实际货位</label> | ||
100 | {{ else }} | ||
101 | <label>实际货位</label> | ||
102 | {{ /if }} | ||
103 | <p class="detailRow_content">{{value.realReceiveStoreName}}</p> | ||
104 | {{ /if }} | ||
105 | |||
106 | </div> | ||
107 | |||
108 | <div class="mui-input-row"> | ||
109 | <label>批准文号</label> | ||
110 | <p class="detailRow_content">{{value.approvalNo}}</p> | ||
111 | </div> | ||
112 | <div class="mui-input-row"> | ||
113 | <label>数量</label> | ||
114 | <p class="detailRow_content">{{value.realReceiveQuantiry}}</p> | ||
115 | </div> | ||
116 | <div class="mui-input-row"> | ||
117 | <!-- <label>实际上架数量</label> | ||
118 | <p class="detailRow_content">{{value.realNum}}</p> --> | ||
119 | {{ if value.upFinishType !== 1 }} | ||
120 | {{ if value.upParentId != null }} | ||
121 | <label class="font-warning">备选货位实际上架数量</label> | ||
122 | {{ else }} | ||
123 | <label class="font-warning">实际上架数量</label> | ||
124 | {{ /if }} | ||
125 | <input type="tel" class="mui-input editInput realNum" value="{{ value.realNum ? value.realNum : 0}}" placeholder="请输入" data-id="{{value.id}}" data-oldValue = "{{value.realNum}}" data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" /> | ||
126 | {{ else }} | ||
127 | {{ if value.upParentId != null }} | ||
128 | <label>备选货位实际上架数量</label> | ||
129 | {{ else }} | ||
130 | <label>实际上架数量</label> | ||
131 | {{ /if }} | ||
132 | <p class="detailRow_content">{{value.realNum}}</p> | ||
133 | {{ /if }} | ||
134 | </div> | ||
135 | </div> | ||
136 | </li> | ||
137 | </ul> | ||
138 | {{ /each }} | ||
139 | </div> | ||
140 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/ground_batch.html
0 → 100644
1 | <!--批量上架 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="batch_list_tpl.html" id="batch_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <div class="mui-content"> | ||
17 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
18 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
19 | <label class="mui-pull-right theme_back_font">返回</label> | ||
20 | </a> | ||
21 | <h1 class="mui-title themes_title">药品信息</h1> | ||
22 | </header> | ||
23 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
24 | <div class="home-card-title">待上架</div> | ||
25 | </div> | ||
26 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;"> | ||
27 | <div class="mui-slider-group"> | ||
28 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
29 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
30 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
31 | <ul class="mui-table-view"> | ||
32 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
33 | |||
34 | </li> | ||
35 | </ul> | ||
36 | </div> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div class="fix_bottom-wraper"> | ||
42 | <div class="fix-bottom-content"> | ||
43 | <div class="mui-checkbox mui-left"> | ||
44 | <label>全选</label> | ||
45 | <input name="checkboxAll" value="1" id="checkall" type="checkbox" style="top: -5px;z-index: 10;"> | ||
46 | </div> | ||
47 | <span style="margin-left: 8px;">已选中 <label class="total"> 0 </label> 项</span> | ||
48 | </div> | ||
49 | <a href="javascript:;" class="btn acceptance fix-bottom-extra"> 上 架 </a> | ||
50 | </div> | ||
51 | </div> | ||
52 | |||
53 | <script src="../../js/mui.min.js"></script> | ||
54 | <script src="../../js/jquery.min.js" ></script> | ||
55 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
56 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
57 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
58 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
59 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
60 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
61 | <script type="text/javascript"> | ||
62 | if(window.plus) { | ||
63 | plusready(); | ||
64 | } else { | ||
65 | document.addEventListener('plusready', plusready, false); | ||
66 | } | ||
67 | function plusready() { | ||
68 | plus.key.addEventListener('backbutton',function(){ | ||
69 | plus.webview.currentWebview().close(); | ||
70 | }) | ||
71 | } | ||
72 | |||
73 | (function($,$JQ) { | ||
74 | /* 渲染模板 */ | ||
75 | var checkType, type, auditStatus// 验收单类型 // 验收状态 1 待验收 2 已验收 | ||
76 | |||
77 | |||
78 | $.init({ | ||
79 | beforeback:function(){ | ||
80 | var list = plus.webview.currentWebview().opener(); | ||
81 | mui.fire(list, 'pagefresh',{ selectTabs: 0 }); | ||
82 | return true; | ||
83 | } | ||
84 | }); | ||
85 | var deceleration = mui.os.ios?0.003:0.0009; | ||
86 | $('.mui-scroll-wrapper').scroll({ | ||
87 | bounce: true, | ||
88 | indicators: true, //是否显示滚动条 | ||
89 | deceleration:deceleration | ||
90 | }); | ||
91 | |||
92 | |||
93 | var page = 1, | ||
94 | totalPage = undefined, | ||
95 | pageSize = 15, | ||
96 | isMore = true, | ||
97 | checkType = undefined, | ||
98 | type = undefined, | ||
99 | acceptList = [],// 数据 | ||
100 | distributeCode = undefined, | ||
101 | upFinishType = undefined; | ||
102 | var params, selectedRows = [],selecteIndex = []; | ||
103 | var _url = '/a/shelfInfo/shelfInfoList', // '/a/checkaccept/shelfList', | ||
104 | groundUrl = '/a/checkacceptdetail/finish'; | ||
105 | |||
106 | // 模板加载 | ||
107 | var utils = new Utils(); | ||
108 | utils.appendModule('#batch_tpl'); | ||
109 | |||
110 | /* | ||
111 | 下拉刷新 | ||
112 | * */ | ||
113 | function pulldownRefresh(){ | ||
114 | document.querySelector('.total').innerText = 0; | ||
115 | document.querySelector('#checkall').checked = false; | ||
116 | selecteIndex = []; | ||
117 | var self = this; | ||
118 | page = 1; | ||
119 | var postData = { | ||
120 | distributeCode: distributeCode, | ||
121 | upFinishType:upFinishType, | ||
122 | pageNo: page, | ||
123 | pageSize: pageSize | ||
124 | }; | ||
125 | console.log(JSON.stringify(postData)) | ||
126 | mui.ajaxRequest(_url,{ | ||
127 | type: 'POST', | ||
128 | data: postData, | ||
129 | success: function(data){ | ||
130 | var resData = data.data; | ||
131 | var showDatas = filterDatas(resData); | ||
132 | resData.page = page; | ||
133 | resData.pageSize = pageSize; | ||
134 | resData.hasGround = true; | ||
135 | acceptList = resData.list | ||
136 | totalPage = data.totalPage; | ||
137 | console.log(JSON.stringify(data)) | ||
138 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.count/resData.pageSize < 1)){ | ||
139 | isMore = false; | ||
140 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
141 | self.endPullDownToRefresh(true); | ||
142 | }else{ | ||
143 | isMore = true; | ||
144 | self.endPullDownToRefresh(false); | ||
145 | self.refresh(true); | ||
146 | } | ||
147 | console.log(JSON.stringify(data.data.list)) | ||
148 | return template(showDatas, false) | ||
149 | }, | ||
150 | error: function(xhr,type,errorThrown){ | ||
151 | console.log(xhr.responseText) | ||
152 | } | ||
153 | }); | ||
154 | } | ||
155 | function template(data, insertType,render) { | ||
156 | utils.innerTplHtml('ground_batch_list', '.mui-tab1', data, insertType); | ||
157 | if(render){ | ||
158 | var checkList = document.querySelectorAll('.checkone'); | ||
159 | console.log(selecteIndex,'selecteIndex') | ||
160 | mui.each(selecteIndex, function(index, item) { | ||
161 | checkList[item].checked = true; | ||
162 | }); | ||
163 | } | ||
164 | } | ||
165 | /* 过滤还有备选货位的数据 */ | ||
166 | function filterDatas(datas){ | ||
167 | var list = datas.list; | ||
168 | if(list && list.length && list.length > 1){ | ||
169 | var list = datas.list,_list = []; | ||
170 | for(var i = 0,len = list.length;i<len;i++){ | ||
171 | //存在备选上架货位 | ||
172 | var realReceiveStore = [],realNum = [],storeType= [],upParentId = [],actualStore = [],realReceiveStoreName = []; | ||
173 | if(list[i].upParentId){ | ||
174 | var outList = list.filter(function(item,index){ | ||
175 | return (index > i && item.id == list[i].id && item.upParentId == null); | ||
176 | }); | ||
177 | var innerList = _list.filter(function(item,index){ | ||
178 | return (item.id == list[i].id && item.upParentId == null); | ||
179 | }); | ||
180 | list.forEach(function(item,index){ | ||
181 | if(list[i].id == item.id){ | ||
182 | realReceiveStore.push(item.realReceiveStore); | ||
183 | var realnum = item.realNum; | ||
184 | if(!item.upParentId){ | ||
185 | realnum = item.realReceiveQuantiry; | ||
186 | } | ||
187 | realNum.push(realnum); | ||
188 | storeType.push(item.storeType); | ||
189 | upParentId.push(item.upParentId); | ||
190 | actualStore.push(item.actualStore); | ||
191 | realReceiveStoreName.push(item.realReceiveStoreName); | ||
192 | } | ||
193 | }) | ||
194 | if(innerList[0]){ | ||
195 | innerList[0].realReceiveStore = realReceiveStore; | ||
196 | innerList[0].realNum = realNum; | ||
197 | var _store = storeType.map(function(item,index){ | ||
198 | var text = "货位"; | ||
199 | if(item == "补货指示货位"){ | ||
200 | text = "指示货位"; | ||
201 | }else if(item == "备选上架货位"){ | ||
202 | text = "备选货位"; | ||
203 | } | ||
204 | return text; | ||
205 | }) | ||
206 | innerList[0].storeType = _store; | ||
207 | innerList[0].upParentId = upParentId; | ||
208 | innerList[0].actualStore = actualStore; | ||
209 | innerList[0].realReceiveStoreName = realReceiveStoreName; | ||
210 | } | ||
211 | }else{ | ||
212 | if(!list[i].realNum){ | ||
213 | list[i].realNum = list[i].realReceiveQuantiry; | ||
214 | } | ||
215 | _list.push(list[i]) | ||
216 | } | ||
217 | } | ||
218 | datas.list = _list; | ||
219 | return datas; | ||
220 | }else{ | ||
221 | if(list[0] && !list[0].realNum){ | ||
222 | list[0].realNum = list[0].realReceiveQuantiry; | ||
223 | } | ||
224 | return datas; | ||
225 | } | ||
226 | } | ||
227 | /* | ||
228 | * 上拉加载更多 | ||
229 | * */ | ||
230 | function pullupRefresh(){ | ||
231 | document.querySelector('#checkall').checked = false; | ||
232 | var self = this; | ||
233 | console.log(isMore,'isMore') | ||
234 | if(isMore){ | ||
235 | page++; | ||
236 | mui.ajaxRequest(_url,{ | ||
237 | type: 'POST', | ||
238 | data:{ | ||
239 | distributeCode: distributeCode, | ||
240 | upFinishType,upFinishType, | ||
241 | pageNo: page, | ||
242 | pageSize: pageSize | ||
243 | }, | ||
244 | success: function(data){ | ||
245 | var resData = data.data; | ||
246 | var showDatas = filterDatas(resData); | ||
247 | resData.page = page; | ||
248 | resData.pageSize = pageSize; | ||
249 | resData.hasGround = true; | ||
250 | mui.each(resData.list,function(index,item){ | ||
251 | acceptList.push(item) | ||
252 | }); | ||
253 | if(resData.pageNo === resData.totalPage){ | ||
254 | isMore = false; | ||
255 | self.endPullUpToRefresh(true); | ||
256 | }else{ | ||
257 | isMore = true; | ||
258 | self.endPullUpToRefresh(false); | ||
259 | self.refresh(true); | ||
260 | } | ||
261 | return template(showDatas, true,'render') | ||
262 | |||
263 | }, | ||
264 | error: function(xhr,type,errorThrown){ | ||
265 | console.log(xhr.responseText) | ||
266 | } | ||
267 | }); | ||
268 | }else{ | ||
269 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
270 | self.endPullUpToRefresh(true); | ||
271 | } | ||
272 | |||
273 | } | ||
274 | |||
275 | $.plusReady(function(){ | ||
276 | |||
277 | window.addEventListener('pagefresh',function(event){ | ||
278 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
279 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
280 | }); | ||
281 | |||
282 | |||
283 | var self = plus.webview.currentWebview(); | ||
284 | params = JSON.parse(self.params);//获得参数 | ||
285 | distributeCode = params.distributeCode; | ||
286 | upFinishType = params.upFinishType; | ||
287 | console.log(params.upFinishType) | ||
288 | console.log(JSON.stringify(params)) | ||
289 | // showData(params); | ||
290 | |||
291 | //循环初始化所有下拉刷新,上拉加载。 | ||
292 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
293 | |||
294 | $(pullRefreshEl).pullToRefresh({ | ||
295 | down: { | ||
296 | style:'circle', | ||
297 | contentdown : "下拉可以刷新", | ||
298 | contentover : "释放立即刷新", | ||
299 | contentrefresh : "正在刷新...", | ||
300 | callback: pulldownRefresh | ||
301 | }, | ||
302 | up: { | ||
303 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
304 | contentnomore:'没有更多数据', | ||
305 | callback: pullupRefresh | ||
306 | } | ||
307 | }); | ||
308 | }); | ||
309 | // 第一个tab 默认加载一次数据 | ||
310 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
311 | |||
312 | |||
313 | // 全选 及反选 | ||
314 | $('.fix_bottom-wraper').on('click','#checkall',function(){ | ||
315 | selecteIndex = []; | ||
316 | var checkList = document.querySelectorAll('.checkone'); | ||
317 | if (document.querySelector('#checkall').checked){ | ||
318 | // 全选 | ||
319 | mui.each(checkList,function(index,item){ | ||
320 | item.checked = true; | ||
321 | selecteIndex.push(index); | ||
322 | }); | ||
323 | document.querySelector('.total').innerText = checkList.length; | ||
324 | selectedRows = acceptList; | ||
325 | } else { | ||
326 | // 取消全选 | ||
327 | mui.each(checkList,function(index,item){ | ||
328 | item.checked = false | ||
329 | }); | ||
330 | document.querySelector('.total').innerText = 0; | ||
331 | selectedRows = []; | ||
332 | selecteIndex = [] | ||
333 | } | ||
334 | console.log(selectedRows); | ||
335 | console.log(selecteIndex) | ||
336 | }); | ||
337 | |||
338 | // 复选框选中 | ||
339 | $('#slider').on('change', '.checkone',function(){ | ||
340 | selectedRows = [],selecteIndex = []; | ||
341 | // let currentCheckbox = $JQ(this).find('.checkone'); | ||
342 | // if(currentCheckbox.prop('checked')){ | ||
343 | // currentCheckbox.prop('checked',false) | ||
344 | // }else{ | ||
345 | // currentCheckbox.prop('checked',true) | ||
346 | // } | ||
347 | var checkList = document.querySelectorAll('.checkone') | ||
348 | var checkAll = document.querySelector('#checkall'); | ||
349 | var checkLen = checkList.length; | ||
350 | var len = 0; | ||
351 | mui.each(checkList,function(index,item){ | ||
352 | if(item.checked){ | ||
353 | len++; | ||
354 | // selectedRows.push(acceptList[index]); | ||
355 | selecteIndex.push(this.dataset.index) | ||
356 | } | ||
357 | }); | ||
358 | checkAll.checked = len === checkLen ? true: false; | ||
359 | document.querySelector('.total').innerText = len; | ||
360 | console.log(selectedRows); | ||
361 | console.log(selecteIndex) | ||
362 | }) | ||
363 | // 绑定事件 --确认验收 | ||
364 | $('.fix_bottom-wraper').on('tap','.acceptance',function(){ | ||
365 | |||
366 | document.activeElement.blur(); // 隐藏软键盘 | ||
367 | console.log(document.querySelector('.total').innerText) | ||
368 | if(Number(document.querySelector('.total').innerText) === 0){ | ||
369 | return mui.alert('请至少选中一项','警告',['确认'],function(){},'div') | ||
370 | } | ||
371 | var cards = document.querySelectorAll('.am-card'); | ||
372 | var selectedCards = []; | ||
373 | mui.each(selecteIndex,function(index,item){ | ||
374 | selectedCards.push(cards[item]); | ||
375 | }); | ||
376 | console.log(selectedCards); | ||
377 | var edit = []; | ||
378 | mui.each(selectedCards,function(index,item){ | ||
379 | var _edit = item.querySelectorAll('.editForm'); | ||
380 | for(var i = 0,len = _edit.length;i<len;i++){ | ||
381 | edit.push(_edit[i]); | ||
382 | } | ||
383 | }); | ||
384 | let detailListVo = [], submitData = {}; | ||
385 | mui.each(edit,function(index,item){ | ||
386 | var postData = {}; | ||
387 | var id = item.dataset.id; | ||
388 | var productBatchNo = item.dataset.productbatchno; | ||
389 | var upParentId = item.dataset.upparentid; | ||
390 | if(typeof upParentId == "string" && upParentId == "0"){ | ||
391 | upParentId = ""; | ||
392 | } | ||
393 | var realNum = $JQ(item).find('.realNum').val()?$JQ(item).find('.realNum').val()-0:0; | ||
394 | var realReceiveStore =item.querySelector('.select_actualStore').value; | ||
395 | console.log(productBatchNo) | ||
396 | console.log(realNum); | ||
397 | console.log(realReceiveStore,'realReceiveStore'); | ||
398 | postData.id = id; | ||
399 | postData.realNum = realNum; | ||
400 | postData.productBatchNo = productBatchNo; | ||
401 | postData.realReceiveStore = realReceiveStore; | ||
402 | postData.upParentId = upParentId; | ||
403 | detailListVo.push(postData); | ||
404 | }); | ||
405 | submitData.detailListVo = detailListVo; | ||
406 | submitData.distributeCode = distributeCode; | ||
407 | console.log(submitData) | ||
408 | var btnArray = ['否', '是']; | ||
409 | mui.confirm('确认批量上架选中的药品?', '确认', btnArray, function(e) { | ||
410 | if (e.index == 1) { | ||
411 | |||
412 | mui.ajaxRequest(groundUrl,{ | ||
413 | type: 'POST', | ||
414 | data: submitData, | ||
415 | showWaiting: true, | ||
416 | contentType: "application/json", | ||
417 | success: function(data){ | ||
418 | |||
419 | if(data.code === 200){ | ||
420 | //mui.toast('上架成功',{ type: 'div' }); | ||
421 | mui.alert(data.data); | ||
422 | $JQ('.total').text(0); | ||
423 | document.querySelector('#checkall').checked = false; | ||
424 | setTimeout(function(){ | ||
425 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
426 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
427 | },300) | ||
428 | }else{ | ||
429 | mui.alert(data.msg) | ||
430 | } | ||
431 | }, | ||
432 | error: function(xhr,type,errorThrown){ | ||
433 | console.log(xhr.responseText) | ||
434 | } | ||
435 | }) | ||
436 | } | ||
437 | },'div') | ||
438 | }); | ||
439 | //绑定输入实际上架数验证 | ||
440 | |||
441 | $JQ('#slider').on('keyup','.realNum',function(){ | ||
442 | |||
443 | var _this = this,$JQthis = $JQ(this); | ||
444 | var id = _this.dataset.id,realReceiveQuantiry = _this.dataset.realreceivequantiry-0,oldValue = _this.dataset.oldvalue-0; | ||
445 | _this.value = _this.value.replace(/\D/g,'')-0; | ||
446 | var count = 0; | ||
447 | var eles = mui(".am-input-control input[data-id='"+id+"']"),len = eles.length; | ||
448 | eles.each(function (e) { | ||
449 | count += this.value-0; | ||
450 | }); | ||
451 | if(count > realReceiveQuantiry){ | ||
452 | if(len == 2){ | ||
453 | var text1 = "该药品存在“补货指示货位”和“备选上架货位”,两货位实际上架数量相加不能大于指示数量"+realReceiveQuantiry+"!"; | ||
454 | mui.alert(text1,'提示','确定',function (e) { | ||
455 | _this.value = oldValue; | ||
456 | },'div') | ||
457 | }else{ | ||
458 | var text1 = "实际上架数量不能大于指示数量"+realReceiveQuantiry+"!"; | ||
459 | mui.alert(text1,'提示','确定',function (e) { | ||
460 | _this.value = oldValue; | ||
461 | },'div') | ||
462 | } | ||
463 | } | ||
464 | }); | ||
465 | |||
466 | |||
467 | |||
468 | }); | ||
469 | |||
470 | })(mui,jQuery); | ||
471 | |||
472 | </script> | ||
473 | </body> | ||
474 | |||
475 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/ground_detail.html
0 → 100644
1 | <!--上架 - 详情页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./detail_tpl.html" id="ground_detail_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/check.css" rel="stylesheet"/> | ||
12 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
13 | |||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <div class="mui-content detailRow"> | ||
18 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
19 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
20 | <li class="mui-table-view-cell mui-collapse"> | ||
21 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
22 | <div class="mui-collapse-content"> | ||
23 | |||
24 | </div> | ||
25 | </li> | ||
26 | </ul> | ||
27 | </form> | ||
28 | |||
29 | </div> | ||
30 | |||
31 | <script src="../../js/mui.min.js"></script> | ||
32 | <script src="../../js/jquery.min.js"></script> | ||
33 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
34 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
35 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
36 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
37 | <script type="text/javascript"> | ||
38 | function clicked(){ | ||
39 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码上架' }) | ||
40 | } | ||
41 | var acceptoodsVo = [];//定义实际货位的列表集合 | ||
42 | /*获取二维码返回值*/ | ||
43 | function scaned(t, r, f) { | ||
44 | console.log(r);//返回二维码读取的数据 | ||
45 | var list = acceptoodsVo; | ||
46 | if(r && Array.isArray(list) && list.length >0){ | ||
47 | var locationCode = list.filter(function(item){ | ||
48 | return item.positionName == r; | ||
49 | })[0]; | ||
50 | if(locationCode){ | ||
51 | mui.alert('扫描成功!','提示','确定',function (e) { | ||
52 | //jQuery(".realReceiveStore").val(locationCode.id); | ||
53 | document.getElementsByClassName('realReceiveStore')[0].value = locationCode.id; | ||
54 | },'div') | ||
55 | }else{ | ||
56 | mui.alert('扫描的货位码不在实际货位码可选集合中,请重新扫描!','提示','确定',function (e) {},'div') | ||
57 | } | ||
58 | } | ||
59 | } | ||
60 | |||
61 | (function($,$$) { | ||
62 | var utils = new Utils(); | ||
63 | utils.appendModule('#ground_detail_tpl'); | ||
64 | |||
65 | function showData(data){ | ||
66 | var html = template('detail_tpl', data); | ||
67 | document.getElementById('detailContent').innerHTML = html; | ||
68 | } | ||
69 | |||
70 | /* 过滤还有备选货位的数据 */ | ||
71 | function filterDatas(datas,upFinishType){ | ||
72 | |||
73 | var list = datas.list; | ||
74 | if(upFinishType != "1" && list.length && list.length > 0){//未上架 | ||
75 | for(var i = 0,len = list.length;i<len;i++){ | ||
76 | if(!list[i].upParentId){//指示货位 | ||
77 | list[i].realNum = list[i].realReceiveQuantiry; | ||
78 | } | ||
79 | } | ||
80 | } | ||
81 | return datas; | ||
82 | } | ||
83 | |||
84 | $.plusReady(function(){ | ||
85 | $.init({ | ||
86 | beforeback: function() { | ||
87 | var list = plus.webview.currentWebview().opener(); | ||
88 | mui.fire(list, 'pagefresh',{ selectTabs: details.selectTabs === 1 ? 0: 1, query: details.query }); | ||
89 | return true; | ||
90 | } | ||
91 | }) | ||
92 | |||
93 | var self = plus.webview.currentWebview(); | ||
94 | var details = JSON.parse(self.details);//获得参数 | ||
95 | |||
96 | var upParentId = details.upParentId; | ||
97 | console.log(JSON.stringify(details.selectTabs) ); | ||
98 | var postData = { | ||
99 | distributeCode: details.distributeCode, | ||
100 | upFinishType: details.upFinishType, | ||
101 | id: details.id | ||
102 | }; | ||
103 | var detailData = {}; | ||
104 | var url = '/a/shelfInfo/shelfInfoList', | ||
105 | titleUrl = '/a/shelfInfo/shelfInfoTitle', | ||
106 | groundUrl = '/a/checkacceptdetail/finish'; | ||
107 | plus.nativeUI.showWaiting('加载中...'); | ||
108 | mui.ajaxRequest(titleUrl,{ | ||
109 | type: 'POST', | ||
110 | data: { distributeCode: postData.distributeCode }, | ||
111 | success: function(data){ | ||
112 | console.log(JSON.stringify(data)) | ||
113 | if(data.code === 200){ | ||
114 | for(var key in data.data){ | ||
115 | detailData[key] = data.data[key]; | ||
116 | } | ||
117 | mui.ajaxRequest(url,{ | ||
118 | type: 'POST', | ||
119 | data: postData, | ||
120 | success: function(data){ | ||
121 | console.log(JSON.stringify(data)) | ||
122 | plus.nativeUI.closeWaiting(); | ||
123 | if(data.code === 200){ | ||
124 | |||
125 | detailData.list = data.data.list; | ||
126 | if(data.data.list && data.data.list[0] && data.data.list[0].acceptoodsVo){ | ||
127 | acceptoodsVo = data.data.list[0].acceptoodsVo; | ||
128 | } | ||
129 | |||
130 | console.log('detailData********************************') | ||
131 | |||
132 | var _detailData = filterDatas(detailData,details.upFinishType); | ||
133 | showData(_detailData); | ||
134 | if(details.upFinishType === '0'){ | ||
135 | var groundBtn = '<button type="button" id="ground" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认上架</button>' | ||
136 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",groundBtn); | ||
137 | } | ||
138 | }else{ | ||
139 | mui.toast(data.msg,{ type: 'div' }); | ||
140 | } | ||
141 | }, | ||
142 | error: function(xhr,type,errorThrown){ | ||
143 | console.log(xhr.responseText) | ||
144 | } | ||
145 | }); | ||
146 | }else{ | ||
147 | mui.toast(data.msg,{ type: 'div' }); | ||
148 | } | ||
149 | |||
150 | }, | ||
151 | error: function(xhr,type,errorThrown){ | ||
152 | console.log(xhr.responseText) | ||
153 | } | ||
154 | }) | ||
155 | |||
156 | // 上架 | ||
157 | console.log(details.upFinishType) | ||
158 | if(details.upFinishType === '0'){ | ||
159 | var ground = (document.querySelector('#ground')); | ||
160 | $('.detailRow').on('tap','#ground',function(e){ | ||
161 | document.activeElement.blur(); // 隐藏软键盘 | ||
162 | var edit = document.querySelectorAll('.goodsInfo'); | ||
163 | var id = detailData.list[0].id; | ||
164 | |||
165 | |||
166 | if(edit[0] && edit.length > 0){ | ||
167 | var detailListVo = [],submitData = {}; | ||
168 | mui.each(edit,function(index,item){ | ||
169 | var postData = {}; | ||
170 | var $$input = $$(item).find('input.realNum'),realNum = 0; | ||
171 | if($$input[0]){ | ||
172 | realNum = $$input.val()-0; | ||
173 | } | ||
174 | var realReceiveStore =item.querySelector('.realReceiveStore').value; | ||
175 | |||
176 | postData.id = id; | ||
177 | postData.realNum = realNum; | ||
178 | postData.productBatchNo = detailData.list[0].productBatchNo; | ||
179 | postData.realReceiveStore = realReceiveStore; | ||
180 | postData.upParentId = detailData.list[index].upParentId?detailData.list[index].upParentId:""; | ||
181 | detailListVo.push(postData); | ||
182 | }); | ||
183 | submitData.detailListVo = detailListVo; | ||
184 | submitData.distributeCode = details.distributeCode; | ||
185 | console.log(submitData) | ||
186 | } | ||
187 | var btnArray = ['否', '是']; | ||
188 | mui.confirm('是否确认上架?', '操作提示', btnArray, function(e) { | ||
189 | if (e.index == 1) { | ||
190 | mui.ajaxRequest(groundUrl,{ | ||
191 | type: 'POST', | ||
192 | data: submitData, | ||
193 | contentType: "application/json", | ||
194 | showWaiting: true, | ||
195 | success: function(data){ | ||
196 | if(data.code === 200){ | ||
197 | //mui.toast('上架成功',{ type: 'div' }); | ||
198 | mui.alert(data.data); | ||
199 | var page = plus.webview.getWebviewById('ground_not_list'); | ||
200 | mui.fire(page,'pagefresh',{ selectTab: '1' }); | ||
201 | common.gotowin('acc_not_list',{ }); | ||
202 | plus.webview.currentWebview().close(); | ||
203 | }else{ | ||
204 | mui.alert(data.msg) | ||
205 | } | ||
206 | }, | ||
207 | error: function(xhr,type,errorThrown){ | ||
208 | console.log(xhr.responseText) | ||
209 | } | ||
210 | }); | ||
211 | } | ||
212 | },'div') | ||
213 | }); | ||
214 | } | ||
215 | |||
216 | //绑定输入实际上架数验证 | ||
217 | $$('#detailContent').on('keyup','.realNum',function(){ | ||
218 | |||
219 | var _this = this,$$this = $$(this); | ||
220 | var id = _this.dataset.id,realReceiveQuantiry = _this.dataset.realreceivequantiry-0,oldValue = _this.dataset.oldvalue-0; | ||
221 | _this.value = _this.value.replace(/\D/g,'')-0; | ||
222 | var count = 0; | ||
223 | var eles = mui(".mui-input-row input[data-id='"+id+"']"),len = eles.length; | ||
224 | eles.each(function (e) { | ||
225 | count += this.value-0; | ||
226 | }); | ||
227 | if(count > realReceiveQuantiry){ | ||
228 | if(len == 2){ | ||
229 | var text1 = "该药品存在“补货指示货位”和“备选上架货位”,两货位实际上架数量相加不能大于指示数量"+realReceiveQuantiry+"!"; | ||
230 | mui.alert(text1,'提示','确定',function (e) { | ||
231 | _this.value = oldValue; | ||
232 | },'div') | ||
233 | }else{ | ||
234 | var text1 = "实际上架数量不能大于指示数量"+realReceiveQuantiry+"!"; | ||
235 | mui.alert(text1,'提示','确定',function (e) { | ||
236 | _this.value = oldValue; | ||
237 | },'div') | ||
238 | } | ||
239 | } | ||
240 | }); | ||
241 | |||
242 | |||
243 | }) | ||
244 | })(mui,jQuery); | ||
245 | |||
246 | </script> | ||
247 | </body> | ||
248 | |||
249 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/ground_list.html
0 → 100644
1 | <!--上架 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="ground_list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | </header> | ||
22 | <div class="mui-content"> | ||
23 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
24 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家"> | ||
25 | </div> | ||
26 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
27 | <div class="home-card-title">已上架</div> | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;"> | ||
30 | <!--<div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>--> | ||
31 | <div class="mui-slider-group"> | ||
32 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
33 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
34 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
35 | <ul class="mui-table-view"> | ||
36 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
37 | |||
38 | </li> | ||
39 | </ul> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | |||
47 | <script src="../../js/mui.min.js"></script> | ||
48 | <script src="../../js/jquery.min.js" ></script> | ||
49 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
50 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
51 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
52 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
53 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
54 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script type="text/javascript"> | ||
56 | var auditStatus = '2', // 上架状态 1 待上架 2 已上架 | ||
57 | selected = 'right'; | ||
58 | if(window.plus) { | ||
59 | plusready(); | ||
60 | } else { | ||
61 | document.addEventListener('plusready', plusready, false); | ||
62 | } | ||
63 | function plusready() { | ||
64 | plus.key.addEventListener('backbutton',function(){ | ||
65 | plus.webview.currentWebview().close(); | ||
66 | }) | ||
67 | } | ||
68 | //去搜索页面 | ||
69 | function toSearchPage (){ | ||
70 | document.activeElement.blur(); // 隐藏软键盘 | ||
71 | var params = {}; | ||
72 | params.route = '../grounding/ground_list'; | ||
73 | params.id = 'ground_list'; | ||
74 | params.auditStatus = auditStatus; | ||
75 | params.selectTabs = 2; | ||
76 | params.selected = selected; | ||
77 | params.module = 'grounding'; | ||
78 | params.location = 'sub_list'; | ||
79 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
80 | } | ||
81 | |||
82 | |||
83 | (function($,$$) { | ||
84 | |||
85 | $.init({ | ||
86 | beforeback: function() { | ||
87 | var list = plus.webview.currentWebview().opener(); | ||
88 | mui.fire(list, 'pagefresh',{ selectTabs: 0 }); // 参数判断是某一个Tabs 右侧tabs 刷寻右侧列表 | ||
89 | return true; | ||
90 | } | ||
91 | }); | ||
92 | var deceleration = mui.os.ios?0.003:0.0009; | ||
93 | $('.mui-scroll-wrapper').scroll({ | ||
94 | bounce: true, | ||
95 | indicators: true, //是否显示滚动条 | ||
96 | deceleration:deceleration | ||
97 | }); | ||
98 | |||
99 | var page = 1, | ||
100 | totalPage = undefined, | ||
101 | pageSize = 15, | ||
102 | isMore = true, | ||
103 | query = {}, | ||
104 | distributeCode = undefined, | ||
105 | upFinishType = '1'; | ||
106 | |||
107 | var _url = '/a/shelfInfo/shelfInfoList', | ||
108 | groundUrl = '/a/checkacceptdetail/finish'; | ||
109 | |||
110 | /* 渲染模板 */ | ||
111 | var utils = new Utils(); | ||
112 | utils.appendModule('#ground_list_tpl'); | ||
113 | |||
114 | function template(data, insertType){ | ||
115 | utils.innerTplHtml('ground_list','.mui-tab1', data, insertType); | ||
116 | } | ||
117 | /* 过滤还有备选货位的数据 */ | ||
118 | function filterDatas(datas){ | ||
119 | |||
120 | var list = datas.list; | ||
121 | var hasGround = datas.hasGround; | ||
122 | if(list && list.length && list.length > 1){ | ||
123 | var list = datas.list,_list = []; | ||
124 | for(var i = 0,len = list.length;i<len;i++){ | ||
125 | //存在备选上架货位 | ||
126 | var realReceiveStore = [],realNum = [],storeType= [],upParentId = [],actualStore = [],realReceiveStoreName = []; | ||
127 | if(list[i].upParentId){ | ||
128 | //外部的 | ||
129 | var outList = list.filter(function(item,index){ | ||
130 | return (index != i && item.id == list[i].upParentId && item.upParentId == null); | ||
131 | }); | ||
132 | //内部的 | ||
133 | var innerList = _list.filter(function(item,index){ | ||
134 | return (item.id == list[i].upParentId && item.upParentId == null); | ||
135 | }); | ||
136 | list.forEach(function(item,index){ | ||
137 | if(list[i].upParentId == item.id || list[i].id == item.id){ | ||
138 | realReceiveStore.push(item.realReceiveStore); | ||
139 | var realnum = item.realNum; | ||
140 | if(!item.upParentId){ | ||
141 | realnum = item.realReceiveQuantiry; | ||
142 | } | ||
143 | realNum.push(realnum); | ||
144 | storeType.push(item.storeType); | ||
145 | upParentId.push(item.upParentId); | ||
146 | actualStore.push(item.actualStore); | ||
147 | realReceiveStoreName.push(item.realReceiveStoreName); | ||
148 | } | ||
149 | }) | ||
150 | if(innerList[0]){ | ||
151 | innerList[0].realReceiveStore = realReceiveStore; | ||
152 | innerList[0].realNum = realNum; | ||
153 | var _store = storeType.map(function(item,index){ | ||
154 | var text = "货位"; | ||
155 | if(item == "补货指示货位"){ | ||
156 | text = "指示货位"; | ||
157 | }else if(item == "备选上架货位"){ | ||
158 | text = "备选货位"; | ||
159 | } | ||
160 | return text; | ||
161 | }) | ||
162 | innerList[0].storeType = _store; | ||
163 | innerList[0].upParentId = upParentId; | ||
164 | innerList[0].actualStore = actualStore; | ||
165 | innerList[0].realReceiveStoreName = realReceiveStoreName; | ||
166 | } | ||
167 | }else{ | ||
168 | _list.push(list[i]) | ||
169 | } | ||
170 | } | ||
171 | datas.list = _list; | ||
172 | return datas; | ||
173 | }else{ | ||
174 | return datas; | ||
175 | } | ||
176 | } | ||
177 | /* | ||
178 | 下拉刷新 | ||
179 | * */ | ||
180 | function pulldownRefresh(){ | ||
181 | var self = this; | ||
182 | page = 1; | ||
183 | var postData = { | ||
184 | distributeCode: distributeCode, | ||
185 | upFinishType,upFinishType, | ||
186 | pageNo: 1, | ||
187 | pageSize: pageSize | ||
188 | }; | ||
189 | if(query.hisDrugCode){ | ||
190 | postData.hisDrugCode = query.hisDrugCode | ||
191 | } | ||
192 | query = {}; | ||
193 | mui.ajaxRequest(_url,{ | ||
194 | type: 'POST', | ||
195 | data: postData, | ||
196 | success: function(data){ | ||
197 | var resData = data.data; | ||
198 | var showData = filterDatas(resData); | ||
199 | totalPage = data.totalPage; | ||
200 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
201 | isMore = false; | ||
202 | self.endPullDownToRefresh(true); | ||
203 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
204 | |||
205 | }else{ | ||
206 | isMore = true; | ||
207 | self.endPullDownToRefresh(false); | ||
208 | self.refresh(true); | ||
209 | } | ||
210 | return template(showData, false) | ||
211 | }, | ||
212 | error: function(xhr,type,errorThrown){ | ||
213 | console.log(xhr.responseText) | ||
214 | } | ||
215 | }); | ||
216 | } | ||
217 | |||
218 | /* | ||
219 | |||
220 | * 上拉加载更多 | ||
221 | * */ | ||
222 | function pullupRefresh(){ | ||
223 | var self = this; | ||
224 | console.log(isMore,'isMore') | ||
225 | if(isMore){ | ||
226 | page++; | ||
227 | mui.ajaxRequest(_url,{ | ||
228 | type: 'POST', | ||
229 | data:{ | ||
230 | distributeCode: distributeCode, | ||
231 | upFinishType,upFinishType, | ||
232 | pageNo: page, | ||
233 | pageSize: pageSize | ||
234 | }, | ||
235 | success: function(data){ | ||
236 | var resData = data.data; | ||
237 | var showData = filterDatas(resData); | ||
238 | if(resData.pageNo === resData.totalPage){ | ||
239 | isMore = false; | ||
240 | self.endPullUpToRefresh(true); | ||
241 | }else{ | ||
242 | isMore = true; | ||
243 | self.endPullUpToRefresh(false); | ||
244 | self.refresh(true); | ||
245 | } | ||
246 | return template(showData, true) | ||
247 | |||
248 | }, | ||
249 | error: function(xhr,type,errorThrown){ | ||
250 | console.log(xhr.responseText) | ||
251 | } | ||
252 | }); | ||
253 | }else{ | ||
254 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
255 | self.endPullUpToRefresh(true); | ||
256 | } | ||
257 | |||
258 | } | ||
259 | |||
260 | $.plusReady(function(){ | ||
261 | |||
262 | window.addEventListener('pagefresh',function(event){ | ||
263 | console.log(event.detail) | ||
264 | query = JSON.parse(event.detail.query); | ||
265 | console.log(query) | ||
266 | $$('.mui-placeholder').show(); | ||
267 | $$('.mui-input-clear').val(''); | ||
268 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
269 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
270 | }); | ||
271 | |||
272 | // 触发刷新 搜索页面搜的值 | ||
273 | window.addEventListener('sub_search',function(event){ | ||
274 | query = JSON.parse(event.detail.searchParams); | ||
275 | console.log(query) | ||
276 | $$('.mui-placeholder').hide(); | ||
277 | $$('.mui-input-clear').val(query.hisDrugName); | ||
278 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
279 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
280 | }) | ||
281 | |||
282 | var params = undefined; | ||
283 | var self = plus.webview.currentWebview(); | ||
284 | params = JSON.parse(self.params);//获得参数 | ||
285 | console.log(params) | ||
286 | distributeCode = params.distributecode; | ||
287 | //循环初始化所有下拉刷新,上拉加载。 | ||
288 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
289 | |||
290 | $(pullRefreshEl).pullToRefresh({ | ||
291 | down: { | ||
292 | style:'circle', | ||
293 | contentdown : "下拉可以刷新", | ||
294 | contentover : "释放立即刷新", | ||
295 | contentrefresh : "正在刷新...", | ||
296 | callback: pulldownRefresh | ||
297 | }, | ||
298 | up: { | ||
299 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
300 | contentnomore:'没有更多数据', | ||
301 | callback: pullupRefresh | ||
302 | } | ||
303 | }); | ||
304 | }); | ||
305 | // 第一个tab 默认加载一次数据 | ||
306 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
307 | |||
308 | //绑定点击事件 - 进入详情页 | ||
309 | |||
310 | $('#slider').on('tap','.moreDetail',function(){ | ||
311 | let id = this.getAttribute('data-id'); | ||
312 | console.log(id) | ||
313 | let newData = {}; | ||
314 | newData.id = id; | ||
315 | newData.query = query; | ||
316 | newData.upFinishType = upFinishType ; | ||
317 | newData.distributeCode = distributeCode; | ||
318 | console.log(newData) | ||
319 | document.activeElement.blur(); | ||
320 | common.openwin('ground_detail',{ details: JSON.stringify(newData) },{ | ||
321 | titleText: '详情' | ||
322 | }) | ||
323 | }); | ||
324 | }) | ||
325 | })(mui,jQuery); | ||
326 | </script> | ||
327 | </body> | ||
328 | |||
329 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/ground_not_list.html
0 → 100644
1 | <!--上架 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="ground_list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <a href="#" class="mui-pull-right batchAccetpance" style="height: 45px;padding-top: 12px;"> | ||
21 | 批量上架 | ||
22 | </a> | ||
23 | </header> | ||
24 | <div class="mui-content"> | ||
25 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
26 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家" > | ||
27 | </div> | ||
28 | <div id="slider" class="mui-slider themes_tab mui-fullscreen"> | ||
29 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
30 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待上架</a> | ||
31 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已上架</a> | ||
32 | </div> | ||
33 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
34 | <div class="mui-slider-group"> | ||
35 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
36 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
37 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
38 | <ul class="mui-table-view"> | ||
39 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
40 | |||
41 | </li> | ||
42 | </ul> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
47 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
48 | <div class="mui-scroll" id="mui-table-view-tab2"> | ||
49 | <ul class="mui-table-view"> | ||
50 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"> | ||
51 | |||
52 | </li> | ||
53 | </ul> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | |||
61 | <script src="../../js/mui.min.js"></script> | ||
62 | <script src="../../js/jquery.min.js" ></script> | ||
63 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
64 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
65 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
66 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
67 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
68 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
69 | <script type="text/javascript"> | ||
70 | var auditStatus = undefined, | ||
71 | selected = '.mui-tab1', // 默认选中内容区块 , | ||
72 | selectTabs = 1;// 上架状态 1 待上架 2 已上架 | ||
73 | |||
74 | if(window.plus) { | ||
75 | plusready(); | ||
76 | } else { | ||
77 | document.addEventListener('plusready', plusready, false); | ||
78 | } | ||
79 | function plusready() { | ||
80 | plus.key.addEventListener('backbutton',function(){ | ||
81 | plus.webview.currentWebview().close(); | ||
82 | }) | ||
83 | } | ||
84 | //去搜索页面 | ||
85 | function toSearchPage (){ | ||
86 | document.activeElement.blur(); // 隐藏软键盘 | ||
87 | var params = {}; | ||
88 | params.route = '../grounding/ground_not_list'; | ||
89 | params.id = 'ground_not_list'; | ||
90 | params.auditStatus = auditStatus; | ||
91 | params.selected = selected; | ||
92 | params.selectTabs = selectTabs; | ||
93 | params.module = 'grounding'; | ||
94 | params.location = 'sub_list'; | ||
95 | console.log(JSON.stringify(params)) | ||
96 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
97 | } | ||
98 | var acceptoodsVo = [],guid = '',scindex = ''; | ||
99 | /*获取二维码返回值*/ | ||
100 | function scaned(t, r, f) { | ||
101 | console.log(r);//返回二维码读取的数据 | ||
102 | if(r && Array.isArray(acceptoodsVo) && acceptoodsVo.length >0){ | ||
103 | var locationCode = acceptoodsVo.filter(function(item){ | ||
104 | return item.positionName == r; | ||
105 | })[0]; | ||
106 | if(locationCode){ | ||
107 | mui.alert('扫描成功!','提示','确定',function (e) { | ||
108 | mui("select.select_actualStore").each(function () { | ||
109 | if(this.dataset.id && this.dataset.id == guid && this.dataset.index == scindex){ | ||
110 | this.value = locationCode.id; | ||
111 | } | ||
112 | }); | ||
113 | //document.getElementsByClassName('select_actualStore')[0].value = locationCode.id; | ||
114 | },'div') | ||
115 | }else{ | ||
116 | mui.alert('扫描的货位码不在实际货位码可选集合中,请重新扫描!','提示','确定',function (e) {},'div') | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | (function($,$$) { | ||
122 | |||
123 | $.init({ | ||
124 | beforeback: function() { | ||
125 | var list = plus.webview.currentWebview().opener(); | ||
126 | mui.fire(list, 'pagefresh',{ selectTabs: 0 }); | ||
127 | return true; | ||
128 | } | ||
129 | }); | ||
130 | var deceleration = mui.os.ios?0.003:0.0009; | ||
131 | $('.mui-scroll-wrapper').scroll({ | ||
132 | bounce: true, | ||
133 | indicators: true, //是否显示滚动条 | ||
134 | deceleration:deceleration | ||
135 | }); | ||
136 | |||
137 | |||
138 | var page = 1, | ||
139 | totalPage = undefined, | ||
140 | pageSize = 15, | ||
141 | isMore = true, | ||
142 | query = {}, | ||
143 | checkType = undefined, | ||
144 | type = undefined, | ||
145 | |||
146 | distributeCode = undefined, | ||
147 | upFinishType = undefined; | ||
148 | |||
149 | var _url = '/a/shelfInfo/shelfInfoList', | ||
150 | groundUrl = '/a/checkacceptdetail/finish', | ||
151 | pageLeft = 1, | ||
152 | pageRight = 1, | ||
153 | totalPageLeft = undefined, | ||
154 | totalPageRight = undefined; | ||
155 | |||
156 | /* 渲染模板 */ | ||
157 | var utils = new Utils(); | ||
158 | utils.appendModule('#ground_list_tpl'); | ||
159 | |||
160 | function template(selected, data, insertType){ | ||
161 | utils.innerTplHtml('ground_list',selected, data, insertType); | ||
162 | } | ||
163 | /* 过滤还有备选货位的数据 */ | ||
164 | function filterDatas(datas){ | ||
165 | |||
166 | var list = datas.list; | ||
167 | var hasGround = datas.hasGround; | ||
168 | if(list && list.length && list.length > 1){ | ||
169 | var list = datas.list,_list = []; | ||
170 | for(var i = 0,len = list.length;i<len;i++){ | ||
171 | //存在备选上架货位 | ||
172 | var realReceiveStore = [],realNum = [],storeType= [],upParentId = [],actualStore = [],realReceiveStoreName = []; | ||
173 | if(list[i].upParentId){//备选货位 | ||
174 | //外部的 | ||
175 | var outList = list.filter(function(item,index){ | ||
176 | if(hasGround){ | ||
177 | return (index != i && item.id == list[i].id && item.upParentId == null); | ||
178 | }else{ | ||
179 | return (index != i && item.id == list[i].upParentId && item.upParentId == null); | ||
180 | } | ||
181 | }); | ||
182 | //内部的 | ||
183 | var innerList = _list.filter(function(item,index){ | ||
184 | if(hasGround){ | ||
185 | return (item.id == list[i].id && item.upParentId == null); | ||
186 | }else{ | ||
187 | return (item.id == list[i].upParentId && item.upParentId == null); | ||
188 | } | ||
189 | }); | ||
190 | list.forEach(function(item,index){ | ||
191 | if(hasGround){ | ||
192 | if(list[i].id == item.id){ | ||
193 | realReceiveStore.push(item.realReceiveStore); | ||
194 | var realnum = item.realNum; | ||
195 | if(!item.upParentId){ | ||
196 | realnum = item.realReceiveQuantiry; | ||
197 | } | ||
198 | realNum.push(realnum); | ||
199 | storeType.push(item.storeType); | ||
200 | upParentId.push(item.upParentId); | ||
201 | actualStore.push(item.actualStore); | ||
202 | realReceiveStoreName.push(item.realReceiveStoreName); | ||
203 | } | ||
204 | }else{ | ||
205 | if(list[i].upParentId == item.id || list[i].id == item.id){ | ||
206 | realReceiveStore.push(item.realReceiveStore); | ||
207 | var realnum = item.realNum; | ||
208 | if(!item.upParentId){ | ||
209 | realnum = item.realReceiveQuantiry; | ||
210 | } | ||
211 | realNum.push(realnum); | ||
212 | storeType.push(item.storeType); | ||
213 | upParentId.push(item.upParentId); | ||
214 | actualStore.push(item.actualStore); | ||
215 | realReceiveStoreName.push(item.realReceiveStoreName); | ||
216 | } | ||
217 | } | ||
218 | |||
219 | }) | ||
220 | if(innerList[0]){ | ||
221 | innerList[0].realReceiveStore = realReceiveStore; | ||
222 | innerList[0].realNum = realNum; | ||
223 | var _store = storeType.map(function(item,index){ | ||
224 | var text = "货位"; | ||
225 | if(item == "补货指示货位"){ | ||
226 | text = "指示货位"; | ||
227 | }else if(item == "备选上架货位"){ | ||
228 | text = "备选货位"; | ||
229 | } | ||
230 | return text; | ||
231 | }) | ||
232 | innerList[0].storeType = _store; | ||
233 | innerList[0].upParentId = upParentId; | ||
234 | innerList[0].actualStore = actualStore; | ||
235 | innerList[0].realReceiveStoreName = realReceiveStoreName; | ||
236 | } | ||
237 | }else{//指示货位 | ||
238 | if(!list[i].realNum){ | ||
239 | list[i].realNum = list[i].realReceiveQuantiry; | ||
240 | } | ||
241 | _list.push(list[i]) | ||
242 | } | ||
243 | } | ||
244 | datas.list = _list; | ||
245 | return datas; | ||
246 | }else{ | ||
247 | if(list[0] && !list[0].realNum){ | ||
248 | list[0].realNum = list[0].realReceiveQuantiry; | ||
249 | } | ||
250 | return datas; | ||
251 | } | ||
252 | } | ||
253 | /* | ||
254 | 下拉刷新 | ||
255 | * */ | ||
256 | function pulldownRefresh(){ | ||
257 | var self = this; | ||
258 | pageLeft = 1; | ||
259 | pageRight = 1; | ||
260 | upFinishType = selectTabs === 1 ? '0': '1'; | ||
261 | page = 1; | ||
262 | var postData = { | ||
263 | distributeCode: distributeCode, | ||
264 | upFinishType,upFinishType, | ||
265 | pageNo: 1, | ||
266 | pageSize: pageSize | ||
267 | }; | ||
268 | if(query.hisDrugCode){ | ||
269 | postData.hisDrugCode = query.hisDrugCode | ||
270 | } | ||
271 | query = {}; | ||
272 | mui.ajaxRequest(_url,{ | ||
273 | type: 'POST', | ||
274 | data: postData, | ||
275 | success: function(data){ | ||
276 | var resData = data.data; | ||
277 | //过滤还有备选货位的数据 | ||
278 | |||
279 | resData.hasGround = upFinishType === '0'? true: false; | ||
280 | var showData = filterDatas(resData); | ||
281 | |||
282 | totalPage = data.totalPage; | ||
283 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
284 | var i = selectTabs === 1 ? 0 : 1; | ||
285 | isMore = false; | ||
286 | self.endPullDownToRefresh(true); | ||
287 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
288 | |||
289 | }else{ | ||
290 | isMore = true; | ||
291 | self.endPullDownToRefresh(false); | ||
292 | self.refresh(true); | ||
293 | } | ||
294 | return template(selected,showData, false) | ||
295 | }, | ||
296 | error: function(xhr,type,errorThrown){ | ||
297 | console.log(xhr.responseText) | ||
298 | } | ||
299 | }); | ||
300 | } | ||
301 | |||
302 | /* | ||
303 | |||
304 | * 上拉加载更多 | ||
305 | * */ | ||
306 | function pullupRefresh(){ | ||
307 | var self = this; | ||
308 | console.log(isMore,'isMore') | ||
309 | if(isMore){ | ||
310 | page++; | ||
311 | mui.ajaxRequest(_url,{ | ||
312 | type: 'POST', | ||
313 | data:{ | ||
314 | distributeCode: distributeCode, | ||
315 | upFinishType,upFinishType, | ||
316 | pageNo: page, | ||
317 | pageSize: pageSize | ||
318 | }, | ||
319 | success: function(data){ | ||
320 | var resData = data.data; | ||
321 | |||
322 | var showData = filterDatas(resData); | ||
323 | resData.hasGround = upFinishType === '0'? true: false; | ||
324 | if(resData.pageNo === resData.totalPage){ | ||
325 | isMore = false; | ||
326 | self.endPullUpToRefresh(true); | ||
327 | }else{ | ||
328 | isMore = true; | ||
329 | self.endPullUpToRefresh(false); | ||
330 | self.refresh(true); | ||
331 | } | ||
332 | return template(selected,showData, true) | ||
333 | |||
334 | }, | ||
335 | error: function(xhr,type,errorThrown){ | ||
336 | console.log(xhr.responseText) | ||
337 | } | ||
338 | }); | ||
339 | }else{ | ||
340 | var i = selectTabs === 1 ? 0 : 1; | ||
341 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
342 | self.endPullUpToRefresh(true); | ||
343 | } | ||
344 | |||
345 | } | ||
346 | |||
347 | $.plusReady(function(){ | ||
348 | |||
349 | window.addEventListener('pagefresh',function(event){ | ||
350 | console.log('从详情回来') | ||
351 | console.log(JSON.stringify(event.detail)) | ||
352 | let index = event.detail.selectTabs === 0 ? 0 : 1; | ||
353 | $$('.mui-placeholder').show(); | ||
354 | $$('.mui-input-clear').val(''); | ||
355 | if(index === 1){ | ||
356 | mui('#slider').slider().gotoItem(1); | ||
357 | } | ||
358 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
359 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
360 | }); | ||
361 | |||
362 | // 触发刷新 搜索页面搜的值 | ||
363 | window.addEventListener('sub_search',function(event){ | ||
364 | console.log('从搜索页面回来') | ||
365 | console.log(JSON.stringify(event.detail) ); | ||
366 | query = JSON.parse(event.detail.searchParams); | ||
367 | let index = event.detail.selectTabs === 1 ? 0 : 1; | ||
368 | console.log(query) | ||
369 | $$('.mui-placeholder').hide(); | ||
370 | $$('.mui-input-clear').val(query.hisDrugName); | ||
371 | if(index === 1){ | ||
372 | mui('#slider').slider().gotoItem(1); | ||
373 | } | ||
374 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
375 | setTimeout(function(){ | ||
376 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
377 | },300) | ||
378 | }) | ||
379 | |||
380 | var params, currentSelected = undefined | ||
381 | var self = plus.webview.currentWebview(); | ||
382 | params = JSON.parse(self.params);//获得参数 | ||
383 | console.log(params) | ||
384 | distributeCode = params.distributecode; | ||
385 | currentSelected = params.currentSelected; // 当前选中tabs | ||
386 | upFinishType = currentSelected === 'left' ? '0': '1'; | ||
387 | auditStatus = currentSelected === 'left' ? '1': '2'; | ||
388 | selectTabs = currentSelected === 'left'? 1: 2; | ||
389 | if(currentSelected === 'left'){ | ||
390 | $$('.batchAccetpance').show(); | ||
391 | }else{ | ||
392 | $$('.batchAccetpance').hide(); | ||
393 | } | ||
394 | console.log(currentSelected) | ||
395 | |||
396 | |||
397 | //循环初始化所有下拉刷新,上拉加载。 | ||
398 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
399 | |||
400 | $(pullRefreshEl).pullToRefresh({ | ||
401 | down: { | ||
402 | style:'circle', | ||
403 | contentdown : "下拉可以刷新", | ||
404 | contentover : "释放立即刷新", | ||
405 | contentrefresh : "正在刷新...", | ||
406 | callback: pulldownRefresh | ||
407 | }, | ||
408 | up: { | ||
409 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
410 | contentnomore:'没有更多数据', | ||
411 | callback: pullupRefresh | ||
412 | } | ||
413 | }); | ||
414 | }); | ||
415 | // 第一个tab 默认加载一次数据 | ||
416 | mui(".mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
417 | |||
418 | // 展开编辑 | ||
419 | $('#slider').on('tap','.groundEdit',function(){ | ||
420 | this.innerHTML = this.innerHTML === '收起编辑' ? '展开编辑':'收起编辑' ; | ||
421 | let index = this.dataset.index; | ||
422 | var editForm = document.querySelectorAll('.editForm')[index]; | ||
423 | editForm.style.display = editForm.style.display === 'block' ? 'none': 'block'; | ||
424 | }) | ||
425 | |||
426 | |||
427 | var item2 = document.querySelector('#item2mobile'); | ||
428 | var item1 = document.querySelector('#item1mobile'); | ||
429 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
430 | $$('.mui-input-clear').val(''); | ||
431 | let index = e.detail.slideNumber; | ||
432 | if (index === 1) { | ||
433 | upFinishType = '1'; | ||
434 | selected = '.mui-tab2'; | ||
435 | selectTabs = 2; | ||
436 | mui('#slider').slider().gotoItem(1); | ||
437 | $$('.batchAccetpance').hide(); | ||
438 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
439 | if (!item2.querySelector('.am-card')) { | ||
440 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
441 | } | ||
442 | } | ||
443 | if(index === 0){ | ||
444 | upFinishType = '0'; | ||
445 | selected = '.mui-tab1'; | ||
446 | selectTabs = 1; | ||
447 | $$('.batchAccetpance').show(); | ||
448 | mui('#slider').slider().gotoItem(0); | ||
449 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
450 | if (!item1.querySelector('.am-card')) { | ||
451 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
452 | } | ||
453 | } | ||
454 | }); | ||
455 | |||
456 | //绑定点击事件 - 进入详情页 | ||
457 | |||
458 | $('#slider').on('tap','.moreDetail',function(){ | ||
459 | |||
460 | let id = this.getAttribute('data-id'); | ||
461 | let upParentId = this.dataset.upparentid; | ||
462 | console.log(id) | ||
463 | let newData = {}; | ||
464 | newData.id = id; | ||
465 | newData.upFinishType = upFinishType ; | ||
466 | newData.distributeCode = distributeCode; | ||
467 | newData.selectTabs = selectTabs; | ||
468 | newData.query = query; | ||
469 | newData.upParentId = upParentId; | ||
470 | console.log(newData) | ||
471 | document.activeElement.blur(); | ||
472 | common.openwin('ground_detail',{ details: JSON.stringify(newData) },{ | ||
473 | titleText: '详情' | ||
474 | }) | ||
475 | }); | ||
476 | |||
477 | /* 批量上架 */ | ||
478 | $('.mui-bar').on('tap','.batchAccetpance',function(){ | ||
479 | var paramsData = {}; | ||
480 | paramsData.distributeCode = distributeCode; | ||
481 | paramsData.upFinishType = '0'; | ||
482 | paramsData.selectTabs = 1; | ||
483 | paramsData.itemData = params; | ||
484 | console.log(paramsData) | ||
485 | common.openwin('ground_batch',{ params: JSON.stringify(paramsData) },false) | ||
486 | }) | ||
487 | |||
488 | // 绑定事件 --确认上架 | ||
489 | $('#slider').on('tap','.ground',function(){ | ||
490 | |||
491 | document.activeElement.blur(); // 隐藏软键盘 | ||
492 | let index = this.dataset.index; | ||
493 | var _this_card = document.querySelectorAll('.am-card')[index]; | ||
494 | var edit = _this_card.querySelectorAll('.editForm'); | ||
495 | var $$edit = $$(_this_card).find(".editForm"); | ||
496 | var id = _this_card.dataset.id; | ||
497 | |||
498 | |||
499 | if(edit[0] && edit.length > 0){ | ||
500 | var detailListVo = [],submitData = {}; | ||
501 | mui.each(edit,function(index,item){ | ||
502 | var postData = {}; | ||
503 | var $$input = $$(item).find('input.realNum'),realNum = 0; | ||
504 | if($$input[0]){ | ||
505 | realNum = $$input.val()-0; | ||
506 | } | ||
507 | var upParentId = item.dataset.upparentid; | ||
508 | if(typeof upParentId == "string" && upParentId == "0"){ | ||
509 | upParentId = ""; | ||
510 | } | ||
511 | var productBatchNo = _this_card.dataset.productbatchno; | ||
512 | var realReceiveStore =item.querySelector('.select_actualStore').value; | ||
513 | |||
514 | postData.id = id; | ||
515 | postData.realNum = realNum; | ||
516 | postData.productBatchNo = productBatchNo; | ||
517 | postData.realReceiveStore = realReceiveStore; | ||
518 | postData.upParentId = upParentId; | ||
519 | detailListVo.push(postData); | ||
520 | }); | ||
521 | submitData.detailListVo = detailListVo; | ||
522 | submitData.distributeCode = distributeCode; | ||
523 | console.log(submitData) | ||
524 | } | ||
525 | var btnArray = ['否', '是']; | ||
526 | mui.confirm('是否确认上架?', '确认', btnArray, function(e) { | ||
527 | if (e.index == 1) { | ||
528 | mui.ajaxRequest(groundUrl,{ | ||
529 | type: 'POST', | ||
530 | data: submitData, | ||
531 | contentType: "application/json", | ||
532 | showWaiting: true, | ||
533 | success: function(data){ | ||
534 | if(data.code === 200){ | ||
535 | //mui.toast('上架成功',{ type: 'div' }); | ||
536 | mui.alert(data.data); | ||
537 | mui(".mui-scroll").pullToRefresh()[ selectTabs -1 ].pullDownLoading(); | ||
538 | }else{ | ||
539 | mui.alert(data.msg) | ||
540 | } | ||
541 | }, | ||
542 | error: function(xhr,type,errorThrown){ | ||
543 | console.log(xhr.responseText) | ||
544 | } | ||
545 | }); | ||
546 | } else { | ||
547 | |||
548 | } | ||
549 | },'div') | ||
550 | }); | ||
551 | |||
552 | //绑定点击事件 - 扫描 | ||
553 | $('#slider').on('tap','#qrcode',function(){ | ||
554 | var value = this.dataset.value; | ||
555 | if(value && typeof value == 'string' ){ | ||
556 | value = JSON.parse(value); | ||
557 | } | ||
558 | acceptoodsVo = value?value.acceptoodsVo:[]; | ||
559 | guid = value?value.id:''; | ||
560 | scindex = this.dataset.index; | ||
561 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码上架' }) | ||
562 | }); | ||
563 | |||
564 | //绑定输入实际上架数验证 | ||
565 | $$('#slider').on('keyup','.realNum',function(){ | ||
566 | |||
567 | var _this = this,$$this = $$(this); | ||
568 | var id = _this.dataset.id,realReceiveQuantiry = _this.dataset.realreceivequantiry-0,oldValue = _this.dataset.oldvalue-0; | ||
569 | _this.value = _this.value.replace(/\D/g,'')-0; | ||
570 | var count = 0; | ||
571 | var eles = mui(".am-input-control input[data-id='"+id+"']"),len = eles.length; | ||
572 | eles.each(function (e) { | ||
573 | count += this.value-0; | ||
574 | }); | ||
575 | if(count > realReceiveQuantiry){ | ||
576 | if(len == 2){ | ||
577 | var text1 = "该药品存在“补货指示货位”和“备选上架货位”,两货位实际上架数量相加不能大于指示数量"+realReceiveQuantiry+"!"; | ||
578 | mui.alert(text1,'提示','确定',function (e) { | ||
579 | _this.value = oldValue; | ||
580 | },'div') | ||
581 | }else{ | ||
582 | var text1 = "实际上架数量不能大于指示数量"+realReceiveQuantiry+"!"; | ||
583 | mui.alert(text1,'提示','确定',function (e) { | ||
584 | _this.value = oldValue; | ||
585 | },'div') | ||
586 | } | ||
587 | } | ||
588 | }); | ||
589 | |||
590 | }) | ||
591 | })(mui,jQuery); | ||
592 | </script> | ||
593 | </body> | ||
594 | |||
595 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/index.html
0 → 100644
1 | <!--上架 - 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="../../tpl/ground_card.html " id="card_view"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | </head> | ||
13 | |||
14 | <body> | ||
15 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
16 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
17 | <label class="mui-pull-right theme_back_font">返回</label> | ||
18 | </a> | ||
19 | <h1 class="mui-title themes_title">上架</h1> | ||
20 | <a href="#modal" class="mui-pull-right" style="height: 45px;padding-top: 12px;"> | ||
21 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
22 | <img src="../../assest/qrcode.png" width="24" height="24"/> | ||
23 | </div> | ||
24 | </a> | ||
25 | </header> | ||
26 | <div class="mui-content"> | ||
27 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
28 | <input type="search" class="mui-input-clear" placeholder="上架单号" readonly="readonly" > | ||
29 | </div> | ||
30 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 102px;"> | ||
31 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待上架</a> | ||
33 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已上架</a> | ||
34 | </div> | ||
35 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
36 | <div class="mui-slider-group"> | ||
37 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
38 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
39 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
40 | <ul class="mui-table-view"> | ||
41 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
42 | </ul> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
47 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
48 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
49 | <ul class="mui-table-view"> | ||
50 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"></li> | ||
51 | </ul> | ||
52 | </div> | ||
53 | </div> | ||
54 | |||
55 | </div> | ||
56 | </div> | ||
57 | </div> | ||
58 | |||
59 | </div> | ||
60 | <script src="../../js/mui.js"></script> | ||
61 | <script src="../../js/jquery.min.js" ></script> | ||
62 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
63 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
64 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
65 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
66 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
67 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
68 | <script type="text/javascript"> | ||
69 | |||
70 | var selectTabs = 1; // 默认选中第一个tab | ||
71 | |||
72 | function clicked(){ | ||
73 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码上架' }) | ||
74 | } | ||
75 | |||
76 | //去搜索页面 | ||
77 | function toSearchPage (){ | ||
78 | document.activeElement.blur(); // 隐藏软键盘 | ||
79 | var params = {}; | ||
80 | params.route = '../grounding/index'; | ||
81 | params.module = 'grounding'; | ||
82 | params.location = 'main_list'; | ||
83 | params.selectTabs = selectTabs; | ||
84 | params.auditStatus = auditStatus; | ||
85 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
86 | } | ||
87 | |||
88 | /*获取二维码返回值*/ | ||
89 | function scaned(t, r, f) { | ||
90 | console.log(r);//返回二维码读取的数据 | ||
91 | common.openwin('ground_list',{ targetId: r }, { | ||
92 | titleText: '药品信息' | ||
93 | }) | ||
94 | } | ||
95 | (function($,doc,$$) { | ||
96 | |||
97 | $.init({ | ||
98 | beforeback:function(){ | ||
99 | var list = plus.webview.currentWebview().opener(); | ||
100 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
101 | return true; | ||
102 | } | ||
103 | }); | ||
104 | |||
105 | var deceleration = mui.os.ios?0.003:0.0009; | ||
106 | $('.mui-scroll-wrapper').scroll({ | ||
107 | bounce: true, | ||
108 | indicators: true, //是否显示滚动条 | ||
109 | deceleration:deceleration | ||
110 | }); | ||
111 | |||
112 | var utils = new Utils(); | ||
113 | utils.appendModule('#card_view'); | ||
114 | |||
115 | /* 渲染模板 */ | ||
116 | var selected = undefined,hasChecked = false,page = undefined, pageSize = 15,totalPage = undefined, query = {}; | ||
117 | |||
118 | var checkType, type, shelfStatus// 上架类型 // 上架状态 1 待上架 2 已上架 | ||
119 | var requestUrl = '/a/checkaccept/shelfList'; // 请求地址 | ||
120 | |||
121 | var pageLeft = 1, | ||
122 | pageRight = 1, | ||
123 | totalPageLeft, | ||
124 | totalPageRight, | ||
125 | isMore = true, | ||
126 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
127 | |||
128 | |||
129 | function template(selected, data, insertType){ | ||
130 | console.log(selected,'selected') | ||
131 | utils.innerTplHtml('ground', selected, data, insertType); | ||
132 | } | ||
133 | |||
134 | /* | ||
135 | 下拉刷新 | ||
136 | * */ | ||
137 | function pulldownRefresh(){ | ||
138 | pageLeft = 1; | ||
139 | pageRight = 1; | ||
140 | auditStatus = selectTabs === 1 ? '8': '4'; | ||
141 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
142 | var self = this; | ||
143 | var postData = { | ||
144 | auditStatus: auditStatus, | ||
145 | pageNo: page, | ||
146 | pageSize: pageSize | ||
147 | } | ||
148 | if(query.distributeCode){ | ||
149 | postData.distributeCode = query.distributeCode; | ||
150 | postData.auditStatus = query.auditStatus; | ||
151 | } | ||
152 | mui.ajaxRequest(requestUrl,{ | ||
153 | type: 'POST', | ||
154 | data: postData, | ||
155 | success: function(data){ | ||
156 | var resData = data.data; | ||
157 | var total = resData.totalPage; | ||
158 | if(selectTabs === 1){ | ||
159 | totalPageLeft = total; | ||
160 | }else{ | ||
161 | totalPageRight = total; | ||
162 | } | ||
163 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
164 | var i = selectTabs === 1 ? 0 : 1; | ||
165 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
166 | isMore = false; | ||
167 | self.endPullDownToRefresh(true); | ||
168 | }else{ | ||
169 | isMore = true; | ||
170 | self.endPullDownToRefresh(false); | ||
171 | self.refresh(true); | ||
172 | } | ||
173 | return template(selected,resData,false) | ||
174 | }, | ||
175 | error: function(xhr,type,errorThrown){ | ||
176 | console.log(xhr.responseText) | ||
177 | } | ||
178 | }); | ||
179 | } | ||
180 | /* | ||
181 | |||
182 | * 上拉加载更多 | ||
183 | * */ | ||
184 | function pullupRefresh(){ | ||
185 | var self = this; | ||
186 | if(isMore){ | ||
187 | if(selectTabs === 1){ | ||
188 | pageLeft ++ | ||
189 | }else{ | ||
190 | pageRight ++; | ||
191 | } | ||
192 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
193 | totalPage = selectTabs === 1 ? totalPageLeft: totalPageRight; | ||
194 | |||
195 | auditStatus = selectTabs === 1 ? '8': '4'; | ||
196 | |||
197 | if(page <= totalPage){ | ||
198 | mui.ajaxRequest(requestUrl,{ | ||
199 | type: 'POST', | ||
200 | data: { | ||
201 | auditStatus: auditStatus, | ||
202 | pageNo: page, | ||
203 | pageSize: pageSize | ||
204 | }, | ||
205 | success: function(data){ | ||
206 | var resData = data.data; | ||
207 | if(resData.pageNo === resData.totalPage){ | ||
208 | isMore = false; | ||
209 | self.endPullUpToRefresh(true); | ||
210 | }else{ | ||
211 | isMore = true; | ||
212 | self.endPullUpToRefresh(false); | ||
213 | self.refresh(true); | ||
214 | } | ||
215 | return template(selected,resData,true) | ||
216 | }, | ||
217 | error: function(xhr,type,errorThrown){ | ||
218 | console.log(xhr.responseText) | ||
219 | } | ||
220 | }); | ||
221 | } | ||
222 | }else{ | ||
223 | var i = selectTabs === 1 ? 0 : 1; | ||
224 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
225 | self.endPullUpToRefresh(true); | ||
226 | } | ||
227 | } | ||
228 | |||
229 | $.plusReady(function(){ | ||
230 | // 触发刷新 搜索页面搜的值 | ||
231 | window.addEventListener('search',function(event){ | ||
232 | console.log(event.detail) | ||
233 | query.distributeCode = JSON.parse(event.detail.searchParams).distributeCode; | ||
234 | query.auditStatus = JSON.parse(event.detail.searchParams).auditStatus; | ||
235 | document.querySelector('.mui-input-clear').placeholder = ''; | ||
236 | document.querySelector('.mui-placeholder').style.display = 'none'; | ||
237 | document.querySelector('.mui-input-clear').value = query.distributeCode; | ||
238 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
239 | }) | ||
240 | // 页面刷新 | ||
241 | window.addEventListener('pagefresh',function(e){ | ||
242 | let index = e.detail.selectTabs === 0 ? 0: 1; | ||
243 | if(index === 1){ | ||
244 | mui('#slider').slider().gotoItem(1); | ||
245 | } | ||
246 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
247 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
248 | }) | ||
249 | |||
250 | |||
251 | var item2 = document.querySelector('#item2mobile'); | ||
252 | var item1 = document.querySelector('#item1mobile'); | ||
253 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
254 | $$('.mui-input-clear').val(''); | ||
255 | let index = e.detail.slideNumber; | ||
256 | if (index === 1) { | ||
257 | selected = '.mui-tab2'; | ||
258 | selectTabs = 2; | ||
259 | mui('#slider').slider().gotoItem(1); | ||
260 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
261 | if (!item2.querySelector('.am-card')) { | ||
262 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
263 | } | ||
264 | } | ||
265 | if(index === 0){ | ||
266 | selected = '.mui-tab1'; | ||
267 | selectTabs = 1; | ||
268 | mui('#slider').slider().gotoItem(0); | ||
269 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
270 | if (!item1.querySelector('.am-card')) { | ||
271 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
272 | } | ||
273 | } | ||
274 | }); | ||
275 | |||
276 | |||
277 | //tab页切的点击事件 | ||
278 | var sliderSegmentedControl = document.getElementById('sliderSegmentedControl'); | ||
279 | $('.mui-input-group').on('change', 'input', function() { | ||
280 | if (this.checked) { | ||
281 | sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted mui-segmented-control-' + this.value; | ||
282 | //force repaint | ||
283 | sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style')); | ||
284 | } | ||
285 | }); | ||
286 | |||
287 | //循环初始化所有下拉刷新,上拉加载。 | ||
288 | $.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) { | ||
289 | |||
290 | $(pullRefreshEl).pullToRefresh({ | ||
291 | down: { | ||
292 | style:'circle', | ||
293 | contentdown : "下拉可以刷新", | ||
294 | contentover : "释放立即刷新", | ||
295 | contentrefresh : "正在刷新...", | ||
296 | callback: pulldownRefresh | ||
297 | }, | ||
298 | up: { | ||
299 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
300 | contentnomore:'没有更多数据', | ||
301 | callback: pullupRefresh | ||
302 | } | ||
303 | }); | ||
304 | }); | ||
305 | // 第一个tab 默认加载一次数据 | ||
306 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
307 | |||
308 | //绑定点击事件 - 进入详情页 | ||
309 | |||
310 | $('#slider').on('tap','.am-card',function(){ | ||
311 | let id = this.getAttribute('data-id'); | ||
312 | let itemData = this.dataset; | ||
313 | itemData.currentSelected = selectTabs === 1 ? 'left': 'right'; | ||
314 | console.log(JSON.stringify(itemData)) | ||
315 | document.activeElement.blur(); // 隐藏软键盘 | ||
316 | console.log(id,'id'); | ||
317 | let openwinUrl = selectTabs === 1 ? 'ground_not_list':'ground_list'; | ||
318 | common.openwin(openwinUrl,{ params: JSON.stringify(itemData) }, false) | ||
319 | }) | ||
320 | }) | ||
321 | })(mui,document,jQuery); | ||
322 | |||
323 | </script> | ||
324 | </body> | ||
325 | |||
326 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/grounding/list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='ground_list'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-id="{{ value.id }}" | ||
6 | data-realnum="{{ value.realNum }}" | ||
7 | data-productBatchNo="{{ value.productBatchNo }}" | ||
8 | data-upParentId="{{ value.upParentId?value.upParentId:"" }}" | ||
9 | > | ||
10 | <div class="am-card-header"> | ||
11 | <div class="am-card-header-content"> | ||
12 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
13 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
14 | </div> | ||
15 | <div class="am-card-header-extra"> | ||
16 | <span>{{ value.type }}</span> | ||
17 | </div> | ||
18 | </div> | ||
19 | <div class="am-card-body"> | ||
20 | <div class="am-flexbox am-flexbox-align-center"> | ||
21 | <div class="am-flexbox-item"> | ||
22 | 单位:<span>{{ value.replanUnit }}</span> | ||
23 | </div> | ||
24 | <div class="am-flexbox-item"> | ||
25 | 数量:<span class="groundNum">{{ value.realReceiveQuantiry }}</span> | ||
26 | </div> | ||
27 | <div class="am-flexbox-item"> | ||
28 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
29 | </div> | ||
30 | </div> | ||
31 | {{ if hasGround }} | ||
32 | {{ if value.realNum && value.realNum.length && value.realNum.length > 1}} | ||
33 | {{ each value.realNum num index}} | ||
34 | <div class="editForm" style="display: block;" data-upParentId="{{ value.upParentId[index]?value.upParentId[index]:0 }}"> | ||
35 | <div class="am-flexbox am-flexbox-align-center"> | ||
36 | <div class="am-flexbox-item"> | ||
37 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
38 | <div class="am-list-line"> | ||
39 | <div class="am-input-label am-input-label-4 font-warning" style="width: 56px;">{{value.storeType[index]}}:</div> | ||
40 | <div class="am-input-control"> | ||
41 | <select class="editInput select_actualStore" data-id="{{value.id}}" data-index="{{index}}"> | ||
42 | {{ each value.acceptoodsVo item i }} | ||
43 | {{ if value.realReceiveStore[index] && value.realReceiveStore[index] === item.id }} | ||
44 | <option value="{{ item.id }}" selected="selected">{{ item.positionName }}</option> | ||
45 | {{ else }} | ||
46 | <option value="{{ item.id }}">{{ item.positionName }}</option> | ||
47 | {{ /if }} | ||
48 | {{ /each }} | ||
49 | </select> | ||
50 | </div> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||
54 | <div class="am-flexbox-item"> | ||
55 | 扫描货位: | ||
56 | <a href="#modal" class="qrcode" id="qrcode" data-value="{{value}}" data-index="{{index}}" style="height: 32px;width: 32px;display: inline-block;"> | ||
57 | <img src="../../assest/qrcode.png" style="width:100%;height: 100%;margin-bottom: -14px;" width="30" height="30"/> | ||
58 | </a> | ||
59 | </div> | ||
60 | <div class="am-flexbox-item"> | ||
61 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
62 | <div class="am-list-line"> | ||
63 | <div class="am-input-label am-input-label-6 font-warning">实际上架数量:</div> | ||
64 | <div class="am-input-control"> | ||
65 | <input class="realNum flex-item-input" type="tel" value="{{ value.realNum[index] ? value.realNum[index] : 0}}" placeholder="请输入" data-id="{{value.id}}" data-oldValue = "{{value.realNum[index] ? value.realNum[index] : 0}}" data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" /> | ||
66 | </div> | ||
67 | </div> | ||
68 | </div> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | {{/each}} | ||
73 | {{ else }} | ||
74 | <div class="editForm" style="display: block;" data-upParentId="{{ value.upParentId?value.upParentId:0 }}"> | ||
75 | <div class="am-flexbox am-flexbox-align-center"> | ||
76 | <div class="am-flexbox-item"> | ||
77 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
78 | <div class="am-list-line"> | ||
79 | <div class="am-input-label am-input-label-4 font-warning" style="width: 40px;">货位:</div> | ||
80 | <div class="am-input-control"> | ||
81 | <select class="editInput select_actualStore" data-id="{{value.id}}" data-index="{{1}}"> | ||
82 | {{ each value.acceptoodsVo item i }} | ||
83 | {{ if value.realReceiveStore === item.id }} | ||
84 | <option value="{{ item.id }}" selected="selected">{{ item.positionName }}</option> | ||
85 | {{ else }} | ||
86 | <option value="{{ item.id }}">{{ item.positionName }}</option> | ||
87 | {{ /if }} | ||
88 | {{ /each }} | ||
89 | </select> | ||
90 | </div> | ||
91 | </div> | ||
92 | </div> | ||
93 | </div> | ||
94 | <div class="am-flexbox-item"> | ||
95 | 扫描货位: | ||
96 | <a href="#modal" class="qrcode" id="qrcode" data-value="{{value}}" data-index="{{1}}" style="height: 32px;width: 32px;display: inline-block;"> | ||
97 | <img src="../../assest/qrcode.png" style="width:100%;height: 100%;margin-bottom: -14px;" width="30" height="30"/> | ||
98 | </a> | ||
99 | </div> | ||
100 | <div class="am-flexbox-item"> | ||
101 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
102 | <div class="am-list-line"> | ||
103 | <div class="am-input-label am-input-label-6 font-warning">实际上架数量:</div> | ||
104 | <div class="am-input-control"> | ||
105 | <input class="realNum flex-item-input" type="tel" value="{{ value.realNum ? value.realNum : 0}}" placeholder="请输入" data-id="{{value.id}}" data-oldValue = "{{value.realNum}}" data-realReceiveQuantiry = "{{ value.realReceiveQuantiry }}" /> | ||
106 | </div> | ||
107 | </div> | ||
108 | </div> | ||
109 | </div> | ||
110 | </div> | ||
111 | </div> | ||
112 | {{ /if }} | ||
113 | {{ /if }} | ||
114 | <div class="am-flexbox am-flexbox-align-center"> | ||
115 | <div class="am-flexbox-item"> | ||
116 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
117 | </div> | ||
118 | </div> | ||
119 | </div> | ||
120 | <div class="am-card-footer"> | ||
121 | <div class="am-card-footer-content"></div> | ||
122 | <div class="am-card-footer-extra"> | ||
123 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined moreDetail" data-id="{{ value.id }}" data-index="{{ i }}" data-upParentId="{{value.upParentId?value.upParentId:0}}" style="margin: 0 5px;">更多详情</button> | ||
124 | {{ if hasGround }} | ||
125 | <button type="button" class="mui-btn mui-btn-danger ground" data-id="{{ value.id }}" data-index="{{ i }}" >确认上架</button> | ||
126 | {{ /if }} | ||
127 | </div> | ||
128 | </div> | ||
129 | </div> | ||
130 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
131 | </div> | ||
132 | {{/each}} | ||
133 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/guide.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="utf-8"> | ||
6 | <title>Hello MUI</title> | ||
7 | <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"> | ||
8 | <meta name="apple-mobile-web-app-capable" content="yes"> | ||
9 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> | ||
10 | |||
11 | <link rel="stylesheet" href="../css/mui.min.css"> | ||
12 | <style> | ||
13 | #close { | ||
14 | position: absolute; | ||
15 | width: 160px; | ||
16 | left: 50%; | ||
17 | margin-left: -80px; | ||
18 | /* bottom: 190px; */ | ||
19 | bottom: 120px; | ||
20 | padding: 10px; | ||
21 | color: #fff; | ||
22 | border-color: #F2A11C; | ||
23 | background-color: #F2A11C; | ||
24 | } | ||
25 | .animate { | ||
26 | position: absolute; | ||
27 | left: 0; | ||
28 | bottom: 0; | ||
29 | width: 100%; | ||
30 | color: #fff; | ||
31 | display: -moz-box; | ||
32 | } | ||
33 | .animated { | ||
34 | position: absolute; | ||
35 | width: 100%; | ||
36 | height: 50px; | ||
37 | -webkit-animation-duration: 4s; | ||
38 | -webkit-animation-play-state: paused; | ||
39 | -webkit-animation-fill-mode: both; | ||
40 | } | ||
41 | .bounceInDown { | ||
42 | -webkit-animation-name: bounceInDown; | ||
43 | -webkit-animation-play-state: running; | ||
44 | -webkit-animation-delay: 1s; | ||
45 | display: block; | ||
46 | } | ||
47 | |||
48 | @-webkit-keyframes bounceInDown { | ||
49 | 0%, 60%, 75%, 90%, 100% { | ||
50 | -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); | ||
51 | animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); | ||
52 | } | ||
53 | 0% { | ||
54 | opacity: 0; | ||
55 | -webkit-transform: translate3d(0, 2000px, 0); | ||
56 | transform: translate3d(0, 2000px, 0); | ||
57 | } | ||
58 | 60% { | ||
59 | opacity: .8; | ||
60 | -webkit-transform: translate3d(0, 770px, 0); | ||
61 | transform: translate3d(0, 770px, 0); | ||
62 | } | ||
63 | 100% { | ||
64 | opacity: 1; | ||
65 | -webkit-transform: translate3d(0, 750px, 0); | ||
66 | transform: translate3d(0, 750px, 0); | ||
67 | } | ||
68 | } | ||
69 | |||
70 | </style> | ||
71 | </head> | ||
72 | |||
73 | <body> | ||
74 | <div id="slider" class="mui-slider mui-fullscreen" style="background-color: #fff;"> | ||
75 | <div class="mui-slider-group"> | ||
76 | <!-- 第一张 --> | ||
77 | <div class="mui-slider-item"> | ||
78 | <div class="animate guide-show"> | ||
79 | <img src="../assest/guide-pic1.png"/> | ||
80 | </div> | ||
81 | </div> | ||
82 | <!-- 第二张 --> | ||
83 | <div class="mui-slider-item"> | ||
84 | <div id="tips-2" class="animate mui-hidden"> | ||
85 | <img src="../assest/guide-pic2.png"/> | ||
86 | </div> | ||
87 | </div> | ||
88 | <!-- 第三张 --> | ||
89 | <div class="mui-slider-item"> | ||
90 | <div id="tips-3" class="animate mui-hidden"> | ||
91 | <img src="../assest/guide-pic3.png"/> | ||
92 | </div> | ||
93 | <div class="animated bounceInDown"> | ||
94 | <button id='close' class="mui-btn mui-btn-warning mui-btn-outlined">立即体验</button> | ||
95 | </div> | ||
96 | </div> | ||
97 | </div> | ||
98 | |||
99 | <div class="mui-slider-indicator"> | ||
100 | <div class="mui-indicator mui-active"></div> | ||
101 | <div class="mui-indicator"></div> | ||
102 | <div class="mui-indicator"></div> | ||
103 | </div> | ||
104 | </div> | ||
105 | <script src="../js/mui.min.js"></script> | ||
106 | <script> | ||
107 | mui.back = function() {}; | ||
108 | mui.plusReady(function() { | ||
109 | if(mui.os.ios){ | ||
110 | plus.navigator.setFullscreen(true); | ||
111 | } | ||
112 | plus.navigator.closeSplashscreen(); | ||
113 | }); | ||
114 | //立即体验按钮点击事件 | ||
115 | document.getElementById("close").addEventListener('tap', function(event) { | ||
116 | |||
117 | plus.storage.setItem("launchFlag", "true"); | ||
118 | plus.navigator.setFullscreen(false); | ||
119 | // plus.webview.currentWebview().close(); | ||
120 | mui.openWindow({ | ||
121 | url:'login/index.html', | ||
122 | id:'login/index.html', | ||
123 | }); | ||
124 | }, false); | ||
125 | //图片切换时,触发动画 | ||
126 | document.querySelector('.mui-slider').addEventListener('slide', function(event) { | ||
127 | //注意slideNumber是从0开始的; | ||
128 | var index = event.detail.slideNumber+1; | ||
129 | if(index==2||index==3){ | ||
130 | var item = document.getElementById("tips-"+index); | ||
131 | if(item.classList.contains("mui-hidden")){ | ||
132 | item.classList.remove("mui-hidden"); | ||
133 | item.classList.add("guide-show"); | ||
134 | } | ||
135 | } | ||
136 | }); | ||
137 | |||
138 | </script> | ||
139 | </body> | ||
140 | |||
141 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/home/index.html
0 → 100644
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <title></title> | ||
6 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
7 | <link href="../../css/mui.css" rel="stylesheet" /> | ||
8 | <link rel="stylesheet" type="text/css" href="../../css/themes.css" /> | ||
9 | <link rel="stylesheet" type="text/css" href="../../css/home.css" /> | ||
10 | <link rel="import" href="../../tpl/message.html" id="message" /> | ||
11 | </head> | ||
12 | <body> | ||
13 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
14 | <h1 class="mui-title themes_title">药品物流管理系统</h1> | ||
15 | <div class="themes_font_color themes_nav_right mui-icon mui-icon-contact"> | ||
16 | |||
17 | </div> | ||
18 | </header> | ||
19 | <div style="margin-top: 44px;"> | ||
20 | <div class="home-card-wrapper"> | ||
21 | <div class="home-card-title">我的工作</div> | ||
22 | <div class="home-card-content" style="height: 92px;"> | ||
23 | <div class="mui-loading"> | ||
24 | <div class="mui-spinner"> | ||
25 | </div> | ||
26 | </div> | ||
27 | </div> | ||
28 | </div> | ||
29 | <div class="home-card-wrapper" style="padding: 16px"> | ||
30 | <div class="home-card-title">提醒消息</div> | ||
31 | </div> | ||
32 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 260px;"> | ||
33 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
34 | <a class="mui-control-item themes_font_color_tab mui-active" data-remindType='lowStock' href="#item1mobile">低库存提醒</a> | ||
35 | <a class="mui-control-item themes_font_color_tab" data-remindType='usefulDate' href="#item2mobile">近效期提醒</a> | ||
36 | </div> | ||
37 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
38 | <div class="mui-slider-group" id="message-list"> | ||
39 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
40 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
41 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
42 | <ul class="mui-table-view"> | ||
43 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
44 | </ul> | ||
45 | </div> | ||
46 | </div> | ||
47 | </div> | ||
48 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
49 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
50 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
51 | <ul class="mui-table-view"> | ||
52 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"></li> | ||
53 | </ul> | ||
54 | </div> | ||
55 | </div> | ||
56 | |||
57 | </div> | ||
58 | </div> | ||
59 | </div> | ||
60 | <!--<div id="message-list" class="mui-content mui-scroll-wrapper" style="margin-top: -16px;"> | ||
61 | <div class="mui-scroll"> | ||
62 | |||
63 | <ul class="mui-table-view mui-table-view-chevron"> | ||
64 | |||
65 | </ul> | ||
66 | </div> | ||
67 | </div>--> | ||
68 | </div> | ||
69 | <script src="../../js/mui.js"></script> | ||
70 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
71 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
72 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
73 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
74 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
75 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
76 | <script type="text/javascript"> | ||
77 | |||
78 | (function ($, doc) { | ||
79 | |||
80 | var deceleration = mui.os.ios?0.003:0.0009; | ||
81 | $('.mui-scroll-wrapper').scroll({ | ||
82 | bounce: true, | ||
83 | indicators: true, //是否显示滚动条 | ||
84 | deceleration:deceleration | ||
85 | }); | ||
86 | |||
87 | // 挂载模板 | ||
88 | var utils = new Utils(); | ||
89 | utils.appendModule('#message'); | ||
90 | var nums = {}; // 数量 | ||
91 | var remindType = 'lowStock', page = 1, pageSize = 15, totalPage = 0, | ||
92 | url = '/a/pad/drugremind/findPadRemindListTow',logoutUrl = '/a/logout'; | ||
93 | var itemDesc = [ | ||
94 | { | ||
95 | text: '验收', | ||
96 | url: '../acceptance/index', | ||
97 | src: '../../images/icon_check_before_acceptance.png' | ||
98 | }, | ||
99 | { | ||
100 | text: '上架', | ||
101 | url: '../grounding/index', | ||
102 | src: '../../images/icon_grounding.png' | ||
103 | }, | ||
104 | { | ||
105 | text: '拣货下架', | ||
106 | url: '../pickingOff/index', | ||
107 | src: '../../images/icon_lower_frame.png' | ||
108 | }, | ||
109 | { | ||
110 | text: '盘点', | ||
111 | url: '../check/index', | ||
112 | src: '../../images/icon_inventory.png' | ||
113 | }, | ||
114 | { | ||
115 | text: '库存查询', | ||
116 | url: '../stockQuery/index', | ||
117 | src: '../../images/icon_query.png' | ||
118 | }, | ||
119 | { | ||
120 | text: '药品追溯', | ||
121 | url: '../trace/index', | ||
122 | src: '../../images/icon_trace.png' | ||
123 | }, | ||
124 | { | ||
125 | text: '货位移动', | ||
126 | url: '../move/index', | ||
127 | src: '../../images/icon_move.png' | ||
128 | } | ||
129 | ]; | ||
130 | var basicMediclist = [ | ||
131 | { | ||
132 | text: '验收', | ||
133 | url: '../basicMedicine/index', | ||
134 | src: '../../images/icon_query.png' | ||
135 | }, | ||
136 | { | ||
137 | text: '库存查询', | ||
138 | url: '../stockQuery/index', | ||
139 | src: '../../images/icon_query.png' | ||
140 | } | ||
141 | ]; | ||
142 | var first = null; | ||
143 | // 监听返回按键 退出操作 | ||
144 | document.addEventListener("plusready", function() { | ||
145 | // 注册返回按键事件 | ||
146 | mui.back = function(){ | ||
147 | if (!first) { | ||
148 | first = new Date().getTime(); | ||
149 | mui.toast('再按一次退出应用',{ type: 'div' }); | ||
150 | setTimeout(function() { | ||
151 | first = null; | ||
152 | }, 1000); | ||
153 | } else { | ||
154 | if (new Date().getTime() - first < 1000) { | ||
155 | mui.confirm('是否确定退出?','确定',['取消','确认'],function(event){ | ||
156 | console.log(event.index) | ||
157 | if(event.index === 1){ | ||
158 | mui.ajaxRequest(logoutUrl,{ | ||
159 | type: 'GET', | ||
160 | data: {}, | ||
161 | success: function(data){ | ||
162 | if(data.code === 200){ | ||
163 | console.log('退出了') | ||
164 | plus.runtime.quit(); | ||
165 | } | ||
166 | }, | ||
167 | error: function(){ | ||
168 | mui.toast('网络异常,请稍后在试',{ type: 'div' }); | ||
169 | } | ||
170 | }) | ||
171 | } | ||
172 | },'div') | ||
173 | } | ||
174 | } | ||
175 | } | ||
176 | }); | ||
177 | |||
178 | var selected = '.mui-tab1', | ||
179 | hasChecked = false, | ||
180 | query = {}; | ||
181 | |||
182 | var pageLeft = 1, | ||
183 | pageRight = 1, | ||
184 | totalPageLeft, | ||
185 | totalPageRight, | ||
186 | isMore = true, | ||
187 | selectTabs = 1, | ||
188 | insertType = true; | ||
189 | // tab 切换事件 | ||
190 | $('#sliderSegmentedControl').on('tap','.mui-control-item',function(){ | ||
191 | remindType = this.dataset.remindtype; | ||
192 | url = remindType === 'lowStock' ? '/a/pad/drugremind/findPadRemindListTow': '/a/pad/drugremind/findPadRemindList'; | ||
193 | // toTopResetRefresh(remindType); | ||
194 | }) | ||
195 | |||
196 | function toTopResetRefresh(remindType){ | ||
197 | page = 1; | ||
198 | pageSize = pageSize, | ||
199 | totalPage = 0; | ||
200 | setTimeout(function(){ | ||
201 | let index = remindType === 'lowStock'? 0 : 1; | ||
202 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
203 | },100) | ||
204 | } | ||
205 | |||
206 | function template(selected,data,insertType){ | ||
207 | console.log(selected,'selected') | ||
208 | utils.innerTplHtml('message-tpl', selected, data, insertType,function(){ | ||
209 | $('#message-list').on('tap','.message-detail',function(){ | ||
210 | console.log(this.dataset,'dataset') | ||
211 | var dataset = this.dataset; | ||
212 | dataset.remindType = remindType; | ||
213 | common.openwin('./tips', { | ||
214 | tipId: JSON.stringify(dataset) | ||
215 | }, { | ||
216 | titleText: '提醒' | ||
217 | }) | ||
218 | }) | ||
219 | }); | ||
220 | } | ||
221 | function pullupRefresh(){ | ||
222 | var self = this; | ||
223 | console.log(isMore,'isMore') | ||
224 | if(isMore){ | ||
225 | if(selectTabs === 1){ | ||
226 | pageLeft ++; | ||
227 | }else{ | ||
228 | pageRight ++; | ||
229 | } | ||
230 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
231 | totalPage = selectTabs === 1 ? totalPageLeft: totalPageRight; | ||
232 | var postData = { | ||
233 | pageNo: page, | ||
234 | pageSize: pageSize | ||
235 | } | ||
236 | console.log(page,totalPage,'page','pageTotal') | ||
237 | // if(page < totalPage){ | ||
238 | mui.ajaxRequest(url,{ | ||
239 | type: 'POST', | ||
240 | data: postData, | ||
241 | success: function(data){ | ||
242 | var resData = data.data; | ||
243 | if(resData.pageNo === resData.totalPage){ | ||
244 | isMore = false; | ||
245 | self.endPullUpToRefresh(true); | ||
246 | }else{ | ||
247 | isMore = true; | ||
248 | self.endPullUpToRefresh(false); | ||
249 | self.refresh(true); | ||
250 | } | ||
251 | return template(selected,resData,true) | ||
252 | }, | ||
253 | error: function(xhr,type,errorThrown){ | ||
254 | alert(xhr.responseText) | ||
255 | } | ||
256 | }) | ||
257 | // } | ||
258 | }else{ | ||
259 | var i = selectTabs === 1 ? 0 : 1; | ||
260 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
261 | self.endPullUpToRefresh(true); | ||
262 | } | ||
263 | } | ||
264 | |||
265 | |||
266 | function pulldownRefresh(){ | ||
267 | var self = this; | ||
268 | if(selectTabs === 1){ | ||
269 | pageLeft = 1 | ||
270 | }else{ | ||
271 | pageRight = 1; | ||
272 | } | ||
273 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
274 | var postData = { | ||
275 | pageNo: 1, | ||
276 | pageSize: pageSize | ||
277 | } | ||
278 | mui.ajaxRequest(url,{ | ||
279 | type: 'POST', | ||
280 | data: postData, | ||
281 | success: function(data){ | ||
282 | var resData = data.data; | ||
283 | var total = resData.totalPage; | ||
284 | if(selectTabs === 1){ | ||
285 | totalPageLeft = total; | ||
286 | }else{ | ||
287 | totalPageRight = total; | ||
288 | } | ||
289 | page = resData.pageNo; | ||
290 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
291 | var i = selectTabs === 1 ? 0 : 1; | ||
292 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
293 | isMore = false; | ||
294 | self.endPullDownToRefresh(true); | ||
295 | }else{ | ||
296 | isMore = true; | ||
297 | self.endPullDownToRefresh(false); | ||
298 | self.refresh(true); | ||
299 | } | ||
300 | return template(selected,resData,true) | ||
301 | }, | ||
302 | error: function(xhr,type,errorThrown){ | ||
303 | alert(xhr.responseText) | ||
304 | } | ||
305 | }) | ||
306 | } | ||
307 | |||
308 | $.plusReady(function () { | ||
309 | window.addEventListener('refresh', function(e) { | ||
310 | if(e.detail.getCountFlag){ | ||
311 | window.location.reload(); | ||
312 | } | ||
313 | }); | ||
314 | getCount(); // 获取数量 | ||
315 | //循环初始化所有下拉刷新,上拉加载。 | ||
316 | $.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) { | ||
317 | $(pullRefreshEl).pullToRefresh({ | ||
318 | down: { | ||
319 | style:'circle', | ||
320 | contentdown : "下拉可以刷新", | ||
321 | contentover : "释放立即刷新", | ||
322 | contentrefresh : "正在刷新...", | ||
323 | callback: pulldownRefresh | ||
324 | }, | ||
325 | up: { | ||
326 | height: 200, | ||
327 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
328 | contentnomore:'没有更多数据', | ||
329 | callback: pullupRefresh | ||
330 | } | ||
331 | }); | ||
332 | }); | ||
333 | // 第一个tab 默认加载一次数据 | ||
334 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
335 | |||
336 | var item2 = document.querySelector('#item2mobile'); | ||
337 | var item1 = document.querySelector('#item1mobile'); | ||
338 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
339 | let index = e.detail.slideNumber; | ||
340 | if (index === 1) { | ||
341 | url = '/a/pad/drugremind/findPadRemindList'; | ||
342 | selected = '.mui-tab2'; | ||
343 | hasChecked = true; | ||
344 | selectTabs = 2; | ||
345 | if (!item2.querySelector('.am-card')) { | ||
346 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
347 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
348 | } | ||
349 | } | ||
350 | if(index === 0){ | ||
351 | url = '/a/pad/drugremind/findPadRemindListTow' | ||
352 | selected = '.mui-tab1'; | ||
353 | hasChecked = false; | ||
354 | selectTabs = 1; | ||
355 | if (!item1.querySelector('.am-card')) { | ||
356 | insertType = false; | ||
357 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
358 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
359 | } | ||
360 | } | ||
361 | }); | ||
362 | |||
363 | function getExitsItem(){ | ||
364 | if(plus.storage.getItem('currDept')){ | ||
365 | document.querySelector('.home-card-content').innerHTML = ''; | ||
366 | document.querySelector('.home-card-content').style.justifyContent = 'space-between'; | ||
367 | var currDept = JSON.parse(plus.storage.getItem('currDept')); | ||
368 | if(currDept.deptType === '3' || currDept.deptType === '4'){ | ||
369 | for(var i=0; i<itemDesc.length; i++){ | ||
370 | var div = document.createElement('div'); | ||
371 | div.className = 'home-card-item'; | ||
372 | div.setAttribute('data-src', itemDesc[i].url); | ||
373 | var addHtml = '<img width="65" height="65" src=' + itemDesc[i].src + ' />'+ | ||
374 | '<div class="home-card-text">'+ itemDesc[i].text +'</div>'; | ||
375 | div.innerHTML = addHtml; | ||
376 | if(i < 3){ | ||
377 | div.innerHTML = '<span class="mui-badge mui-badge-warning badge">'+ nums[i+1] +'</span>'+ addHtml | ||
378 | } | ||
379 | document.querySelector('.home-card-content').appendChild(div); | ||
380 | } | ||
381 | }else{ | ||
382 | for(var i=0; i< 2; i++){ | ||
383 | var div = document.createElement('div'); | ||
384 | div.className = 'home-card-item'; | ||
385 | var addHtml; | ||
386 | if(i === 0){ | ||
387 | div.setAttribute('data-src', basicMediclist[0].url); | ||
388 | addHtml = '<span class="mui-badge mui-badge-warning badge">'+ nums[1] +'</span>' + '<img width="65" height="65" src=' + itemDesc[0].src + ' />'+ | ||
389 | '<div class="home-card-text">'+ basicMediclist[0].text +'</div>'; | ||
390 | }else{ | ||
391 | div.setAttribute('data-src', basicMediclist[1].url); | ||
392 | addHtml = '<img width="65" height="65" src=' + basicMediclist[1].src + ' />'+ | ||
393 | '<div class="home-card-text">'+ basicMediclist[1].text +'</div>'; | ||
394 | } | ||
395 | div.innerHTML = addHtml; | ||
396 | document.querySelector('.home-card-content').appendChild(div); | ||
397 | document.querySelector('.home-card-content').style.justifyContent = 'space-around'; | ||
398 | } | ||
399 | } | ||
400 | }else{ | ||
401 | mui.toast('请重新登陆',{ type: 'div' }); | ||
402 | common.openwin('../login/index',{}) | ||
403 | } | ||
404 | } | ||
405 | // 获取数量 | ||
406 | function getCount(){ | ||
407 | mui.ajaxRequest('/a/pad/countUnCheck',{ | ||
408 | type: 'POST', | ||
409 | data: {}, | ||
410 | success: function(data){ | ||
411 | if(data.code === 200){ | ||
412 | nums = data.data; | ||
413 | getExitsItem(); // 获取当前用户所拥有的模块 | ||
414 | }else{ | ||
415 | console.log(data.msg) | ||
416 | } | ||
417 | }, | ||
418 | error: function(xhr,type,errorThrown){ | ||
419 | alert(xhr.responseText) | ||
420 | } | ||
421 | }) | ||
422 | } | ||
423 | |||
424 | var btn = document.querySelector('.themes_nav_right') | ||
425 | btn.addEventListener('tap', function (e) { | ||
426 | common.openwin('./profile', { | ||
427 | tipId: this.dataset.id | ||
428 | }, { | ||
429 | titleText: '账号' | ||
430 | }) | ||
431 | }) | ||
432 | // 点击跳转 | ||
433 | $('.home-card-content').on('tap', '.home-card-item',function() { | ||
434 | if(this.dataset.title){ | ||
435 | common.openwin(this.dataset.src, {}, { | ||
436 | titleText: this.dataset.title, | ||
437 | isScan: true | ||
438 | }) | ||
439 | }else{ | ||
440 | common.openwin(this.dataset.src, {}) | ||
441 | } | ||
442 | |||
443 | }) | ||
444 | }) | ||
445 | }(mui, document)) | ||
446 | </script> | ||
447 | </body> | ||
448 | |||
449 | </html> |
container/home/profile.html
0 → 100644
1 | <!doctype html> | ||
2 | <html> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="utf-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.css" rel="stylesheet" /> | ||
9 | <style> | ||
10 | .theme_font_warning{ | ||
11 | color: #f2a11c; | ||
12 | } | ||
13 | </style> | ||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <div class="mui-content"> | ||
18 | <ul class="mui-table-view"> | ||
19 | <li class="mui-table-view-cell"> | ||
20 | 账号信息 | ||
21 | <span class="mui-pull-right version" style="font-size: 14px;"></span> | ||
22 | </li> | ||
23 | </ul> | ||
24 | <ul class="mui-table-view" style='margin-top: 16px;'> | ||
25 | <li class="mui-table-view-cell"> | ||
26 | 系统信息 | ||
27 | </li> | ||
28 | </ul> | ||
29 | <ul class="mui-table-view mui-table-view-radio"> | ||
30 | |||
31 | </ul> | ||
32 | |||
33 | <div | ||
34 | style="width: 100%;margin-top: 16px;background: #f2a11c; text-align: center;color: #fff;" | ||
35 | class="mui-table-view-cell exit-btn" | ||
36 | > | ||
37 | 退出 | ||
38 | </div> | ||
39 | </div> | ||
40 | <script src="../../js/mui.js"></script> | ||
41 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
42 | <script type="text/javascript" src="../../js/request.js" ></script> | ||
43 | <script type="text/javascript"> | ||
44 | (function ($, doc) { | ||
45 | var changeFlag = false;// 是否切换了系统 | ||
46 | var logoutUrl = '/a/logout'; | ||
47 | $.init({ | ||
48 | beforeback: function() { | ||
49 | if(changeFlag){ | ||
50 | var list = plus.webview.currentWebview().opener(); | ||
51 | //触发列表界面的自定义事件(refresh),从而进行数据刷新 | ||
52 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
53 | //返回true,继续页面关闭逻辑 | ||
54 | return true; | ||
55 | } | ||
56 | |||
57 | } | ||
58 | }) | ||
59 | $.plusReady(function() { | ||
60 | |||
61 | plus.runtime.getProperty(plus.runtime.appid, function(info){ | ||
62 | console.log(info.version); | ||
63 | document.querySelector('.version').innerHTML = '当前版本V: '+ info.version; | ||
64 | }); | ||
65 | |||
66 | var ul = document.body.querySelector('.mui-table-view-radio'); | ||
67 | console.log(plus.storage.getItem('currDept')) | ||
68 | var deptId = JSON.parse(plus.storage.getItem('currDept')).deptId; | ||
69 | var btnArray = ['确认', '取消']; | ||
70 | if(plus.storage.getItem('deptList')){ | ||
71 | var deptList = JSON.parse(plus.storage.getItem('deptList')); | ||
72 | for(var i=0; i<deptList.length; i++){ | ||
73 | var li = document.createElement('li'); | ||
74 | li.className = deptId === deptList[i].deptId ? 'mui-table-view-cell mui-selected theme_font_warning':'mui-table-view-cell'; | ||
75 | li.setAttribute('data-id',deptList[i].deptId); | ||
76 | li.setAttribute('data-deptType',deptList[i].deptType); | ||
77 | li.setAttribute('data-deptname',deptList[i].deptName); | ||
78 | li.innerHTML = '<a class="mui-navigate-right">' + (deptList[i].deptName) + '</a>'; | ||
79 | ul.appendChild(li) | ||
80 | } | ||
81 | }; | ||
82 | |||
83 | mui('.mui-content').on('tap', '.exit-btn' ,function() { | ||
84 | mui.confirm('是否确认退出当前账号?', '确认', btnArray, function(e) { | ||
85 | if (e.index === 0) { | ||
86 | mui.ajaxRequest(logoutUrl,{ | ||
87 | type: 'GET', | ||
88 | data: {}, | ||
89 | success: function(data){ | ||
90 | if(data.code === 200){ | ||
91 | plus.storage.clear('searchHistory') | ||
92 | plus.storage.clear('currDept') | ||
93 | plus.storage.clear('deptList') | ||
94 | |||
95 | common.openwin('../login/index', {}) | ||
96 | } | ||
97 | }, | ||
98 | error: function(){ | ||
99 | //mui.toast('网络异常,请稍后在试'); | ||
100 | } | ||
101 | }) | ||
102 | } | ||
103 | },'div') | ||
104 | }) | ||
105 | |||
106 | mui('.mui-table-view-radio').on('tap','.mui-table-view-cell',function(){ | ||
107 | var _this = this; | ||
108 | if(this.dataset.id === JSON.parse(plus.storage.getItem('currDept')).deptId){ | ||
109 | return ; | ||
110 | } | ||
111 | mui.confirm('是否确认切换库房?', '确认', btnArray, function(e) { | ||
112 | if (e.index == 0) { | ||
113 | //与后台交互 | ||
114 | var currentDept = { | ||
115 | deptName: _this.dataset.deptname, | ||
116 | deptId: _this.dataset.id, | ||
117 | deptType: _this.dataset.depttype, | ||
118 | lastSelect: true | ||
119 | } | ||
120 | let history = undefined;// 设置历史记录数据结构 | ||
121 | if(currentDept.deptType === '3' || currentDept.deptType === '4' ){ | ||
122 | history = { | ||
123 | 'acceptance':{ | ||
124 | 'main_list': [], | ||
125 | 'sub_list':[] | ||
126 | }, | ||
127 | 'grounding':{ | ||
128 | 'main_list': [], | ||
129 | 'sub_list':[] | ||
130 | }, | ||
131 | 'pickingOff':{ | ||
132 | 'main_list': [], | ||
133 | 'sub_list':[] | ||
134 | }, | ||
135 | 'stock':{ | ||
136 | 'main_list': [], | ||
137 | } | ||
138 | } | ||
139 | }else{ | ||
140 | history = { | ||
141 | 'basicMedicine':{ | ||
142 | 'main_list': [], | ||
143 | 'sub_list':[] | ||
144 | }, | ||
145 | 'stock':{ | ||
146 | 'main_list': [], | ||
147 | } | ||
148 | } | ||
149 | } | ||
150 | |||
151 | plus.storage.setItem('currDept',JSON.stringify(currentDept)); | ||
152 | console.log(plus.storage.getItem('currDept')); | ||
153 | var url = '/a/cacheCurrentDept/'+ currentDept.deptId | ||
154 | mui.ajaxRequest(url,{ | ||
155 | type: 'get', | ||
156 | showWaiting: true, | ||
157 | success: function(data){ | ||
158 | if(data.code === 200){ | ||
159 | changeFlag = true; | ||
160 | plus.storage.setItem('searchHistory',JSON.stringify(history)); | ||
161 | document.querySelector('.theme_font_warning').className = 'mui-table-view-cell' | ||
162 | mui.toast('切换系统成功',{ type: 'div' }); | ||
163 | _this.className = 'mui-table-view-cell mui-selected theme_font_warning'; | ||
164 | }else{ | ||
165 | mui.toast('切换系统失败',{ div: 'type' }); | ||
166 | } | ||
167 | }, | ||
168 | error: function(xhr,type,errorThrown){ | ||
169 | alert(xhr.responseText) | ||
170 | } | ||
171 | }); | ||
172 | } | ||
173 | },'div') | ||
174 | // | ||
175 | }) | ||
176 | }) | ||
177 | }(mui, document)) | ||
178 | </script> | ||
179 | </body> | ||
180 | |||
181 | </html> |
container/home/tips.html
0 → 100644
1 | <!doctype html> | ||
2 | <html> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="utf-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.css" rel="stylesheet" /> | ||
9 | <link rel="stylesheet" type="text/css" href="../../css/home.css" /> | ||
10 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
11 | <link rel="import" href="../../tpl/tips.html" id="tips" /> | ||
12 | </head> | ||
13 | |||
14 | <body> | ||
15 | <div class="mui-content" id="tipDetail"> | ||
16 | |||
17 | </div> | ||
18 | <script src="../../js/mui.js"></script> | ||
19 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
20 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
21 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
22 | <script type="text/javascript"> | ||
23 | (function($, doc) { | ||
24 | // 挂载模板 | ||
25 | var utils = new Utils(); | ||
26 | utils.appendModule('#tips'); | ||
27 | $.plusReady(function() { | ||
28 | $.init(); | ||
29 | plus.screen.lockOrientation("portrait-primary"); | ||
30 | var self = plus.webview.currentWebview(); | ||
31 | |||
32 | var params = JSON.parse(self.tipId); | ||
33 | console.log(params) | ||
34 | var detialData = { list: [] }; | ||
35 | plus.nativeUI.showWaiting() | ||
36 | mui.ajaxRequest('/a/pad/drugreminddetail/findDrugRemindDetail',{ | ||
37 | data: { id: params.id }, | ||
38 | success: function(data){ | ||
39 | plus.nativeUI.closeWaiting() | ||
40 | var result = data.data; | ||
41 | detialData.list.push(result) | ||
42 | detialData.title = params.title; | ||
43 | detialData.tipdate = params.tipdate; | ||
44 | detialData.remindType = params.remindType; | ||
45 | console.log(detialData) | ||
46 | template(detialData); | ||
47 | }, | ||
48 | error: function(xhr,type,errorThrown){ | ||
49 | alert(xhr.responseText) | ||
50 | } | ||
51 | }) | ||
52 | |||
53 | |||
54 | }); | ||
55 | function template(data){ | ||
56 | utils.innerTplHtml('tips-tpl', '#tipDetail', data); | ||
57 | } | ||
58 | }(mui, document)) | ||
59 | </script> | ||
60 | </body> | ||
61 | |||
62 | </html> |
container/index.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="utf-8"> | ||
6 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
7 | <title>入口页面</title> | ||
8 | <link href="../css/mui.min.css" rel="stylesheet" /> | ||
9 | <style type="text/css"> | ||
10 | body { | ||
11 | background-color: black; | ||
12 | } | ||
13 | </style> | ||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <script src="../js/mui.min.js"></script> | ||
18 | <script type="text/javascript" charset="utf-8"> | ||
19 | mui.init(); | ||
20 | mui.plusReady(function() { | ||
21 | /** | ||
22 | * 获取本地存储中launchFlag的值 | ||
23 | * 若存在,说明不是首次启动,直接进入首页; | ||
24 | * 若不存在,说明是首次启动,进入引导页; | ||
25 | */ | ||
26 | var launchFlag = plus.storage.getItem("launchFlag"); | ||
27 | if(launchFlag) { | ||
28 | mui.openWindow({ | ||
29 | url: "login/index.html", | ||
30 | id: "login/index.html", | ||
31 | extras: { | ||
32 | mark: "index" //额外的参数,仅仅是个标识,实际开发中不用; | ||
33 | } | ||
34 | }); | ||
35 | } else { | ||
36 | mui.openWindow({ | ||
37 | url: "guide.html", | ||
38 | id: "guide" | ||
39 | }); | ||
40 | } | ||
41 | }); | ||
42 | </script> | ||
43 | </body> | ||
44 | |||
45 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/login/css/style.css
0 → 100644
1 | input{font-family: '\5FAE\8F6F\96C5\9ED1','\9ED1\4F53','\5B8B\4F53'; -webkit-appearance: none;} | ||
2 | input,button,select,textarea{padding: 0;font: inherit;outline: none;border: 0;border-radius: 0;-webkit-tap-highlight-color: transparent;appearance: none;-webkit-appearance: none;background: transparent;line-height: normal;box-sizing: border-box;-webkit-writing-mode: horizontal-tb;outline: 0;resize: none;color: inherit;white-space: pre-wrap;word-wrap: break-word;-webkit-rtl-ordering: logical;user-select: text;/*flex-direction: column;*/} | ||
3 | input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance: none !important; margin: 0;} | ||
4 | input[type=text],input[type=password]{ | ||
5 | line-height: normal; | ||
6 | height: auto; | ||
7 | margin-bottom: inherit; | ||
8 | border: none; | ||
9 | outline: none; | ||
10 | background: none; | ||
11 | } | ||
12 | .ui-page-login, | ||
13 | body { | ||
14 | width: 100%; | ||
15 | height: 100%; | ||
16 | margin: 0px; | ||
17 | padding: 0px; | ||
18 | } | ||
19 | .mui-content{ | ||
20 | height: 100%; | ||
21 | background: url(../../../assest/loginBg.jpg); | ||
22 | opacity: .8; | ||
23 | background-size: cover; | ||
24 | } | ||
25 | .am-title{ | ||
26 | text-align: center; | ||
27 | font-size: 26px; | ||
28 | color: #F2A11C; | ||
29 | padding: 100px 0; | ||
30 | } | ||
31 | #login-form{ | ||
32 | padding: 0 15px; | ||
33 | } | ||
34 | .am-input-row{ | ||
35 | display: flex; | ||
36 | width: 100%; | ||
37 | height: 60px; | ||
38 | border: solid 1px goldenrod; | ||
39 | border-radius: 60px; | ||
40 | align-items: center; | ||
41 | justify-content: center; | ||
42 | padding: 0 15px; | ||
43 | margin-bottom: 20px; | ||
44 | } | ||
45 | .am-input-label{ | ||
46 | width: 22%; | ||
47 | text-align: center; | ||
48 | } | ||
49 | .am-input-control{ | ||
50 | width: 100%; | ||
51 | } | ||
52 | .am-input-control input{ | ||
53 | width: 78%; | ||
54 | } | ||
55 | #login{ | ||
56 | width: 100%; | ||
57 | border-radius: 40px; | ||
58 | margin-top: 36px; | ||
59 | } | ||
60 |
container/login/index.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html class="ui-page-login"> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
6 | <title></title> | ||
7 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
8 | <link rel="stylesheet" type="text/css" href="css/style.css"/> | ||
9 | </head> | ||
10 | |||
11 | <body> | ||
12 | <div class="mui-content"> | ||
13 | <div class="am-title">药品物流管理系统</div> | ||
14 | <form id='login-form'> | ||
15 | <div class="am-input-row"> | ||
16 | <label class="am-input-label"> | ||
17 | <img src="../../assest/userlogin.svg" height="24" width="24" /> | ||
18 | </label> | ||
19 | <div class="am-input-control"> | ||
20 | <input id='account' type="text" placeholder="请输入账号"/> | ||
21 | </div> | ||
22 | </div> | ||
23 | <div class="am-input-row"> | ||
24 | <label class="am-input-label"> | ||
25 | <img src="../../assest/password.svg" height="24" width="24" /> | ||
26 | </label> | ||
27 | <div class="am-input-control"> | ||
28 | <input id='password' type="password" placeholder="请输入密码"/> | ||
29 | </div> | ||
30 | </div> | ||
31 | </form> | ||
32 | <div class="mui-content-padded"> | ||
33 | <button id='login' Readonly class="mui-btn mui-btn-block mui-btn-warning" data-loading-text = "登录中" data-loading-icon-position="right">登 录</button> | ||
34 | </div> | ||
35 | |||
36 | </div> | ||
37 | <script src="../../js/mui.min.js"></script> | ||
38 | <script src="../../js/common.js"></script> | ||
39 | <script type="text/javascript" src="../../js/request.js" ></script> | ||
40 | <script> | ||
41 | (function($, doc) { | ||
42 | $.init({ | ||
43 | statusBarBackground: '#f7f7f7' | ||
44 | }); | ||
45 | $.plusReady(function() { | ||
46 | plus.screen.lockOrientation("portrait-primary"); | ||
47 | var loginButton = doc.getElementById('login'); | ||
48 | var accountBox = doc.getElementById('account'); | ||
49 | var passwordBox = doc.getElementById('password'); | ||
50 | var btnArray = ['确认']; | ||
51 | loginButton.addEventListener('tap', function(event) { | ||
52 | document.activeElement.blur(); // 隐藏软键盘 | ||
53 | if(!accountBox.value) return mui.toast('请输入用户名',{ type: 'div' }); | ||
54 | if(!passwordBox.value) return mui.toast('请输入密码',{ type: 'div' }); | ||
55 | mui(this).button('loading'); | ||
56 | var _this = this; | ||
57 | mui.ajaxRequest('/a/entryPass/entryptPassword',{ | ||
58 | type: 'POST', | ||
59 | data: { | ||
60 | password: passwordBox.value | ||
61 | }, | ||
62 | success: function(data){ | ||
63 | if(data.code === 200){ | ||
64 | let entryPwd = data.data.password; | ||
65 | mui.ajaxRequest('/a/login',{ | ||
66 | type: 'POST', | ||
67 | data: { | ||
68 | username: accountBox.value, | ||
69 | password: entryPwd | ||
70 | }, | ||
71 | success: function(res){ | ||
72 | mui(_this).button('reset'); | ||
73 | if(res.code === 200){ | ||
74 | console.log(res) | ||
75 | var flag = setUser(res.data); | ||
76 | if(!flag) return mui.toast('请重新进行登陆操作',{ duration:'long', type:'div' }); | ||
77 | common.openwin('../home/index',{}) | ||
78 | }else{ | ||
79 | mui.toast(res.msg,{ type: 'div' }); | ||
80 | mui(_this).button('reset'); | ||
81 | } | ||
82 | |||
83 | }, | ||
84 | error: function(xhr,type,errorThrown){ | ||
85 | console.log(xhr.responseText) | ||
86 | } | ||
87 | }) | ||
88 | }else{ | ||
89 | mui.alert('账号或密码错误', '', btnArray, function(e) { | ||
90 | if (e.index == 0) { | ||
91 | // alert('你点击了是'); | ||
92 | } | ||
93 | },'div') | ||
94 | } | ||
95 | }, | ||
96 | error: function(xhr,type,errorThrown){ | ||
97 | mui(_this).button('reset'); | ||
98 | |||
99 | } | ||
100 | }) | ||
101 | }); | ||
102 | }); | ||
103 | }(mui, document)); | ||
104 | |||
105 | function setUser(res){ | ||
106 | var deptInfo = res.deptInfo; | ||
107 | var deptList = []; | ||
108 | var currDept = {}; | ||
109 | mui.each(deptInfo,function(index,item){ | ||
110 | if(item.deptType === "3" || item.deptType === '4'|| item.deptType === '5'){ | ||
111 | var deptItem = { | ||
112 | deptId: item.deptId, | ||
113 | deptType: item.deptType, | ||
114 | deptName: item.deptName, | ||
115 | lastSelect: item.lastSelect | ||
116 | } | ||
117 | if(item.lastSelect){ | ||
118 | currDept = item; | ||
119 | } | ||
120 | deptList.push(deptItem); | ||
121 | } | ||
122 | }); | ||
123 | currDept = currDept.deptId ? currDept: deptList[0]; | ||
124 | plus.storage.setItem('currDept',JSON.stringify(currDept)); | ||
125 | plus.storage.setItem('deptList',JSON.stringify(deptList)); | ||
126 | // 后台设置当前选中库房 | ||
127 | var url = '/a/cacheCurrentDept/'+ currDept.deptId | ||
128 | mui.ajaxRequest(url,{ | ||
129 | type: 'get', | ||
130 | showWaiting: true, | ||
131 | success: function(data){ | ||
132 | if(data.code === 200){ | ||
133 | mui.toast('设置当前系统成功',{ type: 'div' }); | ||
134 | let history = undefined;// 设置历史记录数据结构 | ||
135 | if(currDept.deptType === '3' || currDept.deptType === '4' ){ | ||
136 | history = { | ||
137 | 'acceptance':{ | ||
138 | 'main_list': [], | ||
139 | 'sub_list':[] | ||
140 | }, | ||
141 | 'grounding':{ | ||
142 | 'main_list': [], | ||
143 | 'sub_list':[] | ||
144 | }, | ||
145 | 'pickingOff':{ | ||
146 | 'main_list': [], | ||
147 | 'sub_list':[] | ||
148 | }, | ||
149 | 'stock':{ | ||
150 | 'main_list': [], | ||
151 | } | ||
152 | } | ||
153 | }else{ | ||
154 | history = { | ||
155 | 'acceptance':{ | ||
156 | 'main_list': [], | ||
157 | 'sub_list':[] | ||
158 | }, | ||
159 | 'stock':{ | ||
160 | 'main_list': [], | ||
161 | } | ||
162 | } | ||
163 | } | ||
164 | plus.storage.setItem('searchHistory',JSON.stringify(history)); | ||
165 | }else{ | ||
166 | mui.toast('设置切换系统失败,请重新登陆',{ type: 'div' }); | ||
167 | return false | ||
168 | } | ||
169 | }, | ||
170 | error: function(xhr,type,errorThrown){ | ||
171 | return false | ||
172 | } | ||
173 | }); | ||
174 | return true | ||
175 | } | ||
176 | </script> | ||
177 | </body> | ||
178 | |||
179 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/move/index.html
0 → 100644
1 | <!doctype html> | ||
2 | <html | ||
3 | <head> | ||
4 | <meta charset="UTF-8"> | ||
5 | <title></title> | ||
6 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
7 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
8 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
9 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
10 | <link rel="import" href="./move_list_tpl.html" id="move_list"/> | ||
11 | <style> | ||
12 | .competition { | ||
13 | margin: 10px 0 0 0; | ||
14 | position: relative; | ||
15 | } | ||
16 | .competition>.head { | ||
17 | display: flex; | ||
18 | justify-content: flex-start; | ||
19 | align-items: center; | ||
20 | padding: 5px 0; | ||
21 | color: #333; | ||
22 | font-size: 16px; | ||
23 | background-color: #fff; | ||
24 | } | ||
25 | .mui-table-view-cell { | ||
26 | margin: 5px 7px!important; | ||
27 | padding: 0; | ||
28 | border-radius: 6px; | ||
29 | background: #efeff4!important; | ||
30 | } | ||
31 | .mrl-5{ | ||
32 | margin-left: 5%; | ||
33 | } | ||
34 | .text-leart { | ||
35 | display: flex; | ||
36 | justify-content: flex-start; | ||
37 | align-items: center; | ||
38 | min-height: 150px; | ||
39 | margin-top: 10px; | ||
40 | background: #fff; | ||
41 | font-size: 16px; | ||
42 | padding-left: 5%; | ||
43 | } | ||
44 | .head-left, .head-right{ | ||
45 | display: flex; | ||
46 | justify-content: flex-start; | ||
47 | align-items: center; | ||
48 | padding-left: 5%; | ||
49 | height: 100%; | ||
50 | width: 40%; | ||
51 | } | ||
52 | .head-right .qrcode{ | ||
53 | display: flex; | ||
54 | justify-content: flex-start; | ||
55 | align-items: center; | ||
56 | } | ||
57 | .mui-row>[class*=mui-col-] { | ||
58 | line-height: 30px; | ||
59 | } | ||
60 | </style> | ||
61 | </head> | ||
62 | |||
63 | <body> | ||
64 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
65 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
66 | <label class="mui-pull-right theme_back_font">返回</label> | ||
67 | </a> | ||
68 | <h1 class="mui-title themes_title">货位移动</h1> | ||
69 | </header> | ||
70 | <div class="mui-content"> | ||
71 | <div class="competition"> | ||
72 | <div class="head"> | ||
73 | <div class="head-left"><i class="mui-icon mui-icon-camera"></i>请扫描货位二维码</div> | ||
74 | <a href="#modal" class="head-right"> | ||
75 | <div class="qrcode" id="qrcode" onclick="clicked()"> | ||
76 | <img src="../../assest/qrcode.png" width="48" height="48"/> | ||
77 | </div> | ||
78 | </a> | ||
79 | </div> | ||
80 | <div id="content"> | ||
81 | <div class="text-leart"> | ||
82 | <div class="text-content"> | ||
83 | <i class="mui-icon mui-icon-locked"></i>扫描货位成功后,即显示该货位对应商品! | ||
84 | </div> | ||
85 | </div> | ||
86 | </div> | ||
87 | </div> | ||
88 | </div> | ||
89 | |||
90 | <script src="../../js/mui.js"></script> | ||
91 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
92 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
93 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
94 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
95 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
96 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
97 | |||
98 | |||
99 | <script type="text/javascript"> | ||
100 | //货位码 | ||
101 | var locationName = ""; | ||
102 | function clicked(){ | ||
103 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫货位码' }) | ||
104 | } | ||
105 | |||
106 | /*获取二维码返回值*/ | ||
107 | function scaned(t, r, f) { | ||
108 | |||
109 | console.log(r+"二维码读取的数据");//返回二维码读取的数据 | ||
110 | locationName = r; | ||
111 | getData(locationName); | ||
112 | } | ||
113 | //将tpl模板添加在页面上 | ||
114 | var utils = new Utils(); | ||
115 | utils.appendModule('#move_list'); | ||
116 | //渲染模板 | ||
117 | function renderTemplate(data, insertType){ | ||
118 | |||
119 | utils.innerTplHtml('move_list_tpl', "#content", data, insertType); | ||
120 | } | ||
121 | function getData(locationName,refreshFlag){ | ||
122 | |||
123 | var requestUrl = "/a/pad/locAdjust/getMedicinalLists"; | ||
124 | console.log(locationName) | ||
125 | var postData = {locationName:locationName}; | ||
126 | mui.ajaxRequest(requestUrl,{ | ||
127 | type: 'POST', | ||
128 | data: postData, | ||
129 | success: function(data){ | ||
130 | |||
131 | if(data.code == 200){ | ||
132 | var resData = data.data; | ||
133 | var total = resData.detailVos.totalPage; | ||
134 | if(resData.detailVos.list.length == 0 || total == 0){ | ||
135 | document.querySelectorAll('.text-content')[0].innerHTML = '此货位下没有商品!'; | ||
136 | }else{ | ||
137 | return renderTemplate(resData,false); | ||
138 | } | ||
139 | }else{ | ||
140 | //继续移动,无数据,直接刷新 | ||
141 | if(refreshFlag){ | ||
142 | window.location.reload(); | ||
143 | }else{ | ||
144 | mui.alert(data.msg,'提示','确定',function (e) {},'div'); | ||
145 | } | ||
146 | } | ||
147 | }, | ||
148 | error: function(xhr,type,errorThrown){ | ||
149 | console.log(xhr.responseText) | ||
150 | } | ||
151 | }); | ||
152 | } | ||
153 | |||
154 | (function($,window) { | ||
155 | |||
156 | $.init({ | ||
157 | beforeback:function(){ | ||
158 | var list = plus.webview.currentWebview().opener(); | ||
159 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
160 | var cur= plus.webview.currentWebview(); | ||
161 | plus.webview.close(cur.id) | ||
162 | return true; | ||
163 | } | ||
164 | }); | ||
165 | $.plusReady(function(){ | ||
166 | |||
167 | window.addEventListener('pagefresh',function(event){ | ||
168 | |||
169 | console.log(JSON.stringify(event.detail)) | ||
170 | //var datas = JSON.parse(event.detai); | ||
171 | if(typeof event.detail.params == "string"){ | ||
172 | var params = JSON.parse(event.detail.params); | ||
173 | oldLocationName = params.oldLocationName; | ||
174 | getData(oldLocationName,true); | ||
175 | } | ||
176 | }) | ||
177 | //绑定点击事件(移动) - 进入详情页 | ||
178 | $('#content').on('tap','.moveDrugs',function(event){ | ||
179 | |||
180 | var dataset = event.target.dataset; | ||
181 | common.openwin('moveDetail',{ params: JSON.stringify({dataset}) },false) | ||
182 | }) | ||
183 | |||
184 | }) | ||
185 | |||
186 | })(mui,window); | ||
187 | </script> | ||
188 | </body> | ||
189 | |||
190 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/move/moveDetail.html
0 → 100644
1 | <!--上架 - 详情页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
10 | <link href="../../css/check.css" rel="stylesheet"/> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link rel="import" href="./move_new_tpl.html" id="move_new"/> | ||
13 | <style> | ||
14 | .competition { | ||
15 | margin: 10px 0 0 0; | ||
16 | position: relative; | ||
17 | } | ||
18 | .competition>.head { | ||
19 | display: flex; | ||
20 | justify-content: flex-start; | ||
21 | align-items: center; | ||
22 | padding: 5px 0; | ||
23 | color: #333; | ||
24 | font-size: 16px; | ||
25 | background-color: #fff; | ||
26 | } | ||
27 | .mui-table-view-cell { | ||
28 | margin: 5px 7px!important; | ||
29 | padding: 0; | ||
30 | border-radius: 6px; | ||
31 | background: #efeff4!important; | ||
32 | } | ||
33 | .mrl-5{ | ||
34 | margin-left: 5%; | ||
35 | } | ||
36 | .text-leart { | ||
37 | display: flex; | ||
38 | justify-content: flex-start; | ||
39 | align-items: center; | ||
40 | min-height: 150px; | ||
41 | margin-top: 10px; | ||
42 | background: #fff; | ||
43 | font-size: 16px; | ||
44 | padding-left: 5%; | ||
45 | } | ||
46 | .head-left, .head-right{ | ||
47 | display: flex; | ||
48 | justify-content: flex-start; | ||
49 | align-items: center; | ||
50 | padding-left: 5%; | ||
51 | height: 100%; | ||
52 | width: 40%; | ||
53 | } | ||
54 | .head-right .qrcode{ | ||
55 | display: flex; | ||
56 | justify-content: flex-start; | ||
57 | align-items: center; | ||
58 | } | ||
59 | .mui-checkbox-content{ | ||
60 | margin-bottom: 20px; | ||
61 | display: flex; | ||
62 | justify-content: center; | ||
63 | align-items: center; | ||
64 | font-size: 20px; | ||
65 | } | ||
66 | .mui-checkbox input[type=checkbox]{ | ||
67 | position: unset !important; | ||
68 | } | ||
69 | .mui-checkbox label, .mui-radio label { | ||
70 | width: auto !important; | ||
71 | padding-right: 0 !important; | ||
72 | } | ||
73 | </style> | ||
74 | </style> | ||
75 | </head> | ||
76 | |||
77 | <body> | ||
78 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
79 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
80 | <label class="mui-pull-right theme_back_font">返回</label> | ||
81 | </a> | ||
82 | <h1 class="mui-title themes_title">货位移动详情</h1> | ||
83 | </header> | ||
84 | <div class="mui-content"> | ||
85 | <div class="competition"> | ||
86 | <div class="head"> | ||
87 | <div class="head-left"><i class="mui-icon mui-icon-camera"></i>请扫描新货位</div> | ||
88 | <a href="#modal" class="head-right"> | ||
89 | <div class="qrcode" id="qrcode"> | ||
90 | <img src="../../assest/qrcode.png" width="48" height="48"/> | ||
91 | </div> | ||
92 | </a> | ||
93 | </div> | ||
94 | <div id="content"> | ||
95 | <div class="text-leart"> | ||
96 | <div class="text-content"> | ||
97 | <i class="mui-icon mui-icon-locked"></i>扫描货位成功后,即可操作移动到新货位! | ||
98 | </div> | ||
99 | </div> | ||
100 | </div> | ||
101 | </div> | ||
102 | </div> | ||
103 | |||
104 | <script src="../../js/mui.min.js"></script> | ||
105 | <script src="../../js/jquery.min.js"></script> | ||
106 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
107 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
108 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
109 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
110 | <script type="text/javascript"> | ||
111 | //货位码 | ||
112 | var locationName = "",storeId = "",medName = ""; | ||
113 | /*获取二维码返回值*/ | ||
114 | function scaned(t, r, f) { | ||
115 | |||
116 | console.log(r+"二维码读取的数据");//返回二维码读取的数据 | ||
117 | locationName = r; | ||
118 | judgeLocationMove(locationName) | ||
119 | } | ||
120 | |||
121 | // 判断是否可以进行货位移动 | ||
122 | function judgeLocationMove(locationName){ | ||
123 | |||
124 | var requestUrl = "/a/pad/locAdjust/findNewLocInfo"; | ||
125 | var postData = {locationName:locationName,storeId:storeId}; | ||
126 | mui.ajaxRequest(requestUrl,{ | ||
127 | type: 'POST', | ||
128 | data: postData, | ||
129 | success: function(data){ | ||
130 | |||
131 | if(data.code == 200){ | ||
132 | if(data.data.returnFla){ | ||
133 | var sendData = data.data; | ||
134 | renderTemplate(sendData,false); | ||
135 | }else{ | ||
136 | mui.alert(medName+"不能移动到货位:"+locationName+"下,请重新扫描货位码!",'提示','确定',function (e) {},'div') | ||
137 | } | ||
138 | }else{ | ||
139 | mui.alert(data.msg,'提示','确定',function (e) {},'div') | ||
140 | } | ||
141 | }, | ||
142 | error: function(xhr,type,errorThrown){ | ||
143 | console.log(xhr.responseText) | ||
144 | } | ||
145 | }); | ||
146 | |||
147 | } | ||
148 | //将tpl模板添加在页面上 | ||
149 | var utils = new Utils(); | ||
150 | utils.appendModule('#move_new'); | ||
151 | //渲染模板 | ||
152 | function renderTemplate(data, insertType){ | ||
153 | |||
154 | utils.innerTplHtml('move_new_tpl', "#content", data, insertType); | ||
155 | } | ||
156 | (function($) { | ||
157 | |||
158 | $.plusReady(function(){ | ||
159 | |||
160 | var self = plus.webview.currentWebview(); | ||
161 | var params = JSON.parse(self.params);//获得参数 | ||
162 | var paramData = params.dataset; | ||
163 | var oldLocationName = paramData.locationname; | ||
164 | //绑定点击事件(移动) - 进入详情页 | ||
165 | $('#content').on('tap','.confirmMove',function(event){ | ||
166 | |||
167 | var target = event.target,locationName = target.dataset.locationname, | ||
168 | targetLocId = target.dataset.targetlocid, | ||
169 | conversionRate = target.dataset.conversionrate,checked = false; | ||
170 | checked = $('#content input[type=checkbox]')[0].checked; | ||
171 | var btnArray = ['否', '是']; | ||
172 | mui.confirm('是否确认移动?','警告',btnArray,function(e){ | ||
173 | if (e.index == 1) { | ||
174 | |||
175 | var requestUrl = "/a/pad/locAdjust/submitLocJust"; | ||
176 | var postData = { | ||
177 | locationName:locationName, | ||
178 | targetLocId:targetLocId, | ||
179 | conversionRate:conversionRate, | ||
180 | storeId:storeId, | ||
181 | locAdjustNum:paramData.usablequantity, | ||
182 | locUnitCode:paramData.unitcode | ||
183 | }; | ||
184 | if(checked){ | ||
185 | postData.isEditLoc = 1; | ||
186 | } | ||
187 | mui.ajaxRequest(requestUrl,{ | ||
188 | type: 'POST', | ||
189 | data: postData, | ||
190 | success: function(data){ | ||
191 | |||
192 | if(data.code == 200){ | ||
193 | mui.toast('提交成功'); | ||
194 | var parmasData = {}; | ||
195 | parmasData.finishUrl = '../home/index'; | ||
196 | parmasData.keepUrl = '../move/index'; | ||
197 | parmasData.resultType = 'move'; | ||
198 | parmasData.itemData = {oldLocationName:oldLocationName}; | ||
199 | common.openwin('../result/index',{ parmas: JSON.stringify(parmasData) },{ | ||
200 | titleText: '结果', | ||
201 | autoBackButton: false | ||
202 | }) | ||
203 | }else{ | ||
204 | mui.alert(data.msg,'提示','确定',function (e) {},'div') | ||
205 | } | ||
206 | }, | ||
207 | error: function(xhr,type,errorThrown){ | ||
208 | console.log(xhr.responseText) | ||
209 | } | ||
210 | }); | ||
211 | } | ||
212 | },'div'); | ||
213 | }); | ||
214 | |||
215 | //点击扫描 | ||
216 | $('.head').on('tap','#qrcode',function(event){ | ||
217 | |||
218 | var target = event.target; | ||
219 | storeId = paramData.id,medName = paramData.name; | ||
220 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫货位码' }) | ||
221 | }); | ||
222 | |||
223 | }) | ||
224 | })(mui); | ||
225 | </script> | ||
226 | </body> | ||
227 | |||
228 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/move/move_list_tpl.html
0 → 100644
1 | <!-- 扫货下列显示 --> | ||
2 | <script type="text/html" id='move_list_tpl'> | ||
3 | <div class="mui-card"> | ||
4 | <!--页眉,放置标题--> | ||
5 | <div class="mui-card-header" data-id="{{locationId}}">货位:{{locationName}}</div> | ||
6 | <!--内容区--> | ||
7 | <div class="mui-card-content"> | ||
8 | <ul class="mui-table-view" id="list_warp"> | ||
9 | {{ each detailVos.list value i}} | ||
10 | <li class="mui-table-view-cell mui-media"> | ||
11 | <div class="mui-media-body" style="padding: 3%;"> | ||
12 | <div class="mui-col-xs-12 mui-ellipsis mui-h4" style="font-weight: bold;margin-bottom: 8px;">{{value.medicinalDesc}}</div> | ||
13 | <div class="mui-row"> | ||
14 | <span class="mui-col-xs-8 mui-ellipsis">规格:{{value.ctmmSpecification}}</span> | ||
15 | <span class="mui-col-xs-2" style="position: absolute;top: 25%;right: 2%;"> | ||
16 | <button data-locationName="{{locationName}}" data-id="{{value.storeId}}" data-name="{{value.medicinalDesc}}" data-usableQuantity="{{value.usableQuantity}}" data-unitCode="{{value.unitCode}}" | ||
17 | style="height: 60px;box-shadow: 4px -4px 4px #888888;" type="button" | ||
18 | class="mui-btn mui-btn-warning moveDrugs">移动</button> | ||
19 | </span> | ||
20 | <span class="mui-col-xs-10 mui-ellipsis">厂商:{{value.ctmmManufacturerName}}</span> | ||
21 | <span class="mui-col-xs-6 mui-ellipsis">单位:{{value.unit}}</span> | ||
22 | <span class="mui-col-xs-6 mui-ellipsis">数量:{{value.usableQuantity}}</span> | ||
23 | <span class="mui-col-xs-8 mui-ellipsis">生产批号:{{value.lot}}</span> | ||
24 | <span class="mui-col-xs-6 mui-ellipsis">生产日期:{{value.productDate}}</span> | ||
25 | <span class="mui-col-xs-6 mui-ellipsis">有效期至:{{value.validEndDate}}</span> | ||
26 | </p> | ||
27 | </div> | ||
28 | </li> | ||
29 | {{/each}} | ||
30 | </ul> | ||
31 | </div> | ||
32 | </div> | ||
33 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/move/move_new_tpl.html
0 → 100644
1 | <!-- 扫货下列显示 --> | ||
2 | <script type="text/html" id='move_new_tpl'> | ||
3 | <div class="mui-card"> | ||
4 | <!--页眉,放置标题--> | ||
5 | <div class="mui-card-header">新货位:{{locationName}}</div> | ||
6 | <!--内容区--> | ||
7 | <div class="mui-card-content" style="padding: 20px 0;"> | ||
8 | <div class="mui-checkbox-content mui-checkbox"> | ||
9 | <input name="checkbox" value="item" type="checkbox"> | ||
10 | <label>以后入库的也放在这里</label> | ||
11 | </div> | ||
12 | <div style="text-align: center;"> | ||
13 | <button data-locationName="{{locationName}}" data-targetLocId="{{locationId}}" data-conversionRate="{{conversionRate}}" | ||
14 | style="height: 50px;width: 100px;box-shadow: 4px -4px 4px #888888;" type="button" | ||
15 | class="mui-btn mui-btn-warning confirmMove">确认移动</button> | ||
16 | </div> | ||
17 | </div> | ||
18 | </div> | ||
19 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/detail_tpl.html
0 → 100644
1 | <script type="text/html" id='detail_tpl'> | ||
2 | <div style="margin-top:10px;"> | ||
3 | {{ each list value i }} | ||
4 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
5 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
6 | <a class="mui-navigate-right" href="#">单据信息</a> | ||
7 | <div class="mui-collapse-content"> | ||
8 | <div class="mui-input-row"> | ||
9 | <label>拣货单号</label> | ||
10 | <p class="detailRow_content">{{ pickingOredr ? pickingOredr: ''}}</p> | ||
11 | </div> | ||
12 | <div class="mui-input-row"> | ||
13 | <label>单号</label> | ||
14 | <p class="detailRow_content">{{ applyOrder ? applyOrder: ''}}</p> | ||
15 | </div> | ||
16 | <div class="mui-input-row"> | ||
17 | <label>申领部门</label> | ||
18 | <p class="detailRow_content">{{ applyDeptName ? applyDeptName: ''}}</p> | ||
19 | </div> | ||
20 | <div class="mui-input-row"> | ||
21 | <label>状态</label> | ||
22 | <p class="detailRow_content">{{ value.status === 0 ? '待拣货': '已拣货' }}</p> | ||
23 | </div> | ||
24 | <div class="mui-input-row"> | ||
25 | <label>拣货人</label> | ||
26 | <p class="detailRow_content">{{ pickingUserName ? pickingUserName: '' }}</p> | ||
27 | </div> | ||
28 | <div class="mui-input-row"> | ||
29 | <label>拣货时间</label> | ||
30 | <p class="detailRow_content">{{ pickingTime ? pickingTime: ''}}</p> | ||
31 | </div> | ||
32 | </div> | ||
33 | </li> | ||
34 | </ul> | ||
35 | <ul class="mui-table-view" style="margin-bottom:8px;"> | ||
36 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
37 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
38 | <div class="mui-collapse-content"> | ||
39 | <div class="mui-input-row"> | ||
40 | <label>通用名</label> | ||
41 | <p class="detailRow_content">{{value.ctmmGenericName}}</p> | ||
42 | </div> | ||
43 | <div class="mui-input-row"> | ||
44 | <label>规格</label> | ||
45 | <p class="detailRow_content">{{value.ctmmSpecification}}</p> | ||
46 | </div> | ||
47 | <div class="mui-input-row"> | ||
48 | <label>生产厂家</label> | ||
49 | <p class="detailRow_content">{{value.ctmmManufacturerName}}</p> | ||
50 | </div> | ||
51 | <div class="mui-input-row"> | ||
52 | <label>生产批号</label> | ||
53 | <p class="detailRow_content">{{value.lot}}</p> | ||
54 | </div> | ||
55 | <div class="mui-input-row"> | ||
56 | <label>生产日期</label> | ||
57 | <p class="detailRow_content">{{value.productDate}}</p> | ||
58 | </div> | ||
59 | <div class="mui-input-row"> | ||
60 | <label>有效期至</label> | ||
61 | <p class="detailRow_content">{{value.validEndDate}}</p> | ||
62 | </div> | ||
63 | <div class="mui-input-row"> | ||
64 | <label>包装规格</label> | ||
65 | <p class="detailRow_content">{{value.packageSpecification}}</p> | ||
66 | </div> | ||
67 | <div class="mui-input-row"> | ||
68 | <label>单位</label> | ||
69 | <p class="detailRow_content">{{value.replanUnit}}</p> | ||
70 | </div> | ||
71 | <div class="mui-input-row"> | ||
72 | <label>指示货位</label> | ||
73 | <p class="detailRow_content">{{value.locName}}</p> | ||
74 | </div> | ||
75 | <div class="mui-input-row"> | ||
76 | <label>数量</label> | ||
77 | <p class="detailRow_content">{{value.allocationNum}}</p> | ||
78 | </div> | ||
79 | <div class="mui-input-row"> | ||
80 | {{ if hasPicked }} | ||
81 | <label class='font-warning'>实际下架数量</label> | ||
82 | <input class="mui-input editInput relNum" type="number" pattern="[0-9]*" value="{{ value.allocationNum }}" /> | ||
83 | {{ else }} | ||
84 | <label>实际下架数量</label> | ||
85 | <p class="detailRow_content">{{ value.pickingNum }}</p> | ||
86 | {{ /if }} | ||
87 | </div> | ||
88 | </div> | ||
89 | </li> | ||
90 | </ul> | ||
91 | {{ /each }} | ||
92 | </div> | ||
93 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/index.html
0 → 100644
1 | <!--拣货下架 - 列表页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
10 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
11 | <link rel="import" href="../../tpl/pickOff_card_index.html" id="card_view"/> | ||
12 | <style> | ||
13 | .am-card-body{ | ||
14 | padding: 6px 15px 6px !important; | ||
15 | } | ||
16 | .am-card{ | ||
17 | min-height: auto; | ||
18 | } | ||
19 | </style> | ||
20 | </head> | ||
21 | |||
22 | <body> | ||
23 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
24 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
25 | <label class="mui-pull-right theme_back_font">返回</label> | ||
26 | </a> | ||
27 | <h1 class="mui-title themes_title">拣货下架</h1> | ||
28 | <a href="#modal" class="mui-pull-right" style="height: 45px;padding-top: 12px;"> | ||
29 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
30 | <img src="../../assest/qrcode.png" width="24" height="24"/> | ||
31 | </div> | ||
32 | </a> | ||
33 | </header> | ||
34 | <div class="mui-content"> | ||
35 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
36 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="下架单号"> | ||
37 | </div> | ||
38 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 102px;"> | ||
39 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
40 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待拣货</a> | ||
41 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已拣货</a> | ||
42 | </div> | ||
43 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
44 | <div class="mui-slider-group"> | ||
45 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
46 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
47 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
48 | <ul class="mui-table-view special_list"> | ||
49 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
50 | </ul> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||
54 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
55 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
56 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
57 | <ul class="mui-table-view special_list"> | ||
58 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"></li> | ||
59 | </ul> | ||
60 | </div> | ||
61 | </div> | ||
62 | |||
63 | </div> | ||
64 | </div> | ||
65 | </div> | ||
66 | |||
67 | </div> | ||
68 | |||
69 | <script src="../../js/mui.js"></script> | ||
70 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
71 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
72 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
73 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
74 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
75 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
76 | |||
77 | |||
78 | <script type="text/javascript"> | ||
79 | |||
80 | var queryType = undefined,// 下架状态 5 待下架 6 已下架 | ||
81 | selectTabs = 1; | ||
82 | |||
83 | function clicked(){ | ||
84 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫码下架' }) | ||
85 | } | ||
86 | |||
87 | // //去搜索页面 | ||
88 | function toSearchPage (){ | ||
89 | document.activeElement.blur(); // 隐藏软键盘 | ||
90 | var params = {}; | ||
91 | params.route = '../pickingOff/index'; | ||
92 | params.auditStatus = queryType; | ||
93 | params.selectTabs = selectTabs; | ||
94 | params.location = 'main_list';// 主列表 | ||
95 | params.module = 'pickingOff';// 所属模块 | ||
96 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
97 | } | ||
98 | |||
99 | /*获取二维码返回值*/ | ||
100 | function scaned(t, r, f) { | ||
101 | console.log(r);//返回二维码读取的数据 | ||
102 | common.openwin('pickingOffList',{ targetId: r },{ | ||
103 | titleText: '药品信息' | ||
104 | }) | ||
105 | } | ||
106 | (function($) { | ||
107 | |||
108 | $.init({ | ||
109 | beforeback:function(){ | ||
110 | var list = plus.webview.currentWebview().opener(); | ||
111 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
112 | return true; | ||
113 | } | ||
114 | }); | ||
115 | |||
116 | var deceleration = mui.os.ios?0.003:0.0009; | ||
117 | $('.mui-scroll-wrapper').scroll({ | ||
118 | bounce: true, | ||
119 | indicators: true, //是否显示滚动条 | ||
120 | deceleration:deceleration | ||
121 | }); | ||
122 | |||
123 | var utils = new Utils(); | ||
124 | utils.appendModule('#card_view'); | ||
125 | |||
126 | var selected = undefined,hasChecked = false,page = undefined, pageSize = 15,totalPage = undefined, query = {}; | ||
127 | var checkType, type; | ||
128 | var requestUrl = '/a/common/pickingorder/list'; // 请求地址 | ||
129 | |||
130 | var pageLeft = 1, pageRight = 1, totalPageLeft, totalPageRight, isMore = true; | ||
131 | currSelected(); | ||
132 | var searchPlaceholder = undefined; | ||
133 | var search_clear = undefined; | ||
134 | function template(selected, data, insertType){ | ||
135 | utils.innerTplHtml('pick_list', selected, data, insertType); | ||
136 | } | ||
137 | |||
138 | function currSelected(){ | ||
139 | var item1mobile = document.querySelector('#item1mobile'); | ||
140 | var item2mobile = document.querySelector('#item2mobile'); | ||
141 | if(item1mobile.className.indexOf('mui-active')>0){ | ||
142 | selected = '.mui-tab1'; | ||
143 | hasChecked = false; | ||
144 | selectTabs = 1; | ||
145 | }else{ | ||
146 | selected = '.mui-tab2'; | ||
147 | hasChecked = true; | ||
148 | selectTabs = 2; | ||
149 | } | ||
150 | } | ||
151 | /* | ||
152 | 下拉刷新 | ||
153 | * */ | ||
154 | function pulldownRefresh(){ | ||
155 | if(selectTabs === 1){ | ||
156 | pageLeft = 1 | ||
157 | }else{ | ||
158 | pageRight = 1; | ||
159 | } | ||
160 | queryType = selectTabs === 1 ? '5': '6'; | ||
161 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
162 | var self = this; | ||
163 | var postData = { | ||
164 | queryType: queryType, | ||
165 | pageNo: page, | ||
166 | pageSize: pageSize, | ||
167 | } | ||
168 | if(query.applyOrderNo){ | ||
169 | postData.applyOrderNo = query.applyOrderNo; | ||
170 | } | ||
171 | query = {}; | ||
172 | mui.ajaxRequest(requestUrl,{ | ||
173 | type: 'POST', | ||
174 | data: postData, | ||
175 | success: function(data){ | ||
176 | var resData = data.data; | ||
177 | var total = resData.totalPage; | ||
178 | if(selectTabs === 1){ | ||
179 | totalPageLeft = total; | ||
180 | }else{ | ||
181 | totalPageRight = total; | ||
182 | } | ||
183 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
184 | var i = selectTabs === 1 ? 0 : 1; | ||
185 | isMore = false; | ||
186 | self.endPullDownToRefresh(true); | ||
187 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
188 | }else{ | ||
189 | isMore = true; | ||
190 | self.endPullDownToRefresh(false); | ||
191 | self.refresh(true); | ||
192 | } | ||
193 | return template(selected,resData,false) | ||
194 | |||
195 | }, | ||
196 | error: function(xhr,type,errorThrown){ | ||
197 | console.log(xhr.responseText) | ||
198 | } | ||
199 | }); | ||
200 | } | ||
201 | /* | ||
202 | |||
203 | * 上拉加载更多 | ||
204 | * */ | ||
205 | function pullupRefresh(){ | ||
206 | var self = this; | ||
207 | if(isMore){ | ||
208 | if(selectTabs === 1){ | ||
209 | pageLeft ++ | ||
210 | }else{ | ||
211 | pageRight ++; | ||
212 | } | ||
213 | page = selectTabs === 1 ? pageLeft: pageRight; | ||
214 | totalPage = selectTabs === 1 ? totalPageLeft: totalPageRight; | ||
215 | queryType = selectTabs === 1 ? '5': '6'; | ||
216 | |||
217 | if(page <= totalPage){ | ||
218 | mui.ajaxRequest(requestUrl,{ | ||
219 | type: 'POST', | ||
220 | data: { | ||
221 | queryType: queryType, | ||
222 | pageNo: page, | ||
223 | pageSize: pageSize, | ||
224 | }, | ||
225 | contentType: "application/json", | ||
226 | success: function(data){ | ||
227 | var resData = data.data; | ||
228 | if(resData.pageNo === resData.totalPage){ | ||
229 | isMore = false; | ||
230 | self.endPullUpToRefresh(true); | ||
231 | }else{ | ||
232 | isMore = true; | ||
233 | self.endPullUpToRefresh(false); | ||
234 | self.refresh(true); | ||
235 | } | ||
236 | return template(selected,resData,true); | ||
237 | }, | ||
238 | error: function(xhr,type,errorThrown){ | ||
239 | console.log(xhr.responseText) | ||
240 | } | ||
241 | }); | ||
242 | } | ||
243 | }else{ | ||
244 | var i = selectTabs === 1 ? 0 : 1; | ||
245 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
246 | self.endPullUpToRefresh(true); | ||
247 | } | ||
248 | } | ||
249 | |||
250 | $.plusReady(function(){ | ||
251 | |||
252 | |||
253 | searchPlaceholder = document.querySelector('.mui-placeholder'); | ||
254 | search_clear = document.querySelector('.mui-input-clear'); | ||
255 | console.log(searchPlaceholder) | ||
256 | // 触发刷新 搜索页面搜的值 | ||
257 | window.addEventListener('search',function(event){ | ||
258 | console.log(event.detail) | ||
259 | query.applyOrderNo = JSON.parse(event.detail.searchParams).pickingOrderNo; | ||
260 | query.queryType = JSON.parse(event.detail.searchParams).auditStatus; | ||
261 | search_clear.placeholder = ''; | ||
262 | searchPlaceholder.style.display = 'none'; | ||
263 | search_clear.value = query.applyOrderNo; | ||
264 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
265 | }) | ||
266 | |||
267 | // 页面刷新 | ||
268 | window.addEventListener('pagefresh',function(){ | ||
269 | // mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
270 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
271 | }) | ||
272 | |||
273 | //循环初始化所有下拉刷新,上拉加载。 | ||
274 | $.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) { | ||
275 | |||
276 | $(pullRefreshEl).pullToRefresh({ | ||
277 | down: { | ||
278 | style:'circle', | ||
279 | contentdown : "下拉可以刷新", | ||
280 | contentover : "释放立即刷新", | ||
281 | contentrefresh : "正在刷新...", | ||
282 | callback: pulldownRefresh | ||
283 | }, | ||
284 | up: { | ||
285 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
286 | contentnomore:'没有更多数据了', | ||
287 | callback: pullupRefresh | ||
288 | } | ||
289 | }); | ||
290 | }); | ||
291 | // 第一个tab 默认加载一次数据 | ||
292 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
293 | |||
294 | var item2 = document.querySelector('#item2mobile'); | ||
295 | var item1 = document.querySelector('#item1mobile'); | ||
296 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
297 | let index = e.detail.slideNumber; | ||
298 | if (index === 1) { | ||
299 | queryType = '6'; | ||
300 | selected = '.mui-tab2'; | ||
301 | hasChecked = false; | ||
302 | selectTabs = 2; | ||
303 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
304 | if (!item2.querySelector('.am-card')) { | ||
305 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
306 | } | ||
307 | } | ||
308 | if(index === 0){ | ||
309 | queryType = '5'; | ||
310 | selected = '.mui-tab1'; | ||
311 | hasChecked = true; | ||
312 | selectTabs = 1; | ||
313 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
314 | if (!item1.querySelector('.am-card')) { | ||
315 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
316 | } | ||
317 | } | ||
318 | }); | ||
319 | |||
320 | //绑定点击事件 - 进入详情页 | ||
321 | |||
322 | $('#slider').on('tap','.am-card',function(){ | ||
323 | let itemData = this.dataset; | ||
324 | itemData.currentSelected = selectTabs === 1 ? 'left': 'right'; | ||
325 | console.log(JSON.stringify(itemData)) | ||
326 | document.activeElement.blur(); | ||
327 | if(itemData.currentSelected ==='right'){//right 已拣货 | ||
328 | common.openwin('pickingOffListUn',{ params: JSON.stringify(itemData) },false) | ||
329 | }else{ | ||
330 | common.openwin('pickingOffList',{ params: JSON.stringify(itemData) },false) | ||
331 | } | ||
332 | }) | ||
333 | |||
334 | }) | ||
335 | |||
336 | })(mui); | ||
337 | </script> | ||
338 | </body> | ||
339 | |||
340 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='picking_tpl'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-id="{{ value.id }}" | ||
6 | data-applyOrderNo="{{ applyOrderNo }}" | ||
7 | data-allocationNum="{{ value.allocationNum }}" | ||
8 | data-drugCode="{{ value.drugCode }}" | ||
9 | data-pickingNum="{{ value.pickingNum }}" | ||
10 | > | ||
11 | <div class="am-card-header"> | ||
12 | <div class="am-card-header-content"> | ||
13 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
14 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
15 | </div> | ||
16 | <div class="am-card-header-extra"> | ||
17 | <span>{{ value.type }}</span> | ||
18 | </div> | ||
19 | </div> | ||
20 | <div class="am-card-body"> | ||
21 | <div class="am-flexbox am-flexbox-align-center"> | ||
22 | <div class="am-flexbox-item"> | ||
23 | 单位:<span>{{ value.replanUnit }}</span> | ||
24 | </div> | ||
25 | {{ if hasPicked }} | ||
26 | <div class="am-flexbox-item"> | ||
27 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
28 | <div class="am-list-line"> | ||
29 | <div class="am-input-label am-input-label-4 font-warning">实到数量:</div> | ||
30 | <div class="am-input-control"> | ||
31 | <input pattern="[0-9]*" type="number" data-index="{{ i }}" value="{{ value.allocationNum?value.allocationNum: '' }}" placeholder="请输入" class="allocationNum flex-item-input" /> | ||
32 | </div> | ||
33 | </div> | ||
34 | </div> | ||
35 | </div> | ||
36 | {{ else }} | ||
37 | <div class="am-flexbox-item"> | ||
38 | 数量:<span>{{ value.pickingNum }}</span> | ||
39 | </div> | ||
40 | {{ /if }} | ||
41 | <div class="am-flexbox-item"> | ||
42 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
43 | </div> | ||
44 | </div> | ||
45 | <div class="am-flexbox am-flexbox-align-center"> | ||
46 | <div class="am-flexbox-item"> | ||
47 | 货位:<span>{{ value.locName }}</span> | ||
48 | </div> | ||
49 | <div class="am-flexbox-item"> | ||
50 | 生产批号:<span>{{ value.lot }}</span> | ||
51 | </div> | ||
52 | <div class="am-flexbox-item"> | ||
53 | 生产日期:<span>{{ value.productDate }}</span> | ||
54 | </div> | ||
55 | </div> | ||
56 | <div class="am-flexbox am-flexbox-align-center"> | ||
57 | <div class="am-flexbox-item"> | ||
58 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> | ||
62 | <div class="am-card-footer"> | ||
63 | <div class="am-card-footer-extra"> | ||
64 | <button type="button" class="mui-btn mui-btn-blue mui-btn-outlined toPage" style="margin: 0 5px;" data-index="{{ i }}" data-id="{{ value.id }}">更多详情</button> | ||
65 | {{ if hasPicked }} | ||
66 | <button type="button" class="mui-btn mui-btn-blue mui-btn-danger submitButton" data-index="{{ i }}">确认拣货</button> | ||
67 | {{ /if }} | ||
68 | </div> | ||
69 | </div> | ||
70 | </div> | ||
71 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
72 | </div> | ||
73 | {{/each}} | ||
74 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/pick_list_tpl.html
0 → 100644
1 | |||
2 | <script type="text/html" id='picking_tpl'> | ||
3 | {{ each list value i}} | ||
4 | <div class="batch-wrapper"> | ||
5 | <div class="checkoneParent"> | ||
6 | <div class="mui-checkbox mui-left" style="width: 48px;height:48px;padding:50px 0 ;display: block;"> | ||
7 | <input name="selected" class="checkone" type="checkbox" data-index="{{ (page-1)*pageSize + i }}" style="top: 35px;left: 10px;"> | ||
8 | </div> | ||
9 | </div> | ||
10 | <div class="am-card scrollList-item am-card-full" style="width: 90%;border: none;" | ||
11 | data-id="{{ value.id }}" | ||
12 | data-drugCode="{{ value.drugCode }}" | ||
13 | data-allocationNum="{{value.allocationNum}}" | ||
14 | > | ||
15 | <div class="am-card-header"> | ||
16 | <div class="am-card-header-content"> | ||
17 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
18 | {{ value.ctmmGenericName ? value.ctmmGenericName:value.ctmmTradeName ? value.ctmmTradeName: '' }}</span> | ||
19 | </div> | ||
20 | <div class="am-card-header-extra"> | ||
21 | <span>{{ value.type }}</span> | ||
22 | </div> | ||
23 | </div> | ||
24 | <div class="am-card-body"> | ||
25 | <div class="am-flexbox am-flexbox-align-center"> | ||
26 | <div class="am-flexbox-item"> | ||
27 | 单位:<span>{{ value.replanUnit }}</span> | ||
28 | </div> | ||
29 | {{ if hasPicked }} | ||
30 | <div class="am-flexbox-item"> | ||
31 | <div class="am-list-item am-input-item am-list-item-middle"> | ||
32 | <div class="am-list-line"> | ||
33 | <div class="am-input-label am-input-label-4 font-warning">实到数量:</div> | ||
34 | <div class="am-input-control"> | ||
35 | <input pattern="[0-9]*" type="number" data-index="{{ i }}" value="{{ value.allocationNum?value.allocationNum: '' }}" placeholder="请输入" class="allocationNum flex-item-input" /> | ||
36 | </div> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | {{ else }} | ||
41 | <div class="am-flexbox-item"> | ||
42 | 数量:<span>{{ value.allocationNum }}</span> | ||
43 | </div> | ||
44 | {{ /if }} | ||
45 | <div class="am-flexbox-item"> | ||
46 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
47 | </div> | ||
48 | </div> | ||
49 | <div class="am-flexbox am-flexbox-align-center"> | ||
50 | <div class="am-flexbox-item"> | ||
51 | 货位:<span>{{ value.locName }}</span> | ||
52 | </div> | ||
53 | <div class="am-flexbox-item"> | ||
54 | 生产批号:<span>{{ value.lot }}</span> | ||
55 | </div> | ||
56 | <div class="am-flexbox-item"> | ||
57 | 生产日期:<span>{{ value.productDate }}</span> | ||
58 | </div> | ||
59 | </div> | ||
60 | <div class="am-flexbox am-flexbox-align-center"> | ||
61 | <div class="am-flexbox-item"> | ||
62 | 生产厂家:<span>{{ value.ctmmManufacturerName }}</span> | ||
63 | </div> | ||
64 | </div> | ||
65 | </div> | ||
66 | </div> | ||
67 | </div> | ||
68 | {{/each}} | ||
69 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/pickingOffDetails.html
0 → 100644
1 | <!-- 拣货下架- 详情页 - yuwei--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./detail_tpl.html" id="acc_detail_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link rel="stylesheet" href="../../css/check.css" /> | ||
13 | |||
14 | </head> | ||
15 | |||
16 | <body> | ||
17 | <div class="mui-content detailRow"> | ||
18 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
19 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
20 | <li class="mui-table-view-cell mui-collapse"> | ||
21 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
22 | <div class="mui-collapse-content"> | ||
23 | <div class="mui-input-row"> | ||
24 | |||
25 | </div> | ||
26 | </div> | ||
27 | </li> | ||
28 | </ul> | ||
29 | </form> | ||
30 | </div> | ||
31 | <script src="../../js/mui.min.js"></script> | ||
32 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
33 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
34 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
35 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
36 | <script type="text/javascript"> | ||
37 | |||
38 | |||
39 | (function($) { | ||
40 | var utils = new Utils(); | ||
41 | utils.appendModule('#acc_detail_tpl'); | ||
42 | |||
43 | function showData(data){ | ||
44 | var html = template('detail_tpl', data); | ||
45 | document.getElementById('detailContent').innerHTML = html; | ||
46 | } | ||
47 | |||
48 | // 模板加载 | ||
49 | $.plusReady(function(){ | ||
50 | var self = plus.webview.currentWebview(); | ||
51 | var details = JSON.parse(self.details);//获得参数 | ||
52 | var detailData = {}; | ||
53 | |||
54 | $.init({ | ||
55 | beforeback: function() { | ||
56 | var list = plus.webview.currentWebview().opener(); | ||
57 | mui.fire(list, 'pagefresh',{ selectTab: details.selected , hasPicked: true , query : details.query }); | ||
58 | return true; | ||
59 | } | ||
60 | }) | ||
61 | console.log('details*******************') | ||
62 | console.log(JSON.stringify(details)) | ||
63 | var titleUrl = '/a/common/pickingorderdetail/getPickingDetailPad?pickingOrderNo=' + details.pickingOrderNo, | ||
64 | url = '/a/common/pickingorderdetail/detailList', | ||
65 | pickUrl = '/a/common/pickingorder/finishPicking'; | ||
66 | if(details.hasPicked){ | ||
67 | var groundBtn = '<button type="button" id="picking" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认拣货</button>' | ||
68 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",groundBtn); | ||
69 | } | ||
70 | var postData = { | ||
71 | pickingOrderNo: details.pickingOrderNo, | ||
72 | id: details.id, | ||
73 | pickingStatus: details.pickingStatus | ||
74 | }; | ||
75 | plus.nativeUI.showWaiting('加载中...'); | ||
76 | mui.ajaxRequest(titleUrl,{ | ||
77 | type: 'GET', | ||
78 | success: function(data){ | ||
79 | if(data.code === 200){ | ||
80 | for(var key in data.data){ | ||
81 | detailData[key] = data.data[key]; | ||
82 | detailData.hasPicked = details.hasPicked; | ||
83 | } | ||
84 | mui.ajaxRequest(url,{ | ||
85 | type: 'POST', | ||
86 | data: postData, | ||
87 | success: function(data){ | ||
88 | plus.nativeUI.closeWaiting(); | ||
89 | if(data.code === 200){ | ||
90 | detailData.list = data.data.list; | ||
91 | console.log(detailData) | ||
92 | showData(detailData); | ||
93 | if(details.hasAcceptance){ | ||
94 | setTimeout(function(){ | ||
95 | showOrHideBtn() | ||
96 | var acceptanceBtn = '<button type="button" id="acceptance" class="mui-btn mui-btn-warning mui-btn-block" style="margin-bottom: 20px;" data-loading-text = "提交中" data-loading-icon-position="right">确认拣货</button>' | ||
97 | document.querySelector('.detailRow').insertAdjacentHTML("beforeEnd",acceptanceBtn); | ||
98 | },100) | ||
99 | } | ||
100 | |||
101 | }else{ | ||
102 | mui.toast(data.msg,{ type: 'div' }); | ||
103 | } | ||
104 | }, | ||
105 | error: function(xhr,type,errorThrown){ | ||
106 | console.log(xhr.responseText) | ||
107 | } | ||
108 | }); | ||
109 | }else{ | ||
110 | mui.toast(data.msg,{ type: 'div' }); | ||
111 | } | ||
112 | |||
113 | }, | ||
114 | error: function(xhr,type,errorThrown){ | ||
115 | console.log(xhr.responseText) | ||
116 | } | ||
117 | }); | ||
118 | |||
119 | |||
120 | if(details.hasPicked){ | ||
121 | var picking = document.querySelector('#picking'); | ||
122 | picking.addEventListener('tap',function(e){ | ||
123 | var num = detailData.list[0].allocationNum; | ||
124 | var realInputNum = document.querySelector('.relNum').value; | ||
125 | if(realInputNum > num){ | ||
126 | return mui.toast('实际上架数量不得大于指示数量',{ type: 'div' }); | ||
127 | } | ||
128 | if(realInputNum <=0){ | ||
129 | return mui.toast('实际上架数量不得小于或等于0',{ type: 'div' }); | ||
130 | } | ||
131 | var btnArray = ['否', '是']; | ||
132 | mui.confirm('是否确认拣货?', '操作提示', btnArray, function(e) { | ||
133 | if (e.index == 1) { | ||
134 | console.log(detailData) | ||
135 | var pickingDetail = [],postData = {},submitData = {}; | ||
136 | postData.drugCode = detailData.list[0].drugCode; | ||
137 | postData.id = detailData.list[0].id; | ||
138 | postData.pickingNum = realInputNum | ||
139 | pickingDetail.push(postData); | ||
140 | submitData.applyNo = detailData.applyOrder; | ||
141 | submitData.pickingOrderNo = detailData.pickingOredr; | ||
142 | submitData.pickingDetail = pickingDetail; | ||
143 | console.log(JSON.stringify(submitData)); | ||
144 | mui.ajaxRequest(pickUrl,{ | ||
145 | type: 'POST', | ||
146 | data: submitData, | ||
147 | contentType: "application/json", | ||
148 | showWaiting: true, | ||
149 | success: function(data){ | ||
150 | if(data.code === 200){ | ||
151 | // mui.toast('下架成功',{ type: 'div' }); | ||
152 | mui.toast('拣货成功',{ type: 'div' }); | ||
153 | setTimeout(function(){ | ||
154 | var page = plus.webview.getWebviewById('pickingOffList'); | ||
155 | mui.fire(page,'pagefresh',{ selectTab: '1' ,query:{ selected:"left" } }); | ||
156 | common.gotowin('pickingOffList',{ }); | ||
157 | plus.webview.currentWebview().close(); | ||
158 | },300) | ||
159 | |||
160 | // var parmasData = {}; | ||
161 | // parmasData.finishUrl = '../pickingOff/index'; | ||
162 | // parmasData.keepUrl = 'pickingOffList'; | ||
163 | // parmasData.resultType = 'picking'; | ||
164 | // parmasData.itemData = details.orderInfo; | ||
165 | // common.openwin('../result/index',{ parmas: JSON.stringify(parmasData) },{ | ||
166 | // titleText: '结果', | ||
167 | // autoBackButton: false | ||
168 | // }) | ||
169 | }else{ | ||
170 | mui.alert(data.msg) | ||
171 | } | ||
172 | }, | ||
173 | error: function(xhr,type,errorThrown){ | ||
174 | console.log(xhr.responseText) | ||
175 | } | ||
176 | }); | ||
177 | } | ||
178 | },'div') | ||
179 | }) | ||
180 | } | ||
181 | |||
182 | }); | ||
183 | })(mui); | ||
184 | |||
185 | </script> | ||
186 | </body> | ||
187 | |||
188 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/pickingOffList.html
0 → 100644
1 | <!-- 拣货下架- 列表页 - yuwei--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./list_tpl.html" id="list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | </head> | ||
13 | |||
14 | <body> | ||
15 | |||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | <a href="#" class="mui-pull-right batchAccetpance" style="height: 45px;padding-top: 12px;"> | ||
22 | 批量拣货 | ||
23 | </a> | ||
24 | </header> | ||
25 | <div class="mui-content"> | ||
26 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
27 | <input type="search" class="mui-input-clear" readonly="readonly" placeholder="通用名/商品名/生产厂家" > | ||
28 | </div> | ||
29 | <div id="slider" class="mui-slider themes_tab mui-fullscreen"> | ||
30 | <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
31 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">待拣货</a> | ||
32 | <a class="mui-control-item themes_font_color_tab" href="#item2mobile">已拣货</a> | ||
33 | </div> | ||
34 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
35 | <div class="mui-slider-group"> | ||
36 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
37 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
38 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
39 | <ul class="mui-table-view"> | ||
40 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
41 | |||
42 | </li> | ||
43 | </ul> | ||
44 | </div> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div id="item2mobile" class="mui-slider-item mui-control-content"> | ||
48 | <div id="scroll2" class="mui-scroll-wrapper"> | ||
49 | <div class="mui-scroll" id='mui-table-view-tab2'> | ||
50 | <ul class="mui-table-view"> | ||
51 | <li class="mui-table-view-cell mui-tab2" style="padding: 0;"> | ||
52 | |||
53 | </li> | ||
54 | </ul> | ||
55 | </div> | ||
56 | </div> | ||
57 | |||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | |||
62 | </div> | ||
63 | |||
64 | <script src="../../js/mui.min.js"></script> | ||
65 | <script src="../../js/jquery.min.js" ></script> | ||
66 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
67 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
68 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
69 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
70 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
71 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
72 | |||
73 | <script type="text/javascript"> | ||
74 | var pickingStatus = undefined, | ||
75 | selectTabs = 1;// 拣货状态 0 待拣货 1 已拣货 | ||
76 | if(window.plus) { | ||
77 | plusready(); | ||
78 | } else { | ||
79 | document.addEventListener('plusready', plusready, false); | ||
80 | } | ||
81 | function plusready() { | ||
82 | plus.key.addEventListener('backbutton',function(){ | ||
83 | plus.webview.currentWebview().close(); | ||
84 | }) | ||
85 | } | ||
86 | |||
87 | //去搜索页面 | ||
88 | function toSearchPage (){ | ||
89 | document.activeElement.blur(); // 隐藏软键盘 | ||
90 | var params = {}; | ||
91 | params.route = '../pickingOff/pickingOffList'; | ||
92 | params.id = 'pickingOffList'; | ||
93 | params.auditStatus = pickingStatus; | ||
94 | params.selectTabs = pickingStatus === '0' ? 1 : 2; | ||
95 | params.selected = pickingStatus === '0' ? 'left': 'right'; | ||
96 | params.module = 'pickingOff'; | ||
97 | params.location = 'sub_list'; | ||
98 | console.log(params,'params') | ||
99 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
100 | } | ||
101 | |||
102 | (function($,$$) { | ||
103 | |||
104 | var deceleration = mui.os.ios?0.003:0.0009; | ||
105 | $.init({ | ||
106 | beforeback:function(){ | ||
107 | var list = plus.webview.currentWebview().opener(); | ||
108 | mui.fire(list, 'pagefresh', {}); | ||
109 | return true; | ||
110 | } | ||
111 | }); | ||
112 | $('.mui-scroll-wrapper').scroll({ | ||
113 | bounce: true, | ||
114 | indicators: true, //是否显示滚动条 | ||
115 | deceleration:deceleration | ||
116 | }); | ||
117 | |||
118 | |||
119 | var page = 1, | ||
120 | totalPage = undefined, | ||
121 | pageSize = 15, | ||
122 | isMore = true, | ||
123 | query = {}, | ||
124 | selectTabs = 1, | ||
125 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
126 | pickingOrderNo = undefined, | ||
127 | pickingStatus = undefined, | ||
128 | applyOrderNo = undefined; | ||
129 | |||
130 | var _url = '/a/common/pickingorderdetail/detailList', | ||
131 | pickUrl = '/a/common/pickingorder/finishPicking', | ||
132 | pageLeft = 1, | ||
133 | pageRight = 1, | ||
134 | totalPageLeft = undefined, | ||
135 | totalPageRight = undefined; | ||
136 | |||
137 | /* 渲染模板 */ | ||
138 | var utils = new Utils(); | ||
139 | utils.appendModule('#list_tpl'); | ||
140 | |||
141 | function template(selected, data, insertType){ | ||
142 | utils.innerTplHtml('picking_tpl',selected, data, insertType); | ||
143 | } | ||
144 | /* | ||
145 | 下拉刷新 | ||
146 | * */ | ||
147 | function pulldownRefresh(){ | ||
148 | var self = this; | ||
149 | if(selectTabs === 1){ | ||
150 | pageLeft = 1 | ||
151 | }else{ | ||
152 | pageRight = 1; | ||
153 | } | ||
154 | pickingStatus = selectTabs === 1 ? '0': '1'; | ||
155 | page = 1; | ||
156 | var postData = { | ||
157 | pickingOrderNo: pickingOrderNo, | ||
158 | pickingStatus:pickingStatus, | ||
159 | pageNo: 1, | ||
160 | pageSize: pageSize | ||
161 | }; | ||
162 | if(query.hisDrugCode){ | ||
163 | postData.hisDrugCode = query.hisDrugCode | ||
164 | $$('.mui-placeholder').hide(); | ||
165 | $$('.mui-input-clear').val(query.hisDrugName); | ||
166 | }else{ | ||
167 | globalQuery={} | ||
168 | $$('.mui-input-clear').val(''); | ||
169 | $$('.mui-placeholder').show(); | ||
170 | } | ||
171 | query = {}; | ||
172 | mui.ajaxRequest(_url,{ | ||
173 | type: 'POST', | ||
174 | data: postData, | ||
175 | success: function(data){ | ||
176 | var resData = data.data; | ||
177 | resData.hasPicked = pickingStatus === '0'? true: false; | ||
178 | resData.applyOrderNo = applyOrderNo; | ||
179 | totalPage = data.totalPage; | ||
180 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
181 | var i = selectTabs === 1 ? 0 : 1; | ||
182 | isMore = false; | ||
183 | self.endPullDownToRefresh(true); | ||
184 | document.querySelectorAll('.mui-pull-loading')[i].innerHTML = '没有更多数据'; | ||
185 | |||
186 | }else{ | ||
187 | isMore = true; | ||
188 | self.endPullDownToRefresh(false); | ||
189 | self.refresh(true); | ||
190 | } | ||
191 | return template(selected,resData, false) | ||
192 | }, | ||
193 | error: function(xhr,type,errorThrown){ | ||
194 | console.log(xhr.responseText) | ||
195 | } | ||
196 | }); | ||
197 | } | ||
198 | |||
199 | /* | ||
200 | |||
201 | * 上拉加载更多 | ||
202 | * */ | ||
203 | function pullupRefresh(){ | ||
204 | var self = this; | ||
205 | console.log(isMore,'isMore') | ||
206 | if(isMore){ | ||
207 | page++; | ||
208 | mui.ajaxRequest(_url,{ | ||
209 | type: 'POST', | ||
210 | data:{ | ||
211 | pickingOrderNo: pickingOrderNo, | ||
212 | pickingStatus,pickingStatus, | ||
213 | pageNo: page, | ||
214 | pageSize: pageSize | ||
215 | }, | ||
216 | success: function(data){ | ||
217 | var resData = data.data; | ||
218 | resData.hasPicked = pickingStatus === '0'? true: false; | ||
219 | resData.applyOrderNo = applyOrderNo; | ||
220 | if(resData.pageNo === resData.totalPage){ | ||
221 | isMore = false; | ||
222 | self.endPullUpToRefresh(true); | ||
223 | }else{ | ||
224 | isMore = true; | ||
225 | self.endPullUpToRefresh(false); | ||
226 | self.refresh(true); | ||
227 | } | ||
228 | return template(selected,resData, true) | ||
229 | |||
230 | }, | ||
231 | error: function(xhr,type,errorThrown){ | ||
232 | console.log(xhr.responseText) | ||
233 | } | ||
234 | }); | ||
235 | }else{ | ||
236 | var i = selectTabs === 1 ? 0 : 1; | ||
237 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
238 | self.endPullUpToRefresh(true); | ||
239 | } | ||
240 | |||
241 | } | ||
242 | |||
243 | $.plusReady(function(){ | ||
244 | |||
245 | let globalQuery = { selected : selectTabs === 1?'left':'right' }; | ||
246 | window.addEventListener('pagefresh',function(event){ | ||
247 | let index = event.detail.query.selected === 'left' ? 0 : 1; | ||
248 | query = event.detail.query; | ||
249 | console.log(JSON.stringify(event.detail)) | ||
250 | $$('.mui-input-clear').val(''); | ||
251 | $$('.mui-placeholder').hide(); | ||
252 | mui('#slider').slider().gotoItem(index); | ||
253 | setTimeout(function(){ | ||
254 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
255 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
256 | },300) | ||
257 | |||
258 | }); | ||
259 | |||
260 | |||
261 | // 触发刷新 搜索页面搜的值 | ||
262 | window.addEventListener('sub_search',function(event){ | ||
263 | console.log(JSON.stringify(event.detail)) | ||
264 | let index = event.detail.searchParams.selected === 'left' ? 0 : 1; | ||
265 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
266 | console.log(query) | ||
267 | $$('.mui-placeholder').hide(); | ||
268 | $$('.mui-input-clear').val(query.hisDrugName); | ||
269 | mui('.mui-scroll-wrapper').scroll()[index].scrollTo(0,0,100); | ||
270 | mui(".mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
271 | }) | ||
272 | |||
273 | // | ||
274 | // // 触发刷新 搜索页面搜的值 | ||
275 | // window.addEventListener('sub_search',function(event){ | ||
276 | // console.log(event.detail); | ||
277 | // let searchParams = JSON.parse(event.detail.searchParams); | ||
278 | // document.querySelector('.mui-input-clear').placeholder = ''; | ||
279 | // document.querySelector('.mui-placeholder').style.display = 'none'; | ||
280 | // document.querySelector('.mui-input-clear').value = searchParams.hisDrugName; | ||
281 | // var newUrl = url + '&hisDrugCode='+ searchParams.hisDrugCode +'&type='+ searchParams.type; | ||
282 | // genData(newUrl,searchParams.selected); | ||
283 | // // 模拟点击Tabs | ||
284 | // if(searchParams.selected === 'right'){ | ||
285 | // mui('#slider').slider().gotoItem(1); | ||
286 | // } | ||
287 | // }) | ||
288 | var params, currentSelected = undefined; | ||
289 | var self = plus.webview.currentWebview(); | ||
290 | params = JSON.parse(self.params);//获得参数 | ||
291 | console.log(params,'params') | ||
292 | pickingOrderNo = params.pickingorderno; | ||
293 | currentSelected = params.currentSelected; // 当前选中tabs | ||
294 | applyOrderNo = params.applyorderno; | ||
295 | |||
296 | //循环初始化所有下拉刷新,上拉加载。 | ||
297 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
298 | |||
299 | $(pullRefreshEl).pullToRefresh({ | ||
300 | down: { | ||
301 | style:'circle', | ||
302 | contentdown : "下拉可以刷新", | ||
303 | contentover : "释放立即刷新", | ||
304 | contentrefresh : "正在刷新...", | ||
305 | callback: pulldownRefresh | ||
306 | }, | ||
307 | up: { | ||
308 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
309 | contentnomore:'没有更多数据', | ||
310 | callback: pullupRefresh | ||
311 | } | ||
312 | }); | ||
313 | }); | ||
314 | // 第一个tab 默认加载一次数据 | ||
315 | mui(".mui-scroll").pullToRefresh()[0].pullDownLoading(); | ||
316 | |||
317 | |||
318 | var item2 = document.querySelector('#item2mobile'); | ||
319 | var item1 = document.querySelector('#item1mobile'); | ||
320 | document.getElementById('slider').addEventListener('slide', function(e) { | ||
321 | $$('.mui-input-clear').val(''); | ||
322 | let index = e.detail.slideNumber; | ||
323 | if (index === 1) { | ||
324 | pickingStatus = '1'; | ||
325 | selected = '.mui-tab2'; | ||
326 | selectTabs = 2; | ||
327 | globalQuery.selected='right' | ||
328 | mui('#slider').slider().gotoItem(1); | ||
329 | $$('.batchAccetpance').hide(); | ||
330 | $('.mui-slider-group .mui-scroll .mui-tab2')[0].innerHTML = ''; | ||
331 | if (!item2.querySelector('.am-card')) { | ||
332 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
333 | } | ||
334 | } | ||
335 | if(index === 0){ | ||
336 | pickingStatus = '0'; | ||
337 | selected = '.mui-tab1'; | ||
338 | selectTabs = 1; | ||
339 | globalQuery.selected='left' | ||
340 | $$('.batchAccetpance').show(); | ||
341 | mui('#slider').slider().gotoItem(0); | ||
342 | $('.mui-slider-group .mui-scroll .mui-tab1')[0].innerHTML = ''; | ||
343 | if (!item1.querySelector('.am-card')) { | ||
344 | mui(".mui-slider-group .mui-scroll").pullToRefresh()[index].pullDownLoading(); | ||
345 | } | ||
346 | } | ||
347 | }); | ||
348 | |||
349 | //绑定点击事件 - 进入详情页 | ||
350 | $('#slider').on('tap','.toPage',function(){ | ||
351 | let id = this.dataset.id; | ||
352 | let newData = {}; | ||
353 | newData.pickingOrderNo = pickingOrderNo; | ||
354 | newData.pickingStatus = pickingStatus; | ||
355 | newData.hasPicked = pickingStatus === '0'? true: false; | ||
356 | newData.id = id; | ||
357 | params.selected = selected; | ||
358 | newData.query = globalQuery; | ||
359 | console.log(newData) | ||
360 | document.activeElement.blur(); | ||
361 | common.openwin('pickingOffDetails',{ details: JSON.stringify(newData) },{ | ||
362 | titleText: '详情' | ||
363 | }) | ||
364 | }) | ||
365 | /* 批量下架 */ | ||
366 | $('.mui-bar').on('tap','.batchAccetpance',function(){ | ||
367 | var paramsData = {}; | ||
368 | paramsData.pickingOrderNo = pickingOrderNo; | ||
369 | paramsData.applyNo = applyOrderNo; | ||
370 | console.log(paramsData) | ||
371 | common.openwin('picking_batch',{ params: JSON.stringify(paramsData) },false) | ||
372 | }) | ||
373 | |||
374 | |||
375 | // 绑定事件 --确认拣货 | ||
376 | $('#slider').on('tap','.submitButton',function(){ | ||
377 | var index = this.dataset.index; | ||
378 | var _this_card = document.querySelectorAll('.am-card')[index]; | ||
379 | console.log(_this_card.dataset) | ||
380 | var pickingDetail = [],postData = {},submitData = {}; | ||
381 | postData.drugCode = _this_card.dataset.drugcode; | ||
382 | postData.id = _this_card.dataset.id; | ||
383 | postData.pickingNum = _this_card.querySelector('.allocationNum').value; | ||
384 | pickingDetail.push(postData); | ||
385 | submitData.pickingDetail = pickingDetail; | ||
386 | submitData.applyNo = applyOrderNo; | ||
387 | submitData.pickingOrderNo = pickingOrderNo; | ||
388 | console.log(JSON.stringify(submitData),'submitData') | ||
389 | document.activeElement.blur(); | ||
390 | var btnArray = ['否', '是']; | ||
391 | $.confirm('确定要执行此操作吗?', '确认拣货', btnArray, function(e) { | ||
392 | if (e.index == 1) { | ||
393 | mui.ajaxRequest(pickUrl,{ | ||
394 | type: 'POST', | ||
395 | data: submitData, | ||
396 | contentType: "application/json", | ||
397 | showWaiting: true, | ||
398 | success: function(data){ | ||
399 | if(data.code === 200){ | ||
400 | mui.toast('拣货成功',{ type: 'div' }); | ||
401 | mui(".mui-scroll").pullToRefresh()[selectTabs -1].pullDownLoading(); | ||
402 | }else{ | ||
403 | mui.alert(data.msg) | ||
404 | } | ||
405 | }, | ||
406 | error: function(xhr,type,errorThrown){ | ||
407 | console.log(xhr.responseText) | ||
408 | } | ||
409 | }); | ||
410 | } | ||
411 | },'div') | ||
412 | }); | ||
413 | |||
414 | var countModal = false; | ||
415 | $$('#slider').on('keyup','.allocationNum',function(){ | ||
416 | var _this = this,$this = $$(this); | ||
417 | var index = this.dataset.index; | ||
418 | var value = Number(this.value?this.value:0); | ||
419 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
420 | var allocationNum = _this_node.dataset.allocationnum?_this_node.dataset.allocationnum:0; | ||
421 | var text = "实到数量不能大于数量"+allocationNum+",且不能小于0!"; | ||
422 | if(!countModal){ | ||
423 | if(value<0 || value>allocationNum){ | ||
424 | countModal = true; | ||
425 | mui.alert(text,'提示','确定',function (e) { | ||
426 | countModal = false; | ||
427 | _this.value = allocationNum; | ||
428 | },'div') | ||
429 | } | ||
430 | } | ||
431 | }); | ||
432 | |||
433 | }); | ||
434 | |||
435 | })(mui,jQuery); | ||
436 | </script> | ||
437 | </body> | ||
438 | |||
439 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/pickingOffListUn.html
0 → 100644
1 | <!-- 拣货下架 已拣货 页面 - 列表页 - yuwei--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link rel="import" href="./list_tpl.html" id="list_tpl"/> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | </head> | ||
13 | |||
14 | <body> | ||
15 | |||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">药品信息</h1> | ||
21 | |||
22 | </header> | ||
23 | <div class="mui-content"> | ||
24 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
25 | <input type="search" class="mui-input-clear" placeholder="通用名/商品名/生产厂家" readonly="readonly" > | ||
26 | </div> | ||
27 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
28 | <div class="home-card-title">已拣货</div> | ||
29 | </div> | ||
30 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;"> | ||
31 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
32 | <div class="mui-slider-group"> | ||
33 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
34 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
35 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
36 | <ul class="mui-table-view"> | ||
37 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
38 | |||
39 | </li> | ||
40 | </ul> | ||
41 | </div> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> | ||
46 | |||
47 | </div> | ||
48 | |||
49 | <script src="../../js/mui.min.js"></script> | ||
50 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
51 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
52 | <script src="../../js/jquery.min.js"></script> | ||
53 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
54 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
56 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
57 | |||
58 | <script type="text/javascript"> | ||
59 | |||
60 | //去搜索页面 | ||
61 | function toSearchPage (){ | ||
62 | document.activeElement.blur(); // 隐藏软键盘 | ||
63 | var params = {}; | ||
64 | params.route = '../pickingOff/pickingOffListUn'; | ||
65 | params.id = 'pickingOffListUn'; | ||
66 | params.auditStatus = 1; | ||
67 | params.selectTabs = 2; | ||
68 | params.module = 'pickingOff'; | ||
69 | params.location = 'sub_list'; | ||
70 | console.log(params) | ||
71 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
72 | } | ||
73 | |||
74 | (function($,$JQ) { | ||
75 | //滚动加载 | ||
76 | var deceleration = mui.os.ios?0.003:0.0009; | ||
77 | $('.mui-scroll-wrapper').scroll({ | ||
78 | bounce: true, | ||
79 | indicators: true, //是否显示滚动条 | ||
80 | deceleration:deceleration | ||
81 | }); | ||
82 | |||
83 | // 模板加载 | ||
84 | var utils = new Utils(); | ||
85 | utils.appendModule('#list_tpl'); | ||
86 | // 初始化数据 | ||
87 | var params, pickingOrderNo,isMore = true , | ||
88 | pickingStatus = undefined, // 拣货状态 0 待拣货 1 已拣货 | ||
89 | pageNo = 1,//当前页 | ||
90 | cout = 0,//数据总量 | ||
91 | pageSize = 15,//每页加载量 | ||
92 | resData = undefined , | ||
93 | container = document.querySelector('.mui-tab1'), | ||
94 | globalPull =null, | ||
95 | baseList = [], | ||
96 | query={}, | ||
97 | nullDataHtml = '<div class="mui-pull-bottom-tips"><div class="mui-pull-bottom-wrapper">'+ | ||
98 | '<span class="mui-pull-loading">暂无数据</span></div></div>' | ||
99 | |||
100 | $.plusReady(function(){ | ||
101 | var self = plus.webview.currentWebview(); | ||
102 | let globalQuery = {}; | ||
103 | params = JSON.parse(self.params);//获得参数 | ||
104 | pickingOrderNo = params.pickingorderno; | ||
105 | |||
106 | window.addEventListener('pagefresh',function(event){ | ||
107 | query = event.detail.query; | ||
108 | console.log(JSON.stringify(event.detail)); | ||
109 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
110 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
111 | }); | ||
112 | |||
113 | // 触发刷新 搜索页面搜的值 | ||
114 | window.addEventListener('sub_search',function(event){ | ||
115 | console.log(JSON.stringify(event.detail)) | ||
116 | query = globalQuery = JSON.parse(event.detail.searchParams); | ||
117 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0,100); | ||
118 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
119 | }) | ||
120 | |||
121 | // | ||
122 | //绑定点击事件 - 进入详情页 | ||
123 | $('#slider').on('tap','.toPage',function(){ | ||
124 | let index = this.dataset.index; | ||
125 | let newData = {}; | ||
126 | newData.id = this.dataset.id; | ||
127 | newData.hasPicked = false; | ||
128 | newData.pickingOrderNo = pickingOrderNo; | ||
129 | newData.pickingStatus = '1'; | ||
130 | newData.query = globalQuery ; | ||
131 | // newData.pickingTime = resData.pickingTime; | ||
132 | // newData.pickingUserName = resData.pickingUserName | ||
133 | console.log(JSON.stringify(newData)) | ||
134 | document.activeElement.blur(); | ||
135 | common.openwin('pickingOffDetails',{ details: JSON.stringify(newData) },{ | ||
136 | titleText: '详情' | ||
137 | }) | ||
138 | }) | ||
139 | |||
140 | var json ={ | ||
141 | pickingOrderNo:pickingOrderNo, | ||
142 | pageNo:pageNo, | ||
143 | pageSize:15, | ||
144 | pickingStatus:'1' | ||
145 | } | ||
146 | |||
147 | var url = '/a/common/pickingorderdetail/detailList'; | ||
148 | //循环初始化所有下拉刷新,上拉加载。 | ||
149 | globalPull = $('.mui-scroll').pullToRefresh({ | ||
150 | down: { | ||
151 | style:'circle', | ||
152 | contentdown : "下拉可以刷新", | ||
153 | contentover : "释放立即刷新", | ||
154 | contentrefresh : "正在刷新...", | ||
155 | callback: pulldownRefresh | ||
156 | }, | ||
157 | up: { | ||
158 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
159 | contentnomore:'没有更多数据', | ||
160 | callback: pullupRefresh | ||
161 | } | ||
162 | }); | ||
163 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
164 | function pulldownRefresh (){ | ||
165 | console.log('下拉'); | ||
166 | if(query.hisDrugCode){ | ||
167 | console.log('有query') | ||
168 | json.hisDrugCode = query.hisDrugCode | ||
169 | $JQ('.mui-placeholder').hide(); | ||
170 | $JQ('.mui-input-clear').val(query.hisDrugName); | ||
171 | }else{ | ||
172 | console.log('二次刷新') | ||
173 | globalQuery={} | ||
174 | delete json.hisDrugCode | ||
175 | $JQ('.mui-input-clear').val(''); | ||
176 | $JQ('.mui-placeholder').show(); | ||
177 | } | ||
178 | query = {}; | ||
179 | json.pageNo = 1 ; | ||
180 | mui.ajaxRequest(url,{ | ||
181 | type: 'POST', | ||
182 | contentType: "application/x-www-form-urlencoded", | ||
183 | data:json, | ||
184 | showWaiting: true, | ||
185 | success: function(data){ | ||
186 | if(data.code === 200){ | ||
187 | toggle = false; | ||
188 | resData = data.data.list; | ||
189 | mui.each(resData,function(index,item){ | ||
190 | item.type = '已拣货' | ||
191 | }); | ||
192 | console.log(JSON.stringify(data.data.pageNo)) | ||
193 | if(resData.length === 0 || (resData.length <= data.data.pageSize && data.data.pageNo === data.data.totalPage)){ | ||
194 | isMore = false; | ||
195 | baseList=resData; | ||
196 | globalPull.endPullDownToRefresh(); | ||
197 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
198 | |||
199 | }else{ | ||
200 | isMore = true; | ||
201 | json.pageNo++; | ||
202 | baseList=resData; | ||
203 | globalPull.endPullDownToRefresh(); | ||
204 | globalPull.refresh(true); | ||
205 | } | ||
206 | container.innerHTML = data.length === 0 ? nullDataHtml : template('picking_tpl',{list:baseList}) ; | ||
207 | }else{ | ||
208 | mui.alert(data.msg) | ||
209 | } | ||
210 | }, | ||
211 | error: function(xhr,type,errorThrown){ | ||
212 | console.log(xhr.responseText) | ||
213 | } | ||
214 | }); | ||
215 | } | ||
216 | function pullupRefresh (){ | ||
217 | console.log('上拉') | ||
218 | console.log(JSON.stringify(json)) | ||
219 | mui.ajaxRequest(url,{ | ||
220 | type: 'POST', | ||
221 | contentType: "application/x-www-form-urlencoded", | ||
222 | data:json, | ||
223 | success: function(data){ | ||
224 | console.log(JSON.stringify(data)) | ||
225 | if(data.code === 200){ | ||
226 | resData = data.data.list; | ||
227 | mui.each(resData,function(index,item){ | ||
228 | item.type = '已拣货' | ||
229 | }); | ||
230 | |||
231 | if(resData.length === 0 || (resData.length <= data.data.pageSize && data.data.pageNo === data.data.totalPage)){ | ||
232 | //已无数据 | ||
233 | globalPull.refresh(true); | ||
234 | console.log('上拉已无数据') | ||
235 | // baseList = baseList.concat(resData) | ||
236 | console.log('baseList',baseList.length) | ||
237 | console.log('resData',resData.length) | ||
238 | container.innerHTML = data.length === 0 ? nullDataHtml : template('picking_tpl',{list:baseList}) ; | ||
239 | globalPull.endPullUpToRefresh(true); | ||
240 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
241 | |||
242 | }else{ | ||
243 | |||
244 | //还有数据 | ||
245 | console.log('上拉还有数据') | ||
246 | baseList = baseList.concat(resData) | ||
247 | json.pageNo++; | ||
248 | console.log('baseList',baseList.length) | ||
249 | console.log('resData',resData.length) | ||
250 | container.innerHTML = data.length === 0 ? nullDataHtml : template('picking_tpl',{list:baseList}) ; | ||
251 | globalPull.endPullUpToRefresh(false); | ||
252 | } | ||
253 | }else{ | ||
254 | mui.alert(data.msg) | ||
255 | } | ||
256 | }, | ||
257 | error: function(xhr,type,errorThrown){ | ||
258 | console.log(xhr.responseText) | ||
259 | } | ||
260 | }); | ||
261 | |||
262 | } | ||
263 | }); | ||
264 | })(mui,jQuery); | ||
265 | </script> | ||
266 | </body> | ||
267 | |||
268 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/pickingOff/picking_batch.html
0 → 100644
1 | <!--批量下架列表 - 药品信息 列表页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="pick_list_tpl.html" id="list_tpl"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | |||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <div class="mui-content"> | ||
17 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
18 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
19 | <label class="mui-pull-right theme_back_font">返回</label> | ||
20 | </a> | ||
21 | <h1 class="mui-title themes_title">药品信息</h1> | ||
22 | </header> | ||
23 | <div class="home-card-wrapper" style="padding: 8px;margin-top: 0;margin-bottom: 8px;"> | ||
24 | <div class="home-card-title">待下架</div> | ||
25 | </div> | ||
26 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="margin-top: 45px;padding-bottom: 59px;"> | ||
27 | <div class="mui-slider-group"> | ||
28 | <div id="item1mobile" class="mui-slider-item mui-control-content"> | ||
29 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
30 | <div class="mui-scroll" id="mui-table-view-tab1"> | ||
31 | <ul class="mui-table-view"> | ||
32 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"> | ||
33 | |||
34 | </li> | ||
35 | </ul> | ||
36 | </div> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div class="fix_bottom-wraper"> | ||
42 | <div class="fix-bottom-content"> | ||
43 | <div class="mui-checkbox mui-left"> | ||
44 | <label>全选</label> | ||
45 | <input name="checkboxAll" value="1" id="checkall" type="checkbox" style="top: -5px;z-index: 10;"> | ||
46 | </div> | ||
47 | <span style="margin-left: 8px;">已选中 <label class="total"> 0 </label> 项</span> | ||
48 | </div> | ||
49 | <a href="javascript:;" class="btn acceptance fix-bottom-extra"> 下 架 </a> | ||
50 | </div> | ||
51 | </div> | ||
52 | |||
53 | <script src="../../js/mui.min.js"></script> | ||
54 | <script src="../../js/jquery.min.js"></script> | ||
55 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
56 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
57 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
58 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
59 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
60 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
61 | <script type="text/javascript"> | ||
62 | if(window.plus) { | ||
63 | plusready(); | ||
64 | } else { | ||
65 | document.addEventListener('plusready', plusready, false); | ||
66 | } | ||
67 | function plusready() { | ||
68 | plus.key.addEventListener('backbutton',function(){ | ||
69 | plus.webview.currentWebview().close(); | ||
70 | }) | ||
71 | } | ||
72 | |||
73 | (function($,$JQ) { | ||
74 | |||
75 | var deceleration = mui.os.ios?0.003:0.0009; | ||
76 | $.init({ | ||
77 | beforeback:function(){ | ||
78 | var list = plus.webview.currentWebview().opener(); | ||
79 | mui.fire(list, 'pagefresh', { query:{ selected:"left" } }); | ||
80 | return true; | ||
81 | } | ||
82 | }); | ||
83 | $('.mui-scroll-wrapper').scroll({ | ||
84 | bounce: true, | ||
85 | indicators: true, //是否显示滚动条 | ||
86 | deceleration:deceleration | ||
87 | }); | ||
88 | |||
89 | var page = 1, | ||
90 | totalPage = undefined, | ||
91 | pageSize = 15, | ||
92 | isMore = true, | ||
93 | query = {}, | ||
94 | selected = '.mui-tab1'; // 默认选中内容区块 | ||
95 | pickingOrderNo = undefined, | ||
96 | pickingStatus = '0', | ||
97 | applyOrderNo = undefined, | ||
98 | selecteIndex = []; | ||
99 | |||
100 | var _url = '/a/common/pickingorderdetail/detailList', | ||
101 | pickUrl = '/a/common/pickingorder/finishPicking', | ||
102 | pageLeft = 1, | ||
103 | pageRight = 1, | ||
104 | totalPageLeft = undefined, | ||
105 | totalPageRight = undefined; | ||
106 | |||
107 | |||
108 | |||
109 | /* 渲染模板 */ | ||
110 | var checkType, type, auditStatus = '1'// 验收单类型 // 验收状态 1 待拣货 2 已拣货 | ||
111 | var utils = new Utils(); | ||
112 | utils.appendModule('#list_tpl'); | ||
113 | |||
114 | |||
115 | function template(data, insertType,render) { | ||
116 | utils.innerTplHtml('picking_tpl', '.mui-tab1', data, insertType); | ||
117 | if(render){ | ||
118 | var checkList = document.querySelectorAll('.checkone'); | ||
119 | console.log(selecteIndex,'selecteIndex') | ||
120 | mui.each(selecteIndex, function(index, item) { | ||
121 | checkList[item].checked = true; | ||
122 | }); | ||
123 | } | ||
124 | } | ||
125 | /* | ||
126 | 下拉刷新 | ||
127 | * */ | ||
128 | function pulldownRefresh(){ | ||
129 | document.querySelector('.total').innerText = 0; | ||
130 | document.querySelector('#checkall').checked = false; | ||
131 | selecteIndex = []; | ||
132 | |||
133 | var self = this; | ||
134 | page = 1; | ||
135 | var postData = { | ||
136 | pickingOrderNo: pickingOrderNo, | ||
137 | pickingStatus:pickingStatus, | ||
138 | pageNo: page, | ||
139 | pageSize: pageSize | ||
140 | }; | ||
141 | if(query.hisDrugCode){ | ||
142 | postData.hisDrugCode = query.hisDrugCode | ||
143 | } | ||
144 | query = {}; | ||
145 | mui.ajaxRequest(_url,{ | ||
146 | type: 'POST', | ||
147 | data: postData, | ||
148 | success: function(data){ | ||
149 | var resData = data.data; | ||
150 | resData.page = page; | ||
151 | resData.pageSize = pageSize; | ||
152 | resData.hasPicked = true; | ||
153 | resData.applyOrderNo = applyOrderNo; | ||
154 | totalPage = data.totalPage; | ||
155 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
156 | isMore = false; | ||
157 | self.endPullDownToRefresh(true); | ||
158 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
159 | |||
160 | }else{ | ||
161 | isMore = true; | ||
162 | self.endPullDownToRefresh(false); | ||
163 | self.refresh(true); | ||
164 | } | ||
165 | return template(resData, false) | ||
166 | }, | ||
167 | error: function(xhr,type,errorThrown){ | ||
168 | console.log(xhr.responseText) | ||
169 | } | ||
170 | }); | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | |||
175 | * 上拉加载更多 | ||
176 | * */ | ||
177 | function pullupRefresh() { | ||
178 | document.querySelector('#checkall').checked = false; | ||
179 | var self = this; | ||
180 | if (isMore) { | ||
181 | page++; | ||
182 | mui.ajaxRequest(_url, { | ||
183 | type: 'POST', | ||
184 | data: { | ||
185 | pickingOrderNo: pickingOrderNo, | ||
186 | pickingStatus:pickingStatus, | ||
187 | pageNo: page, | ||
188 | pageSize: pageSize | ||
189 | }, | ||
190 | success: function(data) { | ||
191 | var resData = data.data; | ||
192 | resData.page = page; | ||
193 | resData.pageSize = pageSize; | ||
194 | resData.hasPicked = true; | ||
195 | if (resData.pageNo === resData.totalPage) { | ||
196 | isMore = false; | ||
197 | self.endPullUpToRefresh(true); | ||
198 | } else { | ||
199 | isMore = true; | ||
200 | self.endPullUpToRefresh(false); | ||
201 | self.refresh(true); | ||
202 | } | ||
203 | return template(resData, true,'render') | ||
204 | |||
205 | }, | ||
206 | error: function(xhr, type, errorThrown) { | ||
207 | console.log(xhr.responseText) | ||
208 | } | ||
209 | }); | ||
210 | } else { | ||
211 | document.querySelectorAll('.mui-pull-loading')[0].innerHTML = '没有更多数据'; | ||
212 | self.endPullUpToRefresh(true); | ||
213 | } | ||
214 | |||
215 | } | ||
216 | |||
217 | // 模板加载 | ||
218 | $.plusReady(function(){ | ||
219 | var params = undefined, | ||
220 | applyNo = undefined; | ||
221 | |||
222 | var self = plus.webview.currentWebview(); | ||
223 | params = JSON.parse(self.params);//获得参数 | ||
224 | pickingOrderNo = params.pickingOrderNo; | ||
225 | applyOrderNo = params.applyNo; | ||
226 | applyNo = params.applyNo; | ||
227 | |||
228 | console.log(params); | ||
229 | |||
230 | var pickUrl = '/a/common/pickingorder/finishPicking'; | ||
231 | |||
232 | //循环初始化所有下拉刷新,上拉加载。 | ||
233 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
234 | |||
235 | $(pullRefreshEl).pullToRefresh({ | ||
236 | down: { | ||
237 | style:'circle', | ||
238 | contentdown : "下拉可以刷新", | ||
239 | contentover : "释放立即刷新", | ||
240 | contentrefresh : "正在刷新...", | ||
241 | callback: pulldownRefresh | ||
242 | }, | ||
243 | up: { | ||
244 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
245 | contentnomore:'没有更多数据', | ||
246 | callback: pullupRefresh | ||
247 | } | ||
248 | }); | ||
249 | }); | ||
250 | // 第一个tab 默认加载一次数据 | ||
251 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
252 | |||
253 | |||
254 | // 全选 及反选 | ||
255 | $('.fix_bottom-wraper').on('click','#checkall',function(){ | ||
256 | selecteIndex = []; | ||
257 | var checkList = document.querySelectorAll('.checkone'); | ||
258 | if (document.querySelector('#checkall').checked){ | ||
259 | // 全选 | ||
260 | mui.each(checkList,function(index,item){ | ||
261 | item.checked = true | ||
262 | }); | ||
263 | document.querySelector('.total').innerText = checkList.length; | ||
264 | mui.each(checkList,function(index,item){ | ||
265 | selecteIndex.push(index); | ||
266 | }); | ||
267 | } else { | ||
268 | // 取消全选 | ||
269 | mui.each(checkList,function(index,item){ | ||
270 | item.checked = false | ||
271 | }); | ||
272 | document.querySelector('.total').innerText = 0; | ||
273 | selectedRows = []; | ||
274 | selecteIndex = [] | ||
275 | } | ||
276 | }); | ||
277 | |||
278 | // 复选框选中 | ||
279 | $('#slider').on('change','.checkone',function(){ | ||
280 | selectedRows = [],selecteIndex = []; | ||
281 | var checkList = document.querySelectorAll('.checkone') | ||
282 | var checkAll = document.querySelector('#checkall'); | ||
283 | var checkLen = checkList.length; | ||
284 | var len = 0; | ||
285 | mui.each(checkList,function(index,item){ | ||
286 | if(item.checked){ | ||
287 | len++; | ||
288 | // selectedRows.push(acceptList[index]); | ||
289 | selecteIndex.push(this.dataset.index) | ||
290 | } | ||
291 | }); | ||
292 | checkAll.checked = len === checkLen ? true: false; | ||
293 | document.querySelector('.total').innerText = len; | ||
294 | }) | ||
295 | |||
296 | |||
297 | // 绑定事件 --确认拣货 | ||
298 | $('.fix_bottom-wraper').on('tap','.acceptance',function(){ | ||
299 | document.activeElement.blur(); // 隐藏软键盘 | ||
300 | if(Number(document.querySelector('.total').innerText) === 0){ | ||
301 | return mui.alert('请至少选中一项','警告',['确认'],function(){},'div') | ||
302 | } | ||
303 | var cards = document.querySelectorAll('.am-card'); | ||
304 | var selectedCards = []; | ||
305 | mui.each(selecteIndex,function(index,item){ | ||
306 | selectedCards.push(cards[item]); | ||
307 | }); | ||
308 | var pickingDetail = [], submitData = {}; | ||
309 | mui.each(selectedCards,function(index,item){ | ||
310 | var postData = {}; | ||
311 | postData.drugCode = item.dataset.drugcode; | ||
312 | postData.id = item.dataset.id; | ||
313 | postData.pickingNum = item.querySelector('.allocationNum').value; | ||
314 | pickingDetail.push(postData); | ||
315 | }); | ||
316 | submitData.pickingDetail = pickingDetail; | ||
317 | submitData.applyNo = params.applyNo;; | ||
318 | submitData.pickingOrderNo = params.pickingOrderNo;; | ||
319 | console.log(submitData) | ||
320 | |||
321 | var btnArray = ['否', '是']; | ||
322 | mui.confirm('确认批量下架选中的药品?', '确认', btnArray, function(e) { | ||
323 | if (e.index == 1) { | ||
324 | mui.ajaxRequest(pickUrl,{ | ||
325 | type: 'POST', | ||
326 | data: submitData, | ||
327 | showWaiting: true, | ||
328 | contentType: "application/json", | ||
329 | success: function(data){ | ||
330 | if(data.code === 200){ | ||
331 | mui.toast('下架成功',{ type: 'div' }); | ||
332 | $JQ('.total').text(0); | ||
333 | document.querySelector('#checkall').checked = false; | ||
334 | setTimeout(function(){ | ||
335 | mui('.mui-scroll-wrapper').scroll().scrollTo(0,0); | ||
336 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
337 | },300) | ||
338 | } | ||
339 | }, | ||
340 | error: function(xhr,type,errorThrown){ | ||
341 | console.log(xhr.responseText) | ||
342 | } | ||
343 | }) | ||
344 | } | ||
345 | },'div') | ||
346 | }); | ||
347 | |||
348 | //验证数量 | ||
349 | var countModal = false; | ||
350 | $JQ('#slider').on('keyup','.allocationNum',function(){ | ||
351 | var _this = this,$this = $JQ(this); | ||
352 | var index = this.dataset.index; | ||
353 | var value = Number(this.value?this.value:0); | ||
354 | var _this_node = document.querySelectorAll('.am-card')[index]; | ||
355 | var allocationNum = _this_node.dataset.allocationnum?_this_node.dataset.allocationnum:0; | ||
356 | var text = "实到数量不能大于数量"+allocationNum+",且不能小于0!"; | ||
357 | if(!countModal){ | ||
358 | if(value<0 || value>allocationNum){ | ||
359 | countModal = true; | ||
360 | mui.alert(text,'提示','确定',function (e) { | ||
361 | countModal = false; | ||
362 | _this.value = allocationNum; | ||
363 | },'div') | ||
364 | } | ||
365 | } | ||
366 | }); | ||
367 | |||
368 | |||
369 | |||
370 | }); | ||
371 | |||
372 | })(mui,jQuery); | ||
373 | |||
374 | </script> | ||
375 | </body> | ||
376 | |||
377 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/result/index.html
0 → 100644
1 | <!--验收 - 详情页 - wwb--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <link rel="import" href="./success_tpl.html" id="success"/> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <style> | ||
13 | .result-footer{ | ||
14 | text-align: center; | ||
15 | margin-top: 36px; | ||
16 | } | ||
17 | .btn{ | ||
18 | display: inline-block; | ||
19 | width: 120px; | ||
20 | height: 36px; | ||
21 | line-height: 36px; | ||
22 | border-radius: 3px; | ||
23 | } | ||
24 | .keep{ | ||
25 | color: #4cd964; | ||
26 | border: 1px solid #4cd964; | ||
27 | margin-right: 24px; | ||
28 | } | ||
29 | .keep:active{ | ||
30 | color: #4cd964; | ||
31 | } | ||
32 | .finish{ | ||
33 | color: #007aff; | ||
34 | border: 1px solid #007aff; | ||
35 | } | ||
36 | .finish:active{ | ||
37 | color: #007aff; | ||
38 | } | ||
39 | </style> | ||
40 | </head> | ||
41 | <body> | ||
42 | <div class="mui-content"> | ||
43 | <div id="result" class="am-result"> | ||
44 | |||
45 | </div> | ||
46 | <div class="result-footer"> | ||
47 | <a class="btn keep">继续<span class="actionName"></span></a> | ||
48 | <a class="btn finish">完成</a> | ||
49 | </div> | ||
50 | |||
51 | </div> | ||
52 | <script src="../../js/mui.min.js"></script> | ||
53 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
54 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
56 | <script type="text/javascript"> | ||
57 | |||
58 | |||
59 | (function($) { | ||
60 | |||
61 | $.init() | ||
62 | // 模板加载 | ||
63 | $.ready(function(){ | ||
64 | |||
65 | var utils = new Utils(); | ||
66 | utils.appendModule('#success'); | ||
67 | }); | ||
68 | $.plusReady(function(){ | ||
69 | var self = plus.webview.currentWebview(); | ||
70 | var parmas = JSON.parse(self.parmas); | ||
71 | console.log(parmas,'parmas'); | ||
72 | var data = {}; | ||
73 | data.finishUrl = parmas.finishUrl; | ||
74 | data.keepUrl = parmas.keepUrl; | ||
75 | switch(parmas.resultType){ | ||
76 | case 'acceptance': | ||
77 | data.resultType = '验收'; | ||
78 | break; | ||
79 | case 'ground': | ||
80 | data.resultType = '上架'; | ||
81 | break; | ||
82 | case 'picking': | ||
83 | data.resultType = '拣货'; | ||
84 | break; | ||
85 | case 'check': | ||
86 | data.resultType = '盘点'; | ||
87 | break; | ||
88 | case 'move': | ||
89 | data.resultType = '移动'; | ||
90 | break; | ||
91 | default: | ||
92 | break; | ||
93 | } | ||
94 | document.querySelector('.actionName').innerText = data.resultType; | ||
95 | var html = template('success_tpl', data); | ||
96 | document.getElementById('result').innerHTML = html; | ||
97 | |||
98 | // 继续操作 | ||
99 | $('.result-footer').on('click','.keep',function(){ | ||
100 | var page = plus.webview.getWebviewById(parmas.keepUrl); | ||
101 | mui.fire(page,'pagefresh',{ params: JSON.stringify(parmas.itemData),selectTab: '1' }); | ||
102 | common.gotowin(parmas.keepUrl,{ params: JSON.stringify(parmas.itemData) }); | ||
103 | // plus.webview.currentWebview().close(); | ||
104 | |||
105 | }); | ||
106 | |||
107 | |||
108 | // 完成操作 | ||
109 | $('.result-footer').on('tap','.finish',function(){ | ||
110 | var page = plus.webview.getWebviewById(parmas.finishUrl); | ||
111 | console.log(page); | ||
112 | mui.fire(page,'pagefresh',{ hasAcceptance: true }); | ||
113 | common.gotowin(parmas.finishUrl, {}, false) | ||
114 | }) | ||
115 | |||
116 | }) | ||
117 | })(mui); | ||
118 | |||
119 | </script> | ||
120 | </body> | ||
121 | |||
122 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/result/success_tpl.html
0 → 100644
1 | <script type="text/html" id='success_tpl'> | ||
2 | <div style="margin-top:15%;"> | ||
3 | <div> | ||
4 | <img src="../../assest/success.svg" width="128" height="128"/> | ||
5 | </div> | ||
6 | <div class="am-result-title"> | ||
7 | <div><span>{{ resultType }}</span>完成</div> | ||
8 | </div> | ||
9 | </div> | ||
10 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/stockQuery/details.html
0 → 100644
1 | <!--库存查询 - 详情页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title></title> | ||
7 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
8 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
9 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
10 | <link rel="import" href="./details_view.html" id="card_view"/> | ||
11 | </head> | ||
12 | |||
13 | <body> | ||
14 | |||
15 | <div class="mui-content detailRow"> | ||
16 | <form class="mui-input-group" id="detailContent" style="background:none;"> | ||
17 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
18 | <li class="mui-table-view-cell mui-collapse"> | ||
19 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
20 | <div class="mui-collapse-content"> | ||
21 | |||
22 | </div> | ||
23 | </li> | ||
24 | </ul> | ||
25 | |||
26 | </form> | ||
27 | </div> | ||
28 | |||
29 | <script src="../../js/mui.js"></script> | ||
30 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
31 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
32 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
33 | <script type="text/javascript"> | ||
34 | (function($) { | ||
35 | |||
36 | var utils = new Utils(); | ||
37 | utils.appendModule('#card_view'); | ||
38 | |||
39 | $.plusReady(function(){ | ||
40 | |||
41 | var params, hisDrugCode = undefined, drugCode = undefined; | ||
42 | var self = plus.webview.currentWebview(); | ||
43 | params = JSON.parse(self.params);//获得参数 | ||
44 | hisDrugCode = params.hisdrugcode; | ||
45 | drugCode = params.drugcode; | ||
46 | var baseUrl = '/a/StoreDetail/getRoomRepertoryDetail'; | ||
47 | var tableUrl = '/a/StoreDetail/getRoomRepertoryDetailList'; | ||
48 | var renderData = { }; | ||
49 | plus.nativeUI.showWaiting(); | ||
50 | genDetailData(baseUrl,hisDrugCode) | ||
51 | |||
52 | |||
53 | /* | ||
54 | 获取列表数据 | ||
55 | * */ | ||
56 | |||
57 | function genDetailData(baseUrl,hisDrugCode){ | ||
58 | // 详情 数据 | ||
59 | mui.ajaxRequest(baseUrl,{ | ||
60 | type: 'POST', | ||
61 | data: { | ||
62 | hisDrugCode: hisDrugCode | ||
63 | }, | ||
64 | success: function(data){ | ||
65 | if(data.code === 200){ | ||
66 | var list = []; | ||
67 | list.push(data.data); | ||
68 | renderData.list = list; | ||
69 | genTableData(tableUrl,drugCode); | ||
70 | }else{ | ||
71 | mui.alert(data.msg) | ||
72 | } | ||
73 | }, | ||
74 | error: function(xhr,type,errorThrown){ | ||
75 | console.log(xhr.responseText) | ||
76 | } | ||
77 | }); | ||
78 | } | ||
79 | |||
80 | function genTableData(tableUrl,drugCode){ | ||
81 | // 列表数据 | ||
82 | |||
83 | mui.ajaxRequest(tableUrl,{ | ||
84 | type: 'post', | ||
85 | data: { | ||
86 | drugCode: drugCode | ||
87 | }, | ||
88 | success: function(data){ | ||
89 | if(data.code === 200){ | ||
90 | plus.nativeUI.closeWaiting(); | ||
91 | var tablist = data.data.list; | ||
92 | renderData.tablist = tablist; | ||
93 | var html = template('deitail_view', renderData); | ||
94 | document.getElementById('detailContent').innerHTML = html; | ||
95 | }else{ | ||
96 | mui.alert(data.msg) | ||
97 | } | ||
98 | }, | ||
99 | error: function(xhr,type,errorThrown){ | ||
100 | console.log(xhr.responseText) | ||
101 | } | ||
102 | }); | ||
103 | } | ||
104 | }) | ||
105 | })(mui); | ||
106 | |||
107 | </script> | ||
108 | </body> | ||
109 | |||
110 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/stockQuery/details_view.html
0 → 100644
1 | |||
2 | <script type="text/html" id='deitail_view'> | ||
3 | <div style="margin-top:10px;"> | ||
4 | {{ each list value i}} | ||
5 | <ul class="mui-table-view" style="margin-bottom:12px;"> | ||
6 | <li class="mui-table-view-cell mui-collapse mui-active"> | ||
7 | <a class="mui-navigate-right" href="#">产品信息</a> | ||
8 | <div class="mui-collapse-content"> | ||
9 | <div class="mui-input-row"> | ||
10 | <label>通用名</label> | ||
11 | <p class="detailRow_content">{{ value.genericName }}</p> | ||
12 | </div> | ||
13 | <div class="mui-input-row"> | ||
14 | <label>商品名</label> | ||
15 | <p class="detailRow_content">{{value.tradeName}}</p> | ||
16 | </div> | ||
17 | <div class="mui-input-row"> | ||
18 | <label>规格</label> | ||
19 | <p class="detailRow_content">{{value.specification}}</p> | ||
20 | </div> | ||
21 | <div class="mui-input-row"> | ||
22 | <label>剂型</label> | ||
23 | <p class="detailRow_content">{{value.dosageDesc}}</p> | ||
24 | </div> | ||
25 | <div class="mui-input-row"> | ||
26 | <label>生产厂家</label> | ||
27 | <p class="detailRow_content">{{value.manufactureName}}</p> | ||
28 | </div> | ||
29 | <div class="mui-input-row"> | ||
30 | <label>批准文号</label> | ||
31 | <p class="detailRow_content">{{value.approvalNo}}</p> | ||
32 | </div> | ||
33 | <div class="mui-input-row"> | ||
34 | <label>包装规格</label> | ||
35 | <p class="detailRow_content">{{value.packageSpecification}}</p> | ||
36 | </div> | ||
37 | </div> | ||
38 | </li> | ||
39 | </ul> | ||
40 | |||
41 | <ul class="mui-table-view" style="margin-top:12px;"> | ||
42 | {{ each tablist itemValue subIndex}} | ||
43 | <li class="mui-table-view-cell mui-collapse" data-id="{{ itemValue.id }}"> | ||
44 | |||
45 | <a class="mui-navigate-right" href="#" style="display: flex;"> | ||
46 | <label class="detailRow_label head_minheight">货位</label> | ||
47 | <p class="detailRow_content head_minheight">{{ itemValue.storeLocName }}</p> | ||
48 | <span class="detailRow_right theme_font_danger head_minheight">{{ itemValue.usableQuantity }}</span> | ||
49 | </a> | ||
50 | <div class="mui-collapse-content"> | ||
51 | <div class="mui-input-row"> | ||
52 | <label>货位类型</label> | ||
53 | <p class="detailRow_content">{{itemValue.storeType}}</p> | ||
54 | </div> | ||
55 | <div class="mui-input-row"> | ||
56 | <label>数量</label> | ||
57 | <p class="detailRow_content">{{itemValue.usableQuantity}}</p> | ||
58 | </div> | ||
59 | <div class="mui-input-row"> | ||
60 | <label>单位</label> | ||
61 | <p class="detailRow_content">{{itemValue.unit}}</p> | ||
62 | </div> | ||
63 | <div class="mui-input-row"> | ||
64 | <label>供应商</label> | ||
65 | <p class="detailRow_content">{{itemValue.supplierName}}</p> | ||
66 | </div> | ||
67 | <div class="mui-input-row"> | ||
68 | <label>生产批号</label> | ||
69 | <p class="detailRow_content">{{itemValue.lot}}</p> | ||
70 | </div> | ||
71 | <div class="mui-input-row"> | ||
72 | <label>生产日期</label> | ||
73 | <p class="detailRow_content">{{itemValue.productDate}}</p> | ||
74 | </div> | ||
75 | <div class="mui-input-row"> | ||
76 | <label>有效期至</label> | ||
77 | <p class="detailRow_content">{{itemValue.validEndDate}}</p> | ||
78 | </div> | ||
79 | </div> | ||
80 | </li> | ||
81 | {{/each}} | ||
82 | </ul> | ||
83 | {{/each}} | ||
84 | </div> | ||
85 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/stockQuery/index.html
0 → 100644
1 | <!--库存查询 - 列表页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | |||
5 | <head> | ||
6 | <meta charset="UTF-8"> | ||
7 | <title></title> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link rel="import" href="../../tpl/stockQuery_card.html" id="card_view"/> | ||
13 | </head> | ||
14 | |||
15 | <body> | ||
16 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
17 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
18 | <label class="mui-pull-right theme_back_font">返回</label> | ||
19 | </a> | ||
20 | <h1 class="mui-title themes_title">库存查询</h1> | ||
21 | </header> | ||
22 | <div class="mui-content"> | ||
23 | <div class="mui-input-row mui-search search_head" onclick="toSearchPage()"> | ||
24 | <input type="search" class="mui-input-clear" id="search" placeholder="通用名/商品名" readonly="readonly" > | ||
25 | </div> | ||
26 | <div id="slider" class="mui-slider themes_tab mui-fullscreen" style="top: 102px;"> | ||
27 | <!--<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"> | ||
28 | <a class="mui-control-item themes_font_color_tab" href="#item1mobile">全部</a> | ||
29 | <a class="mui-control-item themes_font_color_tab item2mobile" href="#item2mobile">更多筛选</a> | ||
30 | </div>--> | ||
31 | <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div> | ||
32 | |||
33 | <div class="mui-slider-group"> | ||
34 | <div id="item1mobile" class="mui-slider-item mui-control-content mui-active"> | ||
35 | <div id="scroll1" class="mui-scroll-wrapper"> | ||
36 | <div class="mui-scroll" id='mui-table-view-tab1'> | ||
37 | <ul class="mui-table-view"> | ||
38 | <li class="mui-table-view-cell mui-tab1" style="padding: 0;"></li> | ||
39 | </ul> | ||
40 | </div> | ||
41 | </div> | ||
42 | </div> | ||
43 | <div class="moreCondition"> | ||
44 | <ul class="mui-table-view"> | ||
45 | <li class="mui-table-view-cell" data-search='nearEffect'>近效期(三个月)</li> | ||
46 | <li class="mui-table-view-cell" data-search= 'lowStock'>低库存</li> | ||
47 | </ul> | ||
48 | </div> | ||
49 | </div> | ||
50 | </div> | ||
51 | |||
52 | </div> | ||
53 | |||
54 | <script src="../../js/mui.js"></script> | ||
55 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
56 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
57 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
58 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
59 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
60 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
61 | <script type="text/javascript"> | ||
62 | |||
63 | |||
64 | //去搜索页面 | ||
65 | function toSearchPage (){ | ||
66 | var params = {}; | ||
67 | params.module = 'stock'; | ||
68 | params.location = 'main_list'; | ||
69 | params.route = '../stockQuery/index'; | ||
70 | common.openwin('../commonPages/searchPage',{ params: JSON.stringify(params) },false) | ||
71 | } | ||
72 | |||
73 | (function($) { | ||
74 | $.init({ | ||
75 | beforeback:function(){ | ||
76 | var list = plus.webview.currentWebview().opener(); | ||
77 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
78 | return true; | ||
79 | } | ||
80 | }); | ||
81 | |||
82 | |||
83 | var deceleration = mui.os.ios?0.003:0.0009; | ||
84 | $('.mui-scroll-wrapper').scroll({ | ||
85 | bounce: true, | ||
86 | indicators: true, //是否显示滚动条 | ||
87 | deceleration:deceleration | ||
88 | }); | ||
89 | |||
90 | var utils = new Utils(); | ||
91 | utils.appendModule('#card_view'); | ||
92 | |||
93 | var url = '/a/StoreDetail/list'; | ||
94 | var page = 1, totalPage = undefined, pageSize = 30, isMore = true, query = {}; | ||
95 | |||
96 | /* 渲染模板 */ | ||
97 | function template(data, insertType){ | ||
98 | utils.innerTplHtml('stock', '.mui-tab1', data, insertType); | ||
99 | } | ||
100 | /* | ||
101 | 下拉刷新 | ||
102 | * */ | ||
103 | function pulldownRefresh(){ | ||
104 | var self = this; | ||
105 | page = 1; | ||
106 | var postData = { | ||
107 | pageNo: page, | ||
108 | pageSize: pageSize | ||
109 | }; | ||
110 | if(query.bigDrugCode){ | ||
111 | postData.hisDrugCodeList = [ query.bigDrugCode ] | ||
112 | } | ||
113 | query = {}; | ||
114 | mui.ajaxRequest(url,{ | ||
115 | type: 'POST', | ||
116 | data: postData, | ||
117 | contentType: "application/json", | ||
118 | success: function(data){ | ||
119 | var resData = data.data; | ||
120 | totalPage = data.totalPage; | ||
121 | if(resData.pageNo >= resData.totalPage){ | ||
122 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
123 | isMore = false; | ||
124 | self.endPullDownToRefresh(true); | ||
125 | }else{ | ||
126 | isMore = true; | ||
127 | self.endPullDownToRefresh(false); | ||
128 | self.refresh(true); | ||
129 | } | ||
130 | return template(resData, false) | ||
131 | }, | ||
132 | error: function(xhr,type,errorThrown){ | ||
133 | console.log(xhr.responseText) | ||
134 | } | ||
135 | }); | ||
136 | } | ||
137 | |||
138 | /* | ||
139 | |||
140 | * 上拉加载更多 | ||
141 | * */ | ||
142 | function pullupRefresh(){ | ||
143 | var self = this; | ||
144 | console.log(isMore,'isMore') | ||
145 | if(isMore){ | ||
146 | page++; | ||
147 | mui.ajaxRequest(url,{ | ||
148 | type: 'POST', | ||
149 | data:{ | ||
150 | pageNo: page, | ||
151 | pageSize: pageSize | ||
152 | }, | ||
153 | contentType: "application/json", | ||
154 | success: function(data){ | ||
155 | var resData = data.data; | ||
156 | if(resData.pageNo === resData.totalPage){ | ||
157 | isMore = false; | ||
158 | self.endPullUpToRefresh(true); | ||
159 | }else{ | ||
160 | isMore = true; | ||
161 | self.endPullUpToRefresh(false); | ||
162 | self.refresh(true); | ||
163 | } | ||
164 | return template(resData, true) | ||
165 | |||
166 | }, | ||
167 | error: function(xhr,type,errorThrown){ | ||
168 | console.log(xhr.responseText) | ||
169 | } | ||
170 | }); | ||
171 | }else{ | ||
172 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
173 | self.endPullUpToRefresh(true); | ||
174 | } | ||
175 | |||
176 | } | ||
177 | |||
178 | $.plusReady(function(){ | ||
179 | |||
180 | // 触发刷新 搜索页面搜的值 | ||
181 | window.addEventListener('search',function(event){ | ||
182 | console.log(event.detail) | ||
183 | query.bigDrugCode = JSON.parse(event.detail.searchParams).bigDrugCode; | ||
184 | query.ctmmParam = JSON.parse(event.detail.searchParams).ctmmParam; | ||
185 | document.querySelector('.mui-input-clear').placeholder = ''; | ||
186 | document.querySelector('.mui-placeholder').style.display = 'none'; | ||
187 | document.querySelector('.mui-input-clear').value = query.ctmmParam; | ||
188 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
189 | }) | ||
190 | |||
191 | //循环初始化所有下拉刷新,上拉加载。 | ||
192 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
193 | $(pullRefreshEl).pullToRefresh({ | ||
194 | down: { | ||
195 | style:'circle', | ||
196 | contentdown : "下拉可以刷新", | ||
197 | contentover : "释放立即刷新", | ||
198 | contentrefresh : "正在刷新...", | ||
199 | callback: pulldownRefresh | ||
200 | }, | ||
201 | up: { | ||
202 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
203 | contentnomore:'没有更多数据', | ||
204 | callback: pullupRefresh | ||
205 | } | ||
206 | }); | ||
207 | }); | ||
208 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
209 | |||
210 | //tab页切的点击事件 | ||
211 | // var sliderSegmentedControl = document.getElementById('sliderSegmentedControl'); | ||
212 | // $('.mui-input-group').on('change', 'input', function() { | ||
213 | // if (this.checked) { | ||
214 | // sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted mui-segmented-control-' + this.value; | ||
215 | // //force repaint | ||
216 | // sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style')); | ||
217 | // } | ||
218 | // }); | ||
219 | // 更多筛选 | ||
220 | // $('#sliderSegmentedControl').on('tap','.item2mobile',function(){ | ||
221 | // var moreCondition = document.querySelector('.moreCondition'); | ||
222 | // moreCondition.style.display = moreCondition.style.display === 'none'? 'block':'none'; | ||
223 | // }); | ||
224 | |||
225 | // 更多筛选条件查询 | ||
226 | // $('.moreCondition').on('tap','.mui-table-view-cell',function(){ | ||
227 | // this.parentNode.parentNode.style.display = 'none'; | ||
228 | // console.log(this.dataset.search) | ||
229 | // }) | ||
230 | |||
231 | //绑定点击事件 - 进入详情页 | ||
232 | |||
233 | $('#slider').on('tap','.am-card',function(){ | ||
234 | let itemData = this.dataset; | ||
235 | console.log(JSON.stringify(itemData)) | ||
236 | document.activeElement.blur(); | ||
237 | common.openwin('details',{ params: JSON.stringify(itemData) },{ | ||
238 | titleText:'详情' | ||
239 | }) | ||
240 | }); | ||
241 | }); | ||
242 | |||
243 | })(mui); | ||
244 | </script> | ||
245 | </body> | ||
246 | |||
247 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/trace/index.html
0 → 100644
1 | <!doctype html> | ||
2 | <html | ||
3 | <head> | ||
4 | <meta charset="UTF-8"> | ||
5 | <title></title> | ||
6 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
7 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
8 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
9 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
10 | <link rel="import" href="./trace_list_tpl.html" id="trace_list"/> | ||
11 | <style> | ||
12 | .competition { | ||
13 | margin: 10px 0 0 0; | ||
14 | position: relative; | ||
15 | } | ||
16 | .competition>.head { | ||
17 | display: flex; | ||
18 | justify-content: flex-start; | ||
19 | align-items: center; | ||
20 | padding: 5px 0; | ||
21 | color: #333; | ||
22 | font-size: 16px; | ||
23 | background-color: #fff; | ||
24 | } | ||
25 | .mui-table-view-cell { | ||
26 | margin: 5px 7px!important; | ||
27 | padding: 0; | ||
28 | border-radius: 6px; | ||
29 | background: #efeff4!important; | ||
30 | } | ||
31 | .mrl-5{ | ||
32 | margin-left: 5%; | ||
33 | } | ||
34 | .text-leart { | ||
35 | display: flex; | ||
36 | justify-content: flex-start; | ||
37 | align-items: center; | ||
38 | min-height: 150px; | ||
39 | margin-top: 10px; | ||
40 | background: #fff; | ||
41 | font-size: 16px; | ||
42 | padding-left: 5%; | ||
43 | } | ||
44 | .head-left, .head-right{ | ||
45 | display: flex; | ||
46 | justify-content: flex-start; | ||
47 | align-items: center; | ||
48 | padding-left: 5%; | ||
49 | height: 100%; | ||
50 | width: 40%; | ||
51 | } | ||
52 | .head-right .qrcode{ | ||
53 | display: flex; | ||
54 | justify-content: flex-start; | ||
55 | align-items: center; | ||
56 | } | ||
57 | .mui-row>[class*=mui-col-] { | ||
58 | line-height: 30px; | ||
59 | } | ||
60 | </style> | ||
61 | </head> | ||
62 | |||
63 | <body> | ||
64 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
65 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
66 | <label class="mui-pull-right theme_back_font">返回</label> | ||
67 | </a> | ||
68 | <h1 class="mui-title themes_title">药品追溯</h1> | ||
69 | </header> | ||
70 | <div class="mui-content"> | ||
71 | <div class="competition"> | ||
72 | <div class="head"> | ||
73 | <div class="head-left"><i class="mui-icon mui-icon-camera"></i>请扫描货位二维码</div> | ||
74 | <a href="#modal" class="head-right"> | ||
75 | <div class="qrcode" id="qrcode" onclick="clicked('../commonPages/qrcode',true,true)"> | ||
76 | <img src="../../assest/qrcode.png" width="48" height="48"/> | ||
77 | </div> | ||
78 | </a> | ||
79 | </div> | ||
80 | <div id="content"> | ||
81 | <div class="text-leart"> | ||
82 | <div class="text-content"> | ||
83 | <i class="mui-icon mui-icon-locked"></i>扫描货位成功后,即显示该货位对应商品! | ||
84 | </div> | ||
85 | </div> | ||
86 | </div> | ||
87 | </div> | ||
88 | </div> | ||
89 | |||
90 | <script src="../../js/mui.js"></script> | ||
91 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
92 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
93 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
94 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
95 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
96 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
97 | |||
98 | |||
99 | <script type="text/javascript"> | ||
100 | //货位码 | ||
101 | var locationCode = ""; | ||
102 | function clicked(){ | ||
103 | common.openwin('../commonPages/qrcode',true,{ titleText: '扫货位码' }) | ||
104 | } | ||
105 | |||
106 | /*获取二维码返回值*/ | ||
107 | function scaned(t, r, f) { | ||
108 | |||
109 | console.log(r+"二维码读取的数据");//返回二维码读取的数据 | ||
110 | locationCode = r; | ||
111 | getData(locationCode); | ||
112 | } | ||
113 | //将tpl模板添加在页面上 | ||
114 | var utils = new Utils(); | ||
115 | utils.appendModule('#trace_list'); | ||
116 | //渲染模板 | ||
117 | function renderTemplate(data, insertType){ | ||
118 | |||
119 | utils.innerTplHtml('trace_list_tpl', "#content", data, insertType); | ||
120 | } | ||
121 | function getData(locationCode){ | ||
122 | var requestUrl = "/a/StoreDetail/queryDrugBylocCode"; | ||
123 | var postData = {positionName:locationCode}; | ||
124 | mui.ajaxRequest(requestUrl,{ | ||
125 | type: 'POST', | ||
126 | data: postData, | ||
127 | success: function(data){ | ||
128 | |||
129 | if(data && data.code == 200){ | ||
130 | var resData = data.data; | ||
131 | var total = resData.totalPage; | ||
132 | if(resData.list.length == 0 || total == 0){ | ||
133 | var text = "此货位下没有商品!货位名称:"+locationCode+",请确认后扫描!"; | ||
134 | mui.alert(text,'提示','确定',function (e) {},'div'); | ||
135 | }else{ | ||
136 | var sendData = {locationCode:locationCode,list:resData.list}; | ||
137 | return renderTemplate(sendData,false); | ||
138 | } | ||
139 | }else if(data == null){ | ||
140 | var text = "该部门下不存在该货位!货位名称:"+locationCode+",请确认后扫描!"; | ||
141 | mui.alert(text,'提示','确定',function (e) {},'div') | ||
142 | }else{ | ||
143 | mui.alert(data.msg,'提示','确定',function (e) {},'div') | ||
144 | } | ||
145 | }, | ||
146 | error: function(xhr,type,errorThrown){ | ||
147 | console.log(xhr.responseText) | ||
148 | } | ||
149 | }); | ||
150 | } | ||
151 | (function($) { | ||
152 | |||
153 | $.init({ | ||
154 | beforeback:function(){ | ||
155 | |||
156 | var list = plus.webview.currentWebview().opener(); | ||
157 | mui.fire(list, 'refresh',{ getCountFlag: true }); | ||
158 | var cur= plus.webview.currentWebview(); | ||
159 | plus.webview.close(cur.id); | ||
160 | return true; | ||
161 | } | ||
162 | }); | ||
163 | $.plusReady(function(){ | ||
164 | |||
165 | //绑定点击事件(追溯) - 进入详情页 | ||
166 | $('#content').on('tap','.traceDrugs',function(event){ | ||
167 | var dataset = event.target.dataset; | ||
168 | common.openwin('traceDetail',{ params: JSON.stringify({dataset}) },false) | ||
169 | }) | ||
170 | |||
171 | }) | ||
172 | |||
173 | })(mui); | ||
174 | </script> | ||
175 | </body> | ||
176 | |||
177 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/trace/traceDetail.html
0 → 100644
1 | <!--库存查询 - 列表页 - yuweI--> | ||
2 | <!doctype html> | ||
3 | <html> | ||
4 | |||
5 | <head> | ||
6 | <meta charset="UTF-8"> | ||
7 | <title></title> | ||
8 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
9 | <link href="../../css/mui.min.css" rel="stylesheet" /> | ||
10 | <link href="../../css/themes.css" rel="stylesheet" /> | ||
11 | <link href="../../css/index_view.css" rel="stylesheet" /> | ||
12 | <link rel="import" href="./trace_detail_body.html" id="trace_detail_body"/> | ||
13 | <link rel="import" href="./trace_detail_head.html" id="trace_detail_head"/> | ||
14 | </head> | ||
15 | <style type="text/css"> | ||
16 | .head-title{ | ||
17 | color: #333; | ||
18 | font-weight: bold; | ||
19 | font-size: 18px; | ||
20 | } | ||
21 | #trace_scroll1 { | ||
22 | top: 146px; | ||
23 | z-index: 1; | ||
24 | } | ||
25 | #trace_scroll1 .mui-table-view:before{ | ||
26 | background: none!important; | ||
27 | } | ||
28 | #trace_scroll1 .mui-table-view .mui-table-view-cell{ | ||
29 | padding: 0; | ||
30 | } | ||
31 | </style> | ||
32 | <body> | ||
33 | <header class="mui-bar mui-bar-nav themes_bg_color"> | ||
34 | <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"> | ||
35 | <label class="mui-pull-right theme_back_font">返回</label> | ||
36 | </a> | ||
37 | <h1 class="mui-title themes_title">药品追溯详情</h1> | ||
38 | </header> | ||
39 | <div class="mui-content"> | ||
40 | <div class="mui-head" id="head-content"> | ||
41 | </div> | ||
42 | <div id="trace_scroll1" class="mui-scroll-wrapper"> | ||
43 | <div id='scroll' class="mui-scroll" > | ||
44 | <ul class="mui-table-view"> | ||
45 | <li class="mui-table-view-cell mui-tab" style="padding: 0;"></li> | ||
46 | </ul> | ||
47 | </div> | ||
48 | </div> | ||
49 | </div> | ||
50 | |||
51 | <script src="../../js/mui.js"></script> | ||
52 | <script src="../../js/mui.pullToRefresh.js"></script> | ||
53 | <script src="../../js/mui.pullToRefresh.material.js"></script> | ||
54 | <script src="../../js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
55 | <script src="../../js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
56 | <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script> | ||
57 | <script src="../../js/request.js" type="text/javascript" charset="utf-8"></script> | ||
58 | <script type="text/javascript"> | ||
59 | (function($) { | ||
60 | |||
61 | var deceleration = mui.os.ios?0.003:0.0009; | ||
62 | $('.mui-scroll-wrapper').scroll({ | ||
63 | bounce: true, | ||
64 | indicators: true, //是否显示滚动条 | ||
65 | deceleration:deceleration | ||
66 | }); | ||
67 | |||
68 | var utils = new Utils(); | ||
69 | utils.appendModule('#trace_detail_body');//import的id | ||
70 | utils.appendModule('#trace_detail_head'); | ||
71 | |||
72 | var page = 1, totalPage = undefined, pageSize = 15, isMore = true, query = {}; | ||
73 | |||
74 | /* 渲染模板 */ | ||
75 | function template(tplId,conId,data, insertType){ | ||
76 | //tpl的id,容器id,数据,true:新增,false:替换 | ||
77 | utils.innerTplHtml(tplId,conId,data,insertType); | ||
78 | } | ||
79 | |||
80 | headData = null; | ||
81 | var requestUrl = "/a/statics/medicineStanding/newDrugLedger"; | ||
82 | |||
83 | /* | ||
84 | * 下拉刷新 | ||
85 | * */ | ||
86 | function pulldownRefresh(){ | ||
87 | var self = this; | ||
88 | page = 1; | ||
89 | mui.ajaxRequest(requestUrl,{ | ||
90 | type: 'POST', | ||
91 | data: { | ||
92 | pageNo: page, | ||
93 | pageSize: pageSize, | ||
94 | paramsName:headData.ctmmtradename, | ||
95 | lot:headData.lot | ||
96 | }, | ||
97 | success: function(data){ | ||
98 | |||
99 | if(data.code === 200){ | ||
100 | var resData = data.data; | ||
101 | totalPage = resData.totalPage; | ||
102 | if(resData.list.length === 0 || (resData.list.length <= resData.pageSize && resData.pageNo === resData.totalPage)){ | ||
103 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
104 | self.endPullDownToRefresh(true); | ||
105 | isMore = false; | ||
106 | }else{ | ||
107 | self.endPullDownToRefresh(); | ||
108 | } | ||
109 | self.refresh(true); | ||
110 | return template('traceDetail_body', '.mui-tab',resData, false); | ||
111 | }else{ | ||
112 | mui.alert(data.msg,'提示','确定',function (e) {},'div') | ||
113 | } | ||
114 | }, | ||
115 | error: function(xhr,type,errorThrown){ | ||
116 | console.log(xhr.responseText) | ||
117 | } | ||
118 | }); | ||
119 | } | ||
120 | |||
121 | /* | ||
122 | |||
123 | * 上拉加载更多 | ||
124 | * */ | ||
125 | function pullupRefresh(){ | ||
126 | var self = this; | ||
127 | if(isMore){ | ||
128 | page++; | ||
129 | if( page <= totalPage ){ | ||
130 | mui.ajaxRequest(requestUrl,{ | ||
131 | type: 'POST', | ||
132 | data:{ | ||
133 | pageNo: page, | ||
134 | pageSize: pageSize, | ||
135 | paramsName:headData.ctmmtradename, | ||
136 | lot:headData.lot | ||
137 | }, | ||
138 | success: function(data){ | ||
139 | |||
140 | if(data.code == 200){ | ||
141 | var resData = data.data; | ||
142 | if(resData.pageNo === resData.totalPage){ | ||
143 | isMore = false; | ||
144 | self.endPullUpToRefresh(true); | ||
145 | }else{ | ||
146 | isMore = true; | ||
147 | self.endPullUpToRefresh(false); | ||
148 | self.refresh(true); | ||
149 | } | ||
150 | return template('traceDetail_body', '.mui-tab',resData, true); | ||
151 | }else{ | ||
152 | mui.alert(data.msg,'提示','确定',function (e) {},'div') | ||
153 | } | ||
154 | }, | ||
155 | error: function(xhr,type,errorThrown){ | ||
156 | console.log(xhr.responseText) | ||
157 | } | ||
158 | }); | ||
159 | } | ||
160 | }else{ | ||
161 | document.querySelector('.mui-pull-loading').innerHTML = '没有更多数据'; | ||
162 | self.endPullUpToRefresh(true); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | $.plusReady(function(){ | ||
167 | |||
168 | var self = plus.webview.currentWebview(); | ||
169 | var params = JSON.parse(self.params);//获得参数 | ||
170 | headData = params.dataset; | ||
171 | //循环初始化所有下拉刷新,上拉加载。 | ||
172 | $.each(document.querySelectorAll('.mui-scroll'), function(index, pullRefreshEl) { | ||
173 | $(pullRefreshEl).pullToRefresh({ | ||
174 | down: { | ||
175 | style:'circle', | ||
176 | contentdown : "下拉可以刷新", | ||
177 | contentover : "释放立即刷新", | ||
178 | contentrefresh : "正在刷新...", | ||
179 | callback: pulldownRefresh | ||
180 | }, | ||
181 | up: { | ||
182 | contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容 | ||
183 | contentnomore:'没有更多数据', | ||
184 | callback: pullupRefresh | ||
185 | } | ||
186 | }); | ||
187 | }); | ||
188 | //手动触发下拉一次 | ||
189 | mui(".mui-scroll").pullToRefresh().pullDownLoading(); | ||
190 | template('traceDetail_head', '#head-content',headData, false); | ||
191 | |||
192 | }); | ||
193 | |||
194 | |||
195 | })(mui); | ||
196 | </script> | ||
197 | |||
198 | </body> | ||
199 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
container/trace/trace_detail_body.html
0 → 100644
1 | <!-- 药瓶追溯详情显示 --> | ||
2 | <script type="text/html" id='traceDetail_body'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" data-id={{value.id}}> | ||
5 | <div class="am-card-header"> | ||
6 | <div class="am-card-header-content"> | ||
7 | <span style="font-size: 16px; color: rgb(51, 51, 51); font-weight: bold;">{{value.type}}</span> | ||
8 | </div> | ||
9 | <div class="am-card-header-extra"> | ||
10 | </div> | ||
11 | </div> | ||
12 | <div class="am-card-body"> | ||
13 | <div class="am-flexbox am-flexbox-align-center"> | ||
14 | <div class="am-flexbox-item"> | ||
15 | <span>{{ value.deptName }}</span> | ||
16 | </div> | ||
17 | </div> | ||
18 | <div class="am-flexbox am-flexbox-align-center"> | ||
19 | <div class="am-flexbox-item"> | ||
20 | <span>{{ value.orderNo }}</span> | ||
21 | </div> | ||
22 | <div class="am-flexbox-item"> | ||
23 | {{if value.inStockNum != null}} | ||
24 | <span style="color: #ec971f;font-size: 26px;width: 23%;display: inline-block;">{{value.inStockNum}}</span> | ||
25 | {{else if value.outStockNum != null}} | ||
26 | <span style="color: #ec971f;font-size: 26px;width: 23%;display: inline-block;">-{{value.outStockNum}}</span> | ||
27 | {{/if}} | ||
28 | <span style="display: inline-block;">{{value.unit}}</span> | ||
29 | </div> | ||
30 | </div> | ||
31 | <div class="am-flexbox am-flexbox-align-center"> | ||
32 | <div class="am-flexbox-item"> | ||
33 | <span>{{ value.createDate }}</span> | ||
34 | </div> | ||
35 | <div class="am-flexbox-item"> | ||
36 | 结存:<span>{{ value.balanceNum }}</span> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
42 | </div> | ||
43 | {{/each}} | ||
44 | </script> | ||
45 |
container/trace/trace_detail_head.html
0 → 100644
1 | <!-- 药品追溯详情显示 --> | ||
2 | <script type="text/html" id='traceDetail_head'> | ||
3 | <div class="am-card scrollList-item am-card-full" data-id="{{id}}"> | ||
4 | <div class="am-card-header"> | ||
5 | <div class="am-card-header-content"> | ||
6 | <span style="font-size: 16px; color: rgb(51, 51, 51); font-weight: bold;">{{ctmmtradename}}</span> | ||
7 | </div> | ||
8 | <div class="am-card-header-extra"> | ||
9 | <span>规格:{{ctmmspecification}}</span> | ||
10 | </div> | ||
11 | </div> | ||
12 | <div class="am-card-body"> | ||
13 | <div class="am-flexbox am-flexbox-align-center"> | ||
14 | <div class="am-flexbox-item"> | ||
15 | <span>生产批号:{{lot}}</span> | ||
16 | </div> | ||
17 | <div class="am-flexbox-itexm"> | ||
18 | <span>当前库存:{{totalquantity}}</span> | ||
19 | </div> | ||
20 | </div> | ||
21 | </div> | ||
22 | </div> | ||
23 | </script> | ||
24 |
container/trace/trace_list_tpl.html
0 → 100644
1 | <!-- 扫货下列显示 --> | ||
2 | <script type="text/html" id='trace_list_tpl'> | ||
3 | <div class="mui-card"> | ||
4 | <!--页眉,放置标题--> | ||
5 | <div class="mui-card-header">货位:{{locationCode}}</div> | ||
6 | <!--内容区--> | ||
7 | <div class="mui-card-content"> | ||
8 | <ul class="mui-table-view" id="list_warp"> | ||
9 | {{ each list value i}} | ||
10 | <li class="mui-table-view-cell mui-media"> | ||
11 | <div class="mui-media-body" style="padding: 3%;"> | ||
12 | <div class="mui-col-xs-12 mui-ellipsis mui-h4" style="font-weight: bold;margin-bottom: 8px;">{{value.ctmmTradeName}}</div> | ||
13 | <div class="mui-row"> | ||
14 | <span class="mui-col-xs-8 mui-ellipsis">规格:{{value.ctmmSpecification}}</span> | ||
15 | <span class="mui-col-xs-2" style="position: absolute;top: 25%;right: 2%;"> | ||
16 | <button style="height: 60px;box-shadow: 4px -4px 4px #888888;" type="button" | ||
17 | class="mui-btn mui-btn-warning traceDrugs" | ||
18 | data-ctmmTradeName="{{ value.ctmmTradeName }}" | ||
19 | data-ctmmSpecification="{{ value.ctmmSpecification }}" | ||
20 | data-lot="{{ value.lot }}" | ||
21 | data-totalQuantity="{{ value.totalQuantity }}" | ||
22 | data-id="{{ value.id?value.id:"" }}" >追溯</button> | ||
23 | </span> | ||
24 | <span class="mui-col-xs-10 mui-ellipsis">厂商:{{value.ctmmManufacturerName}}</span> | ||
25 | <span class="mui-col-xs-6 mui-ellipsis">单位:{{value.replanUnit}}</span> | ||
26 | <span class="mui-col-xs-6 mui-ellipsis">数量:{{value.totalQuantity}}</span> | ||
27 | <span class="mui-col-xs-8 mui-ellipsis">生产批号:{{value.lot}}</span> | ||
28 | <span class="mui-col-xs-6 mui-ellipsis">生产日期:{{value.productDate}}</span> | ||
29 | <span class="mui-col-xs-6 mui-ellipsis">有效期至:{{value.validEndDate}}</span> | ||
30 | </p> | ||
31 | </div> | ||
32 | </li> | ||
33 | {{/each}} | ||
34 | </ul> | ||
35 | </div> | ||
36 | </div> | ||
37 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
css/check.css
0 → 100644
1 | /*盘点*/ | ||
2 | .gird{ | ||
3 | display: flex; | ||
4 | justify-content:flex-start; | ||
5 | align-content: center; | ||
6 | align-items: start; | ||
7 | padding: 5px 10px; | ||
8 | } | ||
9 | .gird-label{ | ||
10 | width:20%; | ||
11 | display: inline-block; | ||
12 | padding-top: 10px; | ||
13 | } | ||
14 | .gird-button{ | ||
15 | width: 19%; | ||
16 | margin: 0 1%; | ||
17 | } | ||
18 | .gird-content{ | ||
19 | width: 80%; | ||
20 | } | ||
21 | .mui-content .mui-btn.mui-btn-block{ | ||
22 | margin:0 2%; | ||
23 | font-size: 14px; | ||
24 | width: 95%; | ||
25 | padding: 10px 0; | ||
26 | background: #f2a11c; | ||
27 | color: #fff; | ||
28 | border: 0; | ||
29 | } | ||
30 | .mui-content .mui-btn.mui-btn-block.btn{ | ||
31 | background: #fff; | ||
32 | color: #666; | ||
33 | margin-bottom:12px; | ||
34 | width: 100%; | ||
35 | margin-left: 0; | ||
36 | } | ||
37 | #List .mui-table-view-cell{ | ||
38 | padding: 0; | ||
39 | margin-bottom: 15px; | ||
40 | } | ||
41 | .search_head{ | ||
42 | padding: 0; | ||
43 | } | ||
44 | .mui-search.search_head.mui-active::before{ | ||
45 | content: ''; | ||
46 | } | ||
47 | .search_head .mui-placeholder{ | ||
48 | text-align: left; | ||
49 | padding-left: 18px; | ||
50 | top: 0; | ||
51 | } | ||
52 | .search_head .mui-placeholder .mui-icon-search::before{ | ||
53 | content: ''; | ||
54 | } | ||
55 | #ulList_start,#ulList_end{ | ||
56 | position: absolute; | ||
57 | width: 100%; | ||
58 | top: 50px; | ||
59 | left: 0; | ||
60 | z-index: 9; | ||
61 | background-color: #efeff4; | ||
62 | } | ||
63 | .search_ullist_start,.search_ullist_end{ | ||
64 | z-index: 2; | ||
65 | list-style: none; | ||
66 | position: relative; | ||
67 | margin-top: 0; | ||
68 | margin-bottom: 0; | ||
69 | padding-left: 0; | ||
70 | list-style: none; | ||
71 | width: 60%; | ||
72 | margin-left: 20%; | ||
73 | border-radius: 4px; | ||
74 | background-color: #FFFFFF; | ||
75 | } | ||
76 | .search_ullist_start_li,.search_ullist_end_li{ | ||
77 | position: relative; | ||
78 | overflow: hidden; | ||
79 | margin-bottom: 1px; | ||
80 | padding: 10px 36px; | ||
81 | border-radius: 4px; | ||
82 | border-bottom: solid 1px #C7C7CC; | ||
83 | } | ||
84 | #textarea{ | ||
85 | border: 1px solid rgba(0,0,0,.2); | ||
86 | border-radius: 4px; | ||
87 | background-color: #fff; | ||
88 | padding: 10px 15px; | ||
89 | margin-bottom: 0; | ||
90 | -webkit-appearance: none; | ||
91 | -webkit-user-select: none; | ||
92 | } |
css/home.css
0 → 100644
1 | .home-card-wrapper { | ||
2 | margin-top: 16px; | ||
3 | background: #fff; | ||
4 | padding: 18px 16px; | ||
5 | } | ||
6 | .mui-table-view{ | ||
7 | width: 100%; | ||
8 | } | ||
9 | .home-card-content { | ||
10 | /*padding-top: 18px;*/ | ||
11 | display: flex; | ||
12 | justify-content: center; | ||
13 | } | ||
14 | .home-card-content .home-card-item{ | ||
15 | position: relative; | ||
16 | } | ||
17 | .home-card-title { | ||
18 | border-left: 6px solid #EC971F; | ||
19 | font-size: 18px; | ||
20 | padding-left: 13px; | ||
21 | margin-bottom: 6px; | ||
22 | } | ||
23 | |||
24 | .home-card-content .home-card-text { | ||
25 | font-family: PingFang-SC-Regular; | ||
26 | text-align: center; | ||
27 | font-size: 14px; | ||
28 | color: rgba(0, 0, 0, .65); | ||
29 | } | ||
30 | |||
31 | .mui-media-body { | ||
32 | width: 200px !!important; | ||
33 | } | ||
34 | .main-title{ | ||
35 | text-align: center; | ||
36 | /*height: 78px;*/ | ||
37 | padding: 15px 0; | ||
38 | } | ||
39 | .main-title .tip-title{ | ||
40 | font-size: 18px; | ||
41 | font-weight: bold; | ||
42 | margin-bottom: 12px; | ||
43 | } | ||
44 | #tipDetail .mui-table-view-cell{ | ||
45 | padding: 0; | ||
46 | } | ||
47 | #tipDetail .mui-table-view-cell .mui-input-row{ | ||
48 | display: flex; | ||
49 | align-items: center; | ||
50 | } | ||
51 | #tipDetail .mui-table-view-cell .mui-input-row label{ | ||
52 | width: 25%; | ||
53 | } | ||
54 | #tipDetail .mui-table-view-cell .mui-input-row label::after{ | ||
55 | content: ":"; | ||
56 | } | ||
57 | |||
58 | #tipDetail .mui-table-view-cell .detailRow_content{ | ||
59 | color: #000000; | ||
60 | } | ||
61 | /* 数字角标 */ | ||
62 | .badge{ | ||
63 | position: absolute; | ||
64 | top: 0; | ||
65 | right: -14px; | ||
66 | } | ||
67 | .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{ | ||
68 | border-bottom: 2px solid #f2a11c; | ||
69 | } |
css/icons-extra.css
0 → 100644
1 | @font-face { | ||
2 | font-family: MuiiconSpread; | ||
3 | font-weight: normal; | ||
4 | font-style: normal; | ||
5 | src: url('../fonts/mui-icons-extra.ttf') format('truetype'); /* iOS 4.1- */ | ||
6 | } | ||
7 | .mui-icon-extra | ||
8 | { | ||
9 | font-family: MuiiconSpread; | ||
10 | font-size: 24px; | ||
11 | font-weight: normal; | ||
12 | font-style: normal; | ||
13 | line-height: 1; | ||
14 | display: inline-block; | ||
15 | text-decoration: none; | ||
16 | -webkit-font-smoothing: antialiased; | ||
17 | } | ||
18 | .mui-icon-extra-cold:before { content: "\e500"; } | ||
19 | .mui-icon-extra-share:before { content: "\e200"; } | ||
20 | .mui-icon-extra-class:before { content: "\e118"; } | ||
21 | .mui-icon-extra-custom:before { content: "\e117"; } | ||
22 | .mui-icon-extra-new:before { content: "\e103"; } | ||
23 | .mui-icon-extra-card:before { content: "\e104"; } | ||
24 | .mui-icon-extra-grech:before { content: "\e105"; } | ||
25 | .mui-icon-extra-trend:before { content: "\e106"; } | ||
26 | .mui-icon-extra-filter:before { content: "\e207"; } | ||
27 | .mui-icon-extra-holiday:before { content: "\e300"; } | ||
28 | .mui-icon-extra-cart:before { content: "\e107"; } | ||
29 | .mui-icon-extra-heart:before { content: "\e180"; } | ||
30 | .mui-icon-extra-computer:before { content: "\e600"; } | ||
31 | .mui-icon-extra-express:before { content: "\e108"; } | ||
32 | .mui-icon-extra-gift:before { content: "\e109"; } | ||
33 | .mui-icon-extra-gold:before { content: "\e102"; } | ||
34 | .mui-icon-extra-lamp:before { content: "\e601"; } | ||
35 | .mui-icon-extra-rank:before { content: "\e110"; } | ||
36 | .mui-icon-extra-notice:before { content: "\e111"; } | ||
37 | .mui-icon-extra-sweep:before { content: "\e202"; } | ||
38 | .mui-icon-extra-arrowleftcricle:before { content: "\e401"; } | ||
39 | .mui-icon-extra-dictionary:before { content: "\e602"; } | ||
40 | .mui-icon-extra-heart-filled:before { content: "\e119"; } | ||
41 | .mui-icon-extra-xiaoshuo:before { content: "\e607"; } | ||
42 | .mui-icon-extra-top:before { content: "\e403"; } | ||
43 | .mui-icon-extra-people:before { content: "\e203"; } | ||
44 | .mui-icon-extra-topic:before { content: "\e603"; } | ||
45 | .mui-icon-extra-hotel:before { content: "\e301"; } | ||
46 | .mui-icon-extra-like:before { content: "\e206"; } | ||
47 | .mui-icon-extra-regist:before { content: "\e201"; } | ||
48 | .mui-icon-extra-order:before { content: "\e113"; } | ||
49 | .mui-icon-extra-alipay:before { content: "\e114"; } | ||
50 | .mui-icon-extra-find:before { content: "\e400"; } | ||
51 | .mui-icon-extra-arrowrightcricle:before { content: "\e402"; } | ||
52 | .mui-icon-extra-calendar:before { content: "\e115"; } | ||
53 | .mui-icon-extra-prech:before { content: "\e116"; } | ||
54 | .mui-icon-extra-cate:before { content: "\e501"; } | ||
55 | .mui-icon-extra-comment:before { content: "\e209"; } | ||
56 | .mui-icon-extra-at:before { content: "\e208"; } | ||
57 | .mui-icon-extra-addpeople:before { content: "\e204"; } | ||
58 | .mui-icon-extra-peoples:before { content: "\e205"; } | ||
59 | .mui-icon-extra-calc:before { content: "\e101"; } | ||
60 | .mui-icon-extra-classroom:before { content: "\e604"; } | ||
61 | .mui-icon-extra-phone:before { content: "\e404"; } | ||
62 | .mui-icon-extra-university:before { content: "\e605"; } | ||
63 | .mui-icon-extra-outline:before { content: "\e606"; } |
css/index_view.css
0 → 100644
1 | @media (-webkit-min-device-pixel-ratio: 2), not all, (min-resolution: 2dppx) | ||
2 | html:not([data-scale]) .am-list-body { | ||
3 | border-bottom: none; | ||
4 | } | ||
5 | @media (-webkit-min-device-pixel-ratio: 2), not all, (min-resolution: 2dppx) | ||
6 | html:not([data-scale]) .am-list-body { | ||
7 | border-top: none; | ||
8 | } | ||
9 | html{ | ||
10 | line-height: 1.15; | ||
11 | } | ||
12 | body { | ||
13 | background-color: #f5f5f9; | ||
14 | font-size: 14px; | ||
15 | } | ||
16 | .am-list-body { | ||
17 | position: relative; | ||
18 | background-color: #fff; | ||
19 | border-top: 1PX solid #ddd; | ||
20 | border-bottom: 1PX solid #ddd; | ||
21 | } | ||
22 | *, *:before, *:after { | ||
23 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
24 | } | ||
25 | -webkit-overflow-scrolling:touch; | ||
26 | -webkit-touch-callout:none; | ||
27 | |||
28 | @media (-webkit-min-device-pixel-ratio: 2), not all, (min-resolution: 2dppx) | ||
29 | html:not([data-scale]) .am-list-body::before { | ||
30 | content: ''; | ||
31 | position: absolute; | ||
32 | background-color: #ddd; | ||
33 | display: block; | ||
34 | z-index: 1; | ||
35 | top: 0; | ||
36 | right: auto; | ||
37 | bottom: auto; | ||
38 | left: 0; | ||
39 | width: 100%; | ||
40 | height: 1PX; | ||
41 | -webkit-transform-origin: 50% 50%; | ||
42 | -ms-transform-origin: 50% 50%; | ||
43 | transform-origin: 50% 50%; | ||
44 | -webkit-transform: scaleY(0.5); | ||
45 | -ms-transform: scaleY(0.5); | ||
46 | transform: scaleY(0.5); | ||
47 | } | ||
48 | @media (-webkit-min-device-pixel-ratio: 2), not all, (min-resolution: 2dppx) | ||
49 | html:not([data-scale]) .am-list-body::after { | ||
50 | content: ''; | ||
51 | position: absolute; | ||
52 | background-color: #ddd; | ||
53 | display: block; | ||
54 | z-index: 1; | ||
55 | top: auto; | ||
56 | right: auto; | ||
57 | bottom: 0; | ||
58 | left: 0; | ||
59 | width: 100%; | ||
60 | height: 1PX; | ||
61 | -webkit-transform-origin: 50% 100%; | ||
62 | -ms-transform-origin: 50% 100%; | ||
63 | transform-origin: 50% 100%; | ||
64 | -webkit-transform: scaleY(0.5); | ||
65 | -ms-transform: scaleY(0.5); | ||
66 | transform: scaleY(0.5); | ||
67 | } | ||
68 | html:not([data-scale]) .scrollList-item .am-card-footer::before { | ||
69 | content: ''; | ||
70 | position: absolute; | ||
71 | background-color: #ddd; | ||
72 | display: block; | ||
73 | z-index: 1; | ||
74 | top: 0; | ||
75 | right: auto; | ||
76 | bottom: auto; | ||
77 | left: 0; | ||
78 | width: 100%; | ||
79 | height: 1PX; | ||
80 | -webkit-transform-origin: 50% 50%; | ||
81 | -ms-transform-origin: 50% 50%; | ||
82 | transform-origin: 50% 50%; | ||
83 | -webkit-transform: scaleY(0.5); | ||
84 | -ms-transform: scaleY(0.5); | ||
85 | transform: scaleY(0.5); | ||
86 | } | ||
87 | input{ | ||
88 | -webkit-appearance: none; | ||
89 | margin-bottom: 0 !important; | ||
90 | height: 30px !important; | ||
91 | } | ||
92 | input,button,select,textarea{ | ||
93 | padding: 0; | ||
94 | font: inherit; | ||
95 | outline: none; | ||
96 | border: 0; | ||
97 | border-radius: 0; | ||
98 | -webkit-tap-highlight-color: transparent; | ||
99 | appearance: none; | ||
100 | -webkit-appearance: none; | ||
101 | background: transparent; | ||
102 | line-height: normal; | ||
103 | box-sizing: border-box; | ||
104 | -webkit-writing-mode: horizontal-tb; | ||
105 | outline: 0; | ||
106 | resize: none; | ||
107 | color: inherit; | ||
108 | white-space: pre-wrap; | ||
109 | word-wrap: break-word; | ||
110 | -webkit-rtl-ordering: logical; | ||
111 | user-select: none; | ||
112 | } | ||
113 | button{ | ||
114 | user-select: none !important; | ||
115 | flex-direction: row !important; | ||
116 | } | ||
117 | |||
118 | input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance: none !important; margin: 0;} | ||
119 | .check_wrapper{ | ||
120 | padding-top: 0 !important; | ||
121 | } | ||
122 | .home-card-wrapper { | ||
123 | margin-top: 16px; | ||
124 | background: #fff; | ||
125 | padding: 18px 16px; | ||
126 | } | ||
127 | |||
128 | .home-card-content .home-card-item{ | ||
129 | position: relative; | ||
130 | } | ||
131 | .home-card-title { | ||
132 | border-left: 6px solid #EC971F; | ||
133 | font-size: 18px; | ||
134 | padding-left: 13px; | ||
135 | margin-bottom: 6px; | ||
136 | } | ||
137 | |||
138 | .check_wrapper #pullrefresh .mui-table-view-cell{ | ||
139 | padding: 0; | ||
140 | } | ||
141 | .mui-input-row input{ | ||
142 | height: 40px !important; | ||
143 | } | ||
144 | .am-tabs * { | ||
145 | -webkit-box-sizing: border-box; | ||
146 | box-sizing: border-box; | ||
147 | } | ||
148 | .am-card.am-card-full { | ||
149 | position: relative; | ||
150 | border-top: 1PX solid #ddd; | ||
151 | border-bottom: 1PX solid #ddd; | ||
152 | } | ||
153 | .am-card { | ||
154 | min-height: 96px; | ||
155 | padding-bottom: 6px; | ||
156 | display: -ms-flexbox; | ||
157 | display: flex; | ||
158 | -ms-flex-direction: column; | ||
159 | flex-direction: column; | ||
160 | background-color: #fff; | ||
161 | } | ||
162 | .scrollList-item { | ||
163 | padding: 3px; | ||
164 | border-bottom: 1px solid #ccc; | ||
165 | } | ||
166 | .scrollList-item .am-card-header { | ||
167 | padding: 9px 15px 5px !important; | ||
168 | } | ||
169 | .am-card-header { | ||
170 | display: -ms-flexbox; | ||
171 | display: flex; | ||
172 | -ms-flex-align: center; | ||
173 | align-items: center; | ||
174 | font-size: 14px; | ||
175 | padding: 9px 15px; | ||
176 | } | ||
177 | .am-card-header-content { | ||
178 | -ms-flex: 2 1; | ||
179 | flex: 2 1; | ||
180 | text-align: left; | ||
181 | color: #000; | ||
182 | display: -ms-flexbox; | ||
183 | display: flex; | ||
184 | -ms-flex-align: center; | ||
185 | align-items: center; | ||
186 | } | ||
187 | .am-card-header-extra { | ||
188 | -ms-flex: 1 1; | ||
189 | flex: 1 1; | ||
190 | text-align: right; | ||
191 | font-size: 14px; | ||
192 | color: #888; | ||
193 | } | ||
194 | .am-card-body { | ||
195 | position: relative; | ||
196 | /*border-top: 1PX solid #ddd;*/ | ||
197 | padding: 15px 15px 6px; | ||
198 | font-size: 14px; | ||
199 | color: #333; | ||
200 | min-height: 40px; | ||
201 | -ms-flex: 1 1; | ||
202 | flex: 1 1; | ||
203 | } | ||
204 | .am-card-body { | ||
205 | padding:12px 15px!important; | ||
206 | } | ||
207 | #scroll .am-card-body{ | ||
208 | padding: 5px 15px !important; | ||
209 | } | ||
210 | |||
211 | .am-flexbox.am-flexbox-align-center { | ||
212 | -ms-flex-align: center; | ||
213 | align-items: center; | ||
214 | } | ||
215 | .scrollList-item .am-flexbox { | ||
216 | min-height: 30px; | ||
217 | line-height: 30px; | ||
218 | } | ||
219 | .detail-header-flex{ | ||
220 | display: flex; | ||
221 | position: relative; | ||
222 | -ms-flex-align: center; | ||
223 | align-items: center; | ||
224 | justify-content: space-between; | ||
225 | padding: 8px 10px 0; | ||
226 | } | ||
227 | .detail-header-flex .am-action{ | ||
228 | align-items: center; | ||
229 | } | ||
230 | .detail-header-flex .am-action a{ | ||
231 | color: #f2a11c !important; | ||
232 | } | ||
233 | .am-flexbox { | ||
234 | text-align: left; | ||
235 | overflow: hidden; | ||
236 | display: -ms-flexbox; | ||
237 | display: flex; | ||
238 | -ms-flex-align: center; | ||
239 | align-items: center; | ||
240 | } | ||
241 | .am-card-header-content{ | ||
242 | font-size: 14px; | ||
243 | color: rgb(51, 51, 51); | ||
244 | |||
245 | } | ||
246 | .am-flexbox .am-flexbox-item,.am-card-header-content{ | ||
247 | white-space: nowrap; | ||
248 | overflow: hidden; | ||
249 | text-overflow: ellipsis; | ||
250 | } | ||
251 | .am-flexbox .am-last-flexItem{ | ||
252 | overflow: visible; | ||
253 | margin-left: -50px; | ||
254 | } | ||
255 | .scrollList-item .am-card-footer{ | ||
256 | position: relative; | ||
257 | } | ||
258 | .am-card-footer{ | ||
259 | font-size: 14px; | ||
260 | color: #888; | ||
261 | padding: 5px 15px; | ||
262 | display: -ms-flexbox; | ||
263 | display: flex; | ||
264 | } | ||
265 | .am-card-footer-content, .am-card-footer-extra{ | ||
266 | flex: 1 1; | ||
267 | } | ||
268 | .am-card-footer-extra{ | ||
269 | text-align: right; | ||
270 | } | ||
271 | .am-card-footer-extra button{ | ||
272 | padding: 3px 6px !important; | ||
273 | line-height: 1.5 !important; | ||
274 | } | ||
275 | .am-flexbox .am-flexbox-item:first-child { | ||
276 | margin-left: 0; | ||
277 | } | ||
278 | .am-flexbox .am-flexbox-item { | ||
279 | -webkit-box-sizing: border-box; | ||
280 | box-sizing: border-box; | ||
281 | -ms-flex: 1 1; | ||
282 | flex: 1 1; | ||
283 | margin-left: 8px; | ||
284 | min-width: 10px; | ||
285 | } | ||
286 | .am-list-item.am-input-item { | ||
287 | height: 36px; | ||
288 | padding-left: 15px; | ||
289 | } | ||
290 | .scrollList-item .am-list-item.am-input-item { | ||
291 | padding-left: 0 !important; | ||
292 | } | ||
293 | .am-list-line:after, .scrollList-item .am-list-line:after, .am-list-body div:not(:last-child) .am-list-line { | ||
294 | background: none !important; | ||
295 | border: 0 !important; | ||
296 | } | ||
297 | .am-list-item .am-list-line { | ||
298 | position: relative; | ||
299 | display: -ms-flexbox; | ||
300 | display: flex; | ||
301 | -ms-flex: 1 1; | ||
302 | flex: 1 1; | ||
303 | -ms-flex-item-align: stretch; | ||
304 | align-self: stretch; | ||
305 | padding-right: 8px; | ||
306 | overflow: hidden; | ||
307 | } | ||
308 | .am-list-item.am-list-item-middle .am-list-line { | ||
309 | -ms-flex-align: center; | ||
310 | align-items: center; | ||
311 | } | ||
312 | .am-list-item .am-input-label.am-input-label-4 { | ||
313 | width: 70px; | ||
314 | } | ||
315 | .am-list-item .am-input-label { | ||
316 | color: #000; | ||
317 | font-size: 14px; | ||
318 | margin-left: 0; | ||
319 | margin-right: 5px; | ||
320 | text-align: left; | ||
321 | white-space: nowrap; | ||
322 | /*overflow: hidden;*/ | ||
323 | padding: 2px 0; | ||
324 | } | ||
325 | .am-list-item .am-input-control { | ||
326 | font-size: 14px; | ||
327 | -ms-flex: 1 1; | ||
328 | flex: 1 1; | ||
329 | border-bottom: solid 1px #EEEEEE; | ||
330 | } | ||
331 | .am-list-item .am-input-control input { | ||
332 | color: #000; | ||
333 | font-size: 14px; | ||
334 | -webkit-appearance: none; | ||
335 | -moz-appearance: none; | ||
336 | appearance: none; | ||
337 | /*width: 100%;*/ | ||
338 | width: 102px; | ||
339 | padding: 2px 0; | ||
340 | border: 0; | ||
341 | background-color: transparent; | ||
342 | line-height: 1; | ||
343 | -webkit-box-sizing: border-box; | ||
344 | box-sizing: border-box; | ||
345 | } | ||
346 | .font-danger{ | ||
347 | color: red; | ||
348 | font-size: 12px; | ||
349 | } | ||
350 | .font-warning{ | ||
351 | color: #f5222d !important; | ||
352 | } | ||
353 | |||
354 | |||
355 | .inline-Input{ | ||
356 | width: 57% !important; | ||
357 | height: 20px !important; | ||
358 | padding: 0px !important; | ||
359 | margin-bottom: 0 !important; | ||
360 | } | ||
361 | .am-result{ | ||
362 | text-align: center; | ||
363 | } | ||
364 | .am-result .am-result-title { | ||
365 | margin-top: 15px; | ||
366 | line-height: 1; | ||
367 | } | ||
368 | |||
369 | .am-result .am-result-title, .am-result .am-result-message { | ||
370 | font-size: 21px; | ||
371 | color: #000; | ||
372 | padding-left: 15px; | ||
373 | padding-right: 15px; | ||
374 | } | ||
375 | .am-result .am-result-message { | ||
376 | margin-top: 9px; | ||
377 | line-height: 1.5; | ||
378 | font-size: 16px; | ||
379 | color: #888; | ||
380 | } | ||
381 | .ground-tag{ | ||
382 | padding: 3px 6px; | ||
383 | color: #fff; | ||
384 | margin-left: 8px; | ||
385 | } | ||
386 | .before-ground{ | ||
387 | background-color: #F2A11C; | ||
388 | } | ||
389 | .hasGround{ | ||
390 | background-color: limegreen; | ||
391 | color: #fff; | ||
392 | } | ||
393 | .editInput{ | ||
394 | color: #ccc; | ||
395 | } | ||
396 | .select_actualStore{ | ||
397 | margin: 0 !important; | ||
398 | padding: 0 !important; | ||
399 | } | ||
400 | .checkInputDate{ | ||
401 | float: none !important; | ||
402 | border-bottom: solid 1px #CCCCCC !important; | ||
403 | width: 25% !important; | ||
404 | border-radius: 0 !important; | ||
405 | } | ||
406 | .search-ullist{ | ||
407 | z-index: 2; | ||
408 | background-color: #efeff4; | ||
409 | border: solid 1px #F5F5F9; | ||
410 | border-radius: 2px; | ||
411 | list-style: none; | ||
412 | position: absolute; | ||
413 | margin-top: 0; | ||
414 | margin-bottom: 0; | ||
415 | padding-left: 0; | ||
416 | list-style: none; | ||
417 | width: 100%; | ||
418 | top: 49px | ||
419 | } | ||
420 | .search-ullist-li{ | ||
421 | position: relative; | ||
422 | overflow: hidden; | ||
423 | padding: 7px 30px; | ||
424 | } | ||
425 | .search-ullist-li::before{ | ||
426 | font-family: Muiicons; | ||
427 | content: '\e466'; | ||
428 | position: absolute; | ||
429 | left: 10px; | ||
430 | } | ||
431 | /* 批量 处理 */ | ||
432 | .batch-wrapper{ | ||
433 | display: flex; | ||
434 | align-items: center; | ||
435 | border-bottom: solid 1px #C7C7CC; | ||
436 | } | ||
437 | .batch-wrapper:last-child{ | ||
438 | border-bottom: none; | ||
439 | } | ||
440 | .fix_bottom-wraper{ | ||
441 | position: fixed; | ||
442 | z-index: 10; | ||
443 | bottom: 0; | ||
444 | height: 60px; | ||
445 | width: 100%; | ||
446 | display: flex; | ||
447 | background: #FFFFFF; | ||
448 | align-items: center; | ||
449 | } | ||
450 | .fix-bottom-content{ | ||
451 | display: flex; | ||
452 | align-items: center; | ||
453 | flex: 1 1; | ||
454 | height: 100%; | ||
455 | border-top: solid 1px #F2A11C; | ||
456 | } | ||
457 | .fix-bottom-extra{ | ||
458 | background: #F2A11C; | ||
459 | display: flex; | ||
460 | text-align: center; | ||
461 | width: 120px; | ||
462 | height: 100%; | ||
463 | align-items: center; | ||
464 | justify-content: space-around; | ||
465 | color: #fff; | ||
466 | font-size: 18px; | ||
467 | } | ||
468 | /* | ||
469 | 批量处理按钮点击颜色 | ||
470 | * */ | ||
471 | .fix-bottom-extra:active{ | ||
472 | color: #FFFFFF; | ||
473 | } | ||
474 | /*更多筛选*/ | ||
475 | .moreCondition{ | ||
476 | position: absolute; | ||
477 | display: none; | ||
478 | top: 0; | ||
479 | right: 0; | ||
480 | width: 50%; | ||
481 | font-size: 16px; | ||
482 | z-index: 2; | ||
483 | border-left: solid 1px #c8c7cc; | ||
484 | } | ||
485 | .moreCondition .mui-table-view-cell::after{ | ||
486 | background-color: #fff; | ||
487 | } |
css/mui.css
0 → 100644
This diff could not be displayed because it is too large.
css/mui.min.css
0 → 100644
1 | /*! | ||
2 | * ===================================================== | ||
3 | * Mui v3.7.2 (http://dev.dcloud.net.cn/mui) | ||
4 | * ===================================================== | ||
5 | *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{font:inherit;margin:0;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{margin:0 2px;padding:.35em .625em .75em;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}*{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;outline:0;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}body{font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:17px;line-height:21px;color:#000;background-color:#efeff4;-webkit-overflow-scrolling:touch}a{text-decoration:none;color:#007aff}a:active{color:#0062cc}.mui-content{background-color:#efeff4;-webkit-overflow-scrolling:touch}.mui-bar-nav~.mui-content{padding-top:44px}.mui-bar-nav~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{top:44px}.mui-bar-header-secondary~.mui-content{padding-top:88px}.mui-bar-header-secondary~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{top:88px}.mui-bar-footer~.mui-content{padding-bottom:44px}.mui-bar-footer~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{bottom:44px}.mui-bar-footer-secondary~.mui-content{padding-bottom:88px}.mui-bar-footer-secondary~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{bottom:88px}.mui-bar-tab~.mui-content{padding-bottom:50px}.mui-bar-tab~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{bottom:50px}.mui-bar-footer-secondary-tab~.mui-content{padding-bottom:94px}.mui-bar-footer-secondary-tab~.mui-content.mui-scroll-wrapper .mui-scrollbar-vertical{bottom:94px}.mui-content-padded{margin:10px}.mui-inline{display:inline-block;vertical-align:top}.mui-block{display:block!important}.mui-visibility{visibility:visible!important}.mui-hidden{display:none!important}.mui-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mui-ellipsis-2{display:-webkit-box;overflow:hidden;white-space:normal!important;text-overflow:ellipsis;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical}.mui-table{display:table;width:100%;table-layout:fixed}.mui-table-cell{position:relative;display:table-cell}.mui-text-left{text-align:left!important}.mui-text-center{text-align:center!important}.mui-text-justify{text-align:justify!important}.mui-text-right{text-align:right!important}.mui-pull-left{float:left}.mui-pull-right{float:right}.mui-list-unstyled{padding-left:0;list-style:none}.mui-list-inline{margin-left:-5px;padding-left:0;list-style:none}.mui-list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.mui-clearfix:after,.mui-clearfix:before{display:table;content:' '}.mui-clearfix:after{clear:both}.mui-bg-primary{background-color:#007aff}.mui-bg-positive{background-color:#4cd964}.mui-bg-negative{background-color:#dd524d}.mui-error{margin:88px 35px;padding:10px;border-radius:6px;background-color:#bbb}.mui-subtitle{font-size:15px}h1,h2,h3,h4,h5,h6{line-height:1;margin-top:5px;margin-bottom:5px}.mui-h1,h1{font-size:36px}.mui-h2,h2{font-size:30px}.mui-h3,h3{font-size:24px}.mui-h4,h4{font-size:18px}.mui-h5,h5{font-size:14px;font-weight:400;color:#8f8f94}.mui-h6,h6{font-size:12px;font-weight:400;color:#8f8f94}p{font-size:14px;margin-top:0;margin-bottom:10px;color:#8f8f94}.mui-row:after,.mui-row:before{display:table;content:' '}.mui-row:after{clear:both}.mui-col-sm-1,.mui-col-sm-10,.mui-col-sm-11,.mui-col-sm-12,.mui-col-sm-2,.mui-col-sm-3,.mui-col-sm-4,.mui-col-sm-5,.mui-col-sm-6,.mui-col-sm-7,.mui-col-sm-8,.mui-col-sm-9,.mui-col-xs-1,.mui-col-xs-10,.mui-col-xs-11,.mui-col-xs-12,.mui-col-xs-2,.mui-col-xs-3,.mui-col-xs-4,.mui-col-xs-5,.mui-col-xs-6,.mui-col-xs-7,.mui-col-xs-8,.mui-col-xs-9{position:relative;min-height:1px}.mui-row>[class*=mui-col-]{float:left}.mui-col-xs-12{width:100%}.mui-col-xs-11{width:91.66666667%}.mui-col-xs-10{width:83.33333333%}.mui-col-xs-9{width:75%}.mui-col-xs-8{width:66.66666667%}.mui-col-xs-7{width:58.33333333%}.mui-col-xs-6{width:50%}.mui-col-xs-5{width:41.66666667%}.mui-col-xs-4{width:33.33333333%}.mui-col-xs-3{width:25%}.mui-col-xs-2{width:16.66666667%}.mui-col-xs-1{width:8.33333333%}@media (min-width:400px){.mui-col-sm-12{width:100%}.mui-col-sm-11{width:91.66666667%}.mui-col-sm-10{width:83.33333333%}.mui-col-sm-9{width:75%}.mui-col-sm-8{width:66.66666667%}.mui-col-sm-7{width:58.33333333%}.mui-col-sm-6{width:50%}.mui-col-sm-5{width:41.66666667%}.mui-col-sm-4{width:33.33333333%}.mui-col-sm-3{width:25%}.mui-col-sm-2{width:16.66666667%}.mui-col-sm-1{width:8.33333333%}}.mui-scroll-wrapper{position:absolute;z-index:2;top:0;bottom:0;left:0;overflow:hidden;width:100%}.mui-scroll{position:absolute;z-index:1;width:100%}.mui-scrollbar{position:absolute;z-index:9998;overflow:hidden;-webkit-transition:500ms;transition:500ms;transform:translateZ(0px);pointer-events:none;opacity:0}.mui-scrollbar-vertical{top:0;right:1px;bottom:2px;width:4px}.mui-scrollbar-vertical .mui-scrollbar-indicator{width:100%}.mui-scrollbar-horizontal{right:2px;bottom:0;left:2px;height:4px}.mui-scrollbar-horizontal .mui-scrollbar-indicator{height:100%}.mui-scrollbar-indicator{position:absolute;display:block;box-sizing:border-box;-webkit-transition:.01s cubic-bezier(.1,.57,.1,1);transition:.01s cubic-bezier(.1,.57,.1,1);transform:translate(0px,0) translateZ(0px);border:1px solid rgba(255,255,255,.80196);border-radius:2px;background:rgba(0,0,0,.39804)}.mui-plus-pullrefresh .mui-fullscreen .mui-scroll-wrapper .mui-scroll-wrapper,.mui-plus-pullrefresh .mui-fullscreen .mui-slider-group .mui-scroll-wrapper{position:absolute;top:0;bottom:0;left:0;overflow:hidden;width:100%}.mui-plus-pullrefresh .mui-fullscreen .mui-scroll-wrapper .mui-scroll,.mui-plus-pullrefresh .mui-fullscreen .mui-slider-group .mui-scroll{position:absolute;width:100%}.mui-plus-pullrefresh .mui-scroll-wrapper,.mui-plus-pullrefresh .mui-slider-group{position:static;top:auto;bottom:auto;left:auto;overflow:auto;width:auto}.mui-plus-pullrefresh .mui-slider-group{overflow:visible}.mui-plus-pullrefresh .mui-scroll{position:static;width:auto}.mui-off-canvas-wrap .mui-bar{position:absolute!important;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-box-shadow:none;box-shadow:none}.mui-off-canvas-wrap{position:relative;z-index:1;overflow:hidden;width:100%;height:100%}.mui-off-canvas-wrap .mui-inner-wrap{position:relative;z-index:1;width:100%;height:100%}.mui-off-canvas-wrap .mui-inner-wrap.mui-transitioning{-webkit-transition:-webkit-transform 350ms;transition:transform 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-wrap .mui-inner-wrap .mui-off-canvas-left{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mui-off-canvas-wrap .mui-inner-wrap .mui-off-canvas-right{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mui-off-canvas-wrap.mui-active{overflow:hidden;height:100%}.mui-off-canvas-wrap.mui-active .mui-off-canvas-backdrop{position:absolute;z-index:998;top:0;right:0;bottom:0;left:0;display:block;transition:background 350ms cubic-bezier(.165,.84,.44,1);background:rgba(0,0,0,.4);box-shadow:-4px 0 4px rgba(0,0,0,.5),4px 0 4px rgba(0,0,0,.5);-webkit-tap-highlight-color:transparent}.mui-off-canvas-wrap.mui-slide-in .mui-off-canvas-right{z-index:10000!important;-webkit-transform:translate3d(100%,0,0)}.mui-off-canvas-wrap.mui-slide-in .mui-off-canvas-left{z-index:10000!important;-webkit-transform:translate3d(-100%,0,0)}.mui-off-canvas-left,.mui-off-canvas-right{position:absolute;z-index:-1;top:0;bottom:0;visibility:hidden;box-sizing:content-box;width:70%;min-height:100%;background:#333;-webkit-overflow-scrolling:touch}.mui-off-canvas-left.mui-transitioning,.mui-off-canvas-right.mui-transitioning{-webkit-transition:-webkit-transform 350ms cubic-bezier(.165,.84,.44,1);transition:transform 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-left{left:0}.mui-off-canvas-right{right:0}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable{background-color:#333}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right{width:80%;-webkit-transform:scale(.8);transform:scale(.8);opacity:.1}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left.mui-transitioning,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right.mui-transitioning{-webkit-transition:-webkit-transform 350ms cubic-bezier(.165,.84,.44,1),opacity 350ms cubic-bezier(.165,.84,.44,1);transition:transform 350ms cubic-bezier(.165,.84,.44,1),opacity 350ms cubic-bezier(.165,.84,.44,1)}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-left{-webkit-transform-origin:-100%;transform-origin:-100%}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable>.mui-off-canvas-right{-webkit-transform-origin:200%;transform-origin:200%}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-inner-wrap{-webkit-transform:scale(.8);transform:scale(.8)}.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-off-canvas-left,.mui-off-canvas-wrap:not(.mui-slide-in).mui-scalable.mui-active>.mui-off-canvas-right{-webkit-transform:scale(1);transform:scale(1);opacity:1}.mui-loading .mui-spinner{display:block;margin:0 auto}.mui-spinner{display:inline-block;width:24px;height:24px;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:spinner-spin 1s step-end infinite;animation:spinner-spin 1s step-end infinite}.mui-spinner:after{display:block;width:100%;height:100%;content:'';background-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox=\'0 0 120 120\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'><defs><line id=\'l\' x1=\'60\' x2=\'60\' y1=\'7\' y2=\'27\' stroke=\'%236c6c6c\' stroke-width=\'11\' stroke-linecap=\'round\'/></defs><g><use xlink:href=\'%23l\' opacity=\'.27\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(30 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(60 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(90 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(120 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(150 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.37\' transform=\'rotate(180 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.46\' transform=\'rotate(210 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.56\' transform=\'rotate(240 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.66\' transform=\'rotate(270 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.75\' transform=\'rotate(300 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.85\' transform=\'rotate(330 60,60)\'/></g></svg>');background-repeat:no-repeat;background-position:50%;background-size:100%}.mui-spinner-white:after{background-image:url('data:image/svg+xml;charset=utf-8,<svg viewBox=\'0 0 120 120\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'><defs><line id=\'l\' x1=\'60\' x2=\'60\' y1=\'7\' y2=\'27\' stroke=\'%23fff\' stroke-width=\'11\' stroke-linecap=\'round\'/></defs><g><use xlink:href=\'%23l\' opacity=\'.27\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(30 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(60 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(90 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(120 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.27\' transform=\'rotate(150 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.37\' transform=\'rotate(180 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.46\' transform=\'rotate(210 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.56\' transform=\'rotate(240 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.66\' transform=\'rotate(270 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.75\' transform=\'rotate(300 60,60)\'/><use xlink:href=\'%23l\' opacity=\'.85\' transform=\'rotate(330 60,60)\'/></g></svg>')}@-webkit-keyframes spinner-spin{0%{-webkit-transform:rotate(0deg)}8.33333333%{-webkit-transform:rotate(30deg)}16.66666667%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.33333333%{-webkit-transform:rotate(120deg)}41.66666667%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.33333333%{-webkit-transform:rotate(210deg)}66.66666667%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.33333333%{-webkit-transform:rotate(300deg)}91.66666667%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spinner-spin{0%{transform:rotate(0deg)}8.33333333%{transform:rotate(30deg)}16.66666667%{transform:rotate(60deg)}25%{transform:rotate(90deg)}33.33333333%{transform:rotate(120deg)}41.66666667%{transform:rotate(150deg)}50%{transform:rotate(180deg)}58.33333333%{transform:rotate(210deg)}66.66666667%{transform:rotate(240deg)}75%{transform:rotate(270deg)}83.33333333%{transform:rotate(300deg)}91.66666667%{transform:rotate(330deg)}100%{transform:rotate(360deg)}}.mui-btn,button,input[type=button],input[type=reset],input[type=submit]{font-size:14px;font-weight:400;line-height:1.42;position:relative;display:inline-block;margin-bottom:0;padding:6px 12px;cursor:pointer;-webkit-transition:all;transition:all;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:.2s;transition-duration:.2s;text-align:center;vertical-align:top;white-space:nowrap;color:#333;border:1px solid #ccc;border-radius:3px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:#fff;background-clip:padding-box}.mui-btn.mui-active:enabled,.mui-btn:enabled:active,button.mui-active:enabled,button:enabled:active,input[type=button].mui-active:enabled,input[type=button]:enabled:active,input[type=reset].mui-active:enabled,input[type=reset]:enabled:active,input[type=submit].mui-active:enabled,input[type=submit]:enabled:active{color:#fff;background-color:#929292}.mui-btn.mui-disabled,.mui-btn:disabled,button.mui-disabled,button:disabled,input[type=button].mui-disabled,input[type=button]:disabled,input[type=reset].mui-disabled,input[type=reset]:disabled,input[type=submit].mui-disabled,input[type=submit]:disabled{opacity:.6}.mui-btn-blue,.mui-btn-primary,input[type=submit]{color:#fff;border:1px solid #007aff;background-color:#007aff}.mui-btn-blue.mui-active:enabled,.mui-btn-blue:enabled:active,.mui-btn-primary.mui-active:enabled,.mui-btn-primary:enabled:active,input[type=submit].mui-active:enabled,input[type=submit]:enabled:active{color:#fff;border:1px solid #0062cc;background-color:#0062cc}.mui-btn-green,.mui-btn-positive,.mui-btn-success{color:#fff;border:1px solid #4cd964;background-color:#4cd964}.mui-btn-green.mui-active:enabled,.mui-btn-green:enabled:active,.mui-btn-positive.mui-active:enabled,.mui-btn-positive:enabled:active,.mui-btn-success.mui-active:enabled,.mui-btn-success:enabled:active{color:#fff;border:1px solid #2ac845;background-color:#2ac845}.mui-btn-warning,.mui-btn-yellow{color:#fff;border:1px solid #f0ad4e;background-color:#f0ad4e}.mui-btn-warning.mui-active:enabled,.mui-btn-warning:enabled:active,.mui-btn-yellow.mui-active:enabled,.mui-btn-yellow:enabled:active{color:#fff;border:1px solid #ec971f;background-color:#ec971f}.mui-btn-danger,.mui-btn-negative,.mui-btn-red{color:#fff;border:1px solid #dd524d;background-color:#dd524d}.mui-btn-danger.mui-active:enabled,.mui-btn-danger:enabled:active,.mui-btn-negative.mui-active:enabled,.mui-btn-negative:enabled:active,.mui-btn-red.mui-active:enabled,.mui-btn-red:enabled:active{color:#fff;border:1px solid #cf2d28;background-color:#cf2d28}.mui-btn-purple,.mui-btn-royal{color:#fff;border:1px solid #8a6de9;background-color:#8a6de9}.mui-btn-purple.mui-active:enabled,.mui-btn-purple:enabled:active,.mui-btn-royal.mui-active:enabled,.mui-btn-royal:enabled:active{color:#fff;border:1px solid #6641e2;background-color:#6641e2}.mui-btn-grey{color:#fff;border:1px solid #c7c7cc;background-color:#c7c7cc}.mui-btn-grey.mui-active:enabled,.mui-btn-grey:enabled:active{color:#fff;border:1px solid #acacb4;background-color:#acacb4}.mui-btn-outlined{background-color:transparent}.mui-btn-outlined.mui-btn-blue,.mui-btn-outlined.mui-btn-primary{color:#007aff}.mui-btn-outlined.mui-btn-green,.mui-btn-outlined.mui-btn-positive,.mui-btn-outlined.mui-btn-success{color:#4cd964}.mui-btn-outlined.mui-btn-warning,.mui-btn-outlined.mui-btn-yellow{color:#f0ad4e}.mui-btn-outlined.mui-btn-danger,.mui-btn-outlined.mui-btn-negative,.mui-btn-outlined.mui-btn-red{color:#dd524d}.mui-btn-outlined.mui-btn-purple,.mui-btn-outlined.mui-btn-royal{color:#8a6de9}.mui-btn-outlined.mui-btn-blue:enabled:active,.mui-btn-outlined.mui-btn-danger:enabled:active,.mui-btn-outlined.mui-btn-green:enabled:active,.mui-btn-outlined.mui-btn-negative:enabled:active,.mui-btn-outlined.mui-btn-positive:enabled:active,.mui-btn-outlined.mui-btn-primary:enabled:active,.mui-btn-outlined.mui-btn-purple:enabled:active,.mui-btn-outlined.mui-btn-red:enabled:active,.mui-btn-outlined.mui-btn-royal:enabled:active,.mui-btn-outlined.mui-btn-success:enabled:active,.mui-btn-outlined.mui-btn-warning:enabled:active,.mui-btn-outlined.mui-btn-yellow:enabled:active{color:#fff}.mui-btn-link{padding-top:6px;padding-bottom:6px;color:#007aff;border:0;background-color:transparent}.mui-btn-link.mui-active:enabled,.mui-btn-link:enabled:active{color:#0062cc;background-color:transparent}.mui-btn-block{font-size:18px;display:block;width:100%;margin-bottom:10px;padding:15px 0}.mui-btn .mui-badge{font-size:14px;margin:-2px -4px -2px 4px;background-color:rgba(0,0,0,.15)}.mui-btn .mui-badge-inverted,.mui-btn:enabled:active .mui-badge-inverted{background-color:transparent}.mui-btn-negative:enabled:active .mui-badge-inverted,.mui-btn-positive:enabled:active .mui-badge-inverted,.mui-btn-primary:enabled:active .mui-badge-inverted{color:#fff}.mui-btn-block .mui-badge{position:absolute;right:0;margin-right:10px}.mui-btn .mui-icon{font-size:inherit}.mui-btn.mui-icon{font-size:14px;line-height:1.42}.mui-btn.mui-fab{width:56px;height:56px;padding:16px;border-radius:50%;outline:0}.mui-btn.mui-fab.mui-btn-mini{width:40px;height:40px;padding:8px}.mui-btn.mui-fab .mui-icon{font-size:24px;line-height:24px;width:24px;height:24px}.mui-btn .mui-spinner{width:14px;height:14px;vertical-align:text-bottom}.mui-btn-block .mui-spinner{width:22px;height:22px}.mui-bar{position:fixed;z-index:10;right:0;left:0;height:44px;padding-right:10px;padding-left:10px;border-bottom:0;background-color:#f7f7f7;-webkit-box-shadow:0 0 1px rgba(0,0,0,.85);box-shadow:0 0 1px rgba(0,0,0,.85);-webkit-backface-visibility:hidden;backface-visibility:hidden}.mui-bar .mui-title{right:40px;left:40px;display:inline-block;overflow:hidden;width:auto;margin:0;text-overflow:ellipsis}.mui-bar .mui-backdrop{background:0 0}.mui-bar-header-secondary{top:44px}.mui-bar-footer{bottom:0}.mui-bar-footer-secondary{bottom:44px}.mui-bar-footer-secondary-tab{bottom:50px}.mui-bar-footer,.mui-bar-footer-secondary,.mui-bar-footer-secondary-tab{border-top:0}.mui-bar-transparent{top:0;background-color:rgba(247,247,247,0);-webkit-box-shadow:none;box-shadow:none}.mui-bar-nav{top:0;-webkit-box-shadow:0 1px 6px #ccc;box-shadow:0 1px 6px #ccc}.mui-bar-nav~.mui-content .mui-anchor{display:block;visibility:hidden;height:45px;margin-top:-45px}.mui-bar-nav.mui-bar .mui-icon{margin-right:-10px;margin-left:-10px;padding-right:10px;padding-left:10px}.mui-title{font-size:17px;font-weight:500;line-height:44px;position:absolute;display:block;width:100%;margin:0 -10px;padding:0;text-align:center;white-space:nowrap;color:#000}.mui-title a{color:inherit}.mui-bar-tab{bottom:0;display:table;width:100%;height:50px;padding:0;table-layout:fixed;border-top:0;border-bottom:0;-webkit-touch-callout:none}.mui-bar-tab .mui-tab-item{display:table-cell;overflow:hidden;width:1%;height:50px;text-align:center;vertical-align:middle;white-space:nowrap;text-overflow:ellipsis;color:#929292}.mui-bar-tab .mui-tab-item.mui-active{color:#007aff}.mui-bar-tab .mui-tab-item .mui-icon{top:3px;width:24px;height:24px;padding-top:0;padding-bottom:0}.mui-bar-tab .mui-tab-item .mui-icon~.mui-tab-label{font-size:11px;display:block;overflow:hidden;text-overflow:ellipsis}.mui-bar-tab .mui-tab-item .mui-icon:active{background:0 0}.mui-focusin>.mui-bar-header-secondary,.mui-focusin>.mui-bar-nav{position:absolute}.mui-focusin>.mui-bar~.mui-content{padding-bottom:0}.mui-bar .mui-btn{font-weight:400;position:relative;z-index:20;top:7px;margin-top:0;padding:6px 12px 7px}.mui-bar .mui-btn.mui-pull-right{margin-left:10px}.mui-bar .mui-btn.mui-pull-left{margin-right:10px}.mui-bar .mui-btn-link{font-size:16px;line-height:44px;top:0;padding:0;color:#007aff;border:0}.mui-bar .mui-btn-link.mui-active,.mui-bar .mui-btn-link:active{color:#0062cc}.mui-bar .mui-btn-block{font-size:16px;top:6px;margin-bottom:0;padding:5px 0}.mui-bar .mui-btn-nav.mui-pull-left{margin-left:-5px}.mui-bar .mui-btn-nav.mui-pull-left .mui-icon-left-nav{margin-right:-3px}.mui-bar .mui-btn-nav.mui-pull-right{margin-right:-5px}.mui-bar .mui-btn-nav.mui-pull-right .mui-icon-right-nav{margin-left:-3px}.mui-bar .mui-btn-nav:active{opacity:.3}.mui-bar .mui-icon{font-size:24px;position:relative;z-index:20;padding-top:10px;padding-bottom:10px}.mui-bar .mui-icon:active{opacity:.3}.mui-bar .mui-btn .mui-icon{top:1px;margin:0;padding:0}.mui-bar .mui-title .mui-icon{margin:0;padding:0}.mui-bar .mui-title .mui-icon.mui-icon-caret{top:4px;margin-left:-5px}.mui-bar input[type=search]{height:29px;margin:6px 0}.mui-bar .mui-input-row .mui-btn{padding:12px 10px}.mui-bar .mui-search:before{margin-top:-10px}.mui-bar .mui-input-row .mui-input-clear~.mui-icon-clear,.mui-bar .mui-input-row .mui-input-speech~.mui-icon-speech{top:0;right:12px}.mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-clear~.mui-icon-clear,.mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-speech~.mui-icon-speech{top:0;right:0}.mui-bar .mui-segmented-control{top:7px;width:auto;margin:0 auto}.mui-bar.mui-bar-header-secondary .mui-segmented-control{top:0}.mui-badge{font-size:12px;line-height:1;display:inline-block;padding:3px 6px;color:#333;border-radius:100px;background-color:rgba(0,0,0,.15)}.mui-badge.mui-badge-inverted{padding:0 5px 0 0;color:#929292;background-color:transparent}.mui-badge-blue,.mui-badge-primary{color:#fff;background-color:#007aff}.mui-badge-blue.mui-badge-inverted,.mui-badge-primary.mui-badge-inverted{color:#007aff;background-color:transparent}.mui-badge-green,.mui-badge-success{color:#fff;background-color:#4cd964}.mui-badge-green.mui-badge-inverted,.mui-badge-success.mui-badge-inverted{color:#4cd964;background-color:transparent}.mui-badge-warning,.mui-badge-yellow{color:#fff;background-color:#f0ad4e}.mui-badge-warning.mui-badge-inverted,.mui-badge-yellow.mui-badge-inverted{color:#f0ad4e;background-color:transparent}.mui-badge-danger,.mui-badge-red{color:#fff;background-color:#dd524d}.mui-badge-danger.mui-badge-inverted,.mui-badge-red.mui-badge-inverted{color:#dd524d;background-color:transparent}.mui-badge-purple,.mui-badge-royal{color:#fff;background-color:#8a6de9}.mui-badge-purple.mui-badge-inverted,.mui-badge-royal.mui-badge-inverted{color:#8a6de9;background-color:transparent}.mui-icon .mui-badge{font-size:10px;line-height:1.4;position:absolute;top:-2px;left:100%;margin-left:-10px;padding:1px 5px;color:#fff;background:red}.mui-card{font-size:14px;position:relative;overflow:hidden;margin:10px;border-radius:2px;background-color:#fff;background-clip:padding-box;box-shadow:0 1px 2px rgba(0,0,0,.3)}.mui-content>.mui-card:first-child{margin-top:15px}.mui-card .mui-input-group .mui-input-row:last-child:after,.mui-card .mui-input-group .mui-input-row:last-child:before,.mui-card .mui-input-group:after,.mui-card .mui-input-group:before{height:0}.mui-card .mui-table-view{margin-bottom:0;border-top:0;border-bottom:0;border-radius:6px}.mui-card .mui-table-view .mui-table-view-cell:first-child,.mui-card .mui-table-view .mui-table-view-divider:first-child{top:0;border-top-left-radius:6px;border-top-right-radius:6px}.mui-card .mui-table-view .mui-table-view-cell:last-child,.mui-card .mui-table-view .mui-table-view-divider:last-child{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.mui-card .mui-table-view:after,.mui-card .mui-table-view:before,.mui-card>.mui-table-view>.mui-table-view-cell:last-child:after,.mui-card>.mui-table-view>.mui-table-view-cell:last-child:before{height:0}.mui-card-footer,.mui-card-header{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;min-height:44px;padding:10px 15px;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-card-footer .mui-card-link,.mui-card-header .mui-card-link{line-height:44px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;height:44px;margin-top:-10px;margin-bottom:-10px;-webkit-transition-duration:.3s;transition-duration:.3s;text-decoration:none;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-card-footer:before,.mui-card-header:after{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-card-header{font-size:17px;border-radius:2px 2px 0 0}.mui-card-header:after{top:auto;bottom:0}.mui-card-header>img:first-child{font-size:0;line-height:0;float:left;width:34px;height:34px}.mui-card-footer{color:#6d6d72;border-radius:0 0 2px 2px}.mui-card-content{font-size:14px;position:relative}.mui-card-content-inner{position:relative;padding:15px}.mui-card-media{vertical-align:bottom;color:#fff;background-position:center;background-size:cover}.mui-card-header.mui-card-media{display:block;padding:10px}.mui-card-header.mui-card-media .mui-media-body{font-size:14px;font-weight:500;line-height:17px;margin-bottom:0;margin-left:44px;color:#333}.mui-card-header.mui-card-media .mui-media-body p{font-size:13px;margin-bottom:0}.mui-table-view{position:relative;margin-top:0;margin-bottom:0;padding-left:0;list-style:none;background-color:#fff}.mui-table-view:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view:before{position:absolute;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc;top:-1px}.mui-table-view-icon .mui-table-view-cell .mui-navigate-right .mui-icon{font-size:20px;margin-top:-1px;margin-right:5px;margin-left:-5px}.mui-table-view-icon .mui-table-view-cell:after{left:40px}.mui-table-view-chevron .mui-table-view-cell{padding-right:65px}.mui-table-view-chevron .mui-table-view-cell>a:not(.mui-btn){margin-right:-65px}.mui-table-view-radio .mui-table-view-cell{padding-right:65px}.mui-table-view-radio .mui-table-view-cell>a:not(.mui-btn){margin-right:-65px}.mui-table-view-radio .mui-table-view-cell .mui-navigate-right:after{font-size:30px;font-weight:600;right:9px;content:'';color:#007aff}.mui-table-view-radio .mui-table-view-cell.mui-selected .mui-navigate-right:after{content:'\e472'}.mui-table-view-inverted{color:#fff;background:#333}.mui-table-view-inverted:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#222}.mui-table-view-inverted .mui-table-view-cell.mui-active,.mui-table-view-inverted .mui-table-view-cell>a:not(.mui-btn).mui-active{background-color:#242424}.mui-table-view-cell{position:relative;overflow:hidden;padding:11px 15px;-webkit-touch-callout:none}.mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-cell.mui-checkbox input[type=checkbox],.mui-table-view-cell.mui-radio input[type=radio]{top:8px}.mui-table-view-cell.mui-checkbox.mui-left,.mui-table-view-cell.mui-radio.mui-left{padding-left:58px}.mui-table-view-cell.mui-active{background-color:#eee}.mui-table-view-cell:last-child:after,.mui-table-view-cell:last-child:before{height:0}.mui-table-view-cell>a:not(.mui-btn){position:relative;display:block;overflow:hidden;margin:-11px -15px;padding:inherit;white-space:nowrap;text-overflow:ellipsis;color:inherit}.mui-table-view-cell>a:not(.mui-btn).mui-active{background-color:#eee}.mui-table-view-cell p{margin-bottom:0}.mui-table-view-cell.mui-transitioning>.mui-slider-handle,.mui-table-view-cell.mui-transitioning>.mui-slider-left .mui-btn,.mui-table-view-cell.mui-transitioning>.mui-slider-right .mui-btn{-webkit-transition:-webkit-transform 300ms ease;transition:transform 300ms ease}.mui-table-view-cell.mui-active>.mui-slider-handle{background-color:#eee}.mui-table-view-cell>.mui-slider-handle{position:relative;background-color:#fff}.mui-table-view-cell>.mui-slider-handle .mui-navigate-right:after,.mui-table-view-cell>.mui-slider-handle.mui-navigate-right:after{right:0}.mui-table-view-cell>.mui-slider-handle,.mui-table-view-cell>.mui-slider-left .mui-btn,.mui-table-view-cell>.mui-slider-right .mui-btn{-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease}.mui-table-view-cell>.mui-slider-left,.mui-table-view-cell>.mui-slider-right{position:absolute;top:0;display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.mui-table-view-cell>.mui-slider-left>.mui-btn,.mui-table-view-cell>.mui-slider-right>.mui-btn{position:relative;left:0;display:-webkit-box;display:-webkit-flex;display:flex;padding:0 30px;color:#fff;border:0;border-radius:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.mui-table-view-cell>.mui-slider-left>.mui-btn:after,.mui-table-view-cell>.mui-slider-right>.mui-btn:after{position:absolute;z-index:-1;top:0;width:600%;height:100%;content:'';background:inherit}.mui-table-view-cell>.mui-slider-left>.mui-btn.mui-icon,.mui-table-view-cell>.mui-slider-right>.mui-btn.mui-icon{font-size:30px}.mui-table-view-cell>.mui-slider-right{right:0;-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease;-webkit-transform:translateX(100%);transform:translateX(100%)}.mui-table-view-cell>.mui-slider-left{left:0;-webkit-transition:-webkit-transform 0ms ease;transition:transform 0ms ease;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mui-table-view-cell>.mui-slider-left>.mui-btn:after{right:100%;margin-right:-1px}.mui-table-view-divider{font-weight:500;position:relative;margin-top:-1px;margin-left:0;padding-top:6px;padding-bottom:6px;padding-left:15px;color:#999;background-color:#fafafa}.mui-table-view-divider:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-divider:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view .mui-media,.mui-table-view .mui-media-body{overflow:hidden}.mui-table-view .mui-media-large .mui-media-object{line-height:80px;max-width:80px;height:80px}.mui-table-view .mui-media .mui-subtitle{color:#000}.mui-table-view .mui-media-object{line-height:42px;max-width:42px;height:42px}.mui-table-view .mui-media-object.mui-pull-left{margin-right:10px}.mui-table-view .mui-media-object.mui-pull-right{margin-left:10px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object{line-height:29px;max-width:29px;height:29px;margin:-4px 0}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object img{line-height:29px;max-width:29px;height:29px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object.mui-pull-left{margin-right:10px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-object .mui-icon{font-size:29px}.mui-table-view .mui-table-view-cell.mui-media-icon .mui-media-body:after{position:absolute;right:0;bottom:0;left:55px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view .mui-table-view-cell.mui-media-icon:after{height:0!important}.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view{display:block}.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view:after,.mui-table-view.mui-unfold .mui-table-view-cell.mui-collapse .mui-table-view:before{height:0!important}.mui-table-view.mui-unfold .mui-table-view-cell.mui-media-icon.mui-collapse .mui-media-body:after{position:absolute;right:0;bottom:0;left:70px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view-cell>.mui-badge,.mui-table-view-cell>.mui-btn,.mui-table-view-cell>.mui-switch,.mui-table-view-cell>a>.mui-badge,.mui-table-view-cell>a>.mui-btn,.mui-table-view-cell>a>.mui-switch{position:absolute;top:50%;right:15px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mui-table-view-cell .mui-navigate-right>.mui-badge,.mui-table-view-cell .mui-navigate-right>.mui-btn,.mui-table-view-cell .mui-navigate-right>.mui-switch,.mui-table-view-cell .mui-push-left>.mui-badge,.mui-table-view-cell .mui-push-left>.mui-btn,.mui-table-view-cell .mui-push-left>.mui-switch,.mui-table-view-cell .mui-push-right>.mui-badge,.mui-table-view-cell .mui-push-right>.mui-btn,.mui-table-view-cell .mui-push-right>.mui-switch,.mui-table-view-cell>a .mui-navigate-right>.mui-badge,.mui-table-view-cell>a .mui-navigate-right>.mui-btn,.mui-table-view-cell>a .mui-navigate-right>.mui-switch,.mui-table-view-cell>a .mui-push-left>.mui-badge,.mui-table-view-cell>a .mui-push-left>.mui-btn,.mui-table-view-cell>a .mui-push-left>.mui-switch,.mui-table-view-cell>a .mui-push-right>.mui-badge,.mui-table-view-cell>a .mui-push-right>.mui-btn,.mui-table-view-cell>a .mui-push-right>.mui-switch{right:35px}.mui-content>.mui-table-view:first-child{margin-top:15px}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell:last-child:after,.mui-table-view-cell.mui-collapse .mui-table-view:after,.mui-table-view-cell.mui-collapse .mui-table-view:before{height:0}.mui-table-view-cell.mui-collapse>.mui-navigate-right:after,.mui-table-view-cell.mui-collapse>.mui-push-right:after{content:'\e581'}.mui-table-view-cell.mui-collapse.mui-active{margin-top:-1px}.mui-table-view-cell.mui-collapse.mui-active .mui-collapse-content,.mui-table-view-cell.mui-collapse.mui-active .mui-table-view{display:block}.mui-table-view-cell.mui-collapse.mui-active>.mui-navigate-right:after,.mui-table-view-cell.mui-collapse.mui-active>.mui-push-right:after{content:'\e580'}.mui-table-view-cell.mui-collapse.mui-active .mui-table-view-cell>a:not(.mui-btn).mui-active{margin-left:-31px;padding-left:47px}.mui-table-view-cell.mui-collapse .mui-collapse-content{position:relative;display:none;overflow:hidden;margin:11px -15px -11px;padding:8px 15px;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease;background:#fff}.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-input-group,.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-slider{width:auto;height:auto;margin:-8px -15px}.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-slider{margin:-8px -16px}.mui-table-view-cell.mui-collapse .mui-table-view{display:none;margin-top:11px;margin-right:-15px;margin-bottom:-11px;margin-left:-15px;border:0}.mui-table-view-cell.mui-collapse .mui-table-view.mui-table-view-chevron{margin-right:-65px}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell{padding-left:31px;background-position:31px 100%}.mui-table-view-cell.mui-collapse .mui-table-view .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:30px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-table-view.mui-grid-view{font-size:0;display:block;width:100%;padding:0 10px 10px 0;white-space:normal}.mui-table-view.mui-grid-view .mui-table-view-cell{font-size:17px;display:inline-block;margin-right:-4px;padding:10px 0 0 14px;text-align:center;vertical-align:middle;background:0 0}.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-object{width:100%;max-width:100%;height:auto}.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn){margin:-10px 0 0 -14px}.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn).mui-active,.mui-table-view.mui-grid-view .mui-table-view-cell>a:not(.mui-btn):active{background:0 0}.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-body{font-size:15px;line-height:15px;display:block;width:100%;height:15px;margin-top:8px;text-overflow:ellipsis;color:#333}.mui-table-view.mui-grid-view .mui-table-view-cell:after,.mui-table-view.mui-grid-view .mui-table-view-cell:before{height:0}.mui-grid-view.mui-grid-9{margin:0;padding:0;border-top:1px solid #eee;border-left:1px solid #eee;background-color:#f2f2f2}.mui-grid-view.mui-grid-9:after,.mui-grid-view.mui-grid-9:before{display:table;content:' '}.mui-grid-view.mui-grid-9:after{clear:both;position:static}.mui-grid-view.mui-grid-9 .mui-table-view-cell{margin:0;padding:11px 15px;vertical-align:top;border-right:1px solid #eee;border-bottom:1px solid #eee}.mui-grid-view.mui-grid-9 .mui-table-view-cell.mui-active{background-color:#eee}.mui-grid-view.mui-grid-9 .mui-table-view-cell>a:not(.mui-btn){margin:0;padding:10px 0}.mui-grid-view.mui-grid-9:before{height:0}.mui-grid-view.mui-grid-9 .mui-media{color:#797979}.mui-grid-view.mui-grid-9 .mui-media .mui-icon{font-size:2.4em;position:relative}.mui-slider-cell{position:relative}.mui-slider-cell>.mui-slider-handle{z-index:1}.mui-slider-cell>.mui-slider-left,.mui-slider-cell>.mui-slider-right{position:absolute;z-index:0;top:0;bottom:0}.mui-slider-cell>.mui-slider-left{left:0}.mui-slider-cell>.mui-slider-right{right:0}input,select,textarea{font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:17px;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent}input:focus,select:focus,textarea:focus{-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;-webkit-user-modify:read-write-plaintext-only}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{line-height:21px;width:100%;height:40px;margin-bottom:15px;padding:10px 15px;-webkit-user-select:text;border:1px solid rgba(0,0,0,.2);border-radius:3px;outline:0;background-color:#fff;-webkit-appearance:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}input[type=search]{font-size:16px;-webkit-box-sizing:border-box;box-sizing:border-box;height:34px;text-align:center;border:0;border-radius:6px;background-color:rgba(0,0,0,.1)}input[type=search]:focus{text-align:left}textarea{height:auto;resize:none}select{font-size:14px;height:auto;margin-top:1px;border:0!important;background-color:#fff}select:focus{-webkit-user-modify:read-only}.mui-input-group{position:relative;padding:0;border:0;background-color:#fff}.mui-input-group:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-group:before{position:absolute;top:0;right:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-group input,.mui-input-group textarea{margin-bottom:0;border:0;border-radius:0;background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.mui-input-group input[type=search]{background:0 0}.mui-input-group input:last-child{background-image:none}.mui-input-row{clear:left;overflow:hidden}.mui-input-row select{font-size:17px;height:37px;padding:0}.mui-input-row .mui-btn+input,.mui-input-row label+input,.mui-input-row:last-child{background:0 0}.mui-input-group .mui-input-row{height:40px}.mui-input-group .mui-input-row:after{position:absolute;right:0;bottom:0;left:15px;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-input-row label{font-family:'Helvetica Neue',Helvetica,sans-serif;line-height:1.1;float:left;width:35%;padding:11px 15px}.mui-input-row label~input,.mui-input-row label~select,.mui-input-row label~textarea{float:right;width:65%;margin-bottom:0;padding-left:0;border:0}.mui-input-row .mui-btn{line-height:1.1;float:right;width:15%;padding:10px 15px}.mui-input-row .mui-btn~input,.mui-input-row .mui-btn~select,.mui-input-row .mui-btn~textarea{float:left;width:85%;margin-bottom:0;padding-left:0;border:0}.mui-button-row{position:relative;padding-top:5px;text-align:center}.mui-input-group .mui-button-row{height:45px}.mui-input-row{position:relative}.mui-input-row.mui-input-range{overflow:visible;padding-right:20px}.mui-input-row .mui-inline{padding:8px 0}.mui-input-row .mui-input-clear~.mui-icon-clear,.mui-input-row .mui-input-password~.mui-icon-eye,.mui-input-row .mui-input-speech~.mui-icon-speech{font-size:20px;position:absolute;z-index:1;top:10px;right:0;width:38px;height:38px;text-align:center;color:#999}.mui-input-row .mui-input-clear~.mui-icon-clear.mui-active,.mui-input-row .mui-input-password~.mui-icon-eye.mui-active,.mui-input-row .mui-input-speech~.mui-icon-speech.mui-active{color:#007aff}.mui-input-row .mui-input-speech~.mui-icon-speech{font-size:24px;top:8px}.mui-input-row .mui-input-clear~.mui-icon-clear~.mui-icon-speech{display:none}.mui-input-row .mui-input-clear~.mui-icon-clear.mui-hidden~.mui-icon-speech{display:inline-block}.mui-input-row .mui-icon-speech~.mui-placeholder{right:38px}.mui-input-row.mui-search .mui-icon-clear{top:7px}.mui-input-row.mui-search .mui-icon-speech{top:5px}.mui-checkbox,.mui-radio{position:relative}.mui-checkbox label,.mui-radio label{display:inline-block;float:none;width:100%;padding-right:58px}.mui-checkbox.mui-left input[type=checkbox],.mui-radio.mui-left input[type=radio]{left:20px}.mui-checkbox.mui-left label,.mui-radio.mui-left label{padding-right:15px;padding-left:58px}.mui-checkbox input[type=checkbox],.mui-radio input[type=radio]{position:absolute;top:4px;right:20px;display:inline-block;width:28px;height:26px;border:0;outline:0!important;background-color:transparent;-webkit-appearance:none}.mui-checkbox input[type=checkbox][disabled]:before,.mui-radio input[type=radio][disabled]:before{opacity:.3}.mui-checkbox input[type=checkbox]:before,.mui-radio input[type=radio]:before{font-family:Muiicons;font-size:28px;font-weight:400;line-height:1;text-decoration:none;color:#aaa;border-radius:0;background:0 0;-webkit-font-smoothing:antialiased}.mui-checkbox input[type=checkbox]:checked:before,.mui-radio input[type=radio]:checked:before{color:#007aff}.mui-checkbox label.mui-disabled,.mui-checkbox.mui-disabled label,.mui-radio label.mui-disabled,.mui-radio.mui-disabled label{opacity:.4}.mui-radio input[type=radio]:before{content:'\e411'}.mui-radio input[type=radio]:checked:before{content:'\e441'}.mui-checkbox input[type=checkbox]:before{content:'\e411'}.mui-checkbox input[type=checkbox]:checked:before{content:'\e442'}.mui-select{position:relative}.mui-select:before{font-family:Muiicons;position:absolute;top:8px;right:21px;content:'\e581';color:rgba(170,170,170,.6)}.mui-input-row .mui-switch{float:right;margin-top:5px;margin-right:20px}.mui-input-range input[type=range]{position:relative;width:100%;height:2px;margin:17px 0;padding:0;cursor:pointer;border:0;border-radius:3px;outline:0;background-color:#999;-webkit-appearance:none!important}.mui-input-range input[type=range]::-webkit-slider-thumb{width:28px;height:28px;border-color:#0062cc;border-radius:50%;background-color:#007aff;background-clip:padding-box;-webkit-appearance:none!important}.mui-input-range label~input[type=range]{width:65%}.mui-input-range .mui-tooltip{font-size:36px;line-height:64px;position:absolute;z-index:1;top:-70px;width:64px;height:64px;text-align:center;opacity:.8;color:#333;border:1px solid #ddd;border-radius:6px;background-color:#fff;text-shadow:0 1px 0 #f3f3f3}.mui-search{position:relative}.mui-search input[type=search]{padding-left:30px}.mui-search .mui-placeholder{font-size:16px;line-height:34px;position:absolute;z-index:1;top:0;right:0;bottom:0;left:0;display:inline-block;height:34px;text-align:center;color:#999;border:0;border-radius:6px;background:0 0}.mui-search .mui-placeholder .mui-icon{font-size:20px;color:#333}.mui-search:before{font-family:Muiicons;font-size:20px;font-weight:400;position:absolute;top:50%;right:50%;display:none;margin-top:-18px;margin-right:31px;content:'\e466'}.mui-search.mui-active:before{font-size:20px;right:auto;left:5px;display:block;margin-right:0}.mui-search.mui-active input[type=search]{text-align:left}.mui-search.mui-active .mui-placeholder{display:none}.mui-segmented-control{font-size:15px;font-weight:400;position:relative;display:table;overflow:hidden;width:100%;table-layout:fixed;border:1px solid #007aff;border-radius:3px;background-color:transparent;-webkit-touch-callout:none}.mui-segmented-control.mui-segmented-control-vertical{border-collapse:collapse;border-width:0;border-radius:0}.mui-segmented-control.mui-segmented-control-vertical .mui-control-item{display:block;border-bottom:1px solid #c8c7cc;border-left-width:0}.mui-segmented-control.mui-scroll-wrapper{height:38px}.mui-segmented-control.mui-scroll-wrapper .mui-scroll{width:auto;height:40px;white-space:nowrap}.mui-segmented-control.mui-scroll-wrapper .mui-control-item{display:inline-block;width:auto;padding:0 20px;border:0}.mui-segmented-control .mui-control-item{line-height:38px;display:table-cell;overflow:hidden;width:1%;-webkit-transition:background-color .1s linear;transition:background-color .1s linear;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:#007aff;border-color:#007aff;border-left:1px solid #007aff}.mui-segmented-control .mui-control-item:first-child{border-left-width:0}.mui-segmented-control .mui-control-item.mui-active{color:#fff;background-color:#007aff}.mui-segmented-control.mui-segmented-control-inverted{width:100%;border:0;border-radius:0}.mui-segmented-control.mui-segmented-control-inverted.mui-segmented-control-vertical .mui-control-item,.mui-segmented-control.mui-segmented-control-inverted.mui-segmented-control-vertical .mui-control-item.mui-active{border-bottom:1px solid #c8c7cc}.mui-segmented-control.mui-segmented-control-inverted .mui-control-item{color:inherit;border:0}.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{color:#007aff;border-bottom:2px solid #007aff;background:0 0}.mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#007aff}.mui-segmented-control-positive{border:1px solid #4cd964}.mui-segmented-control-positive .mui-control-item{color:#4cd964;border-color:inherit}.mui-segmented-control-positive .mui-control-item.mui-active{color:#fff;background-color:#4cd964}.mui-segmented-control-positive.mui-segmented-control-inverted .mui-control-item.mui-active{color:#4cd964;border-bottom:2px solid #4cd964;background:0 0}.mui-segmented-control-positive.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#4cd964}.mui-segmented-control-negative{border:1px solid #dd524d}.mui-segmented-control-negative .mui-control-item{color:#dd524d;border-color:inherit}.mui-segmented-control-negative .mui-control-item.mui-active{color:#fff;background-color:#dd524d}.mui-segmented-control-negative.mui-segmented-control-inverted .mui-control-item.mui-active{color:#dd524d;border-bottom:2px solid #dd524d;background:0 0}.mui-segmented-control-negative.mui-segmented-control-inverted~.mui-slider-progress-bar{background-color:#dd524d}.mui-control-content{position:relative;display:none}.mui-control-content.mui-active{display:block}.mui-popover{position:absolute;z-index:999;display:none;width:280px;-webkit-transition:opacity .3s;transition:opacity .3s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transform:none;transform:none;opacity:0;border-radius:7px;background-color:#f7f7f7;-webkit-box-shadow:0 0 15px rgba(0,0,0,.1);box-shadow:0 0 15px rgba(0,0,0,.1)}.mui-popover .mui-popover-arrow{position:absolute;z-index:1000;top:-25px;left:0;overflow:hidden;width:26px;height:26px}.mui-popover .mui-popover-arrow:after{position:absolute;top:19px;left:0;width:26px;height:26px;content:' ';-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:3px;background:#f7f7f7}.mui-popover .mui-popover-arrow.mui-bottom{top:100%;left:-26px;margin-top:-1px}.mui-popover .mui-popover-arrow.mui-bottom:after{top:-19px;left:0}.mui-popover.mui-popover-action{bottom:0;width:100%;-webkit-transition:-webkit-transform .3s,opacity .3s;transition:transform .3s,opacity .3s;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);border-radius:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.mui-popover.mui-popover-action .mui-popover-arrow{display:none}.mui-popover.mui-popover-action.mui-popover-bottom{position:fixed}.mui-popover.mui-popover-action.mui-active{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mui-popover.mui-popover-action .mui-table-view{margin:8px;text-align:center;color:#007aff;border-radius:4px}.mui-popover.mui-popover-action .mui-table-view .mui-table-view-cell:after{position:absolute;right:0;bottom:0;left:0;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#c8c7cc}.mui-popover.mui-popover-action .mui-table-view small{font-weight:400;line-height:1.3;display:block}.mui-popover.mui-active{display:block;opacity:1}.mui-popover .mui-bar~.mui-table-view{padding-top:44px}.mui-backdrop{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3)}.mui-bar-backdrop.mui-backdrop{bottom:50px;background:0 0}.mui-backdrop-action.mui-backdrop{background-color:rgba(0,0,0,.3)}.mui-backdrop-action.mui-backdrop,.mui-bar-backdrop.mui-backdrop{opacity:0}.mui-backdrop-action.mui-backdrop.mui-active,.mui-bar-backdrop.mui-backdrop.mui-active{-webkit-transition:all .4s ease;transition:all .4s ease;opacity:1}.mui-popover .mui-btn-block{margin-bottom:5px}.mui-popover .mui-btn-block:last-child{margin-bottom:0}.mui-popover .mui-bar{-webkit-box-shadow:none;box-shadow:none}.mui-popover .mui-bar-nav{border-bottom:1px solid rgba(0,0,0,.15);border-top-left-radius:12px;border-top-right-radius:12px;-webkit-box-shadow:none;box-shadow:none}.mui-popover .mui-scroll-wrapper{margin:7px 0;border-radius:7px;background-clip:padding-box}.mui-popover .mui-scroll .mui-table-view{max-height:none}.mui-popover .mui-table-view{overflow:auto;max-height:300px;margin-bottom:0;border-radius:7px;background-color:#f7f7f7;background-image:none;-webkit-overflow-scrolling:touch}.mui-popover .mui-table-view:after,.mui-popover .mui-table-view:before{height:0}.mui-popover .mui-table-view .mui-table-view-cell:first-child,.mui-popover .mui-table-view .mui-table-view-cell:first-child>a:not(.mui-btn){border-top-left-radius:12px;border-top-right-radius:12px}.mui-popover .mui-table-view .mui-table-view-cell:last-child,.mui-popover .mui-table-view .mui-table-view-cell:last-child>a:not(.mui-btn){border-bottom-right-radius:12px;border-bottom-left-radius:12px}.mui-popover.mui-bar-popover .mui-table-view{width:106px}.mui-popover.mui-bar-popover .mui-table-view .mui-table-view-cell{padding:11px 15px;background-position:0 100%}.mui-popover.mui-bar-popover .mui-table-view .mui-table-view-cell>a:not(.mui-btn){margin:-11px -15px -11px -15px}.mui-popup-backdrop{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;-webkit-transition-duration:400ms;transition-duration:400ms;opacity:0;background:rgba(0,0,0,.4)}.mui-popup-backdrop.mui-active{opacity:1}.mui-popup{position:fixed;z-index:10000;top:50%;left:50%;display:none;overflow:hidden;width:270px;-webkit-transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-transform:translate3d(-50%,-50%,0) scale(1.185);transform:translate3d(-50%,-50%,0) scale(1.185);text-align:center;opacity:0;color:#000;border-radius:13px}.mui-popup.mui-popup-in{display:block;-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1);opacity:1}.mui-popup.mui-popup-out{-webkit-transition-duration:400ms;transition-duration:400ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1);opacity:0}.mui-popup-inner{position:relative;padding:15px;border-radius:13px 13px 0 0;background:rgba(255,255,255,.95)}.mui-popup-inner:after{position:absolute;z-index:15;top:auto;right:auto;bottom:0;left:0;display:block;width:100%;height:1px;content:'';-webkit-transform:scaleY(.5);transform:scaleY(.5);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;background-color:rgba(0,0,0,.2)}.mui-popup-title{font-size:18px;font-weight:500;text-align:center}.mui-popup-title+.mui-popup-text{font-family:inherit;font-size:14px;margin:5px 0 0}.mui-popup-buttons{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;height:44px;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.mui-popup-button{font-size:17px;line-height:44px;position:relative;display:block;overflow:hidden;box-sizing:border-box;width:100%;height:44px;padding:0 5px;cursor:pointer;text-align:center;white-space:nowrap;text-overflow:ellipsis;color:#007aff;background:rgba(255,255,255,.95);-webkit-box-flex:1}.mui-popup-button:after{position:absolute;z-index:15;top:0;right:0;bottom:auto;left:auto;display:block;width:1px;height:100%;content:'';-webkit-transform:scaleX(.5);transform:scaleX(.5);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;background-color:rgba(0,0,0,.2)}.mui-popup-button:first-child{border-radius:0 0 0 13px}.mui-popup-button:first-child:last-child{border-radius:0 0 13px 13px}.mui-popup-button:last-child{border-radius:0 0 13px}.mui-popup-button:last-child:after{display:none}.mui-popup-button.mui-popup-button-bold{font-weight:600}.mui-popup-input input{font-size:14px;width:100%;height:26px;margin:15px 0 0;padding:0 5px;border:1px solid rgba(0,0,0,.3);border-radius:0;background:#fff}.mui-plus.mui-android .mui-popup-backdrop{-webkit-transition-duration:1ms;transition-duration:1ms}.mui-plus.mui-android .mui-popup{-webkit-transition-duration:1ms;transition-duration:1ms;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1)}.mui-progressbar{position:relative;display:block;overflow:hidden;width:100%;height:2px;-webkit-transform-origin:center top;transform-origin:center top;vertical-align:middle;border-radius:2px;background:#b6b6b6;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-progressbar span{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transition:150ms;transition:150ms;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);background:#007aff}.mui-progressbar.mui-progressbar-infinite:before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transform-origin:left center;transform-origin:left center;-webkit-animation:mui-progressbar-infinite 1s linear infinite;animation:mui-progressbar-infinite 1s linear infinite;background:#007aff}body>.mui-progressbar{position:absolute;z-index:10000;top:44px;left:0;border-radius:0}.mui-progressbar-in{-webkit-animation:mui-progressbar-in 300ms forwards;animation:mui-progressbar-in 300ms forwards}.mui-progressbar-out{-webkit-animation:mui-progressbar-out 300ms forwards;animation:mui-progressbar-out 300ms forwards}@-webkit-keyframes mui-progressbar-in{from{-webkit-transform:scaleY(0);opacity:0}to{-webkit-transform:scaleY(1);opacity:1}}@keyframes mui-progressbar-in{from{transform:scaleY(0);opacity:0}to{transform:scaleY(1);opacity:1}}@-webkit-keyframes mui-progressbar-out{from{-webkit-transform:scaleY(1);opacity:1}to{-webkit-transform:scaleY(0);opacity:0}}@keyframes mui-progressbar-out{from{transform:scaleY(1);opacity:1}to{transform:scaleY(0);opacity:0}}@-webkit-keyframes mui-progressbar-infinite{0%{-webkit-transform:translate3d(-50%,0,0) scaleX(.5)}100%{-webkit-transform:translate3d(100%,0,0) scaleX(.5)}}@keyframes mui-progressbar-infinite{0%{transform:translate3d(-50%,0,0) scaleX(.5)}100%{transform:translate3d(100%,0,0) scaleX(.5)}}.mui-pagination{display:inline-block;margin:0 auto;padding-left:0;border-radius:6px}.mui-pagination>li{display:inline}.mui-pagination>li>a,.mui-pagination>li>span{line-height:1.428571429;position:relative;float:left;margin-left:-1px;padding:6px 12px;text-decoration:none;color:#007aff;border:1px solid #ddd;background-color:#fff}.mui-pagination>li:first-child>a,.mui-pagination>li:first-child>span{margin-left:0;border-top-left-radius:6px;border-bottom-left-radius:6px;background-clip:padding-box}.mui-pagination>li:last-child>a,.mui-pagination>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px;background-clip:padding-box}.mui-pagination>li.mui-active>a,.mui-pagination>li.mui-active>a:active,.mui-pagination>li.mui-active>span,.mui-pagination>li.mui-active>span:active,.mui-pagination>li:active>a,.mui-pagination>li:active>a:active,.mui-pagination>li:active>span,.mui-pagination>li:active>span:active{z-index:2;cursor:default;color:#fff;border-color:#007aff;background-color:#007aff}.mui-pagination>li.mui-disabled>a,.mui-pagination>li.mui-disabled>a:active,.mui-pagination>li.mui-disabled>span,.mui-pagination>li.mui-disabled>span:active{opacity:.6;color:#777;border:1px solid #ddd;background-color:#fff}.mui-pagination-lg>li>a,.mui-pagination-lg>li>span{font-size:18px;padding:10px 16px}.mui-pagination-sm>li>a,.mui-pagination-sm>li>span{font-size:12px;padding:5px 10px}.mui-pager{padding-left:0;list-style:none;text-align:center}.mui-pager:after,.mui-pager:before{display:table;content:' '}.mui-pager:after{clear:both}.mui-pager li{display:inline}.mui-pager li>a,.mui-pager li>span{display:inline-block;padding:5px 14px;border:1px solid #ddd;border-radius:6px;background-color:#fff;background-clip:padding-box}.mui-pager li.mui-active>a,.mui-pager li.mui-active>span,.mui-pager li:active>a,.mui-pager li:active>span{cursor:default;text-decoration:none;color:#fff;border-color:#007aff;background-color:#007aff}.mui-pager .mui-next>a,.mui-pager .mui-next>span{float:right}.mui-pager .mui-previous>a,.mui-pager .mui-previous>span{float:left}.mui-pager .mui-disabled>a,.mui-pager .mui-disabled>a:active,.mui-pager .mui-disabled>span,.mui-pager .mui-disabled>span:active{opacity:.6;color:#777;border:1px solid #ddd;background-color:#fff}.mui-modal{position:fixed;z-index:999;top:0;overflow:hidden;width:100%;min-height:100%;-webkit-transition:-webkit-transform .25s,opacity 1ms .25s;transition:transform .25s,opacity 1ms .25s;-webkit-transition-timing-function:cubic-bezier(.1,.5,.1,1);transition-timing-function:cubic-bezier(.1,.5,.1,1);-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0;background-color:#fff}.mui-modal.mui-active{height:100%;-webkit-transition:-webkit-transform .25s;transition:transform .25s;-webkit-transition-timing-function:cubic-bezier(.1,.5,.1,1);transition-timing-function:cubic-bezier(.1,.5,.1,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.mui-android .mui-modal .mui-bar{position:static}.mui-android .mui-modal .mui-bar-nav~.mui-content{padding-top:0}.mui-slider{position:relative;z-index:1;overflow:hidden;width:100%}.mui-slider .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{border-bottom:0}.mui-slider .mui-segmented-control.mui-segmented-control-inverted~.mui-slider-group .mui-slider-item{border-top:1px solid #c8c7cc;border-bottom:1px solid #c8c7cc}.mui-slider .mui-slider-group{font-size:0;position:relative;-webkit-transition:all 0s linear;transition:all 0s linear;white-space:nowrap}.mui-slider .mui-slider-group .mui-slider-item{font-size:14px;position:relative;display:inline-block;width:100%;height:100%;vertical-align:top;white-space:normal}.mui-slider .mui-slider-group .mui-slider-item>a:not(.mui-control-item){line-height:0;position:relative;display:block}.mui-slider .mui-slider-group .mui-slider-item img{width:100%}.mui-slider .mui-slider-group .mui-slider-item .mui-table-view:after,.mui-slider .mui-slider-group .mui-slider-item .mui-table-view:before{height:0}.mui-slider .mui-slider-group.mui-slider-loop{-webkit-transform:translate(-100%,0);transform:translate(-100%,0)}.mui-slider-title{line-height:30px;position:absolute;bottom:0;left:0;width:100%;height:30px;margin:0;text-align:left;text-indent:12px;opacity:.8;background-color:#000}.mui-slider-indicator{position:absolute;bottom:8px;width:100%;text-align:center;background:0 0}.mui-slider-indicator.mui-segmented-control{position:relative;bottom:auto}.mui-slider-indicator .mui-indicator{display:inline-block;width:6px;height:6px;margin:1px 6px;cursor:pointer;border-radius:50%;background:#aaa;-webkit-box-shadow:0 0 1px 1px rgba(130,130,130,.7);box-shadow:0 0 1px 1px rgba(130,130,130,.7)}.mui-slider-indicator .mui-active.mui-indicator{background:#fff}.mui-slider-indicator .mui-icon{font-size:20px;line-height:30px;width:40px;height:30px;margin:3px;text-align:center;border:1px solid #ddd}.mui-slider-indicator .mui-number{line-height:32px;display:inline-block;width:58px}.mui-slider-indicator .mui-number span{color:#ff5053}.mui-slider-progress-bar{z-index:1;height:2px;-webkit-transform:translateZ(0);transform:translateZ(0)}.mui-switch{position:relative;display:block;width:74px;height:30px;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:background-color,border;transition-property:background-color,border;border:2px solid #ddd;border-radius:20px;background-color:#fff;background-clip:padding-box}.mui-switch.mui-disabled{opacity:.3}.mui-switch .mui-switch-handle{position:absolute;z-index:1;top:-1px;left:-1px;width:28px;height:28px;-webkit-transition:.2s ease-in-out;transition:.2s ease-in-out;-webkit-transition-property:-webkit-transform,width,left;transition-property:transform,width,left;border-radius:16px;background-color:#fff;background-clip:padding-box;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.4);box-shadow:0 2px 5px rgba(0,0,0,.4)}.mui-switch:before{font-size:13px;position:absolute;top:3px;right:11px;content:'Off';text-transform:uppercase;color:#999}.mui-switch.mui-dragging{border-color:#f7f7f7;background-color:#f7f7f7}.mui-switch.mui-dragging .mui-switch-handle{width:38px}.mui-switch.mui-dragging.mui-active .mui-switch-handle{left:-11px;width:38px}.mui-switch.mui-active{border-color:#4cd964;background-color:#4cd964}.mui-switch.mui-active .mui-switch-handle{-webkit-transform:translate(43px,0);transform:translate(43px,0)}.mui-switch.mui-active:before{right:auto;left:15px;content:'On';color:#fff}.mui-switch input[type=checkbox]{display:none}.mui-switch-mini{width:47px}.mui-switch-mini:before{display:none}.mui-switch-mini.mui-active .mui-switch-handle{-webkit-transform:translate(16px,0);transform:translate(16px,0)}.mui-switch-blue.mui-active{border:2px solid #007aff;background-color:#007aff}.mui-content.mui-fade{left:0;opacity:0}.mui-content.mui-fade.mui-in{opacity:1}.mui-content.mui-sliding{z-index:2;-webkit-transition:-webkit-transform .4s;transition:transform .4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mui-content.mui-sliding.mui-left{z-index:1;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mui-content.mui-sliding.mui-right{z-index:3;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mui-navigate-right:after,.mui-push-left:after,.mui-push-right:after{font-family:Muiicons;font-size:inherit;line-height:1;position:absolute;top:50%;display:inline-block;-webkit-transform:translateY(-50%);transform:translateY(-50%);text-decoration:none;color:#bbb;-webkit-font-smoothing:antialiased}.mui-push-left:after{left:15px;content:'\e582'}.mui-navigate-right:after,.mui-push-right:after{right:15px;content:'\e583'}.mui-pull-bottom-pocket,.mui-pull-top-pocket{position:absolute;left:0;display:block;visibility:hidden;overflow:hidden;width:100%;height:50px}.mui-plus-pullrefresh .mui-pull-bottom-pocket,.mui-plus-pullrefresh .mui-pull-top-pocket{display:none;visibility:visible}.mui-pull-top-pocket{top:0}.mui-bar-nav~.mui-content .mui-pull-top-pocket{top:44px}.mui-bar-nav~.mui-bar-header-secondary~.mui-content .mui-pull-top-pocket{top:88px}.mui-pull-bottom-pocket{position:relative;bottom:0;height:40px}.mui-pull-bottom-pocket .mui-pull-loading{visibility:hidden}.mui-pull-bottom-pocket .mui-pull-loading.mui-in{display:inline-block}.mui-pull{font-weight:700;position:absolute;right:0;bottom:10px;left:0;text-align:center;color:#777}.mui-pull-loading{margin-right:10px;-webkit-transition:-webkit-transform .4s;transition:transform .4s;-webkit-transition-duration:400ms;transition-duration:400ms;vertical-align:middle}.mui-pull-loading.mui-reverse{-webkit-transform:rotate(180deg) translateZ(0);transform:rotate(180deg) translateZ(0)}.mui-pull-caption{font-size:15px;line-height:24px;position:relative;display:inline-block;overflow:visible;margin-top:0;vertical-align:middle}.mui-pull-caption span{display:none}.mui-pull-caption span.mui-in{display:inline}.mui-toast-container{line-height:17px;position:fixed;z-index:9999;bottom:50px;left:50%;-webkit-transition:opacity .3s;transition:opacity .3s;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0}.mui-toast-container.mui-active{opacity:.9}.mui-toast-message{font-size:14px;padding:10px 25px;text-align:center;color:#fff;border-radius:6px;background-color:#323232}.mui-numbox{position:relative;display:inline-block;overflow:hidden;width:120px;height:35px;padding:0 40px;vertical-align:top;vertical-align:middle;border:solid 1px #bbb;border-radius:3px;background-color:#efeff4}.mui-numbox [class*=btn-numbox],.mui-numbox [class*=numbox-btn]{font-size:18px;font-weight:400;line-height:100%;position:absolute;top:0;overflow:hidden;width:40px;height:100%;padding:0;color:#555;border:none;border-radius:0;background-color:#f9f9f9}.mui-numbox [class*=btn-numbox]:active,.mui-numbox [class*=numbox-btn]:active{background-color:#ccc}.mui-numbox [class*=btn-numbox][disabled],.mui-numbox [class*=numbox-btn][disabled]{color:silver}.mui-numbox .mui-btn-numbox-plus,.mui-numbox .mui-numbox-btn-plus{right:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.mui-numbox .mui-btn-numbox-minus,.mui-numbox .mui-numbox-btn-minus{left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.mui-numbox .mui-input-numbox,.mui-numbox .mui-numbox-input{display:inline-block;overflow:hidden;width:100%!important;height:100%;margin:0;padding:0 3px!important;text-align:center;text-overflow:ellipsis;word-break:normal;border:none!important;border-right:solid 1px #ccc!important;border-left:solid 1px #ccc!important;border-radius:0!important}.mui-input-row .mui-numbox{float:right;margin:2px 8px}@font-face{font-family:Muiicons;font-weight:400;font-style:normal;src:url(../fonts/mui.ttf) format('truetype')}.mui-icon{font-family:Muiicons;font-size:24px;font-weight:400;font-style:normal;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased}.mui-icon.mui-active{color:#007aff}.mui-icon.mui-right:before{float:right;padding-left:.2em}.mui-icon-contact:before{content:'\e100'}.mui-icon-person:before{content:'\e101'}.mui-icon-personadd:before{content:'\e102'}.mui-icon-contact-filled:before{content:'\e130'}.mui-icon-person-filled:before{content:'\e131'}.mui-icon-personadd-filled:before{content:'\e132'}.mui-icon-phone:before{content:'\e200'}.mui-icon-email:before{content:'\e201'}.mui-icon-chatbubble:before{content:'\e202'}.mui-icon-chatboxes:before{content:'\e203'}.mui-icon-phone-filled:before{content:'\e230'}.mui-icon-email-filled:before{content:'\e231'}.mui-icon-chatbubble-filled:before{content:'\e232'}.mui-icon-chatboxes-filled:before{content:'\e233'}.mui-icon-weibo:before{content:'\e260'}.mui-icon-weixin:before{content:'\e261'}.mui-icon-pengyouquan:before{content:'\e262'}.mui-icon-chat:before{content:'\e263'}.mui-icon-qq:before{content:'\e264'}.mui-icon-videocam:before{content:'\e300'}.mui-icon-camera:before{content:'\e301'}.mui-icon-mic:before{content:'\e302'}.mui-icon-location:before{content:'\e303'}.mui-icon-mic-filled:before,.mui-icon-speech:before{content:'\e332'}.mui-icon-location-filled:before{content:'\e333'}.mui-icon-micoff:before{content:'\e360'}.mui-icon-image:before{content:'\e363'}.mui-icon-map:before{content:'\e364'}.mui-icon-compose:before{content:'\e400'}.mui-icon-trash:before{content:'\e401'}.mui-icon-upload:before{content:'\e402'}.mui-icon-download:before{content:'\e403'}.mui-icon-close:before{content:'\e404'}.mui-icon-redo:before{content:'\e405'}.mui-icon-undo:before{content:'\e406'}.mui-icon-refresh:before{content:'\e407'}.mui-icon-star:before{content:'\e408'}.mui-icon-plus:before{content:'\e409'}.mui-icon-minus:before{content:'\e410'}.mui-icon-checkbox:before,.mui-icon-circle:before{content:'\e411'}.mui-icon-clear:before,.mui-icon-close-filled:before{content:'\e434'}.mui-icon-refresh-filled:before{content:'\e437'}.mui-icon-star-filled:before{content:'\e438'}.mui-icon-plus-filled:before{content:'\e439'}.mui-icon-minus-filled:before{content:'\e440'}.mui-icon-circle-filled:before{content:'\e441'}.mui-icon-checkbox-filled:before{content:'\e442'}.mui-icon-closeempty:before{content:'\e460'}.mui-icon-refreshempty:before{content:'\e461'}.mui-icon-reload:before{content:'\e462'}.mui-icon-starhalf:before{content:'\e463'}.mui-icon-spinner:before{content:'\e464'}.mui-icon-spinner-cycle:before{content:'\e465'}.mui-icon-search:before{content:'\e466'}.mui-icon-plusempty:before{content:'\e468'}.mui-icon-forward:before{content:'\e470'}.mui-icon-back:before,.mui-icon-left-nav:before{content:'\e471'}.mui-icon-checkmarkempty:before{content:'\e472'}.mui-icon-home:before{content:'\e500'}.mui-icon-navigate:before{content:'\e501'}.mui-icon-gear:before{content:'\e502'}.mui-icon-paperplane:before{content:'\e503'}.mui-icon-info:before{content:'\e504'}.mui-icon-help:before{content:'\e505'}.mui-icon-locked:before{content:'\e506'}.mui-icon-more:before{content:'\e507'}.mui-icon-flag:before{content:'\e508'}.mui-icon-home-filled:before{content:'\e530'}.mui-icon-gear-filled:before{content:'\e532'}.mui-icon-info-filled:before{content:'\e534'}.mui-icon-help-filled:before{content:'\e535'}.mui-icon-more-filled:before{content:'\e537'}.mui-icon-settings:before{content:'\e560'}.mui-icon-list:before{content:'\e562'}.mui-icon-bars:before{content:'\e563'}.mui-icon-loop:before{content:'\e565'}.mui-icon-paperclip:before{content:'\e567'}.mui-icon-eye:before{content:'\e568'}.mui-icon-arrowup:before{content:'\e580'}.mui-icon-arrowdown:before{content:'\e581'}.mui-icon-arrowleft:before{content:'\e582'}.mui-icon-arrowright:before{content:'\e583'}.mui-icon-arrowthinup:before{content:'\e584'}.mui-icon-arrowthindown:before{content:'\e585'}.mui-icon-arrowthinleft:before{content:'\e586'}.mui-icon-arrowthinright:before{content:'\e587'}.mui-icon-pulldown:before{content:'\e588'}.mui-fullscreen{position:absolute;top:0;right:0;bottom:0;left:0}.mui-fullscreen.mui-slider .mui-slider-group{height:100%}.mui-fullscreen .mui-segmented-control~.mui-slider-group{position:absolute;top:40px;bottom:0;width:100%;height:auto}.mui-fullscreen.mui-slider .mui-slider-item>a{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.mui-fullscreen .mui-off-canvas-wrap .mui-slider-item>a{top:auto;-webkit-transform:none;transform:none}.mui-bar-nav~.mui-content .mui-slider.mui-fullscreen{top:44px}.mui-bar-tab~.mui-content .mui-slider.mui-fullscreen .mui-segmented-control~.mui-slider-group{bottom:50px}.mui-android.mui-android-4-0 input:focus,.mui-android.mui-android-4-0 textarea:focus{-webkit-user-modify:inherit}.mui-android.mui-android-4-2 input,.mui-android.mui-android-4-2 textarea,.mui-android.mui-android-4-3 input,.mui-android.mui-android-4-3 textarea{-webkit-user-select:text}.mui-ios .mui-table-view-cell{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-plus-visible,.mui-wechat-visible{display:none!important}.mui-plus-hidden,.mui-wechat-hidden{display:block!important}.mui-tab-item.mui-plus-hidden,.mui-tab-item.mui-wechat-hidden{display:table-cell!important}.mui-plus .mui-plus-visible,.mui-wechat .mui-wechat-visible{display:block!important}.mui-plus .mui-tab-item.mui-plus-visible,.mui-wechat .mui-tab-item.mui-wechat-visible{display:table-cell!important}.mui-plus .mui-plus-hidden,.mui-wechat .mui-wechat-hidden{display:none!important}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav{height:64px;padding-top:20px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav~.mui-content{padding-top:64px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-header-secondary,.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-nav~.mui-content .mui-pull-top-pocket{top:64px}.mui-plus.mui-statusbar.mui-statusbar-offset .mui-bar-header-secondary~.mui-content{padding-top:94px}.mui-iframe-wrapper{position:absolute;right:0;left:0;-webkit-overflow-scrolling:touch}.mui-iframe-wrapper iframe{width:100%;height:100%;border:0} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
css/mui.picker.min.css
0 → 100644
1 | /** | ||
2 | * 选择列表插件 | ||
3 | * varstion 2.0.0 | ||
4 | * by Houfeng | ||
5 | * Houfeng@DCloud.io | ||
6 | **/ | ||
7 | .mui-pciker-list li,.mui-picker,.mui-picker-inner{box-sizing:border-box;overflow:hidden}.mui-picker{background-color:#ddd;position:relative;height:200px;border:1px solid rgba(0,0,0,.1);-webkit-user-select:none;user-select:none}.mui-dtpicker,.mui-poppicker{left:0;background-color:#eee;box-shadow:0 -5px 7px 0 rgba(0,0,0,.1);-webkit-transition:.3s;width:100%}.mui-picker-inner{position:relative;width:100%;height:100%;-webkit-mask-box-image:-webkit-linear-gradient(bottom,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent);-webkit-mask-box-image:linear-gradient(top,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.mui-pciker-list,.mui-pciker-rule{box-sizing:border-box;padding:0;margin:-18px 0 0;width:100%;height:36px;line-height:36px;position:absolute;left:0;top:50%}.mui-pciker-rule-bg{z-index:0}.mui-pciker-rule-ft{z-index:2;border-top:solid 1px rgba(0,0,0,.1);border-bottom:solid 1px rgba(0,0,0,.1)}.mui-pciker-list{z-index:1;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:perspective(750pt) rotateY(0) rotateX(0);transform:perspective(750pt) rotateY(0) rotateX(0)}.mui-pciker-list li{width:100%;height:100%;position:absolute;text-align:center;vertical-align:middle;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-size:1pc;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#888;padding:0 8px;white-space:nowrap;-webkit-text-overflow:ellipsis;text-overflow:ellipsis;cursor:default;visibility:hidden}.mui-pciker-list li.highlight,.mui-pciker-list li.visible{visibility:visible}.mui-pciker-list li.highlight{color:#222}.mui-poppicker{position:fixed;z-index:999;border-top:solid 1px #ccc;bottom:0;-webkit-transform:translateY(300px)}.mui-poppicker.mui-active{-webkit-transform:translateY(0)}.mui-android-5-1 .mui-poppicker{bottom:-300px;-webkit-transition-property:bottom;-webkit-transform:none}.mui-android-5-1 .mui-poppicker.mui-active{bottom:0;-webkit-transition-property:bottom;-webkit-transform:none}.mui-poppicker-header{padding:6px;font-size:14px;color:#888}.mui-poppicker-header .mui-btn{font-size:9pt;padding:5px 10px}.mui-poppicker-btn-cancel{float:left}.mui-poppicker-btn-ok{float:right}.mui-poppicker-clear{clear:both;height:0;line-height:0;font-size:0;overflow:hidden}.mui-poppicker-body{position:relative;width:100%;height:200px;border-top:solid 1px #ddd}.mui-poppicker-body .mui-picker{width:100%;height:100%;margin:0;border:none;float:left}.mui-dtpicker{position:fixed;z-index:999999;border-top:solid 1px #ccc;bottom:0;-webkit-transform:translateY(300px)}.mui-dtpicker.mui-active{-webkit-transform:translateY(0)}.mui-dtpicker-active-for-page{overflow:hidden!important}.mui-android-5-1 .mui-dtpicker{bottom:-300px;-webkit-transition-property:bottom;-webkit-transform:none}.mui-android-5-1 .mui-dtpicker.mui-active{bottom:0;-webkit-transition-property:bottom;-webkit-transform:none}.mui-dtpicker-header{padding:6px;font-size:14px;color:#888}.mui-dtpicker-header button{font-size:9pt;padding:5px 10px}.mui-dtpicker-header button:last-child{float:right}.mui-dtpicker-body{position:relative;width:100%;height:200px}.mui-ios .mui-dtpicker-body{-webkit-perspective:75pc;perspective:75pc;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-dtpicker-title h5{display:inline-block;width:20%;margin:0;padding:8px;text-align:center;border-top:solid 1px #ddd;background-color:#f0f0f0;border-bottom:solid 1px #ccc}[data-type=hour] [data-id=title-i],[data-type=hour] [data-id=picker-i],[data-type=month] [data-id=title-i],[data-type=month] [data-id=picker-d],[data-type=month] [data-id=title-d],[data-type=month] [data-id=picker-h],[data-type=month] [data-id=title-h],[data-type=month] [data-id=picker-i],[data-type=time] [data-id=picker-y],[data-type=time] [data-id=picker-m],[data-type=time] [data-id=picker-d],[data-type=time] [data-id=title-y],[data-type=time] [data-id=title-m],[data-type=time] [data-id=title-d],[data-type=date] [data-id=title-i],[data-type=date] [data-id=picker-h],[data-type=date] [data-id=title-h],[data-type=date] [data-id=picker-i]{display:none}.mui-dtpicker .mui-picker{width:20%;height:100%;margin:0;float:left;border:none}[data-type=hour] [data-id=picker-h],[data-type=hour] [data-id=title-h],[data-type=datetime] [data-id=picker-h],[data-type=datetime] [data-id=title-h]{border-left:dotted 1px #ccc}[data-type=datetime] .mui-picker,[data-type=time] .mui-dtpicker-title h5{width:20%}[data-type=date] .mui-dtpicker-title h5,[data-type=date] .mui-picker{width:33.3%}[data-type=hour] .mui-dtpicker-title h5,[data-type=hour] .mui-picker{width:25%}[data-type=month] .mui-dtpicker-title h5,[data-type=month] .mui-picker,[data-type=time] .mui-dtpicker-title h5,[data-type=time] .mui-picker{width:50%} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
css/themes.css
0 → 100644
1 | /* body背景色 */ | ||
2 | body { | ||
3 | background: #f5f5f5; | ||
4 | } | ||
5 | /* 背景屎黄色 */ | ||
6 | .themes_bg_color { | ||
7 | background: #f2a11c; | ||
8 | } | ||
9 | .themes_bg_color a{ | ||
10 | color: #FFFFFF !important; | ||
11 | } | ||
12 | /* 白色字体 */ | ||
13 | .themes_font_color { | ||
14 | color: #fff; | ||
15 | } | ||
16 | /* 导航标题 */ | ||
17 | .themes_title { | ||
18 | font-family: PingFang-SC Regular; | ||
19 | color: #fff; | ||
20 | } | ||
21 | |||
22 | /* 导航右侧操作栏 */ | ||
23 | .themes_nav_right { | ||
24 | display: inline-block; | ||
25 | float: right; | ||
26 | vertical-align: middle; | ||
27 | margin-top: 0px; | ||
28 | } | ||
29 | /* 单选框 复选框 选中样式 颜色 */ | ||
30 | .mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{ | ||
31 | color: #f2a11c; | ||
32 | } | ||
33 | |||
34 | /*返回文字样式*/ | ||
35 | .theme_back a{ | ||
36 | /*color: #f2a11c !important;*/ | ||
37 | color: #FFFFFF !important; | ||
38 | } | ||
39 | .theme_back_font,.theme_next_font{ | ||
40 | /*color: #f2a11c ;*/ | ||
41 | color: #FFFFFF; | ||
42 | margin-top: 7px; | ||
43 | font-size: 14px; | ||
44 | |||
45 | } | ||
46 | .theme_font_danger{ | ||
47 | color: red ; | ||
48 | } | ||
49 | /* mui content 内容区 距顶部距离 */ | ||
50 | .mui-bar-nav~.mui-content .mui-slider.mui-fullscreen{ | ||
51 | top: 102px; | ||
52 | } | ||
53 | /*tab页切里面的文字颜色*/ | ||
54 | /*tab被选中的当前横线颜色*/ | ||
55 | .themes_tab .mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar{ | ||
56 | background-color: #f2a11c !important; | ||
57 | } | ||
58 | .themes_font_color_tab.mui-active{ | ||
59 | color: #f2a11c !important; | ||
60 | } | ||
61 | /*tab 页切内容高度 */ | ||
62 | |||
63 | .mui-fullscreen{ | ||
64 | /*top: 60px;*/ | ||
65 | } | ||
66 | .mui-slider-indicator.mui-segmented-control{ | ||
67 | background: #fff; | ||
68 | } | ||
69 | .mui-search.mui-active:before{ | ||
70 | left: 15px; | ||
71 | top:35px; | ||
72 | } | ||
73 | .mui-input-row.mui-search .mui-icon-clear{ | ||
74 | top: 16px; | ||
75 | right: 6px; | ||
76 | } | ||
77 | .search_head{ | ||
78 | padding:10px; | ||
79 | position: relative; | ||
80 | overflow: visible; | ||
81 | |||
82 | } | ||
83 | .search_head input[type="search"]{ | ||
84 | margin-bottom: 0 !important; | ||
85 | background: #fff; | ||
86 | } | ||
87 | .search_head .mui-placeholder{ | ||
88 | top: 10px; | ||
89 | } | ||
90 | |||
91 | /*通用的上拉刷新加载的样式*/ | ||
92 | html,body{ | ||
93 | background-color: #efeff4; | ||
94 | } | ||
95 | .mui-bar~.mui-content .mui-fullscreen { | ||
96 | top: 44px; | ||
97 | height: auto; | ||
98 | } | ||
99 | .mui-pull-top-tips { | ||
100 | position: absolute; | ||
101 | top: -20px; | ||
102 | left: 50%; | ||
103 | margin-left: -25px; | ||
104 | width: 40px; | ||
105 | height: 40px; | ||
106 | border-radius: 100%; | ||
107 | z-index: 1; | ||
108 | } | ||
109 | .mui-bar~.mui-pull-top-tips { | ||
110 | top: 24px; | ||
111 | } | ||
112 | .mui-pull-top-wrapper { | ||
113 | width: 42px; | ||
114 | height: 42px; | ||
115 | display: block; | ||
116 | text-align: center; | ||
117 | background-color: #efeff4; | ||
118 | border: 1px solid #ddd; | ||
119 | border-radius: 25px; | ||
120 | background-clip: padding-box; | ||
121 | box-shadow: 0 4px 10px #bbb; | ||
122 | overflow: hidden; | ||
123 | } | ||
124 | .mui-pull-top-tips.mui-transitioning { | ||
125 | -webkit-transition-duration: 200ms; | ||
126 | transition-duration: 200ms; | ||
127 | } | ||
128 | .mui-pull-top-tips .mui-pull-loading { | ||
129 | -webkit-backface-visibility: hidden; | ||
130 | -webkit-transition-duration: 400ms; | ||
131 | transition-duration: 400ms; | ||
132 | |||
133 | margin: 0; | ||
134 | } | ||
135 | .mui-pull-top-wrapper .mui-icon, | ||
136 | .mui-pull-top-wrapper .mui-spinner { | ||
137 | margin-top: 7px; | ||
138 | } | ||
139 | .mui-pull-top-wrapper .mui-icon.mui-reverse { | ||
140 | -webkit-transform: rotate(180deg) translateZ(0); | ||
141 | } | ||
142 | .mui-pull-bottom-tips { | ||
143 | text-align: center; | ||
144 | background-color: #efeff4; | ||
145 | font-size: 15px; | ||
146 | line-height: 40px; | ||
147 | color: #777; | ||
148 | } | ||
149 | .mui-pull-top-canvas { | ||
150 | overflow: hidden; | ||
151 | background-color: #fafafa; | ||
152 | border-radius: 40px; | ||
153 | box-shadow: 0 4px 10px #bbb; | ||
154 | width: 40px; | ||
155 | height: 40px; | ||
156 | margin: 0 auto; | ||
157 | } | ||
158 | .mui-pull-top-canvas canvas { | ||
159 | width: 40px; | ||
160 | } | ||
161 | |||
162 | |||
163 | /* 详情 通用 - 手风琴 */ | ||
164 | .detailRow .mui-input-group .mui-input-row{ | ||
165 | min-height:40px; | ||
166 | height:auto; | ||
167 | } | ||
168 | .detailRow_label{ | ||
169 | width:25%; | ||
170 | min-height:40px; | ||
171 | float: left; | ||
172 | padding:10px 0; | ||
173 | word-break: break-all; | ||
174 | } | ||
175 | .detailRow_content{ | ||
176 | width:55%; | ||
177 | min-height:40px; | ||
178 | float: left; | ||
179 | padding:10px 0; | ||
180 | word-break: break-all; | ||
181 | } | ||
182 | .detailRow_right{ | ||
183 | width:10%; | ||
184 | min-height:40px; | ||
185 | float: left; | ||
186 | padding:10px 0; | ||
187 | text-align: right; | ||
188 | font-size: 12px; | ||
189 | } | ||
190 | .head_minheight{ | ||
191 | min-height:auto; | ||
192 | padding:0; | ||
193 | } | ||
194 | |||
195 | /* 盘点列表详情覆盖 */ | ||
196 | .special_list .am-card.am-card-full,.special_list .scrollList-item{ | ||
197 | border: 0 !important; | ||
198 | } | ||
199 | .title_h3{ | ||
200 | padding:10px 12px 6px; | ||
201 | font-weight: normal; | ||
202 | font-size: 18px; | ||
203 | background: #fff; | ||
204 | border-left: 6px solid #EC971F; | ||
205 | } | ||
206 | #check_scroll1 { | ||
207 | top: 86px; | ||
208 | z-index: 1; | ||
209 | } | ||
210 | #check_scroll1 .mui-table-view:before{ | ||
211 | background: none!important; | ||
212 | } | ||
213 | #check_scroll1 .mui-table-view .mui-table-view-cell{ | ||
214 | padding: 0; | ||
215 | } |
fonts/mui-icons-extra.ttf
0 → 100644
No preview for this file type
fonts/mui.ttf
0 → 100644
No preview for this file type
images/icon_check_before_acceptance.png
0 → 100644

4.46 KB
images/icon_grounding.png
0 → 100644

5.95 KB
images/icon_inventory.png
0 → 100644

4.73 KB
images/icon_lower_frame.png
0 → 100644

5.92 KB
images/icon_move.png
0 → 100644

3.36 KB
images/icon_query.png
0 → 100644

8.4 KB
images/icon_trace.png
0 → 100644

3.5 KB
images/timg.gif
0 → 100644

562 KB
index.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> | ||
6 | <title></title> | ||
7 | <link rel="import" href="tpl/list.html" id="tests"/> | ||
8 | <script src="js/mui.js"></script> | ||
9 | <script src="js/template-web.js" type="text/javascript" charset="utf-8"></script> | ||
10 | <script src="js/utils.js" type="text/javascript" charset="utf-8"></script> | ||
11 | <link href="css/mui.min.css" rel="stylesheet"/> | ||
12 | </head> | ||
13 | <body> | ||
14 | <button type="button" data-loading-text="提交中" class="mui-btn" id="btn">确认</button> | ||
15 | <div id="refreshContainer"></div> | ||
16 | <div id="content"></div> | ||
17 | <script type="text/javascript" charset="utf-8"> | ||
18 | (function($, doc) { | ||
19 | $.init({ | ||
20 | statusBarBackground: '#f7f7f7', | ||
21 | // subpages:[{ | ||
22 | // url:your-subpage-url,//子页面HTML地址,支持本地地址和网络地址 | ||
23 | // id:your-subpage-id,//子页面标志 | ||
24 | // }] | ||
25 | pullRefresh : { | ||
26 | container:"#refreshContainer",//下拉刷新容器标识,querySelector能定位的css选择器均可,比如:id、.class等 | ||
27 | down : { | ||
28 | style:'circle',//必选,下拉刷新样式,目前支持原生5+ ‘circle’ 样式 | ||
29 | color:'#2BD009', //可选,默认“#2BD009” 下拉刷新控件颜色 | ||
30 | height:'50px',//可选,默认50px.下拉刷新控件的高度, | ||
31 | range:'100px', //可选 默认100px,控件可下拉拖拽的范围 | ||
32 | offset:'0px', //可选 默认0px,下拉刷新控件的起始位置 | ||
33 | auto: false,//可选,默认false.首次加载自动上拉刷新一次 | ||
34 | callback :function() { | ||
35 | console.log('call back!') | ||
36 | mui('#refreshContainer').pullRefresh().endPulldown(); | ||
37 | } //必选,刷新函数,根据具体业务来编写,比如通过ajax从服务器获取新数据; | ||
38 | } | ||
39 | } | ||
40 | }); | ||
41 | $.plusReady(function(){ | ||
42 | //console.log("当前页面URL:"+plus.webview.currentWebview().getURL()); | ||
43 | var btn = document.querySelector('#btn') | ||
44 | btn.addEventListener('tap', function() { | ||
45 | data.list.push('体育') | ||
46 | var html = template('demo', data); | ||
47 | document.getElementById('content').innerHTML = html; | ||
48 | }) | ||
49 | var data = { | ||
50 | title: '标签', | ||
51 | list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他'] | ||
52 | }; | ||
53 | var utils = new Utils(); | ||
54 | utils.appendModule('#tests'); | ||
55 | var html = template('demo', data); | ||
56 | document.getElementById('content').innerHTML = html; | ||
57 | }); | ||
58 | }(mui, document)) | ||
59 | </script> | ||
60 | </body> | ||
61 | </html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/common.js
0 → 100644
1 | (function(owner) { | ||
2 | |||
3 | var OWNER_TITLE_NVIEW = { | ||
4 | titleText: "标题栏", // 标题栏文字,当不设置此属性时,默认加载当前页面的标题,并自动更新页面的标题 | ||
5 | titleColor: "#fff", // 字体颜色,颜色值格式为"#RRGGBB",默认值为"#000000" | ||
6 | titleSize: "17px", // 字体大小,默认17px | ||
7 | backgroundColor: "#f2a11c", // 控件背景颜色,颜色值格式为"#RRGGBB",默认值为"#F7F7F7" | ||
8 | progress: { // 标题栏控件的进度条样式 | ||
9 | color: "#f2a11c", // 进度条颜色,默认值为"#00FF00" | ||
10 | height: "2px" // 进度条高度,默认值为"2px" | ||
11 | }, | ||
12 | splitLine: { // 标题栏控件的底部分割线,类似borderBottom | ||
13 | color: "#CCCCCC", // 分割线颜色,默认值为"#CCCCCC" | ||
14 | height: "1px" // 分割线高度,默认值为"2px" | ||
15 | }, | ||
16 | autoBackButton: true, | ||
17 | } | ||
18 | |||
19 | //打开常规窗口 | ||
20 | owner.openwin = function (id, argu, titleNView) { | ||
21 | var nview = Object.assign({}, OWNER_TITLE_NVIEW, titleNView) | ||
22 | if(titleNView){ | ||
23 | if(titleNView.isScan){ | ||
24 | nview.buttons = [{ | ||
25 | "float": "right", | ||
26 | "text": "扫一扫", | ||
27 | "fontSize": "10px", | ||
28 | "onclick": clicked | ||
29 | }] | ||
30 | } | ||
31 | mui.openWindow({ | ||
32 | url: id + '.html', | ||
33 | id: id, | ||
34 | show: { | ||
35 | aniShow: 'none' | ||
36 | }, | ||
37 | styles: { | ||
38 | titleNView: nview | ||
39 | }, | ||
40 | createNew: false, | ||
41 | waiting: { | ||
42 | autoShow: true | ||
43 | }, | ||
44 | extras: ( argu && typeof argu === 'object' ) ? argu : JSON.parse(argu) | ||
45 | }); | ||
46 | }else{ | ||
47 | mui.openWindow({ | ||
48 | url: id + '.html', | ||
49 | id: id, | ||
50 | show: { | ||
51 | aniShow: 'none' | ||
52 | }, | ||
53 | createNew: false, | ||
54 | waiting: { | ||
55 | autoShow: true | ||
56 | }, | ||
57 | extras: ( argu && typeof argu === 'object' ) ? argu : JSON.parse(argu) | ||
58 | }); | ||
59 | } | ||
60 | |||
61 | } | ||
62 | |||
63 | function getParents(id) { | ||
64 | try { | ||
65 | var self = plus.webview.currentWebview(); | ||
66 | var obj = self.opener(); | ||
67 | var ret = []; | ||
68 | while (obj) { | ||
69 | if (obj.id == id) { | ||
70 | return ret; | ||
71 | } else { | ||
72 | ret.push(obj.id); | ||
73 | obj = obj.opener(); | ||
74 | } | ||
75 | } | ||
76 | } catch (e) { } | ||
77 | return []; | ||
78 | } | ||
79 | |||
80 | |||
81 | //到某个窗口 | ||
82 | owner.gotowin = function (id, argu, titleNView) { | ||
83 | var obj = plus.webview.getWebviewById(id) | ||
84 | if (obj) { | ||
85 | var arr = getParents(id); | ||
86 | if (arr.length > 0) { | ||
87 | owner.openwin(id, argu, titleNView); | ||
88 | var self = plus.webview.currentWebview(); | ||
89 | setTimeout(function(){ | ||
90 | for (var i = 0; i < arr.length; i++) { | ||
91 | plus.webview.getWebviewById(arr[i]).close(arr[i]); | ||
92 | } | ||
93 | self.close(); | ||
94 | },600); | ||
95 | } else { | ||
96 | owner.openwin(id, argu, titleNView); | ||
97 | } | ||
98 | } else { | ||
99 | owner.openwin(id, argu, titleNView); | ||
100 | } | ||
101 | } | ||
102 | |||
103 | |||
104 | //获取网络模式 | ||
105 | owner.getNetwork = function() { | ||
106 | var networkTypes = {}; | ||
107 | networkTypes[plus.networkinfo.CONNECTION_UNKNOW] = "未知"; | ||
108 | networkTypes[plus.networkinfo.CONNECTION_NONE] = "未连接网络"; | ||
109 | networkTypes[plus.networkinfo.CONNECTION_ETHERNET] = "有线网络"; | ||
110 | networkTypes[plus.networkinfo.CONNECTION_WIFI] = "wifi网络"; | ||
111 | networkTypes[plus.networkinfo.CONNECTION_CELL2G] = "2G蜂窝网络"; | ||
112 | networkTypes[plus.networkinfo.CONNECTION_CELL3G] = "3G蜂窝网络"; | ||
113 | networkTypes[plus.networkinfo.CONNECTION_CELL4G] = "4G蜂窝网络"; | ||
114 | return networkTypes[plus.networkinfo.getCurrentType()]; | ||
115 | } | ||
116 | |||
117 | //禁止输入非数字字符 | ||
118 | owner.banString = function(that) { | ||
119 | var str = that.value; | ||
120 | var str1 = str.substr(str.length - 1, str.length); | ||
121 | if(isNaN(str1)) { | ||
122 | that.value = str.slice(0, str.length - 1) | ||
123 | } | ||
124 | } | ||
125 | |||
126 | //禁止输入字符 | ||
127 | owner.banother = function(that) { | ||
128 | var str = that.value; | ||
129 | var str1 = str.substr(str.length - 1, str.length) | ||
130 | |||
131 | if(!/^([a-zA-Z0-9]{1,18})$/.test(str1)) { | ||
132 | that.value = str.slice(0, str.length - 1) | ||
133 | } | ||
134 | } | ||
135 | |||
136 | //禁止输入数字字符以及其他无用的字符 | ||
137 | owner.banNum = function(that) { | ||
138 | var str = that.value; | ||
139 | var str1 = str.substr(str.length - 1, str.length) | ||
140 | |||
141 | if(!isNaN(str1) || !/^([a-zA-Z\u4e00-\u9fa5\ ]{1,10})$/.test(str1)) { | ||
142 | that.value = str.slice(0, str.length - 1) | ||
143 | } | ||
144 | } | ||
145 | |||
146 | //禁止输入数字字符以及其他无用的字符 | ||
147 | owner.cn = function(that) { | ||
148 | var str = that.value; | ||
149 | var str1 = str.substr(str.length - 1, str.length) | ||
150 | if(!/^([a-z\u4e00-\u9fa5\ ]{1,10})$/.test(str1)) { | ||
151 | that.value = str.slice(0, str.length - 1) | ||
152 | } | ||
153 | } | ||
154 | |||
155 | // 压缩图片 | ||
156 | owner.compressImage = function(path, fn, obj) { | ||
157 | try { | ||
158 | var img = new Image(); | ||
159 | img.src = path; // 传过来的图片路径在这里用。 | ||
160 | obj || (obj = {}); | ||
161 | var needWid = obj.width || 200; | ||
162 | img.onload = function() { | ||
163 | var that = this; | ||
164 | //生成比例 | ||
165 | var w = that.width, | ||
166 | h = that.height, | ||
167 | scale = w / h; | ||
168 | w = needWid || w; //480 你想压缩到多大,改这里 | ||
169 | h = w / scale; | ||
170 | |||
171 | //生成canvas | ||
172 | var canvas = document.createElement('canvas'); | ||
173 | var ctx = canvas.getContext('2d'); | ||
174 | canvas.setAttribute("width", w) | ||
175 | canvas.setAttribute("height", h) | ||
176 | |||
177 | ctx.drawImage(that, 0, 0, w, h); | ||
178 | console.log("进入压缩") | ||
179 | var base64 = canvas.toDataURL('images/jpeg', 1 || 0.8); //1最清晰,越低越模糊。有一点不清楚这里明明设置的是jpeg。弹出 base64 开头的一段 data:image/png;却是png。哎开心就好,开心就好 | ||
180 | f1 = base64; // 把base64数据丢过去,上传要用。 | ||
181 | var bitMap = new plus.nativeObj.Bitmap('picObj'); | ||
182 | bitMap.loadBase64Data(f1, function() { | ||
183 | bitMap.save(path, {}, | ||
184 | function(i) { | ||
185 | console.log('保存图片成功:' + JSON.stringify(i)); | ||
186 | try { | ||
187 | fn(); | ||
188 | } catch(e) {} | ||
189 | }, | ||
190 | function(e) { | ||
191 | console.log('保存图片失败:' + JSON.stringify(e)); | ||
192 | }); | ||
193 | }); | ||
194 | return base64; | ||
195 | } | ||
196 | } catch(ex) {} | ||
197 | } | ||
198 | //过滤表情 | ||
199 | owner.filteremoji = function(ori) { | ||
200 | try { | ||
201 | var regStr = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig; | ||
202 | var ret = ori.replace(regStr, ''); | ||
203 | var hasEmoji = (ori.length > ret.length); | ||
204 | ret = ret.replace(/(^\s*)|(\s*$)/g, ""); | ||
205 | try { | ||
206 | if(hasEmoji) { | ||
207 | mui.toast("不支持输入表情"); | ||
208 | } | ||
209 | } catch(ex) {} | ||
210 | return ret; | ||
211 | } catch(e) {} | ||
212 | return ori; | ||
213 | } | ||
214 | owner.debounce = function(fn, delay){ | ||
215 | console.log(fn) | ||
216 | let timer = null; | ||
217 | return function() { | ||
218 | // 通过 ‘this’ 和 ‘arguments’ 获取函数的作用域和变量 | ||
219 | let context = this; | ||
220 | let args = arguments; | ||
221 | clearTimeout(timer); | ||
222 | timer = setTimeout(function() { | ||
223 | fn.apply(context, args); | ||
224 | }, delay); | ||
225 | } | ||
226 | } | ||
227 | })(window.common = {}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/jquery.min.js
0 → 100644
1 | /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license | ||
2 | //@ sourceMappingURL=jquery.min.map | ||
3 | */ | ||
4 | (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t | ||
5 | }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); | ||
6 | u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window); |
js/mui.js
0 → 100644
This diff could not be displayed because it is too large.
js/mui.min.js
0 → 100644
This diff could not be displayed because it is too large.
js/mui.picker.min.js
0 → 100644
1 | /** | ||
2 | * 选择列表插件 | ||
3 | * varstion 2.0.0 | ||
4 | * by Houfeng | ||
5 | * Houfeng@DCloud.io | ||
6 | **/ | ||
7 | !function(e,t,i,n){var a=30,r=90,s=40,c=10,l=e.rad2deg=function(e){return e/(Math.PI/180)},o=(e.deg2rad=function(e){return e*(Math.PI/180)},navigator.platform.toLowerCase()),d=navigator.userAgent.toLowerCase(),u=(d.indexOf("iphone")>-1||d.indexOf("ipad")>-1||d.indexOf("ipod")>-1)&&(o.indexOf("iphone")>-1||o.indexOf("ipad")>-1||o.indexOf("ipod")>-1),p=e.Picker=function(e,t){var i=this;i.holder=e,i.options=t||{},i.init(),i.initInertiaParams(),i.calcElementItemPostion(!0),i.bindEvent()};p.prototype.findElementItems=function(){var e=this;return e.elementItems=[].slice.call(e.holder.querySelectorAll("li")),e.elementItems},p.prototype.init=function(){var e=this;e.list=e.holder.querySelector("ul"),e.findElementItems(),e.height=e.holder.offsetHeight,e.r=e.height/2-c,e.d=2*e.r,e.itemHeight=e.elementItems.length>0?e.elementItems[0].offsetHeight:s,e.itemAngle=parseInt(e.calcAngle(.8*e.itemHeight)),e.hightlightRange=e.itemAngle/2,e.visibleRange=r,e.beginAngle=0,e.beginExceed=e.beginAngle-a,e.list.angle=e.beginAngle,u&&(e.list.style.webkitTransformOrigin="center center "+e.r+"px")},p.prototype.calcElementItemPostion=function(e){var t=this;e&&(t.items=[]),t.elementItems.forEach(function(i){var n=t.elementItems.indexOf(i);if(t.endAngle=t.itemAngle*n,i.angle=t.endAngle,i.style.webkitTransformOrigin="center center -"+t.r+"px",i.style.webkitTransform="translateZ("+t.r+"px) rotateX("+-t.endAngle+"deg)",e){var a={};a.text=i.innerHTML||"",a.value=i.getAttribute("data-value")||a.text,t.items.push(a)}}),t.endExceed=t.endAngle+a,t.calcElementItemVisibility(t.beginAngle)},p.prototype.calcAngle=function(e){var t=this,i=b=parseFloat(t.r);e=Math.abs(e);var n=180*parseInt(e/t.d);e%=t.d;var a=(i*i+b*b-e*e)/(2*i*b),r=n+l(Math.acos(a));return r},p.prototype.calcElementItemVisibility=function(e){var t=this;t.elementItems.forEach(function(i){var n=Math.abs(i.angle-e);n<t.hightlightRange?i.classList.add("highlight"):n<t.visibleRange?(i.classList.add("visible"),i.classList.remove("highlight")):(i.classList.remove("highlight"),i.classList.remove("visible"))})},p.prototype.setAngle=function(e){var t=this;t.list.angle=e,t.list.style.webkitTransform="perspective(1000px) rotateY(0deg) rotateX("+e+"deg)",t.calcElementItemVisibility(e)},p.prototype.bindEvent=function(){var t=this,i=0,n=null,a=!1;t.holder.addEventListener(e.EVENT_START,function(e){a=!0,e.preventDefault(),t.list.style.webkitTransition="",n=(e.changedTouches?e.changedTouches[0]:e).pageY,i=t.list.angle,t.updateInertiaParams(e,!0)},!1),t.holder.addEventListener(e.EVENT_END,function(e){a=!1,e.preventDefault(),t.startInertiaScroll(e)},!1),t.holder.addEventListener(e.EVENT_CANCEL,function(e){a=!1,e.preventDefault(),t.startInertiaScroll(e)},!1),t.holder.addEventListener(e.EVENT_MOVE,function(e){if(a){e.preventDefault();var r=(e.changedTouches?e.changedTouches[0]:e).pageY,s=r-n,c=t.calcAngle(s),l=s>0?i-c:i+c;l>t.endExceed&&(l=t.endExceed),l<t.beginExceed&&(l=t.beginExceed),t.setAngle(l),t.updateInertiaParams(e)}},!1),t.list.addEventListener("tap",function(e){elementItem=e.target,"LI"==elementItem.tagName&&t.setSelectedIndex(t.elementItems.indexOf(elementItem),200)},!1)},p.prototype.initInertiaParams=function(){var e=this;e.lastMoveTime=0,e.lastMoveStart=0,e.stopInertiaMove=!1},p.prototype.updateInertiaParams=function(e,t){var i=this,n=e.changedTouches?e.changedTouches[0]:e;if(t)i.lastMoveStart=n.pageY,i.lastMoveTime=e.timeStamp||Date.now(),i.startAngle=i.list.angle;else{var a=e.timeStamp||Date.now();a-i.lastMoveTime>300&&(i.lastMoveTime=a,i.lastMoveStart=n.pageY)}i.stopInertiaMove=!0},p.prototype.startInertiaScroll=function(e){var t=this,i=e.changedTouches?e.changedTouches[0]:e,n=e.timeStamp||Date.now(),a=(i.pageY-t.lastMoveStart)/(n-t.lastMoveTime),r=a>0?-1:1,s=6e-4*r*-1,c=Math.abs(a/s),l=a*c/2,o=t.list.angle,d=t.calcAngle(l)*r,u=d;return o+d<t.beginExceed&&(d=t.beginExceed-o,c=c*(d/u)*.6),o+d>t.endExceed&&(d=t.endExceed-o,c=c*(d/u)*.6),0==d?void t.endScroll():void t.scrollDistAngle(n,o,d,c)},p.prototype.scrollDistAngle=function(e,t,i,n){var a=this;a.stopInertiaMove=!1,function(e,t,i,n){var r=13,s=n/r,c=0;!function l(){if(!a.stopInertiaMove){var e=a.quartEaseOut(c,t,i,s);return a.setAngle(e),c++,c>s-1||e<a.beginExceed||e>a.endExceed?void a.endScroll():void setTimeout(l,r)}}()}(e,t,i,n)},p.prototype.quartEaseOut=function(e,t,i,n){return-i*((e=e/n-1)*e*e*e-1)+t},p.prototype.endScroll=function(){var e=this;if(e.list.angle<e.beginAngle)e.list.style.webkitTransition="150ms ease-out",e.setAngle(e.beginAngle);else if(e.list.angle>e.endAngle)e.list.style.webkitTransition="150ms ease-out",e.setAngle(e.endAngle);else{var t=parseInt((e.list.angle/e.itemAngle).toFixed(0));e.list.style.webkitTransition="100ms ease-out",e.setAngle(e.itemAngle*t)}e.triggerChange()},p.prototype.triggerChange=function(t){var i=this;setTimeout(function(){var n=i.getSelectedIndex(),a=i.items[n];!e.trigger||n==i.lastIndex&&t!==!0||e.trigger(i.holder,"change",{index:n,item:a}),i.lastIndex=n,"function"==typeof t&&t()},0)},p.prototype.correctAngle=function(e){var t=this;return e<t.beginAngle?t.beginAngle:e>t.endAngle?t.endAngle:e},p.prototype.setItems=function(e){var t=this;t.items=e||[];var i=[];t.items.forEach(function(e){null!==e&&e!==n&&i.push("<li>"+(e.text||e)+"</li>")}),t.list.innerHTML=i.join(""),t.findElementItems(),t.calcElementItemPostion(),t.setAngle(t.correctAngle(t.list.angle)),t.triggerChange(!0)},p.prototype.getItems=function(){var e=this;return e.items},p.prototype.getSelectedIndex=function(){var e=this;return parseInt((e.list.angle/e.itemAngle).toFixed(0))},p.prototype.setSelectedIndex=function(e,t,i){var n=this;n.list.style.webkitTransition="";var a=n.correctAngle(n.itemAngle*e);if(t&&t>0){var r=a-n.list.angle;n.scrollDistAngle(Date.now(),n.list.angle,r,t)}else n.setAngle(a);n.triggerChange(i)},p.prototype.getSelectedItem=function(){var e=this;return e.items[e.getSelectedIndex()]},p.prototype.getSelectedValue=function(){var e=this;return(e.items[e.getSelectedIndex()]||{}).value},p.prototype.getSelectedText=function(){var e=this;return(e.items[e.getSelectedIndex()]||{}).text},p.prototype.setSelectedValue=function(e,t,i){var n=this;for(var a in n.items){var r=n.items[a];if(r.value==e)return void n.setSelectedIndex(a,t,i)}},e.fn&&(e.fn.picker=function(e){return this.each(function(t,i){if(!i.picker)if(e)i.picker=new p(i,e);else{var n=i.getAttribute("data-picker-options"),a=n?JSON.parse(n):{};i.picker=new p(i,a)}}),this[0]?this[0].picker:null},e.ready(function(){e(".mui-picker").picker()}))}(window.mui||window,window,document,void 0),function(e,t){e.dom=function(i){return"string"!=typeof i?i instanceof Array||i[0]&&i.length?[].slice.call(i):[i]:(e.__create_dom_div__||(e.__create_dom_div__=t.createElement("div")),e.__create_dom_div__.innerHTML=i,[].slice.call(e.__create_dom_div__.childNodes))};var i='<div class="mui-poppicker"> <div class="mui-poppicker-header"> <button class="mui-btn mui-poppicker-btn-cancel">取消</button> <button class="mui-btn mui-btn-blue mui-poppicker-btn-ok">确定</button> <div class="mui-poppicker-clear"></div> </div> <div class="mui-poppicker-body"> </div> </div>',n='<div class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div>';e.PopPicker=e.Class.extend({init:function(n){var a=this;a.options=n||{},a.options.buttons=a.options.buttons||["取消","确定"],a.panel=e.dom(i)[0],t.body.appendChild(a.panel),a.ok=a.panel.querySelector(".mui-poppicker-btn-ok"),a.cancel=a.panel.querySelector(".mui-poppicker-btn-cancel"),a.body=a.panel.querySelector(".mui-poppicker-body"),a.mask=e.createMask(),a.cancel.innerText=a.options.buttons[0],a.ok.innerText=a.options.buttons[1],a.cancel.addEventListener("tap",function(e){a.hide()},!1),a.ok.addEventListener("tap",function(e){if(a.callback){var t=a.callback(a.getSelectedItems());t!==!1&&a.hide()}},!1),a.mask[0].addEventListener("tap",function(){a.hide()},!1),a._createPicker(),a.panel.addEventListener(e.EVENT_START,function(e){e.preventDefault()},!1),a.panel.addEventListener(e.EVENT_MOVE,function(e){e.preventDefault()},!1)},_createPicker:function(){var t=this,i=t.options.layer||1,a=100/i+"%";t.pickers=[];for(var r=1;i>=r;r++){var s=e.dom(n)[0];s.style.width=a,t.body.appendChild(s);var c=e(s).picker();t.pickers.push(c),s.addEventListener("change",function(e){var t=this.nextSibling;if(t&&t.picker){var i=e.detail||{},n=i.item||{};t.picker.setItems(n.children)}},!1)}},setData:function(e){var t=this;e=e||[],t.pickers[0].setItems(e)},getSelectedItems:function(){var e=this,t=[];for(var i in e.pickers){var n=e.pickers[i];t.push(n.getSelectedItem()||{})}return t},show:function(i){var n=this;n.callback=i,n.mask.show(),t.body.classList.add(e.className("poppicker-active-for-page")),n.panel.classList.add(e.className("active")),n.__back=e.back,e.back=function(){n.hide()}},hide:function(){var i=this;i.disposed||(i.panel.classList.remove(e.className("active")),i.mask.close(),t.body.classList.remove(e.className("poppicker-active-for-page")),e.back=i.__back)},dispose:function(){var e=this;e.hide(),setTimeout(function(){e.panel.parentNode.removeChild(e.panel);for(var t in e)e[t]=null,delete e[t];e.disposed=!0},300)}})}(mui,document),function(e,t){e.dom=function(i){return"string"!=typeof i?i instanceof Array||i[0]&&i.length?[].slice.call(i):[i]:(e.__create_dom_div__||(e.__create_dom_div__=t.createElement("div")),e.__create_dom_div__.innerHTML=i,[].slice.call(e.__create_dom_div__.childNodes))};var i='<div class="mui-dtpicker" data-type="datetime"> <div class="mui-dtpicker-header"> <button data-id="btn-cancel" class="mui-btn">取消</button> <button data-id="btn-ok" class="mui-btn mui-btn-blue">确定</button> </div> <div class="mui-dtpicker-title"><h5 data-id="title-y">年</h5><h5 data-id="title-m">月</h5><h5 data-id="title-d">日</h5><h5 data-id="title-h">时</h5><h5 data-id="title-i">分</h5></div> <div class="mui-dtpicker-body"> <div data-id="picker-y" class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div> <div data-id="picker-m" class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div> <div data-id="picker-d" class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div> <div data-id="picker-h" class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div> <div data-id="picker-i" class="mui-picker"> <div class="mui-picker-inner"> <div class="mui-pciker-rule mui-pciker-rule-ft"></div> <ul class="mui-pciker-list"> </ul> <div class="mui-pciker-rule mui-pciker-rule-bg"></div> </div> </div> </div> </div>';e.DtPicker=e.Class.extend({init:function(n){var a=this,r=e.dom(i)[0];t.body.appendChild(r),e('[data-id*="picker"]',r).picker();var s=a.ui={picker:r,mask:e.createMask(),ok:e('[data-id="btn-ok"]',r)[0],cancel:e('[data-id="btn-cancel"]',r)[0],y:e('[data-id="picker-y"]',r)[0],m:e('[data-id="picker-m"]',r)[0],d:e('[data-id="picker-d"]',r)[0],h:e('[data-id="picker-h"]',r)[0],i:e('[data-id="picker-i"]',r)[0],labels:e('[data-id*="title-"]',r)};s.cancel.addEventListener("tap",function(){a.hide()},!1),s.ok.addEventListener("tap",function(){var e=a.callback(a.getSelected());e!==!1&&a.hide()},!1),s.y.addEventListener("change",function(e){a.options.beginMonth||a.options.endMonth?a._createMonth():a._createDay()},!1),s.m.addEventListener("change",function(e){a._createDay()},!1),s.d.addEventListener("change",function(e){(a.options.beginMonth||a.options.endMonth)&&a._createHours()},!1),s.h.addEventListener("change",function(e){(a.options.beginMonth||a.options.endMonth)&&a._createMinutes()},!1),s.mask[0].addEventListener("tap",function(){a.hide()},!1),a._create(n),a.ui.picker.addEventListener(e.EVENT_START,function(e){e.preventDefault()},!1),a.ui.picker.addEventListener(e.EVENT_MOVE,function(e){e.preventDefault()},!1)},getSelected:function(){var e=this,t=e.ui,i=e.options.type,n={type:i,y:t.y.picker.getSelectedItem(),m:t.m.picker.getSelectedItem(),d:t.d.picker.getSelectedItem(),h:t.h.picker.getSelectedItem(),i:t.i.picker.getSelectedItem(),toString:function(){return this.value}};switch(i){case"datetime":n.value=n.y.value+"-"+n.m.value+"-"+n.d.value+" "+n.h.value+":"+n.i.value,n.text=n.y.text+"-"+n.m.text+"-"+n.d.text+" "+n.h.text+":"+n.i.text;break;case"date":n.value=n.y.value+"-"+n.m.value+"-"+n.d.value,n.text=n.y.text+"-"+n.m.text+"-"+n.d.text;break;case"time":n.value=n.h.value+":"+n.i.value,n.text=n.h.text+":"+n.i.text;break;case"month":n.value=n.y.value+"-"+n.m.value,n.text=n.y.text+"-"+n.m.text;break;case"hour":n.value=n.y.value+"-"+n.m.value+"-"+n.d.value+" "+n.h.value,n.text=n.y.text+"-"+n.m.text+"-"+n.d.text+" "+n.h.text}return n},setSelectedValue:function(e){var t=this,i=t.ui,n=t._parseValue(e);i.y.picker.setSelectedValue(n.y,0,function(){i.m.picker.setSelectedValue(n.m,0,function(){i.d.picker.setSelectedValue(n.d,0,function(){i.h.picker.setSelectedValue(n.h,0,function(){i.i.picker.setSelectedValue(n.i,0)})})})})},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},_inArray:function(e,t){for(var i in e){var n=e[i];if(n===t)return!0}return!1},getDayNum:function(e,t){var i=this;return i._inArray([1,3,5,7,8,10,12],t)?31:i._inArray([4,6,9,11],t)?30:i.isLeapYear(e)?29:28},_fill:function(e){return e=e.toString(),e.length<2&&(e=0+e),e},_isBeginYear:function(){return this.options.beginYear===parseInt(this.ui.y.picker.getSelectedValue())},_isBeginMonth:function(){return this.options.beginMonth&&this._isBeginYear()&&this.options.beginMonth===parseInt(this.ui.m.picker.getSelectedValue())},_isBeginDay:function(){return this._isBeginMonth()&&this.options.beginDay===parseInt(this.ui.d.picker.getSelectedValue())},_isBeginHours:function(){return this._isBeginDay()&&this.options.beginHours===parseInt(this.ui.h.picker.getSelectedValue())},_isEndYear:function(){return this.options.endYear===parseInt(this.ui.y.picker.getSelectedValue())},_isEndMonth:function(){return this.options.endMonth&&this._isEndYear()&&this.options.endMonth===parseInt(this.ui.m.picker.getSelectedValue())},_isEndDay:function(){return this._isEndMonth()&&this.options.endDay===parseInt(this.ui.d.picker.getSelectedValue())},_isEndHours:function(){return this._isEndDay()&&this.options.endHours===parseInt(this.ui.h.picker.getSelectedValue())},_createYear:function(e){var t=this,i=t.options,n=t.ui,a=[];if(i.customData.y)a=i.customData.y;else for(var r=i.beginYear,s=i.endYear,c=r;s>=c;c++)a.push({text:c+"",value:c});n.y.picker.setItems(a)},_createMonth:function(e){var t=this,i=t.options,n=t.ui,a=[];if(i.customData.m)a=i.customData.m;else for(var r=i.beginMonth&&t._isBeginYear()?i.beginMonth:1,s=i.endMonth&&t._isEndYear()?i.endMonth:12;s>=r;r++){var c=t._fill(r);a.push({text:c,value:c})}n.m.picker.setItems(a)},_createDay:function(e){var t=this,i=t.options,n=t.ui,a=[];if(i.customData.d)a=i.customData.d;else for(var r=t._isBeginMonth()?i.beginDay:1,s=t._isEndMonth()?i.endDay:t.getDayNum(parseInt(this.ui.y.picker.getSelectedValue()),parseInt(this.ui.m.picker.getSelectedValue()));s>=r;r++){var c=t._fill(r);a.push({text:c,value:c})}n.d.picker.setItems(a),e=e||n.d.picker.getSelectedValue()},_createHours:function(e){var t=this,i=t.options,n=t.ui,a=[];if(i.customData.h)a=i.customData.h;else for(var r=t._isBeginDay()?i.beginHours:0,s=t._isEndDay()?i.endHours:23;s>=r;r++){var c=t._fill(r);a.push({text:c,value:c})}n.h.picker.setItems(a)},_createMinutes:function(e){var t=this,i=t.options,n=t.ui,a=[];if(i.customData.i)a=i.customData.i;else for(var r=t._isBeginHours()?i.beginMinutes:0,s=t._isEndHours()?i.endMinutes:59;s>=r;r++){var c=t._fill(r);a.push({text:c,value:c})}n.i.picker.setItems(a)},_setLabels:function(){var e=this,t=e.options,i=e.ui;i.labels.each(function(e,i){i.innerText=t.labels[e]})},_setButtons:function(){var e=this,t=e.options,i=e.ui;i.cancel.innerText=t.buttons[0],i.ok.innerText=t.buttons[1]},_parseValue:function(e){var t={};if(e){var i=e.replace(":","-").replace(" ","-").split("-");t.y=i[0],t.m=i[1],t.d=i[2],t.h=i[3],t.i=i[4]}else{var n=new Date;t.y=n.getFullYear(),t.m=n.getMonth()+1,t.d=n.getDate(),t.h=n.getHours(),t.i=n.getMinutes()}return t},_create:function(e){var t=this;e=e||{},e.labels=e.labels||["年","月","日","时","分"],e.buttons=e.buttons||["取消","确定"],e.type=e.type||"datetime",e.customData=e.customData||{},t.options=e;var i=new Date,n=e.beginDate;n instanceof Date&&!isNaN(n.valueOf())&&(e.beginYear=n.getFullYear(),e.beginMonth=n.getMonth()+1,e.beginDay=n.getDate(),e.beginHours=n.getHours(),e.beginMinutes=n.getMinutes());var a=e.endDate;a instanceof Date&&!isNaN(a.valueOf())&&(e.endYear=a.getFullYear(),e.endMonth=a.getMonth()+1,e.endDay=a.getDate(),e.endHours=a.getHours(),e.endMinutes=a.getMinutes()),e.beginYear=e.beginYear||i.getFullYear()-5,e.endYear=e.endYear||i.getFullYear()+5;var r=t.ui;t._setLabels(),t._setButtons(),r.picker.setAttribute("data-type",e.type),t._createYear(),t._createMonth(),t._createDay(),t._createHours(),t._createMinutes(),t.setSelectedValue(e.value)},show:function(i){var n=this,a=n.ui;n.callback=i||e.noop,a.mask.show(),t.body.classList.add(e.className("dtpicker-active-for-page")),a.picker.classList.add(e.className("active")),n.__back=e.back,e.back=function(){n.hide()}},hide:function(){var i=this;if(!i.disposed){var n=i.ui;n.picker.classList.remove(e.className("active")),n.mask.close(),t.body.classList.remove(e.className("dtpicker-active-for-page")),e.back=i.__back}},dispose:function(){var e=this;e.hide(),setTimeout(function(){e.ui.picker.parentNode.removeChild(e.ui.picker);for(var t in e)e[t]=null,delete e[t];e.disposed=!0},300)}})}(mui,document); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/mui.pullToRefresh.js
0 → 100644
1 | (function($, window, document) { | ||
2 | var STATE_BEFORECHANGEOFFSET = 'beforeChangeOffset'; | ||
3 | var STATE_AFTERCHANGEOFFSET = 'afterChangeOffset'; | ||
4 | |||
5 | var EVENT_PULLSTART = 'pullstart'; | ||
6 | var EVENT_PULLING = 'pulling'; | ||
7 | var EVENT_BEFORECHANGEOFFSET = STATE_BEFORECHANGEOFFSET; | ||
8 | var EVENT_AFTERCHANGEOFFSET = STATE_AFTERCHANGEOFFSET; | ||
9 | var EVENT_DRAGENDAFTERCHANGEOFFSET = 'dragEndAfterChangeOffset'; | ||
10 | |||
11 | var CLASS_TRANSITIONING = $.className('transitioning'); | ||
12 | var CLASS_PULL_TOP_TIPS = $.className('pull-top-tips'); | ||
13 | var CLASS_PULL_BOTTOM_TIPS = $.className('pull-bottom-tips'); | ||
14 | var CLASS_PULL_LOADING = $.className('pull-loading'); | ||
15 | var CLASS_SCROLL = $.className('scroll'); | ||
16 | |||
17 | var CLASS_PULL_TOP_ARROW = $.className('pull-loading') + ' ' + $.className('icon') + ' ' + $.className('icon-pulldown'); | ||
18 | var CLASS_PULL_TOP_ARROW_REVERSE = CLASS_PULL_TOP_ARROW + ' ' + $.className('reverse'); | ||
19 | var CLASS_PULL_TOP_SPINNER = $.className('pull-loading') + ' ' + $.className('spinner'); | ||
20 | var CLASS_HIDDEN = $.className('hidden'); | ||
21 | |||
22 | var SELECTOR_PULL_LOADING = '.' + CLASS_PULL_LOADING; | ||
23 | $.PullToRefresh = $.Class.extend({ | ||
24 | init: function(element, options) { | ||
25 | this.element = element; | ||
26 | this.options = $.extend(true, { | ||
27 | down: { | ||
28 | height: 75, | ||
29 | callback: false, | ||
30 | }, | ||
31 | up: { | ||
32 | auto: false, | ||
33 | offset: 100, //距离底部高度(到达该高度即触发) | ||
34 | show: true, | ||
35 | contentinit: '上拉显示更多', | ||
36 | contentdown: '上拉显示更多', | ||
37 | contentrefresh: '正在加载...', | ||
38 | contentnomore: '没有更多数据了', | ||
39 | callback: false | ||
40 | }, | ||
41 | preventDefaultException: { | ||
42 | tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ | ||
43 | } | ||
44 | }, options); | ||
45 | this.stopped = this.isNeedRefresh = this.isDragging = false; | ||
46 | this.state = STATE_BEFORECHANGEOFFSET; | ||
47 | this.isInScroll = this.element.classList.contains(CLASS_SCROLL); | ||
48 | this.initPullUpTips(); | ||
49 | |||
50 | this.initEvent(); | ||
51 | }, | ||
52 | _preventDefaultException: function(el, exceptions) { | ||
53 | for (var i in exceptions) { | ||
54 | if (exceptions[i].test(el[i])) { | ||
55 | return true; | ||
56 | } | ||
57 | } | ||
58 | return false; | ||
59 | }, | ||
60 | initEvent: function() { | ||
61 | if ($.isFunction(this.options.down.callback)) { | ||
62 | this.element.addEventListener($.EVENT_START, this); | ||
63 | this.element.addEventListener('drag', this); | ||
64 | this.element.addEventListener('dragend', this); | ||
65 | } | ||
66 | if (this.pullUpTips) { | ||
67 | this.element.addEventListener('dragup', this); | ||
68 | if (this.isInScroll) { | ||
69 | this.element.addEventListener('scrollbottom', this); | ||
70 | } else { | ||
71 | window.addEventListener('scroll', this); | ||
72 | } | ||
73 | } | ||
74 | }, | ||
75 | handleEvent: function(e) { | ||
76 | switch (e.type) { | ||
77 | case $.EVENT_START: | ||
78 | this.isInScroll && this._canPullDown() && e.target && !this._preventDefaultException(e.target, this.options.preventDefaultException) && e.preventDefault(); | ||
79 | break; | ||
80 | case 'drag': | ||
81 | this._drag(e); | ||
82 | break; | ||
83 | case 'dragend': | ||
84 | this._dragend(e); | ||
85 | break; | ||
86 | case 'webkitTransitionEnd': | ||
87 | this._transitionEnd(e); | ||
88 | break; | ||
89 | case 'dragup': | ||
90 | case 'scroll': | ||
91 | this._dragup(e); | ||
92 | break; | ||
93 | case 'scrollbottom': | ||
94 | if (e.target === this.element) { | ||
95 | this.pullUpLoading(e); | ||
96 | } | ||
97 | break; | ||
98 | } | ||
99 | }, | ||
100 | initPullDownTips: function() { | ||
101 | var self = this; | ||
102 | if ($.isFunction(self.options.down.callback)) { | ||
103 | self.pullDownTips = (function() { | ||
104 | var element = document.querySelector('.' + CLASS_PULL_TOP_TIPS); | ||
105 | if (element) { | ||
106 | element.parentNode.removeChild(element); | ||
107 | } | ||
108 | if (!element) { | ||
109 | element = document.createElement('div'); | ||
110 | element.classList.add(CLASS_PULL_TOP_TIPS); | ||
111 | element.innerHTML = '<div class="mui-pull-top-wrapper"><span class="mui-pull-loading mui-icon mui-icon-pulldown"></span></div>'; | ||
112 | element.addEventListener('webkitTransitionEnd', self); | ||
113 | } | ||
114 | self.pullDownTipsIcon = element.querySelector(SELECTOR_PULL_LOADING); | ||
115 | document.body.appendChild(element); | ||
116 | return element; | ||
117 | }()); | ||
118 | } | ||
119 | }, | ||
120 | initPullUpTips: function() { | ||
121 | var self = this; | ||
122 | if ($.isFunction(self.options.up.callback)) { | ||
123 | self.pullUpTips = (function() { | ||
124 | var element = self.element.querySelector('.' + CLASS_PULL_BOTTOM_TIPS); | ||
125 | if (!element) { | ||
126 | element = document.createElement('div'); | ||
127 | element.classList.add(CLASS_PULL_BOTTOM_TIPS); | ||
128 | if (!self.options.up.show) { | ||
129 | element.classList.add(CLASS_HIDDEN); | ||
130 | } | ||
131 | element.innerHTML = '<div class="mui-pull-bottom-wrapper"><span class="mui-pull-loading">' + self.options.up.contentinit + '</span></div>'; | ||
132 | self.element.appendChild(element); | ||
133 | } | ||
134 | self.pullUpTipsIcon = element.querySelector(SELECTOR_PULL_LOADING); | ||
135 | return element; | ||
136 | }()); | ||
137 | } | ||
138 | }, | ||
139 | _transitionEnd: function(e) { | ||
140 | if (e.target === this.pullDownTips && this.removing) { | ||
141 | this.removePullDownTips(); | ||
142 | } | ||
143 | }, | ||
144 | _dragup: function(e) { | ||
145 | var self = this; | ||
146 | if (self.loading) { | ||
147 | return; | ||
148 | } | ||
149 | if (e && e.detail && $.gestures.session.drag) { | ||
150 | self.isDraggingUp = true; | ||
151 | } else { | ||
152 | if (!self.isDraggingUp) { //scroll event | ||
153 | return; | ||
154 | } | ||
155 | } | ||
156 | if (!self.isDragging) { | ||
157 | if (self._canPullUp()) { | ||
158 | self.pullUpLoading(e); | ||
159 | } | ||
160 | } | ||
161 | }, | ||
162 | _canPullUp: function() { | ||
163 | if (this.removing) { | ||
164 | return false; | ||
165 | } | ||
166 | if (this.isInScroll) { | ||
167 | var scrollId = this.element.parentNode.getAttribute('data-scroll'); | ||
168 | if (scrollId) { | ||
169 | var scrollApi = $.data[scrollId]; | ||
170 | return scrollApi.y === scrollApi.maxScrollY; | ||
171 | } | ||
172 | } | ||
173 | return window.pageYOffset + window.innerHeight + this.options.up.offset >= document.documentElement.scrollHeight; | ||
174 | }, | ||
175 | _canPullDown: function() { | ||
176 | if (this.removing) { | ||
177 | return false; | ||
178 | } | ||
179 | if (this.isInScroll) { | ||
180 | var scrollId = this.element.parentNode.getAttribute('data-scroll'); | ||
181 | if (scrollId) { | ||
182 | var scrollApi = $.data[scrollId]; | ||
183 | return scrollApi.y === 0; | ||
184 | } | ||
185 | } | ||
186 | return document.body.scrollTop === 0; | ||
187 | }, | ||
188 | _drag: function(e) { | ||
189 | if (this.loading || this.stopped) { | ||
190 | e.stopPropagation(); | ||
191 | e.detail.gesture.preventDefault(); | ||
192 | return; | ||
193 | } | ||
194 | var detail = e.detail; | ||
195 | if (!this.isDragging) { | ||
196 | if (detail.direction === 'down' && this._canPullDown()) { | ||
197 | if (document.querySelector('.' + CLASS_PULL_TOP_TIPS)) { | ||
198 | e.stopPropagation(); | ||
199 | e.detail.gesture.preventDefault(); | ||
200 | return; | ||
201 | } | ||
202 | this.isDragging = true; | ||
203 | this.removing = false; | ||
204 | this.startDeltaY = detail.deltaY; | ||
205 | $.gestures.session.lockDirection = true; //锁定方向 | ||
206 | $.gestures.session.startDirection = detail.direction; | ||
207 | this._pullStart(this.startDeltaY); | ||
208 | } | ||
209 | } | ||
210 | if (this.isDragging) { | ||
211 | e.stopPropagation(); | ||
212 | e.detail.gesture.preventDefault(); | ||
213 | var deltaY = detail.deltaY - this.startDeltaY; | ||
214 | deltaY = Math.min(deltaY, 1.5 * this.options.down.height); | ||
215 | this.deltaY = deltaY; | ||
216 | this._pulling(deltaY); | ||
217 | var state = deltaY > this.options.down.height ? STATE_AFTERCHANGEOFFSET : STATE_BEFORECHANGEOFFSET; | ||
218 | if (this.state !== state) { | ||
219 | this.state = state; | ||
220 | if (this.state === STATE_AFTERCHANGEOFFSET) { | ||
221 | this.removing = false; | ||
222 | this.isNeedRefresh = true; | ||
223 | } else { | ||
224 | this.removing = true; | ||
225 | this.isNeedRefresh = false; | ||
226 | } | ||
227 | this['_' + state](deltaY); | ||
228 | } | ||
229 | if ($.os.ios && parseFloat($.os.version) >= 8) { | ||
230 | var clientY = detail.gesture.touches[0].clientY; | ||
231 | if ((clientY + 10) > window.innerHeight || clientY < 10) { | ||
232 | this._dragend(e); | ||
233 | return; | ||
234 | } | ||
235 | } | ||
236 | } | ||
237 | }, | ||
238 | _dragend: function(e) { | ||
239 | var self = this; | ||
240 | if (self.isDragging) { | ||
241 | self.isDragging = false; | ||
242 | self._dragEndAfterChangeOffset(self.isNeedRefresh); | ||
243 | } | ||
244 | if (self.isPullingUp) { | ||
245 | if (self.pullingUpTimeout) { | ||
246 | clearTimeout(self.pullingUpTimeout); | ||
247 | } | ||
248 | self.pullingUpTimeout = setTimeout(function() { | ||
249 | self.isPullingUp = false; | ||
250 | }, 1000); | ||
251 | } | ||
252 | }, | ||
253 | _pullStart: function(startDeltaY) { | ||
254 | this.pullStart(startDeltaY); | ||
255 | $.trigger(this.element, EVENT_PULLSTART, { | ||
256 | api: this, | ||
257 | startDeltaY: startDeltaY | ||
258 | }); | ||
259 | }, | ||
260 | _pulling: function(deltaY) { | ||
261 | this.pulling(deltaY); | ||
262 | $.trigger(this.element, EVENT_PULLING, { | ||
263 | api: this, | ||
264 | deltaY: deltaY | ||
265 | }); | ||
266 | }, | ||
267 | _beforeChangeOffset: function(deltaY) { | ||
268 | this.beforeChangeOffset(deltaY); | ||
269 | $.trigger(this.element, EVENT_BEFORECHANGEOFFSET, { | ||
270 | api: this, | ||
271 | deltaY: deltaY | ||
272 | }); | ||
273 | }, | ||
274 | _afterChangeOffset: function(deltaY) { | ||
275 | this.afterChangeOffset(deltaY); | ||
276 | $.trigger(this.element, EVENT_AFTERCHANGEOFFSET, { | ||
277 | api: this, | ||
278 | deltaY: deltaY | ||
279 | }); | ||
280 | }, | ||
281 | _dragEndAfterChangeOffset: function(isNeedRefresh) { | ||
282 | this.dragEndAfterChangeOffset(isNeedRefresh); | ||
283 | $.trigger(this.element, EVENT_DRAGENDAFTERCHANGEOFFSET, { | ||
284 | api: this, | ||
285 | isNeedRefresh: isNeedRefresh | ||
286 | }); | ||
287 | }, | ||
288 | removePullDownTips: function() { | ||
289 | if (this.pullDownTips) { | ||
290 | try { | ||
291 | this.pullDownTips.parentNode && this.pullDownTips.parentNode.removeChild(this.pullDownTips); | ||
292 | this.pullDownTips = null; | ||
293 | this.removing = false; | ||
294 | } catch (e) {} | ||
295 | } | ||
296 | }, | ||
297 | pullStart: function(startDeltaY) { | ||
298 | this.initPullDownTips(startDeltaY); | ||
299 | }, | ||
300 | pulling: function(deltaY) { | ||
301 | this.pullDownTips.style.webkitTransform = 'translate3d(0,' + deltaY + 'px,0)'; | ||
302 | }, | ||
303 | beforeChangeOffset: function(deltaY) { | ||
304 | this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW; | ||
305 | }, | ||
306 | afterChangeOffset: function(deltaY) { | ||
307 | this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW_REVERSE; | ||
308 | }, | ||
309 | dragEndAfterChangeOffset: function(isNeedRefresh) { | ||
310 | if (isNeedRefresh) { | ||
311 | this.pullDownTipsIcon.className = CLASS_PULL_TOP_SPINNER; | ||
312 | this.pullDownLoading(); | ||
313 | } else { | ||
314 | this.pullDownTipsIcon.className = CLASS_PULL_TOP_ARROW; | ||
315 | this.endPullDownToRefresh(); | ||
316 | } | ||
317 | }, | ||
318 | pullDownLoading: function() { | ||
319 | if (this.loading) { | ||
320 | return; | ||
321 | } | ||
322 | if (!this.pullDownTips) { | ||
323 | this.initPullDownTips(); | ||
324 | this.dragEndAfterChangeOffset(true); | ||
325 | return; | ||
326 | } | ||
327 | this.loading = true; | ||
328 | this.pullDownTips.classList.add(CLASS_TRANSITIONING); | ||
329 | this.pullDownTips.style.webkitTransform = 'translate3d(0,' + this.options.down.height + 'px,0)'; | ||
330 | this.options.down.callback.apply(this); | ||
331 | }, | ||
332 | pullUpLoading: function(e) { | ||
333 | if (this.loading || this.finished) { | ||
334 | return; | ||
335 | } | ||
336 | this.loading = true; | ||
337 | this.isDraggingUp = false; | ||
338 | this.pullUpTips.classList.remove(CLASS_HIDDEN); | ||
339 | e && e.detail && e.detail.gesture && e.detail.gesture.preventDefault(); | ||
340 | this.pullUpTipsIcon.innerHTML = this.options.up.contentrefresh; | ||
341 | this.options.up.callback.apply(this); | ||
342 | }, | ||
343 | endPullDownToRefresh: function() { | ||
344 | this.loading = false; | ||
345 | this.pullUpTips && this.pullUpTips.classList.remove(CLASS_HIDDEN); | ||
346 | this.pullDownTips.classList.add(CLASS_TRANSITIONING); | ||
347 | this.pullDownTips.style.webkitTransform = 'translate3d(0,0,0)'; | ||
348 | if (this.deltaY <= 0) { | ||
349 | this.removePullDownTips(); | ||
350 | } else { | ||
351 | this.removing = true; | ||
352 | } | ||
353 | if (this.isInScroll) { | ||
354 | $(this.element.parentNode).scroll().refresh(); | ||
355 | } | ||
356 | }, | ||
357 | endPullUpToRefresh: function(finished) { | ||
358 | if (finished) { | ||
359 | this.finished = true; | ||
360 | this.pullUpTipsIcon.innerHTML = this.options.up.contentnomore; | ||
361 | this.element.removeEventListener('dragup', this); | ||
362 | window.removeEventListener('scroll', this); | ||
363 | } else { | ||
364 | this.pullUpTipsIcon.innerHTML = this.options.up.contentdown; | ||
365 | } | ||
366 | this.loading = false; | ||
367 | if (this.isInScroll) { | ||
368 | $(this.element.parentNode).scroll().refresh(); | ||
369 | } | ||
370 | }, | ||
371 | setStopped: function(stopped) { | ||
372 | if (stopped != this.stopped) { | ||
373 | this.stopped = stopped; | ||
374 | this.pullUpTips && this.pullUpTips.classList[stopped ? 'add' : 'remove'](CLASS_HIDDEN); | ||
375 | } | ||
376 | }, | ||
377 | refresh: function(isReset) { | ||
378 | if (isReset && this.finished && this.pullUpTipsIcon) { | ||
379 | this.pullUpTipsIcon.innerHTML = this.options.up.contentdown; | ||
380 | this.element.addEventListener('dragup', this); | ||
381 | window.addEventListener('scroll', this); | ||
382 | this.finished = false; | ||
383 | } | ||
384 | } | ||
385 | }); | ||
386 | $.fn.pullToRefresh = function(options) { | ||
387 | var pullRefreshApis = []; | ||
388 | options = options || {}; | ||
389 | this.each(function() { | ||
390 | var self = this; | ||
391 | var pullRefreshApi = null; | ||
392 | var id = self.getAttribute('data-pullToRefresh'); | ||
393 | if (!id) { | ||
394 | id = ++$.uuid; | ||
395 | $.data[id] = pullRefreshApi = new $.PullToRefresh(self, options); | ||
396 | self.setAttribute('data-pullToRefresh', id); | ||
397 | } else { | ||
398 | pullRefreshApi = $.data[id]; | ||
399 | } | ||
400 | if (options.up && options.up.auto) { //如果设置了auto,则自动上拉一次 | ||
401 | pullRefreshApi.pullUpLoading(); | ||
402 | } | ||
403 | pullRefreshApis.push(pullRefreshApi); | ||
404 | }); | ||
405 | return pullRefreshApis.length === 1 ? pullRefreshApis[0] : pullRefreshApis; | ||
406 | } | ||
407 | })(mui, window, document); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/mui.pullToRefresh.material.js
0 → 100644
1 | (function($) { | ||
2 | var CLASS_PULL_TOP_TIPS = $.className('pull-top-tips'); | ||
3 | |||
4 | $.PullToRefresh = $.PullToRefresh.extend({ | ||
5 | init: function(element, options) { | ||
6 | this._super(element, options); | ||
7 | this.options = $.extend(true, { | ||
8 | down: { | ||
9 | tips: { | ||
10 | colors: ['008000', 'd8ad44', 'd00324', 'dc00b8', '017efc'], | ||
11 | size: 200, //width=height=size;x=y=size/2;radius=size/4 | ||
12 | lineWidth: 15, | ||
13 | duration: 1000, | ||
14 | tail_duration: 1000 * 2.5 | ||
15 | } | ||
16 | } | ||
17 | }, this.options); | ||
18 | this.options.down.tips.color = this.options.down.tips.colors[0]; | ||
19 | this.options.down.tips.colors = this.options.down.tips.colors.map(function(color) { | ||
20 | return { | ||
21 | r: parseInt(color.substring(0, 2), 16), | ||
22 | g: parseInt(color.substring(2, 4), 16), | ||
23 | b: parseInt(color.substring(4, 6), 16) | ||
24 | }; | ||
25 | }); | ||
26 | }, | ||
27 | initPullDownTips: function() { | ||
28 | var self = this; | ||
29 | if ($.isFunction(self.options.down.callback)) { | ||
30 | self.pullDownTips = (function() { | ||
31 | var element = document.querySelector('.' + CLASS_PULL_TOP_TIPS); | ||
32 | if (element) { | ||
33 | element.parentNode.removeChild(element); | ||
34 | } | ||
35 | if (!element) { | ||
36 | element = document.createElement('div'); | ||
37 | element.classList.add(CLASS_PULL_TOP_TIPS); | ||
38 | element.innerHTML = '<div class="mui-pull-top-wrapper"><div class="mui-pull-top-canvas"><canvas id="pullDownTips" width="' + self.options.down.tips.size + '" height="' + self.options.down.tips.size + '"></canvas></div></div>'; | ||
39 | element.addEventListener('webkitTransitionEnd', self); | ||
40 | document.body.appendChild(element); | ||
41 | } | ||
42 | self.pullDownCanvas = document.getElementById("pullDownTips"); | ||
43 | self.pullDownCanvasCtx = self.pullDownCanvas.getContext('2d'); | ||
44 | self.canvasUtils.init(self.pullDownCanvas, self.options.down.tips); | ||
45 | return element; | ||
46 | }()); | ||
47 | } | ||
48 | }, | ||
49 | removePullDownTips: function() { | ||
50 | this._super(); | ||
51 | this.canvasUtils.stopSpin(); | ||
52 | }, | ||
53 | pulling: function(deltaY) { | ||
54 | var ratio = Math.min(deltaY / (this.options.down.height * 1.5), 1); | ||
55 | var ratioPI = Math.min(1, ratio * 2); | ||
56 | this.pullDownTips.style.webkitTransform = 'translate3d(0,' + (deltaY < 0 ? 0 : deltaY) + 'px,0)'; | ||
57 | this.pullDownCanvas.style.opacity = ratioPI; | ||
58 | this.pullDownCanvas.style.webkitTransform = 'rotate(' + 300 * ratio + 'deg)'; | ||
59 | var canvas = this.pullDownCanvas; | ||
60 | var ctx = this.pullDownCanvasCtx; | ||
61 | var size = this.options.down.tips.size; | ||
62 | ctx.lineWidth = this.options.down.tips.lineWidth; | ||
63 | ctx.fillStyle = '#' + this.options.down.tips.color; | ||
64 | ctx.strokeStyle = '#' + this.options.down.tips.color; | ||
65 | ctx.stroke(); | ||
66 | ctx.clearRect(0, 0, size, size); | ||
67 | //fixed android 4.1.x | ||
68 | canvas.style.display = 'none'; // Detach from DOM | ||
69 | canvas.offsetHeight; // Force the detach | ||
70 | canvas.style.display = 'inherit'; // Reattach to DOM | ||
71 | this.canvasUtils.drawArcedArrow(ctx, size / 2 + 0.5, size / 2, size / 4, 0 * Math.PI, 5 / 3 * Math.PI * ratioPI, false, 1, 2, 0.7853981633974483, 25, this.options.down.tips.lineWidth, this.options.down.tips.lineWidth); | ||
72 | }, | ||
73 | |||
74 | beforeChangeOffset: function(deltaY) {}, | ||
75 | afterChangeOffset: function(deltaY) {}, | ||
76 | dragEndAfterChangeOffset: function(isNeedRefresh) { | ||
77 | if (isNeedRefresh) { | ||
78 | this.canvasUtils.startSpin(); | ||
79 | this.pullDownLoading(); | ||
80 | } else { | ||
81 | this.canvasUtils.stopSpin(); | ||
82 | this.endPullDownToRefresh(); | ||
83 | } | ||
84 | }, | ||
85 | canvasUtils: (function() { | ||
86 | var canvasObj = null, | ||
87 | ctx = null, | ||
88 | size = 200, | ||
89 | lineWidth = 15, | ||
90 | tick = 0, | ||
91 | startTime = 0, | ||
92 | frameTime = 0, | ||
93 | timeLast = 0, | ||
94 | oldStep = 0, | ||
95 | acc = 0, | ||
96 | head = 0, | ||
97 | tail = 180, | ||
98 | rad = Math.PI / 180, | ||
99 | duration = 1000, | ||
100 | tail_duration = 1000 * 2.5, | ||
101 | colors = ['35ad0e', 'd8ad44', 'd00324', 'dc00b8', '017efc'], | ||
102 | rAF = null; | ||
103 | |||
104 | function easeLinear(currentIteration, startValue, changeInValue, totalIterations) { | ||
105 | return changeInValue * currentIteration / totalIterations + startValue; | ||
106 | } | ||
107 | |||
108 | function easeInOutQuad(currentIteration, startValue, changeInValue, totalIterations) { | ||
109 | if ((currentIteration /= totalIterations / 2) < 1) { | ||
110 | return changeInValue / 2 * currentIteration * currentIteration + startValue; | ||
111 | } | ||
112 | return -changeInValue / 2 * ((--currentIteration) * (currentIteration - 2) - 1) + startValue; | ||
113 | } | ||
114 | |||
115 | function minmax(value, v0, v1) { | ||
116 | var min = Math.min(v0, v1); | ||
117 | var max = Math.max(v0, v1); | ||
118 | if (value < min) | ||
119 | return min; | ||
120 | if (value > max) | ||
121 | return min; | ||
122 | return value; | ||
123 | } | ||
124 | var drawHead = function(ctx, x0, y0, x1, y1, x2, y2, style) { | ||
125 | 'use strict'; | ||
126 | if (typeof(x0) == 'string') x0 = parseInt(x0); | ||
127 | if (typeof(y0) == 'string') y0 = parseInt(y0); | ||
128 | if (typeof(x1) == 'string') x1 = parseInt(x1); | ||
129 | if (typeof(y1) == 'string') y1 = parseInt(y1); | ||
130 | if (typeof(x2) == 'string') x2 = parseInt(x2); | ||
131 | if (typeof(y2) == 'string') y2 = parseInt(y2); | ||
132 | var radius = 3; | ||
133 | var twoPI = 2 * Math.PI; | ||
134 | ctx.save(); | ||
135 | ctx.beginPath(); | ||
136 | ctx.moveTo(x0, y0); | ||
137 | ctx.lineTo(x1, y1); | ||
138 | ctx.lineTo(x2, y2); | ||
139 | switch (style) { | ||
140 | case 0: | ||
141 | var backdist = Math.sqrt(((x2 - x0) * (x2 - x0)) + ((y2 - y0) * (y2 - y0))); | ||
142 | ctx.arcTo(x1, y1, x0, y0, .55 * backdist); | ||
143 | ctx.fill(); | ||
144 | break; | ||
145 | case 1: | ||
146 | ctx.beginPath(); | ||
147 | ctx.moveTo(x0, y0); | ||
148 | ctx.lineTo(x1, y1); | ||
149 | ctx.lineTo(x2, y2); | ||
150 | ctx.lineTo(x0, y0); | ||
151 | ctx.fill(); | ||
152 | break; | ||
153 | case 2: | ||
154 | ctx.stroke(); | ||
155 | break; | ||
156 | case 3: | ||
157 | var cpx = (x0 + x1 + x2) / 3; | ||
158 | var cpy = (y0 + y1 + y2) / 3; | ||
159 | ctx.quadraticCurveTo(cpx, cpy, x0, y0); | ||
160 | ctx.fill(); | ||
161 | break; | ||
162 | case 4: | ||
163 | var cp1x, cp1y, cp2x, cp2y, backdist; | ||
164 | var shiftamt = 5; | ||
165 | if (x2 == x0) { | ||
166 | backdist = y2 - y0; | ||
167 | cp1x = (x1 + x0) / 2; | ||
168 | cp2x = (x1 + x0) / 2; | ||
169 | cp1y = y1 + backdist / shiftamt; | ||
170 | cp2y = y1 - backdist / shiftamt; | ||
171 | } else { | ||
172 | backdist = Math.sqrt(((x2 - x0) * (x2 - x0)) + ((y2 - y0) * (y2 - y0))); | ||
173 | var xback = (x0 + x2) / 2; | ||
174 | var yback = (y0 + y2) / 2; | ||
175 | var xmid = (xback + x1) / 2; | ||
176 | var ymid = (yback + y1) / 2; | ||
177 | var m = (y2 - y0) / (x2 - x0); | ||
178 | var dx = (backdist / (2 * Math.sqrt(m * m + 1))) / shiftamt; | ||
179 | var dy = m * dx; | ||
180 | cp1x = xmid - dx; | ||
181 | cp1y = ymid - dy; | ||
182 | cp2x = xmid + dx; | ||
183 | cp2y = ymid + dy; | ||
184 | } | ||
185 | ctx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x0, y0); | ||
186 | ctx.fill(); | ||
187 | break; | ||
188 | } | ||
189 | ctx.restore(); | ||
190 | }; | ||
191 | var drawArcedArrow = function(ctx, x, y, r, startangle, endangle, anticlockwise, style, which, angle, d, lineWidth, lineRatio) { | ||
192 | 'use strict'; | ||
193 | style = typeof(style) != 'undefined' ? style : 3; | ||
194 | which = typeof(which) != 'undefined' ? which : 1; | ||
195 | angle = typeof(angle) != 'undefined' ? angle : Math.PI / 8; | ||
196 | lineWidth = lineWidth || 1; | ||
197 | lineRatio = lineRatio || 10; | ||
198 | d = typeof(d) != 'undefined' ? d : 10; | ||
199 | ctx.save(); | ||
200 | ctx.lineWidth = lineWidth; | ||
201 | ctx.beginPath(); | ||
202 | ctx.arc(x, y, r, startangle, endangle, anticlockwise); | ||
203 | ctx.stroke(); | ||
204 | var sx, sy, lineangle, destx, desty; | ||
205 | if (which & 1) { | ||
206 | sx = Math.cos(startangle) * r + x; | ||
207 | sy = Math.sin(startangle) * r + y; | ||
208 | lineangle = Math.atan2(x - sx, sy - y); | ||
209 | if (anticlockwise) { | ||
210 | destx = sx + 10 * Math.cos(lineangle); | ||
211 | desty = sy + 10 * Math.sin(lineangle); | ||
212 | } else { | ||
213 | destx = sx - 10 * Math.cos(lineangle); | ||
214 | desty = sy - 10 * Math.sin(lineangle); | ||
215 | } | ||
216 | drawArrow(ctx, sx, sy, destx, desty, style, 2, angle, d); | ||
217 | } | ||
218 | if (which & 2) { | ||
219 | sx = Math.cos(endangle) * r + x; | ||
220 | sy = Math.sin(endangle) * r + y; | ||
221 | lineangle = Math.atan2(x - sx, sy - y); | ||
222 | if (anticlockwise) { | ||
223 | destx = sx - 10 * Math.cos(lineangle); | ||
224 | desty = sy - 10 * Math.sin(lineangle); | ||
225 | } else { | ||
226 | destx = sx + 10 * Math.cos(lineangle); | ||
227 | desty = sy + 10 * Math.sin(lineangle); | ||
228 | } | ||
229 | drawArrow(ctx, sx - lineRatio * Math.sin(endangle), sy + lineRatio * Math.cos(endangle), destx - lineRatio * Math.sin(endangle), desty + lineRatio * Math.cos(endangle), style, 2, angle, d) | ||
230 | } | ||
231 | ctx.restore(); | ||
232 | } | ||
233 | var drawArrow = function(ctx, x1, y1, x2, y2, style, which, angle, d) { | ||
234 | 'use strict'; | ||
235 | if (typeof(x1) == 'string') x1 = parseInt(x1); | ||
236 | if (typeof(y1) == 'string') y1 = parseInt(y1); | ||
237 | if (typeof(x2) == 'string') x2 = parseInt(x2); | ||
238 | if (typeof(y2) == 'string') y2 = parseInt(y2); | ||
239 | style = typeof(style) != 'undefined' ? style : 3; | ||
240 | which = typeof(which) != 'undefined' ? which : 1; | ||
241 | angle = typeof(angle) != 'undefined' ? angle : Math.PI / 8; | ||
242 | d = typeof(d) != 'undefined' ? d : 10; | ||
243 | var toDrawHead = typeof(style) != 'function' ? drawHead : style; | ||
244 | var dist = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); | ||
245 | var ratio = (dist - d / 3) / dist; | ||
246 | var tox, toy, fromx, fromy; | ||
247 | if (which & 1) { | ||
248 | tox = Math.round(x1 + (x2 - x1) * ratio); | ||
249 | toy = Math.round(y1 + (y2 - y1) * ratio); | ||
250 | } else { | ||
251 | tox = x2; | ||
252 | toy = y2; | ||
253 | } | ||
254 | if (which & 2) { | ||
255 | fromx = x1 + (x2 - x1) * (1 - ratio); | ||
256 | fromy = y1 + (y2 - y1) * (1 - ratio); | ||
257 | } else { | ||
258 | fromx = x1; | ||
259 | fromy = y1; | ||
260 | } | ||
261 | ctx.beginPath(); | ||
262 | ctx.moveTo(fromx, fromy); | ||
263 | ctx.lineTo(tox, toy); | ||
264 | ctx.stroke(); | ||
265 | var lineangle = Math.atan2(y2 - y1, x2 - x1); | ||
266 | var h = Math.abs(d / Math.cos(angle)); | ||
267 | if (which & 1) { | ||
268 | var angle1 = lineangle + Math.PI + angle; | ||
269 | var topx = x2 + Math.cos(angle1) * h; | ||
270 | var topy = y2 + Math.sin(angle1) * h; | ||
271 | var angle2 = lineangle + Math.PI - angle; | ||
272 | var botx = x2 + Math.cos(angle2) * h; | ||
273 | var boty = y2 + Math.sin(angle2) * h; | ||
274 | toDrawHead(ctx, topx, topy, x2, y2, botx, boty, style); | ||
275 | } | ||
276 | if (which & 2) { | ||
277 | var angle1 = lineangle + angle; | ||
278 | var topx = x1 + Math.cos(angle1) * h; | ||
279 | var topy = y1 + Math.sin(angle1) * h; | ||
280 | var angle2 = lineangle - angle; | ||
281 | var botx = x1 + Math.cos(angle2) * h; | ||
282 | var boty = y1 + Math.sin(angle2) * h; | ||
283 | toDrawHead(ctx, topx, topy, x1, y1, botx, boty, style); | ||
284 | } | ||
285 | }; | ||
286 | |||
287 | var spinColors = function(currentIteration, totalIterations) { | ||
288 | var step = currentIteration % totalIterations; | ||
289 | if (step < oldStep) | ||
290 | colors.push(colors.shift()); | ||
291 | var c0 = colors[0], | ||
292 | c1 = colors[1], | ||
293 | r = minmax(easeLinear(step, c0.r, c1.r - c0.r, totalIterations), c0.r, c1.r), | ||
294 | g = minmax(easeLinear(step, c0.g, c1.g - c0.g, totalIterations), c0.g, c1.g), | ||
295 | b = minmax(easeLinear(step, c0.b, c1.b - c0.b, totalIterations), c0.b, c1.b); | ||
296 | |||
297 | oldStep = step; | ||
298 | return "rgb(" + parseInt(r) + "," + parseInt(g) + "," + parseInt(b) + ")"; | ||
299 | } | ||
300 | |||
301 | var spin = function(t) { | ||
302 | var timeCurrent = t || (new Date).getTime(); | ||
303 | if (!startTime) { | ||
304 | startTime = timeCurrent; | ||
305 | } | ||
306 | tick = timeCurrent - startTime; | ||
307 | acc = easeInOutQuad((tick + tail_duration / 2) % tail_duration, 0, duration, tail_duration); | ||
308 | head = easeLinear((tick + acc) % duration, 0, 360, duration); | ||
309 | tail = 20 + Math.abs(easeLinear((tick + tail_duration / 2) % tail_duration, -300, 600, tail_duration)); | ||
310 | |||
311 | ctx.lineWidth = lineWidth; | ||
312 | ctx.lineCap = "round"; | ||
313 | |||
314 | ctx.strokeStyle = spinColors(tick, duration); | ||
315 | ctx.clearRect(0, 0, size, size); | ||
316 | //fixed android 4.1.x | ||
317 | canvasObj.style.display = 'none'; // Detach from DOM | ||
318 | canvasObj.offsetHeight; // Force the detach | ||
319 | canvasObj.style.display = 'inherit'; // Reattach to DOM | ||
320 | ctx.beginPath(); | ||
321 | ctx.arc(size / 2, size / 2, size / 4, parseInt(head - tail) % 360 * rad, parseInt(head) % 360 * rad, false); | ||
322 | ctx.stroke(); | ||
323 | |||
324 | rAF = requestAnimationFrame(spin); | ||
325 | }; | ||
326 | var startSpin = function() { | ||
327 | startTime = 0; | ||
328 | oldStep = 0; | ||
329 | rAF = requestAnimationFrame(spin); | ||
330 | }; | ||
331 | var stopSpin = function() { | ||
332 | rAF && cancelAnimationFrame(rAF); | ||
333 | } | ||
334 | var init = function(canvas, options) { | ||
335 | canvasObj = canvas; | ||
336 | ctx = canvasObj.getContext('2d'); | ||
337 | var options = $.extend(true, {}, options); | ||
338 | colors = options.colors; | ||
339 | duration = options.duration; | ||
340 | tail_duration = options.tail_duration; | ||
341 | size = options.size; | ||
342 | lineWidth = options.lineWidth; | ||
343 | }; | ||
344 | return { | ||
345 | init: init, | ||
346 | drawArcedArrow: drawArcedArrow, | ||
347 | startSpin: startSpin, | ||
348 | stopSpin: stopSpin | ||
349 | }; | ||
350 | })() | ||
351 | }); | ||
352 | })(mui); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/qrcode.js
0 → 100644
1 | (function(w){ | ||
2 | // 空函数 | ||
3 | function shield(){ | ||
4 | return false; | ||
5 | } | ||
6 | document.addEventListener('touchstart',shield,false);//取消浏览器的所有事件,使得active的样式在手机上正常生效 | ||
7 | document.oncontextmenu=shield;//屏蔽选择函数 | ||
8 | // H5 plus事件处理 | ||
9 | var ws=null,as='pop-in'; | ||
10 | function plusReady(){ | ||
11 | ws=plus.webview.currentWebview(); | ||
12 | // Android处理返回键 | ||
13 | plus.key.addEventListener('backbutton',function(){ | ||
14 | back(); | ||
15 | },false); | ||
16 | compatibleAdjust(); | ||
17 | } | ||
18 | if(w.plus){ | ||
19 | plusReady(); | ||
20 | }else{ | ||
21 | document.addEventListener('plusready',plusReady,false); | ||
22 | } | ||
23 | // DOMContentLoaded事件处理 | ||
24 | var domready=false; | ||
25 | document.addEventListener('DOMContentLoaded',function(){ | ||
26 | domready=true; | ||
27 | gInit(); | ||
28 | document.body.onselectstart=shield; | ||
29 | compatibleAdjust(); | ||
30 | },false); | ||
31 | // 处理返回事件 | ||
32 | w.back=function(hide){ | ||
33 | if(w.plus){ | ||
34 | ws||(ws=plus.webview.currentWebview()); | ||
35 | if(hide||ws.preate){ | ||
36 | ws.hide('auto'); | ||
37 | }else{ | ||
38 | ws.close('auto'); | ||
39 | } | ||
40 | }else if(history.length>1){ | ||
41 | history.back(); | ||
42 | }else{ | ||
43 | w.close(); | ||
44 | } | ||
45 | }; | ||
46 | // 处理点击事件 | ||
47 | var openw=null,waiting=null; | ||
48 | /** | ||
49 | * 打开新窗口 | ||
50 | * @param {URIString} id : 要打开页面url | ||
51 | * @param {boolean} wa : 是否显示等待框 | ||
52 | * @param {boolean} ns : 是否不自动显示 | ||
53 | * @param {JSON} ws : Webview窗口属性 | ||
54 | */ | ||
55 | w.clicked=function(id,wa,ns,ws){ | ||
56 | if(openw){//避免多次打开同一个页面 | ||
57 | return null; | ||
58 | } | ||
59 | if(w.plus){ | ||
60 | wa&&(waiting=plus.nativeUI.showWaiting()); | ||
61 | ws=ws||{}; | ||
62 | ws.scrollIndicator||(ws.scrollIndicator='none'); | ||
63 | ws.scalable||(ws.scalable=false); | ||
64 | var pre=''; | ||
65 | openw=plus.webview.create(pre+id,id,ws); | ||
66 | console.log('openw=plus.webview.create(pre+id,id,ws);'); | ||
67 | ns||openw.addEventListener('loaded',function(){//页面加载完成后才显示 | ||
68 | // setTimeout(function(){//延后显示可避免低端机上动画时白屏 | ||
69 | openw.show(as); | ||
70 | closeWaiting(); | ||
71 | // },200); | ||
72 | },false); | ||
73 | openw.addEventListener('close',function(){//页面关闭后可再次打开 | ||
74 | openw=null; | ||
75 | },false); | ||
76 | return openw; | ||
77 | }else{ | ||
78 | console.log('w.open(id);'); | ||
79 | w.open(id); | ||
80 | } | ||
81 | return null; | ||
82 | }; | ||
83 | w.openDoc=function(t,c){ | ||
84 | var d=plus.webview.getWebviewById('document'); | ||
85 | if(d){ | ||
86 | d.evalJS('updateDoc("'+t+'","'+c+'")'); | ||
87 | }else{ | ||
88 | d=plus.webview.create('/plus/doc.html','document',{zindex:9999,popGesture:'hide'},{preate:true}); | ||
89 | d.addEventListener('loaded',function(){ | ||
90 | d.evalJS('updateDoc("'+t+'","'+c+'")'); | ||
91 | },false); | ||
92 | } | ||
93 | } | ||
94 | /** | ||
95 | * 关闭等待框 | ||
96 | */ | ||
97 | w.closeWaiting=function(){ | ||
98 | waiting&&waiting.close(); | ||
99 | waiting=null; | ||
100 | } | ||
101 | // 兼容性样式调整 | ||
102 | var adjust=false; | ||
103 | function compatibleAdjust(){ | ||
104 | if(adjust||!w.plus||!domready){ | ||
105 | return; | ||
106 | } // iOS平台使用滚动的div | ||
107 | if('iOS'==plus.os.name){ | ||
108 | var t=document.getElementById("dcontent"); | ||
109 | t&&(t.className="sdcontent"); | ||
110 | t=document.getElementById("content"); | ||
111 | t&&(t.className="scontent"); | ||
112 | //iOS8横竖屏切换div不更新滚动问题 | ||
113 | var lasto=window.orientation; | ||
114 | window.addEventListener("orientationchange",function(){ | ||
115 | var nowo=window.orientation; | ||
116 | if(lasto!=nowo&&(90==nowo||-90==nowo)){ | ||
117 | window.dcontent&&(0==dcontent.scrollTop)&&(dcontent.scrollTop=1); | ||
118 | window.content&&(0==content.scrollTop)&&(content.scrollTop=1); | ||
119 | } | ||
120 | lasto=nowo; | ||
121 | },false); | ||
122 | } | ||
123 | adjust=true; | ||
124 | }; | ||
125 | w.compatibleConfirm=function(){ | ||
126 | plus.nativeUI.confirm('本OS原生层面不提供该控件,需使用mui框架实现类似效果。请点击“确定”下载Hello mui示例',function(e){ | ||
127 | if(0==e.index){ | ||
128 | plus.runtime.openURL("http://www.dcloud.io/hellomui/"); | ||
129 | } | ||
130 | },"",["确定","取消"]); | ||
131 | } | ||
132 | // 通用元素对象 | ||
133 | var _dout_=null,_dcontent_=null; | ||
134 | w.gInit=function(){ | ||
135 | _dout_=document.getElementById("output"); | ||
136 | _dcontent_=document.getElementById("dcontent"); | ||
137 | }; | ||
138 | // 清空输出内容 | ||
139 | w.outClean=function(){ | ||
140 | _dout_.innerText=""; | ||
141 | _dout_.scrollTop=0;//在iOS8存在不滚动的现象 | ||
142 | }; | ||
143 | // 输出内容 | ||
144 | w.outSet=function(s){ | ||
145 | _dout_.innerText=s+"\n"; | ||
146 | (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象 | ||
147 | }; | ||
148 | // 输出行内容 | ||
149 | w.outLine=function(s){ | ||
150 | _dout_.innerText=s; | ||
151 | (0==_dout_.scrollTop)&&(_dout_.scrollTop=1);//在iOS8存在不滚动的现象 | ||
152 | }; | ||
153 | // 格式化时长字符串,格式为"HH:MM:SS" | ||
154 | w.timeToStr=function(ts){ | ||
155 | if(isNaN(ts)){ | ||
156 | return "--:--:--"; | ||
157 | } | ||
158 | var h=parseInt(ts/3600); | ||
159 | var m=parseInt((ts%3600)/60); | ||
160 | var s=parseInt(ts%60); | ||
161 | return (ultZeroize(h)+":"+ultZeroize(m)+":"+ultZeroize(s)); | ||
162 | }; | ||
163 | // 格式化日期时间字符串,格式为"YYYY-MM-DD HH:MM:SS" | ||
164 | w.dateToStr=function(d){ | ||
165 | return (d.getFullYear()+"-"+ultZeroize(d.getMonth()+1)+"-"+ultZeroize(d.getDate())+" "+ultZeroize(d.getHours())+":"+ultZeroize(d.getMinutes())+":"+ultZeroize(d.getSeconds())); | ||
166 | }; | ||
167 | /** | ||
168 | * zeroize value with length(default is 2). | ||
169 | * @param {Object} v | ||
170 | * @param {Number} l | ||
171 | * @return {String} | ||
172 | */ | ||
173 | w.ultZeroize=function(v,l){ | ||
174 | var z=""; | ||
175 | l=l||2; | ||
176 | v=String(v); | ||
177 | for(var i=0;i<l-v.length;i++){ | ||
178 | z+="0"; | ||
179 | } | ||
180 | return z+v; | ||
181 | }; | ||
182 | })(window); | ||
183 | |||
184 | ;(function () { | ||
185 | 'use strict'; | ||
186 | |||
187 | /** | ||
188 | * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. | ||
189 | * | ||
190 | * @codingstandard ftlabs-jsv2 | ||
191 | * @copyright The Financial Times Limited [All Rights Reserved] | ||
192 | * @license MIT License (see LICENSE.txt) | ||
193 | */ | ||
194 | |||
195 | /*jslint browser:true, node:true*/ | ||
196 | /*global define, Event, Node*/ | ||
197 | |||
198 | |||
199 | /** | ||
200 | * Instantiate fast-clicking listeners on the specified layer. | ||
201 | * | ||
202 | * @constructor | ||
203 | * @param {Element} layer The layer to listen on | ||
204 | * @param {Object} [options={}] The options to override the defaults | ||
205 | */ | ||
206 | function FastClick(layer, options) { | ||
207 | var oldOnClick; | ||
208 | |||
209 | options = options || {}; | ||
210 | |||
211 | /** | ||
212 | * Whether a click is currently being tracked. | ||
213 | * | ||
214 | * @type boolean | ||
215 | */ | ||
216 | this.trackingClick = false; | ||
217 | |||
218 | |||
219 | /** | ||
220 | * Timestamp for when click tracking started. | ||
221 | * | ||
222 | * @type number | ||
223 | */ | ||
224 | this.trackingClickStart = 0; | ||
225 | |||
226 | |||
227 | /** | ||
228 | * The element being tracked for a click. | ||
229 | * | ||
230 | * @type EventTarget | ||
231 | */ | ||
232 | this.targetElement = null; | ||
233 | |||
234 | |||
235 | /** | ||
236 | * X-coordinate of touch start event. | ||
237 | * | ||
238 | * @type number | ||
239 | */ | ||
240 | this.touchStartX = 0; | ||
241 | |||
242 | |||
243 | /** | ||
244 | * Y-coordinate of touch start event. | ||
245 | * | ||
246 | * @type number | ||
247 | */ | ||
248 | this.touchStartY = 0; | ||
249 | |||
250 | |||
251 | /** | ||
252 | * ID of the last touch, retrieved from Touch.identifier. | ||
253 | * | ||
254 | * @type number | ||
255 | */ | ||
256 | this.lastTouchIdentifier = 0; | ||
257 | |||
258 | |||
259 | /** | ||
260 | * Touchmove boundary, beyond which a click will be cancelled. | ||
261 | * | ||
262 | * @type number | ||
263 | */ | ||
264 | this.touchBoundary = options.touchBoundary || 10; | ||
265 | |||
266 | |||
267 | /** | ||
268 | * The FastClick layer. | ||
269 | * | ||
270 | * @type Element | ||
271 | */ | ||
272 | this.layer = layer; | ||
273 | |||
274 | /** | ||
275 | * The minimum time between tap(touchstart and touchend) events | ||
276 | * | ||
277 | * @type number | ||
278 | */ | ||
279 | this.tapDelay = options.tapDelay || 200; | ||
280 | |||
281 | /** | ||
282 | * The maximum time for a tap | ||
283 | * | ||
284 | * @type number | ||
285 | */ | ||
286 | this.tapTimeout = options.tapTimeout || 700; | ||
287 | |||
288 | if (FastClick.notNeeded(layer)) { | ||
289 | return; | ||
290 | } | ||
291 | |||
292 | // Some old versions of Android don't have Function.prototype.bind | ||
293 | function bind(method, context) { | ||
294 | return function() { return method.apply(context, arguments); }; | ||
295 | } | ||
296 | |||
297 | |||
298 | var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; | ||
299 | var context = this; | ||
300 | for (var i = 0, l = methods.length; i < l; i++) { | ||
301 | context[methods[i]] = bind(context[methods[i]], context); | ||
302 | } | ||
303 | |||
304 | // Set up event handlers as required | ||
305 | if (deviceIsAndroid) { | ||
306 | layer.addEventListener('mouseover', this.onMouse, true); | ||
307 | layer.addEventListener('mousedown', this.onMouse, true); | ||
308 | layer.addEventListener('mouseup', this.onMouse, true); | ||
309 | } | ||
310 | |||
311 | layer.addEventListener('click', this.onClick, true); | ||
312 | layer.addEventListener('touchstart', this.onTouchStart, false); | ||
313 | layer.addEventListener('touchmove', this.onTouchMove, false); | ||
314 | layer.addEventListener('touchend', this.onTouchEnd, false); | ||
315 | layer.addEventListener('touchcancel', this.onTouchCancel, false); | ||
316 | |||
317 | // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) | ||
318 | // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick | ||
319 | // layer when they are cancelled. | ||
320 | if (!Event.prototype.stopImmediatePropagation) { | ||
321 | layer.removeEventListener = function(type, callback, capture) { | ||
322 | var rmv = Node.prototype.removeEventListener; | ||
323 | if (type === 'click') { | ||
324 | rmv.call(layer, type, callback.hijacked || callback, capture); | ||
325 | } else { | ||
326 | rmv.call(layer, type, callback, capture); | ||
327 | } | ||
328 | }; | ||
329 | |||
330 | layer.addEventListener = function(type, callback, capture) { | ||
331 | var adv = Node.prototype.addEventListener; | ||
332 | if (type === 'click') { | ||
333 | adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) { | ||
334 | if (!event.propagationStopped) { | ||
335 | callback(event); | ||
336 | } | ||
337 | }), capture); | ||
338 | } else { | ||
339 | adv.call(layer, type, callback, capture); | ||
340 | } | ||
341 | }; | ||
342 | } | ||
343 | |||
344 | // If a handler is already declared in the element's onclick attribute, it will be fired before | ||
345 | // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and | ||
346 | // adding it as listener. | ||
347 | if (typeof layer.onclick === 'function') { | ||
348 | |||
349 | // Android browser on at least 3.2 requires a new reference to the function in layer.onclick | ||
350 | // - the old one won't work if passed to addEventListener directly. | ||
351 | oldOnClick = layer.onclick; | ||
352 | layer.addEventListener('click', function(event) { | ||
353 | oldOnClick(event); | ||
354 | }, false); | ||
355 | layer.onclick = null; | ||
356 | } | ||
357 | } | ||
358 | |||
359 | /** | ||
360 | * Windows Phone 8.1 fakes user agent string to look like Android and iPhone. | ||
361 | * | ||
362 | * @type boolean | ||
363 | */ | ||
364 | var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0; | ||
365 | |||
366 | /** | ||
367 | * Android requires exceptions. | ||
368 | * | ||
369 | * @type boolean | ||
370 | */ | ||
371 | var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone; | ||
372 | |||
373 | |||
374 | /** | ||
375 | * iOS requires exceptions. | ||
376 | * | ||
377 | * @type boolean | ||
378 | */ | ||
379 | var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone; | ||
380 | |||
381 | |||
382 | /** | ||
383 | * iOS 4 requires an exception for select elements. | ||
384 | * | ||
385 | * @type boolean | ||
386 | */ | ||
387 | var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent); | ||
388 | |||
389 | |||
390 | /** | ||
391 | * iOS 6.0-7.* requires the target element to be manually derived | ||
392 | * | ||
393 | * @type boolean | ||
394 | */ | ||
395 | var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent); | ||
396 | |||
397 | /** | ||
398 | * BlackBerry requires exceptions. | ||
399 | * | ||
400 | * @type boolean | ||
401 | */ | ||
402 | var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; | ||
403 | |||
404 | /** | ||
405 | * Determine whether a given element requires a native click. | ||
406 | * | ||
407 | * @param {EventTarget|Element} target Target DOM element | ||
408 | * @returns {boolean} Returns true if the element needs a native click | ||
409 | */ | ||
410 | FastClick.prototype.needsClick = function(target) { | ||
411 | switch (target.nodeName.toLowerCase()) { | ||
412 | |||
413 | // Don't send a synthetic click to disabled inputs (issue #62) | ||
414 | case 'button': | ||
415 | case 'select': | ||
416 | case 'textarea': | ||
417 | if (target.disabled) { | ||
418 | return true; | ||
419 | } | ||
420 | |||
421 | break; | ||
422 | case 'input': | ||
423 | |||
424 | // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) | ||
425 | if ((deviceIsIOS && target.type === 'file') || target.disabled) { | ||
426 | return true; | ||
427 | } | ||
428 | |||
429 | break; | ||
430 | case 'label': | ||
431 | case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames | ||
432 | case 'video': | ||
433 | return true; | ||
434 | } | ||
435 | |||
436 | return (/\bneedsclick\b/).test(target.className); | ||
437 | }; | ||
438 | |||
439 | |||
440 | /** | ||
441 | * Determine whether a given element requires a call to focus to simulate click into element. | ||
442 | * | ||
443 | * @param {EventTarget|Element} target Target DOM element | ||
444 | * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. | ||
445 | */ | ||
446 | FastClick.prototype.needsFocus = function(target) { | ||
447 | switch (target.nodeName.toLowerCase()) { | ||
448 | case 'textarea': | ||
449 | return true; | ||
450 | case 'select': | ||
451 | return !deviceIsAndroid; | ||
452 | case 'input': | ||
453 | switch (target.type) { | ||
454 | case 'button': | ||
455 | case 'checkbox': | ||
456 | case 'file': | ||
457 | case 'image': | ||
458 | case 'radio': | ||
459 | case 'submit': | ||
460 | return false; | ||
461 | } | ||
462 | |||
463 | // No point in attempting to focus disabled inputs | ||
464 | return !target.disabled && !target.readOnly; | ||
465 | default: | ||
466 | return (/\bneedsfocus\b/).test(target.className); | ||
467 | } | ||
468 | }; | ||
469 | |||
470 | |||
471 | /** | ||
472 | * Send a click event to the specified element. | ||
473 | * | ||
474 | * @param {EventTarget|Element} targetElement | ||
475 | * @param {Event} event | ||
476 | */ | ||
477 | FastClick.prototype.sendClick = function(targetElement, event) { | ||
478 | var clickEvent, touch; | ||
479 | |||
480 | // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) | ||
481 | if (document.activeElement && document.activeElement !== targetElement) { | ||
482 | document.activeElement.blur(); | ||
483 | } | ||
484 | |||
485 | touch = event.changedTouches[0]; | ||
486 | |||
487 | // Synthesise a click event, with an extra attribute so it can be tracked | ||
488 | clickEvent = document.createEvent('MouseEvents'); | ||
489 | clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); | ||
490 | clickEvent.forwardedTouchEvent = true; | ||
491 | targetElement.dispatchEvent(clickEvent); | ||
492 | }; | ||
493 | |||
494 | FastClick.prototype.determineEventType = function(targetElement) { | ||
495 | |||
496 | //Issue #159: Android Chrome Select Box does not open with a synthetic click event | ||
497 | if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { | ||
498 | return 'mousedown'; | ||
499 | } | ||
500 | |||
501 | return 'click'; | ||
502 | }; | ||
503 | |||
504 | |||
505 | /** | ||
506 | * @param {EventTarget|Element} targetElement | ||
507 | */ | ||
508 | FastClick.prototype.focus = function(targetElement) { | ||
509 | var length; | ||
510 | |||
511 | // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. | ||
512 | if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { | ||
513 | length = targetElement.value.length; | ||
514 | targetElement.setSelectionRange(length, length); | ||
515 | } else { | ||
516 | targetElement.focus(); | ||
517 | } | ||
518 | }; | ||
519 | |||
520 | |||
521 | /** | ||
522 | * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. | ||
523 | * | ||
524 | * @param {EventTarget|Element} targetElement | ||
525 | */ | ||
526 | FastClick.prototype.updateScrollParent = function(targetElement) { | ||
527 | var scrollParent, parentElement; | ||
528 | |||
529 | scrollParent = targetElement.fastClickScrollParent; | ||
530 | |||
531 | // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the | ||
532 | // target element was moved to another parent. | ||
533 | if (!scrollParent || !scrollParent.contains(targetElement)) { | ||
534 | parentElement = targetElement; | ||
535 | do { | ||
536 | if (parentElement.scrollHeight > parentElement.offsetHeight) { | ||
537 | scrollParent = parentElement; | ||
538 | targetElement.fastClickScrollParent = parentElement; | ||
539 | break; | ||
540 | } | ||
541 | |||
542 | parentElement = parentElement.parentElement; | ||
543 | } while (parentElement); | ||
544 | } | ||
545 | |||
546 | // Always update the scroll top tracker if possible. | ||
547 | if (scrollParent) { | ||
548 | scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; | ||
549 | } | ||
550 | }; | ||
551 | |||
552 | |||
553 | /** | ||
554 | * @param {EventTarget} targetElement | ||
555 | * @returns {Element|EventTarget} | ||
556 | */ | ||
557 | FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) { | ||
558 | |||
559 | // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. | ||
560 | if (eventTarget.nodeType === Node.TEXT_NODE) { | ||
561 | return eventTarget.parentNode; | ||
562 | } | ||
563 | |||
564 | return eventTarget; | ||
565 | }; | ||
566 | |||
567 | |||
568 | /** | ||
569 | * On touch start, record the position and scroll offset. | ||
570 | * | ||
571 | * @param {Event} event | ||
572 | * @returns {boolean} | ||
573 | */ | ||
574 | FastClick.prototype.onTouchStart = function(event) { | ||
575 | var targetElement, touch, selection; | ||
576 | |||
577 | // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). | ||
578 | if (event.targetTouches.length > 1) { | ||
579 | return true; | ||
580 | } | ||
581 | |||
582 | targetElement = this.getTargetElementFromEventTarget(event.target); | ||
583 | touch = event.targetTouches[0]; | ||
584 | |||
585 | if (deviceIsIOS) { | ||
586 | |||
587 | // Only trusted events will deselect text on iOS (issue #49) | ||
588 | selection = window.getSelection(); | ||
589 | if (selection.rangeCount && !selection.isCollapsed) { | ||
590 | return true; | ||
591 | } | ||
592 | |||
593 | if (!deviceIsIOS4) { | ||
594 | |||
595 | // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): | ||
596 | // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched | ||
597 | // with the same identifier as the touch event that previously triggered the click that triggered the alert. | ||
598 | // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an | ||
599 | // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. | ||
600 | // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, | ||
601 | // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, | ||
602 | // random integers, it's safe to to continue if the identifier is 0 here. | ||
603 | if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { | ||
604 | event.preventDefault(); | ||
605 | return false; | ||
606 | } | ||
607 | |||
608 | this.lastTouchIdentifier = touch.identifier; | ||
609 | |||
610 | // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: | ||
611 | // 1) the user does a fling scroll on the scrollable layer | ||
612 | // 2) the user stops the fling scroll with another tap | ||
613 | // then the event.target of the last 'touchend' event will be the element that was under the user's finger | ||
614 | // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check | ||
615 | // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). | ||
616 | this.updateScrollParent(targetElement); | ||
617 | } | ||
618 | } | ||
619 | |||
620 | this.trackingClick = true; | ||
621 | this.trackingClickStart = event.timeStamp; | ||
622 | this.targetElement = targetElement; | ||
623 | |||
624 | this.touchStartX = touch.pageX; | ||
625 | this.touchStartY = touch.pageY; | ||
626 | |||
627 | // Prevent phantom clicks on fast double-tap (issue #36) | ||
628 | if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { | ||
629 | event.preventDefault(); | ||
630 | } | ||
631 | |||
632 | return true; | ||
633 | }; | ||
634 | |||
635 | |||
636 | /** | ||
637 | * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. | ||
638 | * | ||
639 | * @param {Event} event | ||
640 | * @returns {boolean} | ||
641 | */ | ||
642 | FastClick.prototype.touchHasMoved = function(event) { | ||
643 | var touch = event.changedTouches[0], boundary = this.touchBoundary; | ||
644 | |||
645 | if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { | ||
646 | return true; | ||
647 | } | ||
648 | |||
649 | return false; | ||
650 | }; | ||
651 | |||
652 | |||
653 | /** | ||
654 | * Update the last position. | ||
655 | * | ||
656 | * @param {Event} event | ||
657 | * @returns {boolean} | ||
658 | */ | ||
659 | FastClick.prototype.onTouchMove = function(event) { | ||
660 | if (!this.trackingClick) { | ||
661 | return true; | ||
662 | } | ||
663 | |||
664 | // If the touch has moved, cancel the click tracking | ||
665 | if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { | ||
666 | this.trackingClick = false; | ||
667 | this.targetElement = null; | ||
668 | } | ||
669 | |||
670 | return true; | ||
671 | }; | ||
672 | |||
673 | |||
674 | /** | ||
675 | * Attempt to find the labelled control for the given label element. | ||
676 | * | ||
677 | * @param {EventTarget|HTMLLabelElement} labelElement | ||
678 | * @returns {Element|null} | ||
679 | */ | ||
680 | FastClick.prototype.findControl = function(labelElement) { | ||
681 | |||
682 | // Fast path for newer browsers supporting the HTML5 control attribute | ||
683 | if (labelElement.control !== undefined) { | ||
684 | return labelElement.control; | ||
685 | } | ||
686 | |||
687 | // All browsers under test that support touch events also support the HTML5 htmlFor attribute | ||
688 | if (labelElement.htmlFor) { | ||
689 | return document.getElementById(labelElement.htmlFor); | ||
690 | } | ||
691 | |||
692 | // If no for attribute exists, attempt to retrieve the first labellable descendant element | ||
693 | // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label | ||
694 | return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); | ||
695 | }; | ||
696 | |||
697 | |||
698 | /** | ||
699 | * On touch end, determine whether to send a click event at once. | ||
700 | * | ||
701 | * @param {Event} event | ||
702 | * @returns {boolean} | ||
703 | */ | ||
704 | FastClick.prototype.onTouchEnd = function(event) { | ||
705 | var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; | ||
706 | |||
707 | if (!this.trackingClick) { | ||
708 | return true; | ||
709 | } | ||
710 | |||
711 | // Prevent phantom clicks on fast double-tap (issue #36) | ||
712 | if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { | ||
713 | this.cancelNextClick = true; | ||
714 | return true; | ||
715 | } | ||
716 | |||
717 | if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) { | ||
718 | return true; | ||
719 | } | ||
720 | |||
721 | // Reset to prevent wrong click cancel on input (issue #156). | ||
722 | this.cancelNextClick = false; | ||
723 | |||
724 | this.lastClickTime = event.timeStamp; | ||
725 | |||
726 | trackingClickStart = this.trackingClickStart; | ||
727 | this.trackingClick = false; | ||
728 | this.trackingClickStart = 0; | ||
729 | |||
730 | // On some iOS devices, the targetElement supplied with the event is invalid if the layer | ||
731 | // is performing a transition or scroll, and has to be re-detected manually. Note that | ||
732 | // for this to function correctly, it must be called *after* the event target is checked! | ||
733 | // See issue #57; also filed as rdar://13048589 . | ||
734 | if (deviceIsIOSWithBadTarget) { | ||
735 | touch = event.changedTouches[0]; | ||
736 | |||
737 | // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null | ||
738 | targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; | ||
739 | targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; | ||
740 | } | ||
741 | |||
742 | targetTagName = targetElement.tagName.toLowerCase(); | ||
743 | if (targetTagName === 'label') { | ||
744 | forElement = this.findControl(targetElement); | ||
745 | if (forElement) { | ||
746 | this.focus(targetElement); | ||
747 | if (deviceIsAndroid) { | ||
748 | return false; | ||
749 | } | ||
750 | |||
751 | targetElement = forElement; | ||
752 | } | ||
753 | } else if (this.needsFocus(targetElement)) { | ||
754 | |||
755 | // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. | ||
756 | // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). | ||
757 | if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) { | ||
758 | this.targetElement = null; | ||
759 | return false; | ||
760 | } | ||
761 | |||
762 | this.focus(targetElement); | ||
763 | this.sendClick(targetElement, event); | ||
764 | |||
765 | // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. | ||
766 | // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) | ||
767 | if (!deviceIsIOS || targetTagName !== 'select') { | ||
768 | this.targetElement = null; | ||
769 | event.preventDefault(); | ||
770 | } | ||
771 | |||
772 | return false; | ||
773 | } | ||
774 | |||
775 | if (deviceIsIOS && !deviceIsIOS4) { | ||
776 | |||
777 | // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled | ||
778 | // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). | ||
779 | scrollParent = targetElement.fastClickScrollParent; | ||
780 | if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { | ||
781 | return true; | ||
782 | } | ||
783 | } | ||
784 | |||
785 | // Prevent the actual click from going though - unless the target node is marked as requiring | ||
786 | // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. | ||
787 | if (!this.needsClick(targetElement)) { | ||
788 | event.preventDefault(); | ||
789 | this.sendClick(targetElement, event); | ||
790 | } | ||
791 | |||
792 | return false; | ||
793 | }; | ||
794 | |||
795 | |||
796 | /** | ||
797 | * On touch cancel, stop tracking the click. | ||
798 | * | ||
799 | * @returns {void} | ||
800 | */ | ||
801 | FastClick.prototype.onTouchCancel = function() { | ||
802 | this.trackingClick = false; | ||
803 | this.targetElement = null; | ||
804 | }; | ||
805 | |||
806 | |||
807 | /** | ||
808 | * Determine mouse events which should be permitted. | ||
809 | * | ||
810 | * @param {Event} event | ||
811 | * @returns {boolean} | ||
812 | */ | ||
813 | FastClick.prototype.onMouse = function(event) { | ||
814 | |||
815 | // If a target element was never set (because a touch event was never fired) allow the event | ||
816 | if (!this.targetElement) { | ||
817 | return true; | ||
818 | } | ||
819 | |||
820 | if (event.forwardedTouchEvent) { | ||
821 | return true; | ||
822 | } | ||
823 | |||
824 | // Programmatically generated events targeting a specific element should be permitted | ||
825 | if (!event.cancelable) { | ||
826 | return true; | ||
827 | } | ||
828 | |||
829 | // Derive and check the target element to see whether the mouse event needs to be permitted; | ||
830 | // unless explicitly enabled, prevent non-touch click events from triggering actions, | ||
831 | // to prevent ghost/doubleclicks. | ||
832 | if (!this.needsClick(this.targetElement) || this.cancelNextClick) { | ||
833 | |||
834 | // Prevent any user-added listeners declared on FastClick element from being fired. | ||
835 | if (event.stopImmediatePropagation) { | ||
836 | event.stopImmediatePropagation(); | ||
837 | } else { | ||
838 | |||
839 | // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) | ||
840 | event.propagationStopped = true; | ||
841 | } | ||
842 | |||
843 | // Cancel the event | ||
844 | event.stopPropagation(); | ||
845 | event.preventDefault(); | ||
846 | |||
847 | return false; | ||
848 | } | ||
849 | |||
850 | // If the mouse event is permitted, return true for the action to go through. | ||
851 | return true; | ||
852 | }; | ||
853 | |||
854 | |||
855 | /** | ||
856 | * On actual clicks, determine whether this is a touch-generated click, a click action occurring | ||
857 | * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or | ||
858 | * an actual click which should be permitted. | ||
859 | * | ||
860 | * @param {Event} event | ||
861 | * @returns {boolean} | ||
862 | */ | ||
863 | FastClick.prototype.onClick = function(event) { | ||
864 | var permitted; | ||
865 | |||
866 | // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. | ||
867 | if (this.trackingClick) { | ||
868 | this.targetElement = null; | ||
869 | this.trackingClick = false; | ||
870 | return true; | ||
871 | } | ||
872 | |||
873 | // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. | ||
874 | if (event.target.type === 'submit' && event.detail === 0) { | ||
875 | return true; | ||
876 | } | ||
877 | |||
878 | permitted = this.onMouse(event); | ||
879 | |||
880 | // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. | ||
881 | if (!permitted) { | ||
882 | this.targetElement = null; | ||
883 | } | ||
884 | |||
885 | // If clicks are permitted, return true for the action to go through. | ||
886 | return permitted; | ||
887 | }; | ||
888 | |||
889 | |||
890 | /** | ||
891 | * Remove all FastClick's event listeners. | ||
892 | * | ||
893 | * @returns {void} | ||
894 | */ | ||
895 | FastClick.prototype.destroy = function() { | ||
896 | var layer = this.layer; | ||
897 | |||
898 | if (deviceIsAndroid) { | ||
899 | layer.removeEventListener('mouseover', this.onMouse, true); | ||
900 | layer.removeEventListener('mousedown', this.onMouse, true); | ||
901 | layer.removeEventListener('mouseup', this.onMouse, true); | ||
902 | } | ||
903 | |||
904 | layer.removeEventListener('click', this.onClick, true); | ||
905 | layer.removeEventListener('touchstart', this.onTouchStart, false); | ||
906 | layer.removeEventListener('touchmove', this.onTouchMove, false); | ||
907 | layer.removeEventListener('touchend', this.onTouchEnd, false); | ||
908 | layer.removeEventListener('touchcancel', this.onTouchCancel, false); | ||
909 | }; | ||
910 | |||
911 | |||
912 | /** | ||
913 | * Check whether FastClick is needed. | ||
914 | * | ||
915 | * @param {Element} layer The layer to listen on | ||
916 | */ | ||
917 | FastClick.notNeeded = function(layer) { | ||
918 | var metaViewport; | ||
919 | var chromeVersion; | ||
920 | var blackberryVersion; | ||
921 | var firefoxVersion; | ||
922 | |||
923 | // Devices that don't support touch don't need FastClick | ||
924 | if (typeof window.ontouchstart === 'undefined') { | ||
925 | return true; | ||
926 | } | ||
927 | |||
928 | // Chrome version - zero for other browsers | ||
929 | chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; | ||
930 | |||
931 | if (chromeVersion) { | ||
932 | |||
933 | if (deviceIsAndroid) { | ||
934 | metaViewport = document.querySelector('meta[name=viewport]'); | ||
935 | |||
936 | if (metaViewport) { | ||
937 | // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) | ||
938 | if (metaViewport.content.indexOf('user-scalable=no') !== -1) { | ||
939 | return true; | ||
940 | } | ||
941 | // Chrome 32 and above with width=device-width or less don't need FastClick | ||
942 | if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { | ||
943 | return true; | ||
944 | } | ||
945 | } | ||
946 | |||
947 | // Chrome desktop doesn't need FastClick (issue #15) | ||
948 | } else { | ||
949 | return true; | ||
950 | } | ||
951 | } | ||
952 | |||
953 | if (deviceIsBlackBerry10) { | ||
954 | blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); | ||
955 | |||
956 | // BlackBerry 10.3+ does not require Fastclick library. | ||
957 | // https://github.com/ftlabs/fastclick/issues/251 | ||
958 | if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { | ||
959 | metaViewport = document.querySelector('meta[name=viewport]'); | ||
960 | |||
961 | if (metaViewport) { | ||
962 | // user-scalable=no eliminates click delay. | ||
963 | if (metaViewport.content.indexOf('user-scalable=no') !== -1) { | ||
964 | return true; | ||
965 | } | ||
966 | // width=device-width (or less than device-width) eliminates click delay. | ||
967 | if (document.documentElement.scrollWidth <= window.outerWidth) { | ||
968 | return true; | ||
969 | } | ||
970 | } | ||
971 | } | ||
972 | } | ||
973 | |||
974 | // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97) | ||
975 | if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') { | ||
976 | return true; | ||
977 | } | ||
978 | |||
979 | // Firefox version - zero for other browsers | ||
980 | firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; | ||
981 | |||
982 | if (firefoxVersion >= 27) { | ||
983 | // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896 | ||
984 | |||
985 | metaViewport = document.querySelector('meta[name=viewport]'); | ||
986 | if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) { | ||
987 | return true; | ||
988 | } | ||
989 | } | ||
990 | |||
991 | // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version | ||
992 | // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx | ||
993 | if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') { | ||
994 | return true; | ||
995 | } | ||
996 | |||
997 | return false; | ||
998 | }; | ||
999 | |||
1000 | |||
1001 | /** | ||
1002 | * Factory method for creating a FastClick object | ||
1003 | * | ||
1004 | * @param {Element} layer The layer to listen on | ||
1005 | * @param {Object} [options={}] The options to override the defaults | ||
1006 | */ | ||
1007 | FastClick.attach = function(layer, options) { | ||
1008 | return new FastClick(layer, options); | ||
1009 | }; | ||
1010 | |||
1011 | |||
1012 | if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { | ||
1013 | |||
1014 | // AMD. Register as an anonymous module. | ||
1015 | define(function() { | ||
1016 | return FastClick; | ||
1017 | }); | ||
1018 | } else if (typeof module !== 'undefined' && module.exports) { | ||
1019 | module.exports = FastClick.attach; | ||
1020 | module.exports.FastClick = FastClick; | ||
1021 | } else { | ||
1022 | window.FastClick = FastClick; | ||
1023 | } | ||
1024 | |||
1025 | document.addEventListener('DOMContentLoaded', function() { | ||
1026 | FastClick.attach(document.body); | ||
1027 | }, false); | ||
1028 | |||
1029 | }()); |
js/request.js
0 → 100644
1 | /** | ||
2 | * mui.ajaxRequest | ||
3 | * 封装mui.ajax请求,调用方式与一致 | ||
4 | */ | ||
5 | (function($, doc) { | ||
6 | // var baseUrl = "http://192.168.31.200:8888/medicinal-web" // 测试地址// | ||
7 | // var baseUrl = "http://192.168.31.223:8080/medicinal-web" // 测试地址/ | ||
8 | // var baseUrl = 'http://116.62.143.29:8088/medicinal-web'; // 线上地址2(快) | ||
9 | // var baseUrl = 'http://10.146.8.221:9002/medicinal-web'; // 合肥测试环境 | ||
10 | // var baseUrl = 'http://zesghq.natappfree.cc/medicinal-web'; | ||
11 | // var baseUrl = 'http://10.146.159.113:8888/medicinal-web'; // 个人测试地址 | ||
12 | // var baseUrl = 'http://192.168.3.3:8080/medicinal-web'; | ||
13 | // var baseUrl = 'http://61.190.54.189:9001/medicinal-web'; | ||
14 | // var baseUrl = 'http://192.168.2.154:8080/medicinal-web'; | ||
15 | // var baseUrl = 'http://192.168.2.111:8080/medicinal-web'; | ||
16 | // var baseUrl = 'http://192.168.2.111:8080/medicinal-web'; | ||
17 | // var baseUrl = 'http://10.146.9.50:8080/medicinal-web';// | ||
18 | var baseUrl = 'http://10.146.9.50:8080/medicinal-web';//合肥正式环境 | ||
19 | // var baseUrl = 'http://10.146.159.176:8080/medicinal-web';// | ||
20 | // var baseUrl = 'http://192.168.0.104:8080/medicinal-web'; | ||
21 | mui.extend({ | ||
22 | ajaxRequest: function(url , options){ | ||
23 | var defaults = commonDefaules(options); | ||
24 | var options = mui.extend(defaults, options); | ||
25 | options.beforeSend = defaults.onBeforeSend; | ||
26 | options.success = defaults.onSuccess; | ||
27 | options.error = defaults.onError; | ||
28 | mui.ajax(baseUrl+url , options); | ||
29 | } | ||
30 | }) | ||
31 | |||
32 | function commonDefaules(options){ | ||
33 | //默认参数定义 | ||
34 | var defaults = { | ||
35 | dataType: "json", | ||
36 | type: "post", | ||
37 | timeout: 15000, | ||
38 | wait: true, | ||
39 | xhrFields: { | ||
40 | withCredentials: true // 携带 cookie | ||
41 | }, | ||
42 | contentType: "application/x-www-form-urlencoded", | ||
43 | waitMessage: "努力奔跑中,等等我...", | ||
44 | onBeforeSend : function(xhr){ | ||
45 | if(options.showWaiting){ | ||
46 | plus.nativeUI.showWaiting('加载中......'); | ||
47 | } | ||
48 | |||
49 | if(defaults.wait == true){ | ||
50 | showLoading(defaults.waitMessage); | ||
51 | } | ||
52 | if(options.beforeSend){ | ||
53 | options.beforeSend(xhr); | ||
54 | } | ||
55 | }, | ||
56 | onSuccess : function(data){ | ||
57 | if(options.showWaiting){ | ||
58 | plus.nativeUI.closeWaiting(); | ||
59 | } | ||
60 | if(defaults.wait == true){ | ||
61 | hideLoading(); | ||
62 | } | ||
63 | //也可用于后台验证失败时的提示信息 | ||
64 | if(data && data.result && (data.result === "input")){ | ||
65 | plus.nativeUI.alert(data.message , function(){} , "提示:" , "取消"); | ||
66 | return; | ||
67 | } | ||
68 | if(options.success){ | ||
69 | options.success(data); | ||
70 | } | ||
71 | }, | ||
72 | onError : function(a , b , c){ | ||
73 | mui.toast("网络异常,请稍候再试",{ type: 'div' }); | ||
74 | if(options.showWaiting){ | ||
75 | plus.nativeUI.closeWaiting(); | ||
76 | } | ||
77 | hideLoading(); | ||
78 | mui.openWindow({ | ||
79 | url: "login/index.html", | ||
80 | id: "login/index.html", | ||
81 | extras: { | ||
82 | mark: "index" //额外的参数,仅仅是个标识,实际开发中不用; | ||
83 | } | ||
84 | }); | ||
85 | if(options.error){ | ||
86 | |||
87 | options.error(a , b , c); | ||
88 | } | ||
89 | } | ||
90 | }; | ||
91 | return defaults; | ||
92 | } | ||
93 | |||
94 | function showLoading(msg){ | ||
95 | plus.nativeUI.showWaiting(msg , { | ||
96 | /*round: "1px", //圆角*/ | ||
97 | style: "white", | ||
98 | back:"none",//不响应返回按钮事件 | ||
99 | background: "#66CDAA", | ||
100 | /*background:"rgba(110,120,50,1)",*/ | ||
101 | loading:{ | ||
102 | display:"inline" , | ||
103 | icon:"/images/waiting.png" | ||
104 | } | ||
105 | }); | ||
106 | } | ||
107 | |||
108 | function hideLoading(){ | ||
109 | plus.nativeUI.closeWaiting(); | ||
110 | } | ||
111 | }(mui, document)); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/template-web.js
0 → 100644
1 | /*! art-template@4.13.0 for browser | https://github.com/aui/art-template */ | ||
2 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.template=t():e.template=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){(function(t){e.exports=!1;try{e.exports="[object process]"===Object.prototype.toString.call(t.process)}catch(n){}}).call(t,n(4))},function(e,t,n){"use strict";var r=n(8),i=n(3),o=n(23),s=function(e,t){t.onerror(e,t);var n=function(){return"{Template Error}"};return n.mappings=[],n.sourcesContent=[],n},a=function u(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};"string"!=typeof e?t=e:t.source=e,t=i.$extend(t),e=t.source,!0===t.debug&&(t.cache=!1,t.minimize=!1,t.compileDebug=!0),t.compileDebug&&(t.minimize=!1),t.filename&&(t.filename=t.resolveFilename(t.filename,t));var n=t.filename,a=t.cache,c=t.caches;if(a&&n){var l=c.get(n);if(l)return l}if(!e)try{e=t.loader(n,t),t.source=e}catch(v){var f=new o({name:"CompileError",path:n,message:"template not found: "+v.message,stack:v.stack});if(t.bail)throw f;return s(f,t)}var p=void 0,h=new r(t);try{p=h.build()}catch(f){if(f=new o(f),t.bail)throw f;return s(f,t)}var m=function(e,n){try{return p(e,n)}catch(f){if(!t.compileDebug)return t.cache=!1,t.compileDebug=!0,u(t)(e,n);if(f=new o(f),t.bail)throw f;return s(f,t)()}};return m.mappings=p.mappings,m.sourcesContent=p.sourcesContent,m.toString=function(){return p.toString()},a&&n&&c.set(n,m),m};a.Compiler=r,e.exports=a},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t,n){"use strict";function r(){this.$extend=function(e){return e=e||{},s(e,e instanceof r?e:this)}}var i=n(0),o=n(12),s=n(13),a=n(14),u=n(15),c=n(16),l=n(17),f=n(18),p=n(19),h=n(20),m=n(22),v={source:null,filename:null,rules:[p,f],escape:!0,debug:!!i&&"production"!==process.env.NODE_ENV,bail:!0,cache:!0,minimize:!0,compileDebug:!1,resolveFilename:m,include:a,htmlMinifier:h,htmlMinifierOptions:{collapseWhitespace:!0,minifyCSS:!0,minifyJS:!0,ignoreCustomFragments:[]},onerror:u,loader:l,caches:c,root:"/",extname:".art",ignore:[],imports:o};r.prototype=v,e.exports=new r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t,n){"use strict";var r=n(7),i=n(1),o=n(24),s=function(e,t){return t instanceof Object?r({filename:e},t):i({filename:e,source:t})};s.render=r,s.compile=i,s.defaults=o,e.exports=s},function(e,t,n){"use strict";var r=n(1),i=function(e,t,n){return r(e,n)(t)};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(9),u=n(11),c="$data",l="$imports",f="print",p="include",h="extend",m="block",v="$$out",d="$$line",g="$$blocks",y="$$slice",b="$$from",x="$$options",w=function(e,t){return Object.hasOwnProperty.call(e,t)},k=JSON.stringify,E=function(){function e(t){var n,s,a=this;o(this,e);var w=t.source,k=t.minimize,E=t.htmlMinifier;if(this.options=t,this.stacks=[],this.context=[],this.scripts=[],this.CONTEXT_MAP={},this.ignore=[c,l,x].concat(i(t.ignore)),this.internal=(n={},r(n,v,"''"),r(n,d,"[0,0]"),r(n,g,"arguments[1]||{}"),r(n,b,"null"),r(n,f,"function(){var s=''.concat.apply('',arguments);"+v+"+=s;return s}"),r(n,p,"function(src,data){var s="+x+".include(src,data||"+c+",arguments[2]||"+g+","+x+");"+v+"+=s;return s}"),r(n,h,"function(from){"+b+"=from}"),r(n,y,"function(c,p,s){p="+v+";"+v+"='';c();s="+v+";"+v+"=p+s;return s}"),r(n,m,"function(){var a=arguments,s;if(typeof a[0]==='function'){return "+y+"(a[0])}else if("+b+"){if(!"+g+"[a[0]]){"+g+"[a[0]]="+y+"(a[1])}else{"+v+"+="+g+"[a[0]]}}else{s="+g+"[a[0]];if(typeof s==='string'){"+v+"+=s}else{s="+y+"(a[1])}return s}}"),n),this.dependencies=(s={},r(s,f,[v]),r(s,p,[v,x,c,g]),r(s,h,[b,p]),r(s,m,[y,b,v,g]),s),this.importContext(v),t.compileDebug&&this.importContext(d),k)try{w=E(w,t)}catch(T){}this.source=w,this.getTplTokens(w,t.rules,this).forEach(function(e){e.type===u.TYPE_STRING?a.parseString(e):a.parseExpression(e)})}return s(e,[{key:"getTplTokens",value:function(){return u.apply(undefined,arguments)}},{key:"getEsTokens",value:function(e){return a(e)}},{key:"getVariables",value:function(e){var t=!1;return e.filter(function(e){return"whitespace"!==e.type&&"comment"!==e.type}).filter(function(e){return"name"===e.type&&!t||(t="punctuator"===e.type&&"."===e.value,!1)}).map(function(e){return e.value})}},{key:"importContext",value:function(e){var t=this,n="",r=this.internal,i=this.dependencies,o=this.ignore,s=this.context,a=this.options,u=a.imports,f=this.CONTEXT_MAP;w(f,e)||-1!==o.indexOf(e)||(w(r,e)?(n=r[e],w(i,e)&&i[e].forEach(function(e){return t.importContext(e)})):n="$escape"===e||"$each"===e||w(u,e)?l+"."+e:c+"."+e,f[e]=n,s.push({name:e,value:n}))}},{key:"parseString",value:function(e){var t=e.value;if(t){var n=v+"+="+k(t);this.scripts.push({source:t,tplToken:e,code:n})}}},{key:"parseExpression",value:function(e){var t=this,n=e.value,r=e.script,i=r.output,o=this.options.escape,s=r.code;i&&(s=!1===o||i===u.TYPE_RAW?v+"+="+r.code:v+"+=$escape("+r.code+")");var a=this.getEsTokens(s);this.getVariables(a).forEach(function(e){return t.importContext(e)}),this.scripts.push({source:n,tplToken:e,code:s})}},{key:"checkExpression",value:function(e){for(var t=[[/^\s*}[\w\W]*?{?[\s;]*$/,""],[/(^[\w\W]*?\([\w\W]*?(?:=>|\([\w\W]*?\))\s*{[\s;]*$)/,"$1})"],[/(^[\w\W]*?\([\w\W]*?\)\s*{[\s;]*$)/,"$1}"]],n=0;n<t.length;){if(t[n][0].test(e)){var r;e=(r=e).replace.apply(r,i(t[n]));break}n++}try{return new Function(e),!0}catch(o){return!1}}},{key:"build",value:function(){var e=this.options,t=this.context,n=this.scripts,r=this.stacks,i=this.source,o=e.filename,s=e.imports,a=[],f=w(this.CONTEXT_MAP,h),m=0,y=function(e,t){var n=t.line,i=t.start,o={generated:{line:r.length+m+1,column:1},original:{line:n+1,column:i+1}};return m+=e.split(/\n/).length-1,o},E=function(e){return e.replace(/^[\t ]+|[\t ]$/g,"")};r.push("function("+c+"){"),r.push("'use strict'"),r.push(c+"="+c+"||{}"),r.push("var "+t.map(function(e){return e.name+"="+e.value}).join(",")),e.compileDebug?(r.push("try{"),n.forEach(function(e){e.tplToken.type===u.TYPE_EXPRESSION&&r.push(d+"=["+[e.tplToken.line,e.tplToken.start].join(",")+"]"),a.push(y(e.code,e.tplToken)),r.push(E(e.code))}),r.push("}catch(error){"),r.push("throw {"+["name:'RuntimeError'","path:"+k(o),"message:error.message","line:"+d+"[0]+1","column:"+d+"[1]+1","source:"+k(i),"stack:error.stack"].join(",")+"}"),r.push("}")):n.forEach(function(e){a.push(y(e.code,e.tplToken)),r.push(E(e.code))}),f&&(r.push(v+"=''"),r.push(p+"("+b+","+c+","+g+")")),r.push("return "+v),r.push("}");var T=r.join("\n");try{var O=new Function(l,x,"return "+T)(s,e);return O.mappings=a,O.sourcesContent=[i],O}catch(P){for(var j=0,$=0,_=0,S=void 0;j<n.length;){var C=n[j];if(!this.checkExpression(C.code)){$=C.tplToken.line,_=C.tplToken.start,S=C.code;break}j++}throw{name:"CompileError",path:o,message:P.message,line:$+1,column:_+1,source:i,generated:S,stack:P.stack}}}}]),e}();E.CONSTS={DATA:c,IMPORTS:l,PRINT:f,INCLUDE:p,EXTEND:h,BLOCK:m,OPTIONS:x,OUT:v,LINE:d,BLOCKS:g,SLICE:y,FROM:b,ESCAPE:"$escape",EACH:"$each"},e.exports=E},function(e,t,n){"use strict";var r=n(10),i=n(2)["default"],o=n(2).matchToToken,s=function(e){return e.match(i).map(function(e){return i.lastIndex=0,o(i.exec(e))}).map(function(e){return"name"===e.type&&r(e.value)&&(e.type="keyword"),e})};e.exports=s},function(e,t,n){"use strict";var r={"abstract":!0,await:!0,"boolean":!0,"break":!0,"byte":!0,"case":!0,"catch":!0,"char":!0,"class":!0,"const":!0,"continue":!0,"debugger":!0,"default":!0,"delete":!0,"do":!0,"double":!0,"else":!0,"enum":!0,"export":!0,"extends":!0,"false":!0,"final":!0,"finally":!0,"float":!0,"for":!0,"function":!0,"goto":!0,"if":!0,"implements":!0,"import":!0,"in":!0,"instanceof":!0,"int":!0,"interface":!0,"let":!0,"long":!0,"native":!0,"new":!0,"null":!0,"package":!0,"private":!0,"protected":!0,"public":!0,"return":!0,"short":!0,"static":!0,"super":!0,"switch":!0,"synchronized":!0,"this":!0,"throw":!0,"transient":!0,"true":!0,"try":!0,"typeof":!0,"var":!0,"void":!0,"volatile":!0,"while":!0,"with":!0,"yield":!0};e.exports=function(e){return r.hasOwnProperty(e)}},function(e,t,n){"use strict";function r(e){var t=new String(e.value);return t.line=e.line,t.start=e.start,t.end=e.end,t}function i(e,t,n){this.type=e,this.value=t,this.script=null,n?(this.line=n.line+n.value.split(/\n/).length-1,this.line===n.line?this.start=n.end:this.start=n.value.length-n.value.lastIndexOf("\n")-1):(this.line=0,this.start=0),this.end=this.start+this.value.length}var o=function(e,t){for(var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},o=[new i("string",e)],s=0;s<t.length;s++)for(var a=t[s],u=a.test.ignoreCase?"ig":"g",c=new RegExp(a.test.source,u),l=0;l<o.length;l++){var f=o[l],p=o[l-1];if("string"===f.type){for(var h=void 0,m=0,v=[],d=f.value;null!==(h=c.exec(d));)h.index>m&&(p=new i("string",d.slice(m,h.index),p),v.push(p)),p=new i("expression",h[0],p),h[0]=r(p),p.script=a.use.apply(n,h),v.push(p),m=h.index+h[0].length;m<d.length&&(p=new i("string",d.slice(m),p),v.push(p)),o.splice.apply(o,[l,1].concat(v)),l+=v.length-1}}return o};o.TYPE_STRING="string",o.TYPE_EXPRESSION="expression",o.TYPE_RAW="raw",o.TYPE_ESCAPE="escape",e.exports=o},function(e,t,n){"use strict";(function(t){function r(e){return"string"!=typeof e&&(e=e===undefined||null===e?"":"function"==typeof e?r(e.call(e)):JSON.stringify(e)),e}function i(e){var t=""+e,n=a.exec(t);if(!n)return e;var r="",i=void 0,o=void 0,s=void 0;for(i=n.index,o=0;i<t.length;i++){switch(t.charCodeAt(i)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}o!==i&&(r+=t.substring(o,i)),o=i+1,r+=s}return o!==i?r+t.substring(o,i):r}/*! art-template@runtime | https://github.com/aui/art-template */ | ||
3 | var o=n(0),s=Object.create(o?t:window),a=/["&'<>]/;s.$escape=function(e){return i(r(e))},s.$each=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t(e[n],n);else for(var i in e)t(e[i],i)},e.exports=s}).call(t,n(4))},function(e,t,n){"use strict";var r=Object.prototype.toString,i=function(e){return null===e?"Null":r.call(e).slice(8,-1)},o=function s(e,t){var n=void 0,r=i(e);if("Object"===r?n=Object.create(t||{}):"Array"===r&&(n=[].concat(t||[])),n){for(var o in e)Object.hasOwnProperty.call(e,o)&&(n[o]=s(e[o],n[o]));return n}return e};e.exports=o},function(e,t,n){"use strict";var r=function(e,t,r,i){var o=n(1);return i=i.$extend({filename:i.resolveFilename(e,i),bail:!0,source:null}),o(i)(t,r)};e.exports=r},function(e,t,n){"use strict";var r=function(e){console.error(e.name,e.message)};e.exports=r},function(e,t,n){"use strict";var r={__data:Object.create(null),set:function(e,t){this.__data[e]=t},get:function(e){return this.__data[e]},reset:function(){this.__data={}}};e.exports=r},function(e,t,n){"use strict";var r=n(0),i=function(e){if(r){return n(5).readFileSync(e,"utf8")}var t=document.getElementById(e);return t.value||t.innerHTML};e.exports=i},function(e,t,n){"use strict";var r={test:/{{([@#]?)[ \t]*(\/?)([\w\W]*?)[ \t]*}}/,use:function(e,t,n,i){var o=this,s=o.options,a=o.getEsTokens(i),u=a.map(function(e){return e.value}),c={},l=void 0,f=!!t&&"raw",p=n+u.shift(),h=function(t,n){console.warn((s.filename||"anonymous")+":"+(e.line+1)+":"+(e.start+1)+"\nTemplate upgrade: {{"+t+"}} -> {{"+n+"}}")};switch("#"===t&&h("#value","@value"),p){case"set":i="var "+u.join("").trim();break;case"if":i="if("+u.join("").trim()+"){";break;case"else":var m=u.indexOf("if");~m?(u.splice(0,m+1),i="}else if("+u.join("").trim()+"){"):i="}else{";break;case"/if":i="}";break;case"each":l=r._split(a),l.shift(),"as"===l[1]&&(h("each object as value index","each object value index"),l.splice(1,1));i="$each("+(l[0]||"$data")+",function("+(l[1]||"$value")+","+(l[2]||"$index")+"){";break;case"/each":i="})";break;case"block":l=r._split(a),l.shift(),i="block("+l.join(",").trim()+",function(){";break;case"/block":i="})";break;case"echo":p="print",h("echo value","value");case"print":case"include":case"extend":if(0!==u.join("").trim().indexOf("(")){l=r._split(a),l.shift(),i=p+"("+l.join(",")+")";break}default:if(~u.indexOf("|")){var v=a.reduce(function(e,t){var n=t.value,r=t.type;return"|"===n?e.push([]):"whitespace"!==r&&"comment"!==r&&(e.length||e.push([]),":"===n&&1===e[e.length-1].length?h("value | filter: argv","value | filter argv"):e[e.length-1].push(t)),e},[]).map(function(e){return r._split(e)});i=v.reduce(function(e,t){var n=t.shift();return t.unshift(e),"$imports."+n+"("+t.join(",")+")"},v.shift().join(" ").trim())}f=f||"escape"}return c.code=i,c.output=f,c},_split:function(e){e=e.filter(function(e){var t=e.type;return"whitespace"!==t&&"comment"!==t});for(var t=0,n=e.shift(),r=/\]|\)/,i=[[n]];t<e.length;){var o=e[t];"punctuator"===o.type||"punctuator"===n.type&&!r.test(n.value)?i[i.length-1].push(o):i.push([o]),n=o,t++}return i.map(function(e){return e.map(function(e){return e.value}).join("")})}};e.exports=r},function(e,t,n){"use strict";var r={test:/<%(#?)((?:==|=#|[=-])?)[ \t]*([\w\W]*?)[ \t]*(-?)%>/,use:function(e,t,n,r){return n={"-":"raw","=":"escape","":!1,"==":"raw","=#":"raw"}[n],t&&(r="/*"+r+"*/",n=!1),{code:r,output:n}}};e.exports=r},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(0),o=function(e,t){if(i){var o,s=n(21).minify,a=t.htmlMinifierOptions,u=t.rules.map(function(e){return e.test});(o=a.ignoreCustomFragments).push.apply(o,r(u)),e=s(e,a)}return e};e.exports=o},function(e,t){!function(e){e.noop=function(){}}("object"==typeof e&&"object"==typeof e.exports?e.exports:window)},function(e,t,n){"use strict";var r=n(0),i=/^\.+\//,o=function(e,t){if(r){var o=n(5),s=t.root,a=t.extname;if(i.test(e)){var u=t.filename,c=!u||e===u,l=c?s:o.dirname(u);e=o.resolve(l,e)}else e=o.resolve(s,e);o.extname(e)||(e+=a)}return e};e.exports=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=e.name,n=e.source,r=e.path,i=e.line,o=e.column,s=e.generated,a=e.message;if(!n)return a;var u=n.split(/\n/),c=Math.max(i-3,0),l=Math.min(u.length,i+3),f=u.slice(c,l).map(function(e,t){var n=t+c+1;return(n===i?" >> ":" ")+n+"| "+e}).join("\n");return(r||"anonymous")+":"+i+":"+o+"\n"+f+"\n\n"+t+": "+a+(s?"\n generated: "+s:"")}var a=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.message));return n.name="TemplateError",n.message=s(e),Error.captureStackTrace&&Error.captureStackTrace(n,n.constructor),n}return o(t,e),t}(Error);e.exports=a},function(e,t,n){"use strict";e.exports=n(3)}])}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
js/utils.js
0 → 100644
1 | function Utils() { | ||
2 | |||
3 | } | ||
4 | |||
5 | Utils.prototype.appendModule = function(selector) { | ||
6 | var module = document.querySelector(selector).import.querySelector('script'); | ||
7 | document.querySelector('head').appendChild(module); | ||
8 | } | ||
9 | |||
10 | /** | ||
11 | * @params [String] linkSelector 导入模板link id | ||
12 | * @params [String] tplId 模板id | ||
13 | * @params [String] innerSelector 插入html dom | ||
14 | * @params [Object] data 数据 | ||
15 | * @params [bool] insertType 数据插入(true: html Append, false: html replace ) | ||
16 | * @params [function] callback 回调方法 | ||
17 | */ | ||
18 | Utils.prototype.innerTplHtml = function(tplId, innerSelector ,data, insertType ,callback) { | ||
19 | var html = template(tplId, data); | ||
20 | // console.log(tplId,innerSelector,data,insertType) | ||
21 | if (html) { | ||
22 | if(!insertType){ | ||
23 | document.querySelector(innerSelector).innerHTML = html; | ||
24 | }else{ | ||
25 | if(document.querySelector(innerSelector).querySelector('.mui-pull-bottom-tips')){ | ||
26 | var node = document.querySelector(innerSelector).querySelector('.mui-pull-bottom-tips') | ||
27 | document.querySelector(innerSelector).removeChild(node); | ||
28 | } | ||
29 | html = document.querySelector(innerSelector).innerHTML + html; | ||
30 | document.querySelector(innerSelector).innerHTML = html; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | if (typeof callback === 'function') | ||
35 | callback(); | ||
36 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
manifest.json
0 → 100644
1 | { | ||
2 | "@platforms" : [ "android", "iPhone", "iPad" ], | ||
3 | "id" : "H569465D3", /*应用的标识,创建应用时自动生成,勿手动修改*/ | ||
4 | "name" : "spd-药品物流管理系统", /*应用名称,程序桌面图标名称*/ | ||
5 | "version" : { | ||
6 | "name" : "1.0.4", /*应用版本名称*/ | ||
7 | "code" : "83" | ||
8 | }, | ||
9 | "description" : "", /*应用描述信息*/ | ||
10 | "icons" : { | ||
11 | "72" : "icon.png" | ||
12 | }, | ||
13 | "launch_path" : "container/index.html", /*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/ | ||
14 | "developer" : { | ||
15 | "name" : "", /*开发者名称*/ | ||
16 | "email" : "", /*开发者邮箱地址*/ | ||
17 | "url" : "http://www.dcloud.io" | ||
18 | }, | ||
19 | "permissions" : { | ||
20 | "Cache" : { | ||
21 | "description" : "管理应用缓存" | ||
22 | }, | ||
23 | "Console" : { | ||
24 | "description" : "跟踪调试输出日志" | ||
25 | }, | ||
26 | |||
27 | "Events" : { | ||
28 | "description" : "应用扩展事件" | ||
29 | } | ||
30 | }, | ||
31 | "plus" : { | ||
32 | "splashscreen" : { | ||
33 | "autoclose" : true, /*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/ | ||
34 | "waiting" : false,"delay":"2500" | ||
35 | }, | ||
36 | "runmode" : "liberate", /*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/ | ||
37 | "signature" : "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==", /*可选,保留给应用签名,暂不使用*/ | ||
38 | "distribute" : { | ||
39 | "apple" : { | ||
40 | "appid" : "", /*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/ | ||
41 | "mobileprovision" : "", /*iOS应用打包配置文件*/ | ||
42 | "password" : "", /*iOS应用打包个人证书导入密码*/ | ||
43 | "p12" : "", /*iOS应用打包个人证书,打包配置文件关联的个人证书*/ | ||
44 | "devices" : "universal", /*iOS应用支持的设备类型,可取值iphone/ipad/universal*/ | ||
45 | "frameworks" : [] | ||
46 | }, | ||
47 | "google" : { | ||
48 | "packagename" : "", /*Android应用包名,如io.dcloud.HelloH5*/ | ||
49 | "keystore" : "", /*Android应用打包使用的密钥库文件*/ | ||
50 | "password" : "", /*Android应用打包使用密钥库中证书的密码*/ | ||
51 | "aliasname" : "", /*Android应用打包使用密钥库中证书的别名*/ | ||
52 | "permissions" : ["<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"com.android.launcher.permission.INSTALL_SHORTCUT\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"com.android.launcher.permission.UNINSTALL_SHORTCUT\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>"] | ||
53 | }, | ||
54 | "orientation" : [ "portrait-primary", "portrait-secondary" ], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/ | ||
55 | "icons" : { | ||
56 | "ios" : { | ||
57 | "prerendered" : true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/ | ||
58 | /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/ | ||
59 | "iphone" : { | ||
60 | "normal" : "", /*iPhone普通屏幕程序图标,分辨率:57x57*/ | ||
61 | "retina" : "", /*iPhone高分屏程序图标,分辨率:114x114*/ | ||
62 | /*iPhone iOS7高分屏程序图标,分辨率:120x120*/ | ||
63 | "spotlight-normal" : "", /*iPhone Spotlight搜索程序图标,分辨率:29x29*/ | ||
64 | "spotlight-retina" : "", /*iPhone高分屏Spotlight搜索程序图标,分辨率:58x58*/ | ||
65 | /*iPhone iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/ | ||
66 | "settings-normal" : "", /*iPhone设置页面程序图标,分辨率:29x29*/ | ||
67 | "app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","settings@3x":"unpackage/res/icons/87x87.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png","notification@3x":"unpackage/res/icons/60x60.png","notification@2x":"unpackage/res/icons/40x40.png" | ||
68 | }, | ||
69 | "ipad" : { | ||
70 | "normal" : "", /*iPad普通屏幕程序图标,分辨率:72x72*/ | ||
71 | "retina" : "", /*iPad高分屏程序图标,分辨率:144x144*/ | ||
72 | /*iPad iOS7程序图标,分辨率:76x76*/ | ||
73 | /*iPad iOS7高分屏程序图标,分辨率:152x152*/ | ||
74 | "spotlight-normal" : "", /*iPad Spotlight搜索程序图标,分辨率:50x50*/ | ||
75 | "spotlight-retina" : "", /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/ | ||
76 | /*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/ | ||
77 | /*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/ | ||
78 | /*iPad设置页面程序图标,分辨率:29x29*/ | ||
79 | "app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","settings":"unpackage/res/icons/29x29.png","proapp@2x":"unpackage/res/icons/167x167.png","spotlight":"unpackage/res/icons/40x40.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight@2x":"unpackage/res/icons/80x80.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png" | ||
80 | },"appstore":"unpackage/res/icons/1024x1024.png" | ||
81 | }, | ||
82 | "android" : { | ||
83 | "mdpi" : "unpackage/res/icons/48x48.png", /*普通屏程序图标,分辨率:48x48*/ | ||
84 | "ldpi" : "unpackage/res/icons/48x48.png", /*大屏程序图标,分辨率:48x48*/ | ||
85 | "hdpi" : "unpackage/res/icons/72x72.png", /*高分屏程序图标,分辨率:72x72*/ | ||
86 | "xhdpi" : "unpackage/res/icons/96x96.png", /*720P高分屏程序图标,分辨率:96x96*/ | ||
87 | "xxhdpi" : "unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png" | ||
88 | } | ||
89 | }, | ||
90 | "splashscreen" : { | ||
91 | "ios" : { | ||
92 | "iphone" : { | ||
93 | "default" : "", /*iPhone3启动图片选,分辨率:320x480*/ | ||
94 | "retina35" : "", /*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/ | ||
95 | "retina40" : "" | ||
96 | }, | ||
97 | "ipad" : { | ||
98 | "portrait" : "C:/Users/w9292/Desktop/start.png", /*iPad竖屏启动图片,分辨率:768x1004*/ | ||
99 | /*iPad高分屏竖屏图片,分辨率:1536x2008*/ | ||
100 | "landscape" : "", /*iPad横屏启动图片,分辨率:1024x748*/ | ||
101 | /*iPad高分屏横屏启动图片,分辨率:2048x1496*/ | ||
102 | "portrait7" : "", /*iPad iOS7竖屏启动图片,分辨率:768x1024*/ | ||
103 | "portrait-retina7" : "", /*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/ | ||
104 | "landscape7" : "", /*iPad iOS7横屏启动图片,分辨率:1024x768*/ | ||
105 | "landscape-retina7" : "" | ||
106 | } | ||
107 | }, | ||
108 | "android" : { | ||
109 | "mdpi" : "", /*普通屏启动图片,分辨率:240x282*/ | ||
110 | "ldpi" : "", /*大屏启动图片,分辨率:320x442*/ | ||
111 | "hdpi" : "assest/start-480x762.png", /*高分屏启动图片,分辨率:480x762*/ | ||
112 | "xhdpi" : "assest/start720x1242.png", /*720P高分屏启动图片,分辨率:720x1242*/ | ||
113 | "xxhdpi" : "assest/start-1080x1882.png" | ||
114 | } | ||
115 | } | ||
116 | },"adid":"124744180309" | ||
117 | }, | ||
118 | "dependencies": { | ||
119 | "pages": { | ||
120 | "container/acceptance/acc_list.html": { | ||
121 | "resources": [], | ||
122 | "refer": [ | ||
123 | "container/acceptance/acc_detail.html", | ||
124 | "container/acceptance/acc_batch.html", | ||
125 | "container/result/index.html", | ||
126 | "container/commonPages/searchPage.html" | ||
127 | ], | ||
128 | "priority": 0 | ||
129 | }, | ||
130 | "container/acceptance/index.html": { | ||
131 | "resources": [], | ||
132 | "refer": [ | ||
133 | "container/acceptance/acc_list.html", | ||
134 | "container/commonPages/qrcode.html", | ||
135 | "container/commonPages/searchPage.html", | ||
136 | "container/acceptance/acc_detail.html", | ||
137 | "container/acceptance/acc_not_list.html" | ||
138 | ], | ||
139 | "priority": 0 | ||
140 | }, | ||
141 | "container/home/index.html": { | ||
142 | "resources": [ | ||
143 | "js/utils.js", | ||
144 | "css/home.css", | ||
145 | "js/mui.pullToRefresh.js", | ||
146 | "js/common.js", | ||
147 | "js/mui.pullToRefresh.material.js", | ||
148 | "js/template-web.js", | ||
149 | "js/request.js", | ||
150 | "js/mui.js", | ||
151 | "tpl/message.html" | ||
152 | ], | ||
153 | "refer": [ | ||
154 | "container/pickingOff/index.html", | ||
155 | "container/home/tips.html", | ||
156 | "container/acceptance/index.html", | ||
157 | "container/grounding/index.html", | ||
158 | "container/stockQuery/index.html", | ||
159 | "container/check/index.html", | ||
160 | "container/home/profile.html", | ||
161 | "container/commonPages/qrcode.html", | ||
162 | "container/basicMedicine/index.html" | ||
163 | ], | ||
164 | "priority": 0 | ||
165 | }, | ||
166 | "container/grounding/index.html": { | ||
167 | "resources": [], | ||
168 | "refer": [ | ||
169 | "container/grounding/ground_list.html", | ||
170 | "container/commonPages/qrcode.html", | ||
171 | "container/commonPages/searchPage.html", | ||
172 | "container/commonPages/searchCode.html", | ||
173 | "container/grounding/ground_not_list.html" | ||
174 | ], | ||
175 | "priority": 0 | ||
176 | }, | ||
177 | "container/grounding/ground_list.html": { | ||
178 | "resources": [], | ||
179 | "refer": [ | ||
180 | "container/grounding/ground_detail.html", | ||
181 | "container/grounding/ground_batch.html", | ||
182 | "container/result/index.html", | ||
183 | "container/commonPages/searchPage.html" | ||
184 | ], | ||
185 | "priority": 0 | ||
186 | }, | ||
187 | "container/pickingOff/index.html": { | ||
188 | "resources": [], | ||
189 | "refer": [ | ||
190 | "container/pickingOff/pickingOffList.html", | ||
191 | "container/commonPages/qrcode.html", | ||
192 | "container/commonPages/searchPage.html", | ||
193 | "container/pickingOff/pickingOffListUn.html" | ||
194 | ], | ||
195 | "priority": 0 | ||
196 | }, | ||
197 | "container/stockQuery/index.html": { | ||
198 | "resources": [], | ||
199 | "refer": [ | ||
200 | "container/stockQuery/details.html", | ||
201 | "container/commonPages/searchPage.html" | ||
202 | ], | ||
203 | "priority": 0 | ||
204 | }, | ||
205 | "container/check/index.html": { | ||
206 | "resources": [ | ||
207 | "container/check/subIndex.html" | ||
208 | ], | ||
209 | "refer": [ | ||
210 | "container/check/checkList.html", | ||
211 | "container/check/index.html" | ||
212 | ], | ||
213 | "priority": 0 | ||
214 | }, | ||
215 | "container/check/checkList.html": { | ||
216 | "resources": [], | ||
217 | "refer": [ | ||
218 | "container/check/checkDetails.html" | ||
219 | ], | ||
220 | "priority": 0 | ||
221 | }, | ||
222 | "container/acceptance/acc_detail.html": { | ||
223 | "resources": [], | ||
224 | "refer": [ | ||
225 | "container/Result/index.html", | ||
226 | "container/result/index.html" | ||
227 | ], | ||
228 | "priority": 0 | ||
229 | }, | ||
230 | "container/pickingOff/pickingOffList.html": { | ||
231 | "resources": [], | ||
232 | "refer": [ | ||
233 | "container/pickingOff/pickingOffDetails.html", | ||
234 | "container/pickingOff/picking_batch.html", | ||
235 | "container/result/index.html", | ||
236 | "container/commonPages/searchPage.html" | ||
237 | ], | ||
238 | "priority": 0 | ||
239 | }, | ||
240 | "container/login/login.html": { | ||
241 | "resources": [], | ||
242 | "refer": [ | ||
243 | "container/login/main.html", | ||
244 | "container/login/forget_password.html", | ||
245 | "container/login/reg.html", | ||
246 | "container/home/index.html" | ||
247 | ], | ||
248 | "priority": 0 | ||
249 | }, | ||
250 | "container/guide.html": { | ||
251 | "resources": [], | ||
252 | "refer": [ | ||
253 | "container/login/login.html", | ||
254 | "container/login/index.html" | ||
255 | ], | ||
256 | "priority": 0 | ||
257 | }, | ||
258 | "container/login/index.html": { | ||
259 | "resources": [], | ||
260 | "refer": [ | ||
261 | "container/home/index.html" | ||
262 | ], | ||
263 | "priority": 0 | ||
264 | }, | ||
265 | "container/index.html": { | ||
266 | "resources": [], | ||
267 | "refer": [ | ||
268 | "container/guide.html", | ||
269 | "container/login/index.html" | ||
270 | ], | ||
271 | "priority": 0 | ||
272 | }, | ||
273 | "container/commonPages/qrcode.html": { | ||
274 | "resources": [], | ||
275 | "refer": [ | ||
276 | "container/acceptance/acc_list.html" | ||
277 | ], | ||
278 | "priority": 0 | ||
279 | }, | ||
280 | "container/acceptance/acc_batch.html": { | ||
281 | "resources": [], | ||
282 | "refer": [ | ||
283 | "container/result/index.html" | ||
284 | ], | ||
285 | "priority": 0 | ||
286 | }, | ||
287 | "container/grounding/ground_batch.html": { | ||
288 | "resources": [], | ||
289 | "refer": [ | ||
290 | "container/result/index.html" | ||
291 | ], | ||
292 | "priority": 0 | ||
293 | }, | ||
294 | "container/pickingOff/picking_batch.html": { | ||
295 | "resources": [], | ||
296 | "refer": [ | ||
297 | "container/result/index.html" | ||
298 | ], | ||
299 | "priority": 0 | ||
300 | }, | ||
301 | "container/pickingOff/pickingOffDetails.html": { | ||
302 | "resources": [], | ||
303 | "refer": [ | ||
304 | "container/result/index.html" | ||
305 | ], | ||
306 | "priority": 0 | ||
307 | }, | ||
308 | "container/check/checkDetails.html": { | ||
309 | "resources": [], | ||
310 | "refer": [ | ||
311 | "container/result/index.html" | ||
312 | ], | ||
313 | "priority": 0 | ||
314 | }, | ||
315 | "container/grounding/ground_detail.html": { | ||
316 | "resources": [], | ||
317 | "refer": [ | ||
318 | "container/result/index.html" | ||
319 | ], | ||
320 | "priority": 0 | ||
321 | }, | ||
322 | "container/basicMedicine/index.html": { | ||
323 | "resources": [], | ||
324 | "refer": [ | ||
325 | "container/basicMedicine/acc_list.html", | ||
326 | "container/basicMedicine/basic_acc_list.html" | ||
327 | ], | ||
328 | "priority": 0 | ||
329 | }, | ||
330 | "container/basicMedicine/acc_list.html": { | ||
331 | "resources": [], | ||
332 | "refer": [ | ||
333 | "container/basicMedicine/acc_detail.html", | ||
334 | "container/basicMedicine/basic_acc_batch.html", | ||
335 | "container/commonPages/searchPage.html" | ||
336 | ], | ||
337 | "priority": 0 | ||
338 | }, | ||
339 | "container/basicMedicine/acc_detail.html": { | ||
340 | "resources": [], | ||
341 | "refer": [ | ||
342 | "container/result/index.html" | ||
343 | ], | ||
344 | "priority": 0 | ||
345 | }, | ||
346 | "container/basicMedicine/basic_acc_list.html": { | ||
347 | "resources": [], | ||
348 | "refer": [ | ||
349 | "container/commonPages/searchPage.html" | ||
350 | ], | ||
351 | "priority": 0 | ||
352 | }, | ||
353 | "container/home/profile.html": { | ||
354 | "resources": [], | ||
355 | "refer": [ | ||
356 | "container/login/index.html" | ||
357 | ], | ||
358 | "priority": 0 | ||
359 | }, | ||
360 | "container/acceptance/acc_not_list.html": { | ||
361 | "resources": [], | ||
362 | "refer": [ | ||
363 | "container/acceptance/acc_detail.html", | ||
364 | "container/commonPages/searchPage.html", | ||
365 | "container/acceptance/acc_batch.html" | ||
366 | ], | ||
367 | "priority": 0 | ||
368 | }, | ||
369 | "container/grounding/ground_not_list.html": { | ||
370 | "resources": [], | ||
371 | "refer": [ | ||
372 | "container/grounding/ground_detail.html", | ||
373 | "container/grounding/ground_batch.html", | ||
374 | "container/commonPages/searchPage.html" | ||
375 | ], | ||
376 | "priority": 0 | ||
377 | }, | ||
378 | "container/pickingOff/pickingOffListUn.html": { | ||
379 | "resources": [], | ||
380 | "refer": [ | ||
381 | "container/commonPages/searchPage.html" | ||
382 | ], | ||
383 | "priority": 0 | ||
384 | } | ||
385 | }, | ||
386 | "idle": { | ||
387 | "resources": [ | ||
388 | "tpl/ground_card.html", | ||
389 | "container/check/list_tpl.html", | ||
390 | "container/acceptance/detail_tpl.html", | ||
391 | "container/grounding/list_tpl.html", | ||
392 | "tpl/list.html", | ||
393 | "tpl/tips.html", | ||
394 | "container/pickingOff/list_tpl.html", | ||
395 | "images/icon_query.png", | ||
396 | "tpl/check_card.html", | ||
397 | "tpl/pickOff_card_index.html", | ||
398 | "tpl/acceptance_card.html", | ||
399 | "fonts/mui.ttf", | ||
400 | "images/icon_check_before_acceptance.png", | ||
401 | "container/stockQuery/details_view.html", | ||
402 | "assest/success.svg", | ||
403 | "css/mui.css", | ||
404 | "images/icon_inventory.png", | ||
405 | "container/check/detail_tpl.html", | ||
406 | "index.html", | ||
407 | "images/icon_grounding.png", | ||
408 | "css/themes.css", | ||
409 | "css/index_view.css", | ||
410 | "container/grounding/detail_tpl.html", | ||
411 | "container/Result/success_tpl.html", | ||
412 | "js/mui.min.js", | ||
413 | "images/icon_lower_frame.png", | ||
414 | "container/pickingOff/detail_tpl.html", | ||
415 | "tpl/stockQuery_card.html", | ||
416 | "css/check.css", | ||
417 | "test2.html", | ||
418 | "container/acceptance/list_tpl.html", | ||
419 | "css/mui.min.css" | ||
420 | ] | ||
421 | } | ||
422 | } | ||
423 | } |
tpl/acceptance_card.html
0 → 100644
1 | |||
2 | <script type="text/html" id='acceptance'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-distributeCode="{{ value.distributeCode ? value.distributeCode: '--' }}" | ||
6 | data-orderCode="{{ value.orderCode ? value.orderCode: '--' }}" | ||
7 | data-statusName="{{ value.statusName ? value.statusName: '--' }}" | ||
8 | data-acceptType="{{ value.type }}" | ||
9 | data-typeName="{{ value.typeName ? value.typeName: "--" }}" | ||
10 | data-supplierName="{{ value.supplierName ? value.supplierName: '--' }}" | ||
11 | data-deptAddress="{{ value.deptAddress ? value.deptAddress: '--' }}" | ||
12 | data-isUsual="{{ value.isUsual }}" | ||
13 | > | ||
14 | <div class="am-card-header"> | ||
15 | <div class="am-card-header-content"> | ||
16 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
17 | {{ value.checkType === 1 ? value.supplierName: value.deptName }}</span> | ||
18 | </div> | ||
19 | <div class="am-card-header-extra"> | ||
20 | <span>{{ value.typeName }}</span> | ||
21 | <span style="margin: 0 8px">{{ value.statusName }}</span> | ||
22 | </div> | ||
23 | </div> | ||
24 | <div class="am-card-body"> | ||
25 | <div class="am-flexbox am-flexbox-align-center"> | ||
26 | <div class="am-flexbox-item"> | ||
27 | <span>{{ value.checkType === 1 || value.checkType === 3 ? '配送/验收单:': '验收单:' }}</span> | ||
28 | <span>{{ value.distributeCode }}</span> | ||
29 | </div> | ||
30 | <div class="am-flexbox-item"> | ||
31 | <span class="mui-badge mui-badge-warning badge">{{value.checkAcceptDetailsItemsCount?value.checkAcceptDetailsItemsCount:0}}</span> | ||
32 | </div> | ||
33 | <!--<div class="am-flexbox-item"> | ||
34 | 品相数:<span>{{ value.total }}</span> | ||
35 | </div>--> | ||
36 | </div> | ||
37 | <div class="am-flexbox am-flexbox-align-center"> | ||
38 | <div class="am-flexbox-item"> | ||
39 | 订单号:<span>{{ value.orderCode }}</span> | ||
40 | <!--配送/验收单:<span>{{ value.orderCode }}</span>--> | ||
41 | </div> | ||
42 | <div class="am-flexbox-item"> | ||
43 | 制单时间:<span>{{ value.createDate }}</span> | ||
44 | </div> | ||
45 | </div> | ||
46 | </div> | ||
47 | </div> | ||
48 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
49 | </div> | ||
50 | {{/each}} | ||
51 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/check_card.html
0 → 100644
1 | <!--盘点 yuwei--> | ||
2 | <script type="text/html" id='check_list'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-checkBillNo="{{ value.checkBillNo ? value.checkBillNo: '--' }}" | ||
6 | data-checkBillTypeName="{{ value.checkBillTypeName ? value.checkBillTypeName: '--' }}" | ||
7 | data-checkBillDeptName="{{ value.checkBillDeptName ? value.checkBillDeptName: '--' }}" | ||
8 | data-createUserName="{{ value.createUserName ? value.createUserName: '--' }}" | ||
9 | data-createDate="{{ value.createDate ? value.createDate.split(' ').join('|'): '--' }}" | ||
10 | data-sheveUserName="{{ value.sheveUserName ? value.sheveUserName: '--' }}" | ||
11 | data-updateDate="{{ value.updateDate ? value.updateDate: '--' }}" | ||
12 | data-checkStatus="{{ value.checkStatus ? value.checkStatus: '--' }}" | ||
13 | > | ||
14 | <div class="am-card-header"> | ||
15 | <div class="am-card-header-content"> | ||
16 | <span style="font-size: 16px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
17 | 盘点单号: {{ value.checkBillNo }}</span> | ||
18 | </div> | ||
19 | <div class="am-card-header-extra"> | ||
20 | <span> {{ value.checkBillTypeName }} </span> | ||
21 | <span style="margin: 0 8px;">{{ value.checkStatusName }}</span> | ||
22 | </div> | ||
23 | </div> | ||
24 | <div class="am-card-body"> | ||
25 | <div class="am-flexbox am-flexbox-align-center"> | ||
26 | <div class="am-flexbox-item"> | ||
27 | 制单时间:<span>{{ value.createDate }}</span> | ||
28 | </div> | ||
29 | <div class="am-flexbox-itexm"> | ||
30 | 盘点责任人:<span>{{ value.createUserName }}</span> | ||
31 | </div> | ||
32 | </div> | ||
33 | <div class="am-flexbox am-flexbox-align-center"> | ||
34 | <div class="am-flexbox-item"> | ||
35 | 盘点时间:<span>{{ value.checkTime }}</span> | ||
36 | </div> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
41 | </div> | ||
42 | {{/each}} | ||
43 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/ground_card.html
0 → 100644
1 | |||
2 | <script type="text/html" id='ground'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-distributeCode="{{ value.distributeCode }}" " | ||
6 | data-receptionTime="{{ value.receptionTime ? value.receptionTime.split(' ').join('|'): '--' }}" | ||
7 | data-statusName="{{ value.statusName ? value.statusName: '--' }}" | ||
8 | data-updateDate="{{ value.updateDate ? value.updateDate.split(' ').join('|'): '--' }}" | ||
9 | data-createName="{{ value.createName ? value.createName: '--'}}" | ||
10 | data-upUserDate="{{ value.upUserDate ? value.upUserDate.split(' ').join('|'): '--' }}" | ||
11 | > | ||
12 | <div class="am-card-header"> | ||
13 | <div class="am-card-header-content"> | ||
14 | <span style="font-size: 16px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
15 | 上架单号: {{ value.distributeCode }}</span> | ||
16 | </div> | ||
17 | <div class="am-card-header-extra" style="text-align:left"> | ||
18 | <span class="mui-badge mui-badge-warning badge">{{value.checkAcceptDetailsItemsCount?value.checkAcceptDetailsItemsCount:0}}</span> | ||
19 | </div> | ||
20 | <div class="am-card-header-extra"> | ||
21 | <span>{{ value.statusName }} </span> | ||
22 | <!--{{ if hasGrounding }} | ||
23 | <span class="hasGround ground-tag">已上架</span> | ||
24 | {{ else }} | ||
25 | <span class="before-ground ground-tag">待上架</span> | ||
26 | {{ /if }}--> | ||
27 | </div> | ||
28 | </div> | ||
29 | <div class="am-card-body" style='padding: 12px 15px;'> | ||
30 | <div class="am-flexbox am-flexbox-align-center"> | ||
31 | <div class="am-flexbox-item"> | ||
32 | 验收时间:<span>{{ value.receptionTime }}</span> | ||
33 | </div> | ||
34 | <!--<div class="am-flexbox-item"> | ||
35 | 品相数:<span>{{ value.total }}</span> | ||
36 | </div>--> | ||
37 | </div> | ||
38 | </div> | ||
39 | </div> | ||
40 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
41 | </div> | ||
42 | {{/each}} | ||
43 | <!--<div class="mui-pull-bottom-tips"> | ||
44 | <div class="mui-pull-bottom-wrapper"> | ||
45 | <span class="mui-pull-loading">上拉显示更多</span> | ||
46 | </div> | ||
47 | </div>--> | ||
48 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/list.html
0 → 100644
1 | <script type="text/html" id="demo"> | ||
2 | <h1>{{title}}</h1> | ||
3 | <ul class="mui-table-view"> | ||
4 | {{each list value i}} | ||
5 | <li class="mui-table-view-cell" data-type = ""> | ||
6 | <a class="mui-navigate-right">索引 {{i + 1}} :{{value}}</a></li> | ||
7 | {{/each}} | ||
8 | </ul> | ||
9 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/message.html
0 → 100644
1 | <script type="text/html" id="message-tpl"> | ||
2 | {{each list value i}} | ||
3 | <li class="mui-table-view-cell mui-media message-detail" data-id = "{{value.id}}" data-title="{{ value.meassage }}" data-tipDate="{{ value.createDate }}"> | ||
4 | <a class="mui-navigate-right"> | ||
5 | <div class="mui-media-body"> | ||
6 | <div class="title">{{ value.meassage }}</div> | ||
7 | <p class='mui-ellipsis'> {{ value.createDate }} </p> | ||
8 | </div> | ||
9 | </a> | ||
10 | </li> | ||
11 | {{/each}} | ||
12 | </script> |
tpl/pickOff_card_index.html
0 → 100644
1 | <!--拣货下架 - index - yuwei--> | ||
2 | <script type="text/html" id='pick_list'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-pickingOrderNo="{{ value.pickingOrderNo }}" | ||
6 | data-deptName="{{ value.deptName?value.deptName: '--' }}" | ||
7 | data-statusName="{{ value.statusName ? value.statusName: '--' }}" | ||
8 | data-updateDate="{{ value.updateDate ? value.updateDate.split(' ').join('|'): '--' }}" | ||
9 | data-pickingUserName="{{ value.pickingUserName ? value.pickingUserName: '--' }}" | ||
10 | data-applyOrderNo="{{ value.applyOrderNo ? value.applyOrderNo: '' }}" | ||
11 | > | ||
12 | <div class="am-card-header"> | ||
13 | <div class="am-card-header-content"> | ||
14 | <span style="font-size: 16px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
15 | 拣货单号: {{ value.pickingOrderNo}}</span> | ||
16 | </div> | ||
17 | <div class="am-card-header-extra" style="text-align:left"> | ||
18 | <span class="mui-badge mui-badge-warning badge">{{value.pickingDetailItemCount?value.pickingDetailItemCount:0}}</span> | ||
19 | </div> | ||
20 | <div class="am-card-header-extra"> | ||
21 | <span>{{ value.type }}</span> | ||
22 | <span style='margin-left: "8px";'>{{ value.statusName }} </span> | ||
23 | <!--{{ if picking }} | ||
24 | <span class="hasGround ground-tag">已拣货</span> | ||
25 | {{ else }} | ||
26 | <span class="before-ground ground-tag">待拣货</span> | ||
27 | {{ /if }}--> | ||
28 | </div> | ||
29 | </div> | ||
30 | <div class="am-card-body"> | ||
31 | <div class="am-flexbox am-flexbox-align-center"> | ||
32 | <div class="am-flexbox-item"> | ||
33 | 发起时间:<span>{{ value.createDate }}</span> | ||
34 | </div> | ||
35 | <!--<div class="am-flexbox-item"> | ||
36 | 品项数:<span>{{ value.total }}</span> | ||
37 | </div>--> | ||
38 | </div> | ||
39 | </div> | ||
40 | </div> | ||
41 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
42 | </div> | ||
43 | {{/each}} | ||
44 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/stockQuery_card.html
0 → 100644
1 | |||
2 | <script type="text/html" id='stock'> | ||
3 | {{ each list value i}} | ||
4 | <div class="am-card scrollList-item am-card-full" | ||
5 | data-hisDrugCode="{{ value.hisDrugCode }}" | ||
6 | data-drugCode="{{ value.drugCode }}" | ||
7 | > | ||
8 | <div class="am-card-header"> | ||
9 | <div class="am-card-header-content"> | ||
10 | <span style="font-size: 18px; color: rgb(51, 51, 51); font-weight: bold;"> | ||
11 | {{ value.ctmmGenericName }}</span> | ||
12 | </div> | ||
13 | <div class="am-card-header-extra"> | ||
14 | <span class="font-danger">{{ value.type }}</span> | ||
15 | </div> | ||
16 | </div> | ||
17 | <div class="am-card-body"> | ||
18 | <div class="am-flexbox am-flexbox-align-center"> | ||
19 | <div class="am-flexbox-item"> | ||
20 | 单位:<span>{{ value.replanUnit }}</span> | ||
21 | </div> | ||
22 | <div class="am-flexbox-item"> | ||
23 | 规格:<span>{{ value.ctmmSpecification }}</span> | ||
24 | </div> | ||
25 | </div> | ||
26 | <div class="am-flexbox am-flexbox-align-center"> | ||
27 | <div class="am-flexbox-item"> | ||
28 | 数量:<span class="font-danger">{{ value.usableQuantity }}</span> | ||
29 | </div> | ||
30 | {{if value.limitNum}} | ||
31 | <div class="am-flexbox-item"> | ||
32 | 近效期数量:<span class="font-danger">{{ value.limitNum }}</span> | ||
33 | </div> | ||
34 | {{/if}} | ||
35 | </div> | ||
36 | </div> | ||
37 | </div> | ||
38 | <div style="background-color: #f5f5f9; height: 6px;"> | ||
39 | </div> | ||
40 | {{/each}} | ||
41 | |||
42 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
tpl/tips.html
0 → 100644
1 | <script type="text/html" id="tips-tpl"> | ||
2 | <div class="main-title"> | ||
3 | <div class="tip-title">{{ title }}</div> | ||
4 | <div class="tip-date">{{ tipdate }}</div> | ||
5 | </div> | ||
6 | {{ each list value i}} | ||
7 | <ul class="mui-table-view"> | ||
8 | <li class="mui-table-view-cell"> | ||
9 | <div class="mui-input-row"> | ||
10 | <label>商品名称</label> | ||
11 | <p class="detailRow_content">{{ value.ctmmTradeName }}</p> | ||
12 | </div> | ||
13 | </li> | ||
14 | <li class="mui-table-view-cell"> | ||
15 | <div class="mui-input-row"> | ||
16 | <label>通用名称</label> | ||
17 | <p class="detailRow_content">{{ value.ctmmGenericName}}</p> | ||
18 | </div> | ||
19 | </li> | ||
20 | <li class="mui-table-view-cell"> | ||
21 | <div class="mui-input-row"> | ||
22 | <label>规格</label> | ||
23 | <p class="detailRow_content">{{ value.ctmmSpecification }}</p> | ||
24 | </div> | ||
25 | </li> | ||
26 | <li class="mui-table-view-cell"> | ||
27 | <div class="mui-input-row"> | ||
28 | <label>剂型</label> | ||
29 | <p class="detailRow_content">{{ value.ctmmDosageFormDesc }}</p> | ||
30 | </div> | ||
31 | </li> | ||
32 | <li class="mui-table-view-cell"> | ||
33 | <div class="mui-input-row"> | ||
34 | <label>生产厂家</label> | ||
35 | <p class="detailRow_content">{{ value.ctmmManufacturerName }}</p> | ||
36 | </div> | ||
37 | </li> | ||
38 | <li class="mui-table-view-cell"> | ||
39 | <div class="mui-input-row"> | ||
40 | <label>包装规格</label> | ||
41 | <p class="detailRow_content">{{ value.packageSpecification }}</p> | ||
42 | </div> | ||
43 | </li> | ||
44 | <li class="mui-table-view-cell"> | ||
45 | <div class="mui-input-row"> | ||
46 | <label>单位</label> | ||
47 | <p class="detailRow_content">{{ value.unit }}</p> | ||
48 | </div> | ||
49 | </li> | ||
50 | {{ if remindType === 'usefulDate' }} | ||
51 | <li class="mui-table-view-cell"> | ||
52 | <div class="mui-input-row"> | ||
53 | <label>生产批号</label> | ||
54 | <p class="detailRow_content">{{ value.lot }}</p> | ||
55 | </div> | ||
56 | </li> | ||
57 | <li class="mui-table-view-cell"> | ||
58 | <div class="mui-input-row"> | ||
59 | <label>生产日期</label> | ||
60 | <p class="detailRow_content">{{ value.productDate }}</p> | ||
61 | </div> | ||
62 | </li> | ||
63 | <li class="mui-table-view-cell"> | ||
64 | <div class="mui-input-row"> | ||
65 | <label>有效期至</label> | ||
66 | <p class="detailRow_content">{{ value.validEndDate }}</p> | ||
67 | </div> | ||
68 | </li> | ||
69 | {{ else }} | ||
70 | <li class="mui-table-view-cell"> | ||
71 | <div class="mui-input-row"> | ||
72 | <label>当前库存</label> | ||
73 | <p class="detailRow_content">{{ value.usableQuantity }}</p> | ||
74 | </div> | ||
75 | </li> | ||
76 | <li class="mui-table-view-cell"> | ||
77 | <div class="mui-input-row"> | ||
78 | <label>库存上限</label> | ||
79 | <p class="detailRow_content">{{ value.upperQuantity }}</p> | ||
80 | </div> | ||
81 | </li> | ||
82 | <li class="mui-table-view-cell"> | ||
83 | <div class="mui-input-row"> | ||
84 | <label>库存下限</label> | ||
85 | <p class="detailRow_content">{{ value.downQuantity }}</p> | ||
86 | </div> | ||
87 | </li> | ||
88 | {{ /if }} | ||
89 | |||
90 | </ul> | ||
91 | {{ /each }} | ||
92 | |||
93 | </script> |
unpackage/.confirmed_dependencies
0 → 100644
1 | { | ||
2 | "container/acceptance/acc_list.html": { | ||
3 | "refer": [ | ||
4 | "container/acceptance/acc_detail.html", | ||
5 | "container/acceptance/acc_batch.html", | ||
6 | "container/result/index.html", | ||
7 | "container/commonPages/searchPage.html" | ||
8 | ], | ||
9 | "resources": [] | ||
10 | }, | ||
11 | "container/acceptance/index.html": { | ||
12 | "refer": [ | ||
13 | "container/acceptance/acc_list.html", | ||
14 | "container/commonPages/qrcode.html", | ||
15 | "container/commonPages/searchPage.html", | ||
16 | "container/acceptance/acc_detail.html", | ||
17 | "container/acceptance/acc_not_list.html" | ||
18 | ], | ||
19 | "resources": [] | ||
20 | }, | ||
21 | "container/home/index.html": { | ||
22 | "refer": [ | ||
23 | "container/pickingOff/index.html", | ||
24 | "container/home/tips.html", | ||
25 | "container/acceptance/index.html", | ||
26 | "container/grounding/index.html", | ||
27 | "container/stockQuery/index.html", | ||
28 | "container/check/index.html", | ||
29 | "container/home/profile.html", | ||
30 | "container/commonPages/qrcode.html", | ||
31 | "container/basicMedicine/index.html" | ||
32 | ], | ||
33 | "resources": [ | ||
34 | "js/utils.js", | ||
35 | "css/home.css", | ||
36 | "js/mui.pullToRefresh.js", | ||
37 | "js/common.js", | ||
38 | "js/mui.pullToRefresh.material.js", | ||
39 | "js/template-web.js", | ||
40 | "js/request.js", | ||
41 | "js/mui.js", | ||
42 | "tpl/message.html" | ||
43 | ] | ||
44 | }, | ||
45 | "container/grounding/index.html": { | ||
46 | "refer": [ | ||
47 | "container/grounding/ground_list.html", | ||
48 | "container/commonPages/qrcode.html", | ||
49 | "container/commonPages/searchPage.html", | ||
50 | "container/commonPages/searchCode.html", | ||
51 | "container/grounding/ground_not_list.html" | ||
52 | ], | ||
53 | "resources": [] | ||
54 | }, | ||
55 | "container/grounding/ground_list.html": { | ||
56 | "refer": [ | ||
57 | "container/grounding/ground_detail.html", | ||
58 | "container/grounding/ground_batch.html", | ||
59 | "container/result/index.html", | ||
60 | "container/commonPages/searchPage.html" | ||
61 | ], | ||
62 | "resources": [] | ||
63 | }, | ||
64 | "container/pickingOff/index.html": { | ||
65 | "refer": [ | ||
66 | "container/pickingOff/pickingOffList.html", | ||
67 | "container/commonPages/qrcode.html", | ||
68 | "container/commonPages/searchPage.html", | ||
69 | "container/pickingOff/pickingOffListUn.html" | ||
70 | ], | ||
71 | "resources": [] | ||
72 | }, | ||
73 | "container/stockQuery/index.html": { | ||
74 | "refer": [ | ||
75 | "container/stockQuery/details.html", | ||
76 | "container/commonPages/searchPage.html" | ||
77 | ], | ||
78 | "resources": [] | ||
79 | }, | ||
80 | "container/check/index.html": { | ||
81 | "refer": [ | ||
82 | "container/check/checkList.html", | ||
83 | "container/check/subIndex.html", | ||
84 | "container/check/index.html" | ||
85 | ], | ||
86 | "resources": [ | ||
87 | "container/check/subIndex.html" | ||
88 | ] | ||
89 | }, | ||
90 | "container/check/checkList.html": { | ||
91 | "refer": [ | ||
92 | "container/check/checkDetails.html" | ||
93 | ], | ||
94 | "resources": [] | ||
95 | }, | ||
96 | "container/acceptance/acc_detail.html": { | ||
97 | "refer": [ | ||
98 | "container/Result/index.html", | ||
99 | "container/result/index.html" | ||
100 | ], | ||
101 | "resources": [] | ||
102 | }, | ||
103 | "container/pickingOff/pickingOffList.html": { | ||
104 | "refer": [ | ||
105 | "container/pickingOff/pickingOffDetails.html", | ||
106 | "container/pickingOff/picking_batch.html", | ||
107 | "container/result/index.html", | ||
108 | "container/commonPages/searchPage.html" | ||
109 | ], | ||
110 | "resources": [] | ||
111 | }, | ||
112 | "container/login/login.html": { | ||
113 | "refer": [ | ||
114 | "container/login/main.html", | ||
115 | "container/login/forget_password.html", | ||
116 | "container/login/reg.html", | ||
117 | "container/home/index.html" | ||
118 | ], | ||
119 | "resources": [] | ||
120 | }, | ||
121 | "container/guide.html": { | ||
122 | "refer": [ | ||
123 | "container/login/login.html", | ||
124 | "container/login/index.html" | ||
125 | ], | ||
126 | "resources": [] | ||
127 | }, | ||
128 | "container/login/index.html": { | ||
129 | "refer": [ | ||
130 | "container/home/index.html" | ||
131 | ], | ||
132 | "resources": [] | ||
133 | }, | ||
134 | "container/index.html": { | ||
135 | "refer": [ | ||
136 | "container/guide.html", | ||
137 | "container/login/index.html" | ||
138 | ], | ||
139 | "resources": [] | ||
140 | }, | ||
141 | "container/commonPages/qrcode.html": { | ||
142 | "refer": [ | ||
143 | "container/acceptance/acc_list.html" | ||
144 | ] | ||
145 | }, | ||
146 | "container/acceptance/acc_batch.html": { | ||
147 | "refer": [ | ||
148 | "container/result/index.html" | ||
149 | ] | ||
150 | }, | ||
151 | "container/grounding/ground_batch.html": { | ||
152 | "refer": [ | ||
153 | "container/result/index.html" | ||
154 | ] | ||
155 | }, | ||
156 | "container/pickingOff/picking_batch.html": { | ||
157 | "refer": [ | ||
158 | "container/result/index.html" | ||
159 | ] | ||
160 | }, | ||
161 | "container/pickingOff/pickingOffDetails.html": { | ||
162 | "refer": [ | ||
163 | "container/result/index.html" | ||
164 | ] | ||
165 | }, | ||
166 | "container/check/checkDetails.html": { | ||
167 | "refer": [ | ||
168 | "container/result/index.html" | ||
169 | ] | ||
170 | }, | ||
171 | "container/grounding/ground_detail.html": { | ||
172 | "refer": [ | ||
173 | "container/result/index.html" | ||
174 | ] | ||
175 | }, | ||
176 | "container/basicMedicine/index.html": { | ||
177 | "refer": [ | ||
178 | "container/basicMedicine/acc_list.html", | ||
179 | "container/basicMedicine/basic_acc_list.html" | ||
180 | ] | ||
181 | }, | ||
182 | "container/basicMedicine/acc_list.html": { | ||
183 | "refer": [ | ||
184 | "container/basicMedicine/acc_detail.html", | ||
185 | "container/basicMedicine/basic_acc_batch.html", | ||
186 | "container/commonPages/searchPage.html" | ||
187 | ] | ||
188 | }, | ||
189 | "container/basicMedicine/acc_detail.html": { | ||
190 | "refer": [ | ||
191 | "container/result/index.html" | ||
192 | ] | ||
193 | }, | ||
194 | "container/basicMedicine/basic_acc_list.html": { | ||
195 | "refer": [ | ||
196 | "container/commonPages/searchPage.html" | ||
197 | ] | ||
198 | }, | ||
199 | "container/home/profile.html": { | ||
200 | "refer": [ | ||
201 | "container/login/index.html" | ||
202 | ] | ||
203 | }, | ||
204 | "container/acceptance/acc_not_list.html": { | ||
205 | "refer": [ | ||
206 | "container/acceptance/acc_detail.html", | ||
207 | "container/commonPages/searchPage.html", | ||
208 | "container/acceptance/acc_batch.html" | ||
209 | ] | ||
210 | }, | ||
211 | "container/grounding/ground_not_list.html": { | ||
212 | "refer": [ | ||
213 | "container/grounding/ground_detail.html", | ||
214 | "container/grounding/ground_batch.html", | ||
215 | "container/commonPages/searchPage.html" | ||
216 | ] | ||
217 | }, | ||
218 | "container/pickingOff/pickingOffListUn.html": { | ||
219 | "refer": [ | ||
220 | "container/commonPages/searchPage.html" | ||
221 | ] | ||
222 | } | ||
223 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
unpackage/.confusion
0 → 100644
1 | {"js/common.js":{},"js/mui.js":{},"js/mui.min.js":{},"js/mui.pullToRefresh.js":{},"js/mui.pullToRefresh.material.js":{},"js/qrcode.js":{},"js/template-web.js":{},"js/utils.js":{}} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
unpackage/.dependencies
0 → 100644
1 | null | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
unpackage/res/icons/1024x1024.png
0 → 100644

1.06 MB
unpackage/res/icons/120x120.png
0 → 100644

23 KB
unpackage/res/icons/144x144.png
0 → 100644

31.6 KB
unpackage/res/icons/152x152.png
0 → 100644

34.7 KB
unpackage/res/icons/167x167.png
0 → 100644

39.5 KB
unpackage/res/icons/180x180.png
0 → 100644

45.8 KB
unpackage/res/icons/192x192.png
0 → 100644

51.5 KB
unpackage/res/icons/20x20.png
0 → 100644

1.16 KB
unpackage/res/icons/256x256.png
0 → 100644

88.7 KB
unpackage/res/icons/29x29.png
0 → 100644

2.04 KB
unpackage/res/icons/40x40.png
0 → 100644

3.39 KB
unpackage/res/icons/48x48.png
0 → 100644

4.59 KB
unpackage/res/icons/58x58.png
0 → 100644

6.44 KB
unpackage/res/icons/60x60.png
0 → 100644

6.7 KB
unpackage/res/icons/72x72.png
0 → 100644

9.29 KB
unpackage/res/icons/76x76.png
0 → 100644

10.3 KB
unpackage/res/icons/80x80.png
0 → 100644

11.1 KB
unpackage/res/icons/87x87.png
0 → 100644

13.1 KB
unpackage/res/icons/96x96.png
0 → 100644

15.3 KB
-
Please register or sign in to post a comment