commit
25f8a3e7de
30 changed files with 2634 additions and 0 deletions
@ -0,0 +1,258 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="用户"> |
||||
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="量体店铺"> |
||||
<j-select-depart placeholder="请选择量体店铺" v-model="queryParam.storeId"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<template v-if="toggleSearchStatus"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="量体设备"> |
||||
<j-search-select-tag placeholder="请选择量体设备" v-model="queryParam.deviceId" dict="se_equipmenttype,name,id"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="量体师"> |
||||
<j-select-user-by-dep placeholder="请选择量体师" v-model="queryParam.measurerId"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
</template> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||
<a @click="handleToggleSearch" style="margin-left: 8px"> |
||||
{{ toggleSearchStatus ? '收起' : '展开' }} |
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
||||
</a> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('顾客测体管理')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<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"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" 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> |
||||
|
||||
<customer-measure-modal ref="modalForm" @ok="modalFormOk"></customer-measure-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import CustomerMeasureModal from './modules/CustomerMeasureModal' |
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
||||
|
||||
export default { |
||||
name: 'CustomerMeasureList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
CustomerMeasureModal |
||||
}, |
||||
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: 'userId_dictText' |
||||
}, |
||||
{ |
||||
title:'排序', |
||||
align:"center", |
||||
dataIndex: 'sort' |
||||
}, |
||||
{ |
||||
title:'身高(厘米)', |
||||
align:"center", |
||||
dataIndex: 'height' |
||||
}, |
||||
{ |
||||
title:'体重(千克)', |
||||
align:"center", |
||||
dataIndex: 'weight' |
||||
}, |
||||
{ |
||||
title:'胸围(厘米)', |
||||
align:"center", |
||||
dataIndex: 'bust' |
||||
}, |
||||
{ |
||||
title:'腰围(厘米)', |
||||
align:"center", |
||||
dataIndex: 'theWaist' |
||||
}, |
||||
{ |
||||
title:'肩宽(厘米)', |
||||
align:"center", |
||||
dataIndex: 'shoulderWidth' |
||||
}, |
||||
{ |
||||
title:'量体时间', |
||||
align:"center", |
||||
dataIndex: 'measurementTime' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/customermeasure/customerMeasure/list", |
||||
delete: "/customermeasure/customerMeasure/delete", |
||||
deleteBatch: "/customermeasure/customerMeasure/deleteBatch", |
||||
exportXlsUrl: "/customermeasure/customerMeasure/exportXls", |
||||
importExcelUrl: "customermeasure/customerMeasure/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'sel_user',value:'userId',text:'用户'}) |
||||
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) |
||||
fieldList.push({type:'double',value:'height',text:'身高(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'weight',text:'体重(千克)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'hem',text:'下摆(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'cuff',text:'袖口(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'sleeveLength',text:'袖长(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'bust',text:'胸围(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'theWaist',text:'腰围(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'shoulderWidth',text:'肩宽(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'forebodyLength',text:'前身长(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'neck',text:'领围(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'hipline',text:'臀围(厘米)',dictCode:''}) |
||||
fieldList.push({type:'double',value:'length',text:'衣长',dictCode:''}) |
||||
fieldList.push({type:'double',value:'sternalDistance',text:'胸距',dictCode:''}) |
||||
fieldList.push({type:'string',value:'measurementMethod',text:'量体方式',dictCode:'ctfs'}) |
||||
fieldList.push({type:'sel_depart',value:'storeId',text:'量体店铺'}) |
||||
fieldList.push({type:'sel_search',value:'deviceId',text:'量体设备',dictTable:'se_equipmenttype', dictText:'name', dictCode:'id'}) |
||||
fieldList.push({type:'sel_user',value:'measurerId',text:'量体师'}) |
||||
fieldList.push({type:'datetime',value:'measurementTime',text:'量体时间'}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,199 @@ |
||||
<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="userId"> |
||||
<j-select-user-by-dep v-model="model.userId" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort"> |
||||
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="身高(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height"> |
||||
<a-input-number v-model="model.height" placeholder="请输入身高(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="体重(千克)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weight"> |
||||
<a-input-number v-model="model.weight" placeholder="请输入体重(千克)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="下摆(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hem"> |
||||
<a-input-number v-model="model.hem" placeholder="请输入下摆(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="袖口(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuff"> |
||||
<a-input-number v-model="model.cuff" placeholder="请输入袖口(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="袖长(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sleeveLength"> |
||||
<a-input-number v-model="model.sleeveLength" placeholder="请输入袖长(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="胸围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bust"> |
||||
<a-input-number v-model="model.bust" placeholder="请输入胸围(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="腰围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theWaist"> |
||||
<a-input-number v-model="model.theWaist" placeholder="请输入腰围(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="肩宽(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shoulderWidth"> |
||||
<a-input-number v-model="model.shoulderWidth" placeholder="请输入肩宽(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="前身长(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="forebodyLength"> |
||||
<a-input-number v-model="model.forebodyLength" placeholder="请输入前身长(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="领围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="neck"> |
||||
<a-input-number v-model="model.neck" placeholder="请输入领围(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="臀围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hipline"> |
||||
<a-input-number v-model="model.hipline" placeholder="请输入臀围(厘米)" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="衣长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length"> |
||||
<a-input-number v-model="model.length" placeholder="请输入衣长" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="胸距" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sternalDistance"> |
||||
<a-input-number v-model="model.sternalDistance" placeholder="请输入胸距" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="量体方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementMethod"> |
||||
<j-dict-select-tag type="list" v-model="model.measurementMethod" dictCode="ctfs" placeholder="请选择量体方式" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="量体店铺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storeId"> |
||||
<j-select-depart v-model="model.storeId" multi /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="量体设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deviceId"> |
||||
<j-search-select-tag v-model="model.deviceId" dict="se_equipmenttype,name,id" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="量体师" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurerId"> |
||||
<j-select-user-by-dep v-model="model.measurerId" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="量体时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementTime"> |
||||
<j-date placeholder="请选择量体时间" v-model="model.measurementTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'CustomerMeasureForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
}, |
||||
url: { |
||||
add: "/customermeasure/customerMeasure/add", |
||||
edit: "/customermeasure/customerMeasure/edit", |
||||
queryById: "/customermeasure/customerMeasure/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,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<customer-measure-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-measure-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import CustomerMeasureForm from './CustomerMeasureForm' |
||||
export default { |
||||
name: 'CustomerMeasureModal', |
||||
components: { |
||||
CustomerMeasureForm |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<customer-measure-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-measure-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 CustomerMeasureForm from './CustomerMeasureForm' |
||||
|
||||
export default { |
||||
name: 'CustomerMeasureModal', |
||||
components: { |
||||
CustomerMeasureForm |
||||
}, |
||||
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,246 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="用户"> |
||||
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="支付类型"> |
||||
<j-dict-select-tag placeholder="请选择支付类型" v-model="queryParam.paymentType" dictCode="zflx"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<template v-if="toggleSearchStatus"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="账号/卡号"> |
||||
<a-input placeholder="请输入账号/卡号" v-model="queryParam.accountNo"></a-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="开户银行"> |
||||
<a-input placeholder="请输入开户银行" v-model="queryParam.bankDeposit"></a-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
</template> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||
<a @click="handleToggleSearch" style="margin-left: 8px"> |
||||
{{ toggleSearchStatus ? '收起' : '展开' }} |
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
||||
</a> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('顾客支付信息管理')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<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"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" 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> |
||||
|
||||
<customer-payment-modal ref="modalForm" @ok="modalFormOk"></customer-payment-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import CustomerPaymentModal from './modules/CustomerPaymentModal' |
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
||||
|
||||
export default { |
||||
name: 'CustomerPaymentList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
CustomerPaymentModal |
||||
}, |
||||
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: 'createBy' |
||||
}, |
||||
{ |
||||
title:'创建日期', |
||||
align:"center", |
||||
dataIndex: 'createTime' |
||||
}, |
||||
{ |
||||
title:'更新人', |
||||
align:"center", |
||||
dataIndex: 'updateBy' |
||||
}, |
||||
{ |
||||
title:'更新日期', |
||||
align:"center", |
||||
dataIndex: 'updateTime' |
||||
}, |
||||
{ |
||||
title:'用户', |
||||
align:"center", |
||||
dataIndex: 'userId_dictText' |
||||
}, |
||||
{ |
||||
title:'支付类型', |
||||
align:"center", |
||||
dataIndex: 'paymentType_dictText' |
||||
}, |
||||
{ |
||||
title:'账号/卡号', |
||||
align:"center", |
||||
dataIndex: 'accountNo' |
||||
}, |
||||
{ |
||||
title:'开户银行', |
||||
align:"center", |
||||
dataIndex: 'bankDeposit' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/customerpayment/customerPayment/list", |
||||
delete: "/customerpayment/customerPayment/delete", |
||||
deleteBatch: "/customerpayment/customerPayment/deleteBatch", |
||||
exportXlsUrl: "/customerpayment/customerPayment/exportXls", |
||||
importExcelUrl: "customerpayment/customerPayment/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:'createBy',text:'创建人',dictCode:''}) |
||||
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) |
||||
fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) |
||||
fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) |
||||
fieldList.push({type:'sel_user',value:'userId',text:'用户'}) |
||||
fieldList.push({type:'string',value:'paymentType',text:'支付类型',dictCode:'zflx'}) |
||||
fieldList.push({type:'string',value:'accountNo',text:'账号/卡号',dictCode:''}) |
||||
fieldList.push({type:'string',value:'bankDeposit',text:'开户银行',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,119 @@ |
||||
<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="userId"> |
||||
<j-select-user-by-dep v-model="model.userId" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="支付类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentType"> |
||||
<j-dict-select-tag type="list" v-model="model.paymentType" dictCode="zflx" placeholder="请选择支付类型" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="账号/卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accountNo"> |
||||
<a-input v-model="model.accountNo" placeholder="请输入账号/卡号" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="开户银行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankDeposit"> |
||||
<a-input v-model="model.bankDeposit" placeholder="请输入开户银行" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'CustomerPaymentForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
}, |
||||
url: { |
||||
add: "/customerpayment/customerPayment/add", |
||||
edit: "/customerpayment/customerPayment/edit", |
||||
queryById: "/customerpayment/customerPayment/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,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<customer-payment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-payment-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import CustomerPaymentForm from './CustomerPaymentForm' |
||||
export default { |
||||
name: 'CustomerPaymentModal', |
||||
components: { |
||||
CustomerPaymentForm |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<customer-payment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-payment-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 CustomerPaymentForm from './CustomerPaymentForm' |
||||
|
||||
export default { |
||||
name: 'CustomerPaymentModal', |
||||
components: { |
||||
CustomerPaymentForm |
||||
}, |
||||
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,250 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="用户"> |
||||
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/> |
||||
</a-form-item> |
||||
</a-col> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="收货人"> |
||||
<a-input placeholder="请输入收货人" v-model="queryParam.receiver"></a-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
<template v-if="toggleSearchStatus"> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<a-form-item label="联系电话"> |
||||
<a-input placeholder="请输入联系电话" v-model="queryParam.mobile"></a-input> |
||||
</a-form-item> |
||||
</a-col> |
||||
</template> |
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
||||
<a @click="handleToggleSearch" style="margin-left: 8px"> |
||||
{{ toggleSearchStatus ? '收起' : '展开' }} |
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
||||
</a> |
||||
</span> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<div class="table-operator"> |
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('顾客地址表')">导出</a-button> |
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
||||
<a-button type="primary" icon="import">导入</a-button> |
||||
</a-upload> |
||||
<!-- 高级查询区域 --> |
||||
<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"> |
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
||||
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
||||
</template> |
||||
<template slot="pcaSlot" slot-scope="text"> |
||||
<div>{{ getPcaText(text) }}</div> |
||||
</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> |
||||
|
||||
<customer-receiving-address-modal ref="modalForm" @ok="modalFormOk"></customer-receiving-address-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import CustomerReceivingAddressModal from './modules/CustomerReceivingAddressModal' |
||||
import Area from '@/components/_util/Area' |
||||
|
||||
export default { |
||||
name: 'CustomerReceivingAddressList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
CustomerReceivingAddressModal |
||||
}, |
||||
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: 'userId_dictText' |
||||
}, |
||||
{ |
||||
title:'城市', |
||||
align:"center", |
||||
dataIndex: 'cityId', |
||||
scopedSlots: {customRender: 'pcaSlot'} |
||||
}, |
||||
{ |
||||
title:'地址', |
||||
align:"center", |
||||
dataIndex: 'address' |
||||
}, |
||||
{ |
||||
title:'邮编', |
||||
align:"center", |
||||
dataIndex: 'zipCode' |
||||
}, |
||||
{ |
||||
title:'收货人', |
||||
align:"center", |
||||
dataIndex: 'receiver' |
||||
}, |
||||
{ |
||||
title:'联系电话', |
||||
align:"center", |
||||
dataIndex: 'mobile' |
||||
}, |
||||
{ |
||||
title:'排序', |
||||
align:"center", |
||||
dataIndex: 'sort' |
||||
}, |
||||
{ |
||||
title:'标识', |
||||
align:"center", |
||||
dataIndex: 'labelcl' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/customerreceivingaddress/customerReceivingAddress/list", |
||||
delete: "/customerreceivingaddress/customerReceivingAddress/delete", |
||||
deleteBatch: "/customerreceivingaddress/customerReceivingAddress/deleteBatch", |
||||
exportXlsUrl: "/customerreceivingaddress/customerReceivingAddress/exportXls", |
||||
importExcelUrl: "customerreceivingaddress/customerReceivingAddress/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
pcaData:'', |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.pcaData = new Area() |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
getPcaText(code){ |
||||
return this.pcaData.getText(code); |
||||
}, |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'sel_user',value:'userId',text:'用户'}) |
||||
fieldList.push({type:'pca',value:'cityId',text:'城市'}) |
||||
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''}) |
||||
fieldList.push({type:'string',value:'zipCode',text:'邮编',dictCode:''}) |
||||
fieldList.push({type:'string',value:'receiver',text:'收货人',dictCode:''}) |
||||
fieldList.push({type:'string',value:'mobile',text:'联系电话',dictCode:''}) |
||||
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) |
||||
fieldList.push({type:'string',value:'labelcl',text:'标识',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,143 @@ |
||||
<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="userId"> |
||||
<j-select-user-by-dep v-model="model.userId" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cityId"> |
||||
<j-area-linkage type="cascader" v-model="model.cityId" placeholder="请输入省市区" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> |
||||
<a-input v-model="model.address" placeholder="请输入地址" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zipCode"> |
||||
<a-input v-model="model.zipCode" placeholder="请输入邮编" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="收货人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiver"> |
||||
<a-input v-model="model.receiver" placeholder="请输入收货人" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile"> |
||||
<a-input v-model="model.mobile" placeholder="请输入联系电话" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort"> |
||||
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="labelcl"> |
||||
<a-input v-model="model.labelcl" placeholder="请输入标识" ></a-input> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'CustomerReceivingAddressForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
mobile: [ |
||||
{ required: false}, |
||||
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/customerreceivingaddress/customerReceivingAddress/add", |
||||
edit: "/customerreceivingaddress/customerReceivingAddress/edit", |
||||
queryById: "/customerreceivingaddress/customerReceivingAddress/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,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<customer-receiving-address-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-receiving-address-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import CustomerReceivingAddressForm from './CustomerReceivingAddressForm' |
||||
export default { |
||||
name: 'CustomerReceivingAddressModal', |
||||
components: { |
||||
CustomerReceivingAddressForm |
||||
}, |
||||
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,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<customer-receiving-address-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-receiving-address-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 CustomerReceivingAddressForm from './CustomerReceivingAddressForm' |
||||
|
||||
export default { |
||||
name: 'CustomerReceivingAddressModal', |
||||
components: { |
||||
CustomerReceivingAddressForm |
||||
}, |
||||
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,171 @@ |
||||
package org.jeecg.modules.demo.customermeasure.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.demo.customermeasure.entity.CustomerMeasure; |
||||
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService; |
||||
|
||||
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: 顾客测体管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="顾客测体管理") |
||||
@RestController |
||||
@RequestMapping("/customermeasure/customerMeasure") |
||||
@Slf4j |
||||
public class CustomerMeasureController extends JeecgController<CustomerMeasure, ICustomerMeasureService> { |
||||
@Autowired |
||||
private ICustomerMeasureService customerMeasureService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param customerMeasure |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-分页列表查询") |
||||
@ApiOperation(value="顾客测体管理-分页列表查询", notes="顾客测体管理-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(CustomerMeasure customerMeasure, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<CustomerMeasure> queryWrapper = QueryGenerator.initQueryWrapper(customerMeasure, req.getParameterMap()); |
||||
Page<CustomerMeasure> page = new Page<CustomerMeasure>(pageNo, pageSize); |
||||
IPage<CustomerMeasure> pageList = customerMeasureService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param customerMeasure |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-添加") |
||||
@ApiOperation(value="顾客测体管理-添加", notes="顾客测体管理-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody CustomerMeasure customerMeasure) { |
||||
customerMeasureService.save(customerMeasure); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param customerMeasure |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-编辑") |
||||
@ApiOperation(value="顾客测体管理-编辑", notes="顾客测体管理-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody CustomerMeasure customerMeasure) { |
||||
customerMeasureService.updateById(customerMeasure); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-通过id删除") |
||||
@ApiOperation(value="顾客测体管理-通过id删除", notes="顾客测体管理-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
||||
customerMeasureService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-批量删除") |
||||
@ApiOperation(value="顾客测体管理-批量删除", notes="顾客测体管理-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.customerMeasureService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客测体管理-通过id查询") |
||||
@ApiOperation(value="顾客测体管理-通过id查询", notes="顾客测体管理-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
||||
CustomerMeasure customerMeasure = customerMeasureService.getById(id); |
||||
if(customerMeasure==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(customerMeasure); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param customerMeasure |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, CustomerMeasure customerMeasure) { |
||||
return super.exportXls(request, customerMeasure, CustomerMeasure.class, "顾客测体管理"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, CustomerMeasure.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,144 @@ |
||||
package org.jeecg.modules.demo.customermeasure.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: 顾客测体管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("customer_measure") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="customer_measure对象", description="顾客测体管理") |
||||
public class CustomerMeasure implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**用户*/ |
||||
@Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "用户") |
||||
private String userId; |
||||
/**排序*/ |
||||
@Excel(name = "排序", width = 15) |
||||
@ApiModelProperty(value = "排序") |
||||
private Integer sort; |
||||
/**身高(厘米)*/ |
||||
@Excel(name = "身高(厘米)", width = 15) |
||||
@ApiModelProperty(value = "身高(厘米)") |
||||
private Double height; |
||||
/**体重(千克)*/ |
||||
@Excel(name = "体重(千克)", width = 15) |
||||
@ApiModelProperty(value = "体重(千克)") |
||||
private Double weight; |
||||
/**下摆(厘米)*/ |
||||
@Excel(name = "下摆(厘米)", width = 15) |
||||
@ApiModelProperty(value = "下摆(厘米)") |
||||
private Double hem; |
||||
/**袖口(厘米)*/ |
||||
@Excel(name = "袖口(厘米)", width = 15) |
||||
@ApiModelProperty(value = "袖口(厘米)") |
||||
private Double cuff; |
||||
/**袖长(厘米)*/ |
||||
@Excel(name = "袖长(厘米)", width = 15) |
||||
@ApiModelProperty(value = "袖长(厘米)") |
||||
private Double sleeveLength; |
||||
/**胸围(厘米)*/ |
||||
@Excel(name = "胸围(厘米)", width = 15) |
||||
@ApiModelProperty(value = "胸围(厘米)") |
||||
private Double bust; |
||||
/**腰围(厘米)*/ |
||||
@Excel(name = "腰围(厘米)", width = 15) |
||||
@ApiModelProperty(value = "腰围(厘米)") |
||||
private Double theWaist; |
||||
/**肩宽(厘米)*/ |
||||
@Excel(name = "肩宽(厘米)", width = 15) |
||||
@ApiModelProperty(value = "肩宽(厘米)") |
||||
private Double shoulderWidth; |
||||
/**前身长(厘米)*/ |
||||
@Excel(name = "前身长(厘米)", width = 15) |
||||
@ApiModelProperty(value = "前身长(厘米)") |
||||
private Double forebodyLength; |
||||
/**领围(厘米)*/ |
||||
@Excel(name = "领围(厘米)", width = 15) |
||||
@ApiModelProperty(value = "领围(厘米)") |
||||
private Double neck; |
||||
/**臀围(厘米)*/ |
||||
@Excel(name = "臀围(厘米)", width = 15) |
||||
@ApiModelProperty(value = "臀围(厘米)") |
||||
private Double hipline; |
||||
/**衣长*/ |
||||
@Excel(name = "衣长", width = 15) |
||||
@ApiModelProperty(value = "衣长") |
||||
private Double length; |
||||
/**胸距*/ |
||||
@Excel(name = "胸距", width = 15) |
||||
@ApiModelProperty(value = "胸距") |
||||
private Double sternalDistance; |
||||
/**量体方式*/ |
||||
@Excel(name = "量体方式", width = 15, dicCode = "ctfs") |
||||
@Dict(dicCode = "ctfs") |
||||
@ApiModelProperty(value = "量体方式") |
||||
private String measurementMethod; |
||||
/**量体店铺*/ |
||||
@Excel(name = "量体店铺", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") |
||||
@ApiModelProperty(value = "量体店铺") |
||||
private String storeId; |
||||
/**量体设备*/ |
||||
@Excel(name = "量体设备", width = 15, dictTable = "se_equipmenttype", dicText = "name", dicCode = "id") |
||||
@Dict(dictTable = "se_equipmenttype", dicText = "name", dicCode = "id") |
||||
@ApiModelProperty(value = "量体设备") |
||||
private String deviceId; |
||||
/**量体师*/ |
||||
@Excel(name = "量体师", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "量体师") |
||||
private String measurerId; |
||||
/**量体时间*/ |
||||
@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 Date measurementTime; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.customermeasure.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 顾客测体管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface CustomerMeasureMapper extends BaseMapper<CustomerMeasure> { |
||||
|
||||
} |
@ -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.demo.customermeasure.mapper.CustomerMeasureMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.customermeasure.service; |
||||
|
||||
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 顾客测体管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ICustomerMeasureService extends IService<CustomerMeasure> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.customermeasure.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure; |
||||
import org.jeecg.modules.demo.customermeasure.mapper.CustomerMeasureMapper; |
||||
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 顾客测体管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class CustomerMeasureServiceImpl extends ServiceImpl<CustomerMeasureMapper, CustomerMeasure> implements ICustomerMeasureService { |
||||
|
||||
} |
@ -0,0 +1,171 @@ |
||||
package org.jeecg.modules.demo.customerpayment.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.demo.customerpayment.entity.CustomerPayment; |
||||
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService; |
||||
|
||||
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: 顾客支付信息管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="顾客支付信息管理") |
||||
@RestController |
||||
@RequestMapping("/customerpayment/customerPayment") |
||||
@Slf4j |
||||
public class CustomerPaymentController extends JeecgController<CustomerPayment, ICustomerPaymentService> { |
||||
@Autowired |
||||
private ICustomerPaymentService customerPaymentService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param customerPayment |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-分页列表查询") |
||||
@ApiOperation(value="顾客支付信息管理-分页列表查询", notes="顾客支付信息管理-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(CustomerPayment customerPayment, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<CustomerPayment> queryWrapper = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap()); |
||||
Page<CustomerPayment> page = new Page<CustomerPayment>(pageNo, pageSize); |
||||
IPage<CustomerPayment> pageList = customerPaymentService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param customerPayment |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-添加") |
||||
@ApiOperation(value="顾客支付信息管理-添加", notes="顾客支付信息管理-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody CustomerPayment customerPayment) { |
||||
customerPaymentService.save(customerPayment); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param customerPayment |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-编辑") |
||||
@ApiOperation(value="顾客支付信息管理-编辑", notes="顾客支付信息管理-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody CustomerPayment customerPayment) { |
||||
customerPaymentService.updateById(customerPayment); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-通过id删除") |
||||
@ApiOperation(value="顾客支付信息管理-通过id删除", notes="顾客支付信息管理-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
||||
customerPaymentService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-批量删除") |
||||
@ApiOperation(value="顾客支付信息管理-批量删除", notes="顾客支付信息管理-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.customerPaymentService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客支付信息管理-通过id查询") |
||||
@ApiOperation(value="顾客支付信息管理-通过id查询", notes="顾客支付信息管理-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
||||
CustomerPayment customerPayment = customerPaymentService.getById(id); |
||||
if(customerPayment==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(customerPayment); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param customerPayment |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, CustomerPayment customerPayment) { |
||||
return super.exportXls(request, customerPayment, CustomerPayment.class, "顾客支付信息管理"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, CustomerPayment.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,75 @@ |
||||
package org.jeecg.modules.demo.customerpayment.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: 顾客支付信息管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("customer_payment") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="customer_payment对象", description="顾客支付信息管理") |
||||
public class CustomerPayment implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**用户*/ |
||||
@Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "用户") |
||||
private String userId; |
||||
/**支付类型*/ |
||||
@Excel(name = "支付类型", width = 15, dicCode = "zflx") |
||||
@Dict(dicCode = "zflx") |
||||
@ApiModelProperty(value = "支付类型") |
||||
private String paymentType; |
||||
/**账号/卡号*/ |
||||
@Excel(name = "账号/卡号", width = 15) |
||||
@ApiModelProperty(value = "账号/卡号") |
||||
private String accountNo; |
||||
/**开户银行*/ |
||||
@Excel(name = "开户银行", width = 15) |
||||
@ApiModelProperty(value = "开户银行") |
||||
private String bankDeposit; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.customerpayment.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 顾客支付信息管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface CustomerPaymentMapper extends BaseMapper<CustomerPayment> { |
||||
|
||||
} |
@ -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.demo.customerpayment.mapper.CustomerPaymentMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.customerpayment.service; |
||||
|
||||
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 顾客支付信息管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ICustomerPaymentService extends IService<CustomerPayment> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.customerpayment.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment; |
||||
import org.jeecg.modules.demo.customerpayment.mapper.CustomerPaymentMapper; |
||||
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 顾客支付信息管理 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-03 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class CustomerPaymentServiceImpl extends ServiceImpl<CustomerPaymentMapper, CustomerPayment> implements ICustomerPaymentService { |
||||
|
||||
} |
@ -0,0 +1,171 @@ |
||||
package org.jeecg.modules.demo.customerreceivingaddress.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.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
||||
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; |
||||
|
||||
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: 顾客地址表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-05 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="顾客地址表") |
||||
@RestController |
||||
@RequestMapping("/customerreceivingaddress/customerReceivingAddress") |
||||
@Slf4j |
||||
public class CustomerReceivingAddressController extends JeecgController<CustomerReceivingAddress, ICustomerReceivingAddressService> { |
||||
@Autowired |
||||
private ICustomerReceivingAddressService customerReceivingAddressService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param customerReceivingAddress |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-分页列表查询") |
||||
@ApiOperation(value="顾客地址表-分页列表查询", notes="顾客地址表-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(CustomerReceivingAddress customerReceivingAddress, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<CustomerReceivingAddress> queryWrapper = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap()); |
||||
Page<CustomerReceivingAddress> page = new Page<CustomerReceivingAddress>(pageNo, pageSize); |
||||
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param customerReceivingAddress |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-添加") |
||||
@ApiOperation(value="顾客地址表-添加", notes="顾客地址表-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody CustomerReceivingAddress customerReceivingAddress) { |
||||
customerReceivingAddressService.save(customerReceivingAddress); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param customerReceivingAddress |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-编辑") |
||||
@ApiOperation(value="顾客地址表-编辑", notes="顾客地址表-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody CustomerReceivingAddress customerReceivingAddress) { |
||||
customerReceivingAddressService.updateById(customerReceivingAddress); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-通过id删除") |
||||
@ApiOperation(value="顾客地址表-通过id删除", notes="顾客地址表-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
||||
customerReceivingAddressService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-批量删除") |
||||
@ApiOperation(value="顾客地址表-批量删除", notes="顾客地址表-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.customerReceivingAddressService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "顾客地址表-通过id查询") |
||||
@ApiOperation(value="顾客地址表-通过id查询", notes="顾客地址表-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
||||
CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressService.getById(id); |
||||
if(customerReceivingAddress==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(customerReceivingAddress); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param customerReceivingAddress |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, CustomerReceivingAddress customerReceivingAddress) { |
||||
return super.exportXls(request, customerReceivingAddress, CustomerReceivingAddress.class, "顾客地址表"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, CustomerReceivingAddress.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,90 @@ |
||||
package org.jeecg.modules.demo.customerreceivingaddress.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: 顾客地址表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-05 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("customer_receiving_address") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="customer_receiving_address对象", description="顾客地址表") |
||||
public class CustomerReceivingAddress implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private String sysOrgCode; |
||||
/**用户*/ |
||||
@Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") |
||||
@ApiModelProperty(value = "用户") |
||||
private String userId; |
||||
/**城市*/ |
||||
@Excel(name = "城市", width = 15) |
||||
@ApiModelProperty(value = "城市") |
||||
private String cityId; |
||||
/**地址*/ |
||||
@Excel(name = "地址", width = 15) |
||||
@ApiModelProperty(value = "地址") |
||||
private String address; |
||||
/**邮编*/ |
||||
@Excel(name = "邮编", width = 15) |
||||
@ApiModelProperty(value = "邮编") |
||||
private String zipCode; |
||||
/**收货人*/ |
||||
@Excel(name = "收货人", width = 15) |
||||
@ApiModelProperty(value = "收货人") |
||||
private String receiver; |
||||
/**联系电话*/ |
||||
@Excel(name = "联系电话", width = 15) |
||||
@ApiModelProperty(value = "联系电话") |
||||
private String mobile; |
||||
/**排序*/ |
||||
@Excel(name = "排序", width = 15) |
||||
@ApiModelProperty(value = "排序") |
||||
private Integer sort; |
||||
/**标识*/ |
||||
@Excel(name = "标识", width = 15) |
||||
@ApiModelProperty(value = "标识") |
||||
private String labelcl; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.customerreceivingaddress.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 顾客地址表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-05 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface CustomerReceivingAddressMapper extends BaseMapper<CustomerReceivingAddress> { |
||||
|
||||
} |
@ -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.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.customerreceivingaddress.service; |
||||
|
||||
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 顾客地址表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-05 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ICustomerReceivingAddressService extends IService<CustomerReceivingAddress> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.customerreceivingaddress.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; |
||||
import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper; |
||||
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 顾客地址表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-05 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class CustomerReceivingAddressServiceImpl extends ServiceImpl<CustomerReceivingAddressMapper, CustomerReceivingAddress> implements ICustomerReceivingAddressService { |
||||
|
||||
} |
Loading…
Reference in new issue