From 9c791d431038fe79a111805762ee2f42c96b51c5 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 08 Nov 2021 17:03:15 +0800
Subject: [PATCH] fix

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html |  241 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 219 insertions(+), 22 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 2be1c8b..654e4b9 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
@@ -127,6 +127,7 @@
                 <el-button type="primary" plain @click="recharge">充值</el-button>
                 <el-button type="warning" plain @click="addOrder">开单</el-button>
                 <el-button type="success" plain @click="addServiceOrder">开服务单</el-button>
+                <el-button type="info" plain @click="exportExcel">导出项目</el-button>
             </el-col>
         </el-header>
         <el-container>
@@ -149,6 +150,7 @@
                     <el-row style="padding: 10px 20px;">
                         <p>余额:<span v-if="vipInfo.balance != null">{{vipInfo.balance}}元</span></p>
                         <p>积分:<span v-if="vipInfo.pointAll != null">{{vipInfo.pointAll}}</span></p>
+                        <p>欠款金额:<span v-if="vipInfo.arrears != null">{{vipInfo.arrears}} 元</span></p>
                         <p>累计消费金额:<span v-if="vipInfo.totalMoney != null">{{vipInfo.totalMoney.toFixed(2)}} 元</span></p>
                         <p>累计消费次数:<span v-if="vipInfo.totalTimes != null">{{vipInfo.totalTimes}} 次</span></p>
                         <p>上次消费时间:<span v-if="vipInfo.payTime">{{vipInfo.payTime}}</span></p>
@@ -195,7 +197,7 @@
                             </el-col>
                             <el-col :span="10">
                                 <p>会员卡类型 : {{vipInfo.vipType}}</p>
-                                <p>会员等级 : {{vipInfo.levelName}}</p>
+                                <p>会员等级 : {{vipInfo.vipLevel == null ? "" : vipInfo.vipLevel.levelName}}</p>
                                 <p>生肖/星座 : {{vipInfo.constell}}</p>
                                 <p>地址 : {{vipInfo.addr}}</p>
                                 <p>健康顾问 : {{vipInfo.staffName}}</p>
@@ -226,9 +228,11 @@
                             <el-table id="proj" v-show="projTab.projType=='proj'" :data="projTab.projTableData"
                                     style="width: 100%">
                                 <el-table-column
-                                        prop="projName"
                                         label="项目名称"
                                         width="180">
+                                    <template slot-scope="scope">
+                                        <span >{{scope.row.projName}}({{scope.row.projInfo.code}})</span>
+                                    </template>
                                 </el-table-column>
                                 <el-table-column
                                         prop="source"
@@ -253,10 +257,10 @@
                                 </el-table-column>
                                 <el-table-column label="操作">
                                     <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-cardEdit" type="text" size="small" @click="tabProjEdit(scope.$index, scope.row)">编辑</el-button>
+                                        <el-button matrix:btn="vipinfoClub-youxiao" v-if="scope.row.status!='有效'" type="text" size="small" @click="tabProjValid(scope.$index, scope.row)">有效</el-button>
+                                        <el-button matrix:btn="vipinfoClub-wuxiao" v-if="scope.row.status!='无效'" type="text" size="small" @click="tabProjInvalid(scope.$index, scope.row)">无效</el-button>
+                                        <el-button matrix:btn="vipinfoClub-dongjie" v-if="scope.row.status!='冻结'" type="text" size="small" @click="tabProjCold(scope.$index, scope.row)">冻结</el-button>
+                                        <el-button matrix:btn="vipinfoClub-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>
@@ -267,9 +271,16 @@
                                     style="width: 100%;"
                                     row-key="id" :tree-props="{children: 'taocanProjUse', hasChildren: 'hasChildren'}">
                                 <el-table-column
-                                        prop="projName"
                                         label="名称"
-                                        width="240">
+                                        width="280">
+                                    <template slot-scope="scope">
+                                        <span >{{scope.row.projName}}({{scope.row.projInfo.code}})</span>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column
+                                        prop="source"
+                                        label="来源"
+                                        width="180">
                                 </el-table-column>
                                 <el-table-column
                                         prop="status"
@@ -290,8 +301,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>
@@ -454,8 +465,8 @@
                                     <template slot-scope="scope">
                                         <el-button type="text" size="small" @click="lookServiceOrder(scope.$index, scope.row)">查看</el-button>
                                         <el-button matrix:btn="serviceClub-paiban" type="text" size="small" v-if="scope.row.state=='待预约'" @click="paiban(scope.$index, scope.row)">排班</el-button>
-                                        <el-button matrix:btn="serviceClub-paidan" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="giveServiceOrder(scope.$index, scope.row)">派单</el-button>
-                                        <el-button matrix:btn="serviceClub-edit" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="modifyServiceOrder(scope.$index, scope.row)">修改</el-button>
+<!--                                        <el-button matrix:btn="serviceClub-paidan" type="text" size="small" v-if="scope.row.state=='预约成功待处理'" @click="giveServiceOrder(scope.$index, scope.row)">派单</el-button>-->
+                                        <el-button matrix:btn="serviceClub-edit" type="text" size="small" v-if="scope.row.state=='待预约'" @click="modifyServiceOrder(scope.$index, scope.row)">修改</el-button>
                                         <el-button matrix:btn="serviceClub-peiliao" type="text" size="small" v-if="scope.row.state=='需配料'" @click="peiliao(scope.$index, scope.row)">配料</el-button>
                                         <el-button matrix:btn="serviceClub-huakou" type="text" size="small" v-if="scope.row.state=='服务完成'" @click="hkService(scope.$index, scope.row)">划扣</el-button>
                                         <el-button matrix:btn="serviceClub-edit" type="text" size="small" @click="modifyTime(scope.$index, scope.row)">修改时间</el-button>
@@ -530,14 +541,6 @@
                                         label="下单顾问">
                                 </el-table-column>
                                 <el-table-column
-                                        prop="cashPay"
-                                        label="现金支付金额">
-                                </el-table-column>
-                                <el-table-column
-                                        prop="cardPay"
-                                        label="卡支付金额">
-                                </el-table-column>
-                                <el-table-column
                                         prop="arrears"
                                         label="欠款金额">
                                 </el-table-column>
@@ -569,6 +572,69 @@
                                     :page-size="orderTab.page.pageSize"
                                     layout="total, sizes, prev, pager, next, jumper"
                                     :total="orderTab.page.total">
+                            </el-pagination>
+                        </el-row>
+                    </el-tab-pane>
+                    <el-tab-pane label="积分记录" name="scoreTab">
+                        <el-row style="line-height: 40px;">
+                            <el-col :span="8">
+                                <el-date-picker v-model="scoreTab.selectTime"
+                                                type="daterange"
+                                                range-separator="至"
+                                                format="yyyy-MM-dd"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期">
+                                </el-date-picker>
+                            </el-col>
+                            <el-col :span="8">   <el-input v-model="scoreTab.remarks" placeholder="请输入备注查询" ></el-input></el-col>
+                            <el-col :span="6" style="margin-left: 5px;">
+                                <el-button type="primary" @click="scoreCheckQuery">查询</el-button>
+                                <el-button type="primary"  @click="changeScore">调整</el-button>
+                            </el-col>
+                        </el-row>
+                        <el-row class="table-style">
+                            <el-table :data="scoreTab.scoreTableDate"
+                                      style="width: 100%;">
+                                <el-table-column
+                                        type="index"
+                                        width="50">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="createTime"
+                                        label="时间">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="optionName"
+                                        label="操作人员">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="shopName"
+                                        label="门店">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="recNum"
+                                        label="修改数量">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="nowScore"
+                                        label="余额">
+                                </el-table-column>
+                                <el-table-column
+                                        prop="remarks"
+                                        label="备注">
+                                </el-table-column>
+                            </el-table>
+                        </el-row>
+                        <el-row>
+                            <el-pagination
+                                    background
+                                    @size-change="scoreCheckSizeChange"
+                                    @current-change="scoreCheckCurrentChange"
+                                    :current-page="scoreTab.page.currentPage"
+                                    :page-sizes="[10, 20, 30, 50]"
+                                    :page-size="scoreTab.page.pageSize"
+                                    layout="total, sizes, prev, pager, next, jumper"
+                                    :total="scoreTab.page.total">
                             </el-pagination>
                         </el-row>
                     </el-tab-pane>
@@ -628,10 +694,31 @@
                             </el-pagination>
                         </el-row>
                     </el-tab-pane>
+
+
                 </el-tabs>
             </el-main>
         </el-container>
     </el-container>
+
+    <el-dialog title="积分调整" :visible.sync="scoreTab.showChangePaln">
+        <el-form :model="scoreTab.form">
+             <h3>可用积分:{{vipInfo.pointAll}}</h3>
+            <el-form-item label="调整数量" >
+                <el-input v-model="scoreTab.form.amount" autocomplete="off"></el-input>
+            </el-form-item>
+            <el-form-item label="调整备注" >
+                <el-input v-model="scoreTab.form.remarks" autocomplete="off"></el-input>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="scoreTab.showChangePaln = false">取 消</el-button>
+            <el-button type="primary" @click="submitChangeScore" >确 定</el-button>
+        </div>
+    </el-dialog>
+
+
+
 </div>
 </body>
 <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
@@ -696,6 +783,23 @@
                     total : 0
                 }
             },
+            //用户积分tab
+            scoreTab : {
+                scoreTableDate : [],
+                selectTime : '',
+                remarks:'',
+                showChangePaln:false,
+                page : {
+                    currentPage : 1,
+                    pageSize : 10,
+                    total : 0
+                },
+                form:{
+                    amount:'',
+                    remarks:'',
+                }
+
+            },
             // 皮肤检测tab
             skinTab : {
                 skinTableDate : [],
@@ -744,6 +848,7 @@
             },
             handleSelect(row) {
                 this.vipInfoFn(row.key);
+                this.searchValue=row.key;
             },
             // 请求会员信息
             vipInfoFn(key) {
@@ -1129,7 +1234,7 @@
             },
             // 取消
             cancelServiceOrder(index, row) {
-                MTools.handleItem(basePath + "/admin/projService/cancelOrder?id=" + row.row, "确定取消订单吗?", this.serviceOrderQuery);
+                MTools.handleItem(basePath + "/admin/projService/cancelOrder?id=" + row.id, "确定取消订单吗?", this.serviceOrderQuery);
             },
             // 修改时间
             modifyTime(index, row) {
@@ -1218,6 +1323,85 @@
                 });
             },
             /********* 订单Tab end ***********/
+
+            /************** 积分tab start **************/
+            submitChangeScore(){
+                let _this=this;
+
+                var params={
+                    amount:this.scoreTab.form.amount,
+                    remarks:this.scoreTab.form.remarks,
+                    vipId:this.vipInfo.id
+                };
+
+
+
+                $.AjaxProxy({
+                    p:params,
+                    json:"json"
+                }).invoke(basePath + "/admin/score/changeUserScore", function (loj) {
+                    _this.$message.success('调整成功');
+                    _this.scoreTab.showChangePaln=false;
+                    _this.scoreTab.form={
+                        amount:'',
+                        remarks:''
+                    }
+                    _this.vipInfoFn(_this.searchValue);
+                    _this.scoreCheckQuery();
+
+                });
+
+            },
+            changeScore(){
+                if (!this.vipInfo.id) {
+                    this.$message.error('请选择用户');
+                    return;
+                }else {
+                    this.scoreTab.showChangePaln=true;
+                }
+
+            },
+
+            scoreCheckQuery() {
+                this.scoreCheckTableDataQueryFn();
+            },
+            scoreCheckTableDataQueryFn() {
+                let _this = this;
+                let scoreTab = _this.scoreTab;
+                let page = scoreTab.page;
+                var params = {};
+
+                if (!_this.vipInfo.id) {
+                    return;
+                }
+
+                params.pageSize = page.pageSize;
+                params.pageNum =page.currentPage ;
+                params.vipId = _this.vipInfo.id;
+                params.remarks = scoreTab.remarks;
+                if (scoreTab.selectTime) {
+                    params.beginTime = scoreTab.selectTime?moment(scoreTab.selectTime[0]).format("YYYY-MM-DD"):'';
+                    params.endTime = scoreTab.selectTime?moment(scoreTab.selectTime[1]).format("YYYY-MM-DD"):'';
+                }
+                $.AjaxProxy({
+                    p:params,
+                    json:"json"
+                }).invoke(basePath + "/admin/score/getFlowList", function (loj) {
+                    scoreTab.page.total = loj.getResult().total;
+                    scoreTab.scoreTableDate = loj.getValue("rows");
+                });
+            },
+            scoreCheckSizeChange(val) {
+                this.scoreTab.page.pageSize = val;
+                this.scoreCheckTableDataQueryFn()
+            },
+            scoreCheckCurrentChange(val) {
+                this.scoreTab.page.currentPage = val;
+                this.scoreCheckTableDataQueryFn()
+            },
+            /************** 积分tab end **************/
+
+
 
             /************** 皮肤检测tab start **************/
             skinCheckQuery() {
@@ -1308,6 +1492,11 @@
                         this.skinCheckTableDataQueryFn();
                     }
                 }
+                if (tab.name === "scoreTab") {
+                    if (_this.scoreTab.scoreTableDate.length <= 0) {
+                        this.scoreCheckTableDataQueryFn();
+                    }
+                }
             },
 
             /********** 标签代码 start ************/
@@ -1353,7 +1542,15 @@
                     return;
                 }
                 vipId = this.vipInfo.id;
-                openAddService();
+                openAddService(vipId);
+            },
+            exportExcel(){
+                if (!this.vipInfo.id) {
+                    this.$message.error('请选择用户');
+                    return;
+                }
+                vipId = this.vipInfo.id;
+                window.location.href=basePath+"/admin/vipInfo/exportExcel/"+vipId;
             },
             // 开订单
             addOrder() {

--
Gitblit v1.9.1