From ad31648c6f7a8bff1f7ccdf84b76006b9ffb78f8 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Sat, 17 Jul 2021 15:59:10 +0800
Subject: [PATCH] 1.	新增套餐中有效和无效的操作 2.	会员修改门店功能 3.	套餐新增编辑次数功能 4.	计算是否为赠送的条件为,全部为赠送金额购买且支付金额大于0 5.	打印小票功能调整间距,和收银人 6.	PC端服务单新增划扣金额展示

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html           |    2 
 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java                 |   22 +
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html               |    4 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html         |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html       |    2 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html        |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html |    2 
 zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java               |    4 
 zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html         |  219 ++++++++++++++++
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java        |    3 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html  |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html                   |   10 
 zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html          |  201 +++++++++++++++
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html           |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html      |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html        |    2 
 zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html              |   13 +
 zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml                         |   14 
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html       |  215 ----------------
 19 files changed, 489 insertions(+), 234 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
index 0ca6a5a..4e5e2cd 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -13,6 +13,7 @@
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.core.tools.excl.ExcelVersion;
 import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.dao.SysCompanyDao;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
 import com.matrix.system.hive.bean.*;
@@ -30,6 +31,7 @@
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -217,6 +219,26 @@
         return showList(sysOrder, pageVo);
     }
 
