Browse Source

提交代码

master
HY 1 year ago
parent
commit
2dcf3ff119
72 changed files with 5713 additions and 658 deletions
  1. BIN
      admin-hanhai-vue/src/assets/logo.svg
  2. +0
    -5
      admin-hanhai-vue/src/views/system/GoodsList.vue
  3. +7
    -1
      admin-hanhai-vue/src/views/system/HotelAddressList.vue
  4. +7
    -1
      admin-hanhai-vue/src/views/system/HotelBalanceLogList.vue
  5. +1
    -1
      admin-hanhai-vue/src/views/system/HotelBannerList.vue
  6. +7
    -1
      admin-hanhai-vue/src/views/system/HotelConfList.vue
  7. +1
    -1
      admin-hanhai-vue/src/views/system/HotelCouponList.vue
  8. +7
    -1
      admin-hanhai-vue/src/views/system/HotelLeaseLogList.vue
  9. +7
    -1
      admin-hanhai-vue/src/views/system/HotelMemberAccountList.vue
  10. +1
    -1
      admin-hanhai-vue/src/views/system/HotelNoticeList.vue
  11. +11
    -3
      admin-hanhai-vue/src/views/system/HotelOrderFlowList.vue
  12. +360
    -75
      admin-hanhai-vue/src/views/system/HotelOrderList.vue
  13. +20
    -1
      admin-hanhai-vue/src/views/system/HotelShopList.vue
  14. +7
    -1
      admin-hanhai-vue/src/views/system/HotelShoppingCatList.vue
  15. +554
    -0
      admin-hanhai-vue/src/views/system/LeaseOrderList.vue
  16. +360
    -75
      admin-hanhai-vue/src/views/system/RefundOrderList.vue
  17. +430
    -92
      admin-hanhai-vue/src/views/system/ReplaceOrderList.vue
  18. +378
    -91
      admin-hanhai-vue/src/views/system/WashOrderList.vue
  19. +172
    -0
      admin-hanhai-vue/src/views/system/modules/HotelOrderDetailForm.vue
  20. +84
    -0
      admin-hanhai-vue/src/views/system/modules/HotelOrderDetailModal.Style#Drawer.vue
  21. +60
    -0
      admin-hanhai-vue/src/views/system/modules/HotelOrderDetailModal.vue
  22. +1
    -1
      admin-hanhai-vue/src/views/system/modules/HotelOrderFlowForm.vue
  23. +99
    -0
      admin-hanhai-vue/src/views/system/modules/LeaseOrderForm.vue
  24. +84
    -0
      admin-hanhai-vue/src/views/system/modules/LeaseOrderModal.Style#Drawer.vue
  25. +66
    -0
      admin-hanhai-vue/src/views/system/modules/LeaseOrderModal.vue
  26. +7
    -7
      admin-hanhai-vue/src/views/system/modules/WashOrderForm.vue
  27. +1
    -1
      admin-hanhai-vue/src/views/system/modules/WashOrderModal.vue
  28. BIN
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/target/jeecg-system-cloud-api-3.2.0.jar
  29. +3
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelleaselog/entity/HotelLeaseLog.java
  30. +2
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelleaselog/mapper/xml/HotelLeaseLogMapper.xml
  31. +113
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/controller/HotelOrderController.java
  32. +16
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/entity/HotelOrder.java
  33. +10
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/mapper/HotelOrderMapper.java
  34. +75
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/mapper/xml/HotelOrderMapper.xml
  35. +7
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/service/IHotelOrderService.java
  36. +13
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/service/impl/HotelOrderServiceImpl.java
  37. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/controller/HotelOrderDetailController.java
  38. +104
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/entity/HotelOrderDetail.java
  39. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/mapper/HotelOrderDetailMapper.java
  40. +9
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/mapper/xml/HotelOrderDetailMapper.xml
  41. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/service/IHotelOrderDetailService.java
  42. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/service/impl/HotelOrderDetailServiceImpl.java
  43. +233
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/HotelOrderDetailList.vue
  44. +167
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailForm.vue
  45. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailModal.Style#Drawer.vue
  46. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailModal.vue
  47. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetail.api.ts
  48. +149
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetail.data.ts
  49. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetailList.vue
  50. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/components/HotelOrderDetailModal.vue
  51. +1
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/entity/HotelOrderFlow.java
  52. +2
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/mapper/HotelOrderFlowMapper.java
  53. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/mapper/xml/HotelOrderFlowMapper.xml
  54. +18
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/entity/HotelOrderLog.java
  55. +7
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/mapper/HotelOrderLogMapper.java
  56. +68
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/mapper/xml/HotelOrderLogMapper.xml
  57. +6
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/service/IHotelOrderLogService.java
  58. +11
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/service/impl/HotelOrderLogServiceImpl.java
  59. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoppingcat/mapper/xml/HotelShoppingCatMapper.xml
  60. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.2.0.jar
  61. +7
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/controller/ConfController.java
  62. +6
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/service/IConfService.java
  63. +15
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/service/impl/ConfServiceImpl.java
  64. +21
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/controller/CouponController.java
  65. +1
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/req/JoinShoppingCartReq.java
  66. +4
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/service/impl/GoodsServiceImpl.java
  67. +20
    -6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java
  68. +2
    -3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ConfirmAcceptOrderReq.java
  69. +2
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPayReq.java
  70. +19
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/SendLogisticsReq.java
  71. +44
    -5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java
  72. +1172
    -269
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java

BIN
admin-hanhai-vue/src/assets/logo.svg View File

Before After
Width: 632  |  Height: 633  |  Size: 55 KiB

+ 0
- 5
admin-hanhai-vue/src/views/system/GoodsList.vue View File

@ -104,11 +104,6 @@
<a-form layout="inline">
<a-row :gutter="24">
<!-- <a-col :md="12" :sm="12">-->
<!-- <a-form-item label="用户账号">-->
<!-- <a-input placeholder="" v-model="queryParam2.username"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="9" :sm="24">
<a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelAddressList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelBalanceLogList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 1
- 1
admin-hanhai-vue/src/views/system/HotelBannerList.vue View File

@ -17,7 +17,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelConfList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.name"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 1
- 1
admin-hanhai-vue/src/views/system/HotelCouponList.vue View File

@ -17,7 +17,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelLeaseLogList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelMemberAccountList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 1
- 1
admin-hanhai-vue/src/views/system/HotelNoticeList.vue View File

@ -17,7 +17,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 11
- 3
admin-hanhai-vue/src/views/system/HotelOrderFlowList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单类型">
<j-dict-select-tag placeholder="请选择订单类型" dictCode="hotel_order_type" v-model="queryParam.pid"></j-dict-select-tag>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>
@ -134,12 +140,14 @@
{
title:'订单类型',
align:"center",
dataIndex: 'pid'
dataIndex: 'pid_dictText',
sorter: true,
},
{
title:'排序',
align:"center",
dataIndex: 'sort'
dataIndex: 'sort',
sorter: true,
},
{
title:'是否删除',


+ 360
- 75
admin-hanhai-vue/src/views/system/HotelOrderList.vue View File

@ -1,73 +1,95 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-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-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-row :gutter="10">
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.id"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-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-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="handleOpen(record)">订单详情</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
@ -86,11 +108,97 @@
</a-dropdown>
</span>
</a-table>
</div>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</a-col>
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!-- <a-col :md="9" :sm="24">-->
<!-- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- </a-col>-->
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<!-- <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增规格</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>-->
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</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">{{-->
<!-- selectedRowKeys2.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>-->
<!-- </div>-->
<a-table
style="height:500px"
ref="table2"
bordered
size="middle"
rowKey="id"
:columns="columns2"
:dataSource="dataSource2"
:pagination="ipagination2"
:loading="loading2"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<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>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(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-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- 表单区域 -->
<hotel-goods-modal ref="modalForm" @ok="modalFormOk"></hotel-goods-modal>
<hotel-order-detail-modal ref="modalForm2" @ok="modalFormOk2"></hotel-order-detail-modal>
<!-- <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>-->
</a-card>
</a-col>
</a-row>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</template>
<script>
@ -99,12 +207,16 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
export default {
name: 'HotelOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal
HotelOrderModal,
HotelOrderDetailModal
},
data () {
return {
@ -121,6 +233,12 @@
return parseInt(index)+1;
}
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
sorter: true,
},
{
title:'标题',
align:"center",
@ -217,10 +335,83 @@
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
detailList: "/hotelorderdetail/hotelOrderDetail/list",
},
dictOptions:{},
superFieldList:[],
rightcolval:0,
currentRoleId: '',
selectionRows2: [],
selectedRowKeys2:[],
dataSource2:[],
ipagination2: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns2:[
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
}
},
created() {
@ -230,6 +421,12 @@
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
leftColMd() {
return this.selectedRowKeys.length === 0 ? 24 : 12
},
rightColMd() {
return this.selectedRowKeys.length === 0 ? 0 : 12
}
},
methods: {
initDictConfig(){
@ -245,7 +442,95 @@
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
},
searchQuery2() {
this.loadData2(1)
},
searchReset2() {
this.queryParam2 = {}
this.loadData2(1)
},
handleTableChange2(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter2.column = sorter.field
this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
}
this.ipagination2 = pagination
this.loadData2()
},
hideUserList(){
//this.rightcolval = 0
this.selectedRowKeys1 = []
},
handlePerssion(roleId){
this.$refs.modalUserRole.show(roleId);
},
onSelectChange2(selectedRowKeys, selectionRows) {
this.selectedRowKeys2 = selectedRowKeys
this.selectionRows2 = selectionRows
},
onClearSelected2() {
this.selectedRowKeys2 = []
this.selectionRows2 = []
},
handleOpen(record) {
this.rightcolval = 1
this.selectedRowKeys = [record.id]
this.model = Object.assign({}, record)
this.currentRoleId = record.id
this.onClearSelected2()
this.loadData2()
},
loadData2(arg) {
if (!this.url.detailList) {
this.$message.error('请设置url.list2属性!')
return
}
// 1
if (arg === 1) {
this.ipagination2.current = 1
}
if (this.currentRoleId === '') return
// let params = this.getQueryParams2()//
// params.orderId = this.currentRoleId
let params = {
orderId: this.currentRoleId
}
this.loading2 = true
getAction(this.url.detailList, params).then((res) => {
if (res.success) {
this.dataSource2 = res.result.records
this.ipagination2.total = res.result.total
}
this.loading2 = false
})
},
getQueryParams2() {
//
let sqp = {}
if (this.superQueryParams2) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
sqp['superQueryMatchType'] = this.superQueryMatchType2
}
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
param.field = this.getQueryField2()
param.pageNo = this.ipagination2.current
param.pageSize = this.ipagination2.pageSize
return filterObj(param)
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
modalFormOk2() {
// /
this.loadData2()
},
}
}
</script>


