payThirdParties.jsp 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/WEB-INF/views/include/taglib.jsp" %>
  3. <html>
  4. <head>
  5. <title>申请付款</title>
  6. <meta name="decorator" content="default"/>
  7. <style type="text/css">
  8. .table th {
  9. text-align: center
  10. }
  11. .table td {
  12. text-align: center
  13. }
  14. .pay-wrapper {
  15. padding: 0 10px
  16. }
  17. .pay-list-item {
  18. margin-bottom: 30px
  19. }
  20. .pay-table th {
  21. background: #f9f9f9
  22. }
  23. .pay-table tr:first-child th {
  24. background: #eee !important
  25. }
  26. .pay-table td {
  27. background: #fff !important
  28. }
  29. input[type="checkbox"]::before {
  30. content: '\a0';
  31. display: inline-block;
  32. vertical-align: .2em;
  33. width: .8em;
  34. height: .8em;
  35. margin-right: .2em;
  36. border-radius: .2em;
  37. text-indent: .15em;
  38. line-height: .65
  39. }
  40. .t-btn {
  41. width: 120px;
  42. height: 30px;
  43. -webkit-border-radius: 5px;
  44. -moz-border-radius: 5px;
  45. border-radius: 5px;
  46. background: #fff;
  47. border: 1px solid #ddd;
  48. margin-bottom: 10px
  49. }
  50. #select-all {
  51. width: 70px;
  52. height: 30px;
  53. -webkit-border-radius: 5px;
  54. -moz-border-radius: 5px;
  55. border-radius: 5px;
  56. background: #fff;
  57. border: 1px solid #ddd;
  58. margin-bottom: 10px
  59. }
  60. #select-all:active {
  61. background: #3daae9;
  62. color: #fff
  63. }
  64. .pay-more-func {
  65. float: right;
  66. color: #2fa4e7;
  67. cursor: pointer
  68. }
  69. .pay-more-func span:first-child {
  70. margin-right: 6px
  71. }
  72. .pay-more-func span:hover {
  73. color: #7aa9c3
  74. }
  75. .mask {
  76. width: 100%;
  77. height: 100%;
  78. position: fixed;
  79. top: 0;
  80. background: rgba(0, 0, 0, 0.7);
  81. display: none
  82. }
  83. .revise-popup-content, .tips-popup-content {
  84. width: 40%;
  85. height: auto;
  86. padding-bottom: 30px;
  87. background: #fff;
  88. -webkit-border-radius: 5px;
  89. -moz-border-radius: 5px;
  90. border-radius: 5px;
  91. position: absolute;
  92. top: 50%;
  93. left: 50%;
  94. transform: translate(-50%, -50%)
  95. }
  96. .revise-popup-content {
  97. width: 450px;
  98. height: 360px;
  99. overflow-y: scroll;
  100. padding: 0 15px 30px 15px
  101. }
  102. .tips-popup-content {
  103. width: 30%
  104. }
  105. .tips-popup-content p {
  106. text-align: center;
  107. padding: 80px;
  108. font-size: 20px
  109. }
  110. .revise-popup-content h4, .tips-popup-content h4 {
  111. padding-left: 10px;
  112. height: 40px;
  113. line-height: 40px;
  114. border-bottom: 1px solid #eee;
  115. margin-bottom: 20px
  116. }
  117. .revise-popup-content div {
  118. margin-top: 7px;
  119. text-align: center
  120. }
  121. .revise-popup-content label {
  122. width: 70px;
  123. text-align: right;
  124. vertical-align: text-bottom
  125. }
  126. .revise-popup-content button {
  127. width: 80px;
  128. height: 30px;
  129. -webkit-border-radius: 5px;
  130. -moz-border-radius: 5px;
  131. border-radius: 5px
  132. }
  133. .revise-popup-content > div:nth-of-type(4) > span:first-child {
  134. margin-left: -104px
  135. }
  136. .revise-popup-content > div:nth-of-type(4) > span:last-child {
  137. margin-left: 30px
  138. }
  139. .revise-popup-content > div:nth-of-type(4) > span span {
  140. margin-left: 10px
  141. }
  142. .revise-popup-content > div:last-child {
  143. text-align: center;
  144. margin-top: 20px
  145. }
  146. .revise-popup-content input {
  147. width: 100px;
  148. margin-bottom: 0px
  149. }
  150. .tips-input-wrapper {
  151. width: 100px
  152. }
  153. .pay-status {
  154. height: 40px;
  155. line-height: 40px;
  156. display: block
  157. }
  158. .form-search label {
  159. width: 80px;
  160. text-align: left;
  161. margin-top: 12px
  162. }
  163. .remark-textarea {
  164. width: 95%;
  165. height: 100px;
  166. resize: none
  167. }
  168. .remark-title {
  169. text-align: left !important
  170. }
  171. .remark-title span {
  172. color: red
  173. }
  174. .ul-form {
  175. white-space: nowrap;
  176. margin-left: -10px !important
  177. }
  178. .ul-form label {
  179. width: 90px;
  180. text-align: left;
  181. margin-top: 15px
  182. }
  183. .time-space-symbols {
  184. width: 100px;
  185. display: inline-block;
  186. text-align: center
  187. }
  188. #btnSubmit {
  189. width: 128px;
  190. margin-left: 165px
  191. }
  192. .pay-status label {
  193. margin-left: 0
  194. }
  195. .pay-status label:first-child {
  196. margin-left: 10px
  197. }
  198. .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
  199. </style>
  200. <script type="text/javascript">
  201. function page(n, s) {
  202. $("#pageNo").val(n);
  203. $("#pageSize").val(s);
  204. $("#searchForm").submit();
  205. return false;
  206. }
  207. </script>
  208. </head>
  209. <body>
  210. <ul class="nav nav-tabs">
  211. <li><a href="${ctx}/order/cmPayShop/payList">付款列表</a></li>
  212. <li class="active tab-li"><a href="${ctx}/shopOrder/payThirdParties">申请付第三方</a></li>
  213. <shiro:hasPermission name="order:cmPayShop:split">
  214. <li><a href="${ctx}/shopOrder/splitList">子订单手动分账</a></li>
  215. </shiro:hasPermission>
  216. <li><a href="${ctx}/shopOrder/settlement">子订单手动结算</a></li>
  217. </ul>
  218. <form:form id="searchForm" onsubmit="submitFunc()" modelAttribute="newShopOrder"
  219. action="${ctx}/shopOrder/payThirdParties" method="post" class="breadcrumb form-search">
  220. <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
  221. <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
  222. <div class="ul-form">
  223. <label>子订单ID:</label>
  224. <form:input path="shopOrderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
  225. <label>子订单编号:</label>
  226. <form:input path="shopOrderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
  227. <label>订单ID:</label>
  228. <form:input path="orderID" htmlEscape="false" onkeyup="onlynum(this)" maxlength="8" class="input-medium"/>
  229. <label>订单编号:</label>
  230. <form:input path="orderNo" htmlEscape="false" maxlength="20" class="input-medium"/><br>
  231. <label>供应商:</label>
  232. <form:input path="shopName" htmlEscape="false" maxlength="20" class="input-medium"/>
  233. <label>机构:</label>
  234. <form:input path="clubName" htmlEscape="false" maxlength="20" class="input-medium"/>
  235. <label class="control-label">下单时间:</label>
  236. <form:input path="startTime" type="text" maxlength="10" class="input-medium Wdate" value="${startTime}"
  237. onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
  238. <span class="time-space-symbols">至</span>
  239. <form:input path="endTime" type="text" maxlength="10" class="input-medium Wdate" value="${endTime}"
  240. onclick="WdatePicker({dateFmt:'yyyy-MM-dd ',isShowClear:false});"/>
  241. <div class="pay-status">
  242. <label>组织:</label>
  243. <form:select path="organizeID" class="input-medium">
  244. <form:option value="" label="请选择"/>
  245. <form:option value="0" label="采美"/>
  246. <form:option value="9999" label="呵呵商城"/>
  247. <c:forEach items="${cmUserOrganizeList}" var="organize">
  248. <c:if test="${organize.id!=4}">
  249. <form:option value="${organize.id}" label="${organize.organizeName}"/>
  250. </c:if>
  251. </c:forEach>
  252. </form:select>
  253. <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
  254. </div>
  255. <div class="clearfix"></div>
  256. </div>
  257. </form:form>
  258. <sys:message content="${message}"/>
  259. <div class="pay-wrapper">
  260. <button id="applyShopOtherFee" class="t-btn" style="color:white;background-color:#2F6FAB">付第三方申请</button>
  261. <c:forEach items="${page.list}" var="s" varStatus="sIndex">
  262. <div class="pay-list-item">
  263. <table class="table table-striped table-bordered table-condensed pay-table">
  264. <tr>
  265. <th style="width:20px;">
  266. <input type="checkbox" ${s.status eq 7 ?'disabled':''} data-shoporderid="${s.shopOrderID}" data-shopid="${s.shopID}" data-isPayShopOtherFee="${s.payShopOtherFee}"/>
  267. </th>
  268. <th>子订单编号(ID)</th>
  269. <th colspan="3">订单编号(ID)</th>
  270. <th colspan="2">订单金额</th>
  271. <th colspan="3">下单时间</th>
  272. <th>收款状态</th>
  273. <th>收款金额</th>
  274. <th colspan="3">经理折扣</th>
  275. <th>优惠券</th>
  276. <th>成本类型</th>
  277. </tr>
  278. <tr>
  279. <td><a href="${ctx}/order/detail?id=${s.orderID}">${s.shopOrderNo}(${s.shopOrderID})</a></td>
  280. <td colspan="3"><a href="${ctx}/order/detail?id=${s.orderID}">${s.orderNo}(${s.orderID})</a></td>
  281. <td colspan="2"><fmt:formatNumber value="${s.payTotalFee}" type="number" pattern="#,##0.00"/></td>
  282. <td colspan="3">${s.orderTime}</td>
  283. <%--此处对应订单列表收款状态--%>
  284. <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">
  285. <c:if test="${s.receiptStatus == 1}"><font color="red">待收款</font></c:if>
  286. <c:if test="${s.receiptStatus == 2}"><font color="#ff8c00">部分收款</font></c:if>
  287. <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a>
  288. </td>
  289. <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
  290. <td colspan="3">
  291. <c:if test="${s.discountTotalFee gt 0}">
  292. <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
  293. <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
  294. type="currency"/>
  295. </c:if>
  296. <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
  297. ¥0.00
  298. </c:if>
  299. <c:if test="${s.returnedPurchaseTotalFee gt 0}">
  300. <span style="color: red">
  301. (原<fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>,因退货折扣取消
  302. <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
  303. <fmt:formatNumber value="${s.returnedPurchaseTotalFee}" type="currency"/>
  304. </c:if>
  305. <c:if test="${s.discountTotalFee le s.returnedPurchaseTotalFee}">
  306. <fmt:formatNumber value="${s.discountTotalFee}" type="currency"/>
  307. </c:if>)
  308. </span>
  309. </c:if>
  310. </c:if>
  311. <c:if test="${s.discountTotalFee le 0}">¥0.00</c:if>
  312. </td>
  313. <td>
  314. ${s.couponAmount}
  315. </td>
  316. <td colspan="2"><c:if test="${empty s.costType || s.costType == '1'}">固定成本</c:if><c:if
  317. test="${s.costType == '2'}">比例成本</c:if></td>
  318. </tr>
  319. <tr>
  320. <th>供应商</th>
  321. <th colspan="3">机构</th>
  322. <th>机构运费</th>
  323. <th>供应商运费</th>
  324. <th colspan="3">商品费</th>
  325. <th colspan="2">付款状态</th>
  326. <th colspan="3">应付税费</th>
  327. <th>付供应商</th>
  328. <th>付第三方</th>
  329. </tr>
  330. <tr>
  331. <td>${s.shopName}</td>
  332. <td colspan="3">
  333. <c:if test="${s.organizeID eq 1}"><span class="org-note">星范</span></c:if>
  334. ${s.clubName}
  335. <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
  336. <c:if test="${s.organizeID == 3}"><em class="weishaIcon">维沙</em></c:if>
  337. </td>
  338. <td>
  339. <c:if test="${s.freight == 0}">
  340. 包邮
  341. </c:if>
  342. <c:if test="${s.freight == -1}">
  343. 到付
  344. </c:if>
  345. <c:if test="${s.freight == -2}">
  346. 仪器到付-产品包邮
  347. </c:if>
  348. <c:if test="${s.freight != -1 && s.freight != 0 && s.freight != -2}">
  349. <fmt:formatNumber value="${s.freight}" type="currency"/>
  350. <c:if test="${s.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
  351. </c:if>
  352. <c:if test="${s.userBeans > 0}">
  353. <br><font color="red">(采美豆抵用:${s.userBeans})</font>
  354. </c:if>
  355. </td>
  356. <td class="freight"><fmt:formatNumber value="${s.shopPostFee}" type="number"
  357. pattern="#,##0.00"/></td>
  358. <td colspan="3" class="product-fee"><fmt:formatNumber value="${s.shopProductAmount}" type="number"
  359. pattern="#,##0.00"/></td>
  360. <td colspan="2"><c:if test="${s.payStatus == 1 || empty s.payStatus || s.payStatus == 0}"><font
  361. color="red">待付款</font></c:if>
  362. <c:if test="${s.payStatus == 2}"><font color="#ff8c00">部分付款</font></c:if>
  363. <c:if test="${s.payStatus == 3}"><font color="green">已付款</font></c:if></td>
  364. <td colspan="3" class="taxes"><fmt:formatNumber value="${s.shopTaxFee}" type="number"
  365. pattern="#,##0.00"/></td>
  366. <td class="supplier-fee">
  367. <c:if test="${s.differenceType ne 1 && s.differenceType ne 2 }">
  368. <font color="#E15616"><fmt:formatNumber value="${s.shouldPayShopAmount}" type="number"
  369. pattern="#,##0.00"/></font>
  370. </c:if>
  371. <c:if test="${s.differenceType eq 1 && s.differencePrice > 0}">
  372. <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount+s.differencePrice}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已补差价:${s.differencePrice})</font>
  373. </c:if>
  374. <c:if test="${s.differenceType eq 2 && s.differencePrice > 0}">
  375. <font color="black"><fmt:formatNumber value="${s.shouldPayShopAmount-s.differencePrice}"/></font><font color="red">(原应付:${s.shouldPayShopAmount},已退差价:${s.differencePrice})</font>
  376. </c:if>
  377. </td>
  378. <input type="hidden" class="payedShopAmount" value="${s.payedShopAmount}">
  379. <input type="hidden" class="productAmount" value="${s.productAmount}">
  380. <input type="hidden" class="costType" value="${s.costType}">
  381. <input type="hidden" class="proportional" value="${s.proportional}">
  382. <input type="hidden" class="modifyShouldPayNote" value="${s.modifyShouldPayNote}">
  383. <td class="third-party-fee"><fmt:formatNumber value="${s.shopOtherFee}" type="number"
  384. pattern="#,##0.00"/></td>
  385. </tr>
  386. <tr>
  387. <th>商品名</th>
  388. <th>规格</th>
  389. <th>数量<%--(赠品)--%></th>
  390. <th>退货</th>
  391. <th colspan="2">单价</th>
  392. <th colspan="3">机构税率 / 单税费 / 总税费</th>
  393. <th colspan="2">总价</th>
  394. <th colspan="3">供应商税率 / 单税费 / 总税费</th>
  395. <th>成本(单)</th>
  396. <th>成本(总)</th>
  397. </tr>
  398. <c:forEach items="${s.newOrderProducts}" var="p" varStatus="pIndex">
  399. <tr class="pay-product-item">
  400. <input type="hidden" class="p-copId" value="${p.orderProductID}">
  401. <td style="width:300px;" class="p-name">
  402. <c:if test="${p.productType eq 1}"><font color="red">协商赠品:</font></c:if>
  403. <c:if test="${p.productType eq 2}"><font color="red">促销赠品:</font></c:if>
  404. ${p.name}
  405. </td>
  406. <td style="width:80px;">${p.unit}</td>
  407. <td class="p-num" data-num="${p.num + p.presentNum}">
  408. ${p.num}
  409. <c:if test="${p.presentNum > 0}">(赠:${p.presentNum})</c:if>
  410. </td>
  411. <td><font color="${p.returnedNum>0?'red':''}">${p.returnedNum}</font></td>
  412. <td colspan="2"><fmt:formatNumber value="${empty p.touchPrice?p.discountPrice:p.touchPrice}"
  413. type="number" pattern="#,##0.00"/>
  414. <c:if test="${p.includedTax != null and p.includedTax != '' and p.includedTax ne 2}">
  415. <label style="color: red">
  416. (${p.includedTax eq 1?'含税':(p.invoiceType eq 1 or p.invoiceType eq 2)?'不含税-能开票':'不含税-不能开票'})
  417. </label>
  418. </c:if>
  419. </td>
  420. <td>${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.taxRate?0.0:p.taxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
  421. <td>${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.addedValueTax ?0.00:p.addedValueTax}</td>
  422. <td>
  423. <c:choose>
  424. <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
  425. ---
  426. </c:when>
  427. <c:otherwise>
  428. <fmt:formatNumber
  429. value="${empty p.totalAddedValueTax ?0.00:(p.addedValueTax * (p.num+p.presentNum-p.returnedNum))}"
  430. type="number" pattern="#,##0.00"/>
  431. </c:otherwise>
  432. </c:choose>
  433. </td>
  434. <td colspan="2"><fmt:formatNumber
  435. value="${((empty p.touchPrice?p.discountPrice:p.touchPrice) + p.addedValueTax)*(p.num+p.presentNum-p.returnedNum)}"
  436. type="number" pattern="#,##0.00"/></td>
  437. <td class="p-taxes">${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'---':empty p.supplierTaxRate?0.0:p.supplierTaxRate}${(p.includedTax ne '' and p.includedTax eq 0 and p.invoiceType eq 3)?'':'%'}</td>
  438. <td class="p-taxes">${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))?'---': empty p.singleShouldPayTotalTax ?0.00:p.singleShouldPayTotalTax}</td>
  439. <td class="p-taxes-t">
  440. <c:choose>
  441. <c:when test="${(p.includedTax ne '' and (p.includedTax eq 1 or (p.includedTax eq 0 and p.invoiceType eq 3)))}">
  442. ---
  443. </c:when>
  444. <c:otherwise>
  445. <fmt:formatNumber
  446. value="${empty p.shouldPayTotalTax ?0.00:(p.singleShouldPayTotalTax * (p.num+p.presentNum-p.returnedNum))}"
  447. type="number" pattern="#,##0.00"/>
  448. </c:otherwise>
  449. </c:choose>
  450. </td>
  451. <td class="p-costprice"><fmt:formatNumber value="${p.costPrice}" type="number"
  452. pattern="#,##0.00"/></td>
  453. <td><fmt:formatNumber value="${p.costPrice * (p.num + p.presentNum - p.returnedNum)}"
  454. type="number" pattern="#,##0.00"/></td>
  455. </tr>
  456. </c:forEach>
  457. </table>
  458. <div class="pay-more-func">
  459. <a href="${ctx}/shopOrder/payShopRemark?shopOrderId=${s.shopOrderID}">应付备注</a>
  460. <a href="${ctx}/shopOrder/payedAndRefundRecordList?shopOrderID=${s.shopOrderID}&operatingMode=${operatingMode}">退/付款记录</a>
  461. </div>
  462. </div>
  463. </c:forEach>
  464. </div>
  465. <div class="pagination">${page}</div>
  466. <script>
  467. (function () {
  468. var payTableEle = $('.pay-table'),
  469. payProductEle = $('.pay-product-item');
  470. payTableEle.each(function (i, l) {
  471. var leftLength = $(this).find('tr').length,
  472. productLength = $(this).find('.pay-product-item').length;
  473. // 左侧栏合并单元格
  474. $(this).find('tr:first-child th:first-child').attr('rowspan', leftLength);
  475. });
  476. $('.tab-li').on('click', function () {
  477. if (getCheckedArr) {
  478. sessionStorage.removeItem('checkedIndexArr');
  479. }
  480. });
  481. //付第三方
  482. $('#applyShopOtherFee').on('click', function () {
  483. var checked = $('.pay-wrapper input[type=checkbox]:checked');
  484. if (checked.length < 1) {
  485. alertx('请选择一个子订单');
  486. return false;
  487. }
  488. if (checked.length > 1) {
  489. alertx('每次只能选择一个子订单进行付第三方申请');
  490. return false;
  491. }
  492. var isPayShopOtherFee = $(checked[0]).attr('data-isPayShopOtherFee');
  493. if ("false" == isPayShopOtherFee) {
  494. alertx("付第三方处于待审核状态,暂不能操作");
  495. return false;
  496. }
  497. var shopOrderId = $(checked[0]).attr('data-shoporderid');
  498. window.location.href = '${ctx}/order/cmPayShop/shopOtherFeeForm?shopOrderId=' + shopOrderId+'&payType=2';
  499. });
  500. //供应商差价申请
  501. $('#applyDifferencePrice').on('click', function () {
  502. var checked = $('.pay-wrapper input[type=checkbox]:checked');
  503. if (checked.length < 1) {
  504. alertx('请选择一个子订单');
  505. return false;
  506. }
  507. if (checked.length > 1){
  508. alertx('每次只能选择一个子订单进行供应商差价申请');
  509. return false;
  510. }
  511. var shopOrderId = $(checked[0]).attr('data-shoporderid');
  512. window.location.href = '${ctx}/order/cmPayShop/differencePriceForm?shopOrderId=' + shopOrderId;
  513. });
  514. })();
  515. /**
  516. * @param obj
  517. * jquery控制input只能输入数字
  518. */
  519. function onlynum(obj) {
  520. obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
  521. }
  522. function submitFunc() {
  523. var checkedArr = [];
  524. $('.pay-checkbox').each(function (index) {
  525. var thisStatus = $(this).prop('checked');
  526. if (thisStatus) {
  527. checkedArr.push(index);
  528. }
  529. })
  530. if (checkedArr.length > 0) {
  531. sessionStorage.setItem('checkedIndexArr', JSON.stringify(checkedArr));
  532. } else {
  533. sessionStorage.setItem('checkedIndexArr', []);
  534. }
  535. }
  536. function inputnum(obj, val) {
  537. obj.value = obj.value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符
  538. obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
  539. obj.value = obj.value.replace(/\.{2,}/g, ""); //只保留第一个, 清除多余的
  540. obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
  541. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
  542. }
  543. </script>
  544. </body>
  545. </html>