Преглед изворни кода

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

DESKTOP-B78GIPM\admin пре 2 година
родитељ
комит
d2be13c60a
38 измењених фајлова са 7686 додато и 3038 уклоњено
  1. 159 59
      src/views/markets/modules/agreementUnit/agreementAccount.vue
  2. 4 5
      src/views/settings/components/modules/printComponents/breakFastCouponPrint.vue
  3. 272 0
      src/views/settings/components/modules/printComponents/changeRoomPrint.vue
  4. 4 2
      src/views/settings/components/modules/printComponents/extractPrint.vue
  5. 552 0
      src/views/settings/components/modules/printComponents/handoverDetailPrint.vue
  6. 724 0
      src/views/settings/components/modules/printComponents/handoverPrint.vue
  7. 48 4
      src/views/settings/components/modules/printComponents/hotelEntryPrint.vue
  8. 47 3
      src/views/settings/components/modules/printComponents/hotelOutPrint.vue
  9. 32 10
      src/views/settings/components/modules/printComponents/paymentPrint.vue
  10. 25 1
      src/views/settings/components/modules/printComponents/posCheckOutPrint.vue
  11. 26 1
      src/views/settings/components/modules/printComponents/refundPrint.vue
  12. 542 0
      src/views/settings/components/modules/printComponents/registrationPrint.vue
  13. 30 20
      src/views/settings/components/modules/printComponents/renewalOrderPrint.vue
  14. 695 0
      src/views/settings/components/modules/printComponents/shiftHandoverPrint.vue
  15. 46 4
      src/views/settings/components/modules/printComponents/teamCheckIn.vue
  16. 40 6
      src/views/settings/components/modules/printComponents/teamCheckOut.vue
  17. 117 27
      src/views/settings/components/modules/printTemplateForm.vue
  18. 2042 1793
      src/views/settings/components/paramSettings.vue
  19. 6 6
      src/views/settings/components/printTemplate.vue
  20. 1 1
      src/views/settings/components/roomModules/RoomLayoutPriceModal.vue
  21. 47 61
      src/views/settings/components/roomModules/RoomQtfPriceTable.vue
  22. 87 110
      src/views/settings/components/roomModules/RoomZdfPriceTable.vue
  23. 1 1
      src/views/settings/components/roomModules/moreSet/moreModal.vue
  24. 52 37
      src/views/settings/components/roomModules/roomGen.vue
  25. 63 101
      src/views/settings/components/roomModules/roomNumSettings/roomNumList.vue
  26. 11 1
      src/views/settings/systemInfo.vue
  27. 27 385
      src/views/system/UserList.vue
  28. 235 0
      src/views/system/YezhuList.vue
  29. 403 0
      src/views/system/YuangongList.vue
  30. 402 400
      src/views/system/modules/UserModal.vue
  31. 155 0
      src/views/system/modules/UserRoomRelationModal.vue
  32. 131 0
      src/views/system/modules/yezhu/BusYezhuForm.vue
  33. 60 0
      src/views/system/modules/yezhu/BusYezhuModal.vue
  34. 190 0
      src/views/system/modules/yezhu/SysUserList.vue
  35. 58 0
      src/views/system/modules/yezhu/SysUserModal.vue
  36. 166 0
      src/views/system/modules/yezhu/UserRoomRelationModal.vue
  37. 126 0
      src/views/system/modules/yezhu/shuilvForm.vue
  38. 60 0
      src/views/system/modules/yezhu/shuilvModal.vue

+ 159 - 59
src/views/markets/modules/agreementUnit/agreementAccount.vue

@@ -1,15 +1,15 @@
 <template>
     <a-card class="container">
         <div class="info">
-            <a-row :gutter="[16,16]">
+            <a-row :gutter="[16, 16]">
                 <a-col :span="4" class="padding_8">
                     <div class="title">
                         协议单位
                     </div>
                     <div class="value">
-                        {{agreementUnitInfo.customerName}}
+                        {{ agreementUnitInfo.customerName }}
                         <a-tag color="cyan">
-                            {{agreementUnitInfo.accountStatus_dictText}}
+                            {{ agreementUnitInfo.accountStatus_dictText }}
                         </a-tag>
                     </div>
                 </a-col>
@@ -18,7 +18,7 @@
                         客户类型
                     </div>
                     <div class="value">
-                        {{agreementUnitInfo.customerType_dictText}}
+                        {{ agreementUnitInfo.customerType_dictText }}
                     </div>
                 </a-col>
                 <a-col :span="3" class="padding_8">
@@ -26,7 +26,7 @@
                         消费
                     </div>
                     <div class="value">
-                        {{accountModel.consume}}
+                        {{ accountModel.consume }}
                     </div>
                 </a-col>
                 <a-col :span="3" class="padding_8">
@@ -34,7 +34,7 @@
                         收款
                     </div>
                     <div class="value">
-                        {{accountModel.payment}}
+                        {{ accountModel.payment }}
                     </div>
                 </a-col>
                 <a-col :span="3" class="padding_8">
@@ -42,7 +42,8 @@
                         记账额度
                     </div>
                     <div class="value">
-                        {{agreementUnitInfo.bookkeeping == null || agreementUnitInfo.bookkeeping == 0?'无限制':agreementUnitInfo.bookkeeping}}
+                        {{ agreementUnitInfo.bookkeeping == null || agreementUnitInfo.bookkeeping ==
+                            0 ? '无限制' : agreementUnitInfo.bookkeeping }}
                     </div>
                 </a-col>
                 <a-col :span="4" class="padding_8">
@@ -50,21 +51,80 @@
                         已用额度
                     </div>
                     <div class="value">
-                        {{accountModel.used}}
+                        {{ accountModel.used }}
                     </div>
                 </a-col>
                 <a-col :span="4" class="bak_red padding_8 border_radius_10">
-                    <div class="title">
+                    <div class="title" style="color: white;">
                         剩余额度
                     </div>
-                    <div class="value">
-                        {{accountModel.surplus}}
+                    <div class="value" style="color: white; font-weight: 600;">
+                        {{ (agreementUnitInfo.bookkeeping == null || agreementUnitInfo.bookkeeping == 0 ? '--.--' :
+                            (agreementUnitInfo.bookkeeping - accountModel.used)) }}
                     </div>
                 </a-col>
             </a-row>
         </div>
         <div class="oper">
-
+            <div class="oper-wrapper">
+                <div class="oper-item">
+                    <a-button>
+                        <a-icon type="file" />
+                        商品消费
+                    </a-button>
+                </div>
+                <div class="oper-item">
+                    <a-button>
+                        <a-icon type="file" />
+                        入账
+                    </a-button>
+                </div>
+                <div class="oper-item">
+                    <a-button>
+                        <a-icon type="file" />
+                        转账
+                    </a-button>
+                </div>
+                <div class="oper-item">
+                    <a-button>
+                        <a-icon type="file" />
+                        结算
+                    </a-button>
+                </div>
+                <div class="oper-item">
+                    <a-button>
+                        <a-icon type="file" />
+                        冲账
+                    </a-button>
+                </div>
+            </div>
+            <div class="kajimi">
+                <a-radio-group button-style="solid" v-model="settleType" @change="onTypeChange">
+                    <a-radio-button :value="0">
+                        全部
+                    </a-radio-button>
+                    <a-radio-button :value="1">
+                        未结算
+                    </a-radio-button>
+                    <a-radio-button :value="2">
+                        已结算
+                    </a-radio-button>
+                </a-radio-group>
+                <span style="display: inline-block; margin-left: 10px;">
+                    <a-range-picker v-model="rangeValue" @change="onRangeChange" :format="dateFormat" />
+                </span>
+                <span style="display: inline-block; margin-left: 10px;">
+                    <a-button>
+                        <a-icon type="search" />
+                        查询
+                    </a-button>
+                </span>
+                <span style="display: block; margin-left: 10px;">
+                    <a-tag color="orange">
+                        <pre style="margin: 0;">消费:¥300    收款:¥0    余额:¥-300</pre>
+                    </a-tag>
+                </span>
+            </div>
         </div>
         <div class="cotent">
 
@@ -73,58 +133,98 @@
 </template>
 
 <script>
-    export default {
-        name: 'agreementAccount',
-        data:{
-            agreementUnitInfo:{},
-            accountModel:{
-                consume:'0',
-                payment:'0',
-                used:'0',
-                surplus:'0'
+import moment from 'moment';
+export default {
+    name: 'agreementAccount',
+    data() {
+        var my_date = new Date();
+        var first_date = new Date(my_date.getFullYear(), my_date.getMonth(), 1);
+        var last_date = new Date(my_date.getFullYear(), my_date.getMonth() + 1, 0);
+        return {
+            settleType: 1,
+            dateFormat: 'YYYY-MM-DD',
+            rangeValue: [moment(first_date), moment(last_date)],
+            defaultRange: [first_date.format('yyyy-MM-dd'), last_date.format('yyyy-MM-dd')],
+            agreementUnitInfo: {},
+            accountModel: {
+                consume: '0',
+                payment: '0',
+                used: '0',
+                surplus: '0'
             }
-        },
-        activated(){
-            console.log(99999)
-            var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
-            this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
-            this.$forceUpdate()
-        },
-        created() {
-            var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
-            this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
+        }
+    },
+    activated() {
+        console.log(99999)
+        var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
+        this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
+        this.$forceUpdate()
+    },
+    created() {
+        var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
+        this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
 
-            var temp = {
-                consume:'0',
-                payment:'0',
-                used:'0',
-                surplus:'0'
-            }
-            this.accountModel = Object.assign({}, temp);
-            // console.log(agreementUnitInfo.customerName)
+        var temp = {
+            consume: '0',
+            payment: '0',
+            used: '0',
+            surplus: '0'
+        }
+        this.accountModel = Object.assign({}, temp);
+        // console.log(agreementUnitInfo.customerName)
+    },
+    methods: {
+        moment,
+        onRangeChange(e) {
+            console.log(this.rangeValue);
+        },
+        onTypeChange(e) {
+            console.log(e);
         }
     }
+}
 </script>
 
 <style scoped>
-    .info{
-        text-align: center;
-    }
-    .title {
-        font-size: 16px;
-        font-weight: 500;
-    }
-    .value{
-        padding-top: 10px;
-    }
-    .bak_red{
-        background-color: red;
-    }
-    .padding_8{
-        padding: 8px 0;
-        border-radius: 10px;
-    }
-    .border_radius_10{
-        border-radius: 10px;
-    }
+.info {
+    text-align: center;
+}
+
+.title {
+    font-size: 16px;
+    font-weight: 500;
+}
+
+.value {
+    padding-top: 10px;
+}
+
+.bak_red {
+    background-color: red;
+}
+
+.padding_8 {
+    padding: 8px 0;
+    border-radius: 10px;
+}
+
+.border_radius_10 {
+    border-radius: 10px;
+}
+
+.oper-wrapper {
+    display: flex;
+    width: 100%;
+}
+
+.oper-item {
+    margin-right: 10px;
+}
+
+.kajimi {
+    margin-top: 20px;
+    display: flex;
+    align-items: center;
+}
 </style>
+

+ 4 - 5
src/views/settings/components/modules/printComponents/breakFastCouponPrint.vue

@@ -12,12 +12,11 @@
             <div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">房号:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{feeInfo.roomNo}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">用餐时间:</div>
-                    <div class="print-fee-value">
-                    </div>
+                    <div class="print-fee-value">{{feeInfo.userTime}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-value">
@@ -69,8 +68,8 @@
                 type: Object,
                 default() {
                     return {
-                        openTime: '2023-05-16 15:30',
-                        payTime:'2023-05-16 15:30',
+                        roomNo: '8207',
+                        userTime:'2023-05-16 08:30',
                     }
                 }
             },

Разлика између датотеке није приказан због своје велике величине
+ 272 - 0
src/views/settings/components/modules/printComponents/changeRoomPrint.vue


+ 4 - 2
src/views/settings/components/modules/printComponents/extractPrint.vue

@@ -10,7 +10,7 @@
             <div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">手牌:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{feeInfo.handCardNo}}</div>
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">开牌时间:</div>
@@ -26,7 +26,7 @@
                 </div>
                 <div class="print-fee-item-wrapper">
                     <div class="print-fee-title">备注:</div>
-                    <div class="print-fee-value"></div>
+                    <div class="print-fee-value">{{ feeInfo.remarks }}</div>
                 </div>
             </div>
         </div>
@@ -50,8 +50,10 @@
                 type: Object,
                 default() {
                     return {
+                        handCardNo:'H001',
                         openTime: '2023-05-16 15:30',
                         payTime:'2023-05-16 15:30',
+                        remarks:'999'
                     }
                 }
             },

+ 552 - 0
src/views/settings/components/modules/printComponents/handoverDetailPrint.vue

@@ -0,0 +1,552 @@
+<template>
+    <div class="a5">
+        <div class="content">
+            <div class="print-title">{{ storeInfo.name }}交班明细表</div>
+
+            <div class="print-fee-info">
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-value">当班:{{ feeInfo.startTime }} 至 {{ feeInfo.endTime }} </div>
+                    <div class="print-fee-value">交班模式:{{ feeInfo.mode}} </div>
+                    <div class="print-fee-value">班次:{{ feeInfo.classes }} </div>
+                </div>
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-value">操作员:{{ nickname() }} </div>
+                    <div class="print-fee-value">打印人:{{ nickname() }} </div>
+                </div>
+            </div>
+
+            <!--收款-->
+<!--            <div class="table">-->
+<!--                <div class="row border-top border-bottom border-left border-right font-weight font-size-18">-->
+<!--                    收款-->
+<!--                </div>-->
+<!--                <div class="wrapper-td" :key="index" v-for="(item, index) in data_payment">-->
+<!--                    <div class="row border-bottom border-left border-right font-weight">-->
+<!--                        {{ item.payName }}-->
+<!--                    </div>-->
+<!--                    <div class="row">-->
+<!--                        <div class="row border-bottom border-left border-right ">-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                项目名称-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                付款方式-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                单据号-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                姓名-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                房间号-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                金额-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                发生时间-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                营业日-->
+<!--                            </div>-->
+<!--                            <div class="flex-1">-->
+<!--                                备注-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <div class="row" :key="index1" v-for="(itemChild, index1) in item.children">-->
+<!--                        <div class="row border-bottom border-left border-right ">-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.projectName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.payName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.receiptNo }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.customerName }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.roomNo }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.money }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.occurTime }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1 border-right">-->
+<!--                                {{ itemChild.businessDay }}-->
+<!--                            </div>-->
+<!--                            <div class="flex-1">-->
+<!--                                {{ itemChild.remarks }}-->
+<!--                            </div>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <div class="row border-bottom border-left border-right font-weight font-size-18">-->
+<!--                        收款合计:{{ item.amount }}-->
+<!--                    </div>-->
+<!--                </div>-->
+<!--            </div>-->
+<!--            <div style="height: 5px"></div>-->
+            <!--收款-->
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    收款
+                </div>
+                <div :key="index" v-for="(item, index) in data_payment">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    收款合计:{{data_payment_amount}}
+                </div>
+            </div>
+
+            <!--退款-->
+            <div style="height: 8px"></div>
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    退款
+                </div>
+                <div :key="index" v-for="(item, index) in data_refund">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    退款合计:{{data_refund_amount}}
+                </div>
+            </div>
+
+            <!--收支明细-->
+            <div style="height: 8px"></div>
+            <div style="border-top: 3px solid #333333;border-left: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-right border-bottom font-size-18">
+                    收支明细
+                </div>
+                <table style="width: 100%;table-layout: fixed;border-collapse: collapse;" class="border-bottom">
+                    <tr>
+                        <th class="border-right" v-for="item in data_detail">{{item.name}}:{{item.money}}</th>
+                    </tr>
+                </table>
+<!--                <div class="row">-->
+<!--                    <div class="flex-1 border-left" :key="index" v-for="(item, index) in data_detail">-->
+<!--                        <span class="border-left">-->
+<!--                            {{item.name}}:{{item.money}}-->
+<!--                        </span>-->
+<!--                    </div>-->
+<!--                </div>-->
+            </div>
+
+            <!--营业额-->
+            <div style="height: 8px"></div>
+            <div style="border: 3px solid #333333;width: 99.9%;" >
+                <div class="font-weight border-bottom font-size-18">
+                    营业额
+                </div>
+                <div :key="index" v-for="(item, index) in data_turnover">
+                    <table style="width: 100%;table-layout: fixed">
+                        <tr class="border-bottom font-weight item-row">
+                            {{ item.payName }}
+                        </tr>
+                        <tr class="border-bottom">
+                            <th class="border-right">项目名称</th>
+                            <th class="border-right">付款方式</th>
+                            <th class="border-right">单据号</th>
+                            <th class="border-right">姓名</th>
+                            <th class="border-right">房间号</th>
+                            <th class="border-right">金额</th>
+                            <th class="border-right">发生时间</th>
+                            <th class="border-right">营业日</th>
+                            <th class="">备注</th>
+                        </tr>
+                        <tr  class="border-bottom" v-for="(item1,index1) in item.children">
+                            <td class="border-right">{{item1.projectName}}</td>
+                            <td class="border-right">{{item1.payName}}</td>
+                            <td class="border-right">{{item1.receiptNo}}</td>
+                            <td class="border-right">{{item1.customerName}}</td>
+                            <td class="border-right">{{item1.roomName}}</td>
+                            <td class="border-right">{{item1.money}}</td>
+                            <td class="border-right">{{item1.occurTime}}</td>
+                            <td class="border-right">{{item1.businessDay}}</td>
+                            <td class="">{{item1.remarks}}</td>
+                        </tr>
+                        <tr v-if="data_payment.length -1 == index" class=" font-weight font-size-16 item-row">
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                        <tr v-else  class="border-bottom font-weight font-size-16 item-row" >
+                            {{ item.payName }}合计:{{ item.amount }}
+                        </tr>
+                    </table>
+                </div>
+                <div class="font-weight border-top font-size-18">
+                    费用合计:{{data_turnover_amount}}
+                </div>
+            </div>
+
+        </div>
+    </div>
+</template>
+
+<script>
+    import { mapActions, mapGetters, mapState } from 'vuex'
+    import { httpAction, getAction } from '@/api/manage'
+
+    export default {
+        props: {
+            title: {
+                type: String,
+                default: '交班明细表'
+            },
+            feeInfo: {
+                type: Object,
+                default() {
+                    return {
+                        startTime: '2023-05-15 15:30',
+                        endTime: '2023-05-16 15:30',
+                        mode:'权责发生制',
+                        classes:'早班',
+                    }
+                }
+            },
+            //收款
+            data_payment:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'支付宝',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_payment_amount:{
+                type:Number ,
+                default() {
+                    return 1500
+                }
+            },
+            //退款
+            data_refund:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'支付宝',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_refund_amount:{
+                type:Number ,
+                default() {
+                    return 1500
+                }
+            },
+            //收支明细
+            data_detail:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            name:'支付宝',
+                            money:55
+                        },
+                        {
+                            name:'微信',
+                            money:33
+                        },
+                        {
+                            name:'现金',
+                            money:99
+                        },
+                    ];
+                }
+            },
+            //营业额
+            data_turnover:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            payName:'房费',
+                            amount:509,
+                            children:[
+                                // {
+                                //     projectName:'项目名称',
+                                //     payName:'付款方式',
+                                //     receiptNo:'单据号',
+                                //     customerName:'姓名',
+                                //     roomNo:'房间号',
+                                //     money:'金额',
+                                //     occurTime:'发生时间',
+                                //     businessDay:'营业日',
+                                //     remarks:'备注',
+                                // },
+                                {
+                                    projectName:'押金',
+                                    payName:'支付宝',
+                                    receiptNo:'S20230518195733',
+                                    customerName:'张先生',
+                                    roomNo:'8707',
+                                    money:188,
+                                    occurTime:'2023-05-18 11:25:36',
+                                    businessDay:'2023-05-18',
+                                    remarks:'押金',
+                                },
+                            ]
+                        },
+                    ];
+                }
+            },
+            data_turnover_amount:{
+                type:Number ,
+                default() {
+                    return 0
+                }
+            },
+        },
+        data() {
+            let storeInfo = JSON.parse(localStorage.getItem("storeInfo"))
+            return {
+                storeInfo,
+                printDate: new Date().format('yyyy/MM/dd hh:mm:ss'),
+                tableHeader:["序号","书名","价格","数量"],
+                dat:[
+                    {bookName:"围城",price:"75",quantity:"0"},
+                    {bookName:"骆驼祥子",price:"55",quantity:"0"},
+                    {bookName:"百年孤独",price:"69",quantity:"0"},
+                    {bookName:"梦里花落知多少",price:"39",quantity:"0"}
+
+                ],
+            }
+        },
+        created() {
+        },
+        methods: {
+            ...mapGetters(["nickname", "avatar", "userInfo"]),
+        }
+    }
+</script>
+
+<style lang="less">
+    .row{
+        width: 100%;
+        display: flex;
+        flex-direction: row;
+    }
+    .item-row{
+        width: 100%;
+        white-space: nowrap;
+    }
+    .flex-1{
+        flex: 1;
+        width:0px;
+    }
+    .font-weight{
+        font-weight: 600;
+    }
+    .font-size-16{
+        font-size: 16px;
+    }
+    .font-size-18{
+        font-size: 18px;
+    }
+    .border-top{
+        border-top: 3px solid #333333;
+    }
+    .border-bottom{
+        border-bottom: 3px solid #333333;
+    }
+    .border-left{
+        border-left: 3px solid #333333;
+    }
+    .border-right{
+        border-right: 3px solid #333333;
+    }
+
+    .a5 {
+        width: 210mm;
+        border: 1px solid #00000055;
+        padding: 3mm;
+
+        .print-fee-info {
+            display: flex;
+            flex-wrap: wrap;
+
+
+            .print-fee-item-wrapper {
+                width: 50%;
+            }
+
+            .row{
+                width: 100%;
+            }
+
+            .print-fee-title {
+                width: 20%;
+                text-align: right;
+            }
+
+            .row .print-fee-title {
+                width: 10%;
+            }
+
+        }
+
+        .print-no{
+            text-align: center;
+        }
+        .print-title {
+            text-align: center;
+            font-size: 16px;
+            font-weight: 600;
+        }
+        .a5-partail{
+            display: flex;
+            flex-wrap: wrap;
+            .print-fee-item-wrapper {
+                margin: 3mm 0;
+                width: 45%;
+            }
+            .row{
+                width: 100%;
+            }
+        }
+    }
+    .print-fee-item-wrapper {
+        display: flex;
+        width: 100%;
+        padding: 4px 0;
+        font-size: small;
+
+        .print-fee-title {
+            width: 65px;
+            text-align: right;
+        }
+
+        .print-fee-value {
+            flex: 1;
+            padding-right: 5px;
+        }
+
+        .value-underline {
+            border-bottom: 1px solid #00000088;
+        }
+    }
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 724 - 0
src/views/settings/components/modules/printComponents/handoverPrint.vue