+ 20
- 1
admin-hanhai-vue/src/views/system/HotelShopList.vue View File

@ -4,6 +4,24 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="手机号">
<a-input placeholder="请输入手机号" v-model="queryParam.phone"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +35,8 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 7
- 1
admin-hanhai-vue/src/views/system/HotelShoppingCatList.vue View File

@ -4,6 +4,12 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
@ -17,7 +23,7 @@
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <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>


+ 554
- 0
admin-hanhai-vue/src/views/system/LeaseOrderList.vue View File

@ -0,0 +1,554 @@
<template>
<a-row :gutter="10">
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.id"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-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-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="handleOpen(record)">订单详情</a>
<a-divider type="vertical"/>
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<div v-if="record.status === 1">
<a @click="handleSend(record)">发货</a>
<a-divider type="vertical" />
</div>
<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>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
<lease-order-modal ref="modalForm2" @ok="modalFormOk"></lease-order-modal>
</a-card>
</a-col>
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!-- <a-col :md="9" :sm="24">-->
<!-- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- </a-col>-->
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<!-- <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增规格</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>-->
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</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">{{-->
<!-- selectedRowKeys2.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>-->
<!-- </div>-->
<a-table
style="height:500px"
ref="table2"
bordered
size="middle"
rowKey="id"
:columns="columns2"
:dataSource="dataSource2"
:pagination="ipagination2"
:loading="loading2"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<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>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(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-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- 表单区域 -->
<hotel-goods-modal ref="modalForm" @ok="modalFormOk"></hotel-goods-modal>
<hotel-order-detail-modal ref="modalForm2" @ok="modalFormOk2"></hotel-order-detail-modal>
<!-- <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>-->
</a-card>
</a-col>
</a-row>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import LeaseOrderModal from './modules/LeaseOrderModal'
import {getAction, httpAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
export default {
name: 'LeaseOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal,
LeaseOrderModal,
HotelOrderDetailModal
},
data () {
return {
description: '租赁订单管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
sorter: true,
},
{
title:'标题',
align:"center",
dataIndex: 'title'
},
{
title:'商品图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'客户姓名',
align:"center",
dataIndex: 'userName'
},
{
title:'客户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title:'用户地址',
align:"center",
dataIndex: 'userAddress'
},
{
title:'用户编号',
align:"center",
dataIndex: 'userId'
},
{
title:'店铺编号',
align:"center",
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
align:"center",
dataIndex: 'payFee'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'rentPay'
},
{
title:'支付金额',
align:"center",
dataIndex: 'orderPay'
},
{
title:'状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorder/hotelOrder/lease/list",
delete: "/hotelorder/hotelOrder/delete",
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
damageAuditUrl: "/hotelorder/hotelOrder/damage/audit",
detailList: "/hotelorderdetail/hotelOrderDetail/list",
},
dictOptions:{},
superFieldList:[],
rightcolval:0,
currentRoleId: '',
selectionRows2: [],
selectedRowKeys2:[],
dataSource2:[],
ipagination2: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns2:[
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
leftColMd() {
return this.selectedRowKeys.length === 0 ? 24 : 12
},
rightColMd() {
return this.selectedRowKeys.length === 0 ? 0 : 12
}
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
fieldList.push({type:'string',value:'userPhone',text:'客户手机号',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'shopId',text:'店铺编号',dictCode:''})
// fieldList.push({type:'int',value:'status',text:'',dictCode:'order_status'})
// fieldList.push({type:'int',value:'type',text:'',dictCode:'hotel_order_type'})
// fieldList.push({type:'int',value:'delFlag',text:'',dictCode:'is_delete'})
this.superFieldList = fieldList
},
handleSend(obj){
this.$refs.modalForm2.edit(obj);
this.$refs.modalForm2.title = "审核";
this.$refs.modalForm2.disableSubmit = false;
console.log(obj)
},
searchQuery2() {
this.loadData2(1)
},
searchReset2() {
this.queryParam2 = {}
this.loadData2(1)
},
handleTableChange2(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter2.column = sorter.field
this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
}
this.ipagination2 = pagination
this.loadData2()
},
hideUserList(){
//this.rightcolval = 0
this.selectedRowKeys1 = []
},
handlePerssion(roleId){
this.$refs.modalUserRole.show(roleId);
},
onSelectChange2(selectedRowKeys, selectionRows) {
this.selectedRowKeys2 = selectedRowKeys
this.selectionRows2 = selectionRows
},
onClearSelected2() {
this.selectedRowKeys2 = []
this.selectionRows2 = []
},
handleOpen(record) {
this.rightcolval = 1
this.selectedRowKeys = [record.id]
this.model = Object.assign({}, record)
this.currentRoleId = record.id
this.onClearSelected2()
this.loadData2()
},
loadData2(arg) {
if (!this.url.detailList) {
this.$message.error('请设置url.list2属性!')
return
}
// 1
if (arg === 1) {
this.ipagination2.current = 1
}
if (this.currentRoleId === '') return
// let params = this.getQueryParams2()//
// params.orderId = this.currentRoleId
let params = {
orderId: this.currentRoleId
}
this.loading2 = true
getAction(this.url.detailList, params).then((res) => {
if (res.success) {
this.dataSource2 = res.result.records
this.ipagination2.total = res.result.total
}
this.loading2 = false
})
},
getQueryParams2() {
//
let sqp = {}
if (this.superQueryParams2) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
sqp['superQueryMatchType'] = this.superQueryMatchType2
}
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
param.field = this.getQueryField2()
param.pageNo = this.ipagination2.current
param.pageSize = this.ipagination2.pageSize
return filterObj(param)
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
modalFormOk2() {
// /
this.loadData2()
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 360
- 75
admin-hanhai-vue/src/views/system/RefundOrderList.vue View File

@ -1,73 +1,95 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-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-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-row :gutter="10">
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.id"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-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-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="handleOpen(record)">订单详情</a>
<a-divider type="vertical"/>
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
@ -86,11 +108,97 @@
</a-dropdown>
</span>
</a-table>
</div>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</a-col>
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!-- <a-col :md="9" :sm="24">-->
<!-- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- </a-col>-->
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<!-- <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增规格</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>-->
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</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">{{-->
<!-- selectedRowKeys2.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>-->
<!-- </div>-->
<a-table
style="height:500px"
ref="table2"
bordered
size="middle"
rowKey="id"
:columns="columns2"
:dataSource="dataSource2"
:pagination="ipagination2"
:loading="loading2"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<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>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(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-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- 表单区域 -->
<hotel-goods-modal ref="modalForm" @ok="modalFormOk"></hotel-goods-modal>
<hotel-order-detail-modal ref="modalForm2" @ok="modalFormOk2"></hotel-order-detail-modal>
<!-- <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>-->
</a-card>
</a-col>
</a-row>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</template>
<script>
@ -99,12 +207,16 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'RefundOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal
HotelOrderModal,
HotelOrderDetailModal
},
data () {
return {
@ -121,6 +233,12 @@
return parseInt(index)+1;
}
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
sorter: true,
},
{
title:'标题',
align:"center",
@ -217,10 +335,83 @@
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
detailList: "/hotelorderdetail/hotelOrderDetail/list",
},
dictOptions:{},
superFieldList:[],
rightcolval:0,
currentRoleId: '',
selectionRows2: [],
selectedRowKeys2:[],
dataSource2:[],
ipagination2: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns2:[
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
}
},
created() {
@ -230,6 +421,12 @@
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
leftColMd() {
return this.selectedRowKeys.length === 0 ? 24 : 12
},
rightColMd() {
return this.selectedRowKeys.length === 0 ? 0 : 12
}
},
methods: {
initDictConfig(){
@ -245,7 +442,95 @@
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
},
searchQuery2() {
this.loadData2(1)
},
searchReset2() {
this.queryParam2 = {}
this.loadData2(1)
},
handleTableChange2(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter2.column = sorter.field
this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
}
this.ipagination2 = pagination
this.loadData2()
},
hideUserList(){
//this.rightcolval = 0
this.selectedRowKeys1 = []
},
handlePerssion(roleId){
this.$refs.modalUserRole.show(roleId);
},
onSelectChange2(selectedRowKeys, selectionRows) {
this.selectedRowKeys2 = selectedRowKeys
this.selectionRows2 = selectionRows
},
onClearSelected2() {
this.selectedRowKeys2 = []
this.selectionRows2 = []
},
handleOpen(record) {
this.rightcolval = 1
this.selectedRowKeys = [record.id]
this.model = Object.assign({}, record)
this.currentRoleId = record.id
this.onClearSelected2()
this.loadData2()
},
loadData2(arg) {
if (!this.url.detailList) {
this.$message.error('请设置url.list2属性!')
return
}
// 1
if (arg === 1) {
this.ipagination2.current = 1
}
if (this.currentRoleId === '') return
// let params = this.getQueryParams2()//
// params.orderId = this.currentRoleId
let params = {
orderId: this.currentRoleId
}
this.loading2 = true
getAction(this.url.detailList, params).then((res) => {
if (res.success) {
this.dataSource2 = res.result.records
this.ipagination2.total = res.result.total
}
this.loading2 = false
})
},
getQueryParams2() {
//
let sqp = {}
if (this.superQueryParams2) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
sqp['superQueryMatchType'] = this.superQueryMatchType2
}
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
param.field = this.getQueryField2()
param.pageNo = this.ipagination2.current
param.pageSize = this.ipagination2.pageSize
return filterObj(param)
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
modalFormOk2() {
// /
this.loadData2()
},
}
}
</script>


+ 430
- 92
admin-hanhai-vue/src/views/system/ReplaceOrderList.vue View File

