<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <!--Header S-->
    <link href="/assets/css/printRecycle.css?tf=202411131720" rel="stylesheet" />
    <!--Header E-->
</head>
<body>
    <!--Content S-->
    <div class="print-action block">
        <input type="button" onclick="print();" value="列印" />
        <span>〔列印設定〕紙張大小：A4, 邊界：最小值</span>
        <input type="button" @click="closeAndReloadParent();" value="關閉" class="floatright" />
    </div>
    <div class="page">
        <div v-for="n in 2" :class="recycleObj.pageCss">
            <div v-if="recycleObj.enRecycleType == 100">
                <div class="pagetitle">
                    <h2 class="text-center"><span>{{recycleTitle}} 回收單</span></h2>
                </div>
                <h3 class="floatleft">預計回收日: {{recycleObj.scheduleDate}}</h3>
                <div class="floatright">
                    <h3 class="cash-on-delivery" v-if="cashOnDelivery.charge != 0">
                        <strong>應{{cashOnDelivery.info}}</strong>
                        <label>${{cashOnDelivery.chargeAbs.toLocaleString()}}</label>
                    </h3>
                </div>
                <div class="clearfix"></div>
                <div class="clearfix"></div>
                <h4 class="floatleft">回收單號: {{recycleObj.recycleNum}}</h4>
                <div class="floatleft">訂單編號: {{recycleObj.orderObj.orderNum}}</div>
                <div class="floatright papertype" v-if="n == 1">第一聯 存根聯</div>
                <div class="floatright papertype" v-if="n == 2">第二聯 收執聯</div>
                <div class="clearfix"></div>
                <div class="tab-recycle">
                    <table border="0" cellpadding="5" cellspacing="1" class="table jambo_table">
                        <thead>
                            <tr>
                                <td class="text-center">#</td>
                                <td></td>
                                <td>輔具</td>
                                <td>座寬</td>
                                <td class="text-center">數量</td>
                                <td>產編</td>
                                <td v-if="recycleObj.orderObj.enSource != 200" class="text-right">押金</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in recycleObj.orderObj.details.list">
                                <td class="text-center">{{index + 1}}</td>
                                <td class="text-center"><img class="img" :src="item.coverImage" /></td>
                                <td>{{item.productCode}}</td>
                                <td>
                                    <div v-if="item.seatWidthAttrId != null && item.seatWidthAttrId > 0">{{item.seatWidthAttrName}}</div>
                                </td>
                                <td class="text-center">{{item.qty}}</td>
                                <td>
                                    <span class="stockitem" v-for="(stock, idx) in item.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span>
                                    <ul class="subdetail" v-show="item.ltGifts != null && item.ltGifts.length > 0">
                                        <li v-for="sub in item.ltGifts">
                                            <div class="desc">
                                                {{sub.productCode}}
                                                <span class="stockitem" v-for="(stock, idx) in sub.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span>
                                            </div>
                                        </li>
                                    </ul>
                                    <ul class="subdetail" v-show="item.ltBundles != null && item.ltBundles.length > 0">
                                        <li v-for="sub in item.ltBundles">
                                            <div class="desc">
                                                {{sub.productCode}}
                                                <span class="stockitem" v-for="(stock, idx) in sub.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span>
                                            </div>
                                        </li>
                                    </ul>
                                    <ul class="subdetail" v-show="item.ltSupplies != null && item.ltSupplies.length > 0">
                                        <li v-for="sub in item.ltSupplies">
                                            <div class="desc">
                                                {{sub.productCode}}
                                                <span class="stockitem" v-for="(stock, idx) in sub.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span>
                                            </div>
                                        </li>
                                    </ul>
                                </td>
                                <td v-if="recycleObj.orderObj.enSource != 200" class="text-right">{{item.deposit.toLocaleString()}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="tab-recycle" style="margin-top: 1mm;">
                    <table border="0" cellpadding="5" cellspacing="1" class="table jambo_table">
                        <thead>
                            <tr>
                                <td class="text-center">#</td>
                                <td>類型</td>
                                <td>說明</td>
                                <td class="text-right">費用</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in recycleObj.orderObj.others.list">
                                <td class="text-center">{{index + 1}}</td>
                                <td>{{item.typeString}}</td>
                                <td>
                                    <div v-if="item.enType == 100">{{item.shippingMethodString}}</div>
                                    <div v-else>{{item.description}}</div>
                                </td>
                                <td class="text-right">{{item.fee.toLocaleString()}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="tab-recycle border">
                    <div class="tab-rentinfo">
                        <div class="x_title">
                            <h4>使用人資訊</h4>
                        </div>
                        <div class="receiverinfo">
                            <div v-if="recycleObj.orderObj.enRentedFor == 100">{{recycleObj.receiver}}　{{recycleObj.mobile}}</div>
                            <div v-if="recycleObj.orderObj.enRentedFor == 200">門市展示 <i class="fas fa-store"></i></div>
                            <div v-if="recycleObj.orderObj.enRentedFor == 100"><i class="fas fa-angle-right"></i> {{recycleObj.shippingMethodString}} <i class="fas fa-angle-left"></i></div>
                            <div v-if="recycleObj.enShippingMethod == 100">
                                <div v-for="item in ltStores" v-if="recycleObj.recycleStoreId == item.id">
                                    <div>{{item.county}}{{item.city}}{{item.address}}</div>
                                    <i class="fas fa-caret-square-right"></i> {{item.shortName}}
                                </div>
                            </div>
                            <div v-else-if="recycleObj.enShippingMethod == 200">{{recycleObj.county}}{{recycleObj.city}}{{recycleObj.address}}</div>
                        </div>
                        <div class="memo" v-if="recycleObj.orderObj.remark != null && recycleObj.orderObj.remark != ''" v-html="recycleObj.orderObj.remark.replace(/\n/g,'<br />')"></div>
                    </div>
                    <div class="tab-feeinfo">
                        <div class="x_title">
                            <h4>費用資訊</h4>
                        </div>
                        <ul class="fee" v-show="cashOnDelivery.charge != 0">
                            <li v-if="recycleObj.orderObj.enSource != 200">
                                <label>押金</label>
                                <div>-{{recycleObj.orderObj.details.deposit.toLocaleString()}}</div>
                            </li>
                            <li v-if="recycleObj.orderObj.others.userBilling.freightage != 0">
                                <label>運費</label>
                                <div><span v-if="recycleObj.orderObj.others.userBilling.freightage > 0">+</span>{{recycleObj.orderObj.others.userBilling.freightage.toLocaleString()}}</div>
                            </li>
                            <li v-if="recycleObj.orderObj.others.userBilling.repair != 0">
                                <label>維修費</label>
                                <div><span v-if="recycleObj.orderObj.others.userBilling.repair > 0">+</span>{{recycleObj.orderObj.others.userBilling.repair.toLocaleString()}}</div>
                            </li>
                            <li class="totalprice"><label>總計</label><div>{{cashOnDelivery.charge.toLocaleString()}}</div></li>
                        </ul>
                    </div>
                    <div class="tab-sign">
                        <h3>客戶簽收：</h3>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div v-else-if="recycleObj.enRecycleType == 200">
                <div class="pagetitle">
                    <h2 class="text-center"><span>{{recycleObj.oemOrderObj.oemMarketName}}委託佳醫代收 回收單</span></h2>
                </div>
                <h3 class="floatleft">預計回收日: {{recycleObj.scheduleDate}}</h3>
                <div class="clearfix"></div>
                <h4 class="floatleft">回收單號: {{recycleObj.recycleNum}}</h4>
                <div class="floatright papertype" v-if="n == 1">第一聯 存根聯</div>
                <div class="floatright papertype" v-if="n == 2">第二聯 收執聯</div>
                <div class="clearfix"></div>
                <div class="tab-recycle">
                    <table border="0" cellpadding="5" cellspacing="1" class="table jambo_table">
                        <thead>
                            <tr>
                                <td class="text-center">#</td>
                                <td></td>
                                <td>輔具</td>
                                <td></td>
                                <td>尺寸</td>
                                <td class="text-center">數量</td>
                                <td>產編</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in recycleObj.oemOrderObj.list">
                                <td class="text-center">{{index + 1}}</td>
                                <td class="text-center"><img class="img" :src="item.coverImage" /></td>
                                <td>{{item.productName}}</td>
                                <td>{{item.productCode}}</td>
                                <td>
                                    <div v-if="item.seatWidthAttrId != null && item.seatWidthAttrId > 0">{{item.seatWidthAttrName}}</div>
                                </td>
                                <td class="text-center">{{item.qty}}</td>
                                <td>
                                    <span class="stockitem" v-for="(stock, idx) in item.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="tab-recycle border">
                    <div class="tab-rentinfo oem">
                        <div class="x_title">
                            <h4>收件人資訊</h4>
                        </div>
                        <div class="receiverinfo">
                            <div>{{recycleObj.receiver}}　{{recycleObj.mobile}}</div>
                            <div>{{recycleObj.county}}{{recycleObj.city}}{{recycleObj.address}}</div>
                        </div>
                        <div class="memo" v-if="recycleObj.memo != null && recycleObj.memo != ''" v-html="recycleObj.memo.replace(/\n/g,'<br />')"></div>
                    </div>
                    <div class="tab-sign">
                        <h3>客戶簽收：</h3>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div class="floatleft" v-if="recycleObj.enRecycleType == 100 && recycleObj.orderObj.enSource == 200">{{recycleObj.orderObj.ownerStoreName}}</div>
            <div class="floatright printtime">{{(new Date()).format("yyyy/MM/dd HH:mm:ss")}} 列印</div>
            <div v-if="recycleObj.pageCss == 'a4'" class="newpage"></div>
            <div v-else-if="recycleObj.pageCss == 'a5' && n == 2" class="newpage"></div>
        </div>
    </div>
    <div class="print-action block">
        <input type="button" onclick="print();" value="列印" />
        <span>〔列印設定〕紙張大小：A4, 邊界：最小值</span>
        <input type="button" @click="closeAndReloadParent();" value="關閉" class="floatright" />
    </div>
    <div class="print-action float">
        <input type="button" onclick="print();" value="列印" /><br />
        <input type="button" @click="closeAndReloadParent();" value="關閉" class="floatright" />
    </div>
    <!--Content E-->
    <!--FinalScript S-->
    <script src="@recycleDetail.js" type="module"></script>
    <!--FinalScript E-->
</body>
</html>