+ 48 - 4
src/views/settings/components/modules/printComponents/hotelEntryPrint.vue

@@ -42,6 +42,19 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodType}}</div>
+                <div class="fee-cell">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+                <div class="fee-cell">{{item.size}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
         <div v-else>
             <div class="print-fee-info">
@@ -80,11 +93,17 @@
                 </div>
             </div>
 
-        </div>
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+            </div>
+            <div class="info-split"></div>
 
-        <div class="info-split"></div>
-        <div class="info-split-dashed"></div>
-        <div class="info-split"></div>
+        </div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
@@ -152,6 +171,31 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                    ];
+                }
             }
         },
         data() {

+ 47 - 3
src/views/settings/components/modules/printComponents/hotelOutPrint.vue

@@ -36,6 +36,18 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodType}}</div>
+                <div class="fee-cell">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+                <div class="fee-cell">{{item.size}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
         <div v-else>
             <div class="print-fee-info">
@@ -70,11 +82,18 @@
                 </div>
             </div>
 
+            <div class="info-split"></div>
+            <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.goodName}}</div>
+                <div class="fee-cell">{{item.number}}</div>
+                <div class="fee-cell">{{item.unit}}</div>
+                <div class="fee-cell">{{item.stock}}</div>
+            </div>
+            <div class="info-split"></div>
+
         </div>
 
-        <div class="info-split"></div>
-        <div class="info-split-dashed"></div>
-        <div class="info-split"></div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
@@ -142,6 +161,31 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                        {
+                            goodType:'8025',
+                            goodName:'商品',
+                            number:'20',
+                            unit:'元',
+                            price:'6.99',
+                            stock:'88',
+                            size:'3.55*1.2',
+                        },
+                    ];
+                }
             }
         },
         data() {

+ 32 - 10
src/views/settings/components/modules/printComponents/paymentPrint.vue

@@ -7,16 +7,25 @@
                 <div class="print-fee-title">单号:</div>
                 <div class="print-fee-value value-underline">{{ feeInfo.no }}</div>
             </div>
-            <div class="print-fee-item-wrapper">
-                <div class="print-fee-title">支付方式:</div>
-                <div class="print-fee-value">{{ feeInfo.payType }}</div>
-            </div>
-            <div class="print-fee-item-wrapper">
-                <div class="print-fee-title">金额:</div>
-                <div class="print-fee-value">{{ feeInfo.money }}</div>
-            </div>
+<!--            <div class="print-fee-item-wrapper">-->
+<!--                <div class="print-fee-title">支付方式:</div>-->
+<!--                <div class="print-fee-value">{{ feeInfo.payType }}</div>-->
+<!--            </div>-->
+<!--            <div class="print-fee-item-wrapper">-->
+<!--                <div class="print-fee-title">金额:</div>-->
+<!--                <div class="print-fee-value">{{ feeInfo.money }}</div>-->
+<!--            </div>-->
+
+            <table style="width: 100%;table-layout: fixed">
+                <tr  class="" v-for="(item,index) in dataSource">
+                    <td class="">支付方式:{{item.payName}}</td>
+                    <td class="">金额:{{item.money}}</td>
+                </tr>
+            </table>
         </div>
 
+        <div style="height: 20px"></div>
+
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
         <div class="a5-partail">
@@ -67,14 +76,27 @@
                 default() {
                     return {
                         no: "NO202305172255",
-                        payType:'现金',
-                        money: 198,
                     }
                 }
             },
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Array,
+                default() {
+                    return [
+                        {
+                            payName:'现金',
+                            money: 198,
+                        },
+                        {
+                            payName:'现金',
+                            money: 198,
+                        }
+                    ];
+                }
             }
         },
         data() {

+ 25 - 1
src/views/settings/components/modules/printComponents/posCheckOutPrint.vue

@@ -32,13 +32,20 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource.childs">
+            <div class="fee-cell flex-3">{{item.projectName}}</div>
+            <div class="fee-cell flex-2">{{item.price}}</div>
+            <div class="fee-cell flex-2">{{item.preferentialPrice}}</div>
+            <div class="fee-cell flex-2">{{item.number}}</div>
+            <div class="fee-cell">{{item.money}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
                 <div class="fee-cell flex-5">项目合计:</div>
                 <div class="fee-cell flex-8"></div>
-                <div class="fee-cell">0</div>
+                <div class="fee-cell">{{dataSource.amount}}</div>
             </div>
         </div>
 
@@ -115,6 +122,23 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Object,
+                default() {
+                    return {
+                        amount:'99',
+                        childs:[
+                            {
+                                projectName: '点菜',
+                                price: '88.8',
+                                preferentialPrice: '78',
+                                number: '1',
+                                money: '78',
+                            },
+                        ]
+                    };
+                }
             }
         },
         data() {

+ 26 - 1
src/views/settings/components/modules/printComponents/refundPrint.vue

@@ -181,6 +181,12 @@
 
             <div class="info-split"></div>
             <div class="info-split-dashed"></div>
+            <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+                <div class="fee-cell flex-2">{{item.roomNo}}</div>
+                <div class="fee-cell">{{item.layoutName}}</div>
+                <div class="fee-cell">{{item.price}}</div>
+                <div class="fee-cell">{{item.discount}}</div>
+            </div>
             <div class="info-split"></div>
 
             <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
@@ -256,7 +262,26 @@
             defContent: {
                 type: String,
                 default: ""
-            }
+            },
+            dataSource:{
+                type:Array,
+                default() {
+                    return [
+                        {
+                            roomNo:'8212',
+                            layoutName:'星空房',
+                            discount:'98',
+                            price:'88',
+                        },
+                        {
+                            roomNo:'8212',
+                            layoutName:'星空房',
+                            discount:'98',
+                            price:'88',
+                        }
+                    ];
+                }
+            },
         },
         data() {
             let storeInfo = JSON.parse(localStorage.getItem("storeInfo"))

Разлика између датотеке није приказан због своје велике величине
+ 542 - 0
src/views/settings/components/modules/printComponents/registrationPrint.vue


+ 30 - 20
src/views/settings/components/modules/printComponents/renewalOrderPrint.vue

@@ -1,29 +1,29 @@
 <template>
     <div :class="sizeTypeClass">
-        <div class="print-title">{{ storeInfo.name }}续住单</div>
+        <div class="content">
+            <div class="print-title">{{ storeInfo.name }}续住单</div>
 
-        <div class="print-fee-info">
-            <div class="print-fee-item-wrapper row">
-                <div class="print-fee-title">打印时间:</div>
-                <div class="print-fee-value value-underline">{{ printDate }}</div>
+            <div class="print-fee-info">
+                <div class="print-fee-item-wrapper row">
+                    <div class="print-fee-title">打印时间:</div>
+                    <div class="print-fee-value">{{ printDate }}</div>
+                </div>
             </div>
-        </div>
 
-        <div class="print-feesinfo">
-            <div>
-                <div class="print-fee-item-wrapper">
+            <div class="print-feesinfo">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">客人姓名</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">房号</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">原离店时间</div>
                     <div class="print-fee-value"></div>
                 </div>
-                <div class="print-fee-item-wrapper">
+                <div class="print-fee-item-wrapper border-bottom">
                     <div class="print-fee-title">新离店时间</div>
                     <div class="print-fee-value"></div>
                 </div>
@@ -32,17 +32,17 @@
                     <div class="print-fee-value"></div>
                 </div>
             </div>
-        </div>
 
-        <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
+            <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
 
 
-        <div class="print-fee-item-wrapper">
-            <div class="print-fee-value" style="text-align: right">操作员:{{ nickname() }}</div>
-        </div>
-        <div class="print-fee-item-wrapper" style="font-weight: 600;font-size: 18px;">
-            <div>住客签字:</div>
-            <div class="print-fee-value value-underline"></div>
+            <div class="print-fee-item-wrapper">
+                <div class="print-fee-value" style="text-align: right">操作员:{{ nickname() }}</div>
+            </div>
+            <div class="print-fee-item-wrapper" style="font-weight: 600;font-size: 16px;">
+                <div>住客签字:</div>
+                <div class="print-fee-value value-underline"></div>
+            </div>
         </div>
     </div>
 </template>
@@ -91,6 +91,16 @@
 </script>
 
 <style lang="less">
+    .content{
+        width: 94%;
+        margin: auto;
+    }
+    .print-feesinfo{
+        border: 1px solid #1d1a1a
+    }
+    .border-bottom{
+        border-bottom: 1px solid #1d1a1a
+    }
     .mm58 {
         width: 58mm;
         border: 1px solid #00000055;

Разлика између датотеке није приказан због своје велике величине
+ 695 - 0
src/views/settings/components/modules/printComponents/shiftHandoverPrint.vue


+ 46 - 4
src/views/settings/components/modules/printComponents/teamCheckIn.vue

@@ -47,7 +47,7 @@
                 <div class="print-fee-title">离时<span v-if="sizeTypeClass == 'a5'">/CheckOut</span>:</div>
                 <div class="print-fee-value">{{ feeInfo.dueOutTime }}</div>
             </div>
-            <div class="print-fee-item-wrapper row">
+            <div class="print-fee-item-wrapper row" v-if="defModel.isShowBreakfast == 0">
                 <div class="print-fee-title">早餐<span v-if="sizeTypeClass == 'a5'">/Breakfirst</span>:</div>
                 <div class="print-fee-value">{{ feeInfo.breakFirst }}</div>
             </div>
@@ -73,6 +73,13 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell">{{item.customerName}}</div>
+            <div class="fee-cell">{{item.layoutName}}</div>
+            <div class="fee-cell">{{item.dayCount}}</div>
+            <div class="fee-cell flex-3">{{item.money}}</div>
+        </div>
         <div class="info-split"></div>
 
         <pre style="white-space: pre-wrap;" class="print-def-content">{{ defContent }}</pre>
@@ -137,6 +144,38 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            defModel:{
+                type:Object,
+                default(){
+                    return {
+                        isShowIdcard:0,
+                        isShowBreakfast:0,
+                        isShowAddress:0,
+                        isShowPhone:0
+                    }
+                }
+            },
+            dataSource:{
+                type:Array ,
+                default() {
+                    return [
+                        {
+                            roomNo:'8025',
+                            customerName:'张三',
+                            layoutName:'大床房',
+                            dayCount:'8',
+                            money:'969',
+                        },
+                        {
+                            roomNo:'8025',
+                            customerName:'张三',
+                            layoutName:'大床房',
+                            dayCount:'8',
+                            money:'969',
+                        },
+                    ];
+                }
             }
         },
         data() {
@@ -176,7 +215,7 @@
                 width: 60%;
             }
             .row {
-                width: 100%;
+                width: 100% !important;
             }
 
             .small-item {
@@ -188,10 +227,13 @@
             }
 
             .print-fee-title {
-                width: fit-content;
+                /*width: fit-content;*/
                 text-align: right;
             }
-
+            .row .print-fee-title {
+                width: 10% !important;
+                text-align: left !important;
+            }
         }
 
         .print-title {

+ 40 - 6
src/views/settings/components/modules/printComponents/teamCheckOut.vue

@@ -66,17 +66,24 @@
 
         <div class="info-split"></div>
         <div class="info-split-dashed"></div>
+        <div class="print-fees-header fee-row" style="padding-bottom: 5px" v-for="(item,index) in dataSource.childs">
+            <div class="fee-cell flex-2">{{item.roomNo}}</div>
+            <div class="fee-cell">{{item.projectName}}</div>
+            <div class="fee-cell" v-if="sizeTypeClass == 'a5'">{{item.occurTime}}</div>
+            <div class="fee-cell" >{{item.amount}}</div>
+            <div class="fee-cell">{{item.cost}}</div>
+            <div class="fee-cell flex-3">{{item.payName}}</div>
+        </div>
         <div class="info-split"></div>
 
         <div class="print-fees">
             <div class="print-fees-header fee-row">
-<!--                <div class="fee-cell flex-2"></div>-->
-                <div class="fee-cell">合计:</div>
-                <div class="fee-cell">/</div>
+                <div class="fee-cell flex-2">合计:</div>
                 <div class="fee-cell">/</div>
-                <div class="fee-cell">--</div>
-                <div class="fee-cell">--</div>
-                <div class="fee-cell flex-1"></div>
+                <div class="fee-cell" v-if="sizeTypeClass == 'a5'">/</div>
+                <div class="fee-cell">{{dataSource.amount}}</div>
+                <div class="fee-cell">{{dataSource.cost}}</div>
+                <div class="fee-cell flex-3"></div>
             </div>
         </div>
 
@@ -150,6 +157,33 @@
             defContent: {
                 type: String,
                 default: ""
+            },
+            dataSource:{
+                type:Object ,
+                default() {
+                    return {
+                        amount:'666',
+                        cost:'888',
+                        childs:[
+                            {
+                                roomNo:'8025',
+                                projectName:'张三',
+                                occurTime:'2023-05-15 15:30',
+                                amount:'8',
+                                cost:'969',
+                                payName:"微信",
+                            },
+                            {
+                                roomNo:'8025',
+                                projectName:'张三',
+                                occurTime:'2023-05-15 15:30',
+                                amount:'8',
+                                cost:'969',
+                                payName:"微信",
+                            },
+                        ]
+                    }
+                }
             }
         },
         data() {

+ 117 - 27
src/views/settings/components/modules/printTemplateForm.vue

@@ -5,12 +5,19 @@
         <j-form-container :disabled="formDisabled">
           <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" layout="vertical">
             <a-row >
-              <a-col :span="24">
-                <a-form-model-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-                  <a-input v-model="model.name" placeholder="请输入打印模板名称"  ></a-input>
+<!--              <a-col :span="24">-->
+<!--                <a-form-model-item label="模板名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">-->
+<!--                  <a-input v-model="model.name" placeholder="请输入打印模板名称" ></a-input>-->
+<!--                </a-form-model-item>-->
+<!--              </a-col>-->
+              <a-col :span="24" v-if="model.type == 10">
+                <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs">
+                  <j-dict-select-tag type="radio" v-model="model.specs" placeholder="请选择规格" dictCode="print_template_specs"
+                                     disabled="disabled"
+                                     @change="e=>onSpecsChange(e)"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-else>
                 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs">
                   <j-dict-select-tag type="radio" v-model="model.specs" placeholder="请选择规格" dictCode="print_template_specs"
                                      @change="e=>onSpecsChange(e)"/>
@@ -32,27 +39,56 @@
                   <a-input v-model="model.defaultPrint" placeholder="请输入默认打印机"  ></a-input>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if=" model.type == 1 || model.type == 9 || model.type == 14">
                 <a-form-model-item label="打印类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printType">
                   <j-dict-select-tag type="radio" v-model="model.printType" placeholder="请选择打印类型" dictCode="print_template_type"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
-                <a-form-model-item label="是否显示退菜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowRefund">
-                  <j-dict-select-tag type="radio" v-model="model.isShowRefund" placeholder="请选择是否显示退菜" dictCode="print_template_refund"/>
-                </a-form-model-item>
-              </a-col>
+                <a-col :span="24" v-if="model.type == 9">
+                    <a-form-model-item label="是否显示退菜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowRefund">
+                        <j-dict-select-tag type="radio" v-model="model.isShowRefund" placeholder="请选择是否显示退菜" dictCode="print_template_refund"/>
+                    </a-form-model-item>
+                </a-col>
+
+                <a-row>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印证件信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowIdcard">
+                            <j-dict-select-tag type="radio" v-model="model.isShowIdcard" placeholder="请选择是否打印证件信息" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                    <a-col :span="1"></a-col>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印早餐信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowBreakfast">
+                            <j-dict-select-tag type="radio" v-model="model.isShowBreakfast" placeholder="请选择是否打印早餐信息" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                </a-row>
+                <a-row>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印客人详细地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowAddress">
+                            <j-dict-select-tag type="radio" v-model="model.isShowAddress" placeholder="请选择是否打印客人详细地址" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                    <a-col :span="1"></a-col>
+                    <a-col :span="11" v-if="model.type == 1 || model.type == 8 || model.type == 14 || model.type == 15">
+                        <a-form-model-item label="是否打印客人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowPhone">
+                            <j-dict-select-tag type="radio" v-model="model.isShowPhone" placeholder="请选择是否打印客人电话" dictCode="print_template_refund"/>
+                        </a-form-model-item>
+                    </a-col>
+                </a-row>
+
               <a-col :span="24">
                 <a-form-model-item label="打印份数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printSum">
                   <a-input-number v-model="model.printSum" placeholder="请输入打印份数" style="width: 100%" />
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="10">
                 <a-form-model-item label="打印时内容宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printContentOffset">
                   <a-input v-model="model.printContentOffset" placeholder="请输入打印时内容宽度偏差"  ></a-input>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="1"></a-col>
+              <a-col :span="10">
                 <a-form-model-item label="打印时纸张宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printPaperOffset">
                   <a-input v-model="model.printPaperOffset" placeholder="请输入打印时纸张宽度偏差"  ></a-input>
                 </a-form-model-item>
@@ -62,19 +98,58 @@
         </j-form-container>
       </div>
       <div class="right">
-        <!-- <jzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jzd> -->
-<!--        <skd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></skd>-->
-<!--        <tkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tkd>-->
-<!--        <qxd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></qxd>-->
-<!--        <zcq :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zcq>-->
-<!--        <tdrzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tdrzd>-->
-<!--        <tdjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tdjzd>-->
-<!--        <rkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></rkd>-->
-<!--        <ckd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></ckd>-->
-<!--        <hykfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hykfd>-->
-<!--        <posjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></posjzd>-->
-<!--        <zfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zfd>-->
-        <xzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></xzd>
+        <div v-if="model.type == 1">
+          <jzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></jzd>
+        </div>
+        <div v-else-if="model.type == 2">
+          <skd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></skd>
+        </div>
+        <div v-else-if="model.type == 3">
+          <tkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></tkd>
+        </div>
+        <div v-else-if="model.type == 4">
+          <jbb :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jbb>
+        </div>
+        <div v-else-if="model.type == 5">
+          <hfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hfd>
+        </div>
+        <div v-else-if="model.type == 6">
+          <xzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></xzd>
+        </div>
+        <div v-else-if="model.type == 7">
+          <zfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zfd>
+        </div>
+        <div v-else-if="model.type == 8">
+          <djd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></djd>
+        </div>
+        <div v-else-if="model.type == 9">
+          <posjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></posjzd>
+        </div>
+        <div v-else-if="model.type == 10">
+          <jbmxb :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></jbmxb>
+        </div>
+        <div v-else-if="model.type == 11">
+          <hykfd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></hykfd>
+        </div>
+        <div v-else-if="model.type == 12">
+          <ckd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></ckd>
+        </div>
+        <div v-else-if="model.type == 13">
+          <rkd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></rkd>
+        </div>
+        <div v-else-if="model.type == 14">
+          <tdjzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></tdjzd>
+        </div>
+        <div v-else-if="model.type == 15">
+          <tdrzd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks" :defModel="model"></tdrzd>
+        </div>
+        <div v-else-if="model.type == 16">
+          <zcq :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></zcq>
+        </div>
+        <div v-else-if="model.type == 17">
+          <qxd :sizeTypeClass="sizeTypeClass" :defContent="model.remarks"></qxd>
+        </div>
+        <div v-else></div>
       </div>
     </div>
 
@@ -98,6 +173,10 @@
   import posjzd from './printComponents/posCheckOutPrint.vue'
   import zfd from './printComponents/paymentPrint.vue'
   import xzd from './printComponents/renewalOrderPrint.vue'
+  import hfd from './printComponents/changeRoomPrint.vue'
+  import djd from './printComponents/registrationPrint.vue'
+  import jbb from './printComponents/handoverPrint.vue'
+  import jbmxb from './printComponents/handoverDetailPrint.vue'
 
   export default {
     name: 'printTemplateForm',
@@ -115,6 +194,10 @@
       posjzd,
       zfd,
       xzd,
+      hfd,
+      djd,
+      jbb,
+      jbmxb
     },
     props: {
       //表单禁用
@@ -126,7 +209,7 @@
     },
     data () {
       return {
-        sizeTypeClass: 'mm58',
+        sizeTypeClass: 'mm80',
         model:{
          },
         labelCol: {
@@ -179,8 +262,14 @@
         console.log(record)
         this.model = Object.assign({}, record);
         this.width = record.specs;
-        if (record.specs === 'A5'){
+        if (record.specs === 'a5'){
           // this.width = '210mm';
+          this.sizeTypeClass = "a5"
+        }else if(record.specs === '58mm'){
+          this.sizeTypeClass = "mm58"
+        }
+        else{
+          this.sizeTypeClass = "mm80"
         }
         this.visible = true;
       },
@@ -238,6 +327,7 @@
   }
   .right{
     flex: 3;
+    padding-left: 20px;
   }
   .template{
     margin-left: 10px;

Разлика између датотеке није приказан због своје велике величине
+ 2042 - 1793
src/views/settings/components/paramSettings.vue


+ 6 - 6
src/views/settings/components/printTemplate.vue

@@ -21,7 +21,7 @@
 
         <!-- 操作按钮区域 -->
         <div class="table-operator">
-            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
 <!--            <a-button type="primary" icon="download" @click="handleExportXls('打印模板')">导出</a-button>-->
 <!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
 <!--                <a-button type="primary" icon="import">导入</a-button>-->
@@ -38,11 +38,6 @@
 
         <!-- table区域-begin -->
         <div>
-            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-                <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-            </div>
-
             <a-table
                     ref="table"
                     size="middle"
@@ -204,6 +199,11 @@
                 fieldList.push({type:'int',value:'isShowRefund',text:'状态(0-关闭;1-开启)'})
                 this.superFieldList = fieldList
             },
+            handleEdit: function (record) {
+                this.$refs.modalForm.edit(record);
+                this.$refs.modalForm.title = record.name;
+                this.$refs.modalForm.disableSubmit = false;
+            },
         }
     }
 </script>

+ 1 - 1
src/views/settings/components/roomModules/RoomLayoutPriceModal.vue

@@ -26,7 +26,7 @@ export default {
     data() {
         return {
             tabCurrent: '1',
-            width: '90%',
+            width: '80%',
             visible: false,
             disableSubmit: false,
             raw: null

+ 47 - 61
src/views/settings/components/roomModules/RoomQtfPriceTable.vue

@@ -18,64 +18,50 @@
             </span>
         </a-table>
         <a-form-model layout="inline" ref="form" :model="model" :rules="validatorRules" slot="detail">
-            <a-row>
-                <a-col :span="3">
-                    <a-form-model-item label="价格名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-                        <a-input v-model="model.name" placeholder="请输入房价名称"></a-input>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oprice">
-                        <a-input-number style="width:100%;" v-model="model.oprice" :min="1" placeholder="请填写原价"
-                            @change="formVipOpriceChange" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="现价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
-                        <a-input-number style="width:100%;" v-model="model.price" :min="1" placeholder="请填写现价" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="预付" prop="prepay">
-                        <a-radio-group v-model="model.prepay">
-                            <a-radio-button :value="1">
-                                是
-                            </a-radio-button>
-                            <a-radio-button :value="0">
-                                否
-                            </a-radio-button>
-                        </a-radio-group>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integral">
-                        <a-input-number style="width:100%;" v-model="model.integral" placeholder="请填写积分" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
-                        <a-input-number style="width:100%;" v-model="model.num" placeholder="请填写数量" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isVip">
-                        <a-radio-group v-model="model.isVip" @change="onVipChange">
-                            <a-radio-button :value="1">
-                                是
-                            </a-radio-button>
-                            <a-radio-button :value="0">
-                                否
-                            </a-radio-button>
-                        </a-radio-group>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="1">
-                    <a-button :disabled="submitLoading" :loading="submitLoading" @click="submitForm" type="primary">保存</a-button>
-                </a-col>
-                <a-col :span="1">
-                    <a-button :disabled="submitLoading" :loading="submitLoading" @click="clearForm" type="primary">清空</a-button>
-                </a-col>
-            </a-row>
+            <a-form-model-item label="价格名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+                <a-input v-model="model.name" placeholder="请输入房价名称"></a-input>
+            </a-form-model-item>
+            <a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oprice">
+                <a-input-number style="width:100%;" v-model="model.oprice" :min="1" placeholder="请填写原价"
+                    @change="formVipOpriceChange" />
+            </a-form-model-item>
+            <a-form-model-item label="现价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+                <a-input-number style="width:100%;" v-model="model.price" :min="1" placeholder="请填写现价" />
+            </a-form-model-item>
+            <a-form-model-item label="预付" prop="prepay">
+                <a-radio-group v-model="model.prepay">
+                    <a-radio-button :value="1">
+                        是
+                    </a-radio-button>
+                    <a-radio-button :value="0">
+                        否
+                    </a-radio-button>
+                </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integral">
+                <a-input-number style="width:100%;" v-model="model.integral" placeholder="请填写积分" />
+            </a-form-model-item>
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
+                <a-input-number style="width:100%;" v-model="model.num" placeholder="请填写数量" />
+            </a-form-model-item>
+            <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isVip">
+                <a-radio-group v-model="model.isVip" @change="onVipChange">
+                    <a-radio-button :value="1">
+                        是
+                    </a-radio-button>
+                    <a-radio-button :value="0">
+                        否
+                    </a-radio-button>
+                </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-button :disabled="submitLoading" :loading="submitLoading" @click="submitForm"
+                    type="primary">保存</a-button>
+            </a-form-model-item>
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-button :disabled="submitLoading" :loading="submitLoading" @click="clearForm"
+                        type="primary">清空</a-button>
+            </a-form-model-item>
         </a-form-model>
 
         <div class="vip-config" v-if="model.isVip">
@@ -380,7 +366,7 @@ export default {
             })
         },
         doCreate() {
-            
+
             let model = JSON.parse(JSON.stringify(this.model))
             model['hotelId'] = hotelItem.id
             model['layoutId'] = this.layoutId
@@ -409,7 +395,7 @@ export default {
             }).catch(err => {
                 this.$message.error("保存失败")
             }).finally(_ => {
-                
+
                 this.submitLoading = false
             })
         }
@@ -420,7 +406,7 @@ export default {
 
 <style lang="css" scoped>
 .vip-config {
-    width: 30%;
+    width: 50%;
     height: 200px;
     overflow-y: auto;
     margin-top: 20px;

+ 87 - 110
src/views/settings/components/roomModules/RoomZdfPriceTable.vue

@@ -11,9 +11,9 @@
             <span slot="startDate" slot-scope="text, record, index">
                 {{ record.startDate }} ~ {{ record.endDate }}
             </span>
-            
+
             <span slot="sellerId" slot-scope="text, record, index">
-                {{ record.sellerId ? getSellerName(record.sellerId): '' }}
+                {{ record.sellerId ? getSellerName(record.sellerId) : '' }}
             </span>
             <span slot="action" slot-scope="text, record">
                 <a @click="handleEdit(record)">编辑</a>
@@ -25,94 +25,70 @@
             </span>
         </a-table>
         <a-form-model layout="inline" ref="form" :model="model" :rules="validatorRules" slot="detail">
-            <a-row>
-                <a-col :span="3">
-                    <a-form-model-item label="价格名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
-                        <a-input v-model="model.name" placeholder="请输入房价名称"></a-input>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oprice">
-                        <a-input-number style="width:100%;" v-model="model.oprice" :min="1" placeholder="请填写原价"
-                            @change="formVipOpriceChange" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="现价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
-                        <a-input-number style="width:100%;" v-model="model.price" :min="1" placeholder="请填写现价" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="预付" prop="prepay">
-                        <a-radio-group v-model="model.prepay">
-                            <a-radio-button :value="1">
-                                是
-                            </a-radio-button>
-                            <a-radio-button :value="0">
-                                否
-                            </a-radio-button>
-                        </a-radio-group>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integral">
-                        <a-input-number style="width:100%;" v-model="model.integral" placeholder="请填写积分" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
-                        <a-input-number style="width:100%;" v-model="model.num" placeholder="请填写数量" />
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isVip">
-                        <a-radio-group v-model="model.isVip" @change="onVipChange">
-                            <a-radio-button :value="1">
-                                是
-                            </a-radio-button>
-                            <a-radio-button :value="0">
-                                否
-                            </a-radio-button>
-                        </a-radio-group>
-                    </a-form-model-item>
-                </a-col>
-                
-            </a-row>
-            <a-row>
-                <a-col :span="4">
-                    <a-form-model-item label="适用时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startDate">
-                        <a-time-picker :open.sync="open2"  v-model="model.startDate" format="HH:mm" @change="onStartTimeChange">
-                            <a-button slot="addon" size="small" type="primary" @click="open2 = false">
-                              确定
-                            </a-button>
-                          </a-time-picker>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="3">
-                    <a-form-model-item label="" :labelCol="labelCol1" :wrapperCol="wrapperCol" prop="endDate">
-                        <a-time-picker :open.sync="open" v-model="model.endDate" format="HH:mm">
-                            <a-button slot="addon" size="small" type="primary" @click="open = false">
-                              确定
-                            </a-button>
-                          </a-time-picker>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="4">
-                    <a-form-model-item label="钟点房方案" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sellerId">
-                        <a-select style="width: 120px" v-model="model.sellerId" placeholder="请选择">
-                            <a-select-option :value="item.id" v-for="item in hourRules">
-                              {{ item.hourRoomName }}
-                            </a-select-option>
-                          </a-select>
-                    </a-form-model-item>
-                </a-col>
-                <a-col :span="2">
-                    <a-button :disabled="submitLoading" :loading="submitLoading" @click="submitForm" type="primary">保存</a-button>
-                </a-col>
-                <a-col :span="1">
-                    <a-button :disabled="submitLoading" :loading="submitLoading" @click="clearForm" type="primary">清空</a-button>
-                </a-col>
-            </a-row>
+            <a-form-model-item label="价格名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+                <a-input v-model="model.name" placeholder="请输入房价名称"></a-input>
+            </a-form-model-item>
+            <a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oprice">
+                <a-input-number style="width:100%;" v-model="model.oprice" :min="1" placeholder="请填写原价"
+                    @change="formVipOpriceChange" />
+            </a-form-model-item>
+            <a-form-model-item label="现价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+                <a-input-number style="width:100%;" v-model="model.price" :min="1" placeholder="请填写现价" />
+            </a-form-model-item>
+            <a-form-model-item label="预付" prop="prepay">
+                <a-radio-group v-model="model.prepay">
+                    <a-radio-button :value="1">
+                        是
+                    </a-radio-button>
+                    <a-radio-button :value="0">
+                        否
+                    </a-radio-button>
+                </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integral">
+                <a-input-number style="width:100%;" v-model="model.integral" placeholder="请填写积分" />
+            </a-form-model-item>
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
+                <a-input-number style="width:100%;" v-model="model.num" placeholder="请填写数量" />
+            </a-form-model-item>
+            <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isVip">
+                <a-radio-group v-model="model.isVip" @change="onVipChange">
+                    <a-radio-button :value="1">
+                        是
+                    </a-radio-button>
+                    <a-radio-button :value="0">
+                        否
+                    </a-radio-button>
+                </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item label="适用时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startDate">
+                <a-time-picker :open.sync="open2" v-model="model.startDate" format="HH:mm" @change="onStartTimeChange">
+                    <a-button slot="addon" size="small" type="primary" @click="open2 = false">
+                        确定
+                    </a-button>
+                </a-time-picker>
+            </a-form-model-item>
+            <a-form-model-item label="" :labelCol="labelCol1" :wrapperCol="wrapperCol" prop="endDate">
+                <a-time-picker :open.sync="open" v-model="model.endDate" format="HH:mm">
+                    <a-button slot="addon" size="small" type="primary" @click="open = false">
+                        确定
+                    </a-button>
+                </a-time-picker>
+            </a-form-model-item>
+            <a-form-model-item label="钟点房方案" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sellerId">
+                <a-select style="width: 120px" v-model="model.sellerId" placeholder="请选择">
+                    <a-select-option :value="item.id" v-for="item in hourRules" :key="item.id">
+                        {{ item.hourRoomName }}
+                    </a-select-option>
+                </a-select>
+            </a-form-model-item>
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-button :disabled="submitLoading" :loading="submitLoading" @click="submitForm"
+                    type="primary">保存</a-button>
+            </a-form-model-item>
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-button :disabled="submitLoading" :loading="submitLoading" @click="clearForm" type="primary">清空</a-button>
+            </a-form-model-item>
         </a-form-model>
 
         <div class="vip-config" v-if="model.isVip">
@@ -143,7 +119,7 @@
 
 <script>
 Date.prototype.Format = function (fmt) {
-        var o = {
+    var o = {
         "M+": this.getMonth() + 1, //月份
         "d+": this.getDate(), //日
         "H+": this.getHours(), //小时
@@ -151,12 +127,12 @@ Date.prototype.Format = function (fmt) {
         "s+": this.getSeconds(), //秒
         "q+": Math.floor((this.getMonth() + 3) / 3), //季度
         "S": this.getMilliseconds() //毫秒
-        };
-        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
-        for (var k in o)
+    };
+    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (var k in o)
         if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
-        return fmt;
-        }
+    return fmt;
+}
 import { list, modify, create, getLayoutpriceLevels, getHourRoomRule } from '@/api/roomLayoutPrice'
 import { httpAction, getAction } from "@/api/manage";
 import * as api from '@/api/api'
@@ -281,14 +257,14 @@ export default {
     },
     methods: {
         onStartTimeChange(e, timeStr) {
-            console.log(e,timeStr,this.model.startDate)
+            console.log(e, timeStr, this.model.startDate)
         },
         onEndTimeChange(e, timeStr) {
             this.model.endDate = timeStr
         },
         getSellerName(id) {
-            let index = this.hourRules.findIndex(s=>s.id == id)
-            if(index > -1) {
+            let index = this.hourRules.findIndex(s => s.id == id)
+            if (index > -1) {
                 return this.hourRules[index].hourRoomName
             }
             return id
@@ -340,7 +316,7 @@ export default {
                 pageNo: 1,
                 pageSize: 999
             }).then(res => {
-                if(res.code == 200) {
+                if (res.code == 200) {
                     this.hourRules = res.result.records
                 } else {
                     this.$message.warning('⚠️没有找到钟点房方案')
@@ -385,8 +361,8 @@ export default {
                 cpData.isVip = record.isVip ? 1 : 0
                 cpData.prepay = record.prepay ? 1 : 0
                 this.model = cpData
-                this.model.startDate = moment(this.model.startDate,"HH:mm")
-                this.model.endDate = moment(this.model.endDate,"HH:mm")
+                this.model.startDate = moment(this.model.startDate, "HH:mm")
+                this.model.endDate = moment(this.model.endDate, "HH:mm")
                 let nowLvs = JSON.parse(JSON.stringify(this.origiVipLevels))
                 if (this.model.oprice) {
                     nowLvs.forEach(s => {
@@ -459,7 +435,7 @@ export default {
             model['type'] = 2
             model.startDate = this.model.startDate
             model.endDate = this.model.endDate
-            model.startDate =model.startDate.utcOffset(8).format("HH:mm")
+            model.startDate = model.startDate.utcOffset(8).format("HH:mm")
             model.endDate = model.endDate.utcOffset(8).format("HH:mm")
             let memberPriceEntities = [];
             if (model.isVip) {
@@ -490,7 +466,7 @@ export default {
             })
         },
         doCreate() {
-            
+
             let model = JSON.parse(JSON.stringify(this.model))
             model['hotelId'] = hotelItem.id
             model['layoutId'] = this.layoutId
@@ -498,10 +474,10 @@ export default {
             // 经过序列化的moment要重新赋值成moment对象
             model.startDate = this.model.startDate
             model.endDate = this.model.endDate
-            model.startDate =model.startDate.utcOffset(8).format("HH:mm")
+            model.startDate = model.startDate.utcOffset(8).format("HH:mm")
             model.endDate = model.endDate.utcOffset(8).format("HH:mm")
             let memberPriceEntities = [];
-            
+
             if (model.isVip) {
                 (this.vipLevels || []).forEach(s => {
                     let item = {
@@ -525,7 +501,7 @@ export default {
             }).catch(err => {
                 this.$message.error("保存失败")
             }).finally(_ => {
-                
+
                 this.submitLoading = false
             })
         }
@@ -536,7 +512,7 @@ export default {
 
 <style lang="css" scoped>
 .vip-config {
-    width: 30%;
+    width: 50%;
     height: 200px;
     overflow-y: auto;
     margin-top: 20px;
@@ -554,8 +530,9 @@ export default {
 .h-title {
     font-weight: 600;
 }
-/deep/
-.ant-select-selection__placeholder, .ant-select-search__field__placeholder{
+
+/deep/ .ant-select-selection__placeholder,
+.ant-select-search__field__placeholder {
     display: inline-block !important;
 }
 </style>

+ 1 - 1
src/views/settings/components/roomModules/moreSet/moreModal.vue

@@ -10,7 +10,7 @@
     cancelText="关闭">
     <bus-market-member-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-member-form>
   </j-modal> -->
-<j-modal destroyOnClose title="详细设置" :width="'70%'" :footer="null" :visible="visible" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel">
+<j-modal destroyOnClose title="详细设置" :width="'50%'" :footer="null" :visible="visible" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel">
     <a-card style="width:100%" :tab-list="tabListNoTitle" :active-tab-key="noTitleKey" @tabChange="key => onTabChange(key, 'noTitleKey')">
         <BusMarketMemberForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" v-show="noTitleKey=='commodity'" />
         <GoodImg @saveOk="handleCancel" ref="goodImg" v-show="noTitleKey=='goodImg'" />

+ 52 - 37
src/views/settings/components/roomModules/roomGen.vue

@@ -29,8 +29,11 @@
           </a-select>
         </a-form-model-item>
 
-        <a-form-model-item label="层数最高" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
-          <a-input-number placeholder="输入楼层数" v-model="model.floorCount" :min="1" style="width: 120px" />层
+        <a-form-model-item label="起始层数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
+          <a-input-number placeholder="输入起始层数" v-model="model.floorCount" :min="1" style="width: 120px" />层
+        </a-form-model-item>
+        <a-form-model-item label="最高层数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
+          <a-input-number placeholder="输入最高层数" v-model="model.floorCountMax" :min="1" style="width: 120px" />层
         </a-form-model-item>
         <a-form-model-item label="每层房间数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutId">
           <a-input-number placeholder="输入每层房间数" v-model="model.roomCount" :min="1" style="width: 120px" />间
@@ -46,8 +49,8 @@
         <a-button type="primary" @click="genRooms"> 批量生成 </a-button>
       </a-form>
     </div>
-    <div style="flex: 7">
-      <div v-if="roomTree.length > 0">
+    <div style="flex: 7;">
+      <div v-if="roomTree.length > 0" style="height: calc(100vh - (52px + 59px + 100px));overflow-y: auto;">
         <div v-for="(item, index) in roomTree" :key="index" style="width: 100%">
           <div style="font-width: 600; font-size: 20px" @click="sele(item)">
             <a-input placeholder="请填写楼层名" v-model="item.name" class="floor-input"></a-input>
@@ -83,38 +86,42 @@
   <div v-else class="room-layout-settings">
 
 
-    <div style="flex:1;height: calc(100vh - 180px);overflow-y: auto;">
-      <div class="wait-select-title">
+    <div style="flex:1;position: relative;">
+      <div class="wait-select-title" style="display: flex; position: absolute;top: 0;width: 98%;">
         <div class="color-title">待配置房间</div>
-      </div>
-      <div v-for="(item, index) in roomTree" :key="index" style="width: 100%; padding-left: 30px">
-        <div style="font-width: 600; font-size: 20px" @click="sele(item)">
-          {{ item.name }}
+        <div class="bottom-sele-btn">
+          <a-popover placement="topRight" v-if="canMove.can">
+            <template slot="content">
+              <a-button type="link" v-for="(item, index) in layouts" :key="item.id" @click="moveTo(index)">
+                {{ item.name }}
+              </a-button>
+            </template>
+            <template slot="title">
+              <span>要移动到的目标房型</span>
+            </template>
+            <a-button :disabled="false" type="primary">移动到房型({{ canMove.count }})</a-button>
+          </a-popover>
+          <a-button v-else :disabled="true" type="primary">移动到房型(0)</a-button>
+          <a-button :disabled="saveLoading" :loading="saveLoading" @click="back" type="primary">取消</a-button>
+          <a-button :disabled="saveLoading" :loading="saveLoading" @click="save" type="primary">保存并查看房间列表</a-button>
+
         </div>
-        <div style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;">
-          <div v-for="(room, indexs) in item.children" :key="indexs" class="select-room-item"
-            :class="[room.checked ? 'checked-room' : '']" @click="room.checked = !room.checked"
-            style="width: 80px; margin-top: 10px">
-            {{ room.name }}
+      </div>
+      <div style="flex:1;height: calc(100vh - 180px);overflow-y: auto;">
+        <div style="height: 34px;width: 1px;"></div>
+        <div v-for="(item, index) in roomTree" :key="index" style="width: 100%; padding-left: 30px">
+          <div style="font-width: 600; font-size: 20px" @click="sele(item)">
+            {{ item.name }}
+          </div>
+          <div style="display: flex;justify-content: start;margin: 20px;flex-wrap: wrap;">
+            <div v-for="(room, indexs) in item.children" :key="indexs" class="select-room-item"
+              :class="[room.checked ? 'checked-room' : '']" @click="room.checked = !room.checked"
+              style="width: 80px; margin-top: 10px">
+              {{ room.name }}
+            </div>
           </div>
-        </div>
 
-      </div>
-      <div class="bottom-sele-btn">
-        <a-popover placement="topRight" v-if="canMove.can">
-          <template slot="content">
-            <a-button type="link" v-for="(item, index) in layouts" :key="item.id" @click="moveTo(index)">
-              {{ item.name }}
-            </a-button>
-          </template>
-          <template slot="title">
-            <span>要移动到的目标房型</span>
-          </template>
-          <a-button :disabled="false" type="primary">移动到房型({{ canMove.count }})</a-button>
-        </a-popover>
-        <a-button v-else :disabled="true" type="primary">移动到房型(0)</a-button>
-        <a-button :disabled="saveLoading" :loading="saveLoading" @click="back" type="primary">取消</a-button>
-        <a-button :disabled="saveLoading" :loading="saveLoading" @click="save" type="primary">保存并查看房间列表</a-button>
+        </div>
 
       </div>
     </div>
@@ -176,6 +183,7 @@ export default {
       roomTree: [],
       model: {
         floorCount: 1,
+        floorCountMax: 2,
         roomCount: 10,
         prefix: "",
         isExpectEnd: false,
@@ -398,13 +406,20 @@ export default {
     },
     check() { },
     genRooms() {
+      let model = this.model;
       if (!this.buildingId) {
         this.$message.error("请先选择楼栋")
         return
       }
+      if (model.floorCount > model.floorCountMax) {
+        this.$message.error("最低层数不能大于最高层数")
+        return
+      }
+
       let floors = [];
-      let model = this.model;
-      for (let i = 0; i < model.floorCount; i++) {
+
+
+      for (let i = model.floorCount; i <= model.floorCountMax; i++) {
         let children = [];
         for (let r = 0; r < model.roomCount; r++) {
           let expectEndArr = [];
@@ -419,14 +434,14 @@ export default {
               checked: false,
               floorIndex: i,
               name:
-                (i + 1).toString() +
+                + (i).toString() +
                 "0" +
                 numStr.padStart(this.model.roomCount.toString().length, "0"),
             });
           }
         }
         floors.push({
-          name: `第${i + 1}层`,
+          name: `第${i}层`,
           children: children,
         });
       }
@@ -530,7 +545,7 @@ export default {
 }
 
 .bottom-sele-btn {
-  padding-bottom: 30px;
+  height: 30px;
 }
 
 .layout-room-item {

+ 63 - 101
src/views/settings/components/roomModules/roomNumSettings/roomNumList.vue

@@ -1,70 +1,36 @@
 <template>
   <div>
     <div class="page-wrapper">
-      <div class="left-wrapper">
-        <a-input
-          style="width: 140px; margin-right: 10px"
-          v-model="newBuildingName"
-          placeholder="请填写楼栋名称"
-        ></a-input>
-        <a-button
-          :disabled="saveBtnLoading"
-          :loading="saveBtnLoading"
-          @click="saveNewBuilding"
-          type="primary"
-          >新增楼栋</a-button
-        >
+      <div class="left-wrapper-1">
+        <div>
+          <a-input style="width: 140px; margin-right: 10px" v-model="newBuildingName" placeholder="请填写楼栋名称"></a-input>
+          <a-button :disabled="saveBtnLoading" :loading="saveBtnLoading" @click="saveNewBuilding"
+            type="primary">新增楼栋</a-button>
+        </div>
         <div class="building-tree">
           <div v-if="buildingTree && buildingTree.length > 0">
-            <a-tree
-              class="draggable-tree"
-              :tree-data="buildingTree"
-              :default-expand-all="true"
-              blockNode
-              style="width: 400px"
-              :replaceFields="{
+            <a-tree class="draggable-tree" :tree-data="buildingTree" :default-expand-all="true" blockNode
+              style="width: 100%" :replaceFields="{
                 children: 'children',
                 title: 'name',
                 key: 'id',
-              }"
-            >
-              <div
-                slot="title"
-                slot-scope="item"
-                style="display: flex;align-items: center;height: 100%;overflow: hidden;"
-              >
-                <a-button
-                  style="font-size: 12px"
-                  type="link"
-                  @click="filterSearch(item)"
-                  >{{ item.name }}</a-button
-                >
+              }">
+              <div slot="title" slot-scope="item"
+                style="display: flex;align-items: center;height: 100%;overflow: hidden;">
+                <a-button style="font-size: 12px" type="link" @click="filterSearch(item)">{{ item.name }}</a-button>
                 <div style="flex: 1; height: 1px"></div>
-                <a-button
-                  style="font-size: 12px; padding: 0 5px"
-                  type="link"
-                  v-if="item.parentId == 0"
-                  @click="onAddFlowerClick(item)"
-                  >添加楼层</a-button
-                >
-                <a-button
-                  style="font-size: 12px; padding: 0 5px"
-                  type="link"
-                  @click="onTreeEditClick(item)"
-                  >编辑</a-button
-                >
+                <a-button style="font-size: 12px; padding: 0 5px" type="link" v-if="item.parentId == 0"
+                  @click="onAddFlowerClick(item)">添加楼层</a-button>
+                <a-button style="font-size: 12px; padding: 0 5px" type="link" @click="onTreeEditClick(item)">编辑</a-button>
 
                 <a-popconfirm placement="topLeft" ok-text="是的" cancel-text="取消" @confirm="onTreeDeleteClick(item)">
-                    <template slot="title">
-                      确定删除吗?
-                    </template>
-                    <a-button
-                    style="font-size: 12px; padding: 0 5px"
-                    type="link"
-                    >删除</a-button>
-                  </a-popconfirm>
-               
-                
+                  <template slot="title">
+                    确定删除吗?
+                  </template>
+                  <a-button style="font-size: 12px; padding: 0 5px" type="link">删除</a-button>
+                </a-popconfirm>
+
+
               </div>
             </a-tree>
           </div>
@@ -76,19 +42,9 @@
       </div>
     </div>
     <!-- 添加楼层 -->
-    <a-modal
-      width="300px"
-      title="楼栋楼层编辑"
-      :visible.sync="fVisible"
-      :confirm-loading="fSaveLoading"
-      @ok="saveFlow"
-      @cancel="fVisible = false"
-    >
-      <a-input
-        style="width: 240px; margin-right: 10px"
-        v-model="flowData.name"
-        placeholder="请填写楼层/楼栋名称"
-      ></a-input>
+    <a-modal width="300px" title="楼栋楼层编辑" :visible.sync="fVisible" :confirm-loading="fSaveLoading" @ok="saveFlow"
+      @cancel="fVisible = false">
+      <a-input style="width: 240px; margin-right: 10px" v-model="flowData.name" placeholder="请填写楼层/楼栋名称"></a-input>
     </a-modal>
   </div>
 </template>
@@ -98,12 +54,12 @@
 import { save, buildingTree, modify, remove } from "@/api/roomBuildingApi";
 import roomNumTable from './roomNumTable.vue'
 export default {
-    components: {
-        roomNumTable  
-    },
+  components: {
+    roomNumTable
+  },
   data() {
     return {
-        currentFilterId: null,
+      currentFilterId: null,
       flowData: {
         id: null,
         hotelId: null,
@@ -129,9 +85,9 @@ export default {
   methods: {
     // 点击 触发搜索
     filterSearch(item) {
-        this.currentFilterId = item.id
-        this.$refs.numtable.ipagination.current = 1
-        this.$refs.numtable.searchParam(item.id, item.name, item.parentId == "0")
+      this.currentFilterId = item.id
+      this.$refs.numtable.ipagination.current = 1
+      this.$refs.numtable.searchParam(item.id, item.name, item.parentId == "0")
     },
     // 获取楼栋树
     loadBuildingTreeData() {
@@ -166,24 +122,24 @@ export default {
     },
     // 确定删除楼层/楼栋
     onTreeDeleteClick(item) {
-        remove({
-            id: item.id
-        }).then(res => {
-            if(res.code == 200) {
-                this.$message.success('删除成功')
-                
-                this.loadBuildingTreeData()
-                this.$refs.numtable.ipagination.current = 1
-                this.$refs.numtable.ipagination.pageSize = 10
-                if(this.currentFilterId == item.id ) {
-                    if(item.parentId == "0")
-                        this.$refs.numtable.filters['buildId'] = null
-                    else 
-                        this.$refs.numtable.filters['floorId'] = null
-                }
-                this.$refs.numtable.loadData()
-            }
-        })
+      remove({
+        id: item.id
+      }).then(res => {
+        if (res.code == 200) {
+          this.$message.success('删除成功')
+
+          this.loadBuildingTreeData()
+          this.$refs.numtable.ipagination.current = 1
+          this.$refs.numtable.ipagination.pageSize = 10
+          if (this.currentFilterId == item.id) {
+            if (item.parentId == "0")
+              this.$refs.numtable.filters['buildId'] = null
+            else
+              this.$refs.numtable.filters['floorId'] = null
+          }
+          this.$refs.numtable.loadData()
+        }
+      })
     },
     // 保存楼栋信息
     saveNewBuilding() {
@@ -231,7 +187,7 @@ export default {
             this.fVisible = false;
           }
         }).finally(_ => {
-            this.fSaveLoading = false;
+          this.fSaveLoading = false;
         });
 
         return;
@@ -256,20 +212,26 @@ export default {
 
 
 <style scoped>
-.page-wrapper{
-    display: flex;
+.page-wrapper {
+  display: flex;
 }
-.right-wrapper{
-    flex: 1;
+
+.right-wrapper {
+  flex: 1;
 }
-.left-wrapper {
+
+.left-wrapper-1 {
   width: 30%;
+  display: flex;
+  flex-direction: column;
 }
+
 .building-tree {
   width: 100%;
-  height: 300px;
+  flex: 1;
   overflow-y: auto;
 }
+
 .empty-data {
   height: 100%;
 }

+ 11 - 1
src/views/settings/systemInfo.vue

@@ -115,6 +115,7 @@
     import DictionaryInfo from "./components/dictionaryInfo";
     import OrderSoundList from "./components/orderSoundList";
     import DoorLockList from "./components/doorLockList";
+    import { getAction} from '@/api/manage'
     export default {
         components:{
             DoorLockList,
@@ -142,7 +143,16 @@
                     cancelText: '取消',
                     onOk() {
                         if (_this.clearBusiness){
-                            console.log('清除数据')
+                            getAction("/business/busRoomBookingOrders/del-bus-data").then(res=>{
+                                if(res.success) {
+
+                                    alert("清理成功")
+                                } else {
+                                    alert("清理失败")
+                                }
+                            }).catch(s=>{
+                                alert("清理失败")
+                            })
                         }
                     },
                     onCancel() {

+ 27 - 385
src/views/system/UserList.vue

@@ -1,392 +1,34 @@
 <template>
-  <a-card :bordered="false">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-
-          <a-col :md="6" :sm="12">
-            <a-form-item label="账号">
-              <!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
-              <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>
-            </a-form-item>
-          </a-col>
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="性别">
-              <a-select v-model="queryParam.sex" placeholder="请选择性别">
-                <a-select-option value="">请选择</a-select-option>
-                <a-select-option value="1">男</a-select-option>
-                <a-select-option value="2">女</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-
-
-          <template v-if="toggleSearchStatus">
-            <a-col :md="6" :sm="8">
-              <a-form-item label="真实名字">
-                <a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="手机号码">
-                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
-              </a-form-item>
-            </a-col>
-
-            <a-col :md="6" :sm="8">
-              <a-form-item label="用户状态">
-                <a-select v-model="queryParam.status" placeholder="请选择">
-                  <a-select-option value="">请选择</a-select-option>
-                  <a-select-option value="1">正常</a-select-option>
-                  <a-select-option value="2">冻结</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-          </template>
-
-          <a-col :md="6" :sm="8">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮区域 -->
-    <div class="table-operator" style="border-top: 5px">
-      <a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <j-third-app-button biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally"/>
-      <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay" @click="handleMenuClick">
-          <a-menu-item key="1">
-            <a-icon type="delete" @click="batchDel"/>
-            删除
-          </a-menu-item>
-          <a-menu-item key="2">
-            <a-icon type="lock" @click="batchFrozen('2')"/>
-            冻结
-          </a-menu-item>
-          <a-menu-item key="3">
-            <a-icon type="unlock" @click="batchFrozen('1')"/>
-            解冻
-          </a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px">
-          批量操作
-          <a-icon type="down"/>
-        </a-button>
-      </a-dropdown>
-      <j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
-
-      <a-table
-        ref="table"
-        bordered
-        size="middle"
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
-
-        <template slot="avatarslot" slot-scope="text, record, index">
-          <div class="anty-img-wrap">
-            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
-          </div>
-        </template>
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)" >编辑</a>
-
-          <a-divider type="vertical" />
-
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多 <a-icon type="down"/>
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a href="javascript:;" @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <a-menu-item v-if="record.status==1">
-                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
-                  <a>冻结</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <a-menu-item v-if="record.status==2">
-                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
-                  <a>解冻</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-
-      </a-table>
-    </div>
-    <!-- table区域-end -->
-
-    <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
-
-    <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
-
-    <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
-
-    <!-- 用户回收站 -->
-    <user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
-
+  <a-card style="width: 100%; height: 100%">
+    <a-tabs default-active-key="1">
+      <a-tab-pane key="1">
+        <span slot="tab"> 员工管理 </span>
+        <yuangong-list></yuangong-list>
+      </a-tab-pane>
+      <a-tab-pane key="2">
+        <span slot="tab"> 业主管理 </span>
+        <yezhu-list></yezhu-list>
+      </a-tab-pane>
+    </a-tabs>
   </a-card>
 </template>
 
 <script>
-  import UserModal from './modules/UserModal'
-  import PasswordModal from './modules/PasswordModal'
-  import {putAction,getFileAccessHttpUrl} from '@/api/manage';
-  import {frozenBatch} from '@/api/api'
-  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
-  import SysUserAgentModal from "./modules/SysUserAgentModal";
-  import JInput from '@/components/jeecg/JInput'
-  import UserRecycleBinModal from './modules/UserRecycleBinModal'
-  import JSuperQuery from '@/components/jeecg/JSuperQuery'
-  import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
-
-  export default {
-    name: "UserList",
-    mixins: [JeecgListMixin],
-    components: {
-      JThirdAppButton,
-      SysUserAgentModal,
-      UserModal,
-      PasswordModal,
-      JInput,
-      UserRecycleBinModal,
-      JSuperQuery
-    },
-    data() {
-      return {
-        description: '这是用户管理页面',
-        queryParam: {},
-        recycleBinVisible: false,
-        columns: [
-          /*{
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },*/
-          {
-            title: '用户账号',
-            align: "center",
-            dataIndex: 'username',
-            width: 120,
-            sorter: true
-          },
-          {
-            title: '用户姓名',
-            align: "center",
-            width: 100,
-            dataIndex: 'realname',
-          },
-          {
-            title: '头像',
-            align: "center",
-            width: 120,
-            dataIndex: 'avatar',
-            scopedSlots: {customRender: "avatarslot"}
-          },
-
-          {
-            title: '性别',
-            align: "center",
-            width: 80,
-            dataIndex: 'sex_dictText',
-            sorter: true
-          },
-          {
-            title: '生日',
-            align: "center",
-            width: 100,
-            dataIndex: 'birthday'
-          },
-          {
-            title: '手机号码',
-            align: "center",
-            width: 100,
-            dataIndex: 'phone'
-          },
-          {
-            title: '部门',
-            align: "center",
-            width: 180,
-            dataIndex: 'orgCodeTxt'
-          },
-          {
-            title: '负责部门',
-            align: "center",
-            width: 180,
-            dataIndex: 'departIds_dictText'
-          },
-          {
-            title: '状态',
-            align: "center",
-            width: 80,
-            dataIndex: 'status_dictText'
-          },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            scopedSlots: {customRender: 'action'},
-            align: "center",
-            width: 170
-          }
-
-        ],
-        superQueryFieldList: [
-          { type: 'input', value: 'username', text: '用户账号', },
-          { type: 'input', value: 'realname', text: '用户姓名', },
-          { type: 'select', value: 'sex', dbType: 'int', text: '性别', dictCode: 'sex' },
-        ],
-        url: {
-          syncUser: "/act/process/extActProcess/doSyncUser",
-          list: "/sys/user/list",
-          delete: "/sys/user/delete",
-          deleteBatch: "/sys/user/deleteBatch",
-          exportXlsUrl: "/sys/user/exportXls",
-          importExcelUrl: "sys/user/importExcel",
-        },
-      }
-    },
-    computed: {
-      importExcelUrl: function(){
-        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-      }
-    },
-    methods: {
-      getAvatarView: function (avatar) {
-        return getFileAccessHttpUrl(avatar)
-      },
-
-      batchFrozen: function (status) {
-        if (this.selectedRowKeys.length <= 0) {
-          this.$message.warning('请选择一条记录!');
-          return false;
-        } else {
-          let ids = "";
-          let that = this;
-          let isAdmin = false;
-          that.selectionRows.forEach(function (row) {
-            if (row.username == 'admin') {
-              isAdmin = true;
-            }
-          });
-          if (isAdmin) {
-            that.$message.warning('管理员账号不允许此操作,请重新选择!');
-            return;
-          }
-          that.selectedRowKeys.forEach(function (val) {
-            ids += val + ",";
-          });
-          that.$confirm({
-            title: "确认操作",
-            content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
-            onOk: function () {
-              frozenBatch({ids: ids, status: status}).then((res) => {
-                if (res.success) {
-                  that.$message.success(res.message);
-                  that.loadData();
-                  that.onClearSelected();
-                } else {
-                  that.$message.warning(res.message);
-                }
-              });
-            }
-          });
-        }
-      },
-      handleMenuClick(e) {
-        if (e.key == 1) {
-          this.batchDel();
-        } else if (e.key == 2) {
-          this.batchFrozen(2);
-        } else if (e.key == 3) {
-          this.batchFrozen(1);
-        }
-      },
-      handleFrozen: function (id, status, username) {
-        let that = this;
-        //TODO 后台校验管理员角色
-        if ('admin' == username) {
-          that.$message.warning('管理员账号不允许此操作!');
-          return;
-        }
-        frozenBatch({ids: id, status: status}).then((res) => {
-          if (res.success) {
-            that.$message.success(res.message);
-            that.loadData();
-          } else {
-            that.$message.warning(res.message);
-          }
-        });
-      },
-      handleChangePassword(username) {
-        this.$refs.passwordmodal.show(username);
-      },
-      passwordModalOk() {
-        //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
-      },
-      onSyncFinally({isToLocal}) {
-        // 同步到本地时刷新下数据
-        if (isToLocal) {
-          this.loadData()
-        }
-      },
-    }
-
-  }
+import YuangongList from "./YuangongList.vue";
+import YezhuList from "./YezhuList.vue";
+export default {
+  components: {
+    YuangongList,
+    YezhuList,
+  },
+  data() {
+    return {};
+  },
+};
 </script>
+
 <style scoped>
-  @import '~@assets/less/common.less'
-</style>
+.main {
+  height: 70% !important;
+}
+</style>

+ 235 - 0
src/views/system/YezhuList.vue

@@ -0,0 +1,235 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="员工姓名/账号"
+                v-model="queryParam.name"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <!-- <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              > -->
+              <a-button
+                @click="handleAdd"
+                style="margin-left: 8px"
+                type="primary"
+                icon="plus"
+                >新增业主</a-button
+              >
+              <a-button
+                @click="handleshuilv"
+                style="margin-left: 8px"
+                type="primary"
+                >配置税率</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="payFlagslot" slot-scope="text, record, index">
+          {{ record.payFlag == 1 ? "是" : "否" }}
+        </template>
+        <template slot="iconslot" slot-scope="text, record, index">
+          <a-icon :type="record.icon" theme="filled" />
+        </template>
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="inRoomList" slot-scope="text, record">
+          <span v-if="!text || text.length == 0">--</span>
+          <a-tag color="cyan" v-for="(item, index) in text" :key="index">
+            {{ item.roomName }}
+          </a-tag>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleInRooms(record)">关联房间</a>
+
+          <a-divider type="vertical" />
+          <a @click="handleEdit(record)">配置分成</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+    <sys-user-modal ref="modalForm" @ok="modalFormOk"></sys-user-modal>
+    <bus-yezhu-modal
+      ref="modalBusYezhuForm"
+      @ok="modalFormOk"
+    ></bus-yezhu-modal>
+    <user-room-relation-modal ref="UserRoomRelationModal" @ok="modalFormOk"></user-room-relation-modal>
+    <shuilv-modal ref="modalshuilvForm"></shuilv-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import SysUserModal from "./modules/yezhu/SysUserModal";
+import BusYezhuModal from "./modules/yezhu/BusYezhuModal";
+import shuilvModal from "./modules/yezhu/shuilvModal";
+import UserRoomRelationModal from "./modules/yezhu/UserRoomRelationModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    SysUserModal,
+    BusYezhuModal,
+    UserRoomRelationModal,
+    shuilvModal
+  },
+  data() {
+    return {
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      // 表头
+      columns: [
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "用户名",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "关联房间",
+          align: "center",
+          dataIndex: "inRoomList",
+          scopedSlots: { customRender: "inRoomList" },
+        },
+        {
+          title: "分成",
+          align: "center",
+          dataIndex: "commission",
+          customRender: function (text) {
+            return text > 0 ? "按照百分比:" + text + "%" : "--";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busYezhu/list",
+        delete: "/business/busYezhu/delete",
+        deleteBatch: "/business/busYezhu/deleteBatch",
+        exportXlsUrl: "/business/busYezhu/exportXls",
+        importExcelUrl: "business/busYezhu/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {},
+  methods: {
+    handleshuilv(){
+      this.$refs.modalshuilvForm.add();
+      this.$refs.modalshuilvForm.title = "税率";
+      this.$refs.modalshuilvForm.disableSubmit = false;
+    },
+    handleEdit(record) {
+      record.type = 1;
+      this.$refs.modalBusYezhuForm.edit(record);
+      this.$refs.modalBusYezhuForm.title = "编辑";
+      this.$refs.modalBusYezhuForm.disableSubmit = false;
+    },
+    handleInRooms(record) {
+      this.$refs.UserRoomRelationModal.show(record);
+      this.$refs.UserRoomRelationModal.title = "选择关联房间号";
+      this.$refs.UserRoomRelationModal.disableSubmit = false;
+    },
+    modalFormOk() {
+      this.loadData();
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 403 - 0
src/views/system/YuangongList.vue

@@ -0,0 +1,403 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="12">
+            <a-form-item label="账号">
+              <!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
+              <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="性别">
+              <a-select v-model="queryParam.sex" placeholder="请选择性别">
+                <a-select-option value="">请选择</a-select-option>
+                <a-select-option value="1">男</a-select-option>
+                <a-select-option value="2">女</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+
+          <template v-if="toggleSearchStatus">
+            <a-col :md="6" :sm="8">
+              <a-form-item label="真实名字">
+                <a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="手机号码">
+                <a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="用户状态">
+                <a-select v-model="queryParam.status" placeholder="请选择">
+                  <a-select-option value="">请选择</a-select-option>
+                  <a-select-option value="1">正常</a-select-option>
+                  <a-select-option value="2">冻结</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </template>
+
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator" style="border-top: 5px">
+      <a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <j-third-app-button biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally"/>
+      <a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay" @click="handleMenuClick">
+          <a-menu-item key="1">
+            <a-icon type="delete" @click="batchDel"/>
+            删除
+          </a-menu-item>
+          <a-menu-item key="2">
+            <a-icon type="lock" @click="batchFrozen('2')"/>
+            冻结
+          </a-menu-item>
+          <a-menu-item key="3">
+            <a-icon type="unlock" @click="batchFrozen('1')"/>
+            解冻
+          </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px">
+          批量操作
+          <a-icon type="down"/>
+        </a-button>
+      </a-dropdown>
+      <j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        bordered
+        size="middle"
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <template slot="avatarslot" slot-scope="text, record, index">
+          <div class="anty-img-wrap">
+            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
+          </div>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)" >编辑</a>
+
+          <a-divider type="vertical" />
+
+          <a-dropdown>
+            <a class="ant-dropdown-link">
+              更多 <a-icon type="down"/>
+            </a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a href="javascript:;" @click="handleRelation(record.id)">关联房间</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a href="javascript:;" @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item v-if="record.status==1">
+                <a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
+                  <a>冻结</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item v-if="record.status==2">
+                <a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
+                  <a>解冻</a>
+                </a-popconfirm>
+              </a-menu-item>
+              
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
+
+    <password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
+    <user-room-relation @ok="saveRelationOk" ref="userroomrelationmodal"></user-room-relation>
+    <sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
+
+    <!-- 用户回收站 -->
+    <user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
+  </a-card>
+</template>
+
+<script>
+  import UserModal from './modules/UserModal'
+  import UserRoomRelation from './modules/UserRoomRelationModal.vue'
+  import PasswordModal from './modules/PasswordModal'
+  import {putAction,getFileAccessHttpUrl} from '@/api/manage';
+  import {frozenBatch} from '@/api/api'
+  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+  import SysUserAgentModal from "./modules/SysUserAgentModal";
+  import JInput from '@/components/jeecg/JInput'
+  import UserRecycleBinModal from './modules/UserRecycleBinModal'
+  import JSuperQuery from '@/components/jeecg/JSuperQuery'
+  import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
+
+  export default {
+    name: "UserList",
+    mixins: [JeecgListMixin],
+    components: {
+      JThirdAppButton,
+      SysUserAgentModal,
+      UserModal,
+      PasswordModal,
+      JInput,
+      UserRecycleBinModal,
+      UserRoomRelation,
+      JSuperQuery
+    },
+    data() {
+      return {
+        description: '这是用户管理页面',
+        queryParam: {},
+        recycleBinVisible: false,
+        columns: [
+          /*{
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },*/
+          {
+            title: '用户账号',
+            align: "center",
+            dataIndex: 'username',
+            width: 120,
+            sorter: true
+          },
+          {
+            title: '用户姓名',
+            align: "center",
+            width: 100,
+            dataIndex: 'realname',
+          },
+          {
+            title: '头像',
+            align: "center",
+            width: 120,
+            dataIndex: 'avatar',
+            scopedSlots: {customRender: "avatarslot"}
+          },
+
+          {
+            title: '性别',
+            align: "center",
+            width: 80,
+            dataIndex: 'sex_dictText',
+            sorter: true
+          },
+          {
+            title: '生日',
+            align: "center",
+            width: 100,
+            dataIndex: 'birthday'
+          },
+          {
+            title: '手机号码',
+            align: "center",
+            width: 100,
+            dataIndex: 'phone'
+          },
+          {
+            title: '部门',
+            align: "center",
+            width: 180,
+            dataIndex: 'orgCodeTxt'
+          },
+          {
+            title: '负责部门',
+            align: "center",
+            width: 180,
+            dataIndex: 'departIds_dictText'
+          },
+          {
+            title: '状态',
+            align: "center",
+            width: 80,
+            dataIndex: 'status_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            scopedSlots: {customRender: 'action'},
+            align: "center",
+            width: 170
+          }
+
+        ],
+        superQueryFieldList: [
+          { type: 'input', value: 'username', text: '用户账号', },
+          { type: 'input', value: 'realname', text: '用户姓名', },
+          { type: 'select', value: 'sex', dbType: 'int', text: '性别', dictCode: 'sex' },
+        ],
+        url: {
+          syncUser: "/act/process/extActProcess/doSyncUser",
+          list: "/sys/user/list",
+          delete: "/sys/user/delete",
+          deleteBatch: "/sys/user/deleteBatch",
+          exportXlsUrl: "/sys/user/exportXls",
+          importExcelUrl: "sys/user/importExcel",
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      saveRelationOk() {
+        
+      },
+      getAvatarView: function (avatar) {
+        return getFileAccessHttpUrl(avatar)
+      },
+
+      batchFrozen: function (status) {
+        if (this.selectedRowKeys.length <= 0) {
+          this.$message.warning('请选择一条记录!');
+          return false;
+        } else {
+          let ids = "";
+          let that = this;
+          let isAdmin = false;
+          that.selectionRows.forEach(function (row) {
+            if (row.username == 'admin') {
+              isAdmin = true;
+            }
+          });
+          if (isAdmin) {
+            that.$message.warning('管理员账号不允许此操作,请重新选择!');
+            return;
+          }
+          that.selectedRowKeys.forEach(function (val) {
+            ids += val + ",";
+          });
+          that.$confirm({
+            title: "确认操作",
+            content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+            onOk: function () {
+              frozenBatch({ids: ids, status: status}).then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message);
+                  that.loadData();
+                  that.onClearSelected();
+                } else {
+                  that.$message.warning(res.message);
+                }
+              });
+            }
+          });
+        }
+      },
+      handleMenuClick(e) {
+        if (e.key == 1) {
+          this.batchDel();
+        } else if (e.key == 2) {
+          this.batchFrozen(2);
+        } else if (e.key == 3) {
+          this.batchFrozen(1);
+        }
+      },
+      handleFrozen: function (id, status, username) {
+        let that = this;
+        //TODO 后台校验管理员角色
+        if ('admin' == username) {
+          that.$message.warning('管理员账号不允许此操作!');
+          return;
+        }
+        frozenBatch({ids: id, status: status}).then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+          }
+        });
+      },
+      handleChangePassword(username) {
+        this.$refs.passwordmodal.show(username);
+      },
+      handleRelation(userId) {
+        this.$refs.userroomrelationmodal.show(userId)
+      },
+      passwordModalOk() {
+        //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+      },
+      onSyncFinally({isToLocal}) {
+        // 同步到本地时刷新下数据
+        if (isToLocal) {
+          this.loadData()
+        }
+      },
+    }
+
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 402 - 400
src/views/system/modules/UserModal.vue

@@ -1,13 +1,6 @@
 <template>
-  <a-drawer
-          :title="title"
-          :maskClosable="true"
-          :width="drawerWidth"
-          placement="right"
-          :closable="true"
-          @close="handleCancel"
-          :visible="visible"
-          style="height: 100%;">
+  <a-drawer :title="title" :maskClosable="true" :width="drawerWidth" placement="right" :closable="true"
+    @close="handleCancel" :visible="visible" style="height: 100%;">
 
     <template slot="title">
       <div style="width: 100%;">
@@ -23,16 +16,16 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules">
 
         <a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
-          <a-input placeholder="请输入用户账号" v-model="model.username" :readOnly="!!model.id"/>
+          <a-input placeholder="请输入用户账号" v-model="model.username" :readOnly="!!model.id" />
         </a-form-model-item>
 
         <template v-if="!model.id">
-          <a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
+          <a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password">
             <a-input type="password" placeholder="请输入登录密码" v-model="model.password" />
           </a-form-model-item>
 
-          <a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
-            <a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
+          <a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword">
+            <a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword" />
           </a-form-model-item>
         </template>
 
@@ -49,63 +42,51 @@
         </a-form-model-item>
 
         <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
+          <j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post" />
         </a-form-model-item>
 
-        <a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
-          <j-multi-select-tag
-                  :disabled="disableSubmit"
-                  v-model="model.selectedroles"
-                  :options="rolesOptions"
-                  placeholder="请选择角色">
+        <a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled">
+          <j-multi-select-tag :disabled="disableSubmit" v-model="model.selectedroles" :options="rolesOptions"
+            placeholder="请选择角色">
           </j-multi-select-tag>
         </a-form-model-item>
 
         <!--部门分配-->
         <a-form-model-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
-          <j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart>
+          <j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true"
+            :treeOpera="true">></j-select-depart>
         </a-form-model-item>
 
         <!--租户分配-->
         <a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
-          <j-multi-select-tag
-                  :disabled="disableSubmit"
-                  v-model="model.relTenantIds"
-                  :options="tenantsOptions"
-                  placeholder="请选择租户">
+          <j-multi-select-tag :disabled="disableSubmit" v-model="model.relTenantIds" :options="tenantsOptions"
+            placeholder="请选择租户">
           </j-multi-select-tag>
         </a-form-model-item>
 
         <a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-radio-group  v-model="model.userIdentity"  @change="identityChange">
+          <a-radio-group v-model="model.userIdentity" @change="identityChange">
             <a-radio :value="1">普通用户</a-radio>
             <a-radio :value="2">上级</a-radio>
           </a-radio-group>
         </a-form-model-item>
-        <a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol"  v-show="departIdShow==true">
-          <j-multi-select-tag
-                  :disabled="disableSubmit"
-                  v-model="model.departIds"
-                  :options="nextDepartOptions"
-                  placeholder="请选择负责部门">
+        <a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="departIdShow == true">
+          <j-multi-select-tag :disabled="disableSubmit" v-model="model.departIds" :options="nextDepartOptions"
+            placeholder="请选择负责部门">
           </j-multi-select-tag>
         </a-form-model-item>
 
         <a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <j-image-upload class="avatar-uploader" text="上传" v-model="model.avatar" ></j-image-upload>
+          <j-image-upload class="avatar-uploader" text="上传" v-model="model.avatar"></j-image-upload>
         </a-form-model-item>
 
         <a-form-model-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-date-picker
-                  style="width: 100%"
-                  placeholder="请选择生日"
-                  v-model="model.birthday"
-                  :format="dateFormat"
-                  :getCalendarContainer="node => node.parentNode"/>
+          <a-date-picker style="width: 100%" placeholder="请选择生日" v-model="model.birthday" :format="dateFormat"
+            :getCalendarContainer="node => node.parentNode" />
         </a-form-model-item>
 
         <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <a-select  v-model="model.sex"  placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
+          <a-select v-model="model.sex" placeholder="请选择性别" :getPopupContainer="(target) => target.parentNode">
             <a-select-option :value="1">男</a-select-option>
             <a-select-option :value="2">女</a-select-option>
           </a-select>
@@ -118,9 +99,24 @@
         <a-form-model-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
           <a-input placeholder="请输入座机" v-model="model.telephone" />
         </a-form-model-item>
-
+        <a-form-model-item label="打折权限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discountType">
+          <a-radio-group @change="discountTypeChange" v-model="model.discountType" >
+            <a-radio :value="1">
+              不限制
+            </a-radio>
+            <a-radio :value="2">
+              限制折扣
+            </a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item label="最低折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discountValue">
+          <a-input-number :disabled="model.discountType != 2" placeholder="最低折扣" v-model="model.discountValue"
+            :min="0" :max="100" :formatter="value => `${value}%`"
+            :parser="value => value.replace('%', '')" />
+        </a-form-model-item>
         <a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
-          <j-dict-select-tag  v-model="model.activitiSync"  placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>
+          <j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'"
+            dictCode="activiti_sync" />
         </a-form-model-item>
 
       </a-form-model>
@@ -137,389 +133,395 @@
 </template>
 
 <script>
-  import moment from 'moment'
-  import Vue from 'vue'
-  import { ACCESS_TOKEN } from "@/store/mutation-types"
-  import { getAction } from '@/api/manage'
-  import { addUser,editUser,queryUserRole,queryall } from '@/api/api'
-  import { disabledAuthFilter } from "@/utils/authFilter"
-  import { duplicateCheck } from '@/api/api'
-
-  export default {
-    name: "UserModal",
-    components: {
+import moment from 'moment'
+import Vue from 'vue'
+import { ACCESS_TOKEN } from "@/store/mutation-types"
+import { getAction } from '@/api/manage'
+import { addUser, editUser, queryUserRole, queryall } from '@/api/api'
+import { disabledAuthFilter } from "@/utils/authFilter"
+import { duplicateCheck } from '@/api/api'
+
+export default {
+  name: "UserModal",
+  components: {
+  },
+  data() {
+    return {
+      departDisabled: false, //是否是我的部门调用该页面
+      roleDisabled: false, //是否是角色维护调用该页面
+      modalWidth: 800,
+      drawerWidth: 700,
+      modaltoggleFlag: true,
+      confirmDirty: false,
+      userId: "", //保存用户id
+      disableSubmit: false,
+      dateFormat: "YYYY-MM-DD",
+      validatorRules: {
+        username: [{ required: true, message: '请输入用户账号!' },
+        { validator: this.validateUsername, }],
+        password: [{ required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!' },
+        { validator: this.validateToNextPassword, trigger: 'change' }],
+        confirmpassword: [{ required: true, message: '请重新输入登录密码!', },
+        { validator: this.compareToFirstPassword, }],
+        realname: [{ required: true, message: '请输入用户名称!' }],
+        phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
+        email: [{ validator: this.validateEmail }],
+        roles: {},
+        workNo: [{ required: true, message: '请输入工号' },
+        { validator: this.validateWorkNo }],
+        telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
+      },
+      departIdShow: false,
+      title: "操作",
+      visible: false,
+      model: {
+       
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      uploadLoading: false,
+      confirmLoading: false,
+      headers: {},
+      url: {
+        fileUpload: window._CONFIG['domianURL'] + "/sys/common/upload",
+        userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
+        userId: "/sys/user/generateUserId", // 引入生成添加用户情况下的url
+        syncUserByUserName: "/act/process/extActProcess/doSyncUserByUserName",//同步用户到工作流
+        queryTenantList: '/sys/tenant/queryList'
+      },
+      tenantsOptions: [],
+      rolesOptions: [],
+      nextDepartOptions: [],
+    }
+  },
+  created() {
+    const token = Vue.ls.get(ACCESS_TOKEN);
+    this.headers = { "X-Access-Token": token }
+    this.initRoleList()
+    this.initTenantList()
+  },
+  computed: {
+    uploadAction: function () {
+      return this.url.fileUpload;
+    }
+  },
+  methods: {
+    discountTypeChange(e) {
+      this.model.discountType = e.target.value
+    },
+    add() {
+      this.refresh();
+      this.edit({ activitiSync: '1', userIdentity: 1 });
     },
-    data () {
-      return {
-        departDisabled: false, //是否是我的部门调用该页面
-        roleDisabled: false, //是否是角色维护调用该页面
-        modalWidth:800,
-        drawerWidth:700,
-        modaltoggleFlag:true,
-        confirmDirty: false,
-        userId:"", //保存用户id
-        disableSubmit:false,
-        dateFormat:"YYYY-MM-DD",
-        validatorRules:{
-          username:[{required: true, message: '请输入用户账号!'},
-            {validator: this.validateUsername,}],
-          password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '密码由8位数字、大小写字母和特殊符号组成!'},
-            {validator: this.validateToNextPassword,trigger: 'change'}],
-          confirmpassword: [{required: true, message: '请重新输入登录密码!',},
-            { validator: this.compareToFirstPassword,}],
-          realname:[{ required: true, message: '请输入用户名称!' }],
-          phone: [{required: true, message: '请输入手机号!'}, {validator: this.validatePhone}],
-          email: [{validator: this.validateEmail}],
-          roles:{},
-          workNo:[ { required: true, message: '请输入工号' },
-            { validator: this.validateWorkNo }],
-          telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
-        },
-        departIdShow:false,
-        title:"操作",
-        visible: false,
-        model: {},
-        labelCol: {
-          xs: { span: 24 },
-          sm: { span: 5 },
-        },
-        wrapperCol: {
-          xs: { span: 24 },
-          sm: { span: 16 },
-        },
-        uploadLoading:false,
-        confirmLoading: false,
-        headers:{},
-        url: {
-          fileUpload: window._CONFIG['domianURL']+"/sys/common/upload",
-          userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
-          userId:"/sys/user/generateUserId", // 引入生成添加用户情况下的url
-          syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//同步用户到工作流
-          queryTenantList: '/sys/tenant/queryList'
-        },
-        tenantsOptions: [],
-        rolesOptions:[],
-        nextDepartOptions:[],
+    edit(record) {
+      let that = this;
+      that.visible = true;
+      //根据屏幕宽度自适应抽屉宽度
+      this.resetScreenSize();
+      that.userId = record.id;
+      that.model = Object.assign({}, { selectedroles: '', selecteddeparts: '' }, record);
+      
+      //身份为上级显示负责部门,否则不显示
+      if (this.model.userIdentity == 2) {
+        this.departIdShow = true;
+      } else {
+        this.departIdShow = false;
       }
+
+      if (record.hasOwnProperty("id")) {
+        that.getUserRoles(record.id);
+        that.getUserDeparts(record.id);
+      }
+      console.log('that.model=', that.model)
     },
-    created () {
-      const token = Vue.ls.get(ACCESS_TOKEN);
-      this.headers = {"X-Access-Token":token}
-      this.initRoleList()
-      this.initTenantList()
+    isDisabledAuth(code) {
+      return disabledAuthFilter(code);
     },
-    computed:{
-      uploadAction:function () {
-        return this.url.fileUpload;
+    //窗口最大化切换
+    toggleScreen() {
+      if (this.modaltoggleFlag) {
+        this.modalWidth = window.innerWidth;
+      } else {
+        this.modalWidth = 800;
       }
+      this.modaltoggleFlag = !this.modaltoggleFlag;
     },
-    methods: {
-      add () {
-        this.refresh();
-        this.edit({activitiSync:'1',userIdentity:1});
-      },
-      edit (record) {
-        let that = this;
-        that.visible = true;
-        //根据屏幕宽度自适应抽屉宽度
-        this.resetScreenSize();
-        that.userId = record.id;
-        that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record);
-        //身份为上级显示负责部门,否则不显示
-        if(this.model.userIdentity==2){
-          this.departIdShow=true;
-        }else{
-          this.departIdShow=false;
-        }
-
-        if(record.hasOwnProperty("id")){
-          that.getUserRoles(record.id);
-          that.getUserDeparts(record.id);
+    // 根据屏幕变化,设置抽屉尺寸
+    resetScreenSize() {
+      let screenWidth = document.body.clientWidth;
+      if (screenWidth < 500) {
+        this.drawerWidth = screenWidth;
+      } else {
+        this.drawerWidth = 700;
+      }
+    },
+    //初始化租户字典
+    initTenantList() {
+      getAction(this.url.queryTenantList).then(res => {
+        if (res.success) {
+          this.tenantsOptions = res.result.map((item, index, arr) => {
+            let c = { label: item.name, value: item.id + "" }
+            return c;
+          })
+          console.log('this.tenantsOptions: ', this.tenantsOptions)
         }
-        console.log('that.model=',that.model)
-      },
-      isDisabledAuth(code){
-        return disabledAuthFilter(code);
-      },
-      //窗口最大化切换
-      toggleScreen(){
-        if(this.modaltoggleFlag){
-          this.modalWidth = window.innerWidth;
-        }else{
-          this.modalWidth = 800;
+      })
+    },
+    //初始化角色字典
+    initRoleList() {
+      queryall().then((res) => {
+        if (res.success) {
+          this.rolesOptions = res.result.map((item, index, arr) => {
+            let c = { label: item.roleName, value: item.id }
+            return c;
+          })
+          console.log('this.rolesOptions: ', this.rolesOptions)
         }
-        this.modaltoggleFlag = !this.modaltoggleFlag;
-      },
-      // 根据屏幕变化,设置抽屉尺寸
-      resetScreenSize(){
-        let screenWidth = document.body.clientWidth;
-        if(screenWidth < 500){
-          this.drawerWidth = screenWidth;
-        }else{
-          this.drawerWidth = 700;
+      });
+    },
+    getUserRoles(userid) {
+      queryUserRole({ userid: userid }).then((res) => {
+        if (res.success) {
+          this.model.selectedroles = res.result.join(",");
+          console.log('that.model.selectedroles=', this.model.selectedroles)
         }
-      },
-      //初始化租户字典
-      initTenantList(){
-        getAction(this.url.queryTenantList).then(res=>{
-          if(res.success){
-            this.tenantsOptions = res.result.map((item,index,arr)=>{
-              let c = {label:item.name, value: item.id+""}
-              return c;
+      });
+    },
+    getUserDeparts(userid) {
+      let that = this;
+      getAction(that.url.userWithDepart, { userId: userid }).then((res) => {
+        if (res.success) {
+          let departOptions = [];
+          let selectDepartKeys = []
+          for (let i = 0; i < res.result.length; i++) {
+            selectDepartKeys.push(res.result[i].key);
+            //新增负责部门选择下拉框
+            departOptions.push({
+              value: res.result[i].key,
+              label: res.result[i].title
             })
-            console.log('this.tenantsOptions: ',this.tenantsOptions)
           }
-        })
-      },
-      //初始化角色字典
-      initRoleList(){
-        queryall().then((res)=>{
-          if(res.success){
-            this.rolesOptions = res.result.map((item,index,arr)=>{
-              let c = {label:item.roleName, value:item.id}
-              return c;
-            })
-            console.log('this.rolesOptions: ',this.rolesOptions)
+          that.model.selecteddeparts = selectDepartKeys.join(",")
+          that.nextDepartOptions = departOptions;
+          console.log('that.nextDepartOptions=', that.nextDepartOptions)
+        }
+      })
+    },
+    backDepartInfo(info) {
+      this.model.departIds = this.model.selecteddeparts;
+      this.nextDepartOptions = info.map((item, index, arr) => {
+        let c = { label: item.text, value: item.value + "" }
+        return c;
+      })
+    },
+    refresh() {
+      this.userId = ""
+      this.nextDepartOptions = [];
+      this.departIdShow = false;
+    },
+    close() {
+      this.$emit('close');
+      this.visible = false;
+      this.disableSubmit = false;
+      this.nextDepartOptions = [];
+      this.departIdShow = false;
+      this.$refs.form.resetFields();
+    },
+    moment,
+    handleSubmit() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = true;
+          //如果是上级择传入departIds,否则为空
+          if (this.model.userIdentity !== 2) {
+            this.model.departIds = "";
           }
-        });
-      },
-      getUserRoles(userid){
-        queryUserRole({userid:userid}).then((res)=>{
-          if(res.success){
-            this.model.selectedroles = res.result.join(",");
-            console.log('that.model.selectedroles=',this.model.selectedroles)
+          let obj;
+          if (!this.model.id) {
+            this.model.id = this.userId;
+            obj = addUser(this.model);
+          } else {
+            obj = editUser(this.model);
           }
-        });
-      },
-      getUserDeparts(userid){
-        let that = this;
-        getAction(that.url.userWithDepart,{userId:userid}).then((res)=>{
-          if(res.success){
-            let departOptions=[];
-            let selectDepartKeys=[]
-            for (let i = 0; i < res.result.length; i++) {
-              selectDepartKeys.push(res.result[i].key);
-              //新增负责部门选择下拉框
-              departOptions.push({
-                value: res.result[i].key,
-                label: res.result[i].title
-              })
+          obj.then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.$emit('ok');
+            } else {
+              that.$message.warning(res.message);
             }
-            that.model.selecteddeparts = selectDepartKeys.join(",")
-            that.nextDepartOptions=departOptions;
-            console.log('that.nextDepartOptions=',that.nextDepartOptions)
-          }
-        })
-      },
-      backDepartInfo(info) {
-        this.model.departIds = this.model.selecteddeparts;
-        this.nextDepartOptions = info.map((item,index,arr)=>{
-          let c = {label:item.text, value: item.value+""}
-          return c;
-        })
-      },
-      refresh () {
-        this.userId=""
-        this.nextDepartOptions=[];
-        this.departIdShow=false;
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-        this.disableSubmit = false;
-        this.nextDepartOptions=[];
-        this.departIdShow=false;
-        this.$refs.form.resetFields();
-      },
-      moment,
-      handleSubmit () {
-        const that = this;
-        // 触发表单验证
-        this.$refs.form.validate(valid => {
-          if (valid) {
-            that.confirmLoading = true;
-            //如果是上级择传入departIds,否则为空
-            if(this.model.userIdentity!==2){
-              this.model.departIds="";
-            }
-            let obj;
-            if(!this.model.id){
-              this.model.id = this.userId;
-              obj=addUser(this.model);
-            }else{
-              obj=editUser(this.model);
-            }
-            obj.then((res)=>{
-              if(res.success){
-                that.$message.success(res.message);
-                that.$emit('ok');
-              }else{
-                that.$message.warning(res.message);
-              }
-            }).finally(() => {
-              that.confirmLoading = false;
-              that.close();
-            })
-          }else{
-            return false;
-          }
-        })
-      },
-      handleCancel () {
-        this.close()
-      },
-      validateToNextPassword (rule, value, callback) {
-        const confirmpassword=this.model.confirmpassword;
-        if (value && confirmpassword && value !== confirmpassword) {
-          callback('两次输入的密码不一样!');
+          }).finally(() => {
+            that.confirmLoading = false;
+            that.close();
+          })
+        } else {
+          return false;
         }
-        if (value && this.confirmDirty) {
-          this.$refs.form.validateField(['confirmpassword']);
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+    validateToNextPassword(rule, value, callback) {
+      const confirmpassword = this.model.confirmpassword;
+      if (value && confirmpassword && value !== confirmpassword) {
+        callback('两次输入的密码不一样!');
+      }
+      if (value && this.confirmDirty) {
+        this.$refs.form.validateField(['confirmpassword']);
+      }
+      callback();
+    },
+    compareToFirstPassword(rule, value, callback) {
+      if (value && value !== this.model.password) {
+        callback('两次输入的密码不一样!');
+      } else {
+        callback()
+      }
+    },
+    validatePhone(rule, value, callback) {
+      if (!value) {
+        callback()
+      } else {
+        if (new RegExp(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(value)) {
+          var params = {
+            tableName: 'sys_user',
+            fieldName: 'phone',
+            fieldVal: value,
+            dataId: this.userId
+          };
+          duplicateCheck(params).then((res) => {
+            if (res.success) {
+              callback()
+            } else {
+              callback("手机号已存在!")
+            }
+          })
+        } else {
+          callback("请输入正确格式的手机号码!");
         }
-        callback();
-      },
-      compareToFirstPassword (rule, value, callback) {
-        if (value && value !== this.model.password) {
-          callback('两次输入的密码不一样!');
+      }
+    },
+    validateEmail(rule, value, callback) {
+      if (!value) {
+        callback()
+      } else {
+        if (new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)) {
+          var params = {
+            tableName: 'sys_user',
+            fieldName: 'email',
+            fieldVal: value,
+            dataId: this.userId
+          };
+          duplicateCheck(params).then((res) => {
+            console.log(res)
+            if (res.success) {
+              callback()
+            } else {
+              callback("邮箱已存在!")
+            }
+          })
         } else {
-          callback()
+          callback("请输入正确格式的邮箱!")
         }
-      },
-      validatePhone(rule, value, callback){
-        if(!value){
+      }
+    },
+    validateUsername(rule, value, callback) {
+      var params = {
+        tableName: 'sys_user',
+        fieldName: 'username',
+        fieldVal: value,
+        dataId: this.userId
+      };
+      duplicateCheck(params).then((res) => {
+        if (res.success) {
           callback()
-        }else{
-          if(new RegExp(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(value)){
-            var params = {
-              tableName: 'sys_user',
-              fieldName: 'phone',
-              fieldVal: value,
-              dataId: this.userId
-            };
-            duplicateCheck(params).then((res) => {
-              if (res.success) {
-                callback()
-              } else {
-                callback("手机号已存在!")
-              }
-            })
-          }else{
-            callback("请输入正确格式的手机号码!");
-          }
+        } else {
+          callback("用户名已存在!")
         }
-      },
-      validateEmail(rule, value, callback){
-        if(!value){
+      })
+    },
+    validateWorkNo(rule, value, callback) {
+      var params = {
+        tableName: 'sys_user',
+        fieldName: 'work_no',
+        fieldVal: value,
+        dataId: this.userId
+      };
+      duplicateCheck(params).then((res) => {
+        if (res.success) {
           callback()
-        }else{
-          if(new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value)){
-            var params = {
-              tableName: 'sys_user',
-              fieldName: 'email',
-              fieldVal: value,
-              dataId: this.userId
-            };
-            duplicateCheck(params).then((res) => {
-              console.log(res)
-              if (res.success) {
-                callback()
-              } else {
-                callback("邮箱已存在!")
-              }
-            })
-          }else{
-            callback("请输入正确格式的邮箱!")
-          }
-        }
-      },
-      validateUsername(rule, value, callback){
-        var params = {
-          tableName: 'sys_user',
-          fieldName: 'username',
-          fieldVal: value,
-          dataId: this.userId
-        };
-        duplicateCheck(params).then((res) => {
-          if (res.success) {
-            callback()
-          } else {
-            callback("用户名已存在!")
-          }
-        })
-      },
-      validateWorkNo(rule, value, callback){
-        var params = {
-          tableName: 'sys_user',
-          fieldName: 'work_no',
-          fieldVal: value,
-          dataId: this.userId
-        };
-        duplicateCheck(params).then((res) => {
-          if (res.success) {
-            callback()
-          } else {
-            callback("工号已存在!")
-          }
-        })
-      },
-      handleConfirmBlur(e) {
-        const value = e.target.value;
-        this.confirmDirty = this.confirmDirty || !!value
-      },
-      beforeUpload: function(file){
-        var fileType = file.type;
-        if(fileType.indexOf('image')<0){
-          this.$message.warning('请上传图片');
-          return false;
-        }
-        //TODO 验证文件大小
-      },
-      identityChange(e){
-        if(e.target.value===1){
-          this.departIdShow=false;
-        }else{
-          this.departIdShow=true;
+        } else {
+          callback("工号已存在!")
         }
+      })
+    },
+    handleConfirmBlur(e) {
+      const value = e.target.value;
+      this.confirmDirty = this.confirmDirty || !!value
+    },
+    beforeUpload: function (file) {
+      var fileType = file.type;
+      if (fileType.indexOf('image') < 0) {
+        this.$message.warning('请上传图片');
+        return false;
+      }
+      //TODO 验证文件大小
+    },
+    identityChange(e) {
+      if (e.target.value === 1) {
+        this.departIdShow = false;
+      } else {
+        this.departIdShow = true;
       }
     }
   }
+}
 </script>
 
 <style scoped>
-  .avatar-uploader > .ant-upload {
-    width:104px;
-    height:104px;
-  }
-  .ant-upload-select-picture-card i {
-    font-size: 49px;
-    color: #999;
-  }
-
-  .ant-upload-select-picture-card .ant-upload-text {
-    margin-top: 8px;
-    color: #666;
-  }
-
-  .ant-table-tbody .ant-table-row td{
-    padding-top:10px;
-    padding-bottom:10px;
-  }
-
-  .drawer-bootom-button {
-    position: absolute;
-    bottom: 0;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
-
-  /*【JTC-502】 添加用户两个滚动条*/
-  /deep/ .ant-drawer-body {
-    padding-bottom: 53px;
-  }
-
+.avatar-uploader>.ant-upload {
+  width: 104px;
+  height: 104px;
+}
+
+.ant-upload-select-picture-card i {
+  font-size: 49px;
+  color: #999;
+}
+
+.ant-upload-select-picture-card .ant-upload-text {
+  margin-top: 8px;
+  color: #666;
+}
+
+.ant-table-tbody .ant-table-row td {
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.drawer-bootom-button {
+  position: absolute;
+  bottom: 0;
+  width: 100%;
+  border-top: 1px solid #e8e8e8;
+  padding: 10px 16px;
+  text-align: right;
+  left: 0;
+  background: #fff;
+  border-radius: 0 0 2px 2px;
+}
+
+/*【JTC-502】 添加用户两个滚动条*/
+/deep/ .ant-drawer-body {
+  padding-bottom: 53px;
+}
 </style>

+ 155 - 0
src/views/system/modules/UserRoomRelationModal.vue

@@ -0,0 +1,155 @@
+<template>
+    <a-modal title="关联房间" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
+        @cancel="handleCancel" cancelText="关闭" style="top:20px;">
+        <a-spin :spinning="confirmLoading">
+            <div class="relation-wrapper">
+                <a-row>
+                    <a-col :span="12" style="height: 500px;overflow-y:auto;">
+                        <div class="wrapper-floor" v-for="item in roomTree" :key="item.id">
+                            <div>{{ item.name }}</div>
+                            <div class="wrapper-room">
+                                <div @click="onRoomClick(room)" class="wrapper-room-item"
+                                    :class="[selectedRooms.findIndex(s => s.id == room.id) > -1 ? 'selected-class' : '']"
+                                    v-for="room in item.rooms" :key="room.id">
+                                    {{ room.name }}
+                                </div>
+                            </div>
+                        </div>
+                    </a-col>
+
+                    <a-col :span="12" style="height: 500px;overflow-y:auto;">
+                        <div style="margin:10px;">已关联房间</div>
+                        <div style="display: flex;flex-wrap: wrap;height: max-content;">
+                            <div @click="delSelectedRoom(room)" class="wrapper-room-item-1" v-for="room in selectedRooms"
+                                :key="room.id">
+                                {{ room.name }}
+                            </div>
+                        </div>
+
+                    </a-col>
+                </a-row>
+            </div>
+        </a-spin>
+    </a-modal>
+</template>
+  
+<script>
+import { putAction, getAction, postAction } from '@/api/manage'
+import { min } from 'lodash'
+export default {
+    name: "UserRoomRelation",
+    data() {
+        return {
+            confirmLoading: false,
+            visible: false,
+            roomTree: [],
+            selectedRooms: [],
+            userId: null
+        }
+    },
+    created() {
+
+    },
+
+    methods: {
+        delSelectedRoom(r) {
+            let findIndex = this.selectedRooms.findIndex(s => s.id == r.id)
+            if (findIndex > -1) {
+                this.selectedRooms.splice(findIndex, 1)
+            }
+        },
+        onRoomClick(r) {
+            let findIndex = this.selectedRooms.findIndex(s => s.id == r.id)
+            if (findIndex > -1) {
+                this.selectedRooms.splice(findIndex, 1)
+            } else {
+                this.selectedRooms.push(r)
+            }
+        },
+        show(userId) {
+            this.userId = userId
+
+            getAction(
+                "/business/busRoomBookingOrders/rili-fangtai",
+                { start: '2023-05-19', end: '2023-06-18' }
+            ).then((res) => {
+                if (res.success) {
+                    this.roomTree = res.result.floorRoomVos;
+                    getAction(
+                        "/business/busUserRoomRelation/list",
+                        { userId: userId }
+                    ).then((res1) => {
+                        if (res1.success) {
+                            let seletedRooms = []
+                            let res1Arr = res1.result
+                            this.roomTree.forEach(l => {
+                                l.rooms.forEach(t => {
+                                    if (res1Arr.findIndex(f => f.roomId == t.id) > -1) {
+                                        seletedRooms.push(t)
+                                    }
+                                })
+                            })
+                            this.selectedRooms = seletedRooms
+                        }
+                    });
+                }
+            });
+            this.visible = true;
+        },
+        close() {
+            this.$emit('close');
+            this.visible = false;
+        },
+        handleSubmit() {
+            // 触发表单验证
+            let bodyData = this.selectedRooms.map(s => {
+                return {
+                    roomId: s.id,
+                    userId: this.userId
+                }
+            })
+            postAction("/business/busUserRoomRelation/add?userId=" + this.userId, bodyData).then(res => {
+                if (res.success) {
+                    this.$message.success("保存成功!")
+                    this.visible = false
+                }
+            })
+        },
+        handleCancel() {
+            this.close()
+        },
+    }
+}
+</script>
+<style>
+.wrapper-room {
+    display: flex;
+    flex-wrap: wrap;
+}
+
+.wrapper-room-item:hover {
+    border: 1px solid #f00;
+    color: #FFF;
+    background-color: #fF000088;
+}
+
+.selected-class,
+.wrapper-room-item-1 {
+    border: 1px solid #f00 !important;
+    color: #FFF !important;
+    background-color: #fF000088 !important;
+}
+
+.wrapper-room-item,
+.wrapper-room-item-1 {
+    width: fit-content;
+    padding: 5px 8px;
+    border: 1px solid #1890FF;
+    background-color: #1890FF88;
+    margin-left: 10px;
+    margin-top: 5px;
+    color: white;
+    border-radius: 6px;
+    cursor: pointer;
+}
+</style>

+ 131 - 0
src/views/system/modules/yezhu/BusYezhuForm.vue

@@ -0,0 +1,131 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="分成模式"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="type"
+            >
+              <a-select v-model="model.type">
+                <a-select-option :value="1">按百分比 </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="分成比例"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="commission"
+            >
+              <a-input-number
+                v-model="model.commission"
+                placeholder="请输入分成比例"
+                style="width: 20%"
+              />%
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusYezhuForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { type: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        sysUserId: [{ required: true, message: "请输入平台登录账号id!" }],
+        commission: [{ required: true, message: "请输入分成比例!" }],
+      },
+      url: {
+        add: "/business/busYezhu/add",
+        edit: "/business/busYezhu/edit",
+        queryById: "/business/busYezhu/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/system/modules/yezhu/BusYezhuModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-yezhu-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-yezhu-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusYezhuForm from './BusYezhuForm'
+  export default {
+    name: 'BusYezhuModal',
+    components: {
+      BusYezhuForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 190 - 0
src/views/system/modules/yezhu/SysUserList.vue

@@ -0,0 +1,190 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-input
+                placeholder="用户账号"
+                v-model="queryParam.username"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-input
+                placeholder="姓名"
+                v-model="queryParam.realname"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-input
+                placeholder="手机号"
+                v-model="queryParam.phone"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">选择</a>
+        </span>
+      </a-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction, getAction, postAction } from "@/api/manage";
+
+export default {
+  name: "BusMarketCouponsUsedList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {},
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      description: "sysUserList",
+      // 表头
+      columns: [
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "realname",
+        },
+
+        {
+          title: "用户名",
+          align: "center",
+          dataIndex: "username",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "phone",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 80,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/sys/user/list",
+        delete: "/sys/user/delete",
+        deleteBatch: "/sys/user/deleteBatch",
+        exportXlsUrl: "/sys/user/exportXls",
+        importExcelUrl: "sys/user/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleEdit(item) {
+      var model = { sysUserId: item.id, commission: 0 };
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      postAction("/business/busYezhu/add", model).then((res) => {
+        if (res.success) {
+          this.$message.success(res.message);
+          this.$emit("ok");
+        } else {
+          this.$message.warning(res.message);
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 58 - 0
src/views/system/modules/yezhu/SysUserModal.vue

@@ -0,0 +1,58 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <sys-user-list ref="modalSysUserModal" @ok="submitCallback"></sys-user-list>
+  </j-modal>
+</template>
+
+<script>
+  import SysUserList from "./SysUserList";
+  export default {
+    name: 'SysUserModal',
+    components: {
+      SysUserList
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        visible: false,
+        disableSubmit: false,
+        // eventId:'',
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.modalSysUserModal.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.modalSysUserModal.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 166 - 0
src/views/system/modules/yezhu/UserRoomRelationModal.vue

@@ -0,0 +1,166 @@
+<template>
+  <a-modal
+    title="关联房间"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleSubmit"
+    @cancel="handleCancel"
+    cancelText="关闭"
+    style="top: 20px"
+  >
+    <a-spin :spinning="confirmLoading">
+      <div class="relation-wrapper">
+        <a-row>
+          <a-col :span="12" style="height: 500px; overflow-y: auto">
+            <div class="wrapper-floor" v-for="item in roomTree" :key="item.id">
+              <div>{{ item.name }}</div>
+              <div class="wrapper-room">
+                <div
+                  @click="onRoomClick(room)"
+                  class="wrapper-room-item"
+                  :class="[
+                    selectedRooms.findIndex((s) => s.id == room.id) > -1
+                      ? 'selected-class'
+                      : '',
+                  ]"
+                  v-for="room in item.rooms"
+                  :key="room.id"
+                >
+                  {{ room.name }}
+                </div>
+              </div>
+            </div>
+          </a-col>
+
+          <a-col :span="12" style="height: 500px; overflow-y: auto">
+            <div style="margin: 10px">已关联房间</div>
+            <div style="display: flex; flex-wrap: wrap; height: max-content">
+              <div
+                @click="delSelectedRoom(room)"
+                class="wrapper-room-item-1"
+                v-for="room in selectedRooms"
+                :key="room.id"
+              >
+                {{ room.name }}
+              </div>
+            </div>
+          </a-col>
+        </a-row>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+  
+<script>
+import { putAction, getAction, postAction } from "@/api/manage";
+import { min } from "lodash";
+export default {
+  name: "UserRoomRelation",
+  data() {
+    return {
+      confirmLoading: false,
+      visible: false,
+      roomTree: [],
+      selectedRooms: [],
+      userId: null,
+      yezhuId: "",
+    };
+  },
+  created() {},
+
+  methods: {
+    delSelectedRoom(r) {
+      let findIndex = this.selectedRooms.findIndex((s) => s.id == r.id);
+      if (findIndex > -1) {
+        this.selectedRooms.splice(findIndex, 1);
+      }
+    },
+    onRoomClick(r) {
+      let findIndex = this.selectedRooms.findIndex((s) => s.id == r.id);
+      if (findIndex > -1) {
+        this.selectedRooms.splice(findIndex, 1);
+      } else {
+        this.selectedRooms.push(r);
+      }
+    },
+    show(record) {
+      this.selectedRooms = JSON.parse(JSON.stringify(record.inRoomList));
+      this.selectedRooms = this.selectedRooms.map((t) => {
+        return {
+          id: t.roomId,
+          name: t.roomName,
+        };
+      });
+      this.yezhuId = record.id;
+      getAction("/business/busRoomBookingOrders/rili-fangtai", {
+        start: "2023-05-19",
+        end: "2023-06-18",
+      }).then((res) => {
+        if (res.success) {
+          this.roomTree = res.result.floorRoomVos;
+        }
+      });
+      this.visible = true;
+    },
+    close() {
+      this.$emit("close");
+      this.visible = false;
+    },
+    handleSubmit() {
+      // 触发表单验证
+      let bodyData = this.selectedRooms.map((s) => {
+        return {
+          roomId: s.id,
+          busYezhuId: this.yezhuId,
+        };
+      });
+      postAction(
+        "/business/busYezhuInRoom/add?userId=" + this.userId,
+        bodyData
+      ).then((res) => {
+        if (res.success) {
+          this.$message.success("保存成功!");
+          this.$emit("ok");
+          this.visible = false;
+        }
+      });
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>
+<style>
+.wrapper-room {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.wrapper-room-item:hover {
+  border: 1px solid #f00;
+  color: #fff;
+  background-color: #ff000088;
+}
+
+.selected-class,
+.wrapper-room-item-1 {
+  border: 1px solid #f00 !important;
+  color: #fff !important;
+  background-color: #ff000088 !important;
+}
+
+.wrapper-room-item,
+.wrapper-room-item-1 {
+  width: fit-content;
+  padding: 5px 8px;
+  border: 1px solid #1890ff;
+  background-color: #1890ff88;
+  margin-left: 10px;
+  margin-top: 5px;
+  color: white;
+  border-radius: 6px;
+  cursor: pointer;
+}
+</style>

+ 126 - 0
src/views/system/modules/yezhu/shuilvForm.vue

@@ -0,0 +1,126 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item
+              label="税率"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="taxRate"
+            >
+              <a-input-number
+                v-model="model.taxRate"
+                placeholder="请输入税率"
+                style="width: 20%"
+              />%
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusYezhuForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { type: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        taxRate: [{ required: true, message: "请输入税率!" }],
+      },
+      url: {
+        add: "/business/busOtherRoomCard/add",
+        edit: "/business/busOtherRoomCard/edit",
+        queryById: "/business/busYezhu/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    getAction("/business/busOtherRoomCard/queryByHotelId", {}).then((res) => {
+      if (res.success) {
+        this.model = res.result;
+      }
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    });
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+            var _info = JSON.parse(localStorage.getItem("storeInfo"));
+            if (_info) {
+              this.model.hotelId = _info.id;
+            }
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/system/modules/yezhu/shuilvModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-yezhu-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-yezhu-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusYezhuForm from './shuilvForm'
+  export default {
+    name: 'BusYezhuModal',
+    components: {
+      BusYezhuForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>