| @ -0,0 +1,221 @@ | |||
| <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_coupon')">导出</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-coupon-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelCouponModal from './modules/HotelCouponModal' | |||
| import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
| export default { | |||
| name: 'HotelCouponList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelCouponModal | |||
| }, | |||
| data () { | |||
| return { | |||
| description: 'hotel_coupon管理页面', | |||
| // 表头 | |||
| columns: [ | |||
| { | |||
| title: '#', | |||
| dataIndex: '', | |||
| key:'rowIndex', | |||
| width:60, | |||
| align:"center", | |||
| customRender:function (t,r,index) { | |||
| return parseInt(index)+1; | |||
| } | |||
| }, | |||
| { | |||
| title:'优惠券名', | |||
| align:"center", | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title:'图片', | |||
| align:"center", | |||
| dataIndex: 'pic', | |||
| scopedSlots: {customRender: 'imgSlot'} | |||
| }, | |||
| { | |||
| title:'券额', | |||
| align:"center", | |||
| dataIndex: 'price' | |||
| }, | |||
| { | |||
| title:'满多少金额', | |||
| align:"center", | |||
| dataIndex: 'conditionPrice' | |||
| }, | |||
| { | |||
| title:'说明', | |||
| align:"center", | |||
| dataIndex: 'info', | |||
| scopedSlots: {customRender: 'htmlSlot'} | |||
| }, | |||
| { | |||
| title:'优惠券结束时间', | |||
| align:"center", | |||
| dataIndex: 'endTime' | |||
| }, | |||
| { | |||
| title:'类型', | |||
| align:"center", | |||
| dataIndex: 'type_dictText' | |||
| }, | |||
| { | |||
| title:'使用类型', | |||
| align:"center", | |||
| dataIndex: 'useType_dictText' | |||
| }, | |||
| { | |||
| title:'是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'action', | |||
| align:"center", | |||
| fixed:"right", | |||
| width:147, | |||
| scopedSlots: { customRender: 'action' } | |||
| } | |||
| ], | |||
| url: { | |||
| list: "/hotelcoupon/hotelCoupon/list", | |||
| delete: "/hotelcoupon/hotelCoupon/delete", | |||
| deleteBatch: "/hotelcoupon/hotelCoupon/deleteBatch", | |||
| exportXlsUrl: "/hotelcoupon/hotelCoupon/exportXls", | |||
| importExcelUrl: "hotelcoupon/hotelCoupon/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:'name',text:'优惠券名',dictCode:''}) | |||
| fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满多少金额',dictCode:''}) | |||
| fieldList.push({type:'string',value:'info',text:'说明',dictCode:''}) | |||
| fieldList.push({type:'datetime',value:'endTime',text:'优惠券结束时间'}) | |||
| fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次',dictCode:'coupon_type'}) | |||
| fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'}) | |||
| this.superFieldList = fieldList | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,254 @@ | |||
| <template> | |||
| <a-card :bordered="false"> | |||
| <!-- 查询区域 --> | |||
| <div class="table-page-search-wrapper"> | |||
| <a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
| <a-row :gutter="24"> | |||
| </a-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-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-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelOrderModal from './modules/HotelOrderModal' | |||
| export default { | |||
| name: 'RefundOrderList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelOrderModal | |||
| }, | |||
| 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: '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/refund/list", | |||
| delete: "/hotelorder/hotelOrder/delete", | |||
| deleteBatch: "/hotelorder/hotelOrder/deleteBatch", | |||
| exportXlsUrl: "/hotelorder/hotelOrder/exportXls", | |||
| importExcelUrl: "hotelorder/hotelOrder/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:'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 | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,254 @@ | |||
| <template> | |||
| <a-card :bordered="false"> | |||
| <!-- 查询区域 --> | |||
| <div class="table-page-search-wrapper"> | |||
| <a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
| <a-row :gutter="24"> | |||
| </a-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-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-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelOrderModal from './modules/HotelOrderModal' | |||
| export default { | |||
| name: 'ReplaceOrderList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelOrderModal | |||
| }, | |||
| 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: '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/replace/list", | |||
| delete: "/hotelorder/hotelOrder/delete", | |||
| deleteBatch: "/hotelorder/hotelOrder/deleteBatch", | |||
| exportXlsUrl: "/hotelorder/hotelOrder/exportXls", | |||
| importExcelUrl: "hotelorder/hotelOrder/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:'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 | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,285 @@ | |||
| <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-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-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> | |||
| <wash-order-modal ref="modalForm2" @ok="modalFormOk"></wash-order-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelOrderModal from './modules/HotelOrderModal' | |||
| import WashOrderModal from './modules/WashOrderModal' | |||
| import {httpAction} from "@api/manage"; | |||
| export default { | |||
| name: 'WashOrderList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelOrderModal, | |||
| WashOrderModal | |||
| }, | |||
| 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: '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/wash/list", | |||
| delete: "/hotelorder/hotelOrder/delete", | |||
| deleteBatch: "/hotelorder/hotelOrder/deleteBatch", | |||
| exportXlsUrl: "/hotelorder/hotelOrder/exportXls", | |||
| importExcelUrl: "hotelorder/hotelOrder/importExcel", | |||
| damageAuditUrl: "/hotelorder/hotelOrder/damage/audit" | |||
| }, | |||
| 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:'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 | |||
| }, | |||
| handleAudit(e,obj){ | |||
| obj.audit = e; | |||
| this.$refs.modalForm2.audit(obj); | |||
| this.$refs.modalForm2.title = "审核"; | |||
| this.$refs.modalForm2.disableSubmit = false; | |||
| console.log(obj) | |||
| }, | |||
| handleAudit2(e,obj){ | |||
| obj.audit = e; | |||
| httpAction(this.url.damageAuditUrl,obj,'post').then((res)=>{ | |||
| if(res.success){ | |||
| this.$message.success(res.message); | |||
| this.$emit('ok'); | |||
| }else{ | |||
| this.$message.warning(res.message); | |||
| } | |||
| }).finally(() => { | |||
| this.loadData(); | |||
| }) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,149 @@ | |||
| <template> | |||
| <a-spin :spinning="confirmLoading"> | |||
| <j-form-container :disabled="formDisabled"> | |||
| <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
| <a-row> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> | |||
| <a-input v-model="model.name" placeholder="请输入优惠券名" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="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="price"> | |||
| <a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="满多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice"> | |||
| <a-input-number v-model="model.conditionPrice" placeholder="请输入满多少金额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="info"> | |||
| <j-editor v-model="model.info" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="优惠券结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> | |||
| <j-date placeholder="请选择优惠券结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |||
| <j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="使用类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useType"> | |||
| <j-dict-select-tag type="list" v-model="model.useType" dictCode="coupon_use_type" placeholder="请选择使用类型" /> | |||
| </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: 'HotelCouponForm', | |||
| components: { | |||
| }, | |||
| props: { | |||
| //表单禁用 | |||
| disabled: { | |||
| type: Boolean, | |||
| default: false, | |||
| required: false | |||
| } | |||
| }, | |||
| data () { | |||
| return { | |||
| model:{ | |||
| type:0, | |||
| delFlag:0, | |||
| }, | |||
| labelCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 5 }, | |||
| }, | |||
| wrapperCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 16 }, | |||
| }, | |||
| confirmLoading: false, | |||
| validatorRules: { | |||
| delFlag: [ | |||
| { required: true, message: '请输入是否删除!'}, | |||
| ], | |||
| }, | |||
| url: { | |||
| add: "/hotelcoupon/hotelCoupon/add", | |||
| edit: "/hotelcoupon/hotelCoupon/edit", | |||
| queryById: "/hotelcoupon/hotelCoupon/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> | |||
| @ -0,0 +1,84 @@ | |||
| <template> | |||
| <a-drawer | |||
| :title="title" | |||
| :width="width" | |||
| placement="right" | |||
| :closable="false" | |||
| @close="close" | |||
| destroyOnClose | |||
| :visible="visible"> | |||
| <hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-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 HotelCouponForm from './HotelCouponForm' | |||
| export default { | |||
| name: 'HotelCouponModal', | |||
| components: { | |||
| HotelCouponForm | |||
| }, | |||
| 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> | |||
| @ -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-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-form> | |||
| </j-modal> | |||
| </template> | |||
| <script> | |||
| import HotelCouponForm from './HotelCouponForm' | |||
| export default { | |||
| name: 'HotelCouponModal', | |||
| components: { | |||
| HotelCouponForm | |||
| }, | |||
| 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> | |||
| @ -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="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-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: 'WashOrderForm', | |||
| 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", | |||
| audit: "/hotelorder/hotelOrder/damage/audit" | |||
| } | |||
| } | |||
| }, | |||
| 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.audit,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> | |||
| @ -0,0 +1,84 @@ | |||
| <template> | |||
| <a-drawer | |||
| :title="title" | |||
| :width="width" | |||
| placement="right" | |||
| :closable="false" | |||
| @close="close" | |||
| destroyOnClose | |||
| :visible="visible"> | |||
| <hotel-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-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 HotelOrderForm from './WashOrderForm' | |||
| export default { | |||
| name: 'WashOrderModal', | |||
| components: { | |||
| HotelOrderForm | |||
| }, | |||
| 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> | |||
| @ -0,0 +1,66 @@ | |||
| <template> | |||
| <j-modal | |||
| :title="title" | |||
| :width="width" | |||
| :visible="visible" | |||
| switchFullscreen | |||
| @ok="handleOk" | |||
| :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
| @cancel="handleCancel" | |||
| cancelText="关闭"> | |||
| <wash-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></wash-order-form> | |||
| </j-modal> | |||
| </template> | |||
| <script> | |||
| import WashOrderForm from './WashOrderForm' | |||
| export default { | |||
| name: 'WashOrderModal', | |||
| components: { | |||
| WashOrderForm | |||
| }, | |||
| 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.audit(record); | |||
| }) | |||
| }, | |||
| close () { | |||
| this.$emit('close'); | |||
| this.visible = false; | |||
| }, | |||
| handleOk () { | |||
| this.$refs.realForm.submitForm(); | |||
| }, | |||
| submitCallback(){ | |||
| this.$emit('ok'); | |||
| this.visible = false; | |||
| }, | |||
| handleCancel () { | |||
| this.close() | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| @ -0,0 +1,171 @@ | |||
| package org.jeecg.modules.hotelcoupon.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.hotelcoupon.entity.HotelCoupon; | |||
| import org.jeecg.modules.hotelcoupon.service.IHotelCouponService; | |||
| 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_coupon | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Api(tags="hotel_coupon") | |||
| @RestController | |||
| @RequestMapping("/hotelcoupon/hotelCoupon") | |||
| @Slf4j | |||
| public class HotelCouponController extends JeecgController<HotelCoupon, IHotelCouponService> { | |||
| @Autowired | |||
| private IHotelCouponService hotelCouponService; | |||
| /** | |||
| * 分页列表查询 | |||
| * | |||
| * @param hotelCoupon | |||
| * @param pageNo | |||
| * @param pageSize | |||
| * @param req | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_coupon-分页列表查询") | |||
| @ApiOperation(value="hotel_coupon-分页列表查询", notes="hotel_coupon-分页列表查询") | |||
| @GetMapping(value = "/list") | |||
| public Result<IPage<HotelCoupon>> queryPageList(HotelCoupon hotelCoupon, | |||
| @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
| @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
| HttpServletRequest req) { | |||
| QueryWrapper<HotelCoupon> queryWrapper = QueryGenerator.initQueryWrapper(hotelCoupon, req.getParameterMap()); | |||
| Page<HotelCoupon> page = new Page<HotelCoupon>(pageNo, pageSize); | |||
| IPage<HotelCoupon> pageList = hotelCouponService.page(page, queryWrapper); | |||
| return Result.OK(pageList); | |||
| } | |||
| /** | |||
| * 添加 | |||
| * | |||
| * @param hotelCoupon | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon-添加") | |||
| @ApiOperation(value="hotel_coupon-添加", notes="hotel_coupon-添加") | |||
| @PostMapping(value = "/add") | |||
| public Result<String> add(@RequestBody HotelCoupon hotelCoupon) { | |||
| hotelCouponService.save(hotelCoupon); | |||
| return Result.OK("添加成功!"); | |||
| } | |||
| /** | |||
| * 编辑 | |||
| * | |||
| * @param hotelCoupon | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon-编辑") | |||
| @ApiOperation(value="hotel_coupon-编辑", notes="hotel_coupon-编辑") | |||
| @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
| public Result<String> edit(@RequestBody HotelCoupon hotelCoupon) { | |||
| hotelCouponService.updateById(hotelCoupon); | |||
| return Result.OK("编辑成功!"); | |||
| } | |||
| /** | |||
| * 通过id删除 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon-通过id删除") | |||
| @ApiOperation(value="hotel_coupon-通过id删除", notes="hotel_coupon-通过id删除") | |||
| @DeleteMapping(value = "/delete") | |||
| public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
| hotelCouponService.removeById(id); | |||
| return Result.OK("删除成功!"); | |||
| } | |||
| /** | |||
| * 批量删除 | |||
| * | |||
| * @param ids | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon-批量删除") | |||
| @ApiOperation(value="hotel_coupon-批量删除", notes="hotel_coupon-批量删除") | |||
| @DeleteMapping(value = "/deleteBatch") | |||
| public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
| this.hotelCouponService.removeByIds(Arrays.asList(ids.split(","))); | |||
| return Result.OK("批量删除成功!"); | |||
| } | |||
| /** | |||
| * 通过id查询 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_coupon-通过id查询") | |||
| @ApiOperation(value="hotel_coupon-通过id查询", notes="hotel_coupon-通过id查询") | |||
| @GetMapping(value = "/queryById") | |||
| public Result<HotelCoupon> queryById(@RequestParam(name="id",required=true) String id) { | |||
| HotelCoupon hotelCoupon = hotelCouponService.getById(id); | |||
| if(hotelCoupon==null) { | |||
| return Result.error("未找到对应数据"); | |||
| } | |||
| return Result.OK(hotelCoupon); | |||
| } | |||
| /** | |||
| * 导出excel | |||
| * | |||
| * @param request | |||
| * @param hotelCoupon | |||
| */ | |||
| @RequestMapping(value = "/exportXls") | |||
| public ModelAndView exportXls(HttpServletRequest request, HotelCoupon hotelCoupon) { | |||
| return super.exportXls(request, hotelCoupon, HotelCoupon.class, "hotel_coupon"); | |||
| } | |||
| /** | |||
| * 通过excel导入数据 | |||
| * | |||
| * @param request | |||
| * @param response | |||
| * @return | |||
| */ | |||
| @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
| public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
| return super.importExcel(request, response, HotelCoupon.class); | |||
| } | |||
| } | |||
| @ -0,0 +1,87 @@ | |||
| package org.jeecg.modules.hotelcoupon.entity; | |||
| 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.TableName; | |||
| 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_coupon | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Data | |||
| @TableName("hotel_coupon") | |||
| @Accessors(chain = true) | |||
| @EqualsAndHashCode(callSuper = false) | |||
| @ApiModel(value="hotel_coupon对象", description="hotel_coupon") | |||
| public class HotelCoupon 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 name; | |||
| /**图片*/ | |||
| @Excel(name = "图片", width = 15) | |||
| @ApiModelProperty(value = "图片") | |||
| private java.lang.String pic; | |||
| /**券额*/ | |||
| @Excel(name = "券额", width = 15) | |||
| @ApiModelProperty(value = "券额") | |||
| private java.math.BigDecimal price; | |||
| /**满多少金额*/ | |||
| @Excel(name = "满多少金额", width = 15) | |||
| @ApiModelProperty(value = "满多少金额") | |||
| private java.math.BigDecimal conditionPrice; | |||
| /**说明*/ | |||
| @Excel(name = "说明", width = 15) | |||
| @ApiModelProperty(value = "说明") | |||
| private java.lang.String info; | |||
| /**优惠券结束时间*/ | |||
| @Excel(name = "优惠券结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | |||
| @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 endTime; | |||
| /**类型 0指定时间 1单次*/ | |||
| @Excel(name = "类型 0指定时间 1单次", width = 15, dicCode = "coupon_type") | |||
| @Dict(dicCode = "coupon_type") | |||
| @ApiModelProperty(value = "类型 0指定时间 1单次") | |||
| private java.lang.Integer type; | |||
| /**是否删除*/ | |||
| @Excel(name = "是否删除", width = 15, dicCode = "is_delete") | |||
| @Dict(dicCode = "is_delete") | |||
| @ApiModelProperty(value = "是否删除") | |||
| private java.lang.Integer delFlag; | |||
| /**createTime*/ | |||
| @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
| @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
| @ApiModelProperty(value = "createTime") | |||
| private java.util.Date createTime; | |||
| /**updateTime*/ | |||
| @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
| @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
| @ApiModelProperty(value = "updateTime") | |||
| private java.util.Date updateTime; | |||
| /**使用类型 0押金 1租金 2水洗*/ | |||
| @Dict(dicCode = "coupon_use_type") | |||
| private Integer useType; | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package org.jeecg.modules.hotelcoupon.mapper; | |||
| import java.util.List; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import org.jeecg.modules.hotelcoupon.entity.HotelCoupon; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @Description: hotel_coupon | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface HotelCouponMapper extends BaseMapper<HotelCoupon> { | |||
| } | |||
| @ -0,0 +1,5 @@ | |||
| <?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.hotelcoupon.mapper.HotelCouponMapper"> | |||
| </mapper> | |||
| @ -0,0 +1,14 @@ | |||
| package org.jeecg.modules.hotelcoupon.service; | |||
| import org.jeecg.modules.hotelcoupon.entity.HotelCoupon; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @Description: hotel_coupon | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface IHotelCouponService extends IService<HotelCoupon> { | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| package org.jeecg.modules.hotelcoupon.service.impl; | |||
| import org.jeecg.modules.hotelcoupon.entity.HotelCoupon; | |||
| import org.jeecg.modules.hotelcoupon.mapper.HotelCouponMapper; | |||
| import org.jeecg.modules.hotelcoupon.service.IHotelCouponService; | |||
| import org.springframework.stereotype.Service; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| /** | |||
| * @Description: hotel_coupon | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Service | |||
| public class HotelCouponServiceImpl extends ServiceImpl<HotelCouponMapper, HotelCoupon> implements IHotelCouponService { | |||
| } | |||
| @ -0,0 +1,216 @@ | |||
| <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_coupon')">导出</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-coupon-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelCouponModal from './modules/HotelCouponModal' | |||
| import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
| export default { | |||
| name: 'HotelCouponList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelCouponModal | |||
| }, | |||
| data () { | |||
| return { | |||
| description: 'hotel_coupon管理页面', | |||
| // 表头 | |||
| columns: [ | |||
| { | |||
| title: '#', | |||
| dataIndex: '', | |||
| key:'rowIndex', | |||
| width:60, | |||
| align:"center", | |||
| customRender:function (t,r,index) { | |||
| return parseInt(index)+1; | |||
| } | |||
| }, | |||
| { | |||
| title:'优惠券名', | |||
| align:"center", | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title:'图片', | |||
| align:"center", | |||
| dataIndex: 'pic', | |||
| scopedSlots: {customRender: 'imgSlot'} | |||
| }, | |||
| { | |||
| title:'券额', | |||
| align:"center", | |||
| dataIndex: 'price' | |||
| }, | |||
| { | |||
| title:'满多少金额', | |||
| align:"center", | |||
| dataIndex: 'conditionPrice' | |||
| }, | |||
| { | |||
| title:'说明', | |||
| align:"center", | |||
| dataIndex: 'info', | |||
| scopedSlots: {customRender: 'htmlSlot'} | |||
| }, | |||
| { | |||
| title:'优惠券结束时间', | |||
| align:"center", | |||
| dataIndex: 'endTime' | |||
| }, | |||
| { | |||
| title:'类型 0指定时间 1单次', | |||
| 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: "/hotelcoupon/hotelCoupon/list", | |||
| delete: "/hotelcoupon/hotelCoupon/delete", | |||
| deleteBatch: "/hotelcoupon/hotelCoupon/deleteBatch", | |||
| exportXlsUrl: "/hotelcoupon/hotelCoupon/exportXls", | |||
| importExcelUrl: "hotelcoupon/hotelCoupon/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:'name',text:'优惠券名',dictCode:''}) | |||
| fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满多少金额',dictCode:''}) | |||
| fieldList.push({type:'string',value:'info',text:'说明',dictCode:''}) | |||
| fieldList.push({type:'datetime',value:'endTime',text:'优惠券结束时间'}) | |||
| fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次',dictCode:'coupon_type'}) | |||
| fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'}) | |||
| this.superFieldList = fieldList | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,144 @@ | |||
| <template> | |||
| <a-spin :spinning="confirmLoading"> | |||
| <j-form-container :disabled="formDisabled"> | |||
| <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
| <a-row> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> | |||
| <a-input v-model="model.name" placeholder="请输入优惠券名" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="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="price"> | |||
| <a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="满多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice"> | |||
| <a-input-number v-model="model.conditionPrice" placeholder="请输入满多少金额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="info"> | |||
| <j-editor v-model="model.info" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="优惠券结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> | |||
| <j-date placeholder="请选择优惠券结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |||
| <j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" /> | |||
| </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: 'HotelCouponForm', | |||
| components: { | |||
| }, | |||
| props: { | |||
| //表单禁用 | |||
| disabled: { | |||
| type: Boolean, | |||
| default: false, | |||
| required: false | |||
| } | |||
| }, | |||
| data () { | |||
| return { | |||
| model:{ | |||
| type:0, | |||
| delFlag:0, | |||
| }, | |||
| labelCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 5 }, | |||
| }, | |||
| wrapperCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 16 }, | |||
| }, | |||
| confirmLoading: false, | |||
| validatorRules: { | |||
| delFlag: [ | |||
| { required: true, message: '请输入是否删除!'}, | |||
| ], | |||
| }, | |||
| url: { | |||
| add: "/hotelcoupon/hotelCoupon/add", | |||
| edit: "/hotelcoupon/hotelCoupon/edit", | |||
| queryById: "/hotelcoupon/hotelCoupon/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> | |||
| @ -0,0 +1,84 @@ | |||
| <template> | |||
| <a-drawer | |||
| :title="title" | |||
| :width="width" | |||
| placement="right" | |||
| :closable="false" | |||
| @close="close" | |||
| destroyOnClose | |||
| :visible="visible"> | |||
| <hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-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 HotelCouponForm from './HotelCouponForm' | |||
| export default { | |||
| name: 'HotelCouponModal', | |||
| components: { | |||
| HotelCouponForm | |||
| }, | |||
| 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> | |||
| @ -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-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-form> | |||
| </j-modal> | |||
| </template> | |||
| <script> | |||
| import HotelCouponForm from './HotelCouponForm' | |||
| export default { | |||
| name: 'HotelCouponModal', | |||
| components: { | |||
| HotelCouponForm | |||
| }, | |||
| 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> | |||
| @ -0,0 +1,61 @@ | |||
| import {defHttp} from '/@/utils/http/axios'; | |||
| import {Modal} from 'ant-design-vue'; | |||
| enum Api { | |||
| list = '/hotelcoupon/hotelCoupon/list', | |||
| save='/hotelcoupon/hotelCoupon/add', | |||
| edit='/hotelcoupon/hotelCoupon/edit', | |||
| deleteOne = '/hotelcoupon/hotelCoupon/delete', | |||
| deleteBatch = '/hotelcoupon/hotelCoupon/deleteBatch', | |||
| importExcel = '/hotelcoupon/hotelCoupon/importExcel', | |||
| exportXls = '/hotelcoupon/hotelCoupon/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}); | |||
| } | |||
| @ -0,0 +1,108 @@ | |||
| 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: 'name' | |||
| }, | |||
| { | |||
| title: '图片', | |||
| align:"center", | |||
| dataIndex: 'pic', | |||
| customRender:render.renderAvatar, | |||
| }, | |||
| { | |||
| title: '券额', | |||
| align:"center", | |||
| dataIndex: 'price' | |||
| }, | |||
| { | |||
| title: '满多少金额', | |||
| align:"center", | |||
| dataIndex: 'conditionPrice' | |||
| }, | |||
| { | |||
| title: '说明', | |||
| align:"center", | |||
| dataIndex: 'info', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '优惠券结束时间', | |||
| align:"center", | |||
| dataIndex: 'endTime' | |||
| }, | |||
| { | |||
| title: '类型 0指定时间 1单次', | |||
| align:"center", | |||
| dataIndex: 'type_dictText' | |||
| }, | |||
| { | |||
| title: '是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| ]; | |||
| //查询数据 | |||
| export const searchFormSchema: FormSchema[] = [ | |||
| ]; | |||
| //表单数据 | |||
| export const formSchema: FormSchema[] = [ | |||
| { | |||
| label: '优惠券名', | |||
| field: 'name', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '图片', | |||
| field: 'pic', | |||
| component: 'JImageUpload', | |||
| componentProps:{ | |||
| }, | |||
| }, | |||
| { | |||
| label: '券额', | |||
| field: 'price', | |||
| component: 'InputNumber', | |||
| }, | |||
| { | |||
| label: '满多少金额', | |||
| field: 'conditionPrice', | |||
| component: 'InputNumber', | |||
| }, | |||
| { | |||
| label: '说明', | |||
| field: 'info', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '优惠券结束时间', | |||
| field: 'endTime', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '类型 0指定时间 1单次', | |||
| field: 'type', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"coupon_type" | |||
| }, | |||
| }, | |||
| { | |||
| label: '是否删除', | |||
| field: 'delFlag', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"is_delete" | |||
| }, | |||
| dynamicRules: ({model,schema}) => { | |||
| return [ | |||
| { required: true, message: '请输入是否删除!'}, | |||
| ]; | |||
| }, | |||
| }, | |||
| ]; | |||
| @ -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> | |||
| <!-- 表单区域 --> | |||
| <HotelCouponModal @register="registerModal" @success="handleSuccess"></HotelCouponModal> | |||
| </div> | |||
| </template> | |||
| <script lang="ts" name="hotelcoupon-hotelCoupon" 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 HotelCouponModal from './components/HotelCouponModal.vue' | |||
| import {columns, searchFormSchema} from './hotelCoupon.data'; | |||
| import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelCoupon.api'; | |||
| const checkedKeys = ref<Array<string | number>>([]); | |||
| //注册model | |||
| const [registerModal, {openModal}] = useModal(); | |||
| //注册table数据 | |||
| const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
| tableProps:{ | |||
| title: 'hotel_coupon', | |||
| api: list, | |||
| columns, | |||
| canResize:false, | |||
| formConfig: { | |||
| labelWidth: 120, | |||
| schemas: searchFormSchema, | |||
| autoSubmitOnEnter:true, | |||
| showAdvancedButton:true, | |||
| fieldMapToTime: [ | |||
| ], | |||
| }, | |||
| actionColumn: { | |||
| width: 120, | |||
| }, | |||
| }, | |||
| exportConfig: { | |||
| name:"hotel_coupon", | |||
| 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> | |||
| @ -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 '../hotelCoupon.data'; | |||
| import {saveOrUpdate} from '../hotelCoupon.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> | |||
| @ -0,0 +1,171 @@ | |||
| package org.jeecg.modules.hotelcouponlog.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.hotelcouponlog.entity.HotelCouponLog; | |||
| import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService; | |||
| 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_coupon_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Api(tags="hotel_coupon_log") | |||
| @RestController | |||
| @RequestMapping("/hotelcouponlog/hotelCouponLog") | |||
| @Slf4j | |||
| public class HotelCouponLogController extends JeecgController<HotelCouponLog, IHotelCouponLogService> { | |||
| @Autowired | |||
| private IHotelCouponLogService hotelCouponLogService; | |||
| /** | |||
| * 分页列表查询 | |||
| * | |||
| * @param hotelCouponLog | |||
| * @param pageNo | |||
| * @param pageSize | |||
| * @param req | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_coupon_log-分页列表查询") | |||
| @ApiOperation(value="hotel_coupon_log-分页列表查询", notes="hotel_coupon_log-分页列表查询") | |||
| @GetMapping(value = "/list") | |||
| public Result<IPage<HotelCouponLog>> queryPageList(HotelCouponLog hotelCouponLog, | |||
| @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
| @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
| HttpServletRequest req) { | |||
| QueryWrapper<HotelCouponLog> queryWrapper = QueryGenerator.initQueryWrapper(hotelCouponLog, req.getParameterMap()); | |||
| Page<HotelCouponLog> page = new Page<HotelCouponLog>(pageNo, pageSize); | |||
| IPage<HotelCouponLog> pageList = hotelCouponLogService.page(page, queryWrapper); | |||
| return Result.OK(pageList); | |||
| } | |||
| /** | |||
| * 添加 | |||
| * | |||
| * @param hotelCouponLog | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon_log-添加") | |||
| @ApiOperation(value="hotel_coupon_log-添加", notes="hotel_coupon_log-添加") | |||
| @PostMapping(value = "/add") | |||
| public Result<String> add(@RequestBody HotelCouponLog hotelCouponLog) { | |||
| hotelCouponLogService.save(hotelCouponLog); | |||
| return Result.OK("添加成功!"); | |||
| } | |||
| /** | |||
| * 编辑 | |||
| * | |||
| * @param hotelCouponLog | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon_log-编辑") | |||
| @ApiOperation(value="hotel_coupon_log-编辑", notes="hotel_coupon_log-编辑") | |||
| @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
| public Result<String> edit(@RequestBody HotelCouponLog hotelCouponLog) { | |||
| hotelCouponLogService.updateById(hotelCouponLog); | |||
| return Result.OK("编辑成功!"); | |||
| } | |||
| /** | |||
| * 通过id删除 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon_log-通过id删除") | |||
| @ApiOperation(value="hotel_coupon_log-通过id删除", notes="hotel_coupon_log-通过id删除") | |||
| @DeleteMapping(value = "/delete") | |||
| public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
| hotelCouponLogService.removeById(id); | |||
| return Result.OK("删除成功!"); | |||
| } | |||
| /** | |||
| * 批量删除 | |||
| * | |||
| * @param ids | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_coupon_log-批量删除") | |||
| @ApiOperation(value="hotel_coupon_log-批量删除", notes="hotel_coupon_log-批量删除") | |||
| @DeleteMapping(value = "/deleteBatch") | |||
| public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
| this.hotelCouponLogService.removeByIds(Arrays.asList(ids.split(","))); | |||
| return Result.OK("批量删除成功!"); | |||
| } | |||
| /** | |||
| * 通过id查询 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_coupon_log-通过id查询") | |||
| @ApiOperation(value="hotel_coupon_log-通过id查询", notes="hotel_coupon_log-通过id查询") | |||
| @GetMapping(value = "/queryById") | |||
| public Result<HotelCouponLog> queryById(@RequestParam(name="id",required=true) String id) { | |||
| HotelCouponLog hotelCouponLog = hotelCouponLogService.getById(id); | |||
| if(hotelCouponLog==null) { | |||
| return Result.error("未找到对应数据"); | |||
| } | |||
| return Result.OK(hotelCouponLog); | |||
| } | |||
| /** | |||
| * 导出excel | |||
| * | |||
| * @param request | |||
| * @param hotelCouponLog | |||
| */ | |||
| @RequestMapping(value = "/exportXls") | |||
| public ModelAndView exportXls(HttpServletRequest request, HotelCouponLog hotelCouponLog) { | |||
| return super.exportXls(request, hotelCouponLog, HotelCouponLog.class, "hotel_coupon_log"); | |||
| } | |||
| /** | |||
| * 通过excel导入数据 | |||
| * | |||
| * @param request | |||
| * @param response | |||
| * @return | |||
| */ | |||
| @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
| public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
| return super.importExcel(request, response, HotelCouponLog.class); | |||
| } | |||
| } | |||
| @ -0,0 +1,97 @@ | |||
| package org.jeecg.modules.hotelcouponlog.entity; | |||
| 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.TableName; | |||
| 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_coupon_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Data | |||
| @TableName("hotel_coupon_log") | |||
| @Accessors(chain = true) | |||
| @EqualsAndHashCode(callSuper = false) | |||
| @ApiModel(value="hotel_coupon_log对象", description="hotel_coupon_log") | |||
| public class HotelCouponLog 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 couponId; | |||
| /**用户编号*/ | |||
| @Excel(name = "用户编号", width = 15) | |||
| @ApiModelProperty(value = "用户编号") | |||
| private java.lang.String userId; | |||
| /**优惠券名*/ | |||
| @Excel(name = "优惠券名", width = 15) | |||
| @ApiModelProperty(value = "优惠券名") | |||
| private java.lang.String couponName; | |||
| /**图片*/ | |||
| @Excel(name = "图片", width = 15) | |||
| @ApiModelProperty(value = "图片") | |||
| private java.lang.String pic; | |||
| /**券额*/ | |||
| @Excel(name = "券额", width = 15) | |||
| @ApiModelProperty(value = "券额") | |||
| private java.math.BigDecimal price; | |||
| /**满足多少金额*/ | |||
| @Excel(name = "满足多少金额", width = 15) | |||
| @ApiModelProperty(value = "满足多少金额") | |||
| private java.math.BigDecimal conditionPrice; | |||
| /**结束时间*/ | |||
| @Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | |||
| @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 endTime; | |||
| /**类型 0指定时间 1单次使用*/ | |||
| @Excel(name = "类型 0指定时间 1单次使用", width = 15, dicCode = "coupon_type") | |||
| @Dict(dicCode = "coupon_type") | |||
| @ApiModelProperty(value = "类型 0指定时间 1单次使用") | |||
| private java.lang.Integer type; | |||
| /**状态 0未使用 1已使用*/ | |||
| @Excel(name = "状态 0未使用 1已使用", width = 15, dicCode = "coupon_log_status") | |||
| @Dict(dicCode = "coupon_log_status") | |||
| @ApiModelProperty(value = "状态 0未使用 1已使用") | |||
| private java.lang.Integer status; | |||
| /**是否删除*/ | |||
| @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; | |||
| /**使用类型 0押金 1租金 2水洗*/ | |||
| @Dict(dicCode = "coupon_use_type") | |||
| private Integer useType; | |||
| private String orderLogId; | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package org.jeecg.modules.hotelcouponlog.mapper; | |||
| import java.util.List; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @Description: hotel_coupon_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface HotelCouponLogMapper extends BaseMapper<HotelCouponLog> { | |||
| } | |||
| @ -0,0 +1,5 @@ | |||
| <?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.hotelcouponlog.mapper.HotelCouponLogMapper"> | |||
| </mapper> | |||
| @ -0,0 +1,14 @@ | |||
| package org.jeecg.modules.hotelcouponlog.service; | |||
| import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @Description: hotel_coupon_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface IHotelCouponLogService extends IService<HotelCouponLog> { | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| package org.jeecg.modules.hotelcouponlog.service.impl; | |||
| import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog; | |||
| import org.jeecg.modules.hotelcouponlog.mapper.HotelCouponLogMapper; | |||
| import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService; | |||
| import org.springframework.stereotype.Service; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| /** | |||
| * @Description: hotel_coupon_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-14 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Service | |||
| public class HotelCouponLogServiceImpl extends ServiceImpl<HotelCouponLogMapper, HotelCouponLog> implements IHotelCouponLogService { | |||
| } | |||
| @ -0,0 +1,232 @@ | |||
| <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_coupon_log')">导出</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-coupon-log-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-log-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelCouponLogModal from './modules/HotelCouponLogModal' | |||
| import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
| export default { | |||
| name: 'HotelCouponLogList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelCouponLogModal | |||
| }, | |||
| data () { | |||
| return { | |||
| description: 'hotel_coupon_log管理页面', | |||
| // 表头 | |||
| columns: [ | |||
| { | |||
| title: '#', | |||
| dataIndex: '', | |||
| key:'rowIndex', | |||
| width:60, | |||
| align:"center", | |||
| customRender:function (t,r,index) { | |||
| return parseInt(index)+1; | |||
| } | |||
| }, | |||
| { | |||
| title:'优惠券编号', | |||
| align:"center", | |||
| dataIndex: 'couponId' | |||
| }, | |||
| { | |||
| title:'用户编号', | |||
| align:"center", | |||
| dataIndex: 'userId' | |||
| }, | |||
| { | |||
| title:'优惠券名', | |||
| align:"center", | |||
| dataIndex: 'couponName' | |||
| }, | |||
| { | |||
| title:'图片', | |||
| align:"center", | |||
| dataIndex: 'pic', | |||
| scopedSlots: {customRender: 'imgSlot'} | |||
| }, | |||
| { | |||
| title:'券额', | |||
| align:"center", | |||
| dataIndex: 'price' | |||
| }, | |||
| { | |||
| title:'满足多少金额', | |||
| align:"center", | |||
| dataIndex: 'conditionPrice' | |||
| }, | |||
| { | |||
| title:'结束时间', | |||
| align:"center", | |||
| dataIndex: 'endTime' | |||
| }, | |||
| { | |||
| title:'类型', | |||
| align:"center", | |||
| dataIndex: 'type_dictText' | |||
| }, | |||
| { | |||
| title:'使用类型', | |||
| align:"center", | |||
| dataIndex: 'useType_dictText' | |||
| }, | |||
| { | |||
| title:'状态', | |||
| align:"center", | |||
| dataIndex: 'status_dictText' | |||
| }, | |||
| { | |||
| title:'是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'action', | |||
| align:"center", | |||
| fixed:"right", | |||
| width:147, | |||
| scopedSlots: { customRender: 'action' } | |||
| } | |||
| ], | |||
| url: { | |||
| list: "/hotelcouponlog/hotelCouponLog/list", | |||
| delete: "/hotelcouponlog/hotelCouponLog/delete", | |||
| deleteBatch: "/hotelcouponlog/hotelCouponLog/deleteBatch", | |||
| exportXlsUrl: "/hotelcouponlog/hotelCouponLog/exportXls", | |||
| importExcelUrl: "hotelcouponlog/hotelCouponLog/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:'couponId',text:'优惠券编号',dictCode:''}) | |||
| fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''}) | |||
| fieldList.push({type:'string',value:'couponName',text:'优惠券名',dictCode:''}) | |||
| fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''}) | |||
| fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满足多少金额',dictCode:''}) | |||
| fieldList.push({type:'datetime',value:'endTime',text:'结束时间'}) | |||
| fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次使用',dictCode:'coupon_type'}) | |||
| fieldList.push({type:'int',value:'status',text:'状态 0未使用 1已使用',dictCode:'coupon_log_status'}) | |||
| fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'}) | |||
| this.superFieldList = fieldList | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,163 @@ | |||
| <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="couponId"> | |||
| <a-input v-model="model.couponId" placeholder="请输入优惠券编号" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="用户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> | |||
| <a-input v-model="model.userId" placeholder="请输入用户编号" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="couponName"> | |||
| <a-input v-model="model.couponName" 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="price"> | |||
| <a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="满足多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice"> | |||
| <a-input-number v-model="model.conditionPrice" placeholder="请输入满足多少金额" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> | |||
| <j-date placeholder="请选择结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |||
| <j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="使用类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useType"> | |||
| <j-dict-select-tag type="list" v-model="model.useType" dictCode="coupon_type" placeholder="请选择使用类型" /> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> | |||
| <j-dict-select-tag type="radio" v-model="model.status" dictCode="coupon_log_status" placeholder="请选择状态" /> | |||
| </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: 'HotelCouponLogForm', | |||
| components: { | |||
| }, | |||
| props: { | |||
| //表单禁用 | |||
| disabled: { | |||
| type: Boolean, | |||
| default: false, | |||
| required: false | |||
| } | |||
| }, | |||
| data () { | |||
| return { | |||
| model:{ | |||
| type:0, | |||
| status:0, | |||
| delFlag:0, | |||
| }, | |||
| labelCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 5 }, | |||
| }, | |||
| wrapperCol: { | |||
| xs: { span: 24 }, | |||
| sm: { span: 16 }, | |||
| }, | |||
| confirmLoading: false, | |||
| validatorRules: { | |||
| status: [ | |||
| { required: true, message: '请输入状态 0未使用 1已使用!'}, | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: '请输入是否删除!'}, | |||
| ], | |||
| }, | |||
| url: { | |||
| add: "/hotelcouponlog/hotelCouponLog/add", | |||
| edit: "/hotelcouponlog/hotelCouponLog/edit", | |||
| queryById: "/hotelcouponlog/hotelCouponLog/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> | |||
| @ -0,0 +1,84 @@ | |||
| <template> | |||
| <a-drawer | |||
| :title="title" | |||
| :width="width" | |||
| placement="right" | |||
| :closable="false" | |||
| @close="close" | |||
| destroyOnClose | |||
| :visible="visible"> | |||
| <hotel-coupon-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-log-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 HotelCouponLogForm from './HotelCouponLogForm' | |||
| export default { | |||
| name: 'HotelCouponLogModal', | |||
| components: { | |||
| HotelCouponLogForm | |||
| }, | |||
| 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> | |||
| @ -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-coupon-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-log-form> | |||
| </j-modal> | |||
| </template> | |||
| <script> | |||
| import HotelCouponLogForm from './HotelCouponLogForm' | |||
| export default { | |||
| name: 'HotelCouponLogModal', | |||
| components: { | |||
| HotelCouponLogForm | |||
| }, | |||
| 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> | |||
| @ -0,0 +1,61 @@ | |||
| import {defHttp} from '/@/utils/http/axios'; | |||
| import {Modal} from 'ant-design-vue'; | |||
| enum Api { | |||
| list = '/hotelcouponlog/hotelCouponLog/list', | |||
| save='/hotelcouponlog/hotelCouponLog/add', | |||
| edit='/hotelcouponlog/hotelCouponLog/edit', | |||
| deleteOne = '/hotelcouponlog/hotelCouponLog/delete', | |||
| deleteBatch = '/hotelcouponlog/hotelCouponLog/deleteBatch', | |||
| importExcel = '/hotelcouponlog/hotelCouponLog/importExcel', | |||
| exportXls = '/hotelcouponlog/hotelCouponLog/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}); | |||
| } | |||
| @ -0,0 +1,135 @@ | |||
| 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: 'couponId' | |||
| }, | |||
| { | |||
| title: '用户编号', | |||
| align:"center", | |||
| dataIndex: 'userId' | |||
| }, | |||
| { | |||
| title: '优惠券名', | |||
| align:"center", | |||
| dataIndex: 'couponName' | |||
| }, | |||
| { | |||
| title: '图片', | |||
| align:"center", | |||
| dataIndex: 'pic', | |||
| customRender:render.renderAvatar, | |||
| }, | |||
| { | |||
| title: '券额', | |||
| align:"center", | |||
| dataIndex: 'price' | |||
| }, | |||
| { | |||
| title: '满足多少金额', | |||
| align:"center", | |||
| dataIndex: 'conditionPrice' | |||
| }, | |||
| { | |||
| title: '结束时间', | |||
| align:"center", | |||
| dataIndex: 'endTime' | |||
| }, | |||
| { | |||
| title: '类型 0指定时间 1单次使用', | |||
| align:"center", | |||
| dataIndex: 'type_dictText' | |||
| }, | |||
| { | |||
| title: '状态 0未使用 1已使用', | |||
| align:"center", | |||
| dataIndex: 'status_dictText' | |||
| }, | |||
| { | |||
| title: '是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| ]; | |||
| //查询数据 | |||
| export const searchFormSchema: FormSchema[] = [ | |||
| ]; | |||
| //表单数据 | |||
| export const formSchema: FormSchema[] = [ | |||
| { | |||
| label: '优惠券编号', | |||
| field: 'couponId', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '用户编号', | |||
| field: 'userId', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '优惠券名', | |||
| field: 'couponName', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '图片', | |||
| field: 'pic', | |||
| component: 'JImageUpload', | |||
| componentProps:{ | |||
| }, | |||
| }, | |||
| { | |||
| label: '券额', | |||
| field: 'price', | |||
| component: 'InputNumber', | |||
| }, | |||
| { | |||
| label: '满足多少金额', | |||
| field: 'conditionPrice', | |||
| component: 'InputNumber', | |||
| }, | |||
| { | |||
| label: '结束时间', | |||
| field: 'endTime', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '类型 0指定时间 1单次使用', | |||
| field: 'type', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"coupon_type" | |||
| }, | |||
| }, | |||
| { | |||
| label: '状态 0未使用 1已使用', | |||
| field: 'status', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"coupon_log_status" | |||
| }, | |||
| dynamicRules: ({model,schema}) => { | |||
| return [ | |||
| { required: true, message: '请输入状态 0未使用 1已使用!'}, | |||
| ]; | |||
| }, | |||
| }, | |||
| { | |||
| label: '是否删除', | |||
| field: 'delFlag', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"is_delete" | |||
| }, | |||
| dynamicRules: ({model,schema}) => { | |||
| return [ | |||
| { required: true, message: '请输入是否删除!'}, | |||
| ]; | |||
| }, | |||
| }, | |||
| ]; | |||
| @ -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> | |||
| <!-- 表单区域 --> | |||
| <HotelCouponLogModal @register="registerModal" @success="handleSuccess"></HotelCouponLogModal> | |||
| </div> | |||
| </template> | |||
| <script lang="ts" name="hotelcouponlog-hotelCouponLog" 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 HotelCouponLogModal from './components/HotelCouponLogModal.vue' | |||
| import {columns, searchFormSchema} from './hotelCouponLog.data'; | |||
| import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelCouponLog.api'; | |||
| const checkedKeys = ref<Array<string | number>>([]); | |||
| //注册model | |||
| const [registerModal, {openModal}] = useModal(); | |||
| //注册table数据 | |||
| const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
| tableProps:{ | |||
| title: 'hotel_coupon_log', | |||
| api: list, | |||
| columns, | |||
| canResize:false, | |||
| formConfig: { | |||
| labelWidth: 120, | |||
| schemas: searchFormSchema, | |||
| autoSubmitOnEnter:true, | |||
| showAdvancedButton:true, | |||
| fieldMapToTime: [ | |||
| ], | |||
| }, | |||
| actionColumn: { | |||
| width: 120, | |||
| }, | |||
| }, | |||
| exportConfig: { | |||
| name:"hotel_coupon_log", | |||
| 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> | |||
| @ -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 '../hotelCouponLog.data'; | |||
| import {saveOrUpdate} from '../hotelCouponLog.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> | |||
| @ -0,0 +1,14 @@ | |||
| package org.jeecg.modules.hotelorder.req; | |||
| import io.swagger.annotations.ApiModelProperty; | |||
| import lombok.Data; | |||
| import org.jeecg.modules.hotelorder.entity.HotelOrder; | |||
| @Data | |||
| public class DamageAuditReq { | |||
| /**审核 0通过 1不通过*/ | |||
| private Integer audit; | |||
| private HotelOrder hotelOrder; | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| package org.jeecg.modules.hotelshop.req; | |||
| import lombok.Data; | |||
| @Data | |||
| public class AuditShopReq { | |||
| /**店铺id*/ | |||
| private String id; | |||
| /**0审核通过 1审核不通过*/ | |||
| private Integer audit; | |||
| } | |||
| @ -0,0 +1,171 @@ | |||
| package org.jeecg.modules.hotelshoplog.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.hotelshoplog.entity.HotelShopLog; | |||
| import org.jeecg.modules.hotelshoplog.service.IHotelShopLogService; | |||
| 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_shop_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-12 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Api(tags="hotel_shop_log") | |||
| @RestController | |||
| @RequestMapping("/hotelshoplog/hotelShopLog") | |||
| @Slf4j | |||
| public class HotelShopLogController extends JeecgController<HotelShopLog, IHotelShopLogService> { | |||
| @Autowired | |||
| private IHotelShopLogService hotelShopLogService; | |||
| /** | |||
| * 分页列表查询 | |||
| * | |||
| * @param hotelShopLog | |||
| * @param pageNo | |||
| * @param pageSize | |||
| * @param req | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_shop_log-分页列表查询") | |||
| @ApiOperation(value="hotel_shop_log-分页列表查询", notes="hotel_shop_log-分页列表查询") | |||
| @GetMapping(value = "/list") | |||
| public Result<IPage<HotelShopLog>> queryPageList(HotelShopLog hotelShopLog, | |||
| @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
| @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
| HttpServletRequest req) { | |||
| QueryWrapper<HotelShopLog> queryWrapper = QueryGenerator.initQueryWrapper(hotelShopLog, req.getParameterMap()); | |||
| Page<HotelShopLog> page = new Page<HotelShopLog>(pageNo, pageSize); | |||
| IPage<HotelShopLog> pageList = hotelShopLogService.page(page, queryWrapper); | |||
| return Result.OK(pageList); | |||
| } | |||
| /** | |||
| * 添加 | |||
| * | |||
| * @param hotelShopLog | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_shop_log-添加") | |||
| @ApiOperation(value="hotel_shop_log-添加", notes="hotel_shop_log-添加") | |||
| @PostMapping(value = "/add") | |||
| public Result<String> add(@RequestBody HotelShopLog hotelShopLog) { | |||
| hotelShopLogService.save(hotelShopLog); | |||
| return Result.OK("添加成功!"); | |||
| } | |||
| /** | |||
| * 编辑 | |||
| * | |||
| * @param hotelShopLog | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_shop_log-编辑") | |||
| @ApiOperation(value="hotel_shop_log-编辑", notes="hotel_shop_log-编辑") | |||
| @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
| public Result<String> edit(@RequestBody HotelShopLog hotelShopLog) { | |||
| hotelShopLogService.updateById(hotelShopLog); | |||
| return Result.OK("编辑成功!"); | |||
| } | |||
| /** | |||
| * 通过id删除 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_shop_log-通过id删除") | |||
| @ApiOperation(value="hotel_shop_log-通过id删除", notes="hotel_shop_log-通过id删除") | |||
| @DeleteMapping(value = "/delete") | |||
| public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
| hotelShopLogService.removeById(id); | |||
| return Result.OK("删除成功!"); | |||
| } | |||
| /** | |||
| * 批量删除 | |||
| * | |||
| * @param ids | |||
| * @return | |||
| */ | |||
| @AutoLog(value = "hotel_shop_log-批量删除") | |||
| @ApiOperation(value="hotel_shop_log-批量删除", notes="hotel_shop_log-批量删除") | |||
| @DeleteMapping(value = "/deleteBatch") | |||
| public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
| this.hotelShopLogService.removeByIds(Arrays.asList(ids.split(","))); | |||
| return Result.OK("批量删除成功!"); | |||
| } | |||
| /** | |||
| * 通过id查询 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| //@AutoLog(value = "hotel_shop_log-通过id查询") | |||
| @ApiOperation(value="hotel_shop_log-通过id查询", notes="hotel_shop_log-通过id查询") | |||
| @GetMapping(value = "/queryById") | |||
| public Result<HotelShopLog> queryById(@RequestParam(name="id",required=true) String id) { | |||
| HotelShopLog hotelShopLog = hotelShopLogService.getById(id); | |||
| if(hotelShopLog==null) { | |||
| return Result.error("未找到对应数据"); | |||
| } | |||
| return Result.OK(hotelShopLog); | |||
| } | |||
| /** | |||
| * 导出excel | |||
| * | |||
| * @param request | |||
| * @param hotelShopLog | |||
| */ | |||
| @RequestMapping(value = "/exportXls") | |||
| public ModelAndView exportXls(HttpServletRequest request, HotelShopLog hotelShopLog) { | |||
| return super.exportXls(request, hotelShopLog, HotelShopLog.class, "hotel_shop_log"); | |||
| } | |||
| /** | |||
| * 通过excel导入数据 | |||
| * | |||
| * @param request | |||
| * @param response | |||
| * @return | |||
| */ | |||
| @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
| public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
| return super.importExcel(request, response, HotelShopLog.class); | |||
| } | |||
| } | |||
| @ -0,0 +1,65 @@ | |||
| package org.jeecg.modules.hotelshoplog.entity; | |||
| 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.TableName; | |||
| 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_shop_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-12 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Data | |||
| @TableName("hotel_shop_log") | |||
| @Accessors(chain = true) | |||
| @EqualsAndHashCode(callSuper = false) | |||
| @ApiModel(value="hotel_shop_log对象", description="hotel_shop_log") | |||
| public class HotelShopLog implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| /**id*/ | |||
| @TableId(type = IdType.ASSIGN_ID) | |||
| @ApiModelProperty(value = "id") | |||
| private java.lang.String id; | |||
| /**老用户id*/ | |||
| @Excel(name = "老用户id", width = 15) | |||
| @ApiModelProperty(value = "老用户id") | |||
| private java.lang.String oldId; | |||
| /**新用户Id*/ | |||
| @Excel(name = "新用户Id", width = 15) | |||
| @ApiModelProperty(value = "新用户Id") | |||
| private java.lang.String newId; | |||
| /**水洗店id*/ | |||
| @Excel(name = "水洗店id", width = 15) | |||
| @ApiModelProperty(value = "水洗店id") | |||
| private java.lang.String shopId; | |||
| /**是否删除*/ | |||
| @Excel(name = "是否删除", width = 15, dicCode = "is_delete") | |||
| @Dict(dicCode = "is_delete") | |||
| @ApiModelProperty(value = "是否删除") | |||
| private java.lang.Integer delFlag; | |||
| /**createTime*/ | |||
| @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
| @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
| @ApiModelProperty(value = "createTime") | |||
| private java.util.Date createTime; | |||
| /**updateTime*/ | |||
| @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
| @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
| @ApiModelProperty(value = "updateTime") | |||
| private java.util.Date updateTime; | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package org.jeecg.modules.hotelshoplog.mapper; | |||
| import java.util.List; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import org.jeecg.modules.hotelshoplog.entity.HotelShopLog; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| /** | |||
| * @Description: hotel_shop_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-12 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface HotelShopLogMapper extends BaseMapper<HotelShopLog> { | |||
| } | |||
| @ -0,0 +1,5 @@ | |||
| <?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.hotelshoplog.mapper.HotelShopLogMapper"> | |||
| </mapper> | |||
| @ -0,0 +1,14 @@ | |||
| package org.jeecg.modules.hotelshoplog.service; | |||
| import org.jeecg.modules.hotelshoplog.entity.HotelShopLog; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| /** | |||
| * @Description: hotel_shop_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-12 | |||
| * @Version: V1.0 | |||
| */ | |||
| public interface IHotelShopLogService extends IService<HotelShopLog> { | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| package org.jeecg.modules.hotelshoplog.service.impl; | |||
| import org.jeecg.modules.hotelshoplog.entity.HotelShopLog; | |||
| import org.jeecg.modules.hotelshoplog.mapper.HotelShopLogMapper; | |||
| import org.jeecg.modules.hotelshoplog.service.IHotelShopLogService; | |||
| import org.springframework.stereotype.Service; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| /** | |||
| * @Description: hotel_shop_log | |||
| * @Author: jeecg-boot | |||
| * @Date: 2024-10-12 | |||
| * @Version: V1.0 | |||
| */ | |||
| @Service | |||
| public class HotelShopLogServiceImpl extends ServiceImpl<HotelShopLogMapper, HotelShopLog> implements IHotelShopLogService { | |||
| } | |||
| @ -0,0 +1,190 @@ | |||
| <template> | |||
| <a-card :bordered="false"> | |||
| <!-- 查询区域 --> | |||
| <div class="table-page-search-wrapper"> | |||
| <a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
| <a-row :gutter="24"> | |||
| </a-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_shop_log')">导出</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-shop-log-modal ref="modalForm" @ok="modalFormOk"></hotel-shop-log-modal> | |||
| </a-card> | |||
| </template> | |||
| <script> | |||
| import '@/assets/less/TableExpand.less' | |||
| import { mixinDevice } from '@/utils/mixin' | |||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
| import HotelShopLogModal from './modules/HotelShopLogModal' | |||
| import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
| export default { | |||
| name: 'HotelShopLogList', | |||
| mixins:[JeecgListMixin, mixinDevice], | |||
| components: { | |||
| HotelShopLogModal | |||
| }, | |||
| data () { | |||
| return { | |||
| description: 'hotel_shop_log管理页面', | |||
| // 表头 | |||
| columns: [ | |||
| { | |||
| title: '#', | |||
| dataIndex: '', | |||
| key:'rowIndex', | |||
| width:60, | |||
| align:"center", | |||
| customRender:function (t,r,index) { | |||
| return parseInt(index)+1; | |||
| } | |||
| }, | |||
| { | |||
| title:'老用户id', | |||
| align:"center", | |||
| dataIndex: 'oldId' | |||
| }, | |||
| { | |||
| title:'新用户Id', | |||
| align:"center", | |||
| dataIndex: 'newId' | |||
| }, | |||
| { | |||
| title:'水洗店id', | |||
| align:"center", | |||
| dataIndex: 'shopId' | |||
| }, | |||
| { | |||
| title:'是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| { | |||
| title: '操作', | |||
| dataIndex: 'action', | |||
| align:"center", | |||
| fixed:"right", | |||
| width:147, | |||
| scopedSlots: { customRender: 'action' } | |||
| } | |||
| ], | |||
| url: { | |||
| list: "/hotelshoplog/hotelShopLog/list", | |||
| delete: "/hotelshoplog/hotelShopLog/delete", | |||
| deleteBatch: "/hotelshoplog/hotelShopLog/deleteBatch", | |||
| exportXlsUrl: "/hotelshoplog/hotelShopLog/exportXls", | |||
| importExcelUrl: "hotelshoplog/hotelShopLog/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:'oldId',text:'老用户id',dictCode:''}) | |||
| fieldList.push({type:'string',value:'newId',text:'新用户Id',dictCode:''}) | |||
| fieldList.push({type:'string',value:'shopId',text:'水洗店id',dictCode:''}) | |||
| fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'}) | |||
| this.superFieldList = fieldList | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| @import '~@assets/less/common.less'; | |||
| </style> | |||
| @ -0,0 +1,120 @@ | |||
| <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="老用户id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oldId"> | |||
| <a-input v-model="model.oldId" placeholder="请输入老用户id" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="新用户Id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="newId"> | |||
| <a-input v-model="model.newId" placeholder="请输入新用户Id" ></a-input> | |||
| </a-form-model-item> | |||
| </a-col> | |||
| <a-col :span="24"> | |||
| <a-form-model-item label="水洗店id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopId"> | |||
| <a-input v-model="model.shopId" placeholder="请输入水洗店id" ></a-input> | |||
| </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: 'HotelShopLogForm', | |||
| 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: { | |||
| }, | |||
| url: { | |||
| add: "/hotelshoplog/hotelShopLog/add", | |||
| edit: "/hotelshoplog/hotelShopLog/edit", | |||
| queryById: "/hotelshoplog/hotelShopLog/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> | |||
| @ -0,0 +1,84 @@ | |||
| <template> | |||
| <a-drawer | |||
| :title="title" | |||
| :width="width" | |||
| placement="right" | |||
| :closable="false" | |||
| @close="close" | |||
| destroyOnClose | |||
| :visible="visible"> | |||
| <hotel-shop-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-shop-log-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 HotelShopLogForm from './HotelShopLogForm' | |||
| export default { | |||
| name: 'HotelShopLogModal', | |||
| components: { | |||
| HotelShopLogForm | |||
| }, | |||
| 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> | |||
| @ -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-shop-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-shop-log-form> | |||
| </j-modal> | |||
| </template> | |||
| <script> | |||
| import HotelShopLogForm from './HotelShopLogForm' | |||
| export default { | |||
| name: 'HotelShopLogModal', | |||
| components: { | |||
| HotelShopLogForm | |||
| }, | |||
| 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> | |||
| @ -0,0 +1,61 @@ | |||
| import {defHttp} from '/@/utils/http/axios'; | |||
| import {Modal} from 'ant-design-vue'; | |||
| enum Api { | |||
| list = '/hotelshoplog/hotelShopLog/list', | |||
| save='/hotelshoplog/hotelShopLog/add', | |||
| edit='/hotelshoplog/hotelShopLog/edit', | |||
| deleteOne = '/hotelshoplog/hotelShopLog/delete', | |||
| deleteBatch = '/hotelshoplog/hotelShopLog/deleteBatch', | |||
| importExcel = '/hotelshoplog/hotelShopLog/importExcel', | |||
| exportXls = '/hotelshoplog/hotelShopLog/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}); | |||
| } | |||
| @ -0,0 +1,56 @@ | |||
| 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: '老用户id', | |||
| align:"center", | |||
| dataIndex: 'oldId' | |||
| }, | |||
| { | |||
| title: '新用户Id', | |||
| align:"center", | |||
| dataIndex: 'newId' | |||
| }, | |||
| { | |||
| title: '水洗店id', | |||
| align:"center", | |||
| dataIndex: 'shopId' | |||
| }, | |||
| { | |||
| title: '是否删除', | |||
| align:"center", | |||
| dataIndex: 'delFlag_dictText' | |||
| }, | |||
| ]; | |||
| //查询数据 | |||
| export const searchFormSchema: FormSchema[] = [ | |||
| ]; | |||
| //表单数据 | |||
| export const formSchema: FormSchema[] = [ | |||
| { | |||
| label: '老用户id', | |||
| field: 'oldId', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '新用户Id', | |||
| field: 'newId', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '水洗店id', | |||
| field: 'shopId', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '是否删除', | |||
| field: 'delFlag', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"is_delete" | |||
| }, | |||
| }, | |||
| ]; | |||
| @ -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> | |||
| <!-- 表单区域 --> | |||
| <HotelShopLogModal @register="registerModal" @success="handleSuccess"></HotelShopLogModal> | |||
| </div> | |||
| </template> | |||
| <script lang="ts" name="hotelshoplog-hotelShopLog" 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 HotelShopLogModal from './components/HotelShopLogModal.vue' | |||
| import {columns, searchFormSchema} from './hotelShopLog.data'; | |||
| import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelShopLog.api'; | |||
| const checkedKeys = ref<Array<string | number>>([]); | |||
| //注册model | |||
| const [registerModal, {openModal}] = useModal(); | |||
| //注册table数据 | |||
| const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
| tableProps:{ | |||
| title: 'hotel_shop_log', | |||
| api: list, | |||
| columns, | |||
| canResize:false, | |||
| formConfig: { | |||
| labelWidth: 120, | |||
| schemas: searchFormSchema, | |||
| autoSubmitOnEnter:true, | |||
| showAdvancedButton:true, | |||
| fieldMapToTime: [ | |||
| ], | |||
| }, | |||
| actionColumn: { | |||
| width: 120, | |||
| }, | |||
| }, | |||
| exportConfig: { | |||
| name:"hotel_shop_log", | |||
| 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> | |||
| @ -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 '../hotelShopLog.data'; | |||
| import {saveOrUpdate} from '../hotelShopLog.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> | |||
| @ -0,0 +1,13 @@ | |||
| package org.jeecg.modules.xcx.coupon.controller; | |||
| import io.swagger.annotations.Api; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| @Api(tags = "优惠券接口") | |||
| @Slf4j | |||
| @RestController | |||
| @RequestMapping("/coupon") | |||
| public class CouponController { | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| package org.jeecg.modules.xcx.coupon.req; | |||
| import lombok.Data; | |||
| @Data | |||
| public class CouponPageReq { | |||
| private Integer pageNo = 1; | |||
| private Integer pageSize = 10; | |||
| private String token; | |||
| } | |||
| @ -0,0 +1,16 @@ | |||
| package org.jeecg.modules.xcx.coupon.service; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.xcx.coupon.req.CouponPageReq; | |||
| public interface ICouponService { | |||
| /** | |||
| * 优惠券分页接口 | |||
| * @param couponPageReq | |||
| * @return | |||
| */ | |||
| Result<?> couponPage(CouponPageReq couponPageReq); | |||
| } | |||
| @ -0,0 +1,39 @@ | |||
| package org.jeecg.modules.xcx.coupon.service.impl; | |||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.config.shiro.ShiroRealm; | |||
| import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; | |||
| import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog; | |||
| import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService; | |||
| import org.jeecg.modules.xcx.coupon.req.CouponPageReq; | |||
| import org.jeecg.modules.xcx.coupon.service.ICouponService; | |||
| import org.jeecgframework.codegenerate.a.a; | |||
| import org.springframework.stereotype.Service; | |||
| import javax.annotation.Resource; | |||
| @Slf4j | |||
| @Service | |||
| public class CouponServiceImpl implements ICouponService { | |||
| @Resource | |||
| private IHotelCouponLogService hotelCouponLogService; | |||
| @Resource | |||
| private ShiroRealm shiroRealm; | |||
| @Override | |||
| public Result<?> couponPage(CouponPageReq couponPageReq) { | |||
| HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(couponPageReq.getToken()); | |||
| Page<HotelCouponLog> page = new Page<>(couponPageReq.getPageNo(), couponPageReq.getPageSize()); | |||
| Page<HotelCouponLog> hotelCouponLogPage = hotelCouponLogService.lambdaQuery() | |||
| .eq(HotelCouponLog::getDelFlag, 0) | |||
| .eq(HotelCouponLog::getStatus, 0) | |||
| .eq(HotelCouponLog::getUserId, hanHaiMember.getId()) | |||
| .orderByDesc(HotelCouponLog::getCreateTime) | |||
| .page(page); | |||
| return Result.OK(hotelCouponLogPage); | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| package org.jeecg.modules.xcx.order.req; | |||
| import io.swagger.annotations.ApiModelProperty; | |||
| import lombok.Data; | |||
| @Data | |||
| public class ReplaceOrderPayReq { | |||
| private String token; | |||
| @ApiModelProperty(value = "订单id") | |||
| private String id; | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| package org.jeecg.modules.xcx.shop.req; | |||
| import io.swagger.annotations.ApiModelProperty; | |||
| import lombok.Data; | |||
| @Data | |||
| public class EditShopInfoReq { | |||
| private String token; | |||
| @ApiModelProperty(value = "店铺图像") | |||
| private String pic; | |||
| @ApiModelProperty(value = "店铺名") | |||
| private String name; | |||
| } | |||