+    @Resource
+    SysCompanyDao companyDao;
+
+    /**
+     * 收款
+     */
+    @RequestMapping(value = "/printOrder")
+    public @ResponseBody
+    ModelAndView printOrder(SysOrder order) throws GlobleException {
+        ModelAndView mv = new ModelAndView("admin/hive/beautySalon/print-order");
+        SysUsers user=(SysUsers)WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+         String comRegisterCode = companyDao.selectById(user.getCompanyId()).getComRegisterCode();
+        if(StringUtils.isNotBlank(comRegisterCode)){
+            mv.addObject("page",comRegisterCode);
+        }else {
+            mv.addObject("page","taiyan");
+        }
+        return mv;
+    }
+
 
     /**
      * 收款
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
index acfe1fd..3aefd94 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
@@ -293,7 +293,9 @@
         } else {
             vipInfo.setVipState(Dictionary.VIP_STATE_HY);
             SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
-            vipInfo.setShopId(users.getShopId());
+            if(vipInfo.getShopId()==null){
+                vipInfo.setShopId(users.getShopId());
+            }
             return add(vipInfoService, vipInfo, "会员信息");
         }
     }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index a2e5b5e..adf9bcf 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -1392,7 +1392,8 @@
     private boolean isGiftMoneyPay(SysOrder order) {
         BusParameterSettings giftiIsfree = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_GIFTISFREE, order.getCompanyId());
         if(giftiIsfree.getParamValue().equals("是")){
-            return  order.getFlows().stream().allMatch(item -> SysOrderFlow.IS_GIFT_Y.equals(item.getIsGift()));
+            return  order.getFlows().stream().allMatch(item -> SysOrderFlow.IS_GIFT_Y.equals(item.getIsGift())
+                    && item.getAmount().doubleValue() >0D);
         }else{
             return false;
         }
diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
index df93edb..0daf98d 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
@@ -496,19 +496,19 @@
 	</update>
 
     <!-- 批量删除 -->
-    <delete id="deleteByIds" parameterType="java.util.List">
-        delete from sys_users where su_id in
+    <update id="deleteByIds" parameterType="java.util.List">
+        update  sys_users set su_valid='N' where su_id in
         <foreach collection="list" index="index" item="item" open="("
                  separator="," close=")">
             #{item}
         </foreach>
-    </delete>
+    </update>
 
     <!-- 根据id删除 -->
-    <delete id="deleteById" parameterType="Long">
-		DELETE FROM sys_users
-		where su_id=#{suId}
-	</delete>
+    <update id="deleteById" parameterType="Long">
+        update  sys_users set su_valid='N'
+        where su_id=#{suId}
+	</update>
 
     <!-- 根据对象删除 -->
     <delete id="deleteByModel" parameterType="Long">
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
index 185869e..021105c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
@@ -976,7 +976,7 @@
                     title: "打印订单",
                     area: ['250px', '550px'],
                     maxmin: true,
-                    content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
+                    content: [basePath + '/admin/order/printOrder?id=' + id]
                 });
             },
             handleClick() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html
index b39313f..8265278 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html
@@ -238,7 +238,7 @@
 						title: "打印订单",
 						area: ['250px', '550px'],
 						maxmin: true,
-						content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + this.order.id],
+						content: [basePath + '/admin/order/printOrder?id=' + this.order.id],
 						cancel: function (index, layero) {
 							_this.closeFram();
 						}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html
index 5c0925d..8f3bf53 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html
@@ -185,7 +185,7 @@
 				title: "打印订单",
 				area: ['250px', '550px'],
 				maxmin: true,
-				content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + loj.getResult().mapInfo.orderId],
+				content: [basePath + '/admin/order/printOrder?id=' + loj.getResult().mapInfo.orderId],
 				cancel: function (index, layer) {
 					if (parent.app) {
 						parent.app.vipInfoFn();
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
index d30d303..962a224 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -352,7 +352,7 @@
 						title: "打印订单",
 						area: ['250px', '550px'],
 						maxmin: true,
-						content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + this.order.id],
+						content: [basePath + '/admin/order/printOrder?id=' + this.order.id],
 						cancel: function (index, layero) {
 							_this.closeFram();
 						}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
index 6334706..bcd29c4 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -1350,7 +1350,7 @@
                         title: "打印订单",
                         area: ['250px', '550px'],
                         maxmin: true,
-                        content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + this.order.id],
+                        content: [basePath + '/admin/order/printOrder?id=' + this.order.id],
                         cancel: function (index, layero) {
                             _this.closeFram();
                         }
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html
index 69a0a76..17a9a67 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html
@@ -131,7 +131,7 @@
             title: "打印订单",
             area: ['250px', '550px'],
             maxmin: true,
-            content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
+            content: [basePath + '/admin/order/printOrder?id=' + id]
         });
     };
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html
index 1797130..864c76f 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html
@@ -161,7 +161,7 @@
             title: "打印订单",
             area: ['250px', '550px'],
             maxmin: true,
-            content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
+            content: [basePath + '/admin/order/printOrder?id=' + id]
         });
     };
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
index e5069f4..5ace9ce 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
@@ -996,7 +996,7 @@
                     title: "打印订单",
                     area: ['250px', '550px'],
                     maxmin: true,
-                    content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + id]
+                    content: [basePath + '/admin/order/printOrder?id=' + id]
                 });
             },
             handleClick() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html
index c5284e5..82fd01c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html
@@ -1,219 +1,6 @@
 <!DOCTYPE HTML>
 <html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="utf-8">
-    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
-    <meta name="renderer" content="webkit|ie-comp|ie-stand">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport"
-          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
-    <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>
-    <style>
 
-        .btn{
-            position: fixed;
-            bottom: 10px;
-            left: 45%;
-        }
+    <div th:include="'admin/hive/printTemplates/'+${page}::html" ></div>
 
-    </style>
-</head>
-<body>
-<div class="ibox-content" id="app">
-    <div id="print" style="width: 220px; ">
-        <h1   style="text-align: center;font-size: 18px;margin: 20px auto;">
-            {{order.shopName}}
-        </h1>
-        <table style="width: 100%; font-size:12px;line-height: 20px;">
-
-            <tr>
-                <td colspan="2">
-                    <b>订单号</b>:<span>{{order.orderNo}}</span>
-                </td>
-            </tr>
-            <tr>
-                <td colspan="2" >
-                    <b>客户</b>:<span>{{order.vipName}}</span>
-                </td>
-            </tr>
-            <tr>
-                <td colspan="2" >
-                    <b>消费日期</b>:<span>{{order.orderTime |format}}</span>
-                </td>
-            </tr>
-            <tr>
-                <td colspan="2">
-                    <b>电话</b>:<span>{{order.vipPhone| formatPhone }}</span>
-                </td>
-            </tr>
-        </table>
-        <p>-----------------------------------</p>
-        <table style="width: 80%;font-size:12px;margin-top: 20px;text-align: left">
-
-            <tr>
-                <th style="text-align: left;"  colspan="4">产品</th>
-            </tr>
-            <tr>
-                <th style="">数量</th>
-                <th style="">单价</th>
-                <th style="">小计</th>
-            </tr>
-            <template v-for="item in order.items">
-                <tr  >
-                    <td style="text-align: left;" colspan="4" >{{item.shoppingGoods.name }}</td>
-                </tr>
-                <tr  >
-                    <td>{{item.count }}</td>
-                    <td>{{item.zkPrice }}</td>
-                    <td>{{(item.zkPrice * item.count).toFixed(1) }}</td>
-                </tr>
-            </template>
-            <tr>
-                <td>
-                    <b>总计:</b>
-                </td>
-                <td>
-
-                </td>
-                <td>
-                    <span >{{order.zkTotal}}</span>
-                </td>
-            </tr>
-        </table>
-        <p>-----------------------------------</p>
-        <table style="width: 100%;font-size: 10px;line-height: 30px;">
-            <tr  >
-                <td>
-                    <b  >储值卡余额:</b><span >{{totalMoney}}</span>
-                </td>
-            </tr>
-
-            <tr>
-                <td>
-                    <b>实收金额:</b><span >{{order.zkTotal-order.arrears}}</span>
-                </td>
-            </tr>
-            <tr>
-                <td>
-                    <b>收银人:</b><span>{{order.staffName}}</span>
-                </td>
-            </tr>
-            <tr>
-                <td>
-                    <b>客户签名:</b>
-                </td>
-            </tr>
-
-
-        </table>
-
-        <div style="width: 100%;text-align: center;margin: 30px auto;margin-bottom: 10px">
-            <br>
-            *****************<br>
-            谢谢惠顾<br>
-            *****************<br>
-            &nbsp;<br>
-        </div>
-        <div style="width: 100%;">
-            地址:{{shopInfo.shopAddr}}<br>
-            电话:{{shopInfo.shopTel}}<br>
-            &nbsp;<br>
-            &nbsp;<br>
-        </div>
-        <div style="width: 100%;"  >
-            <div style="text-align: center;">
-
-                <img style="width: 100%;" :src="shopInfo.qrcode" /><br>
-                更多精彩请访问小程序<br>
-            </div>
-            &nbsp;<br>
-            &nbsp;<br>
-        </div>
-
-
-    </div>
-    <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a>
-</div>
-<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/plugin/jquery.query.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="@{/js/plugin/LodopFuncs.js}"></script>
-<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
-<script type="text/javascript">
-
-
-    var id = $.query.get("id");
-    var app = new Vue({
-        el: '#app',
-        data: {
-            order:{
-                vipInfo:{},
-                serviceItems:[]
-            },
-            moneyCar:{},
-            totalMoney:0
-
-        },
-        created: function () {
-
-            this.loadInfo();
-        },
-
-        mounted: function () {
-
-        },
-
-        methods: {
-            loadInfo(){
-                var _this=this;
-                AjaxProxy.requst({
-                    app: _this,
-                    url: basePath + '/admin/order/getShopOrder?id='+id,
-                    callback: function (data) {
-                        _this.order=data.mapInfo.order;
-                        _this.moneyCar=data.mapInfo.moneyCar;
-                        _this.shopInfo=data.mapInfo.shopInfo;
-                        _this.totalMoney=data.mapInfo.totalMoney;
-                        setTimeout(print,1000)  ;
-                    }
-                });
-            },
-        },
-
-        filters:
-            {
-                format: function (value) {
-                    if (!value) return '';
-                    return MTools.formatDate(value, 'yyyy-MM-dd')
-                } ,
-                formatPhone: function (value) {
-                    if (!value) return '';
-                    return value.substr(0,3) + "****" + value.substr(value.length-4,value.length+1)
-                } ,
-            },
-
-
-        },
-    );
-
-
-    var LODOP;
-
-    function print() {
-        LODOP = getLodop();
-        LODOP.PRINT_INIT("HIVE打印任务");
-        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.getElementById("print").innerHTML);
-        LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
-        LODOP.PREVIEW();
-    }
-
-</script>
-</body>
 </html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
index 9e7c66c..c2b4cda 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -300,8 +300,8 @@
                                 </el-table-column>
                                 <el-table-column label="操作" fixed="right" width="160">
                                     <template slot-scope="scope">
-                                        <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效' && scope.row.taocanId == null" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button>
-                                        <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效' && scope.row.taocanId == null" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
+                                        <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button>
+                                        <el-button matrix:btn="vipInfo-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
                                         <el-button matrix:btn="vipInfo-dongjie" v-if="scope.row.status!='冻结' && scope.row.taocanId == null" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" v-if="scope.row.taocanId == null" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
                                         <el-button type="text" v-if="scope.row.orderId != null"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
index 241700e..ab2f950 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
@@ -113,6 +113,7 @@
                                     <tr>
                                         <th>项目名称</th>
                                         <th>次数</th>
+                                        <th>划扣金额</th>
                                         <th width="100px">服务时长(分钟)</th>
                                         <th>服务时间</th>
                                         <th width="300px">美疗师</th>
@@ -122,6 +123,7 @@
                                     <tr v-for="(item,index) in projService.serviceItems">
                                         <td>{{item.projInfo.name}}</td>
                                         <td>{{item.count}}</td>
+                                        <td>{{item.projUse.price * item.count}}</td>
                                         <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td>
 
                                         <td>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html b/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html
new file mode 100644
index 0000000..22c1c0a
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html
@@ -0,0 +1,201 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <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>
+    <style>
+
+        .btn{
+            position: fixed;
+            bottom: 10px;
+            left: 45%;
+        }
+
+    </style>
+</head>
+<body>
+<div class="ibox-content" id="app">
+
+
+    <div id="print" style="width: 220px; ">
+        <h1   style="text-align: center;font-size: 18px;margin: 20px auto;">
+            {{order.shopName}}
+        </h1>
+        <table style="width: 100%; font-size:12px;line-height: 20px;">
+
+            <tr>
+                <td colspan="2">
+                    <b>订单号</b>:<span>{{order.orderNo}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2" >
+                    <b>客户</b>:<span>{{order.vipName}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2" >
+                    <b>消费日期</b>:<span>{{order.orderTime |format}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2">
+                    <b>电话</b>:<span>{{order.vipPhone| formatPhone }}</span>
+                </td>
+            </tr>
+        </table>
+        <p>--------------------------------</p>
+        <table style="width: 80%;font-size:12px;margin-top: 20px;text-align: left">
+
+            <tr>
+                <th style="text-align: left;"  colspan="4">产品</th>
+            </tr>
+            <tr>
+                <th style="">数量</th>
+                <th style="">单价</th>
+                <th style="">小计</th>
+            </tr>
+            <template v-for="item in order.items">
+                <tr  >
+                    <td style="text-align: left;" colspan="4" >{{item.shoppingGoods.name }}</td>
+                </tr>
+                <tr  >
+                    <td>{{item.count }}</td>
+                    <td>{{item.zkPrice }}</td>
+                    <td>{{(item.zkPrice * item.count).toFixed(1) }}</td>
+                </tr>
+            </template>
+            <tr>
+                <td>
+                    <b>总计:</b>
+                </td>
+                <td>
+
+                </td>
+                <td>
+                    <span >{{order.zkTotal}}</span>
+                </td>
+            </tr>
+        </table>
+        <p>--------------------------------</p>
+        <table style="width: 100%;font-size: 10px;line-height: 30px;">
+            <tr  >
+                <td>
+                    <b  >储值卡余额:</b><span >{{totalMoney}}</span>
+                </td>
+            </tr>
+
+            <tr>
+                <td>
+                    <b>实收金额:</b><span >{{order.zkTotal-order.arrears}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <b>收银人:</b><span th:utext="${session.userInfo.suName}" ></span>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <b>客户签名:</b>
+                </td>
+            </tr>
+
+
+        </table>
+        <div style="width: 100%;">
+            地址:{{shopInfo.shopAddr}}<br>
+            电话:{{shopInfo.shopTel}}<br>
+        </div>
+    </div>
+    <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a>
+</div>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.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="@{/js/plugin/LodopFuncs.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript">
+
+
+    var id = $.query.get("id");
+    var app = new Vue({
+            el: '#app',
+            data: {
+                order:{
+                    vipInfo:{},
+                    serviceItems:[]
+                },
+                moneyCar:{},
+                totalMoney:0,
+                shopInfo:{}
+
+            },
+            created: function () {
+
+                this.loadInfo();
+            },
+
+            mounted: function () {
+
+            },
+
+            methods: {
+                loadInfo(){
+                    var _this=this;
+                    AjaxProxy.requst({
+                        app: _this,
+                        url: basePath + '/admin/order/getShopOrder?id='+id,
+                        callback: function (data) {
+                            _this.order=data.mapInfo.order;
+                            _this.moneyCar=data.mapInfo.moneyCar;
+                            _this.shopInfo=data.mapInfo.shopInfo;
+                            _this.totalMoney=data.mapInfo.totalMoney;
+                            setTimeout(print,1000)  ;
+                        }
+                    });
+                },
+            },
+
+            filters:
+                {
+                    format: function (value) {
+                        if (!value) return '';
+                        return MTools.formatDate(value, 'yyyy-MM-dd')
+                    } ,
+                    formatPhone: function (value) {
+                        if (!value) return '';
+                        return value.substr(0,3) + "****" + value.substr(value.length-4,value.length+1)
+                    } ,
+                },
+
+
+        },
+    );
+
+
+    var LODOP;
+
+    function print() {
+        LODOP = getLodop();
+        LODOP.PRINT_INIT("HIVE打印任务");
+        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.getElementById("print").innerHTML);
+        LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
+        LODOP.PREVIEW();
+    }
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html b/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html
new file mode 100644
index 0000000..f53a04d
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html
@@ -0,0 +1,219 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <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>
+    <style>
+
+        .btn{
+            position: fixed;
+            bottom: 10px;
+            left: 45%;
+        }
+
+    </style>
+</head>
+<body>
+<div class="ibox-content" id="app">
+
+    <div id="print" style="width: 220px; ">
+        <h1   style="text-align: center;font-size: 18px;margin: 20px auto;">
+            {{order.shopName}}
+        </h1>
+        <table style="width: 100%; font-size:12px;line-height: 20px;">
+
+            <tr>
+                <td colspan="2">
+                    <b>订单号</b>:<span>{{order.orderNo}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2" >
+                    <b>客户</b>:<span>{{order.vipName}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2" >
+                    <b>消费日期</b>:<span>{{order.orderTime |format}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td colspan="2">
+                    <b>电话</b>:<span>{{order.vipPhone| formatPhone }}</span>
+                </td>
+            </tr>
+        </table>
+        <p>-----------------------------------</p>
+        <table style="width: 80%;font-size:12px;margin-top: 20px;text-align: left">
+
+            <tr>
+                <th style="text-align: left;"  colspan="4">产品</th>
+            </tr>
+            <tr>
+                <th style="">数量</th>
+                <th style="">单价</th>
+                <th style="">小计</th>
+            </tr>
+            <template v-for="item in order.items">
+                <tr  >
+                    <td style="text-align: left;" colspan="4" >{{item.shoppingGoods.name }}</td>
+                </tr>
+                <tr  >
+                    <td>{{item.count }}</td>
+                    <td>{{item.zkPrice }}</td>
+                    <td>{{(item.zkPrice * item.count).toFixed(1) }}</td>
+                </tr>
+            </template>
+            <tr>
+                <td>
+                    <b>总计:</b>
+                </td>
+                <td>
+
+                </td>
+                <td>
+                    <span >{{order.zkTotal}}</span>
+                </td>
+            </tr>
+        </table>
+        <p>-----------------------------------</p>
+        <table style="width: 100%;font-size: 10px;line-height: 30px;">
+            <tr  >
+                <td>
+                    <b  >储值卡余额:</b><span >{{totalMoney}}</span>
+                </td>
+            </tr>
+
+            <tr>
+                <td>
+                    <b>实收金额:</b><span >{{order.zkTotal-order.arrears}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <b>收银人:</b><span>{{order.staffName}}</span>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <b>客户签名:</b>
+                </td>
+            </tr>
+
+
+        </table>
+
+        <div style="width: 100%;text-align: center;margin: 30px auto;margin-bottom: 10px">
+            <br>
+            *****************<br>
+            谢谢惠顾<br>
+            *****************<br>
+            &nbsp;<br>
+        </div>
+        <div style="width: 100%;">
+            地址:{{shopInfo.shopAddr}}<br>
+            电话:{{shopInfo.shopTel}}<br>
+            &nbsp;<br>
+            &nbsp;<br>
+        </div>
+        <div style="width: 100%;"  >
+            <div style="text-align: center;">
+
+                <img style="width: 100%;" :src="shopInfo.qrcode" /><br>
+                更多精彩请访问小程序<br>
+            </div>
+            &nbsp;<br>
+            &nbsp;<br>
+        </div>
+    </div>
+    <a href="javascript:;" onclick="print()" class="btn btn-success radius">打印</a>
+</div>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.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="@{/js/plugin/LodopFuncs.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript">
+
+
+    var id = $.query.get("id");
+    var app = new Vue({
+            el: '#app',
+            data: {
+                order:{
+                    vipInfo:{},
+                    serviceItems:[]
+                },
+                moneyCar:{},
+                totalMoney:0,
+                shopInfo:{}
+
+            },
+            created: function () {
+
+                this.loadInfo();
+            },
+
+            mounted: function () {
+
+            },
+
+            methods: {
+                loadInfo(){
+                    var _this=this;
+                    AjaxProxy.requst({
+                        app: _this,
+                        url: basePath + '/admin/order/getShopOrder?id='+id,
+                        callback: function (data) {
+                            _this.order=data.mapInfo.order;
+                            _this.moneyCar=data.mapInfo.moneyCar;
+                            _this.shopInfo=data.mapInfo.shopInfo;
+                            _this.totalMoney=data.mapInfo.totalMoney;
+                            setTimeout(print,1000)  ;
+                        }
+                    });
+                },
+            },
+
+            filters:
+                {
+                    format: function (value) {
+                        if (!value) return '';
+                        return MTools.formatDate(value, 'yyyy-MM-dd')
+                    } ,
+                    formatPhone: function (value) {
+                        if (!value) return '';
+                        return value.substr(0,3) + "****" + value.substr(value.length-4,value.length+1)
+                    } ,
+                },
+
+
+        },
+    );
+
+
+    var LODOP;
+
+    function print() {
+        LODOP = getLodop();
+        LODOP.PRINT_INIT("HIVE打印任务");
+        LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", document.getElementById("print").innerHTML);
+        LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW", true);
+        LODOP.PREVIEW();
+    }
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html
index e1c84b4..a59a80f 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html
@@ -25,7 +25,15 @@
             <label class="col-sm-2 control-label">套餐余额<span class="text-danger">*</span></label>
             <div class="col-sm-4">
                 <input type="text"  class="form-control" name="balance"
-                       th:value="${obj.balance}" datatype="*1-20" nullmsg="项目余次不能为空">
+                       th:value="${obj.balance}" datatype="*1-20" nullmsg="套餐余额不能为空">
+                <div class="Validform_checktip"></div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-2 control-label">套餐余次<span class="text-danger">*</span></label>
+            <div class="col-sm-4">
+                <input type="text"  class="form-control" name="surplusCount"
+                       th:value="${obj.surplusCount}" datatype="*1-20" nullmsg="套餐余次不能为空">
                 <div class="Validform_checktip"></div>
             </div>
         </div>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html
index c6e1c38..4d6314b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html
@@ -220,6 +220,19 @@
 
                             <div class="form-group">
 
+                                <label class="col-sm-2 control-label">所属门店<span
+                                        class="text-danger">*</span></label>
+                                <div class="col-sm-4">
+                                    <select class="form-control autoFull" dataType="*"
+                                            nullmsg="所属门店不能为空" th:data-url="@{/hiveErp/shopInfo/findShopByRole}"
+                                            data-value="id" data-filed="shopName"
+                                            th:data-def="${obj?.shopId}"
+                                            name="shopId">
+                                        <option value=''>--选择所属门店--</option>
+                                    </select>
+                                    <div class="Validform_checktip"></div>
+                                </div>
+
                                 <label class="col-sm-2 control-label">资金密码</label>
                                 <div class="col-sm-4">
                                     <input autocomplete="off"   type="input" class="form-control" name="passWord"

--
Gitblit v1.9.1