{extend name="$base" /} {block name="resources"} {/block} {block name="head"}{/block} {block name="main"} {php} // 订单创建所需数据 $params = []; $params['order_type'] = !empty($create_data['order_type']) ? $create_data['order_type'] : 0; $params['goods_sku_list'] = !empty($create_data['goods_sku_list']) ? $create_data['goods_sku_list'] : ''; $params['promotion_type'] = !empty($create_data['promotion_type']) ? $create_data['promotion_type'] : 0; $params['promotion_info'] = !empty($create_data['promotion_info']) ? $create_data['promotion_info'] : []; $buyer_ip = request()->ip(); $data = api("System.Order.orderDataCollation", ['data' => json_encode($params)]); $data = $data['data']; $is_virtual = $data['is_virtual']; // 是否是虚拟商品 {/php} {empty name="$data"}
{:exit()} {/empty}
{eq name="$is_virtual" value="0"} {notempty name="$data['address']"}

- 收货人信息：{$data.address.consigner} {$data.address.mobile}
- 收货地址：{$data.address.address_info}

{else/}
新增收货地址
{/notempty}
{/eq}
{if $data['order_type'] eq 6} {foreach name="$data['goods_sku_array']" item="product_item"}
{$product_item.goods_info.goods_name}

{$product_item.goods_sku_info.sku_name}

￥{$product_item.presell_price}
尾款：￥{:sprintf("%.2f", ($product_item.sku_price - $product_item.presell_price))}
x{$product_item.num}
{/foreach} {elseif $data['promotion_type'] == 4} {foreach name="$data['goods_sku_array']" item="product_item"}
{$product_item.goods_info.goods_name}

{$product_item.goods_sku_info.sku_name}

{if $product_item.goods_info.point_exchange_type == 1}
￥{$product_item.sku_price}
+{$product_item.goods_info.point_exchange}积分
{else/}
{$product_item.goods_info.point_exchange}积分
{/if}
x{$product_item.num}
{/foreach} {else/} {foreach name="$data['goods_sku_array']" item="product_item"}
{$product_item.goods_info.goods_name}

{$product_item.goods_sku_info.sku_name}

￥{$product_item.sku_price}
x{$product_item.num}
{/foreach} {/if} {notempty name="$data['gift_array']"} {foreach name="$data['gift_array']" item="product_item"}
赠品 {$product_item.goods_info.goods_name}

{$product_item.goods_sku_info.sku_name}

￥{$product_item.sku_price}
x{$product_item.num}
{/foreach} {/notempty}
{eq name="$is_virtual" value="1"}
手机号码
{/eq} {notempty name="$data['pay_type']"}
支付方式 {$data['pay_type'][0]['type_name']}
{else/}
支付方式 商家未配置支付方式
{/notempty} {eq name="$is_virtual" value="0"} {notempty name="$data['express_type']"}
配送服务 物流配送
送货时间 工作日、双休日与节假日均可送货
{/notempty} {/eq} {notempty name="$data['coupon_list']"}
优惠券 已使用1张，可抵扣￥{$data['coupon_list'][0]['money']}
{/notempty} {eq name="$is_virtual" value="0"} {notempty name="$data['invoice_info']"}
发票信息 不需要发票
{/notempty} {/eq} {if addon_is_exit('NsCustomForm')} {php} $custom_list = api("System.Member.getOrderCustom", []); {/php} {notempty name="$custom_list['data']"} {volist name="$custom_list.data" id="list"} {if condition = "$list.custom_list"}
{$list.oc_name} 添写信息
{/if} {/volist} {/notempty} {/if} {if $data['max_use_point'] > 0}
积分抵现本次最大可用{$data['max_use_point']}积分
{/if}
买家留言

{eq name="$data['order_type']" value="6"}
- 付款
  - 定金
  - 全款
{/eq}
- 商品金额 ￥0.00
{eq name="$is_virtual" value="0"}
- 运费 ￥0.00
{/eq}
- 优惠金额 ￥0.00
- 税费 ￥0.00
{if $data['max_use_point'] > 0}
- 积分抵现 ￥0.00
{/if} {eq name="$data['promotion_type']" value="4"}
- 兑换所需积分 {$data.total_buy_point}积分
{/eq}

应付：￥0.00

提交订单
{eq name="$is_virtual" value="0"} {notempty name="$data['invoice_info']"}
是否需要发票
发票类型 普票 专票
发票抬头
纳税人识别号
开户银行
银行账号
企业地址
企业电话
发票内容

{notempty name="$data['invoice_info']['order_invoice_content_list']"} {foreach name="$data['invoice_info']['order_invoice_content_list']" item="vo" key="k"} {eq name="$k" value="0"}
- {else/}
- {/eq} {$vo}
{/foreach} {/notempty}

{if $data['invoice_info']['order_invoice_tax'] > 0}

需要发票需加收{$data['invoice_info']['order_invoice_tax']}%的税费

{/if}
确定
{/notempty} {notempty name="$data['express_type']"}

### 配送方式

{foreach name="$data['express_type']" item="vo" key="k"}
- {$vo.type_name}
{/foreach}

{notempty name="$data['express_company_list']"}

### 物流公司

{foreach name="$data['express_company_list']" item="vo" key="k"} {eq name="$k" value="0"}
- {$vo.company_name}
{else/}
- {$vo.company_name}
{/eq} {/foreach}

{/notempty} {if $data['order_config']['order_designated_delivery_time']}
配送时间： 工作日、双休日与节假日均可送货
{else /}
配送时间： 工作日、双休日与节假日均可送货
{/if}
{notempty name="$data['pickup_point_list']"}

### 自提点

{foreach name="$data['pickup_point_list']" item="vo" key="k"} {eq name="$k" value="0"}
- {else/}
- {/eq}

  ##### {$vo.name}

  {$vo.province_name} {$vo.city_name} {$vo.district_name} {$vo.address}

{/foreach}

{/notempty}

{$data.distribution_time}

确定
{/notempty} {/eq} {notempty name="$data['coupon_list']"}

{foreach name="$data['coupon_list']" item="vo" key="k"} {eq name="$k" value="0"}
- {else/}
- {/eq}

  {$vo.money|round}

  {if $vo.at_least > 0}

  满{$vo.at_least}元可用

  {else/}

  无门槛券

  {/if}

  {if $vo.range_type}全部商品可用{else/}部分商品可用{/if}

  有效期至{$vo.end_time|date="Y-m-d",###}

{/foreach}

确定
{/notempty}
支付方式

{notempty name="$data['pay_type']"} {foreach name="$data['pay_type']" item="vo" key="k"} {eq name="$k" value="0"}
- {$vo.type_name}
{else/}
- {$vo.type_name}
{/eq} {/foreach} {/notempty}

确定
配送时间
{php} $week_array = ['周日','周一','周二','周三','周四','周五','周六']; $time_slot = !empty($data['time_slot']) ? $data['time_slot'] : []; {/php}
{notempty name="$time_slot"}
选择配送时间段
{foreach name="$time_slot" item="vo" key="k"} {$vo} {/foreach}
{/notempty}
选择配送时间

{for start="3" end="10"}
- {:date('Y-m-d', strtotime($i." day"))} {$week_array[date('w', strtotime($i." day"))]}
{/for}

自定义表单数据
{if addon_is_exit('NsCustomForm')} {php} $custom_list = api("System.Member.getOrderCustom", []); {/php} {notempty name="$custom_list['data']"} {volist name="custom_list.data" id="list"} {if condition = "$list.custom_list"}
{$list.oc_name}

{volist name="list.custom_list" id="custom"} {if condition = "$custom.field_type == 3"} {php} $option_text = explode(",", $custom['option_text']); {/php}
- {$custom.field_name}
  {foreach name="$option_text" item="text" key="k"}
  {$text}
  {/foreach}
{elseif condition = "$custom.field_type == 4"} {php} $option_text = explode(",", $custom['option_text']); {/php}
- {$custom.field_name}
  {foreach name="$option_text" item="text" key="k"}
  {$text}
  {/foreach}
{else/}
- {$custom.field_name}
{/if} {/volist}

{/if} {/volist} {/notempty} {/if}
确定
{/block} {block name="footer"}{/block} {block name="script"}
{/block}