Explorar el Código

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

DESKTOP-B78GIPM\admin hace 2 años
padre
commit
4e7423b12d
Se han modificado 100 ficheros con 22831 adiciones y 1046 borrados
  1. 2 1
      src/utils/excloudHotelIdParamPath/MemeberController.js
  2. 1 1
      src/views/fangwu/tabList/houseTypeConsumables.vue
  3. 338 0
      src/views/markets/agreementunit.vue
  4. 1 1
      src/views/markets/marketInfo.vue
  5. 1 1
      src/views/markets/meetingroomschedule.vue
  6. 499 0
      src/views/markets/modules/agreementUnit/agreementUnitDetailForm.vue
  7. 62 0
      src/views/markets/modules/agreementUnit/agreementUnitDetailModal.vue
  8. 368 0
      src/views/markets/modules/agreementUnit/agreementUnitForm.vue
  9. 84 0
      src/views/markets/modules/agreementUnit/agreementUnitModal.Style#Drawer.vue
  10. 60 0
      src/views/markets/modules/agreementUnit/agreementUnitModal.vue
  11. 279 0
      src/views/markets/modules/agreementUnit/details/contactsList.vue
  12. 265 0
      src/views/markets/modules/agreementUnit/details/customerList.vue
  13. 190 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsForm.vue
  14. 84 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.Style#Drawer.vue
  15. 68 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.vue
  16. 225 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoForm.vue
  17. 84 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.Style#Drawer.vue
  18. 68 0
      src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.vue
  19. 695 0
      src/views/room/calendarfangtai.vue
  20. 827 520
      src/views/room/fangtailive.vue
  21. 274 0
      src/views/room/forwardfangtai.vue
  22. 253 0
      src/views/room/guestorders.vue
  23. 246 0
      src/views/room/leasegoods.vue
  24. 296 0
      src/views/room/membergoodsmanage.vue
  25. 254 0
      src/views/room/membermessage.vue
  26. 826 162
      src/views/room/modules/checkIn/BillRoomForm.vue
  27. 5 5
      src/views/room/modules/checkIn/BillRoomFormModal.vue
  28. 673 154
      src/views/room/modules/checkIn/BillRoomInfo.vue
  29. 4 3
      src/views/room/modules/checkIn/BillRoomInfoModal.vue
  30. 236 0
      src/views/room/modules/checkIn/CustomerForm.vue
  31. 60 0
      src/views/room/modules/checkIn/CustomerModal.vue
  32. 496 0
      src/views/room/modules/checkIn/Payment.vue
  33. 60 0
      src/views/room/modules/checkIn/PaymentModal.vue
  34. 272 0
      src/views/room/modules/checkIn/Refund.vue
  35. 60 0
      src/views/room/modules/checkIn/RefundModal.vue
  36. 80 22
      src/views/room/modules/checkIn/SelectRoomForm.vue
  37. 2 2
      src/views/room/modules/checkIn/SelectRoomFormModal.vue
  38. 239 0
      src/views/room/modules/customer/CustomerForm.vue
  39. 60 0
      src/views/room/modules/customer/CustomerModal.vue
  40. 222 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsForm.vue
  41. 84 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.Style#Drawer.vue
  42. 60 0
      src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.vue
  43. 277 0
      src/views/room/modules/membergoodsmanage/BusMemberGoodsManageForm.vue
  44. 84 0
      src/views/room/modules/membergoodsmanage/BusMemberGoodsManageModal.Style#Drawer.vue
  45. 60 0
      src/views/room/modules/membergoodsmanage/BusMemberGoodsManageModal.vue
  46. 125 0
      src/views/room/modules/membergoodsmanage/CustomerForm.vue
  47. 60 0
      src/views/room/modules/membergoodsmanage/CustomerModal.vue
  48. 207 0
      src/views/room/modules/membermessage/BusMemberMessageForm.vue
  49. 84 0
      src/views/room/modules/membermessage/BusMemberMessageModal.Style#Drawer.vue
  50. 60 0
      src/views/room/modules/membermessage/BusMemberMessageModal.vue
  51. 1348 0
      src/views/room/modules/schedule/EditScheduleRoomForm.vue
  52. 88 0
      src/views/room/modules/schedule/EditScheduleRoomModal.vue
  53. 607 100
      src/views/room/modules/schedule/ScheduleRoomForm.vue
  54. 58 47
      src/views/room/modules/schedule/ScheduleRoomModal.vue
  55. 35 22
      src/views/room/modules/schedule/SelectRoomForm.vue
  56. 2 2
      src/views/room/modules/schedule/SelectRoomFormModal.vue
  57. 585 0
      src/views/room/modules/scheduleTeam/BatchSelectRoomTypeForm.vue
  58. 82 0
      src/views/room/modules/scheduleTeam/BatchSelectRoomTypeFormModal.vue
  59. 1335 0
      src/views/room/modules/scheduleTeam/EdiBatchScheduleRoomForm.vue
  60. 527 0
      src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeForm.vue
  61. 77 0
      src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeFormModal.vue
  62. 929 0
      src/views/room/modules/scheduleTeam/EditScheduleRoomFormMain.vue
  63. 1071 0
      src/views/room/modules/scheduleTeam/ScheduleRoomForm.vue
  64. 92 0
      src/views/room/modules/scheduleTeam/ScheduleRoomModal.vue
  65. 279 0
      src/views/room/modules/scheduleTeam/SelectRoomForm.vue
  66. 65 0
      src/views/room/modules/scheduleTeam/SelectRoomFormModal.vue
  67. 200 0
      src/views/room/scheduledetail.vue
  68. 312 0
      src/views/room/scheduleteamdetail.vue
  69. 151 0
      src/views/settings/components/pos/modules/PosMealSectionForm.vue
  70. 60 0
      src/views/settings/components/pos/modules/PosMealSectionModal.vue
  71. 151 0
      src/views/settings/components/pos/modules/PosRegionForm.vue
  72. 60 0
      src/views/settings/components/pos/modules/PosRegionModal.vue
  73. 123 0
      src/views/settings/components/pos/modules/PosSellClearGoodsForm.vue
  74. 60 0
      src/views/settings/components/pos/modules/PosSellClearGoodsModal.vue
  75. 246 0
      src/views/settings/components/pos/modules/PosTableForm.vue
  76. 60 0
      src/views/settings/components/pos/modules/PosTableModal.vue
  77. 151 0
      src/views/settings/components/pos/modules/PosTableTypeForm.vue
  78. 149 0
      src/views/settings/components/pos/modules/PosTableTypeInGoodsForm.vue
  79. 60 0
      src/views/settings/components/pos/modules/PosTableTypeInGoodsModal.vue
  80. 60 0
      src/views/settings/components/pos/modules/PosTableTypeModal.vue
  81. 318 0
      src/views/settings/components/pos/modules/PosThaliForm.vue
  82. 147 0
      src/views/settings/components/pos/modules/PosThaliInGoodsForm.vue
  83. 60 0
      src/views/settings/components/pos/modules/PosThaliInGoodsModal.vue
  84. 60 0
      src/views/settings/components/pos/modules/PosThaliModal.vue
  85. 139 0
      src/views/settings/components/pos/modules/PosTypeForm.vue
  86. 60 0
      src/views/settings/components/pos/modules/PosTypeModal.vue
  87. 465 0
      src/views/settings/components/pos/modules/SelectGoods.vue
  88. 65 0
      src/views/settings/components/pos/modules/SelectGoodsModal.vue
  89. 217 0
      src/views/settings/components/pos/modules/posTableTypeInGoods.vue
  90. 71 0
      src/views/settings/components/pos/modules/posTableTypeInGoodsListModal.vue
  91. 301 0
      src/views/settings/components/pos/posMealSection.vue
  92. 296 0
      src/views/settings/components/pos/posRegion.vue
  93. 231 0
      src/views/settings/components/pos/posSellClearGoods.vue
  94. 324 0
      src/views/settings/components/pos/posTable.vue
  95. 217 0
      src/views/settings/components/pos/posTableType.vue
  96. 309 0
      src/views/settings/components/pos/posThali.vue
  97. 325 0
      src/views/settings/components/roomModules/housePriceSchemeList.vue
  98. 47 3
      src/views/settings/components/roomModules/marketObjectiveList.vue
  99. 236 0
      src/views/settings/components/roomModules/modules/housePriceSchemeDetailList.vue
  100. 0 0
      src/views/settings/components/roomModules/modules/housePriceSchemeDetailModal.vue

+ 2 - 1
src/utils/excloudHotelIdParamPath/MemeberController.js

@@ -2,6 +2,7 @@ export default {
     name: '会员管理模块',
     excloudUrls: [
         '/business/busMemberCard/list',
-        '/business/busMemberBalanceLog/list'
+        '/business/busMemberBalanceLog/list',
+        '/bus/busCustomer/list'
     ]
 }

+ 1 - 1
src/views/fangwu/tabList/houseTypeConsumables.vue

@@ -15,7 +15,7 @@
         <j-input placeholder="商品名称" v-model="queryParam.name" style="width: 200px;margin-right:8px;"></j-input>
         <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
         <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-        <!-- <a-range-picker style="margin-right:8px;" @change="onChangeTime" /> -->
+        <!--  style="margin-right:8px;" @change="onChangeTime" /> -->
         <a-popconfirm v-if="selectedRowKeys.length > 0" title="确定删除吗?" @confirm="delBatch">
             <a-button :disabled="delLoading" :loading="delLoading" icon="stop" style="">
                 批量删除</a-button>

+ 338 - 0
src/views/markets/agreementunit.vue

