<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <!--Header S-->
    <link href="/assets/css/printPacking.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" onclick="CloseFancyBox()" value="關閉" class="floatright" />
    </div>
    <div class="page" v-for="packingObj in list">
        <div v-for="n in 2" :class="packingObj.pageCss">
            <div v-if="packingObj.enPackingType == 100">
                <div class="pagetitle">
                    <h2 class="text-center"><span>{{packingTitle}} 出貨單</span></h2>
                    <div class="payinfo" v-if="packingObj.orderObj.enRentedFor == 100 && packingObj.orderObj.enSource != 200">
                        <h3>{{packingObj.orderObj.payMethodString}}，{{packingObj.orderObj.paymentStatusString}}</h3>
                    </div>
                </div>
                <h3 class="floatleft" v-if="packingObj.shippingDate == null">預計出貨日: {{packingObj.scheduleDate}}</h3>
                <h3 class="floatleft" v-else>出貨日: {{packingObj.shippingDate}}</h3>
                <div class="floatright">
                    <h3 class="cash-on-delivery" v-if="packingObj.orderObj.enSource != 200 && packingObj.orderObj.enPayMethod == 300">
                        <strong>下貨收現</strong>
                        <label> {{packingObj.orderObj.total.toLocaleString()}}</label>
                    </h3>
                    <h3 class="cash-on-delivery" v-else-if="packingObj.orderObj.enSource == 200 && packingObj.orderObj.codFee > 0">
                        <strong>下貨收現{{packingObj.orderObj.codInfo}}</strong>
                        <label> {{packingObj.orderObj.codFee.toLocaleString()}}</label>
                    </h3>
                </div>
                <div class="clearfix"></div>
                <h4 class="floatleft">出貨單號: {{packingObj.packingNum}}</h4>
                <div class="floatleft">訂單編號: {{packingObj.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-packing">
                    <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>
                                <td v-show="packingObj.orderObj.enRentedFor == 100" class="text-center">租金</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodConsumableFee" class="text-right">耗材</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100" class="text-right">押金</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodFreight" class="text-right">運費</td>
                                <td>耗材/配件</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in packingObj.orderObj.details.list">
                                <td class="text-center">{{index + 1}}</td>
                                <td class="text-center"><img class="img" :src="item.coverImage" /></td>
                                <td>
                                    <div>{{item.productCode}}<div v-if="item.seatWidthAttrId != null && item.seatWidthAttrId > 0" class="nobr">座寬: {{item.seatWidthAttrName}}</div></div>
                                    <div><span class="stockitem" v-for="(stock, idx) in item.stocks"><span v-if="idx > 0">、</span><span class="nobr">{{stock.propertyNo}}</span></span></div>

                                    <ul class="subdetail" v-show="item.ltSupplies != null && item.ltSupplies.length > 0">
                                        <!--<li>加租：</li>-->
                                        <li v-for="sub in item.ltSupplies">
                                            <img class="img" :src="sub.coverImage" v-if="sub.coverImage != null && sub.coverImage.length > 0" />
                                            <div class="desc">
                                                <div>
                                                    {{sub.productCode}}
                                                    <span v-show="sub.unitPrice > 0">
                                                        ${{sub.unitPrice.toLocaleString()}}
                                                        <span v-if="item.periodQty > 1">x {{item.periodQty}}{{item.periodTypeString.substr(0,1)}}</span>
                                                        <span v-if="sub.qty > 1"> x {{sub.qty}}</span>
                                                    </span>
                                                </div>
                                                <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.ltAdditions != null && item.ltAdditions.length > 0">
                                        <!--<li>加購：</li>-->
                                        <li v-for="sub in item.ltAdditions">
                                            <img class="img" :src="sub.coverImage" v-if="sub.coverImage != null && sub.coverImage.length > 0" />
                                            <div class="desc">
                                                <div>
                                                    {{sub.productCode}}
                                                    <span v-show="sub.unitPrice > 0">${{sub.unitPrice.toLocaleString()}}<span v-if="sub.qty > 1"> x {{sub.qty}}</span></span>
                                                </div>
                                                <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 class="text-right">{{item.qty}}</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100" class="text-right nobr">{{item.unitPrice.toLocaleString()}} x {{item.periodQty}}{{item.periodTypeString.substr(0,1)}}</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodConsumableFee" class="text-right">{{item.consumableFee.toLocaleString()}}</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100" class="text-right">{{item.deposit.toLocaleString()}}</td>
                                <td v-show="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodFreight" class="text-right">{{item.freightage.toLocaleString()}}</td>
                                <td>
                                    <ul class="subdetail" v-show="item.ltGifts != null && item.ltGifts.length > 0">
                                        <!--<li>耗材：</li>-->
                                        <li v-for="sub in item.ltGifts" class="nobr">
                                            <img class="img" :src="sub.coverImage" v-if="sub.coverImage != null && sub.coverImage.length > 0" />
                                            <div class="desc">
                                                <div>{{sub.productCode}}<span v-if="sub.qty > 1"> x {{sub.qty}}</span></div>
                                                <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>組合內容：</li>-->
                                        <li v-for="sub in item.ltBundles" class="nobr">
                                            <img class="img" :src="sub.coverImage" v-if="sub.coverImage != null && sub.coverImage.length > 0" />
                                            <div class="desc">
                                                {{sub.productCode}}<span v-if="sub.qty > 1"> x {{sub.qty}}</span><br />
                                                <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>
                                    <div v-if="(item.ltGifts == null || item.ltGifts.length == 0) && (item.ltBundles == null || item.ltBundles.length == 0)">--</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="tab-packing border">
                    <div class="tab-rentinfo">
                        <div class="x_title">
                            <h4>使用人資訊</h4>
                        </div>
                        <div class="receiverinfo">
                            <div v-if="packingObj.orderObj.enRentedFor == 100">{{packingObj.orderObj.delivery.receiver}}　{{packingObj.orderObj.delivery.mobile}}</div>
                            <div v-if="packingObj.orderObj.enRentedFor == 200">門市展示 <i class="fas fa-store"></i></div>
                            <div v-if="packingObj.orderObj.enRentedFor == 100 && packingObj.orderObj.enType == 100"><i class="fas fa-angle-right"></i> {{packingObj.orderObj.shippingMethodString}} <i class="fas fa-angle-left"></i></div>
                            <div v-if="packingObj.orderObj.enShippingMethod == 100">
                                <div v-for="item in ltStores" v-if="packingObj.orderObj.delivery.storeId == 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="packingObj.orderObj.enShippingMethod == 200">{{packingObj.orderObj.delivery.county}}{{packingObj.orderObj.delivery.city}}{{packingObj.orderObj.delivery.address}}</div>
                            <div class="memo" v-if="packingObj.orderObj.remark != null && packingObj.orderObj.remark != ''" v-html="packingObj.orderObj.remark.replace(/\n/g,'<br />')"></div>
                        </div>
                    </div>
                    <div class="tab-feeinfo" v-if="packingObj.orderObj.enRentedFor == 100">
                        <div class="x_title">
                            <h4>費用資訊</h4>
                        </div>
                        <ul class="fee">
                            <li v-if="packingObj.orderObj.enRentedFor == 100">
                                <label>輔具租金</label>
                                <div>{{packingObj.orderObj.details.subTotal.toLocaleString()}}</div>
                            </li>
                            <li v-if="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodConsumableFee">
                                <label>耗材費</label>
                                <div>{{packingObj.orderObj.details.consumableFee.toLocaleString()}}</div>
                            </li>
                            <li v-if="packingObj.orderObj.enRentedFor == 100">
                                <label>輔具押金</label>
                                <div>{{packingObj.orderObj.details.deposit.toLocaleString()}}</div>
                            </li>
                            <li v-if="packingObj.orderObj.enRentedFor == 100 && !packingObj.orderObj.details.isCodFreight">
                                <label>輔具運費</label>
                                <div>{{packingObj.orderObj.details.freightage.toLocaleString()}}</div>
                            </li>
                            <li v-if="packingObj.orderObj.enRentedFor == 100 && (packingObj.orderObj.details.suppliesTotal + packingObj.orderObj.details.additionsTotal > 0)">
                                <label>加租/購合計</label>
                                <div>{{(packingObj.orderObj.details.suppliesTotal + packingObj.orderObj.details.additionsTotal).toLocaleString()}}</div>
                            </li>
                            <li class="totalprice" v-if="packingObj.orderObj.enRentedFor == 100">
                                <label>總計</label>
                                <div>{{packingObj.orderObj.details.total.toLocaleString()}}</div>
                            </li>
                        </ul>
                    </div>
                    <div class="tab-sign">
                        <h3>客戶簽收：</h3>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div v-else-if="packingObj.enPackingType == 200">
                <div class="pagetitle">
                    <h2 class="text-center"><span>{{packingObj.oemOrderObj.oemMarketName}}委託佳醫代送 出貨單</span></h2>
                </div>
                <h3 class="floatleft" v-if="packingObj.shippingDate == null">預計出貨日: {{packingObj.scheduleDate}}</h3>
                <h3 class="floatleft" v-else>出貨日: {{packingObj.shippingDate}}</h3>
                <div class="clearfix"></div>
                <h4 class="floatleft">出貨單號: {{packingObj.packingNum}}</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-packing">
                    <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 packingObj.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 class="nobr">{{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-packing border">
                    <div class="tab-rentinfo oem">
                        <div class="x_title">
                            <h4>收件人資訊</h4>
                        </div>
                        <div class="receiverinfo">
                            <div>{{packingObj.oemOrderObj.delivery.receiver}}　{{packingObj.oemOrderObj.delivery.mobile}}</div>
                            <div>{{packingObj.oemOrderObj.delivery.county}}{{packingObj.oemOrderObj.delivery.city}}{{packingObj.oemOrderObj.delivery.address}}</div>
                        </div>
                        <div class="memo" v-if="packingObj.memo != null && packingObj.memo != ''" v-html="packingObj.memo.replace(/\n/g,'<br />')"></div>
                    </div>
                    <div class="tab-sign">
                        <h3>客戶簽收：</h3>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div v-else-if="packingObj.enPackingType == 300">
                <div class="pagetitle">
                    <h2 class="text-center"><span>{{packingTitle}} 出貨單</span></h2>
                    <div class="payinfo">
                        <h3>{{packingObj.saleOrderObj.payMethodString}}，{{packingObj.saleOrderObj.paymentStatusString}}</h3>
                    </div>
                </div>
                <h3 class="floatleft" v-if="packingObj.shippingDate == null">預計出貨日: {{packingObj.scheduleDate}}</h3>
                <h3 class="floatleft" v-else>出貨日: {{packingObj.shippingDate}}</h3>
                <div class="floatright">
                    <h3 class="cash-on-delivery" v-if="packingObj.saleOrderObj.enPayMethod == 300">
                        <strong>下貨收現</strong>
                        <label> {{packingObj.saleOrderObj.totalPrice.toLocaleString()}}</label>
                    </h3>
                </div>
                <div class="clearfix"></div>
                <h4 class="floatleft">出貨單號: {{packingObj.packingNum}}(銷售)</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-packing">
                    <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-right">售價</td>
                                <td class="text-right">數量</td>
                                <td>產編</td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item, index) in packingObj.saleOrderObj.list">
                                <td class="text-center">{{index + 1}}</td>
                                <td class="text-center"><img class="img" :src="item.coverImage" /></td>
                                <td>{{item.productName}}</td>
                                <td class="nobr">{{item.productCode}}</td>
                                <td>
                                    <div v-if="item.seatWidthAttrId != null && item.seatWidthAttrId > 0">{{item.seatWidthAttrName}}</div>
                                </td>
                                <td class="text-right">{{item.unitPrice.toLocaleString()}}</td>
                                <td class="text-right">{{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-packing border">
                    <div class="tab-rentinfo">
                        <div class="x_title">
                            <h4>收件人資訊</h4>
                        </div>
                        <div class="receiverinfo">
                            <div>{{packingObj.saleOrderObj.delivery.receiver}}　{{packingObj.saleOrderObj.delivery.mobile}}</div>
                            <div>{{packingObj.saleOrderObj.delivery.county}}{{packingObj.saleOrderObj.delivery.city}}{{packingObj.saleOrderObj.delivery.address}}</div>
                        </div>
                        <div class="memo" v-if="packingObj.memo != null && packingObj.memo != ''" v-html="packingObj.memo.replace(/\n/g,'<br />')"></div>
                    </div>
                    <div class="tab-feeinfo">
                        <div class="x_title">
                            <h4>費用資訊</h4>
                        </div>
                        <ul class="fee">
                            <li>
                                <label>售價</label>
                                <div>{{packingObj.saleOrderObj.totalPrice.toLocaleString()}}</div>
                            </li>
                            <li class="totalprice">
                                <label>總計</label>
                                <div>{{packingObj.saleOrderObj.totalPrice.toLocaleString()}}</div>
                            </li>
                        </ul>
                    </div>
                    <div class="tab-sign">
                        <h3>客戶簽收：</h3>
                    </div>
                    <div class="clearfix"></div>
                </div>

            </div>
            <div class="clearfix"></div>
            <div class="floatleft" v-if="packingObj.enPackingType == 100 && packingObj.orderObj.enSource == 200">{{packingObj.orderObj.ownerStoreName}}</div>
            <div class="floatright printtime">{{(new Date()).format("yyyy/MM/dd HH:mm:ss")}} 列印</div>
            <div v-if="packingObj.pageCss == 'a4'" class="newpage"></div>
            <div v-else-if="packingObj.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" onclick="CloseFancyBox()" value="關閉" class="floatright" />
    </div>
    <div class="print-action float">
        <input type="button" onclick="print();" value="列印" /><br />
        <input type="button" onclick="CloseFancyBox()" value="關閉" class="floatright" />
    </div>
    <!--Content E-->
    <!--FinalScript S-->
    <script src="@packingDetail.js" type="module"></script>
    <!--FinalScript E-->
</body>
</html>