Commit f5c2f5f54531e49496d7928d9b00a62147626929
1 parent
43cf8f21
预存款详情的优化
Showing
1 changed file
with
28 additions
and
0 deletions
pages/user/order_detail/order_detail.js
| @@ -177,6 +177,7 @@ Page({ | @@ -177,6 +177,7 @@ Page({ | ||
| 177 | if(res.data.code == 0 && res.data.data){ | 177 | if(res.data.code == 0 && res.data.data){ |
| 178 | r.use_commission=res.data.data.use_commission; | 178 | r.use_commission=res.data.data.use_commission; |
| 179 | r.pre_cut=res.data.data.pre_cut; //预存款 | 179 | r.pre_cut=res.data.data.pre_cut; //预存款 |
| 180 | + r.pre_json=res.data.data.pre_json; //预存款 | ||
| 180 | } | 181 | } |
| 181 | }) | 182 | }) |
| 182 | 183 | ||
| @@ -375,6 +376,33 @@ Page({ | @@ -375,6 +376,33 @@ Page({ | ||
| 375 | }); | 376 | }); |
| 376 | }, | 377 | }, |
| 377 | 378 | ||
| 379 | + //-- 预存款判断 -- | ||
| 380 | + async vipadvancesum(keyid,pre_cut,pre_json){ | ||
| 381 | + let pre=JSON.parse(pre_json) | ||
| 382 | + let listform=[] | ||
| 383 | + pre.map(item=>{ | ||
| 384 | + let obj={ | ||
| 385 | + advancesum: item.advancesum, | ||
| 386 | + advanceitemid: item.advanceitemid | ||
| 387 | + } | ||
| 388 | + listform.push(obj) | ||
| 389 | + }) | ||
| 390 | + let res = await getApp().request.promisePost(`/api/weshop/delphiapi/saveErpApi`, { | ||
| 391 | + data: { | ||
| 392 | + accdb: getApp().globalData.config.erpid, | ||
| 393 | + ApiName: 'api.pos.shop.vipadvancesum.list', | ||
| 394 | + // usercode: "admin", | ||
| 395 | + vipid: getApp().globalData.userInfo.erpvipid, | ||
| 396 | + // oddsum: "0", | ||
| 397 | + // advancesum: cartList.order_amount, | ||
| 398 | + storageid: keyid, | ||
| 399 | + listform | ||
| 400 | + }, | ||
| 401 | + is_json: 1 | ||
| 402 | + }) | ||
| 403 | + return res.data | ||
| 404 | + }, | ||
| 405 | + | ||
| 378 | //--------立即支付---------- | 406 | //--------立即支付---------- |
| 379 | async jumpToCart4(e) { | 407 | async jumpToCart4(e) { |
| 380 | 408 |