|  |  |  | 
|---|
|  |  |  | <meta http-equiv="Cache-Control" content="no-siteapp"/> | 
|---|
|  |  |  | <LINK rel="Bookmark" href="../images/favicon.ico"> | 
|---|
|  |  |  | <!-- 本框架基本脚本和样式 --> | 
|---|
|  |  |  | <script type="text/javascript" | 
|---|
|  |  |  | th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" | 
|---|
|  |  |  | th:src="@{/js/systools/MBase.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> | 
|---|
|  |  |  | <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/function/vip.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/function/meiduCommon.js}"></script> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | .ibox-content { | 
|---|
|  |  |  | background-color: rgba(240, 242, 245, 1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .order-info p { | 
|---|
|  |  |  | line-height: 30px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  | <div class="ibox-content"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <form class="form-horizontal" id="dataform" | 
|---|
|  |  |  | onsubmit="javascripr:return false;"> | 
|---|
|  |  |  | <div class="panel panel-default"> | 
|---|
|  |  |  | <div class="panel-heading"><strong th:text="'服务单金额:'+${obj.money}"></strong></div> | 
|---|
|  |  |  | <table class="table table-bordered table-striped " | 
|---|
|  |  |  | style="width: 100%;" id="mgrid"> | 
|---|
|  |  |  | <thead> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <th>项目名称</th> | 
|---|
|  |  |  | <th width="50px">服务时长</th> | 
|---|
|  |  |  | <th>服务时间</th> | 
|---|
|  |  |  | <th width="300px">美疗师</th> | 
|---|
|  |  |  | <th width="100px">提成</th> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </thead> | 
|---|
|  |  |  | <tbody> | 
|---|
|  |  |  | <tr th:each="item,st:${obj.serviceItems}"> | 
|---|
|  |  |  | <th th:text="${item.projInfo?.name}"></th> | 
|---|
|  |  |  | <th th:text="${item.projInfo?.timeLength+'分钟'}"></th> | 
|---|
|  |  |  | <th> | 
|---|
|  |  |  | <span th:text="${#dates.format(item.beginTime, 'yyyy-MM-dd HH:mm')}"></span> | 
|---|
|  |  |  | —— | 
|---|
|  |  |  | <span th:text="${#dates.format(item.endTime, 'yyyy-MM-dd HH:mm')}"></span> | 
|---|
|  |  |  | </th> | 
|---|
|  |  |  | <th th:text="${item.beautiStaffInfo?.suName}"></th> | 
|---|
|  |  |  | <th th:text="${item.extract}"></th> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </tbody> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div style="border-radius:5px; background:#F5F5F5;padding:10px 0;"> | 
|---|
|  |  |  | <div class="form-group"> | 
|---|
|  |  |  | <div class="col-sm-11 "> | 
|---|
|  |  |  | <div class="row"> | 
|---|
|  |  |  | <label class="col-sm-1 control-label">会员姓名</label> | 
|---|
|  |  |  | <div class="col-sm-2 "> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${obj?.vipInfo.vipName }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-5 "> | 
|---|
|  |  |  | <label class="col-sm-3 control-label">会员编号</label> | 
|---|
|  |  |  | <div class="col-sm-9"> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${obj?.vipInfo.vipNo }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-4 "> | 
|---|
|  |  |  | <label class="col-sm-5 control-label">会员手机 </label> | 
|---|
|  |  |  | <div class="col-sm-7"> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${obj?.vipInfo.phone }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="form-group"> | 
|---|
|  |  |  | <div class="col-sm-11 "> | 
|---|
|  |  |  | <div class="row"> | 
|---|
|  |  |  | <label class="col-sm-1 control-label">床位安排</label> | 
|---|
|  |  |  | <div class="col-sm-2 "> | 
|---|
|  |  |  | <p th:each="item:${cw}" th:if="${obj.bedId eq item.id }" class="form-control-static" | 
|---|
|  |  |  | th:text="${item.bedName }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-5 "> | 
|---|
|  |  |  | <label class="col-sm-3 control-label">服务时间</label> | 
|---|
|  |  |  | <div class="col-sm-9"> | 
|---|
|  |  |  | <p class="form-control-static"> | 
|---|
|  |  |  | <span th:text="${#dates.format(obj.bedState?.startTime, 'yyyy-MM-dd HH:mm')}"></span> | 
|---|
|  |  |  | —— | 
|---|
|  |  |  | <span th:text="${#dates.format(obj.bedState?.endTime, 'yyyy-MM-dd HH:mm')}"></span> | 
|---|
|  |  |  | </p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="form-group"> | 
|---|
|  |  |  | <div class="col-sm-11 "> | 
|---|
|  |  |  | <div class="row"> | 
|---|
|  |  |  | <label class="col-sm-1 control-label">预约时间 </label> | 
|---|
|  |  |  | <div class="col-sm-2"> | 
|---|
|  |  |  | <p class="form-control-static"> | 
|---|
|  |  |  | <span th:text="${#dates.format(obj.yyTime, 'yyyy-MM-dd HH:mm')}"></span> | 
|---|
|  |  |  | </p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-5 "> | 
|---|
|  |  |  | <label class="col-sm-3 control-label">配料师</label> | 
|---|
|  |  |  | <div class="col-sm-10" th:each="item:${yls}" th:if="${obj.doctorId eq item.id }"> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${item.staffName }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="col-sm-4 "> | 
|---|
|  |  |  | <label class="col-sm-5 control-label">备注 </label> | 
|---|
|  |  |  | <div class="col-sm-7"> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${obj?.remark }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="form-group"> | 
|---|
|  |  |  | <div class="col-sm-11 "> | 
|---|
|  |  |  | <div class="row"> | 
|---|
|  |  |  | <label class="col-sm-1 control-label">备注 </label> | 
|---|
|  |  |  | <div class="col-sm-10"> | 
|---|
|  |  |  | <p class="form-control-static" th:text="${obj?.remark }"></p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <input autocomplete="off" type="hidden" id="serviceId" th:value="${obj.id}"> | 
|---|
|  |  |  | <div class="form-group "> | 
|---|
|  |  |  | <div class="col-sm-12 text-center">    | 
|---|
|  |  |  | <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a>      | 
|---|
|  |  |  | <button onclick="MTools.closeForm()" class="btn btn-danger radius" type="button">关闭</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </form> | 
|---|
|  |  |  | <div class="ibox-content" id="app"> | 
|---|
|  |  |  | <el-container> | 
|---|
|  |  |  | <el-header style="height: 210px; background-color: white; margin: 15px;"> | 
|---|
|  |  |  | <el-row style="line-height: 60px; padding-top: 20px;"> | 
|---|
|  |  |  | <el-col :span="1" style="font-size: 40px; color:#409EFF;"> | 
|---|
|  |  |  | <i class="el-icon-s-order" type="primary"></i> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="10"> | 
|---|
|  |  |  | <h1 style="line-height: 60px; margin: 0 0;">服务单号:{{serviceOrderInfo.serviceNo}}</h1> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="5" style="float: right; margin-right: 10px;"> | 
|---|
|  |  |  | <el-button type="info" @click="printf">打印</el-button> | 
|---|
|  |  |  | <!--                    <el-button type="primary">划扣</el-button>--> | 
|---|
|  |  |  | <el-button type="danger" @click="toBack">返回</el-button> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row class="order-info" type="flex" justify="space-around"  style="height: 150px; padding: 30px 30px;"> | 
|---|
|  |  |  | <el-col :span="5"> | 
|---|
|  |  |  | <p>会员姓名:{{serviceOrderInfo.vipInfo.vipName}}</p> | 
|---|
|  |  |  | <p>会员电话:{{serviceOrderInfo.vipInfo.phone}}</p> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="5"> | 
|---|
|  |  |  | <p>会员编号:{{serviceOrderInfo.vipInfo.vipNo}}</p> | 
|---|
|  |  |  | <p>床位安排:{{bedFormat()}}</p> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="6"> | 
|---|
|  |  |  | <p>服务时间:<span v-if="serviceOrderInfo.bedState != null">{{dateFormat(serviceOrderInfo.bedState.startTime)}} - {{dateFormat(serviceOrderInfo.bedState.endTime)}}</span></p> | 
|---|
|  |  |  | <p>预约时间:{{dateFormat(serviceOrderInfo.yyTime)}}</p> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="3"> | 
|---|
|  |  |  | <p>配料师:{{pylFormat()}}</p> | 
|---|
|  |  |  | <p>备注:{{serviceOrderInfo.remark}}</p> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-header> | 
|---|
|  |  |  | <el-main style="background-color: white; margin: 15px; padding: 20px 30px;"> | 
|---|
|  |  |  | <el-tabs v-model="tabName" @tab-click="handleClick"> | 
|---|
|  |  |  | <el-tab-pane label="服务单" name="serviceOrder"> | 
|---|
|  |  |  | <el-table :data="tableData" | 
|---|
|  |  |  | style="width: 100%"> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="projInfo.name" | 
|---|
|  |  |  | label="商品名称" | 
|---|
|  |  |  | width="280"> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="projInfo.timeLength" | 
|---|
|  |  |  | label="服务时长" | 
|---|
|  |  |  | width="200"> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="服务时间" :formatter="serviceTime"> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="beautiStaffInfo.suName" | 
|---|
|  |  |  | label="美疗师" | 
|---|
|  |  |  | width="200"> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="extract" | 
|---|
|  |  |  | label="提成" | 
|---|
|  |  |  | width="200"> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | </el-tab-pane> | 
|---|
|  |  |  | </el-tabs> | 
|---|
|  |  |  | </el-main> | 
|---|
|  |  |  | </el-container> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/plugin/LodopFuncs.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
|---|
|  |  |  | <script type="text/javascript"> | 
|---|
|  |  |  | <script type="text/javascript" th:inline="javascript"> | 
|---|
|  |  |  | //<![CDATA[ | 
|---|
|  |  |  | var app = new Vue({ | 
|---|
|  |  |  | el : "#app", | 
|---|
|  |  |  | data : { | 
|---|
|  |  |  | serviceOrderInfo : "", | 
|---|
|  |  |  | tabName : "serviceOrder", | 
|---|
|  |  |  | tableData : [], | 
|---|
|  |  |  | bedList : [], | 
|---|
|  |  |  | plsList : [] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created :function () { | 
|---|
|  |  |  | this.bedList = /*[[${cw}]]*/ | 
|---|
|  |  |  | this.serviceOrderInfo = /*[[${obj}]]*/ | 
|---|
|  |  |  | this.tableData = this.serviceOrderInfo.serviceItems; | 
|---|
|  |  |  | this.plsList = /*[[${yls}]]*/ | 
|---|
|  |  |  | console.log(this.plsList); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods : { | 
|---|
|  |  |  | handleClick() {}, | 
|---|
|  |  |  | dateFormat(time) { | 
|---|
|  |  |  | return moment(time).format("YYYY-MM-DD HH:mm"); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | bedFormat() { | 
|---|
|  |  |  | if (this.bedList.length < 0) { | 
|---|
|  |  |  | return "-"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var beds = this.bedList; | 
|---|
|  |  |  | var bedId = this.serviceOrderInfo.bedId; | 
|---|
|  |  |  | if (!bedId) { | 
|---|
|  |  |  | return "-"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for(var i = 0; i < beds.length; i++) { | 
|---|
|  |  |  | if (beds[i].id == bedId) { | 
|---|
|  |  |  | return beds[i].bedName; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | pylFormat() { | 
|---|
|  |  |  | if (!this.plsList) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var plsList = this.plsList; | 
|---|
|  |  |  | var doctorId = this.serviceOrderInfo.doctorId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for(var i = 0; i < plsList.length; i++) { | 
|---|
|  |  |  | if (plsList[i].id = doctorId) { | 
|---|
|  |  |  | return plsList[i].staffName; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | printf() { | 
|---|
|  |  |  | var id = this.serviceOrderInfo.id; | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 2, | 
|---|
|  |  |  | title: "打印服务单", | 
|---|
|  |  |  | area: ['250px', '550px'], | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | content: [basePath + '/admin/redirect/hive/beautySalon/print-service?id=' + id] | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | toBack() { | 
|---|
|  |  |  | MTools.closeForm(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | serviceTime(row, column) { | 
|---|
|  |  |  | console.log(column); | 
|---|
|  |  |  | console.log(row); | 
|---|
|  |  |  | // if (!column.bedState) { | 
|---|
|  |  |  | //     return "-"; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | var startTime = this.dateFormat(row.beginTime); | 
|---|
|  |  |  | var endTime = this.dateFormat(row.endTime); | 
|---|
|  |  |  | return startTime + " - " + endTime; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | //]]> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function print() { | 
|---|
|  |  |  | var id = $("#serviceId").val(); | 
|---|
|  |  |  | layer.open({ | 
|---|