From 5cc9058fb151d4285eb9d5e521060b57abf2d6c0 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 28 Jan 2021 15:07:18 +0800
Subject: [PATCH] Merge branch 'api' of https://gitee.com/jyyforjava/zq-erp into api

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

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 2a13ba4..2be1c8b 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
@@ -257,6 +257,7 @@
                                         <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!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button type="text"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
                                         <el-button  type="text" size="small" @click="openProjUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -293,6 +294,7 @@
                                         <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-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>
                                         <el-button  type="text" size="small" @click="openProjUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -333,10 +335,6 @@
                                         label="状态">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="isVipCar"
-                                        label="是否是会籍卡"  :formatter="cardIsVipFormatter">
-                                </el-table-column>
-                                <el-table-column
                                         prop="isOver"
                                         label="是否使用完成" :formatter="cardIsOrderFormatter">
                                 </el-table-column>
@@ -350,10 +348,11 @@
                                 </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!='有效'" 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!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
+                                        <el-button matrix:btn="vipInfo-youxiao" v-if="scope.row.status!='有效' && scope.row.isVipCar =='N' " 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.isVipCar =='N'  " 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.isVipCar =='N' " type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
                                         <el-button matrix:btn="vipInfo-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button type="text"  v-if="scope.row.isVipCar =='N'"  @click="openOrder(scope.$index, scope.row)" size="small">订单</el-button>
                                         <el-button  type="text" size="small" @click="openMoneyCardUseFlow(scope.$index, scope.row)">操作记录</el-button>
                                     </template>
                                 </el-table-column>
@@ -717,6 +716,15 @@
             }
         },
         methods : {
+            //打开订单详情页面
+            openOrder(index,row){
+                layer.full(layer.open({
+                    type : 2,
+                    title : "订单详情",
+                    maxmin : true,
+                    content : [ basePath + '/admin/order/orderItem?id=' + row.orderId ]
+                }));
+            },
             querySearch(queryString, cb) {
                 $.AjaxProxy({
                     p: {
@@ -1071,8 +1079,8 @@
                 params.state = serviceOrderTab.state;
                 params.vipId = _this.vipInfo.id;
                 if (serviceOrderTab.selectTime) {
-                    params.beginTime = moment(serviceOrderTab.selectTime[0]).format("YYYY-MM-DD HH:mm");
-                    params.closureTime = moment(serviceOrderTab.selectTime[1]).format("YYYY-MM-DD HH:mm");
+                    params.beginTime = serviceOrderTab.selectTime?moment(serviceOrderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"):'';
+                    params.closureTime = serviceOrderTab.selectTime?moment(serviceOrderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"):'';
                 }
                 $.AjaxProxy({
                     p:params
@@ -1154,8 +1162,8 @@
                 params.statu = orderTab.state;
                 params.vipId = _this.vipInfo.id;
                 if (orderTab.selectTime) {
-                    params.beginTimeVo = moment(orderTab.selectTime[0]).format("YYYY-MM-DD HH:mm");
-                    params.endTimeVo = moment(orderTab.selectTime[1]).format("YYYY-MM-DD HH:mm");
+                    params.beginTimeVo = orderTab.selectTime?moment(orderTab.selectTime[0]).format("YYYY-MM-DD HH:mm"):'';
+                    params.endTimeVo = orderTab.selectTime?moment(orderTab.selectTime[1]).format("YYYY-MM-DD HH:mm"):'';
                 }
                 $.AjaxProxy({
                     p:params
@@ -1229,8 +1237,8 @@
                 params.offset = (page.currentPage - 1) * page.pageSize;
                 params.userId = _this.vipInfo.id;
                 if (skinTab.selectTime) {
-                    params.beginTime = moment(skinTab.selectTime[0]).format("YYYY-MM-DD");
-                    params.endTime = moment(skinTab.selectTime[1]).format("YYYY-MM-DD");
+                    params.beginTime = skinTab.selectTime?moment(skinTab.selectTime[0]).format("YYYY-MM-DD"):'';
+                    params.endTime = skinTab.selectTime?moment(skinTab.selectTime[1]).format("YYYY-MM-DD"):'';
                 }
                 $.AjaxProxy({
                     p:params

--
Gitblit v1.9.1