@ -1,76 +1,109 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-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-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-row :gutter="10">
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.id"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-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-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 @click="handleOpen(record)">订单详情</a>
<a-divider type="vertical"/>
<!-- <a-divider type="vertical" />-->
<div v-if="record.status === 7">
<a @click="handleAudit(0,record)">通过</a>
<a-divider type="vertical" />
<a @click="handleAudit(1,record)">不通过</a>
<a-divider type="vertical" />
</div>
<div v-if="record.status === 9">
<a @click="handleTake(record)">确认收货</a>
<a-divider type="vertical" />
</div>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
@ -86,11 +119,98 @@
</a-dropdown>
</span>
</a-table>
</div>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
<wash-order-modal ref="modalForm2" @ok="modalFormOk"></wash-order-modal>
</a-card>
</a-col>
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!-- <a-col :md="9" :sm="24">-->
<!-- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- </a-col>-->
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<!-- <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增规格</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>-->
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</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">{{-->
<!-- selectedRowKeys2.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>-->
<!-- </div>-->
<a-table
style="height:500px"
ref="table2"
bordered
size="middle"
rowKey="id"
:columns="columns2"
:dataSource="dataSource2"
:pagination="ipagination2"
:loading="loading2"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<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>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(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-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- 表单区域 -->
<hotel-goods-modal ref="modalForm" @ok="modalFormOk"></hotel-goods-modal>
<hotel-order-detail-modal ref="modalForm2" @ok="modalFormOk2"></hotel-order-detail-modal>
<!-- <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>-->
</a-card>
</a-col>
</a-row>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</template>
<script>
@ -99,12 +219,18 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import WashOrderModal from './modules/WashOrderModal'
import { httpAction, getAction } from '@/api/manage'
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
import {filterObj} from "@/utils/util";
export default {
name: 'ReplaceOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal
HotelOrderModal,
WashOrderModal,
HotelOrderDetailModal
},
data () {
return {
@ -121,6 +247,12 @@
return parseInt(index)+1;
}
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
sorter: true,
},
{
title:'标题',
align:"center",
@ -158,35 +290,61 @@
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
title:'申请原因',
align:"center",
dataIndex: 'payFee'
dataIndex: 'reason'
},
{
title:'押金',
title:'换货数量',
align:"center",
dataIndex: 'deposit'
dataIndex: 'refundNum'
},
{
title:'水洗费用',
title:'换货支付金额',
align:"center",
dataIndex: 'washPay'
dataIndex: 'reasonPrice'
},
{
title:'水洗费用',
title:'换货说明',
align:"center",
dataIndex: 'rentPay'
dataIndex: 'reasonInfo'
},
{
title:'支付金额',
title:'换货说明图',
align:"center",
dataIndex: 'orderPay'
dataIndex: 'reasonPic',
scopedSlots: {customRender: 'imgSlot'}
},
// {
// title:'',
// align:"center",
// dataIndex: 'leaseTime'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'payFee'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'deposit'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'washPay'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'rentPay'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'orderPay'
// },
{
title:'状态',
align:"center",
@ -217,10 +375,84 @@
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
damageAuditUrl: "/hotelorder/hotelOrder/damage/audit",
takeUrl: "/hotelorder/hotelOrder/take",
detailList: "/hotelorderdetail/hotelOrderDetail/list",
},
dictOptions:{},
superFieldList:[],
rightcolval:0,
currentRoleId: '',
selectionRows2: [],
selectedRowKeys2:[],
dataSource2:[],
ipagination2: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns2:[
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
}
},
created() {
@ -230,6 +462,12 @@
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
leftColMd() {
return this.selectedRowKeys.length === 0 ? 24 : 12
},
rightColMd() {
return this.selectedRowKeys.length === 0 ? 0 : 12
}
},
methods: {
initDictConfig(){
@ -245,7 +483,107 @@
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
},
handleAudit(e,obj){
obj.audit = e;
httpAction(this.url.damageAuditUrl,obj,'post').then((res)=>{
this.loadData();
})
},
handleTake(obj){
this.$refs.modalForm2.audit(obj);
this.$refs.modalForm2.title = "确认收货";
this.$refs.modalForm2.disableSubmit = false;
},
searchQuery2() {
this.loadData2(1)
},
searchReset2() {
this.queryParam2 = {}
this.loadData2(1)
},
handleTableChange2(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter2.column = sorter.field
this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
}
this.ipagination2 = pagination
this.loadData2()
},
hideUserList(){
//this.rightcolval = 0
this.selectedRowKeys1 = []
},
handlePerssion(roleId){
this.$refs.modalUserRole.show(roleId);
},
onSelectChange2(selectedRowKeys, selectionRows) {
this.selectedRowKeys2 = selectedRowKeys
this.selectionRows2 = selectionRows
},
onClearSelected2() {
this.selectedRowKeys2 = []
this.selectionRows2 = []
},
handleOpen(record) {
this.rightcolval = 1
this.selectedRowKeys = [record.id]
this.model = Object.assign({}, record)
this.currentRoleId = record.id
this.onClearSelected2()
this.loadData2()
},
loadData2(arg) {
if (!this.url.detailList) {
this.$message.error('请设置url.list2属性!')
return
}
// 1
if (arg === 1) {
this.ipagination2.current = 1
}
if (this.currentRoleId === '') return
// let params = this.getQueryParams2()//
// params.orderId = this.currentRoleId
let params = {
orderId: this.currentRoleId
}
this.loading2 = true
getAction(this.url.detailList, params).then((res) => {
if (res.success) {
this.dataSource2 = res.result.records
this.ipagination2.total = res.result.total
}
this.loading2 = false
})
},
getQueryParams2() {
//
let sqp = {}
if (this.superQueryParams2) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
sqp['superQueryMatchType'] = this.superQueryMatchType2
}
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
param.field = this.getQueryField2()
param.pageNo = this.ipagination2.current
param.pageSize = this.ipagination2.pageSize
return filterObj(param)
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
modalFormOk2() {
// /
this.loadData2()
},
}
}
</script>


+ 378
- 91
admin-hanhai-vue/src/views/system/WashOrderList.vue View File

@ -1,84 +1,102 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<a-row :gutter="10">
<a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.id"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="用户编号">
<a-input placeholder="请输入用户编号" v-model="queryParam.userId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item label="店铺编号">
<a-input placeholder="请输入店铺编号" v-model="queryParam.shopId"></a-input>
<!-- <j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>-->
</a-form-item>
</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('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-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-dropdown>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- 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-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-dropdown>
</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">
<!-- 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>
<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>
<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">
<span slot="action" slot-scope="text, record">
<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" />-->
<div v-if="record.status === 16">
<a @click="handleAudit(0,record)">通过</a>
<a-divider type="vertical" />
<a @click="handleAudit2(1,record)">不通过</a>
<a-divider type="vertical" />
</div>
<!-- <a-divider type="vertical" />-->
<a @click="handleOpen(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>
@ -93,12 +111,99 @@
</a-dropdown>
</span>
</a-table>
</div>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
<wash-order-modal ref="modalForm2" @ok="modalFormOk"></wash-order-modal>
</a-card>
</a-col>
<a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!-- <a-col :md="9" :sm="24">-->
<!-- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- </a-col>-->
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24">
<!-- <a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">新增规格</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<!-- <a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">已有用户</a-button>-->
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</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">{{-->
<!-- selectedRowKeys2.length }}</a>-->
<!-- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>-->
<!-- </div>-->
<a-table
style="height:500px"
ref="table2"
bordered
size="middle"
rowKey="id"
:columns="columns2"
:dataSource="dataSource2"
:pagination="ipagination2"
:loading="loading2"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<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>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(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-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- 表单区域 -->
<hotel-goods-modal ref="modalForm" @ok="modalFormOk"></hotel-goods-modal>
<hotel-order-detail-modal ref="modalForm2" @ok="modalFormOk2"></hotel-order-detail-modal>
<!-- <Select-User-Modal ref="selectUserModal" @selectFinished="selectOK"></Select-User-Modal>-->
</a-card>
</a-col>
</a-row>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
<wash-order-modal ref="modalForm2" @ok="modalFormOk"></wash-order-modal>
</a-card>
</template>
<script>
@ -108,14 +213,17 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import WashOrderModal from './modules/WashOrderModal'
import {httpAction} from "@api/manage";
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
import {getAction, httpAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'WashOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal,
WashOrderModal
WashOrderModal,
HotelOrderDetailModal
},
data () {
return {
@ -132,6 +240,17 @@
return parseInt(index)+1;
}
},
// {
// title:'',
// align:"center",
// dataIndex: 'id'
// },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
sorter: true,
},
{
title:'标题',
align:"center",
@ -168,16 +287,16 @@
align:"center",
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
align:"center",
dataIndex: 'payFee'
},
// {
// title:'',
// align:"center",
// dataIndex: 'leaseTime'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'payFee'
// },
{
title:'押金',
align:"center",
@ -189,7 +308,7 @@
dataIndex: 'washPay'
},
{
title:'水洗费用',
title:'租金费用',
align:"center",
dataIndex: 'rentPay'
},
@ -222,16 +341,90 @@
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorder/hotelOrder/wash/list",
delete: "/hotelorder/hotelOrder/delete",
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
damageAuditUrl: "/hotelorder/hotelOrder/damage/audit"
damageAuditUrl: "/hotelorder/hotelOrder/damage/audit",
detailList: "/hotelorderdetail/hotelOrderDetail/list",
},
dictOptions:{},
superFieldList:[],
rightcolval:0,
currentRoleId: '',
selectionRows2: [],
selectedRowKeys2:[],
dataSource2:[],
ipagination2: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns2:[
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
}
},
created() {
@ -241,6 +434,12 @@
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
leftColMd() {
return this.selectedRowKeys.length === 0 ? 24 : 12
},
rightColMd() {
return this.selectedRowKeys.length === 0 ? 0 : 12
}
},
methods: {
initDictConfig(){
@ -276,7 +475,95 @@
}).finally(() => {
this.loadData();
})
}
},
searchQuery2() {
this.loadData2(1)
},
searchReset2() {
this.queryParam2 = {}
this.loadData2(1)
},
handleTableChange2(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter2.column = sorter.field
this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
}
this.ipagination2 = pagination
this.loadData2()
},
hideUserList(){
//this.rightcolval = 0
this.selectedRowKeys1 = []
},
handlePerssion(roleId){
this.$refs.modalUserRole.show(roleId);
},
onSelectChange2(selectedRowKeys, selectionRows) {
this.selectedRowKeys2 = selectedRowKeys
this.selectionRows2 = selectionRows
},
onClearSelected2() {
this.selectedRowKeys2 = []
this.selectionRows2 = []
},
handleOpen(record) {
this.rightcolval = 1
this.selectedRowKeys = [record.id]
this.model = Object.assign({}, record)
this.currentRoleId = record.id
this.onClearSelected2()
this.loadData2()
},
loadData2(arg) {
if (!this.url.detailList) {
this.$message.error('请设置url.list2属性!')
return
}
// 1
if (arg === 1) {
this.ipagination2.current = 1
}
if (this.currentRoleId === '') return
// let params = this.getQueryParams2()//
// params.orderId = this.currentRoleId
let params = {
orderId: this.currentRoleId
}
this.loading2 = true
getAction(this.url.detailList, params).then((res) => {
if (res.success) {
this.dataSource2 = res.result.records
this.ipagination2.total = res.result.total
}
this.loading2 = false
})
},
getQueryParams2() {
//
let sqp = {}
if (this.superQueryParams2) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
sqp['superQueryMatchType'] = this.superQueryMatchType2
}
var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
param.field = this.getQueryField2()
param.pageNo = this.ipagination2.current
param.pageSize = this.ipagination2.pageSize
return filterObj(param)
},
handleEdit2: function(record) {
this.$refs.modalForm2.title = '编辑'
this.$refs.modalForm2.roleDisabled = true
this.$refs.modalForm2.edit(record)
},
modalFormOk2() {
// /
this.loadData2()
},
}
}
</script>


