store/packageA/mycomponent/orderList/orderList.wxml

283 lines
15 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<wxs module="util">
var getDays = function (strDateStart, strDateEnd) {
let start = strDateStart.split(' ')
let end = strDateEnd.split(' ')
let strSeparator = '-' //日期分隔符
let oDate1, oDate2, iDays
oDate1 = start[0].split(strSeparator)
oDate2 = end[0].split(strSeparator)
let strDateS = new Date(oDate1[0], oDate1[1] - 1, oDate1[2])
let strDateE = new Date(oDate2[0], oDate2[1] - 1, oDate2[2])
iDays = parseInt(Math.abs(strDateS - strDateE) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
console.log(iDays)
return iDays
};
var substr = function (val,num){
return val.slice(0,num);
}
module.exports.inOf = getDays;
module.exports.substr = substr;
</wxs>
<block wx:if="{{datasource.length>0}}">
<van-checkbox-group value="{{checkList}}" bind:change="multiplePayChange">
<view class="shop" wx:for="{{datasource}}" wx:for-index="orderidx" wx:for-item="order" wx:key="orderidx">
<view class="title">
<van-checkbox wx:if="{{status == 1 && consolidated }}" checked-color="#f15353" name="{{order.id}}"></van-checkbox>
<view class="h4" catchlongpress="copyorderbtn" data-copydata="{{order.order_sn}}">
<text style="font-size: 13px;">订单号:{{order.order_sn}}</text>
<text class="tags-box" wx:if="{{order.dispatch_type_name}}">
<text class="tags">{{order.dispatch_type_name}}</text>
</text>
</view>
<view class="span" wx:if="{{orderType != 'stock'}}">
<text wx:if="{{order.is_pending==1}}">{{util.substr(order.status_name,-4)}}</text>
<text wx:else>{{order.status_name}}</text>
<text style="font-size:24rpx;margin-top:-9rpx;" wx:if="{{order.is_pending==1}}">(锁定)</text>
</view>
</view>
<view class="shop-box" data-order="{{order}}" wx:if="{{order.shop_name && (order.plugin_id == 0 || order.plugin_id == 92 || order.plugin_id == 31 || order.plugin_id == 32|| order.plugin_id == 108)&&!order.has_one_team_member.store_id}}" catchtap="toStore">
<view class="shop-box-left">
<icon class="iconfont icon-fontclass-dianpu"></icon>
<text class="p">{{order.shop_name}}</text>
</view>
<icon class="iconfont icon-advertise-next"></icon>
</view>
<!-- 门店拼团门店信息显示 start -->
<view class="shop-box" data-order="{{order}}" wx:if="{{order.has_one_team_member.store_id && order.plugin_id == 54 }}" catchtap="toStore">
<view class="shop-box-left">
<icon class="iconfont icon-fontclass-dianpu"></icon>
<text class="p">{{order.has_one_team_member.has_one_store.store_name}}</text>
</view>
<icon class="iconfont icon-advertise-next"></icon>
</view>
<!-- 门店拼团门店信息显示 end -->
<block wx:for="{{order.has_many_order_goods}}" wx:for-index="goodsidx" wx:for-item="good" wx:key="goodsidx">
<view class="goods" data-orderid="{{order.id}}" bindtap="goOrderdetail">
<view class="goods-box">
<view class="img">
<image src="{{good.thumb}}" mode='widthFix' />
</view>
<view class="warp">
<view class="inner">
<view class="name" wx:if="{{!order.deposit_ladder}}">{{good.title}}</view>
<view class="name" wx:if="{{order.deposit_ladder}}"><!--判断定金活动尾款-->{{ order.deposit_ladder.activity_name }}</view>
<view class="option">
<text wx:if="{{good.goods_option_title}}">规格: {{good.goods_option_title}}</text>
<text class="num" wx:if="{{detailUrl != 'HotelOrderDetail'}}">×{{good.total}}</text>
<text class="num" wx:if="{{detailUrl == 'HotelOrderDetail'}}">{{ util.getDays(order.hotel_order.enter_at, order.hotel_order.leave_at) }}晚{{ good.total }}间</text>
</view>
<view class="reserveClass" wx:if="{{order.store_reserve}}">预约日期:{{ order.store_reserve }}</view>
</view>
</view>
</view>
<view class="price">
<view class="money">
<text class="deposit-tips" wx:if="{{order.plugin_id == 108}}"><!--判断定金活动-->定金</text>
<text class="deposit-tips" wx:if="{{order.deposit_ladder }}"><!--判断定金活动尾款-->尾款</text>
<text class="small">{{language['money']}}</text>
{{orderType=='lease_toy'?good.price/order.has_one_lease_toy_order.return_days/good.total:good.price}}
<text class="span" wx:if="{{order.plugin_id == 40?true:false}}">/天</text>
<view wx:if="{{vip_show && good.vip_price>0}}" class="vipPirce">
会员价:
<text class="small">{{language['money']}}</text>
{{good.vip_price}}
</view>
</view>
</view>
<view class="comment-box">
<view
wx:for="{{good.buttons}}" wx:for-item="btn"
class="{{btn.value==2?'view-comment-btn':'comment-btn'}}"
catchtap="evaluateOpration" data-order="{{order}}" data-goods="{{good}}" data-btn="{{btn}}">
{{btn.name}}</view>
</view>
</view>
</block>
<view style="text-align: left;padding-left: 20rpx;color:#f15353" wx:if="{{order.plugin_id == 40? true : false}}">
<text style="color:#909090">租赁到期日期:</text>
{{order.has_one_lease_toy_order.end_time}}
</view>
<view class="address-box" wx:if="{{order.address && order.address.address}}">
<view>{{order.address.realname}} {{order.address.mobile}}</view>
<view wx:if="{{order.plugin_id == 130}}">预约时间 {{order.reserve_simple.begin_time}}</view>
<view wx:else>{{order.address.address}}</view>
</view>
<view class="title">
<view class="h4 textright">
共 {{order.goods_total}} {{ detailUrl == 'HotelOrderDetail' ? '个房间' : '件商品' }} 实付:{{language['money']}}
<text class="b">{{order.price}}</text>
</view>
</view>
<view class="CharitableFund" wx:if="{{order.charity_fund_money && order.charity_fund_money!=0}}" style="color:red;padding-left:25rpx;padding-bottom:20rpx;background:#fff;">
慈善基金捐赠总额{{order.charity_fund_money}}元
</view>
<view class="exchange_order_box" wx:if="{{order.ys_exchange_order_id}}" data-orderid="{{order.ys_exchange_order_id}}" bindtap="goOrderdetail">
<view>{{ order.status == 3 ? "已换货" : "换货中" }},点击查看原订单</view>
<i class="iconfont icon-advertise-next"></i>
</view>
<view class="allbt" wx:if="{{order.button_models.length > 0 && orderType != 'stock'}}">
<view class="span red-button" wx:if="{{(order.status == 2 || order.status == 3) && order.camilo_resources_coupon_type == 2}}" data-item="{{ {value:140,api:1} }}" data-order="{{order}}" catchtap="operation" style="position: relative;" >
卡券信息
</view>
<block wx:for="{{order.button_models}}" wx:for-index="butidx" wx:key="butidx" wx:for-item="item">
<!--只有一个的情况-->
<view wx:if="{{butidx < 1}}" data-orderidx="{{orderidx}}" data-item="{{item}}" data-order="{{order}}" catchtap="operation" style="position: relative;" class="span {{!item.api ? 'noClickBG' : ''}} {{item.value == 1 ? 'red-button' : ''}}">
{{item.name}}
<button wx:if="{{item.value==41 && !item.api}}" style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="contact" session-from="weapp"></button>
</view>
<!--只有两个的情况-->
<view wx:if="{{butidx == 1 && order.button_models.length == 2}}" data-orderidx="{{orderidx}}" data-item="{{item}}" data-order="{{order}}" catchtap="operation" style="position: relative;" class="span {{!item.api ? 'noClickBG' : ''}} {{item.value == 1 ? 'red-button' : ''}}">
{{item.name}}
<button wx:if="{{item.value==41}}" style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="contact" session-from="weapp"></button>
</view>
<!--两个以上的情况-->
<view wx:if="{{butidx == 1 && order.button_models.length > 2}}" data-orderidx="{{orderidx}}" data-order="{{order}}" catchtap="showMore" style="position: relative;" class="span red-button">
更多
</view>
<view class="trans" wx:if="{{butidx == 1 && showID == order.order_sn && order.button_models.length > 2}}"></view>
<view class="more-button" wx:if="{{butidx == 1 && showID == order.order_sn && order.button_models.length > 2}}">
<view wx:for="{{order.button_models}}" wx:for-item="btn" wx:if="{{i >= 1}}" wx:for-index="i" wx:key="i" data-orderidx="{{orderidx}}" data-item="{{btn}}" data-order="{{order}}" catchtap="operation" class="p {{!item.api ? 'noClickBG' : ''}}" style="position: relative;">
{{btn.name}}
<button wx:if="{{btn.value==41 && !item.api}}" style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="contact" session-from="weapp"></button>
</view>
</view>
</block>
</view>
<!-- 存货订单 -->
<view class="allbtStock" wx:if="{{orderType == 'stock'}}">
<view class="leftTime">{{order.inventory_time}}</view>
<view class="rightAll">
<block wx:for="{{order.button_models}}" wx:for-index="butidx" wx:key="butidx" wx:for-item="item">
<view class="span {{!item.api ? 'noClickBG' : ''}} {{item.value == 1 ? 'red-button' : ''}}" data-orderidx="{{orderidx}}" data-item="{{item}}" data-order="{{order}}" catchtap="operation" style="position: relative;" wx:if="{{item.value == 'inventory_cancel'}}">{{item.name}}</view>
</block>
</view>
</view>
</view>
</van-checkbox-group>
<!-- 确认发货弹出的dialog -->
<van-dialog use-slot async-close show="{{dialogVisible}}" show-cancel-button bind:close="sendGoogs">
<view catchtouchmove="noop" class="sendgood">
<view class="h4">确认发货</view>
<view class="addmessage" wx:if="{{addresseeInfo && jurisdiction_set != 1}}">
<view class="title">收件人信息:</view>
<view class="content">
<view class="top">
<text class="span">收件人:{{addresseeInfo.realname}}</text>
<text class="span">({{addresseeInfo.mobile}})</text>
</view>
<view class="bottom">收货地址:{{addresseeInfo.address}}</view>
</view>
</view>
<view class="delivery">
<view class="left">快递公司:</view>
<view class="right">
<view class="button" catchtap="seleRegional">{{regional}}</view>
</view>
</view>
<view class="deliveryinp">
<view class="left">快递单号:</view>
<view class="right">
<van-field value="{{numberName}}" placeholder="请输入快递单号" border="{{false}}" bind:inp="numberNamebtn" />
</view>
</view>
</view>
</van-dialog>
<!-- 选择快递 -->
<van-popup show="{{dateshow_1}}" position="bottom" z-index='{{2000}}'>
<view>
<van-search placeholder="请输入快递公司名称" input-align="center" bind:change="filterExpressCompany" value="{{ inputExpressCompanyName }}" />
<van-picker default-index="expressCompanyDefaultIndex" show-toolbar="{{true}}" columns="{{ filterExpressCompanys.length>0?filterExpressCompanys:columns }}" bind:cancel="onCancelbtn" bind:confirm="onConfirmbtn" />
</view>
</van-popup>
<!-- 发货失败上拉弹出 -->
<van-popup show="{{ sendGoogsFail.show }}" position="bottom" z-index='{{ 2000 }}' bind:click-overlay="colseSendGoogsFailPopup">
<view class="send-googs-fail">
<view class="title">提示</view>
<view class="msg">{{ sendGoogsFail.msg }}</view>
<view class="confirm" bindtap="colseSendGoogsFailPopup">确认</view>
</view>
</van-popup>
<!-- -->
<van-popup show="{{showQrcode}}" position="bottom" z-index='{{2000}}' bind:click-overlay="onClose">
<view class="qrcodeClass">
<image src="{{qrcode_url}}" mode='widthFix'></image>
<text>请核销员扫码核销</text>
</view>
</van-popup>
</block>
<block wx:else>
<view class="nomessage">没有更多了</view>
</block>
<van-dialog use-slot title="易货兑换" show="{{ showBarter }}" show-cancel-button bind:confirm='confirmBarter' bind:close="cancelBarter" confirm-button-text='兑换' class="barter_dialog">
<view class="barter_dialog_1">是否确认易货兑换</view>
<view class="barter_dialog_2">该商品可兑换易货值为{{ showBarter_value }}</view>
</van-dialog>
<van-overlay show="{{blindBoxInfo.show}}" bind:click="blindBoxInfoTap">
<view style="display: flex; align-items: center; justify-content: center; height: 100%;">
<view class="blindBoxInfo" wx:if="{{blindBoxInfo.show}}">
<view class="multipleWrapper">
<view class="desc">盲盒商品</view>
<view class="goodsWrapper">
<block wx:for="{{blindBoxInfo.goods}}" wx:key="index" >
<view class="goodsItem">
<view class="goodInfo">
<view class="c1">{{item.order_sn}}</view>
<view class="c2">{{item.status_name}}</view>
</view>
<view class="goodContent" wx:for="{{item.has_many_order_goods}}" wx:key="ind" wx:for-item='item1' catchtap="goOrderList" data-item="{{item}}">
<view class="goods_img">
<image src="{{item1.thumb}}" alt="" />
</view>
<view class="content">
<view class="name">{{item1.title}}</view>
<view class="price">{{item1.goods_option_title}}</view>
</view>
</view>
</view>
</block>
</view>
</view>
<view class="close" catchtap="blindBoxInfoTap">
<icon class="iconfont icon-adsystem_icon_cancle" ></icon>
</view>
</view>
</view>
</van-overlay>
<van-popup show="{{refundShow}}" position="bottom" custom-style="height: 50%;" round closeable bind:close="onCloseRefundShow">
<view class="refundShow-box">
<view class="popup-title">关闭原因</view>
<view class="popup-context">{{ refundText }}</view>
</view>
</van-popup>
<!-- 申请存货的dialog -->
<van-dialog use-slot title="请选择" show="{{inventoryApplyPopup}}" show-cancel-button bind:confirm="confirmInventoryApply" class="inventory-apply-popup">
<view class="content">
<van-radio-group value="{{inventoryApplyRadio}}" bind:change="onChangeInventoryApplyRadio">
<van-radio custom-class='inventory-apply-radio' name="{{item.id}}" wx:for="{{inventoryApplyList}}" wx:key="{{item.id}}" checked-color="#ee0a24">{{ item.name }}</van-radio>
</van-radio-group>
</view>
</van-dialog>
<view catchtouchmove>
<van-dialog
use-slot
title="{{custom_receipt_confirmation_btn.name}}"
show="{{ custom_receipt_confirmation_show }}"
show-cancel-button
bind:confirm="CustomReceiptConfirmationSend"
bind:close="onClose">
<view class="custom_receipt_confirmation_html">
<scroll-view style="max-height:640rpx" scroll-y="{{true}}">
<mp-html content="{{custom_receipt_confirmation_html}}"></mp-html>
</scroll-view>
</view>
</van-dialog>
</view>