Commit e6de7bb29bd5b0291e438815f5476dc3f8d65585
1 parent
ee0bbe7c
预售的订单详情的bug优化 5条
Showing
6 changed files
with
1231 additions
and
495 deletions
packageC/pages/presell/cart/cart.js
... | ... | @@ -4,6 +4,7 @@ var oo = t.globalData.setting, os = oo; |
4 | 4 | var regeneratorRuntime = require('../../../../utils/runtime.js'); |
5 | 5 | var util_pay = require("../../../../utils/pay.js"); |
6 | 6 | |
7 | + | |
7 | 8 | Page({ |
8 | 9 | data: { |
9 | 10 | url: t.globalData.setting.url, |
... | ... | @@ -120,7 +121,7 @@ Page({ |
120 | 121 | if(t.order_id) this.data.order_id=t.order_id; |
121 | 122 | if(t.order_sn) this.data.order_sn=t.order_sn; |
122 | 123 | |
123 | - wx.setNavigationBarTitle({title: "填写订单",}) | |
124 | + wx.setNavigationBarTitle({title: "订单详情",}) | |
124 | 125 | var th = this; |
125 | 126 | this.setData({is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,}); |
126 | 127 | th.data.param = t; |
... | ... | @@ -414,6 +415,10 @@ Page({ |
414 | 415 | getApp().confirmBox("活动已经结束,或者会员身份不符合"); |
415 | 416 | return false; |
416 | 417 | } |
418 | + | |
419 | + | |
420 | + | |
421 | + | |
417 | 422 | await getApp().request.promiseGet("/api/weshop/order/orderPresell/get/"+oo.stoid+"/"+order.order_id, {}).then(res => { |
418 | 423 | presell = res.data.data; |
419 | 424 | }); |
... | ... | @@ -423,14 +428,20 @@ Page({ |
423 | 428 | th.setData({wait_dj:1}) |
424 | 429 | } |
425 | 430 | //等待尾款 |
426 | - if(order.order_status<2 && presell.deposit_pay_time>0 && presell.tail_pay_state==0){ | |
431 | + if(order.order_status<2 && presell.deposit_pay_time>0 && presell.tail_pay_state==0 && presell.presell_type!=1){ | |
427 | 432 | th.setData({wait_wk:1}) |
433 | + wx.setNavigationBarTitle({title: "支付尾款",}) | |
428 | 434 | } |
429 | 435 | //等待发货 |
430 | 436 | if(order.pay_status==1 && order.shipping_status==0){ |
431 | 437 | th.setData({wait_fh:1}) |
432 | 438 | } |
433 | 439 | |
440 | + if(order.pay_status==1 && order.shipping_status==1 && order.order_status<2){ | |
441 | + th.setData({wait_sh:1}) | |
442 | + } | |
443 | + | |
444 | + | |
434 | 445 | //---获取商品--- |
435 | 446 | await getApp().request.promiseGet("/api/weshop/goods/get/" + oo.stoid + "/" + order_goods.goods_id, {}).then(res => { |
436 | 447 | goods = res.data.data; |
... | ... | @@ -444,6 +455,42 @@ Page({ |
444 | 455 | pickup = res.data.data; |
445 | 456 | }); |
446 | 457 | |
458 | + order['is_all_return'] = 0; | |
459 | + //------------对比一下有没有退款记录------------ | |
460 | + await getApp().request.promiseGet("/api/weshop/order/returngoods/page",{ | |
461 | + data: { order_id: order.order_id, store_id: oo.stoid, | |
462 | + user_id:order.user_id, pageSize: 200 } | |
463 | + }).then(rss=>{ | |
464 | + var ttd=rss; | |
465 | + //----没有相关的退款记录---- | |
466 | + if (ttd.data.data.total==0){ | |
467 | + order['is_all_return'] = 0; | |
468 | + }else{ | |
469 | + var eea = ttd.data.data.pageData[0]; | |
470 | + //1.退款正在进行中, | |
471 | + //2.退款被拒绝就要显示可以退款 | |
472 | + //3.退款已经完成 | |
473 | + order['is_all_return']=1; | |
474 | + order['is_all_return_status'] = ttd.data.data.pageData[0].status; | |
475 | + | |
476 | + if (order['order_status'] == 1 && order['pay_status'] == 1) { | |
477 | + switch (eea.status) { | |
478 | + case 0: | |
479 | + case 1: | |
480 | + order.order_status_detail="退款中"; | |
481 | + order['return_btn'] = 2; break; | |
482 | + case 2: | |
483 | + order.order_status_detail="退款完成"; | |
484 | + order['return_btn'] = 4; break; | |
485 | + case 3: | |
486 | + order['return_btn'] = 3; break; | |
487 | + default: | |
488 | + order['return_btn'] = 0; | |
489 | + } | |
490 | + } | |
491 | + } | |
492 | + }) | |
493 | + | |
447 | 494 | var price=presell.presell_price; |
448 | 495 | if(!goods) return false; |
449 | 496 | //--判断物流-- |
... | ... | @@ -467,6 +514,16 @@ Page({ |
467 | 514 | break; //物流 |
468 | 515 | } |
469 | 516 | |
517 | + //等待发货的时候 | |
518 | + if(th.data.wait_fh){ | |
519 | + var send_time=pre_arr.delivery_date; | |
520 | + if(pre_arr.delivery_type==2){ | |
521 | + send_time=pre_arr.delivery_daynum*3600; | |
522 | + } | |
523 | + | |
524 | + } | |
525 | + | |
526 | + | |
470 | 527 | order.order_goods = order_goods; |
471 | 528 | var tail_pay=pre_arr.presell_price*order_goods.goods_num-presell.presell_deposit; |
472 | 529 | this.setData({ |
... | ... | @@ -482,7 +539,8 @@ Page({ |
482 | 539 | tail_pay:tail_pay, |
483 | 540 | order_goods:order_goods, |
484 | 541 | all_price:pre_arr.presell_price*order_goods.goods_num, |
485 | - pickup_id:pickup.pickup_id | |
542 | + pickup_id:pickup.pickup_id, | |
543 | + send_time:send_time | |
486 | 544 | }); |
487 | 545 | th.get_diff(); |
488 | 546 | //统一进行计算金额 |
... | ... | @@ -812,6 +870,8 @@ Page({ |
812 | 870 | }); |
813 | 871 | }, |
814 | 872 | enterAddressPage: function () { |
873 | + if(!this.data.wait_wk) return false; | |
874 | + | |
815 | 875 | getApp().globalData.is_cart_old = 1; |
816 | 876 | this.data.isget_by_quan = {}; |
817 | 877 | this.data.enterAddressPage = !0, wx.navigateTo({ |
... | ... | @@ -1868,7 +1928,7 @@ Page({ |
1868 | 1928 | |
1869 | 1929 | }) |
1870 | 1930 | }else{ |
1871 | - th.setData({ exp_price: exp_price, order_m: o_condition+exp_price }) | |
1931 | + th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition)+parseFloat(exp_price) }) | |
1872 | 1932 | } |
1873 | 1933 | }, |
1874 | 1934 | |
... | ... | @@ -2048,6 +2108,482 @@ Page({ |
2048 | 2108 | }, |
2049 | 2109 | |
2050 | 2110 | |
2111 | + //--------立即支付---------- | |
2112 | + async jumpToCart4(e) { | |
2113 | + var th=this; | |
2114 | + if(this.data.optionIsGoup) | |
2115 | + wx.navigateTo({ | |
2116 | + url: "/pages/team/team_confirm/team_confirm?orderSn=" + this.data.order.order_sn + "&orderPay=true" | |
2117 | + }) | |
2118 | + var order=this.data.order; | |
2119 | + var order_goods=this.data.order_goods; | |
2120 | + | |
2121 | + var wlist=""; | |
2122 | + | |
2123 | + var good=order_goods; | |
2124 | + //线下取价功能已经关闭或者过期 | |
2125 | + if(!th.data.is_open_offline && good.offline_cut>0){ | |
2126 | + wx.showModal({ | |
2127 | + title: '提示', | |
2128 | + content: '线下取价功能已经关闭或者过期!' | |
2129 | + }); | |
2130 | + return false; | |
2131 | + } | |
2132 | + //如果不是小程序有的功能,直接提示要去3.0处理 | |
2133 | + if(good.prom_type==2 ){ | |
2134 | + wx.showModal({ | |
2135 | + title: '提示', | |
2136 | + content: '小程序还未有该活动,请到3.0公众号支付' | |
2137 | + }); | |
2138 | + return false; | |
2139 | + } | |
2140 | + | |
2141 | + //要每件每件的商品进行检查,看有么有超出库存,超出限购 | |
2142 | + var goodsbuynum=0,promgoodsbuynum=0,gg=null; | |
2143 | + //获取单品的现在的活动状态 | |
2144 | + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + good.goods_id, { | |
2145 | + }).then(res=>{ | |
2146 | + gg=res.data.data; | |
2147 | + }) | |
2148 | + var limit = gg.viplimited; | |
2149 | + var store_count = gg.store_count; | |
2150 | + good.erpwareid=gg.erpwareid; | |
2151 | + | |
2152 | + //---要获得商品,该用户买了多少件,同步应用--- | |
2153 | + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
2154 | + data: { | |
2155 | + store_id: os.stoid, | |
2156 | + user_id: getApp().globalData.user_id, | |
2157 | + goods_id: good.goods_id, | |
2158 | + prom_type: good.prom_type, | |
2159 | + prom_id: good.prom_id | |
2160 | + }, | |
2161 | + }).then(res => { | |
2162 | + var buy_num_data = res.data.data; | |
2163 | + if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum; | |
2164 | + goodsbuynum = buy_num_data.goodsbuynum; | |
2165 | + }) | |
2166 | + | |
2167 | + var buyed_mum2=goodsbuynum+good.goods_num; | |
2168 | + if (buyed_mum2 > limit && limit > 0) { | |
2169 | + | |
2170 | + var content=gg.goods_name+'购买数量超出商品限购,请取消订单'; | |
2171 | + th.toast(content); | |
2172 | + return false; | |
2173 | + } | |
2174 | + | |
2175 | + //当是组合优惠的时候 | |
2176 | + if(good.prom_type==7){ | |
2177 | + //如果有组合购 | |
2178 | + var isok = 1; | |
2179 | + var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+good.prom_id+"/"+getApp().globalData.userInfo.user_id; | |
2180 | + await getApp().request.promiseGet(url, {}).then(res => { | |
2181 | + if(res.data.code==0 && res.data.data){ | |
2182 | + if(res.data.data.is_show!=1){ | |
2183 | + isok=0; | |
2184 | + } | |
2185 | + //如果活动已经结束 | |
2186 | + if(res.data.data.is_end==1){ | |
2187 | + isok=0; | |
2188 | + } | |
2189 | + //已经结束 | |
2190 | + if(ut.gettimestamp()>res.data.data.end_time){ | |
2191 | + isok=0; | |
2192 | + } | |
2193 | + //还未开始 | |
2194 | + if(ut.gettimestamp()<res.data.data.start_time){ | |
2195 | + isok=0; | |
2196 | + } | |
2197 | + | |
2198 | + }else{ | |
2199 | + //未找到商品的活动 | |
2200 | + isok = 0; | |
2201 | + } | |
2202 | + | |
2203 | + }) | |
2204 | + if (!isok){ | |
2205 | + var content=gg.goods_name+'活动已经结束,请取消订单'; | |
2206 | + th.toast(content); | |
2207 | + return false; | |
2208 | + } | |
2209 | + | |
2210 | + var url1 = "/api/weshop/prom/zhbuyGoods/page"; | |
2211 | + var req_data = { | |
2212 | + page: 1, | |
2213 | + pageSize: 1, | |
2214 | + store_id: os.stoid, | |
2215 | + zh_id: good.prom_id, | |
2216 | + goods_id:good.goods_id | |
2217 | + } | |
2218 | + await getApp().request.promiseGet(url1, { | |
2219 | + data: req_data | |
2220 | + }).then(res => { | |
2221 | + if (ut.ajax_ok(res)) { | |
2222 | + var gdlist = res.data.data.pageData[0]; | |
2223 | + good.buyqty=gdlist.buyqty; | |
2224 | + } | |
2225 | + }) | |
2226 | + | |
2227 | + var num=good['buyqty']; | |
2228 | + console.log(1111); | |
2229 | + console.log(num); | |
2230 | + //---- 要计算商品的限购 ----- | |
2231 | + if(good['buyqty']>0){ | |
2232 | + if(good.goods_num+promgoodsbuynum>good['buyqty']){ | |
2233 | + | |
2234 | + var content= good['goods_name']+"超出活动限购\n"; | |
2235 | + th.toast(content); | |
2236 | + return false; | |
2237 | + } | |
2238 | + } | |
2239 | + } | |
2240 | + | |
2241 | + //如果优惠促销和搭配购的时候 | |
2242 | + if((good.prom_type==3 || good.prom_type==5) && good.is_collocation!=1 && good.is_gift!=1){ | |
2243 | + var p_ok=1; | |
2244 | + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { | |
2245 | + if(res.data.code==0){ | |
2246 | + var r_data=res.data.data; | |
2247 | + if(!r_data.collocationPromList && good.prom_type==5){ | |
2248 | + | |
2249 | + var content=good.goods_name+'未找到活动,请取消订单重新购买'; | |
2250 | + th.toast(content); | |
2251 | + p_ok=0; | |
2252 | + } | |
2253 | + if(!r_data.promGoodsLists && good.prom_type==3){ | |
2254 | + | |
2255 | + var content=good.goods_name+'未找到活动,请取消订单重新购买'; | |
2256 | + th.toast(content); | |
2257 | + p_ok=0; | |
2258 | + } | |
2259 | + }else{ | |
2260 | + | |
2261 | + var content=good.goods_name+'未找到活动,请取消订单重新购买'; | |
2262 | + th.toast(content); | |
2263 | + p_ok=0; | |
2264 | + } | |
2265 | + }) | |
2266 | + if(!p_ok) return false; | |
2267 | + } | |
2268 | + | |
2269 | + //商品的普通购买 ,不要进行判断 | |
2270 | + if((good.prom_type==1 || good.prom_type==6 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){ | |
2271 | + if(gg.prom_type!=good.prom_type) { | |
2272 | + | |
2273 | + var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; | |
2274 | + th.toast(content); | |
2275 | + return false; | |
2276 | + } | |
2277 | + }else{ | |
2278 | + if((gg.prom_type==1 || gg.prom_type==3 || gg.prom_type==5 || gg.prom_type==6 || gg.prom_type==4) | |
2279 | + && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { | |
2280 | + var prom=null; | |
2281 | + //---如果是活动的时候--- | |
2282 | + var prom=null,th=this; | |
2283 | + if(gg.prom_type==1){ | |
2284 | + await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+gg.prom_id,{ | |
2285 | + }).then(res=>{ | |
2286 | + if(res.data.code==0){ | |
2287 | + prom=res.data.data; | |
2288 | + } | |
2289 | + }) | |
2290 | + } | |
2291 | + if(gg.prom_type==6){ | |
2292 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+gg.prom_id,{ | |
2293 | + }).then(res=>{ | |
2294 | + if(res.data.code==0){ | |
2295 | + prom=res.data.data; | |
2296 | + } | |
2297 | + }) | |
2298 | + } | |
2299 | + | |
2300 | + if(gg.prom_type==4){ | |
2301 | + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{ | |
2302 | + data:{store_id:os.stoid,goods_id:gg.goods_id} | |
2303 | + }).then(res=>{ | |
2304 | + if(res.data.code==0 && res.data.data && res.data.data.pageData){ | |
2305 | + prom=res.data.data.pageData[0]; | |
2306 | + } | |
2307 | + }) | |
2308 | + } | |
2309 | + | |
2310 | + if(prom){ | |
2311 | + var t_now=ut.gettimestamp(); | |
2312 | + if(prom.is_end==0 && prom.start_time<t_now && prom.end_time>t_now){ | |
2313 | + | |
2314 | + var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; | |
2315 | + th.toast(content); | |
2316 | + return false; | |
2317 | + } | |
2318 | + } | |
2319 | + } | |
2320 | + else{ | |
2321 | + //不是赠品的时候 | |
2322 | + if(!good.is_gift && good.prom_type!=3){ | |
2323 | + var t_ok=1; | |
2324 | + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { | |
2325 | + if(res.data.code==0){ | |
2326 | + var r_data=res.data.data; | |
2327 | + //-- 参加了全局的优惠活动 -- | |
2328 | + if(r_data.promGoodsLists){ | |
2329 | + | |
2330 | + var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买'; | |
2331 | + th.toast(content); | |
2332 | + t_ok=0; | |
2333 | + } | |
2334 | + } | |
2335 | + }) | |
2336 | + if(!t_ok) return false; | |
2337 | + } | |
2338 | + | |
2339 | + //-- 如果有参加线下取价 -- | |
2340 | + if(good.offline_cut>0) wlist+=encodeURIComponent(gg.erpwareid)+","; | |
2341 | + } | |
2342 | + //赠品和搭配购不判断商品金额 | |
2343 | + var isok=1; | |
2344 | + var card_field=th.data.card_field; | |
2345 | + //如果会员是等级会员,商品有等级价,且不是活动商品 | |
2346 | + if(!good.is_gift && !good.is_collocation && good.prom_type!=8) { | |
2347 | + if (card_field && gg[card_field] > 0) { | |
2348 | + if (good.goods_price != gg[card_field] && good.offline_cut<=0) isok = 0; | |
2349 | + if (good.goods_price >gg[card_field] && good.offline_cut>0) isok = 0; //如果线下价格比较贵,则不通过 | |
2350 | + | |
2351 | + } else { | |
2352 | + if (good.goods_price != gg.shop_price && good.offline_cut<=0) isok = 0; | |
2353 | + if (good.goods_price> gg.shop_price && good.offline_cut>0) isok = 0; //如果线下价格比较贵,则不通过 | |
2354 | + } | |
2355 | + var is_h=0; | |
2356 | + if (!isok) { | |
2357 | + | |
2358 | + var content=gg.goods_name + '商品的价格发生了变化,请取消订单重新购买'; | |
2359 | + th.toast(content); | |
2360 | + return false; | |
2361 | + } | |
2362 | + } | |
2363 | + | |
2364 | + | |
2365 | + if(good.goods_num>store_count){ | |
2366 | + | |
2367 | + var content=gg.goods_name+'商品的库存不足,请取消订单'; | |
2368 | + th.toast(content); | |
2369 | + return false; | |
2370 | + } | |
2371 | + | |
2372 | + | |
2373 | + } | |
2374 | + | |
2375 | + console.log("------------------------------------"); | |
2376 | + //---如果是活动的时候--- | |
2377 | + var prom=null,goodsinfo=good,th=this; | |
2378 | + if(goodsinfo.prom_type==1){ | |
2379 | + await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | |
2380 | + }).then(res=>{ | |
2381 | + if(res.data.code==0){ | |
2382 | + prom=res.data.data; | |
2383 | + } | |
2384 | + }) | |
2385 | + } | |
2386 | + if(goodsinfo.prom_type==6 && !good.is_pd_normal){ | |
2387 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{ | |
2388 | + }).then(res=>{ | |
2389 | + if(res.data.code==0){ | |
2390 | + prom=res.data.data; | |
2391 | + } | |
2392 | + }) | |
2393 | + } | |
2394 | + | |
2395 | + if(goodsinfo.prom_type==4 && !good.is_integral_normal){ | |
2396 | + await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{ | |
2397 | + data:{store_id:os.stoid,goods_id:goodsinfo.goods_id} | |
2398 | + }).then(res=>{ | |
2399 | + if(res.data.code==0 && res.data.data && res.data.data.pageData){ | |
2400 | + prom=res.data.data.pageData[0]; | |
2401 | + } | |
2402 | + }) | |
2403 | + } | |
2404 | + | |
2405 | + //----------如果有活动,并且在进行中,就不计算线下库存--------------- | |
2406 | + if(prom){ | |
2407 | + var now=ut.gettimestamp(); | |
2408 | + if(prom.is_end==1 && prom.end_time<now){ | |
2409 | + | |
2410 | + var content=goodsinfo.goods_name+'商品的活动已经结束,请取消订单重新购买'; | |
2411 | + th.toast(content); | |
2412 | + return false; | |
2413 | + } | |
2414 | + | |
2415 | + buyed_mum2=promgoodsbuynum+good.goods_num; | |
2416 | + if (buyed_mum2 > prom.buy_limit && prom.buy_limit > 0) { | |
2417 | + | |
2418 | + var content=goodsinfo.goods_name+'购买数量超出商品活动限购,请取消订单重新购买'; | |
2419 | + th.toast(content); | |
2420 | + return false; | |
2421 | + } | |
2422 | + | |
2423 | + if(goodsinfo.prom_type==4){ | |
2424 | + if (good.goods_num > prom.limitqty-prom.buy_num) { | |
2425 | + | |
2426 | + var content=goodsinfo.goods_name+'购买数量超出商品活动库存,请取消订单'; | |
2427 | + th.toast(content); | |
2428 | + return false; | |
2429 | + } | |
2430 | + }else{ | |
2431 | + var redis_num = 0; | |
2432 | + //------判断活动是否抢光----- | |
2433 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
2434 | + os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, { | |
2435 | + }).then(res => { | |
2436 | + redis_num = res.data.data; | |
2437 | + }); | |
2438 | + | |
2439 | + if (good.goods_num > redis_num) { | |
2440 | + | |
2441 | + var content=gg.goods_name+'超出商品活动库存,请取消订单'; | |
2442 | + th.toast(content); | |
2443 | + return false; | |
2444 | + } | |
2445 | + } | |
2446 | + | |
2447 | + } | |
2448 | + | |
2449 | + | |
2450 | + | |
2451 | + //-- 要判断一下线下取价价格是不是发生改变 -- | |
2452 | + if(wlist!="" && th.data.is_open_offline && th.data.is_open_offline>0){ | |
2453 | + wlist=ut.sub_last(wlist); | |
2454 | + var keyid=order.pickup_id; | |
2455 | + var user_info=getApp().globalData.userInfo; | |
2456 | + if(!keyid) return false; | |
2457 | + var offarr=null; | |
2458 | + await getApp().request.promiseGet("/api/weshop/goods/listWarePrice", { | |
2459 | + data:{ | |
2460 | + VIPId:encodeURIComponent(user_info.erpvipid), | |
2461 | + store_id:os.stoid, | |
2462 | + PickupId:keyid, | |
2463 | + WareIds:wlist}, | |
2464 | + }, | |
2465 | + ).then(res=>{ | |
2466 | + if(res.data.code==0 && res.data.data && res.data.data.length>0){ | |
2467 | + offarr=res.data.data; | |
2468 | + } | |
2469 | + }) | |
2470 | + if(!offarr && offarr.length<=0 ){ | |
2471 | + wx.showModal({ title: '获取线下取价失败',}); | |
2472 | + } | |
2473 | + var newarr=ut.convert_arr_key(offarr,'WareId'); | |
2474 | + //-- 循环判断线下的价格 -- | |
2475 | + for(var k in order_goods){ | |
2476 | + var good=order_goods[k]; | |
2477 | + //判断线下取价是不是一样 | |
2478 | + if(newarr[good.erpwareid] && | |
2479 | + parseFloat(newarr[good.erpwareid].WarePrice)!=parseFloat(good.goods_price)){ | |
2480 | + | |
2481 | + var content=good.goods_name + '商品的价格发生了变化,请取消订单重新购买'; | |
2482 | + th.toast(content); | |
2483 | + return false; | |
2484 | + } | |
2485 | + } | |
2486 | + | |
2487 | + } | |
2488 | + | |
2489 | + /*--- | |
2490 | + o.jumpToCart4({ | |
2491 | + order_sn: this.data.order.order_sn, | |
2492 | + order_amount: this.data.order.order_amount, | |
2493 | + type: 1 //正常单 | |
2494 | + }, 1);--*/ | |
2495 | + | |
2496 | + util_pay.pay(this.data.order.order_sn, function() { | |
2497 | + wx.showToast({title: '支付成功'}) | |
2498 | + wx.navigateBack(); | |
2499 | + },null,os.stoid,1); | |
2500 | + | |
2501 | + | |
2502 | + }, | |
2503 | + | |
2504 | + | |
2505 | + //--------取消订单--------- | |
2506 | + cancelOrder: function(e) { | |
2507 | + var t = this,th=t, ord_id = this.data.order.order_id,order=this.data.order; | |
2508 | + | |
2509 | + wx.showModal({ | |
2510 | + title: "是否取消订单?", | |
2511 | + success: function(e) { | |
2512 | + if(!e.confirm) return false; | |
2513 | + //如果是秒杀和拼单的商品,取消订单要返回redis,并取消订单 | |
2514 | + //if(is_skill==1 || is_zsorder>=2){ | |
2515 | + getApp().request.post("/api/weshop/order/cancelOrder/"+os.stoid+"/"+ord_id+"/"+getApp().globalData.user_id,{ | |
2516 | + data:{}, | |
2517 | + success: function(t) { | |
2518 | + if(t.data.code==0){ | |
2519 | + th.setData({'order.order_status':3}); | |
2520 | + wx.setStorageSync("order:order_list:update", !0); | |
2521 | + } | |
2522 | + | |
2523 | + }, | |
2524 | + }) | |
2525 | + | |
2526 | + } | |
2527 | + }); | |
2528 | + }, | |
2529 | + | |
2530 | + | |
2531 | + //-----删除订单----- | |
2532 | + deleteOrderData: function(t) { | |
2533 | + var th=this; | |
2534 | + var order_id=this.data.order.order_id; | |
2535 | + var up_data={ | |
2536 | + order_id: order_id,isdel:1 | |
2537 | + }; | |
2538 | + if(th.data.order.order_status!=6){ | |
2539 | + up_data.order_status=5; | |
2540 | + } | |
2541 | + wx.showModal({ | |
2542 | + title: "是否删除订单?", | |
2543 | + success: function(tt) { | |
2544 | + tt.confirm && getApp().request.put("/api/weshop/order/updatebyId", { | |
2545 | + data: up_data, | |
2546 | + success: function (t) { | |
2547 | + getApp().my_warnning("删除成功",1,th); | |
2548 | + setTimeout(function () { | |
2549 | + getApp().goto("/pages/user/order_list/order_list"); | |
2550 | + },1000); | |
2551 | + } | |
2552 | + }) | |
2553 | + } | |
2554 | + }); | |
2555 | + }, | |
2556 | + | |
2557 | + go_goods:function (e) { | |
2558 | + var url=e.currentTarget.dataset.url; | |
2559 | + getApp().goto(url); | |
2560 | + }, | |
2561 | + toast(msg){ | |
2562 | + wx.showToast({ | |
2563 | + title: msg, | |
2564 | + icon: 'none', | |
2565 | + duration: 3000 | |
2566 | + }) | |
2567 | + }, | |
2568 | + //--------确认收货--------- | |
2569 | + confirmOrder: function(e) { | |
2570 | + var th=this; | |
2571 | + var o = this.data.order.order_id,order=this.data.order; | |
2572 | + wx.showModal({ | |
2573 | + title: "是否确认收货?", | |
2574 | + success: function(t) { | |
2575 | + t.confirm && getApp().request.post("/api/weshop/order/confirmOrder/"+os.stoid+"/"+o+"/"+getApp().globalData.user_id,{ | |
2576 | + success:function (e) { | |
2577 | + if(e.data.code==0){ | |
2578 | + th.setData({}) | |
2579 | + } | |
2580 | + } | |
2581 | + }) | |
2582 | + } | |
2583 | + }); | |
2584 | + }, | |
2585 | + | |
2586 | + | |
2051 | 2587 | |
2052 | 2588 | |
2053 | 2589 | ... | ... |
packageC/pages/presell/cart/cart.json
packageC/pages/presell/cart/cart.wxml
... | ... | @@ -3,508 +3,657 @@ |
3 | 3 | <wxs module="filters" src="../../../../utils/filter.wxs"></wxs> |
4 | 4 | |
5 | 5 | <form bindsubmit="submitForm" wx:if="{{show_submit}}"> |
6 | - <view class="container"> | |
7 | - <!-- 支付进度 --> | |
8 | - <view class="information bdr14 mgt20"> | |
9 | - <view class="item ai-center" style="justify-content: flex-start;"> | |
10 | - <view class="pdr20"><text class="iconfont icon-qianbao fs60"></text></view> | |
11 | - | |
12 | - <view wx:if="{{wait_dj}}"> | |
13 | - <view>等待买家付定金</view> | |
14 | - <view>{{filters.format_time(presell.kw_start_time,1)}} - {{filters.format_time(presell.kw_end_time,1)}}</view> | |
15 | - </view> | |
16 | - | |
17 | - <view wx:if="{{no_start}}"> | |
18 | - <view>等待尾款支付开始</view> | |
19 | - <view>{{filters.format_time(presell.kw_start_time,1)}} - {{filters.format_time(presell.kw_end_time,1)}}</view> | |
20 | - </view> | |
21 | - | |
22 | - <view wx:if="{{wait_wk && !no_start}}"> | |
23 | - <view>等待买家付尾款</view> | |
24 | - <view class="fs22">请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消</view> | |
25 | - </view> | |
26 | - <view wx:if="{{wait_fh}}"> | |
27 | - <view>等待商家发货</view> | |
28 | - <view class="fs22">将在2022-12-1 10:10:00后发货</view> | |
29 | - </view> | |
30 | - <view wx:if="{{order.order_status==2}}"> | |
31 | - <view>待评价</view> | |
32 | - </view> | |
33 | - <view wx:if="{{order.order_status==3}}"> | |
34 | - <view>已取消</view> | |
35 | - </view> | |
36 | - <view wx:if="{{order.order_status==4}}"> | |
37 | - <view>已完成</view> | |
38 | - </view> | |
39 | - <view wx:if="{{order.order_status==5}}"> | |
40 | - <view>已作废</view> | |
41 | - </view> | |
42 | - <view wx:if="{{order.order_status==6}}"> | |
43 | - <view>退款退货完成</view> | |
44 | - </view> | |
45 | - | |
46 | - </view> | |
47 | - | |
48 | - | |
49 | - <view class="pdb20 flex t-c fs22 c-7b"> | |
50 | - <view class="f1"> | |
51 | - <view>付定金</view> | |
52 | - <view wx:if="{{presell.deposit_pay_time>0}}" class="box"><text class="iconfont icon-yes"></text></view> | |
53 | - <view wx:else class="box"><text class="iconfont icon-yes"></text></view> | |
54 | - </view> | |
55 | - <view class="f1"> | |
56 | - <view>付尾款</view> | |
57 | - <view wx:if="{{presell.tail_pay_state==1}}" class="box"><text class="iconfont icon-yes"></text></view> | |
58 | - <view wx:else class="box line"><text class="circle1"></text></view> | |
59 | - </view> | |
60 | - <view class="f1"> | |
61 | - <view>商家发货</view> | |
62 | - <view wx:if="{{order.order_status==2 || order.order_status==4}}" class="box line"><text class="circle1"></text></view> | |
63 | - <view wx:else class="box line"><text class="circle1"></text></view> | |
64 | - </view> | |
65 | - <view class="f1"> | |
66 | - <view>交易完成</view> | |
67 | - <view wx:if="{{order.order_status==4}}" class="box"><text class="iconfont icon-yes"></text></view> | |
68 | - <view wx:else class="box line"><text class="circle1"></text></view> | |
69 | - </view> | |
70 | - </view> | |
71 | - </view> | |
72 | - | |
73 | - <!-- 退款完成 --> | |
74 | - <!-- | |
75 | - <view class="information bdr14 mgt20"> | |
76 | - <view class="item ai-center" style="justify-content: flex-start;"> | |
77 | - <view class="pdr20"><text class="iconfont icon-tkcg fs60"></text></view> | |
78 | - <view class="">退款完成(定金)</view> | |
79 | - </view> | |
80 | - </view>--> | |
81 | - <!-- 立即购买的时候 --> | |
82 | - <view class="tab-wrapper" wx:if="{{presell.deposit_pay_time>0 && presell.tail_pay_state==0 && !no_start}}"> | |
83 | - <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' class="tab {{exp_type == 1? 'active':''}}" | |
84 | - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | |
85 | - | |
86 | - <view hidden="{{distr_type==1}}" bindtap='set_wuliu' data-type='0' class="tab {{exp_type== 0 ? 'active':''}}" | |
87 | - data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view> | |
88 | - </view> | |
89 | - | |
90 | - | |
91 | - <!----要进行判断地址是否显示----> | |
92 | - <view bindtap="enterAddressPage" class="user-mes mgt20" | |
93 | - hidden='{{exp_type==1 }}'> | |
94 | - <!-----默认地址显示----> | |
95 | - <block wx:if="{{user_addr!=null}}"> | |
96 | - <view class="user-contact"> | |
97 | - <text class="bold fs36 pdr20">{{user_addr.consignee}}</text> | |
98 | - <text class="fs28">{{user_addr.mobile}}</text> | |
99 | - </view> | |
100 | - <view class="location flex ai_c" style="font-size: 28rpx"> | |
101 | - <view class="pos-icon"> | |
102 | - <image class="wh100" style="vertical-align: top" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
103 | - </view> | |
104 | - <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | |
105 | - | |
106 | - </view> | |
107 | - <view class="update-logistics"> | |
108 | - <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | |
109 | - </view> | |
110 | - </block> | |
111 | - <!-----先增地址------> | |
112 | - <block wx:else> | |
113 | - <view class="add_new"> | |
114 | - <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 | |
115 | - </view> | |
116 | - </block> | |
117 | - | |
118 | - </view> | |
119 | - | |
120 | - <view class="use-item bfff bdr_t-14 mgt20"> | |
121 | - <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> | |
122 | - <view>{{pickup.pickup_name}}</view> | |
123 | - </view> | |
124 | - <view class="order-detail"> | |
125 | - <view class="goods-img"> | |
126 | - <image class="wh100 bdr14" src="{{imgUrl}}{{goods.original_img}}" binderror='cart_set_err' data-err="goods.original_img"></image> | |
127 | - </view> | |
128 | - <navigator class="order-cont" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{goods.goods_id}}&pre_id={{pre_arr.id}}"> | |
129 | - <view class="goods-name ellipsis-2">{{goods.goods_name}}</view> | |
130 | - <!-- 商品属性 --> | |
131 | - <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
132 | - <view class="goods-color"> | |
133 | - <block><text>{{filters.show_gui_ge(goods.goods_spec,goods.goods_color)}}</text></block> | |
134 | - </view> | |
135 | - </view> | |
136 | - <!-- ---商品名称规格---- --> | |
137 | - <view class="order-num flex-space-between"> | |
138 | - <view class="co-red">¥<text class="fs36">{{filters.toFix(pre_arr.presell_price,2)}}</text></view> | |
139 | - <view class="goods-num">×{{order.order_goods.goods_num}}</view> | |
140 | - </view> | |
141 | - </navigator> | |
142 | - | |
143 | - </view> | |
144 | - | |
145 | - <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | |
146 | - <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> | |
147 | - <view class="flex"> | |
148 | - <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | |
149 | - <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image> | |
150 | - <text class="card_name">{{show_card.CardName}}</text> | |
151 | - </view> | |
152 | - <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view> | |
153 | - </view> | |
154 | - <view> | |
155 | - <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | |
156 | - </view> | |
157 | - <!-- 三角形 --> | |
158 | - <view class="car_tri_up"></view> | |
159 | - <!-- 立即开通跳转 --> | |
160 | - <view bindtap="buycard" class="card_op">立即开通</view> | |
161 | - </view> | |
162 | - | |
163 | - | |
164 | - <view class="set-mes bdr_b-14"> | |
165 | - <view wx:if="{{order.store_prom}}"> | |
166 | - <icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | |
167 | - </view> | |
168 | - | |
169 | - <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{pickup_id}}" wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | |
170 | - <view class="work-frame flex-space-between"> | |
171 | - <view class="work"> | |
172 | - 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> | |
173 | - </view> | |
174 | - <view class="xc-right-frame"> | |
175 | - <text wx:if="{{using_quan[pickup_id].is_nouse_red}}">不使用</text> | |
176 | - <block wx:else> | |
177 | - <text wx:if="{{using_quan[pickup_id].money}}">¥{{using_quan[pickup_id].money}}元优惠券</text> | |
178 | - <text wx:if="{{using_quan[pickup_id].isby}}">包邮券</text> | |
179 | - </block> | |
180 | - <view class="xc-right"></view> | |
181 | - </view> | |
182 | - </view> | |
183 | - </view> | |
184 | - | |
185 | - <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | |
186 | - <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> | |
187 | - <view>选择物流</view> | |
188 | - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> | |
189 | - <view class="logistics-name">{{wu_arr[index].name}}</view> | |
190 | - <view class="xc-right"></view> | |
191 | - </view> | |
192 | - </view> | |
193 | - </view> | |
194 | - </view> | |
195 | - <!-- 留言 --> | |
196 | - <view class="coupon-mes flex-vertical"> | |
197 | - <view>留言</view> | |
198 | - <view class="leave-word" wx:if="{{sh_liuyan}}"> | |
199 | - <input placeholder-class="fs28" bindblur="close_liuyan" focus="{{sh_liuyan}}" bindinput="keyUpChangeNum" value="{{user_note}}" | |
200 | - class="word-box" maxlength="100" name="user_note"></input> | |
201 | - </view> | |
202 | - | |
203 | - <view wx:if="{{!sh_liuyan}}" bindtap="show_liuyan"> | |
204 | - <text class="fs26 {{user_note?'':'gray'}} note_text">{{user_note?user_note:'给商家留言,最多100字'}}</text> | |
205 | - </view> | |
206 | - | |
207 | - </view> | |
208 | - | |
209 | - <!-- 是否参与店铺优惠 --> | |
210 | - <view class="coupon-mes flex-vertical" bindtap="bn_pop_offline" wx:if="{{bn_goods.offline_price}}"> | |
211 | - <view>店铺优惠</view> | |
212 | - <view class="leave-word fs32" style="color: #999;"> | |
213 | - 省{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}元 | |
214 | - </view> | |
215 | - <block wx:if="{{bn_goods.is_offline}}"> | |
216 | - <text style="color: #d7642b;">-¥{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}</text> | |
217 | - </block> | |
218 | - <block wx:else> | |
219 | - <text style="color: #d7642b;">不使用优惠</text> | |
220 | - </block> | |
221 | - <!-- 右边点击 --> | |
222 | - <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view> | |
223 | - </view> | |
224 | - | |
225 | - | |
226 | - <view class="information bdr14"> | |
227 | - <view class="item" wx:if="{{allpice>0}}"> | |
228 | - <view>商品金额</view> | |
229 | - <view class="co-red">¥ {{filters.toFix(allpice,2)}}元</view> | |
230 | - </view> | |
231 | - <view class="item" wx:if="{{exp_price>0}}"> | |
232 | - <view>配送费用</view> | |
233 | - <view class="co-red">¥ {{filters.toFix(exp_price,2)}}元</view> | |
234 | - </view> | |
235 | - | |
236 | - <view class="item" wx:if="{{quan_price>0}}"> | |
237 | - <view>优惠券优惠</view> | |
238 | - <view class="co-red">¥ -{{filters.toFix(quan_price,2)}}元</view> | |
239 | - </view> | |
240 | - | |
241 | - <view class="item" wx:if="{{order_prom_amount>0}}"> | |
242 | - <view>订单优惠</view> | |
243 | - <view class="co-red">¥ -{{filters.toFix(order_prom_amount,2)}}元</view> | |
244 | - </view> | |
245 | - | |
246 | - </view> | |
247 | - | |
248 | - <view class="information bdr14 mgt20"> | |
249 | - <view class="item"> | |
250 | - <view>阶段一:定金(待付款)</view> | |
251 | - <view class="co-red">¥{{filters.toFix(pre_arr.presell_money*order.order_goods.goods_num,2)}}元</view> | |
252 | - </view> | |
253 | - <view class="item"> | |
254 | - <view>阶段二:尾款</view> | |
255 | - <view class="co-red">¥{{filters.toFix(tail_pay,2)}}元</view> | |
256 | - </view> | |
257 | - </view> | |
258 | - </view> | |
259 | - | |
260 | - <view class="fixedToBottom shadow-1" wx:if="{{wait_wk}}" > | |
261 | - <view wx:if="{{no_start}}" class="date-container">尾款时间{{filters.format_time(presell.kw_start_time,1)}} - {{filters.format_time(presell.kw_end_time,1)}}</view> | |
262 | - <view wx:elif="{{is_end}}" class="date-container">尾款时间已经结束</view> | |
263 | - <view wx:elif="{{wait_wk && !no_start}}" class="date-container">请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消</view> | |
264 | - | |
265 | - <view class="btn-wrap" > | |
266 | - <view class="pay-amount"> | |
267 | - <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{filters.toFix(order_m-presell.presell_deposit,2)}}</text></view> | |
268 | - </view> | |
269 | - <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray" >提交订单</button> | |
270 | - <button wx:else class="tips-btn" bindtap="show_pay" >提交订单</button> | |
271 | - <!-- 预售 --> | |
272 | - <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> | |
273 | - </view> | |
274 | - </view> | |
6 | + <view class="container"> | |
7 | + <!-- 支付进度 --> | |
8 | + <view class="information bdr14 mgt20"> | |
9 | + <view class="item ai-center" style="justify-content: flex-start;"> | |
10 | + <view class="pdr20"> | |
11 | + <text class="iconfont icon-qianbao fs60"></text> | |
12 | + </view> | |
13 | + | |
14 | + <view wx:if="{{wait_dj}}"> | |
15 | + <view>等待买家付定金</view> | |
16 | + <view>{{filters.format_time(presell.kw_start_time,1)}} - | |
17 | + {{filters.format_time(presell.kw_end_time,1)}} | |
18 | + </view> | |
19 | + </view> | |
20 | + | |
21 | + <view wx:if="{{wait_wk && no_start}}"> | |
22 | + <view>等待尾款支付开始</view> | |
23 | + <view>{{filters.format_time(presell.kw_start_time,1)}} - | |
24 | + {{filters.format_time(presell.kw_end_time,1)}} | |
25 | + </view> | |
26 | + </view> | |
27 | + | |
28 | + | |
29 | + <view wx:if="{{wait_sh}}"> | |
30 | + <view>等待收货</view> | |
31 | + <view>{{order.order_sn}}</view> | |
32 | + </view> | |
33 | + | |
34 | + <view wx:if="{{wait_wk && !no_start}}"> | |
35 | + <view>等待买家付尾款</view> | |
36 | + <view class="fs22">请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消</view> | |
37 | + </view> | |
38 | + <view wx:if="{{wait_fh}}"> | |
39 | + <view>等待商家发货</view> | |
40 | + <view class="fs22">将在{{filters.format_time(send_time,1)}}后发货</view> | |
41 | + </view> | |
42 | + <view wx:if="{{order.order_status==2}}"> | |
43 | + <view>待评价</view> | |
44 | + <view>{{order.order_sn}}</view> | |
45 | + </view> | |
46 | + <view wx:if="{{order.order_status==3}}"> | |
47 | + <view>已取消</view> | |
48 | + <view>{{order.order_sn}}</view> | |
49 | + </view> | |
50 | + <view wx:if="{{order.order_status==4}}"> | |
51 | + <view>已完成</view> | |
52 | + <view>{{order.order_sn}}</view> | |
53 | + </view> | |
54 | + <view wx:if="{{order.order_status==5}}"> | |
55 | + <view>已作废</view> | |
56 | + <view>{{order.order_sn}}</view> | |
57 | + </view> | |
58 | + <view wx:if="{{order.order_status==6}}"> | |
59 | + <view>退款退货完成</view> | |
60 | + <view>{{order.order_sn}}</view> | |
61 | + </view> | |
62 | + </view> | |
63 | + | |
64 | + | |
65 | + <view class="pdb20 flex t-c fs22 c-7b"> | |
66 | + <view class="f1"> | |
67 | + <view>付定金</view> | |
68 | + <view wx:if="{{presell.deposit_pay_time>0}}" class="box"> | |
69 | + <text class="iconfont icon-yes"></text> | |
70 | + </view> | |
71 | + <view wx:else class="box"> | |
72 | + <text class="circle1"></text> | |
73 | + </view> | |
74 | + </view> | |
75 | + <view class="f1" wx:if="{{presell.presell_type!=1}}"> | |
76 | + <view>付尾款</view> | |
77 | + <view wx:if="{{presell.tail_pay_state==1}}" class="box line"> | |
78 | + <text class="iconfont icon-yes"></text> | |
79 | + </view> | |
80 | + <view wx:else class="box line"> | |
81 | + <text class="circle1"></text> | |
82 | + </view> | |
83 | + </view> | |
84 | + <view class="f1"> | |
85 | + <view>商家发货</view> | |
86 | + <view wx:if="{{order.pay_status==2 || order.shipping_status==1}}" class="box line"> | |
87 | + <text class="iconfont icon-yes"></text> | |
88 | + </view> | |
89 | + <view wx:else class="box line"> | |
90 | + <text class="circle1"></text> | |
91 | + </view> | |
92 | + </view> | |
93 | + <view class="f1"> | |
94 | + <view>交易完成</view> | |
95 | + <view wx:if="{{order.order_status==4}}" class="box line"> | |
96 | + <text class="iconfont icon-yes"></text> | |
97 | + </view> | |
98 | + <view wx:else class="box line"> | |
99 | + <text class="circle1"></text> | |
100 | + </view> | |
101 | + </view> | |
102 | + </view> | |
103 | + </view> | |
104 | + | |
105 | + <!-- 退款完成 --> | |
106 | + <!-- | |
107 | + <view class="information bdr14 mgt20"> | |
108 | + <view class="item ai-center" style="justify-content: flex-start;"> | |
109 | + <view class="pdr20"><text class="iconfont icon-tkcg fs60"></text></view> | |
110 | + <view class="">退款完成(定金)</view> | |
111 | + </view> | |
112 | + </view>--> | |
113 | + | |
114 | + <block wx:if="{{wait_wk}}"> | |
115 | + <!-- 立即购买的时候 --> | |
116 | + <view class="tab-wrapper"> | |
117 | + <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' | |
118 | + class="tab {{exp_type == 1? 'active':''}}" | |
119 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">门店自提 | |
120 | + </view> | |
121 | + | |
122 | + <view hidden="{{distr_type==1}}" bindtap='set_wuliu' data-type='0' | |
123 | + class="tab {{exp_type== 0 ? 'active':''}}" | |
124 | + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄 | |
125 | + </view> | |
126 | + </view> | |
127 | + <!----要进行判断地址是否显示----> | |
128 | + <view bindtap="enterAddressPage" class="user-mes mgt20" | |
129 | + hidden='{{exp_type==1 }}'> | |
130 | + <!-----默认地址显示----> | |
131 | + <block wx:if="{{user_addr!=null}}"> | |
132 | + <view class="user-contact"> | |
133 | + <text class="bold fs36 pdr20">{{user_addr.consignee}}</text> | |
134 | + <text class="fs28">{{user_addr.mobile}}</text> | |
135 | + </view> | |
136 | + <view class="location flex ai_c" style="font-size: 28rpx"> | |
137 | + <view class="pos-icon"> | |
138 | + <image class="wh100" style="vertical-align: top" | |
139 | + src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
140 | + </view> | |
141 | + <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | |
142 | + | |
143 | + </view> | |
144 | + <view class="update-logistics"> | |
145 | + <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image> | |
146 | + </view> | |
147 | + </block> | |
148 | + <!-----先增地址------> | |
149 | + <block wx:else> | |
150 | + <view class="add_new"> | |
151 | + <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image> | |
152 | + 添加地址 | |
153 | + </view> | |
154 | + </block> | |
155 | + </view> | |
156 | + </block> | |
157 | + | |
158 | + <view class="user-mes" style="margin-top: 20rpx" wx:if="{{order.pay_status==1 && order.exp_type==0}}"> | |
159 | + <view class="user-contact" style=" margin-left: 20rpx"> | |
160 | + {{order.consignee}}{{' '}}{{order.mobile}} | |
161 | + </view> | |
162 | + <view class="location flex "> | |
163 | + | |
164 | + <view class="pos-icon" style="width: 26rpx; height: 26rpx"> | |
165 | + <image class="wh100" src="{{imgUrl}}/miniapp/images/iconfont-shouhuodizhi.png"></image> | |
166 | + </view> | |
167 | + <view class="address">{{order.more_address}} {{order.address}}</view> | |
168 | + </view> | |
169 | + | |
170 | + </view> | |
171 | + | |
172 | + | |
173 | + | |
174 | + <view class="use-item bfff bdr_t-14 mgt20"> | |
175 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image> | |
176 | + <view>{{pickup.pickup_name}}</view> | |
177 | + </view> | |
178 | + <view class="order-detail"> | |
179 | + <view class="goods-img" bindtap="go_goods" data-url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{goods.goods_id}}&pre_id={{pre_arr.id}}"> | |
180 | + <image class="wh100 bdr14" src="{{imgUrl}}{{goods.original_img}}" binderror='cart_set_err' | |
181 | + data-err="goods.original_img"></image> | |
182 | + </view> | |
183 | + <navigator class="order-cont" | |
184 | + url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{goods.goods_id}}&pre_id={{pre_arr.id}}"> | |
185 | + <view class="goods-name ellipsis-2">{{goods.goods_name}}</view> | |
186 | + <!-- 商品属性 --> | |
187 | + <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
188 | + <view class="goods-color"> | |
189 | + <block> | |
190 | + <text>{{filters.show_gui_ge(goods.goods_spec,goods.goods_color)}}</text> | |
191 | + </block> | |
192 | + </view> | |
193 | + </view> | |
194 | + <!-- ---商品名称规格---- --> | |
195 | + <view class="order-num flex-space-between"> | |
196 | + <view class="co-red">¥ | |
197 | + <text class="fs36">{{filters.toFix(pre_arr.presell_price,2)}}</text> | |
198 | + </view> | |
199 | + <view class="goods-num">×{{order.order_goods.goods_num}}</view> | |
200 | + </view> | |
201 | + </navigator> | |
202 | + | |
203 | + </view> | |
204 | + | |
205 | + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | |
206 | + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> | |
207 | + <view class="flex"> | |
208 | + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | |
209 | + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ | |
210 | + image> | |
211 | + <text class="card_name">{{show_card.CardName}}</text> | |
212 | + </view> | |
213 | + <view>立减 | |
214 | + <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> | |
215 | + 元 | |
216 | + </view> | |
217 | + </view> | |
218 | + <view> | |
219 | + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | |
220 | + </view> | |
221 | + <!-- 三角形 --> | |
222 | + <view class="car_tri_up"></view> | |
223 | + <!-- 立即开通跳转 --> | |
224 | + <view bindtap="buycard" class="card_op">立即开通</view> | |
225 | + </view> | |
226 | + | |
227 | + | |
228 | + <view class="set-mes bdr_b-14" wx:if="{{presell.deposit_pay_time>0 && presell.tail_pay_state==0 && !no_start && !wait_dj}}"> | |
229 | + <view wx:if="{{order.store_prom}}"> | |
230 | + <icon color="#f23030" size="16" type="info"></icon> | |
231 | + {{order.store_prom}} | |
232 | + </view> | |
233 | + | |
234 | + <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{pickup_id}}" | |
235 | + wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | |
236 | + <view class="work-frame flex-space-between"> | |
237 | + <view class="work"> | |
238 | + 优惠券 | |
239 | + <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ | |
240 | + (get_by_quan_list?get_by_quan_list.length:0)}}张可用 | |
241 | + </text> | |
242 | + </view> | |
243 | + <view class="xc-right-frame"> | |
244 | + <text wx:if="{{using_quan[pickup_id].is_nouse_red}}">不使用</text> | |
245 | + <block wx:else> | |
246 | + <text wx:if="{{using_quan[pickup_id].money}}">¥{{using_quan[pickup_id].money}}元优惠券</text> | |
247 | + <text wx:if="{{using_quan[pickup_id].isby}}">包邮券</text> | |
248 | + </block> | |
249 | + <view class="xc-right"></view> | |
250 | + </view> | |
251 | + </view> | |
252 | + </view> | |
253 | + | |
254 | + <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics}}"> | |
255 | + <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;"> | |
256 | + <view>选择物流</view> | |
257 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;"> | |
258 | + <view class="logistics-name">{{wu_arr[index].name}}</view> | |
259 | + <view class="xc-right"></view> | |
260 | + </view> | |
261 | + </view> | |
262 | + </view> | |
263 | + </view> | |
264 | + <!-- 留言 --> | |
265 | + <view class="coupon-mes flex-vertical"> | |
266 | + <view>留言</view> | |
267 | + <view class="leave-word" wx:if="{{sh_liuyan}}"> | |
268 | + <input placeholder-class="fs28" bindblur="close_liuyan" focus="{{sh_liuyan}}" bindinput="keyUpChangeNum" | |
269 | + value="{{user_note}}" | |
270 | + class="word-box" maxlength="100" name="user_note"></input> | |
271 | + </view> | |
272 | + | |
273 | + <view wx:if="{{!sh_liuyan}}" bindtap="show_liuyan"> | |
274 | + <text class="fs26 {{user_note?'':'gray'}} note_text">{{user_note?user_note:'给商家留言,最多100字'}}</text> | |
275 | + </view> | |
276 | + | |
277 | + </view> | |
278 | + | |
279 | + <!-- 是否参与店铺优惠 --> | |
280 | + <view class="coupon-mes flex-vertical" bindtap="bn_pop_offline" wx:if="{{bn_goods.offline_price}}"> | |
281 | + <view>店铺优惠</view> | |
282 | + <view class="leave-word fs32" style="color: #999;"> | |
283 | + 省{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}元 | |
284 | + </view> | |
285 | + <block wx:if="{{bn_goods.is_offline}}"> | |
286 | + <text style="color: #d7642b;">-¥{{filters.toFix(bn_goods.shop_price-bn_goods.offline_price,2)}}</text> | |
287 | + </block> | |
288 | + <block wx:else> | |
289 | + <text style="color: #d7642b;">不使用优惠</text> | |
290 | + </block> | |
291 | + <!-- 右边点击 --> | |
292 | + <view class="xc-right" style="margin-right: 12rpx; border-color: #d7642b;"></view> | |
293 | + </view> | |
294 | + | |
295 | + | |
296 | + <view class="information bdr14"> | |
297 | + <view class="item" wx:if="{{allpice>0}}"> | |
298 | + <view>商品金额</view> | |
299 | + <view class="co-red">¥ {{filters.toFix(allpice,2)}}元</view> | |
300 | + </view> | |
301 | + <view class="item" wx:if="{{exp_price>0}}"> | |
302 | + <view>配送费用</view> | |
303 | + <view class="co-red">¥ {{filters.toFix(exp_price,2)}}元</view> | |
304 | + </view> | |
305 | + | |
306 | + <view class="item" wx:if="{{quan_price>0}}"> | |
307 | + <view>优惠券优惠</view> | |
308 | + <view class="co-red">¥ -{{filters.toFix(quan_price,2)}}元</view> | |
309 | + </view> | |
310 | + | |
311 | + <view class="item" wx:if="{{order_prom_amount>0}}"> | |
312 | + <view>订单优惠</view> | |
313 | + <view class="co-red">¥ -{{filters.toFix(order_prom_amount,2)}}元</view> | |
314 | + </view> | |
315 | + | |
316 | + </view> | |
317 | + | |
318 | + <view class="information bdr14 mgt20"> | |
319 | + <view class="item"> | |
320 | + <view>阶段一:定金(待付款)</view> | |
321 | + <view class="co-red">¥{{filters.toFix(pre_arr.presell_money*order.order_goods.goods_num,2)}}元</view> | |
322 | + </view> | |
323 | + <view class="item"> | |
324 | + <view>阶段二:尾款</view> | |
325 | + <view class="co-red">¥{{filters.toFix(tail_pay,2)}}元</view> | |
326 | + </view> | |
327 | + </view> | |
328 | + </view> | |
329 | + | |
330 | + <!-- 要支付尾款的时候 --> | |
331 | + <view class="fixedToBottom shadow-1" wx:if="{{wait_wk}}"> | |
332 | + <view wx:if="{{no_start}}" class="date-container">尾款时间{{filters.format_time(presell.kw_start_time,1)}} - | |
333 | + {{filters.format_time(presell.kw_end_time,1)}} | |
334 | + </view> | |
335 | + <view wx:elif="{{is_end}}" class="date-container">尾款时间已经结束</view> | |
336 | + <view wx:elif="{{wait_wk && !no_start}}" class="date-container"> | |
337 | + 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 | |
338 | + </view> | |
339 | + | |
340 | + <view class="btn-wrap"> | |
341 | + <view class="pay-amount"> | |
342 | + <view class="payable">应付金额: | |
343 | + <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m-presell.presell_deposit,2)}}</text> | |
344 | + </view> | |
345 | + </view> | |
346 | + <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">提交订单</button> | |
347 | + <button wx:else class="tips-btn" bindtap="show_pay">提交订单</button> | |
348 | + <!-- 预售 --> | |
349 | + <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> | |
350 | + </view> | |
351 | + </view> | |
352 | + <!-- 当订单不是支付尾款的时候 --> | |
353 | + <view class="fixedToBottom shadow-1" wx:else style="background-color: #fff;display: flex; justify-content: flex-end; padding: 10rpx 0"> | |
354 | + <view bindtap="cancelOrder" data-id="{{order.order_id}}" class="tips-btn2" wx:if="{{wait_dj}}">取消订单</view> | |
355 | + <view bindtap="jumpToCart4" class="tips-btn2" wx:if="{{wait_dj}}">立即付款</view> | |
356 | + <block wx:if="{{!(order.has_rt || order.return_btn==2 || order.return_btn==4)}}"> | |
357 | + <navigator bindtap="confirmOrder" class="tips-btn2" hidden="{{!wait_sh}}">收货确认</navigator> | |
358 | + </block> | |
359 | + | |
360 | + <view class="tips-btn2" wx:if="{{order.order_status==3}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view> | |
361 | + | |
362 | + | |
363 | + <navigator class="tips-btn2" hidden="{{!order.shipping_btn}}" url="/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> | |
364 | + | |
365 | + | |
366 | + <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1}}"> | |
367 | + <navigator class="tips-btn2" wx:if="{{(order.order_status==0&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> | |
368 | + <navigator class="tips-btn2" wx:if="{{(order.order_status==1&&order.pay_status==1) && !order.is_bedistri}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">申请退款</navigator> | |
369 | + </block> | |
370 | + <block wx:else> | |
371 | + <view class="tips-btn2" wx:if="{{order.is_all_return_status==2 && order.isdel==0}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view> | |
372 | + <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator> | |
373 | + <navigator class="tips-btn2" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" | |
374 | + url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> | |
375 | + </block> | |
376 | + | |
377 | + | |
378 | + <block wx:if="{{order.order_status==2 }}"> | |
379 | + <navigator class="tips-btn2" url="/packageB/pages/user/add_comment/add_comment?goods_id={{order_goods.goods_id}}&order_id={{order.order_id}}}">去评价</navigator> | |
380 | + </block> | |
381 | + | |
382 | + </view> | |
383 | + | |
384 | + | |
275 | 385 | </form> |
276 | 386 | |
277 | 387 | <!-- 使用券列表的弹窗 --> |
278 | 388 | <view wx:if='{{open_quan==1}}'> |
279 | - <view class="cover-layer flex-center " bindtap='close_coupon'> </view> | |
280 | - <view class="cx-popup {{open_quan==true?'up' : 'down'}}"> | |
281 | - <!-- 最上面 --> | |
282 | - <view class="top flex"> | |
283 | - <view class="xc-top-content t-c"> | |
284 | - <view class="xc-title">优惠券使用</view> | |
285 | - </view> | |
286 | - <view class="xc-close-frame" bindtap='close_coupon'> | |
287 | - <view class="xc-close">×</view> | |
288 | - </view> | |
289 | - </view> | |
290 | - <!-- 使用优惠券和不使用优惠券层--> | |
291 | - <view class="may_use_coupon fs28 flex"> 可使用的优惠券 | |
292 | - <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券 | |
293 | - <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"> | |
294 | - <view class="circle white xc-hooka fs20 red-b sn"><text>Γ</text></view> | |
295 | - </block> | |
296 | - <block wx:else> | |
297 | - <view class="circle xc-hookst ons"></view> | |
298 | - </block> | |
299 | - </view> | |
300 | - </view> | |
301 | - | |
302 | - <!-- 中间券内容显示 --> | |
303 | - <view class="xc-frame flex-level"> | |
304 | - <view class="list-frame"> | |
305 | - <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}" | |
306 | - wx:for-item="item" wx:for-index="q_index"> | |
307 | - <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> | |
308 | - <view class="coupon-frame flex rel"> | |
309 | - <!-- 锯齿 --> | |
310 | - <include src="juchi_part.wxml" /> | |
311 | - <!-- 左边 --> | |
312 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
313 | - <view class="white xc-money-frames"> | |
314 | - <view class="f_text"><text class="xc-rmb-symbol">¥</text><text class="xc-rmb-val">{{item.Sum}}</text></view> | |
315 | - <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用</view> | |
316 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
317 | - </view> | |
318 | - </view> | |
319 | - <!-- 右边 --> | |
320 | - <view class="coupon-right flex-center rel"> | |
321 | - <view class="coupon-annotation flex"> | |
322 | - <view class="flex top-frame"> | |
323 | - <view class="frame"> | |
324 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
325 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}</text> | |
326 | - <block>{{item.Sum}}元优惠券</block> | |
327 | - </view> | |
328 | - <view class="coupon-time">{{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}}</view> | |
329 | - </view> | |
330 | - </view> | |
331 | - <block wx:if="{{item.show_red}}"> | |
332 | - <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
333 | - </block> | |
334 | - <block wx:else> | |
335 | - <view class="circle xc-hooks on"></view> | |
336 | - </block> | |
337 | - </view> | |
338 | - <include src="remark_click_part.wxml" /> | |
339 | - </view> | |
340 | - </view> | |
341 | - </view> | |
342 | - <!-- 打开是说明 --> | |
343 | - <include src="remark_part.wxml" /> | |
344 | - </view> | |
345 | - <!-- 包邮券的显示,立即购买 --> | |
346 | - <block wx:if="{{ is_b_now && bn_exp_type==0}}"> | |
347 | - <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" | |
348 | - wx:for-item="item" wx:for-index="byq_index"> | |
349 | - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
350 | - <view class="coupon-frame flex rel"> | |
351 | - <!-- 锯齿 --> | |
352 | - <include src="juchi_part.wxml" /> | |
353 | - <!-- 左边 --> | |
354 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
355 | - <view class="white xc-money-frames"> | |
356 | - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
357 | - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
358 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
359 | - </view> | |
360 | - </view> | |
361 | - <!-- 右边 --> | |
362 | - <view class="coupon-right flex-center rel"> | |
363 | - <view class="coupon-annotation flex"> | |
364 | - <view class="flex top-frame"> | |
365 | - <view class="frame"> | |
366 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
367 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
368 | - <block>包邮券</block> | |
369 | - </view> | |
370 | - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
371 | - </view> | |
372 | - </view> | |
373 | - <block wx:if="{{item.show_red}}"> | |
374 | - <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
375 | - </block> | |
376 | - <block wx:else> | |
377 | - <view class="circle xc-hooks on"></view> | |
378 | - </block> | |
379 | - </view> | |
380 | - <include src="remark_click_part2.wxml" /> | |
381 | - </view> | |
382 | - </view> | |
383 | - </view> | |
384 | - <!-- 打开是说明 --> | |
385 | - <include src="remark_part.wxml" /> | |
386 | - </view> | |
387 | - </block> | |
388 | - | |
389 | - <!-- 包邮券的显示,购物车购买 --> | |
390 | - <block wx:if="{{!is_b_now && sele_exp_type==0}}"> | |
391 | - <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" | |
392 | - wx:for-item="item" wx:for-index="byq_index"> | |
393 | - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
394 | - <view class="coupon-frame flex rel"> | |
395 | - <!-- 锯齿 --> | |
396 | - <include src="juchi_part.wxml" /> | |
397 | - <!-- 左边 --> | |
398 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
399 | - <view class="white xc-money-frames"> | |
400 | - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
401 | - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
402 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
403 | - </view> | |
404 | - </view> | |
405 | - <!-- 右边 --> | |
406 | - <view class="coupon-right flex-center rel"> | |
407 | - <view class="coupon-annotation flex"> | |
408 | - <view class="flex top-frame"> | |
409 | - <view class="frame"> | |
410 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
411 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
412 | - <block>包邮券</block> | |
413 | - </view> | |
414 | - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
415 | - </view> | |
416 | - </view> | |
417 | - <block wx:if="{{item.show_red}}"> | |
418 | - <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
419 | - </block> | |
420 | - <block wx:else> | |
421 | - <view class="circle xc-hooks on"></view> | |
422 | - </block> | |
423 | - </view> | |
424 | - <include src="remark_click_part2.wxml" /> | |
425 | - </view> | |
426 | - </view> | |
427 | - </view> | |
428 | - <!-- 打开是说明 --> | |
429 | - <include src="remark_part.wxml" /> | |
430 | - </view> | |
431 | - </block> | |
432 | - | |
433 | - | |
434 | - </view> | |
435 | - </view> | |
436 | - <!-- 最底下确定层--> | |
437 | - <view class="determine-frame"> | |
438 | - <view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定 </view> | |
439 | - </view> | |
440 | - </view> | |
389 | + <view class="cover-layer flex-center " bindtap='close_coupon'></view> | |
390 | + <view class="cx-popup {{open_quan==true?'up' : 'down'}}"> | |
391 | + <!-- 最上面 --> | |
392 | + <view class="top flex"> | |
393 | + <view class="xc-top-content t-c"> | |
394 | + <view class="xc-title">优惠券使用</view> | |
395 | + </view> | |
396 | + <view class="xc-close-frame" bindtap='close_coupon'> | |
397 | + <view class="xc-close">×</view> | |
398 | + </view> | |
399 | + </view> | |
400 | + <!-- 使用优惠券和不使用优惠券层--> | |
401 | + <view class="may_use_coupon fs28 flex"> 可使用的优惠券 | |
402 | + <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券 | |
403 | + <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"> | |
404 | + <view class="circle white xc-hooka fs20 red-b sn"> | |
405 | + <text>Γ</text> | |
406 | + </view> | |
407 | + </block> | |
408 | + <block wx:else> | |
409 | + <view class="circle xc-hookst ons"></view> | |
410 | + </block> | |
411 | + </view> | |
412 | + </view> | |
413 | + | |
414 | + <!-- 中间券内容显示 --> | |
415 | + <view class="xc-frame flex-level"> | |
416 | + <view class="list-frame"> | |
417 | + <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" | |
418 | + data-ind="{{q_index}}" | |
419 | + wx:for-item="item" wx:for-index="q_index"> | |
420 | + <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> | |
421 | + <view class="coupon-frame flex rel"> | |
422 | + <!-- 锯齿 --> | |
423 | + <include src="juchi_part.wxml"/> | |
424 | + <!-- 左边 --> | |
425 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
426 | + <view class="white xc-money-frames"> | |
427 | + <view class="f_text"> | |
428 | + <text class="xc-rmb-symbol">¥</text> | |
429 | + <text class="xc-rmb-val">{{item.Sum}}</text> | |
430 | + </view> | |
431 | + <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用 | |
432 | + </view> | |
433 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
434 | + </view> | |
435 | + </view> | |
436 | + <!-- 右边 --> | |
437 | + <view class="coupon-right flex-center rel"> | |
438 | + <view class="coupon-annotation flex"> | |
439 | + <view class="flex top-frame"> | |
440 | + <view class="frame"> | |
441 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
442 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}"> | |
443 | + {{filter.get_type_card(item.UseObjectType)}} | |
444 | + </text> | |
445 | + <block>{{item.Sum}}元优惠券</block> | |
446 | + </view> | |
447 | + <view class="coupon-time"> | |
448 | + {{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}} | |
449 | + </view> | |
450 | + </view> | |
451 | + </view> | |
452 | + <block wx:if="{{item.show_red}}"> | |
453 | + <view class="circle white xc-hook fs20 red-b sn"> | |
454 | + <text>Γ</text> | |
455 | + </view> | |
456 | + </block> | |
457 | + <block wx:else> | |
458 | + <view class="circle xc-hooks on"></view> | |
459 | + </block> | |
460 | + </view> | |
461 | + <include src="remark_click_part.wxml"/> | |
462 | + </view> | |
463 | + </view> | |
464 | + </view> | |
465 | + <!-- 打开是说明 --> | |
466 | + <include src="remark_part.wxml"/> | |
467 | + </view> | |
468 | + <!-- 包邮券的显示,立即购买 --> | |
469 | + <block wx:if="{{ is_b_now && bn_exp_type==0}}"> | |
470 | + <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" | |
471 | + data-ind="{{byq_index}}" | |
472 | + wx:for-item="item" wx:for-index="byq_index"> | |
473 | + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
474 | + <view class="coupon-frame flex rel"> | |
475 | + <!-- 锯齿 --> | |
476 | + <include src="juchi_part.wxml"/> | |
477 | + <!-- 左边 --> | |
478 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
479 | + <view class="white xc-money-frames"> | |
480 | + <view class="f_text"> | |
481 | + <text class="xc-rmb-val">包邮券</text> | |
482 | + </view> | |
483 | + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}"> | |
484 | + 满{{item.condition}}元可用 | |
485 | + </view> | |
486 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
487 | + </view> | |
488 | + </view> | |
489 | + <!-- 右边 --> | |
490 | + <view class="coupon-right flex-center rel"> | |
491 | + <view class="coupon-annotation flex"> | |
492 | + <view class="flex top-frame"> | |
493 | + <view class="frame"> | |
494 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
495 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}"> | |
496 | + {{filter.get_type_card(0)}} | |
497 | + </text> | |
498 | + <block>包邮券</block> | |
499 | + </view> | |
500 | + <view class="coupon-time"> | |
501 | + {{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}} | |
502 | + </view> | |
503 | + </view> | |
504 | + </view> | |
505 | + <block wx:if="{{item.show_red}}"> | |
506 | + <view class="circle white xc-hook fs20 red-b sn"> | |
507 | + <text>Γ</text> | |
508 | + </view> | |
509 | + </block> | |
510 | + <block wx:else> | |
511 | + <view class="circle xc-hooks on"></view> | |
512 | + </block> | |
513 | + </view> | |
514 | + <include src="remark_click_part2.wxml"/> | |
515 | + </view> | |
516 | + </view> | |
517 | + </view> | |
518 | + <!-- 打开是说明 --> | |
519 | + <include src="remark_part.wxml"/> | |
520 | + </view> | |
521 | + </block> | |
522 | + | |
523 | + <!-- 包邮券的显示,购物车购买 --> | |
524 | + <block wx:if="{{!is_b_now && sele_exp_type==0}}"> | |
525 | + <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" | |
526 | + data-ind="{{byq_index}}" | |
527 | + wx:for-item="item" wx:for-index="byq_index"> | |
528 | + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
529 | + <view class="coupon-frame flex rel"> | |
530 | + <!-- 锯齿 --> | |
531 | + <include src="juchi_part.wxml"/> | |
532 | + <!-- 左边 --> | |
533 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
534 | + <view class="white xc-money-frames"> | |
535 | + <view class="f_text"> | |
536 | + <text class="xc-rmb-val">包邮券</text> | |
537 | + </view> | |
538 | + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}"> | |
539 | + 满{{item.condition}}元可用 | |
540 | + </view> | |
541 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
542 | + </view> | |
543 | + </view> | |
544 | + <!-- 右边 --> | |
545 | + <view class="coupon-right flex-center rel"> | |
546 | + <view class="coupon-annotation flex"> | |
547 | + <view class="flex top-frame"> | |
548 | + <view class="frame"> | |
549 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
550 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}"> | |
551 | + {{filter.get_type_card(0)}} | |
552 | + </text> | |
553 | + <block>包邮券</block> | |
554 | + </view> | |
555 | + <view class="coupon-time"> | |
556 | + {{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}} | |
557 | + </view> | |
558 | + </view> | |
559 | + </view> | |
560 | + <block wx:if="{{item.show_red}}"> | |
561 | + <view class="circle white xc-hook fs20 red-b sn"> | |
562 | + <text>Γ</text> | |
563 | + </view> | |
564 | + </block> | |
565 | + <block wx:else> | |
566 | + <view class="circle xc-hooks on"></view> | |
567 | + </block> | |
568 | + </view> | |
569 | + <include src="remark_click_part2.wxml"/> | |
570 | + </view> | |
571 | + </view> | |
572 | + </view> | |
573 | + <!-- 打开是说明 --> | |
574 | + <include src="remark_part.wxml"/> | |
575 | + </view> | |
576 | + </block> | |
577 | + | |
578 | + | |
579 | + </view> | |
580 | + </view> | |
581 | + <!-- 最底下确定层--> | |
582 | + <view class="determine-frame"> | |
583 | + <view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定</view> | |
584 | + </view> | |
585 | + </view> | |
441 | 586 | </view> |
442 | 587 | |
443 | 588 | <!----弹起选择物流名的列表----> |
444 | 589 | <view wx:if='{{open_express==1}}'> |
445 | - <view class="cover-layer flex-center " bindtap='close_express'> | |
446 | - </view> | |
447 | - | |
448 | - <view class="cx-popup radius {{open_express==1?'up' : 'down'}}"> | |
449 | - <view class="tops flex"> | |
450 | - <view class="top-content fs32"> | |
451 | - <view>选择物流名字</view> | |
452 | - </view> | |
453 | - <view class="close-frame" bindtap='close_express'> | |
454 | - <view class="xc-close-express">×</view> | |
455 | - </view> | |
456 | - </view> | |
457 | - <view class="express_list"> | |
458 | - <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | |
459 | - <view class="express_list_frame" bindtap="click_express_name" data-shippingcode="{{express_list.shipping_code}}" | |
460 | - data-name="{{express_list.name}}" data-idxe="{{idx}}"> | |
461 | - | |
462 | - <block wx:if="{{is_express==idx}}"> | |
463 | - <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | |
464 | - </block> | |
465 | - <block wx:else> | |
466 | - <view class="circle xc-hooks"></view> | |
467 | - </block> | |
468 | - <view class="fs30">{{express_list.name}}</view> | |
469 | - | |
470 | - </view> | |
471 | - </view> | |
472 | - </view> | |
473 | - <view class="flex click-buttem"> | |
474 | - <view class="xc-determine flex-center" bindtap="determine_expres"> | |
475 | - <view class="flex-vertical t-c">确定</view> | |
476 | - </view> | |
477 | - <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | |
478 | - <view class="flex-vertical t-c">设为默认</view> | |
479 | - </view> | |
480 | - </view> | |
481 | - | |
482 | - </view> | |
590 | + <view class="cover-layer flex-center " bindtap='close_express'> | |
591 | + </view> | |
592 | + | |
593 | + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}"> | |
594 | + <view class="tops flex"> | |
595 | + <view class="top-content fs32"> | |
596 | + <view>选择物流名字</view> | |
597 | + </view> | |
598 | + <view class="close-frame" bindtap='close_express'> | |
599 | + <view class="xc-close-express">×</view> | |
600 | + </view> | |
601 | + </view> | |
602 | + <view class="express_list"> | |
603 | + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | |
604 | + <view class="express_list_frame" bindtap="click_express_name" | |
605 | + data-shippingcode="{{express_list.shipping_code}}" | |
606 | + data-name="{{express_list.name}}" data-idxe="{{idx}}"> | |
607 | + | |
608 | + <block wx:if="{{is_express==idx}}"> | |
609 | + <view class="circle white xc-hook fs20 red-b"> | |
610 | + <text>Γ</text> | |
611 | + </view> | |
612 | + </block> | |
613 | + <block wx:else> | |
614 | + <view class="circle xc-hooks"></view> | |
615 | + </block> | |
616 | + <view class="fs30">{{express_list.name}}</view> | |
617 | + | |
618 | + </view> | |
619 | + </view> | |
620 | + </view> | |
621 | + <view class="flex click-buttem"> | |
622 | + <view class="xc-determine flex-center" bindtap="determine_expres"> | |
623 | + <view class="flex-vertical t-c">确定</view> | |
624 | + </view> | |
625 | + <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | |
626 | + <view class="flex-vertical t-c">设为默认</view> | |
627 | + </view> | |
628 | + </view> | |
629 | + | |
630 | + </view> | |
483 | 631 | </view> |
484 | 632 | <warn id="warn"></warn> |
485 | 633 | |
486 | 634 | |
487 | 635 | <!-- 客服 --> |
488 | 636 | <view class="kefu-container shadow-1"> |
489 | - <block wx:if="{{sys_switch.weapp_customertype}}" > | |
490 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="kefu-btn" | |
491 | - open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | |
492 | - <text class="iconfont icon-kefu fs60 co-red"></text> | |
493 | - </button> | |
494 | - </block> | |
495 | - <block wx:else> | |
496 | - <text class="iconfont icon-kefu fs60 co-red"></text> | |
497 | - </block> | |
637 | + <block wx:if="{{sys_switch.weapp_customertype}}"> | |
638 | + <button wx:if="{{sys_switch.weapp_customertype}}" class="kefu-btn" | |
639 | + open-type="contact" | |
640 | + session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | |
641 | + <text class="iconfont icon-kefu fs60 co-red"></text> | |
642 | + </button> | |
643 | + </block> | |
644 | + <block wx:else> | |
645 | + <text class="iconfont icon-kefu fs60 co-red"></text> | |
646 | + </block> | |
498 | 647 | </view> |
499 | 648 | |
500 | 649 | <!--支付的方式选择,0微信支付 1余额支付--> |
501 | 650 | <block wx:if="{{show_pay_type}}"> |
502 | - <view class="cover-layer" bindtap="close_show_pay"></view> | |
503 | - <view class="pay_type_view"> | |
504 | - <view class="title">请选择支付方式</view> | |
505 | - <view class="anniu_view"> | |
506 | - <view bindtap="set_pay_type" data-type="0" >微信支付</view> | |
507 | - <view bindtap="set_pay_type" data-type="1" >余额支付</view> | |
508 | - </view> | |
509 | - </view> | |
651 | + <view class="cover-layer" bindtap="close_show_pay"></view> | |
652 | + <view class="pay_type_view"> | |
653 | + <view class="title">请选择支付方式</view> | |
654 | + <view class="anniu_view"> | |
655 | + <view bindtap="set_pay_type" data-type="0">微信支付</view> | |
656 | + <view bindtap="set_pay_type" data-type="1">余额支付</view> | |
657 | + </view> | |
658 | + </view> | |
510 | 659 | </block> | ... | ... |
packageC/pages/presell/cart/cart.wxss
... | ... | @@ -70,7 +70,7 @@ page { |
70 | 70 | color: #444; |
71 | 71 | /* margin-top: 28rpx; */ |
72 | 72 | border-radius: 14rpx; |
73 | - padding: 20rpx 70rpx 20rpx 20rpx; | |
73 | + padding: 20rpx; | |
74 | 74 | } |
75 | 75 | .user-contact { |
76 | 76 | /* padding: 24rpx 26rpx; |
... | ... | @@ -1096,3 +1096,20 @@ margin-left: 20rpx; |
1096 | 1096 | } |
1097 | 1097 | |
1098 | 1098 | |
1099 | + | |
1100 | +.tips-btn2 { | |
1101 | + display: inline-block; | |
1102 | + width: 140rpx; | |
1103 | + height: 60rpx; | |
1104 | + line-height: 60rpx; | |
1105 | + text-align: center; | |
1106 | + font-size: 30rpx; | |
1107 | + color: #fff; | |
1108 | + background-color: #f23030; | |
1109 | + /* margin-left: 2rpx; */ | |
1110 | + margin-right: 12rpx; | |
1111 | + border-radius: 10rpx; | |
1112 | + | |
1113 | +} | |
1114 | + | |
1115 | + | ... | ... |
pages/index/index/index.js
... | ... | @@ -48,6 +48,7 @@ Page({ |
48 | 48 | pindGoods: null, //拼单数据 |
49 | 49 | newGoods: null, //新商品 |
50 | 50 | hotGoods: null, //hot商品 |
51 | + preGoods:null, //预售商品 | |
51 | 52 | //----控制是是否显示计时器--- |
52 | 53 | is_timer: 1, |
53 | 54 | ishow: 0, |
... | ... | @@ -302,7 +303,30 @@ Page({ |
302 | 303 | } |
303 | 304 | } |
304 | 305 | |
305 | - //优惠券要实时更新 | |
306 | + var pre_data={store_id:os.stoid,is_end:0,timetype:1,isuse:1}; | |
307 | + if(userInfo){ | |
308 | + pre_data.user_id= userInfo.user_id; | |
309 | + } | |
310 | + | |
311 | + getApp().request.get("/api/weshop/marketing/marketingPresellList/page",{ | |
312 | + data:pre_data, | |
313 | + success:function (e) { | |
314 | + if(e.data.code==0 && e.data.data.pageData && e.data.data.pageData.length>0 ){ | |
315 | + var pre_data=e.data.data.pageData; | |
316 | + var arr = new Array(); | |
317 | + //--三个三个一组--- | |
318 | + for (var i = 0; i < pre_data.length; i += 3) { | |
319 | + arr.push(pre_data.slice(i, i + 3)); | |
320 | + } | |
321 | + th.setData({ | |
322 | + preGoods: arr | |
323 | + }); | |
324 | + } | |
325 | + } | |
326 | + }) | |
327 | + | |
328 | + | |
329 | + //优惠券要实时更新 | |
306 | 330 | getApp().getConfig2(function (e) { |
307 | 331 | var json_d = JSON.parse(e.switch_list); |
308 | 332 | th.setData({ is_closecoupon: json_d.is_closecoupon }) |
... | ... | @@ -1121,4 +1145,14 @@ Page({ |
1121 | 1145 | this.close_full_screen(); |
1122 | 1146 | }, |
1123 | 1147 | |
1148 | + go_pre:function (e) { | |
1149 | + var userInfo=getApp().globalData.userInfo; | |
1150 | + if(!userInfo){ | |
1151 | + getApp().goto("/pages/togoin/togoin"); | |
1152 | + return false; | |
1153 | + } | |
1154 | + var url=e.currentTarget.dataset.url; | |
1155 | + getApp().goto(url); | |
1156 | + } | |
1157 | + | |
1124 | 1158 | }); |
1125 | 1159 | \ No newline at end of file | ... | ... |
pages/user/order_list/order_list.wxml
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | </block> |
48 | 48 | <block wx:else> |
49 | 49 | <text wx:if="{{!item.presell.deposit_pay_time}}">待支付定金</text> |
50 | - <text wx:if="{{item.presell.deposit_pay_time && !item.presell.tail_pay_state}}">待尾款</text> | |
50 | + <text wx:if="{{item.presell.presell_type!=1 && item.presell.deposit_pay_time && !item.presell.tail_pay_state}}">待尾款</text> | |
51 | 51 | </block> |
52 | 52 | |
53 | 53 | <block wx:if="{{!(item.is_all_return_status==0 || item.is_all_return_status==1)}}"> |
... | ... | @@ -200,7 +200,7 @@ |
200 | 200 | <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view> |
201 | 201 | </block> |
202 | 202 | |
203 | - <block wx:if="{{item.presell}}"> | |
203 | + <block wx:if="{{item.presell && item.presell.presell_type!=1}}"> | |
204 | 204 | <navigator class="commodity_To_evaluate flex-level comment_go" url="/packageC/pages/presell/cart/cart?order_id={{item.order_id}}" data-idx="{{index}}" wx:if="{{item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0}}">支付尾款</navigator> |
205 | 205 | |
206 | 206 | </block> | ... | ... |