+ 172
- 0
admin-hanhai-vue/src/views/system/modules/HotelOrderDetailForm.vue View File

@ -0,0 +1,172 @@
<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="orderId">
<a-input v-model="model.orderId" 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-input v-model="model.goodsId" placeholder="请输入商品编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="skuId">
<a-input v-model="model.skuId" placeholder="请输入规格编号" ></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 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="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sku">
<a-input v-model="model.sku" placeholder="请输入规格" ></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 v-model="model.num" 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-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="rentPrice">
<a-input-number v-model="model.rentPay" placeholder="请输入租金" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="水洗费用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="washPay">
<a-input-number v-model="model.washPay" placeholder="请输入水洗费用" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="优惠金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discountPrice">
<a-input-number v-model="model.discountPrice" placeholder="请输入优惠金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" 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: 'HotelOrderDetailForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
depositPrice: [
{ required: true, message: '请输入押金!'},
],
rentPrice: [
{ required: true, message: '请输入租金!'},
],
washPrice: [
{ required: true, message: '请输入水洗费用!'},
],
discountPrice: [
{ required: true, message: '请输入优惠金额!'},
],
},
url: {
add: "/hotelorderdetail/hotelOrderDetail/add",
edit: "/hotelorderdetail/hotelOrderDetail/edit",
queryById: "/hotelorderdetail/hotelOrderDetail/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>

+ 84
- 0
admin-hanhai-vue/src/views/system/modules/HotelOrderDetailModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-order-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-order-detail-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 HotelOrderDetailForm from './HotelOrderDetailForm'
export default {
name: 'HotelOrderDetailModal',
components: {
HotelOrderDetailForm
},
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
admin-hanhai-vue/src/views/system/modules/HotelOrderDetailModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-order-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-order-detail-form>
</j-modal>
</template>
<script>
import HotelOrderDetailForm from './HotelOrderDetailForm'
export default {
name: 'HotelOrderDetailModal',
components: {
HotelOrderDetailForm
},
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>

+ 1
- 1
admin-hanhai-vue/src/views/system/modules/HotelOrderFlowForm.vue View File

@ -15,7 +15,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="订单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<a-input-number v-model="model.pid" placeholder="请输入订单类型" style="width: 100%" />
<j-dict-select-tag type="select" v-model="model.pid" dictCode="hotel_order_type" placeholder="请选择订单类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">


+ 99
- 0
admin-hanhai-vue/src/views/system/modules/LeaseOrderForm.vue View File

@ -0,0 +1,99 @@
<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="logisticsName">
<a-input v-model="model.logisticsName" placeholder="物流名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物流单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsCode">
<a-input v-model="model.logisticsCode" 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: 'LeaseOrderForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
url: {
add: "/hotelorder/hotelOrder/add",
edit: "/hotelorder/hotelOrder/edit",
queryById: "/hotelorder/hotelOrder/queryById",
leaseSendOrder: "/hotelorder/hotelOrder/lease/send"
}
}
},
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;
},
audit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
that.confirmLoading = true;
httpAction(that.url.leaseSendOrder,this.model,'post').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
admin-hanhai-vue/src/views/system/modules/LeaseOrderModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<lease-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></lease-order-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 LeaseOrderForm from './LeaseOrderForm'
export default {
name: 'WashOrderModal',
components: {
LeaseOrderForm
},
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>

+ 66
- 0
admin-hanhai-vue/src/views/system/modules/LeaseOrderModal.vue View File

@ -0,0 +1,66 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<lease-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></lease-order-form>
</j-modal>
</template>
<script>
import LeaseOrderForm from './LeaseOrderForm'
export default {
name: 'LeaseOrderModal',
components: {
LeaseOrderForm
},
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);
})
},
audit (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>

+ 7
- 7
admin-hanhai-vue/src/views/system/modules/WashOrderForm.vue View File

@ -5,14 +5,14 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="refundPrice">
<a-input v-model="model.refundPrice" placeholder="请输入金额" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="audit">
<j-dict-select-tag type="radio" v-model="model.audit" dictCode="is_delete" placeholder="请选择是否审核" />
<a-input v-model="model.reasonPrice" placeholder="请输入金额" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="audit">-->
<!-- <j-dict-select-tag type="radio" v-model="model.audit" dictCode="replace_order_audit" placeholder="请选择是否审核" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row>
</a-form-model>
</j-form-container>
@ -54,7 +54,7 @@
add: "/hotelorder/hotelOrder/add",
edit: "/hotelorder/hotelOrder/edit",
queryById: "/hotelorder/hotelOrder/queryById",
audit: "/hotelorder/hotelOrder/damage/audit"
audit: "/hotelorder/hotelOrder/take"
}
}
},


+ 1
- 1
admin-hanhai-vue/src/views/system/modules/WashOrderModal.vue View File

@ -44,7 +44,7 @@
audit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.audit(record);
this.$refs.realForm.edit(record);
})
},
close () {


BIN
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/target/jeecg-system-cloud-api-3.2.0.jar View File


+ 3
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelleaselog/entity/HotelLeaseLog.java View File

@ -103,4 +103,7 @@ public class HotelLeaseLog implements Serializable {
private BigDecimal zujin;
@TableField(exist = false)
private BigDecimal washPrice;
@TableField(exist = false)
private String isWash;
private String orderDetailId;
}

+ 2
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelleaselog/mapper/xml/HotelLeaseLogMapper.xml View File

@ -6,7 +6,8 @@
<select id="myLeaseLogPage" resultType="org.jeecg.modules.hotelleaselog.entity.HotelLeaseLog">
SELECT a.*,
(IFNULL(IFNULL(DATEDIFF(NOW(), a.start_time),0)*(SELECT price FROM hotel_goods_sku WHERE id = a.sku_id ),0)) zujin,
(a.num*(SELECT price FROM hotel_category WHERE id = a.category_id)) wash_price
(a.num*(SELECT price FROM hotel_category WHERE id = a.category_id)) wash_price,
(select id from hotel_order where lease_id = a.id and status in (4,5,6,16)) is_wash
FROM hotel_lease_log a WHERE a.del_flag = 0 AND a.user_id = #{userId}
<if test="leaseFlag != null">
AND lease_flag = #{leaseFlag}


+ 113
- 7
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/controller/HotelOrderController.java View File

@ -31,6 +31,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import org.jeecg.modules.hotelorderdetail.service.IHotelOrderDetailService;
import org.jeecg.modules.hotelshop.entity.HotelShop;
import org.jeecg.modules.hotelshop.service.IHotelShopService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -73,6 +75,8 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
private IHotelBalanceLogService hotelBalanceLogService;
@Resource
private IHotelLeaseLogService hotelLeaseLogService;
@Resource
private IHotelOrderDetailService hotelOrderDetailService;
/**
* 分页列表查询
@ -96,6 +100,30 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
return Result.OK(pageList);
}
/**
* 水洗分页列表查询
*
* @param hotelOrder
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_order-分页列表查询")
@ApiOperation(value="水洗分页列表查询", notes="水洗分页列表查询")
@GetMapping(value = "/lease/list")
public Result<IPage<HotelOrder>> queryPageLeaseList(HotelOrder hotelOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelOrder> queryWrapper = QueryGenerator.initQueryWrapper(hotelOrder, req.getParameterMap());
queryWrapper.eq("type",0);
Page<HotelOrder> page = new Page<HotelOrder>(pageNo, pageSize);
IPage<HotelOrder> pageList = hotelOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 水洗分页列表查询
*
@ -271,7 +299,7 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
@Transactional(rollbackFor = Exception.class)
@AutoLog(value = "水洗破损上报审核")
@ApiOperation(value="水洗破损上报审核", notes="水洗破损上报审核")
@RequestMapping(value = "/damage/audit", method = {RequestMethod.PUT,RequestMethod.POST})
@RequestMapping(value = "/damage/audit2", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> damageAudit(@RequestBody HotelOrder hotelOrder3) {
HotelOrder hotelOrder = new HotelOrder();
hotelOrder.setId(hotelOrder3.getId());
@ -358,6 +386,8 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
hotelOrder.setStatus(15);
}
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
HotelOrder hotelOrder1 = new HotelOrder();
hotelOrder1.setReason(hotelOrder3.getReason());
hotelOrder1.setRefundNum(hotelOrder3.getRefundNum());
@ -368,19 +398,21 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
hotelOrder1.setReasonPhone(hotelOrder3.getReasonPhone());
hotelOrder1.setUserId(hotelOrder3.getUserId());
hotelOrder1.setShopId(hotelLeaseLog.getShopId());
hotelOrder1.setGoodsId(hotelLeaseLog.getGoodsId());
hotelOrder1.setGoodsName(hotelLeaseLog.getGoodsName());
hotelOrder1.setSkuId(hotelLeaseLog.getSkuId());
hotelOrder1.setSku(hotelLeaseLog.getSku());
hotelOrder1.setPic(hotelLeaseLog.getGoodsPic());
hotelOrderDetail.setGoodsId(hotelLeaseLog.getGoodsId());
hotelOrderDetail.setGoodsName(hotelLeaseLog.getGoodsName());
hotelOrderDetail.setSkuId(hotelLeaseLog.getSkuId());
hotelOrderDetail.setSku(hotelLeaseLog.getSku());
hotelOrderDetail.setPic(hotelLeaseLog.getGoodsPic());
hotelOrder1.setStatus(7);
hotelOrderDetail.setLeaseId(hotelOrder3.getNum() > hotelOrder3.getRefundNum()?hotelLeaseLog2.getId():hotelLeaseLog.getId());
hotelOrder1.setLeaseId(hotelOrder3.getNum() > hotelOrder3.getRefundNum()?hotelLeaseLog2.getId():hotelLeaseLog.getId());
hotelOrder1.setUserName(hotelShop.getUserName());
hotelOrder1.setUserPhone(hotelShop.getPhone());
hotelOrder1.setUserAddress(hotelShop.getAddress());
hotelOrder1.setShopId(hotelShop.getUserId());
hotelOrderService.save(hotelOrder1);
hotelOrderDetail.setOrderId(hotelOrder1.getId());
hotelOrderDetailService.save(hotelOrderDetail);
}else{
hotelOrder.setStatus(5);
}
@ -388,4 +420,78 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
return Result.OK("编辑成功!");
}
/**
* 水洗破损上报审核
*
* @param hotelOrder3
* @return
*/
@Transactional(rollbackFor = Exception.class)
@AutoLog(value = "水洗破损上报审核")
@ApiOperation(value="水洗破损上报审核", notes="水洗破损上报审核")
@RequestMapping(value = "/damage/audit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> damageAudit2(@RequestBody HotelOrder hotelOrder3){
HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
.eq(HotelOrder::getId, hotelOrder3.getId())
.one();
//新订单
HotelOrderDetail hotelOrderDetail = hotelOrderDetailService.lambdaQuery()
.eq(HotelOrderDetail::getDelFlag, 0)
.eq(HotelOrderDetail::getOrderId, hotelOrder.getId())
.one();
HotelOrder hotelOrder1 = new HotelOrder();
hotelOrder1.setId(hotelOrder.getId());
if(hotelOrder3.getAudit() == 0){
hotelOrder1.setStatus(8);
// hotelOrder1.setReasonPrice(hotelOrder3.getReasonPrice());
}else{
//原订单详情
HotelOrderDetail hotelOrderDetail1 = hotelOrderDetailService.lambdaQuery()
.eq(HotelOrderDetail::getDelFlag, 0)
.eq(HotelOrderDetail::getId, hotelOrderDetail.getOrderDetailId())
.one();
HotelOrderDetail hotelOrderDetail2 = new HotelOrderDetail();
hotelOrderDetail2.setId(hotelOrderDetail1.getId());
hotelOrderDetail2.setStatus(0);
hotelOrderDetailService.updateById(hotelOrderDetail2);
hotelOrder1.setStatus(17);
}
hotelOrderService.updateById(hotelOrder1);
return Result.OK();
}
/**
* 租赁订单发货
* @param hotelOrder
* @return
*/
@Transactional(rollbackFor = Exception.class)
@RequestMapping(value = "/lease/send", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> leaseSendOrder(@RequestBody HotelOrder hotelOrder){
hotelOrder.setStatus(2);
hotelOrderService.updateById(hotelOrder);
return Result.OK();
}
/**
* 换货订单收货
* @param hotelOrder
* @return
*/
@Transactional(rollbackFor = Exception.class)
@RequestMapping(value = "/take", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> replaceTakeOrder(@RequestBody HotelOrder hotelOrder){
hotelOrder.setStatus(10);
hotelOrderService.updateById(hotelOrder);
return Result.OK();
}
}

+ 16
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/entity/HotelOrder.java View File

@ -9,6 +9,7 @@ import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import org.jeecg.modules.hotelorderflow.entity.HotelOrderFlow;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -177,5 +178,20 @@ public class HotelOrder implements Serializable {
private List<HotelOrderFlow> hotelOrderFlows;
@TableField(exist = false)
private Integer audit;
/**优惠金额*/
private BigDecimal discountPrice;
/**原支付金额*/
private BigDecimal originalPrice;
/**物流名称*/
private String logisticsName;
/**物流单号*/
private String logisticsCode;
/**优惠券id*/
private String couponId;
@TableField(exist = false)
private List<HotelOrderDetail> orderDetails;
private String payInfo;
/**换货类型 0用户换货 1水洗店换货*/
private Integer replaceType;
}

+ 10
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/mapper/HotelOrderMapper.java View File

@ -2,9 +2,12 @@ package org.jeecg.modules.hotelorder.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
/**
* @Description: hotel_order
@ -19,4 +22,11 @@ public interface HotelOrderMapper extends BaseMapper<HotelOrder> {
HotelOrder getOrderOne2(@Param("id") String id,@Param("userId") String userId);
List<HotelOrder> getOrderPage(@Param("id") String id);
IPage<HotelOrder> getOrderLogPage(Page<HotelOrder> page, @Param("userId") String userId, @Param("type") Integer type, @Param("uid") String uid);
HotelOrder getOrderByUserIdById(@Param("userId") String userId,@Param("id") String id);
}

+ 75
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/mapper/xml/HotelOrderMapper.xml View File

@ -2,6 +2,52 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelorder.mapper.HotelOrderMapper">
<resultMap id="orderReq" type="org.jeecg.modules.hotelorder.entity.HotelOrder">
<id property="id" column="id"/>
<result property="title" column="title"></result>
<result property="userName" column="user_name"></result>
<result property="userPhone" column="user_phone"></result>
<result property="userAddress" column="user_address"></result>
<result property="userId" column="user_id"></result>
<result property="shopId" column="shop_id"></result>
<result property="leaseTime" column="lease_time"></result>
<result property="payFee" column="pay_fee"></result>
<result property="deposit" column="deposit"></result>
<result property="washPay" column="wash_pay"></result>
<result property="rentPay" column="rent_pay"></result>
<result property="orderPay" column="order_pay"></result>
<collection property="orderDetails"
ofType="org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail"
column="id"
select="org.jeecg.modules.hotelorderdetail.mapper.HotelOrderDetailMapper.getOrderDetailList">
</collection>
</resultMap>
<resultMap id="orderOneReq" type="org.jeecg.modules.hotelorder.entity.HotelOrder">
<id property="id" column="id"/>
<result property="title" column="title"></result>
<result property="userName" column="user_name"></result>
<result property="userPhone" column="user_phone"></result>
<result property="userAddress" column="user_address"></result>
<result property="userId" column="user_id"></result>
<result property="shopId" column="shop_id"></result>
<result property="leaseTime" column="lease_time"></result>
<result property="payFee" column="pay_fee"></result>
<result property="deposit" column="deposit"></result>
<result property="washPay" column="wash_pay"></result>
<result property="rentPay" column="rent_pay"></result>
<result property="orderPay" column="order_pay"></result>
<collection property="orderDetails"
ofType="org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail"
column="id"
select="org.jeecg.modules.hotelorderdetail.mapper.HotelOrderDetailMapper.getOrderDetailList">
</collection>
<collection property="hotelOrderFlows" ofType="org.jeecg.modules.hotelorderflow.entity.HotelOrderFlow"
column="type"
select="org.jeecg.modules.hotelorderflow.mapper.HotelOrderFlowMapper.getOrderFlowList">
</collection>
</resultMap>
<select id="getOrderOne" resultType="org.jeecg.modules.hotelorder.entity.HotelOrder">
SELECT a.*,
(SELECT item_text from sys_dict_item where dict_id = (select id from sys_dict where dict_code = 'order_status') and item_value = a.status) status_dictText,
@ -16,4 +62,33 @@
FROM hotel_order a WHERE a.del_flag = 0 AND a.user_id = #{userId} AND a.id = #{id}
</select>
<select id="getOrderPage" resultType="org.jeecg.modules.hotelorder.entity.HotelOrder">
SELECT * FROM hotel_order WHERE order_log_id = #{id}
</select>
<select id="getOrderLogPage" resultMap="orderReq">
SELECT a.* FROM hotel_order a WHERE a.del_flag = 0
<if test="type != null">
AND a.type = #{type}
</if>
<if test="uid == null">
AND (a.user_id = #{userId} or a.shop_id = #{userId})
</if>
<if test="uid != null">
AND a.user_id = #{uid}
</if>
order by a.create_time desc
</select>
<select id="getOrderByUserIdById" resultMap="orderOneReq">
SELECT * FROM hotel_order WHERE del_flag = 0
<if test="userId != null">
AND user_id = #{userId}
</if>
<if test="id != null">
AND id = #{id}
</if>
</select>
</mapper>

+ 7
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/service/IHotelOrderService.java View File

@ -1,8 +1,11 @@
package org.jeecg.modules.hotelorder.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
/**
* @Description: hotel_order
@ -15,4 +18,8 @@ public interface IHotelOrderService extends IService<HotelOrder> {
HotelOrder getOrderOne(String id, String userId);
HotelOrder getOrderOne2(String id, String userId);
IPage<HotelOrder> getOrderLogPage(Page<HotelOrder> page, String userId, Integer type, String uid);
HotelOrder getOrderByUserIdById(String userId,String id);
}

+ 13
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/service/impl/HotelOrderServiceImpl.java View File

@ -1,8 +1,11 @@
package org.jeecg.modules.hotelorder.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import org.jeecg.modules.hotelorder.mapper.HotelOrderMapper;
import org.jeecg.modules.hotelorder.service.IHotelOrderService;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -25,4 +28,14 @@ public class HotelOrderServiceImpl extends ServiceImpl<HotelOrderMapper, HotelOr
public HotelOrder getOrderOne2(String id, String userId) {
return baseMapper.getOrderOne2(id, userId);
}
@Override
public IPage<HotelOrder> getOrderLogPage(Page<HotelOrder> page, String userId, Integer type, String uid) {
return baseMapper.getOrderLogPage(page, userId, type, uid);
}
@Override
public HotelOrder getOrderByUserIdById(String userId, String id) {
return baseMapper.getOrderByUserIdById(userId, id);
}
}

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/controller/HotelOrderDetailController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.hotelorderdetail.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import org.jeecg.modules.hotelorderdetail.service.IHotelOrderDetailService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: hotel_order_detail
* @Author: jeecg-boot
* @Date: 2024-10-15
* @Version: V1.0
*/
@Api(tags="hotel_order_detail")
@RestController
@RequestMapping("/hotelorderdetail/hotelOrderDetail")
@Slf4j
public class HotelOrderDetailController extends JeecgController<HotelOrderDetail, IHotelOrderDetailService> {
@Autowired
private IHotelOrderDetailService hotelOrderDetailService;
/**
* 分页列表查询
*
* @param hotelOrderDetail
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_order_detail-分页列表查询")
@ApiOperation(value="hotel_order_detail-分页列表查询", notes="hotel_order_detail-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HotelOrderDetail>> queryPageList(HotelOrderDetail hotelOrderDetail,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelOrderDetail> queryWrapper = QueryGenerator.initQueryWrapper(hotelOrderDetail, req.getParameterMap());
Page<HotelOrderDetail> page = new Page<HotelOrderDetail>(pageNo, pageSize);
IPage<HotelOrderDetail> pageList = hotelOrderDetailService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hotelOrderDetail
* @return
*/
@AutoLog(value = "hotel_order_detail-添加")
@ApiOperation(value="hotel_order_detail-添加", notes="hotel_order_detail-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HotelOrderDetail hotelOrderDetail) {
hotelOrderDetailService.save(hotelOrderDetail);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hotelOrderDetail
* @return
*/
@AutoLog(value = "hotel_order_detail-编辑")
@ApiOperation(value="hotel_order_detail-编辑", notes="hotel_order_detail-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HotelOrderDetail hotelOrderDetail) {
hotelOrderDetailService.updateById(hotelOrderDetail);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "hotel_order_detail-通过id删除")
@ApiOperation(value="hotel_order_detail-通过id删除", notes="hotel_order_detail-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hotelOrderDetailService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "hotel_order_detail-批量删除")
@ApiOperation(value="hotel_order_detail-批量删除", notes="hotel_order_detail-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hotelOrderDetailService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "hotel_order_detail-通过id查询")
@ApiOperation(value="hotel_order_detail-通过id查询", notes="hotel_order_detail-通过id查询")
@GetMapping(value = "/queryById")
public Result<HotelOrderDetail> queryById(@RequestParam(name="id",required=true) String id) {
HotelOrderDetail hotelOrderDetail = hotelOrderDetailService.getById(id);
if(hotelOrderDetail==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hotelOrderDetail);
}
/**
* 导出excel
*
* @param request
* @param hotelOrderDetail
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HotelOrderDetail hotelOrderDetail) {
return super.exportXls(request, hotelOrderDetail, HotelOrderDetail.class, "hotel_order_detail");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HotelOrderDetail.class);
}
}

+ 104
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/entity/HotelOrderDetail.java View File

@ -0,0 +1,104 @@
package org.jeecg.modules.hotelorderdetail.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: hotel_order_detail
* @Author: jeecg-boot
* @Date: 2024-10-15
* @Version: V1.0
*/
@Data
@TableName("hotel_order_detail")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hotel_order_detail对象", description="hotel_order_detail")
public class HotelOrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**订单编号*/
@Excel(name = "订单编号", width = 15)
@ApiModelProperty(value = "订单编号")
private java.lang.String orderId;
/**商品编号*/
@Excel(name = "商品编号", width = 15)
@ApiModelProperty(value = "商品编号")
private java.lang.String goodsId;
/**规格编号*/
@Excel(name = "规格编号", width = 15)
@ApiModelProperty(value = "规格编号")
private java.lang.String skuId;
/**商品名*/
@Excel(name = "商品名", width = 15)
@ApiModelProperty(value = "商品名")
private java.lang.String goodsName;
/**商品图*/
@Excel(name = "商品图", width = 15)
@ApiModelProperty(value = "商品图")
private java.lang.String pic;
/**规格*/
@Excel(name = "规格", width = 15)
@ApiModelProperty(value = "规格")
private java.lang.String sku;
/**押金*/
@Excel(name = "押金", width = 15)
@ApiModelProperty(value = "押金")
private java.math.BigDecimal deposit;
/**租金*/
@Excel(name = "租金", width = 15)
@ApiModelProperty(value = "租金")
private java.math.BigDecimal rentPay;
/**水洗费用*/
@Excel(name = "水洗费用", width = 15)
@ApiModelProperty(value = "水洗费用")
private java.math.BigDecimal washPay;
/**优惠金额*/
@Excel(name = "优惠金额", width = 15)
@ApiModelProperty(value = "优惠金额")
private java.math.BigDecimal discountPrice;
/**是否删除*/
@TableLogic
@Excel(name = "是否删除", width = 15, dicCode = "is_delete")
@Dict(dicCode = "is_delete")
@ApiModelProperty(value = "是否删除")
private java.lang.Integer delFlag;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改时间")
private java.util.Date updateTime;
private Integer num;
/**应付金额*/
private BigDecimal originalPrice;
/**实付金额*/
private BigDecimal orderPay;
/**分类id*/
private String categoryId;
private String leaseId;
/**0正常 1换货*/
private Integer status;
private String orderDetailId;
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/mapper/HotelOrderDetailMapper.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.hotelorderdetail.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: hotel_order_detail
* @Author: jeecg-boot
* @Date: 2024-10-15
* @Version: V1.0
*/
public interface HotelOrderDetailMapper extends BaseMapper<HotelOrderDetail> {
List<HotelOrderDetail> getOrderDetailList(@Param("id") String id);
}

+ 9
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/mapper/xml/HotelOrderDetailMapper.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelorderdetail.mapper.HotelOrderDetailMapper">
<select id="getOrderDetailList" resultType="org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail">
SELECT * FROM hotel_order_detail WHERE del_flag = 0 AND order_id = #{id}
</select>
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/service/IHotelOrderDetailService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.hotelorderdetail.service;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: hotel_order_detail
* @Author: jeecg-boot
* @Date: 2024-10-15
* @Version: V1.0
*/
public interface IHotelOrderDetailService extends IService<HotelOrderDetail> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/service/impl/HotelOrderDetailServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.hotelorderdetail.service.impl;
import org.jeecg.modules.hotelorderdetail.entity.HotelOrderDetail;
import org.jeecg.modules.hotelorderdetail.mapper.HotelOrderDetailMapper;
import org.jeecg.modules.hotelorderdetail.service.IHotelOrderDetailService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: hotel_order_detail
* @Author: jeecg-boot
* @Date: 2024-10-15
* @Version: V1.0
*/
@Service
public class HotelOrderDetailServiceImpl extends ServiceImpl<HotelOrderDetailMapper, HotelOrderDetail> implements IHotelOrderDetailService {
}

+ 233
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/HotelOrderDetailList.vue View File

@ -0,0 +1,233 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</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('hotel_order_detail')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-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-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="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>
<hotel-order-detail-modal ref="modalForm" @ok="modalFormOk"></hotel-order-detail-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderDetailModal from './modules/HotelOrderDetailModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HotelOrderDetailList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderDetailModal
},
data () {
return {
description: 'hotel_order_detail管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'订单编号',
align:"center",
dataIndex: 'orderId'
},
{
title:'商品编号',
align:"center",
dataIndex: 'goodsId'
},
{
title:'规格编号',
align:"center",
dataIndex: 'skuId'
},
{
title:'商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title:'商品图',
align:"center",
dataIndex: 'goodsPic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'规格',
align:"center",
dataIndex: 'sku'
},
{
title:'押金',
align:"center",
dataIndex: 'depositPrice'
},
{
title:'租金',
align:"center",
dataIndex: 'rentPrice'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPrice'
},
{
title:'优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorderdetail/hotelOrderDetail/list",
delete: "/hotelorderdetail/hotelOrderDetail/delete",
deleteBatch: "/hotelorderdetail/hotelOrderDetail/deleteBatch",
exportXlsUrl: "/hotelorderdetail/hotelOrderDetail/exportXls",
importExcelUrl: "hotelorderdetail/hotelOrderDetail/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:'orderId',text:'订单编号',dictCode:''})
fieldList.push({type:'string',value:'goodsId',text:'商品编号',dictCode:''})
fieldList.push({type:'string',value:'skuId',text:'规格编号',dictCode:''})
fieldList.push({type:'string',value:'goodsName',text:'商品名',dictCode:''})
fieldList.push({type:'string',value:'goodsPic',text:'商品图',dictCode:''})
fieldList.push({type:'string',value:'sku',text:'规格',dictCode:''})
fieldList.push({type:'BigDecimal',value:'depositPrice',text:'押金',dictCode:''})
fieldList.push({type:'BigDecimal',value:'rentPrice',text:'租金',dictCode:''})
fieldList.push({type:'BigDecimal',value:'washPrice',text:'水洗费用',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discountPrice',text:'优惠金额',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 167
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailForm.vue View File

@ -0,0 +1,167 @@
<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="orderId">
<a-input v-model="model.orderId" 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-input v-model="model.goodsId" placeholder="请输入商品编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="skuId">
<a-input v-model="model.skuId" placeholder="请输入规格编号" ></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 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="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sku">
<a-input v-model="model.sku" 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-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="rentPrice">
<a-input-number v-model="model.rentPay" placeholder="请输入租金" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="水洗费用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="washPay">
<a-input-number v-model="model.washPay" placeholder="请输入水洗费用" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="优惠金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discountPrice">
<a-input-number v-model="model.discountPrice" placeholder="请输入优惠金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" 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: 'HotelOrderDetailForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
depositPrice: [
{ required: true, message: '请输入押金!'},
],
rentPrice: [
{ required: true, message: '请输入租金!'},
],
washPrice: [
{ required: true, message: '请输入水洗费用!'},
],
discountPrice: [
{ required: true, message: '请输入优惠金额!'},
],
},
url: {
add: "/hotelorderdetail/hotelOrderDetail/add",
edit: "/hotelorderdetail/hotelOrderDetail/edit",
queryById: "/hotelorderdetail/hotelOrderDetail/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>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-order-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-order-detail-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 HotelOrderDetailForm from './HotelOrderDetailForm'
export default {
name: 'HotelOrderDetailModal',
components: {
HotelOrderDetailForm
},
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
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue/modules/HotelOrderDetailModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-order-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-order-detail-form>
</j-modal>
</template>
<script>
import HotelOrderDetailForm from './HotelOrderDetailForm'
export default {
name: 'HotelOrderDetailModal',
components: {
HotelOrderDetailForm
},
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>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetail.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hotelorderdetail/hotelOrderDetail/list',
save='/hotelorderdetail/hotelOrderDetail/add',
edit='/hotelorderdetail/hotelOrderDetail/edit',
deleteOne = '/hotelorderdetail/hotelOrderDetail/delete',
deleteBatch = '/hotelorderdetail/hotelOrderDetail/deleteBatch',
importExcel = '/hotelorderdetail/hotelOrderDetail/importExcel',
exportXls = '/hotelorderdetail/hotelOrderDetail/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 149
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetail.data.ts View File

@ -0,0 +1,149 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '订单编号',
align:"center",
dataIndex: 'orderId'
},
{
title: '商品编号',
align:"center",
dataIndex: 'goodsId'
},
{
title: '规格编号',
align:"center",
dataIndex: 'skuId'
},
{
title: '商品名',
align:"center",
dataIndex: 'goodsName'
},
{
title: '商品图',
align:"center",
dataIndex: 'goodsPic',
customRender:render.renderAvatar,
},
{
title: '规格',
align:"center",
dataIndex: 'sku'
},
{
title: '押金',
align:"center",
dataIndex: 'depositPrice'
},
{
title: '租金',
align:"center",
dataIndex: 'rentPrice'
},
{
title: '水洗费用',
align:"center",
dataIndex: 'washPrice'
},
{
title: '优惠金额',
align:"center",
dataIndex: 'discountPrice'
},
{
title: '是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '订单编号',
field: 'orderId',
component: 'Input',
},
{
label: '商品编号',
field: 'goodsId',
component: 'Input',
},
{
label: '规格编号',
field: 'skuId',
component: 'Input',
},
{
label: '商品名',
field: 'goodsName',
component: 'Input',
},
{
label: '商品图',
field: 'goodsPic',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '规格',
field: 'sku',
component: 'Input',
},
{
label: '押金',
field: 'depositPrice',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入押金!'},
];
},
},
{
label: '租金',
field: 'rentPrice',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入租金!'},
];
},
},
{
label: '水洗费用',
field: 'washPrice',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入水洗费用!'},
];
},
},
{
label: '优惠金额',
field: 'discountPrice',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入优惠金额!'},
];
},
},
{
label: '是否删除',
field: 'delFlag',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_delete"
},
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/HotelOrderDetailList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HotelOrderDetailModal @register="registerModal" @success="handleSuccess"></HotelOrderDetailModal>
</div>
</template>
<script lang="ts" name="hotelorderdetail-hotelOrderDetail" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HotelOrderDetailModal from './components/HotelOrderDetailModal.vue'
import {columns, searchFormSchema} from './hotelOrderDetail.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelOrderDetail.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: 'hotel_order_detail',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"hotel_order_detail",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderdetail/vue3/components/HotelOrderDetailModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hotelOrderDetail.data';
import {saveOrUpdate} from '../hotelOrderDetail.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 1
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/entity/HotelOrderFlow.java View File

@ -44,6 +44,7 @@ public class HotelOrderFlow implements Serializable {
@ApiModelProperty(value = "value")
private java.lang.Integer value;
/**订单类型*/
@Dict(dicCode = "hotel_order_type")
@Excel(name = "订单类型", width = 15)
@ApiModelProperty(value = "订单类型")
private java.lang.Integer pid;


+ 2
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/mapper/HotelOrderFlowMapper.java View File

@ -14,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface HotelOrderFlowMapper extends BaseMapper<HotelOrderFlow> {
List<HotelOrderFlow> getOrderFlowList(@Param("type") Integer type);
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderflow/mapper/xml/HotelOrderFlowMapper.xml View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelorderflow.mapper.HotelOrderFlowMapper">
<select id="getOrderFlowList" resultType="org.jeecg.modules.hotelorderflow.entity.HotelOrderFlow">
SELECT * FROM hotel_order_flow WHERE del_flag = 0 AND pid = #{type} ORDER BY sort ASC
</select>
</mapper>

+ 18
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/entity/HotelOrderLog.java View File

@ -4,12 +4,13 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import org.jeecg.modules.hotelorderflow.entity.HotelOrderFlow;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
@ -62,4 +63,17 @@ public class HotelOrderLog implements Serializable {
private java.util.Date updateTime;
/**购买人*/
private String userId;
/**优惠后的支付金额*/
private BigDecimal discountOrderPay;
/**类型 0租赁 1水洗 2破损 3退货*/
@Dict(dicCode = "hotel_order_type")
@Excel(name = "类型 0租赁 1水洗 2破损 3退货", width = 15)
@ApiModelProperty(value = "类型 0租赁 1水洗 2破损 3退货")
private Integer type;
private String shopId;
@TableField(exist = false)
private List<HotelOrder> details;
@TableField(exist = false)
private List<HotelOrderFlow> hotelOrderFlows;
private String payInfo;
}

+ 7
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/mapper/HotelOrderLogMapper.java View File

@ -2,7 +2,10 @@ package org.jeecg.modules.hotelorderlog.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +17,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface HotelOrderLogMapper extends BaseMapper<HotelOrderLog> {
IPage<HotelOrderLog> getOrderLogPage(Page<HotelOrderLog> page,@Param("userId") String userId,@Param("type") Integer type,@Param("uid") String uid);
HotelOrderLog getOrderLogOne(@Param("userId") String userId,@Param("id") String id);
}

+ 68
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/mapper/xml/HotelOrderLogMapper.xml View File

@ -1,5 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelorderlog.mapper.HotelOrderLogMapper">
<resultMap id="orderLogPageResp" type="org.jeecg.modules.hotelorderlog.entity.HotelOrderLog">
<id property="id" column="id" />
<result property="orderPay" column="order_pay" />
<result property="isPay" column="is_pay" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="userId" column="user_id" />
<result property="discountOrderPay" column="discount_order_pay" />
<result property="type" column="type" />
<result property="shopId" column="shop_id" />
<collection property="details" ofType="org.jeecg.modules.hotelorder.entity.HotelOrder"
column="id"
select="org.jeecg.modules.hotelorder.mapper.HotelOrderMapper.getOrderPage">
</collection>
</resultMap>
<resultMap id="orderLogOneResp" type="org.jeecg.modules.hotelorderlog.entity.HotelOrderLog">
<id property="id" column="id" />
<result property="orderPay" column="order_pay" />
<result property="isPay" column="is_pay" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="userId" column="user_id" />
<result property="discountOrderPay" column="discount_order_pay" />
<result property="type" column="type" />
<result property="shopId" column="shop_id" />
<collection property="details" ofType="org.jeecg.modules.hotelorder.entity.HotelOrder"
column="id"
select="org.jeecg.modules.hotelorder.mapper.HotelOrderMapper.getOrderPage">
</collection>
<collection property="hotelOrderFlows" ofType="org.jeecg.modules.hotelorderflow.entity.HotelOrderFlow"
column="type"
select="org.jeecg.modules.hotelorderflow.mapper.HotelOrderFlowMapper.getOrderFlowList">
</collection>
</resultMap>
<select id="getOrderLogPage" resultMap="orderLogPageResp">
select a.* from hotel_order_log a where del_flag = 0
<if test="type != null">
AND a.type = #{type}
</if>
<if test="uid == null">
AND (a.user_id = #{userId} or a.shop_id = #{userId})
</if>
<if test="uid != null">
AND a.user_id = #{uid}
</if>
order by a.create_time desc
</select>
<select id="getOrderLogOne" resultMap="orderLogOneResp">
SELECT * FROM hotel_order_log where del_flag = 0
<if test="userId != null">
AND user_id = #{userId}
</if>
<if test="id != null">
AND id = #{id}
</if>
</select>
</mapper>

+ 6
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/service/IHotelOrderLogService.java View File

@ -1,5 +1,8 @@
package org.jeecg.modules.hotelorderlog.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
import com.baomidou.mybatisplus.extension.service.IService;
@ -11,4 +14,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IHotelOrderLogService extends IService<HotelOrderLog> {
IPage<HotelOrderLog> getOrderLogPage(Page<HotelOrderLog> page, String userId, Integer type,String uid);
HotelOrderLog getOrderLogOne(String userId,String id);
}

+ 11
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorderlog/service/impl/HotelOrderLogServiceImpl.java View File

@ -1,5 +1,7 @@
package org.jeecg.modules.hotelorderlog.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.hotelorderlog.entity.HotelOrderLog;
import org.jeecg.modules.hotelorderlog.mapper.HotelOrderLogMapper;
import org.jeecg.modules.hotelorderlog.service.IHotelOrderLogService;
@ -16,4 +18,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class HotelOrderLogServiceImpl extends ServiceImpl<HotelOrderLogMapper, HotelOrderLog> implements IHotelOrderLogService {
@Override
public IPage<HotelOrderLog> getOrderLogPage(Page<HotelOrderLog> page, String userId, Integer type,String uid) {
return baseMapper.getOrderLogPage(page, userId, type,uid);
}
@Override
public HotelOrderLog getOrderLogOne(String userId, String id) {
return baseMapper.getOrderLogOne(userId, id);
}
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoppingcat/mapper/xml/HotelShoppingCatMapper.xml View File

@ -3,7 +3,7 @@
<mapper namespace="org.jeecg.modules.hotelshoppingcat.mapper.HotelShoppingCatMapper">
<select id="getShoppingCartPage" resultType="org.jeecg.modules.hotelshoppingcat.resp.ShoppingCartPageResp">
select a.id,b.name,b.pic,c.title,c.price,c.deposit_price,c.original_price,a.num,a.sku_id,a.goods_id
select a.id,b.name,b.pic,c.title,c.price, (select `value` from hotel_conf where name = 'depositPrice' and del_flag = 0) deposit_price,c.original_price,a.num,a.sku_id,a.goods_id
from hotel_shopping_cat a left join hotel_goods b on a.goods_id = b.id
left join hotel_goods_sku c on a.sku_id = c.id
where a.del_flag = 0 and a.user_id = #{userId} order by a.create_time desc


BIN
jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.2.0.jar View File


+ 7
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/controller/ConfController.java View File

@ -1,6 +1,7 @@
package org.jeecg.modules.xcx.conf.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.xcx.conf.service.IConfService;
@ -19,9 +20,15 @@ public class ConfController {
@Resource
private IConfService confService;
@ApiOperation(value = "客服")
@GetMapping("/customer")
public Result<?> getCustomer(){
return confService.getCustomer();
}
@ApiOperation(value = "优惠活动")
@GetMapping("/coupon")
public Result<?> getCoupon(){
return confService.getCoupon();
}
}

+ 6
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/service/IConfService.java View File

@ -10,4 +10,10 @@ public interface IConfService {
*/
Result<?> getCustomer();
/**
* 获取优惠活动
* @return
*/
Result<?> getCoupon();
}

+ 15
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/conf/service/impl/ConfServiceImpl.java View File

@ -7,6 +7,9 @@ import org.jeecg.modules.xcx.conf.service.IConfService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
@Service
public class ConfServiceImpl implements IConfService {
@ -22,4 +25,16 @@ public class ConfServiceImpl implements IConfService {
.one();
return Result.OK(customerService.getValue());
}
@Override
public Result<?> getCoupon() {
Map<String, Object> map = new HashMap<>();
Integer couponFlag = Integer.parseInt(hotelConfService.getConf("couponFlag"));
BigDecimal couponPrice = new BigDecimal(hotelConfService.getConf("couponPrice"));
BigDecimal couponCondition = new BigDecimal(hotelConfService.getConf("couponCondition"));
map.put("couponFlag",couponFlag);
map.put("couponPrice",couponPrice);
map.put("couponCondition",couponCondition);
return Result.OK(map);
}
}

+ 21
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/controller/CouponController.java View File

@ -1,13 +1,34 @@
package org.jeecg.modules.xcx.coupon.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.TokenUtils;
import org.jeecg.modules.xcx.coupon.req.CouponPageReq;
import org.jeecg.modules.xcx.coupon.service.ICouponService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@Api(tags = "优惠券接口")
@Slf4j
@RestController
@RequestMapping("/coupon")
public class CouponController {
@Resource
private ICouponService couponService;
@ApiOperation(value = "优惠券分页接口")
@GetMapping("/page")
public Result<?> couponPage(HttpServletRequest request , CouponPageReq couponPageReq){
couponPageReq.setToken(TokenUtils.getTokenByRequest(request));
return couponService.couponPage(couponPageReq);
}
}

+ 1
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/req/JoinShoppingCartReq.java View File

@ -13,7 +13,7 @@ public class JoinShoppingCartReq {
private String skuId;
private String token;
@ApiModelProperty(value = "数量")
private Integer num = 1;
private Integer num;
}

+ 4
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/service/impl/GoodsServiceImpl.java View File

@ -101,6 +101,9 @@ public class GoodsServiceImpl implements IGoodsService {
@Override
public Result<?> joinShoppingCart(JoinShoppingCartReq joinShoppingCartReq) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(joinShoppingCartReq.getToken());
if(joinShoppingCartReq.getNum() == null || joinShoppingCartReq.getNum() == 0){
joinShoppingCartReq.setNum(1);
}
HotelGoods hotelGoods = hotelGoodsService.lambdaQuery()
.eq(HotelGoods::getDelFlag, 0)
.eq(HotelGoods::getUpFlag, 1)
@ -137,7 +140,7 @@ public class GoodsServiceImpl implements IGoodsService {
}else{
hotelShoppingCat.setId(hotelShoppingCat1.getId());
hotelShoppingCat.setNum(hotelShoppingCat1.getNum() + joinShoppingCartReq.getNum());
hotelShoppingCatService.updateById(hotelShoppingCat1);
hotelShoppingCatService.updateById(hotelShoppingCat);
}


+ 20
- 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java View File

@ -30,13 +30,13 @@ public class OrderController {
@GetMapping("/page")
public Result<?> orderPage(HttpServletRequest request,OrderPageReq orderPageReq){
orderPageReq.setToken(TokenUtils.getTokenByRequest(request));
return orderService.orderPage(orderPageReq);
return orderService.orderPage3(orderPageReq);
}
@ApiOperation(value = "详情", notes = "详情")
@GetMapping("/one")
public Result<?> orderDetail(HttpServletRequest request,String id){
return orderService.orderDetail(id,TokenUtils.getTokenByRequest(request));
return orderService.orderDetail3(id,TokenUtils.getTokenByRequest(request));
}
@ApiOperation(value = "退货、换货申请")
@ -50,20 +50,20 @@ public class OrderController {
@ApiOperation(value = "下订单")
@PostMapping("/create")
public Result<?> createOrder(HttpServletRequest request, @RequestParam String req){
return orderService.createOrder(req,TokenUtils.getTokenByRequest(request));
return orderService.createOrder2(req,TokenUtils.getTokenByRequest(request));
}
@ApiOperation(value = "订单支付")
@PostMapping("/pay")
public Result<?> orderPay(HttpServletRequest request,OrderPayReq orderPayReq){
orderPayReq.setToken(TokenUtils.getTokenByRequest(request));
return orderService.orderPay(orderPayReq);
return orderService.orderPay2(orderPayReq);
}
@PostMapping("/notify")
public Object orderNotify(@RequestBody String requestBody){
return orderService.orderNotify(requestBody);
return orderService.orderNotify2(requestBody);
}
@ -98,8 +98,22 @@ public class OrderController {
@PostMapping("/replace/notify")
public Object replaceOrderNotify(String requestBody){
public Object replaceOrderNotify(@RequestBody String requestBody){
return orderService.replaceOrderNotify(requestBody);
}
@ApiOperation(value = "换货发货")
@PostMapping("/send/logistics")
public Result<?> sendLogistics(HttpServletRequest request,SendLogisticsReq sendLogisticsReq){
sendLogisticsReq.setToken(TokenUtils.getTokenByRequest(request));
return orderService.sendLogistics(sendLogisticsReq);
}
@ApiOperation(value = "订单详情列表")
@GetMapping("/detail/list")
public Result<?> getOrderDetails(String id){
return orderService.getOrderDetails(id);
}
}

+ 2
- 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ConfirmAcceptOrderReq.java View File

@ -14,9 +14,6 @@ public class ConfirmAcceptOrderReq {
/**0确认接单 1确认正常 2破损上报*/
@ApiModelProperty(value = "0确认接单 1确认正常 2破损上报")
private Integer flag = 0;
/**商品id*/
@ApiModelProperty(value = "商品id")
private String goodsId;
/**退货数量*/
@ApiModelProperty(value = "退货数量")
private Integer num;
@ -26,6 +23,8 @@ public class ConfirmAcceptOrderReq {
/**图片、视频*/
@ApiModelProperty(value = "图片、视频")
private String pic;
@ApiModelProperty(value = "订单详情Id")
private String orderDetailId;
}

+ 2
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPayReq.java View File

@ -10,6 +10,8 @@ public class OrderPayReq {
private String id;
@ApiModelProperty(value = "优惠券id")
private String couponId;
@ApiModelProperty(value = "订单id")
private String orderId;
private String token;
}

+ 19
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/SendLogisticsReq.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.xcx.order.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class SendLogisticsReq {
private String token;
/**物流名称*/
@ApiModelProperty(value = "物流名称")
private String logisticsName;
/**物流单号*/
@ApiModelProperty(value = "物流单号")
private String logisticsCode;
/**订单id*/
private String id;
}

+ 44
- 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java View File

@ -17,6 +17,10 @@ public interface IOrderService {
*/
Result<?> orderPage(OrderPageReq orderPageReq);
Result<?> orderPage2(OrderPageReq orderPageReq);
Result<?> orderPage3(OrderPageReq orderPageReq);
/**
* 订单详情
* @param id
@ -25,6 +29,10 @@ public interface IOrderService {
*/
Result<?> orderDetail(String id,String token);
Result<?> orderDetail2(String id,String token);
Result<?> orderDetail3(String id,String token);
/**
* 创建订单
* @param req
@ -32,21 +40,21 @@ public interface IOrderService {
*/
Result<?> createOrder(String req, String token);
Result<?> createOrder2(String req, String token);
/**
* 申请退货/换货
* @param applyRefundOrderReq
* 支付
* @param orderPayReq
* @return
*/
Result<?> applyRefundOrder(ApplyRefundOrderReq applyRefundOrderReq);
Result<?> orderPay(OrderPayReq orderPayReq);
/**
* 支付
* @param orderPayReq
* @return
*/
Result<?> orderPay(OrderPayReq orderPayReq);
Result<?> orderPay2(OrderPayReq orderPayReq);
/**
* 支付回调
@ -55,6 +63,23 @@ public interface IOrderService {
*/
Object orderNotify(String requestBody);
/**
* 支付回调
* @param requestBody
* @return
*/
Object orderNotify2(String requestBody);
/**
* 申请退货/换货
* @param applyRefundOrderReq
* @return
*/
Result<?> applyRefundOrder(ApplyRefundOrderReq applyRefundOrderReq);
/**
* 确认收货
* @param confirmOrderReq
@ -97,4 +122,18 @@ public interface IOrderService {
* @return
*/
Object replaceOrderNotify(String requestBody);
/**
* 换货发货
* @param sendLogisticsReq
* @return
*/
Result<?> sendLogistics(SendLogisticsReq sendLogisticsReq);
/**
* 订单详情列表
* @param id 订单id
* @return
*/
Result<?> getOrderDetails(String id);
}

+ 1172
- 269
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java
File diff suppressed because it is too large
View File


Loading…
Cancel
Save