<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, width=device-width, user-scalable=no" />
    <meta name="format-detection" content="telephone=no,email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>品牌服务申请</title>
    <script src='javascript/components/flexible.js'></script>
    <link rel="stylesheet" href="style/share/reset.css">
    <link rel="stylesheet" href="style/share/weui.min.css">
    <link rel="stylesheet" href="style/share/jquery-weui.css">
    <link rel="stylesheet" href="style/share/datePicker.css">
    <link rel="stylesheet" href="style/page/common.css">
    <link rel="stylesheet" href="style/pageCss/brand-detail.css">
    <style>
        .weui-dialog__hd{
            padding: 0.1em 1.6em .5em !important;
        }
        .tempTextdoc{
            overflow: inherit;
            display: none;
        }
        .tempTextdoc .weui-dialog__title{
            font-size: 15px;
        }
        .tempTextdoc .weui-dialog__bd{
            text-align: left;
            color: #333333;
            height: 7rem;
            overflow: scroll;
            margin-bottom: 0.7rem;
            font-size: 13px;
        }
        .tempTextdoc .weui-dialog__ft{
            position: absolute;
            bottom: 0px;
            width:100%;
        }
        .pdt10{
            padding-top: 23px;
        }

        .weui-dialog__bd {
            padding: 0 1.6em .8em;
            min-height: 40px;
            font-size: 15px;
            line-height: 1.3;
            word-wrap: break-word;
            word-break: keep-all;
            color: #999;
        }
    </style>
</head>

<body>
<div class="container">
    <div class="weui-mask weui-mask--visible diymask" style="display: none"></div>
    <div class="content" id="maincontent">
        <header class="bg-white box-center-center" style="height: 1.25rem;"><img src="image/logo.png" alt="" style="width: 3.8438rem;"></header>
        <div class="fold-panel-wrap" id="formData">

        </div>

        <div class="foot flex foot-btn-box" id="operate" style="display: none;">
            <div class="btn flex-1" id="confirm">确认Confirm</div>
            <div class="btn flex-1" id="update">修改Update</div>
            <div class="btn flex-1" id="cancel">取消Cancel</div>
        </div>
        <div style="width: 1.0667rem;height: 1.0667rem;border-radius: 100%;position: fixed;z-index: 500;
    bottom: 5.9rem;right: 0.4rem" class="mark">
            <img src="image/brandApplyModal.png" style=" width: 100%;height: 100%;position: absolute;top:50%; left:50%;transform: translate(-50%,-50%)">
        </div>
    </div>
</div>
</body>

<script src='javascript/components/jquery-2.2.4.min.js'></script>
<script src="javascript/components/handlebars.min-latest.js"></script>
<script src="javascript/crypto-js-master/crypto-js.js"></script>
<script src="javascript/components/cryptomain.js"></script>
<script src='javascript/components/g.js'></script>
<script src='javascript/components/jquery-weui.js'></script>
<script src='javascript/components/niceClick.js'></script>
<script src='javascript/components/fastclick.js'></script>
<script src='https://res.wx.qq.com/open/js/jweixin-1.2.0.js'></script>
<script src='javascript/components/StringValidateUtils.js?vt=20171221'></script>
<script src='javascript/components/iscroll.js'></script>
<script src='javascript/components/datePicker.js'></script>
<script src="javascript/components/dateUtils.js"></script>
<script src='javascript/components/mcfApp.js'></script>
<script src='javascript/pages/wx-brand-detail.js?v=20200409'></script>

<!--表单模板-->
<script type="text/template" id="form-cell">

    <div class="fold-panel-item">
        {{#if_not_eq status '0'}}
        <div class="title-box" onclick="foldPanel(this)">工单编号 Application No.<br/>{{number}} <span class="fold-icon"></span></div>

        <div class="fold-panel-content-box">
            <form class="application-form-wrap" id="form-wrap" name="form">
                <div class="form-item-cell">
                    <p class="f13 label-text">工单状态Application status：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{statusStr}}" type="" id="status" name="status" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">设计预估费用 Estimated cost for design：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{estimateInternalCosts}}" type="" id="designCost" name="designCost" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">制作预估费用 Estimated cost for production：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{estimateExternalCosts}}" type="" id="productionCost" name="productionCost" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">预估总费用 Estimated cost in total：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{quotedPrice}}" type="" id="totalCost" name="totalCost" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">拟交付日期 Estimated delivery date：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{intendedDeliveryDateStr}}" type="" id="intendedDeliveryDate" name="delivery" placeholder="">
                    </div>
                </div>
            </form>
        </div>
        {{else}}
        <div class="title-box">工单编号 Application No.<br/>{{number}}</div>

        {{/if_not_eq}}
    </div>


    <br>
    <div class="fold-panel-item detail-panel">
        <div class="title-box" onclick="foldPanel(this)">工单详情 Application details <span class="fold-icon"></span></div>
        <div class="fold-panel-content-box">
            <form class="application-form-wrap" id="form-detail-wrap" name="form">
                <div class="form-item-cell">
                    <p class="f13 label-text">您的姓名 Your name：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{name}}" type="" id="name" name="name" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">您的邮箱Your email：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{email}}" type="" id="email" name="email" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">本次需求的入账成本中心<br/>Cost center allocated for your order：</p>
                    <div class="input-box form-input-input">
                        <input class="weui-input f14" readonly="" value="{{costCenter0}}" type="" id="cost0" name="cost0" placeholder="">
                        <span class="sq-line f14">-</span>
                        <input class="weui-input f14" readonly="" value="{{costCenter1}}" type="" id="cost1" name="cost1" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">所在部门 Division/Department：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{departmentName}}" type="" id="dept" name="dept" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">您的直属领导姓名 Line manager：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{lineManager}}" type="" id="manageName" name="manageName" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">您的直属领导邮箱 Your line manager’s email：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{lineManagerEmail}}" type="" id="manageEmail" name="manageEmail" placeholder="">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">是否需要制作 Printing/production is required or not：</p>
                    <div class="input-box form-switch">
                        <div class="weui-cell__ft">
                            {{#if isMake}}
                            <input class="weui-switch" readonly="" disabled="" type="checkbox" checked id="isProduction" name="isProduction" value="true">
                            {{else}}
                            <input class="weui-switch" readonly="" disabled="" type="checkbox"  id="isProduction" name="isProduction" value="false">

                            {{/if}}
                        </div>
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">您选择的需求类别 The category of requirements you choose：</p>
                    <div class="input-box form-input">
                        <input class="weui-input f14" readonly="" value="{{categoryName}}" type="" id="category" name="category" placeholder="">
                    </div>
                </div>
                {{#each details}}
                <div class="form-item-cell">
                    <div class="input-box form-checkBox">
                        <div class="check-box f14">
                            <div class="check-state-box">
                                 <span class="check-icon">
                                     <img src="data:image/png;base64, ">
                                 </span>
                                <span class="check-text" name="flyerText" id="flyerText" value="">{{materialName}}</span>
                            </div>
                            {{#if ../isMake}}
                            <div class="count-box weui-count">
                                {{quantity}}
                            </div>
                            {{/if}}
                        </div>
                    </div>
                </div>
                {{/each}}
                <div class="form-item-cell">
                    <p class="f13 label-text">您期望的交付日期 Expected delivery date：</p>
                    <div class="input-box form-date">
                        <input type="text" readonly="" class="f14" id="delivery" name="delivery" placeholder="请选择时间" value="{{deliveryDateStr}}">
                    </div>
                </div>
                <div class="form-item-cell">
                    <p class="f13 label-text">请说明需求用途 Please explain your purpose：</p>
                    <div class="input-box form-textarea">
                        <textarea class="weui-textarea f14" readonly="" id="explain" name="explain" placeholder="" rows="5">{{requireSpecify}}</textarea>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <br>
    <div class="bottom-tips" id="tips" style="display: none">
        <p>请确认预估费用和拟交付日期</p>
        <p>Please confirm the estimated cost and delivery date</p>
    </div>
</script>

<script>
    var devMode = G.devMode();
    var bindNextEvent = function (app) {
        new brandDetail({
            devMode: devMode,
            cfApp: app
        }).init();
    };
    var cfapp = new cfApp({
        devMode: devMode,
        initWxApi: false,
        nextAction: bindNextEvent,
        vt: new Date().getTime()
    });
    cfapp.init();
</script>

</html>