@@ -0,0 +1,338 @@
+<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="4">
+                        <a-form-item>
+                            <a-input placeholder="关键字" v-model="queryParam.keyWord" allowClear></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <a-select
+                                    v-model="queryParam.customerType"
+                                    placeholder="请选择客户类型"
+                                    :allowClear="true"
+                            >
+                                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <a-select
+                                    v-model="queryParam.status"
+                                    placeholder="请选择客户状态"
+                                    :allowClear="true"
+                            >
+                                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="4">
+                        <a-form-item>
+                            <j-dict-select-tag allowClear="true" v-model="queryParam.accountStatus" placeholder="请选择账号状态" dictCode="agreement_status"/>
+                        </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>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <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>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-menu slot="overlay">-->
+<!--                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--                </a-menu>-->
+<!--                <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </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> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+            </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>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetails(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+            </a-table>
+        </div>
+
+        <agreement-unit-modal ref="modalForm" @ok="modalFormOk"></agreement-unit-modal>
+        <agreement-unit-detail-modal ref="modalDetailForm" @ok="modalFormOk"></agreement-unit-detail-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import agreementUnitModal from './modules/agreementUnit/agreementUnitModal'
+    import AgreementUnitDetailModal from './modules/agreementUnit/agreementUnitDetailModal'
+    import { httpAction, getAction } from '@/api/manage'
+
+    export default {
+        name: 'agreementunit',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            AgreementUnitDetailModal,
+            agreementUnitModal
+        },
+        data () {
+            return {
+                description: '协议单位管理页面',
+                // 表头
+                columns: [
+                    {
+                        title:'商家名称',
+                        align:"center",
+                        dataIndex: 'hotelName'
+                    },
+                    {
+                        title:'账号',
+                        align:"center",
+                        dataIndex: 'accountNo'
+                    },
+                    {
+                        title:'客户名称',
+                        align:"center",
+                        dataIndex: 'customerName'
+                    },
+                    {
+                        title:'客户类型',
+                        align:"center",
+                        dataIndex: 'customerType_dictText'
+                    },
+                    {
+                        title:'客户状态',
+                        align:"center",
+                        dataIndex: 'status_dictText'
+                    },
+                    {
+                        title:'记账额度',
+                        align:"center",
+                        dataIndex: 'bookkeeping'
+                    },
+                    {
+                        title:'已用额度',
+                        align:"center",
+                        dataIndex: 'amountUsed'
+                    },
+                    {
+                        title:'剩余额度',
+                        align:"center",
+                        dataIndex: 'balance'
+                    },
+                    {
+                        title:'备注',
+                        align:"center",
+                        dataIndex: 'remarks'
+                    },
+                    {
+                        title:'账号状态',
+                        align:"center",
+                        dataIndex: 'accountStatus_dictText'
+                    },
+                    {
+                        title:'审核状态',
+                        align:"center",
+                        dataIndex: 'checkStatus_dictText'
+                    },
+                    {
+                        title:'审核时间',
+                        align:"center",
+                        dataIndex: 'checkTime',
+                        customRender:function (text) {
+                            return !text?"":(text.length>10?text.substr(0,10):text)
+                        }
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementUnit/list",
+                    delete: "/business/busMarketAgreementUnit/delete",
+                    deleteBatch: "/business/busMarketAgreementUnit/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementUnit/exportXls",
+                    importExcelUrl: "business/busMarketAgreementUnit/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+                customerTypeList:[],
+                customerStatusList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+            this.initDictConfig();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+                var that = this;
+                //客户类型
+                var param = {
+                    dictName:'协议客户类型设置'
+                }
+                // var values = JSON.parse(JSON.stringify(param))
+                that.confirmLoading = true;
+                getAction('/business/busDictItem/queryList',param).then((res)=>{
+                    console.log(res)
+                    if(res.success){
+                        if (res.code == 200 && res.result) {
+                            this.customerTypeList = res.result;
+                        }
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false;
+                })
+
+                //客户状态
+                var param = {
+                    dictName:'协议客户状态设置'
+                }
+                // var values = JSON.parse(JSON.stringify(param))
+                that.confirmLoading = true;
+                getAction('/business/busDictItem/queryList',param).then((res)=>{
+                    console.log(res)
+                    if(res.success){
+                        if (res.code == 200 && res.result) {
+                            this.customerStatusList = res.result;
+                        }
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false;
+                })
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'customerName',text:'客户全称'})
+                fieldList.push({type:'string',value:'customerShortName',text:'客户简称'})
+                fieldList.push({type:'string',value:'customerNo',text:'客户编号'})
+                fieldList.push({type:'string',value:'contactsName',text:'联系人'})
+                fieldList.push({type:'string',value:'systemType',text:'系统类型'})
+                fieldList.push({type:'string',value:'customerType',text:'客户类型'})
+                fieldList.push({type:'string',value:'sellerId',text:'销售人员'})
+                fieldList.push({type:'string',value:'phone',text:'手机号'})
+                fieldList.push({type:'string',value:'status',text:'客户状态'})
+                fieldList.push({type:'string',value:'region',text:'地区'})
+                fieldList.push({type:'string',value:'postalCode',text:'邮编'})
+                fieldList.push({type:'string',value:'address',text:'地址'})
+                fieldList.push({type:'string',value:'companyPhone',text:'公司电话'})
+                fieldList.push({type:'string',value:'fax',text:'传真'})
+                fieldList.push({type:'string',value:'customerSource',text:'客户来源'})
+                fieldList.push({type:'string',value:'homepage',text:'主页'})
+                fieldList.push({type:'string',value:'email',text:'邮箱'})
+                fieldList.push({type:'string',value:'customerIndustry',text:'客户行业'})
+                fieldList.push({type:'int',value:'checkStatus',text:'审核状态'})
+                fieldList.push({type:'date',value:'checkTime',text:'审核时间'})
+                fieldList.push({type:'string',value:'checkBy',text:'审核人'})
+                fieldList.push({type:'string',value:'checkRemarks',text:'审核备注'})
+                fieldList.push({type:'string',value:'accountNo',text:'账户编号'})
+                fieldList.push({type:'int',value:'accountStatus',text:'账户状态'})
+                fieldList.push({type:'number',value:'amountUsed',text:'已用额度'})
+                fieldList.push({type:'number',value:'balance',text:'余额'})
+                fieldList.push({type:'number',value:'bookkeeping',text:'记账限额'})
+                fieldList.push({type:'int',value:'bookkStatus',text:'不允许该单位记账'})
+                fieldList.push({type:'int',value:'commission',text:'前台是否查询'})
+                fieldList.push({type:'int',value:'reception',text:'是否返佣'})
+                fieldList.push({type:'string',value:'remark',text:'备注'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态'})
+                this.superFieldList = fieldList
+            },
+            handleDetails:function(record){
+                this.$refs.modalDetailForm.edit(record);
+                this.$refs.modalDetailForm.title="详情";
+                this.$refs.modalDetailForm.disableSubmit = true;
+            },
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 1 - 1
src/views/markets/marketInfo.vue

@@ -27,7 +27,7 @@
         />
         <p>营销短信</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/agreementunit')">
         <img
           src="https://oss.qlan99.com/20200525/5a16520de701452d885cdcbfd2508e50.png"
         />

+ 1 - 1
src/views/markets/meetingroomschedule.vue

@@ -430,7 +430,7 @@ export default {
 <style scoped>
 @import "~@assets/less/common.less";
 </style>
-<style>
+<style scoped>
 ul {
   list-style: none;
 }

+ 499 - 0
src/views/markets/modules/agreementUnit/agreementUnitDetailForm.vue

@@ -0,0 +1,499 @@
+<template>
+    <div class="container">
+        <div class="left">
+            <a-button type="primary" style="margin-bottom: 16px" @click="toggleCollapsed">
+<!--                <a-icon :type="collapsed ? 'menu-unfold' : 'menu-fold'" />-->
+                {{collapsed ? '展开':'收起'}}
+            </a-button>
+            <a-menu
+                    :default-selected-keys="['1']"
+                    mode="inline"
+                    :inline-collapsed="collapsed"
+                    @click="handleMneuClick"
+            >
+                <a-menu-item key="1">
+                    <a-icon type="team" />
+                    <span>客户信息</span>
+                </a-menu-item>
+                <a-menu-item key="2">
+                    <a-icon type="file-text" />
+                    <span>客户协议</span>
+                </a-menu-item>
+                <a-menu-item key="3">
+                    <a-icon type="phone" />
+                    <span>联系人</span>
+                </a-menu-item>
+                <a-menu-item key="4">
+                    <a-icon type="property-safety" />
+                    <span>佣金</span>
+                </a-menu-item>
+                <a-menu-item key="5">
+                    <a-icon type="file-done" />
+                    <span>入住记录</span>
+                </a-menu-item>
+<!--                <a-sub-menu key="sub1">-->
+<!--                    <span slot="title"><a-icon type="mail" /><span>Navigation One</span></span>-->
+<!--                    <a-menu-item key="5">-->
+<!--                        Option 5-->
+<!--                    </a-menu-item>-->
+<!--                    <a-menu-item key="6">-->
+<!--                        Option 6-->
+<!--                    </a-menu-item>-->
+<!--                    <a-menu-item key="7">-->
+<!--                        Option 7-->
+<!--                    </a-menu-item>-->
+<!--                    <a-menu-item key="8">-->
+<!--                        Option 8-->
+<!--                    </a-menu-item>-->
+<!--                </a-sub-menu>-->
+            </a-menu>
+        </div>
+<!--        <a-divider type="vertical" style="height: inherit;margin-left: 20px;" />-->
+        <div class="right">
+            <div class="content">
+                <div v-if="activeMneu == 1">
+                    <a-spin :spinning="confirmLoading">
+                        <j-form-container>
+                            <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+                                <a-row :gutter="[16,16]">
+                                    <a-col :span="24">
+                                        <a-form-model-item label="选择日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                                            <div class="item-content">
+                                                <div class="list-container">
+                                                    <div class="list-item" v-for="(item, index) in dateList" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                                                        {{ item }}
+                                                    </div>
+                                                </div>
+                                                <div>
+                                                    <a-range-picker v-show="activeIndex==3" @change="onChange" size="large"/>
+                                                </div>
+                                            </div>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户全称" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerName">
+                                            <a-input disabled="disabled" v-model="model.customerName" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户简称" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerShortName">
+                                            <a-input disabled="disabled" v-model="model.customerShortName" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="系统类型" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="systemType_dictText">
+                                            <a-input disabled="disabled" v-model="model.systemType_dictText" ></a-input>
+<!--                                            <a-select-->
+<!--                                                    disabled="disabled"-->
+<!--                                                    v-model="model.systemType"-->
+<!--                                                    placeholder="请选择系统类型"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in systemTypeList" :key="index">{{ item.itemText }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户编号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerNo">
+                                            <a-input disabled="disabled" v-model="model.customerNo"></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="主联系人" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="contactsName">
+                                            <a-input disabled="disabled" v-model="model.contactsName"></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户类型" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerType_dictText">
+                                            <a-input disabled="disabled" v-model="model.customerType_dictText" ></a-input>
+<!--                                            <a-select-->
+<!--                                                    v-model="model.customerType"-->
+<!--                                                    placeholder="请选择客户类型"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="销售人员" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="sellerId_dictText">
+                                            <a-input disabled="disabled" v-model="model.sellerId_dictText"></a-input>
+<!--                                            <a-select-->
+<!--                                                    v-model="model.sellerId"-->
+<!--                                                    placeholder="请选择销售人员"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in saleList" :key="index">{{ item.name }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="手机号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="phone">
+                                            <a-input disabled="disabled" v-model="model.phone" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户状态" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="status_dictText">
+                                            <a-input disabled="disabled" v-model="model.status_dictText" ></a-input>
+<!--                                            <a-select-->
+<!--                                                    v-model="model.status"-->
+<!--                                                    placeholder="请选择客户状态"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="region">
+                                            <a-input disabled="disabled" v-model="model.region" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="邮编" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="postalCode">
+                                            <a-input disabled="disabled" v-model="model.postalCode" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="地址" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="address">
+                                            <a-input disabled="disabled" v-model="model.address" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="公司电话" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="companyPhone">
+                                            <a-input disabled="disabled" v-model="model.companyPhone" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="传真" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="fax">
+                                            <a-input disabled="disabled" v-model="model.fax" placeholder="请输入传真"  ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户来源" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerSource_dictText">
+                                            <a-input disabled="disabled" v-model="model.customerSource_dictText"></a-input>
+<!--                                            <a-select-->
+<!--                                                    v-model="model.customerSource"-->
+<!--                                                    placeholder="请选择客户来源"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in customerSourceList" :key="index">{{ item.itemText }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="主页" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="homepage">
+                                            <a-input disabled="disabled" v-model="model.homepage" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="Email" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="model.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="客户行业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="customerIndustry_dictText">
+                                            <a-input disabled="disabled" v-model="model.customerIndustry_dictText" ></a-input>
+<!--                                            <a-select-->
+<!--                                                    v-model="model.customerIndustry"-->
+<!--                                                    placeholder="请选择客户行业"-->
+<!--                                                    :allowClear="true"-->
+<!--                                            >-->
+<!--                                                <a-select-option :value="item.id" v-for="(item,index) in customerIndustryList" :key="index">{{ item.itemText }}</a-select-option>-->
+<!--                                            </a-select>-->
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="累计入住天数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="累计NoShow次数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="累计取消预计" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="同类客户排名" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="未结算佣金" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="已结算佣金" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="email">
+                                            <a-input disabled="disabled" v-model="otherModel.email" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+
+                                    <a-col :span="8">
+                                        <a-form-model-item label="记账限额" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="bookkeeping">
+                                            <a-input-number style="width: 100%;margin: auto" v-model="model.bookkeeping" :min="0" :precision="2" placeholder="请输入记账限额" />
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item label="备注" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="remark">
+                                            <a-input v-model="model.remarks" placeholder="请输入备注" ></a-input>
+                                        </a-form-model-item>
+                                    </a-col>
+                                    <a-col :span="8">
+                                        <a-form-model-item >
+                                            <a-checkbox @change="onReceptionChange" v-model="model.commissionValue">
+                                                是否返佣
+                                            </a-checkbox>
+                                            <a-checkbox @change="onReceptionChange" v-model="model.receptionValue">
+                                                前台是否查询
+                                            </a-checkbox>
+                                            <a-checkbox @change="onReceptionChange" v-model="model.bookkStatusValue">
+                                                不允许该单位记账
+                                            </a-checkbox>
+                                        </a-form-model-item>
+                                    </a-col>
+                                </a-row>
+                                <div style="width:100%;display: flex;">
+                                    <a-button type="primary" @click="submitOtherData" style="margin: auto;">保存</a-button>
+                                </div>
+                            </a-form-model>
+                        </j-form-container>
+                    </a-spin>
+                </div>
+                <div v-if="activeMneu == 2">
+                    <customer-list :agreementModel="model"></customer-list>
+                </div>
+                <div v-if="activeMneu == 3">
+                    <contacts-list :agreementModel="model"></contacts-list>
+                </div>
+                <div v-if="activeMneu == 4">
+                    佣金
+                </div>
+                <div v-if="activeMneu == 5">
+                    入住记录
+                </div>
+            </div>
+        </div>
+
+    </div>
+</template>
+
+<script>
+    import { httpAction, getAction } from '@/api/manage'
+    import '@/assets/less/TableExpand.less'
+    import CustomerList from './details/customerList'
+    import ContactsList from './details/contactsList'
+
+    export default {
+        name: 'agreementUnitDetailForm',
+        components: { ContactsList, CustomerList },
+        computed: {
+            formDisabled(){
+                return this.disabled
+            },
+        },
+        data() {
+            return {
+                collapsed: false,
+                activeMneu: 1,
+                dateList: ['今天', '昨日', '本周', '更多'],
+                activeIndex: 0,
+                model:{
+                    receptionValue:false,
+                    commissionValue:false,
+                    bookkStatusValue:false,
+                },
+                otherModel:{
+
+                },
+                labelCol: {
+                    xs: { span: 24 },
+                    sm: { span: 2 },
+                },
+                wrapperCol: {
+                    xs: { span: 24 },
+                    sm: { span: 20 },
+                },
+                labelCol1: {
+                    xs: { span: 24 },
+                    sm: { span: 8 },
+                },
+                wrapperCol1: {
+                    xs: { span: 24 },
+                    sm: { span: 14 },
+                },
+                confirmLoading: false,
+                validatorRules:{
+                    customerName: [
+                        { required: true, message: '请输入客户全称!'},
+                    ],
+                    customerShortName: [
+                        { required: true, message: '请输入客户简称!'},
+                    ],
+                    systemType_dictText: [
+                        { required: true, message: '请选择系统类型!'},
+                    ],
+                    customerNo: [
+                        { required: true, message: '请输入客户编号!'},
+                    ],
+                    contactsName: [
+                        { required: true, message: '请输入主联系人!'},
+                    ],
+                    customerType_dictText: [
+                        { required: true, message: '请选择客户类型!'},
+                    ],
+                    sellerId_dictText: [
+                        { required: true, message: '请选择销售人员!'},
+                    ],
+                    phone: [
+                        { required: true, message: '请输入手机号!'},
+                    ],
+                    status_dictText: [
+                        { required: true, message: '请选择状态!'},
+                    ],
+                    customerSource_dictText: [
+                        { required: true, message: '请选择客户来源!'},
+                    ],
+                    customerIndustry_dictText: [
+                        { required: true, message: '请选择客户行业!'},
+                    ],
+                },
+                url: {
+                    editOther: "/business/busMarketAgreementUnit/editOther",
+                    queryById: "/business/busMarketAgreementUnit/queryById",
+                    query_saleList: "/business/busSalesPerson/queryList",
+                },
+            };
+        },
+        created() {
+        },
+        methods: {
+            add() {
+                this.edit(this.modelDefault);
+            },
+            edit(record) {
+                console.log(record)
+                this.model = Object.assign({}, record);
+                this.visible = true;
+
+                this.model.receptionValue = record.reception == 1?true:false;
+                this.model.commissionValue = record.commission == 1?true:false;
+                this.model.bookkStatusValue = record.bookkStatus == 1?true:false;
+            },
+            toggleCollapsed() {
+                this.collapsed = !this.collapsed;
+            },
+            handleMneuClick(e) {
+                console.log('click', e);
+                console.log('click', e.key);
+                this.activeMneu = e.key;
+            },
+            handleClick(index) {
+                this.activeIndex = index
+                // this.searchQuery()
+                console.log(index)
+                switch (index) {
+                    case 0:
+                        console.log('今天')
+                        break;
+                    case 1:
+                        console.log('昨天')
+                        break;
+                    case 2:
+                        console.log('本周')
+                        break;
+                }
+            },
+            onChange(date, dateString) {
+                console.log(date, dateString)
+            },
+            onReceptionChange(e){
+                // console.log(e)
+                //
+                // console.log(this.model)
+                // var newModel = this.model
+                // newModel.receptionValue = e.target.checked
+                // newModel.reception = 1
+                // this.$nextTick(() => {
+                //     this.$set(this.model, 'receptionValue', e.target.checked)
+                //     this.$set(this.model, 'reception', e.target.checked?1:0)
+                // })
+                this.$forceUpdate();
+            },
+            submitOtherData(){
+                var that = this;
+                that.confirmLoading = true;
+                let httpurl = this.url.editOther;
+                let method = 'put';
+                var param = {
+                    id:that.model.id,
+                    bookkeeping:that.model.bookkeeping,
+                    remarks:that.model.remarks,
+                    reception:that.model.receptionValue?1:0,
+                    commission:that.model.commissionValue?1:0,
+                    bookkStatus:that.model.bookkStatusValue?1:0,
+                };
+                console.log(param);
+                httpAction(httpurl,param,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>
+
+<style scoped>
+    .container{
+        display: flex;
+        flex-direction: row;
+    }
+    .right{
+        flex: 3;
+    }
+    .content{
+        width: 100%;
+        margin: auto;
+        margin-top: 60px;
+    }
+    .item-content{
+        display: flex;
+        flex-direction: row;
+        /*align-items: center;*/
+        /*justify-items: center;*/
+    }
+    .list-container {
+        display: grid;
+        grid-template-columns: 1fr 1fr 1fr 1fr;
+        border: solid 1px #d9d9d9;
+        width: 260px;
+        border-radius: 5px;
+        margin-right: 10px;
+        overflow: hidden;
+        /*height: 32px;*/
+        /*line-height: 32px;*/
+    }
+
+    .list-item {
+        padding: 0px;
+        border-right: solid 1px #d9d9d9;
+        cursor: pointer;
+        text-align: center;
+    }
+
+    .list-item.active {
+        background-color: #1890ff;
+        color: #fff;
+    }
+</style>

+ 62 - 0
src/views/markets/modules/agreementUnit/agreementUnitDetailModal.vue

@@ -0,0 +1,62 @@
+<template>
+    <j-modal
+            :title="title"
+            :width="width"
+            :visible="visible"
+            switchFullscreen
+            :footer="null"
+            @ok="handleOk"
+            :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+            @cancel="handleCancel"
+            cancelText="关闭">
+        <agreement-unit-detail-form ref="realDetailForm" @ok="submitCallback" :disabled="disableSubmit"></agreement-unit-detail-form>
+    </j-modal>
+</template>
+
+<script>
+
+    import agreementUnitDetailForm from './agreementUnitDetailForm'
+    export default {
+        name: 'agreementUnitDetailModal',
+        components: {
+            agreementUnitDetailForm
+        },
+        data () {
+            return {
+                title:'',
+                width:1400,
+                visible: false,
+                disableSubmit: false
+            }
+        },
+        methods: {
+            add () {
+                this.visible=true
+                this.$nextTick(()=>{
+                    this.$refs.realDetailForm.add();
+                })
+            },
+            edit (record) {
+                this.visible=true
+                this.$nextTick(()=>{
+                    this.$refs.realDetailForm.edit(record);
+                })
+            },
+            close () {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk () {
+                this.$refs.realDetailForm.submitForm();
+            },
+            submitCallback(){
+                this.$emit('ok');
+                this.visible = false;
+            },
+            handleCancel () {
+                this.close()
+            }
+        }
+    }
+</script>
+

+ 368 - 0
src/views/markets/modules/agreementUnit/agreementUnitForm.vue

@@ -0,0 +1,368 @@
+<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="customerName">
+              <a-input v-model="model.customerName" placeholder="请输入客户全称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerShortName">
+              <a-input v-model="model.customerShortName" placeholder="请输入客户简称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="系统类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemType">
+<!--              <a-input v-model="model.systemType" placeholder="请输入系统类型"  ></a-input>-->
+              <a-select
+                      v-model="model.systemType"
+                      placeholder="请选择系统类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in systemTypeList" :key="index">{{ item.itemText }}</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="customerNo">
+              <a-input v-model="model.customerNo" placeholder="请输入客户编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contactsName">
+              <a-input v-model="model.contactsName" placeholder="请输入主联系人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerType">
+<!--              <a-input v-model="model.customerType" placeholder="请输入客户类型"  ></a-input>-->
+              <a-select
+                      v-model="model.customerType"
+                      placeholder="请选择客户类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</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="sellerId">
+<!--              <a-input v-model="model.sellerId" placeholder="请输入销售人员"  ></a-input>-->
+              <a-select
+                      v-model="model.sellerId"
+                      placeholder="请选择销售人员"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in saleList" :key="index">{{ item.name }}</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="phone">
+              <a-input v-model="model.phone" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+<!--              <a-input v-model="model.status" placeholder="请输入客户状态"  ></a-input>-->
+              <a-select
+                      v-model="model.status"
+                      placeholder="请选择客户状态"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</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="region">
+              <a-input v-model="model.region" placeholder="请输入地区"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postalCode">
+              <a-input v-model="model.postalCode" placeholder="请输入邮编"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyPhone">
+              <a-input v-model="model.companyPhone" placeholder="请输入公司电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="传真" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fax">
+              <a-input v-model="model.fax" placeholder="请输入传真"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerSource">
+<!--              <a-input v-model="model.customerSource" placeholder="请输入客户来源"  ></a-input>-->
+              <a-select
+                      v-model="model.customerSource"
+                      placeholder="请选择客户来源"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerSourceList" :key="index">{{ item.itemText }}</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="homepage">
+              <a-input v-model="model.homepage" placeholder="请输入主页"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="Email" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
+              <a-input v-model="model.email" placeholder="请输入Email"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户行业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerIndustry">
+<!--              <a-input v-model="model.customerIndustry" placeholder="请输入客户行业"  ></a-input>-->
+              <a-select
+                      v-model="model.customerIndustry"
+                      placeholder="请选择客户行业"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerIndustryList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </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: 'BusAgreementUnitForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+            customerName: [
+              { required: true, message: '请输入客户全称!'},
+           ],
+            customerShortName: [
+                { required: true, message: '请输入客户简称!'},
+            ],
+            systemType: [
+                { required: true, message: '请选择系统类型!'},
+            ],
+            customerNo: [
+                { required: true, message: '请输入客户编号!'},
+            ],
+            contactsName: [
+                { required: true, message: '请输入主联系人!'},
+            ],
+            customerType: [
+                { required: true, message: '请选择客户类型!'},
+            ],
+            sellerId: [
+                { required: true, message: '请选择销售人员!'},
+            ],
+            phone: [
+                { required: true, message: '请输入手机号!'},
+            ],
+            status: [
+                { required: true, message: '请选择状态!'},
+            ],
+            customerSource: [
+                { required: true, message: '请选择客户来源!'},
+            ],
+            customerIndustry: [
+                { required: true, message: '请选择客户行业!'},
+            ],
+        },
+        url: {
+          add: "/business/busMarketAgreementUnit/add",
+          edit: "/business/busMarketAgreementUnit/edit",
+          queryById: "/business/busMarketAgreementUnit/queryById",
+          query_saleList: "/business/busSalesPerson/queryList",
+        },
+        saleList:[],
+        systemTypeList:[],
+        customerTypeList:[],
+        customerStatusList:[],
+        customerSourceList:[],
+        customerIndustryList:[]
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      getAction(this.url.query_saleList,{}).then((res)=>{
+        if(res.success){
+          this.saleList = res.result
+        }else{
+
+        }
+      })
+      this.getDictConfig();
+    },
+    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"));
+              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;
+            })
+          }
+
+        })
+      },
+      getDictConfig(){
+        var that = this;
+        //系统类型
+        var param = {
+          dictName:'协议系统类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.systemTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户类型
+        var param = {
+          dictName:'协议客户类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户状态
+        var param = {
+          dictName:'协议客户状态设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerStatusList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户来源
+        var param = {
+          dictName:'客人来源设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerSourceList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户行业
+        var param = {
+          dictName:'协议客户行业设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerIndustryList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      }
+    }
+  }
+</script>

+ 84 - 0
src/views/markets/modules/agreementUnit/agreementUnitModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></agreement-unit-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import agreementUnitForm from './agreementUnitForm'
+
+  export default {
+    name: 'agreementUnitModal',
+    components: {
+      agreementUnitForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/markets/modules/agreementUnit/agreementUnitModal.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="关闭">
+    <agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></agreement-unit-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import agreementUnitForm from './agreementUnitForm'
+  export default {
+    name: 'agreementUnitModal',
+    components: {
+      agreementUnitForm
+    },
+    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>

+ 279 - 0
src/views/markets/modules/agreementUnit/details/contactsList.vue

@@ -0,0 +1,279 @@
+<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>
+                            <j-input placeholder="客户名称" v-model="queryParam.name" allowClear></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>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <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>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-menu slot="overlay">-->
+<!--                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--                </a-menu>-->
+<!--                <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- 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>
+                    <a-divider type="vertical" />
+                    <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                        <a>删除</a>
+                    </a-popconfirm>
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleDetail(record)">详情</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                -->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
+                </span>
+            </a-table>
+        </div>
+        <market-agreement-contacts-modal ref="modalContactsForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-contacts-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import marketAgreementContactsModal from './modules/marketAgreementContactsModal'
+
+    export default {
+        name: 'contactsList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            marketAgreementContactsModal
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: '协议单位-联系人管理页面',
+                // 表头
+                queryParam: {},
+                columns: [
+                    {
+                        title:'名称',
+                        align:"center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title:'性别',
+                        align:"center",
+                        dataIndex: 'sex_dictText'
+                    },
+                    {
+                        title:'出生日期',
+                        align:"center",
+                        dataIndex: 'birthday',
+                        customRender:function (text) {
+                            return !text?"":(text.length>10?text.substr(0,10):text)
+                        }
+                    },
+                    {
+                        title:'称呼',
+                        align:"center",
+                        dataIndex: 'calls_dictText'
+                    },
+                    {
+                        title:'部门',
+                        align:"center",
+                        dataIndex: 'department'
+                    },
+                    {
+                        title:'公司电话',
+                        align:"center",
+                        dataIndex: 'companyPhone'
+                    },
+                    {
+                        title:'手机号',
+                        align:"center",
+                        dataIndex: 'phone'
+                    },
+                    {
+                        title:'家庭电话',
+                        align:"center",
+                        dataIndex: 'homePhone'
+                    },
+                    {
+                        title:'职务',
+                        align:"center",
+                        dataIndex: 'post'
+                    },
+                    {
+                        title:'邮编',
+                        align:"center",
+                        dataIndex: 'postalCode'
+                    },
+                    {
+                        title:'Email',
+                        align:"center",
+                        dataIndex: 'email'
+                    },
+                    {
+                        title:'地址',
+                        align:"center",
+                        dataIndex: 'address'
+                    },
+                    {
+                        title:'爱好',
+                        align:"center",
+                        dataIndex: 'hobby'
+                    },
+                    {
+                        title:'备注',
+                        align:"center",
+                        dataIndex: 'remarks'
+                    },
+                    {
+                        title: '更新时间',
+                        align: "center",
+                        dataIndex: 'updateTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementContacts/list?agreementId="+this.agreementModel.id,
+                    delete: "/business/busMarketAgreementContacts/delete",
+                    deleteBatch: "/business/busMarketAgreementContacts/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementContacts/exportXls",
+                    importExcelUrl: "business/busMarketAgreementContacts/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'agreementId',text:'关联协议'})
+                fieldList.push({type:'string',value:'name',text:'姓名'})
+                fieldList.push({type:'int',value:'sex',text:'性别(0-默认未知,1-男,2-女)'})
+                fieldList.push({type:'date',value:'birthday',text:'生日'})
+                fieldList.push({type:'int',value:'calls',text:'称呼'})
+                fieldList.push({type:'string',value:'department',text:'部门'})
+                fieldList.push({type:'string',value:'companyPhone',text:'公司电话'})
+                fieldList.push({type:'string',value:'phone',text:'手机号'})
+                fieldList.push({type:'string',value:'homePhone',text:'家庭电话'})
+                fieldList.push({type:'string',value:'post',text:'职务'})
+                fieldList.push({type:'string',value:'postalCode',text:'邮编'})
+                fieldList.push({type:'string',value:'email',text:'电子邮件'})
+                fieldList.push({type:'string',value:'address',text:'地址'})
+                fieldList.push({type:'string',value:'hobby',text:'爱好'})
+                fieldList.push({type:'string',value:'remarks',text:'备注'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            },
+            handleEdit: function (record) {
+                this.$refs.modalContactsForm.edit(record);
+                this.$refs.modalContactsForm.title = "编辑";
+                this.$refs.modalContactsForm.disableSubmit = false;
+            },
+            handleAdd: function () {
+                this.$refs.modalContactsForm.add();
+                this.$refs.modalContactsForm.title = "新增";
+                this.$refs.modalContactsForm.disableSubmit = false;
+            },
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 265 - 0
src/views/markets/modules/agreementUnit/details/customerList.vue

@@ -0,0 +1,265 @@
+<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>
+                            <j-input placeholder="协议主题" v-model="queryParam.name" allowClear></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>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--            <a-button type="primary" icon="download" @click="handleExportXls('bus_market_agreement_customer_info')">导出</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>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-menu slot="overlay">-->
+<!--                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--                </a-menu>-->
+<!--                <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- 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="priceSlot" slot-scope="text,record">
+                    <a-button type="primary" @click="e=>handleHousePrice(e,record)">
+                        查看
+                    </a-button>
+                </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>
+                     <a-divider type="vertical" />
+                    <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                        <a>删除</a>
+                    </a-popconfirm>
+<!--                    <a-divider type="vertical" />-->
+<!--                      <a-dropdown>-->
+<!--                        <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--                        <a-menu slot="overlay">-->
+<!--                          <a-menu-item>-->
+<!--                            <a @click="handleDetail(record)">详情</a>-->
+<!--                          </a-menu-item>-->
+<!--                          <a-menu-item>-->
+<!--                            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                              <a>删除</a>-->
+<!--                            </a-popconfirm>-->
+<!--                          </a-menu-item>-->
+<!--                        </a-menu>-->
+<!--                      </a-dropdown>-->
+                </span>
+            </a-table>
+        </div>
+
+        <market-agreement-customer-info-modal ref="modalCustomerForm" @ok="modalFormOk" :agreementModel="agreementModel"></market-agreement-customer-info-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import marketAgreementCustomerInfoModal from './modules/marketAgreementCustomerInfoModal'
+
+    export default {
+        name: 'customerList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            marketAgreementCustomerInfoModal
+        },
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data () {
+            return {
+                description: 'bus_market_agreement_customer_info管理页面',
+                // 表头
+                queryParam: {},
+                columns: [
+                    {
+                        title: '协议类型',
+                        align: "center",
+                        dataIndex: 'type_dictText'
+                    },
+                    {
+                        title: '协议主题',
+                        align: "center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title: '客户签约人',
+                        align: "center",
+                        dataIndex: 'customerSignatory'
+                    },
+                    {
+                        title: '本司签约人',
+                        align: "center",
+                        dataIndex: 'companySignatory'
+                    },
+                    {
+                        title: '协议单号',
+                        align: "center",
+                        dataIndex: 'number'
+                    },
+                    {
+                        title: '签约时间',
+                        align: "center",
+                        dataIndex: 'signTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '折扣值',
+                        align: "center",
+                        dataIndex: 'discount'
+                    },
+                    {
+                        title: '更新时间',
+                        align: "center",
+                        dataIndex: 'updateTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '协议房价',
+                        align: "center",
+                        dataIndex: 'id',
+                        scopedSlots: { customRender: "priceSlot" },
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align: "center",
+                        fixed: "right",
+                        width: 147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busMarketAgreementCustomer/list?agreementId="+this.agreementModel.id,
+                    delete: "/business/busMarketAgreementCustomer/delete",
+                    deleteBatch: "/business/busMarketAgreementCustomer/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementCustomer/exportXls",
+                    importExcelUrl: "business/busMarketAgreementCustomer/importExcel",
+
+                },
+                dictOptions: {},
+                superFieldList: [],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+            console.log(this.agreementModel)
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'agreementId',text:'关联协议'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'name',text:'协议主题'})
+                fieldList.push({type:'string',value:'type',text:'协议类型'})
+                fieldList.push({type:'string',value:'number',text:'协议单号'})
+                fieldList.push({type:'date',value:'signTime',text:'签约时间'})
+                fieldList.push({type:'date',value:'effective',text:'有效期'})
+                fieldList.push({type:'int',value:'secrecy',text:'佣金信息保密'})
+                fieldList.push({type:'string',value:'customerSignatory',text:'客户签约人'})
+                fieldList.push({type:'string',value:'companySignatory',text:'本司签约人'})
+                fieldList.push({type:'string',value:'content',text:'内容'})
+                fieldList.push({type:'string',value:'remarks',text:'备注'})
+                fieldList.push({type:'int',value:'roomType',text:'计佣类型(0-固定计佣;1-房类计佣)'})
+                fieldList.push({type:'int',value:'commissionUnit',text:'佣金单位(0-元;1-%)'})
+                fieldList.push({type:'number',value:'dailyCommission',text:'每日佣金'})
+                fieldList.push({type:'int',value:'commission',text:'每日计佣(0-否;1-是)'})
+                fieldList.push({type:'int',value:'fixedDiscount',text:'使用固定房价折扣(0-否;1-是)'})
+                fieldList.push({type:'number',value:'discount',text:'房价固定折扣'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+                this.superFieldList = fieldList
+            },
+            handleEdit: function (record) {
+                this.$refs.modalCustomerForm.edit(record);
+                this.$refs.modalCustomerForm.title = "编辑";
+                this.$refs.modalCustomerForm.disableSubmit = false;
+            },
+            handleAdd: function () {
+                this.$refs.modalCustomerForm.add();
+                this.$refs.modalCustomerForm.title = "新增";
+                this.$refs.modalCustomerForm.disableSubmit = false;
+            },
+            handleHousePrice(e,record){
+                console.log(e,record)
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less';
+</style>

+ 190 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsForm.vue

@@ -0,0 +1,190 @@
+<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="name">
+              <a-input v-model="model.name" placeholder="请输入姓名"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
+<!--              <a-input-number v-model="model.sex" placeholder="请输入性别(0-默认未知,1-男,2-女)" style="width: 100%" />-->
+              <j-dict-select-tag v-model="model.sex" placeholder="请选择性别" dictCode="sex"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="出生日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="birthday">
+              <j-date placeholder="请选择出生日期" v-model="model.birthday"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="称呼" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="calls">
+<!--              <a-input-number v-model="model.calls" placeholder="请输入称呼" style="width: 100%" />-->
+              <j-dict-select-tag v-model="model.calls" placeholder="请选择称呼" dictCode="calls"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="department">
+              <a-input v-model="model.department" placeholder="请输入部门"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyPhone">
+              <a-input v-model="model.companyPhone" placeholder="请输入公司电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
+              <a-input v-model="model.phone" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="家庭电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="homePhone">
+              <a-input v-model="model.homePhone" placeholder="请输入家庭电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="post">
+              <a-input v-model="model.post" placeholder="请输入职务"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postalCode">
+              <a-input v-model="model.postalCode" placeholder="请输入邮编"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="Email" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
+              <a-input v-model="model.email" placeholder="请输入Email"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="爱好" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hobby">
+              <a-input v-model="model.hobby" placeholder="请输入爱好"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+              <a-input v-model="model.remarks" placeholder="请输入备注"  ></a-input>
+            </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'
+  const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+
+  export default {
+    name: 'marketAgreementContactsForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           name: [
+              { required: true, message: '请输入姓名!'},
+           ],
+          phone: [
+            { required: true, message: '请输入手机号!'},
+          ],
+          email: [
+            { required: true, message: '请输入Email!'},
+          ],
+        },
+        url: {
+          add: "/business/busMarketAgreementContacts/add",
+          edit: "/business/busMarketAgreementContacts/edit",
+          queryById: "/business/busMarketAgreementContacts/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      console.log(this.agreementModel)
+    },
+    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';
+              this.model.hotelId = hotelInfo.id;
+              this.model.agreementId = this.agreementModel.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>

+ 84 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <market-agreement-contacts-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></market-agreement-contacts-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import marketAgreementContactsForm from './marketAgreementContactsForm'
+
+  export default {
+    name: 'marketAgreementContactsModal',
+    components: {
+      marketAgreementContactsForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 68 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementContactsModal.vue

@@ -0,0 +1,68 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <market-agreement-contacts-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :agreementModel="agreementModel"></market-agreement-contacts-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import marketAgreementContactsForm from './marketAgreementContactsForm'
+  export default {
+    name: 'marketAgreementContactsModal',
+    components: {
+      marketAgreementContactsForm
+    },
+    props: {
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    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>

+ 225 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoForm.vue

@@ -0,0 +1,225 @@
+<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="accountNo">
+              <a-input disabled="disabled" v-model="agreementModel.accountNo" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerShortName">
+              <a-input disabled="disabled" v-model="agreementModel.customerShortName" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <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">
+            <a-form-model-item label="协议类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
+<!--              <a-input v-model="model.type" placeholder="请输入协议类型"  ></a-input>-->
+              <a-select
+                      v-model="model.type"
+                      placeholder="请选择协议类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in typeList" :key="index">{{ item.itemText }}</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="number">
+              <a-input v-model="model.number" placeholder="请输入协议单号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="签约时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="signTime">
+              <j-date placeholder="请选择签约时间" v-model="model.signTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="effective">
+              <j-date placeholder="请选择有效期" v-model="model.effective"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="佣金信息保密" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="secrecy">
+<!--              <a-input-number v-model="model.secrecy" placeholder="请输入佣金信息保密" style="width: 100%" />-->
+              <a-radio-group name="radioGroup" v-model="model.secrecy">
+                <a-radio :value="1">
+                  是
+                </a-radio>
+                <a-radio :value="0">
+                  否
+                </a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户签约人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerSignatory">
+              <a-input v-model="model.customerSignatory" placeholder="请输入客户签约人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="本司签约人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companySignatory">
+              <a-input v-model="model.companySignatory" placeholder="请输入本司签约人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+              <a-input v-model="model.remarks" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content">
+              <a-textarea v-model="model.content" rows="4" placeholder="请输入内容" />
+            </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'
+  const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+
+  export default {
+    name: 'marketAgreementCustomerInfoForm',
+    components: {},
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      },
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    data() {
+      return {
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+          name: [
+            { required: true, message: '请输入协议主题!' },
+          ],
+          type: [
+            { required: true, message: '请选择协议类型!' },
+          ],
+          number: [
+            { required: true, message: '请输入协议单号!' },
+          ],
+          signTime: [
+            { required: true, message: '请选择签约时间!' },
+          ],
+          effective: [
+            { required: true, message: '请选择有效期!' },
+          ],
+          secrecy: [
+            { required: true, message: '请选择佣金信息是否保密!' },
+          ],
+          customerSignatory: [
+            { required: true, message: '请输入客户签约人!' },
+          ],
+          companySignatory: [
+            { required: true, message: '请输入本司签约人!' },
+          ],
+        },
+        url: {
+          add: "/business/busMarketAgreementCustomer/add",
+          edit: "/business/busMarketAgreementCustomer/edit",
+          queryById: "/business/busMarketAgreementCustomer/queryById"
+        },
+        typeList:[]
+      }
+    },
+    computed: {
+      formDisabled() {
+        return this.disabled
+      },
+    },
+    created() {
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      console.log(this.agreementModel)
+      this.getDictConfig();
+    },
+    methods: {
+      getDictConfig(){
+        var that = this;
+        var param = {
+          dictName:'协议类型设置'
+        }
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.typeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      },
+      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';
+              this.model.hotelId = hotelInfo.id;
+              this.model.agreementId = this.agreementModel.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>

+ 84 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <market-agreement-customer-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></market-agreement-customer-info-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import marketAgreementCustomerInfoForm from './marketAgreementCustomerInfoForm'
+
+  export default {
+    name: 'marketAgreementCustomerInfoModal',
+    components: {
+      marketAgreementCustomerInfoForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 68 - 0
src/views/markets/modules/agreementUnit/details/modules/marketAgreementCustomerInfoModal.vue

@@ -0,0 +1,68 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <market-agreement-customer-info-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :agreementModel="agreementModel"></market-agreement-customer-info-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import marketAgreementCustomerInfoForm from './marketAgreementCustomerInfoForm'
+  export default {
+    name: 'marketAgreementCustomerInfoModal',
+    components: {
+      marketAgreementCustomerInfoForm
+    },
+    props: {
+      agreementModel:{
+        type: Object,
+        required: false,
+        default: () => {
+        }
+      }
+    },
+    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>

+ 695 - 0
src/views/room/calendarfangtai.vue

@@ -0,0 +1,695 @@
+<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="">
+              <a-select v-model="queryParam.gradeId" placeholder="全部房型">
+                <a-select-option value="全天房">全天房</a-select-option>
+                <a-select-option value="钟点房">钟点房</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select v-model="queryParam.gradeId" placeholder="全部楼层">
+                <a-select-option value="1001">1001</a-select-option>
+                <a-select-option value="1002">1002</a-select-option>
+              </a-select>
+            </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 -->
+    <div class="course-week">
+      <div class="week-top">
+        <div class="week-btn-wrap">
+          <span @click="getLastWeek">上周</span>
+          <span @click="getCurWeek">本周</span>
+          <span @click="getNextWeek">下周</span>
+        </div>
+        <span class="w-today-date"> {{ todayDate }}</span>
+        <div class="w-choose-status">
+          <div v-for="sta in cardStatus">
+            <span class="square" :style="{ background: sta.color }"></span>
+            <span class="title">{{ sta.title }}</span>
+          </div>
+        </div>
+      </div>
+      <div class="week-table">
+        <div class="table-header">
+          <div class="table-week">
+            <template v-for="(item, index) of weeks">
+              <span class="w-first" v-if="index === 0" :key="index">{{
+                item
+              }}</span>
+              <span v-else :key="index">{{ item }}</span>
+            </template>
+          </div>
+          <div class="w-table-date">
+            <template v-for="(item, index) of months">
+              <span class="w-first" v-if="index === 0" :key="index"> </span>
+              <template v-else>
+                <span
+                  :key="index"
+                  class="w-day-item"
+                  :class="{ 'w-isCurDate': item && item.isCurDate }"
+                >
+                  {{
+                    `${
+                      item && item.isCurDate
+                        ? (item && item.showDate + "(今天)") || ""
+                        : (item && item.showDate) || ""
+                    }`
+                  }}
+                </span>
+              </template>
+            </template>
+          </div>
+        </div>
+        <div class="w-time-period-list">
+          <ul
+            class="w-time-period-row"
+            v-for="(i, i_index) in planList2"
+            :key="i_index"
+          >
+            <!--循环时段,看时段有多少个-->
+            <template v-if="i.child && i.child.length > 0">
+              <li
+                class="w-time-period-col"
+                v-for="(period, p_index) in i.child"
+                :key="`period${p_index}`"
+              >
+                <!--第一列显示时段-->
+                <div class="w-time-period">
+                  1001
+                </div>
+                <!-- 后面显示周一到周日的计划-->
+                <div class="w-row-day">
+                  <!-- 循环显示每周的日期-->
+                  <template v-for="(month, m_index) of months">
+                    <!-- v-if="month" 去除数据处理的时候移除数组第一个为empty的问题-->
+                    <div
+                      v-if="month"
+                      :key="`month${m_index}`"
+                      class="w-things"
+                      @click="handleCardDetail(month, period)"
+                    >
+                      <!-- 循环每个时间段的计划-->
+                      <template v-for="(card, t_index) of period.schedule">
+                        <template
+                          v-if="card.key == month.date"
+                          v-for="(single, sIndex) in card.value"
+                        >
+                          <div style="width: 80%">
+                            <a-popover placement="rightTop">
+                              <template slot="content">
+                                <p>会议室:{{ i.meetingRoomName }}</p>
+                                <p>会议主题:{{ single.roomSchedule.theme }}</p>
+                                <p>公司名称:{{ single.roomSchedule.name }}</p>
+                                <p>
+                                  预定人:{{ single.roomSchedule.destinedName }}
+                                </p>
+                                <p>
+                                  联系电话:{{ single.roomSchedule.mobile }}
+                                </p>
+                                <p>是否结账:未结账</p>
+                                <p>备注:{{ single.roomSchedule.remark }}</p>
+                              </template>
+                              <template slot="title">
+                                <span>详情</span>
+                              </template>
+
+                              <div
+                                :key="`thing${sIndex}`"
+                                class="w-thing-item"
+                                @click.stop="handleDetail(single)"
+                                :style="{
+                                  background:
+                                    cardStatus[single.detail.status].color,
+                                }"
+                              >
+                                <span>{{ single.theme }}</span>
+                              </div>
+                            </a-popover>
+                          </div>
+                        </template>
+                      </template>
+                    </div>
+                  </template>
+                </div>
+              </li>
+            </template>
+            <!-- <div class="w-noMore" v-else><span>暂无数据</span></div> -->
+          </ul>
+        </div>
+      </div>
+    </div>
+    <!-- <bus-meeting-room-schedule-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-modal>
+    <bus-meeting-room-schedule-confirm-modal
+      ref="modalBusMeetingRoomScheduleConfirm"
+      @ok="modalFormOk"
+    ></bus-meeting-room-schedule-confirm-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+// import { mixinDevice } from "@/utils/mixin";
+// import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction, getAction } from "@/api/manage";
+// import BusMeetingRoomScheduleModal from "./modules/meetingRoomSchedule/BusMeetingRoomScheduleModal.vue";
+// import BusMeetingRoomScheduleConfirmModal from "./modules/meetingRoomSchedule/BusMeetingRoomScheduleConfirmModal.vue";
+
+export default {
+  name: "BusMeetingRoomList",
+  // mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // BusMeetingRoomScheduleModal,
+    // BusMeetingRoomScheduleConfirmModal,
+  },
+  data() {
+    const planList = [
+      {
+        timePeriod: "上午",
+        schedule: [
+          {
+            key: "2023-03-15",
+            value: [
+              {
+                theme: "大会议室",
+                status: 1,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+          {
+            key: "2023-03-14",
+            value: [
+              {
+                theme: "大会议室",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+        ],
+      },
+      {
+        timePeriod: "下午",
+        schedule: [
+          {
+            key: "2023-03-15",
+            value: [
+              {
+                theme: "大会议室1111111111111111111111111",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+          {
+            key: "2023-03-14",
+            value: [
+              {
+                theme: "大会议室",
+                status: 0,
+                meeting_room_schedule: {}, //预定信息实体
+              },
+            ],
+          },
+        ],
+      },
+      {
+        timePeriod: "晚上",
+        schedule: [],
+      },
+    ];
+    return {
+      queryParam:{},
+      isFirstDayOfMondayOrSunday: 1,
+      cardStatus: {
+        0: {
+          title: "空闲中",
+          color: "#3291F8",
+        },
+        1: {
+          title: "已入住",
+          color: "#FF6200",
+        },
+      },
+      weeks: ["房间", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+      todayDate: "",
+      months: [],
+      curDate: "",
+      nowDate: new Date(),
+      planList2: [
+        // { meetingRoomName: "大会议", child: planList },
+        // { meetingRoomName: "大会议2", child: planList },
+      ],
+      startDate: "",
+      endDate: "",
+    };
+  },
+  watch: {
+    isFirstDayOfMondayOrSunday: {
+      handler(val) {
+        if (val > 1) {
+          let arr = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
+          const arr1 = arr.slice(val - 1);
+          const arr2 = arr.slice(0, val - 1);
+          this.weeks = ["房间", ...arr1, ...arr2];
+        }
+      },
+      immediate: true,
+    },
+  },
+  mounted() {
+    this.getCurWeek();
+  },
+  created() {},
+  methods: {
+    searchQuery(){
+
+    },
+    modalFormOk() {
+      this.loadData();
+    },
+    loadData() {
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      getAction("/business/busMeetingRoomSchedule/fetch", {
+        startDate: this.startDate,
+        endDate: this.endDate,
+        hotelId: _info.id,
+      }).then((res) => {
+        if (res.success) {
+          this.planList2 = res.result;
+        }
+      });
+    },
+    /**
+     * 获取 时间
+     * @param time
+     */
+    getWeek(time) {
+      this.curDate = new Date(time);
+      //当前是周几
+      const whichDay = time.getDay();
+      let num = 0;
+      if (this.isFirstDayOfMondayOrSunday <= whichDay) {
+        num = this.isFirstDayOfMondayOrSunday;
+      } else {
+        num = this.isFirstDayOfMondayOrSunday - 7;
+      }
+      const weekDay = time.getDay() - num;
+      time = this.addDate(time, weekDay * -1);
+      for (let i = 0; i < 7; i++) {
+        const { year, month, day } = this.formatDate(
+          i === 0 ? time : this.addDate(time, 1)
+        );
+        this.months.push({
+          date: `${year}-${month}-${day}`,
+          showDate: `${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        });
+      }
+      this.months.sort((a, b) => a.timestamp - b.timestamp);
+      delete this.months[0];
+      this.todayDate = `${this.months[1].date} ~ ${
+        this.months[this.months.length - 1].date
+      }`;
+
+      this.startDate = this.months[1].date + " 00:00:00";
+      this.endDate = this.months[this.months.length - 1].date + " 00:00:00";
+      this.loadData();
+    },
+    /**
+     * 处理日期
+     * @param date
+     * @param n
+     * @returns {*}
+     */
+    addDate(date, n) {
+      date.setDate(date.getDate() + n);
+      return date;
+    },
+    /**
+     * 上周
+     */
+    getLastWeek() {
+      const date = this.addDate(this.curDate, -7),
+        { year, month, day } = this.formatDate(date),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(date);
+      this.$emit("changeWeek", dateObj);
+    },
+    /**
+     * 本周
+     */
+    getCurWeek() {
+      const { year, month, day } = this.formatDate(new Date()),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(new Date());
+      this.$emit("changeWeek", dateObj);
+    },
+    //日期格式处理
+    formatDate(date) {
+      var year = date.getFullYear();
+      var months = date.getMonth() + 1;
+      var month = (months < 10 ? "0" + months : months).toString();
+      var day = (
+        date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
+      ).toString();
+      return {
+        year: year.toString(),
+        month,
+        day,
+      };
+    },
+    /**
+     * 获取当天时间
+     * @returns {string}
+     */
+    getCurDay(num = 0) {
+      var datetime = new Date();
+      var year = datetime.getFullYear();
+      var month =
+        datetime.getMonth() + 1 < 10
+          ? "0" + (datetime.getMonth() + 1)
+          : datetime.getMonth() + 1;
+      let day = datetime.getDate();
+      if (day + num > 0) {
+        day =
+          day + num < 10
+            ? "0" + (datetime.getDate() + num)
+            : datetime.getDate() + num;
+      } else {
+        day =
+          day - num < 10
+            ? "0" + (datetime.getDate() - num)
+            : datetime.getDate() - num;
+      }
+      return `${year}-${month}-${day}`;
+    },
+    /**
+     * 下周
+     */
+    getNextWeek() {
+      const date = this.addDate(this.curDate, 7),
+        { year, month, day } = this.formatDate(date),
+        dateObj = {
+          date: `${year}-${month}-${day}`,
+          timestamp: new Date(`${year}-${month}-${day}`).getTime(),
+        };
+      this.dealDate(date);
+      this.$emit("changeWeek", dateObj);
+    },
+    /**
+     * 显示当天日期状态
+     * @param date
+     */
+    dealDate(date) {
+      this.months = [""];
+      this.getWeek(date);
+      const curDate = this.getCurDay();
+      this.months.forEach((item) => {
+        item.isCurDate = item.date === curDate;
+      });
+    },
+    /**
+     * 预定确认
+     * @param row
+     */
+    handleDetail(row) {
+      console.log("row", row);
+      this.$refs.modalBusMeetingRoomScheduleConfirm.edit(row);
+      this.$refs.modalBusMeetingRoomScheduleConfirm.title = "预定确认";
+      this.$refs.modalBusMeetingRoomScheduleConfirm.disableSubmit = false;
+      this.$refs.modalBusMeetingRoomScheduleConfirm.disableSubmit = true;
+    },
+    /**
+     * 预定登记
+     * @param month
+     * @param period
+     */
+    handleCardDetail(month, period) {
+      this.$refs.modalForm.add();
+      this.$refs.modalForm.title = "预定登记";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>
+<style scoped>
+ul {
+  list-style: none;
+}
+
+ul,
+li {
+  margin: 0;
+  padding: 0;
+}
+
+.course-week {
+  width: 100%;
+  border: 1px solid #ddd;
+  padding: 1%;
+  box-sizing: border-box;
+}
+
+.week-top {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: 40px;
+  padding: 0 1%;
+  box-sizing: border-box;
+}
+
+.week-top .week-btn-wrap {
+  width: 200px;
+  display: flex;
+  justify-content: space-around;
+  color: #409eff;
+}
+
+.week-top .week-btn-wrap span {
+  cursor: pointer;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 15px;
+}
+
+.w-today-date {
+  font-weight: bold;
+  font-size: 16px;
+}
+
+.w-choose-status {
+  display: flex;
+  /* justify-content: flex-end; */
+  width: 200px;
+}
+
+.w-choose-status > div {
+  width: 100%;
+  flex: 1;
+  display: flex;
+  padding: 0 2%;
+  white-space: nowrap;
+  line-height: 20px;
+  box-sizing: border-box;
+}
+
+.w-choose-status > div .square {
+  display: flex;
+  width: 16px;
+  height: 16px;
+  border-radius: 4px;
+  box-sizing: border-box;
+}
+
+.w-choose-status > div .title {
+  display: flex;
+  align-items: center;
+  line-height: 16px;
+  padding-left: 4px;
+  font-size: 14px;
+  box-sizing: border-box;
+}
+
+.week-table {
+  display: flex;
+  flex-direction: column;
+}
+
+.week-table .table-header {
+  width: 100%;
+  height: 80px;
+  background: #eaedf2;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+}
+
+.table-header .w-table-date,
+.table-week {
+  width: 100%;
+  height: 40px;
+  text-align: left;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.table-header .w-table-date > span,
+.table-week > span {
+  flex: 1;
+  color: #000;
+  height: 100%;
+  font-size: 14px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-weight: bold;
+}
+
+.w-table-date .w-day-item,
+.table-week .w-day-item {
+  color: #000;
+  font-size: 14px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.week-table .w-time-period-list {
+  width: 100%;
+}
+
+.w-time-period-list .w-time-period-row {
+  width: 100%;
+  min-height: 60px;
+}
+
+.w-time-period-col {
+  width: 100%;
+  min-height: 60px;
+  display: flex;
+}
+
+.w-time-period-col .w-time-period {
+  width: 12.5%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-left: 1px solid #eaedf2;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+}
+.w-time-period-col:last-child {
+  border-bottom: 1px solid #eaedf2;
+}
+.meeting-room-center {
+  transform: translate(-200%, 0%);
+  width: 14px;
+  font-size: 14px;
+  word-wrap: break-word;
+  position: absolute;
+}
+
+.w-time-period-col .w-row-day {
+  width: 87.5%;
+  display: flex;
+  justify-content: center;
+}
+
+.w-row-day .w-things {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  border-left: 1px solid #eaedf2;
+  border-bottom: 1px solid #eaedf2;
+  box-sizing: border-box;
+  cursor: pointer;
+  background-color: rgb(50, 145, 248);
+}
+
+.w-row-day .w-things:last-child {
+  border-right: 1px solid #eaedf2;
+}
+
+.w-things .w-thing-item {
+  display: flex;
+  width: 80%;
+  font-size: 14px;
+  flex-direction: column;
+  justify-content: space-around;
+  min-height: 50px;
+  border-radius: 10px;
+  margin: 2% 1%;
+  padding: 1% 2%;
+  cursor: pointer;
+  color: #fff;
+  background: #ff6200;
+  box-sizing: border-box;
+  transition: all 1s linear 0.5s;
+}
+
+.w-isCurDate {
+  color: #ff2525 !important;
+}
+
+.w-noMore {
+  min-height: 200px;
+  padding: 2%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border: 1px solid rgba(156, 173, 173, 0.3);
+  color: #9cadadb7;
+  box-sizing: border-box;
+}
+
+.w_expand,
+.w_shrink {
+  color: #0a98d5;
+  cursor: pointer;
+  width: 100%;
+  padding: 2% 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 827 - 520
src/views/room/fangtailive.vue


+ 274 - 0
src/views/room/forwardfangtai.vue

@@ -0,0 +1,274 @@
+<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="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </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
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 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"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template
+          :slot="item.dataIndex"
+          slot-scope="text, record, index"
+          v-for="item in columns"
+        >
+          <!-- <editable-cell
+            :text="text"
+            @change="onCellChange(item.dataIndex, index, $event)"
+          /> -->
+          0/0/{{ text }}
+        </template>
+        <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>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm
+                  title="确定删除吗?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <bus-member-balance-log-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-balance-log-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin2";
+import { formatDate } from "@/utils/util";
+import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
+import { httpAction, postAction,getAction } from "@/api/manage";
+const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+import moment from "moment";
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 7));
+export default {
+  name: "BusMemberBalanceLogList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    EditableCell,
+  },
+  data() {
+    return {
+      description: "远期房态",
+      queryParam: {
+        gradeId: "全天房",
+        startTime: moment(new Date()).format("YYYY-MM-DD"),
+        endTime: moment(endDate).format("YYYY-MM-DD"),
+      },
+      datetime: [
+        moment(new Date(), "YYYY-MM-DD"),
+        moment(endDate, "YYYY-MM-DD"),
+      ],
+      setColumns: true,
+      // 表头
+      columns: [
+        {
+          title: "房型",
+          align: "center",
+          dataIndex: "layout_name",
+        },
+      ],
+      url: {
+        list:
+          "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id,
+        delete: "/business/busMemberBalanceLog/delete",
+        deleteBatch: "/business/busMemberBalanceLog/deleteBatch",
+        exportXlsUrl: "/business/busMemberBalanceLog/exportXls",
+        importExcelUrl: "business/busMemberBalanceLog/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    // this.getSuperFieldList();
+    getAction(
+      "/business/busHotel/list",
+      { pageNo: 1, pageSize: 100 }
+    ).then((res) => {
+      if (res.success) {
+        this.hotelList = res.result.records;
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.dataSource];
+      const target = dataSource[dataIndex];
+      if (target) {
+        target[key] = value;
+        this.dataSourcea = dataSource;
+      }
+      console.log("this.dataSource", this.dataSource);
+
+      postAction("/rooms/cesRoomLayoutPriceDate/editPrice", {
+        roomLayoutPriceId: target.price_id,
+        date: key,
+        price: value,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    moment,
+    searchQuery() {
+      if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
+        this.url.list = "/rooms/cesRoomLayoutPriceDate/pageList";
+      } else {
+        this.url.list =
+          "/rooms/cesRoomLayoutPriceDate/pageList?hotelIds[]=" + hotelInfo.id;
+      }
+      this.loadData(1);
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+    },
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "memberId", text: "会员id" });
+      fieldList.push({ type: "int", value: "type", text: "类型" });
+      fieldList.push({ type: "number", value: "money", text: "充值金额" });
+      fieldList.push({ type: "number", value: "balance", text: "金额余额" });
+      fieldList.push({ type: "number", value: "giveMoney", text: "赠送金额" });
+      fieldList.push({ type: "string", value: "remarks", text: "备注" });
+      fieldList.push({ type: "string", value: "staffId", text: "推荐员工" });
+      fieldList.push({
+        type: "string",
+        value: "paymentMethod",
+        text: "支付方式",
+      });
+      fieldList.push({ type: "number", value: "payMoney", text: "支付金额" });
+      fieldList.push({ type: "string", value: "code", text: "流水号" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 253 - 0
src/views/room/guestorders.vue

@@ -0,0 +1,253 @@
+<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="">
+              <a-input placeholder="房号" v-model="queryParam.roomNo"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-input placeholder="手机号" v-model="queryParam.userMobile"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model="queryParam.commentType"
+                style="width: 100%"
+                placeholder="类型"
+              >
+                <a-select-option value="1">正常入住</a-select-option>
+                <a-select-option value="2">未结离点</a-select-option>
+              </a-select>
+            </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
+              > -->
+            </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>
+
+          <a-divider type="vertical" /> -->
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <ces-order-message-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-message-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import CesOrderMessageModal from "./modules/CesOrderMessageModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "CesOrderMessageList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // CesOrderMessageModal,
+  },
+  data() {
+    return {
+      description: "客单",
+      // 表头
+      columns: [
+        {
+          title: "单号",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "客人/电话",
+          align: "center",
+          dataIndex: "messageType",
+          customRender: function (text) {
+            return text == 1 ? "投诉" : "建议";
+          },
+        },
+        {
+          title: "客人类型",
+          align: "center",
+          dataIndex: "contentBody",
+          customRender: function (text) {
+            return text == 1 ? "投诉" : "建议";
+          },
+        },
+        {
+          title: "入住类型",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "房型",
+          align: "center",
+          dataIndex: "userMobile",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "房价",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderMessage/list",
+        delete: "/order/cesOrderMessage/delete",
+        deleteBatch: "/order/cesOrderMessage/deleteBatch",
+        exportXlsUrl: "/order/cesOrderMessage/exportXls",
+        importExcelUrl: "order/cesOrderMessage/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    getAction("/business/busHotel/list", { pageNo: 1, pageSize: 100 }).then(
+      (res) => {
+        if (res.success) {
+          this.hotelList = res.result.records;
+        }
+      }
+    );
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 246 - 0
src/views/room/leasegoods.vue

@@ -0,0 +1,246 @@
+<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="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['租借开始日期', '租借结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </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
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>
+    <!-- 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">
+          <template v-if="!record.revertDate">
+            <a @click="handleEdit(record)">编辑</a>
+
+            <a-divider type="vertical"
+          /></template>
+          <a @click="handleDelete(record.id)">删除</a>
+          <template v-if="!record.revertDate">
+            <a-divider type="vertical" />
+            <a @click="handleRevert(record.id)">归还</a></template
+          >
+        </span>
+      </a-table>
+    </div>
+
+    <ces-order-lease-goods-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></ces-order-lease-goods-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import CesOrderLeaseGoodsModal from "./modules/leasegoods/CesOrderLeaseGoodsModal";
+import { httpAction, postAction, getAction } from "@/api/manage";
+export default {
+  name: "租借物品",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    CesOrderLeaseGoodsModal,
+  },
+  data() {
+    return {
+      description: "客单",
+      // 表头
+      columns: [
+        {
+          title: "单号",
+          align: "center",
+          dataIndex: "orderNo",
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "物品",
+          align: "center",
+          dataIndex: "goodsId",
+        },
+        {
+          title: "数量",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "押金",
+          align: "center",
+          dataIndex: "deposit",
+        },
+        {
+          title: "租借时间",
+          align: "center",
+          dataIndex: "createDate",
+        },
+        {
+          title: "归还时间",
+          align: "center",
+          dataIndex: "revertDate",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/order/cesOrderLeaseGoods/list",
+        delete: "/order/cesOrderLeaseGoods/delete",
+        deleteBatch: "/order/cesOrderLeaseGoods/deleteBatch",
+        exportXlsUrl: "/order/cesOrderLeaseGoods/exportXls",
+        importExcelUrl: "order/cesOrderLeaseGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+      datetime: [],
+    };
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    onChange(e, dateString) {
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    handleRevert(id) {
+      var that = this;
+      postAction("/order/cesOrderLeaseGoods/revert", { id: id }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.loadData();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "userId", text: "用户ID" });
+      fieldList.push({
+        type: "int",
+        value: "messageType",
+        text: "留言类型 1 投诉 2建议",
+      });
+      fieldList.push({ type: "string", value: "images", text: "图片逗号分隔" });
+      fieldList.push({ type: "string", value: "contentBody", text: "内容" });
+      fieldList.push({ type: "string", value: "userName", text: "姓名" });
+      fieldList.push({ type: "string", value: "userMobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 296 - 0
src/views/room/membergoodsmanage.vue

@@ -0,0 +1,296 @@
+<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="">
+              <a-input
+                placeholder="姓名"
+                v-model="queryParam.userName"
+              ></a-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
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </div>
+
+    <!-- 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">
+          <template v-if="!record.receiverUser">
+            <a @click="receiver(record)">领取</a>
+
+            <a-divider type="vertical" />
+          </template>
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <bus-member-goods-manage-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-goods-manage-modal>
+
+    <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMemberGoodsManageModal from "./modules/membergoodsmanage/BusMemberGoodsManageModal";
+import CustomerModal from "./modules/membergoodsmanage/CustomerModal";
+export default {
+  name: "BusMemberGoodsManageList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMemberGoodsManageModal,
+    CustomerModal,
+  },
+  data() {
+    return {
+      description: "bus_member_goods_manage管理页面",
+      // 表头
+      columns: [
+        {
+          title: "物品类型",
+          align: "center",
+          dataIndex: "goodsType",
+          customRender: function (text) {
+            return text == 1 ? "贵重物品" : "遗失物品";
+          },
+        },
+        {
+          title: "物品名称",
+          align: "center",
+          dataIndex: "goodsName",
+        },
+        {
+          title: "参考价值",
+          align: "center",
+          dataIndex: "referenceValue",
+        },
+        {
+          title: "客人类型",
+          align: "center",
+          dataIndex: "customerType",
+          customRender: function (text) {
+            var msg = "";
+            if (text == 1) {
+              msg = "在住客人";
+            } else if (text == 2) {
+              msg = "离店客人";
+            } else {
+              msg = "其他";
+            }
+            return msg;
+          },
+        },
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "客人姓名",
+          align: "center",
+          dataIndex: "customerName",
+        },
+        {
+          title: "电话",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "登记单号",
+          align: "center",
+          dataIndex: "orderNo",
+        },
+        {
+          title: "备注",
+          align: "center",
+          dataIndex: "remark",
+        },
+        {
+          title: "存放时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "存放操作员",
+          align: "center",
+          dataIndex: "createUser",
+        },
+        {
+          title: "领取人",
+          align: "center",
+          dataIndex: "receiverUser",
+        },
+        {
+          title: "领取时间",
+          align: "center",
+          dataIndex: "receiverDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMemberGoodsManage/list",
+        delete: "/business/busMemberGoodsManage/delete",
+        deleteBatch: "/business/busMemberGoodsManage/deleteBatch",
+        exportXlsUrl: "/business/busMemberGoodsManage/exportXls",
+        importExcelUrl: "business/busMemberGoodsManage/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    receiver(row) {
+      this.$refs.modalCustomerForm.edit(row);
+      this.$refs.modalCustomerForm.title = "领取";
+      this.$refs.modalCustomerForm.disableSubmit = false;
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "int", value: "goodsType", text: "物品类型" });
+      fieldList.push({ type: "string", value: "goodsName", text: "物品名称" });
+      fieldList.push({
+        type: "string",
+        value: "reference Value",
+        text: "参考价值",
+      });
+      fieldList.push({ type: "int", value: "customerType", text: "客人类型" });
+      fieldList.push({
+        type: "string",
+        value: "livingOrderId",
+        text: "入住订单id",
+      });
+      fieldList.push({ type: "string", value: "roomNo", text: "房号号" });
+      fieldList.push({
+        type: "string",
+        value: "customerName",
+        text: "客人姓名",
+      });
+      fieldList.push({ type: "string", value: "mobile", text: "电话" });
+      fieldList.push({ type: "string", value: "orderNo", text: "登记单号" });
+      fieldList.push({ type: "string", value: "remark", text: "备注" });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      fieldList.push({ type: "string", value: "createUser", text: "创建人" });
+      fieldList.push({ type: "string", value: "receiverUser", text: "领取人" });
+      fieldList.push({ type: "date", value: "receiverDate", text: "领取时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 254 - 0
src/views/room/membermessage.vue

@@ -0,0 +1,254 @@
+<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="">
+              <a-input placeholder="姓名" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['提醒开始日期', '提醒结束日期']"
+                @change="onChange"
+                v-model="datetime"
+                :allowClear="false"
+              />
+            </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
+              > -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      
+    </div>
+
+    <!-- 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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <bus-member-message-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-message-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMemberMessageModal from "./modules/membermessage/BusMemberMessageModal";
+
+export default {
+  name: "BusMemberMessageList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMemberMessageModal,
+  },
+  data() {
+    return {
+      description: "bus_member_message管理页面",
+      // 表头
+      columns: [
+        {
+          title: "房号",
+          align: "center",
+          dataIndex: "roomNo",
+        },
+        {
+          title: "留言人",
+          align: "center",
+          dataIndex: "userName",
+        },
+        {
+          title: "自动提醒时间",
+          align: "center",
+          dataIndex: "remindDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "有效时间",
+          align: "center",
+          dataIndex: "validDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "是否传达",
+          align: "center",
+          dataIndex: "relay",
+          customRender: function (text) {
+            return !text ? "否" : "是";
+          },
+        },
+        {
+          title: "留言内容",
+          align: "center",
+          dataIndex: "contentBody",
+        },
+        {
+          title: "创建时间",
+          align: "center",
+          dataIndex: "createDate",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMemberMessage/list",
+        delete: "/business/busMemberMessage/delete",
+        deleteBatch: "/business/busMemberMessage/deleteBatch",
+        exportXlsUrl: "/business/busMemberMessage/exportXls",
+        importExcelUrl: "business/busMemberMessage/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      datetime: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    onChange(e, dateString) {
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "roomId", text: "房号id" });
+      fieldList.push({
+        type: "string",
+        value: "livingOrderId",
+        text: "入住订单id",
+      });
+      fieldList.push({ type: "string", value: "userName", text: "留言人" });
+      fieldList.push({
+        type: "date",
+        value: "remindDate",
+        text: "自动提醒时间",
+      });
+      fieldList.push({ type: "date", value: "validDate", text: "有效时间" });
+      fieldList.push({ type: "int", value: "relay", text: "是否传达" });
+      fieldList.push({
+        type: "string",
+        value: "contentBody",
+        text: "留言内容",
+      });
+      fieldList.push({ type: "date", value: "createDate", text: "创建时间" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 826 - 162
src/views/room/modules/checkIn/BillRoomForm.vue


+ 5 - 5
src/views/room/modules/checkIn/BillRoomFormModal.vue

@@ -24,7 +24,7 @@ export default {
   data() {
     return {
       title: "",
-      width: 1200,
+      width: 1300,
       visible: false,
       disableSubmit: false,
     };
@@ -36,10 +36,10 @@ export default {
         this.$refs.realForm.add2(record);
       });
     },
-    addList(record) {
+    addList(record,key) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.addList(record);
+        this.$refs.realForm.addList(record,key);
       });
     },
     edit(record) {
@@ -55,8 +55,8 @@ export default {
     handleOk() {
       this.$refs.realForm.submitForm();
     },
-    submitCallback() {
-      this.$emit("ok");
+    submitCallback(e) {
+      this.$emit("ok",e);
       this.visible = false;
     },
     handleCancel() {

+ 673 - 154
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -23,124 +23,227 @@
               <a-icon
                 type="compass"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
-              /><a-button type="link"> 拆分房间 </a-button>
+              /><a-button
+                type="link"
+                :disabled="selectRoomId == '1'"
+                @click="splitLiving"
+              >
+                拆分房间
+              </a-button>
             </div>
           </div>
         </div>
         <a-divider />
+        <a-tabs @change="tabChange">
+          <a-tab-pane
+            :key="item.roomId"
+            v-for="(item, livingIndex) in model.livingRoomIds"
+          >
+            <span slot="tab">
+              {{ item.roomName }}
+              <a-badge
+                dot
+                :number-style="{ backgroundColor: '#52c41a' }"
+                v-if="item.livingOrder.settleType == 1"
+              >
+                <span style="font-size: 12px">已结退房</span>
+              </a-badge>
+              <a-badge
+                dot
+                :number-style="{ backgroundColor: '#52c41a' }"
+                v-if="item.livingOrder.settleType == 2"
+              >
+                <span style="font-size: 12px">未结退房</span>
+              </a-badge>
+            </span>
+            <a-descriptions :column="2">
+              <a-descriptions-item label="主客姓名">
+                {{ item.livingCustomers[0].customerName }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="性别">
+                {{
+                  item.livingCustomers[0].gender === 1 ? "男" : "女"
+                }}</a-descriptions-item
+              >
+              <a-descriptions-item label="房间数量">
+                {{ livingIndex == 0 ? model.livingRoomIds.length : 1 }}间
+              </a-descriptions-item>
+              <a-descriptions-item label="手机号">
+                {{ item.livingCustomers[0].phone }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
 
-        <a-descriptions :column="2">
-          <a-descriptions-item label="主客姓名">
-            张三
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="房间数量"> 3间 </a-descriptions-item>
-          <a-descriptions-item label="手机号">
-            1588888888
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="房间号"> 8888/9999 </a-descriptions-item>
-          <a-descriptions-item label="宾客类型">
-            散客
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="入住时间">
-            2023-03-21 18:55
-          </a-descriptions-item>
-          <a-descriptions-item label="房价方案">
-            会员京卡折扣
-          </a-descriptions-item>
-          <a-descriptions-item label="预离时间">
-            2023-03-21 18:55
-          </a-descriptions-item>
-          <a-descriptions-item label="订单来源">
-            美团
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="已住时长"> 3天 </a-descriptions-item>
-          <a-descriptions-item label="外部单号">
-            MT8888888888
-          </a-descriptions-item>
-          <a-descriptions-item label="销售员工">
-            无
-            <a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-          /></a-descriptions-item>
-          <a-descriptions-item label="订单备注" :span="2">
-            该房间打碎玻璃杯1只,应赔付80元<a-icon
-              type="edit"
-              style="color: rgba(255, 141, 26, 1); font-size: 18px"
-            />
-          </a-descriptions-item>
-          <a-descriptions-item
-            label="叫醒服务"
-            :span="2"
-            v-for="(item, index) in wakeList"
-            :key="index"
+              <a-descriptions-item label="宾客类型">
+                {{ customerTypeName(model.orderInfo.customerType) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="入住时间">
+                {{ model.orderInfo.arrivalTime }}
+              </a-descriptions-item>
+              <a-descriptions-item label="房价方案"> -- </a-descriptions-item>
+              <a-descriptions-item label="预离时间">
+                {{ model.orderInfo.dueOutTime }}
+              </a-descriptions-item>
+              <a-descriptions-item label="订单来源">
+                {{ customerSourceName(model.orderInfo.customerSource) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="入住类型">
+                {{ model.orderInfo.bookingType == 1 ? "全天" : "钟点" }}
+              </a-descriptions-item>
+              <a-descriptions-item label="入住天数">
+                {{ model.orderInfo.dayCount }}
+              </a-descriptions-item>
+              <a-descriptions-item label="早餐券">
+                {{ model.orderInfo.breakfastNum }}
+              </a-descriptions-item>
+              <a-descriptions-item label="外部单号">
+                {{ model.orderInfo.outerOrdersNo }}
+              </a-descriptions-item>
+              <a-descriptions-item label="销售员工">
+                {{ warranterName(model.orderInfo.warranter) }}
+                <a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+              /></a-descriptions-item>
+              <a-descriptions-item label="订单备注" :span="2">
+                {{ model.orderInfo.remark
+                }}<a-icon
+                  type="edit"
+                  style="color: rgba(255, 141, 26, 1); font-size: 18px"
+                />
+              </a-descriptions-item>
+              <a-descriptions-item
+                label="叫醒服务"
+                :span="2"
+                v-for="(item, index) in wakeList"
+                :key="index"
+              >
+                <a-select
+                  style="width: 100px"
+                  placeholder="房间号"
+                  @change="onChange"
+                >
+                  <a-select-option value="jack"> 1001 </a-select-option>
+                  <a-select-option value="lucy"> 1002 </a-select-option>
+                </a-select>
+                <a-date-picker
+                  style="width: 120px; margin-left: 2px"
+                  placeholder="日期"
+                  @change="onChange"
+                />
+                <a-time-picker
+                  style="width: 100px; margin-left: 2px"
+                  :default-value="moment('12:08', 'HH:mm')"
+                  format="HH:mm"
+                />
+                <a-icon
+                  v-if="wakeList.length - 1 == index"
+                  type="plus-circle"
+                  class="dynamic-delete-button"
+                  @click="puls()"
+                />
+                <a-icon
+                  type="minus-circle"
+                  style="color: #f56c6c"
+                  class="dynamic-delete-button"
+                  v-if="wakeList.length > 1"
+                  @click="() => remove(index)"
+                />
+              </a-descriptions-item>
+            </a-descriptions>
+            <div style="display: flex; justify-content: space-between">
+              <h4
+                style="
+                  color: rgba(255, 141, 26, 1);
+                  font-weight: 600;
+                  margin-top: 15px;
+                "
+              >
+                同住人
+              </h4>
+              <div style="display: flex">
+                <div style="display: flex; flex-direction: column">
+                  <a-icon
+                    type="user-add"
+                    style="color: rgba(255, 141, 26, 1); font-size: 18px"
+                  /><a-button
+                    type="link"
+                    @click="addlivingCustomer(item.livingOrder.id, item.roomId)"
+                  >
+                    添加
+                  </a-button>
+                </div>
+              </div>
+            </div>
+            <div id="livingCustomers-grid">
+              <a-row
+                v-for="(customer, index) in item.livingCustomers"
+                :key="customer.id"
+              >
+                <template v-if="index > 0">
+                  <a-col :span="7"> {{ customer.customerName }} </a-col>
+                  <a-col :span="1"
+                    >{{ customer.gender == 1 ? "男" : "女" }}
+                  </a-col>
+                  <a-col :span="8"> {{ customer.certNo }}</a-col>
+                  <a-col :span="6"> {{ customer.phone }}</a-col>
+                  <a-col :span="2">
+                    <a-icon
+                      type="minus-circle"
+                      style="color: #f56c6c"
+                      class="dynamic-delete-button"
+                      @click="() => removeLivingCustomer(customer.id)"
+                  /></a-col>
+                </template>
+              </a-row>
+            </div>
+          </a-tab-pane>
+        </a-tabs>
+        <template v-if="vipCustomer && vipCustomer.id">
+          <h4
+            style="
+              color: rgba(255, 141, 26, 1);
+              font-weight: 600;
+              margin-top: 50px;
+            "
           >
-            <a-select
-              style="width: 100px"
-              placeholder="房间号"
-              @change="onChange"
-            >
-              <a-select-option value="jack"> 1001 </a-select-option>
-              <a-select-option value="lucy"> 1002 </a-select-option>
-            </a-select>
-            <a-date-picker
-              style="width: 120px; margin-left: 2px"
-              placeholder="日期"
-              @change="onChange"
-            />
-            <a-time-picker
-              style="width: 100px; margin-left: 2px"
-              :default-value="moment('12:08', 'HH:mm')"
-              format="HH:mm"
-            />
-            <a-icon
-              v-if="wakeList.length - 1 == index"
-              type="plus-circle"
-              class="dynamic-delete-button"
-              @click="puls()"
-            />
-            <a-icon
-              type="minus-circle"
-              style="color: #f56c6c"
-              class="dynamic-delete-button"
-              v-if="wakeList.length > 1"
-              @click="() => remove(index)"
-            />
-          </a-descriptions-item>
-        </a-descriptions>
-        <h4
-          style="
-            color: rgba(255, 141, 26, 1);
-            font-weight: 600;
-            margin-top: 50px;
-          "
+            会员信息
+          </h4>
+          <a-divider />
+          <a-descriptions :column="2">
+            <a-descriptions-item label="姓名">
+              {{ vipCustomer.name }}
+            </a-descriptions-item>
+            <a-descriptions-item label="证件号"
+              >{{ vipCustomer.certificateNo }}
+            </a-descriptions-item>
+            <a-descriptions-item label="卡号">
+              {{ vipCustomer.cardNo }}
+            </a-descriptions-item>
+            <a-descriptions-item label="手机号">
+              {{ vipCustomer.mobile }}
+            </a-descriptions-item>
+            <a-descriptions-item label="会员级别">
+              {{ vipCustomer.gradeName }}
+            </a-descriptions-item>
+            <a-descriptions-item label="余额"
+              >{{ vipCustomer.balance.toFixed(2) }} 元
+            </a-descriptions-item>
+            <a-descriptions-item label="积分">
+              {{ vipCustomer.integral }} 分
+            </a-descriptions-item>
+          </a-descriptions></template
         >
-          会员信息
-        </h4>
-        <a-divider />
-        <a-descriptions :column="2">
-          <a-descriptions-item label="姓名"> 张三 </a-descriptions-item>
-          <a-descriptions-item label="证件号"
-            >888888888888
-          </a-descriptions-item>
-          <a-descriptions-item label="卡号"> 1588888888 </a-descriptions-item>
-          <a-descriptions-item label="手机号"> 1588888888 </a-descriptions-item>
-          <a-descriptions-item label="会员级别"> 金卡 </a-descriptions-item>
-          <a-descriptions-item label="余额"> 3000.00元 </a-descriptions-item>
-          <a-descriptions-item label="积分"> 888888分 </a-descriptions-item>
-        </a-descriptions>
       </div>
       <div style="width: 40%">
         <div style="display: flex; justify-content: space-between">
@@ -170,22 +273,32 @@
               <a-icon
                 type="property-safety"
                 style="color: rgba(255, 141, 26, 1); font-size: 18px"
-              /><a-button type="link"> 部分结账 </a-button>
+              /><a-button
+                type="link"
+                :disabled="selectedRowKeys1.length == 0 || selectRoomId == '1'"
+                @click="partialSettle"
+              >
+                部分结账
+              </a-button>
             </div>
           </div>
         </div>
         <a-divider />
         <a-table
           :columns="columns"
-          :data-source="data"
+          :data-source="feesList"
           :pagination="false"
-          :scroll="{ y: 160, x: 500 }"
+          :scroll="{ y: 160 }"
           rowKey="id"
-          :rowSelection="{
-            selectedRowKeys: selectedRowKeys,
-            onChange: onSelectChange,
-          }"
-        />
+          :row-selection="rowSelection"
+        >
+          <template slot="subjectType" slot-scope="text, record, index">
+            {{ getSubjectTypeText(text) }}
+          </template>
+          <template slot="roomId" slot-scope="text, record, index">
+            {{ getRoomName(text) }}
+          </template>
+        </a-table>
         <div
           style="
             color: rgba(255, 87, 51, 1);
@@ -193,7 +306,7 @@
             text-align: right;
           "
         >
-          合计消费:2922:00
+          合计消费:{{ feesAmount.toFixed(2) }}
         </div>
         <div
           style="
@@ -235,15 +348,22 @@
         <a-divider />
         <a-table
           :columns="columns2"
-          :data-source="data2"
+          :data-source="paymentList"
           :pagination="false"
-          :scroll="{ y: 160, x: 500 }"
+          :scroll="{ y: 160 }"
           rowKey="id"
           :rowSelection="{
             selectedRowKeys: selectedRowKeys,
             onChange: onSelectChange,
           }"
-        />
+        >
+          <template slot="payType" slot-scope="text, record, index">
+            {{ getPayTypeText(text) }}
+          </template>
+          <template slot="subjectType" slot-scope="text, record, index">
+            {{ getSubjectTypeText(record.subjectType) }}
+          </template>
+        </a-table>
         <div
           style="
             color: rgba(255, 87, 51, 1);
@@ -251,30 +371,63 @@
             text-align: right;
           "
         >
-          合计收款:2922:00
+          合计收款:{{ paymentAmount.toFixed(2) }}
         </div>
       </div>
       <div style="width: 20%">
         <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">财务汇总</h4>
         <a-divider />
         <a-descriptions :column="1">
-          <a-descriptions-item label="合计收款"> + 2500 </a-descriptions-item>
-          <a-descriptions-item label="合计消费">-2500 </a-descriptions-item>
-          <a-descriptions-item label="结账应退"> 0 </a-descriptions-item>
+          <a-descriptions-item label="合计收款">
+            + {{ paymentAmount.toFixed(2) }}
+          </a-descriptions-item>
+          <a-descriptions-item label="合计消费"
+            >-{{ feesAmount.toFixed(2) }}
+          </a-descriptions-item>
+          <a-descriptions-item
+            label="结账应退"
+            v-if="paymentAmount - feesAmount > 0"
+          >
+            {{ (paymentAmount - feesAmount).toFixed(2) }}
+          </a-descriptions-item>
+          <a-descriptions-item label="结账应收" v-else>
+            {{ (paymentAmount - feesAmount).toFixed(2) }}
+          </a-descriptions-item>
         </a-descriptions>
 
-        <a-button @click="handleAdd" type="danger" style="margin-left: 100px"
+        <a-button
+          v-if="paymentAmount - feesAmount > 0"
+          @click="handleAdd"
+          type="danger"
+          style="margin-left: 100px"
+          :disabled="btnSisabled"
           >结账退款</a-button
         >
+        <a-button
+          v-else
+          @click="handleAdd"
+          type="danger"
+          style="margin-left: 100px"
+          :disabled="btnSisabled"
+          >结账收款</a-button
+        >
       </div>
     </div>
+    <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
+    <refund-modal ref="modalRefundForm" @ok="modalFormOk"></refund-modal>
+    <payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
   </div>
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
+import { httpAction, getAction, deleteAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
+import CustomerModal from "./CustomerModal.vue";
+import RefundModal from "./RefundModal.vue";
+import PaymentModal from "./PaymentModal.vue";
+import { match } from "assert";
+import { postAction } from "../../../../api/manage";
 const columns = [
   // {
   //     title: "",
@@ -283,60 +436,73 @@ const columns = [
   //   },
   {
     title: "房间号",
-    dataIndex: "name",
-    width: 80,
+    dataIndex: "roomId",
+    width: 70,
+    scopedSlots: { customRender: "roomId" },
   },
   {
     title: "费项",
-    dataIndex: "age",
-    width: 80,
+    dataIndex: "subjectType",
+    width: 60,
+    scopedSlots: { customRender: "subjectType" },
   },
   {
     title: "入账日期",
-    dataIndex: "address",
-    width: 100,
+    dataIndex: "dayTime",
+    width: 110,
   },
   {
     title: "单价",
-    dataIndex: "address2",
-    width: 60,
+    dataIndex: "id",
+    // width: 60,
+    customRender: function (text, record) {
+      return record.money;
+    },
   },
   {
     title: "优惠价",
-    dataIndex: "address3",
-    width: 80,
+    dataIndex: "money",
+    // width: 80,
   },
   {
     title: "数量",
-    dataIndex: "address4",
-    width: 60,
+    dataIndex: "feeType",
+    // width: 60,
+    customRender: function (text) {
+      return 1;
+    },
   },
   {
     title: "小计",
-    dataIndex: "address5",
-    width: 60,
+    dataIndex: "livingOrderId",
+    // width: 60,
+    customRender: function (text, record) {
+      return record.money;
+    },
   },
 ];
 const columns2 = [
   {
     title: "入账时间",
-    dataIndex: "name",
-    width: 160,
+    dataIndex: "createTime",
+    // width: 110,
   },
   {
     title: "支付方式",
-    dataIndex: "age",
-    width: 100,
+    dataIndex: "payType",
+    // width: 100,
+    scopedSlots: { customRender: "payType" },
   },
   {
     title: "备注",
     dataIndex: "remark",
-    width: 120,
+    // width: 120,
+    scopedSlots: { customRender: "subjectType" },
   },
   {
     title: "金额",
-    dataIndex: "amount",
-    width: 60,
+    dataIndex: "money",
+    // width: 60,
   },
 ];
 const data = [];
@@ -358,9 +524,11 @@ for (let i = 0; i < 8; i++) {
     amount: 888,
   });
 }
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
 export default {
   name: "BusMeetingRoomForm",
-  components: {},
+  components: { CustomerModal, RefundModal, PaymentModal },
   props: {
     //表单禁用
     disabled: {
@@ -377,7 +545,13 @@ export default {
       data2,
       columns2,
       wakeList: [{}],
-      model: {},
+      model: {
+        // data: data,
+        orderInfo: {},
+        roomIds: [],
+        layoutDayPrices: [],
+        livingRoomIds: [],
+      },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -395,13 +569,72 @@ export default {
         add: "/business/busMeetingRoom/add",
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
+        getBookingOrderInfo:
+          "/business/busRoomBookingOrders/getBookingOrderInfo",
       },
+      id: "",
+      customerSourceList: [],
+      warranterList: [],
+      key: 0,
+      feesList: [],
+      oldfeesList: [],
+      paymentList: [],
+      oldpaymentList: [],
+      payTypeList: [],
+      vipCustomer: {},
+      selectRoomId: "1",
+      selectedRowKeys1: [],
     };
   },
   computed: {
     formDisabled() {
       return this.disabled;
     },
+    feesAmount() {
+      return this.feesList.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+    },
+    paymentAmount() {
+      var list = this.paymentList.filter((t) => t.subjectType !== 5);
+      var amount = list.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+
+      var list2 = this.paymentList.filter((t) => t.subjectType == 5);
+      var amount2 = list2.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+      return amount - amount2;
+    },
+    btnSisabled() {
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var find = this.model.livingRoomIds[index];
+      if (find) {
+        return find.livingOrder.settleType == 1;
+      }
+      return false;
+    },
+    rowSelection() {
+      return {
+        onChange: (selectedRowKeys, selectedRows) => {
+          // console.log(
+          //   `selectedRowKeys: ${selectedRowKeys}`,
+          //   "selectedRows: ",
+          //   selectedRows
+          // );
+          this.selectedRowKeys1 = selectedRowKeys;
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.preferentialStatus === 2,
+            id: record.id,
+          },
+        }),
+      };
+    },
   },
   created() {
     var _info = JSON.parse(localStorage.getItem("storeInfo"));
@@ -410,13 +643,289 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639538915239743490",
+    }).then((res) => {
+      if (res.success) {
+        this.customerSourceList = res.result.records;
+      }
+    });
+    getAction("/business/busSalesPerson/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.warranterList = res.result.records;
+      }
+    });
   },
   methods: {
+    splitLiving() {
+      var that = this;
+      this.$confirm({
+        title: "提示",
+        content: "确认要拆分房间?",
+        onOk: function () {
+          var index = that.model.livingRoomIds.findLastIndex(
+            (t) => t.roomId == that.selectRoomId
+          );
+          var livingRoom = that.model.livingRoomIds[index];
+          httpAction(
+            "business/busRoomBookingOrders/split-living?livingOrderId=" +
+              livingRoom.livingOrder.id,
+            {},
+            "post"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("拆分成功");
+                that.getBookingOrderInfo();
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        },
+      });
+    },
+    partialSettle() {
+      var list2 = this.feesList.filter((t) =>
+        this.selectedRowKeys1.includes(t.id)
+      );
+      console.log(list2);
+      var amount = list2.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var livingRoom = this.model.livingRoomIds[index];
+      this.$refs.modalPaymentForm.edit({
+        billAmount: parseFloat(amount.toFixed(2)),
+        deposit: 0,
+        roomFee: parseFloat(amount.toFixed(2)),
+        subjectType: 5,
+        feeType: 2,
+        bookingOrderId: this.model.orderInfo.id,
+        livingOrderId:
+          livingRoom.roomId != "1" ? livingRoom.livingOrder.id : "",
+        preferentialType: 1,
+        couponFirstAmount: 0,
+        discount: 9,
+        vipCustomerId: this.model.orderInfo.vipCustomerId,
+        selectedFeeIds: this.selectedRowKeys1,
+      });
+      this.$refs.modalPaymentForm.title = "部分结账收款";
+      this.$refs.modalPaymentForm.disableSubmit = false;
+    },
+    tabChange(e) {
+      console.log(e);
+      this.selectRoomId = e;
+      if (e == "1") {
+        this.feesList = this.oldfeesList;
+        this.paymentList = this.oldpaymentList;
+      } else {
+        this.feesList = this.oldfeesList.filter((t) => t.roomId == e);
+        this.paymentList = this.oldpaymentList.filter((t) => t.roomId == e);
+      }
+    },
+    getPayTypeText(text) {
+      var find = this.payTypeList.find((t) => t.id == text);
+      return find ? find.name : "";
+    },
+    getRoomName(id) {
+      var index = this.model.livingRoomIds.findLastIndex((t) => t.roomId == id);
+      var find = this.model.livingRoomIds[index];
+      return find ? find.roomName : "";
+    },
+    getSubjectTypeText(text) {
+      var msg = "";
+      if (text == 1) {
+        msg = "押金";
+      } else if (text == 2) {
+        msg = "预收房费";
+      } else if (text == 3) {
+        msg = "每日房费";
+      } else if (text == 4) {
+        msg = "优惠金额";
+      } else if (text == 5) {
+        msg = "结账收款";
+      }
+      return msg;
+    },
+    async getbusRoomPayType() {
+      await getAction("/business/busRoomPayType/list", {
+        pageSize: 99999,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.success) {
+          this.payTypeList = res.result.records;
+        }
+      });
+    },
+    removeLivingCustomer(id) {
+      deleteAction("/business/busLivingCustomer/delete", { id: id }).then(
+        (res) => {
+          if (res.success) {
+            this.getBookingOrderInfo();
+          }
+        }
+      );
+    },
+    addlivingCustomer(id, roomId) {
+      console.log(id);
+      this.$refs.modalCustomerForm.add(id, roomId);
+      this.$refs.modalCustomerForm.title = "添加同住人";
+      this.$refs.modalCustomerForm.disableSubmit = false;
+    },
+    modalFormOk(e) {
+      this.getBookingOrderInfo();
+      this.$emit("ok");
+    },
+    customerTypeName(customerType) {
+      switch (customerType) {
+        case 1:
+          return "散客";
+        case 2:
+          return "会员";
+        case 3:
+          return "协议单位";
+        case 4:
+          return "中介";
+        default:
+          return "散客";
+      }
+    },
+    warranterName(warranter) {
+      var find = this.warranterList.find((t) => t.id == warranter);
+      return find ? find.name : "--";
+    },
+    customerSourceName(customerSource) {
+      var find = this.customerSourceList.find((t) => t.id == customerSource);
+      return find ? find.itemText : "--";
+    },
+    getMemberCard() {
+      getAction("/business/busMemberCard/list", {
+        id: this.model.orderInfo.vipCustomerId,
+      }).then((res) => {
+        if (res.success) {
+          if (res.result.records && res.result.records.length > 0) {
+            this.vipCustomer = res.result.records[0];
+          }
+        }
+      });
+    },
+    async getBookingOrderInfo() {
+      if (this.payTypeList == 0) {
+        await this.getbusRoomPayType();
+      }
+      var obj = {
+        bookingNo: this.id,
+      };
+      if (this.key && this.key == 1) {
+        obj = {
+          bookingOrderId: this.id,
+        };
+      }
+      getAction(this.url.getBookingOrderInfo, obj).then((res) => {
+        if (res.success) {
+          var livingRoomId = JSON.parse(
+            JSON.stringify(res.result.livingRoomIds[0])
+          );
+          livingRoomId.roomId = "1";
+          livingRoomId.roomName = "全部";
+          var list = [];
+          res.result.livingRoomIds.forEach((t) => {
+            list = [...list, ...t.livingCustomers];
+          });
+          livingRoomId.livingCustomers = list;
+          res.result.livingRoomIds.unshift(livingRoomId);
+          this.model = res.result;
+          getAction("/business/busRoomBookingOrders/living-fees", {
+            bookingOrderId: this.model.orderInfo.id,
+          }).then((res) => {
+            if (res.success) {
+              if (res.result && res.result.length > 0) {
+                this.feesList = res.result.filter((t) => t.feeType === 1);
+                this.oldfeesList = JSON.parse(JSON.stringify(this.feesList));
+                this.paymentList = res.result.filter((t) => t.feeType === 2);
+                this.oldpaymentList = JSON.parse(
+                  JSON.stringify(this.paymentList)
+                );
+              }
+            }
+          });
+          if (this.model.orderInfo.vipCustomerId) {
+            this.getMemberCard();
+          }
+        }
+      });
+    },
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys;
       this.selectionRows = selectionRows;
     },
-    handleAdd() {},
+    handleAdd() {
+      var list = this.paymentList.filter((t) => t.subjectType === 1);
+      var deposit = list.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+
+      var list2 = this.paymentList.filter((t) => t.subjectType === 2);
+      var sum = list2.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+
+      var list3 = this.feesList.filter((t) => t.subjectType === 3);
+      var sum2 = list3.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+      var index = this.model.livingRoomIds.findLastIndex(
+        (t) => t.roomId == this.selectRoomId
+      );
+      var livingRoom = this.model.livingRoomIds[index];
+      if (this.paymentAmount - this.feesAmount > 0) {
+        this.$refs.modalRefundForm.edit({
+          billRefund: this.paymentAmount - this.feesAmount,
+          deposit: deposit - (sum - sum2),
+          roomFee: sum - sum2,
+          money: this.paymentAmount - this.feesAmount,
+          subjectType: 5,
+          feeType: 2,
+          bookingOrderId: this.model.orderInfo.id,
+          livingOrderId:
+            livingRoom.roomId != "1" ? livingRoom.livingOrder.id : "",
+        });
+        this.$refs.modalRefundForm.title = "结账退款";
+        this.$refs.modalRefundForm.disableSubmit = false;
+      } else {
+        this.$refs.modalPaymentForm.edit({
+          billAmount: parseFloat(
+            Math.abs(this.paymentAmount - this.feesAmount).toFixed(2)
+          ),
+          deposit: deposit - (sum - sum2),
+          roomFee: parseFloat(
+            Math.abs(this.paymentAmount - this.feesAmount).toFixed(2)
+          ),
+          subjectType: 5,
+          feeType: 2,
+          bookingOrderId: this.model.orderInfo.id,
+          livingOrderId:
+            livingRoom.roomId != "1" ? livingRoom.livingOrder.id : "",
+          preferentialType: 1,
+          couponFirstAmount: 0,
+          discount: 9,
+          vipCustomerId: this.model.orderInfo.vipCustomerId,
+        });
+        this.$refs.modalPaymentForm.title = "结账收款";
+        this.$refs.modalPaymentForm.disableSubmit = false;
+      }
+    },
     puls() {
       this.wakeList.push({});
     },
@@ -427,8 +936,11 @@ export default {
     onChange(e) {
       console.log(e);
     },
-    add() {
+    add(id, key) {
+      this.key = key;
+      this.id = id;
       this.edit(this.modelDefault);
+      this.getBookingOrderInfo();
     },
     edit(record) {
       this.model = Object.assign({}, record);
@@ -513,4 +1025,11 @@ export default {
   padding: 5px 5px !important;
   overflow-wrap: break-word;
 }
+
+#livingCustomers-grid [class~="ant-col"] {
+  border: #ccc 1px solid;
+}
+#livingCustomers-grid [class~="ant-col"]:last-child {
+  border: 0;
+}
 </style>

+ 4 - 3
src/views/room/modules/checkIn/BillRoomInfoModal.vue

@@ -92,16 +92,17 @@
     data () {
       return {
         title:'',
-        width:1200,
+        width:1400,
         visible: false,
         disableSubmit: false
       }
     },
     methods: {
-      add () {
+      add (id,key) {
+        console.log("id",id)
         this.visible=true
         this.$nextTick(()=>{
-          this.$refs.realForm.add();
+          this.$refs.realForm.add(id,key);
         })
       },
       edit (record) {

+ 236 - 0
src/views/room/modules/checkIn/CustomerForm.vue

@@ -0,0 +1,236 @@
+<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="certType"
+            >
+              <a-select
+                v-model="model.certType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1">身份证</a-select-option>
+                <a-select-option :value="2">护照</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="customerName"
+            >
+              <a-auto-complete
+                v-model="model.customerName"
+                placeholder="联系人"
+                @search="handleSearch"
+                @select="(e) => handleSelectMember(e)"
+              >
+                <template slot="dataSource">
+                  <a-select-option v-for="item in customerList" :key="item.id"
+                    >{{ item.name }}-{{ item.phone }}</a-select-option
+                  >
+                </template>
+              </a-auto-complete>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="性别"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="gender"
+            >
+              <a-radio-group v-model="model.gender">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="phone"
+            >
+              <a-input
+                v-model="model.phone"
+                placeholder="请输入手机号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certNo"
+            >
+              <a-input
+                v-model="model.certNo"
+                placeholder="请输入证件号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </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: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1, livingOrderId: "",certType:1,gender:1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.getbusCustomer();
+  },
+  methods: {
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+        }
+      });
+    },
+    add(livingOrderId,roomId) {
+      this.modelDefault.livingOrderId = livingOrderId;
+      this.modelDefault.roomId = roomId;
+      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;
+          // var customers = [];
+          // customers.push({
+          //   certNo: this.model.certNo,
+          //   certType: this.model.certType,
+          //   customerId: this.model.customerId,
+          //   customerName: this.model.customerName,
+          //   gender: this.model.gender,
+          //   phone: this.model.phone,
+          //   roomId: this.model.roomId,
+          // });
+          httpAction("/business/busLivingCustomer/add", this.model, "post")
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("入住成功");
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/checkIn/CustomerModal.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-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './CustomerForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (livingOrderId,roomId) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(livingOrderId,roomId);
+        })
+      },
+      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>

+ 496 - 0
src/views/room/modules/checkIn/Payment.vue

@@ -0,0 +1,496 @@
+<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="billAmount"
+            >
+              {{ model.billAmount.toFixed(2) }}元
+              <a-switch v-model="model.coupon" />优惠
+            </a-form-model-item>
+          </a-col>
+          <template v-if="model.coupon">
+            <a-col :span="24">
+              <a-form-model-item
+                label="优惠方式"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="refund"
+              >
+                <a-radio-group v-model="model.preferentialType">
+                  <a-radio :value="1"> 抹零 </a-radio>
+                  <a-radio :value="2"> 减现 </a-radio>
+                  <a-radio :value="3"> 打折 </a-radio>
+                </a-radio-group>
+                <template v-if="model.preferentialType === 3"
+                  >打<a-input-number
+                    style="width: 50px"
+                    v-model="model.discount"
+                    :min="1"
+                    :max="9"
+                  ></a-input-number
+                  >折
+                </template>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24" v-if="model.preferentialType == 2">
+              <a-form-model-item
+                label="优惠金额"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="couponFirstAmount"
+              >
+                <a-input-number
+                  style="width: 100px"
+                  :min="0"
+                  v-model="model.couponFirstAmount"
+                  placeholder="请输入优惠金额"
+                ></a-input-number
+                >元
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item
+                label="惠后金额"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+              >
+                {{ couponAmount.toFixed(2) }}元
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item
+                label="优惠券"
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="refund"
+              >
+                <a-select
+                  v-if="model.couponCard"
+                  v-model="model.couponId"
+                  style="width: 200px"
+                  placeholder="优惠券"
+                  :allowClear="true"
+                >
+                  <a-select-option
+                    :value="couponItem.id"
+                    v-for="couponItem in memeberCouponList"
+                    :key="couponItem.id"
+                    >{{ couponItem.couponsName }}</a-select-option
+                  >
+                </a-select>
+                <a-switch v-model="model.couponCard" />使用优惠券
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :span="24">
+            <a-form-model-item
+              label="实收金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ realityAmount.toFixed(2) }}元
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="收款金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <div v-for="(item, index) in payList" :key="index">
+                <a-row type="flex" :key="index">
+                  <a-col :span="6">
+                    <a-input-number
+                      style="width: 100px"
+                      v-model="item.money"
+                      :min="0"
+                    ></a-input-number>
+                  </a-col>
+                  <a-col :span="6">
+                    <a-select
+                      v-model="item.payType"
+                      placeholder="收款方式"
+                      @change="(event) => onChange(event, item)"
+                    >
+                      <a-select-option
+                        :value="item2.id"
+                        v-for="item2 in payTypeList"
+                        :key="item2.id"
+                      >
+                        {{ item2.name }}
+                      </a-select-option>
+                    </a-select></a-col
+                  >
+                  <a-col :span="6">
+                    <a-icon
+                      v-if="index == payList.length - 1"
+                      type="plus-circle"
+                      class="dynamic-delete-button"
+                      @click="puls()" />
+                    <a-icon
+                      v-if="payList.length > 1"
+                      type="minus-circle"
+                      style="color: #f56c6c"
+                      class="dynamic-delete-button"
+                      @click="() => remove(index)"
+                  /></a-col>
+                </a-row>
+
+                <a-row type="flex" v-if="item.isVipMemmber">
+                  <a-col :span="12"> 姓名:{{ memberCard.name }} </a-col>
+                  <a-col :span="12"> 卡号:{{ memberCard.cardNo }} </a-col>
+                  <a-col :span="12">
+                    会员级别: {{ memberCard.gradeName }}</a-col
+                  >
+                  <a-col :span="12"> 余额:{{ memberCard.balance }} </a-col>
+                  <a-col :span="12"> 积分:{{ memberCard.integral }} </a-col>
+                  <!-- <a-col :span="12"> 本次扣后剩余: </a-col>
+                <a-col :span="12"> 本次新增积分: </a-col> -->
+                </a-row>
+              </div>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="实收合计"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ sumAmount.toFixed(2) }}元
+            </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: "Payment",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {
+        coupon: false,
+        discount: 1,
+        couponCard: false,
+        couponType: 1,
+        couponFirstAmount: 0,
+        billAmount: 0,
+        selectedFeeIds: [],
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+      payTypeList: [],
+      memberCard: {},
+      isVipMemmber: false,
+      payList: [],
+      memeberCouponList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    sumAmount() {
+      var sum = this.payList.reduce(function (total, item) {
+        return total + item.money;
+      }, 0);
+      return sum;
+    },
+    couponAmount() {
+      var sum = 0;
+      if (this.model.coupon) {
+        if (this.model.preferentialType == 1) {
+          sum = Math.floor(this.model.billAmount);
+        } else if (this.model.preferentialType == 2) {
+          sum = this.model.billAmount - (this.model.couponFirstAmount || 0);
+        } else if (this.model.preferentialType == 3) {
+          sum = parseFloat(
+            ((this.model.billAmount * this.model.discount) / 10).toFixed(2)
+          );
+        }
+      } else {
+        sum = this.model.billAmount;
+      }
+      return sum;
+    },
+    realityAmount() {
+      if (this.model.couponCard) {
+        var find = this.memeberCouponList.find(
+          (t) => t.id == this.model.couponId
+        );
+        if (find) {
+          return this.couponAmount - find.cost;
+        }
+      }
+      return this.couponAmount;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busRoomPayType/list", {
+      pageSize: 99999,
+      pageNo: 1,
+    }).then((res) => {
+      if (res.success) {
+        this.payTypeList = res.result.records;
+      }
+    });
+    getAction("/business/busMemberCard/list", {
+      id: "11111111",
+    }).then((res) => {
+      if (res.success) {
+        if (res.result.records && res.result.records.length > 0) {
+          this.memberCard = res.result.records[0];
+        }
+      }
+    });
+  },
+  methods: {
+    getbusRoomPayType() {
+      getAction("/business/busRoomPayType/list", {
+        pageSize: 99999,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.success) {
+          this.payTypeList = res.result.records;
+          if (this.payTypeList && this.payTypeList.length > 0) {
+            this.$set(this.model, "payType", this.payTypeList[0].id);
+
+            this.payList = [
+              {
+                money: this.realityAmount,
+                payType: this.payTypeList[0].id,
+                isVipMemmber: false,
+              },
+            ];
+          }
+        }
+      });
+    },
+    puls() {
+      this.payList.push({
+        money: 0,
+        payType: this.payTypeList[0].id,
+        isVipMemmber: false,
+      });
+    },
+    remove(index) {
+      this.payList.splice(index, 1);
+    },
+    onChange(e, value) {
+      console.log("value", value);
+      console.log("e", e);
+      var find = this.payTypeList.find((t) => t.id == value.payType);
+      value.isVipMemmber = find && find.name == "会员卡";
+    },
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getMemeberCouponList() {
+      getAction("/business/busMarketCouponsCashUsed/memeberCouponList", {
+        pageNo: 1,
+        pageSize: 99,
+        conditions: 900,
+        mobile: this.model.vipCustomerId,
+      }).then((res) => {
+        if (res.success) {
+          this.memeberCouponList = res.result.records;
+        }
+      });
+    },
+    add(livingOrderId, roomId) {
+      this.modelDefault.livingOrderId = livingOrderId;
+      this.modelDefault.roomId = roomId;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.getbusRoomPayType();
+      if (this.model.vipCustomerId) {
+        this.getMemeberCouponList();
+      }
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          console.log("this.realityAmount ", this.realityAmount);
+          console.log("this.sumAmount ", this.sumAmount);
+          if (this.realityAmount != this.sumAmount) {
+            that.$message.warning("实收金额和实收合计必须相等");
+            return;
+          }
+          var obj = {};
+          var fees = [];
+          if (this.model.coupon) {
+            fees.push({
+              feeType: this.model.feeType,
+              preferentialType: this.model.preferentialType,
+              money: this.couponAmount.toFixed(2),
+              custorerOrderRemark: "优惠金额",
+              isPreferential: true,
+            });
+          }
+          if (this.model.couponCard && this.model.couponId) {
+            var find = this.memeberCouponList.find(
+              (t) => t.id == this.model.couponId
+            );
+            if (find) {
+              fees.push({
+                feeType: this.model.feeType,
+                money: find.cost.toFixed(2),
+                custorerOrderRemark: "优惠券",
+                isPreferential: true,
+              });
+            }
+          }
+          this.payList.forEach((item) => {
+            fees.push({
+              feeType: this.model.feeType,
+              money: item.money.toFixed(2),
+              payType: item.payType,
+              custorerOrderRemark: "结账退房",
+              isPreferential: false,
+            });
+          });
+
+          that.confirmLoading = true;
+          var url =
+            "/business/busRoomBookingOrders/settle-checkout?bookingOrderId=" +
+            this.model.bookingOrderId;
+          if (this.model.livingOrderId) {
+            url =
+              "/business/busRoomBookingOrders/living-settle-checkout?livingOrderId=" +
+              this.model.livingOrderId;
+          }
+          if (
+            this.model.selectedFeeIds &&
+            this.model.selectedFeeIds.length > 0
+          ) {
+            url = "/business/busRoomBookingOrders/partial-settle";
+            obj = {
+              fees: fees,
+              livingOrderId: this.model.livingOrderId,
+              selectedFeeIds: this.model.selectedFeeIds,
+            };
+          }
+          httpAction(
+            url,
+            this.model.selectedFeeIds && this.model.selectedFeeIds.length > 0
+              ? obj
+              : fees,
+            "post"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("结账成功");
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.dynamic-delete-button {
+  cursor: pointer;
+  position: relative;
+  /* top: 4px; */
+  margin-left: 5px;
+  font-size: 18px;
+  color: #1890ff;
+  transition: all 0.3s;
+}
+.dynamic-delete-button:hover {
+  color: #777;
+}
+.dynamic-delete-button[disabled] {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
+</style>

+ 60 - 0
src/views/room/modules/checkIn/PaymentModal.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="关闭">
+    <payment ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></payment>
+  </j-modal>
+</template>
+
+<script>
+
+  import payment from './Payment'
+  export default {
+    name: 'PaymentModal',
+    components: {
+      payment
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      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>

+ 272 - 0
src/views/room/modules/checkIn/Refund.vue

@@ -0,0 +1,272 @@
+<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="billRefund"
+            >
+              <a-input
+                style="width: 100px"
+                disabled
+                v-model="model.billRefund"
+                placeholder="请输入结账应退"
+              ></a-input
+              >元
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="押金应退"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="deposit"
+            >
+              <a-input
+                style="width: 100px"
+                disabled
+                v-model="model.deposit"
+                placeholder="请输入押金应退"
+              ></a-input
+              >元
+              <a-select
+                v-model="model.payType"
+                style="width: 200px"
+                placeholder="支付类型"
+                :allowClear="true"
+              >
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in payTypeList"
+                  :key="item.id"
+                  >{{ item.name }}</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="roomFee"
+            >
+              <a-input
+                style="width: 100px"
+                disabled
+                v-model="model.roomFee"
+                placeholder="请输入房费应退"
+              ></a-input
+              >元
+              <a-select
+                v-model="model.payType"
+                style="width: 200px"
+                placeholder="支付类型"
+                :allowClear="true"
+              >
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in payTypeList"
+                  :key="item.id"
+                  >{{ item.name }}</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="money"
+            >
+              <a-input
+                style="width: 100px"
+                disabled
+                v-model="model.money"
+                placeholder="请输入实退合计"
+              ></a-input>
+            </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: "Refund",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {
+        payType: "",
+        payType2: "",
+        livingOrderId: "",
+        certType: 1,
+        gender: 1,
+        bookingOrderId: "",
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+      payTypeList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.getbusCustomer();
+  },
+  methods: {
+    getbusRoomPayType() {
+      getAction("/business/busRoomPayType/list", {
+        pageSize: 99999,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.success) {
+          this.payTypeList = res.result.records;
+          if (this.payTypeList && this.payTypeList.length > 0) {
+            this.$set(this.model, "payType", this.payTypeList[0].id);
+          }
+        }
+      });
+    },
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+        }
+      });
+    },
+    add(livingOrderId, roomId) {
+      this.modelDefault.livingOrderId = livingOrderId;
+      this.modelDefault.roomId = roomId;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+
+      this.getbusRoomPayType();
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          var fees = [];
+          fees.push({
+            feeType: this.model.feeType,
+            money: this.model.money,
+            payType: this.model.payType,
+            custorerOrderRemark: "结账退款",
+            isPreferential: false,
+            livingOrderId: this.model.livingOrderId,
+          });
+          var url =
+            "/business/busRoomBookingOrders/settle-checkout?bookingOrderId=" +
+            this.model.bookingOrderId;
+          if (this.model.livingOrderId) {
+            url =
+              "/business/busRoomBookingOrders/living-settle-checkout?livingOrderId=" +
+              this.model.livingOrderId;
+          }
+          httpAction(url, fees, "post")
+            .then((res) => {
+              if (res.success) {
+                that.$message.success("结账成功");
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/checkIn/RefundModal.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="关闭">
+    <refund ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></refund>
+  </j-modal>
+</template>
+
+<script>
+
+  import Refund from './Refund'
+  export default {
+    name: 'RefundModal',
+    components: {
+      Refund
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      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>

+ 80 - 22
src/views/room/modules/checkIn/SelectRoomForm.vue

@@ -13,15 +13,23 @@
               label="房型"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomType"
             >
-              <a-checkbox-group
-                v-model="model.roomType"
-                :options="roomTypeOptions"
-              />
+              <a-checkbox-group @change="onChange" v-model="checkLayoutList">
+                <a-row>
+                  <a-col
+                    :span="12"
+                    v-for="(item, index) in roomLayoutList"
+                    :key="item.id"
+                  >
+                    <a-checkbox :value="item.id">
+                      {{ item.name }}
+                    </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item
               label="房态"
               :labelCol="labelCol"
@@ -33,7 +41,7 @@
                 :options="roomStatusOptions"
               />
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
             <a-form-model-item
               label="已选"
@@ -48,10 +56,10 @@
                 color="blue"
                 closable
                 :visible="visible"
-                @close.stop="tagClose2(index, item.roomNo)"
+                @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.roomNo }}</a-tag
+                >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -65,14 +73,14 @@
               }"
             >
               <a-tabs
-                :default-active-key="0"
+                default-active-key="room0"
                 tab-position="left"
                 :style="{ height: '300px' }"
               >
                 <a-tab-pane
                   v-for="(room, index) in roomList"
-                  :key="index"
-                  :tab="room.key"
+                  :key="'room' + index"
+                  :tab="room.floorName"
                 >
                   <div
                     id="components-grid-demo-playground"
@@ -81,8 +89,8 @@
                     <a-row :gutter="[8, 8]">
                       <a-col
                         :span="3"
-                        v-for="(r, rIndex) in room.child"
-                        :key="rIndex"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
                       >
                         <div
                           :class="[
@@ -91,7 +99,7 @@
                           ]"
                           @click="checkRoomClick(r)"
                         >
-                          {{ r.roomNo }}
+                          {{ r.name }}
                         </div></a-col
                       >
                     </a-row>
@@ -145,9 +153,9 @@ export default {
         { key: "1层", child: rooms },
         { key: "2层", child: rooms2 },
       ],
-      roomTypeOptions: ["休闲家庭房", "特价房"],
+      roomTypeOptions: [],
       roomStatusOptions: ["空净", "空脏"],
-      model: { rooms: [] },
+      model: { roomType: "", rooms: [] },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 2 },
@@ -166,6 +174,13 @@ export default {
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+      oldcanUserRooms: [],
+      checkLayoutList: [],
+      roomLayoutList: [],
+      oldroomList: [],
     };
   },
   computed: {
@@ -180,6 +195,19 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+    getAction("/rooms/cesRoomLayout/list", { pageSize: 99999, pageNo: 1 }).then(
+      (res) => {
+        if (res.success) {
+          this.roomLayoutList = res.result.records;
+          if (this.roomLayoutList && this.roomLayoutList.length > 0) {
+            this.roomLayoutList.forEach((item) => {
+              this.checkLayoutList.push(item.id);
+            });
+          }
+        }
+      }
+    );
   },
   methods: {
     checkRoomClick(row) {
@@ -195,8 +223,8 @@ export default {
     tagClose2(index, key1) {
       this.model.rooms.splice(index, 1);
       this.roomList.some((t) => {
-        var r = t.child.some((c) => {
-          if (c.roomNo === key1) {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
             c.check = 0;
             return true;
           }
@@ -207,14 +235,44 @@ export default {
         }
       });
     },
-    onChange(date, dateString) {
-      console.log(date, dateString);
+    onChange(e) {
+      console.log(e);
+      var list = [];
+      this.oldroomList.forEach((item) => {
+        var floorRooms = [];
+        item.floorRooms.forEach((f) => {
+          if (e.includes(f.layoutId)) {
+            floorRooms.push(f);
+          }
+        });
+        var itemd = JSON.parse(JSON.stringify(item));
+        itemd.floorRooms = floorRooms;
+        list.push(itemd);
+      });
+      this.roomList = list;
+      // result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      console.log("this.oldroomList", this.oldroomList);
+      console.log("this.roomList", this.roomList);
     },
-    add() {
+    add(row) {
+      console.log("canUserRooms", row);
+      // this.canUserRooms = row;
+      this.oldroomList = JSON.parse(JSON.stringify(row[0].buildingRooms));
+
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      this.roomList = row[0].buildingRooms;
       this.edit(this.modelDefault);
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
       this.visible = true;
     },
     submitForm() {

+ 2 - 2
src/views/room/modules/checkIn/SelectRoomFormModal.vue

@@ -33,10 +33,10 @@ export default {
     };
   },
   methods: {
-    add() {
+    add(row) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.add();
+        this.$refs.realForm.add(row);
       });
     },
     edit(record) {

+ 239 - 0
src/views/room/modules/customer/CustomerForm.vue

@@ -0,0 +1,239 @@
+<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="certType"
+            >
+              <a-select
+                v-model="model.certType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1">身份证</a-select-option>
+                <a-select-option :value="2">护照</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="customerName"
+            >
+              <a-auto-complete
+                v-model="model.customerName"
+                placeholder="联系人"
+                @search="handleSearch"
+                @select="(e) => handleSelectMember(e)"
+              >
+                <template slot="dataSource">
+                  <a-select-option v-for="item in customerList" :key="item.id"
+                    >{{ item.name }}-{{ item.phone }}</a-select-option
+                  >
+                </template>
+              </a-auto-complete>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="性别"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="gender"
+            >
+              <a-radio-group v-model="model.gender">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="手机号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="phone"
+            >
+              <a-input
+                v-model="model.phone"
+                placeholder="请输入手机号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="证件号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="certNo"
+            >
+              <a-input
+                v-model="model.certNo"
+                placeholder="请输入证件号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </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: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        customerName: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/booking-to-live",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.getbusCustomer();
+  },
+  methods: {
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = this.oldcustomerList;
+      } else {
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
+      }
+      this.customerList = result;
+    },
+    handleSelectMember(e) {
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.customerName = find.name;
+      this.model.customerId = find.id;
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+        }
+      });
+    },
+    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;
+          var customers = [];
+          customers.push({
+            certNo: this.model.certNo,
+            certType: this.model.certType,
+            customerId: this.model.customerId,
+            customerName: this.model.customerName,
+            gender: this.model.gender,
+            phone: this.model.phone,
+            roomId: this.model.roomId,
+          });
+          httpAction(
+            "/business/busRoomBookingOrders/booking-to-live?bookingRoomId=" +
+              this.model.bookingRoomId,
+            customers,
+            "post"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success('入住成功');
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/customer/CustomerModal.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-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './CustomerForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    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>

+ 222 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsForm.vue

@@ -0,0 +1,222 @@
+<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="roomId"
+            >
+              <a-select v-model="model.roomId" placeholder="请选择房号">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in roomsList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </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="userName"
+            >
+              <a-input
+                v-model="model.userName"
+                placeholder="请输入姓名"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="物品"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="goodsId"
+            >
+              <a-select v-model="model.goodsId" placeholder="请选择民族">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in busDictItemList"
+                  :key="item.id"
+                >
+                  {{ item.itemText }}
+                </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="num"
+            >
+              <a-input-number
+                v-model="model.num"
+                placeholder="请输入数量"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="押金"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="deposit"
+            >
+              <a-input-number
+                v-model="model.deposit"
+                placeholder="请输入押金"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </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: "CesOrderLeaseGoodsForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        goodsId: [{ required: true, message: "请输入物品平台字典项目ID!" }],
+        num: [{ required: true, message: "请输入数量!" }],
+        deposit: [{ required: true, message: "请输入押金!" }],
+        createDate: [{ required: true, message: "请输入创建时间!" }],
+        orderNo: [{ required: true, message: "请输入单据号!" }],
+      },
+      url: {
+        add: "/order/cesOrderLeaseGoods/add",
+        edit: "/order/cesOrderLeaseGoods/edit",
+        queryById: "/order/cesOrderLeaseGoods/queryById",
+      },
+      busDictItemList: [],
+      roomsList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busDictItem/list", {
+      dictId: "1639538235288539138",
+    }).then((res) => {
+      if (res.success) {
+        this.busDictItemList = res.result.records;
+      }
+    });
+
+    getAction("/rooms/cesRooms/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.roomsList = res.result.records;
+      }
+    });
+  },
+  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>

+ 84 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <ces-order-lease-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></ces-order-lease-goods-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import CesOrderLeaseGoodsForm from './CesOrderLeaseGoodsForm'
+
+  export default {
+    name: 'CesOrderLeaseGoodsModal',
+    components: {
+      CesOrderLeaseGoodsForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/room/modules/leasegoods/CesOrderLeaseGoodsModal.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="关闭">
+    <ces-order-lease-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></ces-order-lease-goods-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CesOrderLeaseGoodsForm from './CesOrderLeaseGoodsForm'
+  export default {
+    name: 'CesOrderLeaseGoodsModal',
+    components: {
+      CesOrderLeaseGoodsForm
+    },
+    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>

+ 277 - 0
src/views/room/modules/membergoodsmanage/BusMemberGoodsManageForm.vue

@@ -0,0 +1,277 @@
+<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="goodsType"
+            >
+              <a-select placeholder="请选择" v-model="model.goodsType">
+                <a-select-option :value="1"> 贵重物品 </a-select-option>
+                <a-select-option :value="2"> 遗失物品 </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="goodsName"
+            >
+              <a-input
+                v-model="model.goodsName"
+                placeholder="请输入物品名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="参考价值"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="referenceValue"
+            >
+              <a-input
+                v-model="model.referenceValue"
+                placeholder="请输入参考价值"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="客人类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="customerType"
+            >
+              <a-select placeholder="请选择" v-model="model.customerType">
+                <a-select-option :value="1"> 在住客人 </a-select-option>
+                <a-select-option :value="2"> 离店客人 </a-select-option>
+                <a-select-option :value="3"> 其他 </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col
+            :span="24"
+            v-if="model.customerType == 1 || model.customerType == 2"
+          >
+            <a-form-model-item
+              label="房号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="roomId"
+            >
+              <a-select
+                v-model="model.roomId"
+                placeholder="请选择房号"
+                @change="roomChange"
+              >
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in roomsList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+              <a-input
+                v-show="false"
+                v-model="model.roomNo"
+                placeholder="请输入房号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-else>
+            <a-form-model-item
+              label="房号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="roomNo"
+            >
+              <a-input
+                v-model="model.roomNo"
+                placeholder="请输入房号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="客人姓名"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="customerName"
+            >
+              <a-input
+                v-model="model.customerName"
+                placeholder="请输入客人姓名"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="电话"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="mobile"
+            >
+              <a-input
+                v-model="model.mobile"
+                placeholder="请输入电话"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="登记单号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="orderNo"
+            >
+              <a-input
+                v-model="model.orderNo"
+                placeholder="请输入登记单号"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </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: "BusMemberGoodsManageForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        goodsType: [{ required: true, message: "请输入物品类型!" }],
+        goodsName: [{ required: true, message: "请输入物品名称!" }],
+        referenceValue: [{ required: true, message: "请输入参考价值!" }],
+        customerType: [{ required: true, message: "请输入客人类型!" }],
+        roomNo: [{ required: true, message: "请输入房号!" }],
+        roomId: [{ required: true, message: "请输入房号!" }],
+        customerName: [{ required: true, message: "请输入客人姓名!" }],
+        createDate: [{ required: true, message: "请输入创建时间!" }],
+      },
+      url: {
+        add: "/business/busMemberGoodsManage/add",
+        edit: "/business/busMemberGoodsManage/edit",
+        queryById: "/business/busMemberGoodsManage/queryById",
+      },
+      roomsList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/rooms/cesRooms/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.roomsList = res.result.records;
+      }
+    });
+  },
+  methods: {
+    roomChange(e) {
+      console.log(e);
+      this.model.roomNo = this.roomsList.find((t) => t.id == e).name;
+    },
+    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>

+ 84 - 0
src/views/room/modules/membergoodsmanage/BusMemberGoodsManageModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-member-goods-manage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-member-goods-manage-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import BusMemberGoodsManageForm from './BusMemberGoodsManageForm'
+
+  export default {
+    name: 'BusMemberGoodsManageModal',
+    components: {
+      BusMemberGoodsManageForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/room/modules/membergoodsmanage/BusMemberGoodsManageModal.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-member-goods-manage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-goods-manage-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberGoodsManageForm from './BusMemberGoodsManageForm'
+  export default {
+    name: 'BusMemberGoodsManageModal',
+    components: {
+      BusMemberGoodsManageForm
+    },
+    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>

+ 125 - 0
src/views/room/modules/membergoodsmanage/CustomerForm.vue

@@ -0,0 +1,125 @@
+<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="receiverUser"
+            >
+              <a-input
+                v-model="model.receiverUser"
+                placeholder="请输入领取人"
+              ></a-input>
+            </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: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        receiverUser: [{ required: true, message: "请输入领取人!" }],
+      },
+      url: {
+        add: "/business/busMemberGoodsManage/add",
+        edit: "/business/busMemberGoodsManage/edit",
+        queryById: "/business/busMemberGoodsManage/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份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/room/modules/membergoodsmanage/CustomerModal.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-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './CustomerForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    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>

+ 207 - 0
src/views/room/modules/membermessage/BusMemberMessageForm.vue

@@ -0,0 +1,207 @@
+<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="roomId"
+            >
+              <a-select v-model="model.roomId" placeholder="请选择房号">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in roomsList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </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="userName"
+            >
+              <a-input
+                v-model="model.userName"
+                placeholder="请输入留言人"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="自动提醒时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remindDate"
+            >
+              <j-date
+                placeholder="请选择自动提醒时间"
+                v-model="model.remindDate"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="有效时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="validDate"
+            >
+              <j-date
+                placeholder="请选择有效时间"
+                v-model="model.validDate"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="是否传达"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="relay"
+            >
+              <a-select placeholder="请选择" v-model="model.relay">
+                <a-select-option :value="1"> 是 </a-select-option>
+                <a-select-option :value="2"> 否 </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="contentBody"
+            >
+              <a-textarea
+                v-model="model.contentBody"
+                rows="4"
+                placeholder="请输入留言内容"
+              />
+            </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: "BusMemberMessageForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        remindDate: [{ required: true, message: "请输入自动提醒时间!" }],
+        validDate: [{ required: true, message: "请输入有效时间!" }],
+        relay: [{ required: true, message: "请输入是否传达!" }],
+        createDate: [{ required: true, message: "请输入创建时间!" }],
+      },
+      url: {
+        add: "/business/busMemberMessage/add",
+        edit: "/business/busMemberMessage/edit",
+        queryById: "/business/busMemberMessage/queryById",
+      },
+      roomsList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/rooms/cesRooms/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.roomsList = res.result.records;
+      }
+    });
+  },
+  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>

+ 84 - 0
src/views/room/modules/membermessage/BusMemberMessageModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-member-message-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-member-message-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import BusMemberMessageForm from './BusMemberMessageForm'
+
+  export default {
+    name: 'BusMemberMessageModal',
+    components: {
+      BusMemberMessageForm
+    },
+    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;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/room/modules/membermessage/BusMemberMessageModal.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-member-message-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-message-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberMessageForm from './BusMemberMessageForm'
+  export default {
+    name: 'BusMemberMessageModal',
+    components: {
+      BusMemberMessageForm
+    },
+    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>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1348 - 0
src/views/room/modules/schedule/EditScheduleRoomForm.vue


+ 88 - 0
src/views/room/modules/schedule/EditScheduleRoomModal.vue

@@ -0,0 +1,88 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <schedule-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></schedule-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ScheduleRoomForm from './EditScheduleRoomForm'
+  export default {
+    name: 'ScheduleRoomModal',
+    components: {
+      ScheduleRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1300,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      addList(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.addList(record);
+      });
+    },
+      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>
+<style scoped>
+/deep/.ant-modal-body {
+  padding: 12px;
+  max-height: calc(80vh - 150px);
+  overflow-y: auto;
+  &::-webkit-scrollbar {
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+  }
+
+  &::-webkit-scrollbar-thumb {
+    background: #e3e3e6;
+    border-radius: 6px;
+  }
+
+  &::-webkit-scrollbar-track {
+    background: transparent;
+    border-radius: 5px;
+  }
+}
+</style>

+ 607 - 100
src/views/room/modules/schedule/ScheduleRoomForm.vue

@@ -19,11 +19,15 @@
                   label="入住类型"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.bookingType"
                 >
-                  <a-select placeholder="入住类型">
-                    <a-select-option value="全天"> 全天 </a-select-option>
-                    <a-select-option value="钟点"> 钟点 </a-select-option>
+                  <a-select
+                    placeholder="入住类型"
+                    v-model="model.orderInfo.bookingType"
+                    @change="bookingTypeChange"
+                  >
+                    <a-select-option :value="1"> 全天 </a-select-option>
+                    <a-select-option :value="2"> 钟点 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -33,17 +37,23 @@
                   label="预抵时间"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.arrivalTime2"
                 >
                   <j-date
                     placeholder="预抵时间"
-                    v-model="model.endTime"
+                    v-model="model.orderInfo.arrivalTime2"
                     style="width: 180px"
+                    :allowClear="false"
+                    :disabled-date="disabledDate"
+                    @change="arrivalTimeChange"
                   />
                   <a-time-picker
                     style="width: 80px; margin-left: 2px"
-                    :default-value="moment('18:00', 'HH:mm')"
+                    v-model="model.orderInfo.arrivalTimeSpan"
+                    :default-value="moment('12:00', 'HH:mm')"
                     format="HH:mm"
+                    :allowClear="false"
+                    @change="arrivalTimeSpanChange"
                   />
                 </a-form-model-item>
               </a-col>
@@ -52,17 +62,23 @@
                   label="预离时间"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.dueOutTime2"
                 >
                   <j-date
                     placeholder="预离时间"
-                    v-model="model.endTime"
+                    v-model="model.orderInfo.dueOutTime2"
                     style="width: 180px"
+                    :allowClear="false"
+                    :disabled-date="disabledDate"
+                    :disabled="model.orderInfo.bookingType === 2"
+                    @change="arrivalTimeChange2"
                   />
                   <a-time-picker
                     style="width: 80px; margin-left: 2px"
-                    :default-value="moment('12:00', 'HH:mm')"
+                    v-model="model.orderInfo.dueOutTimeSpan"
                     format="HH:mm"
+                    :allowClear="false"
+                    :disabled="model.orderInfo.bookingType === 2"
                   />
                 </a-form-model-item>
               </a-col>
@@ -71,25 +87,71 @@
                   label="客人来源"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.customerSource"
                 >
-                  <a-select placeholder="订单来源">
-                    <a-select-option value="散客"> 散客 </a-select-option>
-                    <a-select-option value="美团"> 美团 </a-select-option>
+                  <a-select
+                    placeholder="客人来源"
+                    v-model="model.orderInfo.customerSource"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in customerSourceList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if="model.orderInfo.bookingType == 2">
+                <a-form-model-item
+                  label="时长"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.hourRoomId"
+                >
+                  <a-select
+                    placeholder="时长"
+                    v-model="model.orderInfo.hourRoomId"
+                    @change="hourRoomIdChange"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in hourRoomRuleList"
+                      :key="item.id"
+                    >
+                      {{ item.hourRoomName }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24" v-else>
                 <a-form-model-item
                   label="天数"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.dayCount"
                 >
                   <a-input-number
-                    v-model="model.userName"
+                    v-model="model.orderInfo.dayCount"
                     placeholder="天数"
                     :min="1"
+                    @change="dayCountChange"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :span="24">
+                <a-form-model-item
+                  label="早餐"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.breakfastNum"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.breakfastNum"
+                    placeholder="早餐"
+                    :min="0"
                   ></a-input-number>
                 </a-form-model-item>
               </a-col>
@@ -98,14 +160,18 @@
                   label="预定方式"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.bookingDicWay"
                 >
-                  <a-select placeholder="预定方式">
-                    <a-select-option value="美团酒店">
-                      美团酒店
-                    </a-select-option>
-                    <a-select-option value="携程酒店">
-                      携程酒店
+                  <a-select
+                    placeholder="预定方式"
+                    v-model="model.orderInfo.bookingDicWay"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in bookingdicWayList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
                     </a-select-option>
                   </a-select>
                 </a-form-model-item>
@@ -115,22 +181,30 @@
                   label="客人类型"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.customerType"
                 >
-                  <a-select placeholder="客人类型">
-                    <a-select-option value="散客"> 散客 </a-select-option>
-                    <a-select-option value="会员"> 会员 </a-select-option>
+                  <a-select
+                    placeholder="客人类型"
+                    v-model="model.orderInfo.customerType"
+                  >
+                    <a-select-option :value="1"> 散客 </a-select-option>
+                    <a-select-option :value="2"> 会员 </a-select-option>
+                    <a-select-option :value="3"> 协议单位 </a-select-option>
+                    <a-select-option :value="4"> 中介 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :span="24">
+              <a-col :span="24" v-if="model.orderInfo.bookingType === 1">
                 <a-form-model-item
                   label="房价方案"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.roomPriceSlnId"
                 >
-                  <a-select placeholder="房价方案">
+                  <a-select
+                    placeholder="房价方案"
+                    v-model="model.orderInfo.roomPriceSlnId"
+                  >
                     <a-select-option value="会员价"> 会员价 </a-select-option>
                     <a-select-option value="平日价"> 平日价 </a-select-option>
                   </a-select>
@@ -145,18 +219,20 @@
                   label="联系人"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="contactName"
                 >
                   <a-auto-complete
-                    v-model="model.key1"
+                    v-model="model.contactName"
                     placeholder="联系人"
                     @search="handleSearch"
                     @select="(e) => handleSelectMember(e)"
                   >
                     <template slot="dataSource">
-                      <a-select-option v-for="item in result" :key="item">{{
-                        item
-                      }}</a-select-option>
+                      <a-select-option
+                        v-for="item in customerList"
+                        :key="item.id"
+                        >{{ item.name }}-{{ item.phone }}</a-select-option
+                      >
                     </template>
                   </a-auto-complete>
                 </a-form-model-item>
@@ -166,9 +242,9 @@
                   label="电话"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="phone"
                 >
-                  <a-input v-model="model.mobile" placeholder="电话"></a-input>
+                  <a-input v-model="model.phone" placeholder="电话"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col :span="24">
@@ -176,11 +252,15 @@
                   label="担保方式"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.warrantType"
                 >
-                  <a-select placeholder="担保方式">
-                    <a-select-option value="无担保"> 无担保 </a-select-option>
-                    <a-select-option value="有担保"> 有担保 </a-select-option>
+                  <a-select
+                    placeholder="担保方式"
+                    v-model="model.orderInfo.warrantType"
+                  >
+                    <a-select-option :value="1"> 无担保 </a-select-option>
+                    <a-select-option :value="2"> 有担保 </a-select-option>
+                    <a-select-option :value="3"> OTA担保 </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -189,11 +269,19 @@
                   label="销售员"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.warranter"
                 >
-                  <a-select placeholder="销售员">
-                    <a-select-option value="a"> a </a-select-option>
-                    <a-select-option value="b"> b </a-select-option>
+                  <a-select
+                    placeholder="销售员"
+                    v-model="model.orderInfo.warranter"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="item in warranterList"
+                      :key="item.id"
+                    >
+                      {{ item.name }}
+                    </a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
@@ -202,10 +290,10 @@
                   label="外部单号"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="sex"
+                  prop="orderInfo.outerOrdersNo"
                 >
                   <a-input
-                    v-model="model.mobile"
+                    v-model="model.orderInfo.outerOrdersNo"
                     placeholder="外部单号"
                   ></a-input>
                 </a-form-model-item>
@@ -215,10 +303,10 @@
                   label="备注"
                   :labelCol="labelCol"
                   :wrapperCol="wrapperCol"
-                  prop="remark"
+                  prop="orderInfo.remark"
                 >
                   <a-textarea
-                    v-model="model.remark"
+                    v-model="model.orderInfo.remark"
                     rows="4"
                     placeholder="备注"
                   />
@@ -231,46 +319,76 @@
               </h4>
               <a-divider />
               <p>
-                <span>占房天数:1晚</span>
-                <span style="padding-left: 10px">总价:599.00</span>
+                <span>占房天数:{{ model.orderInfo.dayCount }}晚</span>
+                <span style="padding-left: 10px">总价:{{ amount }}</span>
               </p>
               <a-table
+                v-if="canUserRoomsShow"
                 :columns="columns"
-                :data-source="model.data"
+                :data-source="canUserRooms"
                 :pagination="false"
-                rowKey="id"
+                :rowKey="rowKey"
               >
                 <div
                   slot="expandedRowRender"
-                  slot-scope="text, record, index"
+                  slot-scope="record, index, indent, expanded"
                   style="margin: 0"
                 >
                   <p>
-                    已排房:<a-tag
-                      color="blue"
-                      closable
-                      :visible="visible"
-                      @close.stop="tagClose2(rindex, index)"
-                      v-for="(item, rindex) in text.rooms"
-                      :key="rindex"
-                      >{{ item.roomNo }}</a-tag
+                    已排房:
+                    <template
+                      v-for="(building, bIndex) in record.buildingRooms"
                     >
+                      <a-tag
+                        color="blue"
+                        closable
+                        :visible="visible"
+                        @close.stop="tagClose2(rindex, bIndex, index)"
+                        v-for="(item, rindex) in building.floorRooms"
+                        :key="rindex"
+                        v-if="item.check && item.check == 1"
+                        >{{ item.name }}</a-tag
+                      >
+                      <!-- <a-tag
+                        color="blue"
+                        closable
+                        :visible="visible"
+                        @close.stop="tagClose2(rindex, index)"
+                        v-for="(item, rindex) in record.rooms"
+                        :key="rindex"
+                        >{{ item.name }}</a-tag
+                      > -->
+                    </template>
+                  </p>
+                  <p>
+                    未排房:{{
+                      record.layout.presetNum - (record.rooms || []).length
+                    }}间
                   </p>
-                  <p>未排房:0间</p>
                 </div>
-                <template slot="key3" slot-scope="text, record, index">
-                  <editable-cell
-                    :text="text"
-                    @change="onCellChange('key3', index, $event)"
-                  />
+                <template slot="favPrice" slot-scope="text, record, index">
+                  <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                  {{ record.layout.favPrice }}
                 </template>
-                <template slot="key6" slot-scope="text, record, index">
+                <template slot="presetNum" slot-scope="text, record, index">
                   <div>
-                    <a-input-number v-model="model.data[index].key6" :min="0" />
+                    <a-input-number
+                      v-model="record.layout.presetNum"
+                      :min="(record.rooms || []).length"
+                      :max="record.layout.oldTags"
+                      @change="presetNumChange($event, record)"
+                    />
                   </div>
                 </template>
                 <span slot="action" slot-scope="text, record, index">
-                  <a @click="pulsRoom(index)">排房</a>
+                  <a
+                    :disabled="record.layout.presetNum <= 0"
+                    @click="pulsRoom(index)"
+                    >排房</a
+                  >
                 </span>
               </a-table>
             </div>
@@ -286,11 +404,13 @@
 </template>
 
 <script>
-import { httpAction, getAction } from "@/api/manage";
+import { httpAction, getAction, postAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
 import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
 import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
 const columns = [
   // {
   //     title: "",
@@ -299,33 +419,39 @@ const columns = [
   //   },
   {
     title: "房型",
-    dataIndex: "key1",
+    dataIndex: "name",
     width: 150,
+    customRender: function (text, record) {
+      return record.layout.name;
+    },
   },
   {
     title: "门市价",
-    dataIndex: "key2",
+    dataIndex: "marketPrice",
     width: 100,
+    customRender: function (text, record) {
+      return record.layout.marketPrice;
+    },
   },
   {
     title: "优惠价",
-    dataIndex: "key3",
+    dataIndex: "favPrice",
     width: 120,
-    scopedSlots: { customRender: "key3" },
+    scopedSlots: { customRender: "favPrice" },
   },
   {
     title: "可订数/可超数",
-    dataIndex: "key4",
+    dataIndex: "canUseCount",
     width: 170,
     customRender: function (text, record) {
-      return text + "/" + record.key5;
+      return record.layout.canUseCount + "/0";
     },
   },
   {
     title: "预定间数",
-    dataIndex: "key6",
+    dataIndex: "presetNum",
     width: 100,
-    scopedSlots: { customRender: "key6" },
+    scopedSlots: { customRender: "presetNum" },
   },
   {
     title: "操作",
@@ -358,12 +484,33 @@ export default {
       default: false,
       required: false,
     },
+    bookingOrdersId: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {
+      canUserRoomsShow: true,
       visible: true,
       columns,
-      model: { data: data },
+      model: {
+        // data: data,
+        orderInfo: {
+          bookingOrdersType: this.bookingOrdersId ? 2 : 1,
+          arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+          dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
+          arrivalTimeSpan: moment("18:00", "HH:mm"),
+          dueOutTimeSpan: moment("12:00", "HH:mm"),
+          bookingType: 1,
+          dayCount: 1,
+          warrantType: 1,
+          hourRoomId: "",
+          breakfastNum: 0,
+        },
+        roomIds: [],
+        layoutDayPrices: [],
+      },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -374,22 +521,54 @@ export default {
       },
       confirmLoading: false,
       validatorRules: {
-        dateRange: [{ required: true, message: "请选择维修时间!" }],
-        remark: [{ required: true, message: "请输入维修原因!" }],
+        "orderInfo.bookingType": [
+          { required: true, message: "请选择入住类型!" },
+        ],
+        "orderInfo.arrivalTime2": [
+          { required: true, message: "请选择预抵时间!" },
+        ],
+        "orderInfo.dueOutTime2": [
+          { required: true, message: "请选择预离时间!" },
+        ],
+        "orderInfo.customerSource": [
+          { required: true, message: "请选择客人来源!" },
+        ],
+        "orderInfo.bookingDicWay": [
+          { required: true, message: "请选择预定方式!" },
+        ],
+        "orderInfo.customerType": [
+          { required: true, message: "请选择客人类型!" },
+        ],
+        contactName: [{ required: true, message: "请输入联系人!" }],
+        phone: [{ required: true, message: "请输入电话!" }],
       },
       url: {
-        add: "/business/busMeetingRoom/add",
+        add: "/business/busRoomBookingOrders/add",
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
       result: [],
       selectIndex: 0,
+      customerSourceList: [],
+      bookingdicWayList: [],
+      warranterList: [],
+      hourRoomRuleList: [],
+      canUserRooms: [],
+      customerList: [],
+      oldcustomerList: [],
     };
   },
   computed: {
     formDisabled() {
       return this.disabled;
     },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum;
+      });
+      return sum.toFixed(2);
+    },
   },
   created() {
     var _info = JSON.parse(localStorage.getItem("storeInfo"));
@@ -398,37 +577,289 @@ export default {
     }
     //备份model原始值
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639538915239743490",
+    }).then((res) => {
+      if (res.success) {
+        this.customerSourceList = res.result.records;
+      }
+    });
+    getAction("/business/busDictItem/list", {
+      hotelId: _info.id,
+      dictId: "1639544187093995521",
+    }).then((res) => {
+      if (res.success) {
+        this.bookingdicWayList = res.result.records;
+      }
+    });
+    getAction("/business/busSalesPerson/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.warranterList = res.result.records;
+      }
+    });
+
+    getAction("/rooms/cesHourRoomRule/list", {
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.hourRoomRuleList = res.result.records;
+      }
+    });
+    getAction("/bus/busCustomer/list", {}).then((res) => {
+      if (res.success) {
+        this.customerList = res.result.records;
+        this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+      }
+    });
+
+    postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
+      (res) => {
+        if (res.success) {
+          if (
+            res.result &&
+            res.result.cesAllDayPriceRule &&
+            res.result.cesAllDayPriceRule.leaveTime
+          ) {
+            this.model.orderInfo.dueOutTimeSpan = moment(
+              res.result.cesAllDayPriceRule.leaveTime,
+              "HH:mm"
+            );
+          }
+        }
+
+        this.loadRooms();
+      }
+    );
   },
   methods: {
-    tagClose2(rindex, index) {
-      this.model.data[index].rooms.splice(rindex, 1);
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.canUserRooms];
+      const target = dataSource[dataIndex];
+      console.log("target", target);
+      if (target && target.layout) {
+        target.layout[key] = value;
+        this.canUserRooms = dataSource;
+      }
+      console.log("this.canUserRooms", this.canUserRooms);
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    async loadRooms() {
+      await getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf:
+          this.model.orderInfo.arrivalTime2 +
+          " " +
+          moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
+        endOf:
+          this.model.orderInfo.dueOutTime2 +
+          " " +
+          moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
+        bookingType: this.model.orderInfo.bookingType,
+        hourRoomRuleId: this.model.orderInfo.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          res.result.forEach((t) => {
+            // t.layout = Object.assign({}, t.layout, {
+            //   presetNum: 0,
+            //   oldTags: t.layout.canUseCount,
+            // });
+            this.$set(t.layout, "presetNum", 0);
+            this.$set(t.layout, "oldTags", t.layout.canUseCount);
+            this.$set(t, "rooms", []);
+            t.buildingRooms.forEach((b) => {
+              b.floorRooms.forEach((f) => {
+                this.$set(f, "check", 0);
+              });
+            });
+          });
+          this.canUserRooms = res.result;
+        }
+      });
+    },
+    bookingTypeChange(e) {
+      if (this.model.orderInfo.bookingType == 1) {
+        this.model.orderInfo.hourRoomId = "";
+      } else {
+        var hourRoomRule = this.hourRoomRuleList[0];
+        if (hourRoomRule) {
+          this.model.orderInfo.hourRoomId = hourRoomRule.id;
+        }
+      }
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      } else if (this.model.orderInfo.bookingType === 1) {
+        var mDate = moment(this.model.orderInfo.arrivalTime2).add(1, "days");
+        this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+      }
+      this.loadRooms();
+    },
+    dayCountChange(e) {
+      this.model.orderInfo.dueOutTime2 = moment(
+        this.model.orderInfo.arrivalTime2
+      )
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      var v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.orderInfo.dueOutTime2 = moment(
+          this.model.orderInfo.arrivalTime2
+        )
+          .add(1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.orderInfo.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      var v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.orderInfo.arrivalTime2 = moment(
+          this.model.orderInfo.dueOutTime2
+        )
+          .add(-1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.orderInfo.dueOutTime2).getTime() -
+          new Date(this.model.orderInfo.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.orderInfo.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      }
+      this.loadRooms();
+    },
+    hourRoomIdChange() {
+      if (this.model.orderInfo.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.orderInfo.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.orderInfo.arrivalTime2 +
+              " " +
+              moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.orderInfo.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+          this.model.orderInfo.dueOutTimeSpan = moment(
+            mDate.format("HH:mm"),
+            "HH:mm"
+          );
+        }
+      }
+      this.loadRooms();
+    },
+    tagClose2(rindex, bindex, index) {
+      var id =
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex].id;
+      var findIndex = this.canUserRooms[index].rooms.findIndex(
+        (t) => t.id === id
+      );
+      this.canUserRooms[index].rooms.splice(findIndex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
     },
     modalFormOk(e) {
       // this.modelDefault = Object.assign({}, this.modelDefault, {
       //   rooms: e,
       // });
       // this.edit(this.modelDefault);
-      this.$set(this.model.data[this.selectIndex], "rooms", e);
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
     },
     pulsRoom(index) {
       this.selectIndex = index;
-      this.$refs.modalSelectRoomForm.add();
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
       this.$refs.modalSelectRoomForm.title = "排房";
       this.$refs.modalSelectRoomForm.disableSubmit = false;
     },
     handleSearch(value) {
       let result;
       if (!value) {
-        result = [];
+        result = this.oldcustomerList;
       } else {
-        result = ["a", "b", "c"].map(
-          (domain) => `${value}${domain}(15888888888)`
-        );
+        result = this.oldcustomerList.filter((t) => t.name.includes(value));
       }
-      this.result = result;
+      this.customerList = result;
     },
     handleSelectMember(e) {
-      this.model.mobile = "158888888888";
+      var find = this.customerList.find((t) => t.id === e);
+      this.model.phone = find.phone;
+      this.model.contactName = find.name;
+      this.model.orderInfo.contactId = find.id;
     },
     moment,
     onChange(date, dateString) {
@@ -437,23 +868,95 @@ export default {
     add() {
       this.edit(this.modelDefault);
     },
-    addList(roomLiveList) {
+    addList(roomLiveList, key) {
+      console.log('roomLiveList',roomLiveList)
       this.modelDefault = Object.assign({}, this.modelDefault, {
         rooms: roomLiveList,
       });
+      this.modelDefault.orderInfo.bookingOrdersType = key;
       this.edit(this.modelDefault);
     },
-    edit(record) {
+    async edit(record) {
       this.model = Object.assign({}, record);
       this.visible = true;
+      await this.loadRooms();
+      console.log("this.canUserRooms", this.canUserRooms);
+      const dataSource = JSON.parse(JSON.stringify(this.canUserRooms));
+      if (this.model.rooms && this.model.rooms.length > 0) {
+        this.model.rooms.forEach((item) => {
+          var findIndex = dataSource.findIndex(
+            (t) => t.layout.id == item.layoutId
+          );
+          if (findIndex >= 0) {
+            const target = dataSource[findIndex];
+            if (target && target.layout) {
+              target.layout["presetNum"] += 1;
+              target.layout["canUseCount"] = this.canUserRooms[findIndex].layout.canUseCount - target.layout["presetNum"];
+              target.buildingRooms.forEach((b) => {
+                var room = b.floorRooms.find((f) => f.id == item.id);
+                if (room) {
+                  room.check = 1;
+                  target.rooms.push(room);
+                }
+              });
+            }
+          }
+        });
+      }
+      setTimeout(() => {
+        this.canUserRooms = dataSource;
+      }, 500);
     },
     submitForm() {
       const that = this;
-      that.$message.warning("未实现");
-      return;
+      that.model.roomIds = [];
+      that.canUserRooms.forEach((t) => {
+        var lastlayoutId = t.layout.id;
+        t.buildingRooms.forEach((b) => {
+          b.floorRooms.forEach((f) => {
+            if (f.check && f.check === 1) {
+              that.model.roomIds.push({ layoutId: t.layout.id, roomId: f.id });
+            }
+          });
+        });
+        const roomIds = that.model.roomIds.filter(
+          (it) => it.layoutId === lastlayoutId
+        );
+        var len = roomIds.length;
+        for (var i = len; i < t.layout.presetNum; i++) {
+          that.model.roomIds.push({ layoutId: t.layout.id, roomId: null });
+        }
+        for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
+          if (t.layout.presetNum > 0) {
+            var dayTime = moment(this.model.orderInfo.arrivalTime2)
+              .add(b, "days")
+              .format("YYYY-MM-DD");
+            that.model.layoutDayPrices.push({
+              bookingType: 1,
+              dayTime: dayTime,
+              price: t.layout.favPrice,
+              roomLayoutId: t.layout.id,
+            });
+          }
+        }
+      });
+      that.model.orderInfo.bookingOrdersId = this.bookingOrdersId;
+      console.log("this.model", this.model);
+      if (that.model.roomIds.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {
+          this.model.orderInfo.arrivalTime =
+            this.model.orderInfo.arrivalTime2 +
+            " " +
+            moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm");
+          this.model.orderInfo.dueOutTime =
+            this.model.orderInfo.dueOutTime2 +
+            " " +
+            moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm");
           that.confirmLoading = true;
           let httpurl = "";
           let method = "";
@@ -464,11 +967,15 @@ export default {
             httpurl += this.url.edit;
             method = "put";
           }
+          if (this.model.orderInfo.bookingOrdersId) {
+            httpurl = "/business/busRoomBookingOrders/add-batch";
+            method = "post";
+          }
           httpAction(httpurl, this.model, method)
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);
-                that.$emit("ok");
+                that.$emit("ok", res.result);
               } else {
                 that.$message.warning(res.message);
               }

+ 58 - 47
src/views/room/modules/schedule/ScheduleRoomModal.vue

@@ -5,64 +5,75 @@
     :visible="visible"
     switchFullscreen
     @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
     @cancel="handleCancel"
-    cancelText="关闭">
-    <schedule-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></schedule-room-form>
+    cancelText="关闭"
+  >
+    <schedule-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :bookingOrdersId="bookingOrdersId"
+    ></schedule-room-form>
   </j-modal>
 </template>
 
 <script>
-
-  import ScheduleRoomForm from './ScheduleRoomForm'
-  export default {
-    name: 'ScheduleRoomModal',
-    components: {
-      ScheduleRoomForm
+import ScheduleRoomForm from "./ScheduleRoomForm";
+export default {
+  name: "ScheduleRoomModal",
+  components: {
+    ScheduleRoomForm,
+  },
+  props: {
+    bookingOrdersId: {
+      type: String,
+      default: "",
     },
-    data () {
-      return {
-        title:'',
-        width:1300,
-        visible: false,
-        disableSubmit: false
-      }
+  },
+  data() {
+    return {
+      title: "",
+      width: 1300,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      });
     },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      addList(record) {
+    addList(record,key) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.addList(record);
+        this.$refs.realForm.addList(record,key);
       });
     },
-      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()
-      }
-    }
-  }
+    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(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
 </script>
 <style scoped>
 /deep/.ant-modal-body {

+ 35 - 22
src/views/room/modules/schedule/SelectRoomForm.vue

@@ -13,15 +13,11 @@
               label="房型"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
-              prop="roomType"
             >
-              <a-checkbox-group
-                v-model="model.roomType"
-                :options="roomTypeOptions"
-              />
+              <a-checkbox default-checked disabled>{{ layoutName }}</a-checkbox>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item
               label="房态"
               :labelCol="labelCol"
@@ -33,14 +29,14 @@
                 :options="roomStatusOptions"
               />
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
             <a-form-model-item
-            label="已排房"
+              label="已排房"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
-            {{model.rooms.length||0}}/1
+              {{ model.rooms.length || 0 }}/{{ presetNum }}
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -57,10 +53,10 @@
                 color="blue"
                 closable
                 :visible="visible"
-                @close.stop="tagClose2(index, item.roomNo)"
+                @close.stop="tagClose2(index, item.name)"
                 v-for="(item, index) in model.rooms"
                 :key="index"
-                >{{ item.roomNo }}</a-tag
+                >{{ item.name }}</a-tag
               >
             </a-form-model-item>
           </a-col>
@@ -74,14 +70,14 @@
               }"
             >
               <a-tabs
-                :default-active-key="0"
+                default-active-key="room0"
                 tab-position="left"
                 :style="{ height: '300px' }"
               >
                 <a-tab-pane
                   v-for="(room, index) in roomList"
-                  :key="index"
-                  :tab="room.key"
+                  :key="'room' + index"
+                  :tab="room.floorName"
                 >
                   <div
                     id="components-grid-demo-playground"
@@ -90,8 +86,8 @@
                     <a-row :gutter="[8, 8]">
                       <a-col
                         :span="3"
-                        v-for="(r, rIndex) in room.child"
-                        :key="rIndex"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
                       >
                         <div
                           :class="[
@@ -100,7 +96,7 @@
                           ]"
                           @click="checkRoomClick(r)"
                         >
-                          {{ r.roomNo }}
+                          {{ r.name }}
                         </div></a-col
                       >
                     </a-row>
@@ -154,9 +150,9 @@ export default {
         { key: "1层", child: rooms },
         { key: "2层", child: rooms2 },
       ],
-      roomTypeOptions: ["休闲家庭房", "特价房"],
+      roomTypeOptions: [],
       roomStatusOptions: ["空净", "空脏"],
-      model: { rooms: [] },
+      model: { roomType: "", rooms: [] },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 2 },
@@ -175,6 +171,8 @@ export default {
         edit: "/business/busMeetingRoom/edit",
         queryById: "/business/busMeetingRoom/queryById",
       },
+      layoutName: "",
+      presetNum: 0,
     };
   },
   computed: {
@@ -197,6 +195,10 @@ export default {
         var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
         this.model.rooms.splice(index, 1);
       } else {
+        if (this.model.rooms.length >= this.presetNum) {
+          this.$message.warning("超过排房数量");
+          return;
+        }
         row.check = 1;
         this.model.rooms.push(row);
       }
@@ -204,8 +206,8 @@ export default {
     tagClose2(index, key1) {
       this.model.rooms.splice(index, 1);
       this.roomList.some((t) => {
-        var r = t.child.some((c) => {
-          if (c.roomNo === key1) {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
             c.check = 0;
             return true;
           }
@@ -219,11 +221,22 @@ export default {
     onChange(date, dateString) {
       console.log(date, dateString);
     },
-    add() {
+    add(row) {
+      console.log("buildingRooms", row.buildingRooms);
+      this.layoutName = row.layout.name;
+      this.presetNum = row.layout.presetNum;
+      this.roomList = row.buildingRooms;
       this.edit(this.modelDefault);
     },
     edit(record) {
       this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
       this.visible = true;
     },
     submitForm() {

+ 2 - 2
src/views/room/modules/schedule/SelectRoomFormModal.vue

@@ -33,10 +33,10 @@ export default {
     };
   },
   methods: {
-    add() {
+    add(row) {
       this.visible = true;
       this.$nextTick(() => {
-        this.$refs.realForm.add();
+        this.$refs.realForm.add(row);
       });
     },
     edit(record) {

+ 585 - 0
src/views/room/modules/scheduleTeam/BatchSelectRoomTypeForm.vue

@@ -0,0 +1,585 @@
+<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="arrivalTime2"
+            >
+              <j-date
+                placeholder="预抵时间"
+                v-model="model.arrivalTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.arrivalTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+                @change="arrivalTimeSpanChange"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预离时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dueOutTime2"
+            >
+              <j-date
+                placeholder="预离时间"
+                v-model="model.dueOutTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange2"
+                :disabled="model.bookingType === 2"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.dueOutTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+                :disabled="model.bookingType === 2"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="天数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dayCount"
+            >
+              <a-input-number
+                v-model="model.dayCount"
+                placeholder="天数"
+                :min="1"
+                @change="dayCountChange"
+              ></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+              选择房间
+            </h4>
+            <a-divider />
+            <p>
+              <span>占房天数:{{ model.dayCount }}晚</span>
+              <span style="padding-left: 10px">总价:{{ amount }}</span>
+            </p>
+            <a-table
+              :columns="columns"
+              :data-source="canUserRooms"
+              :pagination="false"
+              :rowKey="rowKey"
+            >
+              <div
+                slot="expandedRowRender"
+                slot-scope="record, index, indent, expanded"
+                style="margin: 0"
+              >
+                <p>
+                  已排房:
+                  <template v-for="(building, bIndex) in record.buildingRooms">
+                    <a-tag
+                      color="blue"
+                      closable
+                      :visible="visible"
+                      @close.stop="tagClose2(rindex, bIndex, index)"
+                      v-for="(item, rindex) in building.floorRooms"
+                      :key="rindex"
+                      v-if="item.check && item.check == 1"
+                      >{{ item.name }}</a-tag
+                    >
+                  </template>
+                </p>
+                <p>
+                  未排房:{{
+                    record.layout.presetNum - (record.rooms || []).length
+                  }}间
+                </p>
+              </div>
+              <template slot="favPrice" slot-scope="text, record, index">
+                <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                {{ record.layout.favPrice }}
+              </template>
+              <template slot="presetNum" slot-scope="text, record, index">
+                <div>
+                  <a-input-number
+                    v-model="record.layout.presetNum"
+                    :min="(record.rooms || []).length"
+                    :max="record.layout.oldTags"
+                    @change="presetNumChange($event, record)"
+                  />
+                </div>
+              </template>
+              <span slot="action" slot-scope="text, record, index">
+                <a
+                  :disabled="record.layout.presetNum <= 0"
+                  @click="pulsRoom(index)"
+                  >排房</a
+                >
+              </span>
+            </a-table>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import moment from "moment";
+export default {
+  name: "SelectRoomForm",
+  components: { SelectRoomFormModal },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+    hourRoomRuleList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      visible: true,
+      columns: [
+        // {
+        //     title: "",
+        //     dataIndex: "key",
+        //     width: 20,
+        //   },
+        {
+          title: "房型",
+          dataIndex: "name",
+          width: 150,
+          customRender: function (text, record) {
+            return record.layout.name;
+          },
+        },
+        {
+          title: "门市价",
+          dataIndex: "marketPrice",
+          width: 100,
+          customRender: function (text, record) {
+            return record.layout.marketPrice;
+          },
+        },
+        {
+          title: "优惠价",
+          dataIndex: "favPrice",
+          width: 120,
+          scopedSlots: { customRender: "favPrice" },
+        },
+        {
+          title: "可订数/可超数",
+          dataIndex: "canUseCount",
+          width: 170,
+          customRender: function (text, record) {
+            return record.layout.canUseCount + "/0";
+          },
+        },
+        {
+          title: "预定间数",
+          dataIndex: "presetNum",
+          width: 100,
+          scopedSlots: { customRender: "presetNum" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      model: {
+        arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+        dueOutTime2: this.orderInfo.dueOutTime2,
+        arrivalTimeSpan: moment("18:00", "HH:mm"),
+        dueOutTimeSpan: this.orderInfo.dueOutTimeSpan,
+        dayCount: 1,
+        bookingType: this.orderInfo.bookingType,
+        hourRoomId: this.orderInfo.hourRoomId,
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum * this.model.dayCount;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    if (this.model.bookingType === 2) {
+      var find = this.hourRoomRuleList.find(
+        (t) => t.id === this.model.hourRoomId
+      );
+
+      console.log("222222", this.hourRoomRuleList);
+      if (find) {
+        var mDate = moment(
+          this.model.arrivalTime2 +
+            " " +
+            moment(this.model.arrivalTimeSpan).format("HH:mm")
+        ).add(find.afterOpenRoom, "minutes");
+        this.model.dueOutTime2 = mDate.format("YYYY-MM-DD");
+
+        this.$nextTick(() => {
+          this.model.dueOutTimeSpan = moment(mDate.format("HH:mm"), "HH:mm");
+          this.loadRooms();
+        });
+      } else {
+        this.loadRooms();
+      }
+    } else {
+      this.loadRooms();
+    }
+  },
+  methods: {
+    tagClose2(rindex, bindex, index) {
+      this.canUserRooms[index].rooms.splice(rindex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
+    },
+    modalFormOk(e) {
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
+    },
+    pulsRoom(index) {
+      this.selectIndex = index;
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    dayCountChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      var v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+          .add(1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      var v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      if (v <= 0) {
+        this.model.arrivalTime2 = moment(this.model.dueOutTime2)
+          .add(-1, "days")
+          .format("YYYY-MM-DD");
+      }
+      v = parseInt(
+        (new Date(this.model.dueOutTime2).getTime() -
+          new Date(this.model.arrivalTime2).getTime()) /
+          (1000 * 60 * 60 * 24)
+      );
+      this.model.dayCount = Math.abs(v);
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+      if (this.model.bookingType === 2) {
+        var find = this.hourRoomRuleList.find(
+          (t) => t.id === this.model.hourRoomId
+        );
+        if (find) {
+          var mDate = moment(
+            this.model.arrivalTime2 +
+              " " +
+              moment(this.model.arrivalTimeSpan).format("HH:mm")
+          ).add(find.afterOpenRoom, "minutes");
+          this.model.dueOutTime2 = mDate.format("YYYY-MM-DD");
+          this.model.dueOutTimeSpan = moment(mDate.format("HH:mm"), "HH:mm");
+        }
+      }
+      this.loadRooms();
+    },
+    isDateIntersection(start1, end1, start2, end2) {
+      var startdate1 = new Date(start1.replace("-", "/").replace("-", "/"));
+      var enddate1 = new Date(end1.replace("-", "/").replace("-", "/"));
+
+      var startdate2 = new Date(start2.replace("-", "/").replace("-", "/"));
+      var enddate2 = new Date(end2.replace("-", "/").replace("-", "/"));
+
+      if (startdate1 >= startdate2 && startdate1 <= enddate2) {
+        return true;
+      }
+
+      if (enddate1 >= startdate2 && enddate1 <= enddate2) {
+        return true;
+      }
+
+      if (startdate1 <= startdate2 && enddate1 >= enddate2) {
+        return true;
+      }
+      return false;
+    },
+    loadRooms() {
+      var startOf =
+        this.model.arrivalTime2 +
+        " " +
+        moment(this.model.arrivalTimeSpan).format("HH:mm");
+      var endOf =
+        this.model.dueOutTime2 +
+        " " +
+        moment(this.model.dueOutTimeSpan).format("HH:mm");
+
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf: startOf,
+        endOf: endOf,
+        bookingType: this.model.bookingType,
+        hourRoomRuleId: this.model.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          if (this.batchRoomsTypeList.length > 0) {
+            this.batchRoomsTypeList.forEach((bt) => {
+              var dateArr = bt.key.split(",");
+              var startOf2 = dateArr[0];
+              var endOf2 = dateArr[1];
+              //判断日期段是否有交集,有交集的情况下可订数量动态计算,动态排除已选排房
+              var isDateSection = this.isDateIntersection(
+                startOf,
+                endOf,
+                startOf2,
+                endOf2
+              );
+              console.log("isDateSection", isDateSection);
+              if (isDateSection) {
+                res.result.forEach((t) => {
+                  var find = bt.data.find(
+                    (ibt) => ibt.layout.id === t.layout.id
+                  );
+
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    canUseCount:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    oldTags:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    if (find && find.buildingRooms) {
+                      find.buildingRooms.forEach((fbr) => {
+                        fbr.floorRooms.forEach((fbrfloorRoom) => {
+                          if (fbrfloorRoom.check && fbrfloorRoom.check == 1) {
+                            var findIndex = b.floorRooms.findIndex(
+                              (floorRoom) => floorRoom.id === fbrfloorRoom.id
+                            );
+                            if (findIndex >= 0) {
+                              b.floorRooms.splice(findIndex, 1);
+                            }
+                          }
+                        });
+                      });
+                    }
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              } else {
+                res.result.forEach((t) => {
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              }
+            });
+            this.canUserRooms = res.result;
+          } else {
+            res.result.forEach((t) => {
+              t.layout = Object.assign({}, t.layout, {
+                presetNum: 0,
+                oldTags: t.layout.canUseCount,
+              });
+              t.buildingRooms.forEach((b) => {
+                b.floorRooms.forEach((f) => {
+                  this.$set(f, "check", 0);
+                });
+              });
+            });
+            this.canUserRooms = res.result;
+          }
+        }
+      });
+    },
+    moment,
+    add(row) {
+      // console.log("buildingRooms", row.buildingRooms);
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      // this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      var data = that.canUserRooms.filter((it) => it.layout.presetNum > 0);
+      if (data.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
+      that.$emit("ok", {
+        key:
+          this.model.arrivalTime2 +
+          " " +
+          moment(this.model.arrivalTimeSpan).format("HH:mm") +
+          "," +
+          this.model.dueOutTime2 +
+          " " +
+          moment(this.model.dueOutTimeSpan).format("HH:mm"),
+        arrivalTime2: this.model.arrivalTime2,
+        dueOutTime2: this.model.dueOutTime2,
+        arrivalTimeSpan: this.model.arrivalTimeSpan,
+        dueOutTimeSpan: this.model.dueOutTimeSpan,
+        dayCount: this.model.dayCount,
+        amount: this.amount,
+        data: data,
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 82 - 0
src/views/room/modules/scheduleTeam/BatchSelectRoomTypeFormModal.vue

@@ -0,0 +1,82 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <batch-select-room-type-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :orderInfo="orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+      :hourRoomRuleList="hourRoomRuleList"
+    ></batch-select-room-type-form>
+  </j-modal>
+</template>
+
+<script>
+import BatchSelectRoomTypeForm from "./BatchSelectRoomTypeForm";
+export default {
+  name: "BatchSelectRoomTypeFormModal",
+  components: {
+    BatchSelectRoomTypeForm,
+  },
+  props: {
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+    hourRoomRuleList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 900,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    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(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1335 - 0
src/views/room/modules/scheduleTeam/EdiBatchScheduleRoomForm.vue


+ 527 - 0
src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeForm.vue

@@ -0,0 +1,527 @@
+<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="arrivalTime2"
+            >
+              <j-date
+                placeholder="预抵时间"
+                v-model="model.arrivalTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.arrivalTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="预离时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dueOutTime2"
+            >
+              <j-date
+                placeholder="预离时间"
+                v-model="model.dueOutTime2"
+                style="width: 180px"
+                :allowClear="false"
+                :disabled-date="disabledDate"
+                @change="arrivalTimeChange2"
+              />
+              <a-time-picker
+                style="width: 80px; margin-left: 2px"
+                v-model="model.dueOutTimeSpan"
+                format="HH:mm"
+                :allowClear="false"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="天数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dayCount"
+            >
+              <a-input-number
+                v-model="model.dayCount"
+                placeholder="天数"
+                :min="1"
+                @change="dayCountChange"
+              ></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+              选择房间
+            </h4>
+            <a-divider />
+            <p>
+              <span>占房天数:{{ model.dayCount }}晚</span>
+              <span style="padding-left: 10px">总价:{{ amount }}</span>
+            </p>
+            <a-table
+              :columns="columns"
+              :data-source="canUserRooms"
+              :pagination="false"
+              :rowKey="rowKey"
+            >
+              <div
+                slot="expandedRowRender"
+                slot-scope="record, index, indent, expanded"
+                style="margin: 0"
+              >
+                <p>
+                  已排房:
+                  <template v-for="(building, bIndex) in record.buildingRooms">
+                    <a-tag
+                      color="blue"
+                      closable
+                      :visible="visible"
+                      @close.stop="tagClose2(rindex, bIndex, index)"
+                      v-for="(item, rindex) in building.floorRooms"
+                      :key="rindex"
+                      v-if="item.check && item.check == 1"
+                      >{{ item.name }}</a-tag
+                    >
+                  </template>
+                </p>
+                <p>
+                  未排房:{{
+                    record.layout.presetNum - (record.rooms || []).length
+                  }}间
+                </p>
+              </div>
+              <template slot="favPrice" slot-scope="text, record, index">
+                <!-- <editable-cell
+                    :text="record.layout.favPrice"
+                    @change="onCellChange('favPrice', index, $event)"
+                  /> -->
+                {{ record.layout.favPrice }}
+              </template>
+              <template slot="presetNum" slot-scope="text, record, index">
+                <div>
+                  <a-input-number
+                    v-model="record.layout.presetNum"
+                    :min="(record.rooms || []).length"
+                    :max="record.layout.oldTags"
+                    @change="presetNumChange($event, record)"
+                  />
+                </div>
+              </template>
+              <span slot="action" slot-scope="text, record, index">
+                <a
+                  :disabled="record.layout.presetNum <= 0"
+                  @click="pulsRoom(index)"
+                  >排房</a
+                >
+              </span>
+            </a-table>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import moment from "moment";
+export default {
+  name: "SelectRoomForm",
+  components: { SelectRoomFormModal },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      visible: true,
+      columns: [
+        // {
+        //     title: "",
+        //     dataIndex: "key",
+        //     width: 20,
+        //   },
+        {
+          title: "房型",
+          dataIndex: "name",
+          width: 150,
+          customRender: function (text, record) {
+            return record.layout.name;
+          },
+        },
+        {
+          title: "门市价",
+          dataIndex: "marketPrice",
+          width: 100,
+          customRender: function (text, record) {
+            return record.layout.marketPrice;
+          },
+        },
+        {
+          title: "优惠价",
+          dataIndex: "favPrice",
+          width: 120,
+          scopedSlots: { customRender: "favPrice" },
+        },
+        {
+          title: "可订数/可超数",
+          dataIndex: "canUseCount",
+          width: 170,
+          customRender: function (text, record) {
+            return record.layout.canUseCount + "/0";
+          },
+        },
+        {
+          title: "预定间数",
+          dataIndex: "presetNum",
+          width: 100,
+          scopedSlots: { customRender: "presetNum" },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      model: {
+        arrivalTime2: this.orderInfo.arrivalTime2,
+        dueOutTime2: this.orderInfo.dueOutTime2,
+        arrivalTimeSpan: this.orderInfo.arrivalTimeSpan,
+        dueOutTimeSpan: this.orderInfo.dueOutTimeSpan,
+        dayCount: this.orderInfo.dayCount,
+        bookingType: this.orderInfo.bookingType,
+        hourRoomId: this.orderInfo.hourRoomId,
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+      canUserRooms: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum * this.model.dayCount;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.loadRooms();
+  },
+  methods: {
+    tagClose2(rindex, bindex, index) {
+      this.canUserRooms[index].rooms.splice(rindex, 1);
+
+      this.$set(
+        this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
+        "check",
+        0
+      );
+      console.log(this.canUserRooms);
+    },
+    modalFormOk(e) {
+      this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
+      console.log(this.canUserRooms[this.selectIndex]);
+    },
+    pulsRoom(index) {
+      this.selectIndex = index;
+      this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    rowKey(record) {
+      return record.layout.id;
+    },
+    dayCountChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      this.model.dueOutTime2 = moment(this.model.arrivalTime2)
+        .add(this.model.dayCount, "days")
+        .format("YYYY-MM-DD");
+      this.model.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.arrivalTime2).getTime() -
+            new Date(this.model.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    arrivalTimeChange2(e) {
+      this.model.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.arrivalTime2).getTime() -
+            new Date(this.model.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    isDateIntersection(start1, end1, start2, end2) {
+      var startdate1 = new Date(start1.replace("-", "/").replace("-", "/"));
+      var enddate1 = new Date(end1.replace("-", "/").replace("-", "/"));
+
+      var startdate2 = new Date(start2.replace("-", "/").replace("-", "/"));
+      var enddate2 = new Date(end2.replace("-", "/").replace("-", "/"));
+
+      if (startdate1 >= startdate2 && startdate1 <= enddate2) {
+        return true;
+      }
+
+      if (enddate1 >= startdate2 && enddate1 <= enddate2) {
+        return true;
+      }
+
+      if (startdate1 <= startdate2 && enddate1 >= enddate2) {
+        return true;
+      }
+      return false;
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    loadRooms() {
+      var startOf =
+        this.model.arrivalTime2 +
+        " " +
+        moment(this.model.arrivalTimeSpan).format("HH:mm");
+      var endOf =
+        this.model.dueOutTime2 +
+        " " +
+        moment(this.model.dueOutTimeSpan).format("HH:mm");
+
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf: startOf,
+        endOf: endOf,
+        bookingType: this.model.bookingType,
+        hourRoomRuleId: this.model.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          if (this.batchRoomsTypeList.length > 0) {
+            this.batchRoomsTypeList.forEach((bt) => {
+              var dateArr = bt.key.split(",");
+              var startOf2 = dateArr[0];
+              var endOf2 = dateArr[1];
+              //判断日期段是否有交集,有交集的情况下可订数量动态计算,动态排除已选排房
+              var isDateSection = this.isDateIntersection(
+                startOf,
+                endOf,
+                startOf2,
+                endOf2
+              );
+              console.log("isDateSection", isDateSection);
+              if (isDateSection) {
+                res.result.forEach((t) => {
+                  this.$set(t, "rooms", []);
+                  var find = bt.data.find(
+                    (ibt) => ibt.layout.id === t.layout.id
+                  );
+
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: find ? find.layout.presetNum : 0,
+                    canUseCount:
+                      t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    // oldTags:
+                    //   t.layout.canUseCount - (find ? find.layout.presetNum : 0),
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    if (find && find.buildingRooms) {
+                      find.buildingRooms.forEach((fbr) => {
+                        fbr.floorRooms.forEach((fbrfloorRoom) => {
+                          if (fbrfloorRoom.check && fbrfloorRoom.check == 1) {
+                            var findIndex = b.floorRooms.findIndex(
+                              (floorRoom) => floorRoom.id === fbrfloorRoom.id
+                            );
+                            if (findIndex >= 0) {
+                              // b.floorRooms.splice(findIndex, 1);
+                              this.$set(b.floorRooms[findIndex], "check", 1);
+                              t.rooms.push(b)
+                            }
+                          }
+                        });
+                      });
+                    }
+                    b.floorRooms.forEach((f) => {
+                      if (!f.check) {
+                        this.$set(f, "check", 0);
+                      }
+                    });
+                  });
+                });
+              } else {
+                res.result.forEach((t) => {
+                  t.layout = Object.assign({}, t.layout, {
+                    presetNum: 0,
+                    oldTags: t.layout.canUseCount,
+                  });
+                  t.buildingRooms.forEach((b) => {
+                    b.floorRooms.forEach((f) => {
+                      this.$set(f, "check", 0);
+                    });
+                  });
+                });
+              }
+            });
+            this.canUserRooms = res.result;
+          } else {
+            res.result.forEach((t) => {
+              t.layout = Object.assign({}, t.layout, {
+                presetNum: 0,
+                oldTags: t.layout.canUseCount,
+              });
+              t.buildingRooms.forEach((b) => {
+                b.floorRooms.forEach((f) => {
+                  this.$set(f, "check", 0);
+                });
+              });
+            });
+            this.canUserRooms = res.result;
+          }
+        }
+      });
+    },
+    moment,
+    add(row) {
+      // console.log("buildingRooms", row);
+      // this.layoutName = row.layout.name;
+      // this.presetNum = row.layout.presetNum;
+      // this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      var data = that.canUserRooms.filter((it) => it.layout.presetNum > 0);
+      if (data.length <= 0) {
+        that.$message.warning("请先添加房间");
+        return;
+      }
+      that.$emit("ok", {
+        key:
+          this.model.arrivalTime2 +
+          " " +
+          moment(this.model.arrivalTimeSpan).format("HH:mm") +
+          "," +
+          this.model.dueOutTime2 +
+          " " +
+          moment(this.model.dueOutTimeSpan).format("HH:mm"),
+        arrivalTime2: this.model.arrivalTime2,
+        dueOutTime2: this.model.dueOutTime2,
+        arrivalTimeSpan: this.model.arrivalTimeSpan,
+        dueOutTimeSpan: this.model.dueOutTimeSpan,
+        dayCount: this.model.dayCount,
+        amount: this.amount,
+        data: data,
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 77 - 0
src/views/room/modules/scheduleTeam/EditBatchSelectRoomTypeFormModal.vue

@@ -0,0 +1,77 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <batch-select-room-type-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :orderInfo="orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+    ></batch-select-room-type-form>
+  </j-modal>
+</template>
+
+<script>
+import BatchSelectRoomTypeForm from "./EditBatchSelectRoomTypeForm";
+export default {
+  name: "BatchSelectRoomTypeFormModal",
+  components: {
+    BatchSelectRoomTypeForm,
+  },
+  props: {
+    orderInfo: {
+      type: Object,
+      default: {},
+    },
+    batchRoomsTypeList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 900,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    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(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 929 - 0
src/views/room/modules/scheduleTeam/EditScheduleRoomFormMain.vue

@@ -0,0 +1,929 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <div style="gap: 10px; display: flex; margin: 10px">
+      <a-button>加入团队</a-button>
+      <a-button @click="editOrder">确认修改</a-button>
+    </div>
+    <j-form-container>
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <div style="display: flex; gap: 15px">
+            <div style="width: 39%">
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                团队信息
+              </h4>
+              <a-divider />
+              <a-col :span="24">
+                <a-form-model-item
+                  label="团队名称"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.teamName"
+                >
+                  <a-input
+                    v-model="model.orderInfo.teamName"
+                    placeholder="团队名称"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="团队类型"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.teamTypeDicId"
+                >
+                  <a-select
+                    placeholder="团队类型"
+                    v-model="model.orderInfo.teamTypeDicId"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in teamTypeDicList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </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="orderInfo.teamPeopleNumber"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.teamPeopleNumber"
+                    placeholder="团队人数"
+                    :min="1"
+                    @change="dayCountChange"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="早餐"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.breakfastNum"
+                >
+                  <a-input-number
+                    v-model="model.orderInfo.breakfastNum"
+                    placeholder="早餐"
+                    :min="0"
+                  ></a-input-number>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :span="24">
+                <a-form-model-item
+                  label="客人来源"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.customerSource"
+                >
+                  <a-select
+                    placeholder="客人来源"
+                    v-model="model.orderInfo.customerSource"
+                  >
+                    <a-select-option
+                      :value="item.id"
+                      v-for="(item, index) in customerSourceList"
+                      :key="item.id"
+                    >
+                      {{ item.itemText }}
+                    </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="orderInfo.publicConsumeProject"
+                >
+                  <a-select
+                    mode="multiple"
+                    placeholder="公付项目"
+                    v-model="model.orderInfo.publicConsumeProject"
+                  >
+                    <a-select-option :value="1"> 房费 </a-select-option>
+                    <a-select-option :value="2"> 消费 </a-select-option>
+                    <a-select-option :value="3"> 会员费 </a-select-option>
+                    <a-select-option :value="4"> 会议费 </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="orderInfo.customerType"
+                >
+                  <a-select
+                    placeholder="客人类型"
+                    v-model="model.orderInfo.customerType"
+                  >
+                    <a-select-option :value="1"> 散客 </a-select-option>
+                    <a-select-option :value="2"> 会员 </a-select-option>
+                    <a-select-option :value="3"> 协议单位 </a-select-option>
+                    <a-select-option :value="4"> 中介 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24" v-if="model.orderInfo.bookingType === 1">
+                <a-form-model-item
+                  label="房价方案"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.roomPriceSlnId"
+                >
+                  <a-select
+                    placeholder="房价方案"
+                    v-model="model.orderInfo.roomPriceSlnId"
+                  >
+                    <a-select-option value="会员价"> 会员价 </a-select-option>
+                    <a-select-option value="平日价"> 平日价 </a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                其他信息
+              </h4>
+              <a-divider />
+              <a-col :span="24">
+                <a-form-model-item
+                  label="联系人"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="contactName"
+                >
+                  <a-auto-complete
+                    v-model="model.contactName"
+                    placeholder="联系人"
+                    @search="handleSearch"
+                    @select="(e) => handleSelectMember(e)"
+                  >
+                    <template slot="dataSource">
+                      <a-select-option v-for="item in result" :key="item">{{
+                        item
+                      }}</a-select-option>
+                    </template>
+                  </a-auto-complete>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="电话"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="phone"
+                >
+                  <a-input v-model="model.phone" placeholder="电话"></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="领队"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.leaderName"
+                >
+                  <a-input
+                    v-model="model.orderInfo.leaderName"
+                    placeholder="领队"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="担保方式"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.warrantType"
+                >
+                  <a-select
+                    placeholder="担保方式"
+                    v-model="model.orderInfo.warrantType"
+                  >
+                    <a-select-option :value="1"> 无担保 </a-select-option>
+                    <a-select-option :value="2"> 有担保 </a-select-option>
+                    <a-select-option :value="3"> OTA担保 </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="orderInfo.warranter"
+                >
+                  <a-select
+                    placeholder="销售员"
+                    v-model="model.orderInfo.warranter"
+                  >
+                    <a-select-option
+                      value="item.id"
+                      v-for="item in warranterList"
+                      :key="item.id"
+                    >
+                      {{ item.name }}
+                    </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="orderInfo.outerOrdersNo"
+                >
+                  <a-input
+                    v-model="model.orderInfo.outerOrdersNo"
+                    placeholder="外部单号"
+                  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item
+                  label="备注"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  prop="orderInfo.remark"
+                >
+                  <a-textarea
+                    v-model="model.orderInfo.remark"
+                    rows="4"
+                    placeholder="备注"
+                  />
+                </a-form-model-item>
+              </a-col>
+            </div>
+            <div style="width: 61%">
+              <h4 style="color: rgba(255, 141, 26, 1); font-weight: 600">
+                团队汇总
+              </h4>
+              <a-divider />
+
+              <a-table
+                :columns="columns"
+                :data-source="model.batchRooms"
+                :pagination="false"
+                rowKey="batchNo"
+              >
+                <div
+                  slot="expandedRowRender"
+                  slot-scope="record, index, indent, expanded"
+                  style="margin: 0"
+                >
+                  <a-table
+                    :columns="columns2"
+                    :data-source="record.buildingRooms"
+                    :pagination="false"
+                    :rowKey="rowKey"
+                  >
+                    <span slot="action" slot-scope="text, record, index">
+                      <a @click="pulsRoom(brindex, index)">退出团队</a>
+                    </span>
+                  </a-table>
+                </div>
+              </a-table>
+            </div>
+          </div>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-room-form-modal
+      ref="modalSelectRoomForm"
+      @ok="modalFormOk"
+    ></select-room-form-modal>
+    <batch-select-room-type-form-modal
+      ref="modalBatchSelectRoomTypeForm"
+      @ok="modalBatchSelectRoomTypeFormOk"
+      :orderInfo="model.orderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+      :hourRoomRuleList="hourRoomRuleList"
+    ></batch-select-room-type-form-modal>
+    <edit-batch-select-room-type-form-modal
+      ref="modalEditBatchSelectRoomTypeForm"
+      @ok="modalEditBatchSelectRoomTypeFormOk"
+      :orderInfo="batchOrderInfo"
+      :batchRoomsTypeList="batchRoomsTypeList"
+    ></edit-batch-select-room-type-form-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction, postAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import moment from "moment";
+import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
+import SelectRoomFormModal from "./SelectRoomFormModal.vue";
+import BatchSelectRoomTypeFormModal from "./BatchSelectRoomTypeFormModal.vue";
+import EditBatchSelectRoomTypeFormModal from "./EditBatchSelectRoomTypeFormModal.vue";
+
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
+const columns = [
+  {
+    title: "批次",
+    dataIndex: "batchNo",
+    customRender: function (text, record, index) {
+      return index + 1;
+    },
+  },
+  {
+    title: "预抵时间",
+    dataIndex: "arrivalTime",
+  },
+  {
+    title: "预离时间",
+    dataIndex: "dueOutTime",
+  },
+  {
+    title: "天数",
+    dataIndex: "dayCount",
+  },
+];
+const data = [];
+for (let i = 0; i < 2; i++) {
+  data.push({
+    id: i,
+    key1: `双人床` + i,
+    key2: 298,
+    key3: 298,
+    key4: 8,
+    key5: 0,
+    key6: 0,
+  });
+}
+export default {
+  name: "ScheduleRoomForm",
+  components: {
+    EditableCell,
+    SelectRoomFormModal,
+    BatchSelectRoomTypeFormModal,
+    EditBatchSelectRoomTypeFormModal,
+  },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    id: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      // id: "",
+      visible: true,
+      columns,
+      columns2: [
+        {
+          title: "姓名",
+          dataIndex: "name",
+        },
+        {
+          title: "房号",
+          dataIndex: "marketPrice",
+        },
+        {
+          title: "房型",
+          dataIndex: "favPrice",
+        },
+        {
+          title: "入住时间",
+          dataIndex: "canUseCount",
+        },
+        {
+          title: "状态",
+          dataIndex: "canUseCount",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 70,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      batchOrderInfo: {},
+      model: {
+        // data: data,
+        orderInfo: {
+          bookingOrdersType: 2,
+          arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
+          dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
+          arrivalTimeSpan: moment("18:00", "HH:mm"),
+          dueOutTimeSpan: moment("12:00", "HH:mm"),
+          bookingType: 1,
+          dayCount: 1,
+          warrantType: 1,
+          hourRoomId: "",
+          breakfastNum: 0,
+          teamPeopleNumber: 0,
+        },
+        roomIds: [],
+        layoutDayPrices: [],
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        "orderInfo.teamName": [{ required: true, message: "请输入团队名称!" }],
+        "orderInfo.teamTypeDicId": [
+          { required: true, message: "请选择团队类型!" },
+        ],
+        "orderInfo.bookingType": [
+          { required: true, message: "请选择入住类型!" },
+        ],
+        "orderInfo.arrivalTime2": [
+          { required: true, message: "请选择预抵时间!" },
+        ],
+        "orderInfo.dueOutTime2": [
+          { required: true, message: "请选择预离时间!" },
+        ],
+        "orderInfo.customerSource": [
+          { required: true, message: "请选择客人来源!" },
+        ],
+        "orderInfo.bookingDicWay": [
+          { required: true, message: "请选择预定方式!" },
+        ],
+        "orderInfo.customerType": [
+          { required: true, message: "请选择客人类型!" },
+        ],
+        contactName: [{ required: true, message: "请输入联系人!" }],
+        phone: [{ required: true, message: "请输入电话!" }],
+      },
+      url: {
+        add: "/business/busRoomBookingOrders/add",
+        edit: "/business/busRoomBookingOrders/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+        getBookingOrderInfo:
+          "/business/busRoomBookingOrders/getBookingOrderInfo",
+      },
+      result: [],
+      selectIndex: 0,
+      selectChidIndex: 0,
+      customerSourceList: [],
+      bookingdicWayList: [],
+      warranterList: [],
+      hourRoomRuleList: [],
+      canUserRooms: [],
+      teamTypeDicList: [],
+      batchRoomsTypeList: [],
+      customerList: [],
+      oldcustomerList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+    amount() {
+      var sum = 0;
+      this.canUserRooms.forEach((t) => {
+        sum += t.layout.favPrice * t.layout.presetNum;
+      });
+      return sum.toFixed(2);
+    },
+  },
+  created() {
+    this.load();
+  },
+  mounted() {
+    // this.pulsBatch();
+  },
+  methods: {
+    load(id) {
+      // this.id = id;
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      if (_info) {
+        this.model.hotelId = _info.id;
+      }
+      //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639544105636417538",
+      }).then((res) => {
+        if (res.success) {
+          this.teamTypeDicList = res.result.records;
+        }
+      });
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639538915239743490",
+      }).then((res) => {
+        if (res.success) {
+          this.customerSourceList = res.result.records;
+        }
+      });
+      getAction("/business/busDictItem/list", {
+        hotelId: _info.id,
+        dictId: "1639544187093995521",
+      }).then((res) => {
+        if (res.success) {
+          this.bookingdicWayList = res.result.records;
+        }
+      });
+      getAction("/business/busSalesPerson/list", {
+        hotelId: _info.id,
+        pageNo: 1,
+        pageSize: 100,
+      }).then((res) => {
+        if (res.success) {
+          this.warranterList = res.result.records;
+        }
+      });
+
+      getAction("/rooms/cesHourRoomRule/list", {
+        pageNo: 1,
+        pageSize: 100,
+      }).then((res) => {
+        if (res.success) {
+          this.hourRoomRuleList = res.result.records;
+        }
+      });
+
+      // postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
+      //   (res) => {
+      //     if (res.success) {
+      //       if (
+      //         res.result &&
+      //         res.result.cesAllDayPriceRule &&
+      //         res.result.cesAllDayPriceRule.leaveTime
+      //       ) {
+      //         this.model.orderInfo.dueOutTimeSpan = moment(
+      //           res.result.cesAllDayPriceRule.leaveTime,
+      //           "HH:mm"
+      //         );
+      //       }
+      //     }
+
+      //     // this.loadRooms();
+      //   }
+      // );
+      this.getBookingOrderInfo();
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+          this.oldcustomerList = JSON.parse(JSON.stringify(this.customerList));
+          var find = this.oldcustomerList.find(
+            (t) => t.id == this.model.orderInfo.contactId
+          );
+          if (find) {
+            this.model.contactName = find.name;
+            this.model.phone = find.phone;
+          }
+
+          this.$emit("ok", this.model);
+        }
+      });
+    },
+    getBookingOrderInfo() {
+      console.log("this.id", this.id);
+      getAction(this.url.getBookingOrderInfo, {
+        bookingNo: this.id,
+      }).then((res) => {
+        if (res.success) {
+          this.model = res.result;
+          var publicConsumeProject = [];
+          if (this.model.orderInfo.publicRoomFee == 1) {
+            publicConsumeProject.push(1);
+          }
+          if (this.model.orderInfo.publicConsumeFee == 1) {
+            publicConsumeProject.push(2);
+          }
+          if (this.model.orderInfo.publicVipFee == 1) {
+            publicConsumeProject.push(3);
+          }
+          if (this.model.orderInfo.publicMeetingFee == 1) {
+            publicConsumeProject.push(4);
+          }
+
+          // this.model.orderInfo.publicConsumeProject = publicConsumeProject;
+          this.$set(this.model.orderInfo,'publicConsumeProject',publicConsumeProject)
+
+          this.getbusCustomer();
+          // this.loadRooms();
+        }
+      });
+    },
+    deleteBatch(index) {
+      this.batchRoomsTypeList.splice(index, 1);
+    },
+    presetNumChange(e, record) {
+      console.log(e);
+      record.layout.canUseCount = record.layout.oldTags - e;
+    },
+    onCellChange(key, dataIndex, value) {
+      const dataSource = [...this.canUserRooms];
+      const target = dataSource[dataIndex];
+      console.log("target", target);
+      if (target && target.layout) {
+        target.layout[key] = value;
+        this.canUserRooms = dataSource;
+      }
+      console.log("this.canUserRooms", this.canUserRooms);
+    },
+    rowKey(record) {
+      return record.name;
+    },
+    loadRooms() {
+      getAction("/rooms/cesRooms/can-user-rooms", {
+        startOf:
+          this.model.orderInfo.arrivalTime2 +
+          " " +
+          moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
+        endOf:
+          this.model.orderInfo.dueOutTime2 +
+          " " +
+          moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
+        bookingType: this.model.orderInfo.bookingType,
+        hourRoomRuleId: this.model.orderInfo.hourRoomId,
+      }).then((res) => {
+        if (res.success) {
+          res.result.forEach((t) => {
+            t.layout = Object.assign({}, t.layout, {
+              presetNum: 0,
+              oldTags: t.layout.canUseCount,
+            });
+            t.buildingRooms.forEach((b) => {
+              b.floorRooms.forEach((f) => {
+                this.$set(f, "check", 0);
+              });
+            });
+          });
+          this.canUserRooms = res.result;
+        }
+      });
+    },
+    bookingTypeChange(e) {
+      if (this.model.orderInfo.bookingType == 1) {
+        this.model.orderInfo.hourRoomId = "";
+      } else {
+        var hourRoomRule = this.hourRoomRuleList[0];
+        if (hourRoomRule) {
+          this.model.orderInfo.hourRoomId = hourRoomRule.id;
+        }
+      }
+      // this.loadRooms();
+      this.batchRoomsTypeList = [];
+    },
+    dayCountChange(e) {
+      this.model.orderInfo.dueOutTime2 = moment(
+        this.model.orderInfo.arrivalTime2
+      )
+        .add(e, "days")
+        .format("YYYY-MM-DD");
+      this.loadRooms();
+    },
+    disabledDate(current) {
+      return current && current < moment().add(-1, "days").endOf("day");
+    },
+    arrivalTimeChange(e) {
+      this.model.orderInfo.dayCount = Math.abs(
+        parseInt(
+          (new Date(this.model.orderInfo.arrivalTime2).getTime() -
+            new Date(this.model.orderInfo.dueOutTime2).getTime()) /
+            (1000 * 60 * 60 * 24)
+        )
+      );
+      this.loadRooms();
+    },
+    arrivalTimeSpanChange(m, time) {
+      console.log(time);
+      console.log(moment(m).format("HH:mm"));
+    },
+    tagClose2(brindex, index, bIndex, rindex) {
+      var id =
+        this.batchRoomsTypeList[brindex].data[index].buildingRooms[bIndex]
+          .floorRooms[rindex].id;
+      var findIndex = this.batchRoomsTypeList[brindex].data[
+        index
+      ].rooms.findIndex((t) => t.id === id);
+      this.batchRoomsTypeList[brindex].data[index].rooms.splice(findIndex, 1);
+
+      console.log(this.batchRoomsTypeList[brindex].data[index]);
+      this.$set(
+        this.batchRoomsTypeList[brindex].data[index].buildingRooms[bIndex]
+          .floorRooms[rindex],
+        "check",
+        0
+      );
+    },
+    modalEditBatchSelectRoomTypeFormOk(e) {
+      console.log("e", e);
+      var find = this.batchRoomsTypeList[this.selectIndex];
+      if (find) {
+        this.$set(this.batchRoomsTypeList, this.selectIndex, e);
+        console.log("find", find);
+      } else {
+        this.batchRoomsTypeList.push(e);
+      }
+    },
+    modalBatchSelectRoomTypeFormOk(e) {
+      console.log("e", e);
+      var find = this.batchRoomsTypeList.find((t) => t.key === e.key);
+      if (find) {
+        find.amount = (Number(e.amount) + Number(find.amount)).toFixed(2);
+        e.data.forEach((t) => {
+          var layoutType = find.data.find((f) => f.layout.id === t.layout.id);
+          if (layoutType) {
+            layoutType.layout.presetNum += t.layout.presetNum;
+            layoutType.layout.canUseCount -= t.layout.presetNum;
+            t.rooms.forEach((room) => {
+              if (room.check && room.check === 1) {
+                layoutType.buildingRooms.forEach((buildingRoom) => {
+                  // buildingRoom.floorRooms.forEach((floorRoom) => {
+                  var buildingRoomFind = buildingRoom.floorRooms.find(
+                    (br) => br.id === room.id
+                  );
+                  console.log("buildingRoomFind", buildingRoomFind);
+                  if (buildingRoomFind) {
+                    buildingRoomFind.check = 1;
+                  }
+                  // });
+                });
+                layoutType.rooms.push(room);
+              }
+            });
+          } else {
+            console.log(2);
+            console.log(t);
+            find.data = [...find.data, ...e.data];
+          }
+        });
+      } else {
+        this.batchRoomsTypeList.push(e);
+      }
+    },
+    modalFormOk(e) {
+      // this.modelDefault = Object.assign({}, this.modelDefault, {
+      //   rooms: e,
+      // });
+      // this.edit(this.modelDefault);
+      this.$set(
+        this.batchRoomsTypeList[this.selectIndex].data[this.selectChidIndex],
+        "rooms",
+        e
+      );
+      console.log(
+        this.batchRoomsTypeList[this.selectIndex].data[this.selectChidIndex]
+      );
+    },
+    pulsBatch(index) {
+      this.selectIndex = index;
+      this.$refs.modalBatchSelectRoomTypeForm.add();
+      this.$refs.modalBatchSelectRoomTypeForm.title = "添加批次";
+      this.$refs.modalBatchSelectRoomTypeForm.disableSubmit = false;
+    },
+    editBatch(index) {
+      this.selectIndex = index;
+      var item = this.batchRoomsTypeList[index];
+      item.bookingType = this.model.orderInfo.bookingType;
+      item.hourRoomId = this.model.orderInfo.hourRoomId;
+      this.batchOrderInfo = item;
+      console.log("item", item);
+      this.$refs.modalEditBatchSelectRoomTypeForm.add(item);
+      this.$refs.modalEditBatchSelectRoomTypeForm.title = "修改批次";
+      this.$refs.modalEditBatchSelectRoomTypeForm.disableSubmit = false;
+    },
+
+    pulsRoom(brindex, index) {
+      this.selectIndex = brindex;
+      this.selectChidIndex = index;
+      console.log(this.batchRoomsTypeList[this.selectIndex].data[index]);
+      this.$refs.modalSelectRoomForm.add(
+        this.batchRoomsTypeList[this.selectIndex].data[index]
+      );
+      this.$refs.modalSelectRoomForm.title = "排房";
+      this.$refs.modalSelectRoomForm.disableSubmit = false;
+    },
+    handleSearch(value) {
+      let result;
+      if (!value) {
+        result = [];
+      } else {
+        result = ["a", "b", "c"].map(
+          (domain) => `${value}${domain}(15888888888)`
+        );
+      }
+      this.result = result;
+    },
+    handleSelectMember(e) {
+      this.model.mobile = "158888888888";
+    },
+    moment,
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    addList(roomLiveList) {
+      this.modelDefault = Object.assign({}, this.modelDefault, {
+        rooms: roomLiveList,
+      });
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    editOrder() {
+      this.submitForm();
+    },
+    submitForm() {
+      const that = this;
+      if (
+        that.model.orderInfo.publicConsumeProject &&
+        that.model.orderInfo.publicConsumeProject.length > 0
+      ) {
+        var publicRoomFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 1
+        );
+        that.model.orderInfo.publicRoomFee = publicRoomFee ? 1 : 0;
+        var publicConsumeFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 2
+        );
+        that.model.orderInfo.publicConsumeFee = publicConsumeFee ? 1 : 0;
+        var publicVipFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 3
+        );
+        that.model.orderInfo.publicVipFee = publicVipFee ? 1 : 0;
+        var publicMeetingFee = that.model.orderInfo.publicConsumeProject.some(
+          (t) => t == 4
+        );
+        that.model.orderInfo.publicMeetingFee = publicMeetingFee ? 1 : 0;
+      }
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.orderInfo.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.getBookingOrderInfo();
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+/deep/.ant-divider-horizontal {
+  margin: 12px 0 !important;
+}
+/deep/ .ant-form-item {
+  margin-bottom: 5px !important;
+}
+
+/deep/ .ant-btn-link {
+  flex: 1;
+  color: rgba(255, 141, 26, 1) !important;
+}
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1071 - 0
src/views/room/modules/scheduleTeam/ScheduleRoomForm.vue


+ 92 - 0
src/views/room/modules/scheduleTeam/ScheduleRoomModal.vue

@@ -0,0 +1,92 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <schedule-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></schedule-room-form>
+  </j-modal>
+</template>
+
+<script>
+import ScheduleRoomForm from "./ScheduleRoomForm";
+export default {
+  name: "ScheduleRoomModal",
+  components: {
+    ScheduleRoomForm,
+  },
+  data() {
+    return {
+      title: "",
+      width: 1300,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      });
+    },
+    addList(record) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.addList(record);
+      });
+    },
+    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(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>
+<style scoped>
+/deep/.ant-modal-body {
+  padding: 12px;
+  max-height: calc(80vh - 150px);
+  overflow-y: auto;
+  &::-webkit-scrollbar {
+    width: 6px;
+    /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+  }
+
+  &::-webkit-scrollbar-thumb {
+    background: #e3e3e6;
+    border-radius: 6px;
+  }
+
+  &::-webkit-scrollbar-track {
+    background: transparent;
+    border-radius: 5px;
+  }
+}
+</style>

+ 279 - 0
src/views/room/modules/scheduleTeam/SelectRoomForm.vue

@@ -0,0 +1,279 @@
+<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"
+            >
+              <a-checkbox default-checked disabled>{{ layoutName }}</a-checkbox>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
+            <a-form-model-item
+              label="房态"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="roomStatus"
+            >
+              <a-checkbox-group
+                v-model="model.roomStatus"
+                :options="roomStatusOptions"
+              />
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item
+              label="已排房"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              {{ model.rooms.length || 0 }}/{{ presetNum }}间
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="已选"
+              :labelCol="labelCol"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 20 },
+              }"
+              prop="roomStatus"
+            >
+              <a-tag
+                color="blue"
+                closable
+                :visible="visible"
+                @close.stop="tagClose2(index, item.name)"
+                v-for="(item, index) in model.rooms"
+                :key="index"
+                >{{ item.name }}</a-tag
+              >
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="房间"
+              :labelCol="labelCol"
+              :wrapperCol="{
+                xs: { span: 24 },
+                sm: { span: 20 },
+              }"
+            >
+              <a-tabs
+                default-active-key="room0"
+                tab-position="left"
+                :style="{ height: '300px' }"
+              >
+                <a-tab-pane
+                  v-for="(room, index) in roomList"
+                  :key="'room' + index"
+                  :tab="room.floorName"
+                >
+                  <div
+                    id="components-grid-demo-playground"
+                    style="height: 300px; overflow: hidden auto"
+                  >
+                    <a-row :gutter="[8, 8]">
+                      <a-col
+                        :span="3"
+                        v-for="(r, rIndex) in room.floorRooms"
+                        :key="'floorRooms' + rIndex"
+                      >
+                        <div
+                          :class="[
+                            r.check == 1 ? 'check' : '',
+                            r.kz == 1 ? 'kz' : '',
+                          ]"
+                          @click="checkRoomClick(r)"
+                        >
+                          {{ r.name }}
+                        </div></a-col
+                      >
+                    </a-row>
+                  </div>
+                </a-tab-pane>
+              </a-tabs>
+            </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: "SelectRoomForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    const rooms = [];
+    for (let i = 0; i < 100; i++) {
+      rooms.push({
+        id: "100" + i,
+        roomNo: 1000 + i,
+        check: 0,
+        kz: i == 1 ? 1 : 0,
+      });
+    }
+    const rooms2 = [];
+    for (let i = 0; i < 50; i++) {
+      rooms2.push({
+        id: "200" + i,
+        roomNo: 2000 + i,
+        check: 0,
+        kz: i == 5 ? 1 : 0,
+      });
+    }
+    return {
+      visible: true,
+      roomList: [
+        { key: "1层", child: rooms },
+        { key: "2层", child: rooms2 },
+      ],
+      roomTypeOptions: [],
+      roomStatusOptions: ["空净", "空脏"],
+      model: { roomType: "", rooms: [] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 2 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        dateRange: [{ required: true, message: "请选择维修时间!" }],
+        remark: [{ required: true, message: "请输入维修原因!" }],
+      },
+      url: {
+        add: "/business/busMeetingRoom/add",
+        edit: "/business/busMeetingRoom/edit",
+        queryById: "/business/busMeetingRoom/queryById",
+      },
+      layoutName: "",
+      presetNum: 0,
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    checkRoomClick(row) {
+      if (row.check === 1) {
+        row.check = 0;
+        var index = this.model.rooms.findIndex((t) => t.key1 == row.key1);
+        this.model.rooms.splice(index, 1);
+      } else {
+        if (this.model.rooms.length >= this.presetNum) {
+          this.$message.warning("超过排房数量");
+          return;
+        }
+        row.check = 1;
+        this.model.rooms.push(row);
+      }
+    },
+    tagClose2(index, key1) {
+      this.model.rooms.splice(index, 1);
+      this.roomList.some((t) => {
+        var r = t.floorRooms.some((c) => {
+          if (c.name === key1) {
+            c.check = 0;
+            return true;
+          }
+          return false;
+        });
+        if (r === true) {
+          return true;
+        }
+      });
+    },
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add(row) {
+      console.log("buildingRooms", row.buildingRooms);
+      this.layoutName = row.layout.name;
+      this.presetNum = row.layout.presetNum;
+      this.roomList = row.buildingRooms;
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.roomList.forEach((t) => {
+        t.floorRooms.forEach((f) => {
+          if (f.check && f.check == 1) {
+            this.model.rooms.push(f);
+          }
+        });
+      });
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      if (that.model.rooms.length === 0) {
+        that.$message.warning("请先选择房间");
+        return;
+      }
+      that.$emit("ok", that.model.rooms);
+    },
+  },
+};
+</script>
+<style scoped>
+#components-grid-demo-playground [class~="ant-col"] {
+  background: transparent;
+  border: 0;
+}
+#components-grid-demo-playground [class~="ant-col"] > div {
+  /* background: #00a0e9; */
+  height: 28px;
+  line-height: 28px;
+  font-size: 13px;
+  text-align: center;
+  cursor: pointer;
+  border-radius: 5px;
+}
+#components-grid-demo-playground .check {
+  border: 1px solid #00a0e9;
+}
+#components-grid-demo-playground .kz {
+  background: rgba(166, 166, 166, 1);
+}
+#components-grid-demo-playground pre {
+  background: #f9f9f9;
+  border-radius: 6px;
+  font-size: 13px;
+  padding: 8px 16px;
+}
+</style>

+ 65 - 0
src/views/room/modules/scheduleTeam/SelectRoomFormModal.vue

@@ -0,0 +1,65 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <select-room-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></select-room-form>
+  </j-modal>
+</template>
+
+<script>
+import SelectRoomForm from "./SelectRoomForm";
+export default {
+  name: "SelectRoomFormModal",
+  components: {
+    SelectRoomForm,
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add(row) {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add(row);
+      });
+    },
+    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(e) {
+      console.log("e", e);
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 200 - 0
src/views/room/scheduledetail.vue

@@ -0,0 +1,200 @@
+<template>
+  <a-card>
+    <div style="display: flex; gap: 10px" v-if="isShow">
+      <div style="width: 18%; background: #f4f5f8">
+        <div style="font-size: 16px; font-weight: 600; padding: 15px 15px 0">
+          共计关联{{ roomCount }}个房间
+        </div>
+        <a-divider></a-divider>
+        <a-collapse v-model="activeKey" :bordered="false">
+          <!-- <a-collapse-panel
+            key="1"
+            header="接待(1间)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div slot="extra" style="color: #1890ff">合计:-82.00</div>
+            <div class="cell_check_group">
+              <a-checkbox-group @change="onChange">
+                <a-row>
+                  <a-col :span="12">
+                    <a-checkbox value="1"> 正常入住 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="2"> 未结退房 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="3"> 已结退房</a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="4"> 联房退房 </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
+            </div>
+          </a-collapse-panel> -->
+          <!-- <a-collapse-panel
+            key="2"
+            header="Q100(1人)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="select">
+              <a-tag color="#87d068"> 正常入住 </a-tag>
+              <span
+                class="booking_circle_span orange_color"
+                style="margin-left: 4px"
+                >主</span
+              >
+              <span style="font-weight: 700">何先生</span>
+              <div style="font-weight: 700; float: right">¥ -82.00</div>
+            </div>
+          </a-collapse-panel> -->
+          <a-collapse-panel
+            key="3"
+            :header="'预定(' + scheduleRoomCount + '间)'"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="select">
+              <div
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                "
+              >
+                <div>
+                  <a-tag color="#2db7f5"> 预定中 </a-tag>
+                  <span>{{ busRoomBookingOrders.contactName }}</span>
+                </div>
+                <div style="float: right">{{ busRoomBookingOrders.phone }}</div>
+              </div>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+      </div>
+      <div style="width: 82%">
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edit-schedule-room-form
+              :id="id"
+              :disabled2="true"
+              @ok="getCallback"
+            ></edit-schedule-room-form>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 账单 </span>
+          </a-tab-pane>
+          <a-tab-pane key="3">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import EditScheduleRoomForm from "./modules/schedule/EditScheduleRoomForm.vue";
+
+export default {
+  components: {
+    EditScheduleRoomForm,
+  },
+  // props: {
+  //   id: {
+  //     type: String,
+  //     default: "",
+  //   },
+  // },
+  data() {
+    return {
+      id: "",
+      activeKey: ["1", "2", "3"],
+      scheduleRoomCount: 0,
+      roomCount: 0,
+      scheduleRoomList: [],
+      busRoomBookingOrders: {},
+      isShow: true,
+    };
+  },
+  created(){
+    this.id = this.$route.params.id;
+  },
+  activated() {
+    //重新进入界面可能参数id不一样,需要重新加载数据,使用钩子方式
+    this.id = this.$route.params.id;
+    this.isShow = true;
+  },
+  deactivated() {
+    this.isShow = false;
+  },
+  methods: {
+    getCallback(e) {
+      console.log("getCallback", e);
+      this.busRoomBookingOrders = e;
+      this.roomCount = e.roomIds.length;
+      this.scheduleRoomList = e.roomIds.filter(
+        (t) => t.roomStatus == 1 || t.roomStatus == 2
+      );
+      this.scheduleRoomCount = this.scheduleRoomList.length;
+    },
+    onChange(checkedValues) {
+      console.log("checked = ", checkedValues);
+    },
+  },
+};
+</script>
+
+<style scoped>
+.cell_check_group {
+  padding: 10px;
+  background-color: #d9e5ec;
+  border-radius: 4px;
+  margin: 0px 0 6px 0px;
+}
+.orange_color {
+  border-color: #ff9e35 !important;
+  color: #ff9e35 !important;
+  vertical-align: initial;
+}
+.booking_circle_span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  color: #f24e4c;
+  border: 1px solid #f24e4c;
+  font-size: 12px;
+  text-align: center;
+  line-height: 16px;
+  display: inline-block;
+}
+.select {
+  color: #000 !important;
+  border: 1px solid #f24e4c !important;
+  background: transparent;
+  border-radius: 4px;
+  padding: 0 10px;
+  line-height: 32px;
+  cursor: pointer;
+}
+</style>

+ 312 - 0
src/views/room/scheduleteamdetail.vue

@@ -0,0 +1,312 @@
+<template>
+  <a-card>
+    <div style="display: flex; gap: 10px" v-if="isShow">
+      <div style="width: 20%; background: #f4f5f8">
+        <div style="font-size: 16px; font-weight: 600; padding: 15px 15px 0">
+          共计关联2个房间
+        </div>
+        <a-divider></a-divider>
+        <div
+          :class="[selectMain ? 'select' : '']"
+          style="font-size: 16px; font-weight: 500; cursor: pointer"
+          @click="selectMain = true"
+        >
+          查看团队主账务
+        </div>
+        <a-collapse v-model="activeKey" :bordered="false">
+          <!-- <a-collapse-panel
+            key="1"
+            header="接待(1间)"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div class="cell_check_group">
+              <a-checkbox-group @change="onChange">
+                <a-row>
+                  <a-col :span="12">
+                    <a-checkbox value="1"> 正常入住 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="2"> 未结退房 </a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="3"> 已结退房</a-checkbox>
+                  </a-col>
+                  <a-col :span="12">
+                    <a-checkbox value="4"> 联房退房 </a-checkbox>
+                  </a-col>
+                </a-row>
+              </a-checkbox-group>
+            </div>
+            <a-collapse activeKey="1" expandIconPosition="right">
+              <a-collapse-panel key="1" header="批次2">
+                <a-collapse
+                  activeKey="1"
+                  :bordered="false"
+                  expandIconPosition="right"
+                >
+                  <a-collapse-panel key="1" header="Q100(1人)">
+                    <div class="select" style="padding: 5px">
+                      <a-tag color="#87d068"> 正常入住 </a-tag>
+                      <span
+                        class="booking_circle_span orange_color"
+                        style="margin-left: 4px"
+                        >主</span
+                      >
+                      <span style="font-weight: 700">何先生</span>
+                      <div style="font-weight: 700; float: right">
+                        ¥ -82.00
+                      </div>
+                    </div>
+                  </a-collapse-panel>
+                </a-collapse>
+              </a-collapse-panel>
+            </a-collapse>
+          </a-collapse-panel> -->
+          <a-collapse-panel
+            key="3"
+            :header="'预定(' + batchRoomsCount + '批次)'"
+            style="
+              background: #f7f7f7;
+              border-radius: 4px;
+              margin-bottom: 24px;
+              border: 0;
+              overflow: hidden;
+            "
+          >
+            <div
+              :class="[item.check == 1 ? 'select' : '']"
+              style="padding: 5px; cursor: pointer"
+              @click="selectBatch(item)"
+              v-for="(item, index) in batchRoomsList"
+            >
+              <div
+                style="
+                  display: flex;
+                  justify-content: space-between;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                "
+              >
+                <div>
+                  <a-tag color="#2db7f5"> 预定中 </a-tag>
+                  <span
+                    >批次{{ index + 1 }}({{ item.roomIds.length }}间)</span
+                  >
+                </div>
+                <!-- <div>{{ busRoomBookingOrders.phone }}</div> -->
+                <div>{{ findCustomer(item.contactId) }}</div>
+              </div>
+            </div>
+          </a-collapse-panel>
+        </a-collapse>
+        <div style="display: flex; justify-content: center">
+          <a-button type="link" @click="addPatch">添加批次</a-button>
+        </div>
+      </div>
+      <div style="width: 80%" v-if="selectMain">
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edit-schedule-room-form-main
+              :id="id"
+              :disabled="true"
+              @ok="getCallback"
+              ref="EditScheduleRoomFormMain"
+            ></edit-schedule-room-form-main>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 账单 </span>
+          </a-tab-pane>
+          <a-tab-pane key="3">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+      <div style="width: 80%" v-else>
+        <a-tabs default-active-key="1">
+          <a-tab-pane key="1">
+            <span slot="tab"> 详单 </span>
+            <edi-batch-schedule-room-form
+              ref="EdiBatchScheduleRoomForm"
+              :id="batchId"
+              :disabled2="true"
+            ></edi-batch-schedule-room-form>
+          </a-tab-pane>
+          <a-tab-pane key="2">
+            <span slot="tab"> 日志 </span>
+          </a-tab-pane>
+        </a-tabs>
+      </div>
+    </div>
+    <add-batch-schedule-room-modal
+      ref="modalAddBatchScheduleRoom"
+      :bookingOrdersId="bookingOrdersId"
+      @ok="modalFormOk"
+    ></add-batch-schedule-room-modal>
+  </a-card>
+</template>
+
+<script>
+import EditScheduleRoomFormMain from "./modules/scheduleTeam/EditScheduleRoomFormMain.vue";
+import EdiBatchScheduleRoomForm from "./modules/scheduleTeam/EdiBatchScheduleRoomForm.vue";
+import AddBatchScheduleRoomModal from "./modules/schedule/ScheduleRoomModal";
+import { httpAction, getAction, postAction } from "@/api/manage";
+export default {
+  components: {
+    EditScheduleRoomFormMain,
+    EdiBatchScheduleRoomForm,
+    AddBatchScheduleRoomModal,
+  },
+  // props: {
+  //   id: {
+  //     type: String,
+  //     default: "",
+  //   },
+  // },
+  data() {
+    return {
+      isShow: true,
+      selectMain: true,
+      id: "",
+      batchId: "",
+      activeKey: ["1", "2", "3"],
+      activeKey2: ["1"],
+      scheduleRoomCount: 0,
+      batchRoomsCount: 0,
+      batchRoomsList: [],
+      busRoomBookingOrders: {},
+      bookingOrdersId: "",
+      customerList: [],
+    };
+  },
+  created() {
+    this.id = this.$route.params.id;
+    console.log("created", this.id);
+    this.getbusCustomer();
+  },
+  // beforeRouteEnter(to, from, next) {
+  //   console.log("to", to.query.id);
+  //   console.log("from", from);
+  //   var id = to.query.id;
+  //   console.log("this.id", id);
+  //   next();
+  // },
+  activated() {
+    //重新进入界面可能参数id不一样,需要重新加载数据,使用钩子方式
+    this.id = this.$route.params.id;
+    this.selectMain = true;
+    // try {
+    //   this.$refs.EditScheduleRoomFormMain.load(this.id);
+    // } catch {}
+    this.isShow = true;
+  },
+  deactivated() {
+    this.isShow = false;
+  },
+  methods: {
+    findCustomer(id) {
+      if (this.customerList && this.customerList.length) {
+        var find = this.customerList.find((t) => t.id == id);
+        if (find) {
+          return find.phone;
+        } else {
+          return this.busRoomBookingOrders.phone;
+        }
+      }
+    },
+    getbusCustomer() {
+      getAction("/bus/busCustomer/list", {}).then((res) => {
+        if (res.success) {
+          this.customerList = res.result.records;
+        }
+      });
+    },
+    addPatch() {
+      this.$refs.modalAddBatchScheduleRoom.add();
+      this.$refs.modalAddBatchScheduleRoom.title = "添加批次";
+      this.$refs.modalAddBatchScheduleRoom.disableSubmit = false;
+    },
+    modalFormOk(e) {
+      console.log("modalFormOk");
+      this.isShow = false;
+      setTimeout(() => {
+        this.isShow = true;
+      }, 100);
+    },
+    selectBatch(item) {
+      this.batchRoomsList.forEach((t) => {
+        if (t.check === 1 && t != item) {
+          t.check = 0;
+        }
+      });
+      if (item.check === 0) {
+        item.check = 1;
+      } else {
+        item.check = 0;
+      }
+      this.selectMain = item.check == 0;
+      this.batchId = item.id;
+      if (!this.selectMain) {
+        setTimeout(() => {
+          this.$refs.EdiBatchScheduleRoomForm.load();
+        }, 100);
+      }
+    },
+    getCallback(e) {
+      console.log("getCallback", e);
+      this.busRoomBookingOrders = e;
+      this.batchRoomsCount = e.batchRooms.length;
+      this.batchRoomsList = e.batchRooms;
+      this.batchRoomsList.forEach((t) => {
+        this.$set(t, "check", 0);
+      });
+      this.bookingOrdersId = this.busRoomBookingOrders.orderInfo.id;
+      console.log("bookingOrdersId", this.bookingOrdersId);
+    },
+    onChange(checkedValues) {
+      console.log("checked = ", checkedValues);
+    },
+  },
+};
+</script>
+
+<style scoped>
+.cell_check_group {
+  padding: 10px;
+  background-color: #d9e5ec;
+  border-radius: 4px;
+  margin: 0px 0 6px 0px;
+}
+.orange_color {
+  border-color: #ff9e35 !important;
+  color: #ff9e35 !important;
+  vertical-align: initial;
+}
+.booking_circle_span {
+  width: 18px;
+  height: 18px;
+  border-radius: 50%;
+  color: #f24e4c;
+  border: 1px solid #f24e4c;
+  font-size: 12px;
+  text-align: center;
+  line-height: 16px;
+  display: inline-block;
+}
+.select {
+  color: #000 !important;
+  border: 1px solid #f24e4c !important;
+  background: transparent;
+  border-radius: 4px;
+  /* padding: 0 10px; */
+  line-height: 32px;
+  cursor: pointer;
+}
+</style>

+ 151 - 0
src/views/settings/components/pos/modules/PosMealSectionForm.vue

@@ -0,0 +1,151 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入餐段名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="开始时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="startTime2"
+            >
+              <a-time-picker v-model="model.startTime2" format="HH:mm" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="结束时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="endTime2"
+            >
+              <a-time-picker v-model="model.endTime2" format="HH:mm" />
+            </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";
+import moment from "moment";
+export default {
+  name: "PosMealSectionForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入餐段名称!" }],
+        startTime2: [{ required: true, message: "请输入开始时间!" }],
+        endTime2: [{ required: true, message: "请输入结束时间!" }],
+      },
+      url: {
+        add: "/pos/posMealSection/add",
+        edit: "/pos/posMealSection/edit",
+        queryById: "/pos/posMealSection/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    moment,
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      if (this.model.startTime) {
+        this.model.startTime2 = moment(this.model.startTime, "HH:mm");
+        this.model.endTime2 = moment(this.model.endTime, "HH:mm");
+      }
+      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";
+          }
+          this.model.startTime = moment(this.model.startTime2).format("HH:mm");
+          this.model.endTime = moment(this.model.endTime2).format("HH:mm");
+          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/settings/components/pos/modules/PosMealSectionModal.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="关闭">
+    <pos-meal-section-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-meal-section-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosMealSectionForm from './PosMealSectionForm'
+  export default {
+    name: 'PosMealSectionModal',
+    components: {
+      PosMealSectionForm
+    },
+    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>

+ 151 - 0
src/views/settings/components/pos/modules/PosRegionForm.vue

@@ -0,0 +1,151 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入区域名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="pos类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="posTypeId"
+            >
+              <a-select v-model="model.posTypeId" placeholder="请选择pos类型">
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in posTypeList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </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: "PosRegionForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入区域名称!" }],
+        posTypeId: [{ required: true, message: "请输入pos类型id!" }],
+      },
+      url: {
+        add: "/pos/posRegion/add",
+        edit: "/pos/posRegion/edit",
+        queryById: "/pos/posRegion/queryById",
+      },
+      posTypeList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/pos/posType/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+      }
+    });
+  },
+  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/settings/components/pos/modules/PosRegionModal.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="关闭">
+    <pos-region-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-region-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosRegionForm from './PosRegionForm'
+  export default {
+    name: 'PosRegionModal',
+    components: {
+      PosRegionForm
+    },
+    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>

+ 123 - 0
src/views/settings/components/pos/modules/PosSellClearGoodsForm.vue

@@ -0,0 +1,123 @@
+<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="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="商品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
+              <a-input v-model="model.goodsId" placeholder="请输入商品id"  ></a-input>
+            </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: 'PosSellClearGoodsForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           tenantId: [
+              { required: true, message: '请输入关联租户!'},
+           ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+           goodsId: [
+              { required: true, message: '请输入商品id!'},
+           ],
+        },
+        url: {
+          add: "/pos/posSellClearGoods/add",
+          edit: "/pos/posSellClearGoods/edit",
+          queryById: "/pos/posSellClearGoods/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/settings/components/pos/modules/PosSellClearGoodsModal.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="关闭">
+    <pos-sell-clear-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-sell-clear-goods-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosSellClearGoodsForm from './PosSellClearGoodsForm'
+  export default {
+    name: 'PosSellClearGoodsModal',
+    components: {
+      PosSellClearGoodsForm
+    },
+    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>

+ 246 - 0
src/views/settings/components/pos/modules/PosTableForm.vue

@@ -0,0 +1,246 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入餐桌名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="pos类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="posTypeId"
+            >
+              <a-select v-model="model.posTypeId" placeholder="请选择pos类型">
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in posTypeList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="pos桌型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="posTableTypeId"
+            >
+              <a-select
+                v-model="model.posTableTypeId"
+                placeholder="请选择pos类型"
+              >
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in tableTypeList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="pos餐桌区域"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="posRegionId"
+            >
+
+            <a-select
+                v-model="model.posRegionId"
+                placeholder="请选择pos类型"
+              >
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in regionList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </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="num"
+            >
+              <a-input-number
+                v-model="model.num"
+                placeholder="请输入座位数"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="餐桌序号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="tableNo"
+            >
+              <a-input
+                v-model="model.tableNo"
+                placeholder="请输入餐桌序号"
+              ></a-input>
+            </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: "PosTableForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入餐桌名称!" }],
+        posTypeId: [{ required: true, message: "请输入pos类型id!" }],
+        posTableTypeId: [{ required: true, message: "请输入pos桌型id!" }],
+        posRegionId: [{ required: true, message: "请输入pos餐桌区域id!" }],
+        num: [{ required: true, message: "请输入座位数!" }],
+        tableNo: [{ required: true, message: "请输入餐桌序号!" }],
+        state: [{ required: true, message: "请输入状态!" }],
+      },
+      url: {
+        add: "/pos/posTable/add",
+        edit: "/pos/posTable/edit",
+        queryById: "/pos/posTable/queryById",
+      },
+      posTypeList: [],
+      tableTypeList: [],
+      regionList:[]
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/pos/posType/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+      }
+    });
+    getAction("/pos/posTableType/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.tableTypeList = res.result.records;
+      }
+    });
+    getAction("/pos/posRegion/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.regionList = res.result.records;
+      }
+    });
+  },
+  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/settings/components/pos/modules/PosTableModal.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="关闭">
+    <pos-table-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-table-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTableForm from './PosTableForm'
+  export default {
+    name: 'PosTableModal',
+    components: {
+      PosTableForm
+    },
+    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>

+ 151 - 0
src/views/settings/components/pos/modules/PosTableTypeForm.vue

@@ -0,0 +1,151 @@
+<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="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入桌型名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="pos类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="posTypeId"
+            >
+            <a-select v-model="model.posTypeId" placeholder="请选择pos类型">
+                <a-select-option
+                  :value="item.id"
+                  v-for="item in posTypeList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </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: "PosTableTypeForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入桌型名称!" }],
+        posTypeId: [{ required: true, message: "请输入pos类型id!" }],
+      },
+      url: {
+        add: "/pos/posTableType/add",
+        edit: "/pos/posTableType/edit",
+        queryById: "/pos/posTableType/queryById",
+      },
+      posTypeList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/pos/posType/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 100,
+    }).then((res) => {
+      if (res.success) {
+        this.posTypeList = res.result.records;
+      }
+    });
+  },
+  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>

+ 149 - 0
src/views/settings/components/pos/modules/PosTableTypeInGoodsForm.vue

@@ -0,0 +1,149 @@
+<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="pos桌型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="tableTypeName"
+            >
+              <a-input
+                disabled
+                v-model="model.tableTypeName"
+                placeholder="请输入pos桌型id"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="商品"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="goodsName"
+            >
+              <a-input
+                disabled
+                v-model="model.goodsName"
+                placeholder="请输入商品id"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="数量"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input-number
+                v-model="model.num"
+                placeholder="请输入数量"
+                style="width: 100%"
+              />
+            </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: "PosTableTypeInGoodsForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        posTableTypeId: [{ required: true, message: "请输入pos桌型id!" }],
+        goodsId: [{ required: true, message: "请输入商品id!" }],
+        num: [{ required: true, message: "请输入数量!" }],
+      },
+      url: {
+        add: "/pos/posTableTypeInGoods/add",
+        edit: "/pos/posTableTypeInGoods/edit",
+        queryById: "/pos/posTableTypeInGoods/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/settings/components/pos/modules/PosTableTypeInGoodsModal.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="关闭">
+    <pos-table-type-in-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-table-type-in-goods-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTableTypeInGoodsForm from './PosTableTypeInGoodsForm'
+  export default {
+    name: 'PosTableTypeInGoodsModal',
+    components: {
+      PosTableTypeInGoodsForm
+    },
+    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>

+ 60 - 0
src/views/settings/components/pos/modules/PosTableTypeModal.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="关闭">
+    <pos-table-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-table-type-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTableTypeForm from './PosTableTypeForm'
+  export default {
+    name: 'PosTableTypeModal',
+    components: {
+      PosTableTypeForm
+    },
+    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>

+ 318 - 0
src/views/settings/components/pos/modules/PosThaliForm.vue

@@ -0,0 +1,318 @@
+<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="8">
+            <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="8">
+            <a-form-model-item
+              label="套餐条形码"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="barCode"
+            >
+              <a-input
+                v-model="model.barCode"
+                placeholder="请输入套餐条形码"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item
+              label="分类"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="thailType"
+            >
+              <a-tree-select
+                v-model="model.thailType"
+                :tree-data="treeData"
+                :replaceFields="{
+                  children: 'children',
+                  title: 'name',
+                  key: 'id',
+                  value: 'id',
+                }"
+                placeholder="商品分类"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item
+              label="售价"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="price"
+            >
+              <a-input-number
+                v-model="model.price"
+                placeholder="请输入售价"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item
+              label="状态"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="state"
+            >
+              <a-switch
+                v-model="model.state"
+                checked-children="启用"
+                un-checked-children="停用"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item
+              label="是否厨打"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="kitchen"
+            >
+              <a-switch
+                v-model="model.kitchen"
+                checked-children="是"
+                un-checked-children="否"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-button @click="handleAdd" type="primary" icon="plus"
+              >选择商品</a-button
+            >
+            <a-table
+              :columns="columns"
+              :data-source="model.posThaliInGoodsList"
+              :pagination="false"
+              rowKey="id"
+            >
+              <template slot="num" slot-scope="text, record, index">
+                <div>
+                  <a-input-number v-model="record.num" :min="1" :max="99" />
+                </div>
+              </template>
+              <template slot="required" slot-scope="text, record, index">
+                <div>
+                  <a-switch v-model="record.required" />
+                </div>
+              </template>
+
+              <span slot="action" slot-scope="text, record, index">
+                <a @click="handleDelete(index)">删除</a>
+              </span>
+            </a-table>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+    <select-goods-modal ref="modalForm2" @ok="modalFormOk"></select-goods-modal>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+import { tree } from "@/api/good";
+import SelectGoodsModal from "./SelectGoodsModal";
+const columns = [
+  {
+    title: "商品名称",
+    dataIndex: "name",
+  },
+  {
+    title: "商品条码",
+    dataIndex: "barCode",
+  },
+  {
+    title: "库存",
+    dataIndex: "inventory",
+  },
+  {
+    title: "数量",
+    dataIndex: "num",
+    scopedSlots: { customRender: "num" },
+  },
+  {
+    title: "售价",
+    dataIndex: "sellingPrice",
+  },
+  {
+    title: "必选项",
+    dataIndex: "required",
+    scopedSlots: { customRender: "required" },
+  },
+  {
+    title: "操作",
+    dataIndex: "action",
+    align: "center",
+    fixed: "right",
+    width: 70,
+    scopedSlots: { customRender: "action" },
+  },
+];
+export default {
+  name: "PosThaliForm",
+  components: { SelectGoodsModal },
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      columns,
+      model: { posThaliInGoodsList: [] },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 8 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入套餐名称!" }],
+        posTypeId: [{ required: true, message: "请输入pos类型id!" }],
+        barCode: [{ required: true, message: "请输入套餐条形码!" }],
+        thailType: [{ required: true, message: "请输入分类!" }],
+        price: [{ required: true, message: "请输入售价!" }],
+      },
+      url: {
+        add: "/pos/posThali/add",
+        edit: "/pos/posThali/edit",
+        queryById: "/pos/posThali/queryById",
+      },
+      treeData: [],
+      goodsList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    this.loadTree();
+  },
+  methods: {
+    handleDelete(index) {
+      this.model.posThaliInGoodsList.splice(index, 1);
+    },
+    modalFormOk(e) {
+      console.log("e", e);
+      e.forEach((t) => {
+        this.$set(t, "required", false);
+        this.$set(t, "num", 1);
+      });
+      this.model.posThaliInGoodsList = e;
+    },
+    handleAdd() {
+      this.$refs.modalForm2.edit({
+        formThali: true,
+      });
+      this.$refs.modalForm2.title = "商品选择";
+      this.$refs.modalForm2.disableSubmit = false;
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+      if (this.model.id) {
+        getAction("/pos/posThaliInGoods/list", {
+          posThaliId: this.model.id,
+        }).then((res) => {
+          if (res.success) {
+            this.model.posThaliInGoodsList = res.result.records;
+          }
+        });
+      }
+    },
+    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>

+ 147 - 0
src/views/settings/components/pos/modules/PosThaliInGoodsForm.vue

@@ -0,0 +1,147 @@
+<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="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="套餐id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="posThaliId">
+              <a-input v-model="model.posThaliId" placeholder="请输入套餐id"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="商品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
+              <a-input v-model="model.goodsId" placeholder="请输入商品id"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
+              <a-input-number v-model="model.num" placeholder="请输入数量" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="必选项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="required">
+              <a-input-number v-model="model.required" placeholder="请输入必选项" style="width: 100%" />
+            </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: 'PosThaliInGoodsForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           tenantId: [
+              { required: true, message: '请输入关联租户!'},
+           ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+           posThaliId: [
+              { required: true, message: '请输入套餐id!'},
+           ],
+           goodsId: [
+              { required: true, message: '请输入商品id!'},
+           ],
+           num: [
+              { required: true, message: '请输入数量!'},
+           ],
+           required: [
+              { required: true, message: '请输入必选项!'},
+           ],
+        },
+        url: {
+          add: "/pos/posThaliInGoods/add",
+          edit: "/pos/posThaliInGoods/edit",
+          queryById: "/pos/posThaliInGoods/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/settings/components/pos/modules/PosThaliInGoodsModal.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="关闭">
+    <pos-thali-in-goods-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-thali-in-goods-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosThaliInGoodsForm from './PosThaliInGoodsForm'
+  export default {
+    name: 'PosThaliInGoodsModal',
+    components: {
+      PosThaliInGoodsForm
+    },
+    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>

+ 60 - 0
src/views/settings/components/pos/modules/PosThaliModal.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="关闭">
+    <pos-thali-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-thali-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosThaliForm from './PosThaliForm'
+  export default {
+    name: 'PosThaliModal',
+    components: {
+      PosThaliForm
+    },
+    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>

+ 139 - 0
src/views/settings/components/pos/modules/PosTypeForm.vue

@@ -0,0 +1,139 @@
+<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="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <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">
+            <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
+              <a-input-number v-model="model.state" placeholder="请输入状态" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="线上预定" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="online">
+              <a-input-number v-model="model.online" placeholder="请输入线上预定" style="width: 100%" />
+            </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: 'PosTypeForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           tenantId: [
+              { required: true, message: '请输入关联租户!'},
+           ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+           name: [
+              { required: true, message: '请输入名称!'},
+           ],
+           state: [
+              { required: true, message: '请输入状态!'},
+           ],
+           online: [
+              { required: true, message: '请输入线上预定!'},
+           ],
+        },
+        url: {
+          add: "/pos/posType/add",
+          edit: "/pos/posType/edit",
+          queryById: "/pos/posType/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/settings/components/pos/modules/PosTypeModal.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="关闭">
+    <pos-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pos-type-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import PosTypeForm from './PosTypeForm'
+  export default {
+    name: 'PosTypeModal',
+    components: {
+      PosTypeForm
+    },
+    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>

+ 465 - 0
src/views/settings/components/pos/modules/SelectGoods.vue

@@ -0,0 +1,465 @@
+<template>
+  <div class="back">
+    <div class="back-left">
+      <!-- <a-button @click="handleStockTypeModelManager('-1',1)">添加分类</a-button> -->
+      <!-- <a-button @click="unitVisible=true" style="margin-left: 30px;">单位设置</a-button> -->
+      <a-tree
+        class="draggable-tree"
+        :tree-data="treeData"
+        blockNode
+        style="width: 200px"
+        :replaceFields="{ children: 'children', title: 'name', key: 'id' }"
+      >
+        <div
+          slot="title"
+          slot-scope="item, key, children"
+          style="
+            display: flex;
+            align-items: center;
+            height: 100%;
+            overflow: hidden;
+          "
+        >
+          <a-button
+            style="font-size: 12px"
+            type="link"
+            @click="
+              () => {
+                $message.success(item.name);
+              }
+            "
+            >{{ item.name }}</a-button
+          >
+          <div style="flex: 1; height: 1px"></div>
+          <!-- <a-button style="font-size: 12px; padding: 0 5px;" type="link" v-show="item.parentId == 0" @click="handleStockTypeModelManager(item,1)">添加分类</a-button>
+                    <a-button style="font-size: 12px; padding: 0 5px;" type="link" @click="handleStockTypeModelManager(item,2)">编辑</a-button>
+                    <a-popconfirm placement="topLeft" ok-text="是的" cancel-text="取消" @confirm="confirmDel(item.id)">
+                        <template slot="title">
+                        确定删除吗?
+                        </template>
+                        <a-button style="font-size: 12px; padding: 0 5px;" type="link">删除</a-button>
+                    </a-popconfirm> -->
+        </div>
+      </a-tree>
+    </div>
+    <div class="back-right" style="margin-left: 10px">
+      <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="4">
+                <a-form-item label="">
+                  <j-input
+                    placeholder="商品名称"
+                    v-model="queryParam.name"
+                    style="width: 200px"
+                  ></j-input>
+                </a-form-item>
+              </a-col>
+              <a-col
+                :md="13"
+                :sm="8"
+                style="display: flex; justify-content: space-around"
+              >
+                <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 -->
+        <div>
+          <a-table
+            ref="table"
+            size="middle"
+            bordered
+            rowKey="id"
+            :columns="columns"
+            :dataSource="dataSource"
+            :pagination="ipagination"
+            :loading="loading"
+            :rowSelection="{
+              selectedRowKeys: selectedRowKeys,
+              onChange: onSelectChange,
+            }"
+            class="j-table-force-nowrap"
+            @change="handleTableChange"
+          >
+            <span slot="state" slot-scope="record">
+              {{ record ? "启用" : "停用" }}
+              <!-- {{record}} -->
+            </span>
+            <span slot="action" slot-scope="text, record">
+              <a @click="handleEdit(record)">修改</a>
+              <a-divider type="vertical" />
+              <a @click="moreSet(record)">更多设置</a>
+              <a-divider type="vertical" />
+              <a-popconfirm
+                title="确定删除吗?"
+                @confirm="() => handleDelete(record.id)"
+              >
+                <a>删除</a>
+              </a-popconfirm>
+            </span>
+          </a-table>
+        </div>
+      </a-card>
+    </div>
+    <!-- 单位设置区域 -->
+    <!-- <SetUnit :unitVisible="unitVisible" @center="handleCancel" /> -->
+  </div>
+</template>
+<script>
+import { tree, delTree, goodBatchDel, goodSet } from "@/api/good";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import roomLayoutForm from './goodStock/goods'
+// import index from '/src/index.vue'
+// import stockTypeModel from './stockTypeModel.vue'
+// import Commodity from './moreSet/commodity.vue'
+// import GoodImg from './moreSet/goodImg.vue';
+// import moreSet from './moreSet/moreModal.vue'
+import { computed } from "vue";
+// import SetUnit from './setUnit/index.vue'
+import { httpAction, getAction, postAction } from "@/api/manage";
+const tabListNoTitle = [
+  {
+    key: "commodity",
+    tab: "商品小程序设置",
+  },
+  {
+    key: "goodImg",
+    tab: "商品图片",
+  },
+  {
+    key: "project",
+    tab: "餐饮设置",
+  },
+  {
+    key: "game",
+    tab: "娱乐设置",
+  },
+];
+export default {
+  name: "goodList",
+  mixins: [JeecgListMixin],
+  components: {
+    // stockTypeModel,
+    // roomLayoutForm,
+    // SetUnit,
+    // moreSet,
+    // index
+    // Commodity,
+    // GoodImg
+  },
+  data() {
+    return {
+      treeData: [
+        {
+          t: "111",
+          k: "1",
+          c: [
+            {
+              t: "222",
+              k: "2",
+              c: [
+                { t: "leaf", k: "333", disableCheckbox: true },
+                { t: "leaf", k: "444" },
+              ],
+            },
+            {
+              t: "555",
+              k: "555",
+              c: [{ k: "666", t: "sb" }],
+            },
+          ],
+        },
+      ],
+
+      key: "tab1",
+      noTitleKey: "commodity",
+
+      checkedKeys: [""],
+      tabListNoTitle,
+      selectedKeys: [],
+      queryParam: {},
+      //单位对话框
+      unitVisible: false,
+      // 分页参数
+      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: "barCode",
+        },
+        {
+          title: "名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "售价",
+          align: "center",
+          dataIndex: "sellingPrice",
+        },
+        {
+          title: "库存量",
+          align: "center",
+          dataIndex: "inventory",
+        },
+      ],
+      url: {
+        // list: 'org.jeecg.modules.business/busMarketMember/list',
+        list: "/rooms/cesGoods/list",
+        // list: "/rooms/cesRoomLayout/list?hotelId",
+        // delete: "/rooms/cesRoomLayout/remove",
+        delete: "/rooms/cesGoods/delete",
+        // deleteBatch: "/rooms/cesRoomLayout/deleteBatch",
+        deleteBatch: "/rooms/cesGoods/delBatch",
+        exportXlsUrl: "/rooms/cesRoomLayout/exportXls",
+        importExcelUrl: "rooms/cesRoomLayout/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      stockTypeVisible: false,
+      // 选中的数据
+      beforeTree: null,
+      goodsSetVisible: false, //进退货弹窗
+      moreSetVisible: false, //更多设置弹窗
+      goodsSetData: {
+        number: 0,
+        type: 1,
+      },
+      model: { hotelId: "" },
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {
+    this.loadTree();
+  },
+  provide() {
+    return {
+      beforeTree: computed(() =>
+        this.beforeTree ? this.beforeTree : { id: "0" }
+      ),
+      treeData: computed(() => this.treeData),
+      dataSource: computed(() => this.dataSource),
+    };
+  },
+  methods: {
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      if (this.selectedRowKeys.length > 0) {
+        if (this.model.formThali) {
+          that.$emit("ok", this.selectionRows);
+        } else {
+          var list = [];
+          this.selectedRowKeys.forEach((item) => {
+            list.push({
+              hotelId: this.model.hotelId,
+              posTableTypeId: this.model.posTableTypeId,
+              goodsId: item,
+              num: 1,
+            });
+          });
+          that.confirmLoading = true;
+
+          postAction("/pos/posTableTypeInGoods/addBatch", list)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      }
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+    onExpand(expandedKeys) {
+      console.log("onExpand", expandedKeys);
+      // if not set autoExpandParent to false, if children expanded, parent can not collapse.
+      // or, you can remove all expanded children keys.
+    },
+    onSelect(selectedKeys, info) {
+      console.log("onSelect", info);
+      this.selectedKeys = selectedKeys;
+    },
+    /**
+     * 保存成功
+     */
+    onSave() {
+      this.loadTree();
+    },
+    /**
+     * 删除
+     */
+    confirmDel(id) {
+      delTree({ id: id }).then((res) => {
+        if (res.code && res.code == 200) {
+          this.$message.success("删除成功");
+          this.loadTree();
+        }
+      });
+    },
+    //批量删除
+    goodBatchDel() {
+      console.log(this.selectedRowKeys);
+      if (this.selectedRowKeys.length == 0) {
+        this.$message.info("请先选择要删除的数据");
+        return;
+      }
+      this.$confirm({
+        title: "提示",
+        content: "确认要删除吗",
+        okText: "确认",
+        cancelText: "取消",
+        onOk: (e) => {
+          return goodBatchDel({ idStr: this.selectedRowKeys.toString() }).then(
+            (res) => {
+              if (res.code && res.code == 200) {
+                this.$message.success(res.message);
+                this.loadData();
+              } else {
+                this.$message.error(res.message);
+              }
+            }
+          );
+        },
+      });
+    },
+    //单位设置区域
+    handleOk(e) {
+      // this.confirmLoading = true;
+      // setTimeout(() => {
+      //     this.visible = false;
+      //     this.confirmLoading = false;
+      // }, 2000);
+      this.unitVisible = false;
+    },
+    handleCancel(e) {
+      console.log("Clicked cancel button", e);
+      this.unitVisible = false;
+    },
+    /**
+     * 进退货
+     */
+    goodsSet() {
+      this.goodsSetData = this.dataSource.filter(
+        (item) => item.id == this.selectedRowKeys.toString()
+      )[0];
+      console.log(this.goodsSetData);
+      this.goodsSetVisible = true;
+    },
+    goodChange(e) {
+      console.log(e);
+      this.goodsSetData.type = e.target.value;
+    },
+    //更多设置
+    moreSet(record) {
+      console.log(this.$refs.modalSet);
+      this.$refs.modalSet.edit(record);
+      this.$refs.modalForm.disableSubmit = false;
+      // this.moreSetVisible = true
+    },
+    //更多设置确认
+    handleMoreSetOk() {},
+    //更多设置切换卡片
+    onTabChange(key, type) {
+      console.log(key, type);
+      this[type] = key;
+    },
+
+    //进退货确认事件
+    handleGoodOk() {
+      console.log(this.goodsSetData);
+      if (!this.goodsSetData.type) {
+        this.goodsSetData.type = 1;
+      }
+      let obj = {
+        hotelId: this.goodsSetData.hotelId,
+        goodId: this.goodsSetData.id,
+        type: this.goodsSetData.type,
+        goodNum: this.goodsSetData.goodNum,
+        remark: this.goodsSetData.remark ? this.goodsSetData.remark : "",
+      };
+      // this.goodsSetData.goodId = this.goodsSetData.id
+      goodSet(obj).then((res) => {
+        if (res.code && res.code == 200) {
+          this.$message.success(res.message);
+          this.goodsSetVisible = false;
+          // this.goodsSetData = {}
+          this.loadData();
+        } else {
+          this.$message.error(res.message);
+        }
+      });
+    },
+    //进退货取消
+    handleGoodCancel() {
+      this.goodsSetVisible = false;
+    },
+  },
+};
+</script>
+<style scoped>
+.back {
+  display: flex;
+  justify-content: space-between;
+}
+
+.back-left {
+  /* flex: 1 */
+}
+
+.back-right {
+  flex: 1;
+}
+
+.ant-tree li .ant-tree-node-content-wrapper {
+  height: auto !important;
+}
+
+.ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
+  background-color: #bae7ff33;
+}
+</style>

+ 65 - 0
src/views/settings/components/pos/modules/SelectGoodsModal.vue

@@ -0,0 +1,65 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <stock-type-form
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+    ></stock-type-form>
+  </j-modal>
+</template>
+
+  
+<script>
+import stockTypeForm from "./SelectGoods.vue";
+export default {
+  name: "stockTypeModel",
+  components: {
+    stockTypeForm,
+  },
+  data() {
+    return {
+      title: "",
+      width: 1200,
+      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(e) {
+      this.$emit("ok", e);
+      this.visible = false;
+    },
+    handleCancel() {
+      this.close();
+    },
+  },
+};
+</script>

+ 217 - 0
src/views/settings/components/pos/modules/posTableTypeInGoods.vue

@@ -0,0 +1,217 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-input
+                disabled
+                placeholder="区域名称"
+                v-model="model.name"
+              ></a-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 @click="handleAdd" type="primary" icon="plus"
+                >新增</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 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"
+        :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="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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-region-modal ref="modalForm" @ok="modalFormOk"></pos-region-modal>
+    <select-goods-modal ref="modalForm2" @ok="modalFormOk"></select-goods-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosRegionModal from "./PosTableTypeInGoodsModal";
+import SelectGoodsModal from "./SelectGoodsModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosRegionModal,
+    SelectGoodsModal,
+  },
+  props: {
+    posTableTypeId: {
+      type: String,
+    },
+  },
+  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: "goodsName",
+        },
+        {
+          title: "价格",
+          align: "center",
+          dataIndex: "price",
+        },
+        {
+          title: "数量",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list:
+          "/pos/posTableTypeInGoods/list?posTableTypeId=" + this.posTableTypeId,
+        delete: "/pos/posTableTypeInGoods/delete",
+        deleteBatch: "/pos/posTableTypeInGoods/deleteBatch",
+        exportXlsUrl: "/pos/posTableTypeInGoods/exportXls",
+        importExcelUrl: "pos/posTableTypeInGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      model: {},
+    };
+  },
+  created() {
+    console.log("this.posTableTypeId",this.posTableTypeId)
+  },
+  methods: {
+    handleAdd() {
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+
+      this.$refs.modalForm2.edit({
+        hotelId: _info.id,
+        posTableTypeId: this.model.id,
+      });
+      this.$refs.modalForm2.title = "商品选择";
+      this.$refs.modalForm2.disableSubmit = false;
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 71 - 0
src/views/settings/components/pos/modules/posTableTypeInGoodsListModal.vue

@@ -0,0 +1,71 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
+    @cancel="handleCancel"
+    cancelText="关闭"
+  >
+    <pos-table-type-in-goods
+      ref="realForm"
+      @ok="submitCallback"
+      :disabled="disableSubmit"
+      :posTableTypeId="posTableTypeId"
+    ></pos-table-type-in-goods>
+  </j-modal>
+</template>
+
+<script>
+import posTableTypeInGoods from "./posTableTypeInGoods";
+export default {
+  name: "PosThaliInGoodsModal",
+  components: {
+    posTableTypeInGoods,
+  },
+  props: {
+    posTableTypeId: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      title: "",
+      width: 800,
+      visible: false,
+      disableSubmit: false,
+    };
+  },
+  methods: {
+    add() {
+      this.visible = true;
+      this.$nextTick(() => {
+        this.$refs.realForm.add();
+      });
+    },
+    edit(record) {
+      console.log('posTableTypeId2',this.posTableTypeId)
+      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>

+ 301 - 0
src/views/settings/components/pos/posMealSection.vue

@@ -0,0 +1,301 @@
+<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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-thali-modal ref="modalForm" @ok="modalFormOk"></pos-thali-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import posThaliModal from "./modules/PosMealSectionModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    posThaliModal,
+  },
+  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: "name",
+        },
+        {
+          title: "开始时间",
+          align: "center",
+          dataIndex: "startTime",
+        },
+        {
+          title: "结束时间",
+          align: "center",
+          dataIndex: "endTime",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posMealSection/list",
+        delete: "/pos/posMealSection/delete",
+        deleteBatch: "/pos/posMealSection/deleteBatch",
+        exportXlsUrl: "/pos/posMealSection/exportXls",
+        importExcelUrl: "pos/posMealSection/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    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();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 296 - 0
src/views/settings/components/pos/posRegion.vue

@@ -0,0 +1,296 @@
+<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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-region-modal ref="modalForm" @ok="modalFormOk"></pos-region-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosRegionModal from "./modules/PosRegionModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosRegionModal,
+  },
+  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: "pos类型",
+          align: "center",
+          dataIndex: "typeName",
+        },
+        {
+          title: "区域名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posRegion/list",
+        delete: "/pos/posRegion/delete",
+        deleteBatch: "/pos/posRegion/deleteBatch",
+        exportXlsUrl: "/pos/posRegion/exportXls",
+        importExcelUrl: "pos/posRegion/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    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();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 231 - 0
src/views/settings/components/pos/posSellClearGoods.vue

@@ -0,0 +1,231 @@
+<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-tree-select
+              v-model="queryParam.goodType"
+              :tree-data="treeData"
+              :replaceFields="{
+                children: 'children',
+                title: 'name',
+                key: 'id',
+                value: 'id',
+              }"
+              placeholder="商品分类"
+            />
+          </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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button v-if="sellClear == 1" @click="handleAdd">立即沽清</a-button>
+      <a-button v-if="sellClear == 2" @click="handleDelete">取消沽清</a-button>
+    </div>
+
+    <div>
+      <a-row :gutter="[5, 5]">
+        <a-col
+          v-for="item in dataSource"
+          :key="item.id"
+          :span="2"
+          @click.stop="itemClick(item)"
+        >
+          <div
+            class="room-item"
+            :class="item.sort == 888888 ? 'check' : ''"
+            :style="{
+              background: item.isSellClear ? 'grey' : 'goldenrod',
+            }"
+          >
+            <div>{{ item.name }}</div>
+            <div style="margin-top: 20px">
+              ¥{{ item.sellingPrice.toFixed(2) }}
+            </div>
+            <div
+              v-if="item.isSellClear"
+              style="display: flex; justify-content: right"
+            >
+              <a-tag color="#f50"> 沽清 </a-tag>
+            </div>
+          </div>
+        </a-col>
+      </a-row>
+    </div>
+
+    <pos-region-modal ref="modalForm" @ok="modalFormOk"></pos-region-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosRegionModal from "./modules/PosRegionModal";
+import { filterObj } from "@/utils/util";
+import { getAction, postAction, deleteAction } from "@/api/manage";
+import { tree } from "@/api/good";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosRegionModal,
+  },
+  data() {
+    return {
+      sellClear: 0,
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 99999,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      // 表头
+      columns: [
+        {
+          title: "pos类型",
+          align: "center",
+          dataIndex: "typeName",
+        },
+        {
+          title: "区域名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posSellClearGoods/list",
+        delete: "/pos/posSellClearGoods/delete",
+        deleteBatch: "/pos/posSellClearGoods/deleteBatch",
+        exportXlsUrl: "/pos/posSellClearGoods/exportXls",
+        importExcelUrl: "pos/posSellClearGoods/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      treeData: [],
+      selectGoods: {},
+    };
+  },
+  created() {
+    this.loadTree();
+  },
+  methods: {
+    handleDelete() {
+      deleteAction("/pos/posSellClearGoods/delete", {
+        goodsId: this.selectGoods.id,
+      })
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.sellClear = 0;
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    handleAdd() {
+      var _info = JSON.parse(localStorage.getItem("storeInfo"));
+      var model = { goodsId: this.selectGoods.id };
+      if (_info) {
+        model.hotelId = _info.id;
+      }
+      postAction("/pos/posSellClearGoods/add", model)
+        .then((res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+            this.sellClear = 0;
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    itemClick(row) {
+      console.log(row);
+      if (row.sort != 888888) {
+        this.selectGoods = row;
+        var list = this.dataSource.filter((t) => (t) => t.sort == 888888);
+        list.forEach((t) => {
+          t.sort = 0;
+        });
+        row.sort = 888888;
+        if (row.isSellClear) {
+          this.sellClear = 2;
+        } else {
+          this.sellClear = 1;
+        }
+      } else {
+        row.sort = 0;
+        this.sellClear = 0;
+      }
+    },
+    loadTree() {
+      var that = this;
+      tree().then((res) => {
+        if (res.success) {
+          this.treeData = res.result;
+        }
+      });
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+.room-item {
+  height: 110px;
+  /* line-height: 200px; */
+  font-size: 13px;
+  color: #f9f9f9;
+  padding: 20px 10px;
+  border-radius: 5px;
+  cursor: pointer;
+  position: relative;
+}
+.check {
+  border: #000 solid 3px;
+}
+</style>

+ 324 - 0
src/views/settings/components/pos/posTable.vue

@@ -0,0 +1,324 @@
+<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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-table-modal ref="modalForm" @ok="modalFormOk"></pos-table-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosTableModal from "./modules/PosTableModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosTableModal,
+  },
+  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: "pos类型",
+          align: "center",
+          dataIndex: "typeName",
+        },
+        {
+          title: "餐桌区域",
+          align: "center",
+          dataIndex: "regionName",
+        },
+        {
+          title: "餐桌名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "桌型",
+          align: "center",
+          dataIndex: "tableTypeName",
+        },
+        {
+          title: "座位数",
+          align: "center",
+          dataIndex: "num",
+        },
+        {
+          title: "餐桌序号",
+          align: "center",
+          dataIndex: "tableNo",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "state",
+          customRender: function (text) {
+            return text == 0 ? "空桌台" : "用餐中";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posTable/list",
+        delete: "/pos/posTable/delete",
+        deleteBatch: "/pos/posTable/deleteBatch",
+        exportXlsUrl: "/pos/posTable/exportXls",
+        importExcelUrl: "pos/posTable/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    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();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 217 - 0
src/views/settings/components/pos/posTableType.vue

@@ -0,0 +1,217 @@
+<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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="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="handleInGoods(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>
+
+    <pos-table-type-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></pos-table-type-modal>
+    <pos-table-type-in-goods-modal
+      ref="modalForm2"
+      @ok="modalFormOk"
+      :posTableTypeId="posTableTypeId"
+    ></pos-table-type-in-goods-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import PosTableTypeModal from "./modules/PosTableTypeModal";
+import posTableTypeInGoodsModal from "./modules/posTableTypeInGoodsListModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    PosTableTypeModal,
+    posTableTypeInGoodsModal,
+  },
+  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: "pos类型",
+          align: "center",
+          dataIndex: "typeName",
+        },
+        {
+          title: "桌型名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posTableType/list",
+        delete: "/pos/posTableType/delete",
+        deleteBatch: "/pos/posTableType/deleteBatch",
+        exportXlsUrl: "/pos/posTableType/exportXls",
+        importExcelUrl: "pos/posTableType/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+      posTableTypeId: "",
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    handleInGoods(row) {
+      console.log(row)
+      this.posTableTypeId = row.id;
+      this.$refs.modalForm2.edit(row);
+      this.$refs.modalForm2.title = "开单自动新增项目配置";
+      this.$refs.modalForm2.disableSubmit = true;
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 309 - 0
src/views/settings/components/pos/posThali.vue

@@ -0,0 +1,309 @@
+<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
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="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>
+
+          <a-divider type="vertical" />
+          <a-popconfirm
+            title="确定删除吗?"
+            @confirm="() => handleDelete(record.id)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </div>
+
+    <pos-thali-modal ref="modalForm" @ok="modalFormOk"></pos-thali-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import posThaliModal from "./modules/PosThaliModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "memberList",
+  mixins: [JeecgListMixin],
+  components: {
+    posThaliModal,
+  },
+  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: "name",
+        },
+        {
+          title: "套餐条码",
+          align: "center",
+          dataIndex: "barCode",
+        },
+        {
+          title: "售价",
+          align: "center",
+          dataIndex: "price",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "state",
+          customRender(text) {
+            return text ? "启用" : "停用";
+          },
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/pos/posThali/list",
+        delete: "/pos/posThali/delete",
+        deleteBatch: "/pos/posThali/deleteBatch",
+        exportXlsUrl: "/pos/posThali/exportXls",
+        importExcelUrl: "pos/posThali/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    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();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 325 - 0
src/views/settings/components/roomModules/housePriceSchemeList.vue

@@ -0,0 +1,325 @@
+<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="关键字">
+                            <a-input placeholder="关键字(方案、编号、简码)" v-model="queryParam.paramName" allowClear></a-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>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+<!--                <a-button style="margin-left: 8px">-->
+<!--                    批量操作 <a-icon type="down" /></a-button>-->
+                <a-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+            </a-dropdown>
+        </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> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </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="openSlot" slot-scope="text, record, index">
+                    <a-switch checked-children="开" un-checked-children="关" default-checked :checked="record.open == 1"
+                              @change="e=>changeOpenState(e,record)" />
+                </template>
+                <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>
+
+                    <a-divider type="vertical" />
+                    <a-dropdown>
+                        <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+                        <a-menu slot="overlay">
+                            <a-menu-item>
+                                <a @click="handleDetailSetting(record)">详情</a>
+                            </a-menu-item>
+                            <a-menu-item>
+                                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                                    <a>删除</a>
+                                </a-popconfirm>
+                            </a-menu-item>
+                        </a-menu>
+                    </a-dropdown>
+                </span>
+            </a-table>
+        </div>
+<!--        <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form>-->
+<!--        <room-layout-price-modal ref="priceModal" @ok="onPriceSave"></room-layout-price-modal>-->
+<!--        <room-layout-detail-modal @saveOk="onSaveOk" ref="detailModal"></room-layout-detail-modal>-->
+        <house-price-scheme-modal ref="modalForm" @ok="modalFormOk"></house-price-scheme-modal>
+        <house-price-scheme-detail-modal ref="detailModal" @ok="modalFormOk"></house-price-scheme-detail-modal>
+    </a-card>
+</template>
+
+<script>
+
+    import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+    import { modifyAppState } from '@/api/roomLayout'
+    import { filterObj } from "@/utils/util";
+    import HousePriceSchemeModal from "./modules/housePriceSchemeModal";
+    let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+    import { httpAction, getAction } from '@/api/manage'
+    import HousePriceSchemeDetailModal from "./modules/housePriceSchemeDetailModal";
+    export default {
+        name: "housePriceSchemeList",
+        mixins: [JeecgListMixin],
+        components: {
+            HousePriceSchemeDetailModal,
+            HousePriceSchemeModal
+        },
+        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: "simpleCode",
+                    },
+                    {
+                        title: "编号",
+                        align: "center",
+                        dataIndex: "number",
+                    },
+                    {
+                        title: "房价方案",
+                        align: "center",
+                        dataIndex: "priceScheme",
+
+                    },
+                    {
+                        title: "客人类型",
+                        align: "center",
+                        dataIndex: "guestTypeName",
+                    },
+                    {
+                        title: "入住时间",
+                        align: "center",
+                        dataIndex: "checkInTimeText",
+                    },
+                    {
+                        title: "有效期",
+                        align: "center",
+                        dataIndex: "validTimeText",
+                    },
+                    {
+                        title: "状态",
+                        align: "center",
+                        dataIndex: "open",
+                        scopedSlots: {customRender: "openSlot"},
+                    },
+                    {
+                        title: "排序",
+                        align: "center",
+                        dataIndex: "sort",
+                    },
+                    {
+                        title: "操作时间",
+                        align: "center",
+                        dataIndex: "createAt",
+                    },
+                    {
+                        title: "操作",
+                        dataIndex: "action",
+                        align: "center",
+                        fixed: "right",
+                        width: 147,
+                        scopedSlots: {customRender: "action"},
+                    },
+                ],
+                url: {
+                    // list: 'org.jeecg.modules.business/busMarketMember/list',
+                    list: "/rooms/cesHousePriceScheme/list?hotelId=" + hotelInfo.id,
+                    delete: "/rooms/cesHousePriceScheme/remove",
+                    deleteBatch: "/rooms/cesHousePriceScheme/deleteBatch",
+                    exportXlsUrl: "/rooms/cesHousePriceScheme/exportXls",
+                    importExcelUrl:
+                        "rooms/cesHousePriceScheme/importExcel",
+                    modifyOpen: "/rooms/cesHousePriceScheme/modifyOpen",
+                },
+                dictOptions: {},
+                superFieldList: [],
+                selectedRowKeys: [],
+                isorter: {
+                    column: "createTime",
+                    order: "desc",
+                },
+            };
+        },
+        created() {
+            // this.loadData()
+        },
+        methods: {
+            onSaveOk() {
+                this.loadData()
+            },
+            onPriceSave() {
+
+            },
+            handleDetailSetting(record) {
+                this.$refs.detailModal.title="详情"
+                this.$refs.detailModal.visible = true
+                this.$refs.detailModal.schemeId=record.id
+            },
+            changeOpenState(e, record) {
+                console.log(e)
+                var that = this;
+                this.confirmLoading = true
+                httpAction(this.url.modifyOpen +'/'+ record.id + "?open=" + (e ? 1 : 0), {}, 'put').then((res) => {
+                    if (res.success) {
+                        that.$message.success('操作成功')
+                        that.$emit('ok')
+                        that.loadData(1);
+                    } else {
+                        that.$message.warning(res.message)
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false
+                })
+            },
+            changeAppState(e, param) {
+                modifyAppState(param).then(res => {
+                    if (res.code == 200) {
+                        this.loadData();
+                    }
+                })
+            },
+            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();
+                }
+            },
+        },
+    };
+</script>
+<style scoped>
+    @import "~@assets/less/common.less";
+</style>

+ 47 - 3
src/views/settings/components/roomModules/marketObjectiveList.vue

@@ -97,6 +97,17 @@
           <template slot="nightSlot" slot-scope="text,record">
               <a-input-number v-model="record.night" style="width: 70%" :min="0" :step="1" :precision="2"/>
           </template>
+          <template slot="footer" slot-scope="currentPageData">
+              <div class='subtotal'>
+                  <div class='left'>合计</div>
+                  <div class='number'>{{ total1.toFixed(2) }}</div>
+                  <div class='number'>{{ total2.toFixed(2) }}</div>
+                  <div class='number'>{{ total3.toFixed(2) }}</div>
+                  <div class='number'>{{ total4.toFixed(2) }}</div>
+                  <div class='number'>{{ total5.toFixed(2) }}</div>
+                  <div class='number'>{{  }}</div>
+              </div>
+          </template>
       </a-table>
     </div>
     <a-button type="primary" @click="submitData" style="margin-top: 20px">保存</a-button>
@@ -172,7 +183,12 @@
               dictOptions: {},
               superFieldList: [],
               yearShowOne: false,
-              hotelId:''
+              hotelId:'',
+              total1:0,
+              total2:0,
+              total3:0,
+              total4:0,
+              total5:0
           }
       },
       beforeCreate() {
@@ -268,10 +284,38 @@
               }).finally(() => {
                   that.confirmLoading = false;
               })
-          }
+          },
       }
   }
 </script>
-<style scoped>
+<style scoped lang="less">
   @import '~@assets/less/common.less';
+  .subtotal {
+      height: 50px;
+      position: absolute;
+      bottom: -10px;
+      width: 97%;
+      border: 1px solid #e8e8e8;
+      background: #F4F4F4;
+      display: flex;
+      align-items: center;
+      font-weight: 900;
+      overflow-x: scroll;
+      overflow-y: hidden;
+
+      .left {
+          flex: none; /* div显示滚动条的重点 */
+          width: 510px;
+      }
+
+      .number {
+          flex: none;
+          color: #666666;
+          height: 100%;
+          width: 150px;
+          display: flex;
+          align-items: center;
+          padding-left: 15px;
+      }
+  }
 </style>

+ 236 - 0
src/views/settings/components/roomModules/modules/housePriceSchemeDetailList.vue

@@ -0,0 +1,236 @@
+<template>
+    <a-card :bordered="false" :schemeId="schemeId">
+        <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="openSlot" slot-scope="text, record, index">
+                    <a-switch checked-children="开" un-checked-children="关" default-checked :checked="record.open == 1"
+                              @change="e=>changeOpenState(e,record)" />
+                </template>
+                <template slot="moneySlot" slot-scope="text, record">
+                    <div>
+                        <a-input-number v-model="record.money" :step="1" :min="0" :precision="2"
+                                        @blur="onMoneyChange(record)" />
+                    </div>
+                </template>
+                <template slot="breakfastNumberSlot" slot-scope="text, record">
+                    <div>
+                        <a-input-number v-model="record.breakfastNumber" :step="1" :min="0" :precision="0"
+                                        @blur="onNumberChange(record)" />
+                    </div>
+                </template>
+                <template slot="departureTimeSlot" slot-scope="text, record">
+                    <div>
+                        <a-time-picker :default-value="moment(record.departureTime, 'HH:mm')" format="HH:mm"
+                                       @change="e=>onDepartureTimeChange(e,record)">
+                        </a-time-picker>
+                    </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="handleMoney(record)">查看房价</a>
+                </span>
+            </a-table>
+        </div>
+        <house-price-scheme-layout-modal ref="modalForm" @ok="modalFormOk"></house-price-scheme-layout-modal>
+    </a-card>
+</template>
+
+<script>
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import moment from 'moment';
+    import { httpAction } from '@/api/manage'
+    import HousePriceSchemeLayoutModal from "./housePriceSchemeLayout/housePriceSchemeLayoutModal";
+
+    export default {
+        name: 'housePriceSchemeDetailList',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            HousePriceSchemeLayoutModal
+        },
+        props: {
+            schemeId: {
+                type: String,
+                default: () => {
+                    return ""
+                }
+            }
+        },
+        data () {
+            return {
+                description: '房价方案-房型关联表管理页面',
+                // 表头
+                columns: [
+                    {
+                        title:'房间类型',
+                        align:"center",
+                        dataIndex: 'layoutName'
+                    },
+                    {
+                        title:'门市价',
+                        align:"center",
+                        dataIndex: 'layoutPrice'
+                    },
+                    {
+                        title:'执行房价',
+                        align:"center",
+                        dataIndex: 'money',
+                        scopedSlots: {customRender: "moneySlot"},
+                    },
+                    {
+                        title:'早餐数量',
+                        align:"center",
+                        dataIndex: 'breakfastNumber',
+                        scopedSlots: {customRender: "breakfastNumberSlot"},
+                    },
+                    {
+                        title:'默认离店时间',
+                        align:"center",
+                        dataIndex: 'departureTime',
+                        // customRender:function (text) {
+                        //     return !text?"":(text.length>10?text.substr(0,10):text)
+                        // },
+                        scopedSlots: {customRender: "departureTimeSlot"},
+                    },
+                    {
+                        title: '查看每日房价',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busHousePriceSchemeLayout/list",
+                    delete: "/business/busHousePriceSchemeLayout/delete",
+                    deleteBatch: "/business/busHousePriceSchemeLayout/deleteBatch",
+                    exportXlsUrl: "/business/busHousePriceSchemeLayout/exportXls",
+                    importExcelUrl: "business/busHousePriceSchemeLayout/importExcel",
+                    editMoney: "/business/busHousePriceSchemeLayout/editMoney",
+                    editNumber: "/business/busHousePriceSchemeLayout/editNumber",
+                    editTime: "/business/busHousePriceSchemeLayout/editTime",
+                },
+                dictOptions:{},
+                superFieldList:[],
+                queryParam: {},
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+
+            this.queryParam.schemeId = this.schemeId
+            this.loadData()
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            moment,
+            initDictConfig(){
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'schemeId',text:'关联房价方案'})
+                fieldList.push({type:'string',value:'layoutId',text:'关联房型'})
+                fieldList.push({type:'number',value:'money',text:'执行房价'})
+                fieldList.push({type:'date',value:'departureTime',text:'默认离店时间'})
+                fieldList.push({type:'int',value:'breakfastNumber',text:'早餐数量'})
+                fieldList.push({type:'int',value:'lunchNumber',text:'中餐数量'})
+                fieldList.push({type:'int',value:'dinnerNumber',text:'晚餐数量'})
+                fieldList.push({type:'int',value:'delFlag',text:'删除状态'})
+                this.superFieldList = fieldList
+            },
+            onMoneyChange(record){
+                var that = this;
+                //修改执行房价
+                var param = {
+                    money: record.money,
+                    id: record.id
+                }
+                console.log(param)
+
+                httpAction(this.url.editMoney, param, 'post').then((res) => {
+                    if (res.success) {
+                        that.$message.success('操作成功')
+                        that.$emit('ok')
+                    } else {
+                        that.$message.warning(res.message)
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false
+                })
+            },
+            onNumberChange(record){
+                //修改早餐数量
+                var that = this;
+                var param = {
+                    breakfastNumber: record.breakfastNumber,
+                    id: record.id
+                }
+                console.log(param)
+                httpAction(this.url.editNumber, param, 'post').then((res) => {
+                    if (res.success) {
+                        that.$message.success('操作成功')
+                        that.$emit('ok')
+                    } else {
+                        that.$message.warning(res.message)
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false
+                })
+            },
+            onDepartureTimeChange(e,record){
+                var _time = moment(new Date(e)).format('HH:mm:ss')
+                console.log(_time)
+                //修改时间
+                var that = this;
+                var param = {
+                    departureTime: _time,
+                    id: record.id
+                }
+                console.log(param)
+                httpAction(this.url.editTime, param, 'post').then((res) => {
+                    if (res.success) {
+                        that.$message.success('操作成功')
+                        that.$emit('ok')
+                    } else {
+                        that.$message.warning(res.message)
+                    }
+                }).finally(() => {
+                    that.confirmLoading = false
+                })
+            },
+            handleMoney(record){
+                this.$refs.modalForm.title="每日房价"
+                this.$refs.modalForm.visible = true
+                this.$refs.modalForm.edit(record);
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 0
src/views/settings/components/roomModules/modules/housePriceSchemeDetailModal.